← ClaudeAtlas

bts-synclisted

Synchronize final.md spec with actual implementation. Finds deviations between spec and code, updates final.md to reflect reality, and generates deviation report.
imtemp-dev/claude-bts · ★ 0 · Code & Development · score 66
Install: claude install-skill imtemp-dev/claude-bts
# Sync: final.md ↔ Code Synchronize spec and implementation for recipe: $ARGUMENTS ## Prerequisites 0. **Resolve recipe ID**: If `$ARGUMENTS` is empty, run `bts recipe status` to find the active recipe. Use its ID for all `{id}` references below. 1. Verify test-results.json exists: ```bash ls .bts/specs/recipes/{id}/test-results.json ``` If not found → "Run /test first. Sync requires passing tests." 2. Check test status: should be `"pass"`. If `"fail"` → "Tests are failing. Fix tests before syncing." ## Step 1: Extract Spec Definitions (grouped by file) Read `.bts/specs/recipes/{id}/final.md` and group all definitions by file. Also read `tasks.json` to know which files were created vs modified — this helps focus the comparison on files that actually changed. ``` { "src/config.py": { functions: [name, params, return_type, error_handling], types: [name, fields], exports: [public API items] }, "src/agent.py": { ... }, ... } ``` This creates one group per file, containing ALL items for that file. ## Step 2: File-by-File Comparison For EACH file group (not each individual item): 1. Read the spec's definitions for this file (all functions, types, exports) 2. Read the actual code file 3. Compare ALL items in ONE pass: - List every function/type in spec → check it exists in code with correct signature - List every function/type in code → check if spec mentions it - This is a full comparison — nothing is skipped This reduces