pi-dev 0.1.2 → 0.1.4
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 +86 -53
- package/package.json +1 -1
- package/skills/do/SKILL.md +9 -0
- package/skills/migrate/SKILL.md +30 -4
- package/skills/to-issues/SKILL.md +28 -0
package/README.md
CHANGED
|
@@ -1,30 +1,51 @@
|
|
|
1
1
|
# pi-dev
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **Three slash commands. One finished outcome. Zero ceremony.**
|
|
4
4
|
>
|
|
5
|
-
>
|
|
5
|
+
> An autonomous engineering skill framework for the [pi](https://github.com/badlogic/pi) runtime — built on [Matt Pocock's skills](https://github.com/mattpocock/skills), wrapped in a single entry point, a strict migration gate, and three-layer preferences so the agent runs end-to-end without interrupting you.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npx pi-dev@latest install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That is the whole setup. From here on you talk to the agent, not to a tool palette.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## The pitch
|
|
16
|
+
|
|
17
|
+
Most AI engineering setups give you a drawer full of commands and ask you to remember which one to use, when, and in what order. After a week you stop opening the drawer.
|
|
8
18
|
|
|
9
|
-
|
|
19
|
+
`pi-dev` collapses the drawer into **three commands** and lets the agent decide the rest:
|
|
10
20
|
|
|
11
21
|
```
|
|
12
|
-
/do
|
|
13
|
-
/taste
|
|
14
|
-
/where
|
|
22
|
+
/do — do the engineering work end-to-end
|
|
23
|
+
/taste — view or update your engineering preferences
|
|
24
|
+
/where — recall prior pi sessions for this cwd
|
|
15
25
|
```
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
Behind `/do` sit eleven specialist skills — `diagnose`, `tdd`, `to-prd`, `to-issues`, `triage`, `grill-with-docs`, `improve-codebase-architecture`, `zoom-out`, `recon-with-vision`, `migrate`, `setup` — chained automatically based on intent (`feature` / `bug` / `perf` / `refactor` / `recon` / `docs` / `triage`) and scope (`nano` / `small` / `medium` / `large`).
|
|
28
|
+
|
|
29
|
+
You ask. It classifies. It executes. It reports.
|
|
30
|
+
|
|
31
|
+
## What you actually get
|
|
32
|
+
|
|
33
|
+
- **One request → one finished outcome.** `/do` runs the right chain to completion: write the PRD, file the slice issues with proper labels, drive TDD per slice, boot the app locally to verify, commit, open the PR.
|
|
34
|
+
- **Preferences as decisions, not prompts.** Anything answered in your global / project / package `preferences.md` is settled. The agent never re-asks. Set `auto-pr=true` once and pushes happen; set `interrupt-on-ambiguity=low` and the agent picks a sensible default and reports it instead of stopping.
|
|
35
|
+
- **A migration gate that won't let you cheat.** `/do` refuses to touch an un-migrated repo. `/migrate` audits `AGENTS.md`, `CLAUDE.md`, scoped agent dirs, handoff systems, and ADR layouts; archives the noise; stamps a marker; and on every re-entry runs drift probes so banned conventions can't sneak back in.
|
|
36
|
+
- **No handoff files. Ever.** State of work lives in three places only — code (git), the issue tracker, and merged preferences. No `docs/handoff/`, no `.scratch/flow/`, no SESSION_*.md littering your repo.
|
|
37
|
+
- **Local-live verification the agent owns.** A one-time playbook captures how to boot your stack. From then on the agent boots it, drives it, and quotes the evidence in the summary. You are not the test runner.
|
|
38
|
+
- **Vertical-slice issues with AI disclaimers baked in.** `/to-issues` produces independently-grabbable tickets — each with acceptance criteria, allowed-touch-set, and out-of-scope — and the disclaimer required by `/triage` lands on every one.
|
|
18
39
|
|
|
19
40
|
## Install
|
|
20
41
|
|
|
21
|
-
Requires Node ≥ 20 and the pi runtime.
|
|
42
|
+
Requires Node ≥ 20 and the [pi runtime](https://github.com/badlogic/pi).
|
|
22
43
|
|
|
23
44
|
```bash
|
|
24
45
|
# Install the skills + seed your global preferences
|
|
25
46
|
npx pi-dev@latest install
|
|
26
47
|
|
|
27
|
-
#
|
|
48
|
+
# Refresh skills only (keeps your preferences as-is)
|
|
28
49
|
npx pi-dev@latest update
|
|
29
50
|
|
|
30
51
|
# See what's installed
|
|
@@ -34,47 +55,65 @@ npx pi-dev list
|
|
|
34
55
|
npx pi-dev doctor
|
|
35
56
|
```
|
|
36
57
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- Copies the skill folders to `~/.pi/agent/skills/` (the directory the pi runtime reads).
|
|
40
|
-
- Seeds `~/.pi/agent/preferences.md` with sensible global defaults — only if you do not already have one.
|
|
58
|
+
`install` copies the skill folders to `~/.pi/agent/skills/` (where the pi runtime looks) and seeds `~/.pi/agent/preferences.md` only if you don't already have one.
|
|
59
|
+
`update` refreshes skill folders but leaves your preferences alone unless you pass `--include-prefs`.
|
|
41
60
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- Refreshes the skill folders.
|
|
45
|
-
- **Does not** overwrite your global preferences. Pass `--include-prefs` if you want to re-seed.
|
|
46
|
-
|
|
47
|
-
## How it works
|
|
61
|
+
## How `/do` actually flows
|
|
48
62
|
|
|
49
63
|
```
|
|
50
|
-
[ /do ]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
[ /do <your request> ]
|
|
65
|
+
│
|
|
66
|
+
▼
|
|
67
|
+
bootstrap
|
|
68
|
+
├─ load merged preferences (global → project → package)
|
|
69
|
+
├─ check migration marker ──► if missing, hand off to /migrate
|
|
70
|
+
├─ taboo lint (handoff drift, banned labels)
|
|
71
|
+
▼
|
|
72
|
+
classify intent + scope
|
|
73
|
+
▼
|
|
74
|
+
execute the matching chain
|
|
75
|
+
├─ feature × small → (zoom-out?) → tdd → (improve-codebase-architecture?)
|
|
76
|
+
├─ feature × large → zoom-out → grill-with-docs → to-prd → to-issues → triage → tdd per slice → improve-codebase-architecture
|
|
77
|
+
├─ bug × any → diagnose → tdd (regression) → improve-codebase-architecture
|
|
78
|
+
├─ recon × any → recon-with-vision → (to-prd / to-issues)
|
|
79
|
+
└─ … (full table in skills/do/SKILL.md)
|
|
80
|
+
▼
|
|
81
|
+
live-verify locally (agent boots and drives the stack)
|
|
82
|
+
▼
|
|
83
|
+
side effects per prefs (commit, push, open PR, file issues, label)
|
|
84
|
+
▼
|
|
85
|
+
one-screen final summary
|
|
55
86
|
```
|
|
56
87
|
|
|
57
|
-
The first time you run `/do` in a new repo, the gate
|
|
88
|
+
The first time you run `/do` in a new repo, the migration gate fires:
|
|
58
89
|
|
|
59
|
-
1. **`/migrate`**
|
|
60
|
-
2. **`/setup`**
|
|
61
|
-
3. **`/taste`**
|
|
90
|
+
1. **`/migrate`** normalises `AGENTS.md`, archives handoff systems, locks them out via `.gitignore`, stamps the marker.
|
|
91
|
+
2. **`/setup`** scaffolds `docs/agents/{issue-tracker,triage-labels,domain}.md`.
|
|
92
|
+
3. **`/taste`** auto-detects project signals, asks only where the project diverges from your global preferences, writes `docs/agents/preferences.md`.
|
|
62
93
|
|
|
63
|
-
After that
|
|
94
|
+
After that, `/do` runs uninterrupted.
|
|
64
95
|
|
|
65
|
-
## Preferences
|
|
96
|
+
## Preferences: three layers, last write wins
|
|
66
97
|
|
|
67
98
|
```
|
|
68
|
-
~/.pi/agent/preferences.md # global
|
|
69
|
-
docs/agents/preferences.md # project
|
|
70
|
-
packages/<pkg>/preferences.md # package
|
|
99
|
+
~/.pi/agent/preferences.md # global — your engineering taste
|
|
100
|
+
docs/agents/preferences.md # project — overrides for this repo
|
|
101
|
+
packages/<pkg>/preferences.md # package — overrides for this subtree (optional)
|
|
71
102
|
```
|
|
72
103
|
|
|
73
|
-
Skills merge
|
|
104
|
+
Skills merge in that order. Edit any layer directly, or use `/taste` for a guided pass. The keys that move the needle most:
|
|
105
|
+
|
|
106
|
+
| key | what it controls |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `interrupt-on-ambiguity` | how willing the agent is to ask vs. pick a default and report it |
|
|
109
|
+
| `change-budget` | how big a chunk a single `/do` run is allowed to swallow |
|
|
110
|
+
| `auto-create-issues` / `auto-apply-labels` | whether tracker side-effects happen automatically |
|
|
111
|
+
| `auto-commit-per-slice` / `auto-pr` | how aggressively work lands on `main` |
|
|
112
|
+
| `local-live-policy` / `ops-live-policy` | when the agent boots locally vs. probes prod |
|
|
74
113
|
|
|
75
114
|
## What's a skill?
|
|
76
115
|
|
|
77
|
-
|
|
116
|
+
A directory with a `SKILL.md`. That's the whole format. The pi runtime reads the directory name and the markdown frontmatter and exposes the skill as `/<name>`. No code, no plugin API — just instructions for the agent, version-controlled like any other prose.
|
|
78
117
|
|
|
79
118
|
## Credits
|
|
80
119
|
|
|
@@ -82,12 +121,12 @@ The engineering discipline encoded here — `tdd`, `diagnose`, `to-prd`, `to-iss
|
|
|
82
121
|
|
|
83
122
|
This package adds:
|
|
84
123
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
124
|
+
- **`do`** — a one-shot orchestrator that picks the right chain
|
|
125
|
+
- **`migrate`** — a strict gate that normalises any repo into the canonical shape and probes for drift on every re-entry
|
|
126
|
+
- **`taste`** — three-layer preferences with project-aware onboarding
|
|
127
|
+
- **`where`** — pi-session recall for multi-session work
|
|
89
128
|
|
|
90
|
-
If
|
|
129
|
+
If these skills earn their keep for you, please support the upstream:
|
|
91
130
|
|
|
92
131
|
- Matt Pocock — https://www.mattpocock.com
|
|
93
132
|
- pi runtime — https://github.com/badlogic/pi
|
|
@@ -96,21 +135,15 @@ If you find these skills useful, support the upstream:
|
|
|
96
135
|
|
|
97
136
|
Versioning, changelog, tagging, and npm publishing are fully automated:
|
|
98
137
|
|
|
99
|
-
1. Land changes on `main` using **Conventional Commits** (`feat:`, `fix:`,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
3. Merge the Release PR. release-please tags the commit and creates a GitHub
|
|
104
|
-
Release.
|
|
105
|
-
4. The `Release` workflow rebuilds, retests, and runs `npm publish --access
|
|
106
|
-
public` automatically.
|
|
138
|
+
1. Land changes on `main` using **Conventional Commits** (`feat:`, `fix:`, `perf:`, `refactor:`, `docs:`, `chore:`).
|
|
139
|
+
2. [release-please](https://github.com/googleapis/release-please) opens or updates a **Release PR** that bumps the version and writes `CHANGELOG.md`.
|
|
140
|
+
3. Merge the Release PR. release-please tags the commit and creates a GitHub Release.
|
|
141
|
+
4. The `Release` workflow rebuilds, retests, and runs `npm publish --access public` automatically.
|
|
107
142
|
|
|
108
143
|
Required one-time setup (maintainer):
|
|
109
144
|
|
|
110
|
-
- Add an `NPM_TOKEN` repository secret with a granular publish token from
|
|
111
|
-
|
|
112
|
-
- If you flip the repo to public later, add `--provenance` to the publish
|
|
113
|
-
command in `.github/workflows/release.yml` for sigstore attestation.
|
|
145
|
+
- Add an `NPM_TOKEN` repository secret with a granular publish token from npmjs.com (read + write, 2FA bypass enabled).
|
|
146
|
+
- If the repo becomes public, add `--provenance` to the publish command in `.github/workflows/release.yml` for sigstore attestation.
|
|
114
147
|
|
|
115
148
|
## License
|
|
116
149
|
|
package/package.json
CHANGED
package/skills/do/SKILL.md
CHANGED
|
@@ -40,6 +40,15 @@ The point: **one request → one finished outcome**, with as few user interrupti
|
|
|
40
40
|
- Read docs/agents/{issue-tracker,triage-labels,domain}.md.
|
|
41
41
|
- If GitHub is the tracker, run a 2-second readiness check (gh auth status, repo accessible). On fail, halt with fix commands.
|
|
42
42
|
- If any preferences file's last-updated > 90 days, append a one-line refresh hint to the final summary.
|
|
43
|
+
- **Taboo lint (1-shot, non-blocking).** After prefs are merged, run a quick drift probe and surface findings in the final summary (do not halt the flow):
|
|
44
|
+
```bash
|
|
45
|
+
# handoff paths that the migration forbade
|
|
46
|
+
find docs/handoff .scratch/flow .handoff -type f 2>/dev/null | head
|
|
47
|
+
# post-migration commits that look like handoff writes
|
|
48
|
+
marker_date=$(grep -oE 'migrated: [0-9-]+' docs/agents/preferences.md 2>/dev/null | awk '{print $2}')
|
|
49
|
+
[ -n "$marker_date" ] && git log --since="$marker_date" --oneline --grep='handoff\|SESSION_' | head
|
|
50
|
+
```
|
|
51
|
+
Any hit → add a "taboo drift" line to the final summary recommending `/migrate` re-run. Findings are advisory at this stage; `/migrate` owns the cleanup.
|
|
43
52
|
- If the user's request hints at continuation ("이어서", "지난번", "where were we", "다시 시작"), invoke `/where` (optional). Otherwise skip it — the migration-enforced state-of-work channels (code / issues / prefs) are usually enough.
|
|
44
53
|
```
|
|
45
54
|
|
package/skills/migrate/SKILL.md
CHANGED
|
@@ -180,7 +180,14 @@ Wait for user OK. Show exact text being preserved or translated if user asks.
|
|
|
180
180
|
|
|
181
181
|
In order:
|
|
182
182
|
|
|
183
|
-
1. **Backup**: `mv` everything in ARCHIVE to `.archive
|
|
183
|
+
1. **Backup + handoff lockout**: `mv` everything in ARCHIVE to `.archive/$(date -u +%Y-%m-%d)-pre-migration/`. Add `.archive/` to `.gitignore` if not present. **Also append handoff-path lockouts** to `.gitignore` so they cannot silently come back:
|
|
184
|
+
```
|
|
185
|
+
# post-migration: handoff systems are forbidden (see docs/agents/preferences.md taboos)
|
|
186
|
+
docs/handoff/
|
|
187
|
+
.scratch/flow/
|
|
188
|
+
.handoff/
|
|
189
|
+
```
|
|
190
|
+
If the repo already gitignores these for a different reason, leave them — the rule still holds.
|
|
184
191
|
2. **Setup docs**: invoke `/setup` if any of `docs/agents/{issue-tracker,triage-labels,domain}.md` missing.
|
|
185
192
|
3. **Rewrite AGENTS.md** with the canonical skeleton:
|
|
186
193
|
```markdown
|
|
@@ -208,10 +215,12 @@ In order:
|
|
|
208
215
|
```
|
|
209
216
|
4. **Sub-AGENTS.md**: if scoped `<subdir>/AGENTS.md` exists, leave it but strip duplicated process docs; preserve only hard rules specific to that subtree.
|
|
210
217
|
5. **Onboard preferences**: invoke `/taste` in onboarding mode.
|
|
211
|
-
6. **Mark migrated**: append to `docs/agents/preferences.md
|
|
212
|
-
```
|
|
213
|
-
<!-- migrated:
|
|
218
|
+
6. **Mark migrated**: append to `docs/agents/preferences.md` using the real current ISO date (shell-resolved, never hand-typed):
|
|
219
|
+
```bash
|
|
220
|
+
printf '\n<!-- migrated: %s by `/migrate` -->\n' "$(date -u +%Y-%m-%d)" \
|
|
221
|
+
>> docs/agents/preferences.md
|
|
214
222
|
```
|
|
223
|
+
The marker literal must read `<!-- migrated: YYYY-MM-DD by \`/migrate\` -->`. Do not paste a future or rounded date — `/do`'s 90-day staleness check relies on this being accurate.
|
|
215
224
|
7. **Print summary**: counts of preserved / translated / archived / written, plus any FYI items needing manual review.
|
|
216
225
|
|
|
217
226
|
### 6. Idempotency
|
|
@@ -220,6 +229,23 @@ This skill is safe to re-run. On second run:
|
|
|
220
229
|
- If marker present and no drift detected → print "already migrated, no changes" and exit.
|
|
221
230
|
- If drift detected (new handoff files appeared, AGENTS.md got a generic process section bolted on, etc.) → present a diff for those drifts only.
|
|
222
231
|
|
|
232
|
+
**Drift probes** (run all on re-entry, regardless of marker):
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# 1. handoff paths resurrected since migration
|
|
236
|
+
find docs/handoff .scratch/flow .handoff -type f 2>/dev/null | head
|
|
237
|
+
|
|
238
|
+
# 2. handoff-style commits after the migration marker
|
|
239
|
+
marker_date=$(grep -oE 'migrated: [0-9-]+' docs/agents/preferences.md | awk '{print $2}')
|
|
240
|
+
[ -n "$marker_date" ] && git log --since="$marker_date" --oneline --grep='handoff\|SESSION_' || true
|
|
241
|
+
|
|
242
|
+
# 3. taboo labels still alive on the tracker (GitHub example)
|
|
243
|
+
gh label list --json name --jq '.[].name' 2>/dev/null \
|
|
244
|
+
| grep -E '^(retro-action-item|process-audit|handoff)$' || true
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Any non-empty output → surface as drift in the plan and offer to clean up (delete files, rename commits is N/A, archive labels via `gh label delete` after confirming zero usage). Do not silently ignore.
|
|
248
|
+
|
|
223
249
|
## When migration cannot proceed
|
|
224
250
|
|
|
225
251
|
- User refuses to delete a competing rule file (CLAUDE.md vs AGENTS.md both alive) → migration stops, `/do` stays blocked. The decision must be made.
|
|
@@ -55,7 +55,11 @@ For each approved slice, publish a new issue to the issue tracker. Use the issue
|
|
|
55
55
|
|
|
56
56
|
Publish issues in dependency order (blockers first) so you can reference real issue identifiers in the "Blocked by" field.
|
|
57
57
|
|
|
58
|
+
**Every issue body MUST start with the AI disclaimer** (same wording as `/triage`). This is a hard requirement — no exceptions, including auto-generated slices. After writing the body, grep your own draft for the disclaimer string; if missing, do not publish.
|
|
59
|
+
|
|
58
60
|
<issue-template>
|
|
61
|
+
> *This was generated by AI during triage.*
|
|
62
|
+
|
|
59
63
|
## Parent
|
|
60
64
|
|
|
61
65
|
A reference to the parent issue on the issue tracker (if the source was an existing issue, otherwise omit this section).
|
|
@@ -78,4 +82,28 @@ Or "None - can start immediately" if no blockers.
|
|
|
78
82
|
|
|
79
83
|
</issue-template>
|
|
80
84
|
|
|
85
|
+
**Publishing pattern (GitHub).** Use `--body-file -` with a heredoc, never inline `--body "..."`, so the disclaimer and markdown structure survive shell quoting verbatim:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
gh issue create \
|
|
89
|
+
--title "[Slice N] <title>" \
|
|
90
|
+
--label needs-triage \
|
|
91
|
+
--body-file - <<'EOF'
|
|
92
|
+
> *This was generated by AI during triage.*
|
|
93
|
+
|
|
94
|
+
## Parent
|
|
95
|
+
#<parent>
|
|
96
|
+
|
|
97
|
+
## What to build
|
|
98
|
+
...
|
|
99
|
+
EOF
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
After creation, immediately verify the disclaimer landed:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
gh issue view <n> --json body --jq '.body' | head -1 | grep -q 'generated by AI' \
|
|
106
|
+
|| echo "FAIL: disclaimer missing on #<n>"
|
|
107
|
+
```
|
|
108
|
+
|
|
81
109
|
Do NOT close or modify any parent issue.
|