Summary
ARCHITECTURE.md Section 8 specifies a decision tree the model must follow after compaction. The check_clear_approval_command.sh injection is the mechanism. But test_hooks.sh doesn't test:
- What the injected WORKFLOW STATE looks like immediately after
EnterPlanMode with a rich previous plan
- Whether the planning injection correctly enriches with previous objective from the plans table when breadcrumb keys are empty
- The no-token fallback after compaction
Motivation
Compaction recovery is a critical path — if the model loses context and the injection doesn't correctly restore state, the entire workflow breaks silently. This path is untested.
Proposed Change
Add test cases covering:
EnterPlanMode injection with existing plan state
- Planning injection enrichment from plans table when breadcrumb keys are empty
- No-token fallback behavior after compaction
Acceptance Criteria
- Tests verify correct WORKFLOW STATE injection after EnterPlanMode
- Tests verify planning injection enrichment from plans table
- Tests verify no-token fallback produces usable state
Summary
ARCHITECTURE.md Section 8 specifies a decision tree the model must follow after compaction. The
check_clear_approval_command.shinjection is the mechanism. Buttest_hooks.shdoesn't test:EnterPlanModewith a rich previous planMotivation
Compaction recovery is a critical path — if the model loses context and the injection doesn't correctly restore state, the entire workflow breaks silently. This path is untested.
Proposed Change
Add test cases covering:
EnterPlanModeinjection with existing plan stateAcceptance Criteria