crew-start · diff
git:20261106.ebae12d to git:20261106.6976e1c
75 added, 80 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
---
name: crew-start
- description: Reprend le travail crew sans préciser quoi — continue la tâche en CURRENT_TASKS, sinon démarre un batch inactif depuis TODO (anti-collision), puis code. Trigger — "/crew-start", "continue le travail", "lance la suite".
+ description: Resumes crew work without saying which task — continues the task in CURRENT_TASKS, otherwise starts an inactive batch from TODO (anti-collision), then codes. Also triggers on — "/crew-start", "continue le travail", "lance la suite", "continue the work", "start the next task".
---
- Point d'entrée unique pour reprendre une session crew sans avoir à dire
- quelle tâche. Le **choix** de la tâche est fait par un script déterministe
- (`crew_hook.py next-task`) ; ce skill déroule ensuite le démarrage
- (verrou, worktree, `git mv`), l'implémentation, puis `/crew-close-task`.
+ Single entry point to resume a crew session without naming a task. The task
+ **choice** is made by a deterministic script (`crew_hook.py next-task`); this
+ skill then runs the start (lock, worktree, `git mv`), the implementation, then
+ `/crew-close-task`.
- **Ancrage racine obligatoire** : tout chemin `crew/...` se résout depuis la
- racine du repo (`git rev-parse --show-toplevel`), jamais depuis le cwd
- courant (sinon un `crew/` fantôme est créé dans un sous-dossier). Le
- `git worktree add`/`cd` des étapes 3-4 s'exécute depuis la racine du
- checkout principal.
+ **Repo-root anchoring is mandatory**: every `crew/...` path is resolved from the
+ repo root (`git rev-parse --show-toplevel`), never from the current cwd
+ (otherwise a phantom `crew/` is created in a subfolder). The
+ `git worktree add`/`cd` of steps 3-4 runs from the root of the main checkout.
- ## Étapes
+ ## Steps
- 1. **Choisir la tâche** (lecture seule, ~0 token de raisonnement) :
+ 1. **Choose the task** (read-only, ~0 reasoning tokens):
```bash
ROOT="$(git rev-parse --show-toplevel)"
HOOK="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/scripts}"; HOOK="${HOOK:-$ROOT/crew}/crew_hook.py"
CLAUDE_PROJECT_DIR="$ROOT" python "$HOOK" next-task
```
- (plugin : `scripts/crew_hook.py` du plugin ; clone manuel :
- `crew/crew_hook.py`). Sortie JSON : `action`, `task`, `batch`,
+ (plugin: the plugin's `scripts/crew_hook.py`; manual clone:
+ `crew/crew_hook.py`). JSON output: `action`, `task`, `batch`,
`worktree`, `branch`, `skipped[{slug,reason}]`, `paused`,
- `unclassified`, `ambiguous`. Il couvre déjà : verrous des autres sessions,
- batchs actifs/en pause, chevauchement de `Zone :`, ICEBOX et « À classer »
- ignorés. Ne pas refaire ce tri à la main.
+ `unclassified`, `ambiguous`. It already covers: other sessions' locks,
+ active/paused batches, `Zone :` overlap, ICEBOX and `À classer` (to be
+ sorted) ignored. Do not redo this sorting by hand.
- Si `paused` n'est pas vide, le signaler à l'utilisateur (tâche + ce qui
- bloque) — une tâche de `PAUSED/` n'est JAMAIS reprise automatiquement.
+ If `paused` is not empty, flag it to the user (task + what blocks it) — a
+ `PAUSED/` task is NEVER resumed automatically.
- 2. **Selon `action`** :
- - `resume` → étape 3 (Cas reprise). Si `ambiguous` : demander à
- l'utilisateur laquelle prioriser plutôt que deviner.
- - `start` → étape 3 (Cas démarrage).
- - `classify` → des tâches de `TODO/` n'ont ni batch ni zone
- (`unclassified`) : dispatcher `Agent({subagent_type: "manager"})` pour
- les classer (zone d'impact + batch, cf. `crew/CLAUDE_CONTEXT/CYCLE_DE_VIE.md` § Batching), puis
- relancer l'étape 1.
- - `none` → rien de démarrable : dire pourquoi à l'utilisateur à partir de
- `skipped` (verrou, batch actif, chevauchement) ou « TODO vide », et
- s'arrêter. Seul cas où le skill s'arrête sans avoir codé.
+ 2. **According to `action`**:
+ - `resume` → step 3 (resume case). If `ambiguous`: ask the user which one to
+ prioritize rather than guess.
+ - `start` → step 3 (start case).
+ - `classify` → `TODO/` tasks have neither batch nor zone (`unclassified`):
+ dispatch `Agent({subagent_type: "manager"})` to classify them (impact zone +
+ batch, see `crew/CLAUDE_CONTEXT/CYCLE_DE_VIE.md` § Batching), then rerun
+ step 1.
+ - `none` → nothing startable: tell the user why from `skipped` (lock, active
+ batch, overlap) or "TODO empty", and stop. The only case where the skill
+ stops without having coded.
- 2bis. **Claim distant** (opt-in : seulement si `crew/CLAUDE_CONTEXT/CREW_CONFIG.md`
- contient `remote_claims : true`, sinon sauter ; les claims sont une couche
- partagée entre devs sur la ref `refs/crew/claims`, cf. `AGENTS.md`) :
- - si `action: start` et que la tâche n'existe pas localement mais figure dans
- `remote_todo` : `python "$HOOK" claims materialize <task>` (écrit le `.md`
- dans `crew/TODO/` depuis la ref) ;
- - poser le claim avant tout déplacement :
- `python "$HOOK" claims claim <task> --session "$CLAUDE_CODE_SESSION_ID" --batch "<batch>" --branch "<branch>" --zone "<zone du JSON, séparée par des virgules>"` ;
- - **à la reprise (`action: resume`) refaire ce même claim** : il rafraîchit `ts`
- (le TTL est de 8 h, une tâche longue redeviendrait prenable sinon) et publie
- une tâche démarrée hors ligne ;
- - `ok: false` (déjà pris, zone chevauchante, conflit) → ne pas insister :
- relancer l'étape 1 (le script voit le claim et propose la suite) ;
- - `offline` / `claims_warning` → **non bloquant** : continuer et le signaler
- à l'utilisateur (« claims distants non vérifiés »).
+ 2bis. **Remote claim** (opt-in: only if `crew/CLAUDE_CONTEXT/CREW_CONFIG.md`
+ contains `remote_claims : true`, otherwise skip; claims are a layer shared
+ between devs on the `refs/crew/claims` ref, see `AGENTS.md`):
+ - if `action: start` and the task does not exist locally but is listed in
+ `remote_todo`: `python "$HOOK" claims materialize <task>` (writes the `.md`
+ into `crew/TODO/` from the ref);
+ - set the claim before any move:
+ `python "$HOOK" claims claim <task> --session "$CLAUDE_CODE_SESSION_ID" --batch "<batch>" --branch "<branch>" --zone "<zone from the JSON, comma-separated>"`;
+ - **on resume (`action: resume`) redo this same claim**: it refreshes `ts`
+ (the TTL is 8 h, a long task would otherwise become claimable again) and
+ publishes a task started offline;
+ - `ok: false` (already taken, overlapping zone, conflict) → do not insist:
+ rerun step 1 (the script sees the claim and suggests the next one);
+ - `offline` / `claims_warning` → **non-blocking**: continue and flag it to the
+ user ("remote claims not verified").
- 3. **Verrou + isolation** (à faire avant toute édition) :
- - *Reprise* : exécuter `Bash({command: ': "crew-resume:<task>"'})` (no-op
- qui pose le verrou via le hook `PreToolUse`).
- - Créer ou réutiliser le worktree du batch :
- `git worktree add -b <branch> <worktree> main` (valeurs du JSON ;
- `git worktree list` d'abord : s'il existe déjà, ne pas le recréer, y
- compris sous un ancien slug `…-batch-<slug>-…`). `cd` dedans et
- utiliser des chemins absolus de cette copie pour tout `Read`/`Edit`/
- `Write` suivant.
- - *Démarrage* : depuis le worktree,
- `git mv crew/TODO/<task> crew/CURRENT_TASKS/<task>`, mettre à jour les
- deux `INDEX.md`.
+ 3. **Lock + isolation** (before any edit):
+ - *Resume*: run `Bash({command: ': "crew-resume:<task>"'})` (a no-op that sets
+ the lock through the `PreToolUse` hook).
+ - Create or reuse the batch worktree:
+ `git worktree add -b <branch> <worktree> main` (values from the JSON;
+ `git worktree list` first: if it already exists, do not recreate it,
+ including under an old `…-batch-<slug>-…` slug). `cd` into it and use
+ absolute paths of this copy for every following `Read`/`Edit`/`Write`.
+ - *Start*: from the worktree,
+ `git mv crew/TODO/<task> crew/CURRENT_TASKS/<task>`, update both
+ `INDEX.md` files.
- - *Nommer la session* (démarrage uniquement ; en reprise le hook
- SessionStart l'a déjà fait) : afficher à l'utilisateur
- `/rename <slug de la tâche sans .md>` — un hook ne peut pas renommer une
- session en cours, seul SessionStart le peut.
+ - *Name the session* (start only; on resume the SessionStart hook already did
+ it): show the user `/rename <task slug without .md>` — a hook cannot rename
+ a running session, only SessionStart can.
- 4. **Le hook bloque (exit 2)** — verrou pris ou batch occupé entre le choix
- et le claim (course entre sessions) : ne pas insister. Relancer l'étape 1
- (le script voit maintenant le verrou et propose la tâche suivante). Ne
- s'arrêter que sur `action: none`.
+ 4. **The hook blocks (exit 2)** — lock taken or batch busy between the choice and
+ the claim (race between sessions): do not insist. Rerun step 1 (the script now
+ sees the lock and suggests the next task). Only stop on `action: none`.
- 5. **Implémenter** : relire le fichier de la tâche, traiter les actions
- `- [ ]` dans l'ordre, avec les skills du routage de `CLAUDE.md`
- (`test-driven-development`, `systematic-debugging`, `graphify`…). Cocher
- chaque action quand elle est réellement finie (pas en avance, pas en lot).
+ 5. **Implement**: reread the task file, work through the `- [ ]` actions in
+ order, with the skills from the `CLAUDE.md` routing
+ (`test-driven-development`, `systematic-debugging`, `graphify`…). Tick each
+ action when it is really finished (not ahead of time, not in bulk).
- 6. Toutes les actions cochées → enchaîner directement sur `crew-close-task`
- (sans demander confirmation, elle fait partie du protocole).
+ 6. All actions ticked → chain straight into `crew-close-task` (without asking
+ for confirmation, it is part of the protocol).
- ## Ce que ce skill ne fait pas
+ ## What this skill does not do
- - Ne démarre jamais deux tâches de batchs différents dans la même
- invocation — un `/crew-start` = une tâche jusqu'à sa clôture (ou
- blocage réel).
- - Ne pioche jamais dans `crew/ICEBOX/` ni dans « À classer » sans
- classification par `manager`.
- - Ne reprend jamais automatiquement une tâche de `crew/PAUSED/`.
- - Ne coche pas d'actions non terminées, ne saute pas le verrou/anti-collision.
- - Ne remplace pas `/crew-close-task` — l'appelle en fin de tâche.
+ - Never starts two tasks from different batches in the same invocation — one
+ `/crew-start` = one task until its closure (or a real blocker).
+ - Never picks from `crew/ICEBOX/` nor from `À classer` (to be sorted) without
+ classification by `manager`.
+ - Never automatically resumes a task from `crew/PAUSED/`.
+ - Does not tick unfinished actions, does not skip the lock/anti-collision.
+ - Does not replace `/crew-close-task` — calls it at the end of the task.