@sjawhar/pi-legion 19.11.2 → 19.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/legion.js +56 -20
- package/dist/skills/legion-architect/references/acceptance.md +1 -1
- package/dist/skills/legion-architect/references/wake-routing.md +2 -2
- package/dist/skills/legion-controller/SKILL.md +7 -0
- package/dist/skills/legion-controller/references/admission.md +32 -0
- package/dist/skills/legion-controller/references/daily-report.md +9 -3
- package/dist/skills/legion-controller/references/session.md +5 -1
- package/dist/skills/legion-controller/references/slack-mentions.md +1 -1
- package/dist/skills/legion-controller/references/triage.md +8 -8
- package/dist/skills/legion-controller/references/wakes.md +13 -1
- package/package.json +2 -2
package/dist/legion.js
CHANGED
|
@@ -16813,7 +16813,6 @@ var ProjectSchema = strictObject({
|
|
|
16813
16813
|
gated_steps: array(_enum2(GATED_STEPS)).optional(),
|
|
16814
16814
|
created_at: string2()
|
|
16815
16815
|
}).readonly();
|
|
16816
|
-
var ProjectDefaultAssigneeSchema = strictObject({ project: string2(), assignee: string2().nullable() }).readonly();
|
|
16817
16816
|
var RepoProjectSchema = strictObject({
|
|
16818
16817
|
repo: string2(),
|
|
16819
16818
|
project: string2(),
|
|
@@ -16835,6 +16834,11 @@ var ArchitectureSourceSchema = strictObject({
|
|
|
16835
16834
|
components: number2().int()
|
|
16836
16835
|
}).readonly();
|
|
16837
16836
|
var RepoProjectUpdatedEventPayloadSchema = strictObject({ mapping: RepoProjectSchema, deleted: boolean2() }).readonly();
|
|
16837
|
+
var ProjectDefaultAssigneeUpdatedEventPayloadSchema = strictObject({
|
|
16838
|
+
project: string2(),
|
|
16839
|
+
assignee: string2().nullable(),
|
|
16840
|
+
thread_logins: array(string2()).optional()
|
|
16841
|
+
}).readonly();
|
|
16838
16842
|
var ArchitectureSourceUpdatedEventPayloadSchema = strictObject({ source: ArchitectureSourceSchema, deleted: boolean2() }).readonly();
|
|
16839
16843
|
var ArchitectureSyncedEventPayloadSchema = strictObject({
|
|
16840
16844
|
repo: string2().optional(),
|
|
@@ -17052,7 +17056,7 @@ var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is
|
|
|
17052
17056
|
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.";
|
|
17053
17057
|
var ASK_OPTIONS_CONTRACT = "Options carry the genuinely different approaches. Each option has a label, and its description " + "says what that approach costs.";
|
|
17054
17058
|
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.";
|
|
17055
|
-
var ASK_WAITS_ON_THE_ASSIGNEE = "An ask waits on the issue's assignee
|
|
17059
|
+
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.";
|
|
17056
17060
|
var HUMAN_AGREED_TO_DOCUMENT = "the human has agreed to every point in the document";
|
|
17057
17061
|
function documentOwnerValidation(requireArtifact, alwaysRequireArtifact = false) {
|
|
17058
17062
|
return {
|
|
@@ -17307,7 +17311,7 @@ var dispatchToolSpecs = [
|
|
|
17307
17311
|
spec: z.string().describe(`Optional initial primary-document markdown. ${SPEC_WRITING_POINTER}`).optional(),
|
|
17308
17312
|
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Optional initial labels, at most 20 labels of up to 40 characters.").optional(),
|
|
17309
17313
|
priority: z.number({ int: true, min: 0, max: 3 }).describe("Optional coarse priority, a number from 0 to 3: 0 is highest and 3 is lowest.").optional(),
|
|
17310
|
-
assignee: z.string().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); defaults to your owner when you act for a person, else the parent's assignee, else the project's default assignee
|
|
17314
|
+
assignee: z.string().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); defaults to your owner when you act for a person, else the parent's assignee, else the project's default assignee. Every project names a default assignee, so a new issue always has one. A question on it reaches the person it was handed to, else the issue's assignee, else the project's default assignee. Set it only when a person said who owns the issue.").optional(),
|
|
17311
17315
|
components: componentsArgument(z).optional(),
|
|
17312
17316
|
repo: z.string().describe("The repository the issue targets, owner/name, mapped to the issue's project in Settings; a child inherits its parent's when unset, and an issue with none on its parent chain takes the project's default.").optional()
|
|
17313
17317
|
})
|
|
@@ -17319,7 +17323,7 @@ var dispatchToolSpecs = [
|
|
|
17319
17323
|
priority: 1,
|
|
17320
17324
|
before: "DSP-2"
|
|
17321
17325
|
},
|
|
17322
|
-
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, set or clear its assignee, link a URL (the pull request that delivers it, a " + "run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, so the close carries its note; closing an issue that is " + "already closed is refused (ISSUE_CLOSED) before anything is posted. Reason goes only " + "with status done. Closing an issue withdraws every open ask " + "it holds (resolution kind withdrawn, naming the closer), and reopening it brings exactly " + "those asks back. " + "A closed issue still takes messages and comments, though not asks or artifacts; of this " + "tool's fields it takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. assignee is the person who answers " + "this issue's asks, and every ask on it waits on them until a person hands that ask on. " + "Passing null unassigns the issue. Set the assignee when a person said who owns the work, as you " + "file the issue or hand it over. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
17326
|
+
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, set or clear its assignee, link a URL (the pull request that delivers it, a " + "run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, so the close carries its note; closing an issue that is " + "already closed is refused (ISSUE_CLOSED) before anything is posted. Reason goes only " + "with status done. Closing an issue withdraws every open ask " + "it holds (resolution kind withdrawn, naming the closer), and reopening it brings exactly " + "those asks back. " + "A closed issue still takes messages and comments, though not asks or artifacts; of this " + "tool's fields it takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. assignee is the person who answers " + "this issue's asks, and every ask on it waits on them until a person hands that ask on. " + "Passing null unassigns the issue, and every ask on it then waits on the project's default " + "assignee: a question reaches the person it was handed to, else the issue's assignee, else " + "the project's default assignee, so every question reaches a person. " + "Set the assignee when a person said who owns the work, as you " + "file the issue or hand it over. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
17323
17327
|
arguments: (z) => ({
|
|
17324
17328
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
17325
17329
|
status: z.enum(ISSUE_STATUSES).describe("New lifecycle status.").optional(),
|
|
@@ -17327,7 +17331,7 @@ var dispatchToolSpecs = [
|
|
|
17327
17331
|
title: z.string({ min: 1, max: ISSUE_TITLE_MAX }).describe("Replacement title, at most 1,000 characters.").optional(),
|
|
17328
17332
|
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Replacement label set, at most 20 labels of up to 40 characters; replaces every existing label.").optional(),
|
|
17329
17333
|
priority: z.number({ int: true, min: 0, max: 3 }).nullable().optional().describe("Coarse priority: 0 is P0 (highest) through 3 is P3 (lowest); null clears it."),
|
|
17330
|
-
assignee: z.string().nullable().optional().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); null unassigns the issue. Set it only when a person said who owns the issue, never to move a question off the person holding it."),
|
|
17334
|
+
assignee: z.string().nullable().optional().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); null unassigns the issue, and every ask on it then waits on the project's default assignee. Set it only when a person said who owns the issue, never to move a question off the person holding it."),
|
|
17331
17335
|
external_links: z.array(z.string({ min: 1 })).describe("URLs to link; a non-empty list merges into the issue's existing external links by URL, an empty list removes every link instead.").optional(),
|
|
17332
17336
|
route: z.string().describe("Route the issue to role:<name> or session:<id>; an empty string clears it.").optional(),
|
|
17333
17337
|
parent: z.string().describe("Parent issue key in the same project; an empty string clears the parent.").optional(),
|
|
@@ -17583,7 +17587,7 @@ var dispatchToolSpecs = [
|
|
|
17583
17587
|
{
|
|
17584
17588
|
name: "dispatch_request_approval",
|
|
17585
17589
|
example: { issue: "DSP-1", summary: "A live sync replaces the nightly export." },
|
|
17586
|
-
description: "Ask a human to approve a document at its current version. Before calling, have a fresh read-only reader check the spec against the code and the human's words, then resolve every finding; a Legion architect runs `plan-gap-analyst` and `plan-reviewer`. Opens an approval ask (Approve / " + "Request changes) in the human's Inbox whose question names the document and version, " + "followed by the summary; the answer pins a review to that version and arrives as " + "artifact.approved or artifact.changes_requested. An open request follows the document: a " + "later version moves it to that version and leaves it waiting on you, as a human's reply in " + "its thread does. Only the first move since the request was opened or handed back sends an " + "event, and never to the session whose version made it; dispatch doc-read shows whom it " + "waits on. Once the revision is complete and " + HUMAN_AGREED_TO_DOCUMENT + ", call this again to hand that same Inbox row back. The request carries nothing new. A " + "call while it already waits on the human hands nothing back: the same summary changes " + "nothing, and a different one is refused, since it would rewrite the card the human is " + "reading. Approve and Request changes each close the request, so the next call opens a new " + "one. Call it once per revision, when the revision is complete, never after each edit. An " + "approval goes stale when the document changes outside its decision blocks after it, until " + "a later version's text is exactly the approved version's again, as when an accidental " + "edit is undone exactly, and no decision block in it was decided since: that version " + "carries the approval and the document reads approved at it, so nothing is requested for " + "it. When the document does not read approved, request approval again once that revision " + "is complete and " + HUMAN_AGREED_TO_DOCUMENT + ", with a one-sentence summary naming what changed since the earlier approval: the card " + "names that approval (version, date, reviewer) and its Show diff control carries the detail. " + "A human's own answer to a decision block carries the approval to the version it writes when " + "that answer is the whole change since the approved version, so nothing is requested for " + "it. A new version of a Legion root spec closes its armed design gate until a human " + "approves it; a carried approval reopens it too. " + "Refused, with nothing sent, while the document holds an open decision block, even when a " + "human asked for approval: the refusal names each block; ask the human to answer or waive " + "it first. " + "Refused 409 PLAN_APPROVED_BY_REVIEW on an issue's plan, which its plan review approves " + "(dispatch plan-approve), never a person. " + "On an issue's spec the answer ends with a `Coverage of <name>:` line naming each requirement " + "the spec marks that no check serves, in any document of the issue or of its descendants, or saying " + "the spec marks no requirements; a spec every requirement of which has a check gets no such line. It never " + "names a missing plan task, and a gap refuses nothing. " + OWNER_REFERENCE,
|
|
17590
|
+
description: "Ask a human to approve a document at its current version. Before calling, have a fresh read-only reader check the spec against the code and the human's words, then resolve every finding; a Legion architect runs `plan-gap-analyst` and `plan-reviewer`. Opens an approval ask (Approve / " + "Request changes) in the human's Inbox whose question names the document and version, " + "followed by the summary; the answer pins a review to that version and arrives as " + "artifact.approved or artifact.changes_requested. " + "The request reaches the person it was handed to, else the issue's assignee, else the " + "project's default assignee, so it always reaches a person, and this tool's answer names " + "that person. " + "An open request follows the document: a " + "later version moves it to that version and leaves it waiting on you, as a human's reply in " + "its thread does. Only the first move since the request was opened or handed back sends an " + "event, and never to the session whose version made it; dispatch doc-read shows whom it " + "waits on. Once the revision is complete and " + HUMAN_AGREED_TO_DOCUMENT + ", call this again to hand that same Inbox row back. The request carries nothing new. A " + "call while it already waits on the human hands nothing back: the same summary changes " + "nothing, and a different one is refused, since it would rewrite the card the human is " + "reading. Approve and Request changes each close the request, so the next call opens a new " + "one. Call it once per revision, when the revision is complete, never after each edit. An " + "approval goes stale when the document changes outside its decision blocks after it, until " + "a later version's text is exactly the approved version's again, as when an accidental " + "edit is undone exactly, and no decision block in it was decided since: that version " + "carries the approval and the document reads approved at it, so nothing is requested for " + "it. When the document does not read approved, request approval again once that revision " + "is complete and " + HUMAN_AGREED_TO_DOCUMENT + ", with a one-sentence summary naming what changed since the earlier approval: the card " + "names that approval (version, date, reviewer) and its Show diff control carries the detail. " + "A human's own answer to a decision block carries the approval to the version it writes when " + "that answer is the whole change since the approved version, so nothing is requested for " + "it. A new version of a Legion root spec closes its armed design gate until a human " + "approves it; a carried approval reopens it too. " + "Refused, with nothing sent, while the document holds an open decision block, even when a " + "human asked for approval: the refusal names each block; ask the human to answer or waive " + "it first. " + "Refused 409 PLAN_APPROVED_BY_REVIEW on an issue's plan, which its plan review approves " + "(dispatch plan-approve), never a person. " + "On an issue's spec the answer ends with a `Coverage of <name>:` line naming each requirement " + "the spec marks that no check serves, in any document of the issue or of its descendants, or saying " + "the spec marks no requirements; a spec every requirement of which has a check gets no such line. It never " + "names a missing plan task, and a gap refuses nothing. " + OWNER_REFERENCE,
|
|
17587
17591
|
arguments: (z) => ({
|
|
17588
17592
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
17589
17593
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -17742,10 +17746,11 @@ var dispatchToolSpecs = [
|
|
|
17742
17746
|
{
|
|
17743
17747
|
name: "dispatch_project",
|
|
17744
17748
|
example: { key: "CORE", name: "Core" },
|
|
17745
|
-
description: "Create a Dispatch project from a key and a name, so issues and project documents can be filed under it. " + "Projects cannot be renamed or deleted, so a mistyped key stays for good: check the keys that exist first " + "with dispatch projects. When a person asks for a project, make the key from its name. Check the key with " + "dispatch projects. If the key is free, create the project. Ask the person only when the key is in use. " + "A key that already exists is refused " + "with 409 PROJECT_EXISTS whoever created it, so after a retry it can mean the first call made the project. " + `A key that is not a project key (${PROJECT_KEY_RULE}) or an empty name is refused with 400 ` + `INVALID_PROJECT, and a name over ${PROJECT_NAME_MAX} characters with 400 CAP_EXCEEDED. When no person
|
|
17749
|
+
description: "Create a Dispatch project from a key and a name, so issues and project documents can be filed under it. " + "Projects cannot be renamed or deleted, so a mistyped key stays for good: check the keys that exist first " + "with dispatch projects. When a person asks for a project, make the key from its name. Check the key with " + "dispatch projects. If the key is free, create the project. Ask the person only when the key is in use. " + "A key that already exists is refused " + "with 409 PROJECT_EXISTS whoever created it, so after a retry it can mean the first call made the project. " + `A key that is not a project key (${PROJECT_KEY_RULE}) or an empty name is refused with 400 ` + `INVALID_PROJECT, and a name over ${PROJECT_NAME_MAX} characters with 400 CAP_EXCEEDED. ` + "Every project names a default assignee, the person its unowned work lands on: the login " + "default_assignee names, else the person creating the project, else the person your " + "credential acts for. A call that names none under a credential acting for no person is " + "refused with 400 INVALID_PROJECT naming default_assignee, so ask a person who it should " + "be rather than choosing one. A login nobody has signed in with is refused with 400 " + "ASSIGNEE_NOT_ALLOWED. The answer names the default the project took. When no person " + "asked for a project and an existing project already covers the work, do not create a project. File an " + "issue in that project with dispatch issue.",
|
|
17746
17750
|
arguments: (z) => ({
|
|
17747
17751
|
key: z.string().describe("The new project's key, such as CORE."),
|
|
17748
|
-
name: z.string({ max: PROJECT_NAME_MAX }).describe(`The project's name, shown beside its key, at most ${PROJECT_NAME_MAX} characters.`)
|
|
17752
|
+
name: z.string({ max: PROJECT_NAME_MAX }).describe(`The project's name, shown beside its key, at most ${PROJECT_NAME_MAX} characters.`),
|
|
17753
|
+
default_assignee: z.string().describe("Email of the person the project's unowned work lands on: a new issue with no assignee, and every question on an issue nobody holds. It must name a person who has signed in to Dispatch. Left out, it falls to the person creating the project, else the person your credential acts for; a credential that acts for nobody must name it.").optional()
|
|
17749
17754
|
}),
|
|
17750
17755
|
strict: true
|
|
17751
17756
|
},
|
|
@@ -17792,7 +17797,7 @@ var dispatchToolSpecs = [
|
|
|
17792
17797
|
{
|
|
17793
17798
|
name: "dispatch_whoami",
|
|
17794
17799
|
example: {},
|
|
17795
|
-
description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee and then to the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
|
|
17800
|
+
description: "Who Dispatch takes this session for: {session, owner, service, project}. session is the session Dispatch records your writes as. It is the session your credential proved, and the tool says so when that is not the session you run in. owner is the lowercase email of the person you act for, and is the first choice of assignee for issues you create. owner is null under the shared token and under a broker token that names a service and no person. With a null owner, a create with no assignee falls back to the parent's assignee and then to the project's default assignee, which every project names, so every issue you create has an assignee. A question on an issue reaches the person it was handed to, else the issue's assignee, else the project's default assignee. service is the subject of the verified service-account token that authenticated you, or the fleet a broker token naming no person belongs to, or null. A broker token that names a service may read and is refused every write with SIGN_IN_REQUIRED, which names the command a person signs in on that machine with. project is the one project key your credential may write, or null when it names none.",
|
|
17796
17801
|
arguments: () => ({}),
|
|
17797
17802
|
strict: true
|
|
17798
17803
|
},
|
|
@@ -22356,13 +22361,15 @@ function openAskAge(ageSeconds) {
|
|
|
22356
22361
|
const days = Math.floor(hours / 24);
|
|
22357
22362
|
return `${days}d${hours % 24 === 0 ? "" : ` ${hours % 24}h`}`;
|
|
22358
22363
|
}
|
|
22359
|
-
function
|
|
22360
|
-
|
|
22361
|
-
|
|
22364
|
+
function namedPerson(person) {
|
|
22365
|
+
return person === undefined || person === "" ? undefined : person;
|
|
22366
|
+
}
|
|
22367
|
+
function waitsOnPerson(ask) {
|
|
22368
|
+
return namedPerson(ask.waiting_on_person);
|
|
22362
22369
|
}
|
|
22363
22370
|
function openAskLine(ask, baseUrl) {
|
|
22364
22371
|
const priority = ask.priority === null ? "" : `P${ask.priority} \xB7 `;
|
|
22365
|
-
return `- ${openAskAge(ask.age_seconds)} \xB7 ${priority}${ownerTitle(ask.owner)} \xB7 asked of ${
|
|
22372
|
+
return `- ${openAskAge(ask.age_seconds)} \xB7 ${priority}${ownerTitle(ask.owner)} \xB7 asked of ${waitsOnPerson(ask) ?? "nobody"} \xB7 ${ask.question} \xB7 ${new URL(ask.ref, baseUrl).toString()}`;
|
|
22366
22373
|
}
|
|
22367
22374
|
function formatOpenAsksSummary(response, baseUrl) {
|
|
22368
22375
|
const scope = "active open asks you authored on open issues and project documents";
|
|
@@ -22782,9 +22789,10 @@ async function askCommand(context) {
|
|
|
22782
22789
|
});
|
|
22783
22790
|
const declinedLines = ask.issue_key === null ? [] : declinedAskLines(ask.advice, ask.issue_key, linkBase);
|
|
22784
22791
|
const adviceLines = await otherAdviceLines(() => renderAdvice(input.tool, askOwner.label, ask.advice, {}));
|
|
22792
|
+
const asked = waitsOnPerson(ask);
|
|
22785
22793
|
return {
|
|
22786
22794
|
text: [
|
|
22787
|
-
`Asked ${ask.id} on ${askOwner.label} (urgency ${ask.urgency}): ${ask.question}`,
|
|
22795
|
+
`Asked ${ask.id} on ${askOwner.label} (urgency ${ask.urgency})${asked === undefined ? "" : `, waiting on ${asked}`}: ${ask.question}`,
|
|
22788
22796
|
...checkLines,
|
|
22789
22797
|
...declinedLines,
|
|
22790
22798
|
await followsAsk(askOwner, input.subscriptions),
|
|
@@ -23370,9 +23378,10 @@ async function requestApprovalCommand(context) {
|
|
|
23370
23378
|
}
|
|
23371
23379
|
const details = await followedAskDetails(client, result.ask, resolved.artifact);
|
|
23372
23380
|
const outcome = result.recorded ? `Approval requested for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}).` : `The approval request for ${resolved.artifact.name} (document id ${resolved.artifact.id}) at version ${result.version} (ask ${result.ask.id}) already waits on the human, so this call changed nothing: nothing since it last reached the human (a newer version, a human's reply in its thread, or your progress note) left it waiting on you.`;
|
|
23381
|
+
const waitsOn = waitsOnPerson(result.ask);
|
|
23373
23382
|
return {
|
|
23374
23383
|
text: [
|
|
23375
|
-
`${outcome} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and a change outside the decision blocks after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one, with a --summary naming what changed since the earlier approval. The human's own answer to a decision block carries the approval when that answer is the whole change since the approved version, and answers an open request Approve in their name: request nothing then.`,
|
|
23384
|
+
`${outcome}${waitsOn === undefined ? "" : ` It waits on ${waitsOn}.`} The human's Inbox asks: ${JSON.stringify(result.ask.question)}. The answer arrives as artifact.approved or artifact.changes_requested. An edit before the answer moves this request to the new version and leaves it waiting on you, and a change outside the decision blocks after approval makes the approval stale: either way, request again for the new version once the human has agreed to every point in it, which hands this request back or opens a new one, with a --summary naming what changed since the earlier approval. The human's own answer to a decision block carries the approval when that answer is the whole change since the approved version, and answers an open request Approve in their name: request nothing then.`,
|
|
23376
23385
|
...coverageLines
|
|
23377
23386
|
].join(`
|
|
23378
23387
|
`),
|
|
@@ -24415,15 +24424,23 @@ async function projectCommand(context) {
|
|
|
24415
24424
|
project = await client.createProject({
|
|
24416
24425
|
key: stringArg(args, "key"),
|
|
24417
24426
|
name: stringArg(args, "name"),
|
|
24427
|
+
...defined("default_assignee", optionalString(args, "default_assignee")),
|
|
24418
24428
|
actor
|
|
24419
24429
|
});
|
|
24420
24430
|
} catch (error) {
|
|
24421
24431
|
throw refusalWithCode(error);
|
|
24422
24432
|
}
|
|
24423
24433
|
const href = new URL(`/projects/${encodeURIComponent(project.key)}`, linkBase).toString();
|
|
24434
|
+
const projectDefault = namedPerson(project.default_assignee);
|
|
24424
24435
|
return {
|
|
24425
|
-
text: `Created project ${project.key} (${project.name}) at ${project.created_at}: ${href}
|
|
24426
|
-
|
|
24436
|
+
text: `Created project ${project.key} (${project.name}) at ${project.created_at}: ${href}` + (projectDefault === undefined ? "" : `
|
|
24437
|
+
Its unowned work lands on ${projectDefault}: a question on an issue nobody holds reaches them.`),
|
|
24438
|
+
details: {
|
|
24439
|
+
project: project.key,
|
|
24440
|
+
name: project.name,
|
|
24441
|
+
created_at: project.created_at,
|
|
24442
|
+
...defined("default_assignee", projectDefault)
|
|
24443
|
+
}
|
|
24427
24444
|
};
|
|
24428
24445
|
}
|
|
24429
24446
|
async function projectsCommand(context) {
|
|
@@ -24791,7 +24808,7 @@ async function whoamiCommand(context) {
|
|
|
24791
24808
|
const proved = identity.kind === "agent" ? identity.session ?? null : null;
|
|
24792
24809
|
const project = identity.kind === "agent" ? identity.project ?? null : null;
|
|
24793
24810
|
const session = proved ?? sessionId;
|
|
24794
|
-
const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee, else the project's default assignee,
|
|
24811
|
+
const unowned = "no owner, so an issue you create without an assignee takes its parent's assignee, else the project's default assignee, which every project names, so the issue always has one.";
|
|
24795
24812
|
const signInNeeded = owner === null && service !== null && proved !== null;
|
|
24796
24813
|
const acting = owner !== null ? `Session ${session} acts for ${owner}: issues you create without an assignee are assigned to ${owner}.` : service !== null ? signInNeeded ? `Session ${session} runs as service ${serviceSubjectLabel(service)} and no person, so it may read but Dispatch refuses every write it makes: run \`agent-secrets login\` on this machine to write as yourself.` : `Session ${session} runs as service ${serviceSubjectLabel(service)}: ${unowned}` : `Session ${session} runs under the shared token: ${unowned}`;
|
|
24797
24814
|
const elsewhere = proved !== null && proved !== sessionId ? ` Your credential names session ${proved}, which is not this host session (${sessionId}): Dispatch records every write you make as ${proved}.` : "";
|
|
@@ -25926,12 +25943,31 @@ var legionBlockedIssue = object({
|
|
|
25926
25943
|
issue: issueKey,
|
|
25927
25944
|
blockedBy: array(issueKey)
|
|
25928
25945
|
});
|
|
25946
|
+
var LEGION_HELD_REASONS = [
|
|
25947
|
+
"tree_closed",
|
|
25948
|
+
"tree_parked",
|
|
25949
|
+
"label_off",
|
|
25950
|
+
"ancestry",
|
|
25951
|
+
"root_awaiting_person",
|
|
25952
|
+
"design_gate",
|
|
25953
|
+
"dispatch_blocker",
|
|
25954
|
+
"children_first",
|
|
25955
|
+
"accepted_ancestor",
|
|
25956
|
+
"at_work",
|
|
25957
|
+
"unclassified"
|
|
25958
|
+
];
|
|
25959
|
+
var legionHeldIssue = object({
|
|
25960
|
+
issue: issueKey,
|
|
25961
|
+
reason: _enum2(LEGION_HELD_REASONS),
|
|
25962
|
+
heldBy: array(issueKey).optional()
|
|
25963
|
+
});
|
|
25929
25964
|
var legionAdmission = object({
|
|
25930
25965
|
cap: number2().int().nonnegative(),
|
|
25931
25966
|
active: array(nonEmptyString2),
|
|
25932
25967
|
waiting: array(nonEmptyString2),
|
|
25933
25968
|
trees: array(issueKey).optional(),
|
|
25934
25969
|
blocked: array(legionBlockedIssue),
|
|
25970
|
+
held: array(legionHeldIssue).optional(),
|
|
25935
25971
|
free: number2().int().nonnegative().optional()
|
|
25936
25972
|
});
|
|
25937
25973
|
var legionControllerLocator = object({
|
|
@@ -28480,7 +28516,7 @@ import { logger as logger3 } from "@oh-my-pi/pi-utils";
|
|
|
28480
28516
|
// package.json
|
|
28481
28517
|
var package_default = {
|
|
28482
28518
|
name: "@sjawhar/pi-legion",
|
|
28483
|
-
version: "19.
|
|
28519
|
+
version: "19.13.0",
|
|
28484
28520
|
license: "Apache-2.0",
|
|
28485
28521
|
type: "module",
|
|
28486
28522
|
omp: {
|
|
@@ -28492,7 +28528,7 @@ var package_default = {
|
|
|
28492
28528
|
]
|
|
28493
28529
|
},
|
|
28494
28530
|
legion: {
|
|
28495
|
-
daemonApiVersion:
|
|
28531
|
+
daemonApiVersion: 98
|
|
28496
28532
|
},
|
|
28497
28533
|
repository: {
|
|
28498
28534
|
type: "git",
|
|
@@ -249,6 +249,6 @@ The first phase that resume starts needs no slot of its own either, since the ro
|
|
|
249
249
|
A changes request, or a newer version of the document that hands the request back to you, leaves the gate closed, so it holds the tree's work until a new approval.
|
|
250
250
|
While your answered root stands in the line, your record carries `waitingLine`: your place in the line and its length, your `part` (`returned`) and `kind` (`answered`), your `partPlace` of `partLength` among the issues whose work came back, `holdsSlot` true because your root has held its slot since its start, `since`, the moment your work came back, and `reason`, the daemon's own sentence for that place.
|
|
251
251
|
An issue that has not started carries `rootRank`, `ownRank` and `rootKey` in place of `since`, the two Dispatch ranks that placed it and the key of its tree root.
|
|
252
|
-
`why` beside it says why any issue of your tree is not working now, in one word and one sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it; `unlisted`, an issue the record holds in the workflow that no admission list places.
|
|
252
|
+
`why` beside it says why any issue of your tree is not working now, in one word and one sentence: `claim_stopped`, a claim nothing will wake; `waiting`, this line; `blocked`, a Dispatch link or an open child below it, though its reason can be the sentence of the issue's `admission.held` word (the sentence table of `packages/daemon/internal/projection/why.go` says when); `unlisted`, an issue the record holds in the workflow that no admission list places.
|
|
253
253
|
Nothing is sent to you about that wait, and your resume task says what answered it.
|
|
254
254
|
Act on neither your place nor your wait: the daemon starts you again on the pass that reads the answer.
|
|
@@ -15,7 +15,7 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
15
15
|
| Wake | Procedure |
|
|
16
16
|
| --- | --- |
|
|
17
17
|
| `carried-gate-opened` | Only a root whose catch-up said `carried` gets it. Its `version` and `reason`: a human approved the old root's spec document at `version`, which opened the gate this root carried; the daemon has started any child waiting on it. It names no step: the carry brings the old root's gate records, and the catch-up reports every gated step the carry did not bring as unregistered, so register each of those on this issue's own document for that step (`skill://legion-architect/references/design-gate.md`). It is not `design-approved`: do not proceed to section 2 or release a wave because of it, and start nothing. |
|
|
18
|
-
| `child-status` | A child of your tree left the workflow or re-entered it, or joined your tree from the admission queue; the reason names the child and its new status, or reads `<KEY> joined the tree of <ROOT> from the admission queue
|
|
18
|
+
| `child-status` | A child of your tree left the workflow or re-entered it, or joined your tree from the admission queue or from a closed tree; the reason names the child and its new status, or reads `<KEY> joined the tree of <ROOT> from the admission queue`, or, for a member of a closed tree your release took, `<KEY> joined the tree of <ROOT> from the closed tree of <OLD ROOT>`. `todo` (a human's move, your `release_children`, or your `rerun_child`) means it runs again under your tree from planning, and the daemon starts it; you start nothing. A child held for a blocker starts the same way once nothing holds it, and the reason, naming it and its root, says what cleared the hold: its last blocker's close, naming the issues it waited on, now done, or a person or you taking its blocked-by links off; you start nothing for it either. `backlog`, `icebox` or `triage` (a human's move, or your `park_child`) means the daemon has suspended its workers, and it advances no further until it is set back to `todo`. A `park_child` and then a `rerun_child` is that child's restart and not a park, because the daemon refuses `rerun_child` on a child whose phase is not `done` (`CHILD_RUNNING`, `packages/daemon/internal/api/architect.go`). Joined from the admission queue means a root that waited for a slot and never ran, which a person made a child of your tree or your `release_children` adopted, now runs in your tree with no architect of its own and takes an admission slot of its own when its work starts, from planning when it is `todo` and parked otherwise; one that waits on an unfinished blocked-by issue is held for that blocker like any other child, and starts when nothing holds it; you start nothing. A reason saying an issue is beneath an ancestor whose reviewed head the daemon has already accepted is a person's `todo` the daemon recorded and holds at `admitted`: nothing starts it until that ancestor closes, and a `request_backward_move` of the ancestor is what runs it under the ancestor now. What the rest of the tree does is your decision. When a park leaves no child that an issue in `accepting` waits on, run that issue's last round (`skill://legion-architect/references/acceptance.md`). |
|
|
19
19
|
| `child-closed` | Read the child completion and remaining open children. Re-scope open work, and take out with `park_child` each child the result makes unneeded (first take its link off each sibling that waits on it, or park that sibling too when its work ends with the parked child, under the same rule, as section 2 says) and say why with `dispatch comment`. Park a child only when a person asked for that move, or when the work is done, folded into another issue or no longer needed. Then file any new child the result calls for, after the red-team check in `skill://legion-architect/references/decomposition.md`, and release it at once with `release_children`, blocked by what it builds on (section 2). When a worker waits on this child for a missing surface (see `phase-finished`), tell it to continue with `envoy_publish` to its role topic. The last child's close is not the end-game (section 3). When it was the last child an issue in `accepting` waits on, run that issue's last round (`skill://legion-architect/references/acceptance.md`). |
|
|
20
20
|
| `child-release-stalled` | Its `reason` names a child your `release_children` released that your tree has not recorded, its parent, and why, one of three: the parent's release has not reached the daemon after three tries; or GitHub did not answer the App installation read of a repository on the child's parent chain, and the release left the child unrecorded because a parent on that chain is not `todo`, or did not write the child `todo` because its parent is not recorded; or the daemon's recovery of such a repository, once GitHub answered, still left children unrecorded (one notice per tree lists them all, each with its parent). Read the parent's record with the `legion` tool's `read_record` (`issue` the parent); release the parent first when the `reason` says to, then run `release_children` for the child again once the parent is recorded in your tree, and tell the controller if it never is. |
|
|
21
21
|
| `child-not-recorded` | Its `reason` names a child your tree did not record and why: its repository resolves to none (neither it nor an ancestor names one, and the project has no default), or to one not mapped to the project, or to one the daemon leaves out for a missing GitHub App. The daemon said why on the child too. Set the child's repository to one of the project's (`dispatch issue-update --repo owner/name`), then release it again with `release_children`; tell the controller when the repository it needs is not served. |
|
|
@@ -38,4 +38,4 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
38
38
|
## A root that joins your tree, and a refused release
|
|
39
39
|
|
|
40
40
|
- A root that waited in the admission queue, never ran and never left another tree joins your tree once a person makes it your child, if it is `todo`, and otherwise at your release of it (the `child-status` row of [wake routing](skill://legion-architect/references/wake-routing.md)); once in, it is held for its blockers like any child you release. A root that left another tree, handed over by its finished tree or admitted as an orphan, stays its own tree and never joins yours, even one that was your root's child before your root was admitted again. A labelled `todo` issue under a child you have not released, unless it ran as a tree of its own or left another tree, is held under that unreleased child (not a blocked-by hold): it waits for no slot until your release of it or of that child brings it in, with any `todo` child of its own.
|
|
41
|
-
- A release that cannot take a child in is refused 409 and writes nothing, its message naming the child and why: release the rest again without it. `CHILD_NOT_ADOPTABLE` is an issue that runs or ran as a tree of its own, carries a run handed over to it, or was handed over (or admitted as an orphan) as a root of its own: leave it there, or ask the controller. `CHILD_IN_OTHER_TREE` is another tree's child. When the tree it names is a root held under an unreleased child of yours (a root that queued and never ran, so it has no architect of its own), release that root, or the unreleased child it sits under, instead: its children come with it. Otherwise re-parent the child back in Dispatch, or ask that tree's architect or the controller.
|
|
41
|
+
- A release that cannot take a child in is refused 409 and writes nothing, its message naming the child and why: release the rest again without it. `CHILD_NOT_ADOPTABLE` is an issue that runs or ran as a tree of its own, carries a run handed over to it, or was handed over (or admitted as an orphan) as a root of its own, and a member of a closed tree that holds an admission slot, which the daemon started and keeps where it stands: leave it there, or ask the controller. `CHILD_IN_OTHER_TREE` is another tree's child. One kind of other tree's child does join yours: a member of a tree whose root the daemon's record says is `done` and whose linger has run out, standing at `admitted` with no slot of its own, which your release records in your tree with its repository kept and its generation raised by one — at `admitted` when it is `todo`, and in any other status as a parked child at `done`, which a `todo` runs again. `admission.held` reads `tree_closed` for more issues than a release takes: a member whose tree's linger still runs, and a member past `admitted`, read that word too and stay refused (the `tree_closed` row of `skill://legion-controller/references/admission.md`). When the tree it names is a root held under an unreleased child of yours (a root that queued and never ran, so it has no architect of its own), release that root, or the unreleased child it sits under, instead: its children come with it. Otherwise re-parent the child back in Dispatch, or ask that tree's architect or the controller.
|
|
@@ -195,6 +195,13 @@ Every move to `todo` you make is one of these:
|
|
|
195
195
|
`skill://legion-controller/references/wakes.md#a-tree-that-waits-on-an-event-outside-legion`);
|
|
196
196
|
- stopped-session work that a person's directive in the weekly plan moves to Legion.
|
|
197
197
|
|
|
198
|
+
`admission.held` is every issue the daemon's record holds in the workflow that stands in neither
|
|
199
|
+
`admission.active` nor `admission.waiting`: each row gives the issue, one word for why nothing of
|
|
200
|
+
it runs, and the issues that hold it. Read it beside `admission.blocked`, which names Dispatch
|
|
201
|
+
links and children-first waits alone. The daemon starts none of the issues in `admission.held` by
|
|
202
|
+
itself, so a row ends when a person acts or when the tree that owns the work moves;
|
|
203
|
+
`skill://legion-controller/references/admission.md` gives the word for each row and what ends it.
|
|
204
|
+
|
|
198
205
|
## Findings, and the issues you file
|
|
199
206
|
|
|
200
207
|
File an issue only when a person asks you to (a direct message, a Slack request, or their answer
|
|
@@ -25,3 +25,35 @@ wake — an unanswered `awaiting_person` root only when its label or its Dispatc
|
|
|
25
25
|
resume unsafe. Holding no slot is by itself no fault: a root waiting in the line and a child its
|
|
26
26
|
architect has not released yet hold none while their tree runs. The wake is live only, so a
|
|
27
27
|
controller that starts later finds such a root by the last row, as its start procedure does.
|
|
28
|
+
|
|
29
|
+
## `admission.held`: what nothing starts
|
|
30
|
+
|
|
31
|
+
`admission.held` is every issue the daemon's record holds in the workflow that stands in neither
|
|
32
|
+
`admission.active` nor `admission.waiting`. Each row carries the issue, one word for why nothing
|
|
33
|
+
of it runs, and `heldBy`, the issues that hold it, which is absent where no issue holds it. The
|
|
34
|
+
daemon reads the words in the order of the table below and takes the first that is true, so one
|
|
35
|
+
issue reads one word, and that word is the same in `read_state` and in the `tick` notice. The
|
|
36
|
+
list names no issue `admission.active` or `admission.waiting` names, so the three lists together
|
|
37
|
+
are every issue of the workflow and what each one is doing. `admission.blocked` keeps its own
|
|
38
|
+
rows beside them: it names Dispatch links and children-first waits alone, and an issue it names
|
|
39
|
+
that stands in `admission.held` reads there under whichever word the daemon's order gives it,
|
|
40
|
+
which can be an earlier one — a child under a shut gate that a link also holds reads
|
|
41
|
+
`design_gate`. A blocked root the line carries stands in `admission.waiting` and has no held row
|
|
42
|
+
at all.
|
|
43
|
+
|
|
44
|
+
The daemon starts none of these issues by itself. Name them in the day's report and take nothing
|
|
45
|
+
for them, except where the row's last column names an act of yours.
|
|
46
|
+
|
|
47
|
+
| Word | What it means | What ends the hold |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `tree_closed` | The daemon's record of the issue's tree root says `done`, or that root's linger is still running after it left the workflow. `heldBy` names that root | An architect's `release_children` of the live tree whose Dispatch parent the issue reaches: the daemon records it in that tree with its repository kept and its generation raised by one, at `admitted` when it is `todo` and in any other status as a parked child at `done`, which a `todo` runs again. The row alone does not say whether that release would be accepted, and three kinds of issue read this word that no release takes: a member of a tree still in its linger, and a member of a parked tree, whose park starts a linger of its own, both refused while that linger runs; and a member past `admitted`, refused `CHILD_IN_OTHER_TREE`. A member of a closed tree that holds an admission slot stands in `admission.active` and has no held row: a release of one past `admitted`, the usual member at work, is refused `CHILD_IN_OTHER_TREE`, and of one at `admitted`, `CHILD_IN_OTHER_TREE` while its root's linger runs and `CHILD_NOT_ADOPTABLE` once that linger has ended |
|
|
50
|
+
| `tree_parked` | The issue's tree root left the workflow to `backlog` or `icebox`, because that tree was parked (by a person, or by your own hold), and that root's linger has run out. While it still runs the member reads `tree_closed` instead. `heldBy` names that root | A `todo` on the root, which re-admits the tree, and nothing else: no release takes such a member. Where the park is your own hold, the parked-root walk decides it (`skill://legion-controller/references/parked-decisions.md`) |
|
|
51
|
+
| `label_off` | The issue is a root the admission queue does not carry, because the record says the `legion` label is off. A person took it out of Legion | A person's label. Take no issue back yourself: the intake rule in your deployment instructions keeps such a root out |
|
|
52
|
+
| `ancestry` | The root's Dispatch chain reaches another live root, so the issue is that tree's unreleased work. `heldBy` names the live roots on that chain | That tree's architect releasing the issue, or releasing the parent above it; or every live root leaving that chain, after which it queues as a root of its own |
|
|
53
|
+
| `root_awaiting_person` | The issue's tree root has handed work to a person, a question or its spec, and has not resumed yet, whether or not the person has answered, so the daemon starts no issue of the tree. `heldBy` names that root | The root's resume, which the person's answer or review brings: the daemon then resumes the root's architect |
|
|
54
|
+
| `design_gate` | The design gate of the issue's tree root is not open at every step the deployment gates. `heldBy` names that root | A person's approval of each gated step's document at its current version |
|
|
55
|
+
| `dispatch_blocker` | A Dispatch `blocked_by` link of the issue names an issue that is not `done`, and holds the issue where it stands. `heldBy` names the unfinished blockers | Each blocker reaching `done` (a person's close, or the blocker's own merge), or the link taken off by a person or by the tree's architect. The issue is in `admission.blocked` as well |
|
|
56
|
+
| `children_first` | Dispatch shows an open child under the issue, so its own first phase waits for the children. `heldBy` names the open children | The last open child leaving the workflow, which is the tree architect's work. The issue is in `admission.blocked` as well |
|
|
57
|
+
| `accepted_ancestor` | The daemon has accepted the reviewed head of an issue above this one, so nothing of its own work starts before that ancestor closes. `heldBy` names that ancestor | The ancestor's close, which the merge of its pull request writes |
|
|
58
|
+
| `at_work` | An issue in a phase that keeps no admission slot; no issue reads it today (`record.HeldAtWork` says why) | None today: no issue reads this word. No `heldBy`: no other issue holds it |
|
|
59
|
+
| `unclassified` | No word above is true of the issue. The daemon logs it once for that issue and run | Nothing of yours. Name it in the day's report with its `phase` and `status`, so a person can read what the daemon could not say |
|
|
@@ -26,8 +26,7 @@ legion({ op: "set_status", issue: "<report KEY>", status: "icebox" })
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
With no person known, leave out `--assignee`: the issue then goes to your token's owner, or, under
|
|
29
|
-
the shared token, to the project's default assignee
|
|
30
|
-
unassigned.
|
|
29
|
+
the shared token, to the project's default assignee, which every project names.
|
|
31
30
|
|
|
32
31
|
## Keep it answerable
|
|
33
32
|
|
|
@@ -43,7 +42,8 @@ Each time you read it:
|
|
|
43
42
|
(`400 ASSIGNEE_NOT_ALLOWED` names an email nobody has signed in to Dispatch with): name it, with
|
|
44
43
|
its first line, in your summary.
|
|
45
44
|
- While `Assignee:` says `unassigned`, open each report with one sentence asking a person to take
|
|
46
|
-
the issue from its header, because its asks
|
|
45
|
+
the issue from its header, because until someone does, its asks go to the project's default
|
|
46
|
+
assignee and not to the person the report is for.
|
|
47
47
|
|
|
48
48
|
## When
|
|
49
49
|
|
|
@@ -71,6 +71,12 @@ every issue by its `dispatch://` link and what it does for the reader, every pul
|
|
|
71
71
|
link's wait ends when each blocker reaches `done` (a person's close, or the blocker's own
|
|
72
72
|
merge) or its link is taken off (by a person or the tree's architect), and a children-first wait
|
|
73
73
|
ends when the last open child leaves the workflow, so take nothing for them.
|
|
74
|
+
- **What nothing starts.** Each issue in `admission.held`, grouped by its `reason`, with the
|
|
75
|
+
issues `heldBy` names: each group's count and its issues. Say for each
|
|
76
|
+
group what ends the hold, from the table in
|
|
77
|
+
`skill://legion-controller/references/admission.md`, so a reader sees whose act the work waits
|
|
78
|
+
on. An issue whose `reason` is `unclassified` goes in the report with its `phase` and its
|
|
79
|
+
`status`: the daemon could give it no word, and a person reads it.
|
|
74
80
|
- **Phase workers nothing will prompt.** Each entry of the tick's `silent` list, with the role whose
|
|
75
81
|
claim is silent and how long it has been quiet (`skill://legion-controller/references/wakes.md`).
|
|
76
82
|
That list arrives on the tick wake alone and is in no `read_state` field, so the report names the
|
|
@@ -29,7 +29,11 @@ answer to your ask, a mention), Envoy or Slack. No `legion controller start` can
|
|
|
29
29
|
`issues.<KEY>.holdReason`, `issues.<KEY>.architect`, `issues.<KEY>.tree` (the root of the
|
|
30
30
|
issue's tree), `admission.cap`, `admission.active` (the issues holding a slot, roots and
|
|
31
31
|
children), `admission.waiting` (the issues in the line, in its order), `admission.trees` (the
|
|
32
|
-
roots of the live trees), `admission.blocked`, `
|
|
32
|
+
roots of the live trees), `admission.blocked`, `admission.held` (every issue the record holds
|
|
33
|
+
in the workflow that stands in neither `admission.active` nor `admission.waiting`, each with
|
|
34
|
+
one word for why nothing of it runs and the issues that hold it;
|
|
35
|
+
`skill://legion-controller/references/admission.md` gives the word for each row and what ends
|
|
36
|
+
it), `capabilities[]`, `daemon.project`, and
|
|
33
37
|
`settings` (the daemon's resolved `legion.yaml`, with no credential in it).
|
|
34
38
|
- `op: "set_status"` with `issue` and `status` (`todo`, `backlog` or `icebox`) moves an issue. Each
|
|
35
39
|
call mints its grant in-process from the secret the session registered with, so a stale secret
|
|
@@ -141,7 +141,7 @@ architect for it, whatever it asks. For a person's mention, take the first of th
|
|
|
141
141
|
no label and waits for a person to hand it over. Never label a request outside the scope the
|
|
142
142
|
deployment instructions state. Reply with the new issue's key, its title, the link and assignee
|
|
143
143
|
the `Created` line names (naming nobody, Dispatch assigns the issue to your token's owner, or,
|
|
144
|
-
under the shared token, to the project's default assignee
|
|
144
|
+
under the shared token, to the project's default assignee, which every project names),
|
|
145
145
|
and whether Legion will take it: with the label, triage admits it in its next turn unless a
|
|
146
146
|
person's request says to wait or puts it out of scope. That request is the request itself, the
|
|
147
147
|
deployment instructions, or a line of the weekly plan that names the person's request behind it.
|
|
@@ -72,14 +72,14 @@ Read this on a `triage` wake, at every start, and when a person hands you an iss
|
|
|
72
72
|
work is done, folded into another issue (name it) or no longer needed.
|
|
73
73
|
For a root you admitted, say in that comment who will be asked: `Assigned to <login>,
|
|
74
74
|
who will get this tree's questions and its design approval`, or, when `Assignee:` says
|
|
75
|
-
`unassigned`, `Unassigned —
|
|
76
|
-
until someone takes it from the issue header (Assignee, beside Priority)`.
|
|
77
|
-
approval only when your system prompt's `Design gate steps:` sentence names
|
|
78
|
-
when it reads `Design gate steps: none.` nobody approves a design, so drop
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
project
|
|
82
|
-
architect's asks reach
|
|
75
|
+
`unassigned`, `Unassigned — this tree's questions and its design approval go to the project's
|
|
76
|
+
default assignee until someone takes it from the issue header (Assignee, beside Priority)`.
|
|
77
|
+
Promise the design approval only when your system prompt's `Design gate steps:` sentence names
|
|
78
|
+
at least one step; when it reads `Design gate steps: none.` nobody approves a design, so drop
|
|
79
|
+
"and its design approval". Take the assignee from the read, never from how the issue was
|
|
80
|
+
created: an issue filed with no assignee lands on the project's default assignee, which every
|
|
81
|
+
project names, but a person can clear an assignee later, and a root with none still has its
|
|
82
|
+
architect's asks reach the project's default assignee.
|
|
83
83
|
|
|
84
84
|
## Label an issue for a person
|
|
85
85
|
|
|
@@ -34,7 +34,7 @@ child, so the issue it names may be either. Name the free slots; take nothing.
|
|
|
34
34
|
daemon waits half a minute and folds that window's events into one wake. Take nothing: it is not
|
|
35
35
|
Legion's.
|
|
36
36
|
|
|
37
|
-
## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?, silent?}`)
|
|
37
|
+
## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?, held?, silent?}`)
|
|
38
38
|
|
|
39
39
|
The daemon's periodic wake, a minute after it starts and then every
|
|
40
40
|
`controller_wake_interval_seconds` (an hour by default), whatever the slots. Run the skill's every-turn
|
|
@@ -59,6 +59,18 @@ link is taken off (by a person or the tree's architect), and a children-first wa
|
|
|
59
59
|
last open child leaves the workflow: name the waits in the day's report and
|
|
60
60
|
take nothing for them.
|
|
61
61
|
|
|
62
|
+
`held`, when present, is `[{issue, reason, heldBy?}, …]`: every issue the daemon's record holds
|
|
63
|
+
in the workflow that stands in neither `admission.active` nor `admission.waiting`, each with one
|
|
64
|
+
word for why nothing of it runs and the issues that hold it. `heldBy` is absent where no issue
|
|
65
|
+
holds the one that waits. The field is absent where the project holds nothing, as `blocked` is.
|
|
66
|
+
`read_state` shows the same rows under `admission.held`, with the same word for each issue, and
|
|
67
|
+
`legion state` prints their counts as `admission.held:`. The word for each row, and what ends
|
|
68
|
+
each hold, is the table in `skill://legion-controller/references/admission.md`. The rows name the
|
|
69
|
+
blocked issues again, under whichever word the daemon's order gives them, so an issue can stand
|
|
70
|
+
in `blocked` and in `held` at once: `blocked` is what readers use for a link or a children-first
|
|
71
|
+
wait, and `held` says of every held issue what it waits for. Name them in the day's report and
|
|
72
|
+
take nothing for them.
|
|
73
|
+
|
|
62
74
|
`silent`, when present, is `[{issue, role, lastStep, silent, backgroundSince?}, …]`: every issue whose phase worker
|
|
63
75
|
nothing will prompt, with the role whose claim is silent, the moment that claim's agent last
|
|
64
76
|
stepped, and how long it has been quiet.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/pi-legion",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"omp": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"legion": {
|
|
15
|
-
"daemonApiVersion":
|
|
15
|
+
"daemonApiVersion": 98
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|