@su-record/vibe 4.1.15 → 4.1.16
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-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +2 -2
- package/dist/core/checks/changed.js +97 -0
- package/dist/core/checks/changed.js.map +1 -0
- package/dist/core/checks/review.js +12 -2
- package/dist/core/checks/review.js.map +1 -1
- package/dist/core/checks/source.js +17 -4
- package/dist/core/checks/source.js.map +1 -1
- package/dist/core/scenarios.js +3 -0
- package/dist/core/scenarios.js.map +1 -1
- package/package.json +1 -1
- package/skills/vibe-scope/SKILL.md +1 -1
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "An AX/FDE harness for Claude Code, Codex CLI and ChatGPT desktop. Say what you need, approve the scenarios once; the harness proves the work by running the checks itself. Memory in plain files, human tokens for irreversible actions, a ledger instead of claims.",
|
|
9
|
-
"version": "4.1.
|
|
9
|
+
"version": "4.1.16"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "vibe",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "An AX/FDE harness for Claude Code, Codex CLI and ChatGPT desktop. Say what you need, approve the scenarios once; the harness proves the work by running the checks itself. Memory in plain files, human tokens for irreversible actions, a ledger instead of claims.",
|
|
16
|
-
"version": "4.1.
|
|
16
|
+
"version": "4.1.16",
|
|
17
17
|
"category": "productivity"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.16",
|
|
4
4
|
"description": "An AX/FDE harness for Claude Code, Codex CLI and ChatGPT desktop. Say what you need, approve the scenarios once; the harness proves the work by running the checks itself. Memory in plain files, human tokens for irreversible actions, a ledger instead of claims.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "su-record",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.16",
|
|
4
4
|
"description": "An AX/FDE harness for Claude Code, Codex CLI and ChatGPT desktop. Say what you need, approve the scenarios once; the harness proves the work by running the checks itself. Memory in plain files, human tokens for irreversible actions, a ledger instead of claims.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "su-record",
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Any client can pick the work up: `vibe state` says where you are, because the st
|
|
|
55
55
|
| `file` | exists · regex · substring · absence · traceability · accessibility · JSON Schema · column sum | `path`, `exists` / `pattern` / `contains` / `absent` (a regex that must match nowhere; the first three hits are named by line; `@placeholders` is the built-in expression for lorem-ipsum text, a bracketed TODO, a to-be-decided mark, a company-name placeholder, unfilled double-brace fields and double-square-bracket notes, and combines with your own words by `|`) / `traceable: <evidence file>` (every number in the file, two significant digits or more, outside fenced code, appears in the evidence file; the first three that do not are named by line) / `a11y: true` (an html file: `<img>` without alt, a skipped heading level, a button or link with no text or aria-label, an input without a label, and a CSS rule whose text colour on its background is under 4.5:1; a `.css` file gets the contrast rule alone) / `schema` / `sum: {column, equals, tolerance}` |
|
|
56
56
|
| `http` | status · body schema · latency ceiling | `url`, `method`, `expect: {status, schema, maxMs}`, `timeoutMs` |
|
|
57
57
|
| `eval` | count of matching cases (never a ratio) | `cases` (jsonl `{id, input, expected}`), `runner` (stdin → stdout), `expect: {pass}` |
|
|
58
|
-
| `review` | an antislop pack's reviewer stages, in order, run by the harness through the client CLI; a stage passes only on an exact `PASS` | `path` (the artifact: a file, or a directory for `pack: design`), `pack` (`ko` · `en` · `design`), `lang` (`ko` · `en`, else detected from the text), `contract`, `evidence`, `screenshot`, `timeoutMs` |
|
|
58
|
+
| `review` | an antislop pack's reviewer stages, in order, run by the harness through the client CLI; a stage passes only on an exact `PASS` | `path` (the artifact: a file, or a directory for `pack: design` / `pack: code`), `pack` (`ko` · `en` · `design` · `code`), `lang` (`ko` · `en`, else detected from the text), `contract`, `evidence`, `screenshot`, `changed` (`true`: what changed under `path` against HEAD plus the files that import it, one hop; a git ref: against that ref; nothing changed passes and reviews nothing), `timeoutMs` |
|
|
59
59
|
| `human` | none — a question in the inbox | `question` |
|
|
60
60
|
|
|
61
61
|
`review` is the only model-judged check: the harness runs each reviewer stage through the client CLI slim — `claude -p` with the stage prompt as its system prompt, `Read` as its only tool (for a screenshot; every other tool schema costs tokens on every stage), no settings and no project context, in the neutral directory the reader uses; `codex exec --skip-git-repo-check --json` with the prompt leading the message — at the client's default model, and reads the reply; nothing the writing model says about its own prose counts. Stages never share a session: the chief editor must not see the copy editor's verdict, and that outranks cache. Each stage's token usage is in the check's tail and evidence, and lands in the ledger as a `usage` event on the run in progress, as does every `vibe read --ask`; `ledger compare --metric cost` adds it to the run's cost. `VIBE_REVIEW_CMD` keeps a stateless text command; `VIBE_REVIEW_CLIENT=claude|codex` forces a driver. The scope skill marks such a scenario `⚠ model-judged`, and the same REJECT twice in a row is STUCK like any other failure.
|
|
@@ -154,7 +154,7 @@ config.json token policy · skill catalogs
|
|
|
154
154
|
|
|
155
155
|
## Status
|
|
156
156
|
|
|
157
|
-
`4.0.0` — phase 1: CLI core + Claude Code. Phase 2: Codex CLI and ChatGPT desktop adapters, the work graph and typed ledger edges. Phase 3a: `http` / `eval` checks, column sums, sample profiling. Phase 3b: GitHub research, project-local skills and proposals. Phase 3c: the end-to-end order-settlement example. Phase 4: the bench and `ledger compare --by harness`. `4.0.2`: no `init` — the card, skills and hook live in the client home and any `vibe` command repairs them. `4.0.3`: `vibe uninstall` also clears what an older `init` left in the project. `4.1.0`: the package is the plugin — `npm i -g` registers a local plugin in Claude Code and Codex/ChatGPT, Hermes Agent joins as a client, `vibe plugin build --check` gates manifest drift. `4.1.1`: `vibe update`. `4.1.2`: the Claude desktop app through an MCP Bundle (`vibe plugin mcpb`). `4.1.3`: the bundle finds the CLI without the shell's PATH (Homebrew, nvm, fnm, volta) or from a path set at install. `4.1.4`: `vibe read` for xlsx · docx · pptx · pdf, `vibe profile` reads xlsx, card rule 8 (read files whole). `4.1.5`: `vibe read` for Hangul hwp · hwpx and html. `4.1.6`: `vibe size`, a built-in file/function size check for any project; the CLI split into modules; the repository's own limit is now per file (400), not a total. `4.1.7`: hook entries left by vibe 3 that point at a missing script are swept at every command, so Claude Code stops reporting them. `4.1.8`: the five stage skills are `vibe-discover` … `vibe-handoff` (a dot is outside the Agent Skills name grammar) and the dotted directories an older install left in a client home are swept; `.vibe/` means one thing — the plugin tree moves to `~/.config/vibe/plugin`, a `.vibe/` counts as a project only when it holds a record, the search stops at `.git` and never lands on the home, `vibe state` shows `root`, a `run` check that exits 127 names its cwd; the `review` check and the `antislop-ko` · `antislop-en` language packs — the harness runs a copy editor and a chief editor on human-read text and passes only on `PASS`. vibe 3 stays on its 3.x tags and is no longer developed. `4.1.9`: Codex follows `vibe update` — the version Codex actually holds is read from its cache, compared with the package and re-registered (remove + add) when behind; a marketplace entry still pointing at the ≤ 4.1.7 store is drift; `vibe status` reports the Codex plugin version it read, not the package version. `4.1.10`: `vibe read --ask` — the harness reads for the model: files (numbered) go to a low-reasoning reader on the client CLI and only the answer returns; the reader runs slim (own system prompt, no tools, no settings, neutral directory) and one session per file set is resumed for follow-up questions so the corpus is read from cache, with the hit reported; the hook advises `--ask` on reads over 400 lines; card rule 8 says when to delegate; the `review` check's Codex command gets `--skip-git-repo-check`. Also: `regress record` made ids longer than the 40-character rule, so every recorded regression was silently left out of `check --all` — the id now fits, a file that parses to nothing is named in `vibe state`, and the repository's four regressions run again. `4.1.11`: antislop reaches design — `antislop-design` and its two reviewers (markup reviewer, art director) join the text packs, reviewer stages are data (`reviewers/<pack>/N-<stage>.md`), the `review` check takes `pack`, a directory of source and a `screenshot`; the text packs gain strength tiers, five questions before a cut, the portability test, notes-to-the-writer, sample-outranks-rules and a what-is-not-a-tell list, and the reviewers may name what to keep. `4.1.12`: the agent's own report is not slop — card rule 9 (what changed apart from what `vibe check` verified; keep the caveat that changes the next step; an error is its cause and fix; answer first, no praise, apology or closing offer) and a Report voice section in `vibe-handoff` (each Built line names its check and run or says "not checked"; estimates in turns and tool calls, never calendar time; the handoff document follows `antislop-en`). `4.1.13`: the deterministic pre-gate — `file … absent` (a regex that must match nowhere: placeholders, a writer's note in double square brackets that was reprinted into the artifact), proposed by the scope skill next to every `review`; this repository gates its own documents the same way. No word lists, no dash counts: the judgment stays with the reviewers. `4.1.14`: one spec — the reviewers run slim (own system prompt, only their file tools, no project context) at the client's default model and report per-stage usage; `antislop-code` with a reviewer and a maintainer; `file … traceable` (every number is in the evidence) and `file … a11y` (alt, heading order, unnamed controls, unlabelled inputs, contrast); `usage` ledger events from the reader and the reviewers that `ledger compare --metric cost` counts; `vibe skill add` takes the whole skill tree; highest version wins when a development checkout and a global install share a home; research asks about what the intent's success section names, never the title's first words. `4.1.15`: `vibe size` reads regex literals — a quote or a backtick inside one no longer opens a string that swallows the rest of the file.
|
|
157
|
+
`4.0.0` — phase 1: CLI core + Claude Code. Phase 2: Codex CLI and ChatGPT desktop adapters, the work graph and typed ledger edges. Phase 3a: `http` / `eval` checks, column sums, sample profiling. Phase 3b: GitHub research, project-local skills and proposals. Phase 3c: the end-to-end order-settlement example. Phase 4: the bench and `ledger compare --by harness`. `4.0.2`: no `init` — the card, skills and hook live in the client home and any `vibe` command repairs them. `4.0.3`: `vibe uninstall` also clears what an older `init` left in the project. `4.1.0`: the package is the plugin — `npm i -g` registers a local plugin in Claude Code and Codex/ChatGPT, Hermes Agent joins as a client, `vibe plugin build --check` gates manifest drift. `4.1.1`: `vibe update`. `4.1.2`: the Claude desktop app through an MCP Bundle (`vibe plugin mcpb`). `4.1.3`: the bundle finds the CLI without the shell's PATH (Homebrew, nvm, fnm, volta) or from a path set at install. `4.1.4`: `vibe read` for xlsx · docx · pptx · pdf, `vibe profile` reads xlsx, card rule 8 (read files whole). `4.1.5`: `vibe read` for Hangul hwp · hwpx and html. `4.1.6`: `vibe size`, a built-in file/function size check for any project; the CLI split into modules; the repository's own limit is now per file (400), not a total. `4.1.7`: hook entries left by vibe 3 that point at a missing script are swept at every command, so Claude Code stops reporting them. `4.1.8`: the five stage skills are `vibe-discover` … `vibe-handoff` (a dot is outside the Agent Skills name grammar) and the dotted directories an older install left in a client home are swept; `.vibe/` means one thing — the plugin tree moves to `~/.config/vibe/plugin`, a `.vibe/` counts as a project only when it holds a record, the search stops at `.git` and never lands on the home, `vibe state` shows `root`, a `run` check that exits 127 names its cwd; the `review` check and the `antislop-ko` · `antislop-en` language packs — the harness runs a copy editor and a chief editor on human-read text and passes only on `PASS`. vibe 3 stays on its 3.x tags and is no longer developed. `4.1.9`: Codex follows `vibe update` — the version Codex actually holds is read from its cache, compared with the package and re-registered (remove + add) when behind; a marketplace entry still pointing at the ≤ 4.1.7 store is drift; `vibe status` reports the Codex plugin version it read, not the package version. `4.1.10`: `vibe read --ask` — the harness reads for the model: files (numbered) go to a low-reasoning reader on the client CLI and only the answer returns; the reader runs slim (own system prompt, no tools, no settings, neutral directory) and one session per file set is resumed for follow-up questions so the corpus is read from cache, with the hit reported; the hook advises `--ask` on reads over 400 lines; card rule 8 says when to delegate; the `review` check's Codex command gets `--skip-git-repo-check`. Also: `regress record` made ids longer than the 40-character rule, so every recorded regression was silently left out of `check --all` — the id now fits, a file that parses to nothing is named in `vibe state`, and the repository's four regressions run again. `4.1.11`: antislop reaches design — `antislop-design` and its two reviewers (markup reviewer, art director) join the text packs, reviewer stages are data (`reviewers/<pack>/N-<stage>.md`), the `review` check takes `pack`, a directory of source and a `screenshot`; the text packs gain strength tiers, five questions before a cut, the portability test, notes-to-the-writer, sample-outranks-rules and a what-is-not-a-tell list, and the reviewers may name what to keep. `4.1.12`: the agent's own report is not slop — card rule 9 (what changed apart from what `vibe check` verified; keep the caveat that changes the next step; an error is its cause and fix; answer first, no praise, apology or closing offer) and a Report voice section in `vibe-handoff` (each Built line names its check and run or says "not checked"; estimates in turns and tool calls, never calendar time; the handoff document follows `antislop-en`). `4.1.13`: the deterministic pre-gate — `file … absent` (a regex that must match nowhere: placeholders, a writer's note in double square brackets that was reprinted into the artifact), proposed by the scope skill next to every `review`; this repository gates its own documents the same way. No word lists, no dash counts: the judgment stays with the reviewers. `4.1.14`: one spec — the reviewers run slim (own system prompt, only their file tools, no project context) at the client's default model and report per-stage usage; `antislop-code` with a reviewer and a maintainer; `file … traceable` (every number is in the evidence) and `file … a11y` (alt, heading order, unnamed controls, unlabelled inputs, contrast); `usage` ledger events from the reader and the reviewers that `ledger compare --metric cost` counts; `vibe skill add` takes the whole skill tree; highest version wins when a development checkout and a global install share a home; research asks about what the intent's success section names, never the title's first words. `4.1.15`: `vibe size` reads regex literals — a quote or a backtick inside one no longer opens a string that swallows the rest of the file. `4.1.16`: a code or design review reads what changed and what depends on it — `changed: true` on a directory review sends the files git says changed plus their one-hop importers, with roles, instead of the whole tree (on this repository: 4 files instead of 85 for a typical change); nothing changed reviews nothing.
|
|
158
158
|
|
|
159
159
|
## Bench — the ledger is the benchmark
|
|
160
160
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { usage } from '../errors.js';
|
|
5
|
+
import { isSourceOf, listSource, renderSource } from './source.js';
|
|
6
|
+
function git(root, args) {
|
|
7
|
+
const r = spawnSync('git', ['-C', root, ...args], { encoding: 'utf-8', timeout: 30_000, shell: process.platform === 'win32' });
|
|
8
|
+
return { ok: r.status === 0, out: r.stdout ?? '' };
|
|
9
|
+
}
|
|
10
|
+
/** Modified, added and untracked source files under `target` against `ref` (`true` = HEAD); deleted ones cannot be reviewed and are dropped. */
|
|
11
|
+
export function changedFiles(root, target, ref, kind) {
|
|
12
|
+
if (!git(root, ['rev-parse', '--is-inside-work-tree']).ok)
|
|
13
|
+
throw usage('changed needs a git repository');
|
|
14
|
+
const against = ref === true ? 'HEAD' : ref;
|
|
15
|
+
const diff = git(root, ['diff', '--relative', '--name-only', '--diff-filter=d', against, '--', target]);
|
|
16
|
+
if (!diff.ok)
|
|
17
|
+
throw usage(`git cannot diff against ${against}`);
|
|
18
|
+
const untracked = git(root, ['ls-files', '--others', '--exclude-standard', '--', target]);
|
|
19
|
+
const names = [...new Set(`${diff.out}\n${untracked.out}`.split('\n').map((l) => l.trim()).filter(Boolean))];
|
|
20
|
+
const files = names.map((n) => path.resolve(root, n)).filter((f) => fs.existsSync(f) && fs.statSync(f).isFile() && isSourceOf(f, kind)).sort();
|
|
21
|
+
return { ref: against, files };
|
|
22
|
+
}
|
|
23
|
+
const JS_IMPORT = /(?:from\s+|import\s*\(?\s*|require\s*\(\s*)['"]([^'"]+)['"]/g;
|
|
24
|
+
const PY_FROM = /^\s*from\s+([.\w]+)\s+import\b/gm;
|
|
25
|
+
const PY_IMPORT = /^\s*import\s+([\w.]+(?:\s*,\s*[\w.]+)*)/gm;
|
|
26
|
+
const EXTS = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs', '.py', '.vue', '.svelte'];
|
|
27
|
+
/** The files a relative JS/TS specifier may resolve to: as written, with an extension, `.js` read as `.ts`, or an index file. */
|
|
28
|
+
function jsTargets(fromDir, spec) {
|
|
29
|
+
if (!spec.startsWith('.'))
|
|
30
|
+
return [];
|
|
31
|
+
const base = path.resolve(fromDir, spec);
|
|
32
|
+
const out = [base, ...EXTS.map((e) => base + e), ...EXTS.map((e) => path.join(base, `index${e}`))];
|
|
33
|
+
if (/\.[cm]?js$/.test(base))
|
|
34
|
+
out.push(base.replace(/\.[cm]?js$/, '.ts'), base.replace(/\.[cm]?js$/, '.tsx'));
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
/** Python: `from .x import` relative to the file, `from pkg.x import` / `import pkg.x` from the root and from the file's directory. */
|
|
38
|
+
function pyTargets(root, fromDir, mod) {
|
|
39
|
+
const out = [];
|
|
40
|
+
if (mod.startsWith('.')) {
|
|
41
|
+
const ups = mod.match(/^\.+/)[0].length - 1;
|
|
42
|
+
const rest = mod.slice(ups + 1).split('.').filter(Boolean);
|
|
43
|
+
const base = path.resolve(fromDir, ...Array(ups).fill('..'), ...rest);
|
|
44
|
+
out.push(`${base}.py`, path.join(base, '__init__.py'));
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const rest = mod.split('.');
|
|
48
|
+
for (const start of [root, fromDir]) {
|
|
49
|
+
const base = path.resolve(start, ...rest);
|
|
50
|
+
out.push(`${base}.py`, path.join(base, '__init__.py'));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
function importsOf(root, file) {
|
|
56
|
+
const text = fs.readFileSync(file, 'utf-8');
|
|
57
|
+
const dir = path.dirname(file);
|
|
58
|
+
const out = new Set();
|
|
59
|
+
if (/\.py$/.test(file)) {
|
|
60
|
+
for (const m of text.matchAll(PY_FROM))
|
|
61
|
+
for (const t of pyTargets(root, dir, m[1]))
|
|
62
|
+
out.add(t);
|
|
63
|
+
for (const m of text.matchAll(PY_IMPORT))
|
|
64
|
+
for (const mod of m[1].split(','))
|
|
65
|
+
for (const t of pyTargets(root, dir, mod.trim()))
|
|
66
|
+
out.add(t);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
for (const m of text.matchAll(JS_IMPORT))
|
|
70
|
+
for (const t of jsTargets(dir, m[1]))
|
|
71
|
+
out.add(t);
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
/** Every source file under `target` that imports one of `changed`, itself not changed. */
|
|
76
|
+
export function dependentsOf(root, target, changed, kind) {
|
|
77
|
+
const changedSet = new Set(changed);
|
|
78
|
+
const out = [];
|
|
79
|
+
for (const file of listSource(root, target, kind)) {
|
|
80
|
+
if (changedSet.has(file))
|
|
81
|
+
continue;
|
|
82
|
+
const imports = importsOf(root, file);
|
|
83
|
+
if (changed.some((c) => imports.has(c)))
|
|
84
|
+
out.push(file);
|
|
85
|
+
}
|
|
86
|
+
return out.sort();
|
|
87
|
+
}
|
|
88
|
+
export function collectChanged(root, target, maxChars, kind, ref) {
|
|
89
|
+
const { ref: against, files: changed } = changedFiles(root, target, ref, kind);
|
|
90
|
+
const dependents = changed.length ? dependentsOf(root, target, changed, kind) : [];
|
|
91
|
+
const roles = new Map([...changed.map((f) => [f, 'changed']), ...dependents.map((f) => [f, 'dependent'])]);
|
|
92
|
+
const rel = (f) => path.relative(root, f);
|
|
93
|
+
const head = `Changed since ${against}: ${changed.map(rel).join(', ') || 'none'}\nDependents (one hop): ${dependents.map(rel).join(', ') || 'none'}`;
|
|
94
|
+
const rendered = renderSource(root, [...changed, ...dependents], maxChars, roles);
|
|
95
|
+
return { selection: { ref: against, changed: changed.map(rel), dependents: dependents.map(rel) }, files: rendered.files, text: `${head}\n\n${rendered.text}` };
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed.js","sourceRoot":"","sources":["../../../src/core/checks/changed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAapF,SAAS,GAAG,CAAC,IAAY,EAAE,IAAc;IACvC,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,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AAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,2BAA2B,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC;IACrJ,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;AACjK,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { recordUsage } from '../ledger.js';
|
|
|
5
5
|
import { claudeArgs, codexArgs, hasCli, parseClaude, parseCodex, readerHome, REVIEWER_DRIVER, spawnReader } from '../readerSession.js';
|
|
6
6
|
import { ensureDir } from '../store.js';
|
|
7
7
|
import { packStages, TEXT_PACKS } from './packs.js';
|
|
8
|
+
import { collectChanged } from './changed.js';
|
|
8
9
|
import { collectSource } from './source.js';
|
|
9
10
|
import { tail } from './run.js';
|
|
10
11
|
const DEFAULT_TIMEOUT_MS = 600_000;
|
|
@@ -40,12 +41,19 @@ function readOptional(root, file) {
|
|
|
40
41
|
function message(contract, evidence, body, screenshot) {
|
|
41
42
|
return `## Editorial contract\n\n${contract.trim()}\n\n## Evidence ledger\n\n${evidence.trim()}${screenshot}\n\n${body}\n`;
|
|
42
43
|
}
|
|
43
|
-
/** A text pack judges a manuscript; every other pack judges source
|
|
44
|
+
/** A text pack judges a manuscript; every other pack judges source — a file, a directory, or with `changed` the change and its dependents. */
|
|
44
45
|
function artifact(check, root, pack) {
|
|
45
46
|
if (TEXT_PACKS.includes(pack)) {
|
|
46
47
|
return { section: 'Manuscript', body: fs.readFileSync(path.resolve(root, check.path), 'utf-8') };
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
+
const kind = pack === 'code' ? 'code' : 'design';
|
|
50
|
+
if (check.changed) {
|
|
51
|
+
const c = collectChanged(root, check.path, MAX_SOURCE_CHARS, kind, check.changed === true ? true : check.changed);
|
|
52
|
+
if (c.selection.changed.length === 0)
|
|
53
|
+
return { section: 'Source', body: '', nothing: `nothing changed under ${check.path} since ${c.selection.ref} — nothing reviewed` };
|
|
54
|
+
return { section: 'Source', body: c.text };
|
|
55
|
+
}
|
|
56
|
+
const collected = collectSource(root, check.path, MAX_SOURCE_CHARS, kind);
|
|
49
57
|
return { section: 'Source', body: collected.text };
|
|
50
58
|
}
|
|
51
59
|
/** The pack: what the check names, else the text pack for `lang`, else the language of the text itself. */
|
|
@@ -101,6 +109,8 @@ export async function reviewCheck(check, root) {
|
|
|
101
109
|
catch (error) {
|
|
102
110
|
return fail(error.message);
|
|
103
111
|
}
|
|
112
|
+
if (piece.nothing)
|
|
113
|
+
return { pass: true, exit: 0, ms: Date.now() - started, tail: piece.nothing };
|
|
104
114
|
const contract = readOptional(root, check.contract);
|
|
105
115
|
const evidence = readOptional(root, check.evidence);
|
|
106
116
|
const shot = check.screenshot ? `\n\n## Screenshot\n\n${path.resolve(root, check.screenshot)} — open this image with your file reader before judging.` : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/core/checks/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,M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CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACpK,IAAI,CAAC,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,kBAAkB,SAAS,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1F,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,SAAS,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC/D,SAAS;QACX,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAChI,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,eAAe,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAC5E,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -38,7 +38,8 @@ export function numberLines(text) {
|
|
|
38
38
|
* The artifact as the reviewers see it: one file, or every source file under a directory, each
|
|
39
39
|
* numbered line by line so a finding can name `file:line`. The cap is the reviewer's context.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
/** Every source file of `kind` under `target` (or the file itself), absolute, sorted. */
|
|
42
|
+
export function listSource(root, target, kind) {
|
|
42
43
|
const full = path.resolve(root, target);
|
|
43
44
|
if (!fs.existsSync(full))
|
|
44
45
|
throw usage(`no such path: ${target}`);
|
|
@@ -47,8 +48,13 @@ export function collectSource(root, target, maxChars, kind = 'design') {
|
|
|
47
48
|
walk(full, files, kind);
|
|
48
49
|
else
|
|
49
50
|
files.push(full);
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
return files;
|
|
52
|
+
}
|
|
53
|
+
export function isSourceOf(file, kind) {
|
|
54
|
+
return SOURCE_EXT[kind].has(path.extname(file).toLowerCase());
|
|
55
|
+
}
|
|
56
|
+
/** The `<file>` blocks, numbered, within the cap; `roles` labels each file for the reviewer when the selection is a change. */
|
|
57
|
+
export function renderSource(root, files, maxChars, roles) {
|
|
52
58
|
const blocks = [];
|
|
53
59
|
let chars = 0;
|
|
54
60
|
const listed = [];
|
|
@@ -59,8 +65,15 @@ export function collectSource(root, target, maxChars, kind = 'design') {
|
|
|
59
65
|
if (chars > maxChars)
|
|
60
66
|
break;
|
|
61
67
|
listed.push(rel);
|
|
62
|
-
|
|
68
|
+
const role = roles?.get(file);
|
|
69
|
+
blocks.push(`<file path="${rel}"${role ? ` role="${role}"` : ''}>\n${body}\n</file>`);
|
|
63
70
|
}
|
|
64
71
|
return { files: listed, text: blocks.join('\n\n') };
|
|
65
72
|
}
|
|
73
|
+
export function collectSource(root, target, maxChars, kind = 'design') {
|
|
74
|
+
const files = listSource(root, target, kind);
|
|
75
|
+
if (files.length === 0)
|
|
76
|
+
throw usage(`no source files under ${target}`);
|
|
77
|
+
return renderSource(root, files, maxChars);
|
|
78
|
+
}
|
|
66
79
|
//# sourceMappingURL=source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":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I,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtC,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACzD,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC;QACrB,IAAI,KAAK,GAAG,QAAQ;YAAE,MAAM;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,IAAI,GAAG,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,WAAW,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,MAAc,EAAE,QAAgB,EAAE,OAAmB,QAAQ;IACvG,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,KAAK,CAAC,yBAAyB,MAAM,EAAE,CAAC,CAAC;IACvE,OAAO,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
package/dist/core/scenarios.js
CHANGED
|
@@ -56,6 +56,9 @@ function checkReason(check) {
|
|
|
56
56
|
const pack = check['pack'];
|
|
57
57
|
if (pack !== undefined && (typeof pack !== 'string' || !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(pack)))
|
|
58
58
|
return 'review pack must be a reviewers/ directory name';
|
|
59
|
+
const changed = check['changed'];
|
|
60
|
+
if (changed !== undefined && changed !== true && !str(changed))
|
|
61
|
+
return 'review changed must be true or a git ref';
|
|
59
62
|
const lang = check['lang'];
|
|
60
63
|
return lang === undefined || lang === 'ko' || lang === 'en' ? null : 'review lang must be ko or en';
|
|
61
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarios.js","sourceRoot":"","sources":["../../src/core/scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"scenarios.js","sourceRoot":"","sources":["../../src/core/scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAmFxB,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AACrG,MAAM,KAAK,GAAG,wBAAwB,CAAC;AAEvC,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvE,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IACrD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IA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AACnH,MAAM,UAAU,YAAY,CAAC,SAAqB,EAAE,MAA8B;IAChF,MAAM,IAAI,GAA2B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACtG,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3B,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,SAAS;QAAE,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACjG,KAAK,CAAC,IAAI,CAAC,gCAAgC,EAAE,gCAAgC,EAAE,sDAAsD,EAAE,mCAAmC,EAAE,iCAAiC,CAAC,CAAC;IAC/M,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,QAAkB;IACxC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@su-record/vibe",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.16",
|
|
4
4
|
"description": "An AX/FDE harness for Claude Code, Codex CLI and ChatGPT desktop. Say what you need, approve the scenarios once; the harness proves the work by running the checks itself. Memory in plain files, human tokens for irreversible actions, a ledger instead of claims.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,7 @@ user-invocable: false
|
|
|
12
12
|
- `run` command exit code · `file` exists/regex/contains/absent (a regex that must match nowhere)/traceable (every number is in an evidence file)/a11y (mechanical accessibility defects)/schema/sum (a column total equals a reference) · `http` status/schema/maxMs · `eval` count of matching labelled cases (jsonl `{input, expected}` through a runner's stdin/stdout, `expect.pass` is a count) · `review` an antislop pack's reviewer stages in order (text: copy editor → chief editor; design: markup reviewer → art director; code: reviewer → maintainer), run by the harness, exact `PASS` only · `human` no verdict (goes to the inbox)
|
|
13
13
|
- When a success condition is human-read text (blog, column, article, report, script, speech), propose `check: { type: review, path: <file>, contract: <file>, evidence: <file> }` and mark it `⚠ model-judged` in the approval message.
|
|
14
14
|
- When it is something a person looks at (screen, page, component, dashboard, slide, card news, poster), propose `check: { type: review, pack: design, path: <file or directory>, contract: <brief>, screenshot: <png, if an earlier scenario renders one> }`, same mark.
|
|
15
|
-
- When the code will be read or maintained by someone else (a library, a contribution, a handoff), propose `check: { type: review, pack: code, path: <
|
|
15
|
+
- When the code will be read or maintained by someone else (a library, a contribution, a handoff), propose `check: { type: review, pack: code, path: <directory>, contract: <brief>, changed: true }`, same mark; `changed: true` reviews what changed against HEAD and its one-hop importers instead of the whole directory (a git ref instead of `true` diffs against it) — propose it on every `review` of a directory in a git repository; otherwise `vibe size` stays the code gate.
|
|
16
16
|
- Next to a text `review` that has an evidence file, propose `check: { type: file, path: <file>, traceable: <evidence file> }` (every number in the text is in the evidence); next to a design `review` on html, `check: { type: file, path: <html>, a11y: true }` (alt, heading order, unnamed controls, unlabelled inputs, contrast). These check facts; the reviewers keep the judgment.
|
|
17
17
|
- Next to every `review`, propose its deterministic pre-gate on the same file: `check: { type: file, path: <file>, absent: "@placeholders" }` — the preset is the usual leftovers (lorem-ipsum text, a bracketed TODO, a to-be-decided mark, a company-name placeholder, unfilled double-brace fields, double-square-bracket notes); add the project's own words with `|`. For a directory, a `run` check with `grep -rlE` and `expect: 1`. Tell the writer that a note to the model goes between double square brackets, so the gate catches it if it survives into the artifact.
|
|
18
18
|
- A condition you cannot check gets `human` explicitly. An irreversible action (push, deploy, send, delete, spend) gets `irreversible: <action>`.
|