Reconcile progress.md with actual task files, archive done tasks, update epic statuses, check domain freshness. Triggers on "sync", "reconcile", "clean up tasks", "archive done", "update progress". Use after completing tasks or when progress.md seems stale.
Update progress.md to match actual task file statuses, archive done tasks, and update epic/investigation statuses based on task completion.
.context/
├── tasks/ # Active tasks (pending, in-progress, blocked)
├── tasks-done/ # Archived done tasks (organized by epic subfolder)
├── plans/ # Epics
├── investigations/ # Investigation files
├── plans-done/ # Archived done epics & investigations
└── progress.md # Progress tracker
See ../../shared/conventions/error-handling.md for general error handling rules.
Skill-specific errors:
.context/tasks/ doesn't exist: Report no context bank found, suggest /ctx:context-init## Statuspending## Acceptance Criteria: Cannot count AC progress — report as "ACs unknown"Scan all task files:
.context/tasks/*.md
.context/tasks-done/**/*.md (for reference/reporting, includes epic subfolders)
Extract from each:
- [x] vs - [ ])Fix stale task statuses:
For each task in .context/tasks/:
[x] but status is NOT done → update status to done[x] and status is pending → update status to in-progressArchive done tasks:
.context/tasks-done/<epic-name>/ subfolder if it doesn't exist (e.g., tasks-done/epic-auth-frontend/)tasks-done/other/## Status: done from tasks/ to the appropriate subfolderCompare with progress.md:
Update progress.md:
Update epic/investigation statuses:
.context/plans/ for epics with status "broken-down".context/investigations/ for investigations with status "broken-down"If logging is enabled, append one line to ${CLAUDE_PLUGIN_DATA}/ctx-logs/sync-history.jsonl:
{"ts": "ISO-8601", "project": "name", "tasks_done": N, "tasks_pending": N, "tasks_blocked": N, "epics_completed": ["epic-name"]}
Sync complete.
Status Corrections:
- 007-build-ui.md: pending → in-progress (3/5 ACs checked)
- 008-write-tests.md: in-progress → done (all ACs checked)
Archived Tasks:
- 005-implement-auth.md → tasks-done/epic-authentication/
- 006-add-tests.md → tasks-done/epic-authentication/
Task Changes:
- [task] moved to [section]
- [task] added (was missing)
- [task] removed (no file)
Epic/Investigation Updates:
- [epic-name] status changed to "completed" (all 5 tasks done) — archived to plans-done/
Current state:
- Done: X (in tasks-done/)
- In Progress: X
- Pending: X
- Blocked: X
Epics/Investigations:
draft → Being writtenready → Ready to break downbroken-down → Has tasks, work in progresscompleted → All tasks finished (archived to plans-done/)Tasks:
pending → Not started (in tasks/)in-progress → Being worked on (in tasks/)done → Finished (moved to tasks-done/<epic-name>/)blocked → Waiting on dependency (in tasks/)tasks/ folder focused on active workplans-done/ to keep plans/ and investigations/ focused on active worktasks-done/ and plans-done/ to review past work or reference implementations/ctx:task skill should only look in tasks/ for active work.context/plans-done/Domain freshness check:
If .context/domain.md exists:
plans-done/)Domain Coverage:
⚠ domain.md last updated [date] — [N] epics with business logic completed since then
→ Consider reviewing with /ctx:domain
Domain Coverage: ✓ Up to dateWhen archiving a completed epic to plans-done/:
Epic "[name]" completed. Referenced domain rules:
- ORD-001: Order must contain at least one Line Item ← still accurate?
- ORD-003: Free shipping when total > $50 ← still accurate?
Confirm all still correct? Or need updates?
Failure Pattern Analysis (Self-Learning):
If ${CLAUDE_PLUGIN_DATA}/ctx-logs/execution.jsonl exists and logging is enabled:
ts field)skill + failure_type## Gotchas section"gotcha_proposed": trueWrite sync summary: