chamba 0.6.0 → 0.7.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/README.md +13 -6
- package/dist/commands/dev.js +11 -11
- package/dist/commands/settings.js +1 -1
- package/dist/lib/agent-context.js +33 -7
- package/dist/lib/chamba-yaml.js +1 -1
- package/dist/lib/constants.js +4 -4
- package/dist/lib/dockerfile-builder.js +2 -1
- package/dist/lib/ports.js +4 -4
- package/dist/lib/safe-rm.js +13 -3
- package/dist/lib/webterm.js +7 -7
- package/package.json +3 -5
- package/templates/Dockerfile +20 -1
- package/templates/context/web-pane-craft.md +1 -1
- package/templates/pane-apps/client/assets/specs-B1970L17.css +1 -0
- package/templates/pane-apps/client/assets/specs-cEee_SPn.js +23 -0
- package/templates/pane-apps/client/specs/index.html +13 -0
- package/templates/pane-apps/server/specs.mjs +1588 -0
- package/templates/skills/chamba-statusline/SKILL.md +1 -1
- package/templates/skills/dx-spec/SKILL.md +365 -0
- package/templates/skills/dx-spec/references/imagination-guide.md +140 -0
- package/templates/skills/dx-spec/references/review-guide.md +173 -0
- package/templates/skills/dx-spec/references/spec-guide.md +125 -0
- package/templates/skills/dx-spec/references/stages.md +399 -0
- package/templates/skills/dx-spec-config/SKILL.md +313 -0
- package/templates/skills/dx-spec-config/references/principles-template.md +12 -0
- package/templates/skills/dx-spec-execute/SKILL.md +324 -0
- package/templates/specs.sh +106 -0
- package/templates/webterm/README.md +50 -14
- package/templates/webterm/artifacts.js +11 -11
- package/templates/webterm/config.js +52 -9
- package/templates/webterm/conversation.js +3 -3
- package/templates/webterm/pane.js +14 -3
- package/templates/webterm/proc.js +1 -1
- package/templates/webterm/public/app/alerts.js +5 -5
- package/templates/webterm/public/app/composer.js +5 -2
- package/templates/webterm/public/app/connection.js +2 -2
- package/templates/webterm/public/app/dictation.js +1 -1
- package/templates/webterm/public/app/dom.js +13 -5
- package/templates/webterm/public/app/frames.js +8 -1
- package/templates/webterm/public/app/main.js +8 -2
- package/templates/webterm/public/app/new-session.js +1 -1
- package/templates/webterm/public/app/pane-shell.js +315 -0
- package/templates/webterm/public/app/pane.js +58 -183
- package/templates/webterm/public/app/specs-host.js +222 -0
- package/templates/webterm/public/app/state.js +1 -1
- package/templates/webterm/public/app/tabs.js +1 -1
- package/templates/webterm/public/app/terminal.js +8 -0
- package/templates/webterm/public/index.html +51 -27
- package/templates/webterm/public/styles.css +144 -30
- package/templates/webterm/server.js +300 -11
- package/templates/webterm/sessions.js +7 -7
- package/templates/webterm/snapshot.js +2 -2
- package/templates/webterm/specs.js +358 -0
- package/templates/webterm/tool-document.js +67 -0
- package/templates/webterm/typed-line.js +85 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# The stages
|
|
2
|
+
|
|
3
|
+
This file holds the stage definitions for `/dx-spec` (`SKILL.md` in the directory above).
|
|
4
|
+
Read a stage's section when the stage starts, and run the stage from that definition.
|
|
5
|
+
|
|
6
|
+
Every gate here is declared with `specs await`, in the shapes `SKILL.md` gives.
|
|
7
|
+
Declaring one ends your turn.
|
|
8
|
+
|
|
9
|
+
## The tab
|
|
10
|
+
|
|
11
|
+
The spec directory is the whole product: plain files that agents write and the user reads.
|
|
12
|
+
The Specs tab renders every one of them as it stands on disk.
|
|
13
|
+
Nothing is generated for the tab, and nothing is kept in step with it.
|
|
14
|
+
|
|
15
|
+
The tab is where the user reads and where the user answers.
|
|
16
|
+
Name the artifact in a gate's `file`, and the tab opens it and puts the gate under it.
|
|
17
|
+
Say nothing about how to read a file: the user is already looking at it.
|
|
18
|
+
|
|
19
|
+
## Applying the user's annotations
|
|
20
|
+
|
|
21
|
+
The user annotates any part of any artifact on the tab.
|
|
22
|
+
Two actions and no others: a comment on something, or a request that it be removed.
|
|
23
|
+
Each round of annotations lands in `.specs/user-feedback.json` in the spec directory, and the pane types one line into this terminal naming the file.
|
|
24
|
+
|
|
25
|
+
The file is also the signal to a session picking the work up: a file that is there holds annotations nobody applied.
|
|
26
|
+
Apply a round in four steps:
|
|
27
|
+
|
|
28
|
+
1. Rename the file to `.specs/user-feedback.applying.json`. Rename it first. A round the user sends while you revise then lands on the free name, and is applied in the next round rather than deleted unread.
|
|
29
|
+
2. Read the file, and open the asset files it names.
|
|
30
|
+
3. Revise the artifacts the comments point at.
|
|
31
|
+
4. Delete the renamed file and every asset file it named. Delete the assets directory when nothing is left in it.
|
|
32
|
+
|
|
33
|
+
Then declare the gate again, or ask what to do next when this happened while you picked the work up.
|
|
34
|
+
A `.specs/user-feedback.applying.json` file left behind means an earlier session stopped mid-apply.
|
|
35
|
+
Apply it the same way, from step 2.
|
|
36
|
+
|
|
37
|
+
The file names the piece of work in `entry`, and holds one round per submit:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"version": 1,
|
|
42
|
+
"entry": "checkout-discounts",
|
|
43
|
+
"rounds": [
|
|
44
|
+
{
|
|
45
|
+
"submittedAt": "2026-08-19T09:41:12.004Z",
|
|
46
|
+
"comments": [
|
|
47
|
+
{
|
|
48
|
+
"unit": "spec-spec-goal",
|
|
49
|
+
"file": "spec/SPEC.md",
|
|
50
|
+
"heading": "Goal",
|
|
51
|
+
"kind": "comment",
|
|
52
|
+
"quote": "renders any spec directory",
|
|
53
|
+
"text": "Say plainly that this holds for a directory that is not a spec too.",
|
|
54
|
+
"assets": []
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"unit": "mocks-dashboard",
|
|
58
|
+
"file": "mocks/dashboard.html",
|
|
59
|
+
"heading": "",
|
|
60
|
+
"kind": "remove",
|
|
61
|
+
"quote": "",
|
|
62
|
+
"text": "",
|
|
63
|
+
"assets": []
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"unit": "overall",
|
|
67
|
+
"file": "",
|
|
68
|
+
"heading": "",
|
|
69
|
+
"kind": "comment",
|
|
70
|
+
"quote": "",
|
|
71
|
+
"text": "Good direction. My notes on the wording are attached.",
|
|
72
|
+
"assets": [
|
|
73
|
+
{
|
|
74
|
+
"path": "user-feedback-assets/2026-08-19-094112-wording.txt",
|
|
75
|
+
"name": "wording.txt",
|
|
76
|
+
"type": "text/plain"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
How to read one comment:
|
|
87
|
+
|
|
88
|
+
- `file` is relative to the spec directory.
|
|
89
|
+
- `unit` is that path with the heading on the end, both slugified. It is the address of the exact place the annotation sits on.
|
|
90
|
+
- `kind` is `comment` or `remove`. A `remove` asks you to take that thing out, and its `text` is often empty, because pointing is the whole request.
|
|
91
|
+
- `quote` is the text the annotation was anchored on, when the user selected text. It is empty when they pointed at an image, a section or the file itself, which is what tells you the difference.
|
|
92
|
+
- `unit: "overall"` has `file` and `heading` empty, and belongs to the piece of work rather than to one place in it.
|
|
93
|
+
- A comment on a section of the review report is input to the finding in that section.
|
|
94
|
+
|
|
95
|
+
## Visuals
|
|
96
|
+
|
|
97
|
+
When a stage document is finished, decide whether a standalone visual would make the user's reading easier: a diagram, an SVG, or a small HTML figure.
|
|
98
|
+
Write it as a lowercase file beside the document, when it earns its place.
|
|
99
|
+
The tab renders an image inline and shows an HTML page in a frame, so a visual beside the document is read on the same page.
|
|
100
|
+
When a visual belongs to one section, put it inside the document instead, as inline SVG or as an HTML table.
|
|
101
|
+
Either way, keep it self-contained: no external image, no script, nothing fetched.
|
|
102
|
+
This is a judgment call, never a rule.
|
|
103
|
+
Most documents need no visual, and a visual nobody would look at is not worth writing.
|
|
104
|
+
|
|
105
|
+
## High-level exploration
|
|
106
|
+
|
|
107
|
+
Think together before you commit to anything.
|
|
108
|
+
Hold an open conversation, not a script.
|
|
109
|
+
Normal message text and ASCII diagrams are what this stage is made of.
|
|
110
|
+
Map the problem space, question assumptions, compare directions, and raise the risks and the unknowns.
|
|
111
|
+
Ground the thinking in the code rather than in theory.
|
|
112
|
+
|
|
113
|
+
With imagination mode on, the first pass names the ideal as if everything were possible, and allows no talk of feasibility.
|
|
114
|
+
`references/imagination-guide.md` states how the stage then runs.
|
|
115
|
+
|
|
116
|
+
When things become clear, declare a gate on the work as a whole, asking whether to move on or keep exploring.
|
|
117
|
+
Then write the conclusions into `spec/SPEC.md` as background and direction.
|
|
118
|
+
|
|
119
|
+
## Interview
|
|
120
|
+
|
|
121
|
+
Track down every doubt, until the spec stands on its own.
|
|
122
|
+
Read what the input points to first: an uninformed interview wastes the user's time.
|
|
123
|
+
|
|
124
|
+
Open `[NEEDS CLARIFICATION: ...]` markers in `SPEC.md` are the interview's first input.
|
|
125
|
+
Read them before you write a question, and turn each one into a question of its own.
|
|
126
|
+
An earlier stage already judged those doubts worth asking.
|
|
127
|
+
|
|
128
|
+
Then interview the user in rounds, most important points first.
|
|
129
|
+
A round is one `specs await` call, and it holds as many questions as the round needs.
|
|
130
|
+
With imagination mode on, ask for the ideal experience first, and put the constraint questions after it.
|
|
131
|
+
|
|
132
|
+
In every round:
|
|
133
|
+
|
|
134
|
+
- **Frame the options production-grade by default**, and mark that one recommended.
|
|
135
|
+
- **Lay out a real trade-off** in the question, and let the user decide. Do not decide it silently.
|
|
136
|
+
- **Cross-reference the code.** When the user's claim contradicts what you read, say so: "You said a partial cancel is possible, but `orders.cancel:42` cancels the whole order - which is right?"
|
|
137
|
+
- **Pin down vague language.** "By 'account' do you mean the Customer or the User? They are different here."
|
|
138
|
+
- **Fold each answer into `SPEC.md` right after the round that produced it**, and clear the markers that round settles. An interview the user stops early then leaves nothing living in chat alone.
|
|
139
|
+
|
|
140
|
+
Check these categories for candidates, most important first:
|
|
141
|
+
|
|
142
|
+
- functional scope and non-goals
|
|
143
|
+
- domain and data - shapes and contracts
|
|
144
|
+
- the flow the user goes through
|
|
145
|
+
- qualities that are not features - permissions, tenant scope
|
|
146
|
+
- integrations
|
|
147
|
+
- edge cases and failures - empty, loading, error
|
|
148
|
+
- constraints and trade-offs
|
|
149
|
+
- terminology
|
|
150
|
+
- how success is measured
|
|
151
|
+
|
|
152
|
+
For user-facing work, always pin down theme support - dark, light, both, or one fixed theme - and the target devices - desktop only, responsive, or mobile-first.
|
|
153
|
+
The user answers this once. Do not guess it.
|
|
154
|
+
|
|
155
|
+
Whatever stays open becomes a labeled assumption in `SPEC.md`, or a `[NEEDS CLARIFICATION: ...]` marker when it clears the bar in `references/spec-guide.md`.
|
|
156
|
+
The implementer has to know what was confirmed and what was assumed.
|
|
157
|
+
|
|
158
|
+
The stage ends at a gate: enough asked, or another round.
|
|
159
|
+
|
|
160
|
+
## Research
|
|
161
|
+
|
|
162
|
+
Run this stage for work that needs knowledge beyond the codebase: a protocol, a library, an algorithm, a subject area.
|
|
163
|
+
Size the research to the work.
|
|
164
|
+
Ask the user for the type and the depth in a round - a quick focused check against a thorough survey, and which sources you have.
|
|
165
|
+
Mark your pick recommended.
|
|
166
|
+
|
|
167
|
+
Then research as agreed, and write `research/RESEARCH.md`: what you learned, the options you compared, a recommendation, and the sources with links.
|
|
168
|
+
Write a finding that decides something as **Decision / Rationale / Alternatives**: what was chosen, why, and what was rejected with the reason.
|
|
169
|
+
Compare the options in a table when the comparison has more than two axes.
|
|
170
|
+
Keep the volume sized to the work. The format is the discipline, not the length.
|
|
171
|
+
The choices themselves land in the `Decisions` section of `SPEC.md`.
|
|
172
|
+
|
|
173
|
+
Consider a visual beside the write-up.
|
|
174
|
+
Then gate on `research/RESEARCH.md`: enough to go on, or one area worth more digging.
|
|
175
|
+
|
|
176
|
+
## Codebase analysis
|
|
177
|
+
|
|
178
|
+
Map the parts of the code the work touches: entry points, data shapes, the conventions and patterns to follow, and anything that constrains the design.
|
|
179
|
+
Use the `Explore` agent for a broad search where you have one.
|
|
180
|
+
Write the findings into `spec/SPEC.md` with `path:line` references.
|
|
181
|
+
|
|
182
|
+
This stage has no gate. It feeds the stages after it.
|
|
183
|
+
A contradiction it finds becomes an interview question, a labeled assumption, or a `[NEEDS CLARIFICATION: ...]` marker.
|
|
184
|
+
|
|
185
|
+
## Technical specs
|
|
186
|
+
|
|
187
|
+
This is the core writing stage.
|
|
188
|
+
Fill `spec/SPEC.md` by following `references/spec-guide.md`, from everything the earlier stages produced.
|
|
189
|
+
|
|
190
|
+
First, ask in a round whether the spec should suggest how to build the work.
|
|
191
|
+
When the user says yes, read the codebase as the agent about to build this would.
|
|
192
|
+
Then offer two or three distinct approaches in the next round, where the solution space holds that many, each with a short label and a rough file layout.
|
|
193
|
+
Mark your pick recommended.
|
|
194
|
+
Keep the sketch high-level: a clear starting point and a rough file tree, not a design.
|
|
195
|
+
|
|
196
|
+
Consider a visual beside the spec.
|
|
197
|
+
Then gate on `spec/SPEC.md`.
|
|
198
|
+
On changes: revise, and declare a new gate. Loop until the user approves it.
|
|
199
|
+
|
|
200
|
+
With imagination mode on, and UI mocks in the protocol, this stage runs after the mocks stage.
|
|
201
|
+
|
|
202
|
+
## UI mocks
|
|
203
|
+
|
|
204
|
+
Run this stage only for work that has a user interface.
|
|
205
|
+
A mock is a web page the user opens.
|
|
206
|
+
Start building when the stage starts, and ask nothing first.
|
|
207
|
+
|
|
208
|
+
With imagination mode on, the stage opens with a fan-out instead: many deliberately different candidate screens for the user to choose among.
|
|
209
|
+
`references/imagination-guide.md` defines the fan-out, its one round, and the choice.
|
|
210
|
+
That round is the one exception to "ask nothing first".
|
|
211
|
+
|
|
212
|
+
Each mock is a complete standalone HTML document at `mocks/<mock-id>.html`, where `<mock-id>` is a kebab-case name for the screen.
|
|
213
|
+
Use inline styles, no external resources, and images as data URLs.
|
|
214
|
+
A standalone page lets the agent who builds the work open the mock on its own.
|
|
215
|
+
Style both `[data-theme="dark"]` and `[data-theme="light"]` on the root element when both themes are in scope, and one theme when the user chose one.
|
|
216
|
+
Lay the screen out so it reads well at the target device widths.
|
|
217
|
+
|
|
218
|
+
List each mock in the `Mocks` section of `SPEC.md` as soon as the first one exists.
|
|
219
|
+
|
|
220
|
+
The loop:
|
|
221
|
+
|
|
222
|
+
1. Build or revise the mock files.
|
|
223
|
+
2. Declare a gate on the mock the user is judging.
|
|
224
|
+
3. On changes, or on annotations the user sent: apply them, revise each file in place, and gate again.
|
|
225
|
+
4. On approval: add the approval date to the `Mocks` section. Approval ends the stage.
|
|
226
|
+
|
|
227
|
+
## Execution plan
|
|
228
|
+
|
|
229
|
+
Ask about the commits first, unless the principles file already answers it.
|
|
230
|
+
Two more questions shape the run - the pauses and the review checkpoints - and they come later in this stage, because their options name concrete phases.
|
|
231
|
+
|
|
232
|
+
The settings read at bootstrap may answer the commit questions in advance:
|
|
233
|
+
|
|
234
|
+
- `commit_mode: current-branch`, `new-branch` or `no-commits` answers the commits question. `prompt` keeps it.
|
|
235
|
+
- `commit_grouping: per phase` or `single` answers the grouping question. `prompt` keeps it. With `no-commits` there is no grouping, so it is skipped either way.
|
|
236
|
+
- With `new-branch`, `branch_naming` names the branch, with `<slug>` replaced by this spec's slug. The name question is then skipped.
|
|
237
|
+
|
|
238
|
+
A saved answer skips its question, and says nothing.
|
|
239
|
+
The plan gate still shows the whole setup, so the user can make an exception for this one spec there.
|
|
240
|
+
|
|
241
|
+
Ask the commit questions in one round: whether the run commits as it goes, on the current branch or on a new one, and how the commits are grouped.
|
|
242
|
+
Ask for the branch name in the same round when a new branch is a live option.
|
|
243
|
+
|
|
244
|
+
Record the answers as `Commits: none | single | per phase` and `Branch: current | <name>` lines in `PLAN.md`.
|
|
245
|
+
|
|
246
|
+
Then break the work into phases.
|
|
247
|
+
**Each phase fits one session, and leaves the repo in a working state.**
|
|
248
|
+
Write `plan/PLAN.md`: the goal, how the run behaves, and the phase list with checkboxes.
|
|
249
|
+
Give each phase its goal and its definition of done.
|
|
250
|
+
Decide the phase boundaries, the goals and the definitions of done now, for every phase. They are cheap to get right in advance.
|
|
251
|
+
|
|
252
|
+
Do not give much weight to development cost or to output size.
|
|
253
|
+
Prefer quality, simplicity, robustness, scalability and long-term maintainability.
|
|
254
|
+
When something has grown unwieldy, restructure it by judgment: refactor, split, or extract.
|
|
255
|
+
Never restructure by a number set in advance.
|
|
256
|
+
|
|
257
|
+
Check the plan against the principles the bootstrap read.
|
|
258
|
+
Record the outcome as a `## Principles check` section: one line per principle the work touches, saying how the plan honors it.
|
|
259
|
+
When a plan must break a principle, record it in a table with the columns `Deviation | Why needed | Simpler alternative rejected because`.
|
|
260
|
+
Look for the simpler alternative before you record a deviation, and say why you rejected it.
|
|
261
|
+
A deviation is an exception the user decides on at the gate.
|
|
262
|
+
It is not a way to soften a principle, so the usual fix for a conflict is a different plan.
|
|
263
|
+
|
|
264
|
+
When `SPEC.md` carries requirement IDs, end every phase entry with a `Covers: FR-03, FR-04` line.
|
|
265
|
+
Every ID appears in one phase's `Covers` line at least, and a requirement may span several phases.
|
|
266
|
+
An ID no phase covers means a missing phase, or scope that belongs in the non-goals.
|
|
267
|
+
Add the phase, or move the requirement, before the gate. Ask the user when the call is not yours.
|
|
268
|
+
|
|
269
|
+
**Have `plan/PLAN.md` on disk, with its goal and its whole phase list, before the next round.**
|
|
270
|
+
Both questions in it name concrete phases, and this file is what the user reads to answer them.
|
|
271
|
+
|
|
272
|
+
**The pauses.**
|
|
273
|
+
Ask where the run stops for the user: nowhere, after one named phase, or after every phase.
|
|
274
|
+
A stop lets the user see a result before later phases build on it.
|
|
275
|
+
Recommend no stops for a small, low-risk plan.
|
|
276
|
+
Recommend a named phase when one phase is risky, user-visible, or a natural point for feedback.
|
|
277
|
+
Recommend every phase when the user wants to steer the work all the way through.
|
|
278
|
+
Record the answer as a `Pauses:` line: `none`, `after phase 2, after phase 4`, or `every phase`.
|
|
279
|
+
|
|
280
|
+
**The review checkpoints.**
|
|
281
|
+
A review checkpoint is a point in the run where fresh reviewers, who did not do the work, judge what is built so far.
|
|
282
|
+
Propose concrete checkpoints. For each one, say how many reviewers and give each a short focus.
|
|
283
|
+
Correctness against the spec, security, performance, repo rules and docs consistency are examples, not a menu.
|
|
284
|
+
|
|
285
|
+
Where they go:
|
|
286
|
+
|
|
287
|
+
- **Every proposal includes the final checkpoint, after the last phase.** It judges the finished work as a whole.
|
|
288
|
+
- Recommend a mid-run checkpoint only under the **dependency-risk rule**: the one risk that justifies stopping for reviewers mid-run is a phase whose wrong implementation sends later phases wrong. Review a complicated phase with no effect on later phases at the end instead. A five-phase plan with no such risk gets the final checkpoint alone.
|
|
289
|
+
- Say why each checkpoint sits where it does, and name the phases.
|
|
290
|
+
|
|
291
|
+
Ask the pauses and the checkpoints in one round.
|
|
292
|
+
The user's pick is final, so a user who declines every checkpoint gets none.
|
|
293
|
+
Record the answer as a `Review checkpoints:` bullet with one sub-bullet per checkpoint: where it sits, how many reviewers, their focuses, and why it is there.
|
|
294
|
+
With no review at all, the line is `Review checkpoints: none`.
|
|
295
|
+
|
|
296
|
+
**Write no phase file now.**
|
|
297
|
+
Each `plan/phase-NN-<slug>.md` holds a `Status:` line, tasks as checkboxes, and a **Verify** section stating how to prove the phase done.
|
|
298
|
+
The executing agent writes that file just before its phase runs, against the code as it stands then.
|
|
299
|
+
A detailed plan for a later phase, written this early, is mostly guessing.
|
|
300
|
+
|
|
301
|
+
An executing agent loads `PLAN.md` and its one phase file, never the whole plan.
|
|
302
|
+
|
|
303
|
+
`PLAN.md` follows this layout.
|
|
304
|
+
Copy the opening note roughly as written, and adapt the rest to the work.
|
|
305
|
+
Include the deviation table only when the plan breaks a principle, and the `Covers:` bullets only when `SPEC.md` carries IDs:
|
|
306
|
+
|
|
307
|
+
```markdown
|
|
308
|
+
# <Title of the work>
|
|
309
|
+
|
|
310
|
+
> **For the executing agent - read this first.** Read `spec/SPEC.md` before any phase.
|
|
311
|
+
> This plan was written before the work started; check each phase against the actual code before building, and raise anything that looks off instead of pushing through.
|
|
312
|
+
|
|
313
|
+
- Commits: none | single | per phase
|
|
314
|
+
- Branch: current | <branch name>
|
|
315
|
+
- Pauses: none | after phase 2, after phase 4 | every phase
|
|
316
|
+
- Review checkpoints:
|
|
317
|
+
- after phase 3: 2 reviewers - correctness against the spec, and docs consistency. Later phases build on this one.
|
|
318
|
+
- final: 3 reviewers - correctness against the spec, docs consistency, and simpler shapes.
|
|
319
|
+
|
|
320
|
+
## Goal
|
|
321
|
+
|
|
322
|
+
<what the work achieves, in a line or two>
|
|
323
|
+
|
|
324
|
+
## Principles check
|
|
325
|
+
|
|
326
|
+
<one line per principle the work touches, saying how the plan honors it>
|
|
327
|
+
|
|
328
|
+
| Deviation | Why needed | Simpler alternative rejected because |
|
|
329
|
+
| --- | --- | --- |
|
|
330
|
+
| <the principle the plan breaks> | <why the plan needs to> | <the simpler alternative, and why it was rejected> |
|
|
331
|
+
|
|
332
|
+
## Phases
|
|
333
|
+
|
|
334
|
+
- [ ] Phase 1 - <name>
|
|
335
|
+
- Goal: <what this phase achieves>
|
|
336
|
+
- Definition of done: <how to tell it is complete>
|
|
337
|
+
- Covers: <the requirement IDs this phase covers>
|
|
338
|
+
- [ ] Phase 2 - <name>
|
|
339
|
+
...
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Consider a visual beside the plan.
|
|
343
|
+
Then gate on `plan/PLAN.md`, saying the phases in a line each, how the run behaves, how the plan honors the principles, and any deviation with its reason.
|
|
344
|
+
On changes: revise, and gate again. Loop until the user approves it.
|
|
345
|
+
|
|
346
|
+
## Quality review
|
|
347
|
+
|
|
348
|
+
This is the last stage before the coherence rewrite and finalize.
|
|
349
|
+
It reviews everything the spec produced - `spec/SPEC.md`, the research, the plan, and the mocks the spec lists - and whether those documents agree with each other.
|
|
350
|
+
Read `references/review-guide.md` when the stage starts.
|
|
351
|
+
It holds the reviewer briefs, the lenses, the severities, the report format, and the design-blockers loop.
|
|
352
|
+
|
|
353
|
+
**The panel.**
|
|
354
|
+
Ask who reviews the work, in a round.
|
|
355
|
+
Propose a panel sized to the work and its risk, one reviewer per focus, and mark your proposal recommended.
|
|
356
|
+
Give a short line saying what each reviewer looks at.
|
|
357
|
+
The default proposal has four reviewers: consistency and completeness, principles alignment, better ways to do this, and design blockers.
|
|
358
|
+
**Include the "better ways to do this" reviewer and the design-blockers reviewer in every proposal.**
|
|
359
|
+
The design-blockers reviewer runs the loop `references/review-guide.md` defines.
|
|
360
|
+
Bigger or riskier work may add a focus of its own - security, performance, the work's own subject - and small work may run with two reviewers and the blockers loop.
|
|
361
|
+
Always offer an option that turns the review off.
|
|
362
|
+
Say in its description that nothing gets checked independently, and that the spec goes straight to the rewrite and finalize.
|
|
363
|
+
|
|
364
|
+
On the skip: post the stage done with a note saying it was skipped, write no report, and move on.
|
|
365
|
+
A skipped stage counts as not run, so finalize keeps its full read-through.
|
|
366
|
+
|
|
367
|
+
**Running it.**
|
|
368
|
+
Run one reviewer per confirmed focus, each as a subagent with a brief from `references/review-guide.md`.
|
|
369
|
+
The reviewers share no context: each gets its own prompt, none sees this conversation, and none is told what the others found.
|
|
370
|
+
|
|
371
|
+
An agent with no subagent tool runs the same passes itself, one lens at a time, and writes each pass's findings into the report before it starts the next.
|
|
372
|
+
The report's mode line then says the review ran inline, and that the fresh-context guarantee did not hold.
|
|
373
|
+
An agent that has the capability but cannot make it work stops and asks in a round.
|
|
374
|
+
It never downgrades quietly.
|
|
375
|
+
|
|
376
|
+
Post each round of review as it lands, so the board shows it:
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
echo '{"round":1,"verdict":"holds, two for you","findings":9,"judgments":2}' | specs review <spec>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Handling the findings.**
|
|
383
|
+
Merge the findings, and remove the duplicates.
|
|
384
|
+
Dismiss a finding you disagree with, and say why in the report.
|
|
385
|
+
Fix a finding that is plainly right, apply the fix, and mark it applied.
|
|
386
|
+
Bring a taste or scope finding to the user, "better ways" suggestions included, with the reviewer's reasoning.
|
|
387
|
+
Bring a finding to the user too when it is right but the fix is not obvious, or when acting on it would undo something the user approved at an earlier gate.
|
|
388
|
+
Resolve a conflict with a principle by changing the work, never the principle.
|
|
389
|
+
|
|
390
|
+
**The report and the gate.**
|
|
391
|
+
Write `review/REVIEW.md` in the format `references/review-guide.md` defines.
|
|
392
|
+
Consider a visual beside it: where the findings fall across the artifacts is the kind of thing a figure shows faster than a list.
|
|
393
|
+
|
|
394
|
+
Declare one decision card per finding that waits on the user, each carrying the evidence and the trade-off.
|
|
395
|
+
Then gate on `review/REVIEW.md`.
|
|
396
|
+
Read the answers back, record what the user decided in the report, and apply it.
|
|
397
|
+
Then gate again.
|
|
398
|
+
A comment the user sent on a finding's section is input to that finding.
|
|
399
|
+
A user who asks for another round gets one. There is no automatic re-review loop.
|