BOHICA-LABS / BOHICA-LABS/vsdd-factory
enhancement(orchestrator+state-manager): archive per-cycle TaskList at CONVERGED transition — currently completed tasks from prior cycles remain in TaskList across sessions, obscuring current-cycle work
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 29
Description
## Defect class
No archival policy exists for the TaskList tool at cycle boundaries. `/vsdd-factory:compact-state` archives STATE.md content into cycle files but doesn't touch the TaskList/beads tracker equivalent. Completed tasks from prior cycles accumulate in the live TaskList across CONVERGED transitions, muddling session boundaries.
Detected class: post-SHIPPED session start returns 100+ tasks, most of them completed pre-SHIPPED cycle residue, requiring manual scanning to distinguish current-cycle work from historical work.
## Observed failure (switchboard-blue, 2026-07-04)
At session start (after `v0.1.0-rc.1 SHIPPED`), `TaskList` returned **164 tasks — 162 completed, 2 pending** — from all of phase-3 through phase-7. Steady-state work now interleaves with SHIPPED-cycle residue. Distinguishing "this steady-state cycle's tasks" from "pre-SHIPPED convergence tasks" requires manual scanning of every task title and grouping by inference.
Impact:
- Orchestrator context bloat (task titles get sampled into every session decision).
- Session-boundary confusion (which tasks belong to the current burst?).
- Signal-to-noise drop when planning steady-state work.
## Root cause
TaskCreate/TaskList lifecycle is per-agent-instance, not per-cycle. There is no archival hook at:
- SHIPPED transition
- Cycle CONVERGED transition
- Manual cycle-close by operator
`/vsdd-factory:compact-state` handles STATE.md compaction but doesn't archive tasks. `state-manager` has no charter to archive tasks.
## Proposed fix (two-part)
### 1. Auto-archive at every CONVERGED transition
At every CONVERGED transition (SHIPPED, or end-of-cycle marker), state-manager should be dispatched to:
1. **Snapshot the completed-task manifest** to `cycles//task-log.md`. Format: markdown table with `task_id | title | status | closed_date | linked_pr`.
2. **Batch-delete completed tasks from the live TaskList** (retain in-flight + pending). Deletion is safe because the archive is written first — this is the same safety property `compact-state` maintains.
3. **Commit the archive** to `factory-artifacts` alongside the STATE.md compaction (single atomic commit).
Trigger: state-manager's CONVERGED transition handler adds this step after STATE.md compaction.
### 2. Register `/vsdd-factory:archive-tasks` skill
Operator-invokable manual archival. Same procedure as (1) but callable outside a CONVERGED transition. Useful for:
- End-of-week hygiene.
- After a large burst before starting a new sub-cycle.
- Recovery when TaskList has drifted.
## Acceptance criteria
- [ ] `state-manager` gains a task-archival step at CONVERGED transitions
- [ ] `/vsdd-factory:archive-tasks` skill registered
- [ ] `cycles//task-log.md` template shipped
- [ ] `compact-state` skill's docs cross-reference archive-tasks
- [ ] Post-SHIPPED session start returns <20 tasks (in-flight + pending only)
## Duplicate check
Not a duplicate. Related to `/vsdd-factory:compact-state` (STATE.md side of the same pattern — this is the TaskList side). No prior issue found on TaskList archival.
## Priority
**LOW** — UX / signal-to-noise for the orchestrator. Not urgent because the pain is cognitive rather than correctness, and the operator can hand-archive tasks with a `TaskList` + `bd close` pass. But every VSDD project reaching SHIPPED and staying alive will hit this within days; a first-class archival hook prevents the residue from accumulating.
Contributor guide
Assessment
This issue has not been assessed yet.