pi-dev 0.1.4 → 0.1.5
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/package.json +1 -1
- package/skills/do/SKILL.md +42 -6
package/package.json
CHANGED
package/skills/do/SKILL.md
CHANGED
|
@@ -14,10 +14,16 @@ The point: **one request → one finished outcome**, with as few user interrupti
|
|
|
14
14
|
1. **Migration gate (strict).** If `docs/agents/preferences.md` does not contain the `<!-- migrated: ... -->` marker, **stop** and invoke `/migrate`. Do not run any engineering work on un-migrated repos. The user makes the migration decision; the skill executes it. No partial-migration shortcuts.
|
|
15
15
|
2. **Read preferences (3 layers).** Merge global (`~/.pi/agent/preferences.md`) → project (`docs/agents/preferences.md`) → package (`packages/<pkg>/preferences.md` if a single package is targeted). If global is missing, warn once and use built-in defaults from `/taste`.
|
|
16
16
|
3. **Treat preferences as decisions.** Any choice the merged prefs answer is **decided**. Do not re-ask.
|
|
17
|
-
4. **Keep going.** When something would normally cause a halt (ambiguous classification, scope creep beyond `change-budget`, missing follow-up), **expand and surface in the final summary** instead of stopping mid-flow.
|
|
17
|
+
4. **Keep going. Never hand the flow back between phases.** When something would normally cause a halt (ambiguous classification, scope creep beyond `change-budget`, missing follow-up), **expand and surface in the final summary** instead of stopping mid-flow. Specifically:
|
|
18
|
+
- Do **not** ask the user "shall I proceed to the next phase?", "want me to continue?", "should I do X next?", or any equivalent. The chain is decided in Step 3 and runs to completion.
|
|
19
|
+
- Do **not** end your turn between phases. A phase's terminal predicate passing is the cue to immediately print the next phase's status line and start it, in the same turn.
|
|
20
|
+
- Confirmation-shaped questions are only legal via the **Ambiguity protocol** (one decision the prefs genuinely cannot answer) or the **Failure protocol** (terminal predicate failed twice).
|
|
21
|
+
|
|
22
|
+
Halt only when:
|
|
18
23
|
- migration gate fails, OR
|
|
19
24
|
- GitHub gate fails (when GitHub is the tracker), OR
|
|
20
25
|
- a phase's terminal predicate fails twice and the failure cannot be characterised, OR
|
|
26
|
+
- the Ambiguity protocol fires (preferences truly silent on a one-shot decision), OR
|
|
21
27
|
- user interrupts.
|
|
22
28
|
5. **No handoff files.** State of work lives in three places only: **code (git), issue tracker, merged preferences**. Do not create `.scratch/flow/`, `docs/handoff/`, or any session-log file. Phase outputs are remembered in-context; persistent decisions are committed to code or filed as issues.
|
|
23
29
|
6. **Side-effect gates respect prefs literally.** `auto-create-issues`, `auto-apply-labels`, `auto-commit-per-slice`, `auto-pr` follow merged prefs without reinterpretation.
|
|
@@ -99,15 +105,31 @@ If measured scope exceeds `change-budget` (e.g. `module` budget vs `cross-packag
|
|
|
99
105
|
|
|
100
106
|
### Step 4 — Execute the chain
|
|
101
107
|
|
|
102
|
-
|
|
108
|
+
Before running any phase, **print the planned chain once** so the user can see the runway:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
[flow plan] intent=<x> scope=<y> chain: phase1 → phase2 → … → phaseM
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Then for each phase:
|
|
103
115
|
|
|
104
|
-
1. Print status line
|
|
116
|
+
1. Print status line `[flow N/M] <phase> — <one-sentence what>`.
|
|
105
117
|
2. Run the phase. Use merged prefs to make every taste decision the phase exposes.
|
|
106
118
|
3. Check the terminal predicate. If fail, retry once with explicit diagnosis. If fail again, halt with reason.
|
|
107
|
-
4.
|
|
119
|
+
4. **Transition without asking.** The instant the terminal predicate passes, print the *next* phase's status line on the very next line and start executing it, in the same turn. No "next, I'll do X" preamble. No "shall I continue?". No turn end.
|
|
108
120
|
|
|
109
121
|
**No handoff writes.** Pass state in-context only.
|
|
110
122
|
|
|
123
|
+
**Anti-patterns to detect in your own output before sending** (if you catch any of these mid-draft while phases remain, delete and replace with the next phase's status line):
|
|
124
|
+
|
|
125
|
+
- "Want me to proceed with <next phase>?"
|
|
126
|
+
- "Shall I continue to <next phase>?"
|
|
127
|
+
- "Ready to move on to <next phase>?"
|
|
128
|
+
- "Let me know if you want me to <next phase>."
|
|
129
|
+
- Ending the turn after a phase summary when N < M.
|
|
130
|
+
|
|
131
|
+
The only place a wrap-up belongs is **Step 7 — Final summary**, after the last phase has met its terminal predicate.
|
|
132
|
+
|
|
111
133
|
### Step 5 — Live verification
|
|
112
134
|
|
|
113
135
|
Driven by **two separate prefs keys**:
|
|
@@ -139,15 +161,29 @@ If a side-effect was skipped because prefs said so, list it in the final summary
|
|
|
139
161
|
|
|
140
162
|
### Step 7 — Final summary
|
|
141
163
|
|
|
142
|
-
One screen:
|
|
164
|
+
Reached only after the **last** phase in the chain has met its terminal predicate (or the Failure protocol fired). One screen:
|
|
143
165
|
|
|
144
|
-
- intent / scope / chain executed
|
|
166
|
+
- intent / scope / chain executed (all N/M status lines accounted for)
|
|
145
167
|
- diffs (files touched)
|
|
146
168
|
- side effects done (issue URLs, commit SHAs, branch name, PR URL)
|
|
147
169
|
- side effects deferred (with reason and the exact command to do them)
|
|
148
170
|
- expansions (scope went beyond budget, ambiguous decisions made with rationale)
|
|
149
171
|
- prefs refresh hint if stale
|
|
150
172
|
|
|
173
|
+
The summary's **last line** must be one of these two terminators, so the user can tell at a glance whether the flow is done:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
chain complete — no further action.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
or
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
follow-up: <one-line description> — run `<exact command>`.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
If you emitted anything that looks like a wrap-up ("All set!", "Done.", "Let me know if...") without one of those two terminators, you ended early. Reopen the chain at the missed phase.
|
|
186
|
+
|
|
151
187
|
## Phase contracts (terminal predicates)
|
|
152
188
|
|
|
153
189
|
| phase | done when… |
|