@turri-dev/cli 0.1.3-next.26f08c5 → 0.1.3-next.420ce7e
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 +1 -1
- package/dist/config.js +3 -2
- package/dist/extension.js +167 -51
- package/dist/identity.js +1 -1
- package/dist/loop-cli.js +1 -1
- package/dist/loop-tools.js +1 -1
- package/dist/pi-launch.js +5 -0
- package/dist/picture-row.js +21 -0
- package/dist/question-dialog.js +8 -3
- package/dist/questioning.js +1 -1
- package/dist/regenerate/activity.js +2 -0
- package/dist/regenerate/confine.js +1 -0
- package/dist/regenerate/conform.js +5 -5
- package/dist/regenerate/conformance-agents.js +220 -11
- package/dist/regenerate/conformance.js +91 -35
- package/dist/regenerate/debugger.js +27 -3
- package/dist/regenerate/environment-error.js +63 -9
- package/dist/regenerate/loop.js +22 -4
- package/dist/regenerate/notes.js +66 -17
- package/dist/regenerate/panel-dock.js +86 -0
- package/dist/regenerate/prompt.js +3 -1
- package/dist/regenerate/regenerate.js +35 -14
- package/dist/regenerate/regression.js +2 -1
- package/dist/regenerate/requires.js +55 -2
- package/dist/regenerate/side-panel.js +14 -4
- package/dist/regenerate/stop-report.js +13 -0
- package/dist/regenerate/test-scripts.js +45 -9
- package/dist/regenerate/unit-review.js +11 -0
- package/dist/regenerate-cli.js +1 -1
- package/dist/resume-line.js +4 -0
- package/dist/spec-tools.js +8 -44
- package/docs/authoring-plain.md +9 -6
- package/docs/config.md +3 -2
- package/docs/development.md +1 -0
- package/docs/headless.md +2 -2
- package/docs/regenerating.md +81 -22
- package/docs/skills-and-gates.md +2 -2
- package/docs/using.md +12 -3
- package/genome/skills/bud/SKILL.md +67 -36
- package/genome/skills/bud/references/intent.md +4 -0
- package/package.json +3 -3
- package/genome/skills/bud/references/checklist.md +0 -44
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bud
|
|
3
3
|
description: >-
|
|
4
|
-
Add a feature to an existing ***plain project the way `brood` builds one:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Add a feature to an existing ***plain project the way `brood` builds one: it first asks how many
|
|
5
|
+
questions the product phase may ask - light, medium, thorough or best judgement, broader with
|
|
6
|
+
fewer - then a short feature-intent interview, then product questions - a trigger and its outcome,
|
|
7
|
+
an edge case, a rule - where every answer becomes a spec change, written as a git diff of the
|
|
7
8
|
.plain files and built the moment it is written, so the feature appears while the interview is
|
|
8
|
-
still going.
|
|
9
|
+
still going. What the questions leave open it decides itself, each decision a spec change of its
|
|
10
|
+
own. A change that touches what is already specified or being built is a spec diff too: what
|
|
9
11
|
is left to build is worked out again from the spec. Use when the user wants to add a
|
|
10
12
|
feature to an existing project. Not for starting a new project (use `brood`, or `spawn`
|
|
11
13
|
to start fast) or for editing generated code (the .plain specs are the source of truth).
|
|
@@ -16,7 +18,12 @@ metadata:
|
|
|
16
18
|
intent: "what the feature is for, who it serves, and what it leaves out"
|
|
17
19
|
scope: "finds where the feature goes in the spec, and what is built already"
|
|
18
20
|
product: "the feature, question by question - each answer starts a regenerate pulse"
|
|
19
|
-
|
|
21
|
+
# The phase the questioning level caps, asked by the harness as the first question: light 3,
|
|
22
|
+
# medium 5, thorough 10, best judgement as many as turri judges the phase needs.
|
|
23
|
+
questioning: [product]
|
|
24
|
+
# Every answer in the product phase is a spec change: the next question waits until it is
|
|
25
|
+
# written with write_spec_diff. Changes turri decides itself need no answer before them.
|
|
26
|
+
spec-diff-per-answer: [product]
|
|
20
27
|
---
|
|
21
28
|
|
|
22
29
|
# Bud
|
|
@@ -37,10 +44,36 @@ the spec."
|
|
|
37
44
|
This is `brood`'s product phase, scoped to one feature, on top of what is there: the stack,
|
|
38
45
|
the testing setup and every earlier feature are settled - read them, build on them, restart none.
|
|
39
46
|
|
|
47
|
+
## How many questions
|
|
48
|
+
|
|
49
|
+
The first question of the intent phase is the harness's own, not yours: how many questions the
|
|
50
|
+
**product** phase may ask. The level sets how many questions there are and so how broad each is -
|
|
51
|
+
never what they cover:
|
|
52
|
+
|
|
53
|
+
| level | product questions | each question |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| light | at most 3 | broad: the whole feature at once - what it does end to end, its main rules - with what fits the brief proposed, for the person to confirm or correct |
|
|
56
|
+
| medium | at most 5 | one part of the feature, with its main rules |
|
|
57
|
+
| thorough | at most 10 | narrow: one trigger, rule or edge case, with follow-ups on the ones that matter |
|
|
58
|
+
| best judgement | as many as you judge the feature needs | as broad or as narrow as each part needs |
|
|
59
|
+
|
|
60
|
+
The intent phase is not capped. Follow-ups count; the closing confirmation - asked with
|
|
61
|
+
`confirms_phase: true` - does not. Past the cap `ask_user` refuses the question. To stop sooner, or
|
|
62
|
+
under best judgement once the feature is settled enough to build, call `end_questions`.
|
|
63
|
+
|
|
64
|
+
The level limits the questions, never the spec changes. **Every answer is a spec change**, whatever
|
|
65
|
+
the level: written with `write_spec_diff` and built at once, before the next question - `ask_user`
|
|
66
|
+
refuses the next one until it is. A broad answer that covers several behaviours is several changes,
|
|
67
|
+
and you write them all. What the questions leave open - the details of a light answer, what is left
|
|
68
|
+
once they are over - is yours to decide, as a careful engineer would, in the light of the brief: each
|
|
69
|
+
decision a spec change of its own, written with `write_spec_diff` with no answer needed before it,
|
|
70
|
+
and said in one line. The closing summary names every decision you made yourself, so the
|
|
71
|
+
confirmation is where the person can change it.
|
|
72
|
+
|
|
40
73
|
## Question style
|
|
41
74
|
|
|
42
|
-
- Ask with `ask_user`, one question per call, and pass `options` so
|
|
43
|
-
types - concrete choices, plus the free-form catch-all the tool adds. Reserve `free_form: true`
|
|
75
|
+
- Ask with `ask_user`, one question per call, as broad as the level says, and pass `options` so
|
|
76
|
+
the user picks rather than types - concrete choices, plus the free-form catch-all the tool adds. Reserve `free_form: true`
|
|
44
77
|
for a genuinely open question.
|
|
45
78
|
- Ask about the product - a trigger and its outcome, an edge case, a rule, a permission, a step of
|
|
46
79
|
a flow - never about a spec section ("which concepts?", "what reqs?"). Let the answer decide which
|
|
@@ -55,6 +88,9 @@ the testing setup and every earlier feature are settled - read them, build on th
|
|
|
55
88
|
|
|
56
89
|
### intent
|
|
57
90
|
|
|
91
|
+
The harness has asked how many questions the product phase may ask before this phase starts; its
|
|
92
|
+
note beside these instructions gives the answer. Do not ask it again.
|
|
93
|
+
|
|
58
94
|
Read `references/intent.md` and ask its five core questions one at a time with `ask_user`. Ask at
|
|
59
95
|
most one focused follow-up when an answer is too vague to summarize. If what the user has already
|
|
60
96
|
said answers a question, confirm it in one line instead of asking.
|
|
@@ -81,8 +117,8 @@ Say in one line where the feature goes, and move on. Write nothing to disk.
|
|
|
81
117
|
|
|
82
118
|
### product
|
|
83
119
|
|
|
84
|
-
The feature, walked question by question. Run this loop
|
|
85
|
-
|
|
120
|
+
The feature, walked question by question. Run this loop while the questioning level allows (see
|
|
121
|
+
"How many questions"):
|
|
86
122
|
|
|
87
123
|
1. **Ask** one product question with `ask_user`.
|
|
88
124
|
2. The user **answers**.
|
|
@@ -106,14 +142,17 @@ covered:
|
|
|
106
142
|
Write it as a git diff: `diff --git a/<file> b/<file>`, `--- a/<file>`, `+++ b/<file>`, then the
|
|
107
143
|
hunks with a few lines of unchanged context, paths from the project root. A new functional spec
|
|
108
144
|
goes where it belongs in build order - after what it builds on, usually at the end.
|
|
109
|
-
4. **Write it with `write_spec_diff
|
|
110
|
-
it; with conformance on, its conformance tests follow it.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
145
|
+
4. **Write it with `write_spec_diff` at once**, before anything else. It applies the diff and starts
|
|
146
|
+
a render spec diff job for it; with conformance on, its conformance tests follow it. An answer
|
|
147
|
+
that covers several behaviours is a change for each: write them all. Then the changes for what
|
|
148
|
+
you decide yourself around it, if any. Say in one line what went into the spec - "added `:Note:`
|
|
149
|
+
and functional spec 7" - and what became of the build, as the tool says, then ask the next
|
|
150
|
+
question. Never wait for a build, and never ask the user to approve a change.
|
|
151
|
+
|
|
152
|
+
**One answer, at least one change.** A follow-up about the same behaviour - an edge case, a
|
|
153
|
+
validation rule - is its own answer and its own change. An answer that describes two behaviours is
|
|
154
|
+
two changes, both written before the next question. A change never carries both an answer and
|
|
155
|
+
something you decided: what you decide is a change of its own.
|
|
117
156
|
|
|
118
157
|
**What already exists.** When an answer - or the conflict check - means changing something already
|
|
119
158
|
specified: a definition, a req, a functional spec, built or still queued, the next question is
|
|
@@ -127,22 +166,14 @@ is taken out, one it touches renders the spec as it now is.
|
|
|
127
166
|
**Fix your own mistakes in place.** When a later answer refines or contradicts a change you wrote in
|
|
128
167
|
this feature, write the correction as its own diff with `fixes_earlier`, before the next question.
|
|
129
168
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
2. Run `validate` on every module the feature touched.
|
|
142
|
-
3. Fix what either finds with a spec diff and `fixes_earlier` - never by editing the file. Ask the
|
|
143
|
-
user only when a fix is a decision the brief and the answers do not settle.
|
|
144
|
-
|
|
145
|
-
Walk `references/checklist.md` once, as a self-audit. Then hand over in a few lines: the feature's
|
|
146
|
-
spec changes in order, the builds they queued and how they stand (`drift`), and that any
|
|
147
|
-
further change is asked for in the conversation - each one a spec diff, and what is left to build is
|
|
148
|
-
worked out again from the spec. The next feature starts again from the intent.
|
|
169
|
+
Once the questions are over - the cap reached, or `end_questions` called - write what is left of
|
|
170
|
+
the feature the same way: one decision of yours, one spec change, with no answer between. Then run
|
|
171
|
+
`validate` on every module the feature touched, and fix what it finds with a spec diff and
|
|
172
|
+
`fixes_earlier`.
|
|
173
|
+
|
|
174
|
+
Finish by summarizing the feature's spec changes in build order, marking what you decided without
|
|
175
|
+
asking, saying what is built and what is still queued (`drift`), and getting explicit confirmation
|
|
176
|
+
with `confirms_phase: true`. The summary is for the person to take in at a glance - a line a change,
|
|
177
|
+
each decision you made yourself in a few words, about fifteen lines at most, never the specs'
|
|
178
|
+
wording. Any further change is asked for in the conversation, each one a spec diff; the next
|
|
179
|
+
feature starts again from the intent.
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
Extract the intent of this feature before choosing files or authoring specifications. Ask exactly
|
|
4
4
|
five core questions, one at a time, and do not write to disk.
|
|
5
5
|
|
|
6
|
+
The harness has already asked the first question of this phase: how many questions the product
|
|
7
|
+
phase may ask - light (3), medium (5), thorough (10) or best judgement. Do not ask it again; this
|
|
8
|
+
phase's own questions are not capped by it.
|
|
9
|
+
|
|
6
10
|
## Questions
|
|
7
11
|
|
|
8
12
|
1. **Motivation** — What problem or limitation should this feature address?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turri-dev/cli",
|
|
3
|
-
"version": "0.1.3-next.
|
|
3
|
+
"version": "0.1.3-next.420ce7e",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"grammar:sync": "node scripts/sync-plyn-grammar.mjs"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
37
|
-
"@earendil-works/pi-tui": "^1.
|
|
36
|
+
"@earendil-works/pi-coding-agent": "^1.2.0",
|
|
37
|
+
"@earendil-works/pi-tui": "^1.2.0",
|
|
38
38
|
"@langchain/langgraph": "1.4.15",
|
|
39
39
|
"gray-matter": "^4.0.3",
|
|
40
40
|
"js-yaml": "^5.4.2",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Bud Checklist
|
|
2
|
-
|
|
3
|
-
Use this to verify the workflow was followed - never as a substitute for it. Walk it once in the
|
|
4
|
-
review step, before the handover. A box counts only when the change is in the `.plain` files, not
|
|
5
|
-
merely discussed; an unmet box is completed with a spec diff before finishing.
|
|
6
|
-
|
|
7
|
-
## Intent
|
|
8
|
-
|
|
9
|
-
- [ ] Asked the five core questions of `references/intent.md` one at a time - or confirmed in one
|
|
10
|
-
line what the user had already said - with at most one clarification for a vague answer.
|
|
11
|
-
- [ ] Wrote nothing to disk before the brief was confirmed.
|
|
12
|
-
- [ ] Summarized motivation, affected user, desired outcome, observable success criterion, and
|
|
13
|
-
boundary with explicit exclusions; got explicit confirmation.
|
|
14
|
-
|
|
15
|
-
## Scope
|
|
16
|
-
|
|
17
|
-
- [ ] Read the target `.plain` file(s) whole, with their `import` and `requires` chains, and the
|
|
18
|
-
config that says whether conformance tests are on.
|
|
19
|
-
- [ ] Asked which module only when it was genuinely ambiguous.
|
|
20
|
-
|
|
21
|
-
## Every product question
|
|
22
|
-
|
|
23
|
-
- [ ] Asked exactly one question via `ask_user`, about the product - a trigger and outcome, an edge
|
|
24
|
-
case, a rule, a permission, a step of a flow - never about a spec section.
|
|
25
|
-
- [ ] Turned the answer into exactly one spec change, across every section it needed, and wrote it
|
|
26
|
-
with `write_spec_diff` - never with `write` or `edit`.
|
|
27
|
-
- [ ] Concepts defined in the same change as, or before, what first uses them; no cycles.
|
|
28
|
-
- [ ] Every functional spec follows `add-functional-spec`'s rules, passed its complexity and
|
|
29
|
-
conflict checks, and sits in build order; one too big was split with the user.
|
|
30
|
-
- [ ] Every change to something already specified - built or still queued - was put to the user
|
|
31
|
-
first (keep / augment / replace) and written as a diff with `fixes_earlier`.
|
|
32
|
-
- [ ] Every correction of this feature's own changes was a diff with `fixes_earlier`, before the
|
|
33
|
-
next question.
|
|
34
|
-
- [ ] `***test reqs***` and `***acceptance tests***` only with conformance tests on.
|
|
35
|
-
- [ ] Asked whether the feature is fully covered before leaving the loop.
|
|
36
|
-
|
|
37
|
-
## Review
|
|
38
|
-
|
|
39
|
-
- [ ] Read the modified `.plain` file(s) whole and checked: concepts defined before use, no cycles,
|
|
40
|
-
build order right end to end, functional specs language-agnostic, every external interface
|
|
41
|
-
explicit, acceptance tests consistent with their functional specs.
|
|
42
|
-
- [ ] Ran `validate` on every module touched, and fixed what it reported with spec diffs.
|
|
43
|
-
- [ ] Handed over: the spec changes in order, the builds they queued and how they stand, and that
|
|
44
|
-
further changes are asked for in the conversation as spec diffs.
|