@sylad/cadence 1.8.0 → 1.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 (105) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +27 -54
  4. package/agents/code-reviewer.md +2 -2
  5. package/agents/doc-keeper.md +19 -0
  6. package/agents/precheck-reader.md +1 -1
  7. package/agents/qa-reviewer.md +2 -2
  8. package/agents/reference-analyst.md +25 -0
  9. package/agents/reference-verifier.md +19 -0
  10. package/agents/spec-writer.md +1 -1
  11. package/agents/ux-reviewer.md +1 -1
  12. package/bin/cadence.js +9 -1
  13. package/dist/audit.js +16 -4
  14. package/dist/check.js +24 -2
  15. package/dist/cli.js +258 -30
  16. package/dist/config.js +101 -5
  17. package/dist/corrections.js +24 -2
  18. package/dist/deliver.js +125 -37
  19. package/dist/docsync.js +19 -3
  20. package/dist/git.js +16 -3
  21. package/dist/lead.js +45 -12
  22. package/dist/migrate.js +166 -0
  23. package/dist/orchestrate/briefs.js +46 -6
  24. package/dist/orchestrate/changelog-merge.js +94 -0
  25. package/dist/orchestrate/command.js +358 -41
  26. package/dist/orchestrate/cycle.js +922 -285
  27. package/dist/orchestrate/guard.js +2 -2
  28. package/dist/orchestrate/integrate.js +129 -0
  29. package/dist/orchestrate/launch.js +48 -6
  30. package/dist/orchestrate/mutex.js +30 -0
  31. package/dist/orchestrate/no-test.js +41 -0
  32. package/dist/orchestrate/pool.js +74 -36
  33. package/dist/orchestrate/registry.js +146 -14
  34. package/dist/orchestrate/result.js +1 -1
  35. package/dist/orchestrate/snapshot.js +54 -1
  36. package/dist/orchestrate/spec.js +89 -5
  37. package/dist/orchestrate/state.js +56 -15
  38. package/dist/orchestrate/table.js +74 -3
  39. package/dist/orchestrate/timeouts.js +40 -0
  40. package/dist/orchestrate/worktree.js +368 -0
  41. package/dist/perf.js +188 -25
  42. package/dist/plan.js +112 -7
  43. package/dist/proc.js +6 -0
  44. package/dist/ready-free.js +109 -0
  45. package/dist/ref/add.js +129 -0
  46. package/dist/ref/analyse.js +220 -0
  47. package/dist/ref/check.js +338 -0
  48. package/dist/ref/command.js +92 -0
  49. package/dist/ref/corpus-render.js +83 -0
  50. package/dist/ref/corpus.js +201 -0
  51. package/dist/ref/diff.js +262 -0
  52. package/dist/ref/evaluate.js +241 -0
  53. package/dist/ref/figures.js +252 -0
  54. package/dist/ref/measure.js +330 -0
  55. package/dist/ref/pdf.js +116 -0
  56. package/dist/ref/png.js +125 -0
  57. package/dist/ref/regard.js +102 -0
  58. package/dist/ref/session.js +34 -0
  59. package/dist/ref/store.js +40 -0
  60. package/dist/ref/tools.js +51 -0
  61. package/dist/resources.js +51 -0
  62. package/dist/session.js +5 -2
  63. package/dist/state.js +75 -7
  64. package/dist/testgate.js +15 -0
  65. package/docs/cadence-hud.md +12 -0
  66. package/docs/cycle-vague-dark.svg +1 -1
  67. package/docs/cycle-vague-light.svg +1 -1
  68. package/docs/deliver.md +76 -5
  69. package/docs/fonctionnement-wave-dark.svg +1 -1
  70. package/docs/fonctionnement-wave-light.svg +1 -1
  71. package/docs/fonctionnement.md +6 -6
  72. package/docs/lead.md +40 -13
  73. package/docs/news.md +30 -1
  74. package/docs/orchestrate.md +275 -33
  75. package/docs/overview.md +65 -1
  76. package/docs/perf.md +14 -8
  77. package/docs/raf.md +90 -11
  78. package/docs/ref.md +415 -0
  79. package/docs/releasing.md +3 -3
  80. package/docs/session.md +2 -2
  81. package/docs/skills.md +21 -2
  82. package/docs/spec.md +1 -1
  83. package/docs/stabilite.md +4 -4
  84. package/docs/whats-new.md +30 -1
  85. package/package.json +2 -1
  86. package/skills/deliver/SKILL.md +6 -1
  87. package/skills/lead/SKILL.md +28 -10
  88. package/skills/session-close/SKILL.md +1 -1
  89. package/skills/session-start/SKILL.md +2 -2
  90. package/templates/inventaire.json +96 -0
  91. package/templates/orchestrate/accept-back.md +1 -0
  92. package/templates/orchestrate/accept.md +1 -0
  93. package/templates/orchestrate/fiche.md +1 -0
  94. package/templates/orchestrate/fix-docs.md +18 -0
  95. package/templates/orchestrate/fix-minors.md +2 -1
  96. package/templates/orchestrate/fix.md +5 -2
  97. package/templates/orchestrate/implement.md +7 -4
  98. package/templates/orchestrate/maquette.md +2 -1
  99. package/templates/orchestrate/precheck.md +2 -1
  100. package/templates/orchestrate/review-recheck.md +2 -0
  101. package/templates/orchestrate/review-small.md +5 -1
  102. package/templates/orchestrate/review.md +2 -0
  103. package/templates/orchestrate/spec-back.md +2 -1
  104. package/templates/orchestrate/spec.md +4 -3
  105. package/templates/orchestrate/ux.md +3 -1
@@ -12,7 +12,7 @@ box with a blue outline is where the work is kept or checked.
12
12
  <img alt="A lot goes from todo to doing, receives commits that cite it, gets its review and UX verdicts, becomes done, then is delivered by cadence deliver" src="fonctionnement-lot-light.svg">
13
13
  </picture>
14
14
 
15
- The plan (`docs/plan/raf.yaml`, or the file `cadence.yaml` names) is the single source of truth:
15
+ The plan (`.cadence/raf.yaml`, the legacy `docs/plan/raf.yaml`, or the file `cadence.yaml` names) is the single source of truth:
16
16
  `raf check` reports every commit that cites no lot (unless a motivated `raf ignore` covers it).
17
17
  `hook.autostart` in `cadence.yaml` sets what the pre-commit hook does with a commit that cites a lot
18
18
  still `todo`: `warn` (the default), `refuse`, or `start` it in the same commit. `raf done` is refused
@@ -22,10 +22,10 @@ while a sub-task is open. A delivery is finished only when its effect checks pas
22
22
 
23
23
  <picture>
24
24
  <source media="(prefers-color-scheme: dark)" srcset="fonctionnement-wave-dark.svg">
25
- <img alt="A lot without commits starts with a precheck (unless disabled), then by type through spec, mockup or sheet review and sealed acceptance tests, or straight to the implementation; then the UX pass if visible, the code review, corrections and an automatic raf review" src="fonctionnement-wave-light.svg">
25
+ <img alt="A lot without commits whose title cites a finding or another lot starts with a precheck (unless disabled), then by type through spec, mockup or sheet review and sealed acceptance tests, or straight to the implementation; then the UX pass if visible, the code review, corrections and an automatic raf review" src="fonctionnement-wave-light.svg">
26
26
  </picture>
27
27
 
28
- A lot without commits yet starts with the **precheck** (unless `orchestrate.precheck: false`; a lot that already has commits is never pre-checked): is the deliverable already there? « Yes » hands the lot back
28
+ A lot without commits yet whose title cites a finding (`constat`, `revue`, `review`, `audit`) or another lot (its `goal:` counts like its title) starts with the **precheck** (unless `orchestrate.precheck: false`; a lot that already has commits, or whose title (or `goal:`) cites neither, is never pre-checked — L288; nor is a lot created after the last code commit of the repository whose title and `goal:` cite no lot that already has commits of its own, which has nothing to find — L322): is the deliverable already there? « Yes » hands the lot back
29
29
  to the lead; « partial » passes what exists to the implementation. Then:
30
30
 
31
31
  - `screen: page` only: **spec** (mockup and screen sheet), **mockup review** (`ux-reviewer`, two
@@ -73,7 +73,7 @@ working repository's `dist/`: they read a separate worktree under `~/.local/shar
73
73
  only by `npm run service -- <sha>`. The command refuses a sha that is not an ancestor of `HEAD` and a
74
74
  sha whose cited lots are not `done`, so a wave cannot put unreviewed code in service. In the
75
75
  working repository, `npm run build` is a typecheck only. A `dropped` lot whose every commit is undone
76
- by a `git revert` under the sha no longer blocks.
76
+ by a `git revert` under the sha no longer blocks. The command keeps the copy in service and the 3 put in service before it (rollback), removes the older ones unless a live process still uses one, and says what it purged (number of copies, space freed).
77
77
 
78
78
  ## Budget of a lot
79
79
 
@@ -81,7 +81,7 @@ The budget a wave gives a lot is derived from its estimate, measured on the runs
81
81
 
82
82
  | Lot | Budget |
83
83
  |---|---|
84
- | up to 0.5 day | 540 k tokens |
84
+ | up to 0.5 day | 600 k tokens |
85
85
  | 0.5 to 1 day | 750 k |
86
86
  | beyond | 570 k per day, 750 k at least |
87
87
  | `screen: page` | 1.3 M at least, or the ordinary budget + 450 k if that is more |
@@ -96,7 +96,7 @@ The final review is always played; the budget bounds the writing passes. A `scre
96
96
 
97
97
  - **Session cap.** As many sessions or subagents running at once as the cap (2 by default, set by the
98
98
  human with `CADENCE_MAX_SESSIONS` or `--max-sessions`). The lead never raises it itself.
99
- - Never two sessions in the same repository at the same time.
99
+ - Never two sessions in the same repository at the same time. (The worktree mode, `orchestrate.worktrees: true` — on in cadence's own `cadence.yaml`, off where the key is absent — lets two independent lots of one repository play at once, each in its own worktree — [docs/orchestrate.md](orchestrate.md#one-worktree-per-lot-orchestrateworktrees-l279).)
100
100
  - A session cannot ask the human anything: it stops and reports, and the lead brings the question back.
101
101
  - A sealed acceptance test that contradicts its sheet is corrected by the lead with
102
102
  `cadence spec reseal <lot> <test> --reason "…"`, never by editing `acceptation.json`.
package/docs/lead.md CHANGED
@@ -10,7 +10,7 @@ summaries, decides with the human, and leaves the work to fresh short sessions r
10
10
  <img alt="The lead workflow in three lanes (human, lead session, orchestrate program and agents), from the tour of the projects to the close of the session" src="lead-workflow-light.svg">
11
11
  </picture>
12
12
 
13
- Dashed boxes are conditional steps: the precheck runs only for a lot without a commit yet (unless `orchestrate.precheck: false`), and the spec, sheet review and accept steps run only for a `screen: page` lot or a `spec: true` lot. The skill itself is `skills/lead/SKILL.md`; this page is its
13
+ Dashed boxes are conditional steps: the precheck runs only for a lot without a commit yet whose title cites a finding (`constat`, `revue`, `review`, `audit`) or another lot (unless `orchestrate.precheck: false`), and the spec, sheet review and accept steps run only for a `screen: page` lot or a `spec: true` lot. The skill itself is `skills/lead/SKILL.md`; this page is its
14
14
  picture, not its source.
15
15
 
16
16
  ## The steps
@@ -20,9 +20,10 @@ picture, not its source.
20
20
  quick wins. It stops and waits: the human picks the lots and the order (`--priority`, or the
21
21
  `priority:` list of the parent folder's `cadence.yaml`).
22
22
  2. **Wave.** The lead starts `cadence orchestrate <project>:<lot> … --wave <id>` in the background.
23
+ When a lot's title is stale, the lead does not delegate by hand: it passes `--goal "…"` (one lot per launch), or writes a `goal:` key on the lots in the plan (several lots at once) — in the native plan as `goal:`, in a plan kept by another tool (read-only) by mapping its key with `plan.fields: { goal: <their key> }` in `cadence.yaml` — which replaces the title as the objective of the briefs (L258, [orchestrate](orchestrate.md)).
23
24
  For each lot the program runs, in fresh sessions and in this order: `precheck → spec → maquette →
24
- accept → implement → review → ux`. The **precheck** applies to any lot without a commit yet (unless
25
- `orchestrate.precheck: false`). The spec steps exist only for a lot that declares
25
+ accept → implement → review → ux`. The **precheck** applies to a lot without a commit yet whose title cites a finding (`constat`, `revue`, `review`, `audit`) or another lot (unless
26
+ `orchestrate.precheck: false`; L288). The spec steps exist only for a lot that declares
26
27
  a `screen:` of `page` (a visible lot that creates or changes a whole screen; `screen: component` and `screen: journey`
27
28
  lots take the ordinary path, straight to the implementation, unless they already have a sheet) or `spec: true` (a lot without a screen
28
29
  that still has a behaviour to pin down: `precheck → spec → fiche → accept → implement → review`);
@@ -52,7 +53,9 @@ picture, not its source.
52
53
  3. **Relay.** The lead follows the wave's journal (`tail -n +1 -F .cadence/runs/<id>/journal.log`, one
53
54
  line per transition) and tells the human each line in one sentence, with no polling loop. A
54
55
  question from a session comes back to the human at once; the answer goes in with
55
- `cadence orchestrate --resume --answer <project>:<lot> "…"`. The lead never answers in the
56
+ `cadence orchestrate --resume --wave <wave> --answer <project>:<lot> "…"` (the wave is named: the
57
+ command is printed under each question of the table, ready to run; without a wave, `--resume` is refused as
58
+ soon as the folder keeps several unfinished waves). The lead never answers in the
56
59
  human's place. `--drop` and `--stop-after-current` steer a wave that is running.
57
60
  4. **Review.** The final table of the wave lists the lots ready, handed back, and the line
58
61
  « livrable jusqu'à <sha> » for a ready lot stacked under a handed-back one. Minor findings come back in
@@ -62,7 +65,7 @@ picture, not its source.
62
65
  UX reviewer's captures: the lead records `raf ux` on the human's verdict, never on its own — unless the parent folder's `cadence.yaml` says `lead.ux: lead`: then the lead forms the verdict from the reviewer's report and its own look at the captures, and asks the human only at the slightest doubt. Then
63
66
  `raf done`.
64
67
  6. **Delivery.** Push (for a « livrable jusqu'à <sha> », that sha alone, never HEAD), then
65
- `cadence deliver`. After a green delivery that changes what a page shows or what it is served, the
68
+ `cadence deliver`. A lot that turns ready is delivered while the wave runs (`cadence deliver --sha <sha>`, accepted when no commit of the sha belongs to a lot that is not ready), not at the end of the wave. After a green delivery that changes what a page shows or what it is served, the
66
69
  `qa-reviewer` agent walks the delivered pages in a real browser, reads only, and brings its blocking
67
70
  findings to the human. It is not a gate: a finding becomes a new lot.
68
71
  7. **Threshold and chaining.** Before every new wave the lead reads `cadence session context`. Under
@@ -79,9 +82,9 @@ picture, not its source.
79
82
 
80
83
  | Rule | Why |
81
84
  |---|---|
82
- | At most **as many subagents as the session cap** running at once (2 by default; the human sets it with `CADENCE_MAX_SESSIONS`), orchestrate sessions included | `cadence orchestrate --status` and `cadence lead tour` print `créneaux libres : N sur M`, M being the configured cap; the lead never raises `--max-sessions` or `CADENCE_MAX_SESSIONS` itself |
83
- | Never two sessions in the same repository at the same time; the lead does not commit where a wave runs | a wave's lock refuses `cadence deliver` while a lot still works there |
84
- | A locked acceptance test that contradicts the sheet is corrected by the lead with `cadence spec reseal <lot> <test> --reason "…"` (lot in progress, outside a wave; an amended sheet is accepted once committed, every commit that touched it citing the lot, L217, never put it back to the red state; a delivered lot with an unstable test: add `--porteur <lot in progress>`, L212), then `--resume --answer` for a lot in question, or a new `cadence orchestrate <project>:<lot>` for a lot handed back (`--resume` skips it) | never by a session, never by editing `acceptation.json` |
85
+ | At most **as many subagents as the session cap** running at once (2 by default; the human sets it with `CADENCE_MAX_SESSIONS`), orchestrate sessions included | `cadence orchestrate --status` and `cadence lead tour` print `créneaux libres : N sur M`, M being the configured cap and the sessions the lead started by hand (`cadence lead hold`, L255) being subtracted; the lead never raises `--max-sessions` or `CADENCE_MAX_SESSIONS` itself |
86
+ | Never two sessions in the same repository at the same time; the lead does not commit where a wave runs (with `orchestrate.worktrees: true` two lots of one repository play at once, each in its own worktree: not a rule for the lead) | a wave's lock refuses `cadence deliver` while a lot still works there |
87
+ | A locked acceptance test that contradicts the sheet is corrected by the lead with `cadence spec reseal <lot> <test> --reason "…"` (lot in progress, outside a wave and with no wave that is not `done` keeping open a lot of the repository still `doing` in its plan, the resealed lot or another, e.g. a question waiting: `--resume --wave <wave> --answer` or `--drop` first, the one error lists every wave concerned, the live one that holds the lock (to wait for) and the stopped ones, and gives for each stopped wave the single `cd <launch folder> && cadence orchestrate --resume --wave <wave> --drop <project>:<lot> [--drop …]` to run, a `--drop` per open lot of the repository in that wave, the queued ones that are not `doing` in the plan included, since `--resume` would relaunch them and they would take the lock back, L238 L239; an amended sheet is accepted once committed, every commit that touched it citing the lot, L217, never put it back to the red state; a delivered lot with an unstable test: add `--porteur <lot in progress>`, L212), then a new `cadence orchestrate <project>:<lot>` for a lot handed back (`--resume` skips it) | never by a session, never by editing `acceptation.json` |
85
88
  | Deliveries and the `raf ux` / `raf review` verdicts belong to the lead, one project at a time | never to a subagent, never two deliveries in parallel |
86
89
  | The UX verdict is the human's unless `lead.ux: lead` (parent `cadence.yaml`, default `human`) | then the lead decides from the report and the captures, and brings any doubt to the human |
87
90
  | A session cannot ask the human anything | it stops and reports; the lead brings the question back |
@@ -107,33 +110,57 @@ The mechanics around it (the life of a lot in the plan, a lot inside a wave, put
107
110
  [fonctionnement.md](fonctionnement.md). See also the [lead tour](lead.md#lead-tour) section below and the [orchestrate](orchestrate.md#orchestrate)
108
111
  page.
109
112
 
113
+ ## lead hold and release
114
+
115
+ `cadence lead hold <label> [--ttl minutes]` and `cadence lead release <label>` (L255) declare the sessions the lead starts by hand — a fix subagent, a review, a QA pass launched outside an orchestrated wave. No wave carries such a session, so the slot registry could not see it: on 2026-10-23 the lead ran 4 sessions under a cap of 3 while `créneaux libres` said one slot was free. `hold` registers the session under its label for `--ttl` minutes (an integer ≥ 1, 60 by default; holding the same label again renews it instead of counting twice); `release` hands it back (releasing a label that is not held answers `aucune session « <label> » inscrite` and exits 0). A hold whose time has run out stops counting, but is not forgotten: nothing stops the session (L278), so `cadence lead tour` and `cadence orchestrate --status` print `⚠ session du lead échue : <label> (inscrite depuis 5 h 10 min, échue depuis 2 h 10 min) — la reprendre (cadence lead hold <label> --ttl <minutes>) ou l'arrêter (cadence lead release <label>)` after the slots line, and the `cadence-hud` band shows the same ⚠ row, until the lead renews the hold or releases it (an expired hold nobody touched is dropped 24 h after its expiry). The `--ttl` is therefore the maximum duration declared for the session; the `lead` skill says to renew or stop it at each ⚠. The line is not part of `--json`.
116
+
117
+ The held sessions are kept in the `holds/` folder of the cadence home (`CADENCE_HOME`, shared by every folder and every wave). While at least one is held, the line of the live waves of `cadence orchestrate --status` and of `cadence lead tour` gains a segment and subtracts them: `vagues en cours : 1 · sessions en cours : 0 · sessions du lead : 1 (correctif-L12) · créneaux libres : 0 sur 3`. A held session alone is enough to print the line (`vagues en cours : 0`). It is a display, like the rest of the slots line: a hold blocks no session and never raises the cap (a wave that is already running keeps its own slot counting), and the `lead` skill declares every hand-started session with it.
118
+
119
+ ## The librarian by hand
120
+
121
+ For a lot the lead delegated by hand, `raf check` or the `dérive` column of `cadence lead tour` reporting `documentation en retard` is
122
+ handled before the review, as an orchestrated wave does it: the lead hands the project (absolute path) and the lot id to the
123
+ `doc-keeper` agent ([skills](skills.md), [news](news.md#the-librarian-doc-keeper)), in a writing session, or read-only when it
124
+ only wants the list of the documents to change (L306). A document outside the repository is named by the `docs.articles` key
125
+ of the project's `cadence.yaml`, never guessed: the lead reads that key itself and puts its entries in the brief with the absolute path of each repository (the subagent is given read access to it), because the agent examines no outside document the brief does not name. The agent proposes a lot for the plan of that repository, in the `resume` of its
126
+ report, and the lead decides whether to add it (`raf add` in that repository). The agent never writes to that plan.
127
+
110
128
  ## lead tour
111
129
 
112
130
  `cadence lead tour [folder] [--idle 3] [--depth n] [--json]` is the lead's morning table, with no model in
113
131
  the loop. From a parent folder (default: the current one) it takes every direct sub-folder that
114
- holds `docs/plan/raf.yaml`, or a `cadence.yaml` with a `plan:` key (a plan kept by another tool
115
- included), and for each one reads the same facts as `cadence session start` — in-process, no
132
+ holds `.cadence/raf.yaml` or `docs/plan/raf.yaml`, or a `cadence.yaml` with a `plan:` key (a plan kept by another tool
133
+ included; hidden folders, `node_modules` and `tmp/` — throwaway working copies — are skipped), and for each one reads the same facts as `cadence session start` — in-process, no
116
134
  sub-process, no call to `claude` — then prints **one line per project**:
117
135
 
118
136
  ```
119
- alpha · en cours L1 (silencieux 4j) · dérive 1 (✗ L2 a 1 commit(s) mais est encore todo) · notes : finir L1 puis livrer · prochain L3 Typo · dépôt non commité, non poussé
137
+ alpha · en cours L1 (1 commit, silencieux 4j) · dérive 1 (✗ L2 a 1 commit(s) mais est encore todo) · notes : finir L1 puis livrer · prochain L3 Typo · dépôt non commité, non poussé
120
138
  beta · en cours rien · dérive aucune · notes : aucune · prochain T2 Second · dépôt propre
121
139
  ```
122
140
 
123
141
  | Column | Content |
124
142
  |---|---|
125
- | `en cours` | ids of the lots in progress; `(aucune activité)` when it has none at all, `(silencieux Nj)` when the lot's last activity (commit, note or start) is more than `--idle` days old (default 3) |
143
+ | `en cours` | ids of the lots in progress, each with its number of commits (`0 commit` included: a close note on a lot without commit is not « done, `raf done` forgotten »); then `aucune activité` when it has no activity at all, `silencieux Nj` when the lot's last activity (commit, note or start) is more than `--idle` days old (default 3) |
126
144
  | `dérive` | the gaps `raf check` reports (a lot whose commits leave a document behind, [`docs.sync`](news.md#documentation-that-follows-the-code), included), counted and the first two shown |
127
145
  | `notes` | the notes left by the last `session close`, joined with ` / ` and cut at 120 characters |
128
146
  | `prochain` | the first ready lot (quick wins first) — id and title cut at 60 characters; a lot whose [`gate`](raf.md#plan-file) is not met is not ready |
129
147
  | `attend` | only when a lot waits on its `gate`: `attend L190` |
130
148
  | `dépôt` | `non commité` (modified or untracked files), `non poussé` (commits ahead of the upstream), `livraison en cours` (live delivery lock); `propre` otherwise |
131
149
 
150
+ After them, one line per project that does not declare `orchestrate.test` (L327): `alpha · porte de tests absente : orchestrate.test n'est pas déclaré, la vague ne lancera pas la suite (seule la revue le fera si elle le décide) · commande probable : npm test (à déclarer en orchestrate.test)`. The probable command is read from `package.json` (`scripts.test`), `pyproject.toml` (pytest) or `pom.xml` (`mvn test`) and omitted when none exists; the lead declares `test:` and `build:` in that project's `cadence.yaml` after checking the command is green, one config commit per project. `--json`: `noTest: { probable }` on the project's row, absent when the key is declared. Same line in [`orchestrate --dry-run`](orchestrate.md).
151
+
152
+ After the project lines the tour lists the **worktrees kept by waves** (L279, `orchestrate.worktrees: true`, on by default in cadence since L320; [`orchestrate.worktrees`](orchestrate.md#one-worktree-per-lot-orchestrateworktrees-l279)): a title, then one line per kept worktree — repository, lot, age, number of unintegrated commits, path — so that a lot handed back with unintegrated commits is never forgotten; nothing is printed when there is none (`--json`: `worktrees` on the project's row). `cadence orchestrate --status` and the final table of a wave print the same lines; the lead removes one with `cadence orchestrate --remove-worktree <project>:<lot> [--abandon-commits]`.
153
+
132
154
  Before the project lines the tour prints the **perf header** (L227): one line per `⚠` of `cadence perf` for the folder, in the order of `perf`, each ending with its decision and, for a trend, the value of its quality twin (speed and quality side by side); the net-bottleneck `⚠ goulot` line is relayed as is. Nothing is printed when no `⚠` stands, and the output is then the one of a tour without header. The header is read with `perf`'s own reading of the folder (projects up to two levels, whatever `--depth`) and only in the text output: `--json` is unchanged. When `perf` cannot read the folder (no `.cadence/runs`, malformed price grid, unreadable journals or plans) the tour prints no header, reports no perf error and exits 0. The [lead skill](skills.md) reads the header before proposing the three lots and opens an improvement lot only on a trend confirmed on two windows or a net bottleneck.
133
155
 
134
- When an orchestrated wave is live, one more line closes the tour (not part of `--json`): `vagues en cours : 1 · sessions en cours : 0 · créneaux libres : 1 sur 2` — the lead reads the free slots there instead of computing them (L141). The `sur M` is the cap the human set (`CADENCE_MAX_SESSIONS`, 2 by default), not a fixed 2 (L208); an invalid value falls back to 2 in this display.
156
+ When an orchestrated wave is live, one more line closes the tour (not part of `--json`): `vagues en cours : 1 · sessions en cours : 0 · créneaux libres : 1 sur 2` — the lead reads the free slots there instead of computing them (L141). The `sur M` is the cap the human set (`CADENCE_MAX_SESSIONS`, 2 by default), not a fixed 2 (L208); an invalid value falls back to 2 in this display. The sessions held with [`lead hold`](#lead-hold-and-release) are subtracted from the free slots, and one alone is enough to print the line (L255).
157
+
158
+ Next to it, when at least one ready lot is free, a line `prêts, ressources libres : alpha:L3 <title> · beta:L2 <title> (banc)` (L252, GitHub issue #13, 2/3) lists, for every project of the tour, the ready lots (same rule as `next`, minus the ones marked « à décider ») that can start now: a lot is free when none of the resources in its `uses:` (shown in parentheses) is held by a lot `doing` in any project of the tour or in any project that shares its resources (the projects under the folder whose `cadence.yaml` declares `resources:`, walked with that file's `depth:`, one level by default, so `P/x` and `P/grp/alpha` share the `banc` of `P/cadence.yaml` with `depth: 2` wherever the tour is launched from, even from inside one project; with no declared resource, the projects of the parent folder), nor by an unfinished lot of a live wave (a wave's lot is recognised by its repository and its id, not by the project name: a nested project `grp/alpha` matches the wave launched from `grp/` that cites it as `alpha`, and a wave launched from another folder only hides the lots of its own repositories); a lot with no `uses:` holds none and is always free. The line shows at most 3 lots per project, then `alpha +K` for the others. Like the slots line it prints while a wave is live, or as soon as a session is held with `lead hold` (L255); with neither, it stays silent. It is a display: nothing locks, `raf start` and `orchestrate` still start a lot whose resource is taken. `--json` gives the same lots, always, as a `free` array on each project (`id`, `title`, and `uses` when the lot has any; absent when the project has none).
159
+
160
+ The `lead` skill (L253, GitHub issue #13, 3/3) tells the lead to read that line again each time an agent comes back and each time a lot is blocked, before waiting: a lot it lists can start at once, with the free slots line saying a slot is free, instead of waiting behind the blocked one. The line never raises the slot cap.
135
161
 
136
162
  `--json` prints the same content as an array of objects (`project`, `doing`, `drift`, `notes`, `waiting` (only when a lot waits on its `gate`),
163
+ `free` (L252, above),
137
164
  `next`, `repo`, and `error` when the project could not be read), plus `progress` — `{ done, doing, todo, added7 }`,
138
165
  the lots done / in progress / to do (dropped and recurring lots left out) and those created in the last 7 days (L149), which
139
166
  [`cadence-hud`](../plugins/cadence-hud/README.md) draws as one progress bar per project. Projects come in the order of the
package/docs/news.md CHANGED
@@ -150,10 +150,39 @@ to be reported as one **major** finding per line — a stale document is not lef
150
150
  memory of a sentence. Touching a document is what the program checks; whether its text is true is
151
151
  still the review's reading. The commits of neighbouring repositories (`repos:`) are not audited.
152
152
 
153
+ A gap is closed by writing the document, or **acknowledged** when the documents really stay true: `raf docs-ok <lot> --reason "why"` (L317; the reason is required) writes a dated `docs_ok:` key on the lot, which `raf check`, `cadence lead tour` and `cadence orchestrate` all read. There is no silent third way: a lot with an open gap does not end ready in a wave.
154
+
155
+ ### The librarian: `doc-keeper`
156
+
157
+ `docs.sync` says *that* a document is behind; the `doc-keeper` agent (L306, `agents/doc-keeper.md`, generic: it knows no
158
+ folder and no project) says *which* passage and writes it. Given a repository and a lot, it reads the diff of the lot
159
+ (the commits that cite it), draws the map of the project's documents (the `docs.sync` rules, the README, the pages of
160
+ `docs/`, the CHANGELOG, the news entries, the architecture document), lists the documents the change makes false or leaves
161
+ out, then:
162
+
163
+ - **writing session**: updates them and commits with explicit paths and `docs(<lot>): …`;
164
+ - **read-only session** (no write tool, or a brief that says so): changes nothing and lists, document by document, the
165
+ passage to write.
166
+
167
+ **Where it writes** (L326): a lot that changes how the tool works is written in the pages of `docs/`, in full.
168
+ The README is a short home page: it receives only a link to that page, never the detail (an option, a key, a path, a flag).
169
+ The test `readme-accueil` holds the README to that (size, short lines, no detailed option).
170
+
171
+ `cadence orchestrate` calls it by itself when `docs.sync` reports a document behind the commits of the lot, **before the
172
+ review** (see « Librarian before the review » in [orchestrate](orchestrate.md)); the lead calls it by hand otherwise
173
+ ([lead](lead.md)).
174
+
175
+ A document **outside the repository** is the librarian's only when the configuration names it, with the key that already
176
+ names the project's article elsewhere, `docs.articles` (see below; absent by default): « this project is also described
177
+ by this file of that repository ». The librarian reads that file (its repository is opened to the session for reading, and
178
+ the brief gives its absolute path) and, when the change makes it false, **proposes a lot** for the plan of that repository
179
+ (a title, then the file, the passage and the sentence to change) in the `resume` of its report, starting with
180
+ « lot proposé ». It never edits that file and never writes to that plan: the lead decides whether the lot enters it.
181
+
153
182
  ### An article elsewhere that follows the delivery
154
183
 
155
184
  A case study that lives in a neighbouring repository (the project's article on a showcase site) goes stale
156
- the same way. `docs.articles` names it:
185
+ the same way. `docs.articles` names it (`repo` absolute, or relative to the project):
157
186
 
158
187
  ```yaml
159
188
  docs: