chamba 0.8.0 → 0.10.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.
Files changed (73) hide show
  1. package/README.md +14 -3
  2. package/dist/commands/dev.js +11 -11
  3. package/dist/commands/menu.js +1 -1
  4. package/dist/commands/settings.js +9 -6
  5. package/dist/lib/awake-holder.js +3 -0
  6. package/dist/lib/awake-marker.js +4 -0
  7. package/dist/lib/awake.js +1 -0
  8. package/dist/lib/chamba-yaml.js +4 -4
  9. package/dist/lib/constants.js +1 -1
  10. package/dist/lib/global-config.js +3 -3
  11. package/dist/lib/skills.js +2 -2
  12. package/package.json +1 -1
  13. package/templates/Dockerfile +3 -3
  14. package/templates/context/baseline.md +2 -2
  15. package/templates/context/web-pane-craft.md +1 -1
  16. package/templates/pane-apps/client/assets/api-CguEsvNp.js +12 -0
  17. package/templates/pane-apps/client/assets/api-Cyoc3E6K.css +1 -0
  18. package/templates/pane-apps/client/assets/bee-B7t97l5B.webp +0 -0
  19. package/templates/pane-apps/client/assets/buzz-CUUsbnXH.mp3 +0 -0
  20. package/templates/pane-apps/client/assets/home-CLFnmg7u.css +1 -0
  21. package/templates/pane-apps/client/assets/home-CrhBkqDQ.js +1 -0
  22. package/templates/pane-apps/client/assets/pop-D5ZANBC3.mp3 +0 -0
  23. package/templates/pane-apps/client/assets/reviews-Bq8EwmG-.js +153 -0
  24. package/templates/pane-apps/client/assets/reviews-DzHtA35Q.css +1 -0
  25. package/templates/pane-apps/client/assets/search-DgFnnu-J.js +1 -0
  26. package/templates/pane-apps/client/assets/specs-JvdNFtXR.js +13 -0
  27. package/templates/pane-apps/client/assets/useNow-Ww-Gffnk.js +1 -0
  28. package/templates/pane-apps/client/home/index.html +16 -0
  29. package/templates/pane-apps/client/reviews/index.html +6 -4
  30. package/templates/pane-apps/client/specs/index.html +4 -3
  31. package/templates/pane-apps/server/home.mjs +11 -0
  32. package/templates/pane-apps/server/reviews.mjs +19 -18
  33. package/templates/pane-apps/server/specs.mjs +4 -4
  34. package/templates/skills/dx-review/SKILL.md +16 -3
  35. package/templates/skills/dx-review/references/acts.md +86 -15
  36. package/templates/skills/dx-spec/SKILL.md +11 -19
  37. package/templates/skills/dx-spec/references/review-guide.md +15 -9
  38. package/templates/skills/dx-spec/references/spec-guide.md +12 -5
  39. package/templates/skills/dx-spec/references/stages.md +44 -24
  40. package/templates/skills/dx-spec-execute/SKILL.md +78 -28
  41. package/templates/startup.mjs +13 -13
  42. package/templates/tool-helper.sh +4 -2
  43. package/templates/webterm/README.md +41 -17
  44. package/templates/webterm/awake.js +27 -0
  45. package/templates/webterm/config.js +30 -0
  46. package/templates/webterm/public/app/alerts.js +92 -11
  47. package/templates/webterm/public/app/composer.js +37 -3
  48. package/templates/webterm/public/app/connection.js +14 -0
  49. package/templates/webterm/public/app/dom.js +1 -0
  50. package/templates/webterm/public/app/frames.js +1 -1
  51. package/templates/webterm/public/app/home-host.js +16 -0
  52. package/templates/webterm/public/app/main.js +4 -2
  53. package/templates/webterm/public/app/pane-shape.js +5 -3
  54. package/templates/webterm/public/app/pane-shell.js +45 -5
  55. package/templates/webterm/public/app/pane.js +8 -2
  56. package/templates/webterm/public/app/reviews-host.js +5 -1
  57. package/templates/webterm/public/app/state.js +4 -0
  58. package/templates/webterm/public/app/tabs.js +37 -3
  59. package/templates/webterm/public/app/tool-host.js +19 -3
  60. package/templates/webterm/public/app/workspace-color.js +1 -1
  61. package/templates/webterm/public/index.html +5 -1
  62. package/templates/webterm/public/styles.css +65 -0
  63. package/templates/webterm/server.js +24 -1
  64. package/templates/webterm/tool-document.js +3 -2
  65. package/templates/webterm/tools/home.js +80 -0
  66. package/templates/webterm/tools/index.js +5 -4
  67. package/templates/webterm/tools/reviews.js +7 -3
  68. package/templates/pane-apps/client/assets/files-D0nJgFAA.js +0 -12
  69. package/templates/pane-apps/client/assets/files-h0K1vZyQ.css +0 -1
  70. package/templates/pane-apps/client/assets/reviews-BsoGZ35r.css +0 -1
  71. package/templates/pane-apps/client/assets/reviews-iW0Mbn4e.js +0 -153
  72. package/templates/pane-apps/client/assets/specs-D9z3neR-.js +0 -13
  73. package/templates/skills/dx-spec/references/principles-template.md +0 -2
@@ -5,15 +5,22 @@ The technical specs stage of `/dx-spec` uses this guide, and so does every other
5
5
  **No fixed template.**
6
6
  Write the sections the work needs, and name and order them to fit the work.
7
7
  A small chore may need a few lines. A large feature may need many sections.
8
- Common sections are: goal, context, scope and **non-goals**, requirements or behavior, edge cases and errors, data and contracts, `Documentation impact`, constraints, and acceptance criteria.
8
+ Common sections are: goal, context, scope and **non-goals**, requirements or behavior, edge cases and errors, data and contracts, `Documentation impact`, `Migrations`, constraints, and acceptance criteria.
9
9
  For the constraints, follow the repo's own rules in `CLAUDE.md` or `AGENTS.md`.
10
10
  Drop every section that does not apply.
11
11
 
12
- **`Documentation impact` is the one section that always applies.**
13
- Read the project's own documents - the README, the guides, and each document that sits beside the code the work touches - and name the ones the work makes not correct.
12
+ **`Documentation impact` and `Migrations` are the two sections that always apply.**
13
+ The user confirms both in a round, as `references/stages.md` describes under **Documentation and migrations**.
14
+
15
+ Under `Documentation impact`, read the project's own documents - the README, the guides, and each document that sits beside the code the work touches - and name the ones the work makes not correct.
14
16
  Write one line for each: the path to it, and what the work changes in it.
15
17
  Where the work leaves every document correct, write one line that says so.
16
- The execution plan stage reads this section by name, so head it exactly this way.
18
+
19
+ Under `Migrations`, name each migration the work needs.
20
+ Write one line for each: what is stored in the old shape, and what moves it to the new one.
21
+ Where the work needs none, write `None needed` and one line saying why.
22
+
23
+ The execution plan stage reads both sections by name, so head each one exactly this way.
17
24
  Label anything left open as an **assumption** or an **open question**.
18
25
  Write each date as an absolute date.
19
26
  Reference code as `path:line`.
@@ -30,7 +37,7 @@ To clear a marker, ask the user. The answer replaces the marker in `SPEC.md`, in
30
37
  A doubt anywhere outside these stages does not wait: ask it in the next round.
31
38
  The finalize gate does not pass while a marker stays open.
32
39
 
33
- **Requirements carry IDs and acceptance criteria** when the protocol includes the execution plan stage or the quality review stage.
40
+ **Requirements carry IDs and acceptance criteria** when the protocol includes the execution plan stage or the specs quality review stage.
34
41
  With neither stage, write the requirements in plain language instead.
35
42
  Number each ID in writing order, as `FR-01`, `FR-02`, and so on.
36
43
  Never renumber an ID after you write it, so a phase or a finding that names one still points at the same requirement.
@@ -125,6 +125,28 @@ Either way, keep it self-contained: no external image, no script, nothing fetche
125
125
  This is a judgment call, never a rule.
126
126
  Most documents need no visual, and a visual nobody would look at is not worth writing.
127
127
 
128
+ ## Documentation and migrations
129
+
130
+ Two readings of the work are the user's to confirm: which of the project's own documents the work makes not correct, and whether the work needs a migration.
131
+ Ask both once, in a round, whichever stages the protocol holds.
132
+ No form asks them.
133
+
134
+ Neither one can be answered before the code is read, so the round waits for that.
135
+ Codebase analysis is where the code is read, and it has no gate, so the round belongs to the first stage that runs after it.
136
+ Where the protocol holds no codebase analysis, it belongs to the first stage that reads the code.
137
+
138
+ Read the code that answers each one before you ask, and mark what the code gives as recommended.
139
+ That is what makes the recommendation an accurate one rather than a guess, and it is usually the answer: the user confirms what is already there.
140
+
141
+ For the migrations, judge what a migration means for the work in hand.
142
+ There is no fixed definition, and the judgment is yours: stored data, a file on disk, a saved shape, a contract something outside this build already holds.
143
+ Report the judgment whichever way it falls.
144
+ `None needed`, with a short reason, is an answer the user can argue with.
145
+ A question nobody asked gives the user nothing to argue with at all.
146
+
147
+ Write both answers into the `Documentation impact` and `Migrations` sections of `SPEC.md`, which the execution plan stage reads by name.
148
+ `references/spec-guide.md` holds the shape of each one.
149
+
128
150
  ## High-level exploration
129
151
 
130
152
  Think together before you commit to anything.
@@ -228,6 +250,7 @@ Read the project's own documents while you map the code: the README, the guides,
228
250
  Find the ones the planned work makes not correct, and write them into the `Documentation impact` section of `spec/SPEC.md`, as `references/spec-guide.md` describes it.
229
251
  Name each document, and say which part of it the work makes not correct.
230
252
  Where the work leaves every document correct, write that, so the stages after this one know the question was asked.
253
+ What is written here is a reading of the code, and the user confirms it in the round under **Documentation and migrations**.
231
254
 
232
255
  This stage is where the code is read as a whole, so it is where **Cross-check a stored answer against the code** in `SKILL.md` runs.
233
256
  Read every answer the user has given against what the code says, and raise what disagrees: the stage settings the protocol form carries, and what a round settled earlier, the interview's own answers included.
@@ -291,7 +314,7 @@ This stage recommends them as data, and writes none of them into `PLAN.md`.
291
314
 
292
315
  Break the work into phases.
293
316
  **Each phase fits one session, and leaves the repo in a working state.**
294
- Write `plan/PLAN.md`: the goal, the principles check, and the phase list with checkboxes.
317
+ Write `plan/PLAN.md`: the goal and the phase list with checkboxes.
295
318
  Give each phase its goal and its definition of done.
296
319
  Decide the phase boundaries, the goals and the definitions of done now, for every phase. They are cheap to get right in advance.
297
320
 
@@ -300,13 +323,6 @@ Prefer quality, simplicity, robustness, scalability and long-term maintainabilit
300
323
  When something has grown unwieldy, restructure it by judgment: refactor, split, or extract.
301
324
  Never restructure by a number set in advance.
302
325
 
303
- Check the plan against the principles the bootstrap read.
304
- Record the outcome as a `## Principles check` section: one line per principle the work touches, saying how the plan honors it.
305
- When a plan must break a principle, record it in a table with the columns `Deviation | Why needed | Simpler alternative rejected because`.
306
- Look for the simpler alternative before you record a deviation, and say why you rejected it.
307
- A deviation is an exception the user decides on at the gate.
308
- It is not a way to soften a principle, so the usual fix for a conflict is a different plan.
309
-
310
326
  When `SPEC.md` carries requirement IDs, end every phase entry with a `Covers: FR-03, FR-04` line.
311
327
  Every ID appears in one phase's `Covers` line at least, and a requirement may span several phases.
312
328
  An ID no phase covers means a missing phase, or scope that belongs in the non-goals.
@@ -316,6 +332,10 @@ Add the phase, or move the requirement, before the gate. Ask the user when the c
316
332
  Name the document in the definition of done of the phase that changes what it describes, so the run makes the document correct as it changes the code.
317
333
  Do not collect the documents into a phase of their own at the end.
318
334
 
335
+ **A phase covers each migration the spec's `Migrations` section names.**
336
+ Name the migration in the definition of done of the phase that makes it necessary, so the run moves what is stored as it changes the shape.
337
+ Do not collect the migrations into a phase of their own at the end.
338
+
319
339
  **Post the phases as soon as `PLAN.md` is on disk:**
320
340
 
321
341
  ```
@@ -339,7 +359,7 @@ Recommend `per-phase` for a plan of several phases, because a phase that is comm
339
359
  Recommend `single` for small work that reads as one change.
340
360
  Recommend `none` where the user is likely to want to read the whole thing before any of it lands.
341
361
  Recommend a new branch for work of any size that touches shared code, and the current branch for a small change on a branch that is already the work's own.
342
- Name the branch `spec/<slug>`, with this spec's own slug, unless a principle in the principles file names another shape.
362
+ Name the branch `spec/<slug>`, with this spec's own slug.
343
363
 
344
364
  **The pauses.**
345
365
  A pause is where the run stops and waits for the user.
@@ -387,7 +407,7 @@ An executing agent loads `PLAN.md` and its one phase file, never the whole plan.
387
407
 
388
408
  `PLAN.md` follows this layout.
389
409
  Copy the opening note roughly as written, and adapt the rest to the work.
390
- Include the deviation table only when the plan breaks a principle, and the `Covers:` bullets only when `SPEC.md` carries IDs:
410
+ Include the `Covers:` bullets only when `SPEC.md` carries IDs:
391
411
 
392
412
  ```markdown
393
413
  # <Title of the work>
@@ -400,14 +420,6 @@ Include the deviation table only when the plan breaks a principle, and the `Cove
400
420
 
401
421
  <what the work achieves, in a line or two>
402
422
 
403
- ## Principles check
404
-
405
- <one line per principle the work touches, saying how the plan honors it>
406
-
407
- | Deviation | Why needed | Simpler alternative rejected because |
408
- | --- | --- | --- |
409
- | <the principle the plan breaks> | <why the plan needs to> | <the simpler alternative, and why it was rejected> |
410
-
411
423
  ## Phases
412
424
 
413
425
  - [ ] Phase 1 - <name>
@@ -419,13 +431,13 @@ Include the deviation table only when the plan breaks a principle, and the `Cove
419
431
  ```
420
432
 
421
433
  Consider a visual beside the plan.
422
- Then gate on `plan/PLAN.md`, saying the phases in a line each, how the plan honors the principles, and any deviation with its reason.
434
+ Then gate on `plan/PLAN.md`, saying the phases in a line each.
423
435
  Say in one line what you recommended for the run, and that the user settles it when they press Execute.
424
436
  On changes: revise the plan, post the phases again where they moved, recommend the run again where the change made the recommendation wrong, and gate again.
425
437
  Loop until the user approves it.
426
438
  The rule over that last part is **Keep what derives from a change true**, in `SKILL.md`.
427
439
 
428
- ## Quality review
440
+ ## Specs quality review
429
441
 
430
442
  This is the last stage before the coherence rewrite and finalize.
431
443
  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.
@@ -436,9 +448,13 @@ It holds the reviewer briefs, the lenses, the severities, and the report format.
436
448
  Ask who reviews the work, in a round.
437
449
  Propose a panel sized to the work and its risk, one reviewer per focus, and mark your proposal recommended.
438
450
  Give a short line saying what each reviewer looks at.
439
- The default proposal has three reviewers: consistency and completeness, principles alignment, and better ways to do this.
451
+ The default proposal has three reviewers: consistency and completeness, repo rules, and better ways to do this.
440
452
  **Include the "better ways to do this" reviewer in every proposal.**
441
- 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.
453
+ **The repo-rules lens is on every panel, with or without a reviewer of that name.**
454
+ Work of any size is judged against what the repo asks of it, so that lens is never what a smaller panel loses.
455
+ Bigger or riskier work may add a focus of its own - security, performance, the work's own subject.
456
+ Small work may run with two reviewers: consistency and completeness, and better ways to do this.
457
+ `references/review-guide.md` says which reviewer then takes up the lenses of a focus that is not on the panel, the repo-rules lens included.
442
458
  Always offer an option that turns the review off.
443
459
  Say in its description that nothing gets checked independently, and that the spec goes straight to the rewrite and finalize.
444
460
 
@@ -457,16 +473,20 @@ It never downgrades quietly.
457
473
  Post each round of review as it lands, so the board shows it:
458
474
 
459
475
  ```
460
- echo '{"round":1,"verdict":"holds, two for you","findings":9,"judgments":2}' | specs review <spec>
476
+ echo '{"verdict":"holds, two for you","findings":9,"judgments":2}' | specs review <spec>
461
477
  ```
462
478
 
479
+ The number and the source are the tool's own.
480
+ It reads where the work stands when the round lands, decides which review the round belongs to - the spec's own review, the checkpoint the run is at, or the execution with no place, which is where a round posted at no checkpoint lands - and numbers the round within that review, so the spec's round 1 and a checkpoint's round 1 are two rounds.
481
+ Carry a `round` in the payload for one purpose only: to replace a round of the same review that you posted before, which is how a round is corrected.
482
+
463
483
  **Handling the findings.**
464
484
  Merge the findings, and remove the duplicates.
465
485
  Dismiss a finding you disagree with, and say why in the report.
466
486
  Fix a finding that is plainly right, apply the fix, and mark it applied.
467
487
  Bring a taste or scope finding to the user, "better ways" suggestions included, with the reviewer's reasoning.
468
488
  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.
469
- Resolve a conflict with a principle by changing the work, never the principle.
489
+ Resolve a conflict with a repo rule by changing the work, never the rule.
470
490
 
471
491
  **The report and the gate.**
472
492
  Write `review/REVIEW.md` in the format `references/review-guide.md` defines.
@@ -28,6 +28,7 @@ specs stages
28
28
  ```
29
29
 
30
30
  The answer holds `root` - the directory the tab serves - and the stage catalog.
31
+ Every path in this family resolves against that root.
31
32
  A refusal means there is no pane.
32
33
  Say this and stop:
33
34
 
@@ -60,11 +61,25 @@ echo '{"kind":"status","status":"executing"}' | specs post <spec>
60
61
  echo '{"kind":"phase","phase":"phase-02-the-consuming-skills","title":"The consuming skills","status":"running"}' | specs post <spec>
61
62
  echo '{"kind":"activity","said":"Running the verify steps"}' | specs post <spec>
62
63
  echo '{"kind":"phase","phase":"phase-02-the-consuming-skills","title":"The consuming skills","status":"done"}' | specs post <spec>
63
- echo '{"round":1,"verdict":"holds, one for you","findings":6,"judgments":1}' | specs review <spec>
64
+ echo '{"verdict":"holds, one for you","findings":6,"judgments":1}' | specs review <spec>
64
65
  ```
65
66
 
67
+ The number and the source are the tool's own.
68
+ It reads where the work stands when the round lands, decides which review the round belongs to - the spec's own review, the checkpoint the run is at, or the execution with no place, which is where a round posted at no checkpoint lands - and numbers the round within that review, so the spec's round 1 and a checkpoint's round 1 are two rounds.
69
+ Carry a `round` in the payload for one purpose only: to replace a round of the same review that you posted before, which is how a round is corrected.
70
+
66
71
  A phase's id is its file's name without the extension, which is what you already write and tick.
67
72
 
73
+ **A phase report names a phase the plan holds, and the tool refuses one that does not.**
74
+ The refusal names the phases the plan does hold, so a report the tool would not take says in its own words what to do.
75
+ Where the plan changed while the run was going - a phase renamed, split in two, or added - post the whole phase list first, in plan order, and report the phase after that:
76
+
77
+ ```
78
+ echo '{"kind":"plan","phases":[{"phase":"phase-01-the-state","title":"The state"},{"phase":"phase-02-the-rail","title":"The rail"}]}' | specs post <spec>
79
+ ```
80
+
81
+ The list is the plan's own: a phase it drops leaves the board, and a phase that survives keeps the status it had, so a finished phase is never set back to waiting.
82
+
68
83
  ## The run does not stop on its own
69
84
 
70
85
  The `pauses` decision is the only thing that stops this run for the user.
@@ -132,13 +147,9 @@ So where the state holds decisions they bind you, and where it holds none there
132
147
 
133
148
  ## The plan is the user's instruction
134
149
 
135
- The user chose everything in the plan at spec time: the phases, the verify steps, and the principles check with its recorded deviations.
150
+ The user chose everything in the plan at spec time: the phases, and the definition of done of each one.
136
151
  All of it binds this run.
137
152
 
138
- A recorded deviation is an approved exception.
139
- Build the work to match it, and never return it quietly to the principle it excepts.
140
- A principle the plan does not except stays binding.
141
-
142
153
  Your own limits do not justify a change to the plan.
143
154
  When you cannot do what the plan asks, that is a stop condition, and the **Stop and ask** section says how to raise it.
144
155
  Never replace the plan's instruction with a weaker one and carry on.
@@ -148,24 +159,12 @@ A choice of your own that changes nothing - which of two equal ways to read a fi
148
159
  An instruction from the user in this conversation overrides the plan.
149
160
  The plan loses to the user, and never to you.
150
161
 
151
- ## 0. Bootstrap
152
-
153
- Settle the root and the principles first:
154
-
155
- 1. Read `root` from `specs stages`. That is the directory the Specs tab serves, and every path in this family resolves against it.
156
- 2. Read `<root>/principles.md`. It is plain markdown: a `# Principles` heading, then one `- <principle>` bullet each, and nothing else.
157
- 3. Where no file is there, write one from `../dx-spec/references/principles-template.md`. Say in one line that you made it, and carry straight on.
158
- 4. Honor every principle the file holds for the rest of the run, best-effort - which is the standing each one has, and no more. A file with no bullets holds no principles, so there is nothing to honor.
159
-
160
- A file that is already there produces no message at all.
161
- Nothing else about how this family works is configurable, and the user changes a principle by editing that file.
162
-
163
162
  ## 1. Choose the spec
164
163
 
165
164
  A candidate is a piece of work under the root, outside `archive/`, whose plan still holds an unticked phase.
166
165
 
167
- The user may name one.
168
- A name that matches one spec exactly is an instruction, not a guess.
166
+ The user may name one, and the tab names one by its path.
167
+ An argument that matches one spec exactly is an instruction, not a guess.
169
168
  Start on it, and ask nothing.
170
169
 
171
170
  In three cases the spec is a guess of yours:
@@ -203,7 +202,7 @@ The user then knows from the start where this run stops and where it gets review
203
202
  - The first unticked phase is next.
204
203
  - A phase file that exists carries a `Status:` line: `in progress` or `done`.
205
204
  - A file at `in progress` under an unticked phase means an earlier session stopped mid-phase. Treat it as suspect: check `git status` for half-done work, re-run the verify steps of the ticked tasks, and carry on from where the evidence points.
206
- - The state file carries a dated line for each completed review checkpoint. A checkpoint whose phases are all done with no such line has not run. Run it before you move on.
205
+ - Each round in the state carries the review it belongs to. A chosen checkpoint whose phases are all done, and which no stored round names, has not run. Run it before you move on.
207
206
 
208
207
  **The commits.**
209
208
  `commits` is `per-phase`, `single` or `none`.
@@ -257,6 +256,10 @@ Every phase goes through the same steps, and you carry out every one yourself.
257
256
 
258
257
  2. **Build.** Keep the changes scoped to this phase, and tick each task as it completes.
259
258
 
259
+ Write the rule in the comment's own words.
260
+ Never name a requirement id, a phase or a spec in a comment.
261
+ The user can delete the spec directory, and a comment that names it then points at nothing.
262
+
260
263
  3. **Verify.** Run the Verify section, and make it pass.
261
264
 
262
265
  4. **Record.** Set the phase's `Status:` to `done`, tick its box in `PLAN.md`, and post the phase as `done`.
@@ -334,8 +337,7 @@ An agent that has the capability but cannot make it work is a different case: th
334
337
  Tell each reviewer:
335
338
 
336
339
  - Its focus, and to check the work against what was asked.
337
- - Which files to read: `spec/SPEC.md`, `plan/PLAN.md`, the phase files written so far, and the principles file.
338
- - That the plan's principles check records deviations as approved exceptions, not as findings.
340
+ - Which files to read: `spec/SPEC.md`, `plan/PLAN.md`, the phase files written so far, and the repo's own rule files, `CLAUDE.md` and `AGENTS.md`, wherever they exist.
339
341
  - How to see the changes: name the commit the work started from, so it can diff against that, and point at the working tree when nothing is committed.
340
342
 
341
343
  Each reviewer returns a verdict with concrete findings, each pointing at a file and a line.
@@ -351,6 +353,7 @@ Then, yourself:
351
353
  - When commits are on, land the fixes in one follow-up commit, in **The commit style**, with "<spec name> review fixes" as its descriptive part.
352
354
 
353
355
  Post the round with `specs review`, so the board carries its verdict.
356
+ Post it before you report the next phase as running: the tool reads where the run stands to work out which review a round belongs to, so a round that lands after the next phase has started belongs to the execution and to no checkpoint.
354
357
  Bring a finding that is the user's to judge to the tab as a decision card, rather than settling it yourself.
355
358
  A card names the passage it is about by file and by section, asks one question, and offers the ways out as its own options, one of them recommended.
356
359
  `../dx-spec/SKILL.md` carries the shape, under **The verbs**.
@@ -366,7 +369,7 @@ Then declare a gate: carry on, or stop here.
366
369
  Point the gate at the artifact the phase produced, where one exists, so the user reads it and answers in the same place.
367
370
 
368
371
  On "carry on": start the next phase in this session.
369
- On "stop": end the run with the report below.
372
+ On "stop": end the turn with the message of **section 6**, and write no report file - the run has not reached its end.
370
373
  A later run finds from disk where this one stopped, resumes at the next unfinished phase, and pauses only at the pauses ahead of it.
371
374
 
372
375
  A pause after the last phase has nothing to carry on to.
@@ -409,24 +412,70 @@ echo '{"kind":"status","status":"complete"}' | specs post <spec>
409
412
 
410
413
  The post moves the state file and the rendered `README.md`, so it goes before the commit that carries them.
411
414
 
415
+ Then write the run report to `<root>/<spec>/run-report.md`.
416
+ **Section 6** holds its title, its headings and what goes under each one.
417
+ Write it here, before the closing commit, so the commit carries it.
418
+ A later run of the same spec writes the file again, over the report of the run before it.
419
+ A run that stops before its end writes no report at all: the message of **section 6** is the whole of what such a run gives.
420
+
412
421
  Then, unless `commits` is `none`, stage the spec directory by path and commit it.
413
422
  Compose the message from **The commit style** in `dx-spec/SKILL.md`, with "<spec name> complete" as its descriptive part, which makes it a `docs` commit.
414
- This one commit covers the phase files, the ticked plan, the spec the run kept true, and the rendered board.
423
+ This one commit covers the phase files, the ticked plan, the spec the run kept true, the report and the rendered board.
415
424
  Staging by path leaves every other change in the working tree alone, and the tree is clean over the spec directory once it lands.
416
425
  Commit only. Never push.
417
426
 
418
427
  With `"commits": "none"`, post the status and commit nothing.
419
428
  The report then says the closing status was left uncommitted, so the user knows the state file and the `README.md` are changed and theirs to keep or to drop.
420
429
 
421
- Then give the report below, which is what ends the turn and says what the closing commit did.
430
+ Then give the message of section 6, which is what ends the turn and says what the closing commit did.
422
431
 
423
432
  ## 6. Report
424
433
 
425
- This report is what ends a turn.
434
+ A run that reaches its end has two homes for its report, and they hold the same run.
435
+ A run that stops before its end has one: the message.
436
+
437
+ `run-report.md` at the top of the spec directory is the whole of the report.
438
+ The closing step of section 5 writes it, the Specs tab lists it beside the other artifacts and renders it, and it stays with the work for whoever reads the spec later.
439
+ It is written at the end of the run and nowhere else, so a pause and a stop condition write no file at all.
440
+
441
+ The message in this terminal is the short form.
442
+ It is what ends the turn, and the user reads it now rather than later.
443
+
444
+ ### The file
445
+
446
+ Write it as Markdown, with this title and these headings, in this order:
447
+
448
+ ```markdown
449
+ # <spec name> - run report
450
+
451
+ ## Bottom line
452
+
453
+ ## Must know
454
+
455
+ ## The details
456
+ ```
457
+
458
+ The title names the spec.
459
+ The title and the three headings are fixed word for word.
460
+ Nothing else about the report is fixed.
461
+ The text under each heading is yours to write, so two reports share the headings and differ in their words alone.
462
+
463
+ - **Bottom line**: a few sentences on what landed, and whether the run is complete.
464
+ - **Must know**: the decisions that carry weight, the departures from the plan and from the mocks, and the critical issues a checkpoint found.
465
+ Write this section only where the run holds something the user must know.
466
+ Where it holds none, leave the heading out, and never write the section to fill it.
467
+ - **The details**: the phases finished and the overall progress, every checkpoint with what it found, what was fixed and what was dismissed with the reason, what you settled on your own, the branch and the commits of the run, and the commit mode.
468
+ Say that the report rides in the closing commit, or, with `"commits": "none"`, that it sits uncommitted in the tree.
469
+
470
+ Bottom line and The details are in every report.
471
+
472
+ ### The message
473
+
474
+ The message is what ends a turn.
426
475
  Give it at the end of the run, at a pause, or at a stop condition, and nowhere else.
427
476
  What you say between phases is a progress line: say it and keep building.
428
477
 
429
- Report in a normal message:
478
+ Say it in normal message text:
430
479
 
431
480
  - The phases finished this run, and the overall progress, such as "5/7 phases done".
432
481
  - What the verification showed, and the outcome of every checkpoint this run ran: what the reviewers found, what was fixed, what was dismissed and why. When no checkpoint was chosen, say so.
@@ -435,3 +484,4 @@ Report in a normal message:
435
484
  - Whether the run decisions were committed, and where they were not, that the spec directory was never committed.
436
485
  - Why the run stopped, when it stopped at a pause or a stop condition, and what you need from the user.
437
486
  - Whether the closing commit landed, and under `"commits": "none"`, that the closing status was left uncommitted.
487
+ - Where the run reached its end, that `run-report.md` in the spec directory holds the whole of the report.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // =============================================================================
3
- // startup.mjs -- Container startup: AI CLI updates + readiness checks
3
+ // startup.mjs -- Container startup: agent CLI updates + readiness checks
4
4
  // Baked into the container image at /home/devuser/startup.mjs
5
5
  // Must run as root (npm global install requires root).
6
6
  // Must use only Node.js built-ins -- no external packages available in container.
@@ -45,15 +45,15 @@ const fail = (label, detail) => {
45
45
  };
46
46
  // Non-fatal notice: always prints (even in summary), but does NOT increment errors, so it never aborts
47
47
  // the session. Used for things the user should know about but that must not block connecting (e.g. a
48
- // transient AI CLI update failure -- the existing versions still work).
48
+ // transient agent CLI update failure -- the existing versions still work).
49
49
  const warn = (label, detail) => console.log(`${yellow("!")} ${label.padEnd(24)}${detail ? yellow(detail) : ""}`);
50
50
  const section = summary ? () => {} : (title) => console.log(`\n${bold(title)}`);
51
51
 
52
52
  // -- Header -------------------------------------------------------------------
53
53
  if (!summary) console.log(`\n${bold("chamba - Sandbox for AI Agents")}\n`);
54
54
 
55
- // -- AI CLI update (requires root - skipped when run via 'status' alias as devuser) -
56
- section("AI CLI update");
55
+ // -- Agent CLI update (requires root - skipped when run via 'status' alias as devuser) -
56
+ section("Agent CLI update");
57
57
 
58
58
  const isRoot = process.getuid?.() === 0;
59
59
  const TIMESTAMP_FILE = "/home/devuser/.ai-cli-updated";
@@ -148,7 +148,7 @@ const doUpdate = (label) =>
148
148
  child.on("error", (err) => {
149
149
  finish(() => {
150
150
  printIndented(String(err?.message ?? err));
151
- warn("AI CLIs", "update failed -- continuing with existing versions");
151
+ warn("agent CLIs", "update failed -- continuing with existing versions");
152
152
  });
153
153
  });
154
154
  child.on("close", (code) => {
@@ -156,10 +156,10 @@ const doUpdate = (label) =>
156
156
  if (code === 0) {
157
157
  printIndented(out);
158
158
  writeFileSync(TIMESTAMP_FILE, `${new Date().toISOString()}\n`);
159
- ok("AI CLIs", "updated");
159
+ ok("agent CLIs", "updated");
160
160
  } else {
161
161
  printIndented(`${out}${errOut}`);
162
- warn("AI CLIs", "update failed -- continuing with existing versions");
162
+ warn("agent CLIs", "update failed -- continuing with existing versions");
163
163
  }
164
164
  });
165
165
  });
@@ -176,7 +176,7 @@ const promptSkipUpdate = (seconds) =>
176
176
  let remaining = seconds;
177
177
  let tick;
178
178
  let timer;
179
- const line = (s) => `\r\x1b[K${blue("●")} ${dim(`Updating AI CLIs in ${s}s... SPACE to skip, ENTER to update now`)}`;
179
+ const line = (s) => `\r\x1b[K${blue("●")} ${dim(`Updating agent CLIs in ${s}s... SPACE to skip, ENTER to update now`)}`;
180
180
  const cleanup = () => {
181
181
  clearInterval(tick);
182
182
  clearTimeout(timer);
@@ -218,19 +218,19 @@ const promptSkipUpdate = (seconds) =>
218
218
  });
219
219
 
220
220
  if (Number.isFinite(lastUpdate) && Date.now() - lastUpdate < THROTTLE_MS) {
221
- ok("AI CLIs", "up to date");
221
+ ok("agent CLIs", "up to date");
222
222
  } else if (!isRoot) {
223
- skip("AI CLIs", "update skipped (requires root)");
223
+ skip("agent CLIs", "update skipped (requires root)");
224
224
  } else {
225
225
  // About to show update activity (the skip prompt and/or install/update output). In summary mode that is the
226
226
  // first thing after the host's "Starting dev container...", so add a blank line to separate it.
227
227
  if (summary) console.log("");
228
228
  if (!timestampFileExists) {
229
- await doUpdate("Installing AI CLIs...");
229
+ await doUpdate("Installing agent CLIs...");
230
230
  } else if (await promptSkipUpdate(5)) {
231
- skip("AI CLIs", "update skipped by user");
231
+ skip("agent CLIs", "update skipped by user");
232
232
  } else {
233
- await doUpdate("Updating AI CLIs to latest...");
233
+ await doUpdate("Updating agent CLIs to latest...");
234
234
  }
235
235
  }
236
236
 
@@ -38,7 +38,7 @@ Verbs:
38
38
  await <spec> Declare a gate, a round or a decision card. { id, kind, title, file, payload }
39
39
  withdraw <spec> Take back an ask nobody needs to answer. { id, reason }
40
40
  post <spec> Say what is happening. { kind: activity | stage | phase | plan | status | note, ... }
41
- review <spec> Post a round of quality review. { round, verdict, findings, judgments }
41
+ review <spec> Post a round of review. { verdict, findings, judgments }, and { round } to replace one already posted
42
42
  answers <spec> Read back what the user answered. { id }
43
43
 
44
44
  A payload is JSON on stdin, where the verb takes one. The answer is JSON on stdout.
@@ -53,7 +53,9 @@ Verbs:
53
53
  stages Where the reviews live, and what a review may hold.
54
54
  state <review> The state, the baseline's summary, and what awaits whom.
55
55
  start File a review from this terminal. { name, selection }
56
- metadata <review> Post the grouping and the notes for the baseline. { fingerprint, groups, notes }
56
+ metadata <review> Post the whole grouping and its notes, replacing what is there. { fingerprint, groups, notes }
57
+ group <review> Add or replace one group, and the notes on its hunks. { fingerprint, group, notes }
58
+ ungroup <review> Remove one group; the notes on its hunks stay. { fingerprint, id }
57
59
  reply <review> Append one reply to a thread. { thread, text }
58
60
  activity <review> Say what you are doing. { said }
59
61
  done <review> End your act; the tool recomputes the baseline where one is due.