feat(#1592): add plan:pre codebase-drift pre-check before planner runs

Add a non-blocking, warn-only codebase-drift gate at plan:pre so a stale
STRUCTURE.md is surfaced before /gsd:plan-phase spawns the planner, instead
of being discovered mid-execution by the existing execute:wave:post gate.
Gated on a dedicated workflow.plan_drift_precheck toggle (default true),
independent of schema_drift_gate. Never blocks planning, never spawns the
mapper agent at plan time.

Review feedback (#1595):
- Use a documented conventional-commit type (feat, not enhance) per
  CONTRIBUTING.md / gsd-validate-commit.sh.
- Normalize the plan_drift_precheck command references to the colon prose
  form (/gsd:plan-phase, /gsd:map-codebase) to match plan-phase.md §5.65;
  registry regenerated from capability.json.
- Make the test temp dirs hermetic: drain mkdtemp dirs in an after() hook
  via the helpers.cleanup() budget (local/no-raw-rmsync-in-tests-compliant).

Closes #1592

Claude-Session: https://claude.ai/code/session_016JBiXEAofvB3prJim29XMS
This commit is contained in:
Dave
2026-06-22 16:57:51 -04:00
parent 3aa528d6e3
commit d1f7ba82f2
10 changed files with 251 additions and 7 deletions

View File

@@ -253,6 +253,7 @@ describe('plan:pre all-off — empty resolution', () => {
research: false,
pattern_mapper: false,
schema_push_detection: false,
plan_drift_precheck: false,
},
intel: { enabled: false },
});