converge
Spec↔code convergence scan. Use after implementation to verify the ACTUAL codebase matches the spec/plan — detects missing backends, dead buttons, partial wiring, scope creep. Classifies gaps (missing/partial/contradicts/unrequested), appends remediation tasks, loops until converged. The direct answer to 'the UI renders but nothing works' syndrome.
Rune-kit · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add Rune-kit/rune --skill converge技能说明
name: converge description: "Spec↔code convergence scan. Use after implementation to verify the ACTUAL codebase matches the spec/plan — detects missing backends, dead buttons, partial wiring, scope creep. Classifies gaps (missing/partial/contradicts/unrequested), appends remediation tasks, loops until converged. The direct answer to 'the UI renders but nothing works' syndrome." metadata: author: runedev version: "0.2.0" layer: L3 model: sonnet group: verification tools: "Read, Glob, Grep" emit: convergence.gaps, convergence.clean listen: verification.complete
converge
Purpose
Post-implementation gap detector. Re-reads the spec, plan, and tasks as the sole source of intent, inspects the ACTUAL codebase (present state, not the diff), and classifies every intent key as implemented or gapped. Where verification asks "does it build?", converge asks "is everything the spec promised actually in the code?"
This is the skill that catches the most expensive silent failure: a P1 story's UI exists, renders, passes lint/type/build — and its backend was never written.
Called By (inbound)
cook(L1): Phase 6.5 CONVERGE — after VERIFY, before COMMIT, for feature/greenfield chains with a requirements.md- User:
/rune converge— "did it fully implement the spec?", "check completeness", "does the code match the spec?"
Calls (outbound)
None — pure L3 verification utility. Reports gaps; cook decides what to execute.
Executable Steps
Step 1 — Build the Intent Inventory
Load intent sources (all that exist; requirements.md is mandatory — without it, STOP and report NO_SPEC):
.rune/features/<name>/requirements.md— extract keys: everyFR-n, everyUS-nwith priority + Independent Test, everyAC-n.m(asUS-n/AC-n.m), every Key Entity.rune/plan-<feature>.md+ phase files — Key Decisions, Coverage Summary, task list withP<phase>-T<seq>IDs.rune/features/<name>/contracts/*.md— each contract: its endpoint, itsServes:story, itsConsumers:list.rune/features/<name>/data-model.md— entities, state transitions.rune/features/<name>/quickstart.md— per-story validation steps.rune/ui-spec.md## Unwired Elements(if present) — designed placeholders that MUST NOT count as implemented
The inventory is a flat list of keys: FR-3, US-1/AC-1.2, contract:create-order, entity:Order, decision:<slug>.
Rules:
- Task IDs (
P<phase>-T<seq>) and quickstart.md are EVIDENCE, not verdict keys — tasks feed the code-scope map (Step 2), quickstart steps feed pass/fail evidence for story rows. Neither gets its own verdict row - US-n verdict is DERIVED: worst verdict among its
AC-n.mrows (all ACs implemented → story implemented; any partial/missing → story inherits it). Don't independently re-assess the story - Plan Claims vs Reality: while reading tasks, note every task marked
[x]whose artifact is missing/partial in code — these go in a dedicated report section (informational;completion-gateowns claim enforcement, converge just surfaces the lie)
Step 2 — Build the Code-Scope Map
Map intent → code locations. NO full-repo read — targeted lookups only:
Globevery file path named in plan tasks — does it exist?Grepentity names (from data-model.md) across schema/model directoriesGrepeach contract's endpoint path/route across the codebase — implementation AND callersGrepcomponent names from UI tasks — definition AND the handler symbols they bind
Step 3 — Classify Gaps
For every intent key, assign exactly one verdict:
| Verdict | Meaning | Example |
|---|---|---|
implemented | Code fully realizes the key | Endpoint exists, has logic, has a caller |
missing | Required work absent entirely | Contract file exists, no route implements it |
partial | Started but a link in the chain is dead | Button + handler exist; handler's fetch targets a route that doesn't exist |
contradicts | Code diverges from a locked decision or AC | Spec says soft-delete; code hard-deletes |
unrequested | Code maps to NO intent key (scope creep — surfaced, not blocked) | New admin page no story asked for |
Dead-interaction trace (run for every UI element an AC references):
element → handler bound? → handler body non-trivial? → calls service/fetch?
→ target route/function EXISTS in codebase? → route touches the entity the AC names?
First broken link = partial, keyed to that element's US-n/AC-n.m. Heuristics: onClick={() => {}}, href="#" on action links, console.log-only handlers, preventDefault()-only submits, fetch('/api/...') where no route file matches — all break the chain.
Unwired Elements (declared debt) — elements listed in .rune/ui-spec.md ## Unwired Elements:
- Owner of wiring is a task/story IN THIS feature's plan →
missing, keyed to that story (in-scope debt) - Owner is external (asset-creator pass, future feature, human) →
deferred-debt: report in a separate### Deferred (declared debt)section, do NOT append a CV task, do NOT count in gap counts, does NOT blockconvergence.clean. Declared debt with a named owner is tracked honesty, not a convergence failure
Precedence: an element that maps to NO intent key takes the unrequested path — the dead-interaction trace runs only for AC-referenced elements.
Step 4 — Assign Severity
| Severity | Condition |
|---|---|
| CRITICAL | missing or contradicts gap that blocks a P1 story's acceptance scenario or Independent Test |
| HIGH | partial on a P1 story, or missing/contradicts on P2 |
| MEDIUM | Any gap on P3; unrequested code touchin |