fix(#1505): extract context_guard step to reference file; fix allow-test-rule see ref
- Extract execute-phase.md context_guard step prose to gsd-core/references/execute-phase-context-guard.md (@-ref lazy load), bringing execute-phase.md back under the ADR-857 phase-6 size ceiling (92914 < 93166 bytes) - Fix allow-test-rule comment: add `see #1452` per ADR-456 lint rule - Update feat-1452 tests to check the reference file for extracted content - Register execute-phase-context-guard.md in INVENTORY-MANIFEST.json and INVENTORY.md Workflow References section - Regenerate workflow-size-baseline.json after file shrinkage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -493,22 +493,7 @@ increases monotonically across waves. `{status}` is `complete` (success),
|
||||
|
||||
@~/.claude/gsd-core/references/execute-phase-wave-guard.md
|
||||
|
||||
0. **Context exhaustion guard — `context_guard` (BEFORE spawning, #1452):**
|
||||
|
||||
Before spawning any agents for this wave, self-assess context pressure using the
|
||||
degradation signals in `references/context-budget.md`. Signs of POOR tier (70%+):
|
||||
increasing vagueness, skipped steps, silent partial completion.
|
||||
|
||||
Read `workflow.context_guard_mode` from `.planning/config.json` (default `warn`).
|
||||
|
||||
| Tier | `warn` (default) | `auto` | `off` |
|
||||
|------|-----------------|--------|-------|
|
||||
| PEAK / GOOD | No output | No output | No output |
|
||||
| DEGRADING (50-70%) | Emit: "⚠ Context pressure DEGRADING — switching to frontmatter-only reads for remaining waves." Continue. | Same as warn | Skip |
|
||||
| POOR (70%+) | Emit: "🛑 Context pressure POOR — risk of context exhaustion. Run `/gsd:pause-work` to checkpoint before this wave, then resume in a fresh session." Continue (user decides). | Invoke `/gsd:pause-work` immediately and halt. Do NOT spawn wave agents. | Skip |
|
||||
|
||||
The guard is heuristic — no programmatic context-percentage API exists. Use your
|
||||
assessment of degradation signals, not a fixed token count.
|
||||
@~/.claude/gsd-core/references/execute-phase-context-guard.md
|
||||
|
||||
1. **Intra-wave files_modified overlap check (BEFORE spawning):**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user