@preapexis/pi-kit 1.0.0 → 1.0.8

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
@@ -1,370 +1,377 @@
1
- # preapexis-pi-kit
2
-
3
- A personalized kit for the [Pi Agent Harness](https://github.com/earendil-works/pi) that bundles extensions, prompts, skills, and themes to improve AI-assisted coding workflows.
4
-
5
- ## What’s inside
6
-
7
- - **extensions/** – TypeScript extensions that add custom behavior to Pi:
8
- - `safety.ts` – blocks risky shell commands, protects secrets, blocks unsafe paths, and injects safety rules.
9
- - `git-guard.ts` – warns on dirty Git worktrees, blocks force-push, confirms `git reset --hard`, creates checkpoint branches before edits, and shows the current branch.
10
- - `status.ts`shows useful footer info such as model, mode, repo trust state, and test status.
11
- - `usage-tracker.ts` – tracks session token usage and estimated cost, with `/usage` and `/usage-reset`.
12
- - `prompts.ts` – adds `/prompts`, a small menu listing available prompt workflows.
13
- - `brand-ui.ts` – adds custom Pi branding/UI.
14
-
15
- - **prompts/**prompt templates for common workflows:
16
- - `init.md` – inspect a repository and create an onboarding report.
17
- - `plan.md` – create a read-only implementation plan with batches, model choice, and effort guidance.
18
- - `save-plan.md` – save a generated plan as a markdown file.
19
- - `implement.md` – implement a saved or pasted plan.
20
- - `commit.md`generate a conventional commit message from current Git changes.
21
- - `review-safe.md` – run a safe read-only project review.
22
- - `security.md` – run a read-only security review.
23
-
24
- - **skills/**reusable skills for focused agent behavior:
25
- - `safe-coding`
26
- - `component-implementation`
27
- - `frontend-onboarding`
28
- - `frontend-quality`
29
-
30
- - **themes/** – custom Pi themes.
31
-
32
- - **package.json** – declares this repository as a Pi package.
33
-
34
- ## Installation
35
-
36
- ### Install from npm
37
-
38
- If the package is published to npm, install it with:
39
-
40
- ```bash
41
- pi install npm:preapexis-pi-kit
42
- ```
43
-
44
- After installing, restart Pi or reload extensions:
45
-
46
- ```txt
47
- /reload
48
- ```
49
-
50
- ### Install from GitHub
51
-
52
- Install directly from GitHub:
53
-
54
- ```bash
55
- pi install git:github.com/VarunGaikwad/preapexis-pi-kit@master
56
- ```
57
-
58
- After installing, restart Pi or reload extensions:
59
-
60
- ```txt
61
- /reload
62
- ```
63
-
64
- ### Install from a local clone
65
-
66
- Clone this repository:
67
-
68
- ```bash
69
- git clone https://github.com/VarunGaikwad/preapexis-pi-kit.git
70
- cd preapexis-pi-kit
71
- ```
72
-
73
- Install or link it with Pi:
74
-
75
- ```bash
76
- pi install -l .
77
- ```
78
-
79
- Then restart Pi or reload extensions:
80
-
81
- ```txt
82
- /reload
83
- ```
84
-
85
- ## Updating
86
-
87
- ### Update from npm
88
-
89
- If installed from npm, run:
90
-
91
- ```bash
92
- pi install npm:preapexis-pi-kit
93
- ```
94
-
95
- Then reload Pi:
96
-
97
- ```txt
98
- /reload
99
- ```
100
-
101
- ### Update from GitHub
102
-
103
- If installed from GitHub, run:
104
-
105
- ```bash
106
- pi install git:github.com/VarunGaikwad/preapexis-pi-kit@master
107
- ```
108
-
109
- Then reload Pi:
110
-
111
- ```txt
112
- /reload
113
- ```
114
-
115
- ### Update a local linked copy
116
-
117
- If installed with local link mode, pull the latest changes in the local repo:
118
-
119
- ```bash
120
- git pull
121
- ```
122
-
123
- Then reload Pi:
124
-
125
- ```txt
126
- /reload
127
- ```
128
-
129
- To update from GitHub, run:
130
-
131
- ```bash
132
- pi install git:github.com/VarunGaikwad/preapexis-pi-kit@master
133
- ```
134
-
135
- Then reload Pi:
136
-
137
- ```txt
138
- /reload
139
- ```
140
-
141
- ## Usage
142
-
143
- ### Prompt workflow
144
-
145
- Recommended flow:
146
-
147
- ```txt
148
- /init
149
- /plan <your request>
150
- /save-plan <paste generated plan>
151
- /implement <saved plan path or pasted plan>
152
- /commit
153
- ```
154
-
155
- Use review prompts when needed:
156
-
157
- ```txt
158
- /review-safe
159
- /security
160
- ```
161
-
162
- ### `/prompts`
163
-
164
- Run:
165
-
166
- ```txt
167
- /prompts
168
- ```
169
-
170
- This shows all available prompt workflows and how to use them.
171
-
172
- ## Prompt details
173
-
174
- ### `/init`
175
-
176
- Reads the project and creates an onboarding report.
177
-
178
- Use this when opening a new repo or unfamiliar feature area.
179
-
180
- ### `/plan`
181
-
182
- Creates a read-only plan.
183
-
184
- The plan includes:
185
-
186
- - implementation batches
187
- - likely files to change
188
- - risk level
189
- - recommended model
190
- - recommended effort level
191
- - approval needs
192
- - final execution summary
193
-
194
- Example summary:
195
-
196
- ```txt
197
- Use Haiku with low effort for batches 1 and 2.
198
- Use Sonnet with medium effort for batches 3 and 4.
199
- Use Opus with high effort for batch 5.
200
- ```
201
-
202
- ### `/save-plan`
203
-
204
- Saves a generated plan to:
205
-
206
- ```txt
207
- docs/plans/YYYY-MM-DD-plan-name.md
208
- ```
209
-
210
- It asks before editing `AGENTS.md`.
211
-
212
- ### `/implement`
213
-
214
- Implements a saved or pasted plan.
215
-
216
- It should:
217
-
218
- - follow the plan closely
219
- - keep changes small
220
- - ask if something is unclear
221
- - run tests, lint, or typecheck when available
222
- - summarize what changed
223
-
224
- ### `/commit`
225
-
226
- Reads Git changes and suggests a commit message.
227
-
228
- It does not commit automatically.
229
-
230
- ### `/review-safe`
231
-
232
- Runs a read-only project review.
233
-
234
- ### `/security`
235
-
236
- Runs a read-only security review.
237
-
238
- ## Extensions
239
-
240
- ### safety.ts
241
-
242
- General safety layer.
243
-
244
- Protects against:
245
-
246
- - risky shell commands
247
- - reading or editing `.env` files
248
- - editing dependency folders
249
- - editing build output
250
- - editing `.git` internals
251
- - unsafe package install/remove commands without confirmation
252
-
253
- It also injects safety and clarification rules into the agent prompt.
254
-
255
- ### git-guard.ts
256
-
257
- Git-specific safety layer.
258
-
259
- Handles:
260
-
261
- - dirty working tree warning
262
- - branch display with `*` when dirty
263
- - force-push blocking
264
- - `git reset --hard` confirmation
265
- - checkpoint branch creation before risky edits
266
-
267
- Example status:
268
-
269
- ```txt
270
- ⎇ master*
271
- ```
272
-
273
- The `*` means there are uncommitted changes.
274
-
275
- ### status.ts
276
-
277
- Shows project status in the footer:
278
-
279
- ```txt
280
- mode: safe model: openrouter/... repo: trusted tests: none
281
- ```
282
-
283
- Commands:
284
-
285
- ```txt
286
- /test-pass
287
- /test-fail
288
- /test-none
289
- ```
290
-
291
- ### prompts.ts
292
-
293
- Adds:
294
-
295
- ```txt
296
- /prompts
297
- ```
298
-
299
- This command lists available prompt workflows.
300
-
301
- ### brand-ui.ts
302
-
303
- Adds custom Pi branding and visual UI customization.
304
-
305
- ## Skills
306
-
307
- Each skill should live in its own folder:
308
-
309
- ```txt
310
- skills/
311
- safe-coding/
312
- SKILL.md
313
- component-implementation/
314
- SKILL.md
315
- frontend-onboarding/
316
- SKILL.md
317
- frontend-quality/
318
- SKILL.md
319
- ```
320
-
321
- ## Development
322
-
323
- To add a new extension:
324
-
325
- ```txt
326
- extensions/my-extension.ts
327
- ```
328
-
329
- It should export a default function that receives `ExtensionAPI`.
330
-
331
- To add a new prompt:
332
-
333
- ```txt
334
- prompts/my-prompt.md
335
- ```
336
-
337
- The filename becomes the slash command.
338
-
339
- Example:
340
-
341
- ```txt
342
- prompts/security.md → /security
343
- ```
344
-
345
- To add a new skill:
346
-
347
- ```txt
348
- skills/my-skill/SKILL.md
349
- ```
350
-
351
- ## Package structure
352
-
353
- ```txt
354
- preapexis-pi-kit/
355
- package.json
356
- LICENSE
357
- README.md
358
- extensions/
359
- prompts/
360
- skills/
361
- themes/
362
- ```
363
-
364
- ## License
365
-
366
- ISC. See the `LICENSE` file for details.
367
-
368
- ---
369
-
370
- Built for a safer, cleaner Pi coding-agent workflow.
1
+ `````md
2
+ # preapexis-pi-kit
3
+
4
+ A personalized kit for the [Pi Agent Harness](https://github.com/earendil-works/pi) that bundles extensions, prompts, skills, and themes to improve AI-assisted coding workflows.
5
+
6
+ npm package: [@preapexis/pi-kit](https://www.npmjs.com/package/@preapexis/pi-kit)
7
+
8
+ ## What’s inside
9
+
10
+ - **extensions/**TypeScript extensions that add custom behavior to Pi:
11
+ - `safety.ts` – blocks risky shell commands, protects secrets, blocks unsafe paths, and injects safety rules.
12
+ - `git-guard.ts` – warns on dirty Git worktrees, blocks force-push, confirms `git reset --hard`, and creates checkpoint branches before risky edits.
13
+ - `status.ts` – shows compact kit status such as safety mode, repo trust, and test status.
14
+ - `usage-tracker.ts` – tracks session token usage and estimated cost, with `/usage` and `/usage-reset`.
15
+ - `update.ts`adds `/update` for updating Pi, this kit, or project packages.
16
+ - `sound-cues.ts` – adds optional sound cues for start, done, need-input, and error events.
17
+ - `prompts.ts` – adds `/prompts`, a small menu listing available prompt workflows.
18
+ - `brand-ui.ts` – adds custom PreApeXis branding/UI.
19
+
20
+ - **prompts/**prompt templates for common workflows:
21
+ - `init.md` – inspect a repository and create an onboarding report.
22
+ - `plan.md` – create a read-only implementation plan with batches, model choice, and effort guidance.
23
+ - `save-plan.md` – save a generated plan as a markdown file.
24
+ - `implement.md`implement a saved or pasted plan.
25
+ - `commit.md` – generate a conventional commit message from current Git changes.
26
+ - `review-safe.md` – run a safe read-only project review.
27
+ - `security.md` – run a read-only security review.
28
+
29
+ - **skills/** – reusable skills for focused agent behavior:
30
+ - `safe-coding`
31
+ - `component-implementation`
32
+ - `frontend-onboarding`
33
+ - `frontend-quality`
34
+
35
+ - **themes/** – custom Pi themes.
36
+
37
+ - **package.json** – declares this repository as a Pi package.
38
+
39
+ ````md
40
+ ## Installation
41
+
42
+ Install from npm:
43
+
44
+ ```bash
45
+ pi install npm:@preapexis/pi-kit
46
+ ```
47
+ ````
48
+ `````
49
+
50
+ After installing, restart Pi or reload extensions:
51
+
52
+ ```txt
53
+ /reload
54
+ ```
55
+
56
+ ## Updating
57
+
58
+ Update from npm:
59
+
60
+ ```bash
61
+ pi install npm:@preapexis/pi-kit
62
+ ```
63
+
64
+ Then reload Pi:
65
+
66
+ ```txt
67
+ /reload
68
+ ```
69
+
70
+ You can also use:
71
+
72
+ ```txt
73
+ /update
74
+ ```
75
+
76
+ ```
77
+
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ### Prompt workflow
83
+
84
+ Recommended flow:
85
+
86
+ ```txt
87
+ /init
88
+ /plan <your request>
89
+ /save-plan <paste generated plan>
90
+ /implement <saved plan path or pasted plan>
91
+ /commit
92
+ ```
93
+
94
+ Use review prompts when needed:
95
+
96
+ ```txt
97
+ /review-safe
98
+ /security
99
+ ```
100
+
101
+ ### `/prompts`
102
+
103
+ Run:
104
+
105
+ ```txt
106
+ /prompts
107
+ ```
108
+
109
+ This shows all available prompt workflows and how to use them.
110
+
111
+ ### `/update`
112
+
113
+ Run:
114
+
115
+ ```txt
116
+ /update
117
+ ```
118
+
119
+ This opens an update menu for updating Pi, this kit, or project packages.
120
+
121
+ ### Sound commands
122
+
123
+ ```txt
124
+ /sound-on
125
+ /sound-off
126
+ /sound-test
127
+ ```
128
+
129
+ ## Prompt details
130
+
131
+ ### `/init`
132
+
133
+ Reads the project and creates an onboarding report.
134
+
135
+ Use this when opening a new repo or unfamiliar feature area.
136
+
137
+ ### `/plan`
138
+
139
+ Creates a read-only plan.
140
+
141
+ The plan includes:
142
+
143
+ - implementation batches
144
+ - likely files to change
145
+ - risk level
146
+ - recommended model
147
+ - recommended effort level
148
+ - approval needs
149
+ - final execution summary
150
+
151
+ Example summary:
152
+
153
+ ```txt
154
+ Use Haiku with low effort for batches 1 and 2.
155
+ Use Sonnet with medium effort for batches 3 and 4.
156
+ Use Opus with high effort for batch 5.
157
+ ```
158
+
159
+ ### `/save-plan`
160
+
161
+ Saves a generated plan to:
162
+
163
+ ```txt
164
+ docs/plans/YYYY-MM-DD-plan-name.md
165
+ ```
166
+
167
+ It asks before editing `AGENTS.md`.
168
+
169
+ ### `/implement`
170
+
171
+ Implements a saved or pasted plan.
172
+
173
+ It should:
174
+
175
+ - follow the plan closely
176
+ - keep changes small
177
+ - ask if something is unclear
178
+ - run tests, lint, or typecheck when available
179
+ - summarize what changed
180
+
181
+ ### `/commit`
182
+
183
+ Reads Git changes and suggests a commit message.
184
+
185
+ It does not commit automatically.
186
+
187
+ ### `/review-safe`
188
+
189
+ Runs a read-only project review.
190
+
191
+ ### `/security`
192
+
193
+ Runs a read-only security review.
194
+
195
+ ## Extensions
196
+
197
+ ### safety.ts
198
+
199
+ General safety layer.
200
+
201
+ Protects against:
202
+
203
+ - risky shell commands
204
+ - reading or editing `.env` files
205
+ - editing dependency folders
206
+ - editing build output
207
+ - editing `.git` internals
208
+ - unsafe package install/remove commands without confirmation
209
+
210
+ It also injects safety and clarification rules into the agent prompt.
211
+
212
+ ### git-guard.ts
213
+
214
+ Git-specific safety layer.
215
+
216
+ Handles:
217
+
218
+ - dirty working tree warning
219
+ - force-push blocking
220
+ - `git reset --hard` confirmation
221
+ - checkpoint branch creation before risky edits
222
+
223
+ ### status.ts
224
+
225
+ Shows compact kit status in the footer:
226
+
227
+ ```txt
228
+ kit: safe · trusted · tests:none
229
+ ```
230
+
231
+ Commands:
232
+
233
+ ```txt
234
+ /test-pass
235
+ /test-fail
236
+ /test-none
237
+ ```
238
+
239
+ ### usage-tracker.ts
240
+
241
+ Tracks session token usage and estimated cost.
242
+
243
+ Commands:
244
+
245
+ ```txt
246
+ /usage
247
+ /usage-reset
248
+ ```
249
+
250
+ ### update.ts
251
+
252
+ Adds:
253
+
254
+ ```txt
255
+ /update
256
+ ```
257
+
258
+ This command opens a menu for updating Pi, this kit, or project packages.
259
+
260
+ ### sound-cues.ts
261
+
262
+ Adds optional terminal sound cues.
263
+
264
+ Commands:
265
+
266
+ ```txt
267
+ /sound-on
268
+ /sound-off
269
+ /sound-test
270
+ ```
271
+
272
+ ### prompts.ts
273
+
274
+ Adds:
275
+
276
+ ```txt
277
+ /prompts
278
+ ```
279
+
280
+ This command lists available prompt workflows.
281
+
282
+ ### brand-ui.ts
283
+
284
+ Adds custom PreApeXis terminal branding and visual UI customization.
285
+
286
+ ## Skills
287
+
288
+ Each skill should live in its own folder:
289
+
290
+ ```txt
291
+ skills/
292
+ safe-coding/
293
+ SKILL.md
294
+ component-implementation/
295
+ SKILL.md
296
+ frontend-onboarding/
297
+ SKILL.md
298
+ frontend-quality/
299
+ SKILL.md
300
+ ```
301
+
302
+ ## Development
303
+
304
+ To test this package locally while developing:
305
+
306
+ ```bash
307
+ pi install -l .
308
+ ```
309
+
310
+ Then reload Pi:
311
+
312
+ ```txt
313
+ /reload
314
+ ```
315
+
316
+ To add a new extension:
317
+
318
+ ```txt
319
+ extensions/my-extension.ts
320
+ ```
321
+
322
+ It should export a default function that receives `ExtensionAPI`.
323
+
324
+ To add a new prompt:
325
+
326
+ ```txt
327
+ prompts/my-prompt.md
328
+ ```
329
+
330
+ The filename becomes the slash command.
331
+
332
+ Example:
333
+
334
+ ```txt
335
+ prompts/security.md → /security
336
+ ```
337
+
338
+ To add a new skill:
339
+
340
+ ```txt
341
+ skills/my-skill/SKILL.md
342
+ ```
343
+
344
+ ## Package structure
345
+
346
+ ```txt
347
+ preapexis-pi-kit/
348
+ package.json
349
+ LICENSE
350
+ README.md
351
+ AGENTS.md
352
+ CHANGELOG.md
353
+ extensions/
354
+ safety.ts
355
+ git-guard.ts
356
+ status.ts
357
+ usage-tracker.ts
358
+ update.ts
359
+ sound-cues.ts
360
+ prompts.ts
361
+ brand-ui.ts
362
+ prompts/
363
+ skills/
364
+ themes/
365
+ ```
366
+
367
+ ## License
368
+
369
+ ISC. See the `LICENSE` file for details.
370
+
371
+ ---
372
+
373
+ Built for a safer, cleaner Pi coding-agent workflow.
374
+
375
+ ```
376
+
377
+ ```