@itsautomata/prism 0.1.2 → 0.3.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 +73 -11
- package/dist/cli.js +3211 -552
- package/dist/wasm/tree-sitter-bash.wasm +0 -0
- package/dist/wasm/tree-sitter-c-sharp.wasm +0 -0
- package/dist/wasm/tree-sitter-c.wasm +0 -0
- package/dist/wasm/tree-sitter-clojure.wasm +0 -0
- package/dist/wasm/tree-sitter-cpp.wasm +0 -0
- package/dist/wasm/tree-sitter-css.wasm +0 -0
- package/dist/wasm/tree-sitter-dart.wasm +0 -0
- package/dist/wasm/tree-sitter-dockerfile.wasm +0 -0
- package/dist/wasm/tree-sitter-elixir.wasm +0 -0
- package/dist/wasm/tree-sitter-erlang.wasm +0 -0
- package/dist/wasm/tree-sitter-go.wasm +0 -0
- package/dist/wasm/tree-sitter-graphql.wasm +0 -0
- package/dist/wasm/tree-sitter-haskell.wasm +0 -0
- package/dist/wasm/tree-sitter-html.wasm +0 -0
- package/dist/wasm/tree-sitter-java.wasm +0 -0
- package/dist/wasm/tree-sitter-javascript.wasm +0 -0
- package/dist/wasm/tree-sitter-json.wasm +0 -0
- package/dist/wasm/tree-sitter-julia.wasm +0 -0
- package/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- package/dist/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/wasm/tree-sitter-make.wasm +0 -0
- package/dist/wasm/tree-sitter-markdown.wasm +0 -0
- package/dist/wasm/tree-sitter-ocaml.wasm +0 -0
- package/dist/wasm/tree-sitter-php.wasm +0 -0
- package/dist/wasm/tree-sitter-python.wasm +0 -0
- package/dist/wasm/tree-sitter-r.wasm +0 -0
- package/dist/wasm/tree-sitter-ruby.wasm +0 -0
- package/dist/wasm/tree-sitter-rust.wasm +0 -0
- package/dist/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/wasm/tree-sitter-sql.wasm +0 -0
- package/dist/wasm/tree-sitter-svelte.wasm +0 -0
- package/dist/wasm/tree-sitter-swift.wasm +0 -0
- package/dist/wasm/tree-sitter-toml.wasm +0 -0
- package/dist/wasm/tree-sitter-tsx.wasm +0 -0
- package/dist/wasm/tree-sitter-typescript.wasm +0 -0
- package/dist/wasm/tree-sitter-yaml.wasm +0 -0
- package/dist/wasm/tree-sitter-zig.wasm +0 -0
- package/package.json +13 -4
package/README.md
CHANGED
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
Prism is an open source coding assistant that runs locally on your machine through Ollama, or cloud through OpenRouter (300+ models).
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
> actively built and tested. expect breaking changes. decentralized intelligence is cool
|
|
8
|
+
> actively built and tested. expect breaking changes. decentralized intelligence is cool.
|
|
9
|
+
|
|
10
|
+
**prism building a working terminal tetris from one prompt with deepseek-v4-pro**
|
|
11
|
+
|
|
12
|
+
https://github.com/user-attachments/assets/3451a4ec-1a4f-431d-bd15-aba799b9cdf4
|
|
9
13
|
|
|
10
|
-

|
|
11
14
|
|
|
12
15
|
## quick start
|
|
13
16
|
|
|
@@ -50,14 +53,14 @@ prism --install-completion bash # explicit
|
|
|
50
53
|
|
|
51
54
|
## choose your model
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
**local (free, ollama)**
|
|
54
57
|
|
|
55
58
|
```bash
|
|
56
59
|
prism # deepseek-r1:14b (default)
|
|
57
60
|
prism qwen3:14b
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
**cloud (openrouter, 300+ models)**
|
|
61
64
|
|
|
62
65
|
add your API key to `~/.prism/config.toml` (created on first run), then:
|
|
63
66
|
|
|
@@ -98,10 +101,13 @@ sessions saved at `~/.prism/sessions/`.
|
|
|
98
101
|
| Glob | find files by pattern |
|
|
99
102
|
| Grep | search file contents |
|
|
100
103
|
| Agent | spawn read-only subagents for parallel research |
|
|
104
|
+
| useSkill | invoke a named workflow from skills/<name>.md |
|
|
105
|
+
| WebFetch | fetch and convert web pages to markdown |
|
|
106
|
+
| WebSearch | query a search backend, return ranked results |
|
|
101
107
|
|
|
102
108
|
## permissions
|
|
103
109
|
|
|
104
|
-
write operations ask before executing. read operations auto-allow. subagents
|
|
110
|
+
write operations ask before executing. read operations auto-allow. by default, subagents are read-only. user-defined agents can declare `permissions: inherit` to write through the parent's permission prompt.
|
|
105
111
|
|
|
106
112
|
```
|
|
107
113
|
◆ Bash wants to: run: git push
|
|
@@ -110,6 +116,50 @@ write operations ask before executing. read operations auto-allow. subagents inh
|
|
|
110
116
|
[n] no
|
|
111
117
|
```
|
|
112
118
|
|
|
119
|
+
## agents
|
|
120
|
+
|
|
121
|
+
prism ships with a built-in read-only research subagent. define your own at `./agents/<name>.md` (project) or `~/.prism/agents/<name>.md` (user), with YAML frontmatter:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
---
|
|
125
|
+
description: refactorer focused on extracting React hooks
|
|
126
|
+
tools: ['Read', 'Edit', 'Grep']
|
|
127
|
+
permissions: inherit
|
|
128
|
+
max_turns: 8
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
you are a refactoring specialist. read the file first, propose the
|
|
132
|
+
extraction, then apply it. do not touch tests.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`permissions: deny-writes` (default) blocks writes. `permissions: inherit` lets the subagent write through the parent's permission prompt. list with `/agent`, invoke directly with `/agent <name> <task>`, or have the model call `Agent` with `agent: "<name>"`. deny-writes agents spawned in the same turn run in parallel.
|
|
136
|
+
|
|
137
|
+
## skills
|
|
138
|
+
|
|
139
|
+
reusable workflows the model follows on demand. drop a markdown file at `./skills/<name>.md` or `~/.prism/skills/<name>.md`:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
---
|
|
143
|
+
mode: invoke
|
|
144
|
+
require-permission: true
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
scan the staged diff for security issues. report findings as a table
|
|
148
|
+
with file:line and severity.
|
|
149
|
+
|
|
150
|
+
## quick
|
|
151
|
+
do a fast pass only.
|
|
152
|
+
|
|
153
|
+
## thorough
|
|
154
|
+
trace data flow from input boundaries.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- `mode: invoke` (default): one-shot. trigger with `/run <name> [section] [task]` or let the model call `useSkill`.
|
|
158
|
+
- `mode: passive`: ambient. toggle with `/skill <name>`, the body lands in the system prompt every turn until toggled off.
|
|
159
|
+
- `require-permission: true`: prompts before the model can invoke it.
|
|
160
|
+
|
|
161
|
+
`##` headings become section targets, so `/run review thorough` run just that block. `/skill` lists all skills (passive in cyan, invoke in green).
|
|
162
|
+
|
|
113
163
|
## teach it
|
|
114
164
|
|
|
115
165
|
prism learns per model. rules persist across sessions.
|
|
@@ -129,6 +179,9 @@ rules saved at `~/.prism/models/<model>.json`.
|
|
|
129
179
|
/plan enter plan mode (model proposes before executing)
|
|
130
180
|
/exec-plan exit plan mode and execute the plan
|
|
131
181
|
/cancel-plan exit plan mode without executing
|
|
182
|
+
/agent [name] list agents, show one, or invoke a named subagent
|
|
183
|
+
/skill [name] list skills or toggle a passive skill on/off
|
|
184
|
+
/run <name> invoke a skill one-shot (optional section, task)
|
|
132
185
|
/remember <fact> add a timestamped fact to project memo
|
|
133
186
|
/teach <rule> teach the model a rule
|
|
134
187
|
/rules show learned rules
|
|
@@ -156,7 +209,7 @@ iteration: typing feedback without `/exec-plan` keeps you in plan mode and lets
|
|
|
156
209
|
|
|
157
210
|
prism remembers per project across sessions in two layers:
|
|
158
211
|
|
|
159
|
-
- **lens
|
|
212
|
+
- **lens** at `./lens.md` or any `.prism/*.md` file (multiple files supported): rules you enforce, extra context...
|
|
160
213
|
- **memo** at `~/.prism/projects/<id>/memo.md`: facts the model and you accumulate as you work. lives outside the repo. add an entry with `/remember <fact>`. each entry is timestamped with the date so the model can spot stale info.
|
|
161
214
|
|
|
162
215
|
example `lens.md`:
|
|
@@ -197,11 +250,14 @@ git clone https://github.com/itsautomata/prism.git
|
|
|
197
250
|
cd prism
|
|
198
251
|
npm install
|
|
199
252
|
npm run dev # run from source via tsx
|
|
200
|
-
npm run build # produce dist/cli.js (required before global install from
|
|
253
|
+
npm run build # produce dist/cli.js (required before global install from the local dir)
|
|
201
254
|
npm install -g . # symlink your local build as the global `prism`
|
|
202
255
|
```
|
|
203
256
|
|
|
204
|
-
|
|
257
|
+
you can run prism on itself to make itself better, and shape it to your workflow
|
|
258
|
+
|
|
259
|
+

|
|
260
|
+
|
|
205
261
|
|
|
206
262
|
## tests (on going)
|
|
207
263
|
|
|
@@ -215,12 +271,18 @@ covering:
|
|
|
215
271
|
- CLI parsing
|
|
216
272
|
- sessions and `--resume`
|
|
217
273
|
- shell completion
|
|
218
|
-
- slash command autocomplete
|
|
274
|
+
- slash command autocomplete and prompt input
|
|
219
275
|
- plan mode dispatch
|
|
220
276
|
- memo persistence (per-project memory)
|
|
221
277
|
- git context detection
|
|
222
|
-
- token counting
|
|
223
|
-
-
|
|
278
|
+
- context compaction (token counting + summary fallback)
|
|
279
|
+
- subagent registry, runner, and parallel-safety
|
|
280
|
+
- skill loader (frontmatter, sections, name sanitization)
|
|
281
|
+
- lens loader (`.prism` directory)
|
|
282
|
+
- command-injection guards (grep, glob)
|
|
283
|
+
- permission prompt mount and key handling
|
|
284
|
+
- tools, permissions, subagent permission contract
|
|
285
|
+
- web fetching
|
|
224
286
|
- `!cmd` shell escape
|
|
225
287
|
|
|
226
288
|
|