@hobin/developer 0.1.0
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/LICENSE +21 -0
- package/README.md +231 -0
- package/extensions/developer.ts +700 -0
- package/extensions/skills.ts +89 -0
- package/extensions/state.ts +283 -0
- package/extensions/tool-policy.ts +65 -0
- package/extensions/tui.ts +391 -0
- package/package.json +43 -0
- package/skills/abstraction-review/SKILL.md +87 -0
- package/skills/abstraction-review/references/field-card.md +209 -0
- package/skills/abstraction-review/references/recipe-cards.md +255 -0
- package/skills/abstraction-review/references/repair-table.md +98 -0
- package/skills/abstraction-review/references/worked-examples.md +306 -0
- package/skills/adversarial-eval/SKILL.md +87 -0
- package/skills/model/SKILL.md +76 -0
- package/skills/model/references/problem-modeling.md +262 -0
- package/skills/naming-judgment/SKILL.md +77 -0
- package/skills/naming-judgment/references/elements-of-clojure-naming.md +74 -0
- package/skills/schedule/SKILL.md +71 -0
- package/skills/signal/SKILL.md +75 -0
- package/skills/sketch/SKILL.md +70 -0
- package/skills/specify/SKILL.md +67 -0
- package/skills/verify/SKILL.md +71 -0
- package/skills/visualize/SKILL.md +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dev-hobin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# @hobin/developer
|
|
2
|
+
|
|
3
|
+
Adaptive product-development judgment for [Pi](https://pi.dev).
|
|
4
|
+
|
|
5
|
+
Developer combines a small, branch-aware coordination extension with ten
|
|
6
|
+
independent skills. It routes one concrete question at a time, records the
|
|
7
|
+
resulting evidence, and preserves unresolved questions without turning product
|
|
8
|
+
development into a fixed lifecycle.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Requires Node.js 22.19 or newer. Tested with Pi 0.80.3 and 0.80.10.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pi install npm:@hobin/developer
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Try it for one run without installing:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pi -e npm:@hobin/developer
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
Start Pi, enable adaptive mode, and describe the product task normally:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
/develop on
|
|
30
|
+
The selected payment method disappears after navigating back to checkout. Find the cause and fix it.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Most users should begin with `on`. Developer decides whether the next concrete
|
|
34
|
+
question would benefit from a focused skill or is already justified as direct action. You
|
|
35
|
+
do not need to call its internal protocol tools yourself.
|
|
36
|
+
|
|
37
|
+
For a risky refactor where Pi should justify mutation before using its built-in
|
|
38
|
+
edit, write, or shell tools:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
/develop strict
|
|
42
|
+
Unify the duplicate schedule types and conversion logic without changing existing behavior.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
| Command | Effect |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `/develop` | Open the interactive Developer control menu |
|
|
50
|
+
| `/develop on` | Enable adaptive routing without restricting Pi's existing tools |
|
|
51
|
+
| `/develop strict` | Enable routing and withhold Pi's built-in mutation tools until a direct route is active |
|
|
52
|
+
| `/develop status` | Inspect current branch state in a read-only panel |
|
|
53
|
+
| `/develop questions` | Choose an unresolved question and prepare an editable revisit prompt |
|
|
54
|
+
| `/develop off` | Disable the protocol and clear current protocol state |
|
|
55
|
+
|
|
56
|
+
Explicit command arguments participate in Pi's completion UI. In interactive
|
|
57
|
+
mode, turning Developer off while a route or unresolved question exists requires
|
|
58
|
+
confirmation. The historical session entries remain; only current protocol
|
|
59
|
+
state is cleared.
|
|
60
|
+
|
|
61
|
+
Start a non-interactive or preconfigured session in a mode with the extension
|
|
62
|
+
flag:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
pi --develop-mode on
|
|
66
|
+
pi --develop-mode strict
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Modes
|
|
70
|
+
|
|
71
|
+
| Mode | Routing | Built-in mutation tools | Best fit |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| `on` | Adaptive | Unchanged | Normal product development |
|
|
74
|
+
| `strict` | Adaptive | Pi built-in `edit`, `write`, and `bash` require an active `direct` route | High-risk changes and workflow-discipline experiments |
|
|
75
|
+
| `off` | Disabled | Developer makes no changes to the active set | Normal Pi behavior without the protocol |
|
|
76
|
+
|
|
77
|
+
Strict mode is a workflow-integrity gate, not a security sandbox. It recognizes
|
|
78
|
+
Pi built-ins from their provenance and does not claim to classify or block
|
|
79
|
+
mutation-capable tools registered by other extensions. It also preserves
|
|
80
|
+
unrelated active tools and does not force-enable read tools the user disabled.
|
|
81
|
+
|
|
82
|
+
## How a request runs
|
|
83
|
+
|
|
84
|
+
Developer adds two model-facing protocol tools:
|
|
85
|
+
|
|
86
|
+
1. `developer_route_question` opens one route for one concrete question.
|
|
87
|
+
2. The route target is `direct` or one currently available Developer skill.
|
|
88
|
+
3. A skill route returns the exact Pi-discovered `SKILL.md` instructions and canonical
|
|
89
|
+
path; a direct route keeps implementation tools available for the justified
|
|
90
|
+
action.
|
|
91
|
+
4. `developer_record_judgment` closes the route with a status, result, evidence,
|
|
92
|
+
artifacts, and any newly opened questions.
|
|
93
|
+
|
|
94
|
+
Product code is still read, edited, executed, and tested with Pi's normal tools.
|
|
95
|
+
Developer's tools only route and record judgment; they do not implement product
|
|
96
|
+
changes themselves.
|
|
97
|
+
|
|
98
|
+
There is never a required order such as `specify → model → sketch → verify`.
|
|
99
|
+
Each new route is chosen from the current question and evidence.
|
|
100
|
+
|
|
101
|
+
## What the TUI shows
|
|
102
|
+
|
|
103
|
+
Developer uses different Pi surfaces for different information:
|
|
104
|
+
|
|
105
|
+
- The footer contains only global mode, protocol state, and current route target.
|
|
106
|
+
- A compact widget appears only while a route or unresolved question exists.
|
|
107
|
+
- `/develop` uses a `SelectList` action menu.
|
|
108
|
+
- `/develop status` opens a branch-grounded, read-only status panel.
|
|
109
|
+
- `/develop questions` uses stable question IDs and only prepares editor text;
|
|
110
|
+
selection alone never mutates protocol state.
|
|
111
|
+
- Protocol tool rows show compact status by default and evidence details when
|
|
112
|
+
expanded with the user's configured Pi keybinding.
|
|
113
|
+
|
|
114
|
+
RPC, JSON, and print modes keep the same protocol semantics without depending on
|
|
115
|
+
terminal components.
|
|
116
|
+
|
|
117
|
+
## Protocol states
|
|
118
|
+
|
|
119
|
+
| State | Meaning |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| `idle` | No active route and no unresolved Developer question |
|
|
122
|
+
| `needs-judgment` | One route is active and must be closed with a judgment |
|
|
123
|
+
| `needs-evidence` | At least one question remains open for evidence |
|
|
124
|
+
| `blocked` | At least one pending question carries a recorded blocker |
|
|
125
|
+
|
|
126
|
+
These are routing states, not product-completion claims. In particular:
|
|
127
|
+
|
|
128
|
+
- `idle` does not mean the user's task is finished.
|
|
129
|
+
- A resolved `specify` judgment is not user acceptance.
|
|
130
|
+
- A resolved `verify` judgment is not timeless proof after later changes.
|
|
131
|
+
|
|
132
|
+
Pending questions receive stable IDs. A later route revisits one by passing the
|
|
133
|
+
exact ID; wording similarity is never used as identity.
|
|
134
|
+
|
|
135
|
+
## Skills
|
|
136
|
+
|
|
137
|
+
Pi may match these skills automatically, Developer may route a question to one,
|
|
138
|
+
or the user may invoke one directly with `/skill:<name>`.
|
|
139
|
+
|
|
140
|
+
| Skill | Helps decide |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `specify` | Product meaning, scope, invariants, risks, and blocking unknowns |
|
|
143
|
+
| `model` | Predicates, cases, rules, forbidden states, transitions, and objectives |
|
|
144
|
+
| `sketch` | Data definitions, wished interfaces, representative cases, and checks |
|
|
145
|
+
| `signal` | Repetition, difference, structural pressure, and model-code mismatch |
|
|
146
|
+
| `naming-judgment` | Stable domain meaning and names that preserve change boundaries |
|
|
147
|
+
| `abstraction-review` | Whether a candidate should be kept, revised, split, rejected, or deferred |
|
|
148
|
+
| `schedule` | Whether a structural change belongs now, after, or never |
|
|
149
|
+
| `verify` | Whether current evidence actually supports an implementation claim |
|
|
150
|
+
| `visualize` | The smallest visual surface that lowers judgment cost |
|
|
151
|
+
| `adversarial-eval` | Finite, escalating attempts to falsify a skill or implementation claim |
|
|
152
|
+
|
|
153
|
+
Pi's loaded resource metadata is authoritative. If package configuration filters
|
|
154
|
+
or disables a skill, Developer cannot route to it even if its file exists in the
|
|
155
|
+
npm package.
|
|
156
|
+
|
|
157
|
+
## State, branches, and compaction
|
|
158
|
+
|
|
159
|
+
Mode changes are stored as Pi custom session entries. Routes and judgments are
|
|
160
|
+
stored in tool-result details. Developer reconstructs state from the current
|
|
161
|
+
session branch on startup and tree navigation, so a fork inherits only the
|
|
162
|
+
events on its branch.
|
|
163
|
+
|
|
164
|
+
The current event contract is `developer/v2`. Legacy `developer/v1` routing
|
|
165
|
+
history can be replayed, but removed inferred fields are not revived.
|
|
166
|
+
|
|
167
|
+
Developer uses Pi's normal compaction. Each new agent turn receives current
|
|
168
|
+
protocol state, and route results place identity and recovery metadata before
|
|
169
|
+
potentially long skill instructions. Tool output is checked against Pi's standard size
|
|
170
|
+
limits before state changes are committed. At most twenty pending questions may
|
|
171
|
+
remain in current state.
|
|
172
|
+
|
|
173
|
+
## Update, configure, and remove
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
pi list
|
|
177
|
+
pi config
|
|
178
|
+
pi update npm:@hobin/developer
|
|
179
|
+
pi remove npm:@hobin/developer
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Use a project-local install when a repository should declare the package in
|
|
183
|
+
`.pi/settings.json`:
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
pi install -l npm:@hobin/developer
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Pi packages execute with Pi's system access. Review the extension and skills
|
|
190
|
+
before installation. See the [Pi package
|
|
191
|
+
documentation](https://pi.dev/docs/latest/packages) for package scope, filtering,
|
|
192
|
+
pinning, and security behavior.
|
|
193
|
+
|
|
194
|
+
## Package contents
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
extensions/
|
|
198
|
+
├── developer.ts # command, protocol tools, events, and Pi integration
|
|
199
|
+
├── state.ts # replayable developer/v2 branch state
|
|
200
|
+
├── skills.ts # Pi-native skill discovery and instruction loading
|
|
201
|
+
├── tool-policy.ts # strict-mode active-tool reconciliation
|
|
202
|
+
└── tui.ts # selectors, widget, status panel, and prompt preparation
|
|
203
|
+
skills/ # ten independently loadable Pi skills
|
|
204
|
+
evals/ # model-dependent scenarios and workspace assertions
|
|
205
|
+
tests/ # deterministic state, policy, extension, and TUI tests
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Development
|
|
209
|
+
|
|
210
|
+
From the monorepo root:
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
pnpm install
|
|
214
|
+
pnpm --filter @hobin/developer check
|
|
215
|
+
pnpm --filter @hobin/developer eval
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Load the workspace package into Pi without installing it:
|
|
219
|
+
|
|
220
|
+
```sh
|
|
221
|
+
pi -e ./packages/developer
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
`check` validates package structure and deterministic behavior. `eval` launches
|
|
225
|
+
the real Pi RPC surface without a model and covers package resources, commands,
|
|
226
|
+
mode state, and strict tool gating. Maintainers can use `eval:json` and the live
|
|
227
|
+
fixtures for model-dependent scenarios.
|
|
228
|
+
|
|
229
|
+
## License
|
|
230
|
+
|
|
231
|
+
[MIT](./LICENSE)
|