getprismo 0.1.43 → 0.1.45

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
@@ -4,1174 +4,141 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dw/getprismo.svg)](https://www.npmjs.com/package/getprismo)
5
5
  [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
6
 
7
- an autonomous cost agent for ai coding. it finds token waste, fixes the cause, verifies the fix against your next sessions in dollars, and escalates or backs off based on what actually worked. unattended.
7
+ Agent control plane for AI coding.
8
8
 
9
- ```bash
10
- npx getprismo doctor
11
- ```
12
-
13
- that's it. run it on any repo. no api keys, no login, no data leaves your machine. connect it once and it runs itself.
14
-
15
- ---
16
-
17
- ## the problem
18
-
19
- ai coding agents (claude code, codex, cursor) burn tokens on things that don't help you ship. lockfiles get read into context. old logs get loaded. generated artifacts leak in. sessions balloon to millions of tokens because nothing tells the agent what to ignore.
20
-
21
- most developers don't realize this is happening until the bill arrives or the agent starts looping.
22
-
23
- prismodev catches it before, during, and after.
24
-
25
- ---
26
-
27
- ## the loop
28
-
29
- prismodev covers the full AI coding session:
30
-
31
- ```
32
- before you code npx getprismo doctor
33
- while you code npx getprismo guard --watch
34
- enforce at runtime npx getprismo enforce install
35
- noisy commands npx getprismo shield -- npm test
36
- targeted repairs npx getprismo repair auto
37
- after you code npx getprismo receipt
38
- postmortem npx getprismo replay
39
- weekly receipt npx getprismo digest
40
- workspace agent npx getprismo agent --watch
41
- agent-native npx getprismo mcp
42
- ```
43
-
44
- **doctor** diagnoses the repo, applies safe fixes, and shows the before/after score.
45
- **repair** runs the targeted fix for one waste cause; `repair auto` lets the planner pick.
46
- **enforce** turns the context firewall into actual runtime enforcement via Claude Code hooks.
47
- **digest** prints the verified-savings summary for the week, ready to paste into Slack.
48
- **guard** runs live guardrails, context throttle, rescue prompts, context firewall, and dashboard-ready prevention events.
49
- **watch** monitors context pressure live and is the lower-level diagnostic view behind guard.
50
- **receipt** explains what repeated, what output dominated, what artifacts leaked, what likely influenced the run, and a heuristic context-efficiency score.
51
- **replay** reconstructs why a session went sideways and prints a recovery prompt.
52
- **shield** runs noisy commands without dumping full output back into the agent context.
53
- **agent** connects Prismo Cloud to your local repo so dashboard actions can safely run on this machine.
54
- **mcp** exposes PrismoDev as local tools so compatible agents can scan, search shield output, and request scoped context directly.
55
-
56
- ---
57
-
58
- ## new: the self-driving loop
59
-
60
- connect once and prismodev operates itself:
9
+ Prismo watches local Codex, Claude Code, and Cursor sessions, finds wasted agent context, applies safe interventions, and verifies whether those interventions actually saved tokens and dollars in later sessions.
61
10
 
62
11
  ```bash
63
- npx getprismo connect --token <your prismo api key>
64
- ```
65
-
66
- from that point, on every machine running the connector:
67
-
68
- 1. **detect** — session telemetry syncs continuously; waste is attributed to one of five causes: repeated file reads, tool-output floods, generated artifacts, context loops, long-session buildup.
69
- 2. **decide** — a local planner scores causes against thresholds, respects cooldowns, and won't re-repair a cause until enough new sessions arrived to judge the last attempt. the backend auto-queues repairs the same way — no dashboard clicks.
70
- 3. **repair** — each cause has a dedicated executor (not doctor-for-everything): ignore rules + hot-file maps, shield staging, firewall policies, tightened guard budgets, scoped context packs with restart routines.
71
- 4. **verify** — after a repair, the waste rate for that cause is measured in your *later* sessions (14-day baseline, real before/after math). verdicts: `improved`, `no-change`, `regressed`.
72
- 5. **adapt** — `improved` stays mild. `no-change`/`regressed` escalates to an aggressive tier (context firewall + tighter budgets). a cause that fails both tiers is held for your review instead of being retried forever — the one moment a human is genuinely needed, surfaced loudly.
73
-
74
- savings are reported in **dollars, verified** — converted with a model-aware blended rate weighted across your actual sessions — on the dashboard and via `prismo digest`.
75
-
76
- and it learns across the fleet: anonymized repair verdicts (counts only, no repo/org identifiers) aggregate into priors, so when the fleet already knows mild repairs rarely fix a cause, your first repair starts at the tier that works. your own verdicts always outrank the fleet's.
77
-
78
- run one planner cycle by hand to see it think:
79
-
80
- ```bash
81
- npx getprismo repair auto --dry-run
82
- ```
83
-
84
- ---
85
-
86
- ## new: runtime enforcement
87
-
88
- advisory guardrails only help if the agent reads them. for claude code, prismodev can enforce them:
89
-
90
- ```bash
91
- npx getprismo enforce install
92
- ```
93
-
94
- this wires a `PreToolUse` hook (with a backup of `.claude/settings.json`) that:
95
-
96
- - **denies reads into blocked context** — `node_modules/`, build output, logs, lockfiles — with a reason pointing the agent at the compact `.prismo/` context packs instead
97
- - **denies the fourth attempt of an identical command** in one session, suggesting one shielded run instead of an expensive retry loop
98
-
99
- ```text
100
- permissionDecision: deny
101
- reason: Prismo context firewall: "logs/huge.log" is blocked context (rule: logs/**).
102
- Use the .prismo/ context packs instead, or run `npx getprismo shield -- <command>`
103
- if you need its contents summarized.
104
- ```
105
-
106
- enforcement fails open — malformed events or missing policy files allow the call, so it can never break a working agent. `enforce uninstall` removes only the prismo hook. other agents keep following the advisory `.prismo` files.
107
-
108
- ---
109
-
110
- ## what prismodev catches
111
-
112
- - missing `.claudeignore` / `.cursorignore` (the biggest single fix for most repos)
113
- - lockfiles entering context (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`)
114
- - generated artifacts leaking in (`__pycache__`, `dist/`, `coverage/`, `.next/`)
115
- - operational source-stream dumps leaking in (`events/`, `source-streams/`, inbox/calendar/GitHub JSONL exports)
116
- - oversized instruction files (`CLAUDE.md` or `AGENTS.md` over 500 tokens)
117
- - tool output dominating sessions (repeated reads, large command output)
118
- - long-running sessions with stale context accumulation
119
- - repeated file reads (same file loaded 100+ times in one session)
120
- - repeated commands (agent running the same command in a loop)
121
- - high context risk sessions that should have been split at task boundaries
122
- - session-derived ignore candidates from actual Claude/Codex logs (`logs/debug.log`, `dist/app.js`, `package-lock.json`, source-stream dumps)
123
-
124
- ---
125
-
126
- ## real output: doctor
127
-
128
- run `npx getprismo doctor` on any repo. here's what it looks like on a real project:
129
-
130
- ```
131
- PrismoDev Doctor
132
-
133
- Before: 79/100 - Medium risk - 5 token leaks
134
- After: 91/100 - Low risk - 3 token leaks (+12)
135
- Local usage: 976k tokens across 3 recent session(s)
136
- Estimated exposed context reduction: 100%
137
- Payoff: repo is 12 points cleaner for AI coding sessions
138
-
139
- Fixed:
140
- - Created .claudeignore
141
- - Created .cursorignore
142
- - Generated prismo-dev-report.md
143
- - Generated .prismo/architecture-summary.md
144
- - Generated .prismo/recommended-CLAUDE.boilerplate.md
145
- - Generated .prismo/recommended-AGENTS.boilerplate.md
146
- - Generated .prismo/recommended-.claudeignore
147
- - Generated .prismo/recommended-.cursorignore
148
- - Generated .prismo/recommended-.gitignore-additions
149
- - Generated .prismo/backend-summary.md
150
- - Generated .prismo/frontend-summary.md
151
-
152
- Still Risky:
153
- - Tool output/context contributed about 319k tokens
154
- - 1 recent session reached high context risk
155
-
156
- Recommended starting context:
157
- .prismo/frontend-context.md
158
-
159
- Next:
160
- 1. npx getprismo context frontend
161
- 2. npx getprismo watch --once
162
- 3. npx getprismo cc
12
+ npx getprismo protect
163
13
  ```
164
14
 
165
- doctor went from 79 to 91 in one run. the repo now has proper ignore files, compact context packs, and a clear starting point for the next coding session.
166
-
167
- `scan --usage` and `doctor` can also turn real session leaks into concrete ignore suggestions. if local Claude/Codex logs show `logs/debug.log`, `dist/app.js`, `package-lock.json`, source-stream dumps, or other noisy files repeatedly entering context, prismodev adds conservative `.claudeignore` / `.cursorignore` candidate rules instead of only reporting the problem.
15
+ That one command turns on the useful stack for a repo:
168
16
 
169
- when you want PrismoDev to apply those ignore suggestions directly, use `npx getprismo doctor --apply-suggestions`. it appends only missing rules, writes `.claudeignore.prismo-backup` / `.cursorignore.prismo-backup` first, and still does not touch `CLAUDE.md`, `AGENTS.md`, `.gitignore`, or source code.
17
+ - safe ignore rules and compact context packs
18
+ - Claude Code runtime enforcement when hooks are available
19
+ - loop and context-waste protection
20
+ - connector-driven repair and verification when connected to Prismo Cloud
170
21
 
171
- ---
22
+ ## Why
172
23
 
173
- ## real output: watch
24
+ AI coding agents waste real money and time on context that does not help them ship:
174
25
 
175
- run `npx getprismo watch` during a coding session. it monitors context pressure in real time:
26
+ - full test/build logs entering chat
27
+ - lockfiles, build output, coverage, and caches getting read
28
+ - the same files being opened again and again
29
+ - retry loops that keep running the same failing command
30
+ - long sessions carrying stale context across tasks
176
31
 
177
- ```
178
- Prismo Watch
179
-
180
- Context Pressure: HIGH
181
- Session Size: 707k tokens (exact-local-log)
182
- Recent Growth: +0 tokens
183
- Tool Output: 237k tokens
184
- Turns: 102 | Tool calls: 774
185
- Model: gpt-5.5
186
-
187
- Warnings
188
- - Context risk is high; consider starting a fresh session.
189
- - Tool/output tokens are dominating this session.
190
- - lib/prismo-dev-scan.js appears repeatedly in context (286x).
191
- - node bin/prismo.js appears repeatedly in context (85x).
192
- - lockfiles likely entered active context (60 mentions).
193
-
194
- Do This Now
195
- Cause: tool-output-flood (high confidence)
196
- Tool/output tokens are dominating this session (237k tokens).
197
- 1. Stop loading full logs or broad command output.
198
- 2. Rerun failing commands with tight filters or short ranges.
199
- 3. Ask the agent to summarize current errors before reading more files.
200
- Rescue: npx getprismo watch --rescue
201
-
202
- Signals
203
- - Repeated file: lib/prismo-dev-scan.js (286x)
204
- - Repeated file: node bin/prismo.js (85x)
205
- - Generated artifacts: lockfiles (60 mentions)
206
- - Generated artifacts: __pycache__ (47 mentions)
207
-
208
- Suggested Action
209
- Run: npx getprismo doctor
210
- ```
32
+ Prismo turns those patterns into controls, then measures the result.
211
33
 
212
- watch caught lockfiles entering context, a file being read 286 times, and tool output dominating the session. without this, you'd never know.
34
+ ## What Gets Measured
213
35
 
214
- ---
36
+ The launch report is built around proof, not vibes:
215
37
 
216
- ## new: optimizer fit
217
-
218
- not every token optimizer solves the same bottleneck. before stacking compression proxies, repo packers, code indexes, and MCP tools, run:
38
+ - **Verified saved**: tokens and dollars saved after later sessions prove waste dropped
39
+ - **Live prevented**: estimated tokens blocked before they entered context
40
+ - **Proactivity**: live detections, interventions, and loop stops while coding
41
+ - **Still measuring**: interventions waiting for enough later sessions to verify impact
42
+ - **Top cause**: the waste pattern causing the most damage
219
43
 
220
44
  ```bash
221
- npx getprismo scan --optimizer-fit
45
+ npx getprismo digest
222
46
  ```
223
47
 
224
- PrismoDev scores your actual repo/session signals and recommends the right path:
48
+ Example output:
225
49
 
226
50
  ```text
227
- Prismo Optimizer Fit
228
-
229
- Primary bottleneck: Generated artifacts / ignore cleanup: HIGH
230
-
231
- Bottlenecks
232
- - Generated artifacts / ignore cleanup: High
233
- .claudeignore is missing
234
- - Oversized command/tool output: Medium
235
- 237k tool/output tokens found in local sessions
236
- - Repeated source exploration: Low
237
- Repo/source exploration does not look like the main bottleneck
238
-
239
- Recommended Stack
240
- 1. Apply safe ignore/context fixes first.
241
- Run: npx getprismo doctor --apply-suggestions --dry-run
242
- Category: ignore cleanup (.claudeignore, .cursorignore)
243
- 2. Sandbox noisy command output before adding more code-indexing tools.
244
- Run: npx getprismo shield -- <noisy command>
245
- Category: output sandboxing (Prismo shield, context-mode, RTK, tokf, distill)
51
+ Prismo controlled 21 AI coding session(s) over 7 day(s).
52
+ Verified saved: ~0 tokens / $0.00.
53
+ Live prevented: ~0 tokens / $0.00 estimated.
54
+ Proactivity: 2 live control event(s), 65 intervention(s) or loop stop(s).
55
+ Interventions: 65 completed, 0 verified improved, 3 still measuring.
56
+ Context observed: 620,000 tokens; pre-control opportunity: ~286,000 tokens.
57
+ Top cause: Tool-output floods (~286,000 tokens).
246
58
  ```
247
59
 
248
- This makes PrismoDev the measure-first layer: it tells you whether you need ignore cleanup, output sandboxing, code indexing, repo packing, instruction trimming, session splitting, or MCP/tool hygiene.
249
-
250
- For the short version:
60
+ ## Core Commands
251
61
 
252
62
  ```bash
253
- npx getprismo scan --report-card
63
+ npx getprismo doctor # diagnose and apply safe repo fixes
64
+ npx getprismo protect # one-command protection for this repo
65
+ npx getprismo shield -- npm test # keep noisy command output out of agent context
66
+ npx getprismo enforce install # Claude Code runtime context/loop enforcement
67
+ npx getprismo agent --watch # run the local repair/verification agent
68
+ npx getprismo digest # launch report with verified savings
254
69
  ```
255
70
 
256
- That prints the simplest decision:
257
-
258
- ```text
259
- PrismoDev Report Card
71
+ Full command docs: [docs/manual.md](docs/manual.md).
260
72
 
261
- Biggest waste: Generated artifacts / ignore cleanup: High
262
- Start with: npx getprismo doctor --apply-suggestions --dry-run
263
- Then: npx getprismo shield -- <noisy command>
264
- Code index needed: not yet
265
- Round-trip risk: Low
266
- ```
73
+ ## Cloud Connector
267
74
 
268
- To benchmark a noisy command:
75
+ Local-only mode works without login:
269
76
 
270
77
  ```bash
271
- npx getprismo benchmark -- npm test
272
- npx getprismo benchmark session
273
- ```
274
-
275
- `benchmark -- <command>` measures raw command output tokens versus the compact shield summary. `benchmark session` summarizes recent local Claude/Codex sessions, including round-trip context signals like tool calls, repeated commands, repeated source reads, and MCP/tool surface.
276
-
277
- ---
278
-
279
- ## new: context shield
280
-
281
- if you know a command may dump huge output, run it through prismo:
282
-
283
- ```bash
284
- npx getprismo shield -- npm test
285
- npx getprismo shield -- pytest -q
286
- npx getprismo shield -- npm run build
287
- ```
288
-
289
- shield executes the command locally, stores full stdout/stderr under `.prismo/shield/runs/`, indexes the output in `.prismo/shield/shield.sqlite` using SQLite FTS5 when available, and prints only a compact summary plus useful error lines.
290
-
291
- this is the lightweight context-sandbox layer: the full output stays on disk until you explicitly inspect it, instead of being pasted into the model context and re-sent every turn.
292
-
293
- example:
294
-
295
- ```text
296
- Prismo Shield
297
-
298
- Command: npm test
299
- Exit: 1
300
- Captured: 186 KB (~46,500 tokens kept out of chat)
301
-
302
- Full Output Stored:
303
- - .prismo/shield/runs/2026-05-20T.../stdout.txt
304
- - .prismo/shield/runs/2026-05-20T.../stderr.txt
305
- - .prismo/shield/shield.sqlite
306
-
307
- Summary Returned To Context:
308
- - ERROR: auth.test.ts expected 200 received 401
309
- - FAIL src/auth/session.test.ts
310
- ```
311
-
312
- search previous shield output without reloading whole logs:
313
-
314
- ```bash
315
- npx getprismo shield last
316
- npx getprismo shield search "auth expected 200"
317
- npx getprismo shield search "AUTH_FAILURE" --json
318
- ```
319
-
320
- when `watch` detects tool-output floods or repeated command loops, it now recommends this flow directly:
321
-
322
- ```text
323
- Shield Plan
324
- Run: npx getprismo shield -- <noisy command>
325
- Then: npx getprismo shield search "<error text>"
326
- MCP: prismo_shield_run -> prismo_shield_search
327
- ```
328
-
329
- this is intentionally not magic interception yet. it is a safe local-first primitive you can tell agents to use for noisy commands.
330
-
331
- ---
332
-
333
- ## workspace agent
334
-
335
- Prismo Cloud can guide the work from the dashboard, but your repo still lives on your machine. `agent` is the local bridge.
336
-
337
- ```bash
338
- npx getprismo connect --token <your Prismo API key>
339
- npx getprismo agent --watch
340
- ```
341
-
342
- After that, the Prismo workspace can queue safe actions like `doctor`, `sync`, `guard`, `context`, `optimize`, and allowlisted `shield` commands. The local agent claims those actions, executes them in the selected repo, and reports the status back to Prismo Cloud.
343
-
344
- This keeps the product flow simple:
345
-
346
- ```text
347
- dashboard recommends fix -> local agent runs safe command -> dashboard refreshes with the result
348
- ```
349
-
350
- `agent` does not upload prompts, source code, file contents, stdout, stderr, or full command logs. It uploads action status and safe aggregate metrics. Cloud actions are intentionally limited; arbitrary shell commands and shell metacharacters are rejected.
351
-
352
- For CI-style polling or debugging, run one pass:
353
-
354
- ```bash
355
- npx getprismo agent --once
356
- npx getprismo agent --once --json
357
- ```
358
-
359
- ---
360
-
361
- ## new: live guardrails mode
362
-
363
- the easiest proactive mode is guard:
364
-
365
- ```bash
366
- npx getprismo connect --token <your Prismo API key>
367
- npx getprismo guard --watch
368
- ```
369
-
370
- `guard` packages the local prevention loop: live guardrails, context throttling, context firewall updates, guard event history, and dashboard-ready prevention events. it never uploads prompts, source code, file contents, stdout, stderr, or full command logs.
371
-
372
- run it once for a snapshot:
373
-
374
- ```bash
375
- npx getprismo guard
376
- npx getprismo guard --json
377
- npx getprismo guard --no-sync
378
- ```
379
-
380
- the lower-level watch mode is:
381
-
382
- ```bash
383
- npx getprismo watch --auto
384
- ```
385
-
386
- `--auto` turns on live guardrails, live context throttling, event logging, and a default 600k session budget. it writes:
387
-
388
- ```text
389
- .prismo/live-guardrails.md
390
- .prismo/live-context-throttle.md
391
- .prismo/live-rescue-prompt.md
392
- .prismo/watch-events.jsonl
393
- ```
394
-
395
- if you want prismodev to keep updating instructions while the session runs, use:
396
-
397
- ```bash
398
- npx getprismo watch --guardrails
399
- ```
400
-
401
- this writes and continuously updates:
402
-
403
- ```text
404
- .prismo/live-guardrails.md
405
- .prismo/live-rescue-prompt.md
406
- ```
407
-
408
- the idea is simple: tell your coding agent once at the start of the session:
409
-
410
- ```text
411
- follow .prismo/live-guardrails.md during this session.
412
- ```
413
-
414
- then keep `watch --guardrails` running. when prismodev detects tool-output floods, artifact leaks, repeated reads, loops, or context spikes, it updates the guardrails file with the current issue and the exact behavior the agent should follow next.
415
-
416
- example guardrails:
417
-
418
- ```md
419
- # Prismo Live Guardrails
420
-
421
- Context pressure: High
422
- Current issue: tool-output-flood
423
- Confidence: high
424
-
425
- ## Effective Immediately
426
-
427
- - Stop loading full logs or broad command output.
428
- - Rerun failing commands with tight filters or short ranges.
429
- - Ask the agent to summarize current errors before reading more files.
430
- - Do not read generated artifacts, lockfiles, caches, build output, coverage, or logs unless explicitly required.
431
- ```
432
-
433
- this does not secretly control claude code or codex internals. it gives the agent a live-updating instruction file to follow, which is the safest local-first way to reduce token waste without requiring an IDE extension or agent plugin.
434
-
435
- ---
436
-
437
- ## new: live rescue mode
438
-
439
- when `watch` detects a session going sideways, run:
440
-
441
- ```bash
442
- npx getprismo watch --rescue
443
- ```
444
-
445
- it prints a paste-ready rescue prompt for the current ai coding session:
446
-
447
- ```text
448
- Prismo Rescue Prompt
449
-
450
- Paste this into the current AI coding session:
451
-
452
- We are in a high-context AI coding session. Stop broad exploration and recover state before doing more work.
453
-
454
- Current Prismo signal: tool-output-flood (high confidence).
455
- Summary: Tool/output tokens are dominating this session (264k tokens).
456
- Context pressure: High. Session size: 1.11M tokens. Tool output: 264k tokens.
457
-
458
- Do this now:
459
- 1. Stop loading full logs or broad command output.
460
- 2. Rerun failing commands with tight filters or short ranges.
461
- 3. Ask the agent to summarize current errors before reading more files.
462
-
463
- Before reading or editing anything else, summarize:
464
- - files changed so far
465
- - exact failing command or error
466
- - current hypothesis
467
- - next smallest file/test to inspect
468
-
469
- Do not re-read these files unless they changed.
470
- Do not read generated/noisy artifacts unless explicitly required.
471
- ```
472
-
473
- `watch --rescue --json` includes the same prompt as `rescuePrompt`, plus the structured live action:
474
-
475
- ```json
476
- {
477
- "live": {
478
- "contextPressure": "High",
479
- "liveAction": {
480
- "cause": "tool-output-flood",
481
- "confidence": "high",
482
- "summary": "Tool/output tokens are dominating this session.",
483
- "rescueAvailable": true
484
- }
485
- }
486
- }
487
- ```
488
-
489
- live action causes include:
490
-
491
- - `tool-output-flood`
492
- - `artifact-leak`
493
- - `possible-loop`
494
- - `repeated-file-read`
495
- - `context-spike`
496
- - `high-context-pressure`
497
-
498
- this is the proactive part of prismodev: it does not just tell you something is expensive. it tells you what to do **right now** while the session is still recoverable.
499
-
500
- use `--guardrails` when you want files to update automatically during the session. use `--rescue` when you want a one-shot prompt to paste immediately.
501
-
502
- ---
503
-
504
- ## new: live context throttle
505
-
506
- if you want prismodev to enforce a session budget while you work, run:
507
-
508
- ```bash
509
- npx getprismo watch --throttle --budget 600k
510
- ```
511
-
512
- this writes:
513
-
514
- ```text
515
- .prismo/live-context-throttle.md
516
- ```
517
-
518
- when the active session gets near or crosses the budget, watch turns that into a live action:
519
-
520
- ```text
521
- Cause: token-budget-exceeded
522
- Stop broad exploration.
523
- Summarize current state before more file reads.
524
- Start a fresh scoped session at the next task boundary.
525
- ```
526
-
527
- use it with guardrails for the most proactive setup:
528
-
529
- ```bash
530
- npx getprismo watch --auto
531
- ```
532
-
533
- that gives the agent a live instruction file, a rescue prompt, and a stricter context throttle file that updates as the session changes.
534
-
535
- `watch --auto` also appends changed live warnings to `.prismo/watch-events.jsonl`, so expensive-session events can be reused later in postmortems.
536
-
537
- Use `--no-events` when you want live protection without writing session event history:
538
-
539
- ```bash
540
- npx getprismo watch --auto --no-events
541
- ```
542
-
543
- ---
544
-
545
- ## new: context firewall
546
-
547
- generate a scoped context policy before a task:
548
-
549
- ```bash
550
- npx getprismo firewall auth-bug
551
- ```
552
-
553
- this writes:
554
-
555
- ```text
556
- .prismo/context-firewall.md
557
- .prismo/allowed-context.txt
558
- .prismo/blocked-context.txt
559
- .prismo/firewall-prompt.md
560
- ```
561
-
562
- the firewall tells the agent what it should read first and what it should avoid unless it explains why. this is the prevention layer: instead of only warning after context bloat happens, prismodev gives the agent a smaller context boundary up front.
563
-
564
- example:
565
-
566
- ```text
567
- Allowed first:
568
- - .prismo/architecture-summary.md
569
- - .prismo/backend-summary.md
570
- - backend/app/*/auth/*
571
-
572
- Blocked unless justified:
573
- - node_modules/**
574
- - .next/**
575
- - dist/**
576
- - coverage/**
577
- - package-lock.json
578
- ```
579
-
580
- `watch --auto` also updates `.prismo/context-firewall.md` when it detects live waste, so the active session gets a tighter context policy as pressure rises.
581
-
582
- ---
583
-
584
- ## real output: cc timeline
585
-
586
- run `npx getprismo cc timeline` after a session to understand what happened:
587
-
588
- ```
589
- Prismo Claude Code Cost
590
-
591
- Session: 7689982e-42a3-44fb-9734-2588e5e01145
592
- Model: claude-opus-4-6
593
-
594
- Timeline
595
- 05:24 PM Generated artifact likely entered context package-lock.json (2x)
596
- 05:24 PM Generated artifact likely entered context logs/debug-output.json (1x)
597
- 05:24 PM Repeated file/path context CLAUDE.md (8x)
598
- 05:24 PM Repeated file/path context AGENTS.md (8x)
599
- 05:24 PM Repeated file/path context node bin/prismo.js (6x)
600
-
601
- Suggested Action
602
- Run npx getprismo optimize, then start from .prismo/architecture-summary.md.
603
- ```
604
-
605
- timeline shows exactly what leaked, what repeated, and what to do differently next time.
606
-
607
- to turn a postmortem into a safer next-session policy, run:
608
-
609
- ```bash
610
- npx getprismo cc timeline --firewall --task auth-bug
611
- ```
612
-
613
- this writes `.prismo/timeline-firewall-suggestions.md`, `.prismo/context-firewall.suggested.md`, `.prismo/allowed-context.suggested.txt`, and `.prismo/blocked-context.suggested.txt` from the latest session evidence. it does not overwrite your active firewall; it gives you a per-task allow/block recommendation for the next session.
614
-
615
- ---
616
-
617
- ## how doctor improves a repo
618
-
619
- doctor does four things in sequence:
620
-
621
- 1. **scans** the repo and reads local codex/claude code session logs
622
- 2. **applies safe fixes** — creates `.claudeignore`, `.cursorignore`, generates recommendation templates
623
- 3. **generates context packs** — compact `.prismo/` files that give agents focused context instead of reading everything
624
- 4. **re-scans** and shows the before/after score
625
-
626
- what doctor creates:
627
-
628
- ```
629
- .claudeignore blocks waste from claude code
630
- .cursorignore blocks waste from cursor
631
- .prismo/architecture-summary.md compact project overview for agents
632
- .prismo/backend-summary.md backend-specific context
633
- .prismo/frontend-summary.md frontend-specific context
634
- .prismo/recommended-CLAUDE.boilerplate.md CLAUDE.md boilerplate reference; do not overwrite curated files
635
- .prismo/recommended-AGENTS.boilerplate.md AGENTS.md boilerplate reference; do not overwrite curated files
636
- .prismo/recommended-.claudeignore full recommended ignore list
637
- .prismo/recommended-.cursorignore full recommended ignore list
638
- .prismo/recommended-.gitignore-additions things your gitignore might be missing
639
- prismo-dev-report.md full diagnostic report
640
- ```
641
-
642
- if an existing `.claudeignore` or `.cursorignore` already covers prismo's recommendations, doctor skips the suggested ignore file instead of creating redundant noise. the default recommendations include common project state, local db, export, credential, and token patterns such as `*_state.json`, `*_tokens.json`, `*_export.json`, `*.sqlite`, `models/`, and `state-backups/`.
643
-
644
- backend and frontend summaries include load-bearing candidates ranked by import references, text-reference signals, recent git touches when available, and file size, not just directory listings.
645
-
646
- prismo also flags source-stream dumps separately from normal build artifacts. large inbox/calendar/github/event payload files are treated as operational noise because they often get summarized once, written near the repo, and then accidentally re-read by later coding sessions.
647
-
648
- what doctor never touches:
649
-
650
- - your real `CLAUDE.md`
651
- - your real `AGENTS.md`
652
- - your `.gitignore`
653
- - any source code
654
- - any config files
655
-
656
- it only creates new files and recommendations. you decide what to apply.
657
-
658
- ---
659
-
660
- ## cursor session tracking
661
-
662
- prismodev now reads cursor's local sqlite databases directly. cursor stores data differently from claude code and codex, no jsonl session logs, but it has its own tracking databases with unique data.
663
-
664
- ```bash
665
- npx getprismo cursor # summary of all cursor sessions
666
- npx getprismo cursor list # list composer sessions with modes and models
667
- npx getprismo cursor authorship # ai vs human code authorship from scored commits
668
- npx getprismo cursor timeline # timeline of ai activity across commits and files
669
- npx getprismo cursor files # ai-generated and ai-deleted file tracking
670
- npx getprismo cursor --json # machine-readable output
671
- ```
672
-
673
- cursor tracks something claude code and codex can't: per-commit ai authorship. every commit is scored with how many lines came from composer (agent), tab completions, and human typing. prismodev surfaces this as an authorship percentage.
674
-
675
- ```
676
- AI Authorship (from Cursor scored commits)
677
-
678
- Commits analyzed: 47
679
- Total lines added: 3812
680
-
681
- Composer (agent): 2104 lines
682
- Tab completions: 891 lines
683
- Human: 817 lines
684
- --------------------------------------------------
685
- AI authorship: 78%
686
- ```
687
-
688
- prismodev also tracks ai-generated files cursor is watching, files cursor deleted, conversation summaries, and model usage distribution across sessions.
689
-
690
- what cursor can't do vs claude code: cursor doesn't expose per-message token counts, exact api costs, or full conversation transcripts in its local data. that means live context pressure, loop detection, exact cost breakdowns, cache savings analysis, and shield don't apply the same way. this is a cursor limitation. prismodev gets about 60-65% feature parity with cursor compared to claude code/codex.
691
-
692
- what cursor gives you that the others don't: ai authorship percentages per commit, tab vs composer vs human line counts, conversation summaries with tldr, and ai-generated file tracking with churn detection.
693
-
694
- the `prismo_cursor_sessions` mcp tool exposes all of this to compatible agents.
695
-
696
- `scan` and `doctor` now detect cursor's tracking database automatically and flag ai-generated files still present in the repo.
697
-
698
- ---
699
-
700
- ## run receipts and incident replay
701
-
702
- `receipt` turns recent local sessions into a plain-English run receipt:
703
-
704
- ```bash
705
- npx getprismo receipt
706
- npx getprismo receipt codex --json
707
- ```
708
-
709
- it summarizes repeated reads, generated artifacts, tool-output floods, repeated commands, likely influence, and the next scoped action to take. it also reports a heuristic context-efficiency metric: decision/progress signals per 1k tokens, with drag factors such as repeated reads, artifact leaks, tool-output floods, and command loops.
710
-
711
- `replay` is the postmortem view:
712
-
713
- ```bash
714
- npx getprismo replay
715
- ```
716
-
717
- it classifies the incident pattern, explains what happened, and prints a recovery prompt for the next agent run.
718
-
719
- `timeline` looks across many sessions instead of one:
720
-
721
- ```bash
722
- npx getprismo timeline --last 20
723
- ```
724
-
725
- it surfaces recurring waste patterns such as the same lockfile leaking into many sessions, the same source file being repeatedly reread, or several sessions crossing high context pressure.
726
-
727
- `instructions audit` looks at persistent rules:
728
-
729
- ```bash
730
- npx getprismo instructions audit
731
- npx getprismo instructions ablate --dry-run
732
- npx getprismo instructions apply --dry-run
733
- ```
734
-
735
- it scores rules in `CLAUDE.md`, `AGENTS.md`, `.codex/AGENTS.md`, `.codex/instructions.md`, and `.openai/instructions.md`, then separates observable violations, partial compliance, duplicated rules, trim candidates, and influence-unknown rules. `instructions ablate --dry-run` creates a conservative ablation plan with candidates, sample-count guidance, rollback notes, and variance warnings; it does not edit files. `instructions apply` safely removes exact duplicate instruction lines only, writes backups first, and leaves uncertain rules as recommendations.
736
-
737
- `boundaries` checks parallel-agent isolation:
738
-
739
- ```bash
740
- npx getprismo boundaries
741
- ```
742
-
743
- it reports whether visible local agents are overlapping on the same files, leaking the same artifacts, or running noisy sessions that should move into shield or separate worktrees.
744
-
745
- ---
746
-
747
- ## how watch catches waste live
748
-
749
- watch reads local session logs from codex, claude code, and cursor. it detects:
750
-
751
- | signal | what it means |
752
- |--------|--------------|
753
- | context pressure HIGH | session is consuming too many tokens |
754
- | repeated file 286x | agent keeps re-reading the same file |
755
- | lockfiles entered context | `package-lock.json` got loaded (pure waste) |
756
- | tool output dominating | agent output is larger than actual code context |
757
- | loop suspicion | agent may be stuck in a command loop |
758
- | recent growth +380k | context just spiked by 380k tokens |
759
-
760
- watch tells you the single most useful action to take right now. usually: start a fresh session, or switch to a scoped context pack.
761
-
762
- if you run multiple agents in the same repo, use:
763
-
764
- ```bash
765
- npx getprismo watch --agents
766
- ```
767
-
768
- multi-agent watch shows every visible local Codex/Claude Code session for the repo, ranks each agent by context pressure, and flags coordination risks like two agents repeatedly loading the same file, shared artifact leaks, multiple high-pressure sessions, or agents that should move noisy commands into `shield`.
769
-
770
- the same multi-agent coordination signal is included in `usage --json`, `scan --usage --json`, doctor output, and the generated markdown report whenever multiple local sessions are visible for the repo.
771
-
772
- `watch --rescue` prints a paste-ready prompt for the active coding session. use it when the agent is looping, reading too many files, or flooding context with logs:
773
-
774
- ```bash
775
- npx getprismo watch --rescue
776
- ```
777
-
778
- the rescue prompt tells the agent to stop broad exploration, summarize changed files and current failures, avoid noisy artifacts, and continue from the next smallest useful file/test.
779
-
780
- watch is tuned for large repos:
781
-
782
- - ignores absolute paths outside the target repo
783
- - keeps generated artifacts out of repeated-source-file actions
784
- - groups lockfiles, `__pycache__`, `node_modules`, and hashed build assets separately
785
- - only treats repeated non-generated files as actionable when they exist inside the target repo
786
-
787
- this keeps large-repo output focused on real source context instead of path noise from old logs or unrelated projects.
788
-
789
- ---
790
-
791
- ## quick start
792
-
793
- ```bash
794
- # see what prismodev does without touching anything
795
- npx getprismo demo
796
-
797
- # simple plain-english check
798
- npx getprismo scan --simple
799
-
800
- # the full workflow
801
78
  npx getprismo doctor
802
- npx getprismo watch --once
803
- npx getprismo receipt
804
- npx getprismo replay
805
- ```
806
-
807
- if you don't have node installed, get it from [nodejs.org](https://nodejs.org) (LTS). then:
808
-
809
- ```bash
810
- node -v # should print 18+
811
- npx getprismo doctor
812
- ```
813
-
814
- no install needed. npx runs it directly.
815
-
816
- ---
817
-
818
- ## all commands
819
-
820
- | command | what it does |
821
- |---------|-------------|
822
- | `doctor` | diagnose, fix, optimize, show before/after |
823
- | `repair <cause\|auto>` | targeted repair for one waste cause; auto = planner picks with cooldowns and verdict feedback |
824
- | `enforce` | runtime enforcement of the context firewall via claude code hooks |
825
- | `digest` | verified-savings summary for the week, in dollars, ready for slack |
826
- | `watch` | live session monitoring with warnings |
827
- | `cc` | claude code cost breakdown |
828
- | `cc timeline` | session reconstruction with events |
829
- | `cursor` | cursor session tracking and ai authorship |
830
- | `receipt` | run receipt for reads, repeats, output, artifacts, context efficiency, likely influence, and next-run scope |
831
- | `replay` | incident replay with root cause and recovery prompt |
832
- | `timeline` | recurring context-waste patterns across recent sessions |
833
- | `instructions audit` | instruction ROI audit for CLAUDE.md / AGENTS.md violations, partial compliance, duplicates, and influence-unknown rules |
834
- | `instructions ablate --dry-run` | conservative ablation plan for instruction candidates without editing files |
835
- | `instructions apply` | safely dedupe exact duplicate instruction lines with backups |
836
- | `boundaries` | multi-agent boundary check for shared files/artifacts and worktree overlap |
837
- | `scan --usage` | full repo scan with local usage data |
838
- | `scan --optimizer-fit` | recommend which token-optimization path fits your repo/session |
839
- | `scan --report-card` | shortest decision-layer summary |
840
- | `benchmark` | measure command-output reduction or recent session round-trip context |
841
- | `scan --simple` | plain-english summary |
842
- | `scan --fix` | create safe fix files |
843
- | `scan --ci` | fail CI when token-risk gates fail |
844
- | `optimize` | generate `.prismo/` context packs |
845
- | `context` | print paste-ready prompt for agents |
846
- | `shield` | run noisy commands while keeping full output out of chat |
847
- | `agent` | claim and execute safe Prismo Cloud workspace actions locally |
848
- | `mcp` | expose PrismoDev tools over local MCP stdio |
849
- | `setup` | detect tools, logs, proxy readiness |
850
- | `usage` | show raw session token usage |
851
- | `init` | add npm scripts and .prismo/README.md |
852
- | `demo` | sample output without reading your repo |
853
-
854
- ---
855
-
856
- ## doctor modes
857
-
858
- ```bash
859
- npx getprismo doctor # full run
860
- npx getprismo firewall auth-bug # generate scoped context firewall
861
- npx getprismo doctor --dry-run # preview without writing files
862
- npx getprismo doctor --apply-ignores-only # only create ignore files
863
- npx getprismo doctor --apply-suggestions # append missing ignore suggestions with backups
864
- npx getprismo doctor --apply-suggestions --dry-run # preview the exact ignore-rule diff
865
- npx getprismo doctor --no-context-packs # skip .prismo/ generation
866
- npx getprismo doctor frontend # scope to frontend
867
- npx getprismo doctor --json # machine-readable output
868
- ```
869
-
870
- ---
871
-
872
- ## watch modes
873
-
874
- ```bash
875
- npx getprismo guard # proactive local guard snapshot
876
- npx getprismo guard --watch # keep guardrails active and sync prevention events
877
- npx getprismo guard --no-sync # keep all guard events local
878
- npx getprismo guard --dry-run # preview guard actions without writing state
879
- npx getprismo guard --json # dashboard-ready guard payload
880
- ```
881
-
882
- ```bash
883
- npx getprismo watch # live refresh
884
- npx getprismo watch --once # single snapshot
885
- npx getprismo watch --agents # multi-agent coordination view
886
- npx getprismo watch --agents --json # machine-readable multi-agent state
887
- npx getprismo watch --once --report # write .prismo/watch-report.md
888
- npx getprismo watch --once --json # machine-readable
889
- npx getprismo watch --auto # guardrails + throttle + 600k budget
890
- npx getprismo watch --auto --no-events # live protection without event history
891
- npx getprismo watch --guardrails # update .prismo/live-guardrails.md continuously
892
- npx getprismo watch --guardrails --json # include guardrailsPath and rescuePath
893
- npx getprismo watch --throttle --budget 600k # enforce a live context budget
894
- npx getprismo watch --events # append changed warnings to .prismo/watch-events.jsonl
895
- npx getprismo watch --rescue # paste-ready live-session rescue prompt
896
- npx getprismo watch --rescue --json # include rescuePrompt in JSON
897
- npx getprismo watch --once --redact-paths # hide local paths
898
- npx getprismo watch codex # only codex sessions
899
- npx getprismo watch claude # only claude code sessions
900
- npx getprismo watch cursor # only cursor sessions
901
- ```
902
-
903
- ### shield mode
904
-
905
- ```bash
906
- npx getprismo shield -- npm test
907
- npx getprismo shield -- pytest -q
908
- npx getprismo shield --json -- npm run build
909
- npx getprismo shield last
910
- npx getprismo shield search "auth failure"
79
+ npx getprismo protect
911
80
  ```
912
81
 
913
- ### workspace agent mode
82
+ Connect when you want the dashboard, repair queue, live control feed, verified savings, and fleet learning:
914
83
 
915
84
  ```bash
916
- npx getprismo agent # claim queued workspace actions once
917
- npx getprismo agent --watch # keep polling Prismo Cloud for safe actions
918
- npx getprismo agent --interval 15 # poll every 15 seconds
919
- npx getprismo agent --limit 3 # claim up to 3 actions per poll
920
- npx getprismo agent --json # machine-readable action result
921
- npx getprismo agent /path/to/repo # run actions against a specific repo
922
- ```
923
-
924
- ### mcp mode
925
-
926
- ```bash
927
- npx getprismo mcp
928
- npx getprismo mcp /path/to/repo
85
+ npx getprismo connect --token <your Prismo API key>
86
+ npx getprismo connector install
929
87
  ```
930
88
 
931
- `mcp` starts a local stdio MCP server for agent clients. It exposes:
932
-
933
- - `prismo_scan`
934
- - `prismo_doctor_dry_run`
935
- - `prismo_watch_snapshot`
936
- - `prismo_multi_agent_watch`
937
- - `prismo_shield_run`
938
- - `prismo_shield_search`
939
- - `prismo_shield_last`
940
- - `prismo_context_pack`
941
- - `prismo_firewall`
942
- - `prismo_cc_timeline`
943
- - `prismo_cursor_sessions`
944
- - `prismo_receipt`
945
- - `prismo_instructions_audit`
946
- - `prismo_instructions_ablate`
947
- - `prismo_timeline`
948
- - `prismo_replay`
949
- - `prismo_boundaries`
89
+ The connector syncs aggregate session telemetry, claims safe repairs, publishes live control events, and verifies impact against future sessions.
950
90
 
951
- This lets an MCP-compatible agent search prior shielded test/build output, request scoped context packs, inspect token-waste signals, or coordinate multiple local agents without pasting giant logs into the conversation.
91
+ ## Privacy
952
92
 
953
- Generic MCP client config:
93
+ PrismoDev does **not** upload raw prompts, source code, stdout, stderr, or full command logs.
954
94
 
955
- ```json
956
- {
957
- "mcpServers": {
958
- "prismodev": {
959
- "command": "npx",
960
- "args": ["-y", "getprismo", "mcp", "/path/to/your/repo"]
961
- }
962
- }
963
- }
964
- ```
965
-
966
- For local development from this repo:
967
-
968
- ```json
969
- {
970
- "mcpServers": {
971
- "prismodev": {
972
- "command": "node",
973
- "args": ["/path/to/prismodev/bin/prismo.js", "mcp", "/path/to/your/repo"]
974
- }
975
- }
976
- }
977
- ```
978
-
979
- ---
95
+ It syncs metadata needed for the control plane:
980
96
 
981
- ## cc modes
97
+ - repo identity and branch
98
+ - tool name and session id
99
+ - token totals and risk scores
100
+ - top waste cause
101
+ - intervention status
102
+ - verified saved tokens/dollars
982
103
 
983
- ```bash
984
- npx getprismo cc # latest session cost
985
- npx getprismo cc timeline # event timeline for latest session
986
- npx getprismo cc timeline --firewall --task auth-bug # suggest next-session firewall rules
987
- npx getprismo cc list # list recent sessions
988
- npx getprismo cc last 5 # last 5 sessions
989
- npx getprismo cc all # everything
990
- npx getprismo cc timeline --json # machine-readable timeline
991
- ```
104
+ Detailed telemetry docs: [docs/privacy-telemetry.md](docs/privacy-telemetry.md).
992
105
 
993
- ---
106
+ ## Runtime Enforcement
994
107
 
995
- ## ci integration
108
+ Claude Code can be hard-blocked through hooks:
996
109
 
997
110
  ```bash
998
- npx getprismo scan --ci --no-report
999
- ```
1000
-
1001
- exits non-zero when:
1002
- - score is below threshold
1003
- - risk is too high
1004
- - ai ignore files are missing
1005
- - generated artifacts are exposed
1006
- - large files are exposed
1007
-
1008
- add to your ci:
1009
-
1010
- ```json
1011
- {
1012
- "scripts": {
1013
- "ai:ci": "prismo scan --ci --no-report"
1014
- }
1015
- }
111
+ npx getprismo enforce install
1016
112
  ```
1017
113
 
1018
- ---
114
+ This can deny blocked-context reads and repeated command loops before they spend tokens. Codex and Cursor are visible and repairable through logs, MCP, shield, and guardrails; universal hard-blocking for those agents requires wrapper or deeper pre-tool hooks.
1019
115
 
1020
- ## scoped context packs
116
+ ## Beta Test Loop
1021
117
 
1022
- prismodev generates context packs scoped to different areas of your codebase:
118
+ For the proof week:
1023
119
 
1024
120
  ```bash
1025
- npx getprismo optimize frontend
1026
- npx getprismo optimize backend
1027
- npx getprismo optimize auth
1028
- npx getprismo context frontend # prints a paste-ready prompt
1029
- npx getprismo context backend
1030
- ```
1031
-
1032
- use these as the starting point for coding sessions instead of letting agents explore the whole repo.
1033
-
1034
- ---
1035
-
1036
- ## tracking modes
1037
-
1038
- ```
1039
- local scan heuristic repo/context risk, no keys needed
1040
- local logs exact when codex/claude session logs expose token fields
1041
- prismo proxy exact usage/cost when traffic routes through prismo base url
121
+ npx getprismo protect
122
+ npx getprismo connector status
123
+ npx getprismo digest
1042
124
  ```
1043
125
 
1044
- prismodev reads local session data from:
1045
- - codex: `~/.codex/sessions/**/*.jsonl`
1046
- - claude code: `~/.claude/projects/**/*.jsonl`
1047
- - cursor: `~/.cursor/ai-tracking/ai-code-tracking.db` and `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb`
126
+ Then code normally. Do not optimize for the demo. Let Prismo observe real sessions, intervene where it can, and verify the savings later.
1048
127
 
1049
- no api keys. no intercepted prompts. no data uploaded.
1050
-
1051
- ---
1052
-
1053
- ## what gets generated
1054
-
1055
- ```
1056
- .prismo/
1057
- ├── architecture-summary.md
1058
- ├── backend-summary.md
1059
- ├── frontend-summary.md
1060
- ├── frontend-context.md
1061
- ├── backend-context.md
1062
- ├── recommended-CLAUDE.boilerplate.md
1063
- ├── recommended-AGENTS.boilerplate.md
1064
- ├── recommended-.claudeignore
1065
- ├── recommended-.cursorignore
1066
- ├── recommended-.gitignore-additions
1067
- ├── optimize-report.md
1068
- └── watch-report.md (when using --report)
1069
- ```
1070
-
1071
- all recommendation files. nothing is overwritten. you decide what to use.
1072
-
1073
- ---
1074
-
1075
- ## init (npm project setup)
128
+ At the end:
1076
129
 
1077
130
  ```bash
1078
- npx getprismo init
1079
- ```
1080
-
1081
- adds to your `package.json`:
1082
-
1083
- ```json
1084
- {
1085
- "scripts": {
1086
- "ai:doctor": "prismo doctor",
1087
- "ai:watch": "prismo watch",
1088
- "ai:context": "prismo context",
1089
- "ai:scan": "prismo scan --usage"
1090
- }
1091
- }
1092
- ```
1093
-
1094
- then your team can run `npm run ai:doctor` without remembering the full command.
1095
-
1096
- ---
1097
-
1098
- ## philosophy
1099
-
1100
- - local first. nothing leaves your machine.
1101
- - safe by default. doctor never overwrites your real config files.
1102
- - exact when possible. reads real session logs when agents expose them.
1103
- - honest about limits. uses "likely" and "estimate" language when visibility is limited.
1104
- - one suggested action. every output ends with the single best thing to do next.
1105
-
1106
- ---
1107
-
1108
- ## works with
1109
-
1110
- - claude code (subscription and api modes)
1111
- - openai codex
1112
- - cursor
1113
- - any tool that respects `.claudeignore` or `.cursorignore`
1114
- - any repo (node, python, go, rust, vue, svelte, astro, monorepos, whatever)
1115
-
1116
- ---
1117
-
1118
- ## internal layout
1119
-
1120
- ```
1121
- lib/prismo-dev-scan.js cli entry and command dispatch
1122
- lib/prismo-dev/constants.js shared defaults, pricing, patterns
1123
- lib/prismo-dev/context-optimize.js context packs, scoped prompts
1124
- lib/prismo-dev/boundaries.js multi-agent boundary and worktree overlap checks
1125
- lib/prismo-dev/doctor.js doctor/dev/init orchestration
1126
- lib/prismo-dev/fixes.js safe ignore/template generation
1127
- lib/prismo-dev/instructions.js instruction ROI, partial-compliance, and ablation planning
1128
- lib/prismo-dev/mcp.js local MCP server and Prismo tool bindings
1129
- lib/prismo-dev/receipt.js run receipts for reads, output, artifacts, and next scope
1130
- lib/prismo-dev/report.js terminal, markdown, ci reports
1131
- lib/prismo-dev/repair-executors.js cause-specific repair executors with mild/aggressive tiers
1132
- lib/prismo-dev/repair-planner.js autonomous planner: cause scoring, cooldowns, local verdicts, escalation
1133
- lib/prismo-dev/enforce.js claude code PreToolUse hook enforcement and settings wiring
1134
- lib/prismo-dev/replay.js incident replay and recovery prompts
1135
- lib/prismo-dev/scan.js repo scanning, scoring, readiness
1136
- lib/prismo-dev/scan-path-utils.js scan ignore/path helper logic
1137
- lib/prismo-dev/shield.js local command shield and searchable output index
1138
- lib/prismo-dev/timeline.js recurring multi-session waste patterns
1139
- lib/prismo-dev/usage-cost.js Claude Code cost and timeline analysis
1140
- lib/prismo-dev/usage-log-utils.js local session log parsing helpers
1141
- lib/prismo-dev/cursor-sessions.js Cursor SQLite session and authorship tracking
1142
- lib/prismo-dev/usage-sessions.js local Codex/Claude/Cursor session discovery
1143
- lib/prismo-dev/usage-watch.js watch orchestration, JSON payloads, live files
1144
- lib/prismo-dev/utils.js shared terminal/file/token helpers
1145
- lib/prismo-dev/watch-live.js live context-pressure decisions
1146
- lib/prismo-dev/watch-render.js watch terminal and guardrail renderers
131
+ npx getprismo digest --days 7
1147
132
  ```
1148
133
 
1149
- ---
134
+ Those lines are the launch post.
1150
135
 
1151
- ## help
136
+ ## Development
1152
137
 
1153
138
  ```bash
1154
- npx getprismo --help
1155
- npx getprismo --version
1156
- npx getprismo doctor --help
1157
- npx getprismo repair --help
1158
- npx getprismo enforce --help
1159
- npx getprismo watch --help
1160
- npx getprismo shield --help
1161
- npx getprismo mcp --help
1162
- npx getprismo mcp doctor
1163
- npx getprismo cc --help
1164
- npx getprismo cursor --help
1165
- npx getprismo receipt --help
1166
- npx getprismo replay --help
1167
- npx getprismo timeline --help
1168
- npx getprismo instructions --help
1169
- npx getprismo boundaries --help
1170
- npx getprismo scan --help
139
+ npm test
140
+ node bin/prismo.js protect --json
141
+ node bin/prismo.js digest --json
1171
142
  ```
1172
143
 
1173
- More docs:
1174
-
1175
- - [MCP setup and tools](docs/mcp.md)
1176
- - [Live demo flow](docs/live-demo.md)
1177
- - [Privacy & telemetry — exactly what leaves your machine](docs/privacy-telemetry.md)
144
+ More docs: [docs/README.md](docs/README.md).