@sjawhar/opencode-legion-envoy 9.0.0 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/dispatch.js +162 -41
  2. package/dist/src/server.js +20 -17
  3. package/package.json +1 -1
  4. package/skills/AGENTS.md +7 -6
  5. package/skills/dispatch/SKILL.md +54 -169
  6. package/skills/dispatch-first/SKILL.md +23 -17
  7. package/skills/dispatch-writing-specs/SKILL.md +76 -0
  8. package/skills/leading-a-work-stream/SKILL.md +96 -0
  9. package/skills/leading-a-work-stream/references/daily-plan.md +8 -0
  10. package/skills/leading-a-work-stream/references/decision-rights.md +6 -0
  11. package/skills/leading-a-work-stream/references/direction-and-coaching.md +13 -0
  12. package/skills/leading-a-work-stream/references/dispatch-upkeep.md +7 -0
  13. package/skills/leading-a-work-stream/references/sources.md +9 -0
  14. package/skills/leading-a-work-stream/references/speed-tick.md +44 -0
  15. package/skills/leading-a-work-stream/references/user-quotes.md +7 -0
  16. package/skills/legion-architect/SKILL.md +11 -8
  17. package/skills/legion-architect/references/acceptance.md +18 -5
  18. package/skills/legion-architect/references/decomposition.md +3 -2
  19. package/skills/legion-architect/references/design-gate.md +42 -19
  20. package/skills/legion-architect/references/wake-routing.md +4 -4
  21. package/skills/legion-controller/SKILL.md +31 -17
  22. package/skills/legion-controller/references/admission.md +5 -3
  23. package/skills/legion-controller/references/backlog-stewardship.md +17 -2
  24. package/skills/legion-controller/references/daily-report.md +4 -4
  25. package/skills/legion-controller/references/finding-asks.md +111 -14
  26. package/skills/legion-controller/references/slack-mentions.md +2 -2
  27. package/skills/legion-controller/references/triage.md +9 -5
  28. package/skills/legion-controller/references/wakes.md +22 -8
  29. package/skills/legion-worker/SKILL.md +7 -6
  30. package/skills/legion-worker/references/conflicts-and-rewrites.md +23 -16
  31. package/skills/legion-worker/references/findings.md +126 -31
  32. package/skills/legion-worker/references/merge-gate.md +57 -25
  33. package/skills/legion-worker/references/pr-body.md +9 -5
  34. package/skills/legion-worker/references/skip-checks-trailer.md +1 -1
  35. package/skills/dispatch/references/api.md +0 -21
  36. package/skills/dispatch/references/asks.md +0 -43
  37. package/skills/dispatch/references/document-edits.md +0 -59
  38. package/skills/dispatch/references/documents.md +0 -79
  39. package/skills/dispatch/references/examples.md +0 -85
  40. package/skills/dispatch/references/issues.md +0 -66
  41. package/skills/dispatch/references/messages.md +0 -31
  42. package/skills/dispatch/references/reading.md +0 -32
  43. package/skills/dispatch-brainstorming/SKILL.md +0 -56
@@ -1,200 +1,85 @@
1
1
  ---
2
2
  name: dispatch
3
- description: "Use when posting to Dispatch: a message, status update, comment, artifact, spec or document edit, claim or status change. Use when asking a human a question, also one that cites another message, artifact or eval. Use when brainstorming or asking about a design change, or when running any dispatch command."
3
+ description: "Use before your first dispatch command in a session: a message, comment, ask, artifact, document edit, claim or status change."
4
4
  ---
5
5
 
6
6
  # Dispatch
7
7
 
8
- Dispatch holds an issue's or project document's spec, asks, comments and artifacts. It is a high-signal record for the humans who decide, never a log of your work. Narrate progress in your transcript, not here.
8
+ Dispatch is a record for the people who decide, never a log of your work.
9
9
 
10
- - Write to Dispatch only with the `dispatch` command in your shell. `dispatch --help` lists the commands. `dispatch <command> --help` gives the flags, the limits and an example.
11
- - Put long text on stdin: `--<field>-file -` with a quoted here-document (`<<'EOF'` … `EOF`). Give object and list fields as JSON (`--ops-json`).
12
- - Exit code 0 means it wrote or read, 1 means Dispatch refused, 2 means a usage error.
13
- - Dispatch refuses over-limit input with the number to trim. It never truncates. It lists every problem of a call in one refusal, so fix them all and call once again.
10
+ - Use the `dispatch` command; the HTTP API only for what no command does. `dispatch <command> --help` gives its rules and an example.
11
+ - Put long text on stdin: `--<field>-file -` with a quoted here-document (`<<'EOF'`). Give object and list fields as JSON.
12
+ - Exit 1 is a refusal, 2 a usage error. A refusal lists each problem: fix them all, then call once.
13
+ - `DOC_SERVICE_UNAVAILABLE`: the document is reloading, nothing was written; retry in a few seconds.
14
14
 
15
- ## Where the detail lives
15
+ ## Asks and ask blocks
16
16
 
17
- Open a reference when you reach its step, not before. On a host with no `skill://` scheme (Claude Code, OpenCode), the path after `skill://dispatch/` is relative to this skill's directory.
17
+ - A design question a document records is an ask block (a decision block) at the end of its section, at each phase:
18
18
 
19
- | Before you | Read |
20
- | --- | --- |
21
- | run `dispatch doc-edit` | [Editing a document](skill://dispatch/references/document-edits.md) |
22
- | write a typed block, comment, suggest, upload an artifact, request approval, or retry `DOC_SERVICE_UNAVAILABLE` | [Documents](skill://dispatch/references/documents.md) |
23
- | choose, claim or move an issue, set priority, reorder a board, or audit a backlog | [Working an issue](skill://dispatch/references/issues.md) |
24
- | route, edit, retract, resolve or reply to an open ask, or follow its thread | [Asks after they open](skill://dispatch/references/asks.md) |
25
- | catch up after a restart, trace what cites a node, or write a `dispatch://` reference | [Reading back](skill://dispatch/references/reading.md) |
26
- | answer a BTW, Aside or Steer frame, or an Agents-page message | [Targeted and direct messages](skill://dispatch/references/messages.md) |
27
- | want a worked example | [Before and after](skill://dispatch/references/examples.md) |
28
- | set up a token, or call a route no command covers | [Authentication and the HTTP API](skill://dispatch/references/api.md) |
19
+ ```md
20
+ :::ask{urgency="med"}
21
+ The problem and why it matters. Recommendation: the option and its reason.
29
22
 
30
- ## Design changes are brainstormed here
31
-
32
- A design change that needs the human's choices is brainstormed in its issue's spec, not in chat or a repository design document. Its plan is the issue's `plan.md` document. Read `skill://dispatch-brainstorming` before a spec's first version, before each next turn, and before you write a plan.
33
-
34
- ## Writing for the human
35
-
36
- Every spec, ask, comment, message and PR body goes to a person who has not read the code. They do not share your vocabulary, and often read on a phone.
37
-
38
- - Write plain English in full sentences, one idea each. Never use repo shorthand or nouns you coined ("fix 8c", "PR B", "spec@v3", "the pair"). Say what the thing is.
39
- - Name a real product, tool operation (`dispatch request-approval`), event (`artifact.approved`), route, setting or status exactly. Say in a clause how it works. Never use a vague verb such as "notice", "accept", "tell" or "pick up" ([example](skill://dispatch/references/examples.md#naming-the-mechanism)).
40
- - Expand each identifier on first use. Give an issue key or PR number its title, a file its purpose, a session id who it is. Link a URL, not a bare id.
41
- - Describe a change first by what its reader stands to lose. Say who can do what today, what they cannot do after it, what still works, and what you cannot tell. Then name each mechanism. Write that first sentence with a human subject. A shorter engineering sentence is not a reader's sentence.
42
- - When the text carries a judgment, lead with it in one sentence and put the mechanism under it. Then the judgment comes first, and the rule above shapes the sentence under it. This never pre-decides an open question or drops its real options.
43
- - When you state a root cause or a blocker, include the command, error output or record that shows it, with its time. Without it, call the diagnosis a hypothesis. A diagnosis in progress can say so.
44
- - Phone test before you post: can the human, reading only this text on a phone, know what they are told or asked? If not, rewrite. Density is the problem, not length.
45
-
46
- A question lives in the spec or discussion it came from, as [Decision blocks](#decision-blocks) says, never as a compressed standalone ask. It carries the problem the reader recognises, why it matters now, what constrains the answer, and your recommendation with its reason. It asks how to solve the problem or which outcome is wanted. It never lists the choices: the options carry the different approaches, each a label and a description of what it costs.
47
-
48
- ## Writing a spec
49
-
50
- A spec is the design conversation with the human, written down. It starts as the problem and its evidence: what goes wrong, for whom, and the counts or cases that show it. It grows in place. It is the issue's one primary document: extend it with a new version that keeps the human's text, never a second "spec" artifact.
51
-
52
- - **Each open question is a decision block** ([Decision blocks](#decision-blocks)).
53
- - **An answered decision block is the record.** It shows the chosen option, the person's words, who and when. Never restate it.
54
- - **Mark an inference as one**, with its reasoning. A security concern, a restriction or a cost nobody measured is an inference, not a settled constraint. A point carried from another document keeps its provenance. `skill://dispatch-brainstorming` keeps an inference out of a live brainstorm's spec until the human agrees to it.
55
- - **A decision from a comment, conversation or waiver has no rendered record.** Write it into the text in the person's words, quoted and dated. Name them from `dispatch whoami` or the conversation. If neither names them, write "the person". Never use a name you were not given.
56
- - **Sections follow the topic.** No heading is required or fixed.
57
- - **Rewrite a changed point. Do not append.** The decision block stays as the record. Versions keep the history.
58
- - **No placeholders**: no TBD, TODO or hedging. An open item is a decision block or a two-lane contract you settle over Envoy. Or it is a technical decision your lane makes where the work happens, outside the spec.
59
- - **No progress**: no status, timestamps, "Update HH:MMZ" sections, PR lists or handoff notes.
60
- - **Repeated measurements** (hourly counts, a fleet table) go in one artifact that you edit in place, linked once from the spec. Never post them as ask replies or as new spec rows.
61
- - **No commentary**: never call it a draft, version or turn, preview a later version, describe a correction, or narrate the exchange.
62
-
63
- Before a version goes out, read it as the human will. No two passages conflict, each point has one reading, and each decision block passes the phone test.
64
-
65
- ## Decision blocks
66
-
67
- A decision a human must make is an `:::ask{#slug}` block at the end of the section that discusses it. Shape it as [Writing for the human](#writing-for-the-human) says. Split what constrains it into measured, known and unknown. Give 2–4 options and a recommendation, with the trade-off in the prose around it. It asks how to solve the problem, never whether to apply a change already chosen.
68
-
69
- - Never gather decisions in a list, at the top, at the bottom, or in an "open questions" section. Never ask one as a standalone `dispatch ask` that points at the spec.
70
- - Prose questions reach nobody. Only the block reaches the Inbox. A spec with no blocks is right only when no human decision is needed.
71
- - Fix a pile with `move`, not a rewrite. `dispatch doc-edit --ops-json '[{"op":"move","block":"<block-uuid>","after":"<last sentence of its section>"}]'` keeps the ask, its answer and its followers. Move the lifted context the same way and delete the empty section. An ask block has two different ids ([Editing a document](skill://dispatch/references/document-edits.md)).
72
- - Syntax and checks: [Typed blocks](skill://dispatch/references/documents.md#typed-blocks). Whether to ask at all: [Before you ask](#before-you-ask).
73
-
74
- ## Your owner
75
-
76
- - Every owner-scoped command takes exactly one owner. That is `--issue` (a key such as `LEGION-3`, `owner/repo#n`, or a bare number for the cwd repository), or `--project` with `--artifact`. Legion pre-fills `--issue` from `LEGION_ISSUE`.
77
- - An external reference addresses the Dispatch issue linked to it. If none is linked, create one: `dispatch issue --external owner/repo#n --project <project> --title '<title>'`.
78
- - Create an issue for new work with `dispatch issue --project <KEY> --title '<title>'`. Set `--priority` ([issues.md](skill://dispatch/references/issues.md#priority-is-yours-to-set)). Set `--assignee` only when the human said who owns it. Set `--repo` only when it differs from what the issue inherits. Creating an issue does not subscribe you. Never create an issue to park a question.
79
- - File work in a project that exists (`dispatch projects`). Work across projects goes in the one that owns most of it. Create a project only when the human asks. You cannot rename or delete a project.
80
-
81
- ## Search first
23
+ - Option one: what it costs.
24
+ - Option two: what it costs.
25
+ :::
26
+ ```
82
27
 
83
- - Search as `skill://dispatch-first` says before you plan, file, ask, post, start a design document or start work. `dispatch search --help` has the syntax and paging. A paraphrase can match by meaning. Without an embedder, search says so and ranks by keyword. Never paste a passage: a query over 1,000 characters is refused. Cite the hit (`dispatch://KEY`) or say "no prior issue".
84
- - `POSSIBLE_DUPLICATE` compares title words only. Read the candidates. Reference the existing issue, or use `--force` for new work. Then give the new title the difference, and open its spec with the distinction, citing the named issue.
85
- - **Symptom versus cause.** Work goes on the issue whose title names the fix. The symptom's issue gets a pointer. Before you post a finding, search for the failing component's name. A symptom issue that gathers messages with no human reply is the sign.
28
+ - A to-do or permission only a person can give, or a decision with no document, is a `dispatch ask`. A Legion phase worker sends its decision to its architect.
29
+ - In Legion, file no issue for an outside finding. Fix a clear defect in code your tree uses. Hand others to the controller. Ask about decisions (`skill://legion-worker/references/findings.md`).
30
+ - An open ask is the request. Do not raise it again in each message.
31
+ - Change an open ask's block with `dispatch edit-ask`, or `doc-edit`'s `replace` or `move`. An answered ask is fixed: ask anew.
32
+ - Answer a person's reply to an open ask with `dispatch comment --reply-to-ask`; `--turn agent` for a note that needs nothing from them.
33
+ - When an answer's option and text disagree, the text wins.
34
+ - An ask block has a block id, for `doc-edit`, and an ask id, for the ask commands. `dispatch read --ref dispatch://KEY/ask/<id>` takes either.
35
+ - An ask reaches the issue's assignee. On an unassigned issue, name who must answer.
86
36
 
87
- ## Claim the issue before you work it
37
+ ## Choosing what to work on
88
38
 
89
- - Before you implement, `dispatch claim --issue <KEY>` and `dispatch issue-update --issue <KEY> --status in_progress`. Release with `--release` when you finish, hand over or switch. Closing releases it.
90
- - Claiming does not deliver the issue's comments to you. In the same turn, route the issue to your session, `dispatch issue-update --issue <KEY> --route session:<your session id>`, or subscribe to it with `envoy_subscribe notifications.dispatch.issue.<KEY>.>`. When you release, clear the route with `--route ''`. Never route an issue with the `legion` label, or under one: Legion's roles work it, not your session.
91
- - Reading, commenting, asking or gating a PR claims nothing.
92
- - `409 ISSUE_CLAIMED`: someone else holds it. Never work it in parallel. Refusals and takeovers: [issues.md](skill://dispatch/references/issues.md).
39
+ - When you finish an issue, take the top ready one: `todo`, by priority then board rank, per project.
40
+ - `todo` means specced and waiting on nothing; one that waits goes in `backlog`, saying on what.
41
+ - Hold at most three issues in flight; move the rest to `backlog`, saying where each is.
42
+ - Never reorder the board: one agent keeps each project's order (`issue-update --before`/`--after`). If the top looks wrong, tell `notifications.role.legion-<project>-controller`.
93
43
 
94
44
  ## Issue status is yours to move
95
45
 
96
- Outside Legion, the session doing the work moves its issue and the children it owns. Use `in_progress` at implementation and `testing` while proven on a production-like surface. Use `needs_review` while its PR waits on the merge queue, and `done` with `--reason` once driven in production. Never write the status of an issue with the `legion` label or under one. The daemon writes those.
97
-
98
- ## Asking
99
-
100
- A design decision a document records is a decision block in it, at every phase, approved or not. A block in an approved document makes the approval stale until its answer. A Legion phase worker sends the decision to its architect (`skill://legion-worker`). A to-do or permission only a human can give, or a decision with no document, is a `dispatch ask`. The gates apply to both.
101
-
102
- In a Legion session, a role or any of its subagents that finds a problem outside its own issue never files an issue for it (the issue creation in [Your owner](#your-owner) included). It opens a `dispatch ask` as `skill://legion-worker/references/findings.md` says, on the issue that reference names. That overrides "Ask on your own issue" in gate 1, and gate 4's rule to ask nothing beside what the human asked for.
103
-
104
- ### Before you ask
105
-
106
- 1. **Does it need the human's authority, taste or risk appetite?** Your lane decides schema shapes, field names and migration internals. Decide them in the plan or code, not in the spec. Settle a two-lane contract over Envoy, with no ask. A halt condition passes the gate. That is an IAM change, deleting or exposing production data, or anything that reaches a customer. Ask on your own issue.
107
- 2. **Is there real uncertainty, and did you measure what you can?** With none, execute. The one ask without uncertainty is permission only a human can give: a production write, an external send, a console action. Start it with the problem and why, then what it changes and risks. Options name outcomes. Measure first: how many are affected, what reaches the path, the current state. Put the measurement and the population size in the ask. One fix cannot fix most of that population and another can? Drop the first. Never offer it cut down. An option not to act (Hold) stays. Report what the measurement could not establish, with its own control. "I found no evidence" and "there is none to find" differ. A control with the query's blind spot proves neither. The test for a new ask is not whether you asked on this issue before. It is whether it makes the human report again an answer they already gave.
108
- 3. **Can someone who has not read the code answer it on a phone?** Say who can do what today and what changes. Give two options with costs, and your recommendation. No slice or decision numbers, no coined nouns. If you cannot write it so, you do not understand it yet.
109
- 4. **Is it outside what the human already said they want?** If not, it is settled, with every choice inside it their words leave open. Build it and ask nothing about it or beside it until delivered, whatever the ask says about the build. After that, ask only about a choice their message raised and left open, quoting it and naming what you delivered. A cause you diagnosed or a neighbouring behaviour is not in their message: do not ask about it or build it. Fixing the cause of the thing they named is delivery. Do not turn a complaint about one control into a choice about another. Still ask at once about any blocker in [When you need a human](#when-you-need-a-human), including a conflict between their request and another of their rules.
110
-
111
- Nobody else audits or retracts your asks. Passing the gates is your own check.
46
+ Outside Legion, claim your issue (`dispatch claim`) and move it and your children: `in_progress` at implementation, `testing` on a production-like surface, `needs_review` while its PR waits, `done` with `--reason` once driven in production. An issue with the `legion` label, or under one: never write its status, and claim it only as a Legion role of its tree, even when its claim reads `· not running`, as a suspended architect's does: taking it takes the tree out of the workflow.
112
47
 
113
- ```bash
114
- dispatch ask --issue <KEY> --question-file - --option 'Label: what it costs' --option 'Other: what it costs' <<'EOF'
115
- <the problem, what constrains the answer (each answer of theirs you rely on, linked), your recommendation and why>
116
- EOF
117
- ```
118
-
119
- - You follow the ask you open. `--ref` appends a `dispatch://` link to the question.
120
- - Never lead with a file path, line number, sequence number, version or role token. Evidence under it can cite one. Anchor it to a passage with `--anchor-json '{"artifact":"spec","quote":"…"}'` (optional zero-based `occurrence`).
121
- - The ask must be answerable from its own text and anchor. The ask view does not show the issue's comments. Never write "see above", "my comment above" or "as attached". Put the content in the ask. If it does not fit in 800 characters, split the step. A `dispatch://` reference or an anchor may cite, with one line on what it holds.
122
- - A runbook for the human is one self-contained ask per step: what, where, what result proves it, and outcome options. Open each step after the previous is answered, with its verified result in one line.
123
- - If the human must read an artifact to decide, link `dispatch://KEY/artifact/<slug>`, never a filename. Text needed to decide belongs in the spec ([Artifacts](#artifacts)).
124
-
125
- ### When you need a human
126
-
127
- - Before you say you wait on a human, run `dispatch open-asks`. Add `--project <KEY>` to see every open ask in a project.
128
- - **Unsettled product shape needs a decision before implementation.** Product shape can come from a page, navigation entry, table key, customer-scoping rule or persisted sidecar. If the human has not settled it, write a decision block in the work's document before the first implementation commit. In a Legion tree the architect writes it. A lane's schema choice or a two-lane contract does not settle product shape. A behaviour the human asked for in words is settled, with each choice inside it. Routine work needs no approval.
129
- - **Anything you are blocked on a human for is visible in Dispatch.** An agent waits on a human only through an open ask. Make each blocker a `dispatch ask` the moment you know. Blockers are a to-do, a permission, a credential or grant renewal, a human-only setting, a review click, or a conflict between two of their rules. Start with the problem and why, then constraints, options with costs, and your recommendation. For a human-only action, state what it changes and risks. Never make the action the question. A to-do only in a spec, comment, message or PR body reaches no Inbox.
130
- - First try to make the step unnecessary: a value on the machine, a permission you hold, an API that replaces the click.
131
- - One ask per item, `--urgency high` when work halts on it. Keep working on everything else.
132
- - **Ask once.** Do not raise an open ask again in each message. The open ask is the request.
133
- - After it opens: [Asks after they open](skill://dispatch/references/asks.md).
134
-
135
- ## Architecture components
136
-
137
- - Attach every architectural issue to the components it changes. Attach the root before you decompose it: children inherit.
138
- - `--components-json '{"mode":"explicit","ids":["web"]}'`, `'{"mode":"none","reason":"hiring, not code"}'` (only for non-architectural work, with a concrete reason), or `'{"mode":"inherit"}'`.
139
- - Component ids: each non-external `components[].id` from `GET /api/v1/projects/{key}/architecture`, or the file names under `.dispatch/architecture/` in any of the project's source repositories. A project may import from several; ids are project-wide, so one issue can name components of different sources. Others are refused `COMPONENTS_INPUT`. A closed issue can be classified without reopening.
140
- - Change code and `.dispatch/architecture/<id>.md` in the same review. A stale model: `dispatch architecture-sync` ([issues.md](skill://dispatch/references/issues.md#syncing-a-projects-architecture-model)).
48
+ A claim delivers no comments: that turn, `dispatch issue-update --route session:<your id>` (`--route ''` on release) or `envoy_subscribe notifications.dispatch.issue.<KEY>.>`. Never route such an issue.
141
49
 
142
50
  ## Close what you opened
143
51
 
144
- - An ask you opened is yours until answered or resolved. When the answer arrives another way, or the design made it moot, `dispatch resolve-ask` in the same turn. Never leave it for the human.
145
- - Each later write names your open asks (`You still have an open ask on …`). Keep the ones still needed. Resolve the rest with the resolving fact as the reason.
146
- - Before a new ask, check your open ones. Retract one it supersedes with `--kind retracted` in the same turn.
147
-
148
- ## Approval of a spec
149
-
150
- A human approves one version. A later version makes the approval stale, unless the human's own answer to a decision block is the whole change. Then Dispatch records the approval and emits `artifact.approved`: request nothing. If the answer changes text outside its block, rewrite that text, run the fresh reader, and request again. A new version also moves an open request, which then waits on you.
151
-
152
- - Request only when all three hold: every block is answered or waived, the human agreed to every point, and this version is not approved. A Legion root spec under an armed design gate always goes to approval then (`skill://legion-architect`).
153
- - First have a fresh read-only reader check the spec against the code and the human's words, and resolve every finding. A Legion architect uses `plan-gap-analyst`. Then request in the same pass: a finished design with nothing in the Inbox waits on nobody.
154
- - If the human asks for approval while a block is open, name each open block and ask them to answer or waive it. For a waiver, `dispatch resolve-ask --kind resolved` with their words as `--reason`, write the decision into the text, then request.
155
- - A request carries nothing new. An unagreed point first gets a decision block with your recommendation. A choice that is yours (gate 1), where the human will not want a say, leaves the spec. An inference you cannot defend in a block leaves the spec.
156
- - `--summary` is one to three sentences on what they approve, with no commentary and no question. After an earlier approval, one sentence on what changed.
157
- - Only humans approve. Never put "Approve" options in a `dispatch ask`. Details: [Approval requests](skill://dispatch/references/documents.md#approval-requests).
158
-
159
- ## The Spec
160
-
161
- - Name each version that records a decision with `dispatch doc-edit --summary`.
162
- - Read the current document with `dispatch doc-read` before you change it. `--blocks` lists block ids and tokens for edits. It also shows pictures: open a written picture file with your file-read tool.
163
- - Edit in place as [Editing a document](skill://dispatch/references/document-edits.md) says.
164
-
165
- ## Typed blocks
166
-
167
- Write an `:::ask` or a callout only as [Documents](skill://dispatch/references/documents.md#typed-blocks) says.
168
-
169
- ## Artifacts
170
-
171
- - Text the human must read to decide (a draft, a proposal, a summary) is a section of the spec. An artifact is for a real file: sent as-is, a long report, a binary, a screenshot.
172
- - Link an uploaded artifact as `dispatch://KEY/artifact/<slug>` where the reader needs it, and in the ask that needs it. A filename is not a reference. Uploading: [Documents](skill://dispatch/references/documents.md#artifacts).
52
+ - An ask you opened is yours until answered or resolved. If it is answered another way or made moot, `dispatch resolve-ask` it that turn.
53
+ - Resolve each open ask a later write names that is no longer needed; retract one a new ask replaces.
173
54
 
174
55
  ## Structure over stream
175
56
 
176
- - One issue per deliverable (an email to send, a document to review, a decision with its own life), with the content as its document. A message that carries a draft, a spec or more than a couple of paragraphs is an issue or an artifact instead.
177
- - Content lives in documents, decisions in asks. Messages only announce. Never split one deliverable into a message and an ask that points at it: put the reference in the question.
178
- - `You've sent N messages …` means three messages in a row with no human reply. Then wait, or ask once.
179
-
180
- ## Messages
57
+ - One issue per deliverable, its content the issue's document. Decisions are asks. A message only announces.
58
+ - A message replies to a person or tells them what they must know now.
59
+ - Text a person must read to decide belongs in the spec. An artifact is a real file.
181
60
 
182
- A message is a reply to a human's message, or a change a human must know now, such as a deliverable that landed. Never progress, "starting X", "still working", spec restatements or timed status. The PR summarises the work.
61
+ ## Architecture components
183
62
 
184
- ```bash
185
- dispatch message --issue <KEY> --body-file - <<'EOF'
186
- <what landed, with its link>
187
- EOF
188
- ```
63
+ Attach each architectural issue to its components (`--components-json`), the root before decomposing it. Change code and `.dispatch/architecture/<id>.md` in the same review.
189
64
 
190
- - A message is not a decision or document feedback (`dispatch comment`). It wakes nobody unless the issue is routed.
191
- - Show a screenshot inline with `--image` on `message`, `comment` or `ask` ([Documents](skill://dispatch/references/documents.md#artifacts)).
192
- - Answer BTW, Aside, Steer and Agents-page messages as [messages.md](skill://dispatch/references/messages.md) says.
65
+ ## References
193
66
 
194
- ## Following
67
+ Link each item you name:
68
+
69
+ ```text
70
+ dispatch://KEY
71
+ dispatch://KEY/spec
72
+ dispatch://KEY/artifact/<slug>[@vN]
73
+ dispatch://KEY/ask/<id>
74
+ dispatch://KEY/comment/<id>
75
+ dispatch://KEY/message/<id>
76
+ dispatch://PROJECT/artifact/<slug>[@vN]
77
+ dispatch://PROJECT/artifact/<slug>/ask/<id>
78
+ ```
195
79
 
196
- You follow each ask you open or reply to. Replies to your comments and new comments on documents you wrote also reach you. Nothing else on an issue reaches you unless you subscribe ([asks.md](skill://dispatch/references/asks.md#following)).
80
+ A bare id or filename is not a reference. An ask or comment id can be an 8-hex prefix.
197
81
 
198
- ## References
82
+ ## Setup and the HTTP API
199
83
 
200
- Link every reference: an issue, ask, comment, spec or message ([reference forms](skill://dispatch/references/reading.md#reference-forms)), or an artifact. Link an eval by its viewer URL, a Slack message by its permalink, a Drive file by its share link. Never write "see this eval", "the comment above" or "per the spec" without a link. If a thing has no address, say so.
84
+ - Use a personal token from Dispatch **Settings → Agent tokens**, as `DISPATCH_TOKEN` or `dispatch.token` in the session's `envoy.json`.
85
+ - `GET /api/v1` lists every route; never guess one. Branch on an error's `code`, not its text.
@@ -5,37 +5,43 @@ description: "Use when a session has the dispatch command, before you plan, file
5
5
 
6
6
  # Dispatch first
7
7
 
8
- Dispatch holds the open issues, their specs and the answers humans gave. A duplicate issue or a repeated question costs a human time and splits the history.
8
+ Dispatch holds the open issues, their specs and people's answers. A duplicate issue or repeated question costs a person time.
9
9
 
10
10
  ## Search before you act
11
11
 
12
- - Before you plan, file an issue, ask, post a finding or start work, run `dispatch search` (`dispatch --help` lists every command).
13
- - Every query word must match, so each added word can only lose hits. Use two or three words: the thing and what is wrong with it, as a user names them. Never paste a draft.
12
+ - Before you plan, file an issue, ask, post a finding or start work, run `dispatch search`.
13
+ - Each query word must match. Use two or three words: the thing and what is wrong with it. Never paste a draft.
14
14
 
15
15
  ```bash
16
16
  dispatch search --query 'broadcast send order'
17
17
  dispatch search --query 'reviewer threads OR review comments'
18
18
  ```
19
19
 
20
- - No hits: drop a word before you add one. Try two or three wordings (the component's name, the symptom, the fix) before you conclude that nothing exists.
21
- - Open each hit that could be yours with `dispatch read`, then its parent (the `child_of` row under `Links:`; a document hit names its issue on `Issue:`). The parent's children and the `Components:` line show where the rest of the work is.
20
+ - No hits: remove a word before you add one. Try two or three wordings before you decide nothing exists.
21
+ - Open each hit that can be yours with `dispatch read --issue KEY`, then its parent (`child_of` under `Links:`, or a document's `Issue:`).
22
22
 
23
23
  ## What to do with what you find
24
24
 
25
- `dispatch issue` and `dispatch ask` also search: treat a hit in the result's `advice.suggestions` as one you found.
25
+ `dispatch issue` and `dispatch ask` also search. Treat a hit in `advice.suggestions` as yours to read.
26
26
 
27
- - **Work already tracked:** put the finding on that issue (a comment, a message, or a spec edit). File a new issue only when no hit covers the work, and cite the nearest one you ruled out (`dispatch://KEY`).
28
- - **Question already decided:** the answered ask is the record. Cite it (`dispatch://KEY/ask/<id>`) where you rely on it. Do not ask again.
29
- - **Duplicate found:** keep the issue with the spec and the discussion, and copy over what only the duplicate has. Then close it: `dispatch issue-update --issue <KEY> --status done --reason 'Duplicate of dispatch://KEY.'`. If it has the `legion` label, or another session or a human holds its claim, comment on it with the survivor's name. Do not close it.
30
- - **Every ask and message stands alone:** the reader sees only that text. Put the facts, the options and your recommendation in it. Link what you cite (`dispatch://…`). Never write "see above" or "my earlier message".
31
- - **In a Legion session, a finding outside your own issue is never an issue you file.** A Legion role, and each of its subagents, opens a `dispatch ask` as `skill://legion-worker/references/findings.md` says, in place of filing above.
27
+ - **Work already tracked:** put the finding on that issue. File a new issue only when no hit covers the work, and cite the nearest one you ruled out (`dispatch://KEY`).
28
+ - **Question already decided:** the answered ask is the record. Cite it (`dispatch://KEY/ask/<id>`). Do not ask again.
29
+ - **Duplicate found:** keep the issue with the spec, copy to it what only the duplicate has, and close the duplicate (`--status done --reason 'Duplicate of dispatch://KEY.'`). When it has the `legion` label or another holder's claim, comment the kept issue's name on it instead.
30
+ - **Each ask and message stands alone:** the reader sees only that text. Put the facts, options and your recommendation in it.
31
+ - In Legion, file no finding outside your issue (`skill://legion-worker/references/findings.md`).
32
32
 
33
- ## Design in the spec
33
+ ## Reach a person only through Dispatch
34
34
 
35
- - A design conversation with a person, or the plan that follows it, uses `skill://dispatch-brainstorming`. Read it before your first design question, the spec, or the plan. It replaces superpowers' `brainstorming` and `writing-plans` here, also when the user names one of them.
36
- - Before a spec's first version and each approval request, get a fresh read-only subagent to check it. On Oh My Pi, use `task(agent="scout")`. Elsewhere, use the host's read-only agent. It checks the spec against the code, the human's words and the command output that its claims rest on. Scout has no shell: save that Dispatch, gh and git output to files first and give it their paths. Resolve what it flags.
37
- - A Legion architect's own issue spec follows `skill://legion-architect`. Its fresh reader in that Legion session is the Legion plugin's `plan-gap-analyst` agent.
35
+ A person does not watch your chat. Reach them through an ask, an ask block or an approval request.
38
36
 
39
- ## Load the full skill before you write
37
+ - The moment a person blocks your work, open an ask: an ask block for a design question its document records, else `dispatch ask`. A blocker that is not an open ask does not exist for them. A Legion phase worker sends decisions to its architect instead. Before you say you wait on a person, run `dispatch open-asks`.
38
+ - Record every request you accept in Dispatch before you start it: an issue, or a line in your issue's `open-items.md` artifact. Before you end a turn, read that record. Each item is done, in progress, or an open ask. Never drop one.
40
39
 
41
- Before any write to Dispatch, load `skill://dispatch`: an ask, a message, a comment, a document edit, a status change, a claim. Skip this if you loaded it in this session.
40
+ ## Which skill to read
41
+
42
+ | Before you | Read |
43
+ | --- | --- |
44
+ | run your first `dispatch` command in this session | `skill://dispatch` |
45
+ | write or change a spec, or write an ask, comment or message a person reads | `skill://dispatch-writing-specs` (in a session with Dispatch it replaces superpowers' `brainstorming`) |
46
+ | plan work whose spec a person approved | superpowers' `writing-plans`, stored as the issue's `plan.md` (`skill://dispatch-writing-specs`, "The plan") |
47
+ | write a Legion architect's own spec | `skill://legion-architect` too |
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: dispatch-writing-specs
3
+ description: "Use in a session with Dispatch before you write or change a spec, and before an ask, comment or message a person reads. It replaces superpowers' brainstorming there. A Legion architect also follows skill://legion-architect."
4
+ ---
5
+
6
+ # Writing specs
7
+
8
+ ## The aim
9
+
10
+ Reach shared understanding with the person at the least cost of their time. A Legion phase worker writes no spec: it sends decisions to its architect (`skill://legion-worker`).
11
+
12
+ ## The outline
13
+
14
+ The spec is the issue's primary document. Find its project with `dispatch projects` or `dispatch search`, never the environment. Its `##` parts, in order:
15
+
16
+ Part | Content
17
+ --- | ---
18
+ `Summary` | The change in the reader's own terms, at most 100 words
19
+ `Problem` | What goes wrong, for whom, with counts
20
+ `Goals and non-goals` | What is in and out of scope
21
+ `Requirements` | `**R1.**` on, each naming its source (`From:`)
22
+ `Design` | How it meets them; a value for each limit, size and time
23
+ `Decisions` | Your own choices
24
+ `Acceptance` | `**A1.**` on, each naming the requirements it tests
25
+
26
+ Another agent can build and check the work from the spec alone. Length scales with the change: a small change gets a few sentences per part, no matrix. Split a large design into child issues.
27
+
28
+ ## Rules for the text
29
+
30
+ For each spec, ask, comment and message:
31
+
32
+ - Write in `skill://asd-ste100`'s strict mode.
33
+ - State the current design, never how people reached it.
34
+ - Link each source where the person wrote it: `dispatch://KEY/comment/<id>`, `/ask/<id>`, `/message/<id>`, or a Slack URL. With no link, state the design.
35
+ - Write about the design, never the person. Never quote people, repeat an answered ask, or upload their words.
36
+ - Name your session only if a reader must reach it.
37
+ - Keep only text that helps a reader understand, decide, build, check.
38
+ - Explain each name or term a new reader may not know. Name an issue by its `dispatch://` link, and say in a clause what it does for this reader. Never write a bare key.
39
+ - In an ask, ask block, comment or message, name a requirement or check by what it is, never its number.
40
+
41
+ ## Questions
42
+
43
+ - Propose an answer to each point, numbers included, with a reason.
44
+ - A choice inside what the person asked for, or one their messages favour, is settled: decide it.
45
+ - Ask only for the person's authority, taste or risk appetite, when options differ on what they care about.
46
+ - Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks) at the end of its section: 2 to 4 options with costs, your recommendation, answerable on a phone.
47
+ - Chat reaches nobody: use an ask or approval request.
48
+
49
+ ## Each version
50
+
51
+ 1. After a person's answer, comment or edit, rewrite what it touches; delete what it contradicts. Write what is true now. Never narrate an edit or what used to be here; versions and comments hold the history. Reply in a comment's thread; resolve the ask it answers.
52
+ 2. Before each spec write, paste the whole spec, never a path, into a fresh subagent's assignment. It lists gaps, conflicts, uncheckable requirements, unclear text, and missing or needless questions. Fix or record each.
53
+ 3. Before each approval request, a read-only agent checks its facts: `task(agent="scout")`, or `plan-gap-analyst` and `plan-reviewer` in Legion.
54
+ 4. Name each version with `dispatch doc-edit --summary`.
55
+
56
+ ## Decisions
57
+
58
+ - Each design choice no source states is a `###` entry: choice, reason, options weighed, parts shaped.
59
+ - An unsure entry adds an `Unsure:` paragraph: what would change your mind.
60
+ - A replaced entry moves under a final `### Replaced`.
61
+ - A person's decision is their answered ask block. Each part it shapes links it.
62
+
63
+ ## Old specs
64
+
65
+ At your next edit, rewrite a spec outside the outline whole, in one version. Move its ask blocks with `doc-edit`'s `move`.
66
+
67
+ ## Approval
68
+
69
+ - Request approval once, when each ask block is answered or waived, each claim is checked, and this version is unapproved. Unbuilt acceptance checks never delay it.
70
+ - When their answer is the whole change since approval, Dispatch carries it.
71
+ - After approval, version only a change to scope, acceptance, cost, risk or a person's decision, all at once. Put other fixes in the plan or a comment.
72
+ - A Legion root spec's design gate follows `skill://legion-architect`.
73
+
74
+ ## The plan
75
+
76
+ Write the approved spec's plan with `writing-plans` as the issue's `plan.md`, not a repository file.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: leading-a-work-stream
3
+ description: Use when you lead a work stream or team of agents, when an agent asks you to approve, confirm or review its step or pull request, when you want to know the state of the stream, when an agent starts a long project, or when you consider building tooling or a restriction for agents.
4
+ ---
5
+
6
+ # Leading a work stream
7
+
8
+ If this skill disagrees with the code, a command's output or its `--help`, follow those and say which line of this skill is wrong.
9
+
10
+ A lead raises the stream's numbers by making its agents faster, and is not a gate: agents waiting on your reply are a queue, and a queue is the stream's largest hidden cost. Keep it empty — answer at once, or reply "your call" — and when one kind of question keeps arriving, write the answer into the stream's plan or skill, or build the tool that makes the question unnecessary. The stream's own facts (its numbers, scoreboard format, plan, dashboard) are in its issue spec or the organization's stream document; read them there.
11
+
12
+ In a Legion tree, the daemon's workflow and your role prompt decide who starts a worker, who accepts the work and how it merges. This skill does not change that sequence. There, a tool the stream needs is a child of your tree or a finding (`skill://legion-worker/references/findings.md`), not an agent you start on your own. Why each rule below works: [sources.md](skill://leading-a-work-stream/references/sources.md).
13
+
14
+ ## What a lead does
15
+
16
+ 1. **Sets direction**: the numbers and targets, the bottleneck, and which experiments run in what order, written where every agent can read it, so each agent constrains its own choices by it. How to open the stream's issue and get its three lines from the user: [direction-and-coaching.md](skill://leading-a-work-stream/references/direction-and-coaching.md).
17
+ 2. **Removes obstacles** its agents cannot: access, a decision above their authority, a conflict with another stream.
18
+ 3. **Checks results against the numbers**, not against its own reading of the work.
19
+ 4. **Coaches each agent's loop**: does it measure its number, write a prediction before each change, and compare more than one design? Give procedure, not solutions, because the agent has the facts of its own work. Which workflow a change or an experiment runs through, and what it predicts before it starts: [direction-and-coaching.md](skill://leading-a-work-stream/references/direction-and-coaching.md).
20
+ 5. **Makes the stream faster**: finds where agents lose time and changes the skill, tool or step that causes it.
21
+ 6. **Proves its facts with a command.** A claim about what exists or what a thing can do rests on a command and its output, not on a reading. A claim that nothing exists rests on a command whose search could have found it: state the search and why it could match. A lead's facts about its own stream are the ones nobody else checks.
22
+ 7. **Keeps the stream's record of what each agent accepted.** At each check-in, read it against the agents' issues and open asks. An item that is neither done, in progress, nor an open ask is dropped work. The lead finds its owner and has it recorded at once.
23
+
24
+ ## The speed loop
25
+
26
+ Arm a reminder that wakes you every 3 hours and run the six-step loop it names: [speed-tick.md](skill://leading-a-work-stream/references/speed-tick.md). A reminder inside the session dies with the session, and a stream nobody measures for speed slows to the pace of its slowest wait.
27
+
28
+ ## Dates
29
+
30
+ A date is the time the work takes at agent speed, plus only the waits nobody can shorten. Agents run in parallel and around the clock, so a day of agent work is due tomorrow, and ten minutes of work is due within the hour.
31
+
32
+ - Each date carries its basis in one line ("about 3 h of work, 2 h of benchmark runs"), so padding is visible.
33
+ - A key performance indicator (KPI) is one of the stream's numbers in its issue spec. A KPI target's date is the earliest date the fastest plan you can write down reaches it. Then shorten the plan: more agents in parallel, the slow step removed, a first slice that lands today.
34
+ - When a date will slip, say so the moment you know, with the new date and why. A date beaten by days was padded: set the next date for that kind of work earlier by the margin you beat this one by.
35
+
36
+ ## What a lead does not do
37
+
38
+ - Gate a decision an agent can make. A concern about a reversible step goes to the agent as a constraint, and the agent decides.
39
+ - Review every pull request. Peer review and tests are the approval.
40
+ - Require a plan, spec or confirmation to be sent to it before an agent acts.
41
+ - Ask agents for a report of each decision or step. Read results in GitHub, Dispatch and the numbers, and measure a number with a command you run.
42
+ - Ration a shared resource (disk, VMs, compute) by approving each use. Set the limit, and the agents apply it themselves or through a tool.
43
+ - Relay messages between agents who can talk directly.
44
+ - Give an agent orders specific to its own work (which task to launch, at what size, what to regrade): the agent has the facts of its own work and the lead does not. Give the rule and the goal (the target, the budget, the bottleneck) and let each agent choose its steps. Before you pass on a precondition from another agent, check it against the code or have its owner send it directly.
45
+
46
+ ## Decision rights
47
+
48
+ A step that is easy to undo is the agent's: it acts and reports to nobody, and you read the result in GitHub, Dispatch and the numbers. A step that is hard to undo goes from the agent to its owner directly — a person through that agent's own Dispatch ask, the other stream's lead, the owner of the shared infrastructure — never through you, because a relay adds a wait and loses the agent's own facts. Which steps fall where: [decision-rights.md](skill://leading-a-work-stream/references/decision-rights.md).
49
+
50
+ When an agent asks permission for an easy-to-undo step, reply "your call" and state any constraint it must keep; add no check of your own before it may act. Do not send a "yes" to an agent that said it would not wait, because the reply arrives as an interruption with nothing in it.
51
+
52
+ ## Rules reach agents through what they read
53
+
54
+ A rule sent only by message reaches the agents online that day, in the lead's paraphrase, and is gone for the next session. Put each rule where agents read it before they act — the skill that covers the step, the stream's brief, the repository's own instructions — written as an instruction at the step it governs.
55
+
56
+ Keep one record of the words of the person the stream works for, each quoted with its date and source, and link that quote wherever a text says the person wants something ([user-quotes.md](skill://leading-a-work-stream/references/user-quotes.md)). Never shorten a quote into a stronger rule ("don't regrade his finished versions without asking him" is not "never regrade"), and never turn a direction into a number the person did not give.
57
+
58
+ ## Keep every request and wait in Dispatch
59
+
60
+ You answer for every request the user gives any of your agents, and for every wait any of them has.
61
+
62
+ - **A request from the user goes on a claimed Dispatch issue before work on it starts**: a line in that issue's `open-items.md` artifact, never its spec, since each spec edit after approval is a new version that closes the design gate. Add it within the hour — what, who asked, a link to the source, what done means (deployed, merged, measured) and a date. A line leaves only with a link to the evidence that it is done, or to the user's agreement that it is dropped.
63
+ - **Done is delivered and checked: you saw the result yourself** (deployed, merged, measured). Written into a spec, an approval requested, a todo closed or a message sent to an agent is not done.
64
+ - **A wait on a person is an open Dispatch ask the moment you know it** — never only a chat question, a note, a peer message, a comment on an answered ask, or a review request, because nobody tracks those. A wait on anything else is an `open-items.md` line naming the blocker, its owner and its link. Keep working on everything else.
65
+ - **Every hour, run the stream's Dispatch check,** the command its brief names. **Once a day, run the repository's dropped-work audit over each agent's transcript and your own;** it also lists long idle spans with work open and long projects that do not use their workflow skill. Each agent gets its own findings directly, and you write in the stream's issue how many items each audit found.
66
+ - Three more rules of this upkeep — checking a delegated result, a step held back from a hand-over, and what to re-read after a restart — are in [dispatch-upkeep.md](skill://leading-a-work-stream/references/dispatch-upkeep.md).
67
+
68
+ ## Plan the day with the team
69
+
70
+ Every morning by 09:00 Pacific, you and your agents agree on Envoy what the stream will merge today, and you write that list into the stream's record, checking that each item has an agent that committed to land it; without it each agent optimises its own day and the stream's numbers move by accident. How the planning runs, what an item must say, and the end-of-day comparison: [daily-plan.md](skill://leading-a-work-stream/references/daily-plan.md).
71
+
72
+ ## Knowing the state of the stream
73
+
74
+ From records you read yourself (GitHub, Dispatch, the numbers), answer: what is the target; what is the actual value now; what is the obstacle, and which one is being worked on; what is the next step and what should it do to the number; when will we know? Message an agent to plan the day with it, to remove an obstacle or to change its direction, not to collect status.
75
+
76
+ ## Before you say something is blocked
77
+
78
+ **Read the thing itself, not the thing next to it.** Before you write that X is blocked by Y, read X's own state: `gh pr checks` at the head, not the queue's length; the process (`ps -eo pid,etimes,args | grep <session-id>`) and the session's last tool call, not a registry's session list; the job's own start time, not the pool's history. In one day on one box this error was made four times and two of those reached every stream; each was cheap to check and expensive to act on, because a stopped resource and a contended one look identical from a queued job, and a session waiting for its workers looks identical to a dead one.
79
+
80
+ **A blocker you relay to other streams carries the command that shows it.** Without it, each stream spends a check to disprove it after acting on it.
81
+
82
+ **Ask a fresh reviewer, for each claimed cause, to name the command or record that would show it FALSE, and to run it.** A reviewer that reads only the prose confirms a confident wrong cause. The causes that cost most are the ones nobody could falsify, because nobody looked for what would disprove them.
83
+
84
+ **Run a watch that names quiet sessions, and let it restart nothing.** A session that dies mid-task stays dead until a person notices: measured at about 7 hours on a day when one credential failure stopped a box, and at 5 minutes or less once a watch existed. A watch reads the session's transcript modification time, its process and, if it can, its pane; it reports, and the owner decides. Two traps: a systemd user service on a dev box may not reach the tmux server at all (it answers `server exited unexpectedly` while the same command works from a pane), and a watch built on an agent-messaging registry reports live sessions as dead under load. Test it by making it report something you know is true.
85
+
86
+ ## Delegation and tooling
87
+
88
+ - Use subagents and peer agents for review, research and skill improvement. Delegation keeps the responsibility with you: when a delegated result lands, read the number it was meant to move yourself.
89
+ - When an agent starts a long project, check that it uses the workflow skill for that kind of work and name the skill: the `/sdd` workflow for an engineering project, `building-and-delivering-tasks` for RL task work. That skill's own review steps replace review by the lead.
90
+ - When agents keep losing time to the same chore, start an agent to build the tool that removes it. Do not wait to be asked.
91
+ - Do not build, file or ask for a restriction, guard or gate against a failure nobody has seen. Fix a real failure at its cause, after it happens.
92
+ - When the user asks the stream for an explainer video, you own it: have a subagent make it with the `making-explainer-videos` skill.
93
+
94
+ ## Improving this skill
95
+
96
+ When a rule here failed or was missing, edit this file directly, and put the evidence in the commit message, so the next lead gets the fix instead of the same failure.
@@ -0,0 +1,8 @@
1
+ # Planning the day with the team
2
+
3
+ Every morning, by 09:00 Pacific, the lead and its agents agree on Envoy what the stream will merge today, as a working team does at its daily planning: each agent says what it can land and what stands in the way, the team settles the list, and the lead writes it into the stream's record. The lead owns the list and that it is real.
4
+
5
+ - Each item starts with the key performance indicator (KPI, one of the stream's numbers) it moves and the change expected, for example "Grade wall time 7,104 s -> 5,700 s: ...", so the day can be checked against the numbers.
6
+ - Work that moves no KPI goes on the list only when it unblocks an item that does, and names that item.
7
+ - During the day, an agent that will miss an item says so as soon as it knows, so the team can move work.
8
+ - At the end of the day, post each item's actual KPI reading next to its prediction in the stream's record, and ask the owner of each missed item on Envoy what blocked it.
@@ -0,0 +1,6 @@
1
+ # Decision rights
2
+
3
+ | The step | Who decides |
4
+ | --- | --- |
5
+ | Easy to undo: a code change, a flag, a branch, opening or merging a pull request that passed peer review and tests, a planned experiment, and any spending the workflow itself calls for (a paid-API review, compute, a VM, a model run the task needs) | The agent. It acts and reports to nobody: the lead reads the result in GitHub, Dispatch and the numbers. |
6
+ | Hard to undo: deleting data someone else created, a new financial commitment (a contract, a subscription), a message outside the organization, security, another stream's work or shared state | The agent takes it to its owner directly: a person through the agent's own Dispatch ask, the other stream's agent or lead, the owner of the shared infrastructure. It does not pass through the lead. |
@@ -0,0 +1,13 @@
1
+ # Setting direction and coaching the loop
2
+
3
+ ## The stream's three lines
4
+
5
+ Open the stream's issue with three lines above its targets: the problem the stream exists to solve, the one approach it commits to, and what it will not do. Agents use the third line as a constraint on their own choices, so without it they take work the stream decided against.
6
+
7
+ Ask the user those three questions once, in one message, each with a draft answer taken from the user's own words. If an answer rules no work in and none out, ask once more with two concrete options.
8
+
9
+ ## Coaching an agent's loop
10
+
11
+ - An experiment on a number, with a benchmark that runs in minutes, goes through `/autoresearch`: the expected gain is in its notes before each run, and the change is run again before it is kept, so a result that came from noise does not survive.
12
+ - Use the `ce-optimize` skill instead when the result is noisy or has several objectives.
13
+ - A one-off change still gets its prediction written in the scoreboard before it starts, so a wrong prediction is visible instead of explained away afterwards.
@@ -0,0 +1,7 @@
1
+ # Dispatch upkeep: the rest of the lead's rules
2
+
3
+ These go with the "Keep every request and wait in Dispatch" section of the skill.
4
+
5
+ - **Check a delegated or relayed result against its done before you report it**, because an agent's "done" is often a message sent, not a thing delivered. Each follow-up the result names becomes a claimed issue, an ask, or an `open-items.md` line, the same hour.
6
+ - **A step you keep back from a hand-over becomes its own claimed issue,** blocked by the handed-over one, or it is lost when the hand-over closes.
7
+ - **After a restart or a compaction, first re-read your claimed issues and your open asks** (`dispatch open-asks`), then the transcript since your last audit, because what you were waiting for is not in the new context.
@@ -0,0 +1,9 @@
1
+ # Why these rules
2
+
3
+ - Bezos, [2015 shareholder letter](https://www.sec.gov/Archives/edgar/data/1018724/000119312516530910/d168744dex991.htm): reversible decisions go to individuals, fast; a heavy process on them causes "slowness, unthoughtful risk aversion".
4
+ - DORA, [Streamlining change approval](https://dora.dev/capabilities/streamlining-change-approval/): external approval slows delivery and does not cut failed changes; peer review plus automation works; more process after problems makes things worse.
5
+ - US Army, [ADP 6-0 Mission Command](https://armypubs.army.mil/epubs/DR_pubs/DR_a/ARN47032-ADP_6-0-000-WEB-1.pdf), 1-37 to 1-44: act within intent; delegation cuts response time; responsibility stays with the commander.
6
+ - Google re:Work, [research behind great managers](https://rework.withgoogle.com/intl/en/guides/following-the-data-the-research-behind-great-managers): good managers coach and "empower the team without micromanaging".
7
+ - Rother & Liker, [A Kata for PDCA](https://cdn.prod.website-files.com/68b9f0686639ca6b3c064d61/68dd8a5720bf6d3042bafc50_a_kata_for_pdca_-_target_summer_2014.pdf), and [LEI, Kata](https://www.lean.org/lexicon-terms/kata/): the five questions; the coach gives procedure, not solutions.
8
+ - Reinertsen, [Product Development Flow, ch. 1](http://lpd2.com/wp-content/uploads/2013/06/ReinertsenFLOWChap1.pdf): queues are the largest hidden cost.
9
+ - [Summary of Grove's High Output Management](https://www.becausetech.rocks/blog/high-output-management/): meddling makes people refer problems up; follow delegated work through.