@roomi-fields/grillhouse 0.49.0 → 0.50.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 (315) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +38 -0
  3. package/bin/grillhouse.mjs +2 -0
  4. package/cadre/templates/projet/.github/workflows/ci.yml +5 -0
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +6 -4
  6. package/cadre/templates/projet/CLAUDE.md +13 -96
  7. package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
  8. package/charte.md +88 -96
  9. package/dist/temporal/acte.d.ts +9 -0
  10. package/dist/temporal/acte.js +45 -21
  11. package/dist/temporal/acte.js.map +1 -1
  12. package/dist/temporal/circuit/activites.js +2 -1
  13. package/dist/temporal/circuit/activites.js.map +1 -1
  14. package/dist/temporal/circuit/appel.js +2 -2
  15. package/dist/temporal/circuit/appel.js.map +1 -1
  16. package/dist/temporal/circuit/client.d.ts +2 -4
  17. package/dist/temporal/circuit/client.js +5 -8
  18. package/dist/temporal/circuit/client.js.map +1 -1
  19. package/dist/temporal/circuit/commande.js +5 -4
  20. package/dist/temporal/circuit/commande.js.map +1 -1
  21. package/dist/temporal/circuit/contrat.d.ts +3 -3
  22. package/dist/temporal/circuit/contrat.js +2 -2
  23. package/dist/temporal/circuit/contrat.js.map +1 -1
  24. package/dist/temporal/circuit/deroule.js +4 -4
  25. package/dist/temporal/circuit/deroule.js.map +1 -1
  26. package/dist/temporal/commande.js +1 -1
  27. package/dist/temporal/commande.js.map +1 -1
  28. package/dist/temporal/deroules.js +3 -4
  29. package/dist/temporal/deroules.js.map +1 -1
  30. package/dist/temporal/etat.js +1 -1
  31. package/dist/temporal/etat.js.map +1 -1
  32. package/dist/temporal/file/activites.js +2 -1
  33. package/dist/temporal/file/activites.js.map +1 -1
  34. package/dist/temporal/file/client.js.map +1 -1
  35. package/dist/temporal/file/contrat.js +3 -2
  36. package/dist/temporal/file/contrat.js.map +1 -1
  37. package/dist/temporal/file/deroule.js +2 -1
  38. package/dist/temporal/file/deroule.js.map +1 -1
  39. package/dist/temporal/installation.js +2 -0
  40. package/dist/temporal/installation.js.map +1 -1
  41. package/dist/temporal/nuits/activites.js +4 -3
  42. package/dist/temporal/nuits/activites.js.map +1 -1
  43. package/dist/temporal/nuits/appel.js +2 -1
  44. package/dist/temporal/nuits/appel.js.map +1 -1
  45. package/dist/temporal/nuits/choix.js +2 -1
  46. package/dist/temporal/nuits/choix.js.map +1 -1
  47. package/dist/temporal/nuits/client.js +2 -1
  48. package/dist/temporal/nuits/client.js.map +1 -1
  49. package/dist/temporal/nuits/commande.js +2 -1
  50. package/dist/temporal/nuits/commande.js.map +1 -1
  51. package/dist/temporal/nuits/contrat.js +2 -1
  52. package/dist/temporal/nuits/contrat.js.map +1 -1
  53. package/dist/temporal/nuits/deroule.js +2 -1
  54. package/dist/temporal/nuits/deroule.js.map +1 -1
  55. package/dist/temporal/places/activites.js +2 -1
  56. package/dist/temporal/places/activites.js.map +1 -1
  57. package/dist/temporal/places/client.js +1 -0
  58. package/dist/temporal/places/client.js.map +1 -1
  59. package/dist/temporal/places/deroule.js +4 -5
  60. package/dist/temporal/places/deroule.js.map +1 -1
  61. package/dist/temporal/tickets/activites.js +1 -1
  62. package/dist/temporal/tickets/activites.js.map +1 -1
  63. package/dist/temporal/tickets/deroule.js +4 -4
  64. package/dist/temporal/tickets/deroule.js.map +1 -1
  65. package/docs/ARCHITECTURE.md +35 -13
  66. package/docs/CADRE.md +10 -68
  67. package/docs/INTERFACE.md +59 -179
  68. package/docs/architecture/circuit.md +440 -0
  69. package/docs/architecture/entree.md +281 -0
  70. package/docs/architecture/greffon.md +284 -0
  71. package/docs/architecture/installation.md +306 -0
  72. package/docs/architecture/machine.md +383 -0
  73. package/docs/architecture/tests.md +337 -0
  74. package/package.json +1 -1
  75. package/scripts/abi-des-dependances.mjs +2 -1
  76. package/scripts/activites.mjs +8 -8
  77. package/scripts/aiguillage.mjs +4 -4
  78. package/scripts/arbitrages.mjs +1 -1
  79. package/scripts/arbres-juges.mjs +2 -1
  80. package/scripts/attente-de-la-machine.mjs +10 -16
  81. package/scripts/avancement.mjs +2 -0
  82. package/scripts/base-des-workflows.mjs +2 -1
  83. package/scripts/binaires.mjs +2 -1
  84. package/scripts/branche-de-nuit.mjs +2 -1
  85. package/scripts/cadre.mjs +12 -3
  86. package/scripts/ci-de-main.mjs +2 -1
  87. package/scripts/circuit.mjs +101 -618
  88. package/scripts/circuits-cles.mjs +4 -6
  89. package/scripts/circuits-du-serveur.mjs +1 -1
  90. package/scripts/codes-de-sortie.mjs +1 -1
  91. package/scripts/coeurs-dedies.mjs +2 -4
  92. package/scripts/commande-du-langage.mjs +2 -0
  93. package/scripts/commandes-composees.mjs +3 -3
  94. package/scripts/commandes-du-path.mjs +1 -1
  95. package/scripts/composants-affectes.mjs +3 -1
  96. package/scripts/composition-des-langages.mjs +2 -0
  97. package/scripts/conformite.d.ts +2 -1
  98. package/scripts/conformite.mjs +2 -0
  99. package/scripts/consommation-des-passes.mjs +5 -4
  100. package/scripts/consommation.mjs +1 -0
  101. package/scripts/copies-finies.mjs +9 -10
  102. package/scripts/crochets.mjs +2 -1
  103. package/scripts/depart-du-ticket.mjs +2 -2
  104. package/scripts/dependances-internes.mjs +4 -2
  105. package/scripts/dernier-vert.mjs +3 -3
  106. package/scripts/dette.d.ts +2 -1
  107. package/scripts/dette.mjs +2 -0
  108. package/scripts/direct.mjs +2 -1
  109. package/scripts/disque-des-copies.mjs +1 -1
  110. package/scripts/donnees-cles.mjs +2 -0
  111. package/scripts/droits.mjs +12 -10
  112. package/scripts/echantillonneur-de-la-passe.mjs +1 -1
  113. package/scripts/effets.mjs +3 -3
  114. package/scripts/engendres.mjs +1 -1
  115. package/scripts/enveloppe/codes.mjs +1 -0
  116. package/scripts/enveloppe/enveloppe.mjs +113 -89
  117. package/scripts/enveloppe/lancer.sh +5 -3
  118. package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
  119. package/scripts/enveloppe/travail-de-la-copie.mjs +11 -16
  120. package/scripts/etapes.mjs +10 -9
  121. package/scripts/etat-du-depot.mjs +2 -1
  122. package/scripts/faits-du-circuit.mjs +19 -19
  123. package/scripts/fermeture-de-la-machine.mjs +2 -2
  124. package/scripts/fichier-du-poste.mjs +3 -4
  125. package/scripts/fichiers-nommes.mjs +2 -1
  126. package/scripts/file-des-tickets.mjs +3 -1
  127. package/scripts/flux-de-la-nuit.mjs +39 -0
  128. package/scripts/flux-des-paquets.mjs +2 -1
  129. package/scripts/fusion-du-changelog.mjs +2 -1
  130. package/scripts/garde-de-la-memoire.mjs +1 -1
  131. package/scripts/gardes-du-cadre.mjs +2 -0
  132. package/scripts/greffons.mjs +2 -2
  133. package/scripts/grillhouse-maj.mjs +55 -150
  134. package/scripts/groupe-cles.mjs +2 -1
  135. package/scripts/index-interfaces.mjs +2 -0
  136. package/scripts/init.mjs +2 -1
  137. package/scripts/integration/file.mjs +3 -3
  138. package/scripts/integration/integrer.mjs +5 -6
  139. package/scripts/integration/rejeu.mjs +4 -2
  140. package/scripts/integration/verdict.mjs +2 -1
  141. package/scripts/jointure.d.ts +5 -1
  142. package/scripts/journal-des-etats.mjs +2 -2
  143. package/scripts/langages/cargo/binaires.mjs +3 -2
  144. package/scripts/langages/cargo/clippy.mjs +2 -0
  145. package/scripts/langages/cargo/commandes.mjs +72 -17
  146. package/scripts/langages/cargo/composants.mjs +4 -3
  147. package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
  148. package/scripts/langages/cargo/etiquettes.mjs +87 -0
  149. package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
  150. package/scripts/langages/cargo/exemples.mjs +6 -4
  151. package/scripts/langages/cargo/frontieres.mjs +2 -0
  152. package/scripts/langages/cargo/index-interfaces.mjs +2 -0
  153. package/scripts/langages/cargo/index.mjs +8 -9
  154. package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
  155. package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
  156. package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
  157. package/scripts/langages/cargo/sccache.mjs +10 -6
  158. package/scripts/langages/cargo/squelette.mjs +2 -0
  159. package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
  160. package/scripts/langages/cargo/verdict.mjs +8 -6
  161. package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
  162. package/scripts/langages/typescript/code-mort.mjs +2 -1
  163. package/scripts/langages/typescript/composants.mjs +7 -5
  164. package/scripts/langages/typescript/consommateurs-arbitres.mjs +17 -4
  165. package/scripts/langages/typescript/consommateurs.d.ts +2 -1
  166. package/scripts/langages/typescript/consommateurs.mjs +5 -7
  167. package/scripts/langages/typescript/construire.mjs +2 -1
  168. package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
  169. package/scripts/langages/typescript/exemples.mjs +2 -1
  170. package/scripts/langages/typescript/frontieres.mjs +3 -2
  171. package/scripts/langages/typescript/index-interfaces.mjs +3 -2
  172. package/scripts/langages/typescript/index.mjs +3 -2
  173. package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
  174. package/scripts/langages/typescript/lecteurs.mjs +2 -1
  175. package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
  176. package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
  177. package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
  178. package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
  179. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
  180. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
  181. package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
  182. package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
  183. package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
  184. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
  185. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
  186. package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
  187. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
  188. package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
  189. package/scripts/langages/typescript/module-absent.mjs +2 -1
  190. package/scripts/langages/typescript/parcours.mjs +2 -1
  191. package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
  192. package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
  193. package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
  194. package/scripts/langages/typescript/resumes.mjs +2 -1
  195. package/scripts/langages/typescript/squelette.mjs +2 -1
  196. package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
  197. package/scripts/langages/typescript/tests-de-nuit.mjs +12 -5
  198. package/scripts/langages/typescript/tests-du-poste.mjs +60 -21
  199. package/scripts/langages/typescript/tests.mjs +44 -66
  200. package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
  201. package/scripts/langages/typescript/tranches.mjs +2 -1
  202. package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
  203. package/scripts/langages/typescript/verdict.mjs +2 -1
  204. package/scripts/langages/typescript/verifier.mjs +64 -99
  205. package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
  206. package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
  207. package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
  208. package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
  209. package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
  210. package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
  211. package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
  212. package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
  213. package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
  214. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
  215. package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
  216. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
  217. package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
  218. package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
  219. package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
  220. package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
  221. package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
  222. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  223. package/scripts/langages-des-paquets.mjs +3 -1
  224. package/scripts/langages.mjs +5 -3
  225. package/scripts/lecture-unique.mjs +2 -1
  226. package/scripts/lint-des-scripts.mjs +1 -0
  227. package/scripts/machine.mjs +4 -4
  228. package/scripts/matiere-de-test.d.ts +2 -1
  229. package/scripts/matieres-lues.mjs +2 -0
  230. package/scripts/mesure/avancement.mjs +1 -1
  231. package/scripts/mesure/base-de-passe.mjs +10 -13
  232. package/scripts/mesure/pression.mjs +3 -4
  233. package/scripts/mesure-de-la-machine.mjs +2 -1
  234. package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
  235. package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
  236. package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
  237. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
  238. package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
  239. package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
  240. package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
  241. package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
  242. package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
  243. package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
  244. package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
  245. package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
  246. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
  247. package/scripts/migrations/0.33.0-node-26.mjs +5 -8
  248. package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
  249. package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
  250. package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
  251. package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
  252. package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
  253. package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
  254. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
  255. package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
  256. package/scripts/migrations-des-gardes.mjs +2 -0
  257. package/scripts/migrations.mjs +4 -0
  258. package/scripts/nuit.sh +48 -15
  259. package/scripts/outil.mjs +2 -1
  260. package/scripts/outils-cles.mjs +6 -6
  261. package/scripts/paquet-npm.mjs +3 -2
  262. package/scripts/paquet.mjs +3 -4
  263. package/scripts/paquets.d.ts +1 -1
  264. package/scripts/paquets.mjs +2 -0
  265. package/scripts/passe-de-la-machine.mjs +9 -12
  266. package/scripts/places-de-la-machine.mjs +36 -53
  267. package/scripts/places-du-serveur.mjs +5 -4
  268. package/scripts/plafond-de-la-machine.mjs +19 -19
  269. package/scripts/poussee-retiree.mjs +2 -1
  270. package/scripts/prefixe-des-tickets.mjs +1 -0
  271. package/scripts/preparation.mjs +2 -1
  272. package/scripts/recommencer.mjs +2 -2
  273. package/scripts/references-changees.mjs +1 -1
  274. package/scripts/registre-des-resultats.mjs +3 -1
  275. package/scripts/regles-des-places.mjs +4 -6
  276. package/scripts/repli-de-la-nuit.mjs +107 -35
  277. package/scripts/reponses-du-circuit.mjs +4 -3
  278. package/scripts/reprise.mjs +3 -2
  279. package/scripts/resultats.mjs +71 -93
  280. package/scripts/retirer-copie.sh +2 -1
  281. package/scripts/retirer-les-copies-finies.mjs +2 -1
  282. package/scripts/seances.mjs +3 -2
  283. package/scripts/services-du-noyau.mjs +3 -0
  284. package/scripts/session-start.sh +0 -6
  285. package/scripts/sortie.mjs +2 -1
  286. package/scripts/sources.mjs +2 -0
  287. package/scripts/sous-commandes.mjs +2 -1
  288. package/scripts/sous-modules.sh +24 -43
  289. package/scripts/style-a-l-ecriture.mjs +2 -0
  290. package/scripts/tableau-des-composants.mjs +5 -7
  291. package/scripts/tableau.mjs +6 -5
  292. package/scripts/taches-du-graphe.mjs +3 -0
  293. package/scripts/ticket-du-circuit.mjs +1 -1
  294. package/scripts/ticket.mjs +3 -0
  295. package/scripts/transitions.mjs +30 -19
  296. package/scripts/un-commit-par-ticket.mjs +2 -1
  297. package/scripts/verdict-de-la-nuit.mjs +2 -1
  298. package/scripts/verrou-de-fichier.mjs +1 -0
  299. package/scripts/verrous/commande.mjs +2 -1
  300. package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
  301. package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
  302. package/scripts/verrous/verrou.mjs +3 -3
  303. package/scripts/workflows-du-cadre.mjs +2 -1
  304. package/skills/architecte/SKILL.md +203 -0
  305. package/skills/architecte/references/exemple-d-architecture.md +159 -0
  306. package/skills/developpeur/SKILL.md +6 -10
  307. package/skills/explorateur/SKILL.md +1 -1
  308. package/skills/grill/SKILL.md +4 -5
  309. package/skills/grill/references/paquets.md +5 -8
  310. package/skills/pitmaster/SKILL.md +179 -268
  311. package/skills/pitmaster/references/cadre.md +7 -6
  312. package/skills/pitmaster/references/consigne-agent.md +36 -32
  313. package/skills/pitmaster/references/tour.md +2 -2
  314. package/skills/redacteur/references/documents-d-un-composant.md +10 -8
  315. package/skills/testwriter/SKILL.md +8 -11
@@ -1,620 +1,103 @@
1
- // The circuit of one ticket, as a merge request: one author, a series of tests and of code, a CI
2
- // on the whole, a review (grillhouse-3uv.95.6). The plan; one testwriter for the whole ticket, in
3
- // the envelope of every package of its plan, and the proof of the red; one developpeur on the
4
- // whole plan, and its checks; the final pass, then the reviewer, and on its ACCEPTÉ the
5
- // integration, which commits the lot on the ticket's branch and puts that branch in the queue;
6
- // then the queue, which brings it onto main, pushes and reads the CI, and the circuit ends on the
7
- // state of the ticket the queue leaves. No component is a unit of the circuit: every step is one
8
- // for the whole ticket. As a CI applies its rules (retry, regenerate, skip a job without object)
9
- // without asking anyone and calls a person only for what no rule settles (the approval of a
10
- // review), the circuit makes the mechanical gestures itself, with no session (GESTES of
11
- // scripts/etapes.mjs), and every other stop goes up to the supervisor: its state carries the
12
- // question (`question`: the fact, its piece, file:line or command and output, the question, and
13
- // who must answer it, MONTEES of scripts/etapes.mjs). He answers by a command of the circuit,
14
- // `--reprendre` (with `--contexte`) or `--depuis`, `--etendre <paquet>`, or `--arreter`, and
15
- // carries to the owner what is his (`qui` responsable). So the supervisor is woken only by a
16
- // question no rule settles. Witness: BP 320.9, sixteen components played one after the other,
17
- // 118 min of green steps played again, and a finding of the reviewer on `exemplar` lost six times.
1
+ // The circuit of one ticket: the functions of its acts, and the client of its workflow.
2
+ // Mechanism: docs/architecture/circuit.md §3.1, §4, §5; entree.md §5.1.
18
3
  //
19
- // This module is the code of the circuit's acts: the workflow of a ticket under Temporal
20
- // (src/temporal/circuit/deroule.ts) leads the run, and plays each act in a process of its own
21
- // (scripts/faits-du-circuit.mjs), which calls the functions below (the opening, a step of the plan,
22
- // the preparation of a pass, a fact, a stop, the end). The command `npx grillhouse circuit` is the
23
- // client of that workflow (src/temporal/circuit/commande.ts): it puts a ticket in the queue of the
24
- // tickets of the project, answers a stop, or stops the circuit. A question reaches the supervisor by
25
- // the push of the greffon into the queue of its session (`relever`, scripts/superviseur.mjs),
26
- // which reads the server, and the normal end of a circuit is given once by the same push.
27
- //
28
- // The decisions of each step (the step that follows, its attempt, its report, its stop) are the
29
- // functions without input nor output of scripts/transitions.mjs (`transition`, `apresLaPreuve`,
30
- // `arretDuTestwriterSaute`, `arretDuGesteMecanique`…), as a workflow of Temporal decides on the
31
- // results of its activities: the circuit reads the facts they ask for (a session, a pass, a reading
32
- // of the copy) and plays the effects they return (grillhouse-4nr.5).
33
- //
34
- // The circuit decides on structured results only (scripts/resultats.mjs, the one module of their
35
- // formats), as Bazel's Build Event Protocol and the JUnit reports carry the outcome of a build:
36
- // the sheet that ends each session, the summaries of Turborepo, the JSON reports of Vitest and the
37
- // SARIF of the guards. It reads no comment, no answer and no log to decide (a guard holds it:
38
- // tests/unit/circuit-sans-texte-libre.spec.ts); the handovers at the ticket are for the human and
39
- // for the next session of their author, the log for the human. Each header of the log, a step's or
40
- // a session's, dates it in local time with its offset (ISO 8601), one time for the whole log.
4
+ // The workflow of a ticket under Temporal (src/temporal/circuit/deroule.ts) leads the run and plays
5
+ // each act in a process of its own (scripts/faits-du-circuit.mjs), which calls the functions below
6
+ // (the opening, a step of the plan, the preparation of a pass, a fact, a stop, the end). The command
7
+ // `npx grillhouse circuit` is the client of that workflow (src/temporal/circuit/commande.ts): it
8
+ // queues a ticket, answers a stop (`--reprendre` with `--contexte`, `--depuis <testwriter|preuve|
9
+ // developpeur|controles|passe-finale>`, `--etendre <paquet>[,<paquet>…]`) or stops it (`--arreter`).
10
+ // `--depuis` goes with no `--reprendre` and names no component (a second name is a second ticket,
11
+ // exit 2); `--etendre` refuses a package the repository does not hold (exit 2).
41
12
  //
13
+ // Invariants the code holds:
14
+ // - Every step is one for the whole ticket: no component is a unit of the circuit.
15
+ // - The decisions of a step (next step, attempt, report, stop) are the functions without input nor
16
+ // output of scripts/transitions.mjs; the circuit reads the facts they ask for and plays the
17
+ // effects they return.
18
+ // - The circuit decides on structured results only (scripts/resultats.mjs: the sheet that ends each
19
+ // session, the Turborepo summaries, the Vitest JSON reports, the guards' SARIF), never on a
20
+ // comment, an answer or a log (guard: tests/unit/circuit-sans-texte-libre.spec.ts).
42
21
  // - The plan is read in the ticket's title, after its last « — », and the ticket holds its
43
- // « ## Architecture » section, as the launch reads them (scripts/depart-du-ticket.mjs): the launch
44
- // refuses a ticket that does not, by its name, before any work (`npx grillhouse circuit`), and
45
- // the opening of each act reads its plan the same way.
46
- // - Before the testwriter (a run that starts there), the plan (step 1 of scripts/etapes.mjs), as
47
- // an RFC: its author writes it after surveying what exists, a review reads it once, the author
48
- // answers once, and what stays open goes to who decides. One session of the explorateur out of
49
- // the envelope, on Sonnet, its instruction from the sixth template (the ticket, its title,
50
- // description and notes, the context), writes the plan in its sheet: its criteria, the packages
51
- // to touch, and its open questions, each with why it goes up (its motif: the language, the
52
- // architecture, a gap to the reference, or no answer) and its piece; it surveys the components the ticket
53
- // reaches by `npx grillhouse composants-affectes <ticket>` (scripts/composants-affectes.mjs),
54
- // which the circuit plays no more as a step. A package the repository does not hold, one named
55
- // twice, or a component of the survey of the plan (`releve`, which the circuit plays with no
56
- // session to check the sheet) that the sheet neither puts in its packages nor sets apart with
57
- // its reason (`ecartes`, written at the ticket) makes the sheet out of conformity; so does a
58
- // component the title named before the plan, the root (« . ») included, that the sheet neither
59
- // keeps nor sets apart with its reason. The circuit
60
- // writes the plan at the ticket (`bd update --title -d`): the packages end its title, the list the envelope of every later
61
- // session writes; the criteria already written stay as they are, the owner's decision, and the
62
- // criteria of the sheet, those the plan adds, follow them, numbered after them (a change or a
63
- // removal of a criterion written is an open question of the sheet); the open questions a section
64
- // « Questions ouvertes » after them. Each writing starts again from the description before the
65
- // plan. Then one session of the questionneur out of the envelope, read-only (no tool of
66
- // writing, every write of bd refused, scripts/droits.mjs), as Amazon's bar raiser, a cockpit's
67
- // challenge and response and the devil's advocate of a design review, its instruction from the
68
- // fifth template (the proposal, the métacadre, the rubrics « Comment on arbitre » and « Ce qui
69
- // monte au superviseur » of the project's CLAUDE.md, the ticket's description; no list of
70
- // questions), reads the plan once: its sheet `issue` QUESTIONS (each question with what it aims
71
- // at), AUCUNE or DÉSACCORD. On its questions, its disagreement as one, the explorateur's session
72
- // is resumed once, its instruction from the seventh template (the numbered questions): its sheet
73
- // answers each question, CHANGE (what the plan becomes) or GARDE (why it stays), and carries the
74
- // plan as it becomes, which the circuit writes at the ticket again. A sheet without a line of
75
- // `reponses` by question put (`reponsesAuxQuestions` of scripts/resultats.mjs) is refused and
76
- // asked again once of the same session, the numbers that lack named; only after that resumption
77
- // does a question without its line stay open. The exchange is written at
78
- // the ticket (`Circuit · plan : …`, `Circuit · questionnement : …`) and its end kept with the
79
- // circuit's results (`questionnement`: objet, the questions asked, `questions`, change, issue,
80
- // ouvertes, the plan's fingerprint). What stays open (the plan's own questions, and each
81
- // question the explorateur leaves without an answer) stops at « questionnement », the open questions as its piece, a
82
- // question for the supervisor: he changes the plan (`bd update`) or keeps it, then
83
- // `--reprendre` lets the plan pass as it is then, from the testwriter. Nothing open, the plan
84
- // passes (`plan`, its fingerprint: its title and its criteria); a plan that passed, its title
85
- // and criteria unchanged since, passes with no session, whatever else of its description
86
- // changed.
87
- // - The sheet of the plan names what a component publishes to another (`noms_publies`: the
88
- // provider, each consumer, its names), which the circuit writes in the description (« ## Noms
89
- // publiés », after the sort), written again at each plan from the explorateur's last sheet (an
90
- // empty list erases it, a sheet without the field keeps the section the description holds), as
91
- // a code owner's approval covers what it reviewed: the guard of the consumers
92
- // (scripts/langages/typescript/consommateurs-arbitres.mjs) reads that section, and a lot that
93
- // adds those names to the provider's « Consommateurs » lines passes it with no arbitrage
94
- // (grillhouse-la3, BPScript 320.14.2.10: a criterion alone named them, the guard refused the
95
- // lot, and the supervisor wrote the section by hand before a new session).
96
- // - The sheet of the plan says the sort of the ticket (`sorte`, read by `sorteDuPlan` of
97
- // scripts/resultats.mjs, from the explorateur's last sheet of the plan), which the circuit
98
- // writes in the description (« ## Sorte », after the criteria) and at the ticket with the plan:
99
- // mechanical, a gesture without new behaviour, with its reason and the command that makes it;
100
- // comportement, with its reason and its field `comportement` (changé, tests-adaptés, or
101
- // inchangé for a gesture written by hand); absent or unreadable, comportement, the whole circuit (grillhouse-sos, BPScript
102
- // 320.16: 38 tools moved by mv through the testwriter and the developpeur, 117 comments). As
103
- // Google's large-scale changes (Rosie, ClangMR) let a tool make the change that a verification
104
- // and a review judge, with no new test, a mechanical ticket (`cheminMecanique`: no `--depuis`,
105
- // no testwriter nor developpeur since the plan) skips the testwriter, the proof and the
106
- // developpeur, the gesture `mecanique`: at 1.1 one session of the explorateur in the envelope
107
- // of the plan (lancer.sh `--fiche geste`, its sheet the schema `geste`, its instruction the
108
- // ninth template) plays in the copy the command the plan names; its BLOQUÉ or BESOIN goes up as
109
- // any agent's, and a copy that then holds no change of the plan stops at « sans-livraison ». A
110
- // `--reprendre` at 1.1 whose copy already holds a change of the plan (the supervisor played the
111
- // command himself) plays no session. Then the checks, the final pass, the review and the
112
- // integration, as for any lot; a red of the checks or of the final pass that no regeneration
113
- // lifts stops at « controles », and a RENDU at « relecture-arret » (`arretDuGesteMecanique`),
114
- // a question for the supervisor, who has the lot corrected (`--depuis developpeur`) or stops.
115
- // - Each session is a launch of scripts/enveloppe/lancer.sh, a child process the circuit waits
116
- // for, in its own process group, its errors written to a file: a session outlives the death of
117
- // its circuit, and the state names its group while it runs. Its plan, the packages it writes (`--paquets`, the envelope's list), is the plan of the
118
- // ticket, the whole copy in sight, the session at the root (`.`); lancer.sh builds the packages
119
- // of the plan and what they read before it opens. A session its lock stops on a write out of
120
- // the plan ends the circuit at « hors-plan », a question for the supervisor, the write as its
121
- // piece. The instruction is written from the first template of
122
- // mods/grillhouse/skills/pitmaster/references/consigne-agent.md, each `{{champ}}` filled: the
123
- // ticket and its subject, its plan, the ticket's description (its criteria) and its notes (a
124
- // section absent without notes), both read with `bd show` at the session's launch, the report of
125
- // the step before (the proof, the reds of a check), the findings of the reviewer still open, the
126
- // last handover of the session's author at the ticket, for a developpeur without one yet the last
127
- // of the testwriter, else « aucune » (no verdict), the text of `--contexte` at its head, as its
128
- // task (`tache`), for each agent of the run, and the references 4.2 regenerates, each with its
129
- // files (`lesReferences`), so that no session stops on what the circuit writes itself (BP
130
- // 320.8: a developpeur, code and tests green, stopped on a ceiling, the debt and the index).
131
- // The session's own exit code is the one lancer.sh
132
- // writes to `.claude/worktrees/<ticket>.travail/seances/<id>/fin`, under the session's id
133
- // (`rangDeLaSeance` of scripts/seances.mjs); a launch that leaves none stopped before its
134
- // session.
135
- // - Each session of the explorateur, the questionneur, the testwriter, the developpeur and the
136
- // reviewer ends on its sheet (« la fiche »): claude runs with `--output-format json --json-schema
137
- // <the schema of its role>` (scripts/resultats.mjs), and its JSON result carries the sheet in
138
- // `structured_output`, which the circuit reads (`lireFiche`), each file piece of it checked in
139
- // the copy (a piece not found refuses the sheet, asked again once like any other lack):
140
- // lancer.sh writes that result to
141
- // `.claude/worktrees/<ticket>.travail/seances/<id>/resultat.json`, and a session out of the
142
- // envelope prints it there, its exit code beside. Each
143
- // sheet read is kept with the ticket's sheets, `.claude/worktrees/<ticket>.fiches.jsonl` (`{
144
- // date, role, fiche }`, the lot a review read joined to its sheet, `lot`), beside the circuit's
145
- // own results: the report of each proof and check, which the reviewer receives, with its outcome
146
- // (`resultat`), each stop (`arret`), each developpeur session that changed no file of the plan
147
- // and goes to the checks or stops at « sans-livraison » (`inchange`), each session launched
148
- // (`lancement`, its role and its session id), each end of a run on a question (`montee`: its
149
- // code, its stop and the supervisor's session that ran it, `superviseur`, the session the
150
- // entry of the workflow carries, `ctx.superviseur`), which the bilan reads; and each
151
- // of its discoveries (`decouvertes`) filed closed under the ticket (scripts/ticket.mjs, label
152
- // `decouverte`). A session that ends without a sheet that conforms (none, one out of its schema,
153
- // a code other than 0) is resumed once, the same session, with the third template, which names
154
- // what lacks; a second one stops the circuit at « sans-fiche ». The handover at the ticket (`bd
155
- // comments add`) stays, for the human.
156
- // - A fresh session of the testwriter or the developpeur opens under a session id the circuit sets
157
- // (`lancer.sh --seance <uuid>`, claude's `--session-id`), kept in the state (`reprise`, its
158
- // author and id). A relaunch of that agent (the testwriter after a failed proof, the developpeur
159
- // after red checks) resumes that session (`lancer.sh --reprise <id>`, claude's `--resume`, which
160
- // finds its transcript in the copy's folder of transcripts, which the envelope mounts in writing
161
- // over the real one) with the fourth template of consigne-agent.md (the ticket, its plan, what
162
- // changed, the new report, the findings still open), save the last attempt (the testwriter's
163
- // third session, the developpeur's on the strong model), a fresh and whole session. A resumption
164
- // that ends with a code other than 0, or without a sheet that conforms, writes so at the ticket
165
- // and falls back on a fresh and whole session. A resumed session keeps its id, and so its one
166
- // line in the register, its latest end.
167
- // - A session whose transcripts (`~/.claude/projects/<copy in dashes>/`, as scripts/registre.mjs
168
- // reads them) and log (its preparation writes there before the session opens) stand still for
169
- // 20 minutes (IMMOBILE_MS; GRILLHOUSE_CIRCUIT_IMMOBILE_MS replaces it, in milliseconds) is
170
- // stopped: SIGTERM, then SIGKILL, to the launcher's group.
171
- // - Each comment at the ticket carries its author, which bd reads in BEADS_ACTOR (ACTEUR): each
172
- // session runs with the author of its role (`testwriter`, `developpeur`, `explorateur`,
173
- // `questionneur`, `relecteur`), which the envelope passes on; the circuit writes its own lines
174
- // under `circuit` and the reviewer's verdict under `relecteur`, and the queue writes under `file`
175
- // (`AUTEUR_DE_LA_FILE` of scripts/integration/file.mjs), whose last word the circuit names. The rights of every session
176
- // refuse bd's `--actor`, `-a`/`--author` and the variable itself (AUTEUR_FIXE of
177
- // scripts/droits.mjs, in the settings of every role's session), so that no agent changes its
178
- // author.
179
- // - The sheet of the testwriter and of the developpeur carries its status (`statut`): FAIT goes on as
180
- // below; BESOIN (its `question`) stops the circuit at once at « besoin », the question and the
181
- // handover as its report, with no session more; so does BLOQUÉ (its `raison`), at
182
- // « hors-portee », save for a developpeur whose sheet sends the red to the testwriter (`renvoi`,
183
- // below), which is that sending. Either stop goes up to the supervisor, the sheet's `piece` as
184
- // its piece. A developpeur's FAIT that names criteria it does not hold out of the plan
185
- // (`hors_plan`) stops at « hors-portee » too, at 3 Code, as a required check keeps a merge from
186
- // a change that does not pass it: the question names each criterion and its package, the
187
- // supervisor answers `--etendre <paquet>`, or amends the criterion and `--reprendre` (BP 320.17:
188
- // « critère 10 hors plan, non fait » in three handovers fell at the review).
189
- // - A plan that carries no test (sansTests: in a repository of packages, no package that plays
190
- // tests, as the module of language answers (`joueDesTests`), lies in a path of the plan or holds
191
- // it, as `npm test -- <chemin>` refuses a path out of every package or in a package without
192
- // tests) skips the testwriter and the proof:
193
- // the circuit writes `Circuit · testwriter : aucun test …` at the ticket and launches the
194
- // developpeur, the reason as his report, then his checks.
195
- // - Each command of the proof and of the checks runs with its own results directory
196
- // (`GRILLHOUSE_RESULTATS`), where Turborepo writes its summary (scripts/langages/typescript/tests.mjs,
197
- // scripts/langages/typescript/verifier.mjs), Vitest its JSON report (scripts/langages/typescript/vitest-config/resultats.mjs) and each
198
- // guard its SARIF; its output goes to the log, for the human. Each `npm test` of them carries
199
- // the mark `GRILLHOUSE_DEPUIS_LE_VERT` (scripts/dernier-vert.mjs): in a package named whole,
200
- // the tests that play are those Vitest relates to the files changed since the last green of the
201
- // copy's branch (main's while the copy has none), the files named among them, as `npm run
202
- // verifier` measures itself; a lot that changes one test plays that test, and those whose graph
203
- // it reaches.
204
- // - Each automatic pass (each command of the proof and of the checks, the final pass, the
205
- // integration and the queue) plays under a progress directory of its own
206
- // (`GRILLHOUSE_AVANCEMENT`, scripts/avancement.mjs), in its working directory while it plays
207
- // (`<copie>.travail/avancement-*`), as Bazel counts its actions: Vitest writes
208
- // there the files done and planned of each task, the queue the steps of its CI; the board shows
209
- // them on the ticket's line (scripts/tableau.mjs). Its total is kept at its end under its kind
210
- // (the step and the command), which the next pass of that kind takes while all its tasks have
211
- // not started.
212
- // - The proof of the red plays the new tests alone, as test-driven development runs the test it
213
- // has just written to see it red, not the whole suite: one run per package, `npm test -- --force
214
- // <files>` in the copy, the test files the testwriter's lot adds or changes (git status of the
215
- // copy, the testwriter's files as the integration shares them, `estUnTest`), played for real,
216
- // since a run replayed from Turborepo's cache writes no report; the other tests of the plan play
217
- // at its checks and at the final pass. With no file of the lot (a reader whose provider changed a
218
- // type, no new test to write), each package of the plan that plays tests (`joueDesTests`) plays
219
- // whole, `npm test -- <package>`: main is green, so a test HEAD holds that
220
- // turns red in the copy is a regression of the lot, a red, written `rouge existant : <file> ›
221
- // <name> — <message>`, and so is a file that does not load while no build of the plan fails (it
222
- // loaded at HEAD); its greens do not count. A measure on the same tree is not played again, as
223
- // Turborepo replays a task whose inputs did not move: a testwriter relaunched who changes no file
224
- // of the copy (an expected green added to his sheet alone) is judged on the results of the proof
225
- // already played, his sheet read again. A file of the lot that does not load proves nothing; a
226
- // failed build of a package of the plan (a task `<package>#build` of the summary) is a red, as
227
- // not compiling is failing, named with its log, and the files it keeps from loading play at the
228
- // checks, after the developpeur; a failed build of a package out of the plan leaves them broken.
229
- // Only a test that carries the ticket's work turns red first: the sheet of the testwriter names
230
- // those in `portent_le_travail` (`fichier` from the root, `test` its full name or its title, or
231
- // none for every test of the file). A green test the sheet names is a defect of the proof, named
232
- // in the report; a green test it does not name is accepted with no reason, counted and listed
233
- // under « Verts non nommés ». A green test main already holds has nothing to prove: the registry
234
- // of results (scripts/registre-des-resultats.mjs), written by the last complete green pass of
235
- // main, holds the passed tests of each file by their full name; a green test of the lot whose
236
- // full name the registry holds for its file is set aside, counted, as main stays green; a body
237
- // changed under the same name is not told apart. The proof passes with a red (of the lot, existing or of a build), even without
238
- // a file of the lot: a testwriter with no new test to write says so in his handover, the existing
239
- // reds are enough. Under a plan « comportement changé » it fails without a red, with a broken file
240
- // of the lot, or with a green the sheet names; under a plan « comportement
241
- // tests-adaptés », nothing has to turn red and every green passes, so only a broken
242
- // file fails it (`preuveReussie`). A failed proof relaunches the
243
- // testwriter with its report, twice at most. A proof whose pass is at 75 (« à repasser ») proved
244
- // nothing: neither passed nor failed, it counts no file and relaunches no testwriter, and the
245
- // circuit stops at « a-repasser » as on a check, its report naming the wait of the machine. The report (reds, justified greens) is written at
246
- // the ticket. A proof with a red launches the developpeur, and so does a proof without a red
247
- // when a finding of the reviewer still open names him, or under a plan « comportement tests-adaptés »,
248
- // whose lot has code to write though nothing turns red; else it skips him (`apresLaPreuve`): the
249
- // lot is a lot of tests alone, and the checks and the review judge it with no session of the
250
- // developpeur.
251
- // - A developpeur is launched on a red, of a proof or of a check, on a finding of the reviewer, or
252
- // on a plan without tests: a session that changes no file of the plan (`git status --porcelain`
253
- // of its paths and the content of each file it lists, taken before and after the session; the
254
- // sheet and the handover do not count) has nothing to deliver, the gesture `rien-a-livrer`, as a
255
- // CI skips a job without object: the checks judge the lot; green, the run goes on; red, the
256
- // circuit stops at « sans-livraison », its report sending to the developpeur's handover; but the
257
- // red of a reference the lot lowers, the debt of the guards (its notes `a-elaguer`), is
258
- // regenerated (4.2) instead of stopping, and the checks of the plan play again on the
259
- // regenerated tree. A
260
- // developpeur that `--depuis developpeur` launches on the lot the integration refused (`refus`,
261
- // the fingerprint of its plan), as a merge queue lets a lot it sends back pass again only with a
262
- // change, a session that changes nothing does not go to the checks of the copy, which do not see
263
- // that red: the developpeur is relaunched once with the refusal, then the
264
- // circuit stops at « sans-livraison », the refusal as its piece (BP 320.37: three times FAIT
265
- // without a file changed, the checks of the copy green, the integration red on the same lot).
266
- // - A sheet of the developpeur whose `renvoi` names the testwriter says the red that remains lies
267
- // in the tests of the lot: the gesture `renvoi-au-testwriter`, whether or not the session
268
- // changed a file: the testwriter, the sending and the handover as his report, with the red
269
- // output of the last checks when checks ran since his session, as a CI hands back the log of
270
- // the check that fails, then the proof and the developpeur. The same sending twice in a row on
271
- // the same red output of the checks (none, or the same), with no green checks between them,
272
- // stops at « sans-livraison »: a round trip without a new fact; a sending on another red output
273
- // relaunches the testwriter (BP 320.37: a first sending before any check, a second after checks
274
- // that named the guard's line). That output is kept in the state (`controlesRouges`), so that a
275
- // `--reprendre` or a `--depuis` keeps it.
276
- // - Before the checks and before the final pass (SUR_LA_POINTE), a resumption included, the copy is
277
- // prepared on the tip of main by the launcher's own preparation (`avantLaPasse`,
278
- // scripts/enveloppe/travail-de-la-copie.mjs `preparer`: the guard of its submodules, its
279
- // advance, the pose of its submodules, their mount, the installation when the lock file is newer
280
- // than it), as a merge queue plays its checks on the branch set on the tip of main: a copy at the
281
- // tip or ahead of it is not moved; a copy that moves plays the pass due on its new tree, without
282
- // the restriction of a regeneration before it; a preparation that fails (an advance in conflict
283
- // or impossible, a branch gone from main, a lot waiting in the copy's git directory, a submodule
284
- // or an installation that fails) stops at « lancement », the copy, each file in conflict and the
285
- // gesture that resumes named, the work left in the copy (OSC Bridge SH-cgi.8.2: a final pass and
286
- // its resumption red on two reds main had lifted, the copy still on its base of origin).
287
- // - The checks after the developpeur judge the plan, as Bazel plays the targets of a change: `npm
288
- // test -- <package>` for each package of the plan, touched by the lot or not (a package that plays no
289
- // tests, `joueDesTests`, plays only when the lot touches it), `npm test -- <test files of the lot>`
290
- // that none of them holds, each test played once, then the build of what the guard tasks wait for in
291
- // the graph (`npm exec --no -- grillhouse construire --gardes`, scripts/taches-du-graphe.mjs: a guard
292
- // never plays before the build of what it reads), then the guards in the envelope of the plan
293
- // (`GRILLHOUSE_ENVELOPPE=<plan> npm run grillhouse:gardes`, and `npm run gardes` when the project has it). Each red is read in the
294
- // results of its command: a failed test of the reports of Vitest, a finding of level error of
295
- // the guards' SARIF, a failed build or task of the summary; a red check none of them situates is
296
- // one red of the command. As SARIF 2.1.0 and GitHub code scanning, a warning or a note shows
297
- // without failing: the report of the checks lists them apart, under their own title, and gives
298
- // them to no developpeur; a guards' task red without a finding of level error keeps its line of
299
- // a red task, with its log (BPScript 320.17: 8 warnings on the code of the plan, given as reds,
300
- // stopped at « sans-livraison » a lot whose one error was the ceiling's, to regenerate). A red a path of the plan holds is the developpeur's; the others (one without a
301
- // file, the root's or a project's guard without SARIF, in a package out of the plan, or a red of
302
- // a reference, which its regeneration lifts) wait for the final pass. Green,
303
- // the checks lead to the final pass.
304
- // - The final pass: `npm run verifier`, what the integration plays, as bors plays on a lot the
305
- // very check of the merge. Turborepo's cache and the last green hold its cost: a task nothing
306
- // moved replays from it, and in a package that plays again, the tests Vitest relates to the files
307
- // changed since the last green of the copy (scripts/dernier-vert.mjs, main's while the copy has
308
- // none); what the lot reaches plays again, by the dependencies, the inputs of the tasks and
309
- // `grillhouse.lit` (a reader out of the plan whose tests read a directory the lot changes
310
- // included). The final pass always plays the band of the lot, never the whole repository, as
311
- // Bazel and Nx `affected` play the reverse-dependency closure of a change
312
- // (`laPasseFinale`): the circuit keeps the copy as it stands as a commit on the copy's HEAD,
313
- // the base of the lot, and plays `npm run verifier --
314
- // --filter=...[<base>...<copie>] --filter=//`, the root's tasks (the guards) with them; the
315
- // complete one is the night's and the integration's. The final pass green on the band marks its lot verified (`verifie`, the tree it played, read as a mark of that green pass, never re-hashed and compared — a non-deterministic build artifact of the copy would change it between the pass and the review). A red of a package of the plan goes to the
316
- // developpeur, three sessions for the final pass, counted apart from those of the checks, the
317
- // third on the strong model. A red in a package out of the plan, or that no package of the plan
318
- // holds, stops at « controles », a question for the supervisor: he extends the plan to that
319
- // package (`--etendre`), or has the lot corrected (`--depuis developpeur`). A developpeur whose
320
- // reds are all findings to settle (`a-arbitrer`) is not launched: the circuit stops at
321
- // « controles », each finding as its piece.
322
- // - The regeneration of the references (step 4.2 of scripts/etapes.mjs), as Bazel's genrules,
323
- // `--update-snapshots`, `rustc --bless` and `cargo insta accept`: a generated file is written
324
- // again by its command, then the circuit replays only what depends on it. A project declares in
325
- // its package.json the references it derives from the whole copy, which no envelope shows (a
326
- // fingerprint of its output, a ceiling of a count), `grillhouse.references`: each `{ nom,
327
- // commande, fichiers, tests, gardes }`, its name, the shell command that writes it again from the
328
- // root of the copy, the files it writes (paths, directories or glob patterns, `*` and `**`, from
329
- // the root, as the inputs of Turborepo), the test files that judge it, as `rustc --bless` ties a
330
- // test to its expected outputs, `lit`, the files it reads that another reference writes, and the
331
- // guards of the project that judge it, by the name their SARIF finding carries (its guard or its
332
- // rule). The generated files it keeps committed, `grillhouse.engendres` (scripts/engendres.mjs,
333
- // read from the main tree at the launch, a faulty key the stop « lancement »), follow as
334
- // references written in full, which the integration regenerates instead of merging them. The
335
- // frame's references follow in every project (`referencesDuCadre`): the files the
336
- // frame generates, each judged by a guard of the frame, by the names its findings carry (the
337
- // index of the interfaces, which reads the interfaces, the turbo.json of the packages, the API
338
- // reports, which write the generated part of the interfaces), and the known debt of the guards;
339
- // a reference of the project whose first file is one of theirs replaces it. A final pass with a red of a reference (a failed test of one of
340
- // their test files, a finding of one of their guards, or a failed test or a finding on a file a
341
- // reference of the project covers), mixed with other reds or not, or a
342
- // guard's note of a key of the debt inscribed above what it finds (`a-elaguer`, the pass green
343
- // or not), sends no developpeur: the gesture `regeneration`, once for that pass. A finding of a
344
- // guard of a reference of the project on a file of the plan its files do not cover is no output
345
- // it generates but the code of the lot, the developpeur's, at the checks of the plan as at the
346
- // final pass, as `--update-snapshots` leaves every failure but the snapshots to its owner; its
347
- // finding without a file, or on a file the reference covers, stays the regeneration's (BPScript
348
- // 320.10: a word of library written in 030-binder, sent to no developpeur). Checks of the
349
- // plan with a red of a reference, mixed with other reds or not, call for it too, before any red
350
- // goes to the developpeur, as Bazel builds a genrule before the tests that read it: beside
351
- // other reds, the checks of the plan play again on the regenerated tree, which judges a test
352
- // that reads the reference (BPScript 320.6.5: a test that reads the hash the turbo.json declare,
353
- // red beside their guard, went to a developpeur who had nothing to deliver, then could not write
354
- // them); alone, the final pass that is due plays once, on the regenerated tree. Neither
355
- // regenerates again a reference regenerated on that same tree (BPScript 320.3.9: the ceiling of
356
- // the words, red at the checks, left to the final pass, which played the same tests again on
357
- // the same tree for 6.1 min before regenerating). The circuit
358
- // keeps the copy as a lot, runs the command of each reference concerned on the whole copy (the
359
- // debt lowered from the notes of the pass, its guards not played again), out of the envelope,
360
- // under the lock of the machine, its output added to the log, then, as make remakes the targets
361
- // that depend on an output, the command of each reference that reads a file one has just
362
- // written, after it (the index after the API reports), keeps the copy again on that lot, then plays the final pass restricted to what the regeneration changed and its
363
- // dependents (`--filter=...[<avant>...<après>] --filter=//`); each red of the pass before in a
364
- // package that pass does not play again stands, and a regeneration that changes nothing plays no
365
- // pass, every red of the pass before standing. What remains goes each to its owner, as any red
366
- // of the final pass; a ceiling never rises (its command lowers it), so a lot beyond it stays red.
367
- // That pass green keeps its tree as verified. The files regenerated stay in
368
- // the copy: the lot carries them, without a word of the plan, as a genrule writes its output,
369
- // and the reviewer reads them with the rest of the lot, the step's report among the circuit's. A
370
- // file changed that the files of no reference run cover, or a command that fails stops at
371
- // « references » (23): a command of
372
- // the project at a code other than 0, one of the frame on a real failure alone (not found, killed
373
- // by a signal), since its code also judges the reds it leaves (`npm run api` refuses beside
374
- // them), which the pass that follows judges. The stop leaves the copy restored as it was before
375
- // the regeneration, a question for the supervisor that carries each deviation (the command and
376
- // its code, the file), as the comment at the ticket does; the state keeps the references to regenerate and the reds of the
377
- // pass before (`aRegenerer`), for a regeneration resumed. A command of the project that refuses
378
- // (no real failure), its only deviation, after a pass (the checks of the plan or the final pass) that carries reds of the plan,
379
- // judges the lot, as a ceiling refuses a lot beyond it: the copy restored, those reds go to the
380
- // developpeur with the end of its output, within his sessions, then that pass again.
381
- // - The proof, the checks and the final pass each take their part of the budget of the machine
382
- // (scripts/passe-de-la-machine.mjs), shared by every repository of the machine, and wait, the
383
- // wait written to the log, while the parts held leave too little; the wait bounded, the pass is
384
- // at 75, « à repasser ». The pass names itself in the file of its part, its ticket and its
385
- // step's title, and its progress while it holds it, which the board of every project shows.
386
- // - The report a developpeur receives names his reds first, each on its line (test or finding,
387
- // file and line, message, the beginning of a failed build's own log), then the count of the
388
- // others and the path of the log; the report of a stop names every red with its package.
389
- // - A check at 75 (« à repasser ») out of the final pass plays once more, the gesture `rejeu`;
390
- // the 75 of verifier, the final pass's, is final (its wait for the lock of the machine reached
391
- // its bound). A check still at 75, or a proof at 75, ends the circuit at 75, the gesture `a-repasser`. A red relaunches the developpeur
392
- // with its report, twice at most, the third session on the strong model (`lancer.sh --modele
393
- // opus`; the other sessions name `sonnet`, and none fixes the effort): three sessions for the checks, and three for the final pass.
394
- // - After the final pass, green, the reviewer: a session out of the envelope, which sees the whole
395
- // repository with its index, claude itself (`claude -p --agent relecteur --session-id <uuid>`,
396
- // CLAUDE_BIN replaces claude) in the ticket's copy, on Sonnet, under the rights and the
397
- // context of its role (scripts/droits.mjs: the commands its skill names, its index), its instruction from the second template of
398
- // consigne-agent.md: the ticket, its plan, the path of the claims file (the ticket's
399
- // description as `bd show` gives it at the session's launch, written by the circuit in its
400
- // working folder, which the session may read; the instruction carries no criteria, which the
401
- // reviewer's skill reads only after its first passes), the files of the lot (the testwriter's by
402
- // `estUnTest`, then the others), the elements of the lot (scripts/langages/typescript/elements-du-lot.mjs: each
403
- // function, class, type, interface, constant at the top and export the lot adds, changes or
404
- // removes against the copy's HEAD, its package, its place, whether its package exports it) and
405
- // the circuit's reports since its last sheet (its proofs and checks). Its errors go to the log
406
- // under its header line, its line to the register (scripts/registre.mjs --copie), and it is
407
- // watched as a session in the envelope is. Its sheet is its verdict (`verdict` ACCEPTÉ or RENDU,
408
- // its `conformite`, one line per element of the lot, conforming or not, with the rule it cites
409
- // and its piece, its `constats`, each with its piece, `bloquant` with the criterion or rule it
410
- // holds, or `remarque`, its `question` with its piece, `ecarts`): a sheet without a line for each element is out of
411
- // conformity (`conformiteDuLot` of scripts/resultats.mjs), and a « non » is a blocking finding
412
- // for its agent. In a bounded review, each element of the list is marked: to judge again
413
- // when the difference between the two lots touches it, else taken up with its line of the
414
- // review before. The circuit writes it at the ticket for the human, under the author
415
- // `relecteur`, its first word the verdict, each blocking finding under its heading with its
416
- // agent, then the conformity and the remarks (`texteDuVerdict`).
417
- // - A sheet of the reviewer with a `question` (what goes up to the owner, a real word of the
418
- // language written in the code) stops the circuit at « besoin », whatever its verdict, before
419
- // it commits or relaunches anyone, the question and the verdict as its report, a question the
420
- // owner must answer (`qui` responsable), which the supervisor carries.
421
- // - RENDU: the blocking findings alone send the lot back, a remark reaching only the ticket (a
422
- // verdict without a blocking finding is ACCEPTÉ, the sheet's schema refusing any other). Each
423
- // blocking finding names its agent, `role` testwriter or developpeur. A finding stays open, kept
424
- // in the state (`constats`), across every relaunch, a stop, `--reprendre`, `--depuis` or
425
- // `--etendre`, until the reviewer judges it lifted (`suivi`) or accepts the lot, as the
426
- // unresolved threads of a review: every session of its agent receives it. The circuit goes
427
- // straight to the agent the findings name: the testwriter → preuve → developpeur → controles
428
- // when one names the testwriter, else the developpeur → controles; then the final pass,
429
- // restricted to what the fix changes and its dependents, and the reviewer again, on the
430
- // difference: the lot it read before is kept (`lot` of its sheet's entry), as Gerrit keeps each
431
- // patch set, and the next review receives the command of the difference between the two lots,
432
- // the files of the lot that changed since, and the findings still open, each with the
433
- // developpeur's answer under it, which it judges lifted or not (`suivi`). As the author answers
434
- // in each thread of a review on GitHub or Gerrit, a sheet FAIT of the developpeur answers each
435
- // finding open for him, by its title, levé or contesté with its reason, with its piece
436
- // (`reponses`); a sheet without the answer to one is refused (`reponsesAuxConstats` of
437
- // scripts/resultats.mjs) and asked again once of the same session, except in a run whose
438
- // supervisor gives the task (`--contexte`), where the findings open at its launch are the
439
- // session's context and need no answer, a finding a RENDU states within the run still its task
440
- // (`auLancement`, `constatsDeLaSeance`, BP 320.14.2.3), and the answer is kept with
441
- // its finding in the state until the next review (BP 320.21: the cause of his choice in a
442
- // handover the circuit does not read, three RENDU, then the stop); the rest of the lot it does not read again (its skill, « La relecture
443
- // bornée »). A blocking finding without a valid agent, or one that puts its criterion in
444
- // question (`critere_en_cause`), stops at « relecture-arret »; so does the third RENDU since the
445
- // ticket's last ACCEPTÉ, and a RENDU whose finding goes to the testwriter when the plan skips
446
- // him (`sansTests`), at that verdict, as a CI fails fast on a step it cannot run
447
- // (`arretDuTestwriterSaute`; OSC Bridge SH-13y.1: three RENDU « Agent : testwriter » on a
448
- // package whose tests no command of the frame plays, the developpeur relaunched on an empty
449
- // diff each time); its question, declare the tests of the package or settle the finding.
450
- // - ACCEPTÉ: the integration, as soon as a final pass has verified the lot accepted (`verifie` set
451
- // by the pass that routed to this review, read as a mark and not compared to a re-hash of the
452
- // live tree, which bors and Zuul teach: merge the commit tested, never a re-hash of a working
453
- // tree a build artifact changes); else that pass first, once, its red going to the developpeur
454
- // and the lot then to the reviewer again — a cycle bounded (`TOURS_DE_LA_PASSE_FINALE`), a lot
455
- // whose tree never settles between the pass and the review stopping on a question to the
456
- // supervisor. The circuit builds the lot from the copy: the files the copy changes
457
- // against its HEAD, the testwriter's (`estUnTest`: test files and the shared test material)
458
- // in one patch, the others in another, each file against HEAD and a new one against nothing
459
- // (`git diff --no-index /dev/null`), the copy's index untouched; the message
460
- // `<type>(<paquets>): <sujet> (<ticket>)`, the type read from the ticket's type (bug fix,
461
- // chore, docs, else feat), its body written once from the final state: the criteria of the plan,
462
- // then each deviation the sheets of the developpeur and of the reviewer name (`ecarts`), once by
463
- // its subject, from the last sheet that carries it, with the trailer Co-Authored-By; and the
464
- // frame's references that write files in full (`--references`; the project's generated files,
465
- // the integration reads itself), which the integration regenerates on
466
- // main of the moment instead of applying their files from the lot. It runs
467
- // scripts/integration/integrer.mjs from the main tree, its output added to the log: 0 is the
468
- // commit on agent/<ticket> (which the circuit names from git), the copy removed, the ticket
469
- // labelled `en-file`; 75 (« à repasser ») plays it once more (`rejeu`), then stops at
470
- // « a-repasser »; any other code is its refusal, which stops at « integration ».
471
- // - Then the queue: the workflow of the ticket sends its branch to the queue of the project (the
472
- // workflow `file:<racine>`, src/temporal/file/deroule.ts, whose gestures are those of
473
- // scripts/integration/file.mjs) and awaits its issue (it brings the branch onto main, pushes it
474
- // and reads the CI of the commit pushed). Then the state of the ticket: closed, the circuit
475
- // sorts the discoveries (below), then ends at « integre », exit 0 (the queue's last word at the
476
- // ticket named with it, a CI it could not read); reopened (out of the queue, or a red CI), it
477
- // stops at « integration », the queue's last word as its reason; still in the queue, it stops at
478
- // « a-repasser », the queue's reason.
479
- // - Then the tri of the discoveries (step 5.3, `trier`), as Chromium and Mozilla give each new
480
- // report a verdict before it is filed: each discovery a sheet filed is kept with the circuit's
481
- // results (`decouverte`: its id, its subject); without one, no session. Else one session of the
482
- // explorateur out of the envelope, on Sonnet, in the main tree (the copy is gone), under the
483
- // rights of its role (reading, the build of a package, no pass), its instruction from the eighth
484
- // template, its sheet the tri's (`tri` of scripts/resultats.mjs): one line per discovery
485
- // (`conformiteDuTri`), each with its verdict (traitee, doublon, sans-suite, a-porter,
486
- // non-confirmee), the piece of a traitee or an a-porter a command played again on main or
487
- // file:line; a sheet out of conformity is asked again once of the same session. Each verdict is
488
- // written at its discovery's ticket and set there as a label; an a-porter or a non-confirmee
489
- // reopens under `a-valider`. A tri without a sheet that conforms leaves the discoveries as they
490
- // are, said at the ticket; it never stops the circuit nor undoes the integration. Its end is kept
491
- // with the circuit's results (`tri`), which the bilan counts.
492
- // - The working directory is the ticket's, `.claude/worktrees/<ticket>.travail`: the instructions,
493
- // results and errors of the sessions, the patches and message of the integration. It lives as
494
- // long as the ticket, as the workspace of a pipeline: a circuit relaunched takes it up again, no
495
- // sweep touches it, the queue removes it at the ticket's closure, and scripts/retirer-copie.sh
496
- // with the copy of a ticket closed without integration. The results and progress of the passes
497
- // live in the base of the run (scripts/mesure/base-de-passe.mjs), removed at its end.
498
- // - The state, which the workflow of the ticket holds (the effect `etat`, scripts/effets.mjs), is
499
- // written again at each step and at each stop: `{ etape, tentative, code, raison, rapport,
500
- // finale, relanceSurLeRefus, boucles, question, questionnement, paquets, constats, verifie, mene,
501
- // reprise, refus, aRegenerer, controlesRouges, rang, journal }`; `relanceSurLeRefus` whether the
502
- // developpeur's next session is the one relaunched once on the lot the integration refuses;
503
- // `questionnement` the work on the plan under way (`{ objet, role, seance }`: the plan, the
504
- // explorateur or the questionneur, its session), null otherwise; `etape` is the
505
- // state's name of a numbered step of the process (scripts/etapes.mjs: geste 1.1, testwriter 2,
506
- // preuve 2.1, developpeur 3, controles 3.1, or 4.1 the final pass once `finale`, references 4.2,
507
- // relecture 4.3, integration 5.1, file 5.2, tri 5.3), or integre at the end; `raison` names the
508
- // stop (« arrete » once the supervisor stopped the circuit); `question` the question of a stop for
509
- // the supervisor (`{ arret, fait, piece, question, qui }`), null otherwise; `paquets` the plan of
510
- // the ticket, in its order; `constats` the findings of the reviewer still open, each with its
511
- // agent; `boucles` the counts of the bounded loops of the step under way, by their key (`tests`,
512
- // the testwriter's sessions with their proofs; `code`, the developpeur's with their checks;
513
- // `relecture`, the reviews), null at a step without one; `finale` whether the final pass has
514
- // begun; `verifie` marks that the last final pass green verified the current lot (the tree it
515
- // played), read as a mark and never compared to a re-hash of the live tree, null before;
516
- // `toursDeLaPasseFinale` the tours of the ACCEPTÉ ↔ final pass cycle since the last integration
517
- // or relaunch, which bounds it, null before;
518
- // `mene` the start (an ISO date) of the step the circuit leads itself while it runs, null
519
- // otherwise; `reprise` the session of the testwriter or developpeur its relaunches resume,
520
- // `{ agent, seance }`, null before any; `refus` the integration's refusal of the lot (`{ rapport,
521
- // piece, empreinte, lance, relance }`: its output, its piece, the fingerprint of the plan refused,
522
- // whether `--depuis developpeur` launched the developpeur on it, whether a session so launched
523
- // left it unchanged once), null before any, once the integration accepts the lot, and on a run
524
- // from the testwriter; `rang` the rank of the circuit's arrival among the machine's waits for a
525
- // place.
526
- // - `--reprendre` starts again at the step of the state, its report given to the next session,
527
- // after any stop. On a stop « integration », it plays the integration (or the queue) again on the same
528
- // lot, as bors retries: a refusal can come from the load or from main (BP 320.16, 320.16.2). On
529
- // a stop « questionnement », it lets the plan pass as it is then (the supervisor
530
- // changed it or kept it), from the testwriter.
531
- // - `--depuis <testwriter|preuve|developpeur|controles|passe-finale>` (`departDepuis` of
532
- // scripts/reprise.mjs) plays that step and the ones after it, no fingerprint kept (`verts`
533
- // emptied, no resumption at a red): nothing is read back. Without it, a red of the checks or
534
- // of the final pass resumes at the step that carries it, and a step whose inputs did not
535
- // change since its last green is read back (scripts/transitions.mjs). With the developpeur's
536
- // or the testwriter's step, it has the lot corrected: the whole ticket from
537
- // that step, the text of `--contexte` the task at the head of each agent's instruction in the
538
- // run (the agent whose step `--depuis` names reads it as his task; the other one reads whom it
539
- // was given to, and does his own role's share: `constatsDeLaSeance` of scripts/seances.mjs),
540
- // the reviewer's line CONTEXTE (after a stop
541
- // « integration », from the developpeur, the refusal as his report, the red to lift, as a merge
542
- // queue sends the lot back to its author with the log of its check; from the testwriter, the
543
- // refusal dropped), as a retry
544
- // of GitLab CI plays the jobs after it with the same variables: from the testwriter, his proof,
545
- // then the developpeur launched by a red of the proof as without `--depuis`; from the
546
- // developpeur, his checks; then the final pass, the reviewer and the integration. It goes with
547
- // no `--reprendre`, and names no component: a second name is a second ticket, exit 2.
548
- // - `--etendre <paquet>[,<paquet>…]` (each a path or a package name of the repository) extends the
549
- // plan: the circuit writes the title (`bd update --title`), each package gained before the first
550
- // package of the plan that reads it, as the module of the language says (`lecteurs` of the
551
- // join: the imports of a package of TypeScript, its tests' included, the dependencies of a
552
- // crate, of development included), else at its end,
553
- // said at the ticket
554
- // (`Circuit · plan : le superviseur étend le plan à …`); then the step under way resumes as
555
- // after `--reprendre`, on the plan extended, the question as its context with the text of
556
- // `--contexte`; a stop « sans-livraison » on the developpeur's sending to the testwriter
557
- // resumes at the testwriter, the role it names. The plan so extended has passed (`plan`, its
558
- // fingerprint): neither the explorateur nor the questionneur works on it again. A package the
559
- // repository does not hold is refused, exit 2.
560
- // - `--arreter` stops the circuit on the supervisor's word, as a pipeline cancelled: the workflow
561
- // cancels the act under way, its session with it, then the state keeps its step, its stop
562
- // « arrete », its question lifted, its motive (`--contexte`) as its report, said at the ticket
563
- // (`Circuit · arret : le superviseur arrête le circuit : <motif>`), and the workflow ends, giving
564
- // that state back, which an answer reopens from. The ticket leaves the queue of the tickets, its
565
- // label `circuit` taken off (`sortirDeLaFile`): the queue does not start it again, and the run
566
- // that opens on the supervisor's answer puts the label back (`rentrerDansLaFile`).
567
- // - On a stop other than 0, the circuit applies its gesture when one settles it (`a-repasser`:
568
- // it ends at 75), the gesture written at the ticket and in the log; every other stop goes up to
569
- // the supervisor (`monter`): its question (MONTEES of scripts/etapes.mjs, or the agent's own
570
- // question), its fact (the first line of its motive or its report), its piece (the write out of
571
- // the plan, the reds with their file and line, the sheet of the agent, or the command and the end
572
- // of the log) and who must answer it, kept in the state (`question`) and written at the ticket
573
- // (`Circuit · question : <arrêt> à <étape> — <fait> — au <qui> : <question>`).
574
- // - At each step, a short comment at the ticket: `Circuit · <étape> : <résumé>`. A proof writes
575
- // there its reds and what refuses it; its whole report, the justified greens with their reasons,
576
- // goes to `.claude/worktrees/<ticket>.preuve-<n>.md`, which the comment names.
577
- // - The commands of the circuit (the proof, the checks, the integration) are added to the log of
578
- // the ticket, `.claude/worktrees/<ticket>.log`, next to the sessions, each under its header line.
579
- // - Each step the circuit leads itself, with no agent (the proof, the checks and the final pass,
580
- // the integration, the queue), writes at its end, whatever its outcome, a line to the register
581
- // of finished agents (scripts/registre.mjs, `ligneDEtape`): the role `circuit`, the ticket, the
582
- // step, its start and end, its working time, no tokens. The board counts it, and the step under
583
- // way (`mene` in the state), in the ticket's working time.
584
- // - At each of its ends (« integre », 75, or a question for the supervisor), the circuit writes the
585
- // ticket's bilan (scripts/bilan.mjs): its figures by step and by role, measured on the register,
586
- // its results and its state, kept in `.claude/worktrees/<ticket>.bilan.json` and written at the
587
- // ticket in one short comment, `Circuit · bilan : …`, compared with the bilan before it in the
588
- // project.
589
- // - The codes of the stops, by their name (ARRETS), 0 at « integre »:
590
- // 10 lancement (lancer.sh stopped before the session, or the tools of the project,
591
- // `grillhouse.outils`, refused at the launch or a resumption, before any session, or the copy
592
- // that does not move forward to the tip of main before the checks or the final pass, its
593
- // conflicts named), 11 bloqué (a motionless transcript),
594
- // 12 sans-fiche (twice no sheet that conforms), 13 preuve (the third proof fails), 14 controles
595
- // (the third developpeur of the checks or of the final pass leaves a red check, a red of the
596
- // final pass out of the plan or that no package of the plan holds, or reds to settle),
597
- // 15 sans-livraison (a developpeur session that changes no file of the plan, its checks red; the
598
- // first session of a `--reprendre` whose plan already holds changes goes on to the checks; a
599
- // second developpeur session that `--depuis developpeur` launched on the lot the integration
600
- // refused and that changes nothing; or
601
- // the developpeur's same sending to the testwriter twice in a row, on the same red output of the
602
- // checks, no green checks between them), 16 relecture-arret (a finding without a valid agent, one to the testwriter the plan skips,
603
- // one on a criterion, the third RENDU), 17 integration (the integration script refuses the lot, or the queue reopens the
604
- // ticket; at the same code, two stops of the resumption of the integration under their own
605
- // names: lot-absent, a lot neither on main nor in the copy, and copie-gardee, a lot on main
606
- // whose copy does not get removed), 19 hors-portee (a testwriter or developpeur whose sheet says BLOQUÉ, without a
607
- // sending to the testwriter, or a developpeur's FAIT with criteria out of the plan), 20 besoin (a testwriter or developpeur whose sheet says BESOIN, a
608
- // reviewer whose sheet carries a `question`, or a ticket labelled `arbitrage` whose arbitrage
609
- // `refusArbitrage` of scripts/integration/integrer.mjs refuses, at the launch or a resumption,
610
- // before any session), 22 questionnement (questions of the plan left open
611
- // after the explorateur's answer), 23 references (a regeneration of 4.2 that changes a file
612
- // no reference writes, or whose command fails), 24 hors-plan (a testwriter or developpeur session its lock
613
- // stops on a write out of the plan, `hors-plan` that lancer.sh ranges under the session's id), 25 inattendu
614
- // (an act that fails, an exception no rule of the circuit settles: its message, its stack and its
615
- // step in its question, `arretInattendu`), each a question for the supervisor; 26 limite-d-usage (a session the
616
- // usage limit cuts: no question, the circuit reports itself to the hour the usage returns and resumes the step); 75 a-repasser (a check or the integration still at 75 once played again, a proof at 75,
617
- // or the branch still in the queue), the gesture `a-repasser`.
22
+ // « ## Architecture » section (scripts/depart-du-ticket.mjs); the launch refuses a ticket that
23
+ // does not, before any work.
24
+ // - The mechanical gestures (GESTES of scripts/etapes.mjs) play with no session; every other stop
25
+ // goes up to the supervisor (`monter`) with its `question` { arret, fait, piece, question, qui }
26
+ // (MONTEES of scripts/etapes.mjs), written at the ticket (`Circuit · question : …`).
27
+ // - Each session is a launch of scripts/enveloppe/lancer.sh in its own process group; its exit code
28
+ // is the one lancer.sh writes to `.claude/worktrees/<ticket>.travail/seances/<id>/fin`
29
+ // (`rangDeLaSeance`, scripts/seances.mjs), its result to `resultat.json` beside it. Its sheet is
30
+ // read in `structured_output` (`lireFiche`), each file piece checked in the copy; a session with
31
+ // no conforming sheet is resumed once (same session), a second one stops at « sans-fiche ».
32
+ // - A session whose transcripts and log stand still for 20 minutes (IMMOBILE_MS;
33
+ // GRILLHOUSE_CIRCUIT_IMMOBILE_MS replaces it, in milliseconds) gets SIGTERM, then SIGKILL, to the
34
+ // launcher's group.
35
+ // - Each comment at the ticket carries its author (BEADS_ACTOR): the role's name for a session,
36
+ // `circuit`, `relecteur` for the verdict, `file` for the queue (AUTEUR_DE_LA_FILE of
37
+ // scripts/integration/file.mjs); the rights of every session refuse `--actor`, `-a`/`--author`
38
+ // and the variable itself (AUTEUR_FIXE of scripts/droits.mjs).
39
+ // - Each header of the log dates it in local time with its offset (ISO 8601).
40
+ // - Each pass (proof, checks, final pass, integration, queue) plays under its own results directory
41
+ // (`GRILLHOUSE_RESULTATS`) and progress directory (`GRILLHOUSE_AVANCEMENT`), and under the
42
+ // machine's budget (scripts/passe-de-la-machine.mjs); a wait that reaches its bound is the 75.
43
+ // `npm test` in a package named whole carries `GRILLHOUSE_DEPUIS_LE_VERT`
44
+ // (scripts/dernier-vert.mjs).
45
+ // - The proof plays `npm test -- --force <files of the lot>` per package (the whole package, a red
46
+ // written `rouge existant : <file> › <name> — <message>`, when the lot holds no test file); its
47
+ // report goes to `.claude/worktrees/<ticket>.preuve-<n>.md`; the tests that carry the work are
48
+ // those the testwriter's sheet names in `portent_le_travail`. A failed proof relaunches the
49
+ // testwriter twice at most.
50
+ // - The developpeur has three sessions for the checks and three for the final pass, the third on
51
+ // the strong model (`lancer.sh --modele opus`, the others `sonnet`). A session that changes no
52
+ // file of the plan (`git status --porcelain` and the content of each file, before and after) is
53
+ // the gesture `rien-a-livrer`; a `renvoi` to the testwriter is `renvoi-au-testwriter`, stopped at
54
+ // « sans-livraison » on the same red output twice in a row (`controlesRouges`).
55
+ // - Before the checks and the final pass (SUR_LA_POINTE) the copy is prepared on the tip of main
56
+ // (`avantLaPasse`, scripts/enveloppe/travail-de-la-copie.mjs `preparer`); a preparation that
57
+ // fails stops at « lancement ».
58
+ // - The checks: `npm test -- <package>` per package of the plan, `npm test -- <test files of the
59
+ // lot>`, `npm exec --no -- grillhouse construire --gardes`, then the guards
60
+ // (`GRILLHOUSE_ENVELOPPE=<plan> npm run grillhouse:gardes`, and `npm run gardes` when the project
61
+ // has it). A warning or a note of the SARIF is listed apart and given to no developpeur.
62
+ // - The final pass plays the band of the lot (`laPasseFinale`: the copy kept as a commit,
63
+ // `npm run verifier -- --filter=...[<base>...<copie>] --filter=//`) and marks the lot verified
64
+ // (`verifie`, read as a mark, never re-hashed).
65
+ // - The references (4.2) are the frame's (`referencesDuCadre`), the project's
66
+ // (`grillhouse.references`: { nom, commande, fichiers, tests, gardes, lit }) and its generated
67
+ // files (`grillhouse.engendres`, scripts/engendres.mjs); a command that fails, or a file changed
68
+ // that no reference covers, stops at « references » (23) with the copy restored (`aRegenerer`).
69
+ // - The reviewer is `claude -p --agent relecteur --session-id <uuid>` (CLAUDE_BIN replaces claude)
70
+ // on Sonnet; its sheet needs a `conformite` line per element of the lot (`conformiteDuLot`,
71
+ // scripts/resultats.mjs); a blocking finding names its agent; the third RENDU since the last
72
+ // ACCEPTÉ stops at « relecture-arret ». The ACCEPTÉ ↔ final pass cycle is bounded
73
+ // (`TOURS_DE_LA_PASSE_FINALE`).
74
+ // - The integration builds the lot from the copy (the testwriter's files, `estUnTest`, in one
75
+ // patch, the others in another; message `<type>(<paquets>): <sujet> (<ticket>)`, the type read
76
+ // from the ticket's type: bug fix, chore, docs, else feat) and runs
77
+ // scripts/integration/integrer.mjs: 0 commits on agent/<ticket> and labels the ticket `en-file`,
78
+ // 75 plays it once more (`rejeu`) then stops at « a-repasser », any other code is a refusal
79
+ // (« integration »). The queue is the workflow `file:<racine>` (src/temporal/file/deroule.ts).
80
+ // - The tri of the discoveries (5.3, `trier`) never stops the circuit nor undoes the integration.
81
+ // - The working files live beside the copy: `.claude/worktrees/<ticket>.travail` (instructions,
82
+ // results, errors, patches), `.log`, `.fiches.jsonl` (`{ date, role, fiche }`), `.bilan.json`
83
+ // (scripts/bilan.mjs, written at each end).
84
+ // - The state (the effect `etat`, scripts/effets.mjs) is `{ etape, tentative, code, raison,
85
+ // rapport, finale, relanceSurLeRefus, boucles, question, questionnement, paquets, constats,
86
+ // verifie, mene, reprise, refus, aRegenerer, controlesRouges, rang, journal }`.
87
+ // - The plan writes `## Noms publiés` (`noms_publies` of the explorateur's last sheet; an empty list
88
+ // erases the section, a sheet without the field keeps it) and `## Sorte` (`sorteDuPlan`,
89
+ // scripts/resultats.mjs; absent or unreadable, comportement) in the description; a mechanical
90
+ // ticket (`cheminMecanique`) plays the gesture `mecanique` at 1.1 (lancer.sh `--fiche geste`,
91
+ // the schema `geste`); a copy that then holds no change of the plan stops at « sans-livraison ».
92
+ // A plan with no test (`sansTests`) skips the testwriter and the proof.
93
+ //
94
+ // Codes of the stops (ARRETS), 0 at « integre »; the cause of each is in circuit.md §5.4:
95
+ // 10 lancement, 11 bloqué, 12 sans-fiche, 13 preuve, 14 controles, 15 sans-livraison,
96
+ // 16 relecture-arret, 17 integration (also lot-absent, copie-gardee), 19 hors-portee, 20 besoin,
97
+ // 22 questionnement, 23 references, 24 hors-plan, 25 inattendu (`arretInattendu`),
98
+ // 26 limite-d-usage (no question: the circuit reports itself to the hour the usage returns),
99
+ // 75 a-repasser (the gesture `a-repasser`).
100
+ // Every stop but 75 and 26 is a question for the supervisor.
618
101
  import { spawnSync } from 'node:child_process';
619
102
  import { createHash } from 'node:crypto';
620
103
  import {
@@ -1398,7 +881,7 @@ function lotTravaille(ctx) {
1398
881
  // Whether the ticket of <ctx> goes the mechanical path, as Google's large-scale changes (Rosie,
1399
882
  // ClangMR) let a tool make the change that a verification and a review judge: its plan says it
1400
883
  // mechanical (`ctx.sorte`), no `--depuis` sends its lot to an agent, and no testwriter nor
1401
- // developpeur has worked it since the plan (grillhouse-sos).
884
+ // developpeur has worked it since the plan.
1402
885
  export const cheminMecanique = ctx =>
1403
886
  ctx.sorte?.genre === 'mécanique' && !ctx.depuis && !lotTravaille(ctx);
1404
887
 
@@ -1877,10 +1360,10 @@ const planPasse = (ctx, empreinte) =>
1877
1360
 
1878
1361
  // The heading of the section of the open questions in a plan's description.
1879
1362
  const QUESTIONS_OUVERTES = '## Questions ouvertes';
1880
- // The heading of the section of the sort of the ticket in a plan's description (grillhouse-sos).
1363
+ // The heading of the section of the sort of the ticket in a plan's description.
1881
1364
  const SORTE = '## Sorte';
1882
1365
  // The heading of the section of the names the plan publishes in its description, the one that
1883
- // scripts/langages/typescript/consommateurs-arbitres.mjs reads (grillhouse-la3).
1366
+ // scripts/langages/typescript/consommateurs-arbitres.mjs reads.
1884
1367
  const NOMS_PUBLIES = '## Noms publiés';
1885
1368
 
1886
1369
  // The names <noms> a plan publishes (`noms_publies`), one line each, as the guard of the consumers
@@ -2202,7 +1685,7 @@ const ecartsDe = fiche =>
2202
1685
  // the state while it runs (`questionnement`); the exchange is written at the ticket and its end
2203
1686
  // kept with the circuit's results (`questionnement`, which the bilan counts). A plan that has
2204
1687
  // passed, its title and criteria unchanged since (`empreinteDuPlan`), passes. The workflow of a
2205
- // ticket plays each step of the plan in an activity of its own (grillhouse-4nr.6.3): one of
1688
+ // ticket plays each step of the plan in an activity of its own: one of
2206
1689
  // `PAS_DU_PLAN` (`unPasDuPlan`), the one that follows decided by `pasDuPlan` of
2207
1690
  // scripts/transitions.mjs, on the state of the plan (`{ avant, composants, plan, premier, seance,
2208
1691
  // lu, posees, reponse }`), which `planAuDebut` starts.