vibeqm-check 0.4.4 → 0.4.7

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.
@@ -1,4 +1,4 @@
1
- import { agentPrompt, fixFor } from "./fixes.js";
1
+ import { agentPrompt, fixOrder, NEEDS_LABEL, REUSE } from "./fixes.js";
2
2
  import { homedir } from "node:os";
3
3
  import { basename } from "node:path";
4
4
  import { FRAMEWORK_VERSION } from "./types.js";
@@ -8,7 +8,7 @@ export const showPath = (s) => {
8
8
  const home = homedir();
9
9
  return s === home || s.startsWith(`${home}/`) || s.startsWith(`${home}\\`) ? `~${s.slice(home.length)}` : s;
10
10
  };
11
- const label = (r) => r.status === "met" ? (r.attested ? "Met (attested)" : "Met") : r.status === "not-met" ? "Not met" : "Not visible";
11
+ export const label = (r) => r.status === "met" ? (r.attested ? "Met (attested)" : "Met") : r.status === "not-met" ? "Not met" : r.status === "in-place" ? "In place" : "Not visible";
12
12
  /** Highest level whose checks, and all lower levels' checks, are met (staged rule). */
13
13
  export function levelReached(results) {
14
14
  let level = 1;
@@ -21,40 +21,126 @@ export function levelReached(results) {
21
21
  return level;
22
22
  }
23
23
  const cell = (s) => s.replace(/\|/g, "\\|");
24
- const LEVELS = {
25
- 1: { name: "Unguided", what: "code is prompted, accepted and shipped when it runs" },
26
- 2: { name: "Guarded", what: "every project has the professional basics (written requirements, a rules file, version control, a peer review and automated checks on every change, a security review before every push, development kept apart from production, limited agent permissions, and a human owner for every change)" },
27
- 3: { name: "Standardized", what: "there is one standard across all projects, enforced by hooks, checks and permissions and audited, with traceable requirements, three environments, current dependencies, release and incident practices, and a record of which model wrote each change" },
28
- 4: { name: "Measured", what: "quality and delivery are measured against limits, and the AI's right to merge stops automatically when a limit is crossed" },
29
- 5: { name: "Self-Improving", what: "every escaped defect becomes a rule or check that makes it impossible to repeat" },
24
+ /** Each level: its name, what it means, and the autonomy it earns (VQM_SPEC §3), said
25
+ * with every result so the person knows what finishing buys. */
26
+ export const LEVELS = {
27
+ 1: { name: "Unguided", what: "code is prompted, accepted and shipped when it runs", earns: "nothing yet: everything the AI writes is a draft a person reads before it lands" },
28
+ 2: {
29
+ name: "Guarded",
30
+ what: "every project has the professional basics (written requirements, a rules file, version control, a peer review and automated checks on every change, a security review before every push, development kept apart from production, limited agent permissions, and a human owner for every change)",
31
+ earns: "you approve every change after the checks and a review, instead of reading every line yourself; the AI keeps working on its own branch, and a bad change now meets a gate that can refuse it",
32
+ },
33
+ 3: {
34
+ name: "Standardized",
35
+ what: "there is one standard across all projects, enforced by hooks, checks and permissions and audited, with traceable requirements, three environments, current dependencies, release and incident practices, and a record of which model wrote each change",
36
+ earns: "the AI takes a task from an issue to a finished pull request on its own; a person approves every merge",
37
+ },
38
+ 4: { name: "Measured", what: "quality and delivery are measured against limits, and the AI's right to merge stops automatically when a limit is crossed", earns: "the AI merges low-risk changes itself, after the checks and an AI peer review, while the numbers stay within their limits" },
39
+ 5: { name: "Self-Improving", what: "every escaped defect becomes a rule or check that makes it impossible to repeat", earns: "the AI merges low- and standard-risk changes under a written performance agreement, with an AI peer and a kill switch" },
30
40
  };
31
- function parts(results) {
41
+ /** What the person is asked for, per gate, when the fix needs an answer from them. */
42
+ const ASKS = {
43
+ "Development apart from production": "what is live",
44
+ "Requirements first": "the requirements to confirm",
45
+ "Peer review on every change": "the review route",
46
+ "Version control + merge path": "branch protection on the host",
47
+ };
48
+ export function parts(results) {
32
49
  const reached = levelReached(results);
33
50
  const next = reached + 1;
34
- const open = results.filter((r) => r.status !== "met" && r.level === next);
35
- const minutes = open.reduce((n, r) => n + (fixFor(r)?.minutes ?? 0), 0);
36
- return { reached, next, open, minutes };
51
+ const at = results.filter((r) => r.level === next);
52
+ const met = at.filter((r) => r.status === "met");
53
+ const open = fixOrder(at.filter((r) => r.status !== "met"));
54
+ // The split counts what is still to do; a gate in place is already set up and waits for use.
55
+ const todo = open.filter((x) => x.r.status !== "in-place");
56
+ const by = (n) => todo.filter((x) => x.f.needs === n);
57
+ return {
58
+ reached,
59
+ next,
60
+ at,
61
+ met,
62
+ open,
63
+ inPlace: at.filter((r) => r.status === "in-place"),
64
+ minutes: open.reduce((n, x) => n + x.f.minutes, 0),
65
+ agent: by("agent"),
66
+ answers: by("answer"),
67
+ host: by("host"),
68
+ use: by("use"),
69
+ };
37
70
  }
38
- /** The answer first: the level, and what the next one takes, in a few sentences. */
39
- /** Said on every report: what the tool touches and where data goes. */
40
- export const PRIVACY = "Read-only and private: vibeqm-check changes no existing file in the repository (the only file it ever writes is a report you ask for, with --out) and sends nothing to us (no account, no telemetry). If the GitHub CLI is logged in, it asks GitHub, with your own login, for this repository's CI runs and pull requests; --offline turns that off.";
41
- export function summary(repo, results, date) {
42
- const { reached, next, open, minutes } = parts(results);
43
- const now = LEVELS[reached];
44
- // The folder name, not the absolute path: a saved or shared report shouldn't carry
45
- // the person's account name (the terminal screen does the same).
46
- const out = [`# VibeQM self-assessment: ${basename(repo) || repo}, ${date}`, "", `_${PRIVACY}_`, "", `**You are on Level ${reached}, ${now.name}.**`];
47
- if (open.length) {
48
- const n = open.length;
49
- out.push(`You have met ${results.filter((r) => r.level === next && r.status === "met").length} of the ${results.filter((r) => r.level === next).length} Level ${next} items; meet ${n} more to reach Level ${next}, ${LEVELS[next].name}, where ${LEVELS[next].what}.`, `That is about ${minutes} minutes of work, most of which an AI coding agent can do.`);
71
+ /** What the fact checks cover, said with every result so a level is not read as more than it is. */
72
+ export const COVERAGE = "This tool runs the fact checks of the 13 Level 2 gates (the README and the formatter configuration the specification also lists at Level 2 are not checked) and lists every Level 3 gate, checking about half of them from the repository (the rest need proof a person attaches); Levels 4 and 5 are not checked. The judgment questions, a second model and a countersignature are the rest of an assessment.";
73
+ export const PRIVACY = "Read-only and private: this check changes no file in the repository (the tool writes only what you ask for: a report with --out, or the starter files that init lists and you confirm) and sends nothing to us (no account, no telemetry). If the GitHub CLI is logged in, it asks GitHub, with your own login, for this repository's CI runs, pull requests and branch rules; --offline turns that off.";
74
+ /** The claim a scorecard carries (VQM_SPEC §13), with the progress profile at every level. */
75
+ export function claim(results, date) {
76
+ const { reached, next, at, open, inPlace } = parts(results);
77
+ const counting = inPlace.map((r) => (r.progress ? `${r.gate.toLowerCase()} in place, ${r.progress.done} of ${r.progress.needed} ${r.progress.unit}` : `${r.gate.toLowerCase()} in place`));
78
+ const profile = at.length && open.length ? `; Level ${next}: ${open.length} of ${at.length} items open${counting.length ? `, ${counting.join(", ")}` : ""}` : "";
79
+ return `VibeQM v${FRAMEWORK_VERSION} self-assessed: Level ${reached}, ${date}, vibeqm-check (fact checks only)${profile}`;
80
+ }
81
+ const plural = (n, s) => `${n} ${s}${n === 1 ? "" : "s"}`;
82
+ /** The answer first, in the order a person needs it: how far the next level is, what is
83
+ * already there, who does the rest, what today's level is and what the next one earns.
84
+ * Every sentence is computed from the run; nothing is canned praise. `headline` is the
85
+ * line to show in bold; `lines` follow it; `cta` is the one thing to do now. */
86
+ export function lead(results, cta) {
87
+ const p = parts(results);
88
+ const now = LEVELS[p.reached];
89
+ const up = LEVELS[p.next];
90
+ const lines = [];
91
+ if (!p.at.length) {
92
+ return { headline: `You are on Level ${p.reached}, ${now.name}.`, lines: [`This version of the tool checks up to Level ${p.reached}; Levels above need measurements over time.`] };
50
93
  }
51
- else if (results.some((r) => r.level === next)) {
52
- out.push(`Every Level ${next} check this tool runs is met.`);
94
+ if (!p.open.length) {
95
+ return {
96
+ headline: `Every Level ${p.next} fact check this tool runs is met.`,
97
+ lines: [
98
+ `To put Level ${p.next} on your scorecard: answer the judgment questions (the VibeQM plugin's judgment skill, or vibeqm.com/assessor, section 2), then write the claim below with your name as the assessor. Level ${p.next} earns: ${up.earns}.`,
99
+ ],
100
+ };
53
101
  }
54
- else {
55
- out.push(`This version of the tool checks up to Level ${reached}; Levels above need measurements over time.`);
102
+ const waiting = p.open.filter((x) => x.r.status === "in-place");
103
+ const todo = p.open.filter((x) => x.r.status !== "in-place");
104
+ const nearly = todo.length <= 3 || p.met.length >= (p.at.length * 2) / 3;
105
+ const countdown = waiting.map(({ r }) => (r.progress ? `${r.gate.toLowerCase()} counts after ${r.progress.needed} ${r.progress.unit} (${r.progress.done} so far)` : `${r.gate.toLowerCase()} counts with use`));
106
+ const headline = !todo.length
107
+ ? `Level ${p.next} is in place: ${p.met.length} of ${p.at.length} met, and ${countdown.join("; ")}.`
108
+ : `${nearly ? "Nearly there: " : ""}Level ${p.next}, ${up.name}, is ${plural(todo.length, "item")} away${waiting.length ? `, plus ${plural(waiting.length, "gate")} that count${waiting.length === 1 ? "s" : ""} with use` : ""}.`;
109
+ if (p.met.length) {
110
+ const names = p.met.map((r) => r.gate);
111
+ lines.push(`Already met, ${p.met.length} of ${p.at.length}: ${names.slice(0, 6).join(", ")}${names.length > 6 ? ` and ${names.length - 6} more` : ""}.`);
56
112
  }
57
- return out.join("\n");
113
+ if (todo.length) {
114
+ const split = [];
115
+ const agentMinutes = p.agent.reduce((n, x) => n + x.f.minutes, 0);
116
+ const confirms = p.agent.filter((x) => x.f.confirm).length;
117
+ if (p.agent.length)
118
+ split.push(`your AI agent can do ${p.agent.length === todo.length ? (todo.length === 1 ? "it" : "all of them") : `${p.agent.length} of them`} now${confirms ? `, asking you to confirm ${confirms === 1 ? "one record" : `${confirms} records`} as it goes` : ""} (about ${agentMinutes} minutes)`);
119
+ const asks = p.answers.map(({ r }) => ASKS[r.gate] ?? r.gate.toLowerCase());
120
+ if (p.answers.length)
121
+ split.push(`${p.answers.length} need${p.answers.length === 1 ? "s" : ""} an answer from you (${asks.join(", ")})`);
122
+ if (p.host.length)
123
+ split.push(`${p.host.length} ${p.host.length === 1 ? "is" : "are"} a setting on the code host (${p.host.map(({ r }) => ASKS[r.gate] ?? r.gate.toLowerCase()).join(", ")})`);
124
+ if (p.use.length)
125
+ split.push(`${p.use.length} count${p.use.length === 1 ? "s" : ""} with use (${p.use.map(({ r }) => r.gate.toLowerCase()).join(", ")})`);
126
+ const sentence = split.join("; ");
127
+ // Peer review not set up yet still ends in the 20-change count: say so now, not at push 1.
128
+ const review = todo.find(({ r }) => r.gate === "Peer review on every change");
129
+ const ahead = review ? ` Then peer review counts over your next 20 reviewed changes: Level ${p.next} is met on the 20th, not in this session.` : "";
130
+ lines.push(`${sentence.charAt(0).toUpperCase()}${sentence.slice(1)}${split.length ? "." : ""}${waiting.length ? ` Then ${countdown.join("; ")}.` : ahead}`);
131
+ }
132
+ lines.push(`Today's level: ${p.reached}, ${now.name}. Level ${p.next} earns: ${up.earns}.`);
133
+ // No rules file at all: init comes before the list, and the call to action says so.
134
+ const bare = p.open.some(({ r }) => r.gate === "Agent rules file" && /^none of/.test(r.evidence));
135
+ lines.push(bare ? `First: \`npx vibeqm-check init\` creates the starter files (it shows the list and asks). ${cta}` : cta);
136
+ return { headline, lines };
137
+ }
138
+ export const CTA_REPORT = 'Start: say "do it" to the agent that ran this, or paste the prompt at the end of this report into Claude Code, Codex or another agent working in this repository. The agent does everything it can alone, then asks you everything in one message, and shows you each change before it commits.';
139
+ export function summary(repo, results, date) {
140
+ // The folder name, not the absolute path: a saved or shared report shouldn't carry
141
+ // the person's account name (the terminal screen does the same).
142
+ const { headline, lines } = lead(results, CTA_REPORT);
143
+ return [`# VibeQM self-assessment: ${basename(repo) || repo}, ${date}`, "", `_${PRIVACY}_`, "", `**${headline}**`, ...lines.map((l) => `\n${l}`), "", `_Claim: ${claim(results, date)}._`].join("\n");
58
144
  }
59
145
  /** The results of the scan, for the person. */
60
146
  export function details(results, proofFile = null) {
@@ -62,20 +148,21 @@ export function details(results, proofFile = null) {
62
148
  const attested = results.filter((r) => r.attested).length;
63
149
  const out = [
64
150
  `vibeqm-check against VibeQM v${FRAMEWORK_VERSION} (fact checks; a full VibeQM assessment adds the judgment questions, a second model from a`,
65
- `different company, and a person's countersignature). ${proofFile ? `Proof file: ${proofFile} (${attested} gate(s) attested).` : "No proof file."}`,
151
+ `different company, and a person's countersignature). ${proofFile ? `Proof file: ${showPath(proofFile)} (${attested} gate(s) attested).` : "No proof file."}`,
152
+ "",
153
+ `_${COVERAGE}_`,
66
154
  "",
67
155
  ];
68
156
  if (open.length) {
69
157
  out.push(`## What it takes to reach Level ${next}`, "");
70
- for (const r of open) {
71
- const f = fixFor(r);
72
- out.push(`### ${r.gate}: ${label(r)}${f ? ` (~${f.minutes} min)` : ""}`, "", `Found: ${r.evidence}`, "");
73
- if (f) {
74
- out.push(`Why: ${f.why}`, "", ...f.steps.map((s) => `- ${s}`), "", `Verify: ${f.verify}`, "");
75
- }
158
+ for (const { r, f } of open) {
159
+ out.push(`### ${r.gate}: ${label(r)} (~${f.minutes} min; ${NEEDS_LABEL[f.needs]})`, "", `Found: ${showPath(r.evidence)}`, "");
160
+ out.push(`Why: ${f.why}`, "", ...f.steps.map((s) => `- ${s}`), "", `Verify: ${f.verify}`, "");
76
161
  }
162
+ if (open.length >= 5)
163
+ out.push(`_${REUSE}_`, "");
77
164
  }
78
- out.push("## All checks", "", "| Level | Gate | Status | Evidence |", "|---|---|---|---|", ...results.map((r) => `| ${r.level} | ${r.gate} | ${label(r)} | ${cell(showPath(r.evidence))} |`), "", '"Not visible" counts as not met until a person attaches real proof. A proof never overrides "Not met".');
165
+ out.push("## All checks", "", "| Level | Gate | Status | Evidence |", "|---|---|---|---|", ...results.map((r) => `| ${r.level} | ${r.gate} | ${label(r)} | ${cell(showPath(r.evidence))} |`), "", '"Not visible" counts as not met until a person attaches real proof; "In place" is set up and counts with use. A proof never overrides "Not met".');
79
166
  return out.join("\n");
80
167
  }
81
168
  /** The prompt an AI coding agent can follow to reach the next level; empty when nothing is open. */
@@ -89,15 +176,16 @@ export function aiPrompt(results) {
89
176
  "Paste this into Claude Code, Codex or another agent working in this repository (or just say \"do it\" if the agent ran this report):",
90
177
  "",
91
178
  "```text",
92
- agentPrompt(open, next),
179
+ agentPrompt(open.map((x) => x.r), next),
93
180
  "```",
94
181
  ].join("\n");
95
182
  }
96
183
  /** The whole report in one piece, for agents, pipes and CI: summary, details, then the prompt. */
97
184
  export function markdown(repo, results, date, proofFile = null) {
98
185
  const note = [
99
- "> **AI agent reading this:** the prompt at the end of this report fixes the open gaps. Offer to run it,",
100
- "> then rerun `vibeqm-check`. Produce real evidence; never edit results or invent proof.",
186
+ "> **AI agent reading this:** the prompt at the end of this report fixes the open gaps. Offer to run it, then",
187
+ "> rerun `vibeqm-check`. Do every item you can alone first, then ask the person for the rest in one message.",
188
+ "> Produce real evidence; never edit results or invent proof.",
101
189
  ].join("\n");
102
190
  return [summary(repo, results, date), note, details(results, proofFile), aiPrompt(results)].filter(Boolean).join("\n\n") + "\n";
103
191
  }
@@ -1,9 +1,9 @@
1
1
  // A scan laid out for a person at a terminal, in two screens: first the answer
2
- // (the summary and a scorecard per level), then on request a numbered to-do list
2
+ // (the lead and a scorecard per level), then on request a numbered to-do list
3
3
  // for the next level. Agents, pipes and CI get the Markdown report instead (report.ts).
4
- import { fixOrder } from "./fixes.js";
4
+ import { NEEDS_LABEL, REUSE } from "./fixes.js";
5
5
  import { basename } from "node:path";
6
- import { levelReached, PRIVACY, showPath } from "./report.js";
6
+ import { claim, COVERAGE, lead, levelReached, parts, PRIVACY, showPath } from "./report.js";
7
7
  import { FRAMEWORK_VERSION } from "./types.js";
8
8
  const LEVEL_NAMES = { 1: "Unguided", 2: "Guarded", 3: "Standardized", 4: "Measured", 5: "Self-Improving" };
9
9
  function paint(style) {
@@ -42,8 +42,8 @@ function clip(s, max) {
42
42
  if (s.length <= max)
43
43
  return s;
44
44
  const cut = s.slice(0, max - 1);
45
- // Cut at a word boundary when one is close enough to keep; never mid-word by default.
46
- const space = cut.lastIndexOf(" ");
45
+ // Cut at a word or path boundary when one is close enough to keep; never mid-word by default.
46
+ const space = Math.max(cut.lastIndexOf(" "), cut.lastIndexOf("/"));
47
47
  return `${(space > max * 0.6 ? cut.slice(0, space) : cut).trimEnd()}…`;
48
48
  }
49
49
  /** The evidence is prose written for the report; the scorecard wants its first sentence. */
@@ -57,34 +57,25 @@ function briefEvidence(r, max) {
57
57
  return clip(`${r.attested ? "attested · " : ""}${showPath(firstSentence(r.evidence))}`, max);
58
58
  }
59
59
  const widthOf = (style) => Math.max(40, Math.min(style.width, 110));
60
- const markOf = (p) => (r) => r.status === "met" ? p.green("✓") : r.status === "not-met" ? p.red("✗") : p.yellow("○");
61
- /** Screen one: the answer first — level, gap, minutes — then the scorecard. The full
62
- * privacy note stays in the footer (terminalDetails), so screen one spends its lines
63
- * on the user's own results; the one dim line keeps the promise visible up front. */
60
+ const markOf = (p) => (r) => r.status === "met" ? p.green("✓") : r.status === "not-met" ? p.red("✗") : r.status === "in-place" ? p.cyan("◐") : p.yellow("○");
61
+ export const CTA_TERMINAL = 'Start: in Claude Code, Codex or another agent, say "run vibeqm-check and do what it says: everything you can alone first, then ask me everything in one message, and show me each change before you commit". Or press Enter for the list and the prompt to paste.';
62
+ /** Screen one: the answer first — how far the next level is, who does what, what it
63
+ * earns — then the scorecard. The full privacy note stays in the footer (terminalDetails),
64
+ * so screen one spends its lines on the person's own results; the one dim line keeps the
65
+ * promise visible up front. */
64
66
  export function terminalSummary(repo, results, date, style) {
65
67
  const p = paint(style);
66
68
  const width = widthOf(style);
67
- const reached = levelReached(results);
68
- const next = reached + 1;
69
- const at = results.filter((r) => r.level === next);
70
- const met = at.filter((r) => r.status === "met").length;
71
- const open = fixOrder(at.filter((r) => r.status !== "met"));
72
- const minutes = open.reduce((n, x) => n + x.f.minutes, 0);
73
69
  const name = basename(repo) || repo;
74
70
  const out = [];
75
71
  out.push(p.bold(`VibeQM self-assessment: ${name}, ${date}`));
76
72
  out.push(p.dim("Read-only and private · no account, no telemetry · the full note is at the end of the report"));
77
73
  out.push("");
78
- out.push(p.bold(`You are on Level ${reached}, ${LEVEL_NAMES[reached] ?? ""}.`));
79
- if (open.length) {
80
- out.push(...wrap(`${met} of the ${at.length} Level ${next} items met — ${open.length} more, about ${minutes} minutes, to reach Level ${next}, ${LEVEL_NAMES[next] ?? ""}. Most of it an AI coding agent can do.`, width, "", ""));
81
- }
82
- else if (at.length) {
83
- out.push(`Every Level ${next} check this tool runs is met.`);
84
- }
85
- else {
86
- out.push(`This version of the tool checks up to Level ${reached}; Levels above need measurements over time.`);
87
- }
74
+ const { headline, lines } = lead(results, CTA_TERMINAL);
75
+ out.push(...wrap(headline, width, "", "").map((l) => p.bold(l)));
76
+ for (const line of lines)
77
+ out.push(...wrap(plain(line, p), width, "", ""));
78
+ out.push(p.dim(`Claim: ${claim(results, date)}.`));
88
79
  out.push("", scorecard(results, style));
89
80
  return out.join("\n");
90
81
  }
@@ -120,25 +111,25 @@ function scorecard(results, style) {
120
111
  }
121
112
  out.push("");
122
113
  }
123
- out.push(p.dim(`${p.green("✓")} met ${p.red("✗")} not met ${p.yellow("○")} not visible: counts as not met until a person attaches proof attested · = met by a person's proof`));
114
+ out.push(p.dim(wrap(`${p.green("✓")} met · ${p.red("✗")} not met · ${p.cyan("◐")} in place: set up, counts with use · ${p.yellow("○")} not visible: not met until you attach proof · "attested" before the evidence: met by your proof`, width, "", "").join("\n")));
124
115
  return out.join("\n");
125
116
  }
126
117
  /** Screen two: the to-do list for the next level, then the footer. */
127
118
  export function terminalDetails(results, proofFile, style) {
128
119
  const p = paint(style);
129
120
  const width = widthOf(style);
130
- const next = levelReached(results) + 1;
121
+ const { next, open, minutes } = parts(results);
131
122
  const mark = markOf(p);
132
- const word = (r) => r.status === "met" ? (r.attested ? "met, attested" : "met") : r.status === "not-met" ? "not met" : "not visible";
123
+ const word = (r) => r.status === "met" ? (r.attested ? "met, attested" : "met") : r.status === "not-met" ? "not met" : r.status === "in-place" ? "in place" : "not visible";
133
124
  const out = [];
134
125
  // The to-do list for the next level, cheapest first (the AI prompt's order).
135
- const open = fixOrder(results.filter((r) => r.level === next && r.status !== "met"));
136
126
  if (open.length) {
137
- const minutes = open.reduce((n, x) => n + x.f.minutes, 0);
138
- out.push(p.bold(`TO REACH LEVEL ${next}: ${open.length} item${open.length === 1 ? "" : "s"}, about ${minutes} minutes`), "");
127
+ const review = open.find(({ r }) => r.gate === "Peer review on every change");
128
+ const wait = review ? (review.r.progress ? `; then ${review.r.progress.needed - review.r.progress.done} more reviewed changes` : "; then 20 reviewed changes") : "";
129
+ out.push(p.bold(`TO REACH LEVEL ${next}: ${open.length} item${open.length === 1 ? "" : "s"}, about ${minutes} minutes of setup${wait}`), "");
139
130
  open.forEach(({ r, f }, i) => {
140
131
  const n = `${i + 1}.`.padEnd(4);
141
- out.push(`${n}${mark(r)} ${p.bold(r.gate)} ${p.dim(`${word(r)}${` · ~${f.minutes} min`}`)}`);
132
+ out.push(`${n}${mark(r)} ${p.bold(r.gate)} ${p.dim(`${word(r)} · ~${f.minutes} min · ${NEEDS_LABEL[f.needs]}`)}`);
142
133
  const pad = " ";
143
134
  out.push(...wrap(plain(showPath(r.evidence), p), width, `${pad}${p.dim("Found:")} `, `${pad} `));
144
135
  out.push(...wrap(plain(f.why, p), width, `${pad}${p.dim("Why:")} `, `${pad} `));
@@ -148,7 +139,9 @@ export function terminalDetails(results, proofFile, style) {
148
139
  out.push(...wrap(plain(f.verify, p), width, `${pad}${p.dim("Check:")} `, `${pad} `));
149
140
  out.push("");
150
141
  });
142
+ if (open.length >= 5)
143
+ out.push(...wrap(REUSE, width, "", ""), "");
151
144
  }
152
- out.push(p.dim(wrap(`Fact checks against VibeQM v${FRAMEWORK_VERSION}. A formal VibeQM assessment adds judgment by two AI models from different companies and a person's countersignature. ${proofFile ? `Proof: ${proofFile}.` : "No proof file."} ${PRIVACY}`, width, "", "").join("\n")));
145
+ out.push(p.dim(wrap(`Fact checks against VibeQM v${FRAMEWORK_VERSION}. A formal VibeQM assessment adds judgment by two AI models from different companies and a person's countersignature. ${proofFile ? `Proof: ${showPath(proofFile)}.` : "No proof file."} ${COVERAGE} ${PRIVACY}`, width, "", "").join("\n")));
153
146
  return out.join("\n");
154
147
  }
package/dist/src/types.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The VibeQM framework version these checks follow; a claim names it (VQM_SPEC §13). */
2
- export const FRAMEWORK_VERSION = "0.4.4";
2
+ export const FRAMEWORK_VERSION = "0.4.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeqm-check",
3
- "version": "0.4.4",
3
+ "version": "0.4.7",
4
4
  "description": "Self-assessment for the Vibe Quality Model (VibeQM): fact checks on a repository, with evidence for every gate",
5
5
  "keywords": [
6
6
  "vibe-quality-model",
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+ # VibeQM Level 2: a blocking check before every commit (Checks before merge).
3
+ # Enable it once per clone: git config core.hooksPath .githooks
4
+ # It exits non-zero on failure, so a bad change is refused. Keep it fast; CI runs
5
+ # the full set. `git commit --no-verify` is denied in .claude/settings.json.
6
+ set -e
7
+ <the command that runs this project's tests and linter>
@@ -12,6 +12,8 @@ Copilot all read AGENTS.md. -->
12
12
  - Tests, linter, static analysis: <command>
13
13
  - Security checks: <command>
14
14
  - A task is done only when <command> passes.
15
+ - A blocking pre-commit hook (.githooks/pre-commit) runs the checks; enable it once
16
+ per clone with `git config core.hooksPath .githooks`.
15
17
 
16
18
  ## Where things are
17
19
  - Code: <folder>. Tests: <folder>.
@@ -6,6 +6,8 @@ One row per change; IDs are never reused.
6
6
  | ID | Date | Standard item | Change | Reason | Approved by |
7
7
  |:--|:--|:--|:--|:--|:--|
8
8
 
9
- <!-- Example, for a solo project with no one to open pull requests to:
10
- | TLR-001 | <date> | Changes reach the main branch through pull requests | Changes reach the main branch by push, after the push review passes and the blocking pre-push hook runs | One person works on this project | <name> |
9
+ <!-- For a one-person project, with nobody to open pull requests to, the accepted
10
+ equivalent is a committed blocking hook plus a deny rule on --no-verify, recorded here.
11
+ Fill the date and the name, and move the row above this comment:
12
+ | TLR-001 | <date> | Changes reach the main branch through pull requests | Changes reach the main branch by push, behind the committed blocking pre-commit hook (.githooks/pre-commit); `git commit --no-verify` is denied in .claude/settings.json | One person works on this project | <name> |
11
13
  -->