@bigsteele/the-big-sean 0.4.4 → 0.5.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.
package/README.md CHANGED
@@ -12,10 +12,13 @@ band, a ceiling, gate status, category cards, the path to 100, and every finding
12
12
  a file and line, a query, or a page.
13
13
 
14
14
  The audit itself is run by Claude Code against your repo and, where reachable, your live
15
- system — read-only, no edits, no questions, nothing spent. Step 0 is the **Big Steele AI
16
- Audit**: `big-sean` runs it for you first (deterministic, file-by-file, never opens an env
17
- file) and the protocol uses its findings as evidence for the autonomy side, with its score
18
- on the summary card as the AI readiness line. The deliverable lands at the repo root, named
15
+ system — read-only, no edits, no questions, nothing spent. Step 0 is two deterministic scans, run for you before the
16
+ agent starts: the **Big Steele AI Audit** (what the software automates, and how much of it
17
+ an agent could operate) and **Wiremap** (how far it is from one change in one place, and
18
+ whether a capability map exists for the agent to read before it searches). Their findings
19
+ are evidence the protocol cites, their scores appear on the summary card as the AI
20
+ readiness and Wiring lines, and Wiremap's block map is what the agent uses to navigate the
21
+ codebase instead of searching it. The deliverable lands at the repo root, named
19
22
  for the app: **The Big Sean - <App Name>.md** and **.html**. This package ships the
20
23
  protocol and the tools around it:
21
24
 
package/dist/cli.js CHANGED
@@ -69,6 +69,9 @@ export async function main(argv, log = console.log, err = console.error) {
69
69
  const ai = await aiReadinessLine(resolve(file, ".."));
70
70
  if (ai)
71
71
  log(ai);
72
+ const wiring = await wiringLine(resolve(file, ".."));
73
+ if (wiring)
74
+ log(wiring);
72
75
  log("");
73
76
  log("Send the card in for a written read of the three fixes that come first: bigsteele.com/scan");
74
77
  if (!res.ok)
@@ -83,6 +86,7 @@ export async function main(argv, log = console.log, err = console.error) {
83
86
  // Step 0 of the protocol: the AI Audit runs here, deterministically, so the
84
87
  // agent starts with its files as evidence. Read-only; never opens an env file.
85
88
  await runAiAudit(root, log, err);
89
+ await runWiremapScan(root, log, err);
86
90
  if (mode === "run") {
87
91
  log(WARNING);
88
92
  if (!yes) {
@@ -110,6 +114,33 @@ export async function main(argv, log = console.log, err = console.error) {
110
114
  }
111
115
  return writeProtocol(root, log);
112
116
  }
117
+ /**
118
+ * Wiremap: how far the codebase is from one change in one place, and whether a capability
119
+ * map exists for the agent to read before it searches. Loaded dynamically and skipped on
120
+ * failure, because a missing scanner must not stop the audit that needs it least.
121
+ */
122
+ async function runWiremapScan(root, log, err) {
123
+ try {
124
+ const wm = await import("@bigsteele/wiremap");
125
+ const w = await wm.runWiremap(root);
126
+ if (wm.secretShaped(w)) {
127
+ err(`Wiremap not written: its output matched a credential shape. A secret is committed in this repository; that is the first finding.`);
128
+ return;
129
+ }
130
+ const dir = join(root, ".planning", "launch-audit");
131
+ await mkdir(dir, { recursive: true });
132
+ const base = `wiremap-${wm.slug(w.app)}`;
133
+ await writeFile(join(dir, `${base}.md`), wm.toMarkdown(w), "utf8");
134
+ await writeFile(join(dir, `${base}.json`), `${JSON.stringify(w, null, 2)}\n`, "utf8");
135
+ const top = w.blast[0];
136
+ log(`Wiremap: ${w.app} ${w.score.total} / 100 ${w.score.grade} level ${w.score.level.n} ${w.score.level.name} -> ${join(".planning", "launch-audit", `${base}.md`)}`);
137
+ if (top)
138
+ log(` worst blast radius: ${top.what} - ${top.files_today} files today, 1 once wired`);
139
+ }
140
+ catch (e) {
141
+ err(`Wiremap did not run (${e instanceof Error ? e.message : String(e)}). The protocol tells the agent to run it itself.`);
142
+ }
143
+ }
113
144
  async function runAiAudit(root, log, err) {
114
145
  try {
115
146
  const audit = await runAudit(root);
@@ -130,6 +161,22 @@ async function runAiAudit(root, log, err) {
130
161
  err(`AI Audit did not run (${e instanceof Error ? e.message : String(e)}). The protocol tells the agent to run it itself.`);
131
162
  }
132
163
  }
164
+ /** The wiring line for --check, when Step 0's wiremap json is beside grade.json. */
165
+ async function wiringLine(reportDir) {
166
+ try {
167
+ const { readdir } = await import("node:fs/promises");
168
+ const files = (await readdir(reportDir)).filter((f) => /^wiremap-.*\.json$/.test(f));
169
+ if (files.length === 0)
170
+ return null;
171
+ const w = JSON.parse(await readFile(join(reportDir, files[0]), "utf8"));
172
+ if (!w.score)
173
+ return null;
174
+ return `Wiring (Wiremap): ${w.score.total} / 100 (${w.score.grade}, level ${w.score.level?.n} ${w.score.level?.name})`;
175
+ }
176
+ catch {
177
+ return null;
178
+ }
179
+ }
133
180
  /** The AI readiness line for --check, when Step 0's json is beside grade.json. */
134
181
  async function aiReadinessLine(reportDir) {
135
182
  try {
@@ -183,7 +230,7 @@ async function writeProtocol(root, log) {
183
230
  log(WARNING);
184
231
  log(``);
185
232
  log(``);
186
- log(`What just ran is the AI Audit: a deterministic file scan, seconds, no model involved.`);
233
+ log(`What just ran is the AI Audit and Wiremap: deterministic file scans, seconds, no model involved.`);
187
234
  log(`The report card is the other half, and it is a long agent session, not a scan.`);
188
235
  log(`Next: open Claude Code in this folder and paste the whole file in (or run big-sean --run).`);
189
236
  log(`When it finishes, "The Big Sean - <App Name>.md" and .html are at the repo root and the card opens itself.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bigsteele/the-big-sean",
3
- "version": "0.4.4",
4
- "description": "The Big Sean: the Launch Report Card, by Big Steele and LaSean Pickens. Runs the Big Steele AI Audit, drops a 140-check launch-readiness and autonomy audit protocol into a repo for Claude Code to run, names the deliverable after the app, and independently re-computes any report's math from its grade.json so the number on the card can be proven, not trusted.",
3
+ "version": "0.5.0",
4
+ "description": "The Big Sean: the Launch Report Card, by Big Steele and LaSean Pickens. Runs the Big Steele AI Audit and Wiremap, drops a 140-check launch-readiness and autonomy audit protocol into a repo for Claude Code to run, names the deliverable after the app, and independently re-computes any report's math from its grade.json so the number on the card can be proven, not trusted.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
7
7
  "author": "Big Steele (Together Inc.) and LaSean Pickens",
@@ -37,6 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@bigsteele/ai-audit": "^0.2.3"
40
+ "@bigsteele/ai-audit": "^0.2.3",
41
+ "@bigsteele/wiremap": "^0.1.0"
41
42
  }
42
43
  }
@@ -14,9 +14,10 @@ Rules you never break:
14
14
  • Never print a secret, a token, a password, or a customer's personal data anywhere.
15
15
  • Never say "100% bug-free" or "production ready." Say what you verified and what you did not.
16
16
  • IDENTIFY THE TARGET BEFORE YOU READ IT. Every live system you touch must be proven to belong to THIS repository before you run a single query against it, and the proof goes in SOURCES.md. See Step 1's identity gate. Reading a database that belongs to someone else is not made acceptable by being read-only.
17
- Step 0. The AI Audit (already run for you, or run it now)
17
+ Step 0. The two deterministic scans (already run for you, or run them now)
18
18
  If .planning/launch-audit/ai-audit-<app>.md and ai-audit-<app>.json exist, big-sean ran the Big Steele AI Audit before handing you this protocol. Read both. They are evidence, cited like any other: use their findings for the checks about surfaces, model calls, tools, loops, reach, and failure visibility in Part B, and cite the file and the criterion. If they are missing, run `npx @bigsteele/ai-audit --repo . --out .planning/launch-audit` yourself (it is read-only, writes only those two files, and never opens an env file), then read them. The AI Audit's score, grade, and level go on the summary card as the AI readiness line. It replaces no check: an agent-runnable architecture still has to pass every gate.
19
- The AI Audit is deterministic: it reads files and counts patterns, and it can miss an agent surface that lives outside the main app (Deno edge functions, workers, a separate service, a hand-written MCP server with no SDK). Never accept its zeros on faith. If it reports zero or near zero for the MCP server, tool definitions, or memory between runs, go read supabase/functions, workers, api, and any folder named mcp, tools, agents, or intelligence yourself before grading. Where you find a surface the scanner missed, grade the capability as present with your own evidence, and record a separate finding: the surface is not discoverable (no SDK declaration, no server card or mcp.json, no mention in README, AGENTS.md, or llms.txt). Claude, Cursor, and ChatGPT discover software the way the scanner did. An agent surface a scanner cannot find is one an agent cannot find either, and that is the real finding, not the zero.
19
+ Wiremap ran beside it, and its files are in the same folder: .planning/launch-audit/wiremap-<app>.md and .json. It answers two questions this protocol otherwise has no way to measure: is every value referenced by name from one source of truth (so one change is one edit), and is every file claimed by exactly one named capability (so one question is one file). Read it before Step 2, and use it three ways. Its score, grade and level go on the summary card as the Wiring line. Its BLOCK MAP is your index to the codebase: where the repository has a manifest, read that map first and go straight to the block that owns a feature instead of searching, exactly as the repository's own agent instructions say to; where it has none, Wiremap's DRAFT blocks are the next best index, and you may use them to navigate but never cite them as the repository's own map. Its BLAST-RADIUS table is evidence for any finding about the cost of change: a value in nine files is nine edits and nine chances to disagree, and that is a maintainability finding with a number attached rather than an opinion. If Wiremap did not run, run it yourself: `npx @bigsteele/wiremap --out .planning/launch-audit` (read-only, writes only those two files).
20
+ Both scans are deterministic: they read files and count patterns, and the AI Audit can miss an agent surface that lives outside the main app (Deno edge functions, workers, a separate service, a hand-written MCP server with no SDK). Never accept its zeros on faith. If it reports zero or near zero for the MCP server, tool definitions, or memory between runs, go read supabase/functions, workers, api, and any folder named mcp, tools, agents, or intelligence yourself before grading. Where you find a surface the scanner missed, grade the capability as present with your own evidence, and record a separate finding: the surface is not discoverable (no SDK declaration, no server card or mcp.json, no mention in README, AGENTS.md, or llms.txt). Claude, Cursor, and ChatGPT discover software the way the scanner did. An agent surface a scanner cannot find is one an agent cannot find either, and that is the real finding, not the zero.
20
21
 
21
22
  Step 1. Find out what you can reach (no setup from me)
22
23
  Look for what is already on this machine and use it read-only. Do not ask me for anything.
@@ -61,7 +62,7 @@ Write NORTH-STAR.md, and keep every line traceable:
61
62
  • Anything you could not determine. Write UNKNOWN and say what would settle it. Never invent a mission.
62
63
  If the evidence contradicts itself, that is a finding, not a puzzle to resolve quietly: a README promising one thing while the code and the money path serve another means the team does not agree on what it is building, and it goes in the report as its own finding with both citations.
63
64
  THE DRIFT RULE, which governs the rest of this audit. Every FAIL, every UNKNOWN, and every recommendation must connect to the North Star. In the action plan and the path to 100, each item carries one line, "why this matters here", that names the workflow, the money path, or the critical few it protects. An item that cannot make that connection is not dropped and not silently downgraded: it is grouped under "Rubric items that do not serve your North Star" with a one-line reason, so the owner sees you considered it and why it waits. Ordering follows the North Star, not the rubric's numbering: two weight-5 failures are not equal when one breaks the money path and the other breaks a surface nobody has shipped yet. Never recommend building a capability the North Star does not need just because a check exists for it. If the audit's honest conclusion is that the app should do less, say that.
64
- Now learn the app. Read the planning docs, README, specs, and any state files first. Then read the real code: every route, page, API handler, server action, edge or serverless function, worker, cron, webhook, database migration, policy, trigger, function, storage rule, and integration. Trace the main user journeys end to end: sign up, first value, the core workflow of this product, pay, cancel, delete account, get support. Trace the owner's journeys: onboarding a customer, seeing what happened, handling a failure, getting paid. Write WHAT-THIS-APP-DOES.md: what it is, who uses it, the money flows, the external services, the background jobs, and the workflows that must work for a customer to pay and stay. Where it disagrees with NORTH-STAR.md, the code wins for what the app DOES and the North Star governs what it is FOR; note the gap.
65
+ Now learn the app. Start from the block map (the repository's own, or Wiremap's draft): it tells you what the product does and which files implement it, so you can read the blocks that matter instead of walking the tree. Then read the planning docs, README, specs, and any state files. Then read the real code: every route, page, API handler, server action, edge or serverless function, worker, cron, webhook, database migration, policy, trigger, function, storage rule, and integration. Trace the main user journeys end to end: sign up, first value, the core workflow of this product, pay, cancel, delete account, get support. Trace the owner's journeys: onboarding a customer, seeing what happened, handling a failure, getting paid. Write WHAT-THIS-APP-DOES.md: what it is, who uses it, the money flows, the external services, the background jobs, and the workflows that must work for a customer to pay and stay. Where it disagrees with NORTH-STAR.md, the code wins for what the app DOES and the North Star governs what it is FOR; note the gap.
65
66
  Step 3. Check the live system where you can (all read-only)
66
67
  Where the database is reachable:
67
68
  • Every table with its row count. Flag tables that are empty but should have content (an academy with no lessons, a pricing table with no rows, a policies table with no current version).
@@ -395,6 +396,7 @@ Score: <verified> / 100 (<band>) <INCOMPLETE if any unknowns> Ceiling: <ceil
395
396
  Checks: <n> PASS, <n> FAIL, <n> UNKNOWN, <n> N/A of 140 Findings: <count> Evidence entries: <count>
396
397
  Launch readiness (L01 to L15): <score> Autonomy (D01 to D20): <score> Combined: <score>
397
398
  AI readiness (Big Steele AI Audit): <score> / 100 (<grade>, level <n> <name>)
399
+ Wiring (Wiremap): <score> / 100 (<grade>, level <n> <name>) Worst blast radius: <what> in <n> files
398
400
  Gates: <LAUNCH BLOCKED by ... | NOT VERIFIED FOR LAUNCH: ... | GATES CLEAR>
399
401
  Runs unattended today: <YES | NO | UNKNOWN> Duties automated: <n> of <total> (<n> of <software-executable>) Human touches per week: <n> (<removable> removable, <partial> partial, <by design> by design)
400
402
  Live sources reached: <list> Not reached: <list>