getprismo 0.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.
- package/README.md +110 -0
- package/bin/prismo.js +8 -0
- package/lib/prismo-dev-scan.js +2461 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Prismo Dev Tools
|
|
2
|
+
|
|
3
|
+
Prismo helps developers find and reduce token waste in AI coding workflows. It runs locally, supports Codex and Claude Code, and does not require API keys.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx getprismo dev
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## What It Does
|
|
10
|
+
|
|
11
|
+
- Scans your repo for token-waste risks before a coding-agent session.
|
|
12
|
+
- Reads local Codex and Claude Code logs when available to show real session usage.
|
|
13
|
+
- Generates compact `.prismo/` context files for Claude Code, Codex, Cursor, and similar tools.
|
|
14
|
+
- Recommends safer `.claudeignore`, `CLAUDE.md`, and `AGENTS.md` patterns.
|
|
15
|
+
- Works offline and does not connect to OpenAI, Anthropic, Cursor, or billing accounts.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx getprismo demo
|
|
21
|
+
npx getprismo dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The guided `dev` command:
|
|
25
|
+
|
|
26
|
+
1. Scans the repo and local coding-agent usage.
|
|
27
|
+
2. Generates optimized context files in `.prismo/`.
|
|
28
|
+
3. Prints a paste-ready prompt for your next AI coding session.
|
|
29
|
+
|
|
30
|
+
## Common Commands
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx getprismo scan --usage
|
|
34
|
+
npx getprismo scan --fix
|
|
35
|
+
npx getprismo optimize
|
|
36
|
+
npx getprismo context frontend
|
|
37
|
+
npx getprismo usage codex
|
|
38
|
+
npx getprismo usage claude
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Example Output
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
Prismo Dev Scan
|
|
45
|
+
|
|
46
|
+
Score: 72/100 | Risk: Medium | Token leaks: 5
|
|
47
|
+
Estimated avoidable waste: 20-40%
|
|
48
|
+
|
|
49
|
+
Top Token Leaks
|
|
50
|
+
1. Missing .claudeignore
|
|
51
|
+
2. Recent local AI sessions used 2.40M tokens
|
|
52
|
+
3. Large exposed file detected
|
|
53
|
+
4. Tool output/context contributed about 95k tokens
|
|
54
|
+
5. CLAUDE.md is ~1,900 tokens
|
|
55
|
+
|
|
56
|
+
Top Fix
|
|
57
|
+
Run: npx getprismo scan --fix
|
|
58
|
+
Then: npx getprismo optimize
|
|
59
|
+
Then: npx getprismo context frontend
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Local Usage Tracking
|
|
63
|
+
|
|
64
|
+
Prismo can show real token usage when local tool logs expose token fields.
|
|
65
|
+
|
|
66
|
+
- Codex: reads local `~/.codex/sessions/**/*.jsonl`
|
|
67
|
+
- Claude Code: reads local `~/.claude/projects/**/*.jsonl`
|
|
68
|
+
|
|
69
|
+
If exact usage fields are present, Prismo marks the result as `exact-local-log`. If not, it falls back to local text-size estimates.
|
|
70
|
+
|
|
71
|
+
No API keys are required. Prismo does not proxy Claude Code subscription traffic or intercept prompts.
|
|
72
|
+
|
|
73
|
+
## Generated Files
|
|
74
|
+
|
|
75
|
+
`npx getprismo optimize` creates recommendation files in `.prismo/`:
|
|
76
|
+
|
|
77
|
+
- `.prismo/architecture-summary.md`
|
|
78
|
+
- `.prismo/backend-summary.md`
|
|
79
|
+
- `.prismo/frontend-summary.md`
|
|
80
|
+
- `.prismo/recommended-CLAUDE.md`
|
|
81
|
+
- `.prismo/recommended-AGENTS.md`
|
|
82
|
+
- `.prismo/recommended-.claudeignore`
|
|
83
|
+
- `.prismo/optimize-report.md`
|
|
84
|
+
|
|
85
|
+
These files are templates and context packs. Prismo does not overwrite your real `CLAUDE.md`, `AGENTS.md`, `.gitignore`, or `.claudeignore` during optimize.
|
|
86
|
+
|
|
87
|
+
## Safe Fix Mode
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx getprismo scan --fix
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Fix mode can create:
|
|
94
|
+
|
|
95
|
+
- `.claudeignore` if missing
|
|
96
|
+
- `.claudeignore.prismo-suggested` if `.claudeignore` already exists
|
|
97
|
+
- `prismo-dev-report.md`
|
|
98
|
+
- `prismo-optimized-CLAUDE.template.md`
|
|
99
|
+
- `prismo-AGENTS-recommendations.md`
|
|
100
|
+
|
|
101
|
+
Existing reports and suggestion files are backed up before replacement.
|
|
102
|
+
|
|
103
|
+
## Help
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npx getprismo --help
|
|
107
|
+
npx getprismo scan --help
|
|
108
|
+
npx getprismo optimize --help
|
|
109
|
+
npx getprismo usage --help
|
|
110
|
+
```
|