Skip to content

Feature: /speckit.reconcile — close post‑implementation gaps by asking clarifying questions, then amending spec.md, plan.md, and tasks.md #1063

@MDean-Slalom

Description

@MDean-Slalom

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.implement can 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:

  1. Parse a user gap report ($ARGUMENTS).

  2. Ask up to 5 clarifying questions once (only if scope/UX decisions materially change).

  3. 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 new T### 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.
  4. Output a Sync Impact Report listing changed files (absolute paths), new task IDs, and any outstanding decisions.


Behavior contract (concise)

  • Use check-prerequisites to resolve FEATURE_DIR, FEATURE_SPEC, IMPL_PLAN, and optional TASKS_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 CLARIFICATION markers; 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.md and/or plan.md only where needed.
    • Appended tasks.md items with T###, [US#], optional [P], and exact file paths.
    • A printed Sync Impact Report with absolute paths, task IDs, and any outstanding decisions.
  • 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 templates change; 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)

reconcile.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions