Skip to content

Guide Spec Kit Iteration

Reese Hodge edited this page Oct 11, 2026 · 3 revisions

Guide: Iterating on Spec Kit Artifacts

How to change a feature's Spec Kit artifacts after the specify → clarify → plan → tasks pipeline has already run.

The problem

Spec Kit's core workflow is a forward pipeline built for greenfield work. There is no built-in "edit this artifact" command. So the moment you need to bump a pinned version, correct a stale fact, or fold in a new component, the obvious move — re-run the command that produced the file — is the one that destroys your accumulated edits.

Knowing each command's blast radius is the whole game.

Command scope — verified against v1.0.12

Still current at v1.1.0: that upgrade changed no .github/agents/*.agent.md definition (see Decision-Spec-Kit-Upgrade).

Command Reads Writes Safe to re-run?
speckit.clarify spec.md spec.md, and the built-in checklists/requirements.md ✅ Yes — edits in place, max 5 questions
speckit.plan spec.md Regenerates plan.md, research.md, data-model.md, contracts/, quickstart.md ❌ No — destructive
speckit.tasks plan artifacts Regenerates tasks.md ❌ No — destructive
speckit.analyze all artifacts nothing ✅ Yes — read-only
speckit.checklist spec.md, plan.md, tasks.md checklists/<name>.md — creates or appends ✅ Yes, but it does write
speckit.converge spec.md, plan.md, tasks.md, code Appends one ## Phase N: Convergence section to tasks.md ✅ Yes — append-only

⚠️ Re-running speckit.plan on a feature with established artifacts loses every iterative refinement made since initial generation, and the regenerated text may reintroduce stale versions from the model's training cutoff. This is the trap indexed on Gotchas.

Invoking an agent in Copilot CLI

Copilot CLI's /agent selects an agent; it does not accept a request after the name on the same input line. For example, enter /agent speckit.clarify and press Enter, then send the clarification request as a separate message. Appending the request to the command looks up an agent with the entire input as its name and reports Custom agent not found. The agent is present in this repo at .github/agents/speckit.clarify.agent.md; this error does not mean Spec Kit is missing. Use /agent without arguments to browse available agents. GitHub's Copilot CLI documentation also documents one-shot copilot --agent=speckit.clarify --prompt "...".

Two corrections to the retired guidance

The predecessor document called speckit.checklist "non-destructive (reads all artifacts)" and described speckit.clarify as touching spec.md only. Re-reading the v1.0.12 agent definitions on 2026-09-27 disproved both.

Old claim What v1.0.12 actually does
checklist only reads It writes FEATURE_DIR/checklists/<name>.md, creating the directory and either starting a new file at CHK001 or appending to an existing one. It is safe for spec artifacts, not write-free. It must never mark items [x] — checkbox state belongs to the reviewer.
clarify touches spec.md only It also maintains checklists/requirements.md, the built-in spec-quality checklist shared with /speckit.specify. Still safe, but the blast radius is two files, not one.

Both corrections are recorded in Log.

speckit.converge — the drift-closing command

This is the command that replaced the abandoned third-party iterate extension (see Decision-Spec-Kit-Upgrade). It assesses what the codebase actually implements against spec.md, plan.md and tasks.md, then appends the remaining work as new, traceable tasks.

Its contract is unusually strict, and worth trusting:

  • Append-only, never rewrite. Its only write is a new ## Phase N: Convergence section at the end of tasks.md.
  • It will not modify, create or delete application code. Completing the appended tasks is /speckit.implement's job.
  • It never reuses or renumbers existing task IDs. A second convergence run adds a separately-numbered phase below the first and leaves the old one alone.
  • When the codebase already satisfies everything, it leaves tasks.md completely untouched — not even an empty phase header.
  • It stops if any of spec.md, plan.md or tasks.md is missing, rather than producing partial output.

This makes it the right default for the exact situation this project keeps hitting: a task marked [x] that was never fully built. See Source-Tasks-001 for the drift this repo already carries.

Approaches, in order of preference

1. Manual edits + speckit.analyze (safest)

Best for targeted changes — version bumps, wording, correcting stale facts.

  1. Edit the affected files directly.
  2. Use speckit.clarify only if the change needs to flow back into spec.md.
  3. Run speckit.analyze to validate cross-artifact consistency.
  4. Optionally run speckit.checklist to confirm quality gates still pass.
  5. Commit with the rationale in the body.

Full control, no regeneration risk, and it sidesteps training-cutoff staleness. The cost is that you must know which artifacts reference the thing you changed.

2. speckit.converge (for non-trivial drift)

When the artifacts and the code have drifted apart, this is the built-in answer. Non-destructive, drift-aware, assessment-first. Run it after /speckit.tasks has produced a complete tasks.md.

3. Regeneration on a throwaway branch (major pivots only)

When manual editing is impractical — a genuine architectural pivot:

  1. Branch from your current state.
  2. Run the regenerative command there.
  3. Diff the regenerated artifacts against your existing ones.
  4. Cherry-pick what you want back into the working branch.
  5. Run speckit.analyze.

Higher effort, manual diff review, and the model may still inject stale data — but your real artifacts are never at risk.

Decision matrix

Change type Approach Risk
Version bumps, wording fixes Manual edits + speckit.analyze Low
New clarifications to requirements speckit.clarify Low
Code has drifted from the artifacts speckit.converge Low
Multi-artifact change (new component, revised data model) speckit.converge, or manual edits + speckit.analyze Low–Medium
Architectural pivot, major restructure Throwaway branch + cherry-pick Medium
Re-running speckit.plan on an existing feature Avoid High

Standing practices

  • Commit or back up before any regenerative command.
  • Run speckit.analyze after every batch of edits, to catch cross-artifact inconsistency while it is still cheap.
  • Assume external facts are stale. Any AI-driven regeneration can reintroduce dead package names and superseded versions — this repo has already been bitten by a documented install command that 404s. Verify before acting.
  • Treat spec.md as the what and the plan artifacts as the how. Pick the command that matches the layer you are changing.
  • Upgrading Spec Kit itself is safe, but only via the manifest-aware path: specify integration upgrade copilot, then specify extension update. Never specify init --here --force. Neither command ever touches specs/. Full detail on Decision-Spec-Kit-Upgrade.

See also: Decision-Spec-Kit-Upgrade, Gotchas, Source-Initial-Plan, Index.

Clone this wiki locally