mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-26 18:04:31 +01:00
plan-design-review: scope gate runs Step 0 before mockups (W5.4, s05 H6)
The scope gate said 'audit → mockups → Step 0' while the body runs Step 0 (0A-0D) first and 0D announces 'I'll generate visual mockups next'. Per the W5.4 decision, the three gate phrases now read audit → Step 0 → Step 0.5 mockups. 'Reply with A, B, or C' is unchanged. W7a pins: - test/plan-scope-selection.test.ts:616 pinned the old order sentence; it now checks the order of the 'After resolution:' steps (preamble, base branch, audit, Step 0, mockups). Negative control: the old order turns it red. - test/gen-skill-docs.test.ts:4737 normalizer strips the design-only 'Then run the pre-review audit, ... against that plan.' sentence by pattern. expected red until the regeneration commit
This commit is contained in:
1 parent
8298be95d1
commit
8e9641c65f
3 files changed
+8
-5
No files matched your search
@@ -4734,7 +4734,7 @@ describe('scope-gate exceptions drift-guard', () => {
|
||||
const normalizeTargetPolicy = (block: string) => block
|
||||
.split('\n').filter(line => /^[12]\. /.test(line)).join('\n')
|
||||
.replace(/ Announce (?:it|an auto-selected plan) in one line so the user can interrupt: "Scope gate: plan mode — auto-selected B \(reviewing <target>\)\."/g, '')
|
||||
.replace(' Then run the pre-review audit, mockups, and Step 0 against that plan.', '')
|
||||
.replace(/ Then run the pre-review audit, .*? against that plan\./, '')
|
||||
.replace('a path, a page, a doc they pasted,', 'a path, a doc they pasted,');
|
||||
|
||||
test('eng and design retain the same target-selection policy across distinct startup sequences', () => {
|
||||
|
||||
@@ -613,7 +613,10 @@ test('entry binds a current target and delays bootstrap until scope resolves', (
|
||||
expect(scope).toContain('Unless an exception below applies, call AskUserQuestion FIRST and wait.');
|
||||
expect(scope).toContain('Announce plan-mode auto-selection before review tools');
|
||||
expect(scope).toContain('A fresh declaration for this invocation may precede skill loading');
|
||||
expect(scope).toContain('After resolution: preamble → base branch → audit → mockups → Step 0.');
|
||||
// Order after resolution: preamble, base branch, audit, Step 0, then Step 0.5 mockups.
|
||||
const order = scope.slice(scope.indexOf('After resolution:')).split('\n')[0]!;
|
||||
const steps = ['preamble', 'base branch', 'audit', 'Step 0', 'mockups'].map(step => order.indexOf(step));
|
||||
expect(steps.every((offset, i) => offset >= 0 && (i === 0 || offset > steps[i - 1]!))).toBe(true);
|
||||
expect(scope).toContain('Preamble “run first” is subordinate to this gate.');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user