speckit-spec-stats-reconcile
Reconcile tasks.md checkboxes against actual implementation — cross-references TDD test-list.md DONE behaviors and file existence to mark tasks that were implemented but never checked
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- speckit-spec-stats-reconcile
- metadata
- { "author": "github-spec-kit", "source": "spec-stats:commands/speckit.spec-stats.reconcile.md" }
- description
- Reconcile tasks.md checkboxes against actual implementation — cross-references TDD test-list.md DONE behaviors and file existence to mark tasks that were implemented but never checked
- compatibility
- Requires spec-kit project structure with .specify/ directory
03 SKILL.md 正文
Spec Stats — Reconcile
Fix stale tasks.md checkboxes by cross-referencing actual implementation state.
When features are implemented without updating the task checkboxes (common in
fast-paced development), this command corrects the tracking to match reality.
How it works
For each spec, the reconcile engine applies two strategies:
-
Behavior-based (fast, no execution): If a task has behavior markers (e.g.,
[A1],[U8]) and the corresponding behaviors areDONEintdd/test-list.md, the task is marked[x]. DROPPED behaviors are left unchecked by default (configurable via--drop-mark). -
File-existence-based (for tasks without behavior markers): If a task references a file path (e.g.,
`lib/src/foo.dart`) and the file exists in the codebase, the task is marked[x].
Tasks that cannot be auto-verified are reported as "needs manual check."
User Input
$ARGUMENTS
Accept any of:
--all— reconcile all specs in the project<spec>...— specific spec IDs or slugs (e.g.,011,herdr-pane-management)--dry-run— show what would change without writing files--drop-mark checked|unchecked— how to handle DROPPED behaviors (default:unchecked)--out <path>— write report to this path instead of stdout
When no spec is specified and no active feature is set, reconciles all specs.
Execution
Run the bundled Node engine from the repository root:
node .specify/extensions/spec-stats/scripts/spec-stats.mjs reconcile --all --dry-run
# Review what would change
node .specify/extensions/spec-stats/scripts/spec-stats.mjs reconcile --all
# Apply changes
node .specify/extensions/spec-stats/scripts/spec-stats.mjs reconcile 011 012
# Reconcile specific specs
The engine:
- Reads
tdd/test-list.mdfor each spec (if present) and extracts DONE/DROPPED behavior IDs. - Reads
tasks.mdand finds tasks with behavior markers like[A1],[U8]. - For each unchecked task:
- If ALL its behavior markers are DONE → mark
[x] - If any marker is DROPPED and
--drop-mark checked→ mark[x] - If no behavior markers but referenced files exist → mark
[x] - Otherwise → leave unchecked, report as "needs manual check"
- If ALL its behavior markers are DONE → mark
- Writes the updated
tasks.md(unless--dry-run). - Reports a summary of changes.
Report format
# Spec Stats — Reconcile
- **011-zuraffa-tui-dashboard**: 76 checked, 0 already done, 2 need manual check
✓ Create TUI dashboard entry point in `bin/tui_dashboard.dart` — files exist: bin/tui_dashboard.dart
...
- **012-herdr-pane-management**: 112 checked, 0 already done, 6 need manual check
✓ [A1] Acceptance test... — behaviors [A1] all DONE
...
**Total**: 188 tasks reconciled, 0 already correct, 8 need manual check
Guardrails
- Read-only by default: Use
--dry-runto preview changes before applying. - Never removes checks: Only adds
[x]marks, never unchecks a task. - Preserves formatting: Only modifies the
[ ]→[x]character, leaving the rest of each line intact. - Idempotent: Running reconcile twice produces no additional changes.
04 同仓库更多 Skills
speckit-tdd-verify
Audit TDD discipline by delegating to zfa tdd verify (mutation testing, evidence integrity); the LLM interprets the verdict and drives remediation
speckit-tdd-setup
Detect the test stack and write .specify/memory/tdd-profile.md; zuraffa-wired projects record zfa commands as the engine
speckit-tdd-run
Drive the red-green-refactor loop by delegating to zfa tdd run (deterministic engine); the LLM handles only honest stops — fixing genuine reds and remediation — never re-driving what zfa drives
speckit-tdd-plan
Derive the feature's test list by delegating to zfa tdd plan (deterministic engine); falls back to LLM-guided derivation only when zfa is unavailable
speckit-spec-stats-runs
On-demand execution — reads verified suite command from .specify/memory/tdd-profile.md, runs it for selected specs (--all, spec id/slug, or default active feature), captures pass/fail + duration + tail, appends run record to .specify/stats/runs.json, refreshes dashboard health column
speckit-spec-stats-report
Main generator — scans all specs/*/, derives per-feature stage, task progress, health, last updated; when the TDD extension is installed, adds a deep TDD table (acceptance/unit/characterization counts, DONE, loop mode, tasks.md state); renders dashboard to configurable output path and writes .specify/stats/stats.json snapshot