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