@roomi-fields/grillhouse 0.28.3 → 0.29.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 +55 -14
- package/cadre/templates/projet/CLAUDE.md +1 -1
- package/cadre/templates/projet/README.md +11 -11
- package/cadre/templates/projet/_gitignore +2 -5
- package/charte.md +13 -4
- package/docs/ARCHITECTURE.md +260 -29
- package/docs/INTERFACE.md +51 -12
- package/package.json +1 -1
- package/scripts/aiguillage.mjs +324 -0
- package/scripts/avancement.mjs +33 -50
- package/scripts/circuit.mjs +558 -146
- package/scripts/composition-des-langages.mjs +16 -1
- package/scripts/conformite.mjs +16 -0
- package/scripts/copies-finies.mjs +171 -30
- package/scripts/demon.mjs +134 -21
- package/scripts/enveloppe/lancer.sh +13 -14
- package/scripts/enveloppe/travail-de-la-copie.mjs +94 -11
- package/scripts/etapes.mjs +1 -1
- package/scripts/fusion-du-changelog.mjs +0 -1
- package/scripts/grillhouse-maj.mjs +16 -7
- package/scripts/integration/file.mjs +3 -3
- package/scripts/integration/integrer.mjs +3 -3
- package/scripts/jointure.d.ts +39 -17
- package/scripts/langages/cargo/commandes.mjs +152 -25
- package/scripts/langages/cargo/composants.mjs +90 -2
- package/scripts/langages/cargo/exemples.mjs +68 -1
- package/scripts/langages/cargo/index.mjs +17 -8
- package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +35 -0
- package/scripts/langages/cargo/sccache.mjs +54 -2
- package/scripts/langages/cargo/squelette.mjs +72 -3
- package/scripts/langages/cargo/tailles-des-tests.mjs +195 -0
- package/scripts/langages/cargo/tests-de-head.mjs +159 -0
- package/scripts/langages/python/commandes.mjs +44 -7
- package/scripts/langages/python/composants.mjs +33 -3
- package/scripts/langages/python/exemples.mjs +19 -0
- package/scripts/langages/python/index.mjs +4 -0
- package/scripts/langages/python/squelette.mjs +119 -17
- package/scripts/langages/typescript/exemples.mjs +16 -0
- package/scripts/langages/typescript/index.mjs +6 -3
- package/scripts/langages/typescript/regle-des-tests.mjs +13 -0
- package/scripts/langages/typescript/squelette.mjs +18 -2
- package/scripts/langages/typescript/tests-de-nuit.mjs +41 -21
- package/scripts/langages/typescript/verifier.mjs +82 -288
- package/scripts/langages/typescript/vitest-config/base.mjs +8 -9
- package/scripts/langages/typescript/vitest-config/cibles.mjs +92 -53
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +11 -5
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +4 -2
- package/scripts/langages/typescript/vitest-config/mesure.mjs +3 -2
- package/scripts/langages/typescript/vitest.nuit.config.mjs +18 -13
- package/scripts/lecture-unique.mjs +51 -0
- package/scripts/mesure/pression.mjs +9 -7
- package/scripts/nuit.sh +19 -12
- package/scripts/outil.mjs +72 -0
- package/scripts/paquet.mjs +39 -10
- package/scripts/resultats.mjs +22 -5
- package/scripts/services-du-noyau.mjs +8 -9
- package/scripts/session-start.sh +10 -1
- package/scripts/sortie.mjs +20 -1
- package/scripts/sources.mjs +3 -3
- package/scripts/sous-commandes.mjs +1 -0
- package/scripts/superviseur.mjs +369 -14
- package/scripts/tableau.mjs +219 -58
- package/scripts/verrou-de-machine.mjs +303 -58
- package/skills/developpeur/SKILL.md +11 -3
- package/skills/pitmaster/SKILL.md +58 -23
- package/skills/relecteur/SKILL.md +18 -6
- package/skills/testwriter/SKILL.md +11 -15
package/scripts/paquet.mjs
CHANGED
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
// names; a row whose cell of the column « Langage » is empty; a language out of the frame's
|
|
16
16
|
// list; a folder that already holds the manifest of its language (`manifeste` of its module). A
|
|
17
17
|
// folder that holds docs/ alone, the documents of the second time, is accepted, as `cargo init`
|
|
18
|
-
// takes a folder without its Cargo.toml
|
|
18
|
+
// takes a folder without its Cargo.toml; a folder that already holds code is given to the
|
|
19
|
+
// module with its files (`existants`), which takes them as they are, or refuses, by its name,
|
|
20
|
+
// what it cannot take.
|
|
19
21
|
// - The skeleton: the module of the row's language gives the files of the package and the entry
|
|
20
22
|
// of the workspace (`squelette`, scripts/jointure.d.ts), the versions of its tools from its
|
|
21
23
|
// template (`miseAJour.gabarit`); the documents of the package, docs/CADRE.md and
|
|
@@ -26,15 +28,15 @@
|
|
|
26
28
|
// - The tools of the language, as `nx add` installs them before the first generator: the share
|
|
27
29
|
// of the update of each declared language (`mettreAJour` of ./grillhouse-maj.mjs: its tools at
|
|
28
30
|
// its template's versions, its scripts, its files, `turbo.json` for typescript), then `npm
|
|
29
|
-
// install` when the update asks it, the module's
|
|
30
|
-
// package (`verrouiller`), the binaries of the declared languages (`installerBinaires`), and the
|
|
31
|
+
// install` when the update asks it, the module's commands that lock the versions of the new
|
|
32
|
+
// package (`verrouiller`), in their order, the binaries of the declared languages (`installerBinaires`), and the
|
|
31
33
|
// generators (`regenerer`), those of the package's language whatever files the project holds:
|
|
32
34
|
// the first package of a language receives its boundaries' configuration and its index.
|
|
33
35
|
// - The report: each file written, then the lines of the update; on the error stream, each
|
|
34
36
|
// command that fails, named with its output. The exit code: 0; 1 for a refusal (⛔ and its
|
|
35
37
|
// reason) or a command that fails; 2 for the usage.
|
|
36
38
|
import { spawnSync } from 'node:child_process';
|
|
37
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
39
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
38
40
|
import path from 'node:path';
|
|
39
41
|
import { pathToFileURL } from 'node:url';
|
|
40
42
|
import { CADRE } from './cadre.mjs';
|
|
@@ -46,6 +48,7 @@ import {
|
|
|
46
48
|
regenerer,
|
|
47
49
|
} from './grillhouse-maj.mjs';
|
|
48
50
|
import { LANGAGES, langage } from './langages.mjs';
|
|
51
|
+
import { hors } from './sources.mjs';
|
|
49
52
|
import {
|
|
50
53
|
ARCHITECTURE,
|
|
51
54
|
colonneDesNoms,
|
|
@@ -100,13 +103,34 @@ export function ligneDuPaquet(racine, rel) {
|
|
|
100
103
|
|
|
101
104
|
const lireJson = f => (existsSync(f) ? JSON.parse(readFileSync(f, 'utf8')) : {});
|
|
102
105
|
|
|
106
|
+
// The files the folder <dossier> of the project at <racine> already holds, from it, in the order of
|
|
107
|
+
// their path: its docs/ (the documents of the second time), its hidden entries and the folders the
|
|
108
|
+
// sources of the project leave out (`hors` of ./sources.mjs: the frame's, node_modules and dist,
|
|
109
|
+
// and what the tools of its languages write, cargo's target, Python's .venv and
|
|
110
|
+
// __pycache__) left out.
|
|
111
|
+
function existants(racine, dossier) {
|
|
112
|
+
const exclus = hors(racine);
|
|
113
|
+
if (!existsSync(dossier)) {
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
return readdirSync(dossier, { recursive: true, withFileTypes: true })
|
|
117
|
+
.filter(e => e.isFile())
|
|
118
|
+
.map(e => path.relative(dossier, path.join(e.parentPath, e.name)).split(path.sep).join('/'))
|
|
119
|
+
.filter(
|
|
120
|
+
f => !f.startsWith('docs/') && !f.split('/').some(p => p.startsWith('.') || exclus.has(p))
|
|
121
|
+
)
|
|
122
|
+
.sort();
|
|
123
|
+
}
|
|
124
|
+
|
|
103
125
|
/**
|
|
104
126
|
* The plan of the package at <chemin> of the project at <racine>, nothing written: `{ chemin,
|
|
105
127
|
* langage, fichiers, espace, verrouiller }`, `fichiers` the skeleton of its language and its
|
|
106
128
|
* documents (path from the root → text), `espace` the manifest of the workspace with its entry
|
|
107
|
-
* (null when it holds it), `verrouiller` the
|
|
108
|
-
* its name, for a path no row names, a row without language, a language
|
|
109
|
-
*
|
|
129
|
+
* (null when it holds it), `verrouiller` the commands that lock its versions, played in their
|
|
130
|
+
* order. Throws a Refus, by its name, for a path no row names, a row without language, a language
|
|
131
|
+
* out of the frame's list, a folder that holds the manifest of its language, and a folder whose
|
|
132
|
+
* code the module cannot take (a manifest of Python it does not read, Rust or TypeScript out of
|
|
133
|
+
* its layout), what is missing named.
|
|
110
134
|
* @param {string} racine the root of the project
|
|
111
135
|
* @param {string} chemin the package's folder, from the root
|
|
112
136
|
* @param {{ source?: string }} [o] the frame's files (CADRE)
|
|
@@ -139,7 +163,11 @@ export function planDuPaquet(racine, chemin, { source = CADRE } = {}) {
|
|
|
139
163
|
const modele = lireJson(path.join(source, m.miseAJour.gabarit, 'package.json'));
|
|
140
164
|
let s;
|
|
141
165
|
try {
|
|
142
|
-
s = m.squelette(racine, {
|
|
166
|
+
s = m.squelette(racine, {
|
|
167
|
+
chemin: rel,
|
|
168
|
+
modele,
|
|
169
|
+
existants: existants(racine, path.join(racine, rel)),
|
|
170
|
+
});
|
|
143
171
|
} catch (e) {
|
|
144
172
|
throw new Refus(e.message);
|
|
145
173
|
}
|
|
@@ -219,8 +247,9 @@ export function creerPaquet(racine, chemin, { source = CADRE, executer = lancer
|
|
|
219
247
|
if (aInstaller(b)) {
|
|
220
248
|
jouer('npm', ['install'], '.');
|
|
221
249
|
}
|
|
222
|
-
const v
|
|
223
|
-
|
|
250
|
+
for (const v of plan.verrouiller) {
|
|
251
|
+
jouer(v.commande, v.args, v.dossier);
|
|
252
|
+
}
|
|
224
253
|
const binaires = installerBinaires(racine);
|
|
225
254
|
echecs.push(...binaires.lignes, ...regenerer(racine, { langage: plan.langage.nom }));
|
|
226
255
|
const lignes = rapport(b)
|
package/scripts/resultats.mjs
CHANGED
|
@@ -51,10 +51,11 @@
|
|
|
51
51
|
// and the circuit refuses a sheet without a line for each element, or with a line on an
|
|
52
52
|
// element out of the list, a file the lot changes named alone or as `<fichier>#<nom>`
|
|
53
53
|
// (`conformiteDuLot`) (reviewer);
|
|
54
|
-
// - `suivi` (`titre`, `etat` levé or non levé, `preuve`):
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
54
|
+
// - `suivi` (`titre`, `etat` levé or non levé, `preuve`): each finding still open judged on the
|
|
55
|
+
// lot, bounded or whole, by its title (its number « Constat N — » recognised, `cleDuConstat`),
|
|
56
|
+
// which the circuit writes at the ticket with the verdict, for the human; the circuit refuses
|
|
57
|
+
// a sheet without a line for one, or an ACCEPTÉ that holds one not lifted
|
|
58
|
+
// (`suiviDesConstats`) (reviewer);
|
|
58
59
|
// - `question`, with its `piece` (reviewer): what goes up to the owner, a real word of the
|
|
59
60
|
// language written in the code; the circuit stops at « besoin » before it commits or
|
|
60
61
|
// relaunches anyone;
|
|
@@ -425,7 +426,7 @@ const FICHES = {
|
|
|
425
426
|
},
|
|
426
427
|
['titre', 'etat']
|
|
427
428
|
),
|
|
428
|
-
'
|
|
429
|
+
'Chaque constat encore ouvert, levé ou non, en relecture bornée comme entière.'
|
|
429
430
|
),
|
|
430
431
|
question: texte(
|
|
431
432
|
'Ce qui revient au responsable (par exemple un vrai mot du langage écrit en dur) : la question et ta recommandation ; le circuit s’arrête avant de commiter ou de relancer.'
|
|
@@ -618,6 +619,22 @@ export function reponsesAuxConstats(fiche, titres) {
|
|
|
618
619
|
return `reponses : sans réponse ${sans.length > 1 ? 'aux constats' : 'au constat'} ${sans.join(', ')}`;
|
|
619
620
|
}
|
|
620
621
|
|
|
622
|
+
// What makes the reviewer's sheet <fiche> out of conformity with the findings still open (their
|
|
623
|
+
// <titres>), as Gerrit carries each unresolved comment to the next patch set whatever the form of
|
|
624
|
+
// the review: a finding without its line in `suivi` (by its title, numbered or not), or an ACCEPTÉ
|
|
625
|
+
// that holds one not lifted. The fault, or null.
|
|
626
|
+
export function suiviDesConstats(fiche, titres) {
|
|
627
|
+
const etats = new Map((fiche.suivi ?? []).map(s => [cleDuConstat(s.titre), s.etat]));
|
|
628
|
+
const liste = l => l.map(t => `« ${t} »`).join(', ');
|
|
629
|
+
const sans = titres.filter(t => !etats.has(t));
|
|
630
|
+
if (sans.length) {
|
|
631
|
+
return `suivi : sans ligne pour ${sans.length > 1 ? 'les constats' : 'le constat'} ${liste(sans)}`;
|
|
632
|
+
}
|
|
633
|
+
const tenus = fiche.verdict === 'ACCEPTÉ' ? titres.filter(t => etats.get(t) !== 'levé') : [];
|
|
634
|
+
if (!tenus.length) return null;
|
|
635
|
+
return `suivi : un ACCEPTÉ tient ${tenus.length > 1 ? 'les constats' : 'le constat'} ${liste(tenus)} non levé${tenus.length > 1 ? 's' : ''}`;
|
|
636
|
+
}
|
|
637
|
+
|
|
621
638
|
// What makes the sheet of the tri <fiche> out of conformity with the discoveries <decouvertes> of
|
|
622
639
|
// the ticket (their ids), as a reviewer gives a line to each element of its lot: a discovery
|
|
623
640
|
// without its line, a line on an id out of the list, a discovery with two lines. The fault, or
|
|
@@ -13,8 +13,9 @@ export * from './langages.mjs';
|
|
|
13
13
|
// pass and its measure, the base of a pass, the pressure of the machine and its lock, the last
|
|
14
14
|
// green, the arbitrages of a ticket, the source files of a project.
|
|
15
15
|
export { arbitrageTranche, estArbitrage } from './arbitrages.mjs';
|
|
16
|
-
export {
|
|
16
|
+
export { garderLeTotal, inscrireLePlan, ouvrirAvancement } from './avancement.mjs';
|
|
17
17
|
export { sources } from './sources.mjs';
|
|
18
|
+
export { luUneFois } from './lecture-unique.mjs';
|
|
18
19
|
export { CHANGEMENTS, DEPUIS_LE_VERT, garderLeVert, mesure } from './dernier-vert.mjs';
|
|
19
20
|
export { lireLaListe, paquetsDeLEnveloppe } from './enveloppe/paquets-du-plan.mjs';
|
|
20
21
|
export { AVANCEMENT, ecrireTache } from './mesure/avancement.mjs';
|
|
@@ -26,12 +27,10 @@ export {
|
|
|
26
27
|
ouvrirBase,
|
|
27
28
|
retirerALInterruption,
|
|
28
29
|
} from './mesure/base-de-passe.mjs';
|
|
30
|
+
export { A_REPASSER, ecrirePression, lirePression, SEUIL_PRESSION } from './mesure/pression.mjs';
|
|
29
31
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
SEUIL_PRESSION,
|
|
36
|
-
} from './mesure/pression.mjs';
|
|
37
|
-
export { attendreDeLaPlace, AttenteDeLaMachine, avecLaMachine } from './verrou-de-machine.mjs';
|
|
32
|
+
attendreDeLaPlace,
|
|
33
|
+
AttenteDeLaMachine,
|
|
34
|
+
avecLaMachine,
|
|
35
|
+
nommerLAvancement,
|
|
36
|
+
} from './verrou-de-machine.mjs';
|
package/scripts/session-start.sh
CHANGED
|
@@ -28,7 +28,11 @@
|
|
|
28
28
|
# one version, with the command that aligns the one behind. An agent's copy does not read them.
|
|
29
29
|
#
|
|
30
30
|
# One supervisor per project (scripts/superviseur.mjs): the session takes the lock of its
|
|
31
|
-
# repository
|
|
31
|
+
# repository, and, when its opening takes the lock (not when it keeps it, after a compaction or a
|
|
32
|
+
# /clear), receives the section « L'attente des questions », the wait to launch in the background,
|
|
33
|
+
# then « Les circuits du dépôt » when there are some: each circuit that runs, each one stopped on a
|
|
34
|
+
# question with its question and the command that answers it, each one dead without a final state
|
|
35
|
+
# with the command that resumes it; a second session, while the first one lives, receives first the section « Un autre
|
|
32
36
|
# superviseur tient ce dépôt », which asks it to say so to the owner and to launch no circuit. An
|
|
33
37
|
# agent's copy and a session of a role the circuit launches take nothing and receive nothing.
|
|
34
38
|
#
|
|
@@ -56,6 +60,11 @@ fi
|
|
|
56
60
|
# One supervisor per project: the lock of the repository, or the section that says who holds it.
|
|
57
61
|
superviseur="$(node "$ici/superviseur.mjs" "$root" 2>/dev/null)"
|
|
58
62
|
[ -z "$superviseur" ] || echo "$superviseur"
|
|
63
|
+
# The published version that leads the repository (grillhouse.outil), when it cannot be installed:
|
|
64
|
+
# the orchestration runs on the code of the repository, which the session is told
|
|
65
|
+
# (scripts/aiguillage.mjs).
|
|
66
|
+
outil="$(node "$ici/aiguillage.mjs" --echec "$root" 2>/dev/null)"
|
|
67
|
+
[ -z "$outil" ] || echo "$outil"
|
|
59
68
|
|
|
60
69
|
missing=()
|
|
61
70
|
|
package/scripts/sortie.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
//
|
|
5
5
|
// npx grillhouse sortie <x.y.z> the release's files: the package's package.json, CHANGELOG.md
|
|
6
6
|
// npx grillhouse sortie --etiqueter the annotated tag v<version> on HEAD, the release commit
|
|
7
|
+
// and the gesture that leads Grillhouse with it once published
|
|
7
8
|
// npx grillhouse sortie --verifier-etiquette <v> exits 0 when the tag <v> names the version of the package
|
|
8
9
|
// npx grillhouse sortie --entree-du-marche the entry of the plugin in the marketplace roomi-fields
|
|
9
10
|
//
|
|
@@ -115,6 +116,23 @@ export function etiqueter(
|
|
|
115
116
|
return etiquette;
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
/**
|
|
120
|
+
* What follows the tag <etiquette> once its package is published: the gesture that leads Grillhouse
|
|
121
|
+
* with it (`npx grillhouse outil <version>`, scripts/outil.mjs, which writes `grillhouse.outil` and
|
|
122
|
+
* installs the version), and the update of the frame's plugin installed for the repository, at
|
|
123
|
+
* its local scope, as in the other projects.
|
|
124
|
+
* @param {string} etiquette v<x.y.z>
|
|
125
|
+
* @returns {string}
|
|
126
|
+
*/
|
|
127
|
+
export function suiteDeLaSortie(etiquette) {
|
|
128
|
+
const version = etiquette.replace(/^v/, '');
|
|
129
|
+
return (
|
|
130
|
+
`Une fois ${version} publiée, Grillhouse se mène avec elle : npx grillhouse outil ${version} ` +
|
|
131
|
+
'(la clé grillhouse.outil, à commiter, et la version installée), puis ' +
|
|
132
|
+
'claude plugin update grillhouse@roomi-fields --scope local (le greffon de Grillhouse).\n'
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
118
136
|
const USAGE =
|
|
119
137
|
'Usage : npx grillhouse sortie <x.y.z> prépare la sortie (package.json du paquet, CHANGELOG.md)\n' +
|
|
120
138
|
" npx grillhouse sortie --etiqueter pose l'étiquette v<version> sur le commit de sortie\n" +
|
|
@@ -136,7 +154,8 @@ if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
|
136
154
|
const e = etiqueter(racine);
|
|
137
155
|
process.stdout.write(
|
|
138
156
|
`Étiquette ${e} posée sur HEAD, en local. La poussée, que valide le responsable : git push origin ${e} ` +
|
|
139
|
-
'(la CI joue alors le commit, puis publie le paquet sur npm)\n'
|
|
157
|
+
'(la CI joue alors le commit, puis publie le paquet sur npm)\n' +
|
|
158
|
+
suiteDeLaSortie(e)
|
|
140
159
|
);
|
|
141
160
|
} else if (args.length === 1 && args[0] === '--entree-du-marche') {
|
|
142
161
|
process.stdout.write(`${JSON.stringify(ENTREE_DU_MARCHE, null, 2)}\n`);
|
package/scripts/sources.mjs
CHANGED
|
@@ -24,9 +24,9 @@ const HORS = [
|
|
|
24
24
|
'.rtfm',
|
|
25
25
|
];
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function hors(racine) {
|
|
27
|
+
/** The directories left out in the project at <racine>: the frame's, and what its language's tools
|
|
28
|
+
* write (every language's, for a project that declares none). */
|
|
29
|
+
export function hors(racine) {
|
|
30
30
|
const declares = langagesDeclares(racine);
|
|
31
31
|
const ecrits =
|
|
32
32
|
declares.length > 0
|