[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EFB3J7GKQK0EBV8MGD5KJB":3,"skill-same:01M7EFB3J7GKQK0EBV8MGD5KJB":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7EFB3J7GKQK0EBV8MGD5KJB","drwil-start",null,"Start a workstream, or a queue of workstreams, with one human gesture — open a poll of the scoped briefs; the human's answer, read by the tool, moves governance to BUILD (when several briefs are chosen, the next ones are queued and started by the agent after each closing). Use when the human wants to start implementing one or several briefs.","wdubilly\u002Fdrwil","wdubilly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F171679579?v=4","01M7EF97NPT76NHQK5EG01BH8J","01M7EF97P71G5PRZMPP7KQGBSR",0,"MIT","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fstart-a-workstream\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: drwil-start\ndescription: Start a workstream, or a queue of workstreams, with one human gesture — open a poll of the scoped briefs; the human's answer, read by the tool, moves governance to BUILD (when several briefs are chosen, the next ones are queued and started by the agent after each closing). Use when the human wants to start implementing one or several briefs.\n---\n\n# Start a workstream (`\u002Fdrwil-start`)\n\nStarting is the human's decision: it is **their answer to the poll**, read by a tool hook\n(`.claude\u002Fhooks\u002Fprompt-hook.mjs`), that makes the transition — never the agent.\n\n1. List the scoped briefs: `node .githooks\u002Fstate.mjs briefs --json` (`scope` block committed,\n   brief neither finished nor a reference). None: say so and stop. The list is **already\n   ordered**, in the realisation order of the index (`docs\u002Fprojects\u002Fpending.md`, \"Fiches\n   cadrées\" section, open items top to bottom): a brief that is not ready keeps its place there\n   (`ready` false, `decisions` counts those still to decide), whatever its priority or maturity;\n   the briefs the index does not cite come after, ready ones first, then by `maturity`, then by\n   index `priority`.\n2. Read the \"Proposed order\" sections of the intentions (`docs\u002Fintentions\u002F`): they may put one\n   brief before another of the same rank. Also note the index's P1 intentions that have no framed\n   brief yet.\n3. Open **one** poll (Claude Code: `AskUserQuestion`; Copilot CLI: `ask_user`), in that order,\n   preceded by a short message citing the P1 intentions \"to frame\" (never offered for start):\n   - Claude Code: `header` exactly `drwil-start`; one option per brief, **label = exact path**\n     (e.g. `docs\u002Fprojects\u002F\u003Cbrief>.md`), description = title. At most 4 options, the first of the\n     list; a brief that is not ready keeps its place in the list, its description says \"not\n     ready: N decision(s) to make first\"; a brief with `maturity` `refine` is never hidden, its\n     description starts with \"to refine: review before starting it\"; the human can type another\n     path under \"Other\". `multiSelect: true` when the human wants to chain several briefs (a\n     queue): the briefs ticked are run in the order of the poll's options, whatever the order\n     of the clicks (the hook sorts them), the first now, the next ones\n     started by the agent after each closing; only ready briefs (maturity « ready », no open\n     decision, acceptance criteria) can be queued, otherwise the whole start is refused.\n   - **A single scoped brief**: a question needs at least two options, so add a second one,\n     label `Not now` (description: start nothing), never recommended; the hook reads it,\n     starts nothing and says so.\n   - **No merge question**: every PR, code or documentation, is put in automatic merge by the\n     agent in CLOSING (« Every PR in automatic merge » rule of `AGENTS.md`), if the repository\n     allows it; the poll never asks about the merge.\n   - **Worktree question** (required, always asked: a poll without it is refused by the hook; when the repository cannot host sibling folders, the question is still asked and \"This folder\" is the answer): Claude\n     Code, a question of the same poll, `header` exactly `drwil-worktree`, options \"New worktree\"\n     (the workstream runs in a new sibling folder `..\u002F\u003Crepository>-\u003Cbrief>`, branch\n     `workstream\u002F\u003Cbrief>` cut from the up-to-date main branch) and \"This folder\", no recommendation;\n     Copilot CLI, a field named exactly `drwil-worktree` with the same two values in its `enum`.\n     It is the human's choice, read by the hook: with \"New worktree\" the hook creates the folder,\n     runs the install command declared in `.drwil\u002Fia-first.json` (`worktreeInstall`, optional) and\n     starts the workstream **there**; this folder's state does not change. Only one brief at a time\n     (a queue stays in the repository folder). Then tell the human to open a terminal in the new\n     folder and start the agent there, and stop: never work the brief from this folder. A brief\n     already active in another worktree is refused with that worktree's path.\n   - **Parallel question** (optional, only with `multiSelect: true` and at least two ready briefs):\n     Claude Code, a question of the same poll, `header` exactly `drwil-parallel`, options\n     \"Parallel queue\" and \"Sequential queue\", no recommendation (Copilot CLI: never, one brief per\n     poll). It is the human's choice, read by the\n     hook: with \"Parallel queue\" the hook launches every brief ticked, in the order of the options,\n     each in its own worktree (as for \"New worktree\"), at most `maxParallel` workstreams active at\n     once (`.drwil\u002Fia-first.json`, 3 by default), and refuses without creating anything briefs whose\n     `scope` blocks overlap; \"Sequential queue\" keeps the queue in this folder. Never recommended:\n     the agent does not start those worktrees itself.\n   - Copilot CLI: `message` starting with `drwil-start :`; a first field `fiche` with **single\n     choice**: `type: \"string\"` and `enum` = the exact paths, **never** `type: \"array\"` (a multiple\n     choice field came back empty under Copilot CLI: only the single choice is read reliably): the\n     hook reads `fiche=…`. One brief per poll: to chain several briefs from Copilot CLI, use the\n     **queue polls** below; always ask `drwil-worktree` with it, and never `drwil-parallel` (it\n     needs several briefs). The hook still reads a multiple choice field if another tool sends one.\n   - **Queue by chained polls** (any tool, the way to a queue under Copilot CLI): when the\n     human wants to chain several briefs and the tool reads a single choice only, open one poll\n     per brief, **single choice**: Claude Code, `header` exactly `drwil-file`, `multiSelect` false;\n     Copilot CLI, `message` starting with `drwil-file :` and one field named exactly `drwil-file`,\n     `type: \"string\"` and `enum` only. Options: the ready briefs not yet in the queue (exact paths, the\n     state reminder lists the ones already added), plus a last one, `Finish the queue`. The hook\n     reads each answer: a brief is **added** to the queue under construction (nothing starts; the\n     `[drwil]` message says the queue so far), then open the next `drwil-file` poll; « Finish the\n     queue » starts the first brief in this folder and queues the others. A\n     brief that is not ready is refused when added. Never fill in `answers` or a `default`, never\n     answer yourself and never start the queue: the hook refuses the poll, and the state has no\n     command for the agent to add or finish a queue; `node .githooks\u002Fstate.mjs queue stop` drops one.\n   - **Recommend**: the first ready brief, first, with \"(Recommended)\" and the reason in\n     its **description** — never in the label.\n   - **Forbidden**: filling `answers` or a default value (`default`): the hook refuses the poll.\n     The human chooses alone.\n4. After the answer, read the state again: `node .githooks\u002Fstate.mjs`. In BUILD on the\n   chosen brief: implement. Otherwise: report the refusal as is, without retrying another way;\n   the hook always says why (`[drwil]` message: refusal, « Not now », no answer read, error).\n   No `[drwil]` message at all: the hooks are not active in this session (e.g. opened before\n   `init`) — say so and suggest restarting the session. The automatic merge is the\n   default behaviour, with no authorisation to ask for: in CLOSING, after verify PASS and pushing the closing\n   commit, in this order — run `node .githooks\u002Fmerge-auto.mjs \u003Cnumber>` (never chain the forge's commands by hand, `gh` or `glab`): on\n   GitHub or GitLab alike, it waits until the forge has computed the pull or merge request (PR or MR), updates\n   it if it is behind the main branch, schedules the automatic merge and reads it back on the forge to check\n   that the merge is scheduled (GitLab: `merge_when_pipeline_succeeds`; GitHub:\n   `gh pr view --json autoMergeRequest`); follow the PR with\n   `node .githooks\u002Fpr-watch.mjs \u003Cnumber>`, run again while it says green without merged, 30 minutes\n   at most in all; the PR merged, only then go back to Scoping —\n   never before: once in Scoping, a red CI can no longer reopen the workstream. Red CI before the\n   merge: stay in CLOSING and `node .githooks\u002Fstate.mjs reopen` (it cancels the scheduled merge).\n   Time limit exceeded, or any other failure: stay in CLOSING and report it. If `.githooks\u002Fmerge-auto.mjs` refuses\n   because the repository does not allow it, say « auto-merge not allowed by the repository » and the\n   way out its message gives — on GitHub a repository admin ticks « Allow auto-merge » (General → Pull\n   Requests), on GitLab the project runs a pipeline on the MR and allows auto-merge; or the human\n   merges by hand — stay in CLOSING, and never say the merge is scheduled: a mergeable PR,\n   auto-merge allowed by the repository, auto-merge scheduled and merge done are four different\n   states. Never schedule the automatic merge by hand (`gh pr merge --auto`, `glab mr merge --auto-merge`), in\n   any tool: only through `.githooks\u002Fmerge-auto.mjs`. Once the PR is merged and the main branch updated,\n   the next `node .githooks\u002Fstate.mjs start` or `next` goes back to SCOPING by itself (brief deleted,\n   closing PR merged): no `move SCOPING` to run.\n   After each push or PR creation, follow its CI with `node .githooks\u002Fpr-watch.mjs \u003Cnumber>`\n   (green, merged or red with the failing check); a red CI is fixed, never bypassed. Red after\n   the closing commit, PR not merged yet: `node .githooks\u002Fstate.mjs reopen` (in CLOSING) cancels\n   the scheduled merge, restores the brief and moves back to BUILD on the same branch; fix,\n   close again (journal entry updated, never doubled), then schedule the merge again with\n   `node .githooks\u002Fmerge-auto.mjs \u003Cnumber>`.\n5. **Subagent from the first workstream** (Claude Code and Copilot CLI, queue or not): run each\n   workstream in a subagent (fresh context), the first one right after the poll — Claude Code:\n   the Agent tool; Copilot CLI: the `task` tool, `general-purpose` agent, `mode: \"sync\"`. The\n   context read again is most of a queue's cost, and grows with each workstream kept in the same\n   session. The main session keeps only the reports and the human decisions. A subagent that needs\n   the human stops with a report saying why; the main session asks the human, then resumes the\n   workstream (a new subagent, whose instructions start by reading the state).\n   - **A brief with several lots** (« Increments » section: bullets « **Lot N — title** [IA|human] »; the\n     state names the current lot): one fresh subagent per lot, one at a time, on the same brief,\n     branch and PR, with a single closing. Its instructions start by reading the state (it names the\n     current lot: work on that one only) and the brief's « Reprise » (« Hand-off ») section, which, with\n     the commits, carries the hand-over from one lot to the next. Once the lot is committed, the subagent\n     runs `node .githooks\u002Fstate.mjs lot next` and ends with its report; the main session starts a new\n     subagent for the next lot (`node .githooks\u002Fstate.mjs lot` says which). A [human] lot is skipped, named\n     as still to do and recalled at the closing; the chaining goes on with the next [IA] lots. The\n     subagent of the last lot runs `lot next` too (it marks it done), verifies and closes the brief: the\n     closing is refused while an [IA] lot is not done. Between two lots, `verify --failed` only after a\n     failure: the full pass is the closing's. A brief with a single lot, or none, runs as before.\n   - Sequential queue or single workstream: the subagent works in the repository folder — never `isolation: \"worktree\"`:\n     `.drwil\u002Fstate.json` (if present) is ignored by Git, absent from an isolated copy, and the subagent would\n     believe it is in SCOPING. It receives no state reminder at start: its instructions start by\n     reading the state: `node .githooks\u002Fstate.mjs`, then carry the workstream until the closing is\n     pushed (merge scheduled by `merge-auto`; the state then stays CLOSING until the merge), without\n     running `next`, and end with the report. It cannot ask the human: on anything that needs one, it stops and says why.\n   - One subagent at a time (sequential mode); the main session does not change the state while it works and reads\n     it again when it returns. The main session keeps only the reports.\n   - **Queue** (the state says « Queue decided at start »): after the closing, the main session follows the PR with `gh` until it is merged, 30 minutes\n     at most (on GitLab the MR with `glab`, both through `node .githooks\u002Fpr-watch.mjs \u003Cpr>`), updates the main branch, then starts the next brief\n     with `node .githooks\u002Fstate.mjs next` and hands it to a new subagent — no new poll. No next\n     brief: the summary. Once the PR is merged, `pr-watch` also follows the main branch's CI on the\n     merge commit, and the alert issue « CI broken on the main branch »: green with no issue open,\n     it writes the proof (`.drwil\u002Fevidence\u002Fmain-ci.json` (if present)) for that commit; `next` refuses without\n     a proof for the tip of the up-to-date main branch, and says why. A human `start` is\n     not blocked. That proof is written on GitHub only: with `origin` on GitLab or another forge, `next` is not blocked and says in\n     one line that the main branch's CI is to be checked by hand.\n   - Stop at the first workstream that gets stuck (human attestation awaited, FAIL not fixed, red\n     CI, main branch CI red or alert issue open, merge not done within 30 minutes, decision to make): say why and what is expected; never\n     start the next one on a merge not done. An attestation awaited: the subagent stops with the\n     contract ID and the `npx drwil attest-poll \u003CID> --tried \"\u003Ctrial>\"` to prepare; the main session\n     asks that poll in the chat first, the terminal `npx drwil attest \u003CID>` as fallback\n     (`docs\u002Frecipes\u002Fattest-a-contract.md`). The queue goes on once it is unblocked, or\n     `node .githooks\u002Fstate.mjs queue stop` drops it. A short report at each closing (criteria,\n     checks, limits, intents created), a summary at the end of the queue.\n   - **Resuming a queue in a new session** (after `\u002Fclear` or a restart, the state in SCOPING with\n     a queue): first ask « the queue resumes with \u003Cbrief>: shall I start it? » and run `next` only\n     on an explicit yes; anything else (« continue », silence, another request) starts nothing.\n   - **Parallel queue** (the state says « Parallel queue decided at start », the human having\n     answered \"Parallel queue\" to the poll): the worktrees already exist, created by the hook;\n     the main session creates none. Each workstream runs in its own subagent, started together,\n     whose working folder is its worktree (the path listed in the state reminder; never\n     `isolation: \"worktree\"`, which would be a copy without the state): its instructions start by\n     reading the state in that folder (`node \u003Cworktree>\u002F.githooks\u002Fstate.mjs`), it modifies no other\n     folder, carries the workstream until the closing is pushed (merge scheduled by `merge-auto`) and\n     ends with the report. The main session keeps only the reports, follows each PR with `pr-watch` until\n     it is merged, 30 minutes at most each, without waiting for another workstream's merge. On a\n     closing conflict on the workstreams' index or journal, the subagent rebases and resolves it\n     alone. A workstream that needs a human (attestation, FAIL not fixed, red CI, merge not done\n     within 30 minutes, decision to make) stops its own subagent with a report saying why and\n     what is expected; the others go on and the main session starts nothing more by itself. A short\n     report at each closing, then a queue summary giving the state of each workstream (worktree,\n     branch, brief, activity, PR). Only Claude Code and Copilot CLI: another tool has no parallel\n     queue.\n   - Another tool (Gemini CLI…): no subagent yet, the queue runs in the same session, the rest\n     unchanged.\n\nWithout a poll in the tool: give the human the command `node .githooks\u002Fstate.mjs start`, to run\nin an interactive terminal.\n","# Start a workstream (`\u002Fdrwil-start`)\n\nStarting is the human's decision: it is **their answer to the poll**, read by a tool hook\n(`.claude\u002Fhooks\u002Fprompt-hook.mjs`), that makes the transition — never the agent.\n\n1. List the scoped briefs: `node .githooks\u002Fstate.mjs briefs --json` (`scope` block committed,\n   brief neither finished nor a reference). None: say so and stop. The list is **already\n   ordered**, in the realisation order of the index (`docs\u002Fprojects\u002Fpending.md`, \"Fiches\n   cadrées\" section, open items top to bottom): a brief that is not ready keeps its place there\n   (`ready` false, `decisions` counts those still to decide), whatever its priority or maturity;\n   the briefs the index does not cite come after, ready ones first, then by `maturity`, then by\n   index `priority`.\n2. Read the \"Proposed order\" sections of the intentions (`docs\u002Fintentions\u002F`): they may put one\n   brief before another of the same rank. Also note the index's P1 intentions that have no framed\n   brief yet.\n3. Open **one** poll (Claude Code: `AskUserQuestion`; Copilot CLI: `ask_user`), in that order,\n   preceded by a short message citing the P1 intentions \"to frame\" (never offered for start):\n   - Claude Code: `header` exactly `drwil-start`; one option per brief, **label = exact path**\n     (e.g. `docs\u002Fprojects\u002F\u003Cbrief>.md`), description = title. At most 4 options, the first of the\n     list; a brief that is not ready keeps its place in the list, its description says \"not\n     ready: N decision(s) to make first\"; a brief with `maturity` `refine` is never hidden, its\n     description starts with \"to refine: review before starting it\"; the human can type another\n     path under \"Other\". `multiSelect: true` when the human wants to chain several briefs (a\n     queue): the briefs ticked are run in the order of the poll's options, whatever the order\n     of the clicks (the hook sorts them), the first now, the next ones\n     started by the agent after each closing; only ready briefs (maturity « ready », no open\n     decision, acceptance criteria) can be queued, otherwise the whole start is refused.\n   - **A single scoped brief**: a question needs at least two options, so add a second one,\n     label `Not now` (description: start nothing), never recommended; the hook reads it,\n     starts nothing and says so.\n   - **No merge question**: every PR, code or documentation, is put in automatic merge by the\n     agent in CLOSING (« Every PR in automatic merge » rule of `AGENTS.md`), if the repository\n     allows it; the poll never asks about the merge.\n   - **Worktree question** (required, always asked: a poll without it is refused by the hook; when the repository cannot host sibling folders, the question is still asked and \"This folder\" is the answer): Claude\n     Code, a question of the same poll, `header` exactly `drwil-worktree`, options \"New worktree\"\n     (the workstream runs in a new sibling folder `..\u002F\u003Crepository>-\u003Cbrief>`, branch\n     `workstream\u002F\u003Cbrief>` cut from the up-to-date main branch) and \"This folder\", no recommendation;\n     Copilot CLI, a field named exactly `drwil-worktree` with the same two values in its `enum`.\n     It is the human's choice, read by the hook: with \"New worktree\" the hook creates the folder,\n     runs the install command declared in `.drwil\u002Fia-first.json` (`worktreeInstall`, optional) and\n     starts the workstream **there**; this folder's state does not change. Only one brief at a time\n     (a queue stays in the repository folder). Then tell the human to open a terminal in the new\n     folder and start the agent there, and stop: never work the brief from this folder. A brief\n     already active in another worktree is refused with that worktree's path.\n   - **Parallel question** (optional, only with `multiSelect: true` and at least two ready briefs):\n     Claude Code, a question of the same poll, `header` exactly `drwil-parallel`, options\n     \"Parallel queue\" and \"Sequential queue\", no recommendation (Copilot CLI: never, one brief per\n     poll). It is the human's choice, read by the\n     hook: with \"Parallel queue\" the hook launches every brief ticked, in the order of the options,\n     each in its own worktree (as for \"New worktree\"), at most `maxParallel` workstreams active at\n     once (`.drwil\u002Fia-first.json`, 3 by default), and refuses without creating anything briefs whose\n     `scope` blocks overlap; \"Sequential queue\" keeps the queue in this folder. Never recommended:\n     the agent does not start those worktrees itself.\n   - Copilot CLI: `message` starting with `drwil-start :`; a first field `fiche` with **single\n     choice**: `type: \"string\"` and `enum` = the exact paths, **never** `type: \"array\"` (a multiple\n     choice field came back empty under Copilot CLI: only the single choice is read reliably): the\n     hook reads `fiche=…`. One brief per poll: to chain several briefs from Copilot CLI, use the\n     **queue polls** below; always ask `drwil-worktree` with it, and never `drwil-parallel` (it\n     needs several briefs). The hook still reads a multiple choice field if another tool sends one.\n   - **Queue by chained polls** (any tool, the way to a queue under Copilot CLI): when the\n     human wants to chain several briefs and the tool reads a single choice only, open one poll\n     per brief, **single choice**: Claude Code, `header` exactly `drwil-file`, `multiSelect` false;\n     Copilot CLI, `message` starting with `drwil-file :` and one field named exactly `drwil-file`,\n     `type: \"string\"` and `enum` only. Options: the ready briefs not yet in the queue (exact paths, the\n     state reminder lists the ones already added), plus a last one, `Finish the queue`. The hook\n     reads each answer: a brief is **added** to the queue under construction (nothing starts; the\n     `[drwil]` message says the queue so far), then open the next `drwil-file` poll; « Finish the\n     queue » starts the first brief in this folder and queues the others. A\n     brief that is not ready is refused when added. Never fill in `answers` or a `default`, never\n     answer yourself and never start the queue: the hook refuses the poll, and the state has no\n     command for the agent to add or finish a queue; `node .githooks\u002Fstate.mjs queue stop` drops one.\n   - **Recommend**: the first ready brief, first, with \"(Recommended)\" and the reason in\n     its **description** — never in the label.\n   - **Forbidden**: filling `answers` or a default value (`default`): the hook refuses the poll.\n     The human chooses alone.\n4. After the answer, read the state again: `node .githooks\u002Fstate.mjs`. In BUILD on the\n   chosen brief: implement. Otherwise: report the refusal as is, without retrying another way;\n   the hook always says why (`[drwil]` message: refusal, « Not now », no answer read, error).\n   No `[drwil]` message at all: the hooks are not active in this session (e.g. opened before\n   `init`) — say so and suggest restarting the session. The automatic merge is the\n   default behaviour, with no authorisation to ask for: in CLOSING, after verify PASS and pushing the closing\n   commit, in this order — run `node .githooks\u002Fmerge-auto.mjs \u003Cnumber>` (never chain the forge's commands by hand, `gh` or `glab`): on\n   GitHub or GitLab alike, it waits until the forge has computed the pull or merge request (PR or MR), updates\n   it if it is behind the main branch, schedules the automatic merge and reads it back on the forge to check\n   that the merge is scheduled (GitLab: `merge_when_pipeline_succeeds`; GitHub:\n   `gh pr view --json autoMergeRequest`); follow the PR with\n   `node .githooks\u002Fpr-watch.mjs \u003Cnumber>`, run again while it says green without merged, 30 minutes\n   at most in all; the PR merged, only then go back to Scoping —\n   never before: once in Scoping, a red CI can no longer reopen the workstream. Red CI before the\n   merge: stay in CLOSING and `node .githooks\u002Fstate.mjs reopen` (it cancels the scheduled merge).\n   Time limit exceeded, or any other failure: stay in CLOSING and report it. If `.githooks\u002Fmerge-auto.mjs` refuses\n   because the repository does not allow it, say « auto-merge not allowed by the repository » and the\n   way out its message gives — on GitHub a repository admin ticks « Allow auto-merge » (General → Pull\n   Requests), on GitLab the project runs a pipeline on the MR and allows auto-merge; or the human\n   merges by hand — stay in CLOSING, and never say the merge is scheduled: a mergeable PR,\n   auto-merge allowed by the repository, auto-merge scheduled and merge done are four different\n   states. Never schedule the automatic merge by hand (`gh pr merge --auto`, `glab mr merge --auto-merge`), in\n   any tool: only through `.githooks\u002Fmerge-auto.mjs`. Once the PR is merged and the main branch updated,\n   the next `node .githooks\u002Fstate.mjs start` or `next` goes back to SCOPING by itself (brief deleted,\n   closing PR merged): no `move SCOPING` to run.\n   After each push or PR creation, follow its CI with `node .githooks\u002Fpr-watch.mjs \u003Cnumber>`\n   (green, merged or red with the failing check); a red CI is fixed, never bypassed. Red after\n   the closing commit, PR not merged yet: `node .githooks\u002Fstate.mjs reopen` (in CLOSING) cancels\n   the scheduled merge, restores the brief and moves back to BUILD on the same branch; fix,\n   close again (journal entry updated, never doubled), then schedule the merge again with\n   `node .githooks\u002Fmerge-auto.mjs \u003Cnumber>`.\n5. **Subagent from the first workstream** (Claude Code and Copilot CLI, queue or not): run each\n   workstream in a subagent (fresh context), the first one right after the poll — Claude Code:\n   the Agent tool; Copilot CLI: the `task` tool, `general-purpose` agent, `mode: \"sync\"`. The\n   context read again is most of a queue's cost, and grows with each workstream kept in the same\n   session. The main session keeps only the reports and the human decisions. A subagent that needs\n   the human stops with a report saying why; the main session asks the human, then resumes the\n   workstream (a new subagent, whose instructions start by reading the state).\n   - **A brief with several lots** (« Increments » section: bullets « **Lot N — title** [IA|human] »; the\n     state names the current lot): one fresh subagent per lot, one at a time, on the same brief,\n     branch and PR, with a single closing. Its instructions start by reading the state (it names the\n     current lot: work on that one only) and the brief's « Reprise » (« Hand-off ») section, which, with\n     the commits, carries the hand-over from one lot to the next. Once the lot is committed, the subagent\n     runs `node .githooks\u002Fstate.mjs lot next` and ends with its report; the main session starts a new\n     subagent for the next lot (`node .githooks\u002Fstate.mjs lot` says which). A [human] lot is skipped, named\n     as still to do and recalled at the closing; the chaining goes on with the next [IA] lots. The\n     subagent of the last lot runs `lot next` too (it marks it done), verifies and closes the brief: the\n     closing is refused while an [IA] lot is not done. Between two lots, `verify --failed` only after a\n     failure: the full pass is the closing's. A brief with a single lot, or none, runs as before.\n   - Sequential queue or single workstream: the subagent works in the repository folder — never `isolation: \"worktree\"`:\n     `.drwil\u002Fstate.json` (if present) is ignored by Git, absent from an isolated copy, and the subagent would\n     believe it is in SCOPING. It receives no state reminder at start: its instructions start by\n     reading the state: `node .githooks\u002Fstate.mjs`, then carry the workstream until the closing is\n     pushed (merge scheduled by `merge-auto`; the state then stays CLOSING until the merge), without\n     running `next`, and end with the report. It cannot ask the human: on anything that needs one, it stops and says why.\n   - One subagent at a time (sequential mode); the main session does not change the state while it works and reads\n     it again when it returns. The main session keeps only the reports.\n   - **Queue** (the state says « Queue decided at start »): after the closing, the main session follows the PR with `gh` until it is merged, 30 minutes\n     at most (on GitLab the MR with `glab`, both through `node .githooks\u002Fpr-watch.mjs \u003Cpr>`), updates the main branch, then starts the next brief\n     with `node .githooks\u002Fstate.mjs next` and hands it to a new subagent — no new poll. No next\n     brief: the summary. Once the PR is merged, `pr-watch` also follows the main branch's CI on the\n     merge commit, and the alert issue « CI broken on the main branch »: green with no issue open,\n     it writes the proof (`.drwil\u002Fevidence\u002Fmain-ci.json` (if present)) for that commit; `next` refuses without\n     a proof for the tip of the up-to-date main branch, and says why. A human `start` is\n     not blocked. That proof is written on GitHub only: with `origin` on GitLab or another forge, `next` is not blocked and says in\n     one line that the main branch's CI is to be checked by hand.\n   - Stop at the first workstream that gets stuck (human attestation awaited, FAIL not fixed, red\n     CI, main branch CI red or alert issue open, merge not done within 30 minutes, decision to make): say why and what is expected; never\n     start the next one on a merge not done. An attestation awaited: the subagent stops with the\n     contract ID and the `npx drwil attest-poll \u003CID> --tried \"\u003Ctrial>\"` to prepare; the main session\n     asks that poll in the chat first, the terminal `npx drwil attest \u003CID>` as fallback\n     (`docs\u002Frecipes\u002Fattest-a-contract.md`). The queue goes on once it is unblocked, or\n     `node .githooks\u002Fstate.mjs queue stop` drops it. A short report at each closing (criteria,\n     checks, limits, intents created), a summary at the end of the queue.\n   - **Resuming a queue in a new session** (after `\u002Fclear` or a restart, the state in SCOPING with\n     a queue): first ask « the queue resumes with \u003Cbrief>: shall I start it? » and run `next` only\n     on an explicit yes; anything else (« continue », silence, another request) starts nothing.\n   - **Parallel queue** (the state says « Parallel queue decided at start », the human having\n     answered \"Parallel queue\" to the poll): the worktrees already exist, created by the hook;\n     the main session creates none. Each workstream runs in its own subagent, started together,\n     whose working folder is its worktree (the path listed in the state reminder; never\n     `isolation: \"worktree\"`, which would be a copy without the state): its instructions start by\n     reading the state in that folder (`node \u003Cworktree>\u002F.githooks\u002Fstate.mjs`), it modifies no other\n     folder, carries the workstream until the closing is pushed (merge scheduled by `merge-auto`) and\n     ends with the report. The main session keeps only the reports, follows each PR with `pr-watch` until\n     it is merged, 30 minutes at most each, without waiting for another workstream's merge. On a\n     closing conflict on the workstreams' index or journal, the subagent rebases and resolves it\n     alone. A workstream that needs a human (attestation, FAIL not fixed, red CI, merge not done\n     within 30 minutes, decision to make) stops its own subagent with a report saying why and\n     what is expected; the others go on and the main session starts nothing more by itself. A short\n     report at each closing, then a queue summary giving the state of each workstream (worktree,\n     branch, brief, activity, PR). Only Claude Code and Copilot CLI: another tool has no parallel\n     queue.\n   - Another tool (Gemini CLI…): no subagent yet, the queue runs in the same session, the rest\n     unchanged.\n\nWithout a poll in the tool: give the human the command `node .githooks\u002Fstate.mjs start`, to run\nin an interactive terminal.\n",{"name":5,"description":7},"master","c67968d9ed615d0b16d09e95035dfb88236b3430",".claude\u002Fskills\u002Fstart-a-workstream","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil","https:\u002F\u002Fgithub.com\u002Fwdubilly","2026-11-15 07:21:30",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add wdubilly\u002Fdrwil --skill drwil-start",{"tool":35,"command":36},"bunx","bunx skills add wdubilly\u002Fdrwil --skill drwil-start",{"tool":38,"command":39},"pnpm","pnpm dlx skills add wdubilly\u002Fdrwil --skill drwil-start","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fstart-a-workstream\u002FSKILL.md",true,[],[44,51,58,63,70,77],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7EFEF1DS3W8RB9YKGYVW1GQ","drwil-progress","Generate a static HTML dashboard (project progress, contract coverage) with nothing to deploy. Use for a quick overview before a meeting, resuming a project, or a review.","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Fview-progress\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7EFE8TXCPE42H19TATKWBSJ","drwil-usage","Measure the tokens consumed per workstream and record the closing workstream's line in .drwil\u002Fusage.jsonl. Use when closing a workstream, or when asked what a workstream cost, to feed the dashboard and the analysis reports.","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Ftrack-consumption-per-increment\u002FSKILL.md",[],[],{"skillNo":59,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7EFE25829Q10BZ3M3Y6AHBP","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Fstart-a-workstream\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7EFDTGG5G9CN552BYP8ZAYJ","drwil-scope","At the end of a scoping pushed (brief or intention committed on a scoping branch, its PR open), set its PR to automatic merge with the tool, without a poll — the automatic merge is the default behaviour. Use when a scoping is pushed and its PR opened, or when the human runs \u002Fdrwil-scope.","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Fscope-a-workstream\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7EFDRP80QDVEDQ52JGDDV81","run-locally","Run the project locally for development — prerequisites, success signals, known pitfalls on first startup.","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Frun-locally\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7EFDMQES8SHMYSFYTAH8WHZ","refactor-without-breaking","Split or restructure existing code without changing its behavior — characterization tests first, small committed steps, bugs found committed separately. Use for every refactor.","https:\u002F\u002Fgithub.com\u002Fwdubilly\u002Fdrwil\u002Fblob\u002Fmaster\u002Fpackages\u002Fdrwil\u002Ftemplates\u002Fcommon\u002Ftools\u002Fclaude\u002F.claude\u002Fskills\u002Frefactor-without-breaking\u002FSKILL.md",[],[]]