mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-01 19:00:40 +02:00
feat(review): simplification specialist — advisory over-engineering lens with ponytail's tag vocabulary
New 8th Review Army specialist (DIFF_LINES > 100, --simplification force flag) hunting unrequested STRUCTURE only: delete/stdlib/native/speculative/shrink closed tags, one-line findings, lines_removable field. speculative: replaces ponytail's yagni: tag — we import the lens, not the posture; coverage stays sacred (Completeness Gaps owns it, suppressions inlined, shrink needs >=5 lines). Advisory carve-out in the merge step: advisory findings are excluded from quality_score and the findings-count header, render with an [ADVISORY] label, and are ASK-only in Fix-First. Zero-findings case prints the lens-scoped 'Simplification: lean already — nothing to cut.' from the PARENT (the specialist keeps the exact NO FINDINGS contract); with findings, the parent prints 'net: -N lines possible' summed from lines_removable. Tests: static pins for the carve-out + early-out contract (gen-skill-docs), two periodic e2e cases with planted fixtures — activation (over-build traps: hand-rolled Intl, one-impl abstract, dead config) and false-flag precision (a lean ETHOS 'choose A' diff must yield NO FINDINGS). Inspired by dietrichgebert/ponytail's /ponytail-review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
848973007c
commit
cbb4d35792
@@ -943,6 +943,7 @@ describe('TEST_COVERAGE_AUDIT placeholders', () => {
|
||||
'performance.md',
|
||||
'data-migration.md',
|
||||
'api-contract.md',
|
||||
'simplification.md',
|
||||
'red-team.md',
|
||||
];
|
||||
for (const f of expected) {
|
||||
@@ -950,6 +951,32 @@ describe('TEST_COVERAGE_AUDIT placeholders', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Regression pins for the simplification specialist (advisory carve-out edits
|
||||
// the pre-existing quality_score instruction, so the rendered contract is
|
||||
// pinned statically — the carve-out and the early-out line must both survive
|
||||
// regeneration verbatim).
|
||||
test('simplification advisory carve-out and early-out render into review docs', () => {
|
||||
const reviewArmySection = fs.readFileSync(
|
||||
path.join(ROOT, 'review', 'sections', 'review-army.md'),
|
||||
'utf-8',
|
||||
);
|
||||
expect(reviewArmySection).toContain('"advisory": true');
|
||||
expect(reviewArmySection).toContain('quality score over NON-advisory findings only');
|
||||
expect(reviewArmySection).toContain('Simplification: lean already — nothing to cut.');
|
||||
expect(reviewArmySection).toContain('net: -N lines possible');
|
||||
expect(reviewArmySection).toContain('--simplification');
|
||||
// The specialist itself must never carry a verdict-shaped zero-findings line.
|
||||
const spec = fs.readFileSync(
|
||||
path.join(ROOT, 'review', 'specialists', 'simplification.md'),
|
||||
'utf-8',
|
||||
);
|
||||
expect(spec).toContain('NO FINDINGS');
|
||||
expect(spec).not.toContain('Lean already. Ship.');
|
||||
// Closed tag vocabulary: the disavowed yagni: frame must not appear.
|
||||
expect(spec).toContain('speculative');
|
||||
expect(spec.toLowerCase()).not.toContain('"yagni"');
|
||||
});
|
||||
|
||||
test('each specialist file has standard header with scope and output format', () => {
|
||||
const specDir = path.join(ROOT, 'review', 'specialists');
|
||||
const files = fs.readdirSync(specDir).filter(f => f.endsWith('.md'));
|
||||
|
||||
Reference in New Issue
Block a user