Feat/4156 Revise Specs - #4158
Draft
harsha09 wants to merge 14 commits into
Draft
Conversation
Add a core slash command that applies a known requirement delta (add/remove/reword ACs, FRs, stories) to the current feature spec without opening a new specs/ directory. Cascade into plan.md and tasks.md when those files exist, record the change in revisions.md, and teach implement/taskstoissues to skip cancelled tasks. Assisted-by: Grok (model: grok-4.6, supervised)
Register /speckit.revise in the core command order, skill descriptions, Copilot core set, and Claude/Alquimia argument hints so specify init actually installs it everywhere. Update integration file-inventory tests and align post-hooks with sister commands. Assisted-by: Grok (model: grok-4.6, supervised)
List /speckit.revise in the post-init command inventory and extension hook catalog. Send known deltas from clarify/analyze to revise, emit a single completion report after hooks, and note that lean still uses the core revise command. Assisted-by: Grok (model: grok-4.6, supervised)
Keep living-spec checklist marker updates in the same commit as the spec delta when the git extension auto-commits after_revise. Assisted-by: Grok (model: grok-4.6, supervised)
spec.md stays the only contract. revisions.md is IDs plus a date.
Re-running the same add/remove, or adding what the spec already
says, writes nothing and does not bump R{N}.
Assisted-by: Grok (model: grok-4.6, supervised)
When a delta contradicts a live FR/AC/SC, mark the old line SUPERSEDED by a new ID and add the replacement. Pure drops are RETIRED in place. Tasks get SUPERSEDED → new T0xx or CANCELLED. implement/analyze skip those lines. Assisted-by: Grok (model: grok-4.6, supervised)
Keep the same rules (in-place edit, supersede/retire, no-op duplicates, cascade, hooks) in a ~150-line prompt instead of ~385 so each /speckit.revise call sends less to the model. Assisted-by: Grok (model: grok-4.6, supervised)
Same behavior, spoken as a briefing instead of a spec: what this is, how to classify the delta, what to write, when to stop. Assisted-by: Grok (model: grok-4.6, supervised)
…ment Requirement changes must supersede or retire old IDs, not restyle the same line. plan.md and tasks.md are only appended. After implementation, new work is add-code tasks and invalid work is remove-code tasks. Assisted-by: Grok (model: grok-4.6, supervised)
9 tasks
The tasks handoff no longer rebuilds tasks.md after a revision. Converge inventories only live IDs and waits for open Revision tasks. Lean implement skips cancelled work. Specify stops before mkdir. Implemented is per-ID; plan_status is a real report field. Assisted-by: Grok (model: grok-4.6, supervised)
First-generation tasks inventory only live IDs. Persist plan_status on revisions.md and send needs-rebuild to plan. Clarify and checklist no longer overwrite living-spec history. Init lists /speckit.revise. Assisted-by: Grok (model: grok-4.6, supervised)
Do not rewrite the evolving-specs steps or persistence model. Add a single line pointing at /speckit.revise and leave the original clarify / plan / tasks loop in place. Assisted-by: Grok (model: grok-4.6, supervised)
Keep the existing living-spec steps. After /speckit.revise, skip clarify/plan/tasks unless plan or tasks are missing. Clarify must not delete a live line to pass the contradiction check. Assisted-by: Grok (model: grok-4.6, supervised)
…impl Specify can still create or update a spec before plan, tasks, or implementation exist. Revise is for changing FRs, SCs, or ACs after those exist, and for cascading the related artifacts. Assisted-by: Grok (model: grok-4.6, supervised)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #4156
Description
We kept hitting the same mess: requirements change after
/speckit.specify(sometimes after implement), and the agent "fixes" it by rewritingspec.mdand regeneratingtasks.md. History disappears. You can't tell what was dropped, and if we already shipped, nothing says "remove the old code."/speckit.specifyalways opens a new feature folder./speckit.clarifyasks questions I already know the answer to./speckit.convergeassumes the spec didn't move. None of those is "this AC is no longer valid" or "SSO instead of password."This PR adds
/speckit.revise. Same feature directory. It does not rewrite spec/plan/tasks. Old FRs/ACs stay on the page, marked SUPERSEDED (replaced by a new ID) or RETIRED (gone, nothing replaces them). New requirements get new IDs.revisions.mdis only a dated list of those IDs, not a second spec.If
plan.md/tasks.mdexist, it only appends. After implement, that means tasks to add the new code and/or remove the old code. Revise does not touch application code; you run/speckit.implementfor that. Open tasks for a dead ID get cancelled/superseded; finished[x]tasks stay.Implement, analyze, and taskstoissues skip those dead lines. Git gets
before_revise/after_revise.The command prompt is short on purpose. First drafts were huge and would have eaten tokens every run.
Testing
uv run specify --helpuv sync && uv run pytest(focused: revise contracts, command-template py scripts, git extension, init inventories, Claude/Alquimia hints. Green. I didn't sit through the full suite.)
specify init /tmp/speckit-revise-test --integration grok --script pyfrom this branch. Same folderspecs/001-user-login/the whole way. No002-.Manual test results
Agent: Grok | OS/Shell: macOS/zsh
/speckit.specify/speckit.plan/speckit.tasks/speckit.implement/speckit.revise(add expired-session AC)/speckit.revise(password no longer valid)/speckit.implement(cleanup)/speckit.analyzeTest selection reasoning
AI Disclosure
Grok helped explore the repo, draft the command, and run the sample-project walkthrough. I set the rules and reviewed the diffs. Commits have
Assisted-by: Grok (model: grok-4.6, supervised).