fix(#2252): exclude PLAN-REVIEW artifacts from plan count (#2263)

* fix(#2252): exclude PLAN-REVIEW artifacts from plan count

The loose /PLAN/i fallback in isRootPlanFile matched *-PLAN-REVIEW.md,
inflating plan counts. Added PLAN_REVIEW_RE exclusion before the fallback.

* docs: backfill changeset PR number (#2263)

* fix: regenerate stale capability-registry after next merge
This commit is contained in:
Tom Boucher
2026-07-14 15:15:12 -04:00
committed by GitHub
parent d8af61be44
commit 27415c780e
4 changed files with 26 additions and 2 deletions

View File

@@ -1682,6 +1682,23 @@ describe('scanPhasePlans — ignored files', () => {
const result = scanPhasePlans(dir);
assert.strictEqual(result.planCount, 1, 'VERIFICATION files should not be plans');
});
// #2252: *-PLAN-REVIEW.md is a review artifact, not an executable plan.
test('PLAN-REVIEW file is not counted as a plan (#2252)', () => {
const dir = phaseDir();
touch(dir, '42-01-PLAN.md', '42-PLAN-REVIEW.md');
const result = scanPhasePlans(dir);
assert.strictEqual(result.planCount, 1, 'PLAN-REVIEW should not count as a plan');
assert.ok(result.planFiles.includes('42-01-PLAN.md'));
assert.ok(!result.planFiles.includes('42-PLAN-REVIEW.md'));
});
test('PLAN-REVIEW is excluded even with no real plans (#2252)', () => {
const dir = phaseDir();
touch(dir, '42-PLAN-REVIEW.md');
const result = scanPhasePlans(dir);
assert.strictEqual(result.planCount, 0, 'a lone PLAN-REVIEW must not count as a plan');
});
});
// ---------------------------------------------------------------------------