mirror of
https://github.com/garrytan/gstack.git
synced 2026-08-31 18:30:39 +02:00
fix(test): e2e-harness-audit derives its skill census from disk
The hand-maintained 39-name SKILL_GLOBS list had drifted to 39 of 54 SKILL.md.tmpl on disk. No live gap today (none of the 15 unlisted skills is interactive), but the next interactive skill would have landed unguarded with zero signal. The audit now walks top-level dirs for SKILL.md.tmpl (statSync so symlinked dirs like connect-chrome count), so new skills are in scope the commit they appear. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
241935adce
commit
63f8829578
@@ -15,47 +15,31 @@ import * as fs from 'fs';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
const ROOT = path.resolve(import.meta.dir, '..');
|
const ROOT = path.resolve(import.meta.dir, '..');
|
||||||
const SKILL_GLOBS = [
|
|
||||||
'plan-ceo-review',
|
/**
|
||||||
'plan-eng-review',
|
* Every top-level skill directory with a SKILL.md.tmpl, discovered from
|
||||||
'plan-design-review',
|
* disk. This replaced a hand-maintained 39-name list that had drifted to
|
||||||
'plan-devex-review',
|
* 39-of-54 templates on disk — none of the unlisted 15 happened to be
|
||||||
'office-hours',
|
* interactive, so there was no LIVE gap, but the next interactive skill
|
||||||
'codex',
|
* would have landed unguarded with no signal.
|
||||||
'investigate',
|
*/
|
||||||
'qa',
|
function skillTemplateDirs(): string[] {
|
||||||
'retro',
|
return fs.readdirSync(ROOT, { withFileTypes: true })
|
||||||
'cso',
|
.filter((entry) => {
|
||||||
'review',
|
// Directory symlinks (connect-chrome → open-gstack-browser) count too:
|
||||||
'ship',
|
// existsSync below follows them, and duplicates only re-check the same
|
||||||
'design-review',
|
// template. isDirectory() is false for symlinked dirs, hence statSync.
|
||||||
'devex-review',
|
if (entry.name.startsWith('.') || entry.name === 'node_modules') return false;
|
||||||
'qa-only',
|
try {
|
||||||
'design-consultation',
|
return fs.statSync(path.join(ROOT, entry.name)).isDirectory()
|
||||||
'design-shotgun',
|
&& fs.existsSync(path.join(ROOT, entry.name, 'SKILL.md.tmpl'));
|
||||||
'autoplan',
|
} catch {
|
||||||
'land-and-deploy',
|
return false;
|
||||||
'plan-tune',
|
}
|
||||||
'document-release',
|
})
|
||||||
'context-save',
|
.map((entry) => entry.name)
|
||||||
'context-restore',
|
.sort();
|
||||||
'health',
|
}
|
||||||
'setup-deploy',
|
|
||||||
'setup-browser-cookies',
|
|
||||||
'canary',
|
|
||||||
'learn',
|
|
||||||
'benchmark',
|
|
||||||
'benchmark-models',
|
|
||||||
'make-pdf',
|
|
||||||
'open-gstack-browser',
|
|
||||||
'gstack-upgrade',
|
|
||||||
'pair-agent',
|
|
||||||
'design-html',
|
|
||||||
'freeze',
|
|
||||||
'unfreeze',
|
|
||||||
'careful',
|
|
||||||
'guard',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load .tmpl files for each skill and return the names of those that have
|
* Load .tmpl files for each skill and return the names of those that have
|
||||||
@@ -63,7 +47,7 @@ const SKILL_GLOBS = [
|
|||||||
*/
|
*/
|
||||||
function findInteractiveSkills(): string[] {
|
function findInteractiveSkills(): string[] {
|
||||||
const interactive: string[] = [];
|
const interactive: string[] = [];
|
||||||
for (const skill of SKILL_GLOBS) {
|
for (const skill of skillTemplateDirs()) {
|
||||||
const tmplPath = path.join(ROOT, skill, 'SKILL.md.tmpl');
|
const tmplPath = path.join(ROOT, skill, 'SKILL.md.tmpl');
|
||||||
if (!fs.existsSync(tmplPath)) continue;
|
if (!fs.existsSync(tmplPath)) continue;
|
||||||
const content = fs.readFileSync(tmplPath, 'utf-8');
|
const content = fs.readFileSync(tmplPath, 'utf-8');
|
||||||
|
|||||||
Reference in New Issue
Block a user