eval(plan-design-with-ui): the Step 0D focus title may spell the seven dimensions as a word

Run 37166586458 slice 5 (dfaf154) asked 'D2 - Review all seven design
dimensions, or focus on specific areas?' and reached its review finding,
but the focus predicate only accepted the numeral, so the case failed with
no acknowledged Design focus. Both recognizers accept 7 or seven; the
byte-exact capture is a free regression, and engineering/other-count/
no-'design' titles stay rejected.
This commit is contained in:
garrytan committed 2026-10-04 01:33:29 +00:00
1 parent dfaf15449c
commit a05a01ee2d
2 files changed
+7 -3

No files matched your search

+4 -1
View File
@@ -130,10 +130,13 @@ mock.module(${JSON.stringify(path.join(ROOT, 'test/helpers/claude-pty-runner.ts'
expect(opts.isLastStep0AUQ(fp('focus-ones', 'D1 — Review all 7 design dimensions, or focus on specific ones?'))).toBe(true);
if (mode.startsWith('native-')) expect(opts.isLastStep0AUQ(nativeFocus)).toBe(true);
expect(opts.isLastStep0AUQ(captured[1])).toBe(true);
// Run 37166586458 slice 5 (dfaf154): the Step 0D title spelled the count as a word.
expect(opts.isLastStep0AUQ(fp('focus-word', "D2 — Review all seven design dimensions, or focus on specific areas?\\nProject/branch/task: main branch, design review of the User Dashboard plan before implementation."))).toBe(true);
for (const unrelated of ['Review all 4 design passes, or focus?',
'Review all 7 engineering passes, or focus?', 'Review all 7 passes, or focus?',
'Review all 4 design passes or focus?', 'Review all 7 engineering passes or focus?', 'Review all 7 passes or focus?',
'Which plan should receive all 7 design passes?']) {
'Which plan should receive all 7 design passes?', 'Review all seven engineering passes, or focus?',
'Review all six design passes, or focus?', 'Review all seven passes, or focus?']) {
expect(opts.isLastStep0AUQ(fp('unrelated', unrelated))).toBe(false);
}
expect(opts.isReviewAUQ(target)).toBe(false);
+3 -2
View File
@@ -28,8 +28,9 @@ const designFocusBoundary = (fp: AskUserQuestionFingerprint): boolean =>
const text = question.trim().replace(/^D\d+(?:\.\d+)?\s*[—–:-]\s*/i, '');
// Require the source Step 0D question or its retained native paraphrase.
// A target menu can mention a design system without reviewing this plan.
return /^I(?:['’]ve| have) rated this plan (?:10(?:\.0+)?|[0-9](?:\.\d+)?)\/10 on design completeness\.[\s\S]*\bWant me to focus on specific areas instead of all 7\?/i.test(text)
|| /^Review all 7 design (?:dimensions|passes),? or focus(?: on [^?\n]+)?\?$/i.test(text.split(/\r?\n/, 1)[0]!);
// The count is the skill's seven dimensions, written as a numeral or a word.
return /^I(?:['’]ve| have) rated this plan (?:10(?:\.0+)?|[0-9](?:\.\d+)?)\/10 on design completeness\.[\s\S]*\bWant me to focus on specific areas instead of all (?:7|seven)\?/i.test(text)
|| /^Review all (?:7|seven) design (?:dimensions|passes),? or focus(?: on [^?\n]+)?\?$/i.test(text.split(/\r?\n/, 1)[0]!);
});
// Require a choice about the supplied UI, not a workflow offer after focus.