Repository navigation
[Feature]: Core flow-back step for drift where the code is ahead of the spec #4940
Description
Problem Statement
Spec Kit documents three spec persistence models in docs/guides/evolving-specs.md. Flow-forward and living spec both end with /speckit.converge. Flow-back has no command for its main step: after implementation, the guide says to update the artifacts that now disagree with the accepted direction and run /speckit.analyze, but nothing performs that update.
/speckit.converge already finds this kind of drift. Its unrequested and contradicts findings often mean the code is right and the spec or plan is out of date, for example an endpoint the plan never declared, or a behavior that changed during implementation for a good reason. Converge treats the artifacts as the only source of intent, so the only remedy it offers is a task to justify or remove the code. When the team wants to keep the code, the agent edits spec.md and plan.md by hand, with no rules about IDs, completed tasks, or where the new content may come from.
Proposed Solution
Keep converge append-only and give its code-ahead findings a second route.
- For each
unrequestedorcontradictsfinding, converge asks which side is right. "The spec is right" keeps today's behavior and appends a task. "The code is right" adds no task, and the report lists the finding as artifact drift. - A core amend step takes those confirmed findings and edits the feature's own
spec.mdandplan.mdunder fixed rules:- Content comes only from the confirmed finding and the feature's artifacts. Code is read only to resolve file paths, never to write requirements. Git history is not a source.
- Existing FR, SC and T IDs are never reused or renumbered. New IDs continue the file's own convention and width.
- Tasks marked
[X]are never edited. - Entries marked
RETIRED,SUPERSEDED by [ID]orCANCELLEDare never amended or revived. The amendment goes to the live entry. - An item that conflicts with a constitution MUST rule is withheld and reported, not written.
- A dated revision note records which entries changed.
Out of scope: deduplicating repeated converge runs (#4269 points toward stopping on unchecked tasks instead), and extension-specific parts such as parsing a feature path from the arguments.
Alternatives Considered
- A standalone core command that takes a hand-written gap report and amends spec, plan and tasks. The community
reconcileextension works this way today. It does the job, but the user has to find drift that converge has already found. - A flow-back mode inside converge that edits
spec.mdandplan.mddirectly. This breaks converge's append-only contract, so I don't recommend it. - Leave this to community extensions and link them from the Flow-Back section of
evolving-specs.md. If maintainers prefer this, I'm happy to send that docs PR instead.
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
All agents
Use Cases
- Implementation added
POST /api/v1/exports, whichplan.mdnever mentions. Converge reports it asunrequested. The team keeps it, soplan.mdgets the endpoint andspec.mdgets a new FR, and nobody gets a task to remove code that works. - A validation rule was relaxed during implementation after a product discussion. Converge reports
contradictson FR-007. The team confirms the code, and FR-007 is amended with a revision note instead of getting a revert task.
Acceptance Criteria
- Converge still writes only to
tasks.md, and only by appending - Code-ahead findings can be marked as artifact drift instead of producing a task
- The amend step edits only the current feature's
spec.mdandplan.md, and only from confirmed findings - No ID reuse or renumbering, no edits to
[X]tasks, no revival of RETIRED, SUPERSEDED or CANCELLED entries - The Flow-Back section of
evolving-specs.mdnames the command - Template scaffold tests cover the new rules, with positive and negative cases
Additional Context
Two community extensions already cover this gap:
reconcile(https://github.com/stn1slv/spec-kit-reconcile), which I maintain. It amends spec, plan and tasks from a gap report. Its fixture project has 23 regression traps covering ID conventions, bugfix markers, retired entries and constitution conflicts. I would deprecate it if core covers this.intent(https://github.com/SuhaibAslam/spec-kit-reconcile), first proposed as a bundled extension in Add intent reconciliation extension #3848.
Related: #4156 and #4158 (/speckit.revise) handle intentional requirement changes. This issue is about drift found after implementation. Both rely on the same RETIRED, SUPERSEDED and CANCELLED markers.
AI Disclosure
Drafted with Claude Code (Claude Opus 5.5), human-supervised. The agent compared the reconcile extension with converge.md, the docs and the related issues, and drafted this text.
Activity
mnriem commentedon Oct 13, 2026
Thanks for the detailed proposal, and for already delivering and maintaining the
reconcileextension, which is listed in our community catalog. We recognize that you are asking to bring that existing capability into core and reuse findings from converge—not simply asking for reconciliation tooling.The distinction we want to preserve is delivery versus persistence.
The delivery process is the same regardless of the persistence model: specify, plan, tasks, implement, and converge, repeating implement/converge until the implementation satisfies the agreed feature artifacts. Converge assesses completeness against that documented intent, with the constitution as the governing constraint.
The three persistence models describe what teams do with those artifacts after delivery:
spec.mdas the contract and revise or regenerate its derived artifacts.We deliberately describe these alternatives without prescribing one. They are persistence strategies, not alternative delivery processes or a commitment to provide a core command for every maintenance operation. Consequently, the absence of a core flow-back amendment command is not a missing step in the delivery workflow.
Your proposal preserves converge’s append-only writes, but changes another important part of its contract. Allowing an
unrequestedorcontradictsfinding to produce no remediation task because “the code is right” would route a disagreement out of the delivery loop while the documented intent still says otherwise. Accepting an implementation discovery is a legitimate human decision, but that decision must be reflected in the intended contract before convergence can establish agreement. Converge should not substitute approval of the code for that agreement.Also, an
unrequestedfinding does not necessarily demand removal of working code: the existing command explicitly permits a task to review/justify or remove the addition. The finding identifies a mismatch; it does not establish that the implementation has no value.That said, your reading exposes ambiguity in our documentation. The flow-back descriptions currently mention edits during implementation and continuing implementation after reconciliation. That wording blurs the delivery/persistence boundary we intend to preserve. We should clarify it rather than suggest the distinction is already expressed consistently.
For these reasons, we would not add the proposed routing to converge or introduce a core amendment command. Your existing
reconcileextension is an appropriate home for opt-in persistence automation—not an interim solution awaiting replacement by core. This is consistent with the extension direction previously given on github/spec-kit#4158 and github/spec-kit#3848.A focused documentation PR clarifying the shared delivery process and the subsequent persistence choices would be welcome. A neutral link to your already-listed extension from the flow-back guidance would also be reasonable, provided it is clearly optional and does not imply a required workflow step or a security endorsement.
Closing this core feature request as not planned. The documentation clarification is welcome as a separate, focused contribution; it does not depend on accepting the proposed core behavior.
AI disclosure: Drafted with GitHub Copilot, powered by GPT-6.1 Sol, in an interactive session for maintainer review. AI assistance covered issue assessment and response drafting.
feat(reconcile): ask for approval and route back to converge (#7)