test: register wave-3 carves (qa, browse, retro) — guards, touchfiles, pins, baselines

CARVE_GUARDS gains the three entries; qa's monolith invariant retires.
auq-format carve-safety now keys on the skeleton+sections union shipping
the AUQ block (first tier-1 carve: browse never renders it by design).
Baselines: parity v1.69.1.0 at 18 sectioned skills; ratchet recaptured.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-25 17:47:32 +00:00
co-authored by Claude Fable 5
parent e0250aa128
commit 07b225a40c
9 changed files with 283 additions and 106 deletions
+14 -2
View File
@@ -151,8 +151,20 @@ describe('AUQ format is always-loaded (token-reduction safety net)', () => {
// CARVE-SAFETY: for carved skills, the format block must be in the SKELETON,
// not only a section. (The per-skill loop above already reads SKILL.md, so
// this is an explicit, named guard for the exact failure mode.)
for (const { skill, skillMd, sectionsDir } of skills.filter(s => s.sectionsDir)) {
// this is an explicit, named guard for the exact failure mode.) Keyed on the
// skeleton+sections UNION shipping the block at all: tier-1 carves (browse)
// never render AUQ format by design, so they have nothing to guard — but a
// tier≥2 carve that wrongly moved the block into a section still trips here.
const shipsAuqInUnion = (s: { skillMd: string; sectionsDir: string | null }): boolean => {
let union = fs.readFileSync(s.skillMd, 'utf-8');
if (s.sectionsDir) {
for (const f of fs.readdirSync(s.sectionsDir).filter(f => f.endsWith('.md') && !f.endsWith('.md.tmpl'))) {
union += '\n' + fs.readFileSync(path.join(s.sectionsDir, f), 'utf-8');
}
}
return /##\s*AskUserQuestion Format/i.test(union);
};
for (const { skill, skillMd, sectionsDir } of skills.filter(s => s.sectionsDir && shipsAuqInUnion(s))) {
test(`${skill} (carved): AUQ format block lives in the skeleton, not only sections/`, () => {
const body = fs.readFileSync(skillMd, 'utf-8');
expect(body).toMatch(/##\s*AskUserQuestion Format/i);