@sjawhar/claude-envoy 6.12.0 → 6.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.omp-plugin/plugin.json +1 -1
  3. package/dist/codex-hook.js +3 -3
  4. package/dist/dispatch.js +3 -3
  5. package/dist/envoy-channel.js +4 -4
  6. package/dist/session-hook.js +3 -3
  7. package/legion/skills/legion-architect/SKILL.md +2 -2
  8. package/legion/skills/legion-architect/references/acceptance.md +1 -1
  9. package/legion/skills/legion-architect/references/decomposition.md +2 -2
  10. package/legion/skills/legion-architect/references/operations.md +1 -1
  11. package/legion/skills/legion-controller/SKILL.md +5 -5
  12. package/legion/skills/legion-controller/references/backlog-stewardship.md +3 -3
  13. package/legion/skills/legion-controller/references/consolidation.md +1 -1
  14. package/legion/skills/legion-controller/references/daily-report.md +6 -17
  15. package/legion/skills/legion-controller/references/escalation.md +1 -1
  16. package/legion/skills/legion-controller/references/finding-asks-steps.md +4 -4
  17. package/legion/skills/legion-controller/references/finding-asks.md +16 -15
  18. package/legion/skills/legion-controller/references/operations-steps.md +2 -2
  19. package/legion/skills/legion-controller/references/operations.md +5 -5
  20. package/legion/skills/legion-controller/references/park-asks.md +2 -2
  21. package/legion/skills/legion-controller/references/triage.md +1 -1
  22. package/legion/skills/legion-oracle/SKILL.md +1 -1
  23. package/legion/skills/legion-worker/references/conflicts-and-rewrites.md +0 -2
  24. package/legion/skills/legion-worker/references/findings-steps.md +5 -5
  25. package/legion/skills/legion-worker/references/findings.md +13 -22
  26. package/package.json +1 -1
  27. package/skills/dispatch/SKILL.md +7 -3
  28. package/skills/dispatch-first/SKILL.md +1 -1
  29. package/skills/dispatch-writing-specs/SKILL.md +1 -1
@@ -2,5 +2,5 @@
2
2
  "name": "claude-envoy",
3
3
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "6.12.0"
5
+ "version": "6.12.1"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "6.12.0",
3
+ "version": "6.12.1",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
@@ -14116,8 +14116,8 @@ function dispatchToolSchema(spec, z, opts) {
14116
14116
  var ISSUE_REFERENCE = "An issue is a native KEY or external owner/repo#n reference. An external reference addresses an existing Dispatch issue, including one linked to that GitHub pull request; only dispatch issue with --external creates a native issue.";
14117
14117
  var BOARD_NEIGHBOUR_REFUSAL = "The server refuses a key that does not exist, one in another project, this issue itself, an empty value, and a pair the board does not hold in that order.";
14118
14118
  var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is a native KEY or external owner/repo#n reference; a project is a project key such as CORE and addresses an unlinked project document named by artifact.";
14119
- var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. Then give " + "your recommendation and its reason.";
14120
- var ASK_OPTIONS_CONTRACT = "Options carry the genuinely different approaches. Each option has a label, and its description " + "says what that approach costs.";
14119
+ var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. A question " + "between two or more real choices gives one recommendation and its reason. A request for one " + "act only the person can do (an approval, a credential, a grant, a setting of their own " + "account) says what the act is, what it changes and how to do it, and gives no recommendation.";
14120
+ var ASK_OPTIONS_CONTRACT = "Options carry only the real choices: each is within your rules, and a person could choose " + "it. Add no option that breaks your rules or that no one would choose. Each option has a " + "label, and its description says what that approach costs. A request for one act only the " + "person can do has the two options Done and Can't.";
14121
14121
  var ASK_IS_FOR_A_PERSON = "An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.";
14122
14122
  var ASK_WAITS_ON_THE_ASSIGNEE = "An ask waits on its asked-of person, else the issue's assignee, else the project's default assignee; no agent hands one on.";
14123
14123
  var HUMAN_AGREED_TO_DOCUMENT = "the human has agreed to every point in the document";
@@ -14702,7 +14702,7 @@ var dispatchToolSpecs = [
14702
14702
  }
14703
14703
  ]
14704
14704
  },
14705
- description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. A question about the design an issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, never offer it cut down, and keep an option not to act (Hold). Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
14705
+ description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. Ask for a decision only when two or more choices are real. Where only one is " + "real, make it, and tell the person what you did and why. A question about the design an " + "issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints, " + "and a safer alternative as a fact, never as an option. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, and never offer it cut down. Offer an option not to act (Hold) only where not " + "acting is a real choice and the question names its cost. Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
14706
14706
  arguments: (z) => ({
14707
14707
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
14708
14708
  project: z.string().describe("Project key owning the document.").optional(),
package/dist/dispatch.js CHANGED
@@ -14716,8 +14716,8 @@ function dispatchToolSchema(spec, z, opts) {
14716
14716
  var ISSUE_REFERENCE = "An issue is a native KEY or external owner/repo#n reference. An external reference addresses an existing Dispatch issue, including one linked to that GitHub pull request; only dispatch issue with --external creates a native issue.";
14717
14717
  var BOARD_NEIGHBOUR_REFUSAL = "The server refuses a key that does not exist, one in another project, this issue itself, an empty value, and a pair the board does not hold in that order.";
14718
14718
  var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is a native KEY or external owner/repo#n reference; a project is a project key such as CORE and addresses an unlinked project document named by artifact.";
14719
- var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. Then give " + "your recommendation and its reason.";
14720
- var ASK_OPTIONS_CONTRACT = "Options carry the genuinely different approaches. Each option has a label, and its description " + "says what that approach costs.";
14719
+ var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. A question " + "between two or more real choices gives one recommendation and its reason. A request for one " + "act only the person can do (an approval, a credential, a grant, a setting of their own " + "account) says what the act is, what it changes and how to do it, and gives no recommendation.";
14720
+ var ASK_OPTIONS_CONTRACT = "Options carry only the real choices: each is within your rules, and a person could choose " + "it. Add no option that breaks your rules or that no one would choose. Each option has a " + "label, and its description says what that approach costs. A request for one act only the " + "person can do has the two options Done and Can't.";
14721
14721
  var ASK_IS_FOR_A_PERSON = "An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.";
14722
14722
  var ASK_WAITS_ON_THE_ASSIGNEE = "An ask waits on its asked-of person, else the issue's assignee, else the project's default assignee; no agent hands one on.";
14723
14723
  var HUMAN_AGREED_TO_DOCUMENT = "the human has agreed to every point in the document";
@@ -15302,7 +15302,7 @@ var dispatchToolSpecs = [
15302
15302
  }
15303
15303
  ]
15304
15304
  },
15305
- description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. A question about the design an issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, never offer it cut down, and keep an option not to act (Hold). Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
15305
+ description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. Ask for a decision only when two or more choices are real. Where only one is " + "real, make it, and tell the person what you did and why. A question about the design an " + "issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints, " + "and a safer alternative as a fact, never as an option. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, and never offer it cut down. Offer an option not to act (Hold) only where not " + "acting is a real choice and the question names its cost. Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
15306
15306
  arguments: (z) => ({
15307
15307
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
15308
15308
  project: z.string().describe("Project key owning the document.").optional(),
@@ -36916,8 +36916,8 @@ function dispatchToolSchema(spec, z, opts) {
36916
36916
  var ISSUE_REFERENCE = "An issue is a native KEY or external owner/repo#n reference. An external reference addresses an existing Dispatch issue, including one linked to that GitHub pull request; only dispatch issue with --external creates a native issue.";
36917
36917
  var BOARD_NEIGHBOUR_REFUSAL = "The server refuses a key that does not exist, one in another project, this issue itself, an empty value, and a pair the board does not hold in that order.";
36918
36918
  var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is a native KEY or external owner/repo#n reference; a project is a project key such as CORE and addresses an unlinked project document named by artifact.";
36919
- var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. Then give " + "your recommendation and its reason.";
36920
- var ASK_OPTIONS_CONTRACT = "Options carry the genuinely different approaches. Each option has a label, and its description " + "says what that approach costs.";
36919
+ var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. A question " + "between two or more real choices gives one recommendation and its reason. A request for one " + "act only the person can do (an approval, a credential, a grant, a setting of their own " + "account) says what the act is, what it changes and how to do it, and gives no recommendation.";
36920
+ var ASK_OPTIONS_CONTRACT = "Options carry only the real choices: each is within your rules, and a person could choose " + "it. Add no option that breaks your rules or that no one would choose. Each option has a " + "label, and its description says what that approach costs. A request for one act only the " + "person can do has the two options Done and Can't.";
36921
36921
  var ASK_IS_FOR_A_PERSON = "An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.";
36922
36922
  var ASK_WAITS_ON_THE_ASSIGNEE = "An ask waits on its asked-of person, else the issue's assignee, else the project's default assignee; no agent hands one on.";
36923
36923
  var HUMAN_AGREED_TO_DOCUMENT = "the human has agreed to every point in the document";
@@ -37502,7 +37502,7 @@ var dispatchToolSpecs = [
37502
37502
  }
37503
37503
  ]
37504
37504
  },
37505
- description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. A question about the design an issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, never offer it cut down, and keep an option not to act (Hold). Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
37505
+ description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. Ask for a decision only when two or more choices are real. Where only one is " + "real, make it, and tell the person what you did and why. A question about the design an " + "issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints, " + "and a safer alternative as a fact, never as an option. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, and never offer it cut down. Offer an option not to act (Hold) only where not " + "acting is a real choice and the question names its cost. Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
37506
37506
  arguments: (z) => ({
37507
37507
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
37508
37508
  project: z.string().describe("Project key owning the document.").optional(),
@@ -66848,7 +66848,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
66848
66848
 
66849
66849
  // package.json
66850
66850
  var name2 = "@sjawhar/claude-envoy";
66851
- var version2 = "6.12.0";
66851
+ var version2 = "6.12.1";
66852
66852
  var package_default = {
66853
66853
  name: name2,
66854
66854
  version: version2,
@@ -17720,8 +17720,8 @@ function dispatchToolSchema(spec, z, opts) {
17720
17720
  var ISSUE_REFERENCE = "An issue is a native KEY or external owner/repo#n reference. An external reference addresses an existing Dispatch issue, including one linked to that GitHub pull request; only dispatch issue with --external creates a native issue.";
17721
17721
  var BOARD_NEIGHBOUR_REFUSAL = "The server refuses a key that does not exist, one in another project, this issue itself, an empty value, and a pair the board does not hold in that order.";
17722
17722
  var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is a native KEY or external owner/repo#n reference; a project is a project key such as CORE and addresses an unlinked project document named by artifact.";
17723
- var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. Then give " + "your recommendation and its reason.";
17724
- var ASK_OPTIONS_CONTRACT = "Options carry the genuinely different approaches. Each option has a label, and its description " + "says what that approach costs.";
17723
+ var ASK_QUESTION_CONTRACT = "The question names the concrete case first: which machines, files, sessions or people, and the " + "numbers. It asks the choice in those terms, saying what happens to whom under each option " + '("Ship Friday and risk signing out 1,240 users, or hold to Monday?"), never "How should we ' + 'proceed?" or "Which option?", because a reader cannot work back from a general question to ' + "the case. It carries every fact the reader needs to decide and nothing " + "that does not change the decision. Generalize only after the specifics, if at all. A question " + "between two or more real choices gives one recommendation and its reason. A request for one " + "act only the person can do (an approval, a credential, a grant, a setting of their own " + "account) says what the act is, what it changes and how to do it, and gives no recommendation.";
17724
+ var ASK_OPTIONS_CONTRACT = "Options carry only the real choices: each is within your rules, and a person could choose " + "it. Add no option that breaks your rules or that no one would choose. Each option has a " + "label, and its description says what that approach costs. A request for one act only the " + "person can do has the two options Done and Can't.";
17725
17725
  var ASK_IS_FOR_A_PERSON = "An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.";
17726
17726
  var ASK_WAITS_ON_THE_ASSIGNEE = "An ask waits on its asked-of person, else the issue's assignee, else the project's default assignee; no agent hands one on.";
17727
17727
  var HUMAN_AGREED_TO_DOCUMENT = "the human has agreed to every point in the document";
@@ -18306,7 +18306,7 @@ var dispatchToolSpecs = [
18306
18306
  }
18307
18307
  ]
18308
18308
  },
18309
- description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. A question about the design an issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, never offer it cut down, and keep an option not to act (Hold). Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
18309
+ description: `${ASK_IS_FOR_A_PERSON} ${ASK_WAITS_ON_THE_ASSIGNEE} ` + "Open a to-do or permission only a human can give, or a decision that has no document to " + "live in. Ask for a decision only when two or more choices are real. Where only one is " + "real, make it, and tell the person what you did and why. A question about the design an " + "issue's document records is not this tool: write " + "it into that document as a decision block (dispatch doc-edit inserting an ask block at the " + "end of the section it concerns), at every phase, approved spec or not; the block reaches " + "the Inbox and its answer lands next to its context. Never give an ask an Approve option: a " + "document is approved through dispatch request-approval. Do not use this tool for a status " + "update or discussion; use dispatch message instead. Never create an issue to park a " + "question: the question is an ask on the issue it concerns. " + ASK_QUESTION_CONTRACT + " " + ASK_OPTIONS_CONTRACT + " For an action only a human can perform, state what it changes and risks as constraints, " + "and a safer alternative as a fact, never as an option. " + "Anything that requires a human to do, including a credential or grant renewal, is an ask, " + "never a message. Measure what you can first, and put the measurement and the size of the " + "population it covers in the question; drop an option that cannot fix most of that " + "population, and never offer it cut down. Offer an option not to act (Hold) only where not " + "acting is a real choice and the question names its cost. Set urgency high " + "when your work halts on the answer, and keep working on everything else. " + "Anchor a to-do about a document passage, thread reply_to/reply_to_ask, or cite a dispatch:// " + `reference \u2014 it must be answerable from its own text and anchor alone, never "see above". ` + `A quote anchor is pinned to its block. ${ASK_BOUND_RULE} The lines images appends count ` + `toward that bound, and an ask has at most 8 options. ${RELATED_CHECK_RESULT} ` + `An ask among the related items says whether it is answered, by whom and with which options. ${OWNER_REFERENCE}`,
18310
18310
  arguments: (z) => ({
18311
18311
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
18312
18312
  project: z.string().describe("Project key owning the document.").optional(),
@@ -31,14 +31,14 @@ Your role prompt holds the lifecycle rules, this skill the procedures.
31
31
 
32
32
  1. Read `STRATEGY.md` where the repository has one, and its design principles (`AGENTS.md` here).
33
33
  Find the standard solution (a web search, and how two or three well-regarded projects solve it) and cite it in the spec's `Design`.
34
- Ask a person only what neither settles, with a recommendation.
34
+ Ask a person only what neither settles.
35
35
 
36
36
  2. Where you doubt that a design is the right thing to build, state the problem to `task(agent="design-outsider")` and read its answer with `wait`: it asks whether the thing should exist at all, what the smallest thing that gives the person what they asked for is, and what to delete.
37
37
 
38
38
  3. A root: write and edit the spec as `skill://legion-architect/references/design-gate.md` says, since a new version closes the gate, except two kinds it names.
39
39
  A child: as `skill://legion-architect/references/decomposition.md`, "Creating children", says.
40
40
 
41
- 4. Decompose, adopt, split across repositories or record a wait on outside work as `skill://legion-architect/references/decomposition.md` says.
41
+ 4. Decompose, adopt, split across repositories or record a wait on other work as `skill://legion-architect/references/decomposition.md` says.
42
42
 
43
43
  5. Before you write or give an issue's plan, read `skill://legion-architect/references/plan.md`:
44
44
  a root's plan comes before `register_gate`, a child's before `release_children`, and an issue with none runs the default steps.
@@ -69,7 +69,7 @@ The steps after your acceptance in the task run, then retro, then the merger mer
69
69
  A person's request after your sign-off is a requirement of this issue: the role that holds the phase makes the `request_backward_move`.
70
70
  When the merger reports:
71
71
 
72
- - the issue moved back with `request_backward_move`: its reason says why the fix is a change to the change's own logic that no merge of the base resolves; you start nothing;
72
+ - the issue moved back with `request_backward_move`: you start nothing;
73
73
 
74
74
  - a merge GitHub refuses for a repository setting or an App permission:
75
75
  open a `dispatch ask` naming the pull request, the head and GitHub's refusal, and never bypass a rule;
@@ -1,6 +1,6 @@
1
1
  # Decomposing a tree
2
2
 
3
- Read this before you read a child's handoff, create or adopt children, review a child's spec, split work across repositories, record a wait on outside work, or attach architecture components.
3
+ Read this before you read a child's handoff, create or adopt children, review a child's spec, split work across repositories, record a wait on other work, or attach architecture components.
4
4
 
5
5
  ## Reading the tree
6
6
 
@@ -91,7 +91,7 @@ Your `gh` reads every repository your App is installed on (`-R owner/repo`).
91
91
 
92
92
  ## Recording a wait on other work
93
93
 
94
- When an issue must wait on a sibling or on an issue outside this tree, set its `blocked_by` list as `skill://dispatch`, "Choosing what to work on", says.
94
+ When an issue must wait on a sibling, set its `blocked_by` list as `skill://dispatch`, "Choosing what to work on", says.
95
95
  A blocker's close is its Dispatch issue reaching `done`, not a merge or a deploy: pick a blocker whose close is the fact the issue needs.
96
96
  Legion starts the issue once its blockers close.
97
97
 
@@ -23,7 +23,7 @@ EOF
23
23
 
24
24
  ## A clear defect another role writes to you
25
25
 
26
- A clear defect another role writes to you comes as a Dispatch comment that mentions your role, its first line `Clear defect from <role>` (`skill://legion-architect/SKILL.md`, "Escalation judgment").
26
+ A clear defect another role writes to you comes as a Dispatch comment that mentions your role, its first line `Clear defect from <role>`, or as the controller's reply under one, `Not filed: dispatch://<KEY>; role:<token> is mentioned here` (`skill://legion-architect/SKILL.md`, "Escalation judgment").
27
27
  Carry it in this tree: in an open pull request, or in a child.
28
28
  Reply under its evidence comment with the issue that carries it.
29
29
  It changes the root spec only where it changes the Summary, a requirement, a check or the scope (`skill://legion-architect/references/design-gate.md`, "After approval").
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: legion-controller
3
- description: Use when you are a Legion project's controller session, on its start message or any controller wake, a person's message or mention, a clear defect no tree owns, an architect's escalation, the prioritization pass, a merge hold, an operation of your own work, or the daily report.
3
+ description: Use when you are a Legion project's controller session, on its start message or any controller wake, a person's message or mention, a clear defect, an architect's escalation, the prioritization pass, a merge hold, an operation of your own work, or the daily report.
4
4
  ---
5
5
 
6
6
  # Legion Controller
7
7
 
8
- You are the one persistent, wake-driven session of a Legion project. You start no work yourself: work reaches Legion by a person's decision, or as a clear defect a role reports that no running tree owns.
8
+ You are the one persistent, wake-driven session of a Legion project. You start no work yourself: work reaches Legion by a person's decision, or as a clear defect a role reports.
9
9
 
10
10
  ## Rules
11
11
 
@@ -52,7 +52,7 @@ Every launch opens with a start message, and Envoy keeps no wake sent while no c
52
52
  | `parked-decision` | `skill://legion-controller/references/parked-decisions.md#deciding` |
53
53
  | `held` (it comes only escalated), `update-stalled`, an architect's escalation | `skill://legion-controller/references/escalation.md` |
54
54
  | A finding ask's reference or answer | `skill://legion-controller/references/finding-asks.md` |
55
- | A clear defect no tree owns, which a role writes to you | `skill://legion-controller/references/finding-asks.md#file-a-clear-defect-no-tree-owns` |
55
+ | A clear defect, which a role writes to you | `skill://legion-controller/references/finding-asks.md#file-a-clear-defect` |
56
56
  | A comment that mentions your role and asks for an action on an agent | `skill://legion-controller/references/operations.md#an-action-another-agent-asks-for` |
57
57
  | A scope question, a routing request | `skill://legion-controller/references/backlog-stewardship.md` |
58
58
  | A Slack mention | `skill://legion-controller/references/slack-mentions.md` |
@@ -61,7 +61,7 @@ Every launch opens with a start message, and Envoy keeps no wake sent while no c
61
61
 
62
62
  ## Issues handed to Legion
63
63
 
64
- The daemon works only issues labelled `legion` (any case), and a labelled root in `todo` is admitted. Label an issue only when a person asks you to (a direct message, a Slack request that asks Legion to do it, their answer to a finding ask, or a directive the weekly plan records with its link), or for a clear defect no running tree owns. Never take a person's label off. How: `skill://legion-controller/references/triage.md#label-an-issue-for-a-person`.
64
+ The daemon works only issues labelled `legion` (any case), and a labelled root in `todo` is admitted. Label an issue only when a person asks you to (a direct message, a Slack request that asks Legion to do it, their answer to a finding ask, or a directive the weekly plan records with its link), or for a clear defect you file. Never take a person's label off. How: `skill://legion-controller/references/triage.md#label-an-issue-for-a-person`.
65
65
 
66
66
  ## Free slots
67
67
 
@@ -75,7 +75,7 @@ Only you write the project's merge holds, one line a hold in the Dispatch docume
75
75
 
76
76
  ## Findings, and the issues you file
77
77
 
78
- File an issue only when a person asks you to, for a clear defect no running tree owns, and the report issue. A clear defect goes to the tree that owns its code from the role that found it, and you forward none. Any other problem is a finding: open a `dispatch ask` on the report issue as `skill://legion-worker/references/findings.md` says, and file nothing until a person answers. Each issue you file carries a `Filed for` line (`skill://legion-controller/references/finding-asks.md#the-filed-for-line`).
78
+ File an issue only when a person asks you to, for a clear defect, and the report issue. Any other problem is a finding: open a `dispatch ask` as `skill://legion-worker/references/findings.md` says, and file nothing until a person answers. Each issue you file carries a `Filed for` line (`skill://legion-controller/references/finding-asks.md#the-filed-for-line`).
79
79
 
80
80
  ## Daily report
81
81
 
@@ -29,7 +29,7 @@ A directive is a direct Dispatch message to you: answer it, carry it out, record
29
29
 
30
30
  ## Answering controller deliveries
31
31
 
32
- Read every delivery against live Dispatch and daemon state. You decide labels, `todo`, `backlog`, `icebox` and board order. Answer a scope question from the weekly plan and the deployment instructions. Answer a routing request with the owner the one-owner map names and how to reach it (its role token or session), so the asker writes to it: you forward no message to another session. Never merge or enqueue a pull request, whatever credential you hold: a request to merge one goes to the architect of the tree that owns it (`skill://legion-controller/references/operations.md#a-request-to-another-session`).
32
+ Read every delivery against live Dispatch and daemon state. You decide labels, `todo`, `backlog`, `icebox` and board order. Answer a scope question from the weekly plan and the deployment instructions. Answer a routing request with the owner the one-owner map names and how to reach it (its role token or session), so the asker writes to it: you forward no message to another session. Never merge or enqueue a pull request, whatever credential you hold: a request to merge one goes to the architect of its tree (`skill://legion-controller/references/operations.md#a-request-to-another-session`).
33
33
 
34
34
  ## The owner audit
35
35
 
@@ -53,6 +53,6 @@ Only work that a person's directive, recorded in the plan with its link, moves t
53
53
  A labelled root the daemon queued or runs, which the weekly plan says to defer, is parked at your next pass only when the plan's line names a person's request: `set_status` to `backlog` (`icebox` for longer), citing that request in a comment. A plan row with no such request moves nothing; ask instead:
54
54
 
55
55
  1. Find your earlier ask: step 1 of `skill://legion-controller/references/park-asks.md`, with `Asked whether to defer: ` for `Asked whether to park: `, its second line the plan row. Open or resolved with no answer, or your reply starts `Deferred` or `Let run`: do nothing. Answered with no reply of yours: step 4. Your reply starts `Not deferred`: go on to step 2.
56
- 2. Check that Legion runs the root: it carries the label, stands in `admission.active` or `admission.waiting`, and its `phase` is not `done`. If not, do nothing. Else open a `dispatch ask` on the report issue naming the root and the plan row, options `Defer it` and `Let it run`, follow it, and comment on the root: first line `Asked whether to defer: dispatch://<REPORT KEY>/ask/<id>`, second line the plan row exactly.
56
+ 2. Check that Legion runs the root: it carries the label, stands in `admission.active` or `admission.waiting`, and its `phase` is not `done`. If not, do nothing. Else open a `dispatch ask` naming the root and the plan row, options `Defer it` and `Let it run`, follow it, and comment on the root: first line `Asked whether to defer: dispatch://<ASK KEY>/ask/<id>`, second line the plan row exactly.
57
57
  3. Name the row and the ask in the day's report while it is open.
58
- 4. On `Defer it` while step 2's check holds, park the root as above, citing the answer. On `Let it run`, move nothing and take the deferral off that plan row with `dispatch doc-edit`. Reply under the ask, first line exactly `Deferred dispatch://<root>`, `Not deferred dispatch://<root>` or `Let run dispatch://<root>` (`dispatch comment --issue <REPORT KEY> --reply-to-ask '<ask id>' --body-file -`).
58
+ 4. On `Defer it` while step 2's check holds, park the root as above, citing the answer. On `Let it run`, move nothing and take the deferral off that plan row with `dispatch doc-edit`. Reply under the ask, first line exactly `Deferred dispatch://<root>`, `Not deferred dispatch://<root>` or `Let run dispatch://<root>` (`dispatch comment --issue <the ask's issue> --reply-to-ask '<ask id>' --body-file -`).
@@ -23,7 +23,7 @@ Skip a pair the issues already settle: one closed as a duplicate of the other, o
23
23
 
24
24
  Ask each agent also, for each issue of its shard changed in the last 24 hours that fails, what it fails on (the broken tool, check, rule or component), its evidence, and the records read. Shard the issues closed in that time too (`dispatch issues --project <PROJECT> --status done --updated-since "$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)" --all`). Group the issues that fail for one cause yourself, and keep a group of three or more whose issues each need their own change; a group one fix clears is a set of duplicates.
25
25
 
26
- Root each cause once: comment its evidence on the open issue that tracks it; else write it to the architect of the running tree that owns the code, as `skill://legion-worker/references/findings.md#write-to-the-owner` says; else post its evidence on the report issue with `controller` as the role and take it as `skill://legion-controller/references/finding-asks.md#file-a-clear-defect-no-tree-owns` says. Comment the result on each issue of the group, and close none of them.
26
+ Root each cause once: comment its evidence on the open issue that tracks it; else post its evidence on the report issue with `controller` as the role and take it as `skill://legion-controller/references/finding-asks.md#file-a-clear-defect` says. Comment the result on each issue of the group, and close none of them.
27
27
 
28
28
  ## The record
29
29
 
@@ -1,39 +1,28 @@
1
1
  # Daily report
2
2
 
3
- Read this on your first turn of each UTC day, and when you open, follow or answer a finding ask: the report issue holds them all.
3
+ Read this on your first turn of each UTC day.
4
4
 
5
5
  ## Find the report issue
6
6
 
7
7
  Use the issue the deployment instructions name for Legion's reports, else the project's `Legion daily report` (`dispatch search --query '"Legion daily report"' --project <PROJECT>`).
8
8
  When none exists, create it once, the one issue you file unasked, and park it in `icebox`: it holds no work and never carries the `legion` label.
9
- Assign it to the person who answers for the project (the deployment instructions name them, else the owner `dispatch whoami` names), because its asks reach that person's Inbox;
9
+ Assign it to the person who answers for the project (the deployment instructions name them, else the owner `dispatch whoami` names);
10
10
  with nobody known, leave out `--assignee`.
11
11
 
12
12
  ```text
13
13
  dispatch issue --project <PROJECT> --title 'Legion daily report' --assignee '<email>' --spec-file - <<'EOF'
14
14
  ## Summary
15
15
 
16
- Legion's controller posts one message here each day: what Legion finished, what it closed without a change and why, and what is running. Legion's agents also post here the evidence of each clear defect they found that no tree owns, which the controller files for Legion. They ask here whether a problem that needs a decision needs an issue. This issue is not work, so it carries no `legion` label and stays in icebox.
16
+ Legion's controller posts one message here each day: what Legion finished, what it closed without a change and why, and what is running. Legion's agents also post here the evidence of each clear defect they found, which the controller files for Legion. This issue is not work, so it carries no `legion` label and stays in icebox.
17
17
  EOF
18
18
  legion({ op: "set_status", issue: "<report KEY>", status: "icebox" })
19
19
  ```
20
20
 
21
- ## Keep it answerable
22
-
23
- Each time you read it:
24
-
25
- - `Status: done`: the close withdrew its open asks, and Dispatch refuses new ones.
26
- Reopen it with `set_status` to `icebox` and say so in the day's report.
27
-
28
- - `Assignee: unassigned` with a person known: `dispatch issue-update --issue <REPORT KEY> --assignee <email>`.
29
- A refusal (`400 ASSIGNEE_NOT_ALLOWED` names an email nobody has signed in to Dispatch with) leaves it as it was: name it in your summary.
30
-
31
- - While it is unassigned, open each report with one sentence asking a person to take the issue from its header:
32
- until someone does, its asks go to the project's default assignee.
33
-
34
21
  ## When
35
22
 
36
- After the turn's own work, read the report issue, keep it answerable, and post when its `Events:` show no `message.created` from today.
23
+ After the turn's own work, read the report issue.
24
+ When it reads `Status: done`, reopen it with `set_status` to `icebox` and say so in the day's report.
25
+ Post when its `Events:` show no `message.created` from today.
37
26
 
38
27
  ## What
39
28
 
@@ -17,7 +17,7 @@ The architect decided against its own retry, so the issue stays at `phase: held`
17
17
 
18
18
  ## A child that looks independent
19
19
 
20
- Check the child and its parent in `read_state` and Dispatch. When it still looks independent, open an ask on the report issue naming the child, why, and the root you would file, with the options `File an issue`, `File it for Legion` and `Do not file`. Never label a child or cut its `child_of` link: that admits it as a root while its tree still records it. Only on a person's yes:
20
+ Check the child and its parent in `read_state` and Dispatch. When it still looks independent, open an ask naming the child, why, and the root you would file, with the options `File an issue`, `File it for Legion` and `Do not file`. Never label a child or cut its `child_of` link: that admits it as a root while its tree still records it. Only on a person's yes:
21
21
 
22
22
  1. File the root with no `--parent`: `dispatch issue --project <PROJECT> --title '<title>' --spec-file -`, its spec citing the ask and carrying its `Filed for` line, with `--label legion` only when the answer asks Legion to run it. `<PROJECT>` is the issue key's prefix (`daemon.project`), not the lowercase token in role names.
23
23
  2. Park the child (`set_status` to `icebox`), with a comment naming the new root and the person's answer.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Read this when `skill://legion-controller/references/finding-asks.md` sends you here; that file states the rule each section here carries out.
4
4
 
5
- ## File a clear defect no tree owns
5
+ ## File a clear defect
6
6
 
7
7
  Every reply under the evidence mentions the finder's role, the token after `Clear defect from ` (leave out `--mention` when it is `controller`):
8
8
 
@@ -11,9 +11,9 @@ dispatch comment --issue '<the evidence's issue>' --reply-to '<comment id>' --me
11
11
  ```
12
12
 
13
13
  1. Check it is clear: the fix needs no choice a person must make, in a repository both role GitHub Apps are installed on. Otherwise reply `Not filed: <the choice, or the repository the Apps miss>` and open nothing: the finder opens its ask.
14
- 2. Search first (`skill://dispatch-first`). When an open issue tracks it and a live tree owns that issue (its record's `tree`), file nothing and reply `Not filed: tracked by dispatch://<KEY>; write to role:<that tree's architect's token>`. When no running tree owns that issue, comment the evidence there and reply `Filed dispatch://<KEY>`.
15
- 3. When a live tree's repository and component match (the live trees: `skill://legion-controller/references/admission.md`), file nothing and reply `Not filed: dispatch://<ROOT> owns it; write to role:<its architect's token>`. Build each token as `skill://legion-controller/references/operations.md#a-request-to-another-session` says.
16
- 4. No running tree owns it: file it where the fix belongs, in the project that repository maps to, or in your own project when Dispatch maps it to none:
14
+ 2. Search first (`skill://dispatch-first`). When an open issue tracks it and a live tree owns that issue (its record's `tree`), file nothing and reply `Not filed: dispatch://<KEY>; role:<token> is mentioned here`, adding `--mention 'role:<that tree's architect's token>'`: it reads the evidence here. When that issue is in no running tree, comment the evidence there and reply `Filed dispatch://<KEY>`.
15
+ 3. When a live tree's open pull request changes the files the fix touches (the live trees: `skill://legion-controller/references/admission.md`), file nothing and reply the same way, with its root for `<KEY>`. Build each token as `skill://legion-controller/references/operations.md#a-request-to-another-session` says.
16
+ 4. Otherwise file it where the fix belongs, in the project that repository maps to, or in your own project when Dispatch maps it to none:
17
17
  `dispatch issue --project <KEY> --repo <owner/name> --title '<the defect>' --label legion --spec-file -`
18
18
  The spec states the defect, where the fix belongs and the fix, and ends with the `Filed for Legion from` line.
19
19
  5. Reply `Filed dispatch://<NEW KEY>`.
@@ -1,19 +1,20 @@
1
1
  # Finding asks
2
2
 
3
- Read this for a clear defect no tree owns, a finding ask's reference, an answer on an ask you follow, an issue a person asks you to file, and at every start.
3
+ Read this for a clear defect, a finding ask's reference, an answer on an ask you follow, an issue a person asks you to file, and at every start.
4
4
 
5
5
  ## The `Filed for` line
6
6
 
7
7
  Every issue you file carries one line in its spec, which triage reads to tell your filing from another's label:
8
8
 
9
- - for a person: `Filed for <person> at their request: <request>`. The request is `dispatch://<REPORT KEY>/ask/<id>` for who answered it; `Slack <channel_id> message <ts>` for the mention's `<@user_id>` (`…, adopting message <earlier ts>` when the mention asks for an earlier message's request); or `direct message <id>`, the id its frame's `reply_with` names after `--in-reply-to` (for a message that came as your own user turn, `direct message to session <your session id>`).
10
- - for a clear defect no running tree owns: `Filed for Legion from <role> on <issue>: <evidence reference>`.
9
+ - for a person: `Filed for <person> at their request: <request>`. The request is `dispatch://<ASK KEY>/ask/<id>` for who answered it; `Slack <channel_id> message <ts>` for the mention's `<@user_id>` (`…, adopting message <earlier ts>` when the mention asks for an earlier message's request); or `direct message <id>`, the id its frame's `reply_with` names after `--in-reply-to` (for a message that came as your own user turn, `direct message to session <your session id>`).
10
+ - for a clear defect: `Filed for Legion from <role> on <issue>: <evidence reference>`.
11
11
 
12
- ## File a clear defect no tree owns
12
+ ## File a clear defect
13
13
 
14
- A role writes a clear defect to you only when it found no tree that owns the code: a comment that mentions your role, on the report issue or on its own issue, first line `Clear defect from <role>`. A clear defect you find yourself goes to its owner as `findings.md` says, and you forward none; when no tree owns it, post its evidence on the report issue with `controller` as the role.
15
- File it only when it is clear, in a repository both role GitHub Apps are installed on, no open issue tracks it (an open issue that no live tree owns gets the evidence as a comment, and the reply `Filed dispatch://<KEY>`), and no live tree's repository and component match. Otherwise file nothing and reply under its evidence, mentioning the finder: `Not filed:` with the owner the finder writes to itself, or the reason the finder opens its ask.
16
- The reply's form and the five steps are in `skill://legion-controller/references/finding-asks-steps.md#file-a-clear-defect-no-tree-owns`: read them before every such defect.
14
+ A role writes a clear defect to you: a comment that mentions your role, on the report issue or on its own issue, first line `Clear defect from <role>`. For a clear defect you find yourself, post its evidence on the report issue with `controller` as the role.
15
+ A defect that stops its sender's work, in a repository the sender's token reaches, is the sender's to fix, unless an issue that tracks it is claimed, `in_progress` and its holder said on Envoy that it works on it now: reply `Not filed: it stops your work, so it is yours to fix`, and take none of the steps.
16
+ File any other only when it is clear, in a repository both role GitHub Apps are installed on, no open issue tracks it (an open issue that no live tree owns gets the evidence as a comment, and the reply `Filed dispatch://<KEY>`), and no live tree's open pull request changes the files the fix touches. Otherwise file nothing and reply under its evidence, mentioning the finder: `Not filed:` with a mention of the live tree's architect, or with the reason the finder opens its ask.
17
+ The reply's form and the five steps are in `skill://legion-controller/references/finding-asks-steps.md#file-a-clear-defect`: read them before every such defect.
17
18
 
18
19
  ## Follow it
19
20
 
@@ -24,7 +25,7 @@ A finding ask another role opened reaches you as `dispatch://<KEY>/ask/<id>`. Fo
24
25
  A park ask's answer goes to `skill://legion-controller/references/park-asks.md` step 4, a deferral ask's to `skill://legion-controller/references/backlog-stewardship.md#a-root-the-plan-defers` step 4. For any other, `dispatch read --ref` it and act on the newest answer; when its typed text asks for another of these three than the option selected, do what the text asks, and when it asks for none of them, reply with your question and file nothing:
25
26
 
26
27
  - `Do not file`: file nothing.
27
- - `File an issue`: `dispatch issue --project <PROJECT> --title '<the problem>' --spec-file -` in the project where the fix belongs (this one when the answer names none). The spec states the problem and where the fix belongs, cites the ask and its evidence, and carries `Filed for <the answer's By:> at their request: dispatch://<REPORT KEY>/ask/<id>`.
28
+ - `File an issue`: `dispatch issue --project <PROJECT> --title '<the problem>' --spec-file -` in the project where the fix belongs (this one when the answer names none). The spec states the problem and where the fix belongs, cites the ask and its evidence, and carries `Filed for <the answer's By:> at their request: dispatch://<ASK KEY>/ask/<id>`.
28
29
  - `File it for Legion`: the same, with `--label legion`; its triage wake brings it back.
29
30
 
30
31
  An ask that re-files an escalated child also takes the steps of `skill://legion-controller/references/escalation.md#a-child-that-looks-independent`.
@@ -35,22 +36,22 @@ Then reply under the ask, first line exactly `Filed dispatch://<NEW KEY>` or `No
35
36
 
36
37
  Nothing wakes on or follows an ask while no controller runs, so at every start:
37
38
 
38
- 1. `dispatch read` the report issue (none yet: nothing to catch up). Reopen and assign it as `skill://legion-controller/references/daily-report.md` "Keep it answerable" says.
39
- 2. `dispatch open-asks --project <PROJECT>` lists every open ask; it lists no ask on a closed issue. Follow those on the report issue. On another issue, a question opening `Finding from ` is a role's own-issue ask: move it to the report issue with the same question, options and `--ref`, reply `Moved dispatch://<REPORT KEY>/ask/<new id>` under the old one, and resolve it.
40
- 3. List the answered asks still waiting on you, for the report issue and then each issue of one snapshot of `dispatch issues --project <PROJECT> --status needs_review --all` (never paged):
39
+ 1. `dispatch read` the report issue (none yet: skip step 4), and reopen it as `skill://legion-controller/references/daily-report.md` "When" says.
40
+ 2. `dispatch open-asks --project <PROJECT>` lists every open ask; it lists no ask on a closed issue. Follow each whose question opens `Finding from `, and each whose options hold a label step 3's filter names.
41
+ 3. List the answered asks still waiting on you, on the report issue, each issue `read_state` records, and each issue of one snapshot of `dispatch issues --project <PROJECT> --status triage --all` and of `dispatch issues --project <PROJECT> --status needs_review --all` (never paged):
41
42
 
42
43
  ```text
43
44
  asks=$(dispatch api --path '/api/v1/issues/<ISSUE KEY>/asks?state=answered&thread=1') || { printf 'Dispatch read failed: %s\n' "$asks" >&2; exit 1; }
44
45
  printf '%s' "$asks" | jq -cn 'input | if type == "array" then [.[] | select(any(.options[]; .label == "Do not file" or .label == "Admit it" or .label == "Park it" or .label == "Leave it admitted" or .label == "Defer it" or .label == "Let it run")) | .answer.at as $t | select([.thread.replies[]? | select(.author.kind == "session" and .created_at > $t and (.body | test("^(Filed dispatch://|Handed dispatch://|Admitted dispatch://|Not filed:|Not admitted:|Parked dispatch://|Not parked dispatch://|Left admitted dispatch://|Deferred dispatch://|Not deferred dispatch://|Let run dispatch://)")))] | length == 0) | {id, question, answer}] else error("Dispatch did not answer the list") end'
45
46
  ```
46
47
 
47
- Exit 0 with `[]` is nothing waiting; anything else is a failed read. Act on each as above, a triage ask as `skill://legion-controller/references/triage.md` says, and a `Hand it to the owning tree` answer as step 5 says.
48
+ Exit 0 with `[]` is nothing waiting; anything else is a failed read. Act on each as above, a triage ask as `skill://legion-controller/references/triage.md` says, and an answer whose label starts `Hand it` as step 5 says.
48
49
  4. List the clear defects nobody took yet:
49
50
 
50
51
  ```text
51
52
  notes=$(dispatch api --path '/api/v1/issues/<REPORT KEY>/comments') || { printf 'Dispatch read failed: %s\n' "$notes" >&2; exit 1; }
52
- printf '%s' "$notes" | jq -cn 'input | if type == "array" then (. as $all | [.[] | select(.reply_to == null and (.body | startswith("Clear defect from "))) | .id as $id | select([$all[] | select(.reply_to == $id and .author.kind == "session" and (.body | test("^(Handed dispatch://|Filed dispatch://|Not filed:|Asked dispatch://)")))] | length == 0) | {id, body}]) else error("Dispatch did not answer the list") end'
53
+ printf '%s' "$notes" | jq -cn 'input | if type == "array" then (. as $all | [.[] | select(.reply_to == null and (.body | startswith("Clear defect from "))) | .id as $id | select([$all[] | select(.reply_to == $id and .author.kind == "session" and (.body | test("^(Handed dispatch://|Filed dispatch://|Not filed:|Asked dispatch://|Moved dispatch://)")))] | length == 0) | {id, body}]) else error("Dispatch did not answer the list") end'
53
54
  ```
54
55
 
55
- Take each as [File a clear defect no tree owns](#file-a-clear-defect-no-tree-owns) says.
56
- 5. Take each ask earlier rules opened whose question opens `Clear defect from ` the same way, with `--reply-to-ask '<ask id>'` for `--reply-to`: an open one (step 2 lists it), resolved once it has your reply, and one answered `Hand it to the owning tree`, a person's request: where step 2 or 3 of *File a clear defect no tree owns* finds a live tree, reply `Not filed: dispatch://<KEY> owns it; role:<token> is mentioned here` (`<KEY>` the issue or root), adding `--mention 'role:<its architect's token>'`: it reads the answer and evidence here; copy neither. If step 2's issue is in no tree, reply `Not filed: dispatch://<KEY> tracks it; no tree owns it` to its person, mentioning no finder.
56
+ Take each as [File a clear defect](#file-a-clear-defect) says.
57
+ 5. Take each ask earlier rules opened whose question opens `Clear defect from ` the same way, with `--reply-to-ask '<ask id>'` for `--reply-to`: an open one (step 2 lists it), resolved once it has your reply, and one answered with a label that starts `Hand it`, a person's request: where step 2 or 3 of *File a clear defect* finds a live tree, reply `Not filed: dispatch://<KEY>; role:<token> is mentioned here` (`<KEY>` the issue or root), adding `--mention 'role:<its architect's token>'`: it reads the answer and evidence here; copy neither. If step 2's issue is in no tree, reply `Not filed: dispatch://<KEY> tracks it` to its person, mentioning no finder.
@@ -11,7 +11,7 @@ Read this when `skill://legion-controller/references/operations.md` sends you he
11
11
  ## A re-run of a CI run
12
12
 
13
13
  1. Read the failed job's log: `gh run view <id> --log-failed --repo <owner>/<repo>`. Re-run only the failed jobs, and only for an infrastructure failure the log shows, such as a lost runner. Never re-run to test a theory, or on a head a run already tested with the same inputs.
14
- 2. A test that failed and passed on the same code is flaky: write it to the tree whose code it is by a mention (`skill://legion-worker/references/findings.md#write-to-the-owner`), to be fixed at its cause.
14
+ 2. A test that failed and passed on the same code is flaky: write it to the tree whose run it failed by a mention (`skill://legion-worker/references/findings.md#write-by-a-mention`), to be fixed at its cause.
15
15
  3. Re-run with that token, and name in `--reason` the run, the failure and the issue key:
16
16
 
17
17
  ```sh
@@ -22,7 +22,7 @@ Read this when `skill://legion-controller/references/operations.md` sends you he
22
22
 
23
23
  ## An agent the operator holds
24
24
 
25
- 1. Open a `dispatch ask` on the report issue that names the claim, quotes the refusal and says why its agent needs `<op>`, with the options `Resume it: the operator resumes the agent with legion claims resume, and I then run <op> on it` and `Keep it held: <what stays as it is>`.
25
+ 1. Open a `dispatch ask` that names the claim, quotes the refusal and says why its agent needs `<op>`, with the options `Resume it: the operator resumes the agent with legion claims resume, and I then run <op> on it` and `Keep it held: <what stays as it is>`.
26
26
  2. Send no Envoy message to the session that holds the operator's token, and ask no other session to lift the hold.
27
27
  3. Name the ask in your summary, and in the day's report while it is open.
28
28
  4. On `Resume it`, run `<op>` again; on a second 409, reply under the ask with the refusal, and run it again at the next reply. On `Keep it held`, run nothing.
@@ -37,7 +37,7 @@ Restart it only when a person asks, your deployment instructions name the case,
37
37
  1. `kubectl -n <namespace> get pods -l '<daemon label>' -o wide` lists one pod: note its name. With no pod or several, delete nothing and name it in the day's report.
38
38
  2. `kubectl -n <namespace> delete pod -l '<daemon label>'`. The daemon's Deployment makes a new pod.
39
39
  3. Read again each minute until a new pod reads `Running` with every container ready, or five minutes pass.
40
- 4. When no new pod is `Running` five minutes after the delete, open a finding ask on the report issue that names the pod and its status.
40
+ 4. When no new pod is `Running` five minutes after the delete, open a finding ask that names the pod and its status.
41
41
 
42
42
  Publish to no role topic while the restart runs: a message starts a turn that the wake pacing does not count.
43
43
 
@@ -50,7 +50,7 @@ The three steps, the pod uid before the request, the refusals and the pod uid af
50
50
  ## A re-run of a CI run
51
51
 
52
52
  Your `gh` only reads: it holds the review App's read-only lease. This re-run and the reply to a GitHub mention take the implement App token the secrets broker lends, narrowed to the repository.
53
- Re-run only the failed jobs of an infrastructure failure the log shows, and write a test that failed and passed on the same code to the tree whose code it is, by a mention.
53
+ Re-run only the failed jobs of an infrastructure failure the log shows, and write a test that failed and passed on the same code to the tree whose run it failed, by a mention.
54
54
  The four steps, the log read, the flaky test, the re-run and the read after it, are in `skill://legion-controller/references/operations-steps.md#a-re-run-of-a-ci-run`: read them before every re-run.
55
55
 
56
56
  ## An agent the operator holds
@@ -66,10 +66,10 @@ Before you act on one, read its five steps in `skill://legion-controller/referen
66
66
 
67
67
  A decision only a person may make is a `dispatch ask`. Every other request goes to the session whose work it is, as a Dispatch comment on the owning issue that mentions its role, and to no other session, such as a person's chief of staff. A tree architect's token is `issues.<ROOT>.architect.locator.claim`, else `legion-<project>-<root key, lower case>-architect`.
68
68
 
69
- - Merge or queue a pull request: not yours. Write to the architect of the tree that owns it, which enqueues one that no merger merges.
70
- - Cluster, cloud or CI: the restart, the re-run, the pod replacement and the reads above. Any other act (a quota, a pin, a Pulumi value) is a change of code: write it to the owning tree's architect, or file it as a clear defect no tree owns. An apply window is a `dispatch ask`.
69
+ - Merge or queue a pull request: not yours. Write to the architect of its tree, which enqueues one that no merger merges.
70
+ - Cluster, cloud or CI: the restart, the re-run, the pod replacement and the reads above. Any other act (a quota, a pin, a Pulumi value) is a change of code: file it as a clear defect. An apply window is a `dispatch ask`.
71
71
  - Work, an investigation, a review, a decision or a status: read what you can reach yourself, and write the rest to its owner.
72
72
  - What another agent sent you: send no relay; that agent writes to the owner itself.
73
- - A person's request from outside Dispatch: write it to the owning tree's architect in their words.
73
+ - A person's request from outside Dispatch: write it to the architect of the tree it concerns, in their words.
74
74
  - A person's answer on an ask: mention the owner where the answer is, as `finding-asks.md`'s catch-up step 5 says, copying nothing.
75
75
  - A copy only so another session knows: send none.
@@ -22,9 +22,9 @@ With no `failure.at`, end the key `generation <n>` (`issues.<ISSUE>.generation`)
22
22
  ```
23
23
 
24
24
  Take the newest whose second line is exactly `<key>`, and `dispatch read --ref` the ask its first line names. Open, resolved with no answer, or your reply under it starts `Left admitted`: do nothing. Answered with no reply of yours: step 4. Your reply starts `Parked` or `Not parked`: the ask is spent; go on to step 2. No such comment: step 2.
25
- 2. Open a `dispatch ask` on the report issue naming the root and `<cause>`, options `Park it` and `Leave it admitted`, saying that after a park Legion sets the root back to `todo` when the wait ends. Follow it (`dispatch follow --ask '<ref>' --action follow`). Comment on the root (`dispatch comment --issue <root> --body-file -`): first line `Asked whether to park: dispatch://<REPORT KEY>/ask/<id>`, second line `<key>`, then `<cause>`.
25
+ 2. Open a `dispatch ask` naming the root and `<cause>`, options `Park it` and `Leave it admitted`, saying that after a park Legion sets the root back to `todo` when the wait ends. Follow it (`dispatch follow --ask '<ref>' --action follow`). Comment on the root (`dispatch comment --issue <root> --body-file -`): first line `Asked whether to park: dispatch://<ASK KEY>/ask/<id>`, second line `<key>`, then `<cause>`.
26
26
  3. Name the tree and the ask in the day's report while it is open.
27
- 4. On `Park it`, while the root's `phase` is not `done` and `read_state` still builds the same `<key>`: park the tree, with a comment citing the answer whose first line is `Parked by Legion while it waits on: <cause>`, the mark that makes the park your own hold. Otherwise, or on `Leave it admitted`, move nothing. Then reply under the ask, first line exactly `Parked dispatch://<root>`, `Not parked dispatch://<root>` or `Left admitted dispatch://<root>` (`dispatch comment --issue <REPORT KEY> --reply-to-ask '<ask id>' --body-file -`). Dispatch cannot resolve an answered ask, so that reply is its record.
27
+ 4. On `Park it`, while the root's `phase` is not `done` and `read_state` still builds the same `<key>`: park the tree, with a comment citing the answer whose first line is `Parked by Legion while it waits on: <cause>`, the mark that makes the park your own hold. Otherwise, or on `Leave it admitted`, move nothing. Then reply under the ask, first line exactly `Parked dispatch://<root>`, `Not parked dispatch://<root>` or `Left admitted dispatch://<root>` (`dispatch comment --issue <the ask's issue> --reply-to-ask '<ask id>' --body-file -`). Dispatch cannot resolve an answered ask, so that reply is its record.
28
28
 
29
29
  Set a root parked with that mark back to `todo` once its cause is gone or its event has happened, with a comment on the root citing the mark and what you checked; or when a person asks, or a person's decision after the park gives it a next step (`skill://legion-controller/references/parked-decisions.md`).
30
30
 
@@ -16,7 +16,7 @@ Read this on a `triage` wake, at every start, and when a person hands you an iss
16
16
  2. Find who set the label: read `/api/v1/issues/<issue>/events?limit=200` with the `dispatch api` of `skill://legion-controller/references/session.md` ("Reading Dispatch's API"), oldest first; while a page holds 200 events, read the next with `&after=<the last event's seq>`. The setter is the `actor` of the newest `issue.created` or `issue.updated` event whose `payload.labels` holds `legion` (any case) where the previous such event held none.
17
17
  - `actor.kind` is `user`: the daemon queues the root itself. Do nothing more.
18
18
  - Your own filing hands it over: its spec as filed (`dispatch doc-read --issue <issue> --version 1`) holds a `Filed for` line, and the actor is this session (`dispatch whoami`) or an earlier one of yours, which is one whose reply `Filed dispatch://<this KEY>` stands under the ask or evidence that line names. Where that line names an ask, the reply counts only when it follows a newest answer of `File it for Legion` on that ask.
19
- - Any other actor hands over nothing. Leave the issue in `triage` and open an ask on the report issue naming it and who labelled it, options `Admit it` and `Leave it`. Reply under it `Admitted dispatch://<KEY>` or `Not admitted: <reason>`.
19
+ - Any other actor hands over nothing. Leave the issue in `triage` and open an ask naming it and who labelled it, options `Admit it` and `Leave it`. Reply under it `Admitted dispatch://<KEY>` or `Not admitted: <reason>`.
20
20
  3. Admit it (`set_status` to `todo`) only when you labelled it at a person's request, filed it yourself, or a person answered `Admit it`, unless a person's request says to wait or puts it out of scope. The deployment instructions are such a request; a line of your weekly plan is one only when it names the person's request behind it.
21
21
  4. When a person's request says to wait, park it (`backlog`, or `icebox` for a longer wait); its label stays. Never park a root for lack of a free slot: in `todo` the waiting line holds it.
22
22
  5. Comment on each root you admitted or parked what you decided and why, citing the request or reason behind a park. For one you admitted, say who gets its questions: `Assigned to <login>, who will get this tree's questions and its design approval`, or, with `Assignee: unassigned`, `Unassigned — this tree's questions and its design approval go to the project's default assignee until someone takes it from the issue header (Assignee, beside Priority)`. Leave out "and its design approval" when your system prompt reads `Design gate steps: none.`
@@ -36,7 +36,7 @@ path under its front-matter `supersedes:` key, use that file instead; if one has
36
36
  A `docs/solutions/` page that sends the controller a defect, a flake, a notice, a pull request to
37
37
  queue or a READY is older than the skills: `skill://legion-worker/references/findings.md` replaces
38
38
  its routing of a finding, and `skill://legion-architect/references/operations.md` its merge-queue
39
- steps. A finder fixes a defect or writes it to its owner, and the controller queues no pull
39
+ steps. A finder fixes a defect, and the controller queues no pull
40
40
  request: the architect of its tree enqueues one that no merger merges.
41
41
 
42
42
  ## Output
@@ -6,8 +6,6 @@ Read it when GitHub reports the pull request `CONFLICTING`, the daemon's merge-f
6
6
 
7
7
  The implementer merges the base into the issue branch only when GitHub reports it `CONFLICTING`, the daemon's merge-forward message asks it (*The daemon's ask*, below), its own architect asks because of a conflict another tree reported, the change needs something only the base has, or the pull request was retargeted. Past the review the merger merges the base forward when it merges, for a conflict or for a check the base's newer code breaks (its role prompt, "A head that conflicts with its base"), so the implementer merges then only when the daemon's merge-forward message or the merger asks it. Never to refresh CI or pick up the default branch: each merge is a new head that reruns CI and can void a review. Never with `jj rebase`, which rewrites pushed commits (*A wrong pushed commit*, below).
8
8
 
9
- Before you race another tree's pull request on shared files, `envoy_publish` to its implementer's role topic, ask when its next push lands, and merge once, after it.
10
-
11
9
  1. Merge the bookmark, never `@`, with the base, in one new commit. `base` is the pull request's base branch, JSON-quoted so jj reads it as a string literal:
12
10
 
13
11
  ```bash
@@ -2,20 +2,20 @@
2
2
 
3
3
  Read this when `skill://legion-worker/references/findings.md` sends you here for a route's steps; that file states the rule each section here carries out.
4
4
 
5
- ## Write to the owner
5
+ ## Write by a mention
6
6
 
7
- 1. Find the owning issue: the issue of an open pull request on a `legion/<KEY>` branch that changes that code, or the open issue `dispatch search` finds for it.
7
+ 1. Find the issue: the issue of an open pull request on a `legion/<KEY>` branch that changes that code, or the open issue `dispatch search` finds for it.
8
8
  2. Walk its `child_of` links up to the tree's root: `dispatch read --issue <KEY>` names each parent under `Links:`.
9
- 3. Post the evidence on the owning issue, and mention the root's architect. `<project>` is the Legion project that runs the tree; for your own project it is the word after `legion-` in your role token.
9
+ 3. Post the evidence on that issue, and mention the root's architect. `<project>` is the Legion project that runs the tree; for your own project it is the word after `legion-` in your role token.
10
10
 
11
11
  ```bash
12
- dispatch comment --issue '<owning KEY>' --mention 'role:legion-<project>-<root key, lower case>-architect' --body-file - <<'EOF'
12
+ dispatch comment --issue '<THAT KEY>' --mention 'role:legion-<project>-<root key, lower case>-architect' --body-file - <<'EOF'
13
13
  Clear defect from <your role token>
14
14
  <what went wrong, where and to whom, with the numbers; dispatch://<KEY> it came from; the repository and component; the fix; why you do not make it yourself>
15
15
  EOF
16
16
  ```
17
17
 
18
- When no tree owns the code, post the same comment on that project's report issue (`skill://legion-worker/references/findings.md#where-it-goes`; a closed one takes a comment too, and with none, your own issue), with `--mention 'role:legion-<project>-controller'`. The controller replies under it and mentions your role. `Filed dispatch://<KEY>` names the issue it filed. On `Not filed: dispatch://<ROOT> owns it; write to role:<token>` or `Not filed: tracked by dispatch://<KEY>; write to role:<token>`, write the same comment on the issue it names, mentioning that role. On `Not filed: dispatch://<KEY> owns it; role:<token> is mentioned here`, the owner has it: write nothing. On any other `Not filed:` reply, open the ask yourself (`skill://legion-worker/references/findings.md`, step 3 of its first section).
18
+ For the controller, post the same comment on that project's report issue (the issue the deployment instructions name for Legion's reports, else the project's `Legion daily report`; a closed one takes a comment too, and with none, your own issue), with `--mention 'role:legion-<project>-controller'`. The controller replies under it and mentions your role. `Filed dispatch://<KEY>` names the issue it filed. On `Not filed: dispatch://<KEY>; role:<token> is mentioned here`, write nothing. On `Not filed: it stops your work, so it is yours to fix`, fix it. On any other `Not filed:` reply, open the ask yourself (`skill://legion-worker/references/findings.md`, step 3 of its first section).
19
19
 
20
20
  Apart from that reply, file nothing and wait for nothing. A production check's result names your comment, `dispatch://<KEY>/comment/<id>`.
21
21
 
@@ -2,40 +2,31 @@
2
2
 
3
3
  Read it when you find a problem your issue does not cover (a defect in another component, repository or tool, a gap in Legion itself), when another agent needs an action, or when a production check look fails. It holds for every Legion role and its subagents, and replaces the filing step of `skill://dispatch-first`. A child's own architect opens no ask itself: it sends the finding to the architect above it, and the root's architect opens the ask.
4
4
 
5
- ## Fix it yourself, else write to its owner, and ask only for a decision
5
+ ## Fix it yourself, else write to the controller, and ask only for a decision
6
6
 
7
7
  A finding outside your issue never becomes a `dispatch issue` you file. Take the first step that fits:
8
8
 
9
- 1. **Fix it yourself.** A defect with a clear fix is your tree's to fix, in whichever repository it is, with judgment: in your own pull request, or in a separate pull request of your tree. The implementer makes the fix, and a tester or a reviewer sends it to the implementer with its evidence (a tester with its red test, the reviewer in its review). Say so in the PR body. A phase worker whose own pull request cannot carry the fix sends it to the architect that owns its issue with `envoy_publish`; that architect adds it to an open pull request or files a child.
10
- 2. **Write to its owner.** A defect goes to another tree's architect only when your fix would collide with that tree's open pull request. A defect in a repository your token does not reach goes to the architect of the tree whose code it is. Only when no tree owns that code does it go to the controller of the project that repository maps to, or of your own project when Dispatch maps it to none, which files it. After the merge, the tester writes each clear defect a production check finds to its owner. How: [Write to the owner](#write-to-the-owner).
11
- 3. **Ask.** A defect goes to a person only when it needs a person's decision, a deploy window or work much larger than your own. So does a finding that needs a person's authority, taste or risk appetite (whether it is wanted, which design, who owns it, a change of scope, cost or risk). It is a `dispatch ask` with one recommendation (*What the ask says*).
9
+ 1. **Fix it yourself.** A defect that stops your work, and a defect with a clear fix, are your tree's to fix, in any repository your credentials reach, with judgment: in your own pull request, or in a separate pull request of your tree. The implementer makes the fix, and a tester or a reviewer sends it to the implementer with its evidence (a tester with its red test, the reviewer in its review). Say so in the PR body. A phase worker whose own pull request cannot carry the fix sends it to the architect that owns its issue with `envoy_publish`; that architect adds it to an open pull request or files a child. If your fix touches files that another tree's open pull request changes, tell that tree's architect in a comment on the issue of that pull request, which mentions its role (`--mention 'role:legion-<its project>-<its root's key, lower case>-architect'`), names your pull request and says that you make the fix, and go on: do not wait for an answer.
10
+ 2. **Write to the controller.** A defect in a repository your token does not reach goes to the controller of the project that repository maps to, or of your own project when Dispatch maps it to none, which files it. After the merge, the tester writes each clear defect a production check finds to that controller. How: [Write by a mention](#write-by-a-mention).
11
+ 3. **Ask.** A defect goes to a person only when it needs a person's decision, a deploy window or work much larger than your own. So does a finding that needs a person's authority, taste or risk appetite (whether it is wanted, which design, a change of scope, cost or risk). It is a `dispatch ask`, with one recommendation where its options are real choices (*What the ask says*).
12
12
 
13
13
  A human-only to-do, such as a deploy that only a person may make, is a `dispatch ask` too.
14
14
 
15
- A fix you are not sure of is not step 1: take step 2 when it holds, else step 3. A problem inside your issue is fixed in your change. A phase worker's problem inside its tree but outside its issue goes to the architect its `Legion addressing` line names. A fault of Legion's own machinery that holds your phase is a finding too, never a request to another session to act on your agent or your session; tell the owning architect too where a stop rule says so.
15
+ A problem inside your issue is fixed in your change. A phase worker's problem inside its tree but outside its issue goes to the architect its `Legion addressing` line names. A fault of Legion's own machinery that holds your phase is a finding too, never a request to another session to act on your agent or your session; tell the owning architect too where a stop rule says so.
16
16
 
17
- Search first (`skill://dispatch-first`). An open issue that tracks the problem gets your evidence as a comment. An open ask on the report issue about it (`dispatch open-asks --project <PROJECT>`) gets your evidence as a reply (`dispatch comment --issue <REPORT KEY> --reply-to-ask '<ask id>' --body-file -`); open no second one.
17
+ Search first (`skill://dispatch-first`). An open issue that tracks the problem gets your evidence, or what you fixed, as a comment. It is no reason to wait: wait only when it is claimed, it is `in_progress`, and its holder said on Envoy that it works on it now. Then tell that holder what you need and by when, and fix it yourself once that time has passed. An open ask about it (`dispatch open-asks --project <PROJECT>`) gets your evidence as a reply (`dispatch comment --issue <the ask's issue> --reply-to-ask '<ask id>' --body-file -`); open no second one.
18
18
 
19
- ## Write to the owner
19
+ ## Write by a mention
20
20
 
21
- Write to the owner on Dispatch: a comment on the issue that owns the subject, which mentions the owner's role. Dispatch delivers the mention and retries it, so check no liveness first. The controller forwards no message from one agent to another, and it edits no repository, so a defect it finds goes to its owner this way too. Mention the root architect of the tree that owns the code, on its issue; when no tree owns it, mention the controller of the project the repository maps to, on that project's report issue. The steps, the comment's form and what to do with each reply the controller writes are in `skill://legion-worker/references/findings-steps.md#write-to-the-owner`: read them before you write.
21
+ Write on Dispatch: a comment that mentions a role. Dispatch delivers the mention and retries it, so check no liveness first. The controller forwards no message from one agent to another. Mention the controller of the project the repository maps to on that project's report issue, or, where a rule sends the defect to another tree, that tree's root architect on its issue. The steps, the comment's form and what to do with each reply the controller writes are in `skill://legion-worker/references/findings-steps.md#write-by-a-mention`: read them before you write.
22
22
 
23
23
  ## Another agent that needs an action
24
24
 
25
25
  The actions on an agent (stop, retry, suspend, resume the agent, compact, and start it in a fresh session) are the project's controller's alone: neither you nor your architect can take one. When another agent needs one, ask the controller with a `dispatch comment` on that agent's issue, `<KEY>`, that mentions the controller's role. Read its form in `skill://legion-worker/references/findings-steps.md#another-agent-that-needs-an-action` before you write the comment. Send the controller no `envoy_publish` for it: Dispatch delivers the mention and retries it. The controller replies under your comment with what it ran, or why it ran nothing; wait for nothing.
26
26
 
27
- ## Where it goes
28
-
29
- An ask goes on the controller's report issue while it is open: the issue the deployment instructions name for Legion's reports, else the project's `Legion daily report` (`dispatch search --query '"Legion daily report"' --project <PROJECT>`). It stays open in `icebox`, so its asks stay answerable; a closed issue withdraws its open asks and refuses answers. With no open report issue, open the ask on the first of these that holds:
30
-
31
- 1. **Your own issue is open:** post the evidence and ask there, then publish the ask's reference to the architect that owns your issue. Where your task has an `acceptance:owner` step, it holds your issue's acceptance until a controller takes the ask. That hold keeps your issue open: an open ask on a closed issue drops out of the controller's listing.
32
- 2. **Your own issue is closed too** (`409 ISSUE_CLOSED`): put the report issue back in reach, then post and ask there, and say in your summary that you did. This is the one lifecycle status you write, and never through the `legion` tool's `set_status`.
33
- - It exists and is closed: `dispatch issue-update --issue <REPORT KEY> --status icebox`, the status alone (a closed issue refuses a reopening status beside any other field).
34
- - None exists: `dispatch issue --project <PROJECT> --title 'Legion daily report' --spec-file -`, with the Summary `skill://legion-controller/references/daily-report.md` gives, then `dispatch issue-update --issue <NEW KEY> --status icebox`. It carries no `legion` label.
35
-
36
27
  ## What the ask says
37
28
 
38
- The question stands alone in at most 2,000 characters, the `Ref:` line `--ref` appends included. Its first line is `Finding from <your role token>`. Then the concrete case: what went wrong, where and to whom (`dispatch://<KEY>`, the machine, file, command or session, the numbers); where the fix belongs, saying plainly when it is not Legion's; the decision a person must make, each option's effect and your recommendation. Evidence the decision does not need goes in a comment posted first and cited by `--ref`:
29
+ The question stands alone in at most 2,000 characters, the `Ref:` line `--ref` appends included. Its first line is `Finding from <your role token>`. Then the concrete case: what went wrong, where and to whom (`dispatch://<KEY>`, the machine, file, command or session, the numbers); where the fix belongs, saying plainly when it is not Legion's; the decision a person must make, each option's effect, and your recommendation with its reason where the options are real choices (`skill://dispatch/SKILL.md#asks-and-ask-blocks`). Offer only the real choices. Evidence the decision does not need goes in a comment posted first and cited by `--ref`:
39
30
 
40
31
  ```bash
41
32
  dispatch comment --issue '<ASK KEY>' --body-file - <<'EOF'
@@ -43,14 +34,14 @@ dispatch comment --issue '<ASK KEY>' --body-file - <<'EOF'
43
34
  EOF
44
35
  # Keep `File it for Legion` only when both role GitHub Apps are installed on the repository where the fix belongs.
45
36
  dispatch ask --issue '<ASK KEY>' --ref 'dispatch://<ASK KEY>/comment/<id>' --question-file - \
46
- --option 'File an issue: <what it would track, and who would own it>' \
37
+ --option 'File an issue: <what it would track, and who would work it>' \
47
38
  --option 'File it for Legion: Legion works it once it is filed' \
48
- --option 'Do not file: <what stays as it is>' <<'EOF'
39
+ --option 'Do not file: <what stays as it is, and what that costs>' <<'EOF'
49
40
  Finding from <your role token>
50
- <what went wrong, where and to whom, with dispatch://<KEY> and the numbers; where the fix belongs; what each option does to whom; your recommendation and why>
41
+ <what went wrong, where and to whom, with dispatch://<KEY> and the numbers; where the fix belongs; what each option does to whom; where the options are real choices, your recommendation and why>
51
42
  EOF
52
43
  ```
53
44
 
54
45
  ## Tell the controller about the ask
55
46
 
56
- The answer reaches only the ask's followers. Once the ask is open, `envoy_publish` `dispatch://<REPORT KEY>/ask/<id>` to the controller topic with `expects_reply: false`; the controller files what the answer asks for, and you file nothing. When the listener only kept that publish, do nothing more for an ask on the report issue: the controller's catch-up finds it. An ask on the report issue blocks nothing of your own issue; one on your own issue holds its acceptance. A production check look names the comment or the ask in its result and summary.
47
+ The answer reaches only the ask's followers. Once the ask is open, `envoy_publish` `dispatch://<ASK KEY>/ask/<id>` to the controller topic with `expects_reply: false`; the controller files what the answer asks for, and you file nothing. When the listener only kept that publish, do nothing more: the controller's catch-up finds it. An ask on your own issue holds its acceptance. A production check look names the comment or the ask in its result and summary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "6.12.0",
3
+ "version": "6.12.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",
@@ -10,23 +10,26 @@ Dispatch is a record for the people who decide, never a log of your work.
10
10
  - Use the `dispatch` command; the HTTP API only for what no command does. `dispatch <command> --help` gives its rules and an example.
11
11
  - Put long text on stdin, one flag per call: `--<field>-file -` with `<<'EOF'`; objects and lists take JSON.
12
12
  - Exit 2 is a usage error: fix every problem it names before you call again. Exit 1 is any other failure: Dispatch's refusal, a Dispatch the command cannot reach, or `ANSWER_NOT_KEPT` for a call that wrote nothing, which you run again. `dispatch login` exits 1 when the broker cannot be reached or refuses, the person denies the login, or its code expires; its usage error names only the first bad argument.
13
- - Never work around a hard-to-use command, or one storing or losing something wrongly: open an issue in the owning project. A Legion role's tree fixes it, through its implementer, as `skill://legion-worker/references/findings.md` says.
13
+ - Never work around a hard-to-use command, or one storing or losing something wrongly: fix it in your own pull request, coordinating only with an open one that changes the same file. A Legion role's tree fixes it, through its implementer, as `skill://legion-worker/references/findings.md` says.
14
14
 
15
15
  ## Asks and ask blocks
16
16
 
17
17
  - An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.
18
18
  - An ask waits on its asked-of person, else the issue's assignee, else the project's default assignee; no agent hands one on.
19
- - A design question's ask block ends its section:
19
+ - Ask a question only between two or more real choices: each within your rules, and one a person could choose. With one real choice, make it and say what you did and why.
20
+ - Give each choice's cost and one recommendation with its reason. A design question's ask block ends its section:
20
21
 
21
22
  ```md
22
23
  :::ask{urgency="med"}
23
- The question and the recommendation (`skill://dispatch-writing-specs`).
24
+ The question and one recommendation (`skill://dispatch-writing-specs`).
24
25
 
25
26
  - Option one: what it costs.
26
27
  - Option two: what it costs.
27
28
  :::
28
29
  ```
29
30
 
31
+ - Ask for one act only the person can do (an approval, a credential, a grant, their own account's setting) as that act: what it is, what it changes and how to do it, with no recommendation and the options `Done` and `Can't` (`dispatch request-approval` keeps its own answers). A safer alternative is a fact, not an option.
32
+ - Add no option that breaks your rules or that no one would choose. Add an option not to act (`Hold`, `Leave it`) only where not acting is a real choice whose cost the question names.
30
33
  - A decision block in a comment, message or close reason is refused: ask in the issue's document, or `dispatch ask`.
31
34
  - Never repeat an open ask in a message.
32
35
  - Change an open ask's block with `dispatch edit-ask` (ask id) or `doc-edit`'s `replace` or `move` (block id). An answered ask is fixed: ask anew. `dispatch read --ref` takes either id.
@@ -58,6 +61,7 @@ A claim (or `dispatch issue-update --route session:<your id>`, `--route ''` to r
58
61
 
59
62
  - One issue per deliverable, its content the issue's document.
60
63
  - A message replies to a person or tells them what they must know now.
64
+ - Begin no Dispatch comment, ask, reply or message with who you are or which role you hold: Dispatch shows the sender. A first line that a program reads stays.
61
65
  - Text a person must read to decide belongs in the spec. An artifact is a real file; markdown uploads as `.md` whatever its local name, never `.txt`.
62
66
 
63
67
  ## Architecture components
@@ -22,7 +22,7 @@ dispatch search --query 'reviewer threads OR review comments'
22
22
 
23
23
  `dispatch issue` and `dispatch ask` also search. Open each `advice.suggestions` hit too.
24
24
 
25
- - **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`).
25
+ - **Work already tracked:** put the finding on that issue. It is no reason to wait: fix what stops you, in any repository your credentials reach, and say there what you did. Wait only on a claimed, `in_progress` issue whose holder said on Envoy it works on it now: tell them what you need by when, and fix it yourself after that time. If your fix touches files of another tree's open pull request, tell its architect in a comment and go on, waiting for no answer. File a new issue only when no hit covers the work, and cite the nearest one you ruled out (`dispatch://KEY`).
26
26
  - **Question already decided:** cite the answered ask (`dispatch://KEY/ask/<id>`) and never ask again.
27
27
  - **Duplicate found, or a likely duplicate a create names:** fold it only when it is the same work. 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.
28
28
 
@@ -46,7 +46,7 @@ For each spec, ask, comment and message:
46
46
 
47
47
  - Name the concrete case and its numbers, then the choice in those terms, never "Which option?".
48
48
  - A choice inside what the person asked for, one their messages favour, routine cleanup, sequencing, naming, a choice between equivalent options, and a fix you can make are yours.
49
- - Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks): 2 to 4 options, short and self-contained: a person answers it with no other reading.
49
+ - Ask with an [ask block](skill://dispatch/SKILL.md#asks-and-ask-blocks), by that section's rules, short and self-contained: a person answers it with no other reading.
50
50
  - Measure each claim the ask rests on, its premise and each option's precondition. A claim you cannot measure stays out of the ask until it is measured. Call an option unavailable only where a precondition demonstrably fails. No unmeasured number goes in a premise.
51
51
  - Before you pass a question on as one only an attended or privileged act answers, try the source that answers it, then the other records holding it. Keep a privileged read for what only the live system knows.
52
52