@tanziro/plumbline 0.0.0-stage → 1.1.0

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.
Files changed (39) hide show
  1. package/LICENSE +22 -0
  2. package/bin/plumbline.js +3 -0
  3. package/dist/chunk-MSN3I3NJ.js +291 -0
  4. package/dist/chunk-MSN3I3NJ.js.map +1 -0
  5. package/dist/index.js +906 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib.d.ts +81 -0
  8. package/dist/lib.js +29 -0
  9. package/dist/lib.js.map +1 -0
  10. package/dist/mcp-BZD3N7NR.js +106 -0
  11. package/dist/mcp-BZD3N7NR.js.map +1 -0
  12. package/lenses/L01-regressions.md +33 -0
  13. package/lenses/L02-boundaries-and-cycles.md +32 -0
  14. package/lenses/L03-pattern-deviations.md +32 -0
  15. package/lenses/L04-distributed-systems.md +33 -0
  16. package/lenses/L05-migrations.md +33 -0
  17. package/lenses/L06-api-contracts.md +32 -0
  18. package/lenses/L07-agent-pr-hygiene.md +33 -0
  19. package/lenses/L08-operability-and-cost.md +33 -0
  20. package/package.json +43 -3
  21. package/skill/SKILL.md +156 -0
  22. package/skill/lenses/L01-regressions.md +33 -0
  23. package/skill/lenses/L02-boundaries-and-cycles.md +32 -0
  24. package/skill/lenses/L03-pattern-deviations.md +32 -0
  25. package/skill/lenses/L04-distributed-systems.md +33 -0
  26. package/skill/lenses/L05-migrations.md +33 -0
  27. package/skill/lenses/L06-api-contracts.md +32 -0
  28. package/skill/lenses/L07-agent-pr-hygiene.md +33 -0
  29. package/skill/lenses/L08-operability-and-cost.md +33 -0
  30. package/skill/references/architecture-brief.md +82 -0
  31. package/skill/references/compare.md +59 -0
  32. package/skill/references/contract.md +49 -0
  33. package/skill/references/findings.md +51 -0
  34. package/skill/references/hygiene-brief.md +72 -0
  35. package/skill/references/init.md +19 -0
  36. package/skill/references/proof.md +40 -0
  37. package/skill/references/reviewer-brief.md +121 -0
  38. package/skill/scripts/plumbline.mjs +51 -0
  39. package/README.md +0 -3
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mohamed Ashref Ben Abdallah
4
+ Copyright (c) 2026 Tanzir (tanziro.com)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ // A stable entry point, so pnpm can link the command at install time, before dist/ is built.
3
+ import "../dist/index.js";
@@ -0,0 +1,291 @@
1
+ // src/lib.ts
2
+ import { spawnSync } from "child_process";
3
+ import { existsSync, readdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "fs";
4
+ import { dirname, join, relative, resolve } from "path";
5
+ import { fileURLToPath } from "url";
6
+ import {
7
+ CONTRACT_FILE,
8
+ buildGraph,
9
+ checkContract,
10
+ contractAt,
11
+ createRun,
12
+ currentRun,
13
+ emptyContract,
14
+ finalizeReport,
15
+ findRun,
16
+ hashFile,
17
+ loadContract,
18
+ loadLenses,
19
+ parseContract,
20
+ readRunJson,
21
+ repoRoot,
22
+ resolveScope,
23
+ runDeterministic,
24
+ writeReport,
25
+ writeRunJson
26
+ } from "@tanziro/plumbline-core";
27
+
28
+ // package.json
29
+ var package_default = {
30
+ name: "@tanziro/plumbline",
31
+ version: "1.1.0",
32
+ description: "Plumbline CLI and MCP server: scope, import graph diff, contract checks and reports.",
33
+ license: "MIT",
34
+ type: "module",
35
+ repository: {
36
+ type: "git",
37
+ url: "git+https://github.com/tanzir71/plumbline.git",
38
+ directory: "packages/cli"
39
+ },
40
+ homepage: "https://tanzir71.github.io/plumbline/",
41
+ engines: {
42
+ node: ">=20.12.0"
43
+ },
44
+ bin: {
45
+ plumbline: "./bin/plumbline.js"
46
+ },
47
+ exports: {
48
+ ".": {
49
+ types: "./dist/lib.d.ts",
50
+ import: "./dist/lib.js"
51
+ },
52
+ "./package.json": "./package.json"
53
+ },
54
+ files: [
55
+ "bin",
56
+ "dist",
57
+ "lenses",
58
+ "skill"
59
+ ],
60
+ publishConfig: {
61
+ access: "public"
62
+ },
63
+ scripts: {
64
+ build: "tsup && node ../../scripts/copy-lenses.mjs && node ../../scripts/copy-skill.mjs cli",
65
+ test: "vitest run",
66
+ typecheck: "tsc --noEmit"
67
+ },
68
+ dependencies: {
69
+ "@modelcontextprotocol/sdk": "^1.32.2",
70
+ "@tanziro/plumbline-core": "workspace:^",
71
+ yaml: "^2.9.1",
72
+ zod: "^4.6.7"
73
+ }
74
+ };
75
+
76
+ // src/lib.ts
77
+ var VERSION = package_default.version;
78
+ var OUTPUT_LIMIT = 8e3;
79
+ var canonical = (path) => existsSync(path) ? realpathSync.native(path) : path;
80
+ function lensDir() {
81
+ const here = dirname(fileURLToPath(import.meta.url));
82
+ const shipped = join(here, "..", "lenses");
83
+ return existsSync(shipped) ? shipped : join(here, "..", "..", "..", "skills", "plumbline", "lenses");
84
+ }
85
+ function listLenses(root) {
86
+ return loadLenses(lensDir(), root);
87
+ }
88
+ function startScope(args) {
89
+ const scope = resolveScope(args);
90
+ const run = createRun(scope.repo);
91
+ const meta = { startedAt: (/* @__PURE__ */ new Date()).toISOString(), target: args.target, base: args.base, checkoutHead: resolveHead(scope.repo) };
92
+ writeRunJson(run, "run.json", meta);
93
+ writeRunJson(run, "scope.json", scope);
94
+ return { scope, run };
95
+ }
96
+ function contractFor(scope, source) {
97
+ return contractAt(scope.repo, source === "base" ? scope.mergeBase : null);
98
+ }
99
+ function continueOrStart(args) {
100
+ const root = repoRoot(args.cwd);
101
+ const latest = findRun(root);
102
+ const pending = latest && !existsSync(join(latest.dir, "report.json")) ? latest : null;
103
+ const prior = pending ? readRunJson(pending, "scope.json") : null;
104
+ const meta = pending ? readRunJson(pending, "run.json") : null;
105
+ const matches = (s) => prior?.headSha === s.headSha && prior.mergeBase === s.mergeBase && prior.mode === s.mode;
106
+ if (pending && !args.target && meta?.target && meta.checkoutHead === resolveHead(root)) {
107
+ const scope2 = resolveScope({ ...args, target: meta.target, base: args.base ?? meta.base });
108
+ if (matches(scope2)) {
109
+ writeRunJson(pending, "scope.json", scope2);
110
+ return { scope: scope2, run: pending };
111
+ }
112
+ }
113
+ const scope = resolveScope(args);
114
+ if (pending && matches(scope)) {
115
+ writeRunJson(pending, "scope.json", scope);
116
+ return { scope, run: pending };
117
+ }
118
+ return startScope(args);
119
+ }
120
+ async function runGraph(args) {
121
+ const { scope, run } = continueOrStart(args);
122
+ const graph = await runDeterministic(scope, contractFor(scope, args.contractFrom ?? "head"));
123
+ writeRunJson(run, "graph.json", graph.diff);
124
+ writeRunJson(run, "check.json", graph.check);
125
+ return { scope, run, graph };
126
+ }
127
+ async function runCheck(args) {
128
+ const root = canonical(repoRoot(args.cwd));
129
+ const contract = args.contract ? loadContract(root, canonical(resolve(args.cwd, args.contract))) : loadContract(root);
130
+ if (args.contract && !contract) throw new Error(`contract not found: ${args.contract}`);
131
+ const graph = await buildGraph(root);
132
+ const result = checkContract(graph, contract ?? emptyContract(), {
133
+ root,
134
+ runSemgrep: args.semgrep,
135
+ allowCustomChecks: args.allowCustomChecks
136
+ });
137
+ const run = currentRun(root);
138
+ writeRunJson(run, "check.json", result);
139
+ return { result, run, hasContract: contract !== null };
140
+ }
141
+ function runProve(args) {
142
+ const root = canonical(repoRoot(args.cwd));
143
+ const test = canonical(resolve(args.cwd, args.test));
144
+ const ref = relative(root, test).replaceAll("\\", "/");
145
+ if (!ref.startsWith(".plumbline/proofs/")) throw new Error("proof tests must live under .plumbline/proofs/");
146
+ if (!existsSync(test)) throw new Error(`test not found: ${args.test}`);
147
+ if (args.command.length === 0) throw new Error("pass the test command after --");
148
+ const options = { cwd: root, encoding: "utf8", timeout: 5 * 60 * 1e3, maxBuffer: 16 * 1024 * 1024, windowsHide: true };
149
+ const quote = (a) => /^[\w@%+=:,./\\-]+$/.test(a) ? a : `"${a.replace(/"/g, '""')}"`;
150
+ const [cmd, ...rest] = args.command;
151
+ const result = process.platform === "win32" ? spawnSync(args.command.map(quote).join(" "), { ...options, shell: true }) : spawnSync(cmd, rest, options);
152
+ const output = `${result.stdout ?? ""}${result.stderr ?? ""}`;
153
+ const record = {
154
+ ref,
155
+ sha256: hashFile(test),
156
+ headSha: resolveHead(root),
157
+ command: args.command.join(" "),
158
+ exitCode: result.status ?? 1,
159
+ output: output.length > OUTPUT_LIMIT ? output.slice(-OUTPUT_LIMIT) : output,
160
+ ...args.passedOnBase === void 0 ? {} : { passedOnBase: args.passedOnBase },
161
+ recordedAt: (/* @__PURE__ */ new Date()).toISOString()
162
+ };
163
+ const run = findRun(root, args.run) ?? createRun(root);
164
+ const prior = readRunJson(run, "proofs.json") ?? [];
165
+ writeRunJson(run, "proofs.json", [...prior.filter((p) => p.ref !== ref), record]);
166
+ return record;
167
+ }
168
+ function resolveHead(root) {
169
+ const result = spawnSync("git", ["rev-parse", "HEAD"], { cwd: root, encoding: "utf8", windowsHide: true });
170
+ return result.stdout.trim();
171
+ }
172
+ async function runReport(args) {
173
+ const root = repoRoot(args.cwd);
174
+ const found = findRun(root, args.run);
175
+ if (args.run && !found) throw new Error(`run not found: ${args.run}`);
176
+ const run = found ?? createRun(root);
177
+ const meta = readRunJson(run, "run.json");
178
+ const scope = resolveScope({ cwd: root, target: meta?.target, base: args.base ?? meta?.base });
179
+ const contract = contractFor(scope, args.contractFrom ?? "head");
180
+ const graph = await runDeterministic(scope, contract);
181
+ writeRunJson(run, "scope.json", scope);
182
+ writeRunJson(run, "graph.json", graph.diff);
183
+ writeRunJson(run, "check.json", graph.check);
184
+ let modelFile = args.findingsValue;
185
+ if (modelFile === void 0 && args.findings) modelFile = JSON.parse(readFileSync(resolve(args.cwd, args.findings), "utf8"));
186
+ if (modelFile === void 0) modelFile = readRunJson(run, "findings.json") ?? void 0;
187
+ if (modelFile !== void 0) writeRunJson(run, "findings.json", modelFile);
188
+ const lenses = listLenses(root);
189
+ const report = finalizeReport({
190
+ runId: run.id,
191
+ startedAt: new Date(meta?.startedAt ?? Date.now()),
192
+ version: VERSION,
193
+ scope,
194
+ contract,
195
+ graph,
196
+ modelFile,
197
+ recordedProofs: readRunJson(run, "proofs.json") ?? [],
198
+ baseBranch: args.baseBranch,
199
+ useGate: args.useGate,
200
+ useLane: args.useLane,
201
+ lenses
202
+ });
203
+ const paths = writeReport(run, report, lenses);
204
+ return { report, run, paths };
205
+ }
206
+ var IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", "dist", "build", "out", "coverage", "vendor", "test", "tests", "__tests__", "__mocks__", "fixtures", "public", "assets", "static", "types"]);
207
+ function subdirs(dir) {
208
+ if (!existsSync(dir)) return [];
209
+ return readdirSync(dir).filter((n) => !n.startsWith(".") && !IGNORED_DIRS.has(n) && statSync(join(dir, n)).isDirectory()).sort();
210
+ }
211
+ function guessModules(root) {
212
+ const out = {};
213
+ for (const parent of ["src", "lib", "app"]) {
214
+ for (const name of subdirs(join(root, parent))) out[name] ??= `${parent}/${name}/**`;
215
+ }
216
+ for (const parent of ["packages", "apps", "services"]) {
217
+ for (const name of subdirs(join(root, parent))) out[name] ??= `${parent}/${name}/**`;
218
+ }
219
+ return out;
220
+ }
221
+ function renderSkeleton(modules) {
222
+ const names = Object.keys(modules);
223
+ const width = Math.max(0, ...names.map((n) => yamlKey(n).length));
224
+ const moduleLines = names.length > 0 ? names.map((n) => ` ${`${yamlKey(n)}:`.padEnd(width + 2)}["${modules[n]}"]`).join("\n") : ' # app: ["src/app/**"]';
225
+ return `# Plumbline architecture contract. Docs: https://tanzir71.github.io/plumbline/docs/contract/
226
+ version: 1
227
+
228
+ # Module name -> globs. These were guessed from your folders, so check them.
229
+ modules:${names.length > 0 ? "" : " {}"}
230
+ ${moduleLines}
231
+
232
+ # Top to bottom. A lower layer may not import a higher one.
233
+ # layers:
234
+ # - [api]
235
+ # - [billing, orgs]
236
+ # - [db]
237
+
238
+ # Rules Plumbline can prove, plus judgement calls for the model.
239
+ # rules:
240
+ # - id: no-billing-to-orgs
241
+ # forbid: billing -> orgs
242
+ # because: "ADR-012: billing ships on its own"
243
+ # - id: tenant-scope
244
+ # require: "repository methods scope queries by org_id"
245
+ # check: llm
246
+ # paths: ["src/**/repo/**"]
247
+
248
+ proof:
249
+ P0: [failing_test, graph_diff]
250
+ P1: [failing_test, graph_diff, broken_rule]
251
+
252
+ # Fail the CI job when the merge score is below the minimum.
253
+ # gate:
254
+ # - branches: ["main", "release/*"]
255
+ # min_merge_score: 3
256
+
257
+ # Label low-risk PRs. A lane never approves or merges.
258
+ lanes:
259
+ light:
260
+ label: "plumbline:light-review"
261
+ when: { merge_score: 5, max_severity: P3, max_changed_lines: 200 }
262
+ never: ["**/migrations/**", ".github/**"]
263
+ `;
264
+ }
265
+ var yamlKey = (name) => /^[\w/-]+$/.test(name) ? name : JSON.stringify(name);
266
+ function runInit(cwd, force = false) {
267
+ const root = repoRoot(cwd);
268
+ const file = join(root, CONTRACT_FILE);
269
+ if (existsSync(file) && !force) throw new Error(`${CONTRACT_FILE} already exists (use --force to replace it)`);
270
+ const modules = guessModules(root);
271
+ const content = renderSkeleton(modules);
272
+ parseContract(content);
273
+ writeFileSync(file, content);
274
+ return { file, modules: Object.keys(modules), content };
275
+ }
276
+
277
+ export {
278
+ VERSION,
279
+ lensDir,
280
+ listLenses,
281
+ startScope,
282
+ contractFor,
283
+ runGraph,
284
+ runCheck,
285
+ runProve,
286
+ runReport,
287
+ guessModules,
288
+ renderSkeleton,
289
+ runInit
290
+ };
291
+ //# sourceMappingURL=chunk-MSN3I3NJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib.ts","../package.json"],"sourcesContent":["import { spawnSync } from \"node:child_process\";\nimport { existsSync, readdirSync, readFileSync, realpathSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport {\n CONTRACT_FILE,\n buildGraph,\n checkContract,\n contractAt,\n createRun,\n currentRun,\n emptyContract,\n finalizeReport,\n findRun,\n hashFile,\n loadContract,\n loadLenses,\n parseContract,\n readRunJson,\n repoRoot,\n resolveScope,\n runDeterministic,\n writeReport,\n writeRunJson,\n type CheckResult,\n type Contract,\n type GraphRun,\n type Lens,\n type RecordedProof,\n type ReportV1,\n type RunDir,\n type ScopeResult,\n} from \"@tanziro/plumbline-core\";\nimport pkg from \"../package.json\" with { type: \"json\" };\n\nexport const VERSION: string = pkg.version;\n\nconst OUTPUT_LIMIT = 8000;\n\n/**\n * git reports a repo's real path, but the working directory can reach it another way: a symlink,\n * a junction, or a Windows 8.3 short name. Compare real paths so those don't look like different folders.\n */\nconst canonical = (path: string) => (existsSync(path) ? realpathSync.native(path) : path);\n\nexport function lensDir(): string {\n const here = dirname(fileURLToPath(import.meta.url));\n const shipped = join(here, \"..\", \"lenses\");\n return existsSync(shipped) ? shipped : join(here, \"..\", \"..\", \"..\", \"skills\", \"plumbline\", \"lenses\");\n}\n\nexport function listLenses(root?: string): Lens[] {\n return loadLenses(lensDir(), root);\n}\n\ninterface RunMeta {\n startedAt: string;\n target?: string;\n base?: string;\n /** The checkout when the run started. A later bare `graph` keeps the target only while this still matches. */\n checkoutHead?: string;\n}\n\nexport interface ScopeArgs {\n cwd: string;\n target?: string;\n base?: string;\n fetchBase?: boolean;\n}\n\n/** Pin the scope and start a new run directory. */\nexport function startScope(args: ScopeArgs): { scope: ScopeResult; run: RunDir } {\n const scope = resolveScope(args);\n const run = createRun(scope.repo);\n const meta: RunMeta = { startedAt: new Date().toISOString(), target: args.target, base: args.base, checkoutHead: resolveHead(scope.repo) };\n writeRunJson(run, \"run.json\", meta);\n writeRunJson(run, \"scope.json\", scope);\n return { scope, run };\n}\n\n/** Which contract judges this run. CI passes \"base\" so a PR cannot relax its own rules. */\nexport function contractFor(scope: ScopeResult, source: \"head\" | \"base\"): Contract {\n return contractAt(scope.repo, source === \"base\" ? scope.mergeBase : null);\n}\n\nexport interface GraphArgs extends ScopeArgs {\n contractFrom?: \"head\" | \"base\";\n}\n\n/** Reuse the latest run when it covers the same commits and has no report yet, so one review stays in one directory. */\nfunction continueOrStart(args: ScopeArgs): { scope: ScopeResult; run: RunDir } {\n const root = repoRoot(args.cwd);\n const latest = findRun(root);\n const pending = latest && !existsSync(join(latest.dir, \"report.json\")) ? latest : null;\n const prior = pending ? readRunJson<ScopeResult>(pending, \"scope.json\") : null;\n const meta = pending ? readRunJson<RunMeta>(pending, \"run.json\") : null;\n const matches = (s: ScopeResult) => prior?.headSha === s.headSha && prior.mergeBase === s.mergeBase && prior.mode === s.mode;\n\n // A bare `graph` stays on the target `scope` pinned, until the checkout moves.\n if (pending && !args.target && meta?.target && meta.checkoutHead === resolveHead(root)) {\n const scope = resolveScope({ ...args, target: meta.target, base: args.base ?? meta.base });\n if (matches(scope)) {\n writeRunJson(pending, \"scope.json\", scope);\n return { scope, run: pending };\n }\n }\n\n const scope = resolveScope(args);\n if (pending && matches(scope)) {\n writeRunJson(pending, \"scope.json\", scope);\n return { scope, run: pending };\n }\n return startScope(args);\n}\n\nexport async function runGraph(args: GraphArgs): Promise<{ scope: ScopeResult; run: RunDir; graph: GraphRun }> {\n const { scope, run } = continueOrStart(args);\n const graph = await runDeterministic(scope, contractFor(scope, args.contractFrom ?? \"head\"));\n writeRunJson(run, \"graph.json\", graph.diff);\n writeRunJson(run, \"check.json\", graph.check);\n return { scope, run, graph };\n}\n\nexport interface CheckArgs {\n cwd: string;\n semgrep?: boolean;\n allowCustomChecks?: boolean;\n /** Check a draft contract at this path instead of `plumbline.yml`. */\n contract?: string;\n}\n\n/** Evaluate the contract against the current tree. Needs no base branch. */\nexport async function runCheck(args: CheckArgs): Promise<{ result: CheckResult; run: RunDir; hasContract: boolean }> {\n const root = canonical(repoRoot(args.cwd));\n const contract = args.contract ? loadContract(root, canonical(resolve(args.cwd, args.contract))) : loadContract(root);\n if (args.contract && !contract) throw new Error(`contract not found: ${args.contract}`);\n const graph = await buildGraph(root);\n const result = checkContract(graph, contract ?? emptyContract(), {\n root,\n runSemgrep: args.semgrep,\n allowCustomChecks: args.allowCustomChecks,\n });\n const run = currentRun(root);\n writeRunJson(run, \"check.json\", result);\n return { result, run, hasContract: contract !== null };\n}\n\nexport interface ProveArgs {\n cwd: string;\n test: string;\n command: string[];\n run?: string;\n /** Set after running the same test on the base commit. */\n passedOnBase?: boolean;\n}\n\n/** Run a proof test and record what actually happened. Only these records satisfy the proof gate. */\nexport function runProve(args: ProveArgs): RecordedProof {\n const root = canonical(repoRoot(args.cwd));\n const test = canonical(resolve(args.cwd, args.test));\n const ref = relative(root, test).replaceAll(\"\\\\\", \"/\");\n if (!ref.startsWith(\".plumbline/proofs/\")) throw new Error(\"proof tests must live under .plumbline/proofs/\");\n if (!existsSync(test)) throw new Error(`test not found: ${args.test}`);\n if (args.command.length === 0) throw new Error(\"pass the test command after --\");\n\n const options = { cwd: root, encoding: \"utf8\", timeout: 5 * 60 * 1000, maxBuffer: 16 * 1024 * 1024, windowsHide: true } as const;\n // Windows needs a shell to run .cmd shims such as npm and pnpm, so quote the arguments for it.\n const quote = (a: string) => (/^[\\w@%+=:,./\\\\-]+$/.test(a) ? a : `\"${a.replace(/\"/g, '\"\"')}\"`);\n const [cmd, ...rest] = args.command as [string, ...string[]];\n const result =\n process.platform === \"win32\"\n ? spawnSync(args.command.map(quote).join(\" \"), { ...options, shell: true })\n : spawnSync(cmd, rest, options);\n const output = `${result.stdout ?? \"\"}${result.stderr ?? \"\"}`;\n const record: RecordedProof = {\n ref,\n sha256: hashFile(test),\n headSha: resolveHead(root),\n command: args.command.join(\" \"),\n exitCode: result.status ?? 1,\n output: output.length > OUTPUT_LIMIT ? output.slice(-OUTPUT_LIMIT) : output,\n ...(args.passedOnBase === undefined ? {} : { passedOnBase: args.passedOnBase }),\n recordedAt: new Date().toISOString(),\n };\n\n const run = findRun(root, args.run) ?? createRun(root);\n const prior = readRunJson<RecordedProof[]>(run, \"proofs.json\") ?? [];\n writeRunJson(run, \"proofs.json\", [...prior.filter((p) => p.ref !== ref), record]);\n return record;\n}\n\nfunction resolveHead(root: string): string {\n const result = spawnSync(\"git\", [\"rev-parse\", \"HEAD\"], { cwd: root, encoding: \"utf8\", windowsHide: true });\n return result.stdout.trim();\n}\n\nexport interface ReportArgs {\n cwd: string;\n run?: string;\n findings?: string;\n /** Inline findings, used by the MCP tool. */\n findingsValue?: unknown;\n base?: string;\n baseBranch?: string;\n contractFrom?: \"head\" | \"base\";\n useGate?: boolean;\n useLane?: boolean;\n}\n\nexport interface ReportOutput {\n report: ReportV1;\n run: RunDir;\n paths: Record<string, string>;\n}\n\n/**\n * Finalize a run. The scope and graph are recomputed here instead of read from the run directory,\n * so the proof gate checks model findings against the repository, not against editable files.\n */\nexport async function runReport(args: ReportArgs): Promise<ReportOutput> {\n const root = repoRoot(args.cwd);\n const found = findRun(root, args.run);\n if (args.run && !found) throw new Error(`run not found: ${args.run}`);\n const run = found ?? createRun(root);\n\n const meta = readRunJson<RunMeta>(run, \"run.json\");\n const scope = resolveScope({ cwd: root, target: meta?.target, base: args.base ?? meta?.base });\n const contract = contractFor(scope, args.contractFrom ?? \"head\");\n const graph = await runDeterministic(scope, contract);\n writeRunJson(run, \"scope.json\", scope);\n writeRunJson(run, \"graph.json\", graph.diff);\n writeRunJson(run, \"check.json\", graph.check);\n\n let modelFile: unknown = args.findingsValue;\n if (modelFile === undefined && args.findings) modelFile = JSON.parse(readFileSync(resolve(args.cwd, args.findings), \"utf8\"));\n if (modelFile === undefined) modelFile = readRunJson<unknown>(run, \"findings.json\") ?? undefined;\n if (modelFile !== undefined) writeRunJson(run, \"findings.json\", modelFile);\n\n const lenses = listLenses(root);\n const report = finalizeReport({\n runId: run.id,\n startedAt: new Date(meta?.startedAt ?? Date.now()),\n version: VERSION,\n scope,\n contract,\n graph,\n modelFile,\n recordedProofs: readRunJson<RecordedProof[]>(run, \"proofs.json\") ?? [],\n baseBranch: args.baseBranch,\n useGate: args.useGate,\n useLane: args.useLane,\n lenses,\n });\n const paths = writeReport(run, report, lenses);\n return { report, run, paths };\n}\n\nconst IGNORED_DIRS = new Set([\"node_modules\", \"dist\", \"build\", \"out\", \"coverage\", \"vendor\", \"test\", \"tests\", \"__tests__\", \"__mocks__\", \"fixtures\", \"public\", \"assets\", \"static\", \"types\"]);\n\nfunction subdirs(dir: string): string[] {\n if (!existsSync(dir)) return [];\n return readdirSync(dir)\n .filter((n) => !n.startsWith(\".\") && !IGNORED_DIRS.has(n) && statSync(join(dir, n)).isDirectory())\n .sort();\n}\n\n/** Guess modules from the folder structure. */\nexport function guessModules(root: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const parent of [\"src\", \"lib\", \"app\"]) {\n for (const name of subdirs(join(root, parent))) out[name] ??= `${parent}/${name}/**`;\n }\n for (const parent of [\"packages\", \"apps\", \"services\"]) {\n for (const name of subdirs(join(root, parent))) out[name] ??= `${parent}/${name}/**`;\n }\n return out;\n}\n\nexport function renderSkeleton(modules: Record<string, string>): string {\n const names = Object.keys(modules);\n const width = Math.max(0, ...names.map((n) => yamlKey(n).length));\n const moduleLines =\n names.length > 0\n ? names.map((n) => ` ${`${yamlKey(n)}:`.padEnd(width + 2)}[\"${modules[n]}\"]`).join(\"\\n\")\n : ' # app: [\"src/app/**\"]';\n return `# Plumbline architecture contract. Docs: https://tanzir71.github.io/plumbline/docs/contract/\nversion: 1\n\n# Module name -> globs. These were guessed from your folders, so check them.\nmodules:${names.length > 0 ? \"\" : \" {}\"}\n${moduleLines}\n\n# Top to bottom. A lower layer may not import a higher one.\n# layers:\n# - [api]\n# - [billing, orgs]\n# - [db]\n\n# Rules Plumbline can prove, plus judgement calls for the model.\n# rules:\n# - id: no-billing-to-orgs\n# forbid: billing -> orgs\n# because: \"ADR-012: billing ships on its own\"\n# - id: tenant-scope\n# require: \"repository methods scope queries by org_id\"\n# check: llm\n# paths: [\"src/**/repo/**\"]\n\nproof:\n P0: [failing_test, graph_diff]\n P1: [failing_test, graph_diff, broken_rule]\n\n# Fail the CI job when the merge score is below the minimum.\n# gate:\n# - branches: [\"main\", \"release/*\"]\n# min_merge_score: 3\n\n# Label low-risk PRs. A lane never approves or merges.\nlanes:\n light:\n label: \"plumbline:light-review\"\n when: { merge_score: 5, max_severity: P3, max_changed_lines: 200 }\n never: [\"**/migrations/**\", \".github/**\"]\n`;\n}\n\nconst yamlKey = (name: string) => (/^[\\w/-]+$/.test(name) ? name : JSON.stringify(name));\n\nexport function runInit(cwd: string, force = false): { file: string; modules: string[]; content: string } {\n const root = repoRoot(cwd);\n const file = join(root, CONTRACT_FILE);\n if (existsSync(file) && !force) throw new Error(`${CONTRACT_FILE} already exists (use --force to replace it)`);\n const modules = guessModules(root);\n const content = renderSkeleton(modules);\n parseContract(content);\n writeFileSync(file, content);\n return { file, modules: Object.keys(modules), content };\n}\n","{\n \"name\": \"@tanziro/plumbline\",\n \"version\": \"1.1.0\",\n \"description\": \"Plumbline CLI and MCP server: scope, import graph diff, contract checks and reports.\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/tanzir71/plumbline.git\",\n \"directory\": \"packages/cli\"\n },\n \"homepage\": \"https://tanzir71.github.io/plumbline/\",\n \"engines\": {\n \"node\": \">=20.12.0\"\n },\n \"bin\": {\n \"plumbline\": \"./bin/plumbline.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/lib.d.ts\",\n \"import\": \"./dist/lib.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"bin\",\n \"dist\",\n \"lenses\",\n \"skill\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"build\": \"tsup && node ../../scripts/copy-lenses.mjs && node ../../scripts/copy-skill.mjs cli\",\n \"test\": \"vitest run\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.32.2\",\n \"@tanziro/plumbline-core\": \"workspace:^\",\n \"yaml\": \"^2.9.1\",\n \"zod\": \"^4.6.7\"\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,YAAY,aAAa,cAAc,cAAc,UAAU,qBAAqB;AAC7F,SAAS,SAAS,MAAM,UAAU,eAAe;AACjD,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASK;;;AChCP;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,KAAO;AAAA,IACL,WAAa;AAAA,EACf;A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