@su-record/vibe 4.1.13 → 4.1.14
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 +4 -4
- package/agents/code-maintainer.md +26 -0
- package/agents/code-reviewer.md +28 -0
- package/dist/core/check.js +2 -0
- package/dist/core/check.js.map +1 -1
- package/dist/core/checks/file.js +13 -0
- package/dist/core/checks/file.js.map +1 -1
- package/dist/core/checks/fileRules.js +116 -0
- package/dist/core/checks/fileRules.js.map +1 -0
- package/dist/core/checks/review.js +51 -44
- package/dist/core/checks/review.js.map +1 -1
- package/dist/core/checks/run.js.map +1 -1
- package/dist/core/checks/source.js +23 -8
- package/dist/core/checks/source.js.map +1 -1
- package/dist/core/ledger.js +24 -2
- package/dist/core/ledger.js.map +1 -1
- package/dist/core/reader.js +5 -3
- package/dist/core/reader.js.map +1 -1
- package/dist/core/readerSession.js +15 -10
- package/dist/core/readerSession.js.map +1 -1
- package/dist/core/research.js +53 -14
- package/dist/core/research.js.map +1 -1
- package/dist/core/scenarios.js +2 -2
- package/dist/core/scenarios.js.map +1 -1
- package/dist/core/skills.js +29 -9
- package/dist/core/skills.js.map +1 -1
- package/dist/install/global.js +2 -2
- package/dist/install/global.js.map +1 -1
- package/dist/install/register.js +37 -0
- package/dist/install/register.js.map +1 -1
- package/package.json +1 -1
- package/reviewers/code/1-reviewer.md +21 -0
- package/reviewers/code/2-maintainer.md +19 -0
- package/skills/antislop-code/SKILL.md +206 -0
- package/skills/antislop-code/references/catalogue.md +28 -0
- package/skills/vibe-scope/SKILL.md +3 -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.14"
|
|
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.14",
|
|
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.14",
|
|
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.14",
|
|
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
|
@@ -52,13 +52,13 @@ Any client can pick the work up: `vibe state` says where you are, because the st
|
|
|
52
52
|
| type | verdict | arguments |
|
|
53
53
|
|---|---|---|
|
|
54
54
|
| `run` | exit code | `cmd`, `expect` (default 0), `timeoutMs`, `cwd` |
|
|
55
|
-
| `file` | exists · regex · substring · absence · 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 `|`) / `schema` / `sum: {column, equals, tolerance}` |
|
|
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
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` |
|
|
59
59
|
| `human` | none — a question in the inbox | `question` |
|
|
60
60
|
|
|
61
|
-
`review` is the only model-judged check: the harness
|
|
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.
|
|
62
62
|
|
|
63
63
|
A project's code-size rule is a scenario too: `check: { type: run, cmd: "vibe size src --max-file 400 --max-function 50" }` — `vibe size` exits 1 when a file or function is over, and the scope skill proposes it whenever an intent writes code.
|
|
64
64
|
|
|
@@ -118,7 +118,7 @@ Default catalogs: `anthropics/skills`, `vercel-labs/agent-skills`, `NousResearch
|
|
|
118
118
|
|
|
119
119
|
Six common skills ship with the package — `vibe` (entry), `vibe-discover`, `vibe-scope`, `vibe-build`, `vibe-prove`, `vibe-handoff` — under 300 lines in total, named by the Agent Skills grammar (lowercase, digits, hyphens; name = directory) so Claude Code, Codex and ChatGPT load them alike. They contain the harness command sequence and message shapes for each stage, nothing about how to code.
|
|
120
120
|
|
|
121
|
-
Antislop packs ship next to the six. A pack is a medium, not only a language: `antislop-ko` and `antislop-en` carry the writing principles that strip AI clichés and translationese, `antislop-design` the ones that strip generic AI interfaces (the gradient hero over three glass cards, emoji icons, invented stat tiles, fade-up on every section, one typeface, everything centred). Each pack's `reviewers/<pack>/N-<stage>.md` files are the stages the `review` check runs in order — text: copy editor then chief editor; design: markup reviewer then art director — and they are installed as client agents too (`agents/<pack>-<stage>.md` for Claude Code, TOML under the Codex plugin tree). A pack loads only when that medium is worked on.
|
|
121
|
+
Antislop packs ship next to the six. A pack is a medium, not only a language: `antislop-ko` and `antislop-en` carry the writing principles that strip AI clichés and translationese, `antislop-design` the ones that strip generic AI interfaces (the gradient hero over three glass cards, emoji icons, invented stat tiles, fade-up on every section, one typeface, everything centred), `antislop-code` the ones that strip generic AI code (a comment that restates the line, a guard for an impossible state, a try that swallows, an interface with one implementation, a Manager/Helper/Utils name, a wrapper that only forwards, dead code kept just in case, a TODO that ships). Each pack's `reviewers/<pack>/N-<stage>.md` files are the stages the `review` check runs in order — text: copy editor then chief editor; design: markup reviewer then art director; code: reviewer then maintainer — and they are installed as client agents too (`agents/<pack>-<stage>.md` for Claude Code, TOML under the Codex plugin tree). A pack loads only when that medium is worked on.
|
|
122
122
|
|
|
123
123
|
The design pack judges source, not pixels: `check: { type: review, pack: design, path: <file or directory>, contract: <brief>, screenshot: <png> }`. The harness renders nothing — when a screenshot is wanted, an earlier scenario produces it with the project's own tooling and this check hands the path to the art director, who opens it. The text packs keep working through `lang` and through the language of the manuscript.
|
|
124
124
|
|
|
@@ -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.
|
|
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.
|
|
158
158
|
|
|
159
159
|
## Bench — the ledger is the benchmark
|
|
160
160
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-maintainer
|
|
3
|
+
description: Second-stage reviewer judging whether code that has passed the first review is fit to merge. Checks fit with surrounding conventions, whether abstractions and guards are earned, whether names and errors will be understood without the author, and whether tests protect behaviour. Called at the second stage of independent editorial review in the antislop-code skill. Does not rewrite the source; returns only PASS or a REJECT list.
|
|
4
|
+
tools: Read, Grep, WebFetch, WebSearch
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the maintainer who will own this code in a year. Judge only whether the change is fit to merge — do not rewrite it.
|
|
9
|
+
|
|
10
|
+
The caller gives you the brief as the editorial contract (what the change is for, who maintains it, and any stated conventions or constraints), the evidence ledger (the repository's own conventions and any confirmed constraints), and the full source, already passed by the first reviewer, under `## Source`. If the brief or the conventions are missing, do not pretend to review — output one line, `NEEDS-HUMAN`, and list only what is missing.
|
|
11
|
+
|
|
12
|
+
What to check:
|
|
13
|
+
- Fit with the surrounding code: whether this reads as if the same person who wrote the neighbouring files wrote this too — same naming, same error handling, same structure — against the conventions in the brief and the evidence ledger
|
|
14
|
+
- Whether each abstraction (an interface, a base class, a factory, a configuration point) is earned by a second real caller, not built for a substitution that will never happen
|
|
15
|
+
- Whether each guard, check or try/except defends a state the code's actual inputs and call sites can reach, not a state nothing can produce
|
|
16
|
+
- Whether names and error messages will be understood by the stated maintainer without the author present — a role name (`Manager`, `Helper`) that says nothing about what it holds, a message that does not name what failed
|
|
17
|
+
- Whether the tests protect behaviour: assertions on return values or observable state, not on internal call counts or private-method invocation
|
|
18
|
+
- Whether the change is the smallest one that does the job, with no structure, flag or file introduced beyond what the requirement and the existing conventions call for
|
|
19
|
+
|
|
20
|
+
Output rules:
|
|
21
|
+
- If there is no defect that would block merging, output exactly one line, `PASS`, with no surrounding explanation.
|
|
22
|
+
- If there is a defect, write `REJECT` on the first line, then one line per item in the form `file:line | what | why it hurts the maintainer | what would fix it`. Fill in all four fields.
|
|
23
|
+
- You may end the list with up to three lines in the form `KEEP | <span> | <reason>` naming spans that must not be touched while fixing the rejected items.
|
|
24
|
+
- Do not rewrite the code, and do not impose a personal style preference as if it were the repository's convention.
|
|
25
|
+
- Do not invent a convention that is not in the brief or the evidence ledger and use it as grounds for rejection.
|
|
26
|
+
- Do not demand a change that conflicts with the evidence ledger. If the evidence itself looks doubtful (an unconfirmed constraint, a convention asserted with no example in the repository), name that in the reason for rejection.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: First-stage code reviewer. Judges catalogue slop markers, dead code, comment and defensive noise, naming and error handling in source bound for merging. Called at the first stage of independent editorial review in the antislop-code skill. Does not rewrite the source; returns only PASS or a REJECT list.
|
|
4
|
+
tools: Read, Grep, WebFetch, WebSearch
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a reviewer seeing this change for the first time. Judge defects only — do not rewrite the source.
|
|
9
|
+
|
|
10
|
+
The caller gives you the brief as the editorial contract (what the change is for, who maintains it, and any stated conventions or constraints), the evidence ledger (the repository's own conventions and any confirmed constraints), and the full source under `## Source` (each file numbered line by line). If the brief or the conventions are missing from these, do not pretend to review — output one line, `NEEDS-HUMAN`, and list only what is missing.
|
|
11
|
+
|
|
12
|
+
What to check:
|
|
13
|
+
- The catalogue markers in `references/catalogue.md` of the `antislop-code` skill: a strong marker (a swallowing catch, an interface or abstract class with one implementation, dead or commented-out code, a shipped TODO, invented "robust"/"enhanced" naming, a generic error message, a test asserting the implementation, a self-praising commit message) flagged alone; a weak marker (a comment restating the line, a single defensive guard, a `Manager`/`Helper`/`Utils`/`Handler`/`Service` name, a wrapper that only forwards, a configurable constant that never varies, type or annotation noise, an unused re-export) flagged only when two or more overlap in the same function or file
|
|
14
|
+
- Dead code: an unreachable branch, an unused parameter, an unused export, a block left commented out next to its replacement
|
|
15
|
+
- Comment noise: a comment that restates the code it sits above, rather than explaining a choice the code does not already show
|
|
16
|
+
- Defensive noise: a guard, a check or a try/except defending against a state nothing in the code's callers can produce
|
|
17
|
+
- Naming: identifiers that name a role (`Manager`, `Helper`, `Utils`) rather than what the thing holds or does
|
|
18
|
+
- Error handling that hides failure: an exception caught and silenced, a generic message with no operation named and no next step
|
|
19
|
+
- Tests that assert the implementation (a mock call count, an internal-method check) instead of a return value or observable state
|
|
20
|
+
|
|
21
|
+
Output rules:
|
|
22
|
+
- If there are no defects, output exactly one line, `PASS`, with no surrounding explanation.
|
|
23
|
+
- If there are defects, write `REJECT` on the first line, then one line per item in the form `file:line | what | why it hurts the maintainer | what would fix it`. Fill in all four fields.
|
|
24
|
+
- You may end the list with up to three lines in the form `KEEP | <span> | <reason>` naming spans that must not be touched while fixing the rejected items.
|
|
25
|
+
- Do not flag a difference that is purely a stylistic preference already consistent with the repository's own conventions. Do not flag a problem you cannot pin to a location and a maintenance effect.
|
|
26
|
+
- Do not flag a single weak marker alone; only flag it where two or more overlap in the same function or file.
|
|
27
|
+
- Do not add behaviour the evidence does not contain, and do not write replacement source.
|
|
28
|
+
- Do not treat a convention the brief or the evidence ledger states as the repository's own standard as a defect.
|
package/dist/core/check.js
CHANGED
|
@@ -76,6 +76,8 @@ async function runOne(root, scenario) {
|
|
|
76
76
|
const outcome = { id: scenario.id, type: scenario.check.type, status, exit: result.exit, ms: result.ms, tail: result.tail };
|
|
77
77
|
if (result.reason)
|
|
78
78
|
outcome.reason = result.reason;
|
|
79
|
+
if (result.usage)
|
|
80
|
+
outcome.usage = result.usage;
|
|
79
81
|
if (scenario.regression)
|
|
80
82
|
outcome.regression = true;
|
|
81
83
|
return outcome;
|
package/dist/core/check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/core/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAk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2
2
|
import path from 'node:path';
|
|
3
3
|
import { Ajv } from 'ajv';
|
|
4
4
|
import { formatOf, parseTable } from '../table.js';
|
|
5
|
+
import { a11yRule, traceableRule } from './fileRules.js';
|
|
5
6
|
function done(pass, started, tail, reason) {
|
|
6
7
|
const result = { pass, exit: pass ? 0 : 1, ms: Date.now() - started, tail };
|
|
7
8
|
if (reason)
|
|
@@ -118,6 +119,18 @@ export function fileCheck(check, root) {
|
|
|
118
119
|
if (failed)
|
|
119
120
|
return failed;
|
|
120
121
|
}
|
|
122
|
+
if (check.traceable !== undefined) {
|
|
123
|
+
const r = traceableRule(content, check.traceable, root);
|
|
124
|
+
if (typeof r === 'string')
|
|
125
|
+
return done(false, started, '', r);
|
|
126
|
+
if (r.length > 0)
|
|
127
|
+
return done(false, started, r.map((f) => `line ${f.line}: ${f.text}`).join('\n'), 'untraceable number');
|
|
128
|
+
}
|
|
129
|
+
if (check.a11y === true) {
|
|
130
|
+
const r = a11yRule(content, check.path);
|
|
131
|
+
if (r.length > 0)
|
|
132
|
+
return done(false, started, r.map((f) => `line ${f.line}: ${f.text}`).join('\n'), 'accessibility defect');
|
|
133
|
+
}
|
|
121
134
|
if (check.schema !== undefined) {
|
|
122
135
|
const failed = schemaRule(check.schema, content, root, started);
|
|
123
136
|
if (failed)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/core/checks/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../../src/core/checks/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,C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AI,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC9H,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAChE,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
const NUMBER = /(?<![\w.])(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?%?(?![\w.])/g;
|
|
4
|
+
function lineOf(content, index) {
|
|
5
|
+
return content.slice(0, index).split('\n').length;
|
|
6
|
+
}
|
|
7
|
+
/** Numbers as a reader sees them, with the fenced code left out and separators removed for comparison. */
|
|
8
|
+
function numbersIn(content, skipFences) {
|
|
9
|
+
const out = [];
|
|
10
|
+
let text = content;
|
|
11
|
+
if (skipFences)
|
|
12
|
+
text = content.replace(/```[\s\S]*?```/g, (m) => m.replace(/[^\n]/g, ' '));
|
|
13
|
+
for (const m of text.matchAll(NUMBER)) {
|
|
14
|
+
const raw = m[0];
|
|
15
|
+
const digits = raw.replace(/[^\d]/g, '');
|
|
16
|
+
if (digits.replace(/^0+/, '').length < 2)
|
|
17
|
+
continue; // one significant digit is a word, not a figure
|
|
18
|
+
out.push({ line: lineOf(text, m.index ?? 0), text: raw, key: raw.replace(/,/g, '').replace(/%$/, '') });
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
/** Every number in `content` must appear in the evidence file (commas and a percent sign do not count). */
|
|
23
|
+
export function traceableRule(content, evidenceFile, root) {
|
|
24
|
+
const full = path.resolve(root, evidenceFile);
|
|
25
|
+
if (!fs.existsSync(full))
|
|
26
|
+
return `evidence file missing: ${evidenceFile}`;
|
|
27
|
+
const present = new Set(numbersIn(fs.readFileSync(full, 'utf-8'), false).map((n) => n.key));
|
|
28
|
+
for (const token of fs.readFileSync(full, 'utf-8').split(/[^\d.]+/))
|
|
29
|
+
if (token)
|
|
30
|
+
present.add(token.replace(/\.$/, ''));
|
|
31
|
+
return numbersIn(content, true).filter((n) => !present.has(n.key)).slice(0, 3).map(({ line, text }) => ({ line, text }));
|
|
32
|
+
}
|
|
33
|
+
function luminance(hex) {
|
|
34
|
+
const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(hex.trim());
|
|
35
|
+
let rgb;
|
|
36
|
+
if (m) {
|
|
37
|
+
const h = m[1].length === 3 ? m[1].split('').map((c) => c + c).join('') : m[1];
|
|
38
|
+
rgb = [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16));
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const r = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(hex.trim());
|
|
42
|
+
if (!r)
|
|
43
|
+
return null;
|
|
44
|
+
rgb = [Number(r[1]), Number(r[2]), Number(r[3])];
|
|
45
|
+
}
|
|
46
|
+
const [r, g, b] = rgb.map((v) => {
|
|
47
|
+
const c = v / 255;
|
|
48
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
49
|
+
});
|
|
50
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
51
|
+
}
|
|
52
|
+
export function contrastRatio(fg, bg) {
|
|
53
|
+
const a = luminance(fg);
|
|
54
|
+
const b = luminance(bg);
|
|
55
|
+
if (a === null || b === null)
|
|
56
|
+
return null;
|
|
57
|
+
const [hi, lo] = a > b ? [a, b] : [b, a];
|
|
58
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
59
|
+
}
|
|
60
|
+
/** CSS rules that set both a text colour and a background: the pair must reach 4.5:1. */
|
|
61
|
+
function contrastFindings(css, offset, whole) {
|
|
62
|
+
const out = [];
|
|
63
|
+
const rule = /\{([^{}]*)\}/g;
|
|
64
|
+
for (const m of css.matchAll(rule)) {
|
|
65
|
+
const body = m[1] ?? '';
|
|
66
|
+
const fg = /(?:^|;|\s)color\s*:\s*([^;]+)/i.exec(body)?.[1];
|
|
67
|
+
const bg = /background(?:-color)?\s*:\s*([^;]+)/i.exec(body)?.[1];
|
|
68
|
+
if (!fg || !bg)
|
|
69
|
+
continue;
|
|
70
|
+
const ratio = contrastRatio(fg, bg.split(/\s+/)[0] ?? bg);
|
|
71
|
+
if (ratio !== null && ratio < 4.5)
|
|
72
|
+
out.push({ line: lineOf(whole, offset + (m.index ?? 0)), text: `contrast ${ratio.toFixed(2)}:1 for color ${fg.trim()} on ${bg.trim()}` });
|
|
73
|
+
}
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
const TAG = (name) => new RegExp(`<${name}\\b([^>]*)>`, 'gi');
|
|
77
|
+
function unnamed(html, tag) {
|
|
78
|
+
const out = [];
|
|
79
|
+
const re = new RegExp(`<${tag}\\b([^>]*)>([\\s\\S]*?)</${tag}>`, 'gi');
|
|
80
|
+
for (const m of html.matchAll(re)) {
|
|
81
|
+
const attrs = m[1] ?? '';
|
|
82
|
+
const text = (m[2] ?? '').replace(/<[^>]+>/g, '').trim();
|
|
83
|
+
if (!text && !/aria-label(?:ledby)?\s*=/i.test(attrs))
|
|
84
|
+
out.push({ line: lineOf(html, m.index ?? 0), text: `<${tag}> without text or aria-label` });
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
export function a11yRule(content, file) {
|
|
89
|
+
const out = [];
|
|
90
|
+
if (/\.css$/i.test(file))
|
|
91
|
+
return contrastFindings(content, 0, content);
|
|
92
|
+
for (const m of content.matchAll(TAG('img')))
|
|
93
|
+
if (!/\balt\s*=/i.test(m[1] ?? ''))
|
|
94
|
+
out.push({ line: lineOf(content, m.index ?? 0), text: '<img> without alt' });
|
|
95
|
+
let last = 0;
|
|
96
|
+
for (const m of content.matchAll(/<h([1-6])\b/gi)) {
|
|
97
|
+
const level = Number(m[1]);
|
|
98
|
+
if (last && level > last + 1)
|
|
99
|
+
out.push({ line: lineOf(content, m.index ?? 0), text: `heading skips from h${last} to h${level}` });
|
|
100
|
+
last = level;
|
|
101
|
+
}
|
|
102
|
+
out.push(...unnamed(content, 'button'), ...unnamed(content, 'a'));
|
|
103
|
+
const labelled = new Set([...content.matchAll(/<label\b[^>]*\bfor\s*=\s*["']([^"']+)["']/gi)].map((m) => m[1]));
|
|
104
|
+
for (const m of content.matchAll(/<(input|select|textarea)\b([^>]*)>/gi)) {
|
|
105
|
+
const attrs = m[2] ?? '';
|
|
106
|
+
if (/type\s*=\s*["']?(hidden|submit|button)/i.test(attrs))
|
|
107
|
+
continue;
|
|
108
|
+
const id = /\bid\s*=\s*["']([^"']+)["']/i.exec(attrs)?.[1];
|
|
109
|
+
if (!(id && labelled.has(id)) && !/aria-label(?:ledby)?\s*=/i.test(attrs))
|
|
110
|
+
out.push({ line: lineOf(content, m.index ?? 0), text: `<${m[1]}> without a label` });
|
|
111
|
+
}
|
|
112
|
+
for (const m of content.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi))
|
|
113
|
+
out.push(...contrastFindings(m[1] ?? '', (m.index ?? 0) + m[0].indexOf(m[1] ?? ''), content));
|
|
114
|
+
return out.sort((a, b) => a.line - b.line).slice(0, 3);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=fileRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileRules.js","sourceRoot":"","sources":["../../../src/core/checks/fileRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAA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
4
3
|
import { detectLang } from '../lang.js';
|
|
4
|
+
import { recordUsage } from '../ledger.js';
|
|
5
|
+
import { claudeArgs, codexArgs, hasCli, parseClaude, parseCodex, readerHome, REVIEWER_DRIVER, spawnReader } from '../readerSession.js';
|
|
6
|
+
import { ensureDir } from '../store.js';
|
|
5
7
|
import { packStages, TEXT_PACKS } from './packs.js';
|
|
6
8
|
import { collectSource } from './source.js';
|
|
7
9
|
import { tail } from './run.js';
|
|
8
10
|
const DEFAULT_TIMEOUT_MS = 600_000;
|
|
9
11
|
const MAX_SOURCE_CHARS = 400_000;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The reviewer: `VIBE_REVIEW_CMD` (a stateless text command — tests, custom clients), else the
|
|
14
|
+
* client CLI on PATH through the slim driver, `VIBE_REVIEW_CLIENT` forcing one. The model is the
|
|
15
|
+
* client's default: judgment keeps the strong model; only the project context is dropped.
|
|
16
|
+
*/
|
|
17
|
+
export function chooseReviewer() {
|
|
13
18
|
const custom = process.env['VIBE_REVIEW_CMD'];
|
|
14
19
|
if (custom)
|
|
15
|
-
return custom;
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
return 'claude -p
|
|
19
|
-
if (
|
|
20
|
-
return '
|
|
20
|
+
return { client: 'custom', label: custom, cmd: custom };
|
|
21
|
+
const forced = process.env['VIBE_REVIEW_CLIENT'];
|
|
22
|
+
if (forced === 'claude' || forced === 'codex')
|
|
23
|
+
return { client: forced, label: forced === 'claude' ? 'claude -p (slim)' : 'codex exec (slim)', cmd: forced };
|
|
24
|
+
if (hasCli('claude'))
|
|
25
|
+
return { client: 'claude', label: 'claude -p (slim)', cmd: 'claude' };
|
|
26
|
+
if (hasCli('codex'))
|
|
27
|
+
return { client: 'codex', label: 'codex exec (slim)', cmd: 'codex' };
|
|
21
28
|
return null;
|
|
22
29
|
}
|
|
30
|
+
/** Kept for callers that only want the command string. */
|
|
31
|
+
export function reviewerCommand() {
|
|
32
|
+
return chooseReviewer()?.label ?? null;
|
|
33
|
+
}
|
|
23
34
|
function readOptional(root, file) {
|
|
24
35
|
if (!file)
|
|
25
36
|
return '(not provided)';
|
|
26
37
|
const full = path.resolve(root, file);
|
|
27
38
|
return fs.existsSync(full) ? fs.readFileSync(full, 'utf-8') : `(missing file: ${file})`;
|
|
28
39
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
40
|
+
function message(contract, evidence, body, screenshot) {
|
|
41
|
+
return `## Editorial contract\n\n${contract.trim()}\n\n## Evidence ledger\n\n${evidence.trim()}${screenshot}\n\n${body}\n`;
|
|
31
42
|
}
|
|
32
43
|
/** A text pack judges a manuscript; every other pack judges source, one file or a directory of them. */
|
|
33
44
|
function artifact(check, root, pack) {
|
|
34
45
|
if (TEXT_PACKS.includes(pack)) {
|
|
35
46
|
return { section: 'Manuscript', body: fs.readFileSync(path.resolve(root, check.path), 'utf-8') };
|
|
36
47
|
}
|
|
37
|
-
const collected = collectSource(root, check.path, MAX_SOURCE_CHARS);
|
|
48
|
+
const collected = collectSource(root, check.path, MAX_SOURCE_CHARS, pack === 'code' ? 'code' : 'design');
|
|
38
49
|
return { section: 'Source', body: collected.text };
|
|
39
50
|
}
|
|
40
51
|
/** The pack: what the check names, else the text pack for `lang`, else the language of the text itself. */
|
|
@@ -46,29 +57,22 @@ function choosePack(check, root) {
|
|
|
46
57
|
const file = path.resolve(root, check.path);
|
|
47
58
|
return fs.statSync(file).isDirectory() ? null : detectLang(fs.readFileSync(file, 'utf-8'));
|
|
48
59
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
child.on('error', () => resolve({ reply, exit: null, killed }));
|
|
66
|
-
child.on('close', (code) => {
|
|
67
|
-
clearTimeout(timer);
|
|
68
|
-
resolve({ reply, exit: code, killed });
|
|
69
|
-
});
|
|
70
|
-
child.stdin.end(prompt);
|
|
71
|
-
});
|
|
60
|
+
/** One stage: the custom command gets instructions + message on stdin in the project; a client driver gets the instructions as its system prompt (Claude) or leading the message (Codex), in the neutral directory. */
|
|
61
|
+
async function askStage(choice, instructions, message, root, timeoutMs) {
|
|
62
|
+
if (choice.client === 'custom') {
|
|
63
|
+
const r = await spawnReader(choice.cmd, null, `${instructions.trim()}\n\n---\n\n${message}`, root, timeoutMs);
|
|
64
|
+
return { reply: r.out, usage: null, costUsd: null, model: null, exit: r.exit, killed: r.killed };
|
|
65
|
+
}
|
|
66
|
+
const cwd = readerHome();
|
|
67
|
+
ensureDir(cwd);
|
|
68
|
+
const claude = choice.client === 'claude';
|
|
69
|
+
const args = claude ? claudeArgs(instructions.trim(), null, REVIEWER_DRIVER) : codexArgs(null, REVIEWER_DRIVER);
|
|
70
|
+
const r = await spawnReader(choice.cmd, args, claude ? message : `${instructions.trim()}\n\n---\n\n${message}`, cwd, timeoutMs);
|
|
71
|
+
const parsed = claude ? parseClaude(r.out) : parseCodex(r.out);
|
|
72
|
+
return { ...parsed, exit: r.exit, killed: r.killed };
|
|
73
|
+
}
|
|
74
|
+
function usageLine(u) {
|
|
75
|
+
return u ? ` · in ${u.input.toLocaleString('en-US')} · cache read ${u.cacheRead.toLocaleString('en-US')} · out ${u.output.toLocaleString('en-US')}` : '';
|
|
72
76
|
}
|
|
73
77
|
/**
|
|
74
78
|
* `review` check — the harness itself runs the pack's reviewer stages in order and reads their
|
|
@@ -87,8 +91,8 @@ export async function reviewCheck(check, root) {
|
|
|
87
91
|
const stages = packStages(pack);
|
|
88
92
|
if (stages.length === 0)
|
|
89
93
|
return fail(`no reviewers/${pack} in this package`);
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
94
|
+
const choice = chooseReviewer();
|
|
95
|
+
if (!choice)
|
|
92
96
|
return fail('no reviewer available — needs `claude` or `codex` on PATH, or VIBE_REVIEW_CMD');
|
|
93
97
|
let piece;
|
|
94
98
|
try {
|
|
@@ -102,20 +106,23 @@ export async function reviewCheck(check, root) {
|
|
|
102
106
|
const shot = check.screenshot ? `\n\n## Screenshot\n\n${path.resolve(root, check.screenshot)} — open this image with your file reader before judging.` : '';
|
|
103
107
|
const timeoutMs = check.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
104
108
|
const lines = [];
|
|
109
|
+
const usage = [];
|
|
105
110
|
for (const stage of stages) {
|
|
106
111
|
const instructions = fs.readFileSync(stage.file, 'utf-8');
|
|
107
|
-
const
|
|
108
|
-
|
|
112
|
+
const r = await askStage(choice, instructions, message(contract, evidence, `## ${piece.section}\n\n${piece.body}`, shot), root, timeoutMs);
|
|
113
|
+
if (r.usage)
|
|
114
|
+
usage.push({ stage: stage.name, ...r.usage });
|
|
115
|
+
recordUsage(root, { detail: `review ${pack}/${stage.name}`, client: choice.client, model: r.model, tokens: r.usage, costUsd: r.costUsd, ms: Date.now() - started });
|
|
109
116
|
if (r.killed)
|
|
110
117
|
return fail(`${stage.name}: killed after ${timeoutMs}ms`, lines.join('\n'));
|
|
111
118
|
const verdict = r.reply.trim();
|
|
112
119
|
if (verdict === 'PASS') {
|
|
113
|
-
lines.push(`${pack} ${stage.name}: PASS`);
|
|
120
|
+
lines.push(`${pack} ${stage.name}: PASS${usageLine(r.usage)}`);
|
|
114
121
|
continue;
|
|
115
122
|
}
|
|
116
|
-
lines.push(`${pack} ${stage.name}: ${verdict === '' ? `no reply (exit ${r.exit})` : 'not PASS'}`, verdict);
|
|
117
|
-
return fail(`${stage.name} did not pass`, lines.join('\n'));
|
|
123
|
+
lines.push(`${pack} ${stage.name}: ${verdict === '' ? `no reply (exit ${r.exit})` : 'not PASS'}${usageLine(r.usage)}`, verdict);
|
|
124
|
+
return { ...fail(`${stage.name} did not pass`, lines.join('\n')), usage };
|
|
118
125
|
}
|
|
119
|
-
return { pass: true, exit: 0, ms: Date.now() - started, tail: lines.join('\n') };
|
|
126
|
+
return { pass: true, exit: 0, ms: Date.now() - started, tail: lines.join('\n'), usage };
|
|
120
127
|
}
|
|
121
128
|
//# sourceMappingURL=review.js.map
|