@roomi-fields/grillhouse 0.52.0 → 0.54.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.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +96 -0
- package/agents/direct.md +1 -1
- package/cadre/templates/projet/docs/agents/issue-tracker.md +2 -2
- package/cadre/templates/projet/vitest.config.cjs +45 -0
- package/charte/superviseur.md +36 -37
- package/charte.md +13 -1
- package/dist/temporal/circuit/appel.d.ts +2 -0
- package/dist/temporal/circuit/appel.js +24 -2
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +14 -5
- package/dist/temporal/circuit/client.js +41 -9
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +17 -6
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +9 -0
- package/dist/temporal/circuit/contrat.js +6 -0
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +29 -12
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/client.d.ts +35 -1
- package/dist/temporal/client.js +144 -1
- package/dist/temporal/client.js.map +1 -1
- package/dist/temporal/commande.js +31 -13
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/etat.d.ts +3 -1
- package/dist/temporal/etat.js +31 -17
- package/dist/temporal/etat.js.map +1 -1
- package/dist/temporal/file/activites.js +1 -1
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +4 -5
- package/dist/temporal/file/contrat.js +2 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +7 -5
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +116 -53
- package/dist/temporal/installation.js +898 -241
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/deroule.js +3 -1
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/deroule.js +2 -1
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/sonde/deroule.js +2 -1
- package/dist/temporal/sonde/deroule.js.map +1 -1
- package/dist/temporal/tickets/deroule.js +4 -3
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/dist/temporal/travailleur.d.ts +7 -1
- package/dist/temporal/travailleur.js +49 -25
- package/dist/temporal/travailleur.js.map +1 -1
- package/docs/INTERFACE.md +37 -12
- package/docs/architecture/circuit.md +21 -18
- package/docs/architecture/entree.md +10 -11
- package/docs/architecture/greffon.md +45 -27
- package/docs/architecture/installation.md +92 -59
- package/docs/architecture/machine.md +2 -2
- package/docs/architecture/tests.md +15 -6
- package/docs/lexique.md +2 -2
- package/hooks/hooks.json +10 -0
- package/hooks/register.tsx +59 -39
- package/package.json +3 -2
- package/scripts/activites.mjs +5 -4
- package/scripts/aiguillage.mjs +5 -2
- package/scripts/bd-garde.mjs +69 -0
- package/scripts/ci-de-main.mjs +259 -56
- package/scripts/circuit.mjs +274 -47
- package/scripts/circuits-du-serveur.mjs +3 -2
- package/scripts/circuits-tenus.d.mts +7 -0
- package/scripts/circuits-tenus.mjs +17 -0
- package/scripts/commandes-composees.mjs +1 -1
- package/scripts/copie-de-montee.mjs +354 -0
- package/scripts/copies-du-depot.d.mts +13 -0
- package/scripts/copies-du-depot.mjs +66 -0
- package/scripts/copies-finies.mjs +6 -40
- package/scripts/crochets.mjs +16 -2
- package/scripts/direct.mjs +2 -2
- package/scripts/droits.mjs +13 -6
- package/scripts/engendres.mjs +5 -3
- package/scripts/enveloppe/travail-de-la-copie.mjs +77 -0
- package/scripts/etapes.mjs +11 -3
- package/scripts/faits-du-circuit.mjs +12 -5
- package/scripts/file-des-tickets.d.mts +13 -2
- package/scripts/file-des-tickets.mjs +71 -21
- package/scripts/greffons.mjs +42 -27
- package/scripts/grillhouse-maj.mjs +105 -85
- package/scripts/init.mjs +1 -1
- package/scripts/integration/file.mjs +5 -2
- package/scripts/integration/integrer.mjs +14 -4
- package/scripts/jointure.d.ts +16 -0
- package/scripts/langages/c/commandes.mjs +18 -8
- package/scripts/langages/cargo/commandes.mjs +88 -35
- package/scripts/langages/cargo/index.mjs +6 -3
- package/scripts/langages/cargo/sccache.mjs +15 -12
- package/scripts/langages/cargo/tailles-des-tests.mjs +115 -6
- package/scripts/langages/python/commandes.mjs +19 -9
- package/scripts/langages/python/squelette.mjs +2 -2
- package/scripts/langages/typescript/code-mort.mjs +36 -3
- package/scripts/langages/typescript/configurations-de-vitest.mjs +118 -0
- package/scripts/langages/typescript/index.mjs +2 -0
- package/scripts/langages/typescript/migrations/configurations-en-commonjs.mjs +370 -0
- package/scripts/langages/typescript/mise-a-jour.mjs +49 -12
- package/scripts/langages/typescript/parcours.mjs +5 -1
- package/scripts/langages/typescript/squelette.mjs +20 -17
- package/scripts/langages/typescript/tests-de-nuit.mjs +3 -3
- package/scripts/langages/typescript/turbo-des-paquets.mjs +24 -37
- package/scripts/langages/typescript/vitest-config/base.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/cibles.mjs +2 -2
- package/scripts/langages/typescript/{vitest.nuit.config.mjs → vitest.nuit.config.cjs} +61 -50
- package/scripts/langages.d.mts +6 -0
- package/scripts/langages.mjs +6 -0
- package/scripts/lire.mjs +236 -0
- package/scripts/mesure/pression.mjs +5 -3
- package/scripts/migrations/cout-des-jetons-au-registre.mjs +136 -0
- package/scripts/migrations/lire-un-ticket.mjs +46 -0
- package/scripts/migrations.mjs +4 -0
- package/scripts/montee.mjs +588 -0
- package/scripts/nuit.sh +21 -12
- package/scripts/outil.mjs +5 -3
- package/scripts/paquet-npm.mjs +22 -0
- package/scripts/paquet.mjs +5 -5
- package/scripts/pre-compact.mjs +25 -0
- package/scripts/registre.d.mts +7 -1
- package/scripts/registre.mjs +114 -102
- package/scripts/reponses-du-circuit.d.mts +17 -2
- package/scripts/reponses-du-circuit.mjs +78 -20
- package/scripts/resultats.mjs +55 -17
- package/scripts/retirer-les-copies-finies.mjs +4 -7
- package/scripts/seances.mjs +28 -3
- package/scripts/services-du-noyau.mjs +7 -2
- package/scripts/session-start.sh +18 -11
- package/scripts/sortie.mjs +4 -7
- package/scripts/sous-commandes.mjs +2 -0
- package/scripts/suiveur.mjs +12 -4
- package/scripts/superviseur.mjs +135 -84
- package/scripts/tableau.mjs +651 -224
- package/scripts/tarifs.mjs +67 -0
- package/scripts/ticket-du-circuit.mjs +25 -4
- package/scripts/transitions.d.mts +6 -14
- package/scripts/transitions.mjs +126 -49
- package/scripts/verdict-de-la-nuit.mjs +2 -2
- package/scripts/verrou-de-fichier.d.mts +11 -0
- package/skills/direct/SKILL.md +21 -11
- package/skills/explorateur/SKILL.md +16 -6
- package/skills/grill/SKILL.md +9 -7
- package/skills/grill/references/paquets.md +4 -4
- package/skills/mesure/SKILL.md +4 -3
- package/skills/pitmaster/SKILL.md +56 -35
- package/skills/pitmaster/references/consigne-agent.md +1 -1
- package/skills/pitmaster/references/erreurs.md +4 -2
- package/skills/pitmaster/references/tour.md +11 -4
- package/skills/relecteur/SKILL.md +8 -1
- package/skills/testwriter/SKILL.md +1 -1
- package/types/index.d.ts +3 -1
- package/cadre/templates/projet/vitest.config.ts +0 -44
- package/scripts/base-des-workflows.mjs +0 -58
package/scripts/resultats.mjs
CHANGED
|
@@ -58,8 +58,10 @@
|
|
|
58
58
|
// envelope of every later session writes; the open questions, a change or a removal of a
|
|
59
59
|
// criterion written among them, go up to the supervisor, each naming why: the language, the
|
|
60
60
|
// architecture, a gap to the reference, or no answer (explorateur);
|
|
61
|
-
// - `sorte` (`genre` mécanique or
|
|
62
|
-
//
|
|
61
|
+
// - `sorte` (`genre` mécanique, comportement or correction triviale, its `raison`, the
|
|
62
|
+
// `commande` a mechanical ticket plays, the `piece` a correction triviale needs, judged as every
|
|
63
|
+
// piece of a sheet, a correction triviale switching to the direct circuit once its plan passes
|
|
64
|
+
// (circuit.md §5.6), and, for a comportement, `comportement` changé, tests-adaptés or inchangé): a
|
|
63
65
|
// mechanical ticket skips the testwriter, the proof and the developpeur; under
|
|
64
66
|
// « tests-adaptés » the testwriter writes and every green of the proof is expected, then the
|
|
65
67
|
// developpeur writes; under « inchangé » the developpeur alone writes; a sort absent, out of
|
|
@@ -122,7 +124,7 @@ import path from 'node:path';
|
|
|
122
124
|
import { pathToFileURL } from 'node:url';
|
|
123
125
|
import { refusDeLaCommande } from './commande-du-plan.mjs';
|
|
124
126
|
import { paquets } from './paquets.mjs';
|
|
125
|
-
import { AUTEUR_DU_CIRCUIT, AUTEURS_DE_LOT, EXPLORATEUR } from './etapes.mjs';
|
|
127
|
+
import { AUTEUR_DU_CIRCUIT, AUTEURS_DE_LOT, DEMANDE_UN_PLAN, EXPLORATEUR } from './etapes.mjs';
|
|
126
128
|
|
|
127
129
|
// The variable that names the results directory of a run.
|
|
128
130
|
export const RESULTATS = 'GRILLHOUSE_RESULTATS';
|
|
@@ -202,8 +204,10 @@ export const VERDICTS_ROUVERTS = ['a-porter', 'non-confirmee'];
|
|
|
202
204
|
const VERDICTS_PROUVES = ['traitee', 'a-porter'];
|
|
203
205
|
|
|
204
206
|
// The sorts of a ticket the explorateur judges at the plan: a gesture without new
|
|
205
|
-
// behaviour, which its command makes,
|
|
206
|
-
|
|
207
|
+
// behaviour, which its command makes, a change of behaviour, which the circuit of code makes, or a
|
|
208
|
+
// correction triviale, which the direct circuit makes.
|
|
209
|
+
const TRIVIALE = 'correction triviale';
|
|
210
|
+
export const SORTES = ['mécanique', 'comportement', TRIVIALE];
|
|
207
211
|
// The values of the field `comportement` of a plan of sort comportement: changé (the testwriter
|
|
208
212
|
// writes, a red is required), tests-adaptés (the testwriter writes, the proof accepts every
|
|
209
213
|
// green), inchangé (a gesture written by hand: the developpeur alone, no testwriter).
|
|
@@ -280,12 +284,13 @@ const FICHES = {
|
|
|
280
284
|
type: 'string',
|
|
281
285
|
enum: SORTES,
|
|
282
286
|
description:
|
|
283
|
-
'mécanique : un geste sans comportement neuf (montée du cadre, documents seuls, renommage ou déplacement, montée de dépendance, configuration seule, correction de style, seuil relevé), que sa commande fait ; comportement : tout autre ticket, et tout doute.',
|
|
287
|
+
'mécanique : un geste sans comportement neuf (montée du cadre, documents seuls, renommage ou déplacement, montée de dépendance, configuration seule, correction de style, seuil relevé), que sa commande fait ; correction triviale : une ligne fautive, un mauvais argument, que le ticket décrit en entier, que l’agent direct fait ; comportement : tout autre ticket, et tout doute.',
|
|
284
288
|
},
|
|
285
289
|
raison: texte('Pourquoi le ticket est de cette sorte.'),
|
|
286
290
|
commande: texte(
|
|
287
291
|
'mécanique : la commande ou l’outil qui fait le geste, tel qu’il se lance à la racine de la copie.'
|
|
288
292
|
),
|
|
293
|
+
piece: piece('correction triviale : sa pièce'),
|
|
289
294
|
comportement: {
|
|
290
295
|
type: 'string',
|
|
291
296
|
enum: COMPORTEMENTS,
|
|
@@ -294,7 +299,7 @@ const FICHES = {
|
|
|
294
299
|
},
|
|
295
300
|
},
|
|
296
301
|
['genre', 'raison'],
|
|
297
|
-
'La sorte du ticket, et sa raison ; un ticket mécanique saute le testwriter, la preuve du rouge et le développeur
|
|
302
|
+
'La sorte du ticket, et sa raison ; un ticket mécanique saute le testwriter, la preuve du rouge et le développeur ; une correction triviale, avec sa pièce, bascule au circuit direct une fois le plan passé. Une sorte absente vaut comportement.'
|
|
298
303
|
),
|
|
299
304
|
ecartes: liste(
|
|
300
305
|
objet(
|
|
@@ -401,15 +406,22 @@ const FICHES = {
|
|
|
401
406
|
),
|
|
402
407
|
}),
|
|
403
408
|
// The agent direct writes the tests with the code: he sends no red to the testwriter.
|
|
404
|
-
direct: fiche(
|
|
409
|
+
direct: fiche({
|
|
410
|
+
motif: {
|
|
411
|
+
type: 'string',
|
|
412
|
+
enum: [DEMANDE_UN_PLAN],
|
|
413
|
+
description:
|
|
414
|
+
'BESOIN ou BLOQUÉ, avec sa raison et sa pièce : le ticket demande un plan ou plus d’un agent ; le circuit s’arrête, et le superviseur confirme la bascule (`--planifier`) ou garde le direct (`--reprendre`).',
|
|
415
|
+
},
|
|
416
|
+
}),
|
|
405
417
|
relecteur: objet(
|
|
406
418
|
{
|
|
407
419
|
verdict: { type: 'string', enum: ['ACCEPTÉ', 'RENDU'] },
|
|
408
420
|
motif: {
|
|
409
421
|
type: 'string',
|
|
410
|
-
enum: ['comportement-change'],
|
|
422
|
+
enum: ['comportement-change', DEMANDE_UN_PLAN],
|
|
411
423
|
description:
|
|
412
|
-
'RENDU d’un lot du circuit court dont le comportement du produit change
|
|
424
|
+
'comportement-change : RENDU d’un lot du circuit court dont le comportement du produit change, le circuit reprend le ticket à 2 Tests sur le même plan, sa sorte changée en comportement. demande-un-plan : RENDU d’un lot direct dont le ticket demande un plan, avec sa pièce, le circuit s’arrête et le superviseur décide (`--planifier` ou `--reprendre`).',
|
|
413
425
|
},
|
|
414
426
|
conformite: liste(
|
|
415
427
|
objet(
|
|
@@ -532,7 +544,8 @@ const FICHES = {
|
|
|
532
544
|
export const schemaDeFiche = role => FICHES[role] ?? null;
|
|
533
545
|
|
|
534
546
|
// The sort of the ticket the explorateur's sheet of the plan <fiche> says (`sorte`): `{ genre:
|
|
535
|
-
// 'mécanique', raison, commande }` for a mechanical ticket with its reason and its command;
|
|
547
|
+
// 'mécanique', raison, commande }` for a mechanical ticket with its reason and its command; `{
|
|
548
|
+
// genre: 'correction triviale', raison }` for a correction triviale with its reason; else
|
|
536
549
|
// `{ genre: 'comportement', raison, comportement }`, `comportement` one of COMPORTEMENTS, changé
|
|
537
550
|
// when absent, unknown or without its reason. A sort absent, out of its kinds or without what it needs is comportement, the
|
|
538
551
|
// whole circuit, as a doubt goes to the circuit.
|
|
@@ -543,6 +556,9 @@ export function sorteDuPlan(fiche) {
|
|
|
543
556
|
if (raison && s.genre === 'mécanique' && plein(s.commande)) {
|
|
544
557
|
return { genre: 'mécanique', raison, commande: s.commande.trim() };
|
|
545
558
|
}
|
|
559
|
+
if (raison && s.genre === TRIVIALE) {
|
|
560
|
+
return { genre: TRIVIALE, raison };
|
|
561
|
+
}
|
|
546
562
|
const valeur = raison && s.genre === 'comportement' ? s.comportement : null;
|
|
547
563
|
return {
|
|
548
564
|
genre: 'comportement',
|
|
@@ -829,10 +845,11 @@ function pieceDuTicket(reste) {
|
|
|
829
845
|
}
|
|
830
846
|
|
|
831
847
|
// The pieces of the sheet <f>, each `[son chemin, son texte]`: of the stop it carries (a status,
|
|
832
|
-
// a reviewer's question), of its findings, of its lines of conformity, of its questions, of its
|
|
848
|
+
// a reviewer's question), of its sort correction triviale, of its findings, of its lines of conformity, of its questions, of its
|
|
833
849
|
// criteria out of the plan, of the verdicts of a tri, of the developpeur's answers.
|
|
834
850
|
const piecesDe = f => [
|
|
835
851
|
...('piece' in f ? [['piece', f.piece]] : []),
|
|
852
|
+
...(f.sorte?.genre === TRIVIALE && 'piece' in f.sorte ? [['sorte.piece', f.sorte.piece]] : []),
|
|
836
853
|
...['constats', 'conformite', 'questions', 'hors_plan', 'verdicts', 'reponses'].flatMap(k =>
|
|
837
854
|
(f[k] ?? []).map((x, i) => [`${k}[${i}].piece`, x.piece]).filter(([, p]) => p !== undefined)
|
|
838
855
|
),
|
|
@@ -878,16 +895,20 @@ const titreLu = titre => titre.replace(/\s+/g, ' ').trim().toLocaleLowerCase('fr
|
|
|
878
895
|
|
|
879
896
|
// What makes a piece of the ticket of the sheet <f> absent from the description <description>: a
|
|
880
897
|
// criterion no numbered line of its section of criteria (a heading that begins with « Critères »)
|
|
881
|
-
// carries, a section no heading names (its title, or its beginning); each fault, naming its piece
|
|
898
|
+
// carries, a section no heading names (its title, or its beginning); each fault, naming its piece
|
|
899
|
+
// and what the description holds instead, as a compiler suggests the names it knows: its headings
|
|
900
|
+
// for a section, the expected heading for a criterion when it has no section of criteria.
|
|
882
901
|
function horsDuTicket(f, description) {
|
|
883
902
|
const titres = [];
|
|
884
903
|
const criteres = new Set();
|
|
885
904
|
let dedans = false;
|
|
905
|
+
let section = false;
|
|
886
906
|
for (const ligne of String(description).split('\n')) {
|
|
887
907
|
const tete = /^#{1,6}\s+(.*)$/.exec(ligne);
|
|
888
908
|
if (tete) {
|
|
889
|
-
titres.push(
|
|
909
|
+
titres.push(tete[1].replace(/\s+/g, ' ').trim());
|
|
890
910
|
dedans = /^Critères\b/i.test(tete[1].trim());
|
|
911
|
+
section ||= dedans;
|
|
891
912
|
continue;
|
|
892
913
|
}
|
|
893
914
|
const numero = /^\s*(\d+)[.)]\s/.exec(ligne);
|
|
@@ -895,17 +916,23 @@ function horsDuTicket(f, description) {
|
|
|
895
916
|
criteres.add(Number(numero[1]));
|
|
896
917
|
}
|
|
897
918
|
}
|
|
919
|
+
const attendu = section
|
|
920
|
+
? ''
|
|
921
|
+
: " ; les critères se lisent sous un titre qui commence par « Critères » (« ## Critères d'acceptation »), que la description n'a pas";
|
|
922
|
+
const portes = titres.length
|
|
923
|
+
? `ses sections : ${titres.map(t => `« ${t} »`).join(', ')}`
|
|
924
|
+
: "elle n'a aucune section";
|
|
898
925
|
const out = [];
|
|
899
926
|
for (const [ou, p] of piecesDe(f)) {
|
|
900
927
|
const lu = lirePiece(p);
|
|
901
928
|
if (lu?.critere && !criteres.has(lu.critere)) {
|
|
902
929
|
out.push(
|
|
903
|
-
`${ou} : ticket, critère ${lu.critere} : la description du ticket n'a pas de critère ${lu.critere}`
|
|
930
|
+
`${ou} : ticket, critère ${lu.critere} : la description du ticket n'a pas de critère ${lu.critere}${attendu}`
|
|
904
931
|
);
|
|
905
932
|
}
|
|
906
|
-
if (lu?.section && !titres.some(x => x.startsWith(titreLu(lu.section)))) {
|
|
933
|
+
if (lu?.section && !titres.some(x => titreLu(x).startsWith(titreLu(lu.section)))) {
|
|
907
934
|
out.push(
|
|
908
|
-
`${ou} : ticket, § ${lu.section} : la description du ticket n'a pas de section « ${lu.section}
|
|
935
|
+
`${ou} : ticket, § ${lu.section} : la description du ticket n'a pas de section « ${lu.section} » ; ${portes}`
|
|
909
936
|
);
|
|
910
937
|
}
|
|
911
938
|
}
|
|
@@ -929,6 +956,14 @@ function manques(role, f) {
|
|
|
929
956
|
if (f.statut === 'BESOIN' && !plein('question')) {
|
|
930
957
|
out.push('question : manque, pour BESOIN');
|
|
931
958
|
}
|
|
959
|
+
if (
|
|
960
|
+
role === 'direct' &&
|
|
961
|
+
f.motif === DEMANDE_UN_PLAN &&
|
|
962
|
+
f.statut === 'BESOIN' &&
|
|
963
|
+
!plein('raison')
|
|
964
|
+
) {
|
|
965
|
+
out.push(`raison : manque, pour le motif ${DEMANDE_UN_PLAN}`);
|
|
966
|
+
}
|
|
932
967
|
if (['BLOQUÉ', 'BESOIN'].includes(f.statut) && !('piece' in f)) {
|
|
933
968
|
out.push(`piece : manque, pour ${f.statut}`);
|
|
934
969
|
}
|
|
@@ -983,6 +1018,9 @@ function manques(role, f) {
|
|
|
983
1018
|
if (!(f.paquets ?? []).length) {
|
|
984
1019
|
out.push('paquets : manque, pour un plan');
|
|
985
1020
|
}
|
|
1021
|
+
if (f.sorte?.genre === TRIVIALE && !('piece' in f.sorte)) {
|
|
1022
|
+
out.push(`sorte.piece : manque, pour une ${TRIVIALE}`);
|
|
1023
|
+
}
|
|
986
1024
|
const refus = refusDeLaCommande(f.sorte?.commande);
|
|
987
1025
|
if (refus) {
|
|
988
1026
|
out.push(`sorte.commande : ${refus}`);
|
|
@@ -4,23 +4,20 @@
|
|
|
4
4
|
//
|
|
5
5
|
// node scripts/retirer-les-copies-finies.mjs [<copie finie de jouer>…] from the main tree
|
|
6
6
|
//
|
|
7
|
-
// - The circuits that hold their copy are what the Temporal server says (./circuits-
|
|
8
|
-
// 5 s at most)
|
|
9
|
-
// each ended without its issue, which waits the supervisor's answer; a server that does not
|
|
7
|
+
// - The circuits that hold their copy are what the Temporal server says (./circuits-tenus.mjs,
|
|
8
|
+
// 5 s at most); a server that does not
|
|
10
9
|
// answer, a client not built or any other fault of that reading leaves them unread (null), and
|
|
11
10
|
// the removal of ./copies-finies.mjs then keeps each copy beside its `.travail`.
|
|
12
11
|
// - The removal lives in ./copies-finies.mjs, which imports nothing of the built `dist/`: the lock
|
|
13
12
|
// of the machine (./attente-de-la-machine.mjs) and the base configuration of the tests import it,
|
|
14
13
|
// and a project of trial holds the frame's scripts without `dist/`.
|
|
15
|
-
import {
|
|
14
|
+
import { ticketsTenus } from './circuits-tenus.mjs';
|
|
16
15
|
import { retirerLesCopiesDuDepot } from './copies-finies.mjs';
|
|
17
16
|
|
|
18
17
|
const racine = process.cwd();
|
|
19
18
|
let tenus = null;
|
|
20
19
|
try {
|
|
21
|
-
tenus = new Set(
|
|
22
|
-
(await circuitsDuServeur(racine)).filter(c => c.fin === null || c.question).map(c => c.ticket)
|
|
23
|
-
);
|
|
20
|
+
tenus = new Set(await ticketsTenus(racine));
|
|
24
21
|
} catch {
|
|
25
22
|
tenus = null;
|
|
26
23
|
}
|
package/scripts/seances.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
VARIABLE_TESTS_ETENDUS,
|
|
48
48
|
} from './enveloppe/paquets-du-plan.mjs';
|
|
49
49
|
import { langageDe, langageDeLaCopie } from './langages.mjs';
|
|
50
|
-
import { leRole, nomDuRole } from './etapes.mjs';
|
|
50
|
+
import { DEMANDE_UN_PLAN, leRole, nomDuRole } from './etapes.mjs';
|
|
51
51
|
import { departDe, VARIABLE_SEANCE } from './mesure/base-de-passe.mjs';
|
|
52
52
|
import { groupeVivant, signalerGroupe } from './mesure-de-la-machine.mjs';
|
|
53
53
|
import {
|
|
@@ -743,7 +743,7 @@ export function consigne(valeurs, rang = 0) {
|
|
|
743
743
|
// reviewer on a direct circuit and that of the rescue command carry it.
|
|
744
744
|
const EXIGENCE_DU_DIRECT = [
|
|
745
745
|
'CE LOT EST UN DIRECT : un seul agent, le rôle `direct`, a écrit les tests et le code ensemble. Tout constat bloquant lui est adressé : son destinataire est `direct`.',
|
|
746
|
-
"La preuve du rouge n'est pas jouée : tu la tiens. Un défaut corrigé porte un test qui le reproduit, et ce test échoue sans le code du lot ; sans lui, le constat est bloquant.
|
|
746
|
+
"La preuve du rouge n'est pas jouée : tu la tiens. Un défaut corrigé porte un test qui le reproduit, et ce test échoue sans le code du lot ; sans lui, le constat est bloquant. Le squelette d'un paquet, qui ne change aucun comportement, n'a pas de test à exiger.",
|
|
747
747
|
].join('\n\n');
|
|
748
748
|
|
|
749
749
|
/**
|
|
@@ -1043,6 +1043,24 @@ export function arretDuStatut(
|
|
|
1043
1043
|
const passation = derniereDe(ctx, role)?.text ?? 'aucune';
|
|
1044
1044
|
const qui = leRole(role);
|
|
1045
1045
|
const { piece } = fiche;
|
|
1046
|
+
if (role === 'direct' && fiche.motif === DEMANDE_UN_PLAN) {
|
|
1047
|
+
const nom = fiche.statut === 'BESOIN' ? 'besoin' : 'hors-portee';
|
|
1048
|
+
return new Arret(
|
|
1049
|
+
nom,
|
|
1050
|
+
`${qui} demande un plan (séance ${tentative}) : ${fiche.raison}\n\nSa passation :\n\n${passation}`,
|
|
1051
|
+
{
|
|
1052
|
+
piece,
|
|
1053
|
+
question: [
|
|
1054
|
+
`${qui} demande un plan : ${fiche.raison}`,
|
|
1055
|
+
fiche.question,
|
|
1056
|
+
'`--planifier --contexte <raison>` confirme la bascule vers le plan, `--reprendre --contexte <texte>` garde le circuit direct.',
|
|
1057
|
+
]
|
|
1058
|
+
.filter(Boolean)
|
|
1059
|
+
.join('\n\n'),
|
|
1060
|
+
demande: DEMANDE_UN_PLAN,
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1046
1064
|
return fiche.statut === 'BESOIN'
|
|
1047
1065
|
? new Arret(
|
|
1048
1066
|
'besoin',
|
|
@@ -1402,7 +1420,14 @@ export async function jusquALaFiche(ctx, role, texte, options = {}) {
|
|
|
1402
1420
|
if (hors && reste.horsEnveloppe) {
|
|
1403
1421
|
lu = { erreur: [lu.erreur, hors.rapport].filter(Boolean).join(' ; ') };
|
|
1404
1422
|
}
|
|
1405
|
-
|
|
1423
|
+
// A request for a plan ends the session on its sheet: no extension of the plan, no resumption.
|
|
1424
|
+
const demandeUnPlan = role === 'direct' && lu.fiche?.motif === DEMANDE_UN_PLAN;
|
|
1425
|
+
if (
|
|
1426
|
+
lu.fiche?.statut === 'BESOIN' &&
|
|
1427
|
+
lu.fiche.manque &&
|
|
1428
|
+
!demandeUnPlan &&
|
|
1429
|
+
!reste.horsEnveloppe
|
|
1430
|
+
) {
|
|
1406
1431
|
const demande = extensionDemandee(ctx, role, lu.fiche.manque);
|
|
1407
1432
|
const extension = demande?.etendre ?? demande?.etendreTests;
|
|
1408
1433
|
const etendre = demande?.etendre ? ctx.etendreEnVol : ctx.etendreTestsEnVol;
|
|
@@ -29,7 +29,7 @@ export { arbitrageTranche, estArbitrage } from './arbitrages.mjs';
|
|
|
29
29
|
export { garderLeTotal, inscrireLePlan, ouvrirAvancement } from './avancement.mjs';
|
|
30
30
|
export { sources } from './sources.mjs';
|
|
31
31
|
export { trouverDansLePath } from './commandes-du-path.mjs';
|
|
32
|
-
export { paquetsSansPackageJson } from './paquet-npm.mjs';
|
|
32
|
+
export { gesteDuPackageJson, paquetsSansPackageJson } from './paquet-npm.mjs';
|
|
33
33
|
export { fournisseursDuPaquet } from './donnees-cles.mjs';
|
|
34
34
|
export { poserLeGabaritAbsent } from './gabarit-absent.mjs';
|
|
35
35
|
export {
|
|
@@ -78,7 +78,12 @@ export { A_REPASSER, MEMOIRE_COUPEE } from './codes-de-sortie.mjs';
|
|
|
78
78
|
export const GARDE_DE_LA_MEMOIRE = fileURLToPath(
|
|
79
79
|
new URL('./garde-de-la-memoire.mjs', import.meta.url)
|
|
80
80
|
);
|
|
81
|
-
export {
|
|
81
|
+
export {
|
|
82
|
+
attendreLeRepos,
|
|
83
|
+
ecrirePression,
|
|
84
|
+
lirePression,
|
|
85
|
+
SEUIL_PRESSION,
|
|
86
|
+
} from './mesure/pression.mjs';
|
|
82
87
|
export { avecLaPasse, surUnePart } from './passe-de-la-machine.mjs';
|
|
83
88
|
export {
|
|
84
89
|
nommerLAvancement,
|
package/scripts/session-start.sh
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
# - The plugins: scripts/greffons.mjs --absents reads `.claude/settings.json` and
|
|
21
21
|
# `claude plugin list --json` (each call stopped after 5 s). Each declared plugin not installed
|
|
22
22
|
# joins « Manque » as « le greffon <id> », the missing claude command as « la commande claude »
|
|
23
|
-
# (
|
|
23
|
+
# (the line names `npx grillhouse greffons`, which installs them without the montée), a failed or stopped reading as « la lecture des greffons … »; the
|
|
24
24
|
# same reading names the mod installed at another version than the package, with the command
|
|
25
|
-
# that aligns it
|
|
25
|
+
# that aligns it: `npx grillhouse greffons` for a mod behind; for a mod ahead, the montée to its
|
|
26
|
+
# version, with who launches it, where, and what it does. An agent's copy does not read them.
|
|
26
27
|
# - The worker of Temporal on a former version after a change of `grillhouse.outil` (`grillhouse
|
|
27
28
|
# temporal perime`) joins « Manque » with `npx grillhouse temporal installer`. An agent's copy
|
|
28
29
|
# does not read it.
|
|
@@ -32,10 +33,11 @@
|
|
|
32
33
|
# key and the path. An agent's copy does not read it.
|
|
33
34
|
#
|
|
34
35
|
# The supervisor (scripts/superviseur.mjs, given the `source` of the hook's input): the session
|
|
35
|
-
# takes the lock of its repository; when its opening takes it, and after a /clear
|
|
36
|
-
# that holds it, it receives « Les questions des circuits », « Les circuits du
|
|
37
|
-
# of resumption; a second session while the first lives receives first « Un
|
|
38
|
-
# ce dépôt ». An agent's copy takes nothing and receives nothing
|
|
36
|
+
# takes the lock of its repository; when its opening takes it, and after a /clear or a compaction
|
|
37
|
+
# of the session that holds it, it receives « Les questions des circuits », « Les circuits du
|
|
38
|
+
# dépôt » and the note of resumption; a second session while the first lives receives first « Un
|
|
39
|
+
# autre superviseur tient ce dépôt ». An agent's copy takes nothing and receives nothing, nor does
|
|
40
|
+
# the compaction of a subagent (`agent_id` in the input).
|
|
39
41
|
#
|
|
40
42
|
# A session of a role of the frame (`claude --agent <rôle>`: the hook's input names it,
|
|
41
43
|
# `agent_type`, bare or `grillhouse:<rôle>`, and the plugin defines it,
|
|
@@ -48,12 +50,14 @@ root="${CLAUDE_PROJECT_DIR:-$PWD}"
|
|
|
48
50
|
ici="$(cd "$(dirname "$0")" && pwd)"
|
|
49
51
|
entree=
|
|
50
52
|
[ -t 0 ] || entree="$(cat)"
|
|
51
|
-
role= origine=
|
|
52
|
-
{ read -r role; read -r origine; } < <(printf '%s' "$entree" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{let e={};try{e=JSON.parse(s)}catch{}for(const v of [e?.agent_type,e?.source])console.log(typeof v==="string"&&/^[A-Za-z0-9_:-]+$/.test(v)?v:"")})' 2>/dev/null)
|
|
53
|
+
role= origine= sous_agent=
|
|
54
|
+
{ read -r role; read -r origine; read -r sous_agent; } < <(printf '%s' "$entree" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{let e={};try{e=JSON.parse(s)}catch{}for(const v of [e?.agent_type,e?.source])console.log(typeof v==="string"&&/^[A-Za-z0-9_:-]+$/.test(v)?v:"");console.log(e?.agent_id?"1":"")})' 2>/dev/null)
|
|
53
55
|
role="${role#grillhouse:}"
|
|
54
56
|
[ -n "$role" ] && [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "$CLAUDE_PLUGIN_ROOT/agents/$role.md" ] && exit 0
|
|
55
57
|
# One supervisor per project: the lock of the repository, or the section that says who holds it.
|
|
56
|
-
|
|
58
|
+
# The compaction of a subagent (an input that bears agent_id) is none of the supervisor's.
|
|
59
|
+
superviseur=
|
|
60
|
+
[ "$origine" = compact ] && [ -n "$sous_agent" ] || superviseur="$(node "$ici/superviseur.mjs" "$root" "$origine" 2>/dev/null)"
|
|
57
61
|
[ -z "$superviseur" ] || echo "$superviseur"
|
|
58
62
|
# The published version that leads the repository (grillhouse.outil), when it cannot be installed:
|
|
59
63
|
# the orchestration runs on the code of the repository, which the session is told
|
|
@@ -111,6 +115,9 @@ if [ -z "$copie_agent" ]; then
|
|
|
111
115
|
"ecart "*)
|
|
112
116
|
read -r _ e_id e_greffon e_paquet e_commande <<< "$ligne"
|
|
113
117
|
ecart_versions="Le greffon $e_id est en $e_greffon, le paquet @roomi-fields/grillhouse en $e_paquet : les deux sortent ensemble, sous une même version. Aligne-les : \`$e_commande\`."
|
|
118
|
+
case "$e_commande" in
|
|
119
|
+
"npx grillhouse maj "*) ecart_versions+=" Le superviseur la lance dans l'arbre principal (une copie la refuse) : elle monte le projet, commite, avance main et pousse. \`npx grillhouse maj\` sans version garde la version du projet et laisse le greffon en avance." ;;
|
|
120
|
+
esac
|
|
114
121
|
;;
|
|
115
122
|
esac
|
|
116
123
|
done < <(timeout -k 1 8 node "$ici/greffons.mjs" --absents "$root" 2>/dev/null)
|
|
@@ -240,7 +247,7 @@ epopees="$(cd "$root" && bd list --type epic --all --json --limit 0 2>/dev/null
|
|
|
240
247
|
|
|
241
248
|
echo "## Éléments du projet à définir (Roomi's Grillhouse)"
|
|
242
249
|
if [ ${#missing[@]} -gt 0 ]; then
|
|
243
|
-
echo "Manque : $(IFS=';'; echo "${missing[*]}" | sed "s/;/, /g"). Installe-les toi-même avant tout autre geste, sans invite, chacun par la commande qu'il nomme ; \`npx grillhouse
|
|
250
|
+
echo "Manque : $(IFS=';'; echo "${missing[*]}" | sed "s/;/, /g"). Installe-les toi-même avant tout autre geste, sans invite, chacun par la commande qu'il nomme ; \`npx grillhouse greffons\` installe les greffons et \`npx grillhouse hooks\` pose les crochets git du cadre, sans monter le projet comme le fait \`npx grillhouse maj\`, qui commite et avance main."
|
|
244
251
|
fi
|
|
245
252
|
if [ ${#pending[@]} -gt 0 ]; then
|
|
246
253
|
echo "Pas encore renseignés :"
|
|
@@ -248,7 +255,7 @@ if [ ${#pending[@]} -gt 0 ]; then
|
|
|
248
255
|
echo "Dès ta première réponse, propose au responsable de les griller, chacun avec ce que tu recommandes pour ce projet (compétence \`grill\`). Il peut accepter, en choisir un, ou reporter ; tant qu'un élément reste vide, cette proposition revient à chaque séance."
|
|
249
256
|
fi
|
|
250
257
|
if [ ${#wiring[@]} -gt 0 ]; then
|
|
251
|
-
echo "À brancher : $(IFS=' '; echo "${wiring[*]}") dans le package.json de la racine. L'intégration (\`npx grillhouse integrer\`, contrat en tête de son script) et la nuit lancent \`npm run verifier\` (les gardes et les tests, par l'outil du langage du projet), les agents \`npm test\` ; sans eux, l'intégration refuse chaque lot.
|
|
258
|
+
echo "À brancher : $(IFS=' '; echo "${wiring[*]}") dans le package.json de la racine. L'intégration (\`npx grillhouse integrer\`, contrat en tête de son script) et la nuit lancent \`npm run verifier\` (les gardes et les tests, par l'outil du langage du projet), les agents \`npm test\` ; sans eux, l'intégration refuse chaque lot. Écris-les pour ses tests ; la montée (\`npm run grillhouse:maj\`, qui commite et avance main, au superviseur) les écrit aussi quand le langage du projet sait jouer ses tests."
|
|
252
259
|
fi
|
|
253
260
|
if [ -n "$nuit_en_table" ]; then
|
|
254
261
|
echo "La table des tâches du poste lance encore la nuit : \`$nuit_en_table\`. La planification des nuits de la machine la remplace (\`npx grillhouse nuit --planifier\`, une fois par poste) : propose au responsable de retirer ces lignes (\`crontab -e\`)."
|
package/scripts/sortie.mjs
CHANGED
|
@@ -150,19 +150,16 @@ export function etiqueter(
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* What follows the tag <etiquette> once its package is published: the
|
|
154
|
-
*
|
|
155
|
-
* installs the version), and the update of the frame's plugin installed for the repository, at
|
|
156
|
-
* its local scope, as in the other projects.
|
|
153
|
+
* What follows the tag <etiquette> once its package is published: the one command that updates a
|
|
154
|
+
* project, Grillhouse's repository included (`npx grillhouse maj <version>`, scripts/montee.mjs).
|
|
157
155
|
* @param {string} etiquette v<x.y.z>
|
|
158
156
|
* @returns {string}
|
|
159
157
|
*/
|
|
160
158
|
export function suiteDeLaSortie(etiquette) {
|
|
161
159
|
const version = etiquette.replace(/^v/, '');
|
|
162
160
|
return (
|
|
163
|
-
`Une fois ${version} publiée,
|
|
164
|
-
|
|
165
|
-
'claude plugin update grillhouse@roomi-fields --scope local (le greffon de Grillhouse).\n'
|
|
161
|
+
`Une fois ${version} publiée, chaque projet, Grillhouse compris, y monte par une commande, ` +
|
|
162
|
+
`dans son arbre principal : npx grillhouse maj ${version}\n`
|
|
166
163
|
);
|
|
167
164
|
}
|
|
168
165
|
|
|
@@ -58,6 +58,7 @@ export const SOUS_COMMANDES = {
|
|
|
58
58
|
lancer: 'enveloppe/lancer.sh',
|
|
59
59
|
journal: 'journal.mjs',
|
|
60
60
|
'ligne-etat': 'ligne-etat/ligne-etat.mjs',
|
|
61
|
+
lire: 'lire.mjs',
|
|
61
62
|
machine: 'machine.mjs',
|
|
62
63
|
maj: 'grillhouse-maj.mjs',
|
|
63
64
|
'messages-non-lus': 'messages-non-lus.mjs',
|
|
@@ -65,6 +66,7 @@ export const SOUS_COMMANDES = {
|
|
|
65
66
|
nuit: '../dist/temporal/nuits/commande.js',
|
|
66
67
|
outil: 'outil.mjs',
|
|
67
68
|
paquet: 'paquet.mjs',
|
|
69
|
+
'pre-compact': 'pre-compact.mjs',
|
|
68
70
|
pression: 'mesure/pression.mjs',
|
|
69
71
|
registre: 'registre.mjs',
|
|
70
72
|
resultats: 'resultats.mjs',
|
package/scripts/suiveur.mjs
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
// and the pane are readers. Mechanism: greffon.md, §5.3.
|
|
5
5
|
//
|
|
6
6
|
// - A measure follows an event: a change under `.beads/`, a change of the git state (HEAD, the
|
|
7
|
-
// references),
|
|
8
|
-
//
|
|
7
|
+
// references), of the day's marker or of the kept path of `bd` (scripts/bd-garde.mjs), a change
|
|
8
|
+
// of the set of circuits (a light poll of Temporal), the end of a bd or git command (through the
|
|
9
|
+
// first two). Events close together fold into one measure (`rebondir`).
|
|
9
10
|
// - Without an event, a measure every SECOURS; every AVANCEMENT while a line of progress shows.
|
|
10
11
|
// - One follower writes per repository: it holds the lock `grillhouse-suiveur.verrou` of the common
|
|
11
12
|
// directory; another follower relays the lines the writer writes, and takes the lock over when
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
import { mkdirSync, readFileSync, renameSync, rmSync, watch, writeFileSync } from 'node:fs';
|
|
15
16
|
import path from 'node:path';
|
|
16
17
|
|
|
18
|
+
import { FICHIER_BD, garderBd } from './bd-garde.mjs';
|
|
17
19
|
import { vivant as processVivant } from './mesure/base-de-passe.mjs';
|
|
18
20
|
|
|
19
21
|
// The measure (the board) and the common git folder come from the command that starts the
|
|
@@ -151,8 +153,9 @@ export function veiller({ racine, commun, rebond = REBOND, quand }) {
|
|
|
151
153
|
}
|
|
152
154
|
};
|
|
153
155
|
sur(path.join(racine, '.beads'), { recursive: true }, () => true);
|
|
154
|
-
// The day's marker (`grillhouse newday`)
|
|
155
|
-
|
|
156
|
+
// The day's marker (`grillhouse newday`) and a path of `bd` newly kept move the board too.
|
|
157
|
+
const duCommun = ['HEAD', 'packed-refs', 'tableau-repere.json', FICHIER_BD];
|
|
158
|
+
sur(commun, {}, nom => duCommun.includes(nom));
|
|
156
159
|
sur(path.join(commun, 'refs'), { recursive: true }, () => true);
|
|
157
160
|
return {
|
|
158
161
|
fermer() {
|
|
@@ -268,6 +271,11 @@ export async function suivre(racine, { projets = [], surLigne, mesure, dossierCo
|
|
|
268
271
|
throw new Error('suivre : le dossier git commun du projet est introuvable.');
|
|
269
272
|
}
|
|
270
273
|
mkdirSync(commun, { recursive: true });
|
|
274
|
+
// Every follower, relaying ones included, keeps the path of its `bd` for a writer that lacks it.
|
|
275
|
+
garderBd(commun);
|
|
276
|
+
for (const projet of projets) {
|
|
277
|
+
garderBd(dossierCommun(projet));
|
|
278
|
+
}
|
|
271
279
|
let ferme = false;
|
|
272
280
|
let ecrivain = null;
|
|
273
281
|
let relais = null;
|