@itsautomata/prism 0.1.2 → 0.2.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 (3) hide show
  1. package/README.md +69 -10
  2. package/dist/cli.js +1209 -317
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -5,7 +5,7 @@
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
9
 
10
10
  ![prism](https://raw.githubusercontent.com/itsautomata/prism/main/assets/prism_3.png)
11
11
 
@@ -50,14 +50,14 @@ prism --install-completion bash # explicit
50
50
 
51
51
  ## choose your model
52
52
 
53
- ### local (free, ollama)
53
+ **local (free, ollama)**
54
54
 
55
55
  ```bash
56
56
  prism # deepseek-r1:14b (default)
57
57
  prism qwen3:14b
58
58
  ```
59
59
 
60
- ### cloud (openrouter, 300+ models)
60
+ **cloud (openrouter, 300+ models)**
61
61
 
62
62
  add your API key to `~/.prism/config.toml` (created on first run), then:
63
63
 
@@ -98,10 +98,13 @@ sessions saved at `~/.prism/sessions/`.
98
98
  | Glob | find files by pattern |
99
99
  | Grep | search file contents |
100
100
  | Agent | spawn read-only subagents for parallel research |
101
+ | useSkill | invoke a named workflow from skills/<name>.md |
102
+ | WebFetch | fetch and convert web pages to markdown |
103
+ | WebSearch | query a search backend, return ranked results |
101
104
 
102
105
  ## permissions
103
106
 
104
- write operations ask before executing. read operations auto-allow. subagents inherit read-only access; they cannot escalate to write operations.
107
+ 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
108
 
106
109
  ```
107
110
  ◆ Bash wants to: run: git push
@@ -110,6 +113,50 @@ write operations ask before executing. read operations auto-allow. subagents inh
110
113
  [n] no
111
114
  ```
112
115
 
116
+ ## agents
117
+
118
+ 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:
119
+
120
+ ```markdown
121
+ ---
122
+ description: refactorer focused on extracting React hooks
123
+ tools: ['Read', 'Edit', 'Grep']
124
+ permissions: inherit
125
+ max_turns: 8
126
+ ---
127
+
128
+ you are a refactoring specialist. read the file first, propose the
129
+ extraction, then apply it. do not touch tests.
130
+ ```
131
+
132
+ `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.
133
+
134
+ ## skills
135
+
136
+ reusable workflows the model follows on demand. drop a markdown file at `./skills/<name>.md` or `~/.prism/skills/<name>.md`:
137
+
138
+ ```markdown
139
+ ---
140
+ mode: invoke
141
+ require-permission: true
142
+ ---
143
+
144
+ scan the staged diff for security issues. report findings as a table
145
+ with file:line and severity.
146
+
147
+ ## quick
148
+ do a fast pass only.
149
+
150
+ ## thorough
151
+ trace data flow from input boundaries.
152
+ ```
153
+
154
+ - `mode: invoke` (default): one-shot. trigger with `/run <name> [section] [task]` or let the model call `useSkill`.
155
+ - `mode: passive`: ambient. toggle with `/skill <name>`, the body lands in the system prompt every turn until toggled off.
156
+ - `require-permission: true`: prompts before the model can invoke it.
157
+
158
+ `##` headings become section targets, so `/run review thorough` run just that block. `/skill` lists all skills (passive in cyan, invoke in green).
159
+
113
160
  ## teach it
114
161
 
115
162
  prism learns per model. rules persist across sessions.
@@ -129,6 +176,9 @@ rules saved at `~/.prism/models/<model>.json`.
129
176
  /plan enter plan mode (model proposes before executing)
130
177
  /exec-plan exit plan mode and execute the plan
131
178
  /cancel-plan exit plan mode without executing
179
+ /agent [name] list agents, show one, or invoke a named subagent
180
+ /skill [name] list skills or toggle a passive skill on/off
181
+ /run <name> invoke a skill one-shot (optional section, task)
132
182
  /remember <fact> add a timestamped fact to project memo
133
183
  /teach <rule> teach the model a rule
134
184
  /rules show learned rules
@@ -156,7 +206,7 @@ iteration: typing feedback without `/exec-plan` keeps you in plan mode and lets
156
206
 
157
207
  prism remembers per project across sessions in two layers:
158
208
 
159
- - **lens.md** at your project root: rules you enforce. git-committed, ships with the repo so collaborators inherit them.
209
+ - **lens** at `./lens.md` or any `.prism/*.md` file (multiple files supported): rules you enforce, extra context...
160
210
  - **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
211
 
162
212
  example `lens.md`:
@@ -197,11 +247,14 @@ git clone https://github.com/itsautomata/prism.git
197
247
  cd prism
198
248
  npm install
199
249
  npm run dev # run from source via tsx
200
- npm run build # produce dist/cli.js (required before global install from this dir)
250
+ npm run build # produce dist/cli.js (required before global install from the local dir)
201
251
  npm install -g . # symlink your local build as the global `prism`
202
252
  ```
203
253
 
204
- `dist/` is git-ignored, so `npm run build` is required before any `npm install -g .` in a fresh clone.
254
+ you can run prism on itself to make itself better, and shape it to your workflow
255
+
256
+ ![apple](https://raw.githubusercontent.com/itsautomata/prism/main/assets/apple_eating_itself.gif)
257
+
205
258
 
206
259
  ## tests (on going)
207
260
 
@@ -215,12 +268,18 @@ covering:
215
268
  - CLI parsing
216
269
  - sessions and `--resume`
217
270
  - shell completion
218
- - slash command autocomplete
271
+ - slash command autocomplete and prompt input
219
272
  - plan mode dispatch
220
273
  - memo persistence (per-project memory)
221
274
  - git context detection
222
- - token counting
223
- - tools and permissions
275
+ - context compaction (token counting + summary fallback)
276
+ - subagent registry, runner, and parallel-safety
277
+ - skill loader (frontmatter, sections, name sanitization)
278
+ - lens loader (`.prism` directory)
279
+ - command-injection guards (grep, glob)
280
+ - permission prompt mount and key handling
281
+ - tools, permissions, subagent permission contract
282
+ - web fetching
224
283
  - `!cmd` shell escape
225
284
 
226
285