feat: project-scoped instinct isolation

* feat: add project-scoped instinct isolation

* fix(continuous-learning-v2): harden instinct loading and promotion safety; sync v2.1 command docs

* fix(ci): make copilot-setup-steps a valid GitHub Actions workflow

* fix(hooks): stabilize docs warning inline JS regex parsing
This commit is contained in:
Harry Kwok
2026-03-02 04:07:13 +08:00
committed by GitHub
parent 2d3be88bb5
commit 5818e8adc7
26 changed files with 2476 additions and 713 deletions

View File

@@ -1183,7 +1183,7 @@ async function runTests() {
assert.ok(hooks.hooks.PreCompact, 'Should have PreCompact hooks');
})) passed++; else failed++;
if (test('all hook commands use node', () => {
if (test('all hook commands use node or are skill shell scripts', () => {
const hooksPath = path.join(__dirname, '..', '..', 'hooks', 'hooks.json');
const hooks = JSON.parse(fs.readFileSync(hooksPath, 'utf8'));
@@ -1191,9 +1191,14 @@ async function runTests() {
for (const entry of hookArray) {
for (const hook of entry.hooks) {
if (hook.type === 'command') {
const isNode = hook.command.startsWith('node');
const isSkillScript = hook.command.includes('/skills/') && (
/^(bash|sh)\s/.test(hook.command) ||
hook.command.startsWith('${CLAUDE_PLUGIN_ROOT}/skills/')
);
assert.ok(
hook.command.startsWith('node'),
`Hook command should start with 'node': ${hook.command.substring(0, 50)}...`
isNode || isSkillScript,
`Hook command should start with 'node' or be a skill shell script: ${hook.command.substring(0, 80)}...`
);
}
}