-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Description
Summary
There’s no first‑class way to reconcile post‑implementation gaps after running /speckit.specify → /speckit.plan → /speckit.tasks → /speckit.implement. This creates artifact drift: example scenario; the backend and tests may exist and a UI may be scaffolded, but navigation/wiring or updated acceptance criteria are missing. I’m proposing a focused command template, /speckit.reconcile, to ask targeted questions and then amend spec.md, plan.md, and tasks.md accordingly—without creating a new feature branch.
Problem
- Implementations land but users can’t reach the new screens (routes/menu entries missing).
- Acceptance criteria and user scenarios are not updated to match shipped behavior.
- Tasks don’t reflect the cleanup work (integration tests, wiring, docs), so gaps recur.
- Current flow lacks a structured, low‑risk loop to fix these quickly.
Why this matters
- Prevents spec/plan/tasks drift and keeps artifacts trustworthy.
- Eliminates wasteful re‑spec/plan cycles for small but critical fixes.
- Produces ready‑to‑implement tasks that
/speckit.implementcan pick up immediately. - Small, template‑only surface area (no CLI changes, minimal blast radius).
Proposal
New command: /speckit.reconcile
Location: templates/commands/reconcile.md
Scope: Template‑only. Reuses existing discovery scripts; no branch ops, append/minimal edits.
High‑level flow:
-
Parse a user gap report (
$ARGUMENTS). -
Ask up to 5 clarifying questions once (only if scope/UX decisions materially change).
-
Apply targeted edits:
spec.md: user story + acceptance criteria + User Scenarios & Testing; add a short Revisions note.plan.md: Routing & Navigation, Integration Contracts, Testing Strategy.tasks.md: append newT###items under the right User Story phase (or a final “Remediation: Gaps” phase). Include exact file paths and optional[P].- Always add an integration test task when wiring/flows are the gap.
-
Output a Sync Impact Report listing changed files (absolute paths), new task IDs, and any outstanding decisions.
Behavior contract (concise)
- Use
check-prerequisitesto resolveFEATURE_DIR,FEATURE_SPEC,IMPL_PLAN, and optionalTASKS_FILE. - Operate in place (no new feature, no branch switching).
- Absolute paths in all outputs.
- Append‑only where possible; preserve section order/headings.
- At most 3
NEEDS CLARIFICATIONmarkers; otherwise pick reasonable defaults.
Out of scope
- No CLI/script changes; this is a template‑level addition.
- No branch management.
- No broad rewrites of existing artifacts—surgical edits only.
Acceptance criteria
-
New file:
templates/commands/reconcile.md. -
Running
/speckit.reconcile "<gap report>"results in:- Updated
spec.mdand/orplan.mdonly where needed. - Appended
tasks.mditems withT###,[US#], optional[P], and exact file paths. - A printed Sync Impact Report with absolute paths, task IDs, and any outstanding decisions.
- Updated
-
Works with current check‑prerequisites discovery flow.
-
No branch changes, minimal diffs, structure preserved.
Implementation sketch
- Add
templates/commands/reconcile.md(preliminary draft attached). - Keep edits section‑precise; avoid renumbering tasks.
- Where wiring is missing, enforce an integration test task to prove end‑to‑end navigation.
Risks & mitigations
- Over‑editing artifacts → Mitigate via append‑only, section‑targeted diffs, and a hard limit on clarifications.
- Template vs. CLI confusion → Clearly label as
templateschange; no executable changes. - Task sprawl → Require exact file paths and story‑phase placement to keep tasks actionable.
Prior art / fit
This follows the project’s pattern of small, additive templates that improve the flow without touching the CLI. The command is composable and keeps the core loop fast.
Willing to implement
Yes—happy to open the PR and iterate on feedback.
Appendix — Example gap report ⇒ expected tasks
“Backend + tests for Invoice Settings exist; React screen scaffolded. Users can’t navigate to it. Need sidebar link + route. Success toasts must follow UX constitution.”
Expected new tasks (examples):
- [ ] T045 [US2] Add route /invoices/settings in frontend/src/router/index.ts
- [ ] T046 [US2] Add sidebar link to Invoice Settings in frontend/src/components/Sidebar.tsx
- [ ] T047 [US2] Integration test: navigate to Invoice Settings (tests/integration/invoices_settings.spec.ts)