@roomi-fields/grillhouse 0.49.1 → 0.50.1

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 (324) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +24 -0
  3. package/bin/grillhouse.mjs +2 -0
  4. package/cadre/templates/projet/CLAUDE.md +13 -96
  5. package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
  6. package/charte.md +77 -96
  7. package/dist/temporal/acte.js +2 -1
  8. package/dist/temporal/acte.js.map +1 -1
  9. package/dist/temporal/circuit/activites.js +2 -1
  10. package/dist/temporal/circuit/activites.js.map +1 -1
  11. package/dist/temporal/circuit/appel.js +2 -2
  12. package/dist/temporal/circuit/appel.js.map +1 -1
  13. package/dist/temporal/circuit/client.d.ts +2 -4
  14. package/dist/temporal/circuit/client.js +5 -8
  15. package/dist/temporal/circuit/client.js.map +1 -1
  16. package/dist/temporal/circuit/commande.js +5 -4
  17. package/dist/temporal/circuit/commande.js.map +1 -1
  18. package/dist/temporal/circuit/contrat.d.ts +3 -3
  19. package/dist/temporal/circuit/contrat.js +2 -2
  20. package/dist/temporal/circuit/contrat.js.map +1 -1
  21. package/dist/temporal/circuit/deroule.js +4 -4
  22. package/dist/temporal/circuit/deroule.js.map +1 -1
  23. package/dist/temporal/commande.js +1 -1
  24. package/dist/temporal/commande.js.map +1 -1
  25. package/dist/temporal/deroules.js +3 -4
  26. package/dist/temporal/deroules.js.map +1 -1
  27. package/dist/temporal/etat.js +1 -1
  28. package/dist/temporal/etat.js.map +1 -1
  29. package/dist/temporal/file/activites.js +2 -1
  30. package/dist/temporal/file/activites.js.map +1 -1
  31. package/dist/temporal/file/client.js.map +1 -1
  32. package/dist/temporal/file/contrat.js +3 -2
  33. package/dist/temporal/file/contrat.js.map +1 -1
  34. package/dist/temporal/file/deroule.js +2 -1
  35. package/dist/temporal/file/deroule.js.map +1 -1
  36. package/dist/temporal/installation.js +2 -0
  37. package/dist/temporal/installation.js.map +1 -1
  38. package/dist/temporal/nuits/activites.js +4 -3
  39. package/dist/temporal/nuits/activites.js.map +1 -1
  40. package/dist/temporal/nuits/appel.js +2 -1
  41. package/dist/temporal/nuits/appel.js.map +1 -1
  42. package/dist/temporal/nuits/choix.js +2 -1
  43. package/dist/temporal/nuits/choix.js.map +1 -1
  44. package/dist/temporal/nuits/client.js +2 -1
  45. package/dist/temporal/nuits/client.js.map +1 -1
  46. package/dist/temporal/nuits/commande.js +2 -1
  47. package/dist/temporal/nuits/commande.js.map +1 -1
  48. package/dist/temporal/nuits/contrat.js +2 -1
  49. package/dist/temporal/nuits/contrat.js.map +1 -1
  50. package/dist/temporal/nuits/deroule.js +2 -1
  51. package/dist/temporal/nuits/deroule.js.map +1 -1
  52. package/dist/temporal/places/activites.js +2 -1
  53. package/dist/temporal/places/activites.js.map +1 -1
  54. package/dist/temporal/places/client.js +1 -0
  55. package/dist/temporal/places/client.js.map +1 -1
  56. package/dist/temporal/places/deroule.js +4 -5
  57. package/dist/temporal/places/deroule.js.map +1 -1
  58. package/dist/temporal/tickets/activites.js +1 -1
  59. package/dist/temporal/tickets/activites.js.map +1 -1
  60. package/dist/temporal/tickets/deroule.js +4 -4
  61. package/dist/temporal/tickets/deroule.js.map +1 -1
  62. package/docs/ARCHITECTURE.md +3 -3
  63. package/docs/CADRE.md +10 -68
  64. package/docs/INTERFACE.md +59 -179
  65. package/docs/architecture/circuit.md +440 -0
  66. package/docs/architecture/entree.md +281 -0
  67. package/docs/architecture/greffon.md +284 -0
  68. package/docs/architecture/installation.md +306 -0
  69. package/docs/architecture/machine.md +383 -0
  70. package/docs/architecture/tests.md +337 -0
  71. package/hooks/crochet.mjs +3 -1
  72. package/package.json +1 -1
  73. package/scripts/abi-des-dependances.mjs +2 -1
  74. package/scripts/activites.mjs +8 -8
  75. package/scripts/aiguillage.mjs +4 -4
  76. package/scripts/arbitrages.mjs +1 -1
  77. package/scripts/arbres-juges.mjs +2 -1
  78. package/scripts/attente-a-l-arret.mjs +7 -8
  79. package/scripts/attente-au-tour.mjs +2 -2
  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/bilan.mjs +39 -61
  84. package/scripts/binaires.mjs +2 -1
  85. package/scripts/branche-de-nuit.mjs +2 -1
  86. package/scripts/cadre.mjs +37 -9
  87. package/scripts/ci-de-main.mjs +2 -1
  88. package/scripts/circuit.mjs +101 -618
  89. package/scripts/circuits-cles.mjs +4 -6
  90. package/scripts/circuits-du-serveur.mjs +1 -1
  91. package/scripts/codes-de-sortie.mjs +1 -1
  92. package/scripts/coeurs-dedies.mjs +2 -4
  93. package/scripts/commande-du-langage.mjs +2 -0
  94. package/scripts/commandes-composees.mjs +3 -3
  95. package/scripts/commandes-du-path.mjs +1 -1
  96. package/scripts/composants-affectes.mjs +3 -1
  97. package/scripts/composition-des-langages.mjs +2 -0
  98. package/scripts/conformite.d.ts +2 -1
  99. package/scripts/conformite.mjs +2 -0
  100. package/scripts/consommation-des-passes.mjs +5 -4
  101. package/scripts/consommation.mjs +1 -0
  102. package/scripts/copies-finies.mjs +9 -10
  103. package/scripts/crochet.mjs +1 -0
  104. package/scripts/crochets.mjs +2 -1
  105. package/scripts/depart-du-ticket.mjs +2 -2
  106. package/scripts/dependances-internes.mjs +4 -2
  107. package/scripts/dernier-vert.mjs +3 -3
  108. package/scripts/dette.d.ts +2 -1
  109. package/scripts/dette.mjs +2 -0
  110. package/scripts/direct.mjs +66 -6
  111. package/scripts/disque-des-copies.mjs +1 -1
  112. package/scripts/donnees-cles.mjs +2 -0
  113. package/scripts/droits.mjs +18 -13
  114. package/scripts/echantillonneur-de-la-passe.mjs +1 -1
  115. package/scripts/effets.mjs +3 -3
  116. package/scripts/engendres.mjs +1 -1
  117. package/scripts/enveloppe/codes.mjs +1 -0
  118. package/scripts/enveloppe/enveloppe.mjs +61 -84
  119. package/scripts/enveloppe/lancer.sh +5 -3
  120. package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
  121. package/scripts/enveloppe/travail-de-la-copie.mjs +17 -17
  122. package/scripts/etapes.mjs +10 -9
  123. package/scripts/etat-du-depot.mjs +2 -1
  124. package/scripts/faits-du-circuit.mjs +19 -19
  125. package/scripts/fermeture-de-la-machine.mjs +2 -2
  126. package/scripts/fichier-du-poste.mjs +3 -4
  127. package/scripts/fichiers-nommes.mjs +2 -1
  128. package/scripts/file-des-tickets.mjs +3 -1
  129. package/scripts/flux-de-la-nuit.mjs +2 -1
  130. package/scripts/flux-des-paquets.mjs +2 -1
  131. package/scripts/fusion-du-changelog.mjs +2 -1
  132. package/scripts/garde-de-la-memoire.mjs +1 -1
  133. package/scripts/gardes-du-cadre.mjs +2 -0
  134. package/scripts/greffons.mjs +2 -2
  135. package/scripts/grillhouse-maj.mjs +55 -150
  136. package/scripts/groupe-cles.mjs +2 -1
  137. package/scripts/index-interfaces.mjs +2 -0
  138. package/scripts/init.mjs +2 -1
  139. package/scripts/integration/file.mjs +3 -3
  140. package/scripts/integration/integrer.mjs +5 -6
  141. package/scripts/integration/rejeu.mjs +4 -2
  142. package/scripts/integration/verdict.mjs +2 -1
  143. package/scripts/jointure.d.ts +2 -1
  144. package/scripts/journal-des-etats.mjs +2 -2
  145. package/scripts/langages/cargo/binaires.mjs +3 -2
  146. package/scripts/langages/cargo/clippy.mjs +2 -0
  147. package/scripts/langages/cargo/commandes.mjs +72 -17
  148. package/scripts/langages/cargo/composants.mjs +4 -3
  149. package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
  150. package/scripts/langages/cargo/etiquettes.mjs +87 -0
  151. package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
  152. package/scripts/langages/cargo/exemples.mjs +6 -4
  153. package/scripts/langages/cargo/frontieres.mjs +2 -0
  154. package/scripts/langages/cargo/index-interfaces.mjs +2 -0
  155. package/scripts/langages/cargo/index.mjs +8 -9
  156. package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
  157. package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
  158. package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
  159. package/scripts/langages/cargo/sccache.mjs +10 -6
  160. package/scripts/langages/cargo/squelette.mjs +2 -0
  161. package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
  162. package/scripts/langages/cargo/verdict.mjs +8 -6
  163. package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
  164. package/scripts/langages/typescript/code-mort.mjs +2 -1
  165. package/scripts/langages/typescript/composants.mjs +7 -5
  166. package/scripts/langages/typescript/consommateurs-arbitres.mjs +2 -1
  167. package/scripts/langages/typescript/consommateurs.d.ts +2 -1
  168. package/scripts/langages/typescript/consommateurs.mjs +5 -7
  169. package/scripts/langages/typescript/construire.mjs +2 -1
  170. package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
  171. package/scripts/langages/typescript/exemples.mjs +2 -1
  172. package/scripts/langages/typescript/frontieres.mjs +3 -2
  173. package/scripts/langages/typescript/index-interfaces.mjs +3 -2
  174. package/scripts/langages/typescript/index.mjs +3 -2
  175. package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
  176. package/scripts/langages/typescript/lecteurs.mjs +2 -1
  177. package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
  178. package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
  179. package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
  180. package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
  181. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
  182. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
  183. package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
  184. package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
  185. package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
  186. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
  187. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
  188. package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
  189. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
  190. package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
  191. package/scripts/langages/typescript/module-absent.mjs +2 -1
  192. package/scripts/langages/typescript/parcours.mjs +2 -1
  193. package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
  194. package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
  195. package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
  196. package/scripts/langages/typescript/resumes.mjs +2 -1
  197. package/scripts/langages/typescript/squelette.mjs +2 -1
  198. package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
  199. package/scripts/langages/typescript/tests-de-nuit.mjs +5 -4
  200. package/scripts/langages/typescript/tests-du-poste.mjs +2 -1
  201. package/scripts/langages/typescript/tests.mjs +44 -66
  202. package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
  203. package/scripts/langages/typescript/tranches.mjs +2 -1
  204. package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
  205. package/scripts/langages/typescript/verdict.mjs +2 -1
  206. package/scripts/langages/typescript/verifier.mjs +64 -99
  207. package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
  208. package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
  209. package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
  210. package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
  211. package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
  212. package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
  213. package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
  214. package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
  215. package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
  216. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
  217. package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
  218. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
  219. package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
  220. package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
  221. package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
  222. package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
  223. package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
  224. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  225. package/scripts/langages-des-paquets.mjs +3 -1
  226. package/scripts/langages.mjs +5 -3
  227. package/scripts/lecture-unique.mjs +2 -1
  228. package/scripts/ligne-etat/defaut.sh +2 -1
  229. package/scripts/ligne-etat/ligne-etat.mjs +1 -0
  230. package/scripts/lint-des-scripts.mjs +1 -0
  231. package/scripts/machine.mjs +4 -4
  232. package/scripts/matiere-de-test.d.ts +2 -1
  233. package/scripts/matieres-lues.mjs +2 -0
  234. package/scripts/messages-non-lus.mjs +2 -4
  235. package/scripts/mesure/avancement.mjs +1 -1
  236. package/scripts/mesure/base-de-passe.mjs +10 -13
  237. package/scripts/mesure/pression.mjs +3 -4
  238. package/scripts/mesure-de-la-machine.mjs +2 -1
  239. package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
  240. package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
  241. package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
  242. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
  243. package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
  244. package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
  245. package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
  246. package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
  247. package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
  248. package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
  249. package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
  250. package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
  251. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
  252. package/scripts/migrations/0.33.0-node-26.mjs +5 -8
  253. package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
  254. package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
  255. package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
  256. package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
  257. package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
  258. package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
  259. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
  260. package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
  261. package/scripts/migrations-des-gardes.mjs +2 -0
  262. package/scripts/migrations.mjs +4 -0
  263. package/scripts/newday.mjs +2 -2
  264. package/scripts/nuit.sh +7 -5
  265. package/scripts/outil.mjs +2 -1
  266. package/scripts/outils-cles.mjs +6 -6
  267. package/scripts/paquet-npm.mjs +3 -2
  268. package/scripts/paquet.mjs +3 -4
  269. package/scripts/paquets.d.ts +1 -1
  270. package/scripts/paquets.mjs +2 -0
  271. package/scripts/passe-de-la-machine.mjs +9 -12
  272. package/scripts/places-de-la-machine.mjs +36 -53
  273. package/scripts/places-du-serveur.mjs +5 -4
  274. package/scripts/plafond-de-la-machine.mjs +19 -19
  275. package/scripts/poussee-retiree.mjs +2 -1
  276. package/scripts/prefixe-des-tickets.mjs +1 -0
  277. package/scripts/preparation.mjs +2 -1
  278. package/scripts/recommencer.mjs +2 -2
  279. package/scripts/references-changees.mjs +1 -1
  280. package/scripts/registre-des-resultats.mjs +3 -1
  281. package/scripts/registre.mjs +14 -16
  282. package/scripts/regles-des-places.mjs +4 -6
  283. package/scripts/repli-de-la-nuit.mjs +2 -1
  284. package/scripts/reponses-du-circuit.mjs +4 -3
  285. package/scripts/reprise.mjs +3 -2
  286. package/scripts/resultats.mjs +71 -93
  287. package/scripts/retirer-copie.sh +2 -1
  288. package/scripts/retirer-les-copies-finies.mjs +2 -1
  289. package/scripts/seances.mjs +3 -2
  290. package/scripts/services-du-noyau.mjs +2 -0
  291. package/scripts/session-start.sh +33 -52
  292. package/scripts/sigle-du-projet.mjs +1 -2
  293. package/scripts/sortie.mjs +2 -1
  294. package/scripts/sources.mjs +2 -0
  295. package/scripts/sous-commandes.mjs +2 -1
  296. package/scripts/sous-modules.sh +24 -43
  297. package/scripts/structure-guard.sh +2 -1
  298. package/scripts/style-a-l-ecriture.mjs +2 -0
  299. package/scripts/suiveur.mjs +1 -1
  300. package/scripts/superviseur.mjs +36 -55
  301. package/scripts/tableau-des-composants.mjs +5 -7
  302. package/scripts/tableau.mjs +78 -121
  303. package/scripts/taches-du-graphe.mjs +3 -0
  304. package/scripts/ticket-du-circuit.mjs +1 -1
  305. package/scripts/transitions.mjs +15 -15
  306. package/scripts/un-commit-par-ticket.mjs +2 -1
  307. package/scripts/verdict-de-la-nuit.mjs +2 -1
  308. package/scripts/verrou-de-fichier.mjs +1 -0
  309. package/scripts/verrous/commande.mjs +2 -1
  310. package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
  311. package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
  312. package/scripts/verrous/verrou.mjs +3 -3
  313. package/scripts/workflows-du-cadre.mjs +2 -1
  314. package/skills/developpeur/SKILL.md +6 -10
  315. package/skills/explorateur/SKILL.md +1 -1
  316. package/skills/grill/SKILL.md +4 -5
  317. package/skills/grill/references/paquets.md +5 -8
  318. package/skills/pitmaster/SKILL.md +176 -268
  319. package/skills/pitmaster/references/cadre.md +7 -6
  320. package/skills/pitmaster/references/consigne-agent.md +36 -32
  321. package/skills/pitmaster/references/tour.md +2 -2
  322. package/skills/redacteur/references/documents-d-un-composant.md +9 -8
  323. package/skills/testwriter/SKILL.md +8 -11
  324. package/types/index.d.ts +3 -0
@@ -1,12 +1,10 @@
1
+ // The reading of the key `grillhouse.circuits` of a package.json, read as written: an integer of
2
+ // 1 or more, the number of circuits of the project that run at once, which the queue of its
3
+ // tickets (src/temporal/tickets/) holds; absent or null, 1. Any other value is a fault, which
4
+ // the queue names before any work. Architecture: docs/architecture/machine.md (§4.1, §5.4).
1
5
  import { readFileSync } from 'node:fs';
2
6
  import path from 'node:path';
3
7
 
4
- // The reading of the key `grillhouse.circuits` of a package.json (grillhouse-4nr.9, decision D9,
5
- // the owner's word of 2026-11-04), read as written: an integer of 1 or more, the number of
6
- // circuits of the project that run at once, which the queue of its tickets
7
- // (src/temporal/tickets/) holds; absent or null, 1. Any other value is a fault, which the queue
8
- // names before any work.
9
-
10
8
  // Returns { max, faute }: `max` the number of circuits at once, null on a fault; `faute` the
11
9
  // fault by its name, null when the key reads.
12
10
  export function reglageDesCircuits(pkg) {
@@ -1,5 +1,5 @@
1
1
  // The circuits of a repository as the board (scripts/tableau.mjs) and the supervisor
2
- // (scripts/superviseur.mjs) read them: one call to the Temporal server (src/temporal/circuit/
2
+ // (scripts/superviseur.mjs) read them, from the view of the circuit (circuit.md §4.2): one call to the Temporal server (src/temporal/circuit/
3
3
  // client.ts `lireLesCircuits`, the memo and the status of each workflow, no worker living), as the
4
4
  // UI of Temporal lists its workflows, and the progress of the pass under way of each one that runs,
5
5
  // read in its working directory (scripts/avancement.mjs `avancementDuTravail`); and the night
@@ -5,7 +5,7 @@
5
5
  // - A_REPASSER, 75, is the exit code of « à repasser » (EX_TEMPFAIL of sysexits.h: try again
6
6
  // later), neither green nor red: a measure of time under load (scripts/mesure/pression.mjs), the
7
7
  // wait for the part of the machine at its bound (scripts/places-de-la-machine.mjs), a stop of the
8
- // circuit that a gesture settles (scripts/etapes.mjs, ARRETS).
8
+ // circuit that a gesture settles (scripts/etapes.mjs, ARRETS; circuit.md §5.5).
9
9
  export const A_REPASSER = 75;
10
10
 
11
11
  /**
@@ -1,10 +1,8 @@
1
1
  // The dedicated cores of a measure of time: the cores a measure plays on alone, the rest of the
2
- // machine going on working, as the benches of rustc-perf and `pyperf system tune` isolate cores and
3
- // pin the measure to them, as the static policy of the CPU Manager of Kubernetes gives a pod of the
4
- // guaranteed class cores of its own, and as Slurm binds a job to its cores. Functions with the
2
+ // machine going on working. Architecture: docs/architecture/machine.md (§3.1). Functions with the
5
3
  // system as input (what it reads is passed in, nothing is changed here):
6
4
  // - The key `grillhouse.mesure` of a project (`{ "coeurs": <integer ≥ 1> }`) and the number of
7
- // dedicated cores: the default one is 3 (`COEURS_PAR_DEFAUT`).
5
+ // dedicated cores: without the key, `COEURS_PAR_DEFAUT` of ./plafond-de-la-machine.mjs.
8
6
  // - The topology of the system (the sibling threads of a core, the memory node): a unit of
9
7
  // dedicated core is a physical core whole, its sibling threads with it. The count stays in
10
8
  // threads (« cores » of the budget), as the budget does.
@@ -12,6 +12,8 @@
12
12
  // - A project that declares no language (the column « Langage » of its docs/ARCHITECTURE.md),
13
13
  // or whose module describes no command <nom>, plays nothing: exit 0.
14
14
  // - A name of the core (`grillhouse <nom>`), or none, is refused, exit 2.
15
+ //
16
+ // What a module describes: docs/architecture/tests.md §3.3.
15
17
  import { spawnSync } from 'node:child_process';
16
18
  import { constants } from 'node:os';
17
19
  import { pathToFileURL } from 'node:url';
@@ -30,15 +30,15 @@
30
30
  // `PASSE_ROUGE` in its environment: that pass keeps none. A project without a module of
31
31
  // package.json (cargo alone, python alone) has no such pass: the composed `verifier` keeps the
32
32
  // green itself then, on the tree the repository had before the modules played, when every module
33
- // is green and the verification is whole (`garderSansLeGraphe`). Without it no tree of such a
34
- // project was ever judged, and the pre-push hook let none of its commits go to main
35
- // (open-synth-descriptors and osc-bridge, 2026-11-21).
33
+ // is green and the verification is whole (`garderSansLeGraphe`).
36
34
  // - `verifier`: the module of package.json plays last, and passes over the whole graph (every task
37
35
  // of every language, once); the others play before it in their declared order and get
38
36
  // `GRAPHE_JOUE` and play no task of it again (cargo: its `deny check` alone), so that nextest
39
37
  // and pytest play once.
40
38
  // - The exit code: 0 when every module is green, 75 when the only reds are « à repasser », else the
41
39
  // first other code; 128 plus the number of a signal that ended a module.
40
+ //
41
+ // The mechanism: docs/architecture/tests.md §3.1 (the pass of verification) and §6 (the exit codes).
42
42
  import { spawnSync } from 'node:child_process';
43
43
  import { constants } from 'node:os';
44
44
  import { fileURLToPath, pathToFileURL } from 'node:url';
@@ -1,7 +1,7 @@
1
1
  // The search of a command in the PATH, as `command -v` finds it: the first folder of PATH that
2
2
  // holds an executable file of its name. The one search of the core, which the installation of
3
3
  // Temporal (src/temporal/installation.ts), the preparation of a project (./preparation.mjs) and
4
- // the modules of language (by ./services-du-noyau.mjs) call.
4
+ // the modules of language (by ./services-du-noyau.mjs) call (docs/architecture/tests.md §3.3).
5
5
  import { accessSync, constants } from 'node:fs';
6
6
  import path from 'node:path';
7
7
 
@@ -41,7 +41,7 @@
41
41
  // element that only names a symbol internal to a package leads to no component, its package
42
42
  // included, as « find all references » starts from a published symbol: the ticket names the
43
43
  // package it changes. A survey by the types that cannot run says why, and the survey stands on
44
- // the names; a name the types resolve is no longer set apart.
44
+ // the names; a name the types resolve is not set apart.
45
45
  // - By the paths read (`lit`): each component whose tests declare they read a path
46
46
  // (`grillhouse.lit` of its package.json and the `lit` of its traces, `cheminsLus`) that a
47
47
  // path the ticket changes holds or lies in: a path of the repository the sections write (its
@@ -53,6 +53,8 @@
53
53
  // - The components of the survey go in the title's order, the provider first: each one after
54
54
  // every component it reads among them (its imports, the providers of the elements it reads), in
55
55
  // the order of their names otherwise.
56
+ //
57
+ // The mechanism: docs/architecture/circuit.md §5.2 (the plan of a ticket).
56
58
  import { existsSync, readFileSync } from 'node:fs';
57
59
  import path from 'node:path';
58
60
  import { pathToFileURL } from 'node:url';
@@ -29,6 +29,8 @@
29
29
  // of the first. What the role lock, the envelope and the update ask (the lock
30
30
  // files, the outputs, the rules of the roles, the tools, the binaries, the directories to
31
31
  // ignore): the union, each once.
32
+ //
33
+ // What the core asks of a module: docs/architecture/tests.md §3.1 and §3.3.
32
34
  import { existsSync, readFileSync } from 'node:fs';
33
35
  import path from 'node:path';
34
36
  import { fileURLToPath } from 'node:url';
@@ -1,5 +1,6 @@
1
1
  // The types of ./conformite.mjs as the entry `@roomi-fields/grillhouse/conformite` publishes it:
2
- // the suite of conformity of a module of language to the join (./jointure.d.ts).
2
+ // the suite of conformity of a module of language to the join (./jointure.d.ts,
3
+ // docs/architecture/tests.md §3.3).
3
4
  import type { Langage } from './jointure.js';
4
5
 
5
6
  /** A case of the join: the faults its check finds on the valid entry (none expected) and on the
@@ -29,6 +29,8 @@
29
29
  // element of, and each element it adds, changes or removes;
30
30
  // - matieres: each component of the shared test material of the repository of the entry;
31
31
  // - joueDesTests: each component of the repository of the entry that plays tests.
32
+ //
33
+ // One check per demand of the join, which the module answers: docs/architecture/tests.md §3.3.
32
34
  import { existsSync, readdirSync, statSync } from 'node:fs';
33
35
  import { tmpdir } from 'node:os';
34
36
  import path from 'node:path';
@@ -1,8 +1,9 @@
1
1
  // What a heavy pass consumes, kept with the project: the transient scope of the user's systemd
2
- // manager a pass runs in (`scopeSystemd`, read for `CPUUsageNSec` and `MemoryPeak`, as `systemctl
3
- // show` and Slurm's `sacct` do), the register under `<git common dir>/grillhouse/` where each
4
- // measure is a line added (`garderLaConsommation`), and the figures per kind of pass
5
- // (`bilanDeLaConsommation`). The pass itself is `avecLaPasse` (./passe-de-la-machine.mjs).
2
+ // manager a pass runs in (`scopeSystemd`, read for `CPUUsageNSec` and `MemoryPeak`), the
3
+ // register under `<git common dir>/grillhouse/` where each measure is a line added
4
+ // (`garderLaConsommation`), and the figures per kind of pass (`bilanDeLaConsommation`). The pass
5
+ // itself is `avecLaPasse` (./passe-de-la-machine.mjs). Architecture: docs/architecture/machine.md
6
+ // (§3.1, §5.6).
6
7
  import { spawn, spawnSync } from 'node:child_process';
7
8
  import { appendFileSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
8
9
  import { cpus } from 'node:os';
@@ -1,6 +1,7 @@
1
1
  // `grillhouse consommation [--json]`: what the heavy passes of the project consume, per kind of
2
2
  // pass, read from its register (./consommation-des-passes.mjs): the number of passes, the median
3
3
  // and the maximum of the cores occupied (processor time ÷ duration) and of the peak of memory.
4
+ // Architecture: docs/architecture/machine.md (§5.6).
4
5
  import { pathToFileURL } from 'node:url';
5
6
  import { bilanDeLaConsommation, lireLaConsommation } from './consommation-des-passes.mjs';
6
7
 
@@ -1,8 +1,9 @@
1
- // The removal of the working copies whose content is on main, run by the night once its steps
1
+ // The removal of the working copies whose content is on main (packages/grillhouse/docs/
2
+ // architecture/entree.md §5.3, « Après les étapes »), run by the night once its steps
2
3
  // are played (scripts/nuit.sh) and at the end of each circuit (scripts/circuit.mjs,
3
4
  // `retirerLesCopiesDuDepot`), as `git worktree prune` and the workspace cleanup at the end of a
4
5
  // CI pipeline (Jenkins « Workspace Cleanup »): no copy outlives the entry of its content on main,
5
- // and no target directory its ticket (grillhouse-cyr: 34 GB of target/ under synthhub's copies).
6
+ // and no target directory its ticket.
6
7
  //
7
8
  // Its command is ./retirer-les-copies-finies.mjs, which reads the circuits that run on the Temporal
8
9
  // server; this module imports nothing of the built `dist/`, since the lock of the machine and the
@@ -16,9 +17,8 @@
16
17
  // preparation would (`git clean -x -e node_modules`). Its line names each output removed with
17
18
  // the place it held (« target retiré (2,9 Go) »). The copy of the integration and that of the
18
19
  // queue, kept that no lock holds, lose them the same way: a copy that lasts holds between its
19
- // passes none of the outputs its next pass would remove anyway, and at most one pass's
20
- // (grillhouse-k5y: 2.9 GB in the night's, 4.8 GB in the integration's of SyntHub). The night's
21
- // copy named by no one is never touched: a night may play in it.
20
+ // passes none of the outputs its next pass would remove anyway, and at most one pass's.
21
+ // The night's copy named by no one is never touched: a night may play in it.
22
22
  // - First `git worktree prune`: a copy whose folder is gone leaves the list. Then each copy
23
23
  // `git worktree list` names, the main tree and the copies named on the command line (the
24
24
  // night's) left out, passes through scripts/retirer-copie.sh, without `--jetable`: a copy whose
@@ -40,10 +40,9 @@
40
40
  // owner holds. A copy whose circuit the server no longer holds, its ticket still open, stays,
41
41
  // its code and commits untouched, and its line says so with the place it holds and that of each
42
42
  // of its tools' outputs (« son circuit ne tourne plus ; target y tient 5,1 Go ; son code et ses
43
- // commits restent »): 5.2 GB of SyntHub's SH-cgi.8.2 were kept so under the words of a running
44
- // circuit (grillhouse-k5y). Its ticket closed (delivered directly, or its circuit stopped), its
45
- // `.travail` holds it no more: no circuit will remove it (grillhouse-4nr.29: 9 copies, 4.3 GB,
46
- // kept so), and the copy is judged as any other; removed, its `.travail` goes with it, its
43
+ // commits restent »). Its ticket closed (delivered directly, or its circuit stopped), its
44
+ // `.travail` holds it no more: no circuit will remove it, and the copy is judged as any other;
45
+ // removed, its `.travail` goes with it, its
47
46
  // balance (`<ticket>.bilan.json`) kept. Without the circuits the server holds (the server
48
47
  // unread, or the end of a circuit, whose act reads no server), its line says only that its
49
48
  // circuit has its working directory.
@@ -272,7 +271,7 @@ function ticketDeLaCopie(chemin) {
272
271
  * What holds the disk of the repository whose copy or main tree is <racine>: its copies, the
273
272
  * main tree left out, the five largest first, each with its ticket, its place and the place of
274
273
  * its tools' outputs (<ignorer>, by default the directories the module of the project's language
275
- * names): « .claude/worktrees/SH-ae6.2.7 (le ticket SH-ae6.2.7, 5,0 Go, dont target 4,8 Go) ».
274
+ * names): « .claude/worktrees/<ticket> (le ticket <ticket>, 5,0 Go, dont target 4,8 Go) ».
276
275
  * What the wait for room on the disk of a copy names (scripts/attente-de-la-machine.mjs).
277
276
  * @param {string} racine
278
277
  * @param {string[]} [ignorer]
@@ -7,6 +7,7 @@
7
7
  // - The guard runs in this process, as if Node had been given its path, as `grillhouse` runs a
8
8
  // subcommand (bin/grillhouse.mjs).
9
9
  // - A name that is not a hook of the frame is refused, named on the error stream; exit code 2.
10
+ // These are git hooks; the hooks of Claude Code are those of mods/grillhouse/hooks/crochet.mjs.
10
11
  import path from 'node:path';
11
12
  import { fileURLToPath, pathToFileURL } from 'node:url';
12
13
  import { CROCHETS } from './crochets.mjs';
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // The frame's git hooks, on Husky's model: the project's `prepare`, which npm runs at its install,
3
- // places them, and each calls the project's command, `grillhouse hook <nom>`.
3
+ // places them, and each calls the project's command, `grillhouse hook <nom>`. The mechanism is
4
+ // installation.md §3.1 and §5.6 (packages/grillhouse/docs/architecture/).
4
5
  //
5
6
  // npx grillhouse hooks [<project>] places both hooks and the merge driver of the
6
7
  // CHANGELOG (the current directory by default)
@@ -1,5 +1,5 @@
1
- // The ticket a circuit starts on, read before any work, as a CI validates its configuration before
2
- // it runs its jobs: `npx grillhouse circuit` refuses at the door what the circuit could not run
1
+ // The ticket a circuit starts on, read before any work (circuit.md §3.1, « Commande du circuit »;
2
+ // §5.2), as a CI validates its configuration before it runs its jobs: `npx grillhouse circuit` refuses at the door what the circuit could not run
3
3
  // (src/temporal/circuit/commande.ts), and the opening of each act of the circuit reads its plan
4
4
  // the same way (scripts/circuit.mjs `contexte`).
5
5
  //
@@ -8,8 +8,8 @@
8
8
  // npx grillhouse dependances-internes (one of the frame's guards, scripts/gardes-du-cadre.mjs)
9
9
  //
10
10
  // - The packages are those the architecture declares of a language without package.json of its own
11
- // (`paquetsSansPackageJson`, ./paquet-npm.mjs) that hold a package.json; one without it is the
12
- // migration's (./migrations/0.31.0-paquets-dans-le-graphe.mjs).
11
+ // (`paquetsSansPackageJson`, ./paquet-npm.mjs) that hold a package.json; one without it is not
12
+ // judged here.
13
13
  // - The internal dependencies of the manifest: of a Cargo.toml, each dependency with a `path`
14
14
  // (`[dependencies]`, `[dev-dependencies]`, `[build-dependencies]`, and the same under
15
15
  // `[target.*]`; a `workspace = true` one takes the `path` of `[workspace.dependencies]` of the
@@ -24,6 +24,8 @@
24
24
  // package.json that lacks a dependency its manifest links, or names an internal package its
25
25
  // manifest does not link. Written in SARIF under the guard's name, and on the error stream after
26
26
  // ⛔; the exit code is 1 when there is one, 0 otherwise.
27
+ //
28
+ // The list of the guards: docs/architecture/tests.md §3.4.
27
29
  import { existsSync, readFileSync } from 'node:fs';
28
30
  import path from 'node:path';
29
31
  import { fileURLToPath, pathToFileURL } from 'node:url';
@@ -1,4 +1,5 @@
1
- // The last green of a branch: the tree of the last pass of `npm run verifier` green on every
1
+ // The last green of a branch (the tests-and-languages document owns it; entree.md §4.1 names it
2
+ // beside the final pass, packages/grillhouse/docs/architecture/entree.md §5.1): the tree of the last pass of `npm run verifier` green on every
2
3
  // package (scripts/langages/typescript/verifier.mjs), against which the next pass measures itself, as
3
4
  // `vitest --changed <ref>` and `jest --onlyChanged` play the tests a change reaches, and Bazel
4
5
  // keeps by target the result of a test whose inputs did not move.
@@ -22,8 +23,7 @@
22
23
  // the working tree that kept it alone: measured against the last green of another branch (main's,
23
24
  // from a copy or from the queue's detached replay), its absence is no removal, as Nx affected and
24
25
  // Turborepo's `--filter=[ref]` measure against a commit. Against the branch's own, it is one: the
25
- // copy created that file, then removed it. Witness: BPScript 320.3.2.1, 54 `.rapport-suite.json`
26
- // untracked on main, each seen removed by every package of a copy, which played whole 264 times.
26
+ // copy created that file, then removed it.
27
27
  // - No last green counts without git, before the first commit, and while a submodule differs
28
28
  // from the commit its parent records (its files changed, or its HEAD moved) or the changes
29
29
  // reach a submodule: git's tree holds a submodule's commit, not its files. The pass is then
@@ -1,5 +1,6 @@
1
1
  // The types of ./dette.mjs as the entry `@roomi-fields/grillhouse/dette` publishes it, for a
2
- // project's guard that judges its findings against the project's known debt.
2
+ // project's guard that judges its findings against the project's known debt
3
+ // (docs/architecture/tests.md §5.5).
3
4
 
4
5
  /** A finding of a guard: inscribed in the debt only with its `fichier` and its `regle`. */
5
6
  export type Constat = {
package/scripts/dette.mjs CHANGED
@@ -31,6 +31,8 @@
31
31
  //
32
32
  // A project's guard imports `trancher` by the package's entry `@roomi-fields/grillhouse/dette`,
33
33
  // its types in ./dette.d.ts (docs/ARCHITECTURE.md, the package's named entries).
34
+ //
35
+ // The mechanism: docs/architecture/tests.md §2.6, §4.1 and §5.5.
34
36
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
35
37
  import path from 'node:path';
36
38
  import { pathToFileURL } from 'node:url';
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // The direct, a gesture of the frame: a ticket led out of the circuit is written by an agent in a
2
+ // The direct, the command of rescue of the frame (circuit.md §5.8, « La voie de secours »; the
3
+ // direct circuit of the target is circuit.md §9.1, chantier 2): a ticket led out of the circuit is written by an agent in a
3
4
  // copy of its own, then read by the reviewer, and the command stops there. As a fix of the tooling
4
5
  // outside a merge queue is still written by an author other than its reviewer and verified before
5
6
  // it lands (the « tree closer fix » of Chromium, the stage0 of rustc fixed outside bors), the
@@ -29,8 +30,10 @@
29
30
  // Exit code: 0 for an ACCEPTÉ lot, 1 for a RENDU lot (the same command resumes the agent), 2 for a
30
31
  // usage fault or a refusal, 3 for a stop that goes up to the supervisor.
31
32
  import { spawnSync } from 'node:child_process';
32
- import { existsSync } from 'node:fs';
33
+ import { existsSync, realpathSync } from 'node:fs';
34
+ import path from 'node:path';
33
35
  import { pathToFileURL } from 'node:url';
36
+ import { ecritPar, preparer } from './enveloppe/travail-de-la-copie.mjs';
34
37
  import { prendreUnePlace, VARIABLE_TENUE } from './places-de-la-machine.mjs';
35
38
  import { bloquantsDeLaFiche } from './resultats.mjs';
36
39
  import { consigne } from './seances.mjs';
@@ -105,6 +108,34 @@ export function decisionDuDirect(fiches, lot) {
105
108
 
106
109
  const RAISON_DU_VERROU = "copie d'un ticket direct : son lot n'est pas encore sur main";
107
110
 
111
+ /**
112
+ * Whether git holds the copy <copie> locked, read on its stable output (`git worktree list
113
+ * --porcelain`, a `locked` line in the block of the copy), never on a message git translates.
114
+ * @param {string} copie
115
+ * @param {(...args: string[]) => { status: number, stdout: string, stderr: string }} git
116
+ */
117
+ function estVerrouillee(copie, git) {
118
+ const r = git('worktree', 'list', '--porcelain');
119
+ if (r.status !== 0) {
120
+ return false;
121
+ }
122
+ const chemins = new Set([path.resolve(copie)]);
123
+ if (existsSync(copie)) {
124
+ chemins.add(realpathSync(copie));
125
+ }
126
+ return String(r.stdout)
127
+ .split(/\n\s*\n/)
128
+ .some(bloc => {
129
+ const lignes = bloc.split('\n');
130
+ const chemin = lignes.find(l => l.startsWith('worktree '))?.slice('worktree '.length);
131
+ return (
132
+ chemin !== undefined &&
133
+ chemins.has(chemin) &&
134
+ lignes.some(l => l === 'locked' || l.startsWith('locked '))
135
+ );
136
+ });
137
+ }
138
+
108
139
  /**
109
140
  * Locks the copy <copie> against the cleaning of the circuit, which removes a copy identical to
110
141
  * main (`git worktree lock`, <git> its runner); a copy already locked stays so.
@@ -113,7 +144,7 @@ const RAISON_DU_VERROU = "copie d'un ticket direct : son lot n'est pas encore su
113
144
  */
114
145
  export function verrouillerLaCopie(copie, git) {
115
146
  const r = git('worktree', 'lock', '--reason', RAISON_DU_VERROU, copie);
116
- if (r.status !== 0 && !/already locked/.test(r.stderr)) {
147
+ if (r.status !== 0 && !estVerrouillee(copie, git)) {
117
148
  throw new Error(`la copie ${copie} ne se verrouille pas : ${r.stderr}`.trim());
118
149
  }
119
150
  }
@@ -132,7 +163,7 @@ export function deverrouillerLaCopie(copie, git) {
132
163
 
133
164
  /**
134
165
  * The command: the agent, then the reviewer, and it stops. <ports> are what it launches
135
- * (`copie`, `verrouiller`, `fiches`, `lot`, `resoudre`, `seance`, `relecture`); <options> the paths
166
+ * (`copie`, `verrouiller`, `avancer`, `fiches`, `lot`, `resoudre`, `seance`, `relecture`); <options> the paths
136
167
  * `--paquet` adds to the plan.
137
168
  * @param {{ id: string, ticket: { title?: string, labels?: string[] }, options?: string[], ports: any }} o
138
169
  * @returns {Promise<{ verdict?: string, copie?: string, constats?: object[], arret?: boolean, statut?: string, rendus?: number, fiche?: object }>}
@@ -169,7 +200,10 @@ export async function lancerLeDirect({ id, ticket, options = [], ports }) {
169
200
  // its review; given back at the end, whatever the end.
170
201
  const rendre = ports.place();
171
202
  try {
172
- const fiche = await ports.seance('direct', { constats, paquets: plan });
203
+ // The copy moves onto main before the session: the files its work meets in conflict go to the
204
+ // agent, who writes them all, as the author of a lot resolves his own rebase.
205
+ const { fichiers = [] } = (await ports.avancer(copie)) ?? {};
206
+ const fiche = await ports.seance('direct', { constats, paquets: plan, conflits: fichiers });
173
207
  if (fiche?.statut && fiche.statut !== 'FAIT') {
174
208
  return { arret: true, statut: fiche.statut, fiche, copie };
175
209
  }
@@ -180,6 +214,18 @@ export async function lancerLeDirect({ id, ticket, options = [], ports }) {
180
214
  }
181
215
  }
182
216
 
217
+ /**
218
+ * What the agent of a direct reads of the files its work meets in conflict with main (« aucun »
219
+ * without any).
220
+ * @param {string[]} fichiers
221
+ * @returns {string}
222
+ */
223
+ export function rapportDuConflit(fichiers) {
224
+ return fichiers.length
225
+ ? `L'avance de la copie sur main a laissé ces fichiers en conflit avec ton travail : ${fichiers.join(', ')}. Les marques de conflit sont dans la copie (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`) : tu résous chaque fichier, marques retirées ; un fichier du lot gardé (\`grillhouse-travail.patch\`, dans le dossier git de la copie) se reprend à la main dans la copie.`
226
+ : 'aucun';
227
+ }
228
+
183
229
  // The task the agent of a direct reads at the head of its instruction.
184
230
  const TACHE_DU_DIRECT =
185
231
  "Ce ticket est mené en direct, hors du circuit : tu écris ses tests et son code ensemble, dans les paquets de ton plan. Un défaut corrigé porte un test qui le reproduit. Aucune preuve du rouge ni aucun contrôle du circuit ne suit ta séance : un relecteur juge ton lot, puis le superviseur le vérifie. Les constats ci-dessous, s'il y en a, viennent de ce relecteur.";
@@ -238,7 +284,20 @@ async function portsDuProjet(id, { contexteDuSuperviseur }) {
238
284
  fiches: () =>
239
285
  lesFiches(ctx).map(e => (e.role === 'relecteur' ? { ...e, lot: e.lot?.arbre } : e)),
240
286
  lot: () => arbreDeLaCopie(ctx),
241
- seance: async (_role, { constats, paquets }) => {
287
+ // The advance of the copy onto the tip of main, as the launcher plays it: `{ fichiers }`, the
288
+ // files in conflict or kept in the lot, which the agent of a direct writes (`ecritPar`).
289
+ avancer: copie => {
290
+ const tete = git('rev-parse', 'HEAD');
291
+ if (tete.status !== 0) {
292
+ return { fichiers: [] };
293
+ }
294
+ const r = preparer(copie, String(tete.stdout).trim(), {
295
+ ecrit: ecritPar('direct', () => false),
296
+ sortie: 1,
297
+ });
298
+ return { fichiers: [...(r.conflits ?? []), ...(r.enAttente ?? [])] };
299
+ },
300
+ seance: async (_role, { constats, paquets, conflits = [] }) => {
242
301
  ctx.paquets = paquets;
243
302
  ctx.contexte = ctx.contexteDuDirect;
244
303
  const r = await seance(ctx, 'direct', {
@@ -248,6 +307,7 @@ async function portsDuProjet(id, { contexteDuSuperviseur }) {
248
307
  evenement: 'neuve',
249
308
  fiche: 'developpeur',
250
309
  constats: ouverts(constats),
310
+ rapport: conflits.length ? rapportDuConflit(conflits) : undefined,
251
311
  lectures: { lots: () => [], references: () => [] },
252
312
  });
253
313
  return r.fiche;
@@ -1,6 +1,6 @@
1
1
  // The disk of the copies of a project, which a circuit's start consumes (its copy, its
2
2
  // dependencies, its compilation), as Nomad reserves the disk of a client (`client.reserved.disk`):
3
- // the queue of the tickets admits a circuit only when the disk of the project's copies
3
+ // the queue of the tickets (circuit.md §5.7; machine.md §5.4) admits a circuit only when the disk of the project's copies
4
4
  // (`<racine>/.claude/worktrees`) has the room of one more copy, and says otherwise what holds it.
5
5
  //
6
6
  // - The size of a copy is measured once, when its circuit pauses on a question or ends
@@ -23,6 +23,8 @@
23
23
  // - `node donnees-cles.mjs <dir>` writes one line `export VARIABLE='chemin'` per datum of the
24
24
  // project that holds <dir> (`exportsDesDonnees`), which the night evaluates, exit 0; a faulty key
25
25
  // writes its faults on stderr, exit 1.
26
+ //
27
+ // What a test reads out of its imports: docs/architecture/tests.md §4.1 and §7.
26
28
  import { existsSync, readFileSync } from 'node:fs';
27
29
  import path from 'node:path';
28
30
  import { pathToFileURL } from 'node:url';
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // The rights and the context of each role session the circuit launches, from one source (ROLES):
3
3
  // the testwriter and the developpeur in the envelope of their plan (scripts/enveloppe/lancer.sh),
4
- // the explorateur, the questionneur and the reviewer out of it (scripts/circuit.mjs). As a task of CI receives its
5
- // rights from its steps and runs on an image of its own, not on the workstation of its author
6
- // (GitHub Actions `permissions:` per job, the hermetic actions of Bazel), a session receives the
7
- // rights the commands of its skill name, and the context its work reads.
4
+ // the explorateur, the questionneur and the reviewer out of it (scripts/circuit.mjs). A session
5
+ // receives the rights the commands of its skill name, and the context its work reads.
6
+ // Architecture: docs/architecture/machine.md (§3.2, §2.5).
8
7
  //
9
8
  // npx grillhouse droits <rôle> --racine <arbre principal> --copie <copie> --ticket <ticket>
10
9
  //
@@ -30,8 +29,9 @@
30
29
  // hooks and servers are not the role's), save the frame's (`grillhouse@…`), which carries the
31
30
  // role's agent, its skills and the frame's hooks: Claude Code applies no `skillOverrides` to the
32
31
  // skills of a plugin, and the role's agent preloads its own (`skills` of its definition);
33
- // the background tasks off (`env`, SANS_TACHE_DE_FOND: a role waits in the foreground for what
34
- // it launches, and its session ends with its sheet); for a role that writes, its locks as hooks (PreToolUse: verrous/verrou.mjs on the tools of
32
+ // the background tasks off and Code Mode on (`env`, ENV_DES_SEANCES: a role waits in the
33
+ // foreground for what it launches, and its session ends with its sheet; `claude -p` gets Code
34
+ // Mode, the REPL, only from this block); for a role that writes, its locks as hooks (PreToolUse: verrous/verrou.mjs on the tools of
35
35
  // writing, verrous/commande.mjs on Bash), since the hooks of an agent's definition do not run in
36
36
  // a folder Claude Code has not trusted, as the copy of a ticket.
37
37
  // - `--tools <list>`: the tools its work uses; Edit and Write for a role that writes alone, the
@@ -83,10 +83,15 @@ const ECRIRE_AU_TICKET = [
83
83
  'Bash(bd delete*)',
84
84
  'Bash(npx grillhouse ticket*)',
85
85
  ];
86
- // The variable that turns off the background tasks of Claude Code (the Bash tool's
87
- // `run_in_background`, the background agents): `claude -p` waits for them before it ends, so a
88
- // session ends with its sheet only without them.
89
- const SANS_TACHE_DE_FOND = { CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1' };
86
+ // The variables of the env block of every session. One turns off the background tasks of Claude
87
+ // Code (the Bash tool's `run_in_background`, the background agents): `claude -p` waits for them
88
+ // before it ends, so a session ends with its sheet only without them. The other turns on Code Mode
89
+ // (the REPL): `claude -p` gets it only from the env block of `--settings`; the hooks and the
90
+ // permissions of the role apply to the tools the REPL calls.
91
+ const ENV_DES_SEANCES = {
92
+ CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1',
93
+ CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: '1',
94
+ };
90
95
 
91
96
  // The reads of git in the copy, by its path (`git -C <copie> …`), which Claude Code does not let
92
97
  // through without a rule, as it does `git status` in the working directory.
@@ -136,8 +141,8 @@ export const ROLES = {
136
141
  // the index, and ends on the plan in its sheet, which the circuit writes at the ticket. At the
137
142
  // tri of the discoveries, it reads each one and its parent, the commit of main and its history
138
143
  // (`git show`, `git log`, in its working directory, the main tree, or by `git -C`), and builds
139
- // a package before it judges an error of types of its export; no pass (grillhouse-0yu.5). Its
140
- // instruction of the tri lists these commands (`commandesPermises`, grillhouse-6ve).
144
+ // a package before it judges an error of types of its export; it has no pass. Its
145
+ // instruction of the tri lists these commands (`commandesPermises`).
141
146
  explorateur: {
142
147
  metacadre: true,
143
148
  index: true,
@@ -370,7 +375,7 @@ function reglagesDuRole(role, { racine, copie = racine, ticket, home }) {
370
375
  .filter(g => !g.startsWith(GREFFON_DU_CADRE))
371
376
  .map(g => [g, false])
372
377
  ),
373
- env: SANS_TACHE_DE_FOND,
378
+ env: ENV_DES_SEANCES,
374
379
  };
375
380
  // The write lock runs the frame of the main tree, never the copy's; a copy that is the root keeps
376
381
  // the project's own command.
@@ -2,7 +2,7 @@
2
2
  // scope again and keeps the last reading; when the pass has gone without writing its final line
3
3
  // (SIGKILL, the watch of the memory), it writes the line « interrompue » with that reading. Started
4
4
  // by `scopeSystemd` (./consommation-des-passes.mjs); a pass that ends by itself leaves the marker
5
- // file `<id>.fin` the sampler removes.
5
+ // file `<id>.fin` the sampler removes. Architecture: docs/architecture/machine.md (§3.1, §5.6).
6
6
  import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
7
7
  import path from 'node:path';
8
8
  import { pathToFileURL } from 'node:url';
@@ -1,6 +1,6 @@
1
- // The external effects of the circuit, as data, and their one writer (docs/ARCHITECTURE.md, the
2
- // workflow of a ticket: « une activité, un effet, une clé »), as a functional core hands its
3
- // imperative shell what to write. The code of the circuit that the workflow of a ticket runs
1
+ // The external effects of the circuit, as data, and their one writer (circuit.md §3.1, « Écrivain
2
+ // des effets »; §2.3, §4.3): a functional core hands its imperative shell what to write. The code
3
+ // of the circuit that the workflow of a ticket runs
4
4
  // (scripts/circuit.mjs, scripts/seances.mjs, scripts/activites.mjs, scripts/ticket-du-circuit.mjs),
5
5
  // and the queue of a project its comments (scripts/integration/file.mjs), write nothing outside
6
6
  // themselves: it emits each effect (`emettre`). An effect emitted outside an act is played
@@ -1,5 +1,5 @@
1
1
  // The generated files a project keeps committed, and their regeneration on a tree where a lot is
2
- // applied. As npm writes package-lock.json again after a merge instead of merging it, and as a
2
+ // applied (packages/grillhouse/docs/architecture/entree.md §3.1 « Actes de la file », §5.1). As npm writes package-lock.json again after a merge instead of merging it, and as a
3
3
  // genrule of Bazel writes its output again on the merged tree, a derived file is never merged: its
4
4
  // command writes it again from its merged sources.
5
5
  //
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // The exit codes of the envelope and its launcher, named once. `enveloppe.mjs` and the tests
3
3
  // import them; `lancer.sh` reads them through `node codes.mjs`, which prints them as `NAME=value`.
4
+ // Architecture: docs/architecture/machine.md (§5.5).
4
5
  import { pathToFileURL } from 'node:url';
5
6
 
6
7
  // A malformed call: wrong arguments, unknown role, instruction missing or without its ticket.