mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 22:45:02 +01:00
fix: pre-landing review fixes (CEO bullet bounds code by accepted scope; tests bind each completeness rule)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
53545c6165
commit
b8fd285002
5 files changed
+15
-6
No files matched your search
+3
-2
@@ -7,11 +7,12 @@
|
||||
### Changed
|
||||
- **`scripts/resolvers/preamble/generate-completeness-section.ts`**: the default section reads "Complete coverage, minimal code": recommend full coverage of the requirement (tests, edge cases, error paths) and no code beyond it, prefer the smaller diff at equal coverage, and add no checks for impossible states. Unrelated work stays separate scope. The `Completeness: X/10` scoring rule and the GPT-5.6 Sol variant are unchanged. The section is 3 characters shorter, so every regenerated skill shrinks and 89 size pins go down.
|
||||
- **`ETHOS.md`**: "Completeness is cheap ... always prefer A" becomes "Complete coverage, minimal code": completeness is measured in coverage, not lines; at equal coverage choose the smaller diff; no speculative abstractions, impossible-state checks or unneeded refactors. A new anti-pattern names the impossible-state fallback. Section 1's opener now says "When covering the whole requirement costs minutes more than the shortcut, cover it. Every time. Complete means complete coverage, not more code.", and "How They Work Together" says Boil the Ocean means "cover the whole requirement with the least code" instead of "do the complete thing".
|
||||
- **`plan-ceo-review/SKILL.md.tmpl`**: the Philosophy bullet "COMPLETENESS IS CHEAP: AI makes 70 LOC seconds. Prefer complete ~150 LOC over 90% ~80 LOC. Boil the ocean." becomes "COMPLETENESS IS COVERAGE": cover the whole requirement (tests, edge cases, error paths) rather than a 90% shortcut, add no code beyond it, and choose the smaller diff at equal coverage. plan-ceo-review is under the 100,000-character limit on every host and has no size pin, so it grows about 100 characters without a pin change.
|
||||
- **`plan-ceo-review/SKILL.md.tmpl`**: the Philosophy bullet "COMPLETENESS IS CHEAP: AI makes 70 LOC seconds. Prefer complete ~150 LOC over 90% ~80 LOC. Boil the ocean." becomes "COMPLETENESS IS COVERAGE": cover the whole requirement (tests, edge cases, error paths) rather than a 90% shortcut, add no code beyond the accepted scope (so SCOPE EXPANSION and SELECTIVE EXPANSION still build what the user accepted), and choose the smaller diff at equal coverage. plan-ceo-review is under the 100,000-character limit on every host and has no size pin, so it grows about 100 characters without a pin change.
|
||||
- `review/specialists/simplification.md` and `CLAUDE.md` quote the new house rule instead of "If A is 70 lines more, choose A".
|
||||
|
||||
### Tests
|
||||
- `test/model-overlays.test.ts` asserts the new default wording ("Complete coverage, minimal code.", "prefer the smaller diff") and checks that the section still states full coverage of the requirement, the smaller diff only at equal coverage, no impossible-state checks, and that unrelated scope never excuses a gap.
|
||||
- `test/model-overlays.test.ts` asserts the new default wording ("Complete coverage, minimal code.", "prefer the smaller diff") and checks, one sentence per rule, that the section still states full coverage of the requirement with no code beyond it, the smaller diff only at equal coverage, no checks for impossible states, and that unrelated work is separate scope that never excuses a gap.
|
||||
- `test/ceo-workflow-clarity.test.ts` checks that the plan-ceo-review Philosophy bullet still asks for the whole requirement over a 90% shortcut, no code beyond the accepted scope and the smaller diff at equal coverage, and that "COMPLETENESS IS CHEAP" and "~150 LOC" stay gone.
|
||||
- `test/fixtures/skill-md-size-allowlist.json`: 89 pins lowered by 3 characters each. None raised; the plan-ceo-review rewording touches no pinned skill.
|
||||
|
||||
### Gate integrity
|
||||
|
||||
@@ -447,7 +447,7 @@ Make this plan extraordinary. Match posture:
|
||||
* SELECTIVE EXPANSION: Harden current scope; neutrally offer each expansion's opportunity, effort and risk. Accepted items govern later sections; rejected ones go to "NOT in scope."
|
||||
* HOLD SCOPE: Preserve scope; trace failures, edge cases, error paths, tests and observability.
|
||||
* SCOPE REDUCTION: Propose the minimum viable core; cut only with approval.
|
||||
* COMPLETENESS IS COVERAGE: Prefer the approach that covers the whole requirement (tests, edge cases, error paths) over a 90% shortcut, add no code beyond the requirement, and at equal coverage choose the smaller diff.
|
||||
* COMPLETENESS IS COVERAGE: Prefer the approach that covers the whole requirement (tests, edge cases, error paths) over a 90% shortcut, add no code beyond the accepted scope, and at equal coverage choose the smaller diff.
|
||||
Approval is required for each scope change. Raise concerns in Step 0, then commit: no arguing for less in EXPANSION, silent SELECTIVE additions/cuts, or scope restored to REDUCTION.
|
||||
Review only. Do not change code or implement.
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ Make this plan extraordinary. Match posture:
|
||||
* SELECTIVE EXPANSION: Harden current scope; neutrally offer each expansion's opportunity, effort and risk. Accepted items govern later sections; rejected ones go to "NOT in scope."
|
||||
* HOLD SCOPE: Preserve scope; trace failures, edge cases, error paths, tests and observability.
|
||||
* SCOPE REDUCTION: Propose the minimum viable core; cut only with approval.
|
||||
* COMPLETENESS IS COVERAGE: Prefer the approach that covers the whole requirement (tests, edge cases, error paths) over a 90% shortcut, add no code beyond the requirement, and at equal coverage choose the smaller diff.
|
||||
* COMPLETENESS IS COVERAGE: Prefer the approach that covers the whole requirement (tests, edge cases, error paths) over a 90% shortcut, add no code beyond the accepted scope, and at equal coverage choose the smaller diff.
|
||||
Approval is required for each scope change. Raise concerns in Step 0, then commit: no arguing for less in EXPANSION, silent SELECTIVE additions/cuts, or scope restored to REDUCTION.
|
||||
Review only. Do not change code or implement.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import { readWorkflowJudgeInput } from './helpers/workflow-judge-input';
|
||||
import { expectMentions } from './helpers/prompt-structure';
|
||||
import { expectAbsent, expectMentions } from './helpers/prompt-structure';
|
||||
|
||||
const root = resolve(import.meta.dir, '..');
|
||||
const compact = (text: string) => text.replace(/\s+/g, ' ').trim();
|
||||
@@ -93,3 +93,11 @@ for (const source of sources) describe(`CEO clarity routing — ${source.label}`
|
||||
expectMentions(opening, [['do not', 'another', 'handoff']], 'opening');
|
||||
});
|
||||
});
|
||||
|
||||
describe('CEO completeness posture', () => {
|
||||
test('the Philosophy bullet measures completeness in coverage, not code', () => {
|
||||
const philosophy = readFileSync(resolve(root, 'plan-ceo-review/SKILL.md.tmpl'), 'utf8').split('## Philosophy')[1]!.split('## Prime Directives')[0]!;
|
||||
expectMentions(philosophy, [['whole requirement', '90% shortcut', 'no code beyond', 'equal coverage', 'smaller diff']], 'philosophy');
|
||||
expectAbsent(philosophy, ['COMPLETENESS IS CHEAP', '~150 LOC'], 'philosophy');
|
||||
});
|
||||
});
|
||||
@@ -122,7 +122,7 @@ describe('GPT-5.6 Sol model profile', () => {
|
||||
expect(generic).toContain('make your best judgment and proceed');
|
||||
expect(completeness).toContain('Complete coverage, minimal code.');
|
||||
expect(completeness).toContain('prefer the smaller diff');
|
||||
expectMentions(completeness, [['full coverage', 'requirement', 'error paths'], ['equal coverage', 'smaller diff'], ['impossible states'], ['never', 'gap']], 'default completeness section');
|
||||
expectMentions(completeness, [['full coverage', 'requirement', 'error paths', 'no code beyond'], ['equal coverage', 'smaller diff'], ['no checks', 'impossible states'], ['unrelated', 'separate scope', 'never', 'gap']], 'default completeness section');
|
||||
});
|
||||
|
||||
test('terse mode still suppresses the completeness section for Sol', () => {
|
||||
|
||||
Reference in new issue
Block a user