@su-record/vibe 2.9.24 → 2.9.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +2 -1
- package/commands/vibe.test.md +21 -68
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +1 -0
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/hooks/scripts/__tests__/pre-tool-guard.test.js +63 -22
- package/hooks/scripts/pre-tool-guard.js +9 -4
- package/package.json +1 -1
- package/skills/vibe-test/SKILL.md +103 -210
package/CLAUDE.md
CHANGED
|
@@ -99,7 +99,8 @@ No `console.log` in commits · No hardcoded strings/numbers · No commented-out
|
|
|
99
99
|
|
|
100
100
|
## Git
|
|
101
101
|
|
|
102
|
-
**Include**: `.claude/vibe/{plans,specs,features,todos,research,regressions,contracts
|
|
102
|
+
**Include**: `.claude/vibe/{plans,specs,features,todos,research,regressions,contracts}/`, `.claude/vibe/config.json`, `CLAUDE.md`
|
|
103
|
+
**Vibe-global (not project-local)**: `~/.vibe/test-reports/` — `/vibe.test` artifacts live with the vibe install, not with the project
|
|
103
104
|
**Exclude**: `~/.claude/{rules,commands,agents,skills}/`, `.claude/settings.local.json`
|
|
104
105
|
|
|
105
106
|
<!-- VIBE:END -->
|
package/commands/vibe.test.md
CHANGED
|
@@ -1,95 +1,48 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Self-test vibe
|
|
3
|
-
argument-hint: "
|
|
2
|
+
description: Self-test vibe — probe every command/skill/hook/agent in the target harness install dir and write a pass/fail report
|
|
3
|
+
argument-hint: "[cc|coco] (empty = current harness)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /vibe.test
|
|
7
7
|
|
|
8
|
-
**Vibe Self-Test** —
|
|
9
|
-
|
|
10
|
-
> Catch features broken on one harness before users do.
|
|
8
|
+
**Vibe Self-Test** — probe every shipped surface (commands, skills, hooks, agents) in a vibe install dir and emit a pass/fail report.
|
|
11
9
|
|
|
12
10
|
## Usage
|
|
13
11
|
|
|
14
12
|
```
|
|
15
|
-
/vibe.test
|
|
16
|
-
/vibe.test
|
|
17
|
-
/vibe.test
|
|
13
|
+
/vibe.test # Test current harness (auto-detect)
|
|
14
|
+
/vibe.test cc # Force-test ~/.claude/
|
|
15
|
+
/vibe.test coco # Force-test ~/.coco/
|
|
18
16
|
```
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
No subcommands. No CC-vs-coco comparison semantics. One command, one report.
|
|
19
|
+
|
|
20
|
+
## Report
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Stored in vibe's global dir (not per-project):
|
|
23
23
|
|
|
24
24
|
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[any] /vibe.test compare → diff with parity findings
|
|
25
|
+
~/.vibe/test-reports/<YYYYMMDD-HHmm>-<harness>.json
|
|
26
|
+
~/.vibe/test-reports/<YYYYMMDD-HHmm>-<harness>.md
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
No harness execution — file system comparison only:
|
|
33
|
-
|
|
34
|
-
| Check | Compared |
|
|
35
|
-
|---|---|
|
|
36
|
-
| **install set** | `~/.claude/{commands,skills,agents}/` vs `~/.coco/{commands,skills,agents}/` file set |
|
|
37
|
-
| **content sync** | `CLAUDE.md` ↔ `AGENTS.md` body (excluding header/meta blocks) |
|
|
38
|
-
| **path config** | `.claude/vibe/` vs `.coco/vibe/` directory layout |
|
|
39
|
-
| **doc references** | Paths cited in CLAUDE.md/AGENTS.md actually resolve in install dir |
|
|
40
|
-
|
|
41
|
-
**Output**: console table + `.claude/vibe/test-reports/<ts>-parity.json`
|
|
42
|
-
|
|
43
|
-
This stage alone catches:
|
|
44
|
-
- New commands missing on one harness (e.g. if `/vibe.regress` had been added only to CC)
|
|
45
|
-
- AGENTS.md holding stale paths (e.g. `.codex/` references after a coco rename)
|
|
46
|
-
- CLAUDE.md ↔ AGENTS.md body drift
|
|
47
|
-
|
|
48
|
-
## Subcommand: report (runtime invocation)
|
|
49
|
-
|
|
50
|
-
Probes every shipped feature in the current harness and writes a JSON+MD report.
|
|
51
|
-
|
|
52
|
-
| Category | Probe |
|
|
53
|
-
|---|---|
|
|
54
|
-
| commands | frontmatter validity, body delegates to a skill |
|
|
55
|
-
| skills | frontmatter validity, triggers non-empty |
|
|
56
|
-
| hooks | run matching vitest suite |
|
|
57
|
-
| agents | frontmatter validity, declared tools exist in harness |
|
|
58
|
-
| tools | run matching vitest suite or smoke-call with minimal input |
|
|
59
|
-
|
|
60
|
-
No external LLM calls. Interactive commands are not actually invoked — structural validation only. See `skills/vibe-test/SKILL.md` for full probe spec and failure-handling rules.
|
|
61
|
-
|
|
62
|
-
## Subcommand: compare (diff two reports)
|
|
63
|
-
|
|
64
|
-
Compare two JSON reports and classify findings:
|
|
65
|
-
- **P1**: feature exists on only one side → missing
|
|
66
|
-
- **P2**: both sides have it but response shape differs → behavioral drift
|
|
67
|
-
- **P3**: only message wording differs, semantics identical → informational
|
|
68
|
-
|
|
69
|
-
P1 findings auto-invoke `/vibe.regress register --from-test`.
|
|
29
|
+
Markdown summary is also printed to the console when the run finishes.
|
|
70
30
|
|
|
71
31
|
## Process
|
|
72
32
|
|
|
73
|
-
Load skill `vibe-test` with
|
|
74
|
-
|
|
75
|
-
See `skills/vibe-test/SKILL.md` for detailed logic.
|
|
33
|
+
Load skill `vibe-test` with target harness: `$ARGUMENTS`
|
|
76
34
|
|
|
77
|
-
|
|
35
|
+
- If `$ARGUMENTS` is empty, detect the current harness (CC vs coco) and use that.
|
|
36
|
+
- If the target install dir is missing, exit cleanly with guidance (not an error).
|
|
78
37
|
|
|
79
|
-
|
|
80
|
-
.claude/vibe/test-reports/ (CC side)
|
|
81
|
-
.coco/vibe/test-reports/ (coco side)
|
|
82
|
-
<YYYYMMDD-HHmm>-<harness>.json
|
|
83
|
-
<YYYYMMDD-HHmm>-<harness>.md
|
|
84
|
-
<YYYYMMDD-HHmm>-compare.md (compare output)
|
|
85
|
-
```
|
|
38
|
+
See `skills/vibe-test/SKILL.md` for the probe spec and the report template.
|
|
86
39
|
|
|
87
40
|
## Done Criteria
|
|
88
41
|
|
|
89
|
-
- [ ]
|
|
90
|
-
- [ ]
|
|
91
|
-
- [ ]
|
|
92
|
-
- [ ] P1
|
|
42
|
+
- [ ] Runs without any external LLM call — file reads + vitest only
|
|
43
|
+
- [ ] A single probe failure never halts the overall run
|
|
44
|
+
- [ ] JSON report matches the template in SKILL.md exactly
|
|
45
|
+
- [ ] P1 failures auto-register via `/vibe.regress`
|
|
93
46
|
|
|
94
47
|
---
|
|
95
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/postinstall/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/postinstall/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,MAAM,CAYpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,MAAM,CAYxD,CAAC;AAEF;8CAC8C;AAC9C,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,MAAM,CAMxD,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,MAAM,CAG/C,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAgBjE,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAMnE,CAAC;AAEF,mEAAmE;AACnE,eAAO,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AAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8B/D,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAalE,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAatD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/postinstall/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sBAAsB;AAEtB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0B;IACvD,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,kBAAkB;IAClB,UAAU;IACV,uBAAuB;IACvB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,sBAAsB;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D,mBAAmB;IACnB,SAAS;IACT,gBAAgB;IAChB,WAAW;IACX,iBAAiB;IACjB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,oBAAoB;IACpB,oBAAoB;IACpB,WAAW;CACZ,CAAC;AAEF;8CAC8C;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,YAAY;CACb,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,GAAG,kBAAkB;IACrB,GAAG,sBAAsB;CAC1B,CAAC;AAEF,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAA0C;IACpE,gBAAgB;IAChB,YAAY,EAAE,CAAC,2BAA2B,CAAC;IAC3C,sEAAsE;IACtE,kBAAkB,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,6BAA6B,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,g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E,MAAM;IAC7B,yBAAyB,EAAE,MAAM;IACjC,wBAAwB,EAAE,MAAM;IAChC,sBAAsB,EAAE,MAAM;IAC9B,iBAAiB,EAAE,MAAM;IACzB,qBAAqB,EAAE,MAAM;IAC7B,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,MAAM;CACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/postinstall/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sBAAsB;AAEtB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0B;IACvD,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,uBAAuB;IACvB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,sBAAsB;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D,mBAAmB;IACnB,SAAS;IACT,gBAAgB;IAChB,WAAW;IACX,iBAAiB;IACjB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,oBAAoB;IACpB,oBAAoB;IACpB,WAAW;CACZ,CAAC;AAEF;8CAC8C;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,YAAY;CACb,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,GAAG,kBAAkB;IACrB,GAAG,sBAAsB;CAC1B,CAAC;AAEF,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAA0C;IACpE,gBAAgB;IAChB,YAAY,EAAE,CAAC,2BAA2B,CAAC;IAC3C,sEAAsE;IACtE,kBAAkB,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,6BAA6B,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;IAC/L,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yB,EAAE,MAAM;IACjC,wBAAwB,EAAE,MAAM;IAChC,sBAAsB,EAAE,MAAM;IAC9B,iBAAiB,EAAE,MAAM;IACzB,qBAAqB,EAAE,MAAM;IAC7B,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,MAAM;CACzB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { spawnSync } from 'child_process';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
|
|
@@ -8,36 +8,34 @@ const SCRIPT = path.resolve(__dirname, '..', 'pre-tool-guard.js');
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Run pre-tool-guard.js with argv arguments.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* Guard output is on stderr (so Claude Code's hook-error notifications surface
|
|
13
|
+
* the block reason). Tests preserve the original `stdout` field as the combined
|
|
14
|
+
* channel to keep existing assertions working — any output, stdout or stderr,
|
|
15
|
+
* is what callers want to see.
|
|
12
16
|
*/
|
|
13
17
|
function runGuard({ args = [] } = {}) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} catch (err) {
|
|
21
|
-
return { stdout: (err.stdout || '').trim(), exitCode: err.status };
|
|
22
|
-
}
|
|
18
|
+
const result = spawnSync('node', [SCRIPT, ...args], {
|
|
19
|
+
encoding: 'utf-8',
|
|
20
|
+
timeout: 5000,
|
|
21
|
+
});
|
|
22
|
+
const combined = `${result.stdout || ''}${result.stderr || ''}`.trim();
|
|
23
|
+
return { stdout: combined, exitCode: result.status };
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Run pre-tool-guard.js with stdin JSON payload.
|
|
27
|
-
* 스크립트가 fs.readSync(0, ...)로 stdin을 읽으므로
|
|
28
|
+
* 스크립트가 fs.readSync(0, ...)로 stdin을 읽으므로 spawnSync input 옵션이 동작.
|
|
28
29
|
*/
|
|
29
30
|
function runGuardWithStdin(payload) {
|
|
30
31
|
const json = typeof payload === 'string' ? payload : JSON.stringify(payload);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} catch (err) {
|
|
39
|
-
return { stdout: (err.stdout || '').trim(), exitCode: err.status };
|
|
40
|
-
}
|
|
32
|
+
const result = spawnSync('node', [SCRIPT], {
|
|
33
|
+
input: json,
|
|
34
|
+
encoding: 'utf-8',
|
|
35
|
+
timeout: 5000,
|
|
36
|
+
});
|
|
37
|
+
const combined = `${result.stdout || ''}${result.stderr || ''}`.trim();
|
|
38
|
+
return { stdout: combined, exitCode: result.status };
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
// ══════════════════════════════════════════════════
|
|
@@ -262,6 +260,49 @@ describe('pre-tool-guard', () => {
|
|
|
262
260
|
});
|
|
263
261
|
});
|
|
264
262
|
|
|
263
|
+
// ══════════════════════════════════════════════════
|
|
264
|
+
// Regression: `rm -rf /<path>` false positive
|
|
265
|
+
// The original pattern /rm\s+-rf?\s+[\/~]/ matched any absolute path.
|
|
266
|
+
// Only actual root/home targets (/ /* ~ ~/ ~/*) should be blocked.
|
|
267
|
+
// ══════════════════════════════════════════════════
|
|
268
|
+
describe('regression: rm -rf must not block safe absolute paths', () => {
|
|
269
|
+
it('should ALLOW rm -rf /tmp/<scratch>', () => {
|
|
270
|
+
const result = runGuard({ args: ['Bash', 'rm -rf /tmp/coco-local-test'] });
|
|
271
|
+
expect(result.exitCode).toBe(0);
|
|
272
|
+
expect(result.stdout).toBe('');
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('should ALLOW rm -rf /Users/me/proj/node_modules', () => {
|
|
276
|
+
const result = runGuard({ args: ['Bash', 'rm -rf /Users/grove/workspace/vibe/node_modules'] });
|
|
277
|
+
expect(result.exitCode).toBe(0);
|
|
278
|
+
expect(result.stdout).toBe('');
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it('should ALLOW rm -rf ~/scratch/foo (home subpath)', () => {
|
|
282
|
+
const result = runGuard({ args: ['Bash', 'rm -rf ~/scratch/foo'] });
|
|
283
|
+
expect(result.exitCode).toBe(0);
|
|
284
|
+
expect(result.stdout).toBe('');
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('should still BLOCK rm -rf /* (root wildcard)', () => {
|
|
288
|
+
const result = runGuard({ args: ['Bash', 'rm -rf /*'] });
|
|
289
|
+
expect(result.exitCode).toBe(2);
|
|
290
|
+
expect(result.stdout).toContain('BLOCKED');
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
it('should still BLOCK rm -rf ~ (bare home)', () => {
|
|
294
|
+
const result = runGuard({ args: ['Bash', 'rm -rf ~'] });
|
|
295
|
+
expect(result.exitCode).toBe(2);
|
|
296
|
+
expect(result.stdout).toContain('BLOCKED');
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
it('should still BLOCK rm -rf / followed by shell separator', () => {
|
|
300
|
+
const result = runGuard({ args: ['Bash', 'rm -rf / && echo done'] });
|
|
301
|
+
expect(result.exitCode).toBe(2);
|
|
302
|
+
expect(result.stdout).toContain('BLOCKED');
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
|
|
265
306
|
// ══════════════════════════════════════════════════
|
|
266
307
|
// stdin payload support
|
|
267
308
|
// ══════════════════════════════════════════════════
|
|
@@ -18,7 +18,10 @@ import { VIBE_PATH, PROJECT_DIR } from './utils.js';
|
|
|
18
18
|
// 회귀: .claude/vibe/regressions/pre-tool-guard-content-false-positive.md
|
|
19
19
|
const DANGEROUS_PATTERNS = {
|
|
20
20
|
bash: [
|
|
21
|
-
|
|
21
|
+
// `/` or `~` must be the *entire* argument (optionally followed by `*`, `/`, or `/*`).
|
|
22
|
+
// Prevents false positives on safe absolute paths like `/tmp/foo` or `/Users/me/proj`.
|
|
23
|
+
// The lookahead requires an arg boundary (whitespace, shell separator, or end-of-string).
|
|
24
|
+
{ pattern: /rm\s+-rf?\s+(\/|\/\*|~|~\/|~\/\*)(?=\s|[;&|]|$)/, target: 'command', severity: 'critical', message: 'Deleting root or home directory' },
|
|
22
25
|
{ pattern: /rm\s+-rf?\s+\*/, target: 'command', severity: 'high', message: 'Wildcard deletion detected' },
|
|
23
26
|
{ pattern: /git\s+push\s+.*--force/, target: 'command', severity: 'high', message: 'Force push detected' },
|
|
24
27
|
{ pattern: /git\s+reset\s+--hard/, target: 'command', severity: 'medium', message: 'Hard reset will discard changes' },
|
|
@@ -227,9 +230,11 @@ import { logHookDecision } from './utils.js';
|
|
|
227
230
|
// 1단계: 입력 스키마 검증 (구조적 오류 탐지)
|
|
228
231
|
const schemaResult = validateInputSchema(toolName, stdinPayload?.tool_input || toolInput);
|
|
229
232
|
if (!schemaResult.valid) {
|
|
230
|
-
|
|
233
|
+
// stderr: Claude Code surfaces stderr in hook-error notifications; stdout is injected
|
|
234
|
+
// into the assistant's context and never shown to the user. Guard messages target the user.
|
|
235
|
+
console.error(`⚠️ INPUT VALIDATION: ${toolName}`);
|
|
231
236
|
for (const err of schemaResult.errors) {
|
|
232
|
-
console.
|
|
237
|
+
console.error(` [SCHEMA] ${err}`);
|
|
233
238
|
}
|
|
234
239
|
logHookDecision('pre-tool-guard', toolName, 'warn', `schema: ${schemaResult.errors.join('; ')}`);
|
|
235
240
|
// 스키마 오류는 경고만 (차단하지 않음 — 레거시 호환)
|
|
@@ -240,7 +245,7 @@ const validation = validateCommand(toolName, toolInput);
|
|
|
240
245
|
const output = formatOutput(toolName, validation);
|
|
241
246
|
|
|
242
247
|
if (output) {
|
|
243
|
-
console.
|
|
248
|
+
console.error(output);
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
// Hook trace logging
|
package/package.json
CHANGED
|
@@ -1,247 +1,140 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vibe-test
|
|
3
3
|
tier: core
|
|
4
|
-
description: "Self-test vibe
|
|
5
|
-
triggers: [test,
|
|
4
|
+
description: "Self-test vibe by probing every command/skill/hook/agent in a target harness install dir (~/.claude or ~/.coco) and writing a pass/fail report to ~/.vibe/test-reports/. Takes an optional harness argument (cc|coco); empty = current harness. Must use this skill when user runs /vibe.test, when verifying a vibe install before release, or when the user says 'self-test', 'harness 점검', 'vibe 건강'."
|
|
5
|
+
triggers: [test, self-test, "vibe 건강", "harness 점검", "자가검진"]
|
|
6
6
|
priority: 70
|
|
7
7
|
chain-next: []
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# vibe-test —
|
|
10
|
+
# vibe-test — Self-Test
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Probe every shipped vibe surface in one install dir and emit a pass/fail report.
|
|
13
13
|
|
|
14
14
|
## Why this exists
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
When vibe ships new commands, skills, hooks, or agents, one side (CC or coco) can end up out of sync with the other, frontmatter can drift, and hook tests can silently break. `/vibe.test` is the single mechanical check: does every surface in the target install actually load and pass its own tests?
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Target harness
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
.claude/vibe/test-reports/ # CC side artifacts
|
|
22
|
-
.coco/vibe/test-reports/ # coco side artifacts (when run from coco)
|
|
23
|
-
|
|
24
|
-
<YYYYMMDD-HHmm>-cc.json # machine-comparable
|
|
25
|
-
<YYYYMMDD-HHmm>-cc.md # human summary
|
|
26
|
-
<YYYYMMDD-HHmm>-coco.json
|
|
27
|
-
<YYYYMMDD-HHmm>-coco.md
|
|
28
|
-
<YYYYMMDD-HHmm>-parity.json # output of `parity` subcommand
|
|
29
|
-
<YYYYMMDD-HHmm>-compare.md # output of `compare` subcommand
|
|
30
|
-
```
|
|
20
|
+
The argument selects which install dir to probe:
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
| Arg | Probed dir |
|
|
23
|
+
|---|---|
|
|
24
|
+
| (empty) | current harness — CC: `~/.claude/`, coco: `~/.coco/` |
|
|
25
|
+
| `cc` | `~/.claude/` |
|
|
26
|
+
| `coco` | `~/.coco/` |
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
"harness": "cc | coco",
|
|
37
|
-
"version": "2.9.21",
|
|
38
|
-
"timestamp": "2026-04-14T18:30:00+09:00",
|
|
39
|
-
"vibe-version": "from package.json",
|
|
40
|
-
"commands": [
|
|
41
|
-
{ "name": "vibe.spec", "loaded": true, "first-response-ok": true, "error": null }
|
|
42
|
-
],
|
|
43
|
-
"skills": [
|
|
44
|
-
{ "name": "vibe-spec", "trigger-recognized": true, "context-injected": true, "error": null }
|
|
45
|
-
],
|
|
46
|
-
"hooks": [
|
|
47
|
-
{ "name": "pre-tool-guard", "test-suite": "passed | failed", "tests": "32/32" }
|
|
48
|
-
],
|
|
49
|
-
"agents": [],
|
|
50
|
-
"tools": []
|
|
51
|
-
}
|
|
52
|
-
```
|
|
28
|
+
If the target dir does not exist, print a clear message and exit with guidance (not an error). Example:
|
|
53
29
|
|
|
54
|
-
|
|
30
|
+
```
|
|
31
|
+
~/.coco/ not found — coco isn't installed on this machine.
|
|
32
|
+
To install: pnpm add -g @su-record/vibe-coco
|
|
33
|
+
```
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
## Probes
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
All probes are **structural or test-based** — no interactive command is ever actually invoked, and no LLM is called.
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
find ~/.claude/commands -type f -name '*.md' -exec basename {} \; | sort > /tmp/cc-cmds
|
|
68
|
-
find ~/.coco/commands -type f -name '*.md' -exec basename {} \; | sort > /tmp/coco-cmds
|
|
69
|
-
diff /tmp/cc-cmds /tmp/coco-cmds
|
|
70
|
-
```
|
|
71
|
-
Repeat for skills/agents. Persist diff entries to `parity.json` field `install-set-diff`.
|
|
72
|
-
|
|
73
|
-
3. **Content sync (CLAUDE.md ↔ AGENTS.md)**:
|
|
74
|
-
- Read both files; strip header block (leading `> ` lines plus filename mentions)
|
|
75
|
-
- Normalize body: map `.claude` ↔ `.coco`, `Claude Code` ↔ `coco`, `CLAUDE.md` ↔ `AGENTS.md`
|
|
76
|
-
- Lines that still differ after normalization go into `content-drift`
|
|
77
|
-
|
|
78
|
-
4. **Path reference validation**:
|
|
79
|
-
- Extract `~/.claude/`, `.claude/vibe/` patterns from CLAUDE.md → confirm each resolves under the actual install dir
|
|
80
|
-
- Extract `~/.coco/`, `.coco/vibe/` patterns from AGENTS.md → same check
|
|
81
|
-
- Wrong paths (e.g. AGENTS.md referencing `.codex/` after a rename) classified as `path-error`
|
|
82
|
-
|
|
83
|
-
5. **Console output**:
|
|
84
|
-
```
|
|
85
|
-
📊 PARITY REPORT
|
|
86
|
-
|
|
87
|
-
Install set:
|
|
88
|
-
✅ commands: 14/14 matched
|
|
89
|
-
❌ skills: 1 missing in coco (vibe-test)
|
|
90
|
-
|
|
91
|
-
Content sync:
|
|
92
|
-
✅ CLAUDE.md ↔ AGENTS.md normalized diff: clean
|
|
93
|
-
|
|
94
|
-
Path references:
|
|
95
|
-
✅ all paths resolve to existing dirs
|
|
96
|
-
|
|
97
|
-
📈 Parity Score: 95/100
|
|
98
|
-
📁 Saved: .claude/vibe/test-reports/20260414-1830-parity.json
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
6. **Auto-register P1 drift**:
|
|
102
|
-
- On `install-set-diff` finding → call `/vibe.regress register --from-test`
|
|
103
|
-
- symptom: `"Parity drift: <category> missing in <harness>"`
|
|
104
|
-
- root-cause-tag: `integration`
|
|
105
|
-
|
|
106
|
-
## Subcommand: `report` — runtime invocation
|
|
107
|
-
|
|
108
|
-
Inspect every shipped feature in the current harness, capture pass/fail, and emit the JSON+MD report defined above.
|
|
109
|
-
|
|
110
|
-
### Probe philosophy
|
|
111
|
-
|
|
112
|
-
- **No external LLM calls.** The probe is structural + execution-based, not generative. Cost ≈ a few file reads plus running `vitest`.
|
|
113
|
-
- **Interactive commands are NOT actually invoked.** Calling `/vibe.spec` would block on the interview loop. Probe checks structural validity only and records `invocable: true` if the file is well-formed.
|
|
114
|
-
- **Hooks and tools have real unit tests** in the repo — run them, do not simulate.
|
|
115
|
-
- A probe failure never stops the run. Each entry's `error` field captures the cause; the report keeps going.
|
|
116
|
-
|
|
117
|
-
### Steps
|
|
118
|
-
|
|
119
|
-
1. **Resolve install dir for current harness**:
|
|
120
|
-
- CC: `~/.claude/`
|
|
121
|
-
- coco: `~/.coco/` (`COCO_HOME` overrides)
|
|
122
|
-
- Detect via `process.env.COCO_HOME` first, then which one is currently being read from. If both present, use the harness this skill was invoked from.
|
|
123
|
-
|
|
124
|
-
2. **Probe `commands`** — for each `<install>/commands/*.md`:
|
|
125
|
-
- `loaded`: file exists and is non-empty
|
|
126
|
-
- `frontmatter-valid`: YAML frontmatter parses; required keys present (`description`)
|
|
127
|
-
- `argument-hint-present`: optional but recorded
|
|
128
|
-
- `body-references-skill`: body contains `Load skill ` or `## Process` (signal that the command delegates correctly)
|
|
129
|
-
- Result: `{ name, loaded, frontmatter-valid, body-references-skill, error }`
|
|
130
|
-
|
|
131
|
-
3. **Probe `skills`** — for each `<install>/skills/*/SKILL.md`:
|
|
132
|
-
- `loaded`: file exists
|
|
133
|
-
- `frontmatter-valid`: YAML parses with required keys: `name`, `tier`, `description`, `triggers`
|
|
134
|
-
- `triggers-non-empty`: triggers array has ≥1 entry
|
|
135
|
-
- `description-mentions-trigger-conditions`: heuristic — description contains `Must use this skill when` or equivalent (vibe convention)
|
|
136
|
-
- Result: `{ name, loaded, frontmatter-valid, triggers-count, error }`
|
|
137
|
-
|
|
138
|
-
4. **Probe `hooks`** — for each `<install>/hooks/scripts/*.js` (or repo `hooks/scripts/` if testing the source):
|
|
139
|
-
- If a matching `__tests__/<hook-name>.test.js` exists → run `npx vitest run hooks/scripts/__tests__/<hook>.test.js --reporter=json` and parse the result
|
|
140
|
-
- If no test exists → mark `test-suite: "no-tests"` (warn, not fail)
|
|
141
|
-
- Result: `{ name, test-suite: "passed" | "failed" | "no-tests", tests: "<passed>/<total>", error }`
|
|
142
|
-
|
|
143
|
-
5. **Probe `agents`** — for each `<install>/agents/*.md`:
|
|
144
|
-
- `loaded`, `frontmatter-valid` (required: `name`, `description`, `tools`)
|
|
145
|
-
- `tools-list-valid`: every tool in the `tools` array matches a known harness tool (Read, Glob, Grep, Bash, Edit, Write, WebSearch, WebFetch, Task, plus the agent-specific Skill etc.)
|
|
146
|
-
- Result: `{ name, loaded, frontmatter-valid, tools-list-valid, error }`
|
|
147
|
-
|
|
148
|
-
6. **Probe `tools`** — for each tool exported from `dist/tools/index.js`:
|
|
149
|
-
- If a matching test file exists in `src/tools/__tests__/` → run vitest and capture pass/fail
|
|
150
|
-
- If no test → call the tool with a minimal known-safe input (e.g. `validateCodeQuality` against a tiny fixture) and verify the response is well-shaped JSON
|
|
151
|
-
- Result: `{ name, test-suite | smoke-call, status, error }`
|
|
152
|
-
|
|
153
|
-
7. **Compile JSON + Markdown reports** to `<project-vibe-dir>/test-reports/<YYYYMMDD-HHmm>-<harness>.{json,md}` per the schema above.
|
|
154
|
-
|
|
155
|
-
8. **Print summary**:
|
|
156
|
-
```
|
|
157
|
-
📊 RUNTIME REPORT (cc)
|
|
158
|
-
commands: 14/14 loaded, 14/14 frontmatter-valid
|
|
159
|
-
skills: 28/28 loaded, 1 missing description-mentions-trigger-conditions
|
|
160
|
-
hooks: 7/7 test suites passed (118/118 tests)
|
|
161
|
-
agents: 42/42 loaded, 0 with invalid tools
|
|
162
|
-
tools: 9/9 passing
|
|
163
|
-
📈 Score: 99/100
|
|
164
|
-
📁 .claude/vibe/test-reports/20260414-1845-cc.json
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Failure handling
|
|
168
|
-
|
|
169
|
-
| Probe failure | Action |
|
|
170
|
-
|---|---|
|
|
171
|
-
| frontmatter parse error | record + continue |
|
|
172
|
-
| missing required key | record + continue |
|
|
173
|
-
| vitest run failure | capture stderr summary into `error` field, continue |
|
|
174
|
-
| tool smoke-call exception | record exception type + continue |
|
|
175
|
-
| install dir not found | abort with clear message — cannot probe what is not installed |
|
|
39
|
+
| Category | Source | Check |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| commands | `<install>/commands/*.md` | file readable · frontmatter parses · `description` present · body references a skill (`Load skill \`...\``) if it delegates |
|
|
42
|
+
| skills | `<install>/skills/*/SKILL.md` | frontmatter parses · required fields (`name`, `description`) · `triggers` array non-empty · body non-empty |
|
|
43
|
+
| hooks | repo `hooks/scripts/*.js` | for each script with a matching `__tests__/<name>.test.js`, run `npx vitest run <test> --reporter=json` and parse pass/fail counts |
|
|
44
|
+
| agents | `<install>/agents/*.md` | file readable · frontmatter parses · required fields (`name`, `description`) |
|
|
176
45
|
|
|
177
|
-
|
|
46
|
+
A probe's failure is captured in its `error` field; the overall run never halts because of one failure.
|
|
178
47
|
|
|
179
|
-
|
|
180
|
-
- Skill with malformed frontmatter (would fail to register at runtime)
|
|
181
|
-
- Agent listing a tool that does not exist in the harness
|
|
182
|
-
- Hook unit test regression (matches existing CI guard but locally observable)
|
|
183
|
-
- Tool that broke between the test fixture and the shipped build
|
|
48
|
+
## Report template
|
|
184
49
|
|
|
185
|
-
|
|
50
|
+
Written to `~/.vibe/test-reports/<YYYYMMDD-HHmm>-<harness>.{json,md}`. Exact schema:
|
|
186
51
|
|
|
187
|
-
|
|
188
|
-
- Race conditions in agent orchestration
|
|
189
|
-
- Real-world failures that depend on user input
|
|
52
|
+
### JSON
|
|
190
53
|
|
|
191
|
-
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"harness": "cc",
|
|
57
|
+
"timestamp": "2026-04-16T18:30:00+09:00",
|
|
58
|
+
"vibe_version": "2.9.24",
|
|
59
|
+
"install_dir": "/Users/grove/.claude",
|
|
60
|
+
"summary": {
|
|
61
|
+
"total": 42,
|
|
62
|
+
"passed": 40,
|
|
63
|
+
"failed": 2
|
|
64
|
+
},
|
|
65
|
+
"probes": {
|
|
66
|
+
"commands": [
|
|
67
|
+
{ "name": "vibe.spec", "status": "pass" },
|
|
68
|
+
{ "name": "vibe.test", "status": "pass" }
|
|
69
|
+
],
|
|
70
|
+
"skills": [
|
|
71
|
+
{ "name": "vibe-test", "status": "pass" },
|
|
72
|
+
{ "name": "vibe-spec", "status": "fail", "error": "frontmatter: triggers array is empty" }
|
|
73
|
+
],
|
|
74
|
+
"hooks": [
|
|
75
|
+
{ "name": "pre-tool-guard", "status": "pass", "tests": "38/38" },
|
|
76
|
+
{ "name": "keyword-detector", "status": "pass", "tests": "12/12" }
|
|
77
|
+
],
|
|
78
|
+
"agents": [
|
|
79
|
+
{ "name": "explorer", "status": "pass" }
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"failed": [
|
|
83
|
+
{
|
|
84
|
+
"category": "skills",
|
|
85
|
+
"name": "vibe-spec",
|
|
86
|
+
"error": "frontmatter: triggers array is empty"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
```
|
|
192
91
|
|
|
193
|
-
|
|
92
|
+
- `status`: `"pass"` | `"fail"`
|
|
93
|
+
- `error`: required when `status === "fail"`, omitted otherwise
|
|
94
|
+
- `tests` (hooks only): short `passed/total` string from the vitest JSON reporter
|
|
95
|
+
- `failed[]`: flat list of every failure for quick scanning — mirrors entries found across `probes.*`
|
|
194
96
|
|
|
195
|
-
|
|
196
|
-
/vibe.test compare <cc-report.json> <coco-report.json>
|
|
197
|
-
```
|
|
97
|
+
### Markdown
|
|
198
98
|
|
|
199
|
-
|
|
99
|
+
```markdown
|
|
100
|
+
# vibe self-test · cc · 2026-04-16 18:30
|
|
200
101
|
|
|
201
|
-
|
|
202
|
-
2. Match entries per category by `name`
|
|
203
|
-
3. Classify:
|
|
204
|
-
- **P1**: present on only one side → missing
|
|
205
|
-
- **P2**: present both sides but mismatched booleans (`loaded`, `first-response-ok`, `trigger-recognized`) → behavioral drift
|
|
206
|
-
- **P3**: only error wording differs, behavior identical → informational
|
|
207
|
-
4. Persist result as `<ts>-compare.md`
|
|
208
|
-
5. P1 findings auto-register via `/vibe.regress`
|
|
102
|
+
**Version**: 2.9.24 **Install**: /Users/grove/.claude
|
|
209
103
|
|
|
210
|
-
|
|
104
|
+
| Category | Pass | Fail |
|
|
105
|
+
|---|---:|---:|
|
|
106
|
+
| commands | 15 | 0 |
|
|
107
|
+
| skills | 17 | 1 |
|
|
108
|
+
| hooks | 6 | 0 |
|
|
109
|
+
| agents | 3 | 1 |
|
|
110
|
+
| **total**| **41** | **2** |
|
|
211
111
|
|
|
212
|
-
|
|
112
|
+
## Failures
|
|
213
113
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
1. From CC: /vibe.test parity → must pass
|
|
217
|
-
2. From coco: /vibe.test parity → must pass (when feasible)
|
|
218
|
-
3. Both green → pnpm release
|
|
114
|
+
- **skills / vibe-spec** — frontmatter: triggers array is empty
|
|
115
|
+
- **agents / explorer** — agent file not found
|
|
219
116
|
```
|
|
220
117
|
|
|
221
|
-
|
|
118
|
+
If `failed` is empty, replace the Failures section with `_All probes passed._`.
|
|
222
119
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
120
|
+
## Steps
|
|
121
|
+
|
|
122
|
+
1. **Resolve target**: argument (`cc` / `coco` / empty). Empty → detect current harness (`$CLAUDE_PROJECT_DIR` set → `cc`; else fall back to `cc`).
|
|
123
|
+
2. **Resolve install dir**: `cc` → `~/.claude`, `coco` → `~/.coco`. If missing → print guidance + exit.
|
|
124
|
+
3. **Read `vibe_version`** from `package.json` in the current repo.
|
|
125
|
+
4. **Walk each category**, run its check, append `{ name, status, error? }` to `probes.<category>`.
|
|
126
|
+
5. **Compute** `summary` counts and the flat `failed[]` list.
|
|
127
|
+
6. **Ensure** `~/.vibe/test-reports/` exists (`mkdir -p`, dir mode `0o700` — consistent with `~/.vibe/config.json`).
|
|
128
|
+
7. **Write** `<ts>-<harness>.json` and `<ts>-<harness>.md`.
|
|
129
|
+
8. **Print** the Markdown summary to the console.
|
|
130
|
+
9. **If `summary.failed > 0`**, load skill `vibe-regress` with `subcommand: register --from-test` and pass the failed entries. P1 = any probe with `status: fail`.
|
|
230
131
|
|
|
231
132
|
## Done Criteria
|
|
232
133
|
|
|
233
|
-
|
|
234
|
-
- [ ]
|
|
235
|
-
- [ ]
|
|
236
|
-
- [ ]
|
|
237
|
-
- [ ]
|
|
238
|
-
- [ ]
|
|
239
|
-
|
|
240
|
-
### Subcommand: report
|
|
241
|
-
- [ ] No external LLM calls (cost = file reads + vitest runs only)
|
|
242
|
-
- [ ] Interactive commands probed structurally, never actually invoked
|
|
243
|
-
- [ ] Hook and tool tests run via real vitest, not simulated
|
|
244
|
-
- [ ] A probe failure on one entry never stops the run
|
|
245
|
-
- [ ] JSON report matches the schema in "Storage Contract"
|
|
246
|
-
- [ ] Markdown summary printed to console after run completes
|
|
247
|
-
- [ ] Install dir absent → abort with clear message (not silent)
|
|
134
|
+
- [ ] No external LLM call — file reads + vitest runs only
|
|
135
|
+
- [ ] One probe failing never halts the overall run
|
|
136
|
+
- [ ] Target install dir missing → clean exit with guidance (not an error)
|
|
137
|
+
- [ ] JSON report matches the template above exactly (fields, types, naming)
|
|
138
|
+
- [ ] Markdown summary printed to console after the run
|
|
139
|
+
- [ ] Reports land in `~/.vibe/test-reports/`, never in project-local `.claude/vibe/`
|
|
140
|
+
- [ ] `failed.length > 0` → auto-invokes `/vibe.regress register --from-test`
|