From 57c53e7913cdd275056309952d1d13def47772ca Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Tue, 11 Aug 2026 17:58:48 -0700 Subject: [PATCH] docs: file scope-gate resolver-extraction TODO (eng-review D5 follow-up) Co-Authored-By: Claude Fable 5 --- TODOS.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/TODOS.md b/TODOS.md index 0b27e403a..631ce234b 100644 --- a/TODOS.md +++ b/TODOS.md @@ -231,6 +231,34 @@ v1.47.0.0 baselines retained in `test/fixtures/` for the v1→v2 audit trail. Th captured skill bytes match `origin/main` exactly (the rebasing branch left every SKILL.md untouched). `bun test` is green again. +## Scope-gate follow-ups (filed via /plan-eng-review on the plan-mode auto-select-B change) + +### P3: Extract the whole scope gate to a shared `{{SCOPE_GATE}}` resolver + +**What:** Move the duplicated scope-gate prose (heading, intro sentence, the +plan-mode/named-target exceptions block, numbered items, the A/B/C menu, and the +Recommendation line) from `plan-eng-review/SKILL.md.tmpl` and +`plan-design-review/SKILL.md.tmpl` into a `scripts/resolvers/` module with 4-5 +injected variant slots (preceded-by list, item-2 phrasing, option-C vocabulary, +recommendation tail, exceptions action tail). + +**Why:** The two copies are hand-synced today. The drift-guard test in +`test/gen-skill-docs.test.ts` ("scope-gate exceptions drift-guard") makes the +duplication safe but is a stopgap — one source of truth is the real fix. Filed +as D5 of the eng review on the plan-mode auto-select-B change (2026-08-11). + +**Pros:** Single source for a load-bearing gate; future gate changes (new +exceptions, wording tuning) land once. +**Cons:** Touches the resolver registry and its tests; must preserve the exact +generated bytes or re-baseline the carve/parity ceilings. + +**Context / where to start:** structural-only diff, sequenced AFTER the +behavior change (refactor and behavior never together). The drift-guard test +becomes the migration's acceptance check: extract, regen, confirm byte-identical +output, then retire or simplify the guard. Effort: human ~half day / CC ~20 min. + +**Depends on / blocked by:** the plan-mode auto-select-B PR landing on main. + ## Token-reduction follow-ups (Phase B, filed via /plan-eng-review on the plan-ceo-review carve) ### P3: Carve the always-loaded `{{PREAMBLE}}` reference blocks into an on-demand doc