@roomi-fields/grillhouse 0.50.3 → 0.52.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 (150) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +68 -0
  3. package/agents/developpeur.md +1 -1
  4. package/agents/direct.md +1 -1
  5. package/agents/explorateur.md +1 -1
  6. package/agents/questionneur.md +1 -1
  7. package/agents/relecteur.md +1 -1
  8. package/agents/testwriter.md +1 -1
  9. package/cadre/templates/c/package.json +1 -0
  10. package/cadre/templates/cargo/package.json +1 -0
  11. package/cadre/templates/python/package.json +1 -0
  12. package/charte/plan.md +47 -0
  13. package/charte/preuve.md +39 -0
  14. package/charte/superviseur.md +61 -0
  15. package/charte/tests.md +38 -0
  16. package/charte.md +39 -189
  17. package/dist/machine/part-par-sorte.d.ts +16 -0
  18. package/dist/machine/part-par-sorte.js +36 -0
  19. package/dist/machine/part-par-sorte.js.map +1 -0
  20. package/dist/temporal/circuit/appel.js +1 -1
  21. package/dist/temporal/circuit/appel.js.map +1 -1
  22. package/dist/temporal/circuit/client.d.ts +4 -4
  23. package/dist/temporal/circuit/client.js +38 -16
  24. package/dist/temporal/circuit/client.js.map +1 -1
  25. package/dist/temporal/circuit/contrat.d.ts +11 -7
  26. package/dist/temporal/circuit/contrat.js +5 -9
  27. package/dist/temporal/circuit/contrat.js.map +1 -1
  28. package/dist/temporal/circuit/deroule.js +18 -6
  29. package/dist/temporal/circuit/deroule.js.map +1 -1
  30. package/dist/temporal/commande.js +12 -3
  31. package/dist/temporal/commande.js.map +1 -1
  32. package/dist/temporal/installation.d.ts +54 -3
  33. package/dist/temporal/installation.js +187 -17
  34. package/dist/temporal/installation.js.map +1 -1
  35. package/dist/temporal/places/client.d.ts +5 -1
  36. package/dist/temporal/places/client.js +23 -11
  37. package/dist/temporal/places/client.js.map +1 -1
  38. package/docs/ARCHITECTURE.md +23 -2700
  39. package/docs/INTERFACE.md +26 -10
  40. package/docs/architecture/circuit.md +61 -14
  41. package/docs/architecture/entree.md +21 -8
  42. package/docs/architecture/greffon.md +49 -20
  43. package/docs/architecture/installation.md +46 -17
  44. package/docs/architecture/machine.md +79 -39
  45. package/docs/architecture/tests.md +59 -16
  46. package/docs/lexique.md +163 -0
  47. package/hooks/hooks.json +0 -10
  48. package/hooks/register.tsx +92 -4
  49. package/package.json +2 -1
  50. package/scripts/activites.mjs +105 -65
  51. package/scripts/aiguillage.mjs +15 -8
  52. package/scripts/attente-au-tour.mjs +2 -3
  53. package/scripts/attente-de-la-machine.mjs +4 -8
  54. package/scripts/avancement.mjs +12 -8
  55. package/scripts/bilan.mjs +126 -63
  56. package/scripts/bilans-gardes.mjs +37 -0
  57. package/scripts/branche-de-nuit.mjs +2 -2
  58. package/scripts/ci-de-main.mjs +18 -21
  59. package/scripts/circuit.mjs +89 -44
  60. package/scripts/circuits-du-serveur.mjs +5 -5
  61. package/scripts/composants-affectes.mjs +30 -12
  62. package/scripts/composition-des-langages.mjs +5 -3
  63. package/scripts/conformite.mjs +1 -1
  64. package/scripts/consommation-des-passes.mjs +8 -6
  65. package/scripts/copies-finies.mjs +3 -14
  66. package/scripts/depart-du-ticket.d.mts +8 -2
  67. package/scripts/depart-du-ticket.mjs +26 -8
  68. package/scripts/direct.mjs +158 -72
  69. package/scripts/droits.mjs +165 -208
  70. package/scripts/engendres.mjs +3 -14
  71. package/scripts/entree-de-seance.mjs +35 -0
  72. package/scripts/enveloppe/enveloppe.mjs +98 -46
  73. package/scripts/enveloppe/lancer.sh +90 -66
  74. package/scripts/enveloppe/paquets-du-plan.mjs +38 -11
  75. package/scripts/enveloppe/travail-de-la-copie.mjs +192 -3
  76. package/scripts/etapes.mjs +84 -22
  77. package/scripts/faits-du-circuit.mjs +8 -2
  78. package/scripts/grillhouse-maj.mjs +43 -18
  79. package/scripts/groupe-cles.d.mts +15 -0
  80. package/scripts/groupe-cles.mjs +77 -2
  81. package/scripts/init.mjs +9 -2
  82. package/scripts/integration/rejeu.mjs +8 -1
  83. package/scripts/jointure.d.ts +24 -4
  84. package/scripts/langages/c/index.mjs +5 -2
  85. package/scripts/langages/cargo/commandes.mjs +35 -15
  86. package/scripts/langages/cargo/composants.mjs +45 -3
  87. package/scripts/langages/cargo/index.mjs +6 -3
  88. package/scripts/langages/python/commandes.mjs +50 -7
  89. package/scripts/langages/python/index.mjs +5 -2
  90. package/scripts/langages/python/squelette.mjs +2 -1
  91. package/scripts/langages/typescript/chemins-des-tests.mjs +1 -1
  92. package/scripts/langages/typescript/index.mjs +16 -14
  93. package/scripts/langages/typescript/mise-a-jour.mjs +1 -1
  94. package/scripts/langages/typescript/rapports-aux-lignes.mjs +74 -0
  95. package/scripts/langages/typescript/turbo-des-paquets.mjs +151 -38
  96. package/scripts/langages/typescript/verdict.mjs +29 -3
  97. package/scripts/langages/typescript/verifier.mjs +28 -3
  98. package/scripts/langages/typescript/vitest-config/changements.mjs +8 -6
  99. package/scripts/langages/typescript/vitest-config/lances.mjs +15 -32
  100. package/scripts/langages.mjs +54 -4
  101. package/scripts/matieres-lues.mjs +1 -1
  102. package/scripts/mesure/base-de-passe.mjs +32 -90
  103. package/scripts/migrations/serveurs-de-l-index.mjs +79 -0
  104. package/scripts/migrations/suivi-du-superviseur-retire.mjs +56 -0
  105. package/scripts/migrations.mjs +23 -7
  106. package/scripts/nuit.sh +3 -2
  107. package/scripts/paquet.mjs +1 -1
  108. package/scripts/paquets.d.ts +3 -0
  109. package/scripts/paquets.mjs +88 -1
  110. package/scripts/passe-de-la-machine.mjs +109 -36
  111. package/scripts/places-de-la-machine.mjs +81 -29
  112. package/scripts/plafond-de-la-machine.d.mts +2 -5
  113. package/scripts/plafond-de-la-machine.mjs +9 -9
  114. package/scripts/reprise.mjs +42 -13
  115. package/scripts/resultats.mjs +78 -56
  116. package/scripts/retirer-les-copies-finies.mjs +1 -1
  117. package/scripts/seances.mjs +471 -133
  118. package/scripts/services-du-noyau.mjs +9 -1
  119. package/scripts/session-start.sh +22 -7
  120. package/scripts/sortie-de-seance.mjs +70 -0
  121. package/scripts/sortie.mjs +37 -6
  122. package/scripts/sous-commandes.mjs +0 -3
  123. package/scripts/superviseur.mjs +400 -162
  124. package/scripts/tableau.mjs +188 -65
  125. package/scripts/transitions.d.mts +25 -2
  126. package/scripts/transitions.mjs +137 -29
  127. package/scripts/verrous/ecriture-hors-enveloppe.mjs +31 -9
  128. package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
  129. package/skills/developpeur/SKILL.md +38 -15
  130. package/skills/direct/SKILL.md +29 -9
  131. package/skills/domain-modeling/GLOSSARY-FORMAT.md +9 -9
  132. package/skills/domain-modeling/SKILL.md +14 -12
  133. package/skills/explorateur/SKILL.md +32 -8
  134. package/skills/grill/SKILL.md +3 -2
  135. package/skills/pitmaster/SKILL.md +80 -50
  136. package/skills/pitmaster/references/cadre.md +1 -1
  137. package/skills/pitmaster/references/consigne-agent.md +12 -11
  138. package/skills/pitmaster/references/tour.md +6 -5
  139. package/skills/relecteur/SKILL.md +13 -6
  140. package/skills/systematic-debugging/SKILL.md +281 -0
  141. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  142. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  143. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  144. package/skills/systematic-debugging/find-polluter.sh +72 -0
  145. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  146. package/skills/testwriter/SKILL.md +37 -31
  147. package/cadre/templates/projet/pitmaster/SUIVI.md +0 -22
  148. package/scripts/attente-a-l-arret.mjs +0 -114
  149. package/scripts/verrous/commande.mjs +0 -214
  150. package/scripts/verrous/verrou.mjs +0 -311
@@ -5,30 +5,33 @@
5
5
  // npx grillhouse resultats --schema <rôle> prints the JSON schema of a role's sheet
6
6
  //
7
7
  // - The sheet of the end of a session (« la fiche ») of the explorateur, the questionneur, the
8
- // testwriter, the developpeur and the reviewer: the schema of each role (FICHES), which the
9
- // session receives (`claude -p --output-format json --json-schema <schéma>`) and fills as its
8
+ // testwriter, the developpeur, the agent direct and the reviewer: the schema of each role (FICHES), which the
9
+ // session receives (`claude -p --json-schema <schéma>`) and fills as its
10
10
  // last act, in the field `structured_output` of its result. A field exists only when a reader
11
11
  // reads it:
12
12
  // - `statut` (FAIT, BLOQUÉ, BESOIN), with `raison` for BLOQUÉ and `question` for BESOIN, each
13
13
  // with its `piece`: the circuit goes on, or stops at « hors-portee » or « besoin »
14
- // (testwriter, developpeur, and the explorateur's gesture of a mechanical ticket, its own
14
+ // (testwriter, developpeur, direct, and the explorateur's gesture of a mechanical ticket, its own
15
15
  // schema, `geste`);
16
+ // - `manque` (the path of a file out of the plan a BESOIN sheet lacks): the circuit extends the
17
+ // plan to its package when the ticket names it, else puts its question (testwriter,
18
+ // developpeur, direct);
16
19
  // - `portent_le_travail` (`fichier` from the root, `test` its full name, or none for every test
17
20
  // of the file): the tests of the lot that the proof of the red requires red (testwriter);
18
21
  // - `renvoi` (`role` testwriter): the circuit relaunches the testwriter, then the proof and the
19
22
  // developpeur (developpeur);
20
23
  // - `hors_plan` (`critere` its number, `paquet` the package out of the plan that would hold it,
21
24
  // `piece`): each criterion the session does not hold for want of a package out of the plan; a
22
- // FAIT that carries one stops at « hors-portee » (developpeur);
25
+ // FAIT that carries one stops at « hors-portee » (developpeur, direct);
23
26
  // - `reponses` (`titre` of the finding, `etat` levé or contesté, `raison` for a contesté,
24
27
  // `piece`): a FAIT answers each finding of the reviewer open for its role, by its title (the
25
28
  // number « Constat N — » is recognised, `cleDuConstat`); the circuit refuses a sheet without
26
29
  // the answer to one (`reponsesAuxConstats`), save in a run where the supervisor gives the task
27
30
  // (`--contexte`: the findings open at the run's launch are then its context, the ones a RENDU
28
31
  // states within it still its task, `constatsDeLaSeance` of scripts/circuit.mjs), and gives the
29
- // next review each answer under its finding (developpeur);
32
+ // next review each answer under its finding (developpeur, direct);
30
33
  // - `ecarts` (`sujet`, `texte`): the body of the commit message, written by the circuit, each
31
- // subject once, its value from the last sheet that carries it (developpeur, reviewer);
34
+ // subject once, its value from the last sheet that carries it (developpeur, direct, reviewer);
32
35
  // - `decouvertes` (`sujet`, `corps`): each one a ticket filed closed under the ticket, labelled
33
36
  // `decouverte`, created by the circuit (every role);
34
37
  // - `verdict` (ACCEPTÉ, RENDU), `constats` (`titre`, `corps`, `piece`, `genre` bloquant or
@@ -119,7 +122,7 @@ import path from 'node:path';
119
122
  import { pathToFileURL } from 'node:url';
120
123
  import { refusDeLaCommande } from './commande-du-plan.mjs';
121
124
  import { paquets } from './paquets.mjs';
122
- import { AUTEUR_DU_CIRCUIT, EXPLORATEUR } from './etapes.mjs';
125
+ import { AUTEUR_DU_CIRCUIT, AUTEURS_DE_LOT, EXPLORATEUR } from './etapes.mjs';
123
126
 
124
127
  // The variable that names the results directory of a run.
125
128
  export const RESULTATS = 'GRILLHOUSE_RESULTATS';
@@ -206,6 +209,58 @@ export const SORTES = ['mécanique', 'comportement'];
206
209
  // green), inchangé (a gesture written by hand: the developpeur alone, no testwriter).
207
210
  export const COMPORTEMENTS = ['changé', 'tests-adaptés', 'inchangé'];
208
211
 
212
+ // The file out of the plan a writing role lacks, on a sheet BESOIN: a write out of the plan fails
213
+ // on the mount of the envelope, and the sheet says it (circuit.md §5.5).
214
+ const MANQUE = {
215
+ manque: texte(
216
+ 'BESOIN, quand un fichier hors du plan te manque (son écriture échoue sur le montage) : son chemin depuis la racine de la copie. Le circuit étend le plan quand le ticket le nomme, sinon la question monte.'
217
+ ),
218
+ };
219
+
220
+ // The schema of the sheet of an author of the code (3), the developpeur or the agent direct, with
221
+ // the fields <propres> his role alone has.
222
+ const fiche = (propres = {}) =>
223
+ objet(
224
+ {
225
+ ...STATUT,
226
+ ...MANQUE,
227
+ ...propres,
228
+ hors_plan: liste(
229
+ objet(
230
+ {
231
+ critere: texte('Le numéro du critère du ticket, « 10 ».'),
232
+ paquet: texte('Le paquet hors du plan qui le porterait, comme le titre le nomme.'),
233
+ piece: piece('Sa pièce'),
234
+ },
235
+ ['critere', 'paquet', 'piece']
236
+ ),
237
+ 'Chaque critère du ticket que tu ne tiens pas parce qu’il demande un paquet hors du plan ; le circuit monte au superviseur, qui étend le plan ou amende le critère.'
238
+ ),
239
+ reponses: liste(
240
+ objet(
241
+ {
242
+ titre: texte(
243
+ 'Le titre du constat, tel que ta consigne l’écrit, sans son numéro « Constat N — ».'
244
+ ),
245
+ etat: {
246
+ type: 'string',
247
+ enum: ['levé', 'contesté'],
248
+ description:
249
+ 'levé : ton lot le lève ; contesté : tu ne le lèves pas, avec ta raison.',
250
+ },
251
+ raison: texte('Contesté : pourquoi le lot reste tel quel.'),
252
+ piece: piece('Sa pièce, ce qui le lève ou ce qui fonde ta raison'),
253
+ },
254
+ ['titre', 'etat', 'piece']
255
+ ),
256
+ 'FAIT : ta réponse à chaque constat du relecteur ouvert pour toi, par son titre ; le relecteur la lit sous son constat. Le circuit refuse une fiche à laquelle il en manque une.'
257
+ ),
258
+ ...ECARTS,
259
+ ...DECOUVERTES,
260
+ },
261
+ ['statut']
262
+ );
263
+
209
264
  // The schema of the sheet of each role the circuit leads, and of the tri of the discoveries
210
265
  // (`tri`), the explorateur's after the queue.
211
266
  const FICHES = {
@@ -317,6 +372,7 @@ const FICHES = {
317
372
  testwriter: objet(
318
373
  {
319
374
  ...STATUT,
375
+ ...MANQUE,
320
376
  portent_le_travail: liste(
321
377
  objet(
322
378
  {
@@ -337,49 +393,15 @@ const FICHES = {
337
393
  },
338
394
  ['statut']
339
395
  ),
340
- developpeur: objet(
341
- {
342
- ...STATUT,
343
- renvoi: objet(
344
- { role: { type: 'string', enum: ['testwriter'] } },
345
- ['role'],
346
- 'Le rouge qui reste est dans les tests du lot : le circuit relance le testwriter.'
347
- ),
348
- hors_plan: liste(
349
- objet(
350
- {
351
- critere: texte('Le numéro du critère du ticket, « 10 ».'),
352
- paquet: texte('Le paquet hors du plan qui le porterait, comme le titre le nomme.'),
353
- piece: piece('Sa pièce'),
354
- },
355
- ['critere', 'paquet', 'piece']
356
- ),
357
- 'Chaque critère du ticket que tu ne tiens pas parce qu’il demande un paquet hors du plan ; le circuit monte au superviseur, qui étend le plan ou amende le critère.'
358
- ),
359
- reponses: liste(
360
- objet(
361
- {
362
- titre: texte(
363
- 'Le titre du constat, tel que ta consigne l’écrit, sans son numéro « Constat N — ».'
364
- ),
365
- etat: {
366
- type: 'string',
367
- enum: ['levé', 'contesté'],
368
- description:
369
- 'levé : ton lot le lève ; contesté : tu ne le lèves pas, avec ta raison.',
370
- },
371
- raison: texte('Contesté : pourquoi le lot reste tel quel.'),
372
- piece: piece('Sa pièce, ce qui le lève ou ce qui fonde ta raison'),
373
- },
374
- ['titre', 'etat', 'piece']
375
- ),
376
- 'FAIT : ta réponse à chaque constat du relecteur ouvert pour toi, par son titre ; le relecteur la lit sous son constat. Le circuit refuse une fiche à laquelle il en manque une.'
377
- ),
378
- ...ECARTS,
379
- ...DECOUVERTES,
380
- },
381
- ['statut']
382
- ),
396
+ developpeur: fiche({
397
+ renvoi: objet(
398
+ { role: { type: 'string', enum: ['testwriter'] } },
399
+ ['role'],
400
+ 'Le rouge qui reste est dans les tests du lot : le circuit relance le testwriter.'
401
+ ),
402
+ }),
403
+ // The agent direct writes the tests with the code: he sends no red to the testwriter.
404
+ direct: fiche(),
383
405
  relecteur: objet(
384
406
  {
385
407
  verdict: { type: 'string', enum: ['ACCEPTÉ', 'RENDU'] },
@@ -408,7 +430,7 @@ const FICHES = {
408
430
  'La règle dans ce document (« 000-forms, R2 », « § Les frontières ») ; un export neuf, le nom de son entrée.'
409
431
  ),
410
432
  piece: piece('Sa pièce'),
411
- role: { type: 'string', enum: ['testwriter', 'developpeur'] },
433
+ role: { type: 'string', enum: AUTEURS_DE_LOT },
412
434
  },
413
435
  ['element', 'conforme', 'document', 'reference', 'piece']
414
436
  ),
@@ -429,7 +451,7 @@ const FICHES = {
429
451
  ),
430
452
  role: {
431
453
  type: 'string',
432
- enum: ['testwriter', 'developpeur'],
454
+ enum: AUTEURS_DE_LOT,
433
455
  description: 'Bloquant : l’agent qui écrit la correction, à qui le circuit le rend.',
434
456
  },
435
457
  corps: texte('Sa preuve : son exemple et ce qu’il montre.'),
@@ -891,8 +913,8 @@ function horsDuTicket(f, description) {
891
913
  }
892
914
 
893
915
  // What a sheet of <role> needs beyond its schema: the reason of a BLOQUÉ, the question of a
894
- // BESOIN, the number of each criterion out of the plan, the reason of a developpeur's answer
895
- // contesté, the packages of a plan and the number of each answer, the questions of a QUESTIONS, the text of a
916
+ // BESOIN, the number of each criterion out of the plan, the reason of an answer contesté of the
917
+ // developpeur or the agent direct, the packages of a plan and the number of each answer, the questions of a QUESTIONS, the text of a
896
918
  // DÉSACCORD, the criterion or rule of a blocking finding, the reference of the rule each line of
897
919
  // a reviewer's conformity cites in its document and the recipient of a « non », and a reviewer's verdict that follows its blocking findings, its « non » among them
898
920
  // (RENDU with one, ACCEPTÉ without), the piece of a BLOQUÉ, a BESOIN and a reviewer's question,
@@ -950,7 +972,7 @@ function manques(role, f) {
950
972
  out.push(`hors_plan[${i}].critere : « ${h.critere} » n'est pas le numéro d'un critère`);
951
973
  }
952
974
  }
953
- if (role === 'developpeur') {
975
+ if (role === 'developpeur' || role === 'direct') {
954
976
  for (const [i, r] of (f.reponses ?? []).entries()) {
955
977
  if (r.etat === 'contesté' && !(typeof r.raison === 'string' && r.raison.trim())) {
956
978
  out.push(`reponses[${i}].raison : manque, pour contesté`);
@@ -1002,7 +1024,7 @@ function manques(role, f) {
1002
1024
  return out;
1003
1025
  }
1004
1026
 
1005
- // The sheet of <role> in <sortie>, what claude prints with `--output-format json`: `{ fiche,
1027
+ // The sheet of <role> in <sortie>, the line `type: result` of claude's stream: `{ fiche,
1006
1028
  // seance }`, or `{ erreur }` naming what lacks or does not conform; with <copie>, the directory
1007
1029
  // of the copy, each file piece of the sheet stands in it, its file and its line; with <ticket>,
1008
1030
  // the description of the ticket, each piece of the ticket names a criterion or a section of it.
@@ -5,7 +5,7 @@
5
5
  // node scripts/retirer-les-copies-finies.mjs [<copie finie de jouer>…] from the main tree
6
6
  //
7
7
  // - The circuits that hold their copy are what the Temporal server says (./circuits-du-serveur.mjs,
8
- // one call, 5 s at most): each that has not ended (it runs, or waits an answer or a place), and
8
+ // 5 s at most): each that has not ended (it runs, or waits an answer or a place), and
9
9
  // each ended without its issue, which waits the supervisor's answer; a server that does not
10
10
  // answer, a client not built or any other fault of that reading leaves them unread (null), and
11
11
  // the removal of ./copies-finies.mjs then keeps each copy beside its `.travail`.