skills/reconcile/SKILL.md
Analyse and resolve divergences between SDLC manifest and actual development state (git commits, branches, uncommitted files). Use when manifest and reality have drifted apart, or before picking next story to ensure clean state.
npx skillsauth add sofer/.agents reconcileInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyse divergences between the SDLC manifest and actual development state, then propose and execute corrections to bring them into agreement.
[1. Collect state]
Git: log, branch, status, diff
Manifest: .sdlc/manifest.yaml
Files: .sdlc/stories/*/
[2. Detect divergences]
Compare expected vs actual state
Categorise by type and severity
[3. Generate report]
Summary of manifest state
Summary of git state
List of divergences
[4. Propose corrections]
Safe corrections (auto-apply candidates)
Unsafe corrections (require confirmation)
[5. Execute corrections]
Apply approved changes
Update manifest
| Command | Behaviour |
|---------|-----------|
| /reconcile | Full analysis and interactive correction |
| /reconcile --report | Report only, no corrections |
| /reconcile --auto | Apply safe corrections automatically |
| /reconcile --story US-XXX | Focus on specific story |
| Type | Description | Severity | |------|-------------|----------| | Phase drift | Manifest phase behind actual progress | Medium | | Uncommitted implementation | Code exists but not committed | High | | Missing artifacts | Manifest references non-existent files | Medium | | Orphan artifacts | Files exist but not in manifest | Low | | Stale branch | Merged branch still exists locally | Low | | Status mismatch | Story marked complete but has issues | High | | Untracked functionality | Implementation exists with no story | High | | Branch mismatch | Wrong branch checked out for story | Medium |
See references/divergence-types.md for detailed detection methods and resolution strategies.
Gather information from three sources:
Git state:
git log --oneline -20 # Recent commits
git branch -a # All branches
git status # Working tree state
git diff --name-only # Changed files
git diff --cached --name-only # Staged files
Manifest state:
.sdlc/manifest.yamlFile state:
.sdlc/stories/*/ directoriesFor each story in manifest:
Check phase accuracy:
Check artifacts:
Check git state:
Check for untracked work:
Format:
# Reconciliation report
## Manifest state
- Project: {name}
- Current story: {id} - {title}
- Current phase: {phase}
- Stories in progress: {count}
- Stories complete: {count}
## Git state
- Current branch: {branch}
- Uncommitted files: {count}
- Staged files: {count}
- Recent commits: {list}
## Divergences found
### High severity
- [ ] **Uncommitted implementation** (US-004)
- Files: scoring.py, triage.py, writeback.py
- Expected: committed during implement phase
- Actual: exist but uncommitted
### Medium severity
- [ ] **Phase drift** (US-004)
- Manifest phase: design
- Actual progress: implementation exists
- Evidence: scoring.py, triage.py present
### Low severity
- [ ] **Stale branch**
- Branch: story/US-003-match-gmail-correspondence
- Status: merged to main
- Action: can be deleted
## Stale branches
| Branch | Status | Last commit |
|--------|--------|-------------|
| story/US-003-match-gmail-correspondence | merged | cc3128f |
Present corrections in two categories:
Safe corrections (can auto-apply):
## Safe corrections
These can be applied automatically with `--auto`:
1. **Update US-004 phase** design → implement
- Reason: implementation files exist
2. **Add artifact references to US-004**
- Add: scoring.py, triage.py, writeback.py
3. **Delete stale branch**
- Branch: story/US-003-match-gmail-correspondence
Unsafe corrections (require confirmation):
## Unsafe corrections
These require explicit approval:
1. **Commit uncommitted changes for US-004**
- Files: scoring.py, triage.py, writeback.py
- Message: "feat(scoring): implement lead scoring (US-004)"
- Risk: may include unintended changes
2. **Create story for untracked functionality**
- Files: collect.py, match.py, next.py
- Suggested: US-005 "Additional utility scripts"
- Risk: may miscategorise functionality
3. **Mark US-004 as current_story**
- Current: null
- Proposed: US-004
- Risk: overwrites any existing current_story intent
For safe corrections with --auto:
For unsafe corrections:
These corrections have low risk and clear intent:
These corrections could lose work or make incorrect assumptions:
If .sdlc/manifest.yaml does not exist:
.sdlc/ directoryWhen uncommitted files could belong to multiple stories:
When some artifacts exist but story phase suggests they shouldn't:
Files that look like implementation but match no story:
When orchestrate skill detects potential drift:
/reconcile --reportTriggers for drift check:
tools
Check whether Claude and Codex have equivalent access to shared agent resources, skills, hooks, plugins, MCP servers, permissions, startup behaviour, and provider-specific adapter config. Use when comparing agent environments, debugging missing capabilities after restart, or deciding whether to symlink a resource or configure a runtime.
testing
Record substantive skill use in an append-only local log. Use after choosing or invoking a non-system skill for real work, when a skill is inspected but not used, or when a skill fails to apply. Do not use for routine system skills or incidental file reads.
testing
Turn a vague or underspecified request into a self-contained problem statement. Use when the user has a rough idea, when a request would fail if handed directly to an agent, or before non-trivial work that needs shared understanding.
data-ai
Append a one-line learning to ~/.agents/learning-log.md. Use when the user types /learning, or when something genuinely worth remembering surfaced during work and the user confirms it should be captured.