@hobin/developer 0.1.7 → 0.1.9
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 +212 -355
- package/REFERENCE_ROUTING.md +243 -0
- package/extensions/developer.ts +601 -23
- package/extensions/machine.ts +45 -0
- package/extensions/references/behavior-preserving-structural-change.md +87 -8
- package/extensions/skills.ts +330 -52
- package/extensions/state.ts +227 -2
- package/extensions/tool-policy.ts +87 -0
- package/package.json +9 -3
- package/skills/abstraction-review/SKILL.md +37 -23
- package/skills/abstraction-review/reference-policy.json +66 -0
- package/skills/abstraction-review/references/field-card.md +113 -168
- package/skills/abstraction-review/references/repair-table.md +66 -80
- package/skills/abstraction-review/references/worked-examples.md +79 -256
- package/skills/model/SKILL.md +31 -13
- package/skills/model/reference-policy.json +96 -0
- package/skills/model/references/contract-and-replacement-models.md +112 -0
- package/skills/model/references/logic-query-semantics.md +89 -0
- package/skills/model/references/planning-models.md +75 -0
- package/skills/model/references/problem-modeling.md +143 -276
- package/skills/model/references/proof-obligations.md +71 -0
- package/skills/model/references/relational-constraint-models.md +110 -0
- package/skills/model/references/solver-result-boundaries.md +83 -0
- package/skills/model/references/temporal-behavior-models.md +106 -0
- package/skills/naming-judgment/SKILL.md +17 -4
- package/skills/naming-judgment/reference-policy.json +29 -0
- package/skills/naming-judgment/references/domain-naming.md +29 -10
- package/skills/schedule/SKILL.md +16 -6
- package/skills/schedule/reference-policy.json +29 -0
- package/skills/schedule/references/structural-change-timing.md +81 -18
- package/skills/signal/SKILL.md +17 -6
- package/skills/signal/reference-policy.json +29 -0
- package/skills/signal/references/structural-movement.md +87 -14
- package/skills/sketch/SKILL.md +38 -42
- package/skills/sketch/reference-policy.json +212 -0
- package/skills/sketch/references/accumulator-invariants.md +125 -0
- package/skills/sketch/references/closure-and-conventional-interfaces.md +87 -0
- package/skills/sketch/references/composition-by-wishes.md +69 -0
- package/skills/sketch/references/data-driven-design.md +99 -22
- package/skills/sketch/references/data-shape-template-catalog.md +58 -19
- package/skills/sketch/references/design-levels-and-boundaries.md +133 -0
- package/skills/sketch/references/earned-abstraction.md +75 -0
- package/skills/sketch/references/generative-recursion.md +122 -0
- package/skills/sketch/references/generic-dispatch-systems.md +75 -0
- package/skills/sketch/references/language-semantics.md +82 -0
- package/skills/sketch/references/meaning-preserving-conversions.md +69 -0
- package/skills/sketch/references/process-shape-and-resources.md +157 -0
- package/skills/sketch/references/representation-barriers.md +73 -0
- package/skills/sketch/references/responsibility-and-collaboration.md +108 -0
- package/skills/sketch/references/runtime-and-compilation.md +84 -0
- package/skills/sketch/references/selection-and-creation.md +76 -0
- package/skills/sketch/references/state-history-and-order.md +126 -0
- package/skills/sketch/references/type-transitions.md +54 -0
- package/skills/sketch/references/variation-roles.md +59 -0
- package/skills/verify/SKILL.md +17 -6
- package/skills/verify/reference-policy.json +30 -0
- package/skills/verify/references/verifier-selection-and-pass-but-wrong.md +152 -192
- package/SOURCES.md +0 -104
- package/skills/abstraction-review/references/recipe-cards.md +0 -322
- package/skills/model/references/worked-models-and-specialized-techniques.md +0 -218
- package/skills/sketch/references/abstraction-barriers-and-closure.md +0 -160
- package/skills/sketch/references/abstraction-composition-and-state.md +0 -184
- package/skills/sketch/references/composition-generative-recursion-and-accumulators.md +0 -196
- package/skills/sketch/references/generic-operations-and-languages.md +0 -134
- package/skills/sketch/references/processes-state-and-time.md +0 -171
- package/skills/sketch/references/responsibility-and-variation.md +0 -245
package/README.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Developer for Pi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Developer helps [Pi](https://pi.dev) stop guessing, choose the right design or
|
|
4
|
+
review method, make one justified change, and show the evidence behind it.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Use it when a task may hide product rules, consequential cases, ownership,
|
|
7
|
+
compatibility, structural timing, or pass-but-wrong verification. Developer:
|
|
8
|
+
|
|
9
|
+
- turns consequential uncertainty into explicit questions;
|
|
10
|
+
- routes Pi to one of ten focused judgment skills;
|
|
11
|
+
- loads deeper references only when an observable trigger calls for them;
|
|
12
|
+
- keeps implementation, unresolved questions, and verification evidence visible
|
|
13
|
+
on the current session branch.
|
|
14
|
+
|
|
15
|
+
Developer is adaptive rather than phase-driven. It does not force every task
|
|
16
|
+
through a fixed plan, design, implementation, and review sequence.
|
|
10
17
|
|
|
11
18
|
## Install
|
|
12
19
|
|
|
@@ -22,296 +29,225 @@ Try it for one run without installing:
|
|
|
22
29
|
pi -e npm:@hobin/developer
|
|
23
30
|
```
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Start Pi, turn Developer on, and describe the product task normally:
|
|
32
|
+
Start Pi and enable Developer:
|
|
28
33
|
|
|
29
34
|
```text
|
|
30
35
|
/develop on
|
|
31
|
-
The selected payment method disappears after navigating back to checkout. Find the cause and fix it.
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
skill or is already justified as implementation action. You do not need to call
|
|
36
|
-
its internal protocol tools yourself. While Developer is on, Pi's built-in shell
|
|
37
|
-
and artifact tools follow the active route.
|
|
38
|
+
Run `pi list` if you want to confirm that the package is installed.
|
|
38
39
|
|
|
39
|
-
##
|
|
40
|
+
## Try it
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| `/develop` | Open the non-overlay Developer settings surface |
|
|
44
|
-
| `/develop on` | Enable adaptive routing and route-bound access to Pi built-in `bash`, `edit`, and `write` |
|
|
45
|
-
| `/develop status` | Inspect current branch state in a read-only panel |
|
|
46
|
-
| `/develop questions` | Choose an unresolved question, answer it or request investigation, and submit it to Pi |
|
|
47
|
-
| `/develop off` | Disable the protocol and clear current protocol state |
|
|
42
|
+
Describe the product task normally. You do not need to name a skill or call an
|
|
43
|
+
internal protocol tool.
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
```text
|
|
46
|
+
/develop on
|
|
47
|
+
The selected payment method disappears after navigating back to checkout.
|
|
48
|
+
Find the cause and fix it.
|
|
49
|
+
```
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
Depending on what the repository already establishes, Developer may ask for a
|
|
52
|
+
missing product decision, inspect the relevant behavior, route a focused model
|
|
53
|
+
or sketch, permit one implementation movement, and require evidence before the
|
|
54
|
+
changed work is treated as complete.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
Other useful first requests:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Add scheduled invoice delivery.
|
|
60
|
+
Clarify any missing product rules before editing.
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
skill and implementation routes; built-in `edit` and `write` require an active
|
|
65
|
-
`implementation` route and no `before-implementation` gate. When off, Developer
|
|
66
|
-
clears current protocol state and restores only tools that it withheld.
|
|
67
|
-
|
|
68
|
-
The tool policy and question gates are workflow-integrity controls, not a security
|
|
69
|
-
sandbox. A skill route receives the shell execution lane needed for repository
|
|
70
|
-
inspection and verifier execution, while structured `edit`/`write` mutation
|
|
71
|
-
remains implementation-only. Shell commands are not parsed as a security language; skill
|
|
72
|
-
contracts prohibit artifact mutation, and adversarial evaluation checks the
|
|
73
|
-
workspace boundary. Developer recognizes Pi built-ins from their provenance,
|
|
74
|
-
preserves unrelated active tools, and does not force-enable tools the user
|
|
75
|
-
disabled.
|
|
76
|
-
|
|
77
|
-
## How a request runs
|
|
78
|
-
|
|
79
|
-
Developer adds two model-facing protocol tools:
|
|
80
|
-
|
|
81
|
-
1. `developer_route_question` opens one route for one concrete question.
|
|
82
|
-
2. The route target is `implementation` or one currently available Developer skill.
|
|
83
|
-
3. A skill route returns the exact Pi-discovered `SKILL.md` instructions and canonical
|
|
84
|
-
path; an implementation route declares one movement, its stable landing, and its narrow
|
|
85
|
-
verification. A behavior-preserving structural route also loads the focused
|
|
86
|
-
execution profile based on flocking-style movement and small tidyings.
|
|
87
|
-
4. `developer_record_judgment` closes the route with a status, result, evidence,
|
|
88
|
-
artifacts, and any newly opened questions. Developer then routes again from
|
|
89
|
-
the stable landing before another movement.
|
|
90
|
-
5. Consecutive implementation routes remain valid. To prevent routing by momentum, a
|
|
91
|
-
implementation route that follows an implementation judgment must cite the previous landing
|
|
92
|
-
evidence and record the plausible skill routes reconsidered plus why they add
|
|
93
|
-
no useful judgment at that point.
|
|
94
|
-
|
|
95
|
-
The conditional default topology is:
|
|
63
|
+
```text
|
|
64
|
+
This parser change is green, but the conditionals are spreading.
|
|
65
|
+
Decide whether structural work belongs now.
|
|
66
|
+
```
|
|
96
67
|
|
|
97
68
|
```text
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
→ one implementation green-to-green movement → re-route from evidence
|
|
101
|
-
→ verify before completion
|
|
69
|
+
The tests pass after this cache rewrite.
|
|
70
|
+
Check what they do not prove before calling it done.
|
|
102
71
|
```
|
|
103
72
|
|
|
104
|
-
|
|
105
|
-
evidence may route backward or sideways. One guard is deliberate: a resolved
|
|
106
|
-
model cannot flow straight into mutation. New feature work receives an initial
|
|
107
|
-
`sketch`; existing-code structural work receives a `signal` first.
|
|
108
|
-
|
|
109
|
-
Product code is still read, edited, executed, and tested with Pi's normal tools.
|
|
110
|
-
Developer's tools only route and record judgment; they do not implement product
|
|
111
|
-
changes themselves.
|
|
112
|
-
|
|
113
|
-
There is never a required order such as `specify → model → sketch → verify`.
|
|
114
|
-
Each new route is chosen from the current question and evidence.
|
|
115
|
-
|
|
116
|
-
## What the TUI shows
|
|
117
|
-
|
|
118
|
-
Developer uses different Pi surfaces for different information:
|
|
119
|
-
|
|
120
|
-
- The footer contains only activation, protocol state, and current route target.
|
|
121
|
-
- A compact widget appears only while a route or unresolved question exists.
|
|
122
|
-
- `/develop` uses Pi's `SettingsList` semantics: the `Developer` row shows
|
|
123
|
-
and toggles the current On/Off value, `Status` opens branch details,
|
|
124
|
-
`History · N` opens complete route/judgment records when present, and
|
|
125
|
-
`Open questions · N` appears only when unresolved questions exist.
|
|
126
|
-
- `/develop status` opens a non-overlay, branch-grounded, read-only status panel
|
|
127
|
-
with recent route/judgment history and the alternatives recorded for
|
|
128
|
-
consecutive implementation work.
|
|
129
|
-
- `/develop questions` uses stable internal question IDs. A sole question opens
|
|
130
|
-
directly; multiple questions use one selector. Every open question, regardless
|
|
131
|
-
of owner or gate, first shows a complete non-overlay decision brief: context is
|
|
132
|
-
rendered as Markdown, then blocked work, gate, resolution criteria, and every
|
|
133
|
-
structured field/option appear before Continue or Leave open controls.
|
|
134
|
-
Cancelling the first field or editor returns to that brief; leaving the brief
|
|
135
|
-
returns to the parent without changing protocol state.
|
|
136
|
-
- A newly opened, answerable user question that gates implementation work is pushed
|
|
137
|
-
to the same explanation-first brief before the judgment tool returns. The user
|
|
138
|
-
may continue only after reviewing the explanation or leave it open. Structured
|
|
139
|
-
responses then collect each option/detail and provide review/edit before submission.
|
|
140
|
-
The answer still requires a focused judgment and explicit `question_updates`.
|
|
141
|
-
- Developer custom surfaces leave mouse ownership with the terminal: wheel/trackpad
|
|
142
|
-
scrolls normal-buffer content, drag selects text, and Cmd+C copies it. Wheel input
|
|
143
|
-
never changes the selected control; arrow keys do. Potentially long surfaces render
|
|
144
|
-
complete content rather than hiding it behind an application-owned viewport.
|
|
145
|
-
- Protocol tool rows show compact status by default and higher-contrast evidence
|
|
146
|
-
details when expanded with the user's configured Pi keybinding. They render
|
|
147
|
-
without Pi's default full tool-row background.
|
|
148
|
-
|
|
149
|
-
RPC, JSON, and print modes keep the same protocol semantics without depending on
|
|
150
|
-
terminal components.
|
|
151
|
-
|
|
152
|
-
## Protocol states
|
|
73
|
+
## Why Developer
|
|
153
74
|
|
|
154
|
-
|
|
75
|
+
Ordinary coding requests often contain decisions that look like implementation
|
|
76
|
+
details but are actually product, model, boundary, or evidence questions.
|
|
77
|
+
|
|
78
|
+
| Before | With Developer |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Vague requests decide product behavior | Unknowns become owned questions |
|
|
81
|
+
| Green tests stand in for claims | Evidence is matched to each claim |
|
|
82
|
+
| Refactoring follows taste or momentum | Structure follows observed pressure |
|
|
83
|
+
| All methods enter context | Only triggered methods load |
|
|
84
|
+
| Branches lose rationale | Evidence replays with its branch |
|
|
85
|
+
|
|
86
|
+
Developer coordinates judgment; Pi still reads, edits, runs, and tests the
|
|
87
|
+
product with its normal tools.
|
|
88
|
+
|
|
89
|
+
## How it works
|
|
90
|
+
|
|
91
|
+
Developer follows a small adaptive loop:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Discover → Load → Derive → Act → Check → Learn
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
1. **Discover** the current unresolved question from the request, repository,
|
|
98
|
+
and latest evidence.
|
|
99
|
+
2. **Load** one focused skill, plus only the deeper references whose triggers
|
|
100
|
+
actually apply.
|
|
101
|
+
3. **Derive** an inspectable artifact such as a case table, boundary map, wished
|
|
102
|
+
interface, review card, timing matrix, or evidence matrix.
|
|
103
|
+
4. **Act** through one justified implementation movement when mutation is the
|
|
104
|
+
right next step.
|
|
105
|
+
5. **Check** the changed claim with an appropriate observer and verifier.
|
|
106
|
+
6. **Learn** from the stable landing, preserve remaining questions, and route
|
|
107
|
+
again rather than continuing by momentum.
|
|
108
|
+
|
|
109
|
+
This is not a mandatory phase sequence. A simple task can move directly to
|
|
110
|
+
implementation. New evidence can route backward or sideways. Consecutive
|
|
111
|
+
implementation movements are allowed when the previous landing is re-observed
|
|
112
|
+
and the plausible judgment routes add no useful information.
|
|
113
|
+
|
|
114
|
+
## Common workflows
|
|
115
|
+
|
|
116
|
+
| Need | Developer helps Pi… |
|
|
155
117
|
| --- | --- |
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- `idle` does not mean the user's task is finished.
|
|
167
|
-
- A resolved `specify` judgment is not user acceptance.
|
|
168
|
-
- A resolved `verify` judgment is not timeless proof after later changes.
|
|
169
|
-
|
|
170
|
-
Pending questions receive stable internal IDs, but users do not type them. Each
|
|
171
|
-
question records:
|
|
172
|
-
|
|
173
|
-
- `resolutionOwner`: `agent`, `user`, or `environment`;
|
|
174
|
-
- `gate`: `none`, `before-implementation`, or `before-completion`;
|
|
175
|
-
- `resolutionCriteria`: the observable evidence or answer that closes it;
|
|
176
|
-
- `context`: Markdown explanation rendered before answer controls for every open
|
|
177
|
-
question; required for user-owned `before-implementation` and `before-completion`
|
|
178
|
-
questions, optional for other and legacy questions;
|
|
179
|
-
- optional user-owned `responseSpec`: a bounded `choice-form` with required
|
|
180
|
-
single-choice fields and optional per-option detail prompts.
|
|
181
|
-
|
|
182
|
-
A producer should use `response_spec` when a user must answer finite decisions
|
|
183
|
-
such as A, B1–B4, C, and so on. Each decision becomes one field; the TUI does not
|
|
184
|
-
infer controls by parsing Markdown. Options such as A3 or G3 that need additional
|
|
185
|
-
input declare `detail_prompt`. Missing or malformed replay data falls back to the
|
|
186
|
-
freeform editor without dropping the pending question.
|
|
187
|
-
|
|
188
|
-
Selecting `/develop questions` always opens the explanation brief before any
|
|
189
|
-
structured control or owner-specific editor. User questions then ask for the
|
|
190
|
-
required decision, agent questions ask Pi to investigate, and environment
|
|
191
|
-
questions request access or an external observation. Submitting
|
|
192
|
-
focuses the question in branch state; an explicit ID, focus, or exact question
|
|
193
|
-
match associates the next route. Selection alone never closes it.
|
|
194
|
-
|
|
195
|
-
Every judgment rechecks all pending questions. `question_updates` can resolve an
|
|
196
|
-
unfocused question when implementation, tests, inspection, user input, or an
|
|
197
|
-
environment observation naturally supplies its criteria. A focused question
|
|
198
|
-
must receive an explicit update: resolve or dismiss it with concrete basis,
|
|
199
|
-
retain it as open or blocked, or close the broad parent while opening narrower
|
|
200
|
-
children. Resolved and not-applicable updates remove the question with recorded
|
|
201
|
-
basis; open or blocked updates preserve its identity. A `before-implementation` question blocks both implementation
|
|
202
|
-
routes and Pi built-in artifact tools while Developer is on. A
|
|
203
|
-
`before-completion` question allows investigation and implementation but keeps
|
|
204
|
-
the protocol non-idle and prevents verification debt from being cleared as a
|
|
205
|
-
completion claim.
|
|
206
|
-
|
|
207
|
-
A resolved or not-applicable judgment may preserve a distinct follow-up question:
|
|
208
|
-
finishing the routed judgment does not imply that no later work was discovered.
|
|
209
|
-
It may not reopen its own normalized question under a resolved status; that route
|
|
210
|
-
must remain needs-evidence/blocked or explicitly refine a focused parent instead.
|
|
211
|
-
|
|
212
|
-
When a judgment replaces a broad unresolved question with more specific evidence
|
|
213
|
-
questions, only the actionable children remain. Equivalent question wording is
|
|
214
|
-
deduplicated while preserving the existing identity.
|
|
118
|
+
| Clarify a feature | Separate meaning, constraints, examples, and blockers |
|
|
119
|
+
| Model behavior | Enumerate cases, contracts, transitions, and guarantees |
|
|
120
|
+
| Shape code | Expose data, interfaces, collaboration, state, and checks |
|
|
121
|
+
| Inspect a design | Identify structural movement and model-code mismatch |
|
|
122
|
+
| Review an abstraction | Keep, revise, split, reject, or defer the candidate |
|
|
123
|
+
| Time a refactor | Separate behavior work and judge the cost of delay |
|
|
124
|
+
| Name code | Preserve domain meaning and expose effects or multiple senses |
|
|
125
|
+
| Verify completion | Match evidence to claims and find pass-but-wrong risks |
|
|
126
|
+
| Challenge a claim | Run finite adversarial checks with an explicit stop |
|
|
127
|
+
| Clarify a decision | Choose the smallest useful visual surface |
|
|
215
128
|
|
|
216
129
|
## Skills
|
|
217
130
|
|
|
218
|
-
|
|
219
|
-
|
|
131
|
+
Developer may route these skills automatically. You can also invoke any one
|
|
132
|
+
directly with `/skill:<name>`.
|
|
220
133
|
|
|
221
134
|
| Skill | Helps decide |
|
|
222
135
|
| --- | --- |
|
|
223
|
-
| `specify` | Product meaning, scope, invariants,
|
|
224
|
-
| `model` |
|
|
225
|
-
| `sketch` |
|
|
226
|
-
| `signal` |
|
|
227
|
-
| `naming-judgment` |
|
|
228
|
-
| `abstraction-review` | Whether
|
|
229
|
-
| `schedule` |
|
|
230
|
-
| `verify` |
|
|
231
|
-
| `visualize` |
|
|
232
|
-
| `adversarial-eval` |
|
|
233
|
-
|
|
234
|
-
Each
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
artifact comparisons for `signal`, rename maps for `naming-judgment`, review
|
|
238
|
-
cards and boundaries for `abstraction-review`, timing matrices for `schedule`,
|
|
239
|
-
evidence matrices for `verify`, escalation matrices for `adversarial-eval`, and
|
|
240
|
-
a completed visual artifact for `visualize` when a visual is warranted. Simple
|
|
241
|
-
judgments may remain compact when prose is genuinely clearer.
|
|
242
|
-
|
|
243
|
-
Skill judgment results preserve those surfaces as Markdown. Expanded protocol
|
|
244
|
-
rows render tables and code blocks through Pi's Markdown component rather than
|
|
245
|
-
flattening them into dim text.
|
|
246
|
-
|
|
247
|
-
Pi's loaded resource metadata is authoritative. If package configuration filters
|
|
248
|
-
or disables a skill, Developer cannot route to it even if its file exists in the
|
|
249
|
-
npm package.
|
|
250
|
-
|
|
251
|
-
Several skills link to detailed capability documents under their own
|
|
252
|
-
`references/` directory. Pi loads the `SKILL.md` instructions on demand; the
|
|
253
|
-
instructions say when each reference is worth reading and resolve it relative to
|
|
254
|
-
the skill directory. A reference may synthesize several sources because the
|
|
255
|
-
leaf's question, not a book title, owns the capability. Each source-derived
|
|
256
|
-
reference includes a source trace, and [SOURCES.md](./SOURCES.md) maps the full
|
|
257
|
-
book coverage across leaves and the implementation path. Small, settled judgments do not
|
|
258
|
-
need the extra context.
|
|
259
|
-
|
|
260
|
-
Primary references retain the capability's core insight and one complete case.
|
|
261
|
-
When a question has materially different derivation rules, the skill routes a
|
|
262
|
-
more focused supporting reference—for example, data-shape templates separately
|
|
263
|
-
from generative recursion, or representation barriers separately from state and
|
|
264
|
-
time. This follows Pi's documented progressive-disclosure structure: supporting
|
|
265
|
-
files stay relative to their skill and load only when the unresolved question
|
|
266
|
-
needs them. `SOURCES.md` also records the reference-quality contract used to
|
|
267
|
-
prevent source summaries from replacing executable judgment recipes.
|
|
268
|
-
|
|
269
|
-
Developer treats Pi's loaded `systemPromptOptions.skills` metadata as the skill
|
|
270
|
-
SSOT. It does not rescan the package and cannot route a skill Pi filtered,
|
|
271
|
-
disabled, or replaced through resource configuration.
|
|
272
|
-
|
|
273
|
-
## State, branches, and compaction
|
|
274
|
-
|
|
275
|
-
Activation changes are stored as Pi custom session entries. Routes and judgments
|
|
276
|
-
are stored in tool-result details. Developer replays the current branch through
|
|
277
|
-
an XState v5 machine on startup and tree navigation, so a fork inherits only the
|
|
278
|
-
events on its branch. Parallel machine regions keep activation, route, question gates,
|
|
279
|
-
framing debt, and verification debt explicit; transition guards reject an implementation
|
|
280
|
-
route while a `before-implementation` question remains.
|
|
136
|
+
| `specify` | Product meaning, scope, invariants, and blockers |
|
|
137
|
+
| `model` | Cases, contracts, transitions, guarantees, and checks |
|
|
138
|
+
| `sketch` | Data, interfaces, collaboration, flow, state, and code shape |
|
|
139
|
+
| `signal` | Structural movement and model-code mismatch |
|
|
140
|
+
| `naming-judgment` | Stable domain meaning, effects, and multiple senses |
|
|
141
|
+
| `abstraction-review` | Whether to keep, revise, split, reject, or defer |
|
|
142
|
+
| `schedule` | Whether structural work belongs now, after, or never |
|
|
143
|
+
| `verify` | What evidence proves and what pass-but-wrong risk remains |
|
|
144
|
+
| `visualize` | Which visual surface materially lowers judgment cost |
|
|
145
|
+
| `adversarial-eval` | Which finite checks could falsify a claim |
|
|
146
|
+
|
|
147
|
+
Each skill produces an artifact suited to its question instead of defaulting to
|
|
148
|
+
undifferentiated prose. Simple judgments remain compact when prose is genuinely
|
|
149
|
+
clearer.
|
|
281
150
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
151
|
+
## Commands
|
|
152
|
+
|
|
153
|
+
| Command | Effect |
|
|
154
|
+
| --- | --- |
|
|
155
|
+
| `/develop` | Open Developer settings |
|
|
156
|
+
| `/develop on` | Enable adaptive routing and route-bound tool access |
|
|
157
|
+
| `/develop status` | Inspect current branch state and recent route history |
|
|
158
|
+
| `/develop questions` | Review or investigate an unresolved question |
|
|
159
|
+
| `/develop off` | Disable Developer and clear current protocol state |
|
|
160
|
+
|
|
161
|
+
Start a preconfigured session with Developer enabled:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
pi --develop
|
|
292
165
|
```
|
|
293
166
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
167
|
+
Turning Developer off while work or questions remain asks for confirmation in
|
|
168
|
+
interactive mode. Historical session entries remain; only current protocol state
|
|
169
|
+
is cleared.
|
|
170
|
+
|
|
171
|
+
## Questions and visible state
|
|
299
172
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
173
|
+
Developer keeps consequential unknowns explicit instead of silently turning them
|
|
174
|
+
into assumptions. A question records who can resolve it, what evidence or answer
|
|
175
|
+
would close it, and whether it blocks implementation or completion.
|
|
303
176
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
a large-context model reaches its limit too abruptly.
|
|
177
|
+
`/develop questions` shows the explanation before answer controls. User-owned
|
|
178
|
+
questions accept an answer, agent-owned questions can be sent back to Pi for
|
|
179
|
+
investigation, and environment-owned questions identify access or observations
|
|
180
|
+
that must come from outside the session.
|
|
309
181
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
182
|
+
The footer shows activation and the current route. A compact widget appears only
|
|
183
|
+
while a route or unresolved question exists. `/develop status` and
|
|
184
|
+
`/develop questions` expose the details without requiring users to remember
|
|
185
|
+
internal IDs.
|
|
186
|
+
|
|
187
|
+
Visible routing states include:
|
|
188
|
+
|
|
189
|
+
| State | Meaning |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| `idle` | No active route or unresolved Developer question |
|
|
192
|
+
| `needs-judgment` | Current route still needs a recorded result |
|
|
193
|
+
| `needs-evidence` | Agent or environment evidence is still required |
|
|
194
|
+
| `needs-answer` | A user decision is still required |
|
|
195
|
+
| `needs-routing` | An implementation landing must be routed again |
|
|
196
|
+
| `needs-verification` | Changed artifacts still need verification |
|
|
197
|
+
| `blocked` | A required answer, observation, or access is unavailable |
|
|
198
|
+
|
|
199
|
+
These are routing states, not timeless product-completion claims. In particular,
|
|
200
|
+
`idle` does not mean that the user's task is complete, and later changes can
|
|
201
|
+
invalidate an earlier verification judgment.
|
|
202
|
+
|
|
203
|
+
## Tool boundaries
|
|
204
|
+
|
|
205
|
+
While Developer is on:
|
|
206
|
+
|
|
207
|
+
- Pi's built-in `bash` is available for repository inspection and verification
|
|
208
|
+
during skill and implementation routes;
|
|
209
|
+
- built-in `edit` and `write` require an active implementation route with no
|
|
210
|
+
unresolved before-implementation gate;
|
|
211
|
+
- unrelated tools and user-disabled tools keep their existing configuration;
|
|
212
|
+
- product changes still happen through Pi's normal tools, not through
|
|
213
|
+
Developer's coordination tools.
|
|
214
|
+
|
|
215
|
+
These controls protect workflow integrity. They are **not a security sandbox**:
|
|
216
|
+
shell commands are not parsed as a security language, and Pi packages run with
|
|
217
|
+
the access of the Pi process. Review the package before installation and use an
|
|
218
|
+
external sandbox when you need an operating-system security boundary.
|
|
219
|
+
|
|
220
|
+
## References and auditability
|
|
221
|
+
|
|
222
|
+
A skill's always-needed method lives in `SKILL.md`. Conditional derivations live
|
|
223
|
+
in `references/*.md`, while `reference-policy.json` maps an observable trigger
|
|
224
|
+
to one question, required reference set, expected artifact, stop condition, and
|
|
225
|
+
handoff boundary.
|
|
226
|
+
|
|
227
|
+
During a Developer route, selected references are loaded through a dedicated
|
|
228
|
+
trace rather than an ordinary file read. A resolved judgment connects each
|
|
229
|
+
relied-upon reference to the observed trigger, applied rule, and resulting
|
|
230
|
+
artifact.
|
|
231
|
+
Reference and policy hashes make that application replayable on the current
|
|
232
|
+
branch; they do not by themselves prove source fidelity.
|
|
233
|
+
|
|
234
|
+
See [Reference routing](./REFERENCE_ROUTING.md) for the runtime contract and
|
|
235
|
+
policy schema.
|
|
236
|
+
|
|
237
|
+
## Branches, compaction, and reloads
|
|
238
|
+
|
|
239
|
+
Routes, judgments, questions, and activation changes are stored in Pi session
|
|
240
|
+
entries and replayed from the current branch. A fork therefore inherits only its
|
|
241
|
+
own branch history.
|
|
242
|
+
|
|
243
|
+
Developer leaves compaction to Pi. Current route and recovery metadata are
|
|
244
|
+
placed where the normal Pi compactor can preserve them. Configure Pi's
|
|
245
|
+
compaction settings if you want an earlier threshold.
|
|
246
|
+
|
|
247
|
+
Developer restores only the built-in tool changes it owns when a session runtime
|
|
248
|
+
shuts down. If a hot reload encounters older Developer history without a safe
|
|
249
|
+
release marker, restart the Pi process rather than guessing the user's original
|
|
250
|
+
tool configuration.
|
|
315
251
|
|
|
316
252
|
## Update, configure, and remove
|
|
317
253
|
|
|
@@ -329,27 +265,8 @@ Use a project-local install when a repository should declare the package in
|
|
|
329
265
|
pi install -l npm:@hobin/developer
|
|
330
266
|
```
|
|
331
267
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
documentation](https://pi.dev/docs/latest/packages) for package scope, filtering,
|
|
335
|
-
pinning, and security behavior.
|
|
336
|
-
|
|
337
|
-
## Package contents
|
|
338
|
-
|
|
339
|
-
```text
|
|
340
|
-
extensions/
|
|
341
|
-
├── developer.ts # command, protocol tools, events, and Pi integration
|
|
342
|
-
├── machine.ts # XState v5 parallel regions, guards, transitions, and tags
|
|
343
|
-
├── references/ # implementation profiles loaded through tool results
|
|
344
|
-
├── state.ts # developer/v5 event normalization and branch replay
|
|
345
|
-
├── skills.ts # loaded-skill filtering and instruction rendering
|
|
346
|
-
├── tool-policy.ts # machine-derived execution and mutation access policy
|
|
347
|
-
└── tui.ts # selectors, widget, status panel, and prompt preparation
|
|
348
|
-
skills/ # ten independently loadable Pi skills
|
|
349
|
-
SOURCES.md # source-to-capability maintenance trace
|
|
350
|
-
evals/ # model-dependent scenarios and workspace assertions
|
|
351
|
-
tests/ # deterministic state, policy, extension, and TUI tests
|
|
352
|
-
```
|
|
268
|
+
See the [Pi package documentation](https://pi.dev/docs/latest/packages) for
|
|
269
|
+
package scope, filtering, pinning, and security behavior.
|
|
353
270
|
|
|
354
271
|
## Development
|
|
355
272
|
|
|
@@ -367,74 +284,14 @@ Load the workspace package into Pi without installing it:
|
|
|
367
284
|
pi -e ./packages/developer
|
|
368
285
|
```
|
|
369
286
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
Choose each independent scenario from the QA menu:
|
|
377
|
-
|
|
378
|
-
1. **Activation + confirm/cancel** — toggle Off/On on the same Settings surface;
|
|
379
|
-
cancel destructive Off and verify the row stays On, then confirm it and verify
|
|
380
|
-
the route/questions clear before toggling On again.
|
|
381
|
-
2. **Settings / Status / History / Questions** — open a History judgment,
|
|
382
|
-
drag-select detail text and paste it elsewhere, then verify one-level Escape
|
|
383
|
-
from detail → History → Settings → scenario menu with parent focus restored.
|
|
384
|
-
3. **Custom answer + Korean IME** — choose **Write another answer…**, then check
|
|
385
|
-
composition, validation, review/edit, and preset/custom provenance.
|
|
386
|
-
4. **Resize / scroll / mouse cleanup** — repeatedly resize long Status and
|
|
387
|
-
History detail surfaces between wide and narrow layouts; check native mouse
|
|
388
|
-
wheel scrolling, border alignment, drag selection, Cmd+C, and paste elsewhere.
|
|
389
|
-
5. **Unicode + compact overlay footprint** — inspect `◆`, `→`, `↑↓`, `·`, `…`,
|
|
390
|
-
and Korean glyph alignment, untouched background, and content-bounded overlays.
|
|
391
|
-
|
|
392
|
-
Across Developer surfaces, Ghostty owns the mouse: the wheel scrolls terminal
|
|
393
|
-
scrollback, ordinary drag selects text, and `Cmd+C` copies it. Wheel movement
|
|
394
|
-
never changes the selected list target; use `↑`/`↓` for selection. Potentially
|
|
395
|
-
long lists render every row as non-overlay surfaces, while complete two-choice
|
|
396
|
-
interruptions remain compact overlays.
|
|
397
|
-
|
|
398
|
-
Each scenario creates a fresh in-memory model. Activation events use the same
|
|
399
|
-
`applyDeveloperEvent` reducer and `DeveloperSettingsBinding` contract as the
|
|
400
|
-
production surface; no state is shared between scenario runs. The fixture does
|
|
401
|
-
not append entries, submit answers, register tools, mutate active tools, restore
|
|
402
|
-
sessions, start network work, or send model messages. Prepared answers are shown
|
|
403
|
-
only as a character count.
|
|
404
|
-
|
|
405
|
-
`check` validates package structure and deterministic behavior. `eval` launches
|
|
406
|
-
the real Pi RPC surface without a model and covers package resources, commands,
|
|
407
|
-
activation state, and route-bound tool gating. These are release-gating checks.
|
|
408
|
-
|
|
409
|
-
Model-dependent runs are probabilistic evaluations rather than binary tests:
|
|
410
|
-
|
|
411
|
-
```sh
|
|
412
|
-
PI_CODING_AGENT_DIR=~/.pi/agent \
|
|
413
|
-
DEVELOPER_EVAL_FIXTURE=agent-before-implementation-evidence-gate \
|
|
414
|
-
DEVELOPER_EVAL_TRIALS=5 \
|
|
415
|
-
pnpm --filter @hobin/developer eval:live
|
|
416
|
-
```
|
|
287
|
+
`check` validates package structure and deterministic behavior. `eval` exercises
|
|
288
|
+
the real Pi RPC surface without a model. Model-dependent evaluations are
|
|
289
|
+
probabilistic and must not be interpreted as proof from a single successful
|
|
290
|
+
sample.
|
|
417
291
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
hidden artifact checks, include required semantic terms, and end in a declared
|
|
422
|
-
outcome. Among accepted runs, `preferredFirstTargets` measures better versus
|
|
423
|
-
merely admissible routing. Reports include acceptance and preference rates,
|
|
424
|
-
95% Wilson intervals, inadmissible results, rejected protocol attempts, budget
|
|
425
|
-
exhaustion, and environment failures. Any accepted inadmissible result makes the
|
|
426
|
-
evaluation command fail; ordinary admissible preference variation remains a
|
|
427
|
-
rate. A single model sample is not release evidence.
|
|
428
|
-
|
|
429
|
-
Live fixtures classify terminal outcomes as `settled-unchanged`, `pending`,
|
|
430
|
-
`changed-paused`, or `changed-verified`. An eval-only observer compares
|
|
431
|
-
product-file snapshots around bash/edit/write calls and rejects artifact changes
|
|
432
|
-
outside an implementation route. Dedicated fixtures sample a deliberately paused implementation
|
|
433
|
-
landing and an agent-owned before-implementation question resolved through a non-implementation
|
|
434
|
-
bash evidence route; their structural guarantees also have deterministic machine,
|
|
435
|
-
extension, trace, filesystem, and outcome tests. RPC and JSON runners share
|
|
436
|
-
route, tool-call, tool-error, wall-clock, and no-progress budgets and preserve a
|
|
437
|
-
trace for diagnosis.
|
|
292
|
+
The published npm package contains the runtime extension, skills, user-facing
|
|
293
|
+
documentation, and license. Source audits, evaluation fixtures, scripts, and
|
|
294
|
+
tests remain repository-only maintenance evidence.
|
|
438
295
|
|
|
439
296
|
## License
|
|
440
297
|
|