@roomi-fields/grillhouse 0.49.1 → 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 (308) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +16 -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/package.json +1 -1
  72. package/scripts/abi-des-dependances.mjs +2 -1
  73. package/scripts/activites.mjs +8 -8
  74. package/scripts/aiguillage.mjs +4 -4
  75. package/scripts/arbitrages.mjs +1 -1
  76. package/scripts/arbres-juges.mjs +2 -1
  77. package/scripts/attente-de-la-machine.mjs +10 -16
  78. package/scripts/avancement.mjs +2 -0
  79. package/scripts/base-des-workflows.mjs +2 -1
  80. package/scripts/binaires.mjs +2 -1
  81. package/scripts/branche-de-nuit.mjs +2 -1
  82. package/scripts/cadre.mjs +12 -3
  83. package/scripts/ci-de-main.mjs +2 -1
  84. package/scripts/circuit.mjs +101 -618
  85. package/scripts/circuits-cles.mjs +4 -6
  86. package/scripts/circuits-du-serveur.mjs +1 -1
  87. package/scripts/codes-de-sortie.mjs +1 -1
  88. package/scripts/coeurs-dedies.mjs +2 -4
  89. package/scripts/commande-du-langage.mjs +2 -0
  90. package/scripts/commandes-composees.mjs +3 -3
  91. package/scripts/commandes-du-path.mjs +1 -1
  92. package/scripts/composants-affectes.mjs +3 -1
  93. package/scripts/composition-des-langages.mjs +2 -0
  94. package/scripts/conformite.d.ts +2 -1
  95. package/scripts/conformite.mjs +2 -0
  96. package/scripts/consommation-des-passes.mjs +5 -4
  97. package/scripts/consommation.mjs +1 -0
  98. package/scripts/copies-finies.mjs +9 -10
  99. package/scripts/crochets.mjs +2 -1
  100. package/scripts/depart-du-ticket.mjs +2 -2
  101. package/scripts/dependances-internes.mjs +4 -2
  102. package/scripts/dernier-vert.mjs +3 -3
  103. package/scripts/dette.d.ts +2 -1
  104. package/scripts/dette.mjs +2 -0
  105. package/scripts/direct.mjs +2 -1
  106. package/scripts/disque-des-copies.mjs +1 -1
  107. package/scripts/donnees-cles.mjs +2 -0
  108. package/scripts/droits.mjs +5 -6
  109. package/scripts/echantillonneur-de-la-passe.mjs +1 -1
  110. package/scripts/effets.mjs +3 -3
  111. package/scripts/engendres.mjs +1 -1
  112. package/scripts/enveloppe/codes.mjs +1 -0
  113. package/scripts/enveloppe/enveloppe.mjs +61 -84
  114. package/scripts/enveloppe/lancer.sh +5 -3
  115. package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
  116. package/scripts/enveloppe/travail-de-la-copie.mjs +11 -16
  117. package/scripts/etapes.mjs +10 -9
  118. package/scripts/etat-du-depot.mjs +2 -1
  119. package/scripts/faits-du-circuit.mjs +19 -19
  120. package/scripts/fermeture-de-la-machine.mjs +2 -2
  121. package/scripts/fichier-du-poste.mjs +3 -4
  122. package/scripts/fichiers-nommes.mjs +2 -1
  123. package/scripts/file-des-tickets.mjs +3 -1
  124. package/scripts/flux-de-la-nuit.mjs +2 -1
  125. package/scripts/flux-des-paquets.mjs +2 -1
  126. package/scripts/fusion-du-changelog.mjs +2 -1
  127. package/scripts/garde-de-la-memoire.mjs +1 -1
  128. package/scripts/gardes-du-cadre.mjs +2 -0
  129. package/scripts/greffons.mjs +2 -2
  130. package/scripts/grillhouse-maj.mjs +55 -150
  131. package/scripts/groupe-cles.mjs +2 -1
  132. package/scripts/index-interfaces.mjs +2 -0
  133. package/scripts/init.mjs +2 -1
  134. package/scripts/integration/file.mjs +3 -3
  135. package/scripts/integration/integrer.mjs +5 -6
  136. package/scripts/integration/rejeu.mjs +4 -2
  137. package/scripts/integration/verdict.mjs +2 -1
  138. package/scripts/jointure.d.ts +2 -1
  139. package/scripts/journal-des-etats.mjs +2 -2
  140. package/scripts/langages/cargo/binaires.mjs +3 -2
  141. package/scripts/langages/cargo/clippy.mjs +2 -0
  142. package/scripts/langages/cargo/commandes.mjs +72 -17
  143. package/scripts/langages/cargo/composants.mjs +4 -3
  144. package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
  145. package/scripts/langages/cargo/etiquettes.mjs +87 -0
  146. package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
  147. package/scripts/langages/cargo/exemples.mjs +6 -4
  148. package/scripts/langages/cargo/frontieres.mjs +2 -0
  149. package/scripts/langages/cargo/index-interfaces.mjs +2 -0
  150. package/scripts/langages/cargo/index.mjs +8 -9
  151. package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
  152. package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
  153. package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
  154. package/scripts/langages/cargo/sccache.mjs +10 -6
  155. package/scripts/langages/cargo/squelette.mjs +2 -0
  156. package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
  157. package/scripts/langages/cargo/verdict.mjs +8 -6
  158. package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
  159. package/scripts/langages/typescript/code-mort.mjs +2 -1
  160. package/scripts/langages/typescript/composants.mjs +7 -5
  161. package/scripts/langages/typescript/consommateurs-arbitres.mjs +2 -1
  162. package/scripts/langages/typescript/consommateurs.d.ts +2 -1
  163. package/scripts/langages/typescript/consommateurs.mjs +5 -7
  164. package/scripts/langages/typescript/construire.mjs +2 -1
  165. package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
  166. package/scripts/langages/typescript/exemples.mjs +2 -1
  167. package/scripts/langages/typescript/frontieres.mjs +3 -2
  168. package/scripts/langages/typescript/index-interfaces.mjs +3 -2
  169. package/scripts/langages/typescript/index.mjs +3 -2
  170. package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
  171. package/scripts/langages/typescript/lecteurs.mjs +2 -1
  172. package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
  173. package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
  174. package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
  175. package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
  176. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
  177. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
  178. package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
  179. package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
  180. package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
  181. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
  182. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
  183. package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
  184. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
  185. package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
  186. package/scripts/langages/typescript/module-absent.mjs +2 -1
  187. package/scripts/langages/typescript/parcours.mjs +2 -1
  188. package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
  189. package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
  190. package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
  191. package/scripts/langages/typescript/resumes.mjs +2 -1
  192. package/scripts/langages/typescript/squelette.mjs +2 -1
  193. package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
  194. package/scripts/langages/typescript/tests-de-nuit.mjs +5 -4
  195. package/scripts/langages/typescript/tests-du-poste.mjs +2 -1
  196. package/scripts/langages/typescript/tests.mjs +44 -66
  197. package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
  198. package/scripts/langages/typescript/tranches.mjs +2 -1
  199. package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
  200. package/scripts/langages/typescript/verdict.mjs +2 -1
  201. package/scripts/langages/typescript/verifier.mjs +64 -99
  202. package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
  203. package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
  204. package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
  205. package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
  206. package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
  207. package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
  208. package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
  209. package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
  210. package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
  211. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
  212. package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
  213. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
  214. package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
  215. package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
  216. package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
  217. package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
  218. package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
  219. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  220. package/scripts/langages-des-paquets.mjs +3 -1
  221. package/scripts/langages.mjs +5 -3
  222. package/scripts/lecture-unique.mjs +2 -1
  223. package/scripts/lint-des-scripts.mjs +1 -0
  224. package/scripts/machine.mjs +4 -4
  225. package/scripts/matiere-de-test.d.ts +2 -1
  226. package/scripts/matieres-lues.mjs +2 -0
  227. package/scripts/mesure/avancement.mjs +1 -1
  228. package/scripts/mesure/base-de-passe.mjs +10 -13
  229. package/scripts/mesure/pression.mjs +3 -4
  230. package/scripts/mesure-de-la-machine.mjs +2 -1
  231. package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
  232. package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
  233. package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
  234. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
  235. package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
  236. package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
  237. package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
  238. package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
  239. package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
  240. package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
  241. package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
  242. package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
  243. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
  244. package/scripts/migrations/0.33.0-node-26.mjs +5 -8
  245. package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
  246. package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
  247. package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
  248. package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
  249. package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
  250. package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
  251. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
  252. package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
  253. package/scripts/migrations-des-gardes.mjs +2 -0
  254. package/scripts/migrations.mjs +4 -0
  255. package/scripts/nuit.sh +7 -5
  256. package/scripts/outil.mjs +2 -1
  257. package/scripts/outils-cles.mjs +6 -6
  258. package/scripts/paquet-npm.mjs +3 -2
  259. package/scripts/paquet.mjs +3 -4
  260. package/scripts/paquets.d.ts +1 -1
  261. package/scripts/paquets.mjs +2 -0
  262. package/scripts/passe-de-la-machine.mjs +9 -12
  263. package/scripts/places-de-la-machine.mjs +36 -53
  264. package/scripts/places-du-serveur.mjs +5 -4
  265. package/scripts/plafond-de-la-machine.mjs +19 -19
  266. package/scripts/poussee-retiree.mjs +2 -1
  267. package/scripts/prefixe-des-tickets.mjs +1 -0
  268. package/scripts/preparation.mjs +2 -1
  269. package/scripts/recommencer.mjs +2 -2
  270. package/scripts/references-changees.mjs +1 -1
  271. package/scripts/registre-des-resultats.mjs +3 -1
  272. package/scripts/regles-des-places.mjs +4 -6
  273. package/scripts/repli-de-la-nuit.mjs +2 -1
  274. package/scripts/reponses-du-circuit.mjs +4 -3
  275. package/scripts/reprise.mjs +3 -2
  276. package/scripts/resultats.mjs +71 -93
  277. package/scripts/retirer-copie.sh +2 -1
  278. package/scripts/retirer-les-copies-finies.mjs +2 -1
  279. package/scripts/seances.mjs +3 -2
  280. package/scripts/services-du-noyau.mjs +2 -0
  281. package/scripts/session-start.sh +0 -6
  282. package/scripts/sortie.mjs +2 -1
  283. package/scripts/sources.mjs +2 -0
  284. package/scripts/sous-commandes.mjs +2 -1
  285. package/scripts/sous-modules.sh +24 -43
  286. package/scripts/style-a-l-ecriture.mjs +2 -0
  287. package/scripts/tableau-des-composants.mjs +5 -7
  288. package/scripts/taches-du-graphe.mjs +3 -0
  289. package/scripts/ticket-du-circuit.mjs +1 -1
  290. package/scripts/transitions.mjs +15 -15
  291. package/scripts/un-commit-par-ticket.mjs +2 -1
  292. package/scripts/verdict-de-la-nuit.mjs +2 -1
  293. package/scripts/verrou-de-fichier.mjs +1 -0
  294. package/scripts/verrous/commande.mjs +2 -1
  295. package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
  296. package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
  297. package/scripts/verrous/verrou.mjs +3 -3
  298. package/scripts/workflows-du-cadre.mjs +2 -1
  299. package/skills/developpeur/SKILL.md +6 -10
  300. package/skills/explorateur/SKILL.md +1 -1
  301. package/skills/grill/SKILL.md +4 -5
  302. package/skills/grill/references/paquets.md +5 -8
  303. package/skills/pitmaster/SKILL.md +176 -268
  304. package/skills/pitmaster/references/cadre.md +7 -6
  305. package/skills/pitmaster/references/consigne-agent.md +36 -32
  306. package/skills/pitmaster/references/tour.md +2 -2
  307. package/skills/redacteur/references/documents-d-un-composant.md +9 -8
  308. package/skills/testwriter/SKILL.md +8 -11
@@ -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]
@@ -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
@@ -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
  //
@@ -136,8 +135,8 @@ export const ROLES = {
136
135
  // the index, and ends on the plan in its sheet, which the circuit writes at the ticket. At the
137
136
  // tri of the discoveries, it reads each one and its parent, the commit of main and its history
138
137
  // (`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).
138
+ // a package before it judges an error of types of its export; it has no pass. Its
139
+ // instruction of the tri lists these commands (`commandesPermises`).
141
140
  explorateur: {
142
141
  metacadre: true,
143
142
  index: true,
@@ -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.
@@ -1,110 +1,87 @@
1
1
  #!/usr/bin/env node
2
2
  // The envelope of a role agent: runs a command (the agent's `claude` session) inside a bwrap
3
- // sandbox that shows the agent the whole copy and opens in writing only the packages of its plan,
4
- // as the visibility of Bazel and the module boundaries of Nx refuse a dependency while the code
5
- // stays readable. `npx grillhouse enveloppe <copie> <paquets> <rôle> -- <commande…>`
3
+ // sandbox that shows the agent the whole copy and opens in writing only the packages of its plan.
4
+ // `npx grillhouse enveloppe <copie> <paquets> <rôle> -- <commande…>`: <copie> is the agent's git
5
+ // worktree, <paquets> the plan (the paths it names inside it, in the variable's form,
6
+ // `ecrireLaListe` of paquets-du-plan.mjs), <rôle> the agent's role. Architecture:
7
+ // docs/architecture/machine.md (§2.5, §5.5 « Les montages de l'enveloppe »).
6
8
  //
7
9
  // - The root `/` is read-only, the copy included, its indexes (`.codegraph`, `.rtfm`) and every
8
- // package outside the plan in sight. Only these are written: the packages of the plan, below; a
9
- // `/tmp` empty and proper to the session, where only the scratchpad directory of the copy comes
10
- // back, the session's working directory inside it (`dossierDeTravail`; Claude Code's
11
- // scratchpads root, `CLAUDE_CODE_TMPDIR` else the launch's temporary directory, so that under a
12
- // pass it lies in the base of the pass and goes with it); the npm cache; the Claude session
13
- // state (`~/.claude` and the copy's project directory), whose configuration, skills, plugins and
14
- // other projects stay read-only. `~/.claude.json` is a throwaway copy: the session writes it,
15
- // the real file does not change. The tickets base (the main tree's `.beads/`) is written: the
16
- // agent claims, plans, hands over and files what it finds. Every `.git`, the copy's included,
17
- // stays read-only: the agent reads the git state and delivers a patch (`git diff`, and
18
- // `git diff --no-index /dev/null <file>` for a new file); it never commits.
10
+ // package outside the plan. Written: the packages of the plan; a `/tmp` empty and proper to the
11
+ // session, where only the scratchpad directory of the copy comes back, the session's working
12
+ // directory inside it (`dossierDeTravail`; Claude Code's scratchpads root, `CLAUDE_CODE_TMPDIR`
13
+ // else the launch's temporary directory); the npm cache; the Claude session state (`~/.claude`
14
+ // and the copy's project directory), whose configuration, skills, plugins and other projects
15
+ // stay read-only; the tickets base (the main tree's `.beads/`). `~/.claude.json` is a throwaway
16
+ // copy. Every `.git`, the copy's included, stays read-only: the agent delivers a patch
17
+ // (`git diff`, and `git diff --no-index /dev/null <file>` for a new file); it never commits.
19
18
  // - Where the tools of the project's language write is what its module declares (`sorties`,
20
- // scripts/jointure.d.ts; `sortiesDuLangage`), as a sandbox of Bazel opens in writing what the
21
- // action declares: its stores, in the main tree (`//…`, TypeScript's cache of Turborepo, shared
22
- // by every copy) or in the home (`~/…`, cargo's registry, git dependencies, advisories and the
23
- // lock and cache files at the root of `~/.cargo`), are written, so the agent's runs of `npm
24
- // test` keep their work there, as every copy's runs do; what its tools read (cargo's home,
25
- // `~/.cargo` with its `env`, its configuration and its binaries, and rustup's `~/.rustup`) comes
26
- // back read-only under them, nothing a shell sources written; its outputs in the copy (cargo's
27
- // `target`) come back in writing; and its outputs proper to the session (TypeScript's `.turbo`
28
- // and `.cache-outils`, the cache of Vite included) are below. Each written path is created on disk before the session,
29
- // a directory or, without a trailing `/` in the module's list, an empty file, so that bwrap
30
- // mounts it.
31
- // - The home and the session directories (`$XDG_RUNTIME_DIR`, `/run/user/<uid>`) show only what
32
- // the envelope declares: each starts empty and sealed read-only, and the home gets back
33
- // `~/.claude`, `~/.claude.json`, the npm cache, the paths of `MAISON_EN_LECTURE` (claude, node,
34
- // git and the session's tools) and the repository. No socket of the session comes back. Of
35
- // the machine's credentials, only claude's own are in sight: the file of the remote cache of
36
- // the poste (`~/.config/grillhouse/`, scripts/fichier-du-poste.mjs) stays out, and the
37
- // session's runs keep to the local cache of the main tree that every copy shares.
19
+ // scripts/jointure.d.ts; `sortiesDuLangage`): its stores, in the main tree (`//…`, TypeScript's
20
+ // cache of Turborepo, shared by every copy) or in the home (`~/…`, cargo's registry, git
21
+ // dependencies, advisories and the lock and cache files at the root of `~/.cargo`), are
22
+ // written; what its tools read (`~/.cargo` with its `env`, its configuration and its binaries,
23
+ // and `~/.rustup`) comes back read-only under them; its outputs in the copy (cargo's `target`)
24
+ // come back in writing; its outputs proper to the session (TypeScript's `.turbo` and
25
+ // `.cache-outils`, the cache of Vite) are empty and proper to it. Each written path is created
26
+ // on disk before the session, a directory or, without a trailing `/` in the module's list, an
27
+ // empty file, so that bwrap mounts it.
28
+ // - The home and the session directories (`$XDG_RUNTIME_DIR`, `/run/user/<uid>`) start empty and
29
+ // sealed read-only; the home gets back `~/.claude`, `~/.claude.json`, the npm cache, the paths
30
+ // of `MAISON_EN_LECTURE` (claude, node, git and the session's tools) and the repository. No
31
+ // socket of the session comes back. The file of the remote cache of the poste
32
+ // (`~/.config/grillhouse/`, scripts/fichier-du-poste.mjs) stays out.
38
33
  // - A project that names its published version (`grillhouse.outil`) gets `~/.cache/grillhouse/outil`
39
34
  // read-only, the version installed by the envelope before the session starts: the write lock
40
35
  // runs on that version, never on the code of the copy it guards.
41
36
  // - The tools of the project (`grillhouse.outils` of the package.json of the main tree, never of
42
- // the copy, so that an agent never opens a path for its next session; `{ "<VARIABLE>":
43
- // "<chemin>" }`, read by scripts/outils-cles.mjs), as Bazel declares what an action sees out of
44
- // its sandbox and the environment it gets: each path comes back read-only after the declared
45
- // paths of the home, before the copy and the packages of the plan, which come back in writing
46
- // over it, and each variable reaches the session, the path resolved. A tool never covers a mount
47
- // of the envelope: a path is refused when it is `/`, the home or holds it, holds the main tree,
48
- // `/tmp`, the temporary directories, `~/.claude`, the scratchpads, the npm cache or a session
49
- // directory, or lies under a hidden directory of the first level of the home (`~/.ssh`,
50
- // `~/.gnupg`, `~/.aws`, `~/.config`…) but `~/.local` and `~/.cache`, or lies under or holds the
51
- // keyrings `~/.local/share/keyrings`; a link is judged by its target too. A faulty key refuses the
52
- // envelope, by its name, before anything is prepared.
53
- // - The session gets only the environment the envelope declares (`environnementDeLaSeance`), as
54
- // sudo's env_reset and bwrap's --clearenv give it: the base of a login session, claude's own
55
- // configuration and credentials (`ANTHROPIC_*`, `CLAUDE_CODE_OAUTH_TOKEN`), the author of its
56
- // comments at the ticket (`BEADS_ACTOR`, which bd reads), the npm cache it
57
- // mounts, `npm_config_ignore_scripts=true`, and `TMPDIR`, `TMP` and `TEMP`, the session's working
58
- // directory, where `mktemp`, `os.tmpdir()` and Python's `tempfile` write: under a launch, in the
59
- // temporary directory of the ticket (scripts/enveloppe/lancer.sh), which goes with the ticket. With it npm runs no lifecycle script (`npm install` leaves the
60
- // `prepare` that writes under the read-only `.git`; the launcher installs outside the session),
61
- // while `npm test` and `npm run <script>` still run their script, without its `pre` or `post`
62
- // (npm's `ignore-scripts`, docs/content/using-npm/config.md); no script of the frame has one. bwrap
63
- // starts with that environment alone, so no other variable of the machine (`GH_TOKEN`,
64
- // `NPM_TOKEN`…) enters, by name or by argument. The session also gets `GRILLHOUSE_ENVELOPPE`, the
65
- // packages of the plan (`paquets-du-plan.mjs`): the frame's commands build, judge and write those
66
- // packages only, and its lock refuses a write out of them. A declared variable that names a path
67
- // (`VARIABLES_DE_CHEMIN`) enters only when its path is in sight inside the envelope, tested there
68
- // before the command runs. The session has its own process space: it reads the environment of
69
- // no process of the machine.
37
+ // the copy; `{ "<VARIABLE>": "<chemin>" }`, read by scripts/outils-cles.mjs): each path comes
38
+ // back read-only after the declared paths of the home, before the copy and the packages of the
39
+ // plan, which come back in writing over it, and each variable reaches the session, the path
40
+ // resolved. A tool never covers a mount of the envelope: a path is refused when it is `/`, the
41
+ // home or holds it, holds the main tree, `/tmp`, the temporary directories, `~/.claude`, the
42
+ // scratchpads, the npm cache or a session directory, or lies under a hidden directory of the
43
+ // first level of the home (`~/.ssh`, `~/.gnupg`, `~/.aws`, `~/.config`…) but `~/.local` and
44
+ // `~/.cache`, or lies under or holds the keyrings `~/.local/share/keyrings`; a link is judged
45
+ // by its target too. A faulty key refuses the envelope, by its name, before anything is
46
+ // prepared.
47
+ // - The session gets only the environment the envelope declares (`environnementDeLaSeance`): the
48
+ // base of a login session, claude's own configuration and credentials (`ANTHROPIC_*`,
49
+ // `CLAUDE_CODE_OAUTH_TOKEN`), the author of its comments at the ticket (`BEADS_ACTOR`), the npm
50
+ // cache, `npm_config_ignore_scripts=true` (npm runs no lifecycle script; `npm test` and
51
+ // `npm run <script>` still run their script, without its `pre` or `post`), and `TMPDIR`, `TMP`
52
+ // and `TEMP`, the session's working directory (under a launch, the temporary directory of the
53
+ // ticket, scripts/enveloppe/lancer.sh). No other variable of the machine (`GH_TOKEN`,
54
+ // `NPM_TOKEN`…) enters. It also gets `GRILLHOUSE_ENVELOPPE`, the packages of the plan
55
+ // (`paquets-du-plan.mjs`): the frame's commands build, judge and write those packages only, and
56
+ // its lock refuses a write out of them. A declared variable that names a path
57
+ // (`VARIABLES_DE_CHEMIN`) enters only when its path is in sight inside the envelope. The
58
+ // session has its own process space.
70
59
  // - A declared path that is a symbolic link, or that holds one among its components, comes back as
71
60
  // that link, and its target with it (`avecLiens`); a store, a read or a written output is mounted
72
- // at its real path, never at a link, by that same mechanism.
61
+ // at its real path, never at a link.
73
62
  // - A worktree of the repository under an emptied directory (the home, `/tmp`) comes back
74
- // read-only, `.git` included; the copy's packages of the plan and the tickets base are then
75
- // written as above. The copy of another ticket is an optional mount (`--ro-bind-try`): its
76
- // circuit removes it at any moment, and the session leaves without it.
63
+ // read-only, `.git` included. The copy of another ticket is an optional mount
64
+ // (`--ro-bind-try`): its circuit removes it at any moment, and the session leaves without it.
77
65
  // - An envelope on the main tree is refused, so is a plan that names no package, and so is a path
78
66
  // of the plan that does not exist; when it is the name of a package of the copy, the refusal
79
67
  // gives its path.
80
- // - <copie> is the agent's git worktree; <paquets> is the plan, the paths it names inside it
81
- // (`packages/a`, or `src/parser` in a one-package project), in the variable's form
82
- // (`ecrireLaListe` of paquets-du-plan.mjs); <rôle> is the agent's role (`testwriter`,
83
- // `developpeur`…).
84
68
  // - The plan writes, for each of its paths, the component of the copy that holds it (`ecritsDuPlan`,
85
69
  // the components of the module of the language, `paquetsDuLangage`: a package of TypeScript, a
86
- // crate of cargo), as a sandbox of Bazel or of Nix opens in writing only
87
- // what the action declares: the rest of the copy is read-only, the folders of its root that no
88
- // package holds (`libraries/`, `spec/`) included, and a write there fails on « Read-only file
89
- // system », which the agent sees. Where the language's tools write at the root of the copy is
90
- // then an empty directory proper to the session, or comes back in writing, as its module
91
- // declares. A component writes itself alone, a crate or a package, `src/parser` of a
92
- // one-package project included (a component of the module typescript), as does a package out of
93
- // the frame (`docs/agents/hors-cadre.txt`). A path that no component holds (a folder of the
94
- // root, `scripts`; `.`) writes the package that holds it, the root: the copy stays written, its
95
- // `.git` read-only.
70
+ // crate of cargo); the rest of the copy is read-only, the folders of its root that no package
71
+ // holds (`libraries/`, `spec/`) included, and a write there fails on « Read-only file system ».
72
+ // A component writes itself alone, `src/parser` of a one-package project included, as does a
73
+ // package out of the frame (`docs/agents/hors-cadre.txt`). A path that no component holds (a
74
+ // folder of the root, `scripts`; `.`) writes the package that holds it, the root: the copy
75
+ // stays written, its `.git` read-only.
96
76
  // - The package of the shared test material is every component of <copie> whose `package.json`
97
77
  // exports `./test-fixtures` (`matieres` of the module of the language). It is mounted after the
98
78
  // packages of the plan: written for the `testwriter`, read-only for every other role, in the
99
79
  // plan or not. For such a role, where a run of its tests writes in it (the module's outputs
100
80
  // proper to the session: Turborepo's task logs, Vite's cache) is an empty directory proper to
101
- // the session, as Bazel writes a test's logs out of its source: what is written there leaves no
102
- // trace. The envelope creates each of them on disk, empty, before the session, so that bwrap
103
- // mounts over it inside the read-only package.
81
+ // the session, created on disk before it, so that bwrap mounts over it.
104
82
  // - The lock files of the versions at the root of the copy (`manifestes.verrous` of the module of
105
- // the language: cargo's Cargo.lock), which a run of the tests brings in line with the
106
- // dependencies of the tests the testwriter declares, come back in writing for the `testwriter`
107
- // alone, when the plan leaves the root read-only and the file exists.
83
+ // the language: cargo's Cargo.lock) come back in writing for the `testwriter` alone, when the
84
+ // plan leaves the root read-only and the file exists.
108
85
  // - The exit codes are named in `codes.mjs`.
109
86
  import { execFileSync, spawnSync } from 'node:child_process';
110
87
  import {