my-pi 0.0.6 → 0.0.7
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 +53 -0
- package/dist/{api-S06lPaJV.js → api-DtthDVIa.js} +674 -15
- package/dist/api-DtthDVIa.js.map +1 -0
- package/dist/api.js +1 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -1
- package/src/extensions/config.test.ts +3 -0
- package/src/extensions/config.ts +10 -1
- package/src/extensions/prompt-presets.test.ts +117 -0
- package/src/extensions/prompt-presets.ts +1112 -0
- package/dist/api-S06lPaJV.js.map +0 -1
package/README.md
CHANGED
|
@@ -170,6 +170,17 @@ In interactive mode:
|
|
|
170
170
|
- `/skills sync <key|name>` — sync an imported skill to its upstream
|
|
171
171
|
- `/skills refresh` — rescan skill directories
|
|
172
172
|
- `/skills defaults <all-enabled|all-disabled>` — set default policy
|
|
173
|
+
- `/preset` — open the prompt preset manager (base presets + layers)
|
|
174
|
+
- `/preset <name>` — activate a base preset or toggle a layer
|
|
175
|
+
- `/preset base <name>` — activate a base preset directly
|
|
176
|
+
- `/preset enable <layer>` / `/preset disable <layer>` — toggle a
|
|
177
|
+
prompt layer directly
|
|
178
|
+
- `/preset edit <name>` — edit or create a project-local preset in
|
|
179
|
+
`.pi/presets.json`
|
|
180
|
+
- `/preset delete <name>` — delete a project-local preset
|
|
181
|
+
- `/preset reset <name>` — remove a project-local override and fall
|
|
182
|
+
back to user/built-in if available
|
|
183
|
+
- `/preset clear` — clear the active base preset and all layers
|
|
173
184
|
|
|
174
185
|
### How it works
|
|
175
186
|
|
|
@@ -224,6 +235,46 @@ them. Detection patterns from
|
|
|
224
235
|
Use `/redact-stats` to see how many secrets were caught. Disable with
|
|
225
236
|
`--no-filter`.
|
|
226
237
|
|
|
238
|
+
## Prompt Presets
|
|
239
|
+
|
|
240
|
+
Prompt presets append runtime instructions to the system prompt
|
|
241
|
+
through a built-in extension. They are split into:
|
|
242
|
+
|
|
243
|
+
- **base presets** — one active at a time
|
|
244
|
+
- **prompt layers** — additive checkboxes you can combine
|
|
245
|
+
|
|
246
|
+
Built-in base presets:
|
|
247
|
+
|
|
248
|
+
- `terse` — short, direct, no fluff
|
|
249
|
+
- `standard` — clear and concise with key context
|
|
250
|
+
- `detailed` — more explanation when nuance matters
|
|
251
|
+
|
|
252
|
+
Built-in layers:
|
|
253
|
+
|
|
254
|
+
- `no-purple-prose`
|
|
255
|
+
- `bullets`
|
|
256
|
+
- `clarify-first`
|
|
257
|
+
- `include-risks`
|
|
258
|
+
|
|
259
|
+
Preset sources are merged in this order:
|
|
260
|
+
|
|
261
|
+
1. built-in defaults
|
|
262
|
+
2. `~/.pi/agent/presets.json`
|
|
263
|
+
3. `.pi/presets.json`
|
|
264
|
+
|
|
265
|
+
Project presets override global/default presets with the same name.
|
|
266
|
+
Strings are treated as base presets by default. Object entries may set
|
|
267
|
+
`kind: "base"` or `kind: "layer"`.
|
|
268
|
+
|
|
269
|
+
CLI layering is supported too:
|
|
270
|
+
|
|
271
|
+
- `--preset terse,no-purple-prose,bullets`
|
|
272
|
+
- `--system-prompt "You are terse and technical."`
|
|
273
|
+
- `--append-system-prompt "Prefer one short paragraph."`
|
|
274
|
+
|
|
275
|
+
This repo also includes an example `.pi/presets.json` with sample base
|
|
276
|
+
presets and layers.
|
|
277
|
+
|
|
227
278
|
## Session Handoff
|
|
228
279
|
|
|
229
280
|
Use `/handoff <task>` to export conversation context as a markdown
|
|
@@ -249,6 +300,7 @@ src/
|
|
|
249
300
|
chain.ts Agent chain pipelines
|
|
250
301
|
filter-output.ts Secret redaction in tool output
|
|
251
302
|
handoff.ts Session context export
|
|
303
|
+
prompt-presets.ts Runtime prompt preset selection and editing
|
|
252
304
|
recall.ts Past session recall guidance
|
|
253
305
|
mcp/
|
|
254
306
|
client.ts Minimal MCP stdio client (JSON-RPC 2.0)
|
|
@@ -261,6 +313,7 @@ src/
|
|
|
261
313
|
agents/
|
|
262
314
|
*.md Agent definitions (frontmatter + system prompt)
|
|
263
315
|
agent-chain.yaml Chain pipeline definitions
|
|
316
|
+
presets.json Optional project prompt presets
|
|
264
317
|
mcp.json Project MCP server config
|
|
265
318
|
```
|
|
266
319
|
|