fix(autoplan): surface scope-detection counts and stop silent phase skips#2014
Open
genisis0x wants to merge 2 commits into
Open
fix(autoplan): surface scope-detection counts and stop silent phase skips#2014genisis0x wants to merge 2 commits into
genisis0x wants to merge 2 commits into
Conversation
…kips Phase 0 decides whether to run the Design (Phase 2) and DX (Phase 3.5) reviews by grepping the plan for scope terms with a 2-match threshold. Below the threshold the phase was dropped silently: the run reported only a yes/no, with no match count, no near-miss warning, and no way to override. A plan that is genuinely UI- or developer-facing but phrases its terms with hyphens (form-control), uses synonyms outside the list, or buries them in code fences grep skips would lose two whole review phases without the user ever knowing why. A scope sitting at exactly two matches is one edit away from silently disappearing on the next run. Report the match count per scope, flag a below-threshold scope as a near-miss instead of a clean no, call out the borderline exactly-two case, and offer an override so the user can force a phase regardless of the count. The Phase 0 output line now carries the counts and the override note. Closes garrytan#1957
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/autoplanPhase 0 decides whether to run Phase 2 (Design Review) and Phase 3.5 (DX Review) by grepping the plan for scope terms and requiring 2+ matches. When a scope lands below the threshold, the phase is dropped silently — the run reports only a yes/no, with no match count, no near-miss warning, and no way to override.Two failure modes follow:
form-control,api-endpoint), uses synonyms outside the list, or buries them in code fences grep skips, loses two whole review phases and the user never learns why.Fix
In Phase 0 Step 2:
The Phase 0 output line now carries the counts and the override note.
This is scoped to
/autoplanand the change is prose-only in the skill template plus its regeneratedSKILL.md; it touches no shared preamble.Verification
Added
test/autoplan-scope-diagnostic.test.ts(gate tier, 6 checks) pinning the count reporting, near-miss flag, borderline flag, override offer, the output-line format, and template/generated parity. All six assertions return 0 occurrences onmain, so the test fails before the fix and passes after.bun test test/gen-skill-docs.test.ts test/skill-validation.test.ts— 734 pass, 0 fail.Closes #1957