@roomi-fields/grillhouse 0.50.0 → 0.50.1

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.
@@ -5,5 +5,5 @@
5
5
  "author": {
6
6
  "name": "Romain Peyrichou"
7
7
  },
8
- "version": "0.50.0"
8
+ "version": "0.50.1"
9
9
  }
package/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.50.1] - 2026-11-24
10
+
11
+ - **The copy of the plugin into the package leaves out what git ignores** (grillhouse-3uv.243): an entry of `mods/grillhouse` that git ignores (a cache a tool of the plugin's package writes, `.cache-outils/`) no longer enters the published package nor the list its tests check. **Action for projects**: none.
12
+
13
+ - **The direct command survives a copy already locked and hands an advance conflict to its agent** (grillhouse-3uv.242): it reads the lock of the copy on `git worktree list --porcelain` instead of the English message of git, so a resumption no longer stops on « est déjà verrouillé » under a French git; and the copy moves onto main before the agent's session, the files its work meets in conflict named in the agent's instruction, instead of stopping and leaving them to the supervisor, whom the lock keeps from writing code. **Action for projects**: none.
14
+
15
+ - **The sessions of the agents play in Code Mode** (grillhouse-3uv.241): decided by the owner (2026-11-24). The settings of every role set `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` in their `env` block, in and out of the envelope, so the agents call their tools from the REPL; the role's hooks and permissions still apply to them, and the sheet still comes out. **Action for projects**: none.
16
+
9
17
  ## [0.50.0] - 2026-11-24
10
18
 
11
19
  - **The typed lint runs after the build of its package**: the task `lint` depends on `build` and `^build`, like `typecheck`, in the frame's `turbo.json` and in the templates of a project's; it no longer reads types from a `dist/` being written, which turned a type to `any` and made the final pass red at random. **Action for projects**: none.
@@ -94,7 +94,7 @@ Chaque séance de rôle reçoit ses options d'une seule source, la liste des rô
94
94
 
95
95
  Toute séance de rôle reçoit, en plus :
96
96
 
97
- - **les sources de réglages du projet seules** (`--setting-sources project,local`), la charte personnelle de l'utilisateur exclue par son chemin (`claudeMdExcludes`) et absente de l'enveloppe ; la mémoire automatique, les compétences intégrées de Claude Code, les compétences propres du projet et les greffons autres que celui du cadre coupés ; les tâches de fond coupées, si bien qu'une séance finit avec sa fiche ;
97
+ - **les sources de réglages du projet seules** (`--setting-sources project,local`), la charte personnelle de l'utilisateur exclue par son chemin (`claudeMdExcludes`) et absente de l'enveloppe ; la mémoire automatique, les compétences intégrées de Claude Code, les compétences propres du projet et les greffons autres que celui du cadre coupés ; les tâches de fond coupées, si bien qu'une séance finit avec sa fiche ; le mode code de Claude Code (le REPL) activé par le bloc `env` des réglages, que `claude -p` ne prend que là : les crochets et les permissions du rôle s'appliquent aux outils que le REPL appelle, et la fiche sort comme avant ;
98
98
  - **ses permissions** : les commandes que sa compétence nomme, la lecture de sa compétence et du métacadre dans le greffon installé ; refusés, le changement de son auteur au ticket, et pour un rôle qui n'écrit pas au ticket toute écriture de `bd` ;
99
99
  - **pour un rôle qui écrit**, refusés de plus l'édition par script (`python`, `sed -i`, `perl -i`), l'outil de test lancé directement, que le module du langage nomme, et la relecture de son propre ticket, que sa consigne porte ; ses deux verrous en crochets `PreToolUse` ;
100
100
  - **ses outils** (`--tools`) : la lecture, l'écriture pour un rôle qui écrit, la recherche d'outils pour un rôle à index ; **ses serveurs** (`--strict-mcp-config`) : ceux de l'index, codegraph et rtfm, lus dans le `.mcp.json` du projet et les greffons qu'il active, aucun autre.
package/hooks/crochet.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
  // node "${CLAUDE_PLUGIN_ROOT}/hooks/crochet.mjs" <sous-commande>
5
5
  //
6
6
  // with Node alone, before any installation, as Husky's hooks run before the project's tools.
7
+ // Mechanism: greffon.md, §2 (choices 1 and 6) and §3.1.
7
8
  //
8
9
  // - The project is `CLAUDE_PROJECT_DIR`, else the working directory; its command is
9
10
  // `node_modules/.bin/grillhouse`, which the project's `npm install` links (the package
@@ -11,7 +12,8 @@
11
12
  // tree's (the parent of `git rev-parse --git-common-dir`) and runs with the worktree as its
12
13
  // working directory: the code that judges is not the code of the copy it judges.
13
14
  // - The common charter reaches each session, a subagent's included, by the import of the
14
- // project's CLAUDE.md, from the package installed, which Claude Code loads whole; no hook writes it, since Claude Code caps a hook's output (10,000 characters).
15
+ // project's CLAUDE.md, from the package installed, which Claude Code loads whole; no hook writes
16
+ // it, since Claude Code caps a hook's output (10,000 characters).
15
17
  // - Each subcommand runs `grillhouse <sous-commande>`; without the command, `session-start` writes
16
18
  // a section that says to run `npm install`, and any other subcommand exits 0 and writes nothing.
17
19
  // - The command receives the hook's input on its standard input, writes on the hook's outputs, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomi-fields/grillhouse",
3
- "version": "0.50.0",
3
+ "version": "0.50.1",
4
4
  "description": "Roomi's Grillhouse: the frame's scripts, called by one command, grillhouse <sous-commande>",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // The stop of the session of supervision: the hook Stop of the frame's plugin runs it
3
- // (`grillhouse attente-a-l-arret`) when the session ends its turn, to wait for the owner. As an
4
- // alert not acknowledged pages again (PagerDuty), the supervisor does not go to sleep while a
5
- // circuit waits for it (grillhouse-d4n.9: bf5 stopped on a question at 17:06, read 40 min later,
6
- // on the owner's word). It asks for no wait: the greffon pushes the questions of the circuits.
3
+ // (`grillhouse attente-a-l-arret`) when the session ends its turn: the supervisor does not end its
4
+ // turn while a circuit waits for it, as an alert not acknowledged pages again (PagerDuty). It asks
5
+ // for no wait: the greffon pushes the questions of the circuits (greffon.md, §5.1).
7
6
  //
8
7
  // - Stop runs for the session itself, never for a sub-agent (SubagentStop). The session is the
9
8
  // supervisor's as for the signal of the turn (`racineDeLaSupervision` of
@@ -13,10 +12,10 @@
13
12
  // scripts/superviseur.mjs, a circuit ended without its issue included): the stop is blocked
14
13
  // with each question, its ticket, its step and the command that answers it.
15
14
  // - Each question blocks once, by its key: it is noted in `.claude/worktrees/signale-a-l-arret.json`,
16
- // which keeps the questions that still wait alone (an older note that holds a `etat` reads
17
- // without error, the state dropped), so that a stop the supervisor decides (a question
18
- // carried to the owner) is never held in a loop (`stop_hook_active` is not read; Claude Code
19
- // caps the blocks in a row at eight in any case, hooks.md « Stop »).
15
+ // which keeps the questions that still wait alone (a note that holds an `etat` reads without
16
+ // error, the state dropped), so that a stop the supervisor decides (a question carried to the
17
+ // owner) is never held in a loop (`stop_hook_active` is not read; Claude Code caps the blocks
18
+ // in a row at eight in any case, hooks.md « Stop »).
20
19
  // - The block: the reason on the error stream, exit code 2, which Claude Code gives the session as
21
20
  // its next instruction (hooks.md, « Exit code 2 behavior per event »).
22
21
  // - A server that does not answer, a note that cannot be written, an input that is no JSON: the
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // The signal of the supervisor's turn: the hook UserPromptSubmit of the mod runs it at each turn
3
3
  // of a session of supervision (`npx grillhouse attente-au-tour`), and what it writes reaches the
4
- // session. A question of a circuit must never stay mute, as a review requested on GitHub is named
5
- // again until it is answered.
4
+ // session. A question of a circuit is named again until it is answered, as a review requested on
5
+ // GitHub is. Mechanism: greffon.md, §5.1.
6
6
  //
7
7
  // - It names each circuit that waits for the supervisor (`questionsEnAttente`, the one source of
8
8
  // the opening and of the greffon's reading), a circuit ended without its issue included: its
package/scripts/bilan.mjs CHANGED
@@ -9,79 +9,57 @@
9
9
  // prints the bilan of <ticket>, read from the main tree of the current directory; `--garder` keeps
10
10
  // it too, as the circuit does, so the next ticket's bilan names it as its base.
11
11
  //
12
- // - Its sources are structured results, never a text (tests/unit/circuit-sans-texte-libre.spec.ts):
13
- // the register of finished agents (`~/.claude/grillhouse/registre.jsonl`, GRILLHOUSE_REGISTRE
14
- // replaces it), each agent's latest line on the ticket (its project the main tree, or a folder
15
- // of it), its turns, its tokens, its cache reads and its cost, and the lines of the role
16
- // `circuit` of the steps the circuit leads itself; the results the circuit keeps,
17
- // `.claude/worktrees/<ticket>.fiches.jsonl`, each with its time: the launch of each session the
18
- // circuit opens or resumes (`lancement`: its role and its session id, the register line's
19
- // `agent`), the sheet of each session (`{ role, fiche }`), the outcome of each proof
20
- // (`resultat`: `ok`, its counts, `vide`) and of each check (`resultat`: `issue` vert, rouge or a-repasser, `finale`, its reds `rouges`), each
21
- // stop (`arret`, its name, `finale`, the outcome of the checks it stops), each developpeur session that changed no file of the plan (`inchange`), the
22
- // end of the questioning of the plan (`questionnement`: its `objet`, the questions the
23
- // questionneur asked, `questions`, whether an answer changed the plan, `change`, its `issue`,
24
- // AUCUNE, QUESTIONS or DÉSACCORD, and the questions left open, `ouvertes`), the end of the tri
25
- // of the discoveries (`tri`: the discoveries it read, `decouvertes`, whether its sheet
26
- // conformed, `conforme`, its verdicts by kind, `verdicts`; its sessions, the launches of object
27
- // `tri`), each end of a run on
28
- // a stop (`montee`: its code, its stop and the supervisor's session that ran it, `superviseur`);
29
- // where the circuit ended (`{ etape, raison, code }`), which the end of the circuit gives its
30
- // bilan (the effect `bilan`, scripts/effets.mjs) and the command reads from the Temporal server;
31
- // the night the project declares in its package.json (`grillhouse.plageDeNuit`); the transcript
32
- // of each supervisor's session a stop names (`~/.claude/projects/<projet>/<séance>.jsonl`), of
33
- // which the origin and the time of each message, as ccusage measures from the transcripts. It
34
- // reads no comment of the ticket. Every agent declares nothing: the bilan measures.
35
- // - The steps and the roles are those of scripts/etapes.mjs; a register line's role is read as the
36
- // board reads it (`roleDeLAgent`: bare, or scoped by the frame's plugin, `grillhouse:<rôle>`, as
37
- // the register writes it). Only the circuit's roles count, the
38
- // explorateur of the plan among them. Only the sessions the circuit launched count in
39
- // the window, the categories, the tokens and the cost; a session of a circuit's role on the
40
- // ticket the circuit did not launch, the supervisor's, counts apart (`seances.horsCircuit`: its
41
- // number, by role, its cost).
42
- // - The window: from the first turn of a session or a step to the last result of the circuit or
43
- // the last turn; its length is the wall time.
12
+ // - Its sources are structured results, never a text (tests/unit/circuit-sans-texte-libre.spec.ts),
13
+ // and no comment of the ticket: the register of finished agents (`~/.claude/grillhouse/
14
+ // registre.jsonl`, GRILLHOUSE_REGISTRE replaces it), each agent's latest line on the ticket
15
+ // (turns, tokens, cache reads, cost) and the lines of the role `circuit`; the results the circuit
16
+ // keeps, `.claude/worktrees/<ticket>.fiches.jsonl`, each with its time (`lancement`, the sheet
17
+ // `{ role, fiche }`, `resultat` of a proof or of a check, `arret`, `inchange`, `questionnement`,
18
+ // `tri`, `montee`), and where the circuit ended (`{ etape, raison, code }`, given by the effect
19
+ // `bilan` of scripts/effets.mjs and read from the Temporal server by the command); the night
20
+ // the project declares (`grillhouse.plageDeNuit`); the transcript of each supervisor's session
21
+ // a stop names (`~/.claude/projects/<projet>/<séance>.jsonl`), for the origin and the time of
22
+ // each message.
23
+ // - The steps and the roles are those of scripts/etapes.mjs; a register line's role is read as
24
+ // the board reads it (`roleDeLAgent`: bare, or scoped `grillhouse:<rôle>`). Only the circuit's
25
+ // roles count; only the sessions the circuit launched count in the window, the categories, the
26
+ // tokens and the cost; a session of a circuit's role the circuit did not launch counts apart
27
+ // (`seances.horsCircuit`: its number, by role, its cost).
28
+ // - The window runs from the first turn of a session or a step to the last result of the circuit
29
+ // or the last turn; its length is the wall time. A step `controles` whose outcome or stop is
30
+ // the final pass's (`finale`) is the final pass.
44
31
  // - Each turn of a session and each step finds its result: a step, the last outcome or stop of
45
32
  // its step kept during it, before the next step of its name; a session, the first sheet of its
46
- // role kept after its turn, before the next turn of any other. Every step is one for the whole ticket. A step `controles` whose
47
- // outcome or stop is the final pass's (`finale`) is the final pass.
33
+ // role kept after its turn, before the next turn of any other.
48
34
  // - The categories, each instant once:
49
35
  // - travail resté au lot: a session that delivered, the reviewer's included;
50
- // - relance sans effet: a developer whose session changed no file of the plan (`inchange`, which
51
- // the circuit measures), whatever stop follows it; a testwriter whose next
52
- // proof finds the lot of the proof before it (the same counts of reds, greens of the lot,
53
- // broken files and greens of HEAD), after a refused proof, or no file of the lot (`vide`:
54
- // reds that exist already or of a build alone, no green of the lot); that proof; checks that
55
- // play the same measure again (their outcome and their reds) with no delivery of the testwriter or the developpeur since the
56
- // checks of their kind before (the final pass: since the final pass before);
57
- // - questionnement: a session of the questionneur (kept: a look that did not write the plan, as
58
- // a review);
59
- // - attente du superviseur, attente du responsable, nuit: as the lead time of DORA separates the
60
- // wait for review from the work, each wait runs from an end of a run on a stop (`montee`) to
61
- // the first turn of a session or step after it, or the next result of the circuit, the first
62
- // of the two; it is the owner's when he wrote during it, a message of the person
63
- // (`origin.kind` « human ») in the supervisor's session the stop names; else the supervisor's;
64
- // but its part in the night: the hours of
65
- // `grillhouse.plageDeNuit` in the project's package.json (`{ debut, fin }`, in local time), from 23 h to 8 h without it;
36
+ // - relance sans effet: a developer whose session changed no file of the plan (`inchange`); a
37
+ // testwriter whose next proof finds the lot of the proof before it (same counts of reds,
38
+ // greens of the lot, broken files, greens of HEAD) or no file of the lot (`vide`), and that
39
+ // proof; checks that play the same measure again with no delivery since the checks of their
40
+ // kind before (the final pass: since the final pass before);
41
+ // - questionnement: a session of the questionneur;
42
+ // - attente du superviseur, attente du responsable, nuit: each wait runs from an end of a run on
43
+ // a stop (`montee`) to the first turn of a session or step after it, or the next result of the
44
+ // circuit; it is the owner's when a message of the person (`origin.kind` « human ») came in
45
+ // the supervisor's session the stop names, else the supervisor's; its part in the night is
46
+ // the hours of `grillhouse.plageDeNuit` (`{ debut, fin }`, local time), 23 h to 8 h without it;
66
47
  // - étapes automatiques: the other steps the circuit leads, but the final passes;
67
48
  // - passes finales: the final passes, but those without effect or replayed;
68
- // - rejeu d'étapes déjà vertes: the same, on a lot unchanged since green: checks green again,
69
- // a testwriter run again on a proven lot, its proof;
49
+ // - rejeu d'étapes déjà vertes: the same, on a lot unchanged since green;
70
50
  // - entre deux étapes: the rest of the window.
71
51
  // What is lost is the wall time out of the work, the questioning, the automatic steps and the
72
52
  // final passes. The text gives the wall time and the wall time out of the night spent waiting
73
53
  // (« hors nuit d'attente »: a night at work stays in it), the time lost and the time lost out of
74
54
  // the waits.
75
- // - The bilan counts the sessions by role, the steps by their titles, the stops by kind (`arret`),
76
- // the ends on a stop (the waits), the questions of the plan asked, the plans they changed and the
77
- // questions left open, the tri of the discoveries on a line of its own when there was one (its
78
- // sessions, its discoveries and its verdicts, or its sheet that did not conform), the tokens,
79
- // the cache reads and the cost (a session without a cost
80
- // counts 0); a session's tokens go to its turns by their time.
55
+ // - It counts the sessions by role, the steps by title, the stops by kind (`arret`), the waits,
56
+ // the questions of the plan asked, the plans they changed and the questions left open, the tri
57
+ // of the discoveries on a line of its own, the tokens, the cache reads and the cost (a session
58
+ // without a cost counts 0); a session's tokens go to its turns by their time.
81
59
  // - It is kept in the main tree, `.claude/worktrees/<ticket>.bilan.json`, and compares itself with
82
- // the latest other ticket of the project whose bilan is kept, its bilan computed again by this
83
- // version from its sources (`precedent`), or with nothing when they give none: no figure kept by
84
- // an earlier version, and none of another project, is written here.
60
+ // the latest other ticket of the project whose bilan is kept, recomputed by this version from
61
+ // its sources (`precedent`), or with nothing when none is: no figure kept by an earlier version,
62
+ // and none of another project, is written here.
85
63
  import { spawnSync } from 'node:child_process';
86
64
  import {
87
65
  closeSync,
package/scripts/cadre.mjs CHANGED
@@ -18,7 +18,8 @@
18
18
  // repository, two levels above the package. CADRE is the root the template is read from:
19
19
  // `cadre/` of the installed package, else the repository. So the package reads the same files
20
20
  // wherever it is installed, and the repository keeps one address for each.
21
- // - The copy of the plugin, ELEMENTS_DU_GREFFON, is each entry of `mods/grillhouse/` but its tests
21
+ // - The copy of the plugin, ELEMENTS_DU_GREFFON, is each entry of `mods/grillhouse/` that git does
22
+ // not ignore, but its tests
22
23
  // (`tests/`), its configuration of TypeScript (`tsconfig.json`) and what makes it a package of the
23
24
  // workspace (`package.json`, `turbo.json`, `.turbo`, `node_modules`), at the package's root,
24
25
  // beside the package's own entries, PROPRES_DU_PAQUET; an entry of the plugin of the same name
@@ -27,6 +28,7 @@
27
28
  // carries none.
28
29
  // - VERSION is the `version` of the package's package.json, the one version of the package and its
29
30
  // plugin.
31
+ import { spawnSync } from 'node:child_process';
30
32
  import { cpSync, existsSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
31
33
  import path from 'node:path';
32
34
  import { pathToFileURL } from 'node:url';
@@ -66,12 +68,29 @@ export const HORS_DU_GREFFON = [
66
68
  'node_modules',
67
69
  ];
68
70
 
71
+ /**
72
+ * The entries of a plugin's source directory the package copies: each one but HORS_DU_GREFFON and
73
+ * what git ignores (a cache a tool wrote there), as `npm pack` leaves out what .gitignore names.
74
+ */
75
+ export function elementsDuGreffon(source) {
76
+ if (!existsSync(source)) {
77
+ return [];
78
+ }
79
+ const entrees = readdirSync(source).filter(e => !HORS_DU_GREFFON.includes(e));
80
+ if (entrees.length === 0) {
81
+ return [];
82
+ }
83
+ const { stdout } = spawnSync('git', ['check-ignore', '-z', '--stdin'], {
84
+ cwd: source,
85
+ input: entrees.join('\0'),
86
+ encoding: 'utf8',
87
+ });
88
+ const ignorees = new Set(stdout.split('\0').filter(Boolean));
89
+ return entrees.filter(e => !ignorees.has(e)).sort();
90
+ }
91
+
69
92
  /** The entries of the plugin, which `--empaqueter` copies at the package's root. */
70
- export const ELEMENTS_DU_GREFFON = existsSync(SOURCE_DU_GREFFON)
71
- ? readdirSync(SOURCE_DU_GREFFON)
72
- .filter(e => !HORS_DU_GREFFON.includes(e))
73
- .sort()
74
- : [];
93
+ export const ELEMENTS_DU_GREFFON = elementsDuGreffon(SOURCE_DU_GREFFON);
75
94
 
76
95
  /** The root of the frame's files: the package's copy when installed, else the repository. */
77
96
  export const CADRE = INSTALLE ? COPIE : DEPOT;
@@ -7,6 +7,7 @@
7
7
  // - The guard runs in this process, as if Node had been given its path, as `grillhouse` runs a
8
8
  // subcommand (bin/grillhouse.mjs).
9
9
  // - A name that is not a hook of the frame is refused, named on the error stream; exit code 2.
10
+ // These are git hooks; the hooks of Claude Code are those of mods/grillhouse/hooks/crochet.mjs.
10
11
  import path from 'node:path';
11
12
  import { fileURLToPath, pathToFileURL } from 'node:url';
12
13
  import { CROCHETS } from './crochets.mjs';
@@ -30,8 +30,10 @@
30
30
  // Exit code: 0 for an ACCEPTÉ lot, 1 for a RENDU lot (the same command resumes the agent), 2 for a
31
31
  // usage fault or a refusal, 3 for a stop that goes up to the supervisor.
32
32
  import { spawnSync } from 'node:child_process';
33
- import { existsSync } from 'node:fs';
33
+ import { existsSync, realpathSync } from 'node:fs';
34
+ import path from 'node:path';
34
35
  import { pathToFileURL } from 'node:url';
36
+ import { ecritPar, preparer } from './enveloppe/travail-de-la-copie.mjs';
35
37
  import { prendreUnePlace, VARIABLE_TENUE } from './places-de-la-machine.mjs';
36
38
  import { bloquantsDeLaFiche } from './resultats.mjs';
37
39
  import { consigne } from './seances.mjs';
@@ -106,6 +108,34 @@ export function decisionDuDirect(fiches, lot) {
106
108
 
107
109
  const RAISON_DU_VERROU = "copie d'un ticket direct : son lot n'est pas encore sur main";
108
110
 
111
+ /**
112
+ * Whether git holds the copy <copie> locked, read on its stable output (`git worktree list
113
+ * --porcelain`, a `locked` line in the block of the copy), never on a message git translates.
114
+ * @param {string} copie
115
+ * @param {(...args: string[]) => { status: number, stdout: string, stderr: string }} git
116
+ */
117
+ function estVerrouillee(copie, git) {
118
+ const r = git('worktree', 'list', '--porcelain');
119
+ if (r.status !== 0) {
120
+ return false;
121
+ }
122
+ const chemins = new Set([path.resolve(copie)]);
123
+ if (existsSync(copie)) {
124
+ chemins.add(realpathSync(copie));
125
+ }
126
+ return String(r.stdout)
127
+ .split(/\n\s*\n/)
128
+ .some(bloc => {
129
+ const lignes = bloc.split('\n');
130
+ const chemin = lignes.find(l => l.startsWith('worktree '))?.slice('worktree '.length);
131
+ return (
132
+ chemin !== undefined &&
133
+ chemins.has(chemin) &&
134
+ lignes.some(l => l === 'locked' || l.startsWith('locked '))
135
+ );
136
+ });
137
+ }
138
+
109
139
  /**
110
140
  * Locks the copy <copie> against the cleaning of the circuit, which removes a copy identical to
111
141
  * main (`git worktree lock`, <git> its runner); a copy already locked stays so.
@@ -114,7 +144,7 @@ const RAISON_DU_VERROU = "copie d'un ticket direct : son lot n'est pas encore su
114
144
  */
115
145
  export function verrouillerLaCopie(copie, git) {
116
146
  const r = git('worktree', 'lock', '--reason', RAISON_DU_VERROU, copie);
117
- if (r.status !== 0 && !/already locked/.test(r.stderr)) {
147
+ if (r.status !== 0 && !estVerrouillee(copie, git)) {
118
148
  throw new Error(`la copie ${copie} ne se verrouille pas : ${r.stderr}`.trim());
119
149
  }
120
150
  }
@@ -133,7 +163,7 @@ export function deverrouillerLaCopie(copie, git) {
133
163
 
134
164
  /**
135
165
  * The command: the agent, then the reviewer, and it stops. <ports> are what it launches
136
- * (`copie`, `verrouiller`, `fiches`, `lot`, `resoudre`, `seance`, `relecture`); <options> the paths
166
+ * (`copie`, `verrouiller`, `avancer`, `fiches`, `lot`, `resoudre`, `seance`, `relecture`); <options> the paths
137
167
  * `--paquet` adds to the plan.
138
168
  * @param {{ id: string, ticket: { title?: string, labels?: string[] }, options?: string[], ports: any }} o
139
169
  * @returns {Promise<{ verdict?: string, copie?: string, constats?: object[], arret?: boolean, statut?: string, rendus?: number, fiche?: object }>}
@@ -170,7 +200,10 @@ export async function lancerLeDirect({ id, ticket, options = [], ports }) {
170
200
  // its review; given back at the end, whatever the end.
171
201
  const rendre = ports.place();
172
202
  try {
173
- const fiche = await ports.seance('direct', { constats, paquets: plan });
203
+ // The copy moves onto main before the session: the files its work meets in conflict go to the
204
+ // agent, who writes them all, as the author of a lot resolves his own rebase.
205
+ const { fichiers = [] } = (await ports.avancer(copie)) ?? {};
206
+ const fiche = await ports.seance('direct', { constats, paquets: plan, conflits: fichiers });
174
207
  if (fiche?.statut && fiche.statut !== 'FAIT') {
175
208
  return { arret: true, statut: fiche.statut, fiche, copie };
176
209
  }
@@ -181,6 +214,18 @@ export async function lancerLeDirect({ id, ticket, options = [], ports }) {
181
214
  }
182
215
  }
183
216
 
217
+ /**
218
+ * What the agent of a direct reads of the files its work meets in conflict with main (« aucun »
219
+ * without any).
220
+ * @param {string[]} fichiers
221
+ * @returns {string}
222
+ */
223
+ export function rapportDuConflit(fichiers) {
224
+ return fichiers.length
225
+ ? `L'avance de la copie sur main a laissé ces fichiers en conflit avec ton travail : ${fichiers.join(', ')}. Les marques de conflit sont dans la copie (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`) : tu résous chaque fichier, marques retirées ; un fichier du lot gardé (\`grillhouse-travail.patch\`, dans le dossier git de la copie) se reprend à la main dans la copie.`
226
+ : 'aucun';
227
+ }
228
+
184
229
  // The task the agent of a direct reads at the head of its instruction.
185
230
  const TACHE_DU_DIRECT =
186
231
  "Ce ticket est mené en direct, hors du circuit : tu écris ses tests et son code ensemble, dans les paquets de ton plan. Un défaut corrigé porte un test qui le reproduit. Aucune preuve du rouge ni aucun contrôle du circuit ne suit ta séance : un relecteur juge ton lot, puis le superviseur le vérifie. Les constats ci-dessous, s'il y en a, viennent de ce relecteur.";
@@ -239,7 +284,20 @@ async function portsDuProjet(id, { contexteDuSuperviseur }) {
239
284
  fiches: () =>
240
285
  lesFiches(ctx).map(e => (e.role === 'relecteur' ? { ...e, lot: e.lot?.arbre } : e)),
241
286
  lot: () => arbreDeLaCopie(ctx),
242
- seance: async (_role, { constats, paquets }) => {
287
+ // The advance of the copy onto the tip of main, as the launcher plays it: `{ fichiers }`, the
288
+ // files in conflict or kept in the lot, which the agent of a direct writes (`ecritPar`).
289
+ avancer: copie => {
290
+ const tete = git('rev-parse', 'HEAD');
291
+ if (tete.status !== 0) {
292
+ return { fichiers: [] };
293
+ }
294
+ const r = preparer(copie, String(tete.stdout).trim(), {
295
+ ecrit: ecritPar('direct', () => false),
296
+ sortie: 1,
297
+ });
298
+ return { fichiers: [...(r.conflits ?? []), ...(r.enAttente ?? [])] };
299
+ },
300
+ seance: async (_role, { constats, paquets, conflits = [] }) => {
243
301
  ctx.paquets = paquets;
244
302
  ctx.contexte = ctx.contexteDuDirect;
245
303
  const r = await seance(ctx, 'direct', {
@@ -249,6 +307,7 @@ async function portsDuProjet(id, { contexteDuSuperviseur }) {
249
307
  evenement: 'neuve',
250
308
  fiche: 'developpeur',
251
309
  constats: ouverts(constats),
310
+ rapport: conflits.length ? rapportDuConflit(conflits) : undefined,
252
311
  lectures: { lots: () => [], references: () => [] },
253
312
  });
254
313
  return r.fiche;
@@ -29,8 +29,9 @@
29
29
  // hooks and servers are not the role's), save the frame's (`grillhouse@…`), which carries the
30
30
  // role's agent, its skills and the frame's hooks: Claude Code applies no `skillOverrides` to the
31
31
  // skills of a plugin, and the role's agent preloads its own (`skills` of its definition);
32
- // the background tasks off (`env`, SANS_TACHE_DE_FOND: a role waits in the foreground for what
33
- // it launches, and its session ends with its sheet); for a role that writes, its locks as hooks (PreToolUse: verrous/verrou.mjs on the tools of
32
+ // the background tasks off and Code Mode on (`env`, ENV_DES_SEANCES: a role waits in the
33
+ // foreground for what it launches, and its session ends with its sheet; `claude -p` gets Code
34
+ // Mode, the REPL, only from this block); for a role that writes, its locks as hooks (PreToolUse: verrous/verrou.mjs on the tools of
34
35
  // writing, verrous/commande.mjs on Bash), since the hooks of an agent's definition do not run in
35
36
  // a folder Claude Code has not trusted, as the copy of a ticket.
36
37
  // - `--tools <list>`: the tools its work uses; Edit and Write for a role that writes alone, the
@@ -82,10 +83,15 @@ const ECRIRE_AU_TICKET = [
82
83
  'Bash(bd delete*)',
83
84
  'Bash(npx grillhouse ticket*)',
84
85
  ];
85
- // The variable that turns off the background tasks of Claude Code (the Bash tool's
86
- // `run_in_background`, the background agents): `claude -p` waits for them before it ends, so a
87
- // session ends with its sheet only without them.
88
- const SANS_TACHE_DE_FOND = { CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1' };
86
+ // The variables of the env block of every session. One turns off the background tasks of Claude
87
+ // Code (the Bash tool's `run_in_background`, the background agents): `claude -p` waits for them
88
+ // before it ends, so a session ends with its sheet only without them. The other turns on Code Mode
89
+ // (the REPL): `claude -p` gets it only from the env block of `--settings`; the hooks and the
90
+ // permissions of the role apply to the tools the REPL calls.
91
+ const ENV_DES_SEANCES = {
92
+ CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1',
93
+ CLAUDE_CODE_EXPERIMENTAL_CODE_MODE: '1',
94
+ };
89
95
 
90
96
  // The reads of git in the copy, by its path (`git -C <copie> …`), which Claude Code does not let
91
97
  // through without a rule, as it does `git status` in the working directory.
@@ -369,7 +375,7 @@ function reglagesDuRole(role, { racine, copie = racine, ticket, home }) {
369
375
  .filter(g => !g.startsWith(GREFFON_DU_CADRE))
370
376
  .map(g => [g, false])
371
377
  ),
372
- env: SANS_TACHE_DE_FOND,
378
+ env: ENV_DES_SEANCES,
373
379
  };
374
380
  // The write lock runs the frame of the main tree, never the copy's; a copy that is the root keeps
375
381
  // the project's own command.
@@ -335,11 +335,16 @@ export function rolesDuConflit(fichiers, estUnTest) {
335
335
 
336
336
  /**
337
337
  * Whether the role <role> writes a file, as a function of the file: the testwriter those
338
- * <estUnTest> judges, the developpeur the others, any other role none (undefined).
338
+ * <estUnTest> judges, the developpeur the others, the agent of a direct (`direct`) every file, any
339
+ * other role none (undefined).
339
340
  * @param {string} role
340
341
  * @param {(fichier: string) => unknown} estUnTest
341
342
  */
342
343
  export function ecritPar(role, estUnTest) {
344
+ if (role === 'direct') {
345
+ // The agent of a direct writes tests and code together: every file is its own.
346
+ return () => true;
347
+ }
343
348
  if (role === 'testwriter') {
344
349
  return f => Boolean(estUnTest(f));
345
350
  }
@@ -1,7 +1,8 @@
1
1
  #!/bin/bash
2
2
  # The default left part of the Grillhouse status line, for a person without a status line command
3
3
  # of their own: the model, the context used, the OpenRouter credit (cache 30 s) or the Anthropic
4
- # rate limits over 5 h and 7 days. Reads Claude Code's status line input on stdin.
4
+ # rate limits over 5 h and 7 days. Reads Claude Code's status line input on stdin. Played by
5
+ # scripts/ligne-etat/ligne-etat.mjs (greffon.md, §3.1).
5
6
 
6
7
  input=$(cat)
7
8
 
@@ -9,6 +9,7 @@
9
9
  // - The right part: `grillhouse-etat.txt` in the project's common git directory, which each
10
10
  // measure of the follower writes (`scripts/suiveur.mjs`), dim, aligned on the terminal's width
11
11
  // (COLUMNS), on the first line; nothing when that measure is older than 10 minutes.
12
+ // Mechanism: greffon.md, §3.1 (the status line) and §4.3 (the status text).
12
13
  import { execFileSync } from 'node:child_process';
13
14
  import { readFileSync } from 'node:fs';
14
15
  import os from 'node:os';
@@ -1,8 +1,6 @@
1
1
  // The stop of an agent of a team with an unread message: the hooks SubagentStop and TeammateIdle
2
- // of the frame's plugin run it (`grillhouse messages-non-lus`), as a consumer of a queue (SQS,
3
- // Kafka) does not stop with messages it has not acknowledged. A message SendMessage leaves in the
4
- // box of an agent while the agent writes its last answer is otherwise read by no one: the agent
5
- // ends its turn and waits, and the instruction waits with it.
2
+ // of the frame's plugin run it (`grillhouse messages-non-lus`), as a consumer of a queue does not
3
+ // stop with messages it has not acknowledged. Mechanism: greffon.md, §3.2.
6
4
  //
7
5
  // - The box of an agent is `~/.claude/teams/<équipe>/inboxes/<nom>.json`, an array of entries
8
6
  // `{ from, text, summary, timestamp, msg_id, read }`, which Claude Code writes and marks read
@@ -1,7 +1,7 @@
1
1
  // `grillhouse newday`: sets the day's marker of the project to now (scripts/tableau.mjs,
2
2
  // `poserLeRepere`). FAITS AUJOURD'HUI and the board's « rejetés » and « validés » cases then count
3
- // only since it, while « new » and « →check » stay (grillhouse-3uv.96). The mod's command
4
- // /grillhouse:newday runs it.
3
+ // only since it, while « new » and « →check » stay. The mod's command /grillhouse:newday runs it
4
+ // (greffon.md, §4.1, the day's marker).
5
5
  import { pathToFileURL } from 'node:url';
6
6
  import { poserLeRepere } from './tableau.mjs';
7
7
 
@@ -1,20 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  // The register of finished agents: one JSON line per agent that ends, written by a hook of the
3
3
  // frame's plugin (`grillhouse registre`: SubagentStop for a sub-agent, SessionEnd for a session, a
4
- // role agent launched in a shell included). An agent resumed by a message has one line per stop; the board
5
- // reads an agent's latest line, and the transcripts of running ones. The circuit of a ticket
6
- // (scripts/circuit.mjs) writes a line at the end of each step it leads itself, with no agent
4
+ // role agent launched in a shell included). Mechanism: greffon.md, §5.5.
5
+ // An agent resumed by a message has one line per stop; the board reads an agent's latest line. The
6
+ // circuit of a ticket (scripts/circuit.mjs) writes a line at the end of each step it leads itself
7
7
  // (`ligneDEtape`: its role `circuit`, its step, one turn, no tokens). The workflow of the nights
8
8
  // (src/temporal/nuits/) writes a line for each night it skips (`ligneDeNuit`: its role `nuit`, no
9
- // ticket, no turn, the reason, the top and the reference compared), which the board counts nowhere;
10
- // the projects the register names are those whose night it plays.
9
+ // ticket, no turn, the reason, the top and the reference compared), which the board counts
10
+ // nowhere; the projects the register names are those whose night it plays.
11
11
  //
12
12
  // - The line: the project (the main tree of the directory the session opened in, which the hook
13
13
  // reads in CLAUDE_PROJECT_DIR, else in its input's `cwd`), the agent, its ticket (« TON TICKET : »),
14
- // its role,
15
- // its start and end, its working time and the turns it sums (start and end in milliseconds, the
16
- // waits for a message left out), its tokens, its cache reads and its cost. All of it is read from
17
- // the agent's transcript; the agent declares nothing.
14
+ // its role, its start and end, its working time and the turns it sums (start and end in
15
+ // milliseconds, the waits for a message left out), its tokens, its cache reads and its cost. All
16
+ // of it is read from the agent's transcript; the agent declares nothing.
18
17
  // - The cost is the total the session writes, as ccusage keeps it; without one, or with a total of
19
18
  // 0 for tokens spent (a sub-agent's transcript holds none), it is the usage of each model at its
20
19
  // tariff (`TARIFS`), as Claude Code reckons it. A model without a tariff that spent tokens leaves
@@ -22,20 +21,19 @@
22
21
  // - The register is `~/.claude/grillhouse/registre.jsonl` (GRILLHOUSE_REGISTRE replaces it): the
23
22
  // envelope of a role agent leaves it writable.
24
23
  // - A hook never stops the session, and never waits for a transcript: it hands the fields of its
25
- // input that the line reads to a detached process (`--ecrire`) and ends at once, so a session of several hundred MB closes
26
- // before Claude Code's hook time limit. The detached process reads the transcript in chunks
27
- // (`lireFichier` in tableau.mjs), never whole; a transcript it cannot read writes nothing.
24
+ // input that the line reads to a detached process (`--ecrire`) and ends at once, within Claude
25
+ // Code's hook time limit. The detached process reads the transcript in chunks (`lireFichier` in
26
+ // tableau.mjs), never whole; a transcript it cannot read writes nothing.
28
27
  // - One stop has one line: the write holds the register's lock (`prendreVerrou`, judged by the
29
28
  // lock's age, since a role agent's envelope and the outside do not share process numbers),
30
29
  // and skips a line whose agent and end the register already holds. The hook and
31
30
  // `--rattraper` write the same way.
32
31
  // - `npx grillhouse registre --copie <copie>` writes the lines of the sessions of an agent's copy
33
32
  // the register does not hold yet, whatever their age: the launcher (scripts/enveloppe/lancer.sh)
34
- // runs it once the envelope has ended, outside it, so a role agent's line no longer rests on its
35
- // end hook alone.
33
+ // runs it once the envelope has ended, outside it.
36
34
  // - `npx grillhouse registre --rattraper` writes the lines of the project's finished agents the
37
- // register does not hold yet: those that ended before the hook existed, read from their
38
- // transcripts (the project's sessions and their sub-agents, the agents' copies). A transcript
35
+ // register does not hold yet, read from their transcripts (the project's sessions and their
36
+ // sub-agents, the agents' copies). A transcript
39
37
  // that the board shows running (`tourne` in tableau.mjs: moved in the last 2 minutes, or, for a
40
38
  // sub-agent, its last tool call awaiting its answer within 30 minutes) waits for its hook.
41
39
  import { execFileSync, spawn } from 'node:child_process';
@@ -1,53 +1,40 @@
1
1
  #!/usr/bin/env bash
2
- # SessionStart hook: tells the session what the project still lacks before work can start.
3
- # Silent once the project is set up and initialised. It changes nothing, save the lock of the
4
- # supervisor below.
2
+ # SessionStart hook (`grillhouse session-start`): tells the session what the project still lacks
3
+ # before work can start. Silent once the project is set up and initialised. It changes nothing,
4
+ # save the lock of the supervisor. Mechanism: greffon.md, §5.2 (the missing and the unfilled:
5
+ # installation.md).
5
6
  #
6
- # The project's own check: `grillhouse.demarrage` in the package.json of the root names an npm
7
- # script (`npm pkg set grillhouse.demarrage=<script>`). The session start plays
8
- # `npm run --silent <script>` at the root; each non-blank line it writes joins the list « Pas encore
9
- # renseignés », as an item to deal with. The script has 10 s: past them its whole process group is
10
- # stopped. A failure (non-zero code) or a stop adds a line that says so, after the lines already
11
- # written; the session start goes on. Without the key (or with null), nothing runs; a value that is
12
- # not a non-blank string runs nothing and adds a line that says so. An agent's copy does not play it.
7
+ # Each check below joins the list « Manque » or « Pas encore renseignés ».
8
+ # - The project's own check: `grillhouse.demarrage` in the root package.json names an npm script;
9
+ # `npm run --silent <script>` runs at the root, 10 s (past them its whole process group is
10
+ # stopped), and each non-blank line it writes joins « Pas encore renseignés ». A failure or a
11
+ # stop adds a line that says so; the session start goes on. Without the key (or with null)
12
+ # nothing runs; a value that is not a non-blank string runs nothing and adds a line that says
13
+ # so. An agent's copy does not play it.
14
+ # - The Node of the dependencies: installed (`npm ci`) under another binary interface of Node than
15
+ # the current one, the project joins « Manque » with `npm ci` (scripts/abi-des-dependances.mjs).
16
+ # - The languages: no language declared in the column « Langage » of the table of the components of
17
+ # docs/ARCHITECTURE.md (scripts/langages.mjs) joins « Manque » as « le langage de chaque
18
+ # paquet », with the grill, or with `npx grillhouse maj` for a declaration of a former version.
19
+ # A document that holds a field <…> of its template stays under « Pas encore renseignés ».
20
+ # - The plugins: scripts/greffons.mjs --absents reads `.claude/settings.json` and
21
+ # `claude plugin list --json` (each call stopped after 5 s). Each declared plugin not installed
22
+ # joins « Manque » as « le greffon <id> », the missing claude command as « la commande claude »
23
+ # (with `npx grillhouse maj`), a failed or stopped reading as « la lecture des greffons … »; the
24
+ # same reading names the mod installed at another version than the package, with the command
25
+ # that aligns it. An agent's copy does not read them.
26
+ # - The worker of Temporal on a former version after a change of `grillhouse.outil` (`grillhouse
27
+ # temporal perime`) joins « Manque » with `npx grillhouse temporal installer`. An agent's copy
28
+ # does not read it.
13
29
  #
14
- # The Node of the dependencies: a project whose dependencies were installed (`npm ci`) under
15
- # another binary interface of Node than the current one joins « Manque », with `npm ci`
16
- # (scripts/abi-des-dependances.mjs).
30
+ # The supervisor (scripts/superviseur.mjs): the session takes the lock of its repository; when its
31
+ # opening takes it (not when it keeps it) it receives « Les questions des circuits » then « Les
32
+ # circuits du dépôt »; a second session while the first lives receives first « Un autre
33
+ # superviseur tient ce dépôt ». An agent's copy takes nothing and receives nothing.
17
34
  #
18
- # The project's languages: a project whose docs/ARCHITECTURE.md declares none (the column
19
- # « Langage » of its table of the components, scripts/langages.mjs) joins « Manque » as « le
20
- # langage de chaque paquet », with the grill, which writes it, or with `npx grillhouse maj` for a
21
- # project that holds the declaration of a former version, which it reports. A document of the project that holds
22
- # a field <…> of its template (the template's docs/ARCHITECTURE.md declares its language, its
23
- # other fields left to the grill) is not yet written: it stays under « Pas encore renseignés », and
24
- # the line of the night waits for it.
25
- #
26
- # The frame's plugins: scripts/greffons.mjs --absents reads `.claude/settings.json` and
27
- # `claude plugin list --json` (each call stopped after 5 s). Each declared plugin not installed for
28
- # the project joins « Manque » as « le greffon <id> », the missing claude command as « la commande
29
- # claude » (the line gives `npx grillhouse maj`, which installs them), and a reading that fails
30
- # or is stopped as « la lecture des greffons … ». The same reading names the frame's mod installed
31
- # for the project at another version than the package @roomi-fields/grillhouse, both released under
32
- # one version, with the command that aligns the one behind. An agent's copy does not read them.
33
- #
34
- # The worker of Temporal on a former version after a rise of `grillhouse.outil` (see below, the
35
- # detection `grillhouse temporal perime`): joins « Manque » with `npx grillhouse temporal installer`.
36
- # An agent's copy does not read it.
37
- #
38
- # One supervisor per project (scripts/superviseur.mjs): the session takes the lock of its
39
- # repository, and, when its opening takes the lock (not when it keeps it, after a compaction or a
40
- # /clear), receives the section « Les questions des circuits » (the greffon pushes the questions, the answer
41
- # acknowledges them; no wait to launch), then « Les circuits du dépôt » when there are some: each circuit that runs, each one stopped on a
42
- # question with its question and the command that answers it, each one whose workflow ended
43
- # without its issue with the command that resumes it; a second session, while the first one lives, receives first the section « Un autre
44
- # superviseur tient ce dépôt », which asks it to say so to the owner and to launch no circuit. An
45
- # agent's copy and a session of a role the circuit launches take nothing and receive nothing.
46
- #
47
- # A session of a role agent of the frame (`claude --agent <rôle>`, the circuit's sessions: the
48
- # hook's input names it, `agent_type`, bare or as `grillhouse:<rôle>`, and the frame's plugin
49
- # defines it, `$CLAUDE_PLUGIN_ROOT/agents/<rôle>.md`, the plugin whose hook runs this script) receives nothing:
50
- # what the project lacks is the supervisor's to deal with.
35
+ # A session of a role of the frame (`claude --agent <rôle>`: the hook's input names it,
36
+ # `agent_type`, bare or `grillhouse:<rôle>`, and the plugin defines it,
37
+ # `$CLAUDE_PLUGIN_ROOT/agents/<rôle>.md`) receives nothing.
51
38
  set -uo pipefail
52
39
 
53
40
  # The project is Claude Code's, else the working directory; the frame's scripts are this one's
@@ -1,6 +1,5 @@
1
1
  // The short name of a project on the displays shared between projects (the line of the places, the
2
- // board of several projects): the key `grillhouse.sigle` of its package.json (grillhouse-1lf, the
3
- // owner's word of 2026-11-12), else its ticket prefix (`issue-prefix` of .beads/config.yaml,
2
+ // board of several projects): the key `grillhouse.sigle` of its package.json, else its ticket prefix (`issue-prefix` of .beads/config.yaml,
4
3
  // ./prefixe-des-tickets.mjs). Read like the other keys `grillhouse.*` (./circuits-cles.mjs): as
5
4
  // written, a faulty value is named by its key.
6
5
  import { readFileSync } from 'node:fs';
@@ -4,7 +4,8 @@
4
4
  # the grill. Read-only; silent on every other message, including one that merely mentions structure,
5
5
  # and to a session of a role agent of the frame (`claude --agent <rôle>`: the input names it,
6
6
  # `agent_type`, bare or as `grillhouse:<rôle>`, and the frame's plugin defines it,
7
- # `$CLAUDE_PLUGIN_ROOT/agents/<rôle>.md`), whose instruction is a ticket's.
7
+ # `$CLAUDE_PLUGIN_ROOT/agents/<rôle>.md`), whose instruction is a ticket's. Mechanism: greffon.md,
8
+ # §3.2.
8
9
  entree="$(cat)"
9
10
  role="$(printf '%s' "$entree" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{const a=JSON.parse(s).agent_type;if(typeof a==="string"&&/^[A-Za-z0-9_:-]+$/.test(a))process.stdout.write(a)}catch{}})')"
10
11
  racine="${CLAUDE_PROJECT_DIR:-$PWD}"
@@ -1,7 +1,7 @@
1
1
  // The follower of the board (`grillhouse tableau --suivre`): one producer that follows the events
2
2
  // and, at each measure, writes the status line's text (`grillhouse-etat.txt`) and the pane's line
3
3
  // (`grillhouse-tableau.ligne`) from that one measure, in the common git directory. The status line
4
- // and the pane are readers; as watchman or `tsc --watch` keep one watch and one state.
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
7
  // references), a change of the set of circuits (a light poll of Temporal), the end of a bd or git
@@ -1,70 +1,51 @@
1
1
  #!/usr/bin/env node
2
- // One supervisor per project, as Zuul has one scheduler: a session of supervision holds the lock
3
- // of its repository, and a second one reads it, says so, and launches no circuit. Played by the
4
- // session start (scripts/session-start.sh), which writes what it says to the session.
2
+ // The lock of the supervisor of a project, and the reading of the questions of its circuits.
3
+ // Mechanism: greffon.md, §5.1 and §5.2. Played by the session start (scripts/session-start.sh),
4
+ // which writes what it says to the session.
5
5
  //
6
6
  // npx grillhouse superviseur <racine>
7
7
  //
8
8
  // - Out of a git repository, in an agent's copy (a worktree whose git directory is not the common
9
- // one) and in a session of a role that the circuit launches (BEADS_ACTOR set: the author of its
10
- // comments at the ticket), nothing is taken and nothing is said.
9
+ // one) and in a session of a role that the circuit launches (BEADS_ACTOR set), nothing is taken
10
+ // and nothing is said.
11
11
  // - The lock is `<git common dir>/grillhouse-superviseur.lock`, one for the repository and its
12
12
  // copies, taken through scripts/verrou-de-fichier.mjs for the session's own process: the first
13
- // process above this one named `claude`, whatever stands between them (the hook of the greffon,
14
- // the frame's command, a shell); without one, the first that is not a shell (sh, bash, dash, zsh).
15
- // It holds as long as that process lives: a lock whose process is gone is taken over.
16
- // - Free, or held by a process that is gone: taken, nothing said of it. Held by the session itself
17
- // (a session reopened in the same process, by a compaction or a /clear): kept, nothing said of
18
- // it, circuits included. Held by another live session: the
19
- // lock stays, and the section « ## Un autre superviseur tient ce dépôt » names its process and
20
- // since when it holds the lock, and asks to say so to the owner and to launch no circuit
21
- // (skill pitmaster, « Au lancement de la séance »).
22
- // - The session whose opening takes the lock (not one that keeps it) receives
23
- // (`circuitsALOuverture`) the section « ## Les questions des circuits », which says that the
24
- // greffon of the session pushes the questions into its queue of messages and that the answer
25
- // acknowledges them, then, when the repository has some (read from the Temporal server in one
26
- // call, scripts/circuits-du-serveur.mjs), « ## Les circuits du dépôt »: each circuit that runs,
27
- // named; each circuit stopped on a question, with its question and the command that answers it; each
28
- // circuit ended without its issue, with the command that resumes it (`--reprendre` from its last
29
- // state written, else `--depuis <testwriter|developpeur> --contexte <texte>`), which the
30
- // supervisor launches without waiting for the owner's word; their ticket open, and the stopped
31
- // and the ended ones then gone up; a server that does not answer is said; then « ## La file des
32
- // tickets », the tickets of the queue without their section « ## Architecture », which the
33
- // queue never starts (scripts/file-des-tickets.mjs), for the supervisor to write it. A circuit
34
- // runs on the worker of the project, apart from the sessions, its launch returns at once, and its
35
- // question reaches the supervisor by the push of the greffon (below). The queue of the
36
- // tickets under Temporal (src/temporal/tickets/) launches the tickets `circuit`, not the opening.
13
+ // process above this one named `claude`, whatever stands between them; without one, the first
14
+ // that is not a shell (sh, bash, dash, zsh). It holds as long as that process lives.
15
+ // - Free, or held by a process that is gone: taken, nothing said. Held by the session itself (a
16
+ // compaction or a /clear): kept, nothing said, circuits included. Held by another live session:
17
+ // the section « ## Un autre superviseur tient ce dépôt » names its process and since when, and
18
+ // asks to say so to the owner and to launch no circuit.
19
+ // - The session whose opening takes the lock (`circuitsALOuverture`) receives « ## Les questions
20
+ // des circuits », then, when the repository has circuits (read from the Temporal server in one
21
+ // call, scripts/circuits-du-serveur.mjs), « ## Les circuits du dépôt »: each circuit that runs;
22
+ // each circuit stopped on a question, with the command that answers it; each circuit ended
23
+ // without its issue, with the command that resumes it (`--reprendre` from its last state
24
+ // written, else `--depuis <testwriter|developpeur> --contexte <texte>`); a server that does not
25
+ // answer is said; then « ## La file des tickets », the tickets of the queue without their
26
+ // section « ## Architecture », which the queue never starts (scripts/file-des-tickets.mjs).
37
27
  // Exit 0, whatever it finds.
38
28
  //
39
29
  // npx grillhouse superviseur --relever [<dossier>]
40
30
  //
41
- // - One reading of the circuits for the greffon of the session of supervision (mods/grillhouse/
42
- // hooks/register.tsx), which runs it at each period and submits what it writes to the session,
43
- // in the queue of its messages (`$.prompt.submit`): the questions of a circuit are given as a
44
- // queue gives its messages, and the answer acknowledges them. It reads nothing and writes
45
- // nothing unless the session that runs it holds the lock of the supervisor (the one above); a
46
- // lock whose process is gone is taken over by the session that reads, as the opening does. It
47
- // writes the message of the reading (`texteDesQuestions`) when `relever` gives something,
48
- // nothing otherwise; exit 1 and the fault on the error stream when `grillhouse.rappel` is at
49
- // fault. A reading is one reading: no process waits.
50
- // - A question has three states the greffon keeps in the file of the stops gone up: sent (put in the
51
- // message of the session by `relever`), read (a turn of the session started with that message,
52
- // `superviseur --lue <dossier> <lueA> <envoyeesAvant>`, or the opening listed it), answered (it
53
- // leaves the file). It comes back only once read, <rappelMs> after its reading, as SQS counts the
54
- // visibility timeout of a message from its reception: one still in the queue is never sent again.
55
- // `superviseur --chez-le-responsable <dossier> <ticket>` (the answer `--chez-le-responsable` of
56
- // the circuit) marks a question carried to the owner: silent until the circuit answers.
31
+ // - One reading of the circuits for the greffon (mods/grillhouse/hooks/register.tsx), which runs
32
+ // it at each period and submits what it writes. It reads and writes nothing unless the session
33
+ // that runs it holds the lock; a lock whose process is gone is taken over by the session that
34
+ // reads. It writes the message (`texteDesQuestions`) when `relever` gives something, nothing
35
+ // otherwise; exit 1 and the fault on the error stream when `grillhouse.rappel` is at fault.
36
+ // - `superviseur --lue <dossier> <lueA> <envoyeesAvant>` marks read the questions sent up to
37
+ // `envoyeesAvant`; `superviseur --chez-le-responsable <dossier> <ticket>` marks a question
38
+ // carried to the owner: silent until the circuit answers.
57
39
  // - `relever` is the one function of the reading, of the re-presentation and of the file of the
58
- // stops gone up: each question of a circuit that never went up or that was read <rappelMs> ago
59
- // (`grillhouse.rappel` minutes, 10 by default, scripts/circuits-cles.mjs) is given,
60
- // once per due time, while its circuit stands on the same stop; one answered (its
61
- // circuit left the stop) leaves the file `.claude/worktrees/questions-remontees.json` and is not
62
- // given again. The stops are kept there each by its ticket, the run of its workflow, the rank of
63
- // its question in that run and its stop, with the time of the first going up and of the last
64
- // presentation. The end of a circuit integrated is given once (`integre`), kept in
65
- // `.claude/worktrees/integrations-rendues.json`, and the alert of the CI of main (a red, or a CI
66
- // not read, scripts/ci-de-main.mjs) once per passage (`.claude/worktrees/ci-de-main-rendue.json`),
67
- // cleared at the next green.
40
+ // stops gone up: a question that never went up, or was read <rappelMs> ago (`grillhouse.rappel`
41
+ // minutes, 10 by default, scripts/circuits-cles.mjs), is given once per due time while its
42
+ // circuit stands on the same stop; one answered leaves the file
43
+ // `.claude/worktrees/questions-remontees.json`. A stop is kept there by its ticket, the run of
44
+ // its workflow, the rank of its question in that run and its stop, with the times of the first
45
+ // going up and of the last presentation. The end of a circuit integrated is given once
46
+ // (`integre`), kept in `.claude/worktrees/integrations-rendues.json`, and the alert of the CI of
47
+ // main (a red, or a CI not read, scripts/ci-de-main.mjs) once per passage
48
+ // (`.claude/worktrees/ci-de-main-rendue.json`), cleared at the next green.
68
49
  // - The reading covers the project and each other project of its group (`grillhouse.groupe`) that
69
50
  // no other live session of supervision holds, each under its name and its folder.
70
51
  import { spawnSync } from 'node:child_process';
@@ -1,119 +1,77 @@
1
1
  #!/usr/bin/env node
2
- // The board of a project, on three levels, measured on Beads, the register of finished agents,
3
- // the transcripts of running ones and the running processes — never on what an agent declares.
4
- // The Grillhouse mod shows its lines; `npm run tableau` prints them.
2
+ // The board of a project: a measure of Beads, the register of finished agents, the transcripts of
3
+ // running agents, the circuits' views and the running processes, never of what an agent declares.
4
+ // The Grillhouse mod shows its lines; `npm run tableau` prints them. Mechanism: greffon.md, §5.3.
5
5
  //
6
- // npx grillhouse tableau the board, as JSON (with its lines, 52 columns wide)
6
+ // npx grillhouse tableau the board, as JSON (its lines 52 columns wide)
7
7
  // npx grillhouse tableau --texte the board, as text
8
- // npx grillhouse tableau <dossier>… the board of this project and of the projects in <dossier>…,
9
- // one board, each ticket prefixed by its project (`ensemble`)
8
+ // npx grillhouse tableau <dossier>… one board of this project and of the projects in <dossier>…,
9
+ // each ticket prefixed by its project (`ensemble`)
10
+ // npx grillhouse tableau --suivre the follower (`scripts/suiveur.mjs`)
10
11
  //
11
- // npx grillhouse tableau --suivre the follower (`scripts/suiveur.mjs`): measures on events and
12
- // writes the status line (`grillhouse-etat.txt` in the common
13
- // git directory, which `scripts/ligne-etat/` reads) and one
14
- // JSON board per line, from one measure.
15
- //
16
- // - Global: the work tickets of the project (a ticket without children; a mother is a grouping)
17
- // by state, the agents' working time and tokens of the day and in all, the alerts. The head's
18
- // first line counts the signs AGENTS shows (`etatsDAgents`, the one source: « ▶ N · ⏸ N · ⛔ N
19
- // · N faits », a ticket closed and not integrated counted under its sign, not as done), one line
20
- // per project on a board of several; the line of the queues counts the tickets blocked
21
- // by an open ticket; the status line says the same signs in the same words.
22
- // - Agents: the tree of the steps of the process (scripts/etapes.mjs), one block per step and
23
- // sub-step, with who works there, for the whole project. A ticket stands at a step only by its
24
- // circuit (below) or by an agent that runs on it, at that agent's step; a ticket in the queue,
25
- // its circuit not launched, stands at no step.
26
- // - Circuits: one entry per known ticket, open or closed, whose circuit (scripts/circuit.mjs) is
27
- // launched and not integrated, read from the Temporal server in one call
28
- // (scripts/circuits-du-serveur.mjs, the memo of its workflow), so that the ticket stands in
29
- // AGENTS at every instant from the launch of its circuit to its end: it runs while its workflow
30
- // runs with no question awaited, and stands at the step of its last state, with its attempt,
31
- // every step one for the whole ticket, a running one with no known state at the step of its
32
- // stop, else at the plan (1); while the explorateur or the questionneur works on its plan
33
- // (`questionnement`, of the plan), it stands at the plan (1); waiting for the supervisor
34
- // (`attendLeSuperviseur`, the one rule the opening and the greffon's reading read too:
35
- // stopped, « à repasser » included, but by the supervisor's « arrete », or ended without its
36
- // issue), it stands under the stopped step after a line « ⤷ Question · <qui> », who must answer
37
- // it, the supervisor or the owner, the supervisor when it names no question; its card opens on
38
- // that question, or on the stop (its name and code) and the first line of its reason.
39
- // - Readings: a reading of the circuits or of the tickets that fails (the Temporal server silent
40
- // or at fault, Beads at fault) gives way to the last one that succeeded, kept in the common git
41
- // directory (`lectureGardee`, `tableau-lu-<quoi>.json`), its age in the alert that names the
42
- // fault; a project beside the session's says the faults of its own reading.
12
+ // Lines: the head, AGENTS, CHANTIER, then FAITS AUJOURD'HUI, every line of each list shown; a
13
+ // line folds only lines of another state (« + 2 prêts ») or chantiers not in progress.
14
+ // - Head: the work tickets (a ticket without children; a mother is a grouping) by state; its first
15
+ // line counts the signs AGENTS shows (`etatsDAgents`, « ▶ N · ⏸ N · ⛔ N · N faits »; a ticket
16
+ // closed and not integrated counts under its sign, not as done), one line per project on a board
17
+ // of several; the status line says the same signs in the same words.
18
+ // - AGENTS: the tree of the steps (scripts/etapes.mjs), one block per step and sub-step. A ticket
19
+ // stands at a step only by its circuit or by an agent that runs on it; a ticket in the queue,
20
+ // its circuit not launched, stands at no step. A circuit (scripts/circuit.mjs) launched and not
21
+ // integrated is read from the Temporal server in one call (scripts/circuits-du-serveur.mjs): it
22
+ // stands at the step of its last state, else at the plan (1), also while the explorateur or the
23
+ // questionneur works (`questionnement`). One that waits for the supervisor
24
+ // (`attendLeSuperviseur`, the rule `questionsEnAttente` of scripts/superviseur.mjs reads too)
25
+ // shows « ⤷ Question · <qui> » under its step;
26
+ // its card opens on that question, or on the stop (name, code) and the first line of its
27
+ // reason.
28
+ // - Readings: a reading of the circuits or of the tickets that fails gives way to the last one
29
+ // that succeeded (`lectureGardee`, `tableau-lu-<quoi>.json` in the common git directory), its
30
+ // age in the alert that names the fault; a project beside the session's says its own faults.
43
31
  // - Bilans: the card of a ticket whose circuit kept its bilan (scripts/bilan.mjs,
44
- // `.claude/worktrees/<ticket>.bilan.json`) opens on its key figures: wall time, share lost,
45
- // sessions, cost.
46
- // - Chantier: a root epic with work in progress, its tree of mothers, each with its work tickets
47
- // done over all; the tree shows the open work: a closed ticket, mother included, counts without
48
- // a line, and a closed mother's open tickets take her place. The other chantiers, one line each.
49
- // Then the tickets closed today.
50
- // - Lines: the head, AGENTS, CHANTIER, then FAITS AUJOURD'HUI, every line of each list shown; a
51
- // line folds only lines of another state (the tree's « + 2 prêts ») or the chantiers not in
52
- // progress.
53
- // - Measures: a finished agent from the register (`scripts/registre.mjs`), a running one from its
54
- // transcript: a role agent launched in a shell (its envelope's process, which names its copy
55
- // and its role) while that process runs, a sub-agent or a session whose transcript moved in the
56
- // last 2 minutes.
57
- // With an end in the register, it runs only when an incoming message (of the person, another
58
- // agent, a notification) follows its latest end strictly (a reviewer resumed by a message); the
59
- // writings of its last turn after that end leave it finished, measured by that latest end.
60
- // A sub-agent, whatever its role, runs also while its last tool call awaits its answer, its
61
- // transcript having moved in the last 30 minutes; a session keeps the 2-minute rule alone. The
62
- // board reads no transcript older than 30 minutes: a shell agent whose transcript is older shows
63
- // by its process alone.
64
- // - Time: a transcript's working time is the union of its turns, each bounded by the earliest and
65
- // the latest date of its events, whatever their order in the file, but those a resumption writes
66
- // before its incoming message (`horsDuTour`); a transcript is read where the
67
- // board stopped, its reading kept in the cache file. A ticket's working time adds the steps its
68
- // circuit leads itself, with no agent (the proof, the checks, the final pass, the integration,
69
- // the queue): the register's lines of the role `circuit`, which no block shows and no role of the
70
- // flow counts as a passage, and the step under way of a running circuit (`mene` in its state) up
71
- // to now; they count out of the turns of the ticket's agents, so the ticket's time is the union
72
- // of both, each instant once, and they spend no tokens.
73
- // - Progress: the line of a ticket whose circuit runs an automatic step gives the progress of
74
- // its pass, read in the progress directory its state names (scripts/avancement.mjs), in
75
- // figures, as Bazel's counter of actions: « faits/prévus · <durée> » since the start of the
76
- // pass, after the counters of its loops, or in their place when room lacks (the subject is cut,
77
- // never the figures nor the ticket's number); the queue (5.2) shows no wait for a CI. Past FIGEE
78
- // without a sign, « figée <durée> · faits/prévus », the time since its last sign, signed ⛔ in
79
- // the tone of an alert.
80
- // - The parts of the machine (scripts/places-de-la-machine.mjs, read by `lireLaMesure`), as Slurm's
81
- // `squeue` names who holds what and what a job waits for. A part held or waited for by a circuit
82
- // AGENTS shows on a line (a circuit, a ticket led in direct, a ticket worked out of a circuit,
83
- // an agent) stands on that ticket's line, « 🔒 » (it holds a part) or « ⏳ » (it waits for one)
84
- // after the head, before the subject, never in place of its sign: « · <sorte> · 2 cœurs ·
85
- // <durée> » since it took its part, with « ⚠ » and what it consumes beyond its part when it
86
- // does, « · <sorte> figée <durée> » past FIGEE without a sign, « · attend 2 cœurs · 26 réservés
87
- // sur 28 · <durée> » for a wait, the kind in lower case; a circuit adds faits/prévus, and says
88
- // it in place of the progress of its pass. The block at the head of AGENTS (`lignesDesParts`)
32
+ // `.claude/worktrees/<ticket>.bilan.json`) opens on its key figures.
33
+ // - CHANTIER: a root epic with work in progress, its tree of mothers with their work tickets done
34
+ // over all; a closed ticket, mother included, counts without a line, and a closed mother's
35
+ // open tickets take her place. The other chantiers, one line each.
36
+ // - Running: a finished agent is measured from the register (scripts/registre.mjs), a running one
37
+ // from its transcript: a role agent launched in a shell while its envelope's process runs, a
38
+ // sub-agent or a session whose transcript moved in the last 2 minutes. With an end in the
39
+ // register, an agent runs again only when an incoming message follows its latest end strictly.
40
+ // A sub-agent also runs while its last tool call awaits its answer, its transcript having
41
+ // moved in the last 30 minutes; the board reads no transcript older than 30 minutes.
42
+ // - Time: a transcript's working time is the union of its turns (`horsDuTour` leaves out what a
43
+ // resumption writes before its incoming message), read where the board stopped, its reading in
44
+ // the cache file. A ticket's time adds the steps its circuit leads itself (the register's lines
45
+ // of the role `circuit`, and the step under way, `mene`, up to now), each instant once, with no
46
+ // tokens.
47
+ // - Progress: the line of a ticket whose circuit runs an automatic step gives « faits/prévus ·
48
+ // <durée> » read in the progress directory its state names (scripts/avancement.mjs), as Bazel's
49
+ // counter of actions; the subject is cut when room lacks, never the figures nor the number.
50
+ // Past FIGEE without a sign: « figée <durée> · faits/prévus », signed ⛔.
51
+ // - Parts (scripts/places-de-la-machine.mjs, read by `lireLaMesure`), as Slurm's `squeue` names
52
+ // who holds what: a part held or waited for stands on the ticket's line, « 🔒 » (holds) or « ⏳ »
53
+ // (waits) after the head, before the subject: « · <sorte> · 2 cœurs · <durée> », with « ⚠ » when
54
+ // it consumes beyond its part, « · <sorte> figée <durée> » past FIGEE, « · attend 2 cœurs · 26
55
+ // réservés sur 28 · <durée> » for a wait. The block at the head of AGENTS (`lignesDesParts`)
89
56
  // keeps the budget taken, « Parts · 2 passes · 6 sur 8 cœurs · 11 sur 16 Go », which counts
90
- // every pass that holds a part, those of a ticket the board does not show included, which
91
- // has no other trace; and the lines of the passes with no ticket (a check launched by hand, the
92
- // night, a measure): « 🔒 <sorte> · <projet> · 4 cœurs · 8 Go », with « ⚠ », then each one that
93
- // waits, in the order of its rank, « ⏳ <sorte> · <projet> · attend <raison> » (cores, memory,
94
- // load, with the figures). Such a line is marked `avancement`, which the pane measures again
95
- // more often.
96
- // - Signs: each sign keeps one sense (the owner's decisions of 2026-11-01 and 2026-11-12). A
97
- // ticket's line in AGENTS takes one of three, by the tone of its state: ▶ its step works (cyan,
98
- // the hollow ▷ in a short circuit, counted with it),
99
- // a ticket led in direct included; ⏸ it waits, under the step about to be launched, the reason
100
- // on its right (« attend une place », « verrou », « disque », « démarre » in grey, the
101
- // circuit waiting for the machine; « question au superviseur », « question au responsable »,
102
- // « arrêté » in yellow, the circuit waiting for someone); ⛔ it stopped on a fault or its pass is
103
- // frozen, to correct (red). On a ticket's line, after its head: 🔒 its pass holds a part, ⏳ it
104
- // waits for one; at the head of AGENTS, the same two for a pass with no ticket, and 🌙 the night
105
- // under way. The alerts: 💤 a ticket
106
- // claimed with nothing running, 🌙 a red night, ⚠ the alerts without a kind of their own. A
107
- // sign two columns wide stands as the others, a sign then a space; the width of a line counts
108
- // its columns (`colonnes`), ⏳ and ⛔ two.
109
- // - Alerts: one alert per open night ticket (🌙, its subject, then its number), per circuit that
110
- // waits for the supervisor (⏳, how long), a shell agent silent for 10 minutes, a ticket in
111
- // progress without anything running for 30 minutes (💤), each with its state (`etat`).
112
- // - Tones: each state the board shows has one tone, defined once (`TONS`), which every line and
113
- // every alert takes, whatever its duration or the line that shows it: red for what asks for a
114
- // correction (frozen, a fault, a question with no live wait, a ceiling refused), yellow for what
115
- // waits for someone (the supervisor, the owner), grey for what waits for the machine (a place,
116
- // a part, the disk, the CI), cyan for what runs.
57
+ // every pass that holds a part, a ticket the board does not show included, then the passes with
58
+ // no ticket (« 🔒 <sorte> · <projet> · 4 cœurs · 8 Go »), then each wait in the order of its
59
+ // rank (« ⏳ <sorte> · <projet> · attend <raison> »). Such a line is marked `avancement`, which
60
+ // the pane measures again more often.
61
+ // - Signs: a ticket's line in AGENTS takes one of three, by the tone of its state: ▶ its step
62
+ // works (cyan; ▷ in a short circuit, a ticket led in direct included); ⏸ it waits, the reason on
63
+ // its right (« attend une place », « verrou », « disque », « démarre » in grey, waiting for the
64
+ // machine; « question au superviseur », « question au responsable », « arrêté » in yellow,
65
+ // waiting for someone); ⛔ it stopped on a fault or its pass is frozen (red). At the head of
66
+ // AGENTS, 🔒 and ⏳ for a pass with no ticket, 🌙 the night under way. Alerts: 💤 a ticket
67
+ // claimed with nothing running, 🌙 a red night, ⚠ the others. A sign is followed by a space; the
68
+ // width of a line counts its columns (`colonnes`), ⏳ and ⛔ two.
69
+ // - Alerts: one per open night ticket (🌙), per circuit that waits for the supervisor (⏳, how
70
+ // long), a shell agent silent for 10 minutes, a ticket in progress with nothing running for 30
71
+ // minutes (💤), each with its state (`etat`).
72
+ // - Tones (`TONS`), defined once, taken by every line and alert: red for what asks for a
73
+ // correction, yellow for what waits for someone, grey for what waits for the machine, cyan for
74
+ // what runs.
117
75
  import { execFileSync } from 'node:child_process';
118
76
  import {
119
77
  closeSync,
@@ -758,8 +716,7 @@ export function lireVivant({ racine, home, prefix, maintenant, ps, cache = {} })
758
716
  * Whether the circuit <c>, as scripts/circuits-du-serveur.mjs reads it, waits for the supervisor:
759
717
  * not running on its own, not integrated, and ended without its issue, on a question, or stopped (any stop but the
760
718
  * supervisor's own « arrete », « à repasser » included: the supervisor resumes it once the machine
761
- * is free). The
762
- * one rule of the questions that wait for the supervisor (grillhouse-pq6), which the board reads,
719
+ * is free). The one rule of the questions that wait for the supervisor, which the board reads,
763
720
  * and `questionsEnAttente` of scripts/superviseur.mjs, the one source of the opening and of the
764
721
  * greffon's reading of the questions.
765
722
  * @param {{ vivant: boolean, integre?: boolean, interrompu: boolean, question: string | null, arret: string | null }} c
@@ -1155,7 +1112,7 @@ export function assembler({
1155
1112
  ...(m.tours ? { travail: partDuJour(m.tours) } : {}),
1156
1113
  ...(m.minutes ? { jetons: jetonsDuJour(m.minutes) } : {}),
1157
1114
  }));
1158
- // The discoveries (label `decouverte`, grillhouse-3uv.96): each counts in one case, the first that
1115
+ // The discoveries (label `decouverte`): each counts in one case, the first that
1159
1116
  // applies. « rejetés » and « validés » count only since the day's marker <jour>; « new » and
1160
1117
  // « →check », states that await the owner, do not filter by it.
1161
1118
  const aLabel = (t, ...ls) => ls.some(l => (t.labels ?? []).includes(l));
@@ -1289,7 +1246,7 @@ export function assembler({
1289
1246
  });
1290
1247
  }
1291
1248
  const debutJour = jour;
1292
- // The way of a ticket done (grillhouse-592): `direct` when labelled so; else the way its kept
1249
+ // The way of a ticket done: `direct` when labelled so; else the way its kept
1293
1250
  // results give (`voies`, `voiesDesCircuits`: `court` for the short circuit, else `complet`); else
1294
1251
  // `complet` when a circuit led a step of it (the register) or is read for it; else `direct`,
1295
1252
  // closed with no circuit.
@@ -1645,7 +1602,7 @@ function temoinDe(c, maintenant) {
1645
1602
  }
1646
1603
 
1647
1604
  // A ticket's time and tokens, « 12 min · 310 k »; nothing when both are zero.
1648
- // The sign of a ticket done by its way (grillhouse-592): a full circuit, a short one (its gesture
1605
+ // The sign of a ticket done by its way: a full circuit, a short one (its gesture
1649
1606
  // played by a command, 1.1, or written by hand), a ticket led directly.
1650
1607
  export const SIGNE_DE_LA_VOIE = Object.freeze({ complet: '●', court: '○', direct: '✎' });
1651
1608
 
@@ -1968,7 +1925,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
1968
1925
  L(cadre(`${i ? retrait : colonneDe(p.etiquette)}${x.texte}`, '', largeur), x.ton)
1969
1926
  );
1970
1927
  }
1971
- // The discoveries of the day, summed across the projects (grillhouse-3uv.96, criterion 14).
1928
+ // The discoveries of the day, summed across the projects.
1972
1929
  const d96 = t.decouvertes ?? { new: 0, check: 0, rejetes: 0, valides: 0 };
1973
1930
  L(
1974
1931
  cadre(
@@ -1997,7 +1954,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
1997
1954
  for (const x of lignesDActeurs(c, comptesDAgents(t).arretes)) {
1998
1955
  L(cadre(x.texte, '', largeur), x.ton);
1999
1956
  }
2000
- // The discoveries of the day, one count per case (grillhouse-3uv.96): always shown, at 0 when
1957
+ // The discoveries of the day, one count per case: always shown, at 0 when
2001
1958
  // nothing counts, like the other head lines.
2002
1959
  const d = g.decouvertes ?? { new: 0, check: 0, rejetes: 0, valides: 0 };
2003
1960
  L(
@@ -2191,7 +2148,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
2191
2148
  ...[...(t.circuits ?? []), ...(t.horsCircuit ?? []), ...montres].map(x => nomme(x).length)
2192
2149
  );
2193
2150
  // A ticket's line in AGENTS: « <signe> <numéro> <sujet> … <droite> »; on several projects'
2194
- // board « <[projet]> <id> <sujet> … <signe> <droite> », the owner's maquette (grillhouse-erp.1).
2151
+ // board « <[projet]> <id> <sujet> … <signe> <droite> ».
2195
2152
  // The icon of its pass (🔒 holds a part, ⏳ waits for one) follows the head, before the subject.
2196
2153
  const teteDe = (signe, x) =>
2197
2154
  `${
@@ -2794,7 +2751,7 @@ export function dossierCommun(racine) {
2794
2751
  }
2795
2752
  }
2796
2753
 
2797
- // The file of the day's marker (grillhouse-3uv.96), beside the board's cache; null without a common
2754
+ // The file of the day's marker, beside the board's cache; null without a common
2798
2755
  // dir. Unversioned, out of the worktree: the board does not reset at midnight.
2799
2756
  const fichierDuRepere = commun => commun && path.join(commun, 'tableau-repere.json');
2800
2757
 
@@ -2823,7 +2780,7 @@ export function lireLeRepere(commun, maintenant) {
2823
2780
  }
2824
2781
 
2825
2782
  // Sets the day's marker of the project at <racine> to <quand> (now by default), purging FAITS
2826
- // AUJOURD'HUI and the « rejetés » and « validés » cases up to it (grillhouse-3uv.96, /newday).
2783
+ // AUJOURD'HUI and the « rejetés » and « validés » cases up to it (`/newday`).
2827
2784
  export function poserLeRepere(racine, quand = Date.now()) {
2828
2785
  const commun = dossierCommun(racine);
2829
2786
  if (!commun) {
@@ -2957,7 +2914,7 @@ function lireLesPlaces() {
2957
2914
  }
2958
2915
  }
2959
2916
 
2960
- // The boards of several projects as one (grillhouse-erp.1), as the multi-root explorer of VS Code
2917
+ // The boards of several projects as one, as the multi-root explorer of VS Code
2961
2918
  // keeps one view and files each root under its name: <lus> holds each project's label
2962
2919
  // (`etiquette`, its ticket prefix), the root of its main tree (`racine`, by which the places of
2963
2920
  // its circuits are counted) and its board (`t`) or the fault that keeps it out (`erreur`),
package/types/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // The types of the board that the panel module (hooks/register.tsx) reads: the JSON line the
2
+ // follower writes at each measure (`Tableau`) and its lines, composed by scripts/tableau.mjs
3
+ // (greffon.md, §4.2).
1
4
  export type Ton = 'titre' | 'alerte' | 'attention' | 'actif' | 'discret'
2
5
  // `ticket`: the id of the ticket a line names, which makes the line selectable. `chantier`: the line is an epic's, which the pane switches on or off. `section`: the board's
3
6
  // section the line belongs to. `groupe`: the key of the folded group the line stands for, which `o`