@roomi-fields/grillhouse 0.24.14 → 0.25.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/bin/grillhouse.mjs +40 -12
- package/cadre/templates/cargo/.config/nextest.toml +8 -0
- package/cadre/templates/cargo/deny.toml +36 -0
- package/cadre/templates/cargo/package.json +15 -0
- package/cadre/templates/cargo/rust-toolchain.toml +6 -0
- package/cadre/templates/projet/package.json +5 -1
- package/cadre/templates/turbo/paquets.json +1 -1
- package/cadre/templates/turbo/sans-paquets.json +1 -1
- package/charte.md +16 -0
- package/docs/ARCHITECTURE.md +167 -17
- package/docs/CADRE.md +47 -0
- package/docs/INTERFACE.md +168 -0
- package/package.json +71 -14
- package/scripts/arbitrages.mjs +23 -0
- package/scripts/avancement.mjs +15 -29
- package/scripts/circuit.mjs +89 -97
- package/scripts/commande-du-langage.mjs +56 -0
- package/scripts/composants-affectes.mjs +47 -170
- package/scripts/conformite.d.ts +27 -0
- package/scripts/conformite.mjs +226 -0
- package/scripts/demon.mjs +1 -1
- package/scripts/dernier-vert.mjs +11 -9
- package/scripts/droits.mjs +27 -21
- package/scripts/enveloppe/enveloppe.mjs +206 -64
- package/scripts/enveloppe/lancer.sh +24 -75
- package/scripts/enveloppe/paquets-du-plan.mjs +24 -2
- package/scripts/etapes.mjs +2 -2
- package/scripts/gardes-du-cadre.mjs +12 -18
- package/scripts/grillhouse-maj.mjs +246 -389
- package/scripts/init.mjs +2 -1
- package/scripts/integration/file.mjs +3 -3
- package/scripts/integration/integrer.mjs +13 -10
- package/scripts/integration/rejeu.mjs +36 -7
- package/scripts/jointure.d.ts +304 -0
- package/scripts/langages/cargo/binaires.json +4 -0
- package/scripts/langages/cargo/binaires.mjs +60 -0
- package/scripts/langages/cargo/clippy.mjs +103 -0
- package/scripts/langages/cargo/commandes.mjs +378 -0
- package/scripts/langages/cargo/composants.mjs +191 -0
- package/scripts/langages/cargo/elements-du-lot.mjs +139 -0
- package/scripts/langages/cargo/exemples.mjs +357 -0
- package/scripts/langages/cargo/frontieres.mjs +84 -0
- package/scripts/langages/cargo/index-interfaces.mjs +138 -0
- package/scripts/langages/cargo/index.mjs +115 -0
- package/scripts/langages/cargo/mise-a-jour.mjs +93 -0
- package/scripts/langages/cargo/nextest.toml +5 -0
- package/scripts/langages/cargo/touches.mjs +93 -0
- package/scripts/langages/cargo/verdict.mjs +85 -0
- package/scripts/langages/typescript/chemins-des-tests.mjs +68 -0
- package/scripts/{code-mort.mjs → langages/typescript/code-mort.mjs} +5 -5
- package/scripts/langages/typescript/composants.mjs +64 -0
- package/scripts/{consommateurs-arbitres.mjs → langages/typescript/consommateurs-arbitres.mjs} +6 -24
- package/scripts/{consommateurs.mjs → langages/typescript/consommateurs.mjs} +13 -71
- package/scripts/langages/typescript/construire.mjs +176 -0
- package/scripts/{elements-du-lot.mjs → langages/typescript/elements-du-lot.mjs} +2 -2
- package/scripts/langages/typescript/exemples.mjs +289 -0
- package/scripts/{frontieres.mjs → langages/typescript/frontieres.mjs} +3 -5
- package/scripts/{index-interfaces.mjs → langages/typescript/index-interfaces.mjs} +3 -3
- package/scripts/langages/typescript/index.mjs +335 -0
- package/scripts/{interfaces-contre-code.mjs → langages/typescript/interfaces-contre-code.mjs} +2 -2
- package/scripts/langages/typescript/lecteurs.mjs +179 -0
- package/scripts/{migrations → langages/typescript/migrations}/0.23.0-config-vitest.mjs +14 -29
- package/scripts/{migrations → langages/typescript/migrations}/0.24.4-noms-declares-inutilises.mjs +2 -2
- package/scripts/{migrations → langages/typescript/migrations}/0.24.6-lignes-mal-formees.mjs +2 -2
- package/scripts/{migrations → langages/typescript/migrations}/0.24.7-matiere-dans-les-tests.mjs +2 -2
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +27 -0
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +31 -0
- package/scripts/langages/typescript/mise-a-jour.mjs +320 -0
- package/scripts/{references-par-les-types.mjs → langages/typescript/references-par-les-types.mjs} +3 -3
- package/scripts/langages/typescript/regle-des-tests.mjs +39 -0
- package/scripts/{resumes.mjs → langages/typescript/resumes.mjs} +4 -4
- package/scripts/langages/typescript/script-des-tests.mjs +6 -0
- package/scripts/langages/typescript/tailles-des-tests.mjs +219 -0
- package/scripts/langages/typescript/tests-de-nuit.mjs +57 -0
- package/scripts/{tests.mjs → langages/typescript/tests.mjs} +41 -32
- package/scripts/{turbo-des-paquets.mjs → langages/typescript/turbo-des-paquets.mjs} +61 -34
- package/scripts/langages/typescript/verdict.mjs +105 -0
- package/scripts/{verifier.mjs → langages/typescript/verifier.mjs} +53 -34
- package/scripts/{vitest-config → langages/typescript/vitest-config}/avancement.reporter.mjs +10 -2
- package/scripts/{vitest-config → langages/typescript/vitest-config}/base.mjs +63 -9
- package/scripts/{vitest-config → langages/typescript/vitest-config}/changements.mjs +18 -9
- package/scripts/{vitest-config → langages/typescript/vitest-config}/cibles.mjs +7 -6
- package/scripts/{vitest-config → langages/typescript/vitest-config}/duree.reporter.mjs +6 -1
- package/scripts/langages/typescript/vitest-config/lances.mjs +473 -0
- package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.setup.mjs +1 -1
- package/scripts/{vitest-config → langages/typescript/vitest-config}/resultats.mjs +5 -5
- package/scripts/{vitest-config → langages/typescript/vitest-config}/resultats.setup.mjs +4 -3
- package/scripts/{vitest.nuit.config.mjs → langages/typescript/vitest.nuit.config.mjs} +2 -2
- package/scripts/langages.mjs +85 -0
- package/scripts/{vitest-config → mesure}/avancement.mjs +4 -13
- package/scripts/{vitest-config → mesure}/base-de-passe.mjs +70 -33
- package/scripts/{vitest-config → mesure}/pression.mjs +5 -6
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +29 -6
- package/scripts/migrations/0.24.0-circuit-simplifie.mjs +13 -6
- package/scripts/migrations/0.25.0-script-des-tests.mjs +92 -0
- package/scripts/migrations.mjs +17 -13
- package/scripts/nuit.sh +59 -63
- package/scripts/paquets.d.ts +5 -0
- package/scripts/paquets.mjs +24 -2
- package/scripts/resultats.mjs +8 -82
- package/scripts/services-du-noyau.mjs +30 -0
- package/scripts/session-start.sh +17 -9
- package/scripts/sources.mjs +35 -13
- package/scripts/sous-commandes.mjs +57 -17
- package/scripts/superviseur.mjs +1 -1
- package/scripts/tableau.mjs +1 -1
- package/scripts/un-commit-par-ticket.mjs +48 -14
- package/scripts/verrou-de-fichier.mjs +1 -1
- package/scripts/verrou-de-machine.mjs +4 -4
- package/scripts/verrous/verrou.mjs +28 -37
- package/skills/developpeur/SKILL.md +2 -2
- package/skills/explorateur/SKILL.md +13 -5
- package/skills/grill/SKILL.md +2 -2
- package/skills/pitmaster/references/cadre.md +1 -1
- package/skills/pitmaster/references/consigne-agent.md +10 -3
- package/skills/redacteur/references/documents-d-un-composant.md +4 -4
- package/skills/relecteur/SKILL.md +4 -1
- package/skills/testwriter/SKILL.md +20 -6
- /package/scripts/{consommateurs.d.ts → langages/typescript/consommateurs.d.ts} +0 -0
- /package/scripts/{vitest-config → langages/typescript/vitest-config}/base.d.ts +0 -0
- /package/scripts/{vitest-config → langages/typescript/vitest-config}/machine.setup.mjs +0 -0
- /package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.d.ts +0 -0
- /package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.mjs +0 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# (`jugerComposant` of enveloppe.mjs), as the role and the instruction are, in the ticket's copy
|
|
11
11
|
# when it exists, else in the main tree or in the tree of the branch agent/<ticket> when it
|
|
12
12
|
# exists (`git cat-file -e`; `.` is always admitted): a path that names nothing there is refused on the standard error, CODE_USAGE, nothing prepared; when
|
|
13
|
-
# it is the name of a package or of its folder, the refusal names the path it means.
|
|
13
|
+
# it is the name of a component of the module of its language (a package, a crate) or of its folder, the refusal names the path it means.
|
|
14
14
|
# - --paquets <liste> is the plan of the session: the paths of the packages it writes, in the form
|
|
15
15
|
# of the envelope's variable (`ecrireLaListe` of paquets-du-plan.mjs, `packages/a:packages/b`),
|
|
16
16
|
# each judged as <composant> is; without it, the plan is <composant> alone. The envelope shows
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
# circuit gives them, so that a relaunch of an agent on its step resumes its session. The two
|
|
32
32
|
# together are refused, CODE_USAGE; each takes a value as --modele does.
|
|
33
33
|
# A resumed session receives its instruction alone: the session it resumes holds the sections
|
|
34
|
-
# the launcher adds below, save « La construction
|
|
34
|
+
# the launcher adds below, save « La construction échoue », which it receives.
|
|
35
35
|
# - The agent's copy is the worktree .claude/worktrees/<ticket> (branch agent/<ticket>), created
|
|
36
36
|
# from the main tree's HEAD when absent and moved forward to it otherwise. When the branch exists
|
|
37
37
|
# without a copy, it is brought back to the main tree's HEAD and the copy is made on it: the lot
|
|
@@ -50,28 +50,16 @@
|
|
|
50
50
|
# project shares (`grillhouse.partage`), which the copy reads from the main repository. Its
|
|
51
51
|
# dependencies are installed when `node_modules` is absent or `package-lock.json` is newer than
|
|
52
52
|
# the last installation (`node_modules/.package-lock.json`, written by npm), and it is built there
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
# directly or not, for a task of a package of the plan (`attendentLePlan` of
|
|
64
|
-
# turbo-des-paquets.mjs) is not played there: as with Bazel's --keep_going, a package of the plan
|
|
65
|
-
# stays a target of the plan even as another's provider (BPScript's 990-corpus, the shared test
|
|
66
|
-
# material, which the trace of 060-encoder waits for), and goes with the plan. Then the packages,
|
|
67
|
-
# the traces of the plan or that wait for it, and what their tests read (`turbo run build <those
|
|
68
|
-
# traces> --filter=<paquet>...… --continue=dependencies-successful`), whose failure does not
|
|
69
|
-
# stop it: each task whose
|
|
70
|
-
# dependencies succeed goes to its end, so what their tests read without depending on them is
|
|
71
|
-
# built whole; the session opens, its instruction ending with a section « La construction de ton
|
|
72
|
-
# paquet échoue » with the end of that output, since repairing it is the session's work (a
|
|
73
|
-
# provider's lot that breaks its consumers). Their consumers are not built. Any other plan, the
|
|
74
|
-
# whole repository (`.`) included, builds the copy whole (`turbo run build`). The
|
|
53
|
+
# for the session's plan by the module of its language, when the module describes it
|
|
54
|
+
# (`construire`, by scripts/commande-du-langage.mjs, as the night plays its night tests; the
|
|
55
|
+
# module typescript builds by Turborepo, which restores
|
|
56
|
+
# an unchanged build from its cache, scripts/langages/typescript/construire.mjs), outside the
|
|
57
|
+
# envelope, so the agent finds built what it reads out of its plan. A build that fails does not
|
|
58
|
+
# stop the launch: the session opens, its instruction ending with a section « La construction
|
|
59
|
+
# échoue », whose first line says which build failed and what was built, with the end of its
|
|
60
|
+
# output, since repairing it is the session's work (a provider's lot that breaks its consumers).
|
|
61
|
+
# Any other failure of the command, the installation and every other step of the preparation
|
|
62
|
+
# stop it, CODE_COPIE. The
|
|
75
63
|
# installation and the build play through `scripts/sous-modules.sh monter`, each shared submodule
|
|
76
64
|
# of the main repository read-only, by the list the pose printed, whatever the installation
|
|
77
65
|
# rewrites afterwards; with a shared submodule and no possible mount (bwrap absent or
|
|
@@ -85,12 +73,12 @@
|
|
|
85
73
|
# plan (one part per package when the plan holds several, grillhouse-3uv.95.6): for each
|
|
86
74
|
# component whose `## Consommateurs` section names the package, its line, the names of the
|
|
87
75
|
# elements declared for the package, and the address of the rubric « Rend » of its frame, the
|
|
88
|
-
# rest of its elements left to the index of the interfaces (`
|
|
89
|
-
# --publie <plan>`, read in the prepared copy; a reading that fails stops the launch,
|
|
76
|
+
# rest of its elements left to the index of the interfaces (`grillhouse index-interfaces
|
|
77
|
+
# --publie <plan>`, a command of the module of the copy's language, read in the prepared copy; a reading that fails stops the launch,
|
|
90
78
|
# CODE_COPIE), then the
|
|
91
79
|
# section « Ton dossier de travail », which names the session's working directory, where every
|
|
92
80
|
# temporary file goes (`dossierDeTravail` of enveloppe.mjs, the envelope's TMPDIR), then the
|
|
93
|
-
# section « La construction
|
|
81
|
+
# section « La construction échoue » when it fails. The prompt
|
|
94
82
|
# carries « TON TICKET : <ticket> », which the role's locks read. The envelope is the sandbox, so
|
|
95
83
|
# the session runs without permission prompts, under the rights and the context of its role
|
|
96
84
|
# (scripts/droits.mjs, given the main tree, the copy and the ticket; a reading that fails stops
|
|
@@ -168,7 +156,7 @@ if [ -d "$racine/.claude/worktrees/$ticket" ]; then
|
|
|
168
156
|
elif git -C "$racine" rev-parse --verify --quiet "refs/heads/agent/$ticket" > /dev/null; then
|
|
169
157
|
branche="agent/$ticket"
|
|
170
158
|
fi
|
|
171
|
-
refus_composant=$(node --input-type=module -e "import { spawnSync } from 'node:child_process'; import { existsSync } from 'node:fs'; import path from 'node:path'; import { jugerComposant } from '$ici/enveloppe.mjs'; import { lireLaListe } from '$ici/paquets-du-plan.mjs'; import {
|
|
159
|
+
refus_composant=$(node --input-type=module -e "import { spawnSync } from 'node:child_process'; import { existsSync } from 'node:fs'; import path from 'node:path'; import { jugerComposant, paquetsDuLangage } from '$ici/enveloppe.mjs'; import { lireLaListe } from '$ici/paquets-du-plan.mjs'; import { langageDe } from '$ici/../langages.mjs'; const [depot, composant, liste, branche] = process.argv.slice(1); const dansBranche = p => { const rel = path.relative(depot, p); return rel === '' || (!rel.startsWith('..') && spawnSync('git', ['-C', depot, 'cat-file', '-e', branche + ':' + rel]).status === 0); }; const existe = p => existsSync(p) || (branche !== '' && dansBranche(p)); const tous = paquetsDuLangage(langageDe(depot), depot); process.stdout.write([composant, ...lireLaListe(liste)].map(c => jugerComposant({ depot, composant: c, paquets: tous }, { existe })).find(Boolean) ?? '');" "$juge" "$composant" "$paquets" "$branche") || exit "$CODE_USAGE"
|
|
172
160
|
[ -z "$refus_composant" ] || { echo "⛔ $refus_composant" >&2; exit "$CODE_USAGE"; }
|
|
173
161
|
# The ticket is matched whole: `demo-3160` is not `demo-316`, and its dots are dots.
|
|
174
162
|
motif=$(printf '%s' "$ticket" | sed 's/[.[\*^$]/\\&/g')
|
|
@@ -189,7 +177,8 @@ if node --input-type=module -e "import { lireEntrees } from '$ici/../integration
|
|
|
189
177
|
echo "$refus" >&2
|
|
190
178
|
exit "$CODE_COPIE"
|
|
191
179
|
fi
|
|
192
|
-
# The output of the session
|
|
180
|
+
# The output of the session's build, when it fails, behind its first line, which says what failed
|
|
181
|
+
# and what was built: the module's command `construire` writes it.
|
|
193
182
|
echec=$(mktemp)
|
|
194
183
|
(
|
|
195
184
|
# Each step returns on failure: `set -e` does not act inside a subshell tested by `||`.
|
|
@@ -239,55 +228,15 @@ echec=$(mktemp)
|
|
|
239
228
|
if [ ! -d "$copie/node_modules" ] || [ "$copie/package-lock.json" -nt "$installe" ]; then
|
|
240
229
|
monter npm --prefix "$copie" install --no-save --no-audit --no-fund --silent || exit 1
|
|
241
230
|
fi
|
|
242
|
-
# The
|
|
243
|
-
#
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
(cd "$copie" && monter npx --no-install turbo run build) || exit 1
|
|
247
|
-
else
|
|
248
|
-
mapfile -t lesNoms <<<"$noms"
|
|
249
|
-
cibles=() lecteurs=()
|
|
250
|
-
for n in "${lesNoms[@]}"; do cibles+=("--filter=$n"); lecteurs+=("--filter=$n..."); done
|
|
251
|
-
# Their providers: the builds their own builds wait for, as Turborepo reads them, save those
|
|
252
|
-
# that wait for a package of the plan, which go with the plan below. The graph comes on the
|
|
253
|
-
# standard input: as an argument, it may pass the size Linux allows one.
|
|
254
|
-
graphe=$(cd "$copie" && monter npx --no-install turbo run build "${cibles[@]}" --dry=json) || exit 1
|
|
255
|
-
fournisseurs=$(node --input-type=module -e "import { readFileSync } from 'node:fs'; import { attendentLePlan } from '$ici/../turbo-des-paquets.mjs'; const g = JSON.parse(readFileSync(0, 'utf8')); const avec = attendentLePlan(g, process.argv.slice(1)); console.log(g.tasks.map(t => t.taskId).filter(id => !avec.has(id)).sort().join('\n'));" "${lesNoms[@]}" <<<"$graphe") || exit 1
|
|
256
|
-
if [ -n "$fournisseurs" ]; then
|
|
257
|
-
mapfile -t ids <<<"$fournisseurs"
|
|
258
|
-
(cd "$copie" && monter npx --no-install turbo run "${ids[@]}") || exit 1
|
|
259
|
-
fi
|
|
260
|
-
# The traces their tests wait for, as Turborepo's plan of their tests reads them. Another
|
|
261
|
-
# package's trace that waits for no package of the plan is produced here, and a failure
|
|
262
|
-
# stops the launch, as a provider's; a trace of the plan, or one that waits for a package of
|
|
263
|
-
# the plan, is produced with the plan below.
|
|
264
|
-
plan=$(cd "$copie" && monter npx --no-install turbo run test:vitest "${cibles[@]}" --dry=json) || exit 1
|
|
265
|
-
traces() { node --input-type=module -e "import { readFileSync } from 'node:fs'; import { attendentLePlan, tracesDuPlan } from '$ici/../turbo-des-paquets.mjs'; const [avec, ...noms] = process.argv.slice(1); const p = JSON.parse(readFileSync(0, 'utf8')); const attend = attendentLePlan(p, noms); console.log(tracesDuPlan(p, t => attend.has(t.taskId) === (avec === 'oui')).join('\n'));" "$1" "${lesNoms[@]}" <<<"$plan"; }
|
|
266
|
-
autres=$(traces non) || exit 1
|
|
267
|
-
if [ -n "$autres" ]; then
|
|
268
|
-
mapfile -t ids <<<"$autres"
|
|
269
|
-
(cd "$copie" && monter npx --no-install turbo run "${ids[@]}") || exit 1
|
|
270
|
-
fi
|
|
271
|
-
avec=$(traces oui) || exit 1
|
|
272
|
-
ids=()
|
|
273
|
-
[ -z "$avec" ] || mapfile -t ids <<<"$avec"
|
|
274
|
-
# The packages of the plan, the traces that go with them, and what their tests read (the
|
|
275
|
-
# shared test material), built after their providers: a failure does not stop the launch, it
|
|
276
|
-
# goes into the instruction. Each task whose dependencies succeed goes to its end
|
|
277
|
-
# (--continue=dependencies-successful): one package's failure does not cancel the build of
|
|
278
|
-
# what the tests read without depending on it, which the envelope shows read-only.
|
|
279
|
-
if ! (cd "$copie" && monter npx --no-install turbo run build ${ids[@]+"${ids[@]}"} "${lecteurs[@]}" --continue=dependencies-successful) > "$echec" 2>&1; then
|
|
280
|
-
cat "$echec"
|
|
281
|
-
echo "⚠️ La construction du plan (${lesNoms[*]}) échoue : la séance s'ouvre, la consigne porte l'erreur."
|
|
282
|
-
else
|
|
283
|
-
: > "$echec"
|
|
284
|
-
fi
|
|
285
|
-
fi
|
|
231
|
+
# The build of the copy for the session's plan, by the module of its language (`construire`),
|
|
232
|
+
# when it describes one: a build that fails writes its first line and its output in $echec,
|
|
233
|
+
# and the session opens with them; any other failure stops the launch.
|
|
234
|
+
(cd "$copie" && monter node "$ici/../commande-du-langage.mjs" construire --echec "$echec" "$paquets") || exit 1
|
|
286
235
|
fi
|
|
287
236
|
) >> "$journal" 2>&1 || { rm -f "$echec"; echo "⛔ La copie $copie n'a pas pu être préparée : voir $journal." >&2; exit "$CODE_COPIE"; }
|
|
288
237
|
# What the components before each package of the plan publish, read in the prepared copy,
|
|
289
238
|
# follows the instruction.
|
|
290
|
-
publie=$(cd "$copie" && node "$ici
|
|
239
|
+
publie=$(cd "$copie" && node "$ici/../../bin/grillhouse.mjs" index-interfaces --publie "$paquets" 2>> "$journal") \
|
|
291
240
|
|| { rm -f "$echec"; echo "⛔ Ce que publient les composants d'avant n'a pas pu se lire : voir $journal." >&2; exit "$CODE_COPIE"; }
|
|
292
241
|
# The session's working directory, the one the envelope gives as TMPDIR, follows them.
|
|
293
242
|
travail=$(node --input-type=module -e "import { dossierDeTravail } from '$ici/enveloppe.mjs'; process.stdout.write(dossierDeTravail(process.argv[1]));" "$copie" 2>> "$journal") \
|
|
@@ -297,7 +246,7 @@ rm -f "$travail/hors-plan"
|
|
|
297
246
|
dossier=$'\n\n'"## Ton dossier de travail"$'\n\n'"Tout fichier temporaire s'écrit dans \`$travail\`, que \`\$TMPDIR\` nomme aussi."
|
|
298
247
|
construction=
|
|
299
248
|
if [ -s "$echec" ]; then
|
|
300
|
-
construction=$'\n\n'"## La construction
|
|
249
|
+
construction=$'\n\n'"## La construction échoue"$'\n\n'"$(head -n 1 "$echec") La réparer fait partie de ta tâche. La fin de sa sortie :"$'\n\n```\n'"$(tail -n +2 "$echec" | tail -n 100)"$'\n```'
|
|
301
250
|
fi
|
|
302
251
|
rm -f "$echec"
|
|
303
252
|
# The prompt, assembled in a file: claude reads it on its standard input, since as an argument it
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
//
|
|
9
9
|
// This module uses Node alone, as the modules of scripts/paquets.mjs.
|
|
10
10
|
import path from 'node:path';
|
|
11
|
+
import { paquets } from '../paquets.mjs';
|
|
11
12
|
|
|
12
13
|
export const VARIABLE = 'GRILLHOUSE_ENVELOPPE';
|
|
13
14
|
// The file the lock of a session leaves in its working directory when it stops the session on a
|
|
@@ -28,8 +29,29 @@ export const lireLaListe = texte =>
|
|
|
28
29
|
export const paquetsDeLEnveloppe = (env = process.env) =>
|
|
29
30
|
env[VARIABLE] ? lireLaListe(env[VARIABLE]) : null;
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* The components of the copy <copie>, as the module of its language <langage> gives them
|
|
34
|
+
* (`composants`, scripts/jointure.d.ts), and the packages out of the frame
|
|
35
|
+
* (`docs/agents/hors-cadre.txt`, `paquets` of scripts/paquets.mjs), which no module counts but a
|
|
36
|
+
* plan may name, in the form the plan reads: each `dossier` relative to the copy, its `pkg.name`
|
|
37
|
+
* the package's name, else the component's.
|
|
38
|
+
* @param {{ composants(racine: string): { dossier: string, nom: string, paquet: string | null }[] }} langage
|
|
39
|
+
* @param {string} copie
|
|
40
|
+
* @returns {{ dossier: string, pkg: { name: string } }[]}
|
|
41
|
+
*/
|
|
42
|
+
export function paquetsDuLangage(langage, copie) {
|
|
43
|
+
const composants = langage
|
|
44
|
+
.composants(copie)
|
|
45
|
+
.map(c => ({ dossier: path.relative(copie, c.dossier), pkg: { name: c.paquet ?? c.nom } }));
|
|
46
|
+
const connus = new Set(composants.map(c => c.dossier));
|
|
47
|
+
const hors = paquets(copie)
|
|
48
|
+
.filter(p => p.hors && !connus.has(p.dossier))
|
|
49
|
+
.map(p => ({ dossier: p.dossier, pkg: { name: p.pkg?.name ?? path.basename(p.dossier) } }));
|
|
50
|
+
return [...composants, ...hors];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The directory of the component of <paquetsDeLaCopie> (`paquetsDuLangage`, each `dossier`
|
|
54
|
+
// relative to the copy) that holds the path <chemin> of the copy, the deepest; `.`, the
|
|
33
55
|
// root, when none holds it.
|
|
34
56
|
export function paquetQuiTient(chemin, paquetsDeLaCopie) {
|
|
35
57
|
const rel = path.normalize(chemin).replace(/\/+$/, '');
|
package/scripts/etapes.mjs
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// with no session.
|
|
29
29
|
// - The question of each other stop (MONTEES, below): what goes up to the supervisor, and who
|
|
30
30
|
// must answer it.
|
|
31
|
-
import { A_REPASSER } from './
|
|
31
|
+
import { A_REPASSER } from './mesure/pression.mjs';
|
|
32
32
|
|
|
33
33
|
// Who works at a step the circuit leads itself, with no agent.
|
|
34
34
|
export const AUTO = 'auto';
|
|
@@ -205,7 +205,7 @@ export const GESTES = [
|
|
|
205
205
|
geste:
|
|
206
206
|
'à la régénération des références (4.2), puis la passe finale : celle qui est due, après les contrôles ; restreinte à ce qu’elle change, après une passe finale',
|
|
207
207
|
regle:
|
|
208
|
-
'un rouge de la passe finale est celui d’une référence, même mêlé à d’autres, ou les contrôles du plan sont verts hors des rouges de références : une que le projet déclare (`grillhouse.references`), ou un fichier que le cadre engendre (l’index des interfaces, les
|
|
208
|
+
'un rouge de la passe finale est celui d’une référence, même mêlé à d’autres, ou les contrôles du plan sont verts hors des rouges de références : une que le projet déclare (`grillhouse.references`), ou un fichier que le cadre engendre (l’index des interfaces, les fichiers que le module du langage engendre) ; ou la passe abaisse la dette des gardes (`dette.mjs --abaisser`, depuis ses notes)',
|
|
209
209
|
cas: 'BP 320.9 : 292 min autour des références, dont 163 min d’attente pour régénérer à la main l’index des interfaces, le plafond et l’empreinte, des rouges de références mêlés à d’autres ; BP 320.3.9 : le plafond rouge aux contrôles, laissé à une passe finale qui rejoue les mêmes tests sur le même arbre (6,1 min)',
|
|
210
210
|
},
|
|
211
211
|
{
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
// npx grillhouse gardes-du-cadre (npm run grillhouse:gardes, a task of Turborepo)
|
|
5
5
|
//
|
|
6
|
-
// -
|
|
6
|
+
// - The guards are those of the module of the project's language (`gardes`, scripts/jointure.d.ts,
|
|
7
|
+
// scripts/langages.mjs), in their order.
|
|
8
|
+
// - Each guard is a script of the package, and plays in the working directory, under the environment of the run
|
|
7
9
|
// (`GRILLHOUSE_DETTE` among it, scripts/dette.mjs), whatever the verdict of the ones before: a
|
|
8
10
|
// red does not stop the pass, as `--continue` does for Turborepo's tasks.
|
|
9
11
|
// - Each red guard is named with its code at the end; the exit code is 1 when one guard is red,
|
|
@@ -15,34 +17,26 @@
|
|
|
15
17
|
// - The build is not among them: Turborepo builds before this task (turbo.json).
|
|
16
18
|
import { spawnSync } from 'node:child_process';
|
|
17
19
|
import path from 'node:path';
|
|
18
|
-
import {
|
|
20
|
+
import { pathToFileURL } from 'node:url';
|
|
21
|
+
import { langageDe } from './langages.mjs';
|
|
19
22
|
import { A_ELAGUER, ecrireSarif, lireSarif, RESULTATS } from './resultats.mjs';
|
|
20
23
|
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
[ici('turbo-des-paquets.mjs')],
|
|
27
|
-
[ici('index-interfaces.mjs'), '--verifier'],
|
|
28
|
-
[ici('consommateurs.mjs')],
|
|
29
|
-
[ici('consommateurs-arbitres.mjs')],
|
|
30
|
-
[ici('frontieres.mjs')],
|
|
31
|
-
[ici('interfaces-contre-code.mjs')],
|
|
32
|
-
[ici('resumes.mjs')],
|
|
33
|
-
[ici('code-mort.mjs')],
|
|
34
|
-
];
|
|
24
|
+
// The guards of the frame in the repository at <racine>, each its script and its arguments, in
|
|
25
|
+
// the order they play: the language's.
|
|
26
|
+
export function gardesDuCadre(racine) {
|
|
27
|
+
return langageDe(racine).gardes(racine);
|
|
28
|
+
}
|
|
35
29
|
|
|
36
30
|
// The name of each guard of the frame, as its findings carry it: its script's, without extension.
|
|
37
31
|
const nomDeGarde = garde => path.basename(garde[0]).replace(/\.[cm]?js$/, '');
|
|
38
|
-
export const
|
|
32
|
+
export const nomsDesGardes = racine => gardesDuCadre(racine).map(nomDeGarde);
|
|
39
33
|
// A guard as its lines name it: its subcommand and its arguments.
|
|
40
34
|
const libelle = garde => ['grillhouse', nomDeGarde(garde), ...garde.slice(1)].join(' ');
|
|
41
35
|
|
|
42
36
|
// Plays each guard of <gardes> in <racine> under <env>; its verdict, 0 or 1. `dire` writes a line.
|
|
43
37
|
export function jouerLesGardes({
|
|
44
38
|
racine = process.cwd(),
|
|
45
|
-
gardes =
|
|
39
|
+
gardes = gardesDuCadre(racine),
|
|
46
40
|
env = process.env,
|
|
47
41
|
dire = l => process.stdout.write(`${l}\n`),
|
|
48
42
|
}) {
|