From the three-lens deep review (review-remediation). Theme: teach the dep graph about archive. Conforms to ADR-0010/0011.
Problem
ADR-0010 says archived tasks "still count as Complete for blocking purposes" and ADR-0011 that the graph is "never dangling." But validateGraph (src/validation.ts:103-117) and the resolver maps in editTask/linkTask/unlinkTask only see live tasks (findAllTasks never scans archive/).
- Archiving a depended-on task then permanently bricks
link/unlink/edit on its dependents with UNKNOWN_UUID, with no in-tool recovery.
removeTask --force has the mirror gap: it strips deps only from live dependents, leaving archived ones dangling.
Slices
4. Archiving a depended-on task keeps dependents editable (finding #1)
Make the dependency graph archive-aware: validateGraph and the short-id/uuid resolver maps in editTask/linkTask/unlinkTask resolve against live ∪ archived tasks.
5. rm --force cleans archived dependents (finding #6)
Have removeTask --force strip the removed task's UUID from archived dependents as well as live ones, in the same commit. Blocked by #4.
Method
TDD outside-in at the CLI boundary. One commit per green.
From the three-lens deep review (review-remediation). Theme: teach the dep graph about archive. Conforms to ADR-0010/0011.
Problem
ADR-0010 says archived tasks "still count as Complete for blocking purposes" and ADR-0011 that the graph is "never dangling." But
validateGraph(src/validation.ts:103-117) and the resolver maps ineditTask/linkTask/unlinkTaskonly see live tasks (findAllTasksnever scansarchive/).link/unlink/editon its dependents withUNKNOWN_UUID, with no in-tool recovery.removeTask --forcehas the mirror gap: it strips deps only from live dependents, leaving archived ones dangling.Slices
4. Archiving a depended-on task keeps dependents editable (finding #1)
Make the dependency graph archive-aware:
validateGraphand the short-id/uuid resolver maps ineditTask/linkTask/unlinkTaskresolve against live ∪ archived tasks.mv A done; archive Awhere a live task B depends on A,link,unlink, andediton B all succeed.show/next/exportstill treat the archived dependency as complete (no regression).UNKNOWN_UUID.5.
rm --forcecleans archived dependents (finding #6)Have
removeTask --forcestrip the removed task's UUID from archived dependents as well as live ones, in the same commit. Blocked by #4.rm T --force, no archived task references T's UUID.rm Twithout--forcestill failsDEP_EXISTSwhen a live dependent exists.Method
TDD outside-in at the CLI boundary. One commit per green.