@sjawhar/pi-legion 19.13.1 → 19.14.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 +39 -13
- package/dist/skills/legion-architect/SKILL.md +2 -2
- package/dist/skills/legion-architect/references/acceptance.md +5 -4
- package/dist/skills/legion-architect/references/design-gate.md +24 -2
- package/dist/skills/legion-retro/SKILL.md +12 -4
- package/dist/skills/legion-worker/SKILL.md +2 -2
- package/dist/skills/legion-worker/references/ci-checks.md +95 -0
- package/dist/skills/legion-worker/references/conflicts-and-rewrites.md +1 -1
- package/dist/skills/legion-worker/references/merge-gate.md +1 -0
- package/dist/skills/legion-worker/references/pr-body.md +25 -13
- package/package.json +1 -1
package/dist/legion.js
CHANGED
|
@@ -17035,7 +17035,8 @@ var BlockInvalidEventPayloadSchema = strictObject({
|
|
|
17035
17035
|
block_id: string2(),
|
|
17036
17036
|
version: number2().int(),
|
|
17037
17037
|
reason: string2(),
|
|
17038
|
-
disturbed_by: ActorSchema
|
|
17038
|
+
disturbed_by: ActorSchema,
|
|
17039
|
+
block_type: literal("check").optional()
|
|
17039
17040
|
}).readonly();
|
|
17040
17041
|
var DecisionKeptEventPayloadSchema = strictObject({
|
|
17041
17042
|
artifact_id: string2(),
|
|
@@ -17190,6 +17191,8 @@ function componentsArgument(z) {
|
|
|
17190
17191
|
}).describe("Attach the issue to architecture components. Attach the root before decomposing it; children inherit unless they choose.");
|
|
17191
17192
|
}
|
|
17192
17193
|
var SPEC_WRITING_POINTER = "Write a spec as skill://dispatch-writing-specs says.";
|
|
17194
|
+
var CI_CHECK_RULE = "A check block whose ci_check names the CI check run that proves it carries no run, keeps when " + "before_merge, names its negative_control, and holds no recorded result. A write that adds a " + "check block, or changes a check's ci_check, run, when or negative_control, so that it breaks " + "one of those rules is refused with 400 INVALID_CI_CHECK, which names the block and the rule. " + "A check that already holds a result never becomes CI's: write a new check block under a new id.";
|
|
17195
|
+
var CHECK_PROVED_BY_CI = "A check whose ci_check names a CI check run, and that holds no recorded result, is proved by CI";
|
|
17193
17196
|
function imagesArgument(z, owner) {
|
|
17194
17197
|
return z.array(z.string({ min: 1 }), { min: 1 }).describe(`Optional local picture files to show inline: PNG, JPEG, GIF or WebP (by their bytes, not their name), each at most 25 MiB. Each is uploaded to ${owner} and appended after a blank line as one  line, in this order; those lines count toward the bound Dispatch holds the text to, which it names in its refusal.`).optional();
|
|
17195
17198
|
}
|
|
@@ -17300,7 +17303,7 @@ var dispatchToolSpecs = [
|
|
|
17300
17303
|
{
|
|
17301
17304
|
name: "dispatch_issue",
|
|
17302
17305
|
example: { project: "DSP", title: "Native workspace" },
|
|
17303
|
-
description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them. " + "When passing a spec, before calling, have a fresh read-only reader check it against the code and the human's words, then resolve every finding; a Legion architect uses `plan-gap-analyst`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
|
|
17306
|
+
description: "Create a native Dispatch issue for newly tracked work. Search first with dispatch search; if potentially duplicate issues exist, this returns 409 POSSIBLE_DUPLICATE unless --force is set after reading them. " + "When passing a spec, before calling, have a fresh read-only reader check it against the code and the human's words, then resolve every finding; a Legion architect uses `plan-gap-analyst`. " + "A spec holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK. " + `${CI_CHECK_RULE} ` + "Create a project only when a person asks for one; work that spans projects goes in the project that owns most of it. " + `${RELATED_CHECK_RESULT} With --force, the result also names each issue whose title you forced past. ` + `Do not use it when an existing issue already covers the work; read or update that issue instead. ${ISSUE_REFERENCE}`,
|
|
17304
17307
|
arguments: (z) => ({
|
|
17305
17308
|
project: z.string().describe("Project key for the new issue."),
|
|
17306
17309
|
title: z.string({ max: ISSUE_TITLE_MAX }).describe("Concise issue title, at most 1,000 characters."),
|
|
@@ -17540,7 +17543,7 @@ var dispatchToolSpecs = [
|
|
|
17540
17543
|
ops: [{ op: "delete_column", block: "table-123", index: 1 }],
|
|
17541
17544
|
precondition: { blocks: [{ id: "table-123", token: "sha256:current-table-token" }] }
|
|
17542
17545
|
},
|
|
17543
|
-
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch comment, dispatch suggest, or dispatch doc-read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading at any level. A find that opens with a list marker ('- ', '5. ', with an optional '[ ] ' or '[x] ' after it) and matches no text as written selects an item of that kind of list whose text starts with the rest, its number not matched and a box matching only a task item in that state. A find or quote anchor stays inside one block, and in a table inside one cell: ' | ' is the boundary markdown writes between two cells, not text a cell holds, so a quote that runs across cells is refused, naming the cells; change several cells with one operation per cell in the same batch, and anchor on one cell's text. replace is inline: with is the new text of the matched span, so a marker of a different kind from the block's own stays literal text ('4. Design' written into a heading). A with that opens with a marker of the same kind as the matched block's own would write it twice and is INVALID_OP - including prose that merely looks like one ('1999. was a year' into an ordered item), which you write as text by escaping it ('1999\\. was a year'). The exceptions are an item a find's list marker selected (it matched no text as written): replace(find=\"5. Old\", with=\"5. New\") gives the item the text 'New' under its own number, and a with that is the marker alone is INVALID_OP; and a heading rename whose find carried a heading marker: replace(find=\"## Old\", with=\"## New\") gives '## New', where a different level applies only when find named the heading's actual level (find \"## Old\" with \"### New\" makes it an h3), since '# ' selects a heading without naming its level. A task item (`- [ ]` / `- [x]`) is ticked the same way: when find matches from the start of the item's text and with opens with '[x] ' or '[ ] ', the opening sets the item's box and the rest is its new text (replace(find=\"Write it\", with=\"[x] Write it\") ticks it); the same opening over a plain list item or a paragraph stays literal text. Any non-empty with that renders to no text - a line indented four spaces or a tab, which markdown reads as a code block, or whitespace alone - is INVALID_OP rather than a silent deletion; pass an empty with to delete the matched text on purpose - a list item, quote, typed block or footnote definition left holding only the emptied paragraph keeps it. " + "with cannot open a new block: after a hard line break inside with (two trailing spaces, or a backslash, before the newline) a heading, bullet, '1.'/'1)' ordered, or '>' blockquote marker is INVALID_OP too, since that line would stay escaped text inside the matched block - use insert, plus delete for what it replaces, to add the block. A hard break in with is itself INVALID_OP when the matched text is in a heading or a table cell, which are written on one line. In a table cell, with is the cell's text: write a | in it bare, in code too, since code whose text has an odd run of backslashes right before a | cannot be stored in a cell and is INVALID_OP, naming the cell. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. A delete or retype that would take an ask block out of the document while its ask is open is refused, with nothing sent. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + `Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; dispatch doc-read --blocks lists every block's id, type, opening words and token, and each table's rows and cells with the indexes delete_row and delete_column take (GET /api/v1/artifacts/{artifact UUID}/blocks serves the same list). ` + "Optionally require the state just read: precondition selects exactly one of a document token from dispatch doc-read, or block {id, token} values from dispatch doc-read --blocks. A block guard must include every block the batch changes; Dispatch resolves quote targets and rejects an uncovered batch rather than applying it. Use a document token for insert or move, which depend on document order. Prefer block tokens when the covered content blocks are independent sections. Tokens include inline marks, so a fresh human comment also makes a stale edit fail. PRECONDITION_FAILED means re-read; EDIT_QUEUE_FULL means back off before retrying. " + "The result carries the document token this edit produced, so a chain of guarded edits passes each result's token as the next edit's precondition with no dispatch doc-read between them. " + "A batch that leaves the document exactly as it was mints no version, named or not, and the result says nothing changed and names each operation that did nothing. " + "A change a browser removes while the edit is in flight is never reported as applied: EDIT_LOST_TO_CONCURRENT_CHANGE means the write was refused and nothing was written, so re-read the document and decide again, as with PRECONDITION_FAILED; lost_ops on a successful result names operations whose text the live document no longer has, because the deletion landed after the version was written. " + "One replace per paragraph: more new paragraphs go in one insert after the last one you rewrote, since two inserts at one anchor come out reversed; read the passage back with dispatch doc-read afterwards. " + "Each decision block the edit adds gets the related-item check dispatch ask gets, waiting at most five seconds for all of them together: the result prints, after its first line, `Decision block <id>:` and what that check found, that it found nothing, or that it was not made and why. " + "A block id written as {#id} longer than 256 bytes is stored, but its block is no graph node, so no reference reaches it. " + `The spec holds requirements, design, and decisions - never progress, status, or timestamps; a record of open items or progress is a document of its own. ${OWNER_REFERENCE} ${SPEC_WRITING_POINTER}`,
|
|
17546
|
+
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch comment, dispatch suggest, or dispatch doc-read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading at any level. A find that opens with a list marker ('- ', '5. ', with an optional '[ ] ' or '[x] ' after it) and matches no text as written selects an item of that kind of list whose text starts with the rest, its number not matched and a box matching only a task item in that state. A find or quote anchor stays inside one block, and in a table inside one cell: ' | ' is the boundary markdown writes between two cells, not text a cell holds, so a quote that runs across cells is refused, naming the cells; change several cells with one operation per cell in the same batch, and anchor on one cell's text. replace is inline: with is the new text of the matched span, so a marker of a different kind from the block's own stays literal text ('4. Design' written into a heading). A with that opens with a marker of the same kind as the matched block's own would write it twice and is INVALID_OP - including prose that merely looks like one ('1999. was a year' into an ordered item), which you write as text by escaping it ('1999\\. was a year'). The exceptions are an item a find's list marker selected (it matched no text as written): replace(find=\"5. Old\", with=\"5. New\") gives the item the text 'New' under its own number, and a with that is the marker alone is INVALID_OP; and a heading rename whose find carried a heading marker: replace(find=\"## Old\", with=\"## New\") gives '## New', where a different level applies only when find named the heading's actual level (find \"## Old\" with \"### New\" makes it an h3), since '# ' selects a heading without naming its level. A task item (`- [ ]` / `- [x]`) is ticked the same way: when find matches from the start of the item's text and with opens with '[x] ' or '[ ] ', the opening sets the item's box and the rest is its new text (replace(find=\"Write it\", with=\"[x] Write it\") ticks it); the same opening over a plain list item or a paragraph stays literal text. Any non-empty with that renders to no text - a line indented four spaces or a tab, which markdown reads as a code block, or whitespace alone - is INVALID_OP rather than a silent deletion; pass an empty with to delete the matched text on purpose - a list item, quote, typed block or footnote definition left holding only the emptied paragraph keeps it. " + "with cannot open a new block: after a hard line break inside with (two trailing spaces, or a backslash, before the newline) a heading, bullet, '1.'/'1)' ordered, or '>' blockquote marker is INVALID_OP too, since that line would stay escaped text inside the matched block - use insert, plus delete for what it replaces, to add the block. A hard break in with is itself INVALID_OP when the matched text is in a heading or a table cell, which are written on one line. In a table cell, with is the cell's text: write a | in it bare, in code too, since code whose text has an odd run of backslashes right before a | cannot be stored in a cell and is INVALID_OP, naming the cell. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. A delete or retype that would take an ask block out of the document while its ask is open is refused, with nothing sent. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + `Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; dispatch doc-read --blocks lists every block's id, type, opening words and token, and each table's rows and cells with the indexes delete_row and delete_column take (GET /api/v1/artifacts/{artifact UUID}/blocks serves the same list). ` + "Optionally require the state just read: precondition selects exactly one of a document token from dispatch doc-read, or block {id, token} values from dispatch doc-read --blocks. A block guard must include every block the batch changes; Dispatch resolves quote targets and rejects an uncovered batch rather than applying it. Use a document token for insert or move, which depend on document order. Prefer block tokens when the covered content blocks are independent sections. Tokens include inline marks, so a fresh human comment also makes a stale edit fail. PRECONDITION_FAILED means re-read; EDIT_QUEUE_FULL means back off before retrying. " + `${CI_CHECK_RULE} ` + "The result carries the document token this edit produced, so a chain of guarded edits passes each result's token as the next edit's precondition with no dispatch doc-read between them. " + "A batch that leaves the document exactly as it was mints no version, named or not, and the result says nothing changed and names each operation that did nothing. " + "A change a browser removes while the edit is in flight is never reported as applied: EDIT_LOST_TO_CONCURRENT_CHANGE means the write was refused and nothing was written, so re-read the document and decide again, as with PRECONDITION_FAILED; lost_ops on a successful result names operations whose text the live document no longer has, because the deletion landed after the version was written. " + "One replace per paragraph: more new paragraphs go in one insert after the last one you rewrote, since two inserts at one anchor come out reversed; read the passage back with dispatch doc-read afterwards. " + "Each decision block the edit adds gets the related-item check dispatch ask gets, waiting at most five seconds for all of them together: the result prints, after its first line, `Decision block <id>:` and what that check found, that it found nothing, or that it was not made and why. " + "A block id written as {#id} longer than 256 bytes is stored, but its block is no graph node, so no reference reaches it. " + `The spec holds requirements, design, and decisions - never progress, status, or timestamps; a record of open items or progress is a document of its own. ${OWNER_REFERENCE} ${SPEC_WRITING_POINTER}`,
|
|
17544
17547
|
arguments: (z) => ({
|
|
17545
17548
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
17546
17549
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -17616,7 +17619,7 @@ var dispatchToolSpecs = [
|
|
|
17616
17619
|
verdict: "pass",
|
|
17617
17620
|
commit: "1111111111111111111111111111111111111111"
|
|
17618
17621
|
},
|
|
17619
|
-
description: "Record one result of one check of an issue's Verification document, or retract a result " + "recorded before. A record prints the pull-request body line it implies. Write that line " + "into the pull-request body unchanged: it is the one grammar every writer uses, and it " + "carries no link to Dispatch. " + "Name the check by its block id. Where two Verification documents in reach hold that id, " + "name it by its canonical reference (dispatch://KEY/artifact/verification-md#b-<id>). " + "409 CHECK_AMBIGUOUS names both documents. An id no Verification document of the issue " + "or of an issue above it holds is 400 UNKNOWN_CHECK. " + "A pass that counts a failed, a skipped or an excluded case contradicts itself, and is " + "400 RESULT_CONTRADICTS. " + "Dispatch asks GitHub whether the repository of the check's issue holds the commit. A " + "commit that repository does not hold is 400 RESULT_COMMIT_UNKNOWN, which names the " + "commit and that owner/repo. Record the result after the commit is pushed. A repository " + "Dispatch cannot read records the result as before. " + "The result is recorded against the check's own issue, so a child's run of a parent's " + "check appears under that check. A closed issue takes a result only for a check whose " + "when is after_merge or default_branch, the production check after the merge. It refuses " + "every other record with 409 ISSUE_CLOSED, as it refuses every other write. " + RESULT_RETRACT_RULE + " The retraction keeps both records: the result stays readable, and it proves nothing " + "from then on. Record a new result where the check still needs one. A retraction is " + "taken on a closed issue and for a check of any when. Three callers may retract: the " + "session that recorded the result, a session that holds the Dispatch claim of the issue " + "the result was recorded on, and a caller whose credential carries a person. Every other " + "caller is 403 RETRACTION_FORBIDDEN. A result retracted already is 409 RESULT_RETRACTED. " + ISSUE_REFERENCE,
|
|
17622
|
+
description: "Record one result of one check of an issue's Verification document, or retract a result " + "recorded before. A record prints the pull-request body line it implies. Write that line " + "into the pull-request body unchanged: it is the one grammar every writer uses, and it " + "carries no link to Dispatch. " + "Name the check by its block id. Where two Verification documents in reach hold that id, " + "name it by its canonical reference (dispatch://KEY/artifact/verification-md#b-<id>). " + "409 CHECK_AMBIGUOUS names both documents. An id no Verification document of the issue " + "or of an issue above it holds is 400 UNKNOWN_CHECK. " + `${CHECK_PROVED_BY_CI}. ` + "Dispatch reads its result from that run, so a record for it is 409 " + "CHECK_PROVED_BY_CI from every role, which names the check and the run. " + "A pass that counts a failed, a skipped or an excluded case contradicts itself, and is " + "400 RESULT_CONTRADICTS. " + "Dispatch asks GitHub whether the repository of the check's issue holds the commit. A " + "commit that repository does not hold is 400 RESULT_COMMIT_UNKNOWN, which names the " + "commit and that owner/repo. Record the result after the commit is pushed. A repository " + "Dispatch cannot read records the result as before. " + "The result is recorded against the check's own issue, so a child's run of a parent's " + "check appears under that check. A closed issue takes a result only for a check whose " + "when is after_merge or default_branch, the production check after the merge. It refuses " + "every other record with 409 ISSUE_CLOSED, as it refuses every other write. " + RESULT_RETRACT_RULE + " The retraction keeps both records: the result stays readable, and it proves nothing " + "from then on. Record a new result where the check still needs one. A retraction is " + "taken on a closed issue and for a check of any when. Three callers may retract: the " + "session that recorded the result, a session that holds the Dispatch claim of the issue " + "the result was recorded on, and a caller whose credential carries a person. Every other " + "caller is 403 RETRACTION_FORBIDDEN. A result retracted already is 409 RESULT_RETRACTED. " + ISSUE_REFERENCE,
|
|
17620
17623
|
arguments: (z) => ({
|
|
17621
17624
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
17622
17625
|
check: z.string().describe("The check block's id, or its canonical reference dispatch://KEY/artifact/verification-md#b-<id> when the id is not unique among the issue's Verification document and those of the issues above it.").optional(),
|
|
@@ -17643,10 +17646,10 @@ var dispatchToolSpecs = [
|
|
|
17643
17646
|
{
|
|
17644
17647
|
name: "dispatch_results",
|
|
17645
17648
|
example: { issue: "DSP-1" },
|
|
17646
|
-
description: "Print each check of an issue's Verification document with every result recorded against " + "it, newest first. " + "Each check prints what Dispatch compared its results with. A before_merge check is " + "compared with the head of each pull request Dispatch holds for the check's issue, open " + "or merged. An after_merge check is compared with the branch that issue's pull request " + "merged into and with the repository's default branch, and with the default branch alone " + "where Dispatch holds no merge of the issue. A default_branch check is compared with the " + "repository's default branch alone, whatever branch the pull request merged into. Where " + "a check compared with nothing, it says which of three things happened: the issue has no " + "pull request and no branch to compare with, Dispatch cannot read the repository, or a " + "read Dispatch made did not answer. " + "Each check then prints one line that answers the gate: whether a pass of it stands, and " + "from which roles. A pass stands when its commit is one of the commits the check " + "compared with, the check's words did not move after the result was recorded, and no " + "retraction stands against it. " + "The check's own words print once, under the check. Each result then prints its verdict, " + "its role, its whole 40-character commit, where that commit stands, whether the check's " + "words moved after it was recorded, the time, its id, and the reading the role recorded. " + "A result nobody gave a reading says so. A retracted result prints as retracted, with " + "the reason and the caller that retracted it. A check with no result says so. " + "A push that moves a pull request's head leaves a result at the commit before it, with " + "no write of anyone's: record the check again at the new head. " + ISSUE_REFERENCE,
|
|
17649
|
+
description: "Print each check of an issue's Verification document with every result recorded against " + "it, newest first. " + "Each check prints what Dispatch compared its results with. A before_merge check is " + "compared with the head of each pull request Dispatch holds for the check's issue, open " + "or merged. An after_merge check is compared with the branch that issue's pull request " + "merged into and with the repository's default branch, and with the default branch alone " + "where Dispatch holds no merge of the issue. A default_branch check is compared with the " + "repository's default branch alone, whatever branch the pull request merged into. Where " + "a check compared with nothing, it says which of three things happened: the issue has no " + "pull request and no branch to compare with, Dispatch cannot read the repository, or a " + "read Dispatch made did not answer. " + "Each check then prints one line that answers the gate: whether a pass of it stands, and " + "from which roles. A pass stands when its commit is one of the commits the check " + "compared with, the check's words did not move after the result was recorded, and no " + "retraction stands against it. " + "The check's own words print once, under the check. Each result then prints its verdict, " + "its role, its whole 40-character commit, where that commit stands, whether the check's " + "words moved after it was recorded, the time, its id, and the reading the role recorded. " + "A result nobody gave a reading says so. A retracted result prints as retracted, with " + "the reason and the caller that retracted it. A check with no result says so. " + `${CHECK_PROVED_BY_CI}: ` + "no role records its result, and Dispatch reads it from GitHub at the head of the " + "issue's open pull request of the highest number, else at the head of its merged one of " + "the highest number. Its one result prints as `- <id> (before_merge): <verdict> at " + "<commit> by ci (CI run <name>, <conclusion>), <where that commit stands>. <the check's " + "words>`, then the `A pass stands:` line a recorded check prints, then `Pull request line:` " + "and the line to write into the pull-request body unchanged, then the reading: the " + "conclusion, the run's output title and summary, and its URL. A run that proves nothing " + "prints `- <id> (before_merge): no result:`, the sentence that names why, and the check's " + "words, then the `A pass stands:` line, then `Pull request line:` and `- Check <id> " + "(before_merge): CI run <name> has no result (<case>)`. That is a run that has not " + "concluded, one that concluded neutral, skipped or cancelled, one absent at the head, an " + "issue with no pull request head, or GitHub not read, with what GitHub answered. " + "A push that moves a pull request's head leaves a result at the commit before it, with " + "no write of anyone's: record the check again at the new head. A check CI proves is read " + "again at the new head by itself. " + ISSUE_REFERENCE,
|
|
17647
17650
|
arguments: (z) => ({
|
|
17648
17651
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
17649
|
-
at: z.string().describe("One commit of 40 lowercase hex characters. It becomes the only thing every check is compared with
|
|
17652
|
+
at: z.string().describe("One commit of 40 lowercase hex characters. It becomes the only thing every check is compared with. Dispatch reads GitHub for none of it, except the check runs of a check CI proves, which it reads at the issue's newest pull request head as on every read, so that check's result stands at this commit only where it is that head.").optional(),
|
|
17650
17653
|
brief: z.boolean().describe("Cut each reading whose result stands at none of the compared commits to its first 200 characters. Every other reading prints whole.").optional()
|
|
17651
17654
|
})
|
|
17652
17655
|
},
|
|
@@ -17654,7 +17657,7 @@ var dispatchToolSpecs = [
|
|
|
17654
17657
|
name: "dispatch_artifact",
|
|
17655
17658
|
example: { issue: "DSP-1", name: "design.md", content: `# Design
|
|
17656
17659
|
` },
|
|
17657
|
-
description: "Attach a local file or inline text as an issue artifact or project document, or make an empty document from its name alone. Do not use it to edit a live document; use " + "dispatch doc-edit instead. Never upload a document's own name to change it (spec.md replaces the spec whole); edit it with dispatch doc-edit. " + `${ARTIFACT_SOURCE_RULE} ` + `${ARTIFACT_NAME_EXISTS_RULE} A call that stores nothing - no path, and content absent or blank - is refused under a held name even with force, so a title typed twice never empties the document that holds it. ` + "A markdown document is at most 1 MiB and any other file at most 25 MiB. " + `${ARTIFACT_CONTENT_NAME_RULE} ${ARTIFACT_STORED_TEXT_RULE} ` + "Markdown is also refused with 413 CAP_EXCEEDED when it makes more than 65,536 elements (a block weighs 3, and an empty list item, quote, footnote definition or typed block 3 more for the empty paragraph it holds; a table cell 4, a hard line break 3, an image 3, a piece of inline HTML 2, an autolink 2, a footnote reference 2; inline syntax, marks, lines of text and backslash escapes or character references 1 each), or when a new version would leave the document's stored markdown (what its text reads back as) longer than 1 MiB or making more than 65,536 elements, and longer or heavier than before; shorten it or split it across documents. " + "In a table row, write every | in a cell as \\|, in code too: a | after two backslashes ends the cell, and a row with more cells than its table is refused. " + "Markdown holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK; a new version of a document is held to it only for the asks it writes or changes. " + `${OWNER_REFERENCE}`,
|
|
17660
|
+
description: "Attach a local file or inline text as an issue artifact or project document, or make an empty document from its name alone. Do not use it to edit a live document; use " + "dispatch doc-edit instead. Never upload a document's own name to change it (spec.md replaces the spec whole); edit it with dispatch doc-edit. " + `${ARTIFACT_SOURCE_RULE} ` + `${ARTIFACT_NAME_EXISTS_RULE} A call that stores nothing - no path, and content absent or blank - is refused under a held name even with force, so a title typed twice never empties the document that holds it. ` + "A markdown document is at most 1 MiB and any other file at most 25 MiB. " + `${ARTIFACT_CONTENT_NAME_RULE} ${ARTIFACT_STORED_TEXT_RULE} ` + "Markdown is also refused with 413 CAP_EXCEEDED when it makes more than 65,536 elements (a block weighs 3, and an empty list item, quote, footnote definition or typed block 3 more for the empty paragraph it holds; a table cell 4, a hard line break 3, an image 3, a piece of inline HTML 2, an autolink 2, a footnote reference 2; inline syntax, marks, lines of text and backslash escapes or character references 1 each), or when a new version would leave the document's stored markdown (what its text reads back as) longer than 1 MiB or making more than 65,536 elements, and longer or heavier than before; shorten it or split it across documents. " + "In a table row, write every | in a cell as \\|, in code too: a | after two backslashes ends the cell, and a row with more cells than its table is refused. " + "Markdown holding an ask block whose body breaks its content rule (one or more question paragraphs, then at most one bullet list of options, last) is refused with 400 INVALID_ASK_BLOCK; a new version of a document is held to it only for the asks it writes or changes. " + `${CI_CHECK_RULE} ` + `${OWNER_REFERENCE}`,
|
|
17658
17661
|
arguments: (z) => ({
|
|
17659
17662
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
17660
17663
|
project: z.string().describe("Project key for an unlinked document.").optional(),
|
|
@@ -17673,7 +17676,7 @@ var dispatchToolSpecs = [
|
|
|
17673
17676
|
{
|
|
17674
17677
|
name: "dispatch_read",
|
|
17675
17678
|
example: { issue: "DSP-1" },
|
|
17676
|
-
description: "Read an issue or document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch doc-read instead. Supply ref, issue, " + "issue plus artifact (one of its documents), project plus artifact, or project alone, which lists the project's documents on no issue and nothing more; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). A document summary names its issue, reference, versions and approval. " + "An issue read lists every document, picture and file the issue holds under `Documents:`, each by slug, filename and kind. " + "An anchored comment or ask also says where its quote sits, as `Position:`: the block's path from the top, " + "and in a table the row (0 is the header), the cells before the anchored one, and the column's header; " + "`Position: unavailable (<code>)` when Dispatch could not read the document: `DOC_SERVICE_UNAVAILABLE` " + "(try again shortly), `DOC_SCHEMA` (the document needs repair), `DOCUMENT_UNLOADABLE` (the document " + "needs a rebuild) or `INTERNAL`. " + "An issue read carries a `Progress:` line, `tasks 3/7, children 2/5`: its spec's task-list items " + "(`- [ ]` / `- [x]`, nested lists included) and its direct children, each done of total and each only " + "when it has any (`Progress: none` otherwise). " + "An issue whose spec marks requirements carries one `Coverage:` line per gap, `Coverage: R3 has no check` or " + "`Coverage: R3 has no plan task` (the second only once the issue has a plan document), counting the `check` and " + "`plan_task` blocks of every document of the issue and of its descendants; a spec that marks none reads " + "`Coverage: the spec marks no requirements`. Nothing is refused for a gap. " + `An issue read, and its dispatch://KEY/log, lists the issue's last ${DEFAULT_ISSUE_READ_EVENTS} events, oldest first; ` + "--events N lists the last N, and --all-events every one. " + "A comment reply chain names the comment each nested reply answers as `Answers: <comment id>`. " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + "A block read prints `Block:`, `Type:` for a block of a document, `Document:`, every attribute a typed block carries " + "(a `check`'s serves, surface, run, when and
|
|
17679
|
+
description: "Read an issue or document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch doc-read instead. Supply ref, issue, " + "issue plus artifact (one of its documents), project plus artifact, or project alone, which lists the project's documents on no issue and nothing more; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). A document summary names its issue, reference, versions and approval. " + "An issue read lists every document, picture and file the issue holds under `Documents:`, each by slug, filename and kind. " + "An anchored comment or ask also says where its quote sits, as `Position:`: the block's path from the top, " + "and in a table the row (0 is the header), the cells before the anchored one, and the column's header; " + "`Position: unavailable (<code>)` when Dispatch could not read the document: `DOC_SERVICE_UNAVAILABLE` " + "(try again shortly), `DOC_SCHEMA` (the document needs repair), `DOCUMENT_UNLOADABLE` (the document " + "needs a rebuild) or `INTERNAL`. " + "An issue read carries a `Progress:` line, `tasks 3/7, children 2/5`: its spec's task-list items " + "(`- [ ]` / `- [x]`, nested lists included) and its direct children, each done of total and each only " + "when it has any (`Progress: none` otherwise). " + "An issue whose spec marks requirements carries one `Coverage:` line per gap, `Coverage: R3 has no check` or " + "`Coverage: R3 has no plan task` (the second only once the issue has a plan document), counting the `check` and " + "`plan_task` blocks of every document of the issue and of its descendants; a spec that marks none reads " + "`Coverage: the spec marks no requirements`. Nothing is refused for a gap. " + `An issue read, and its dispatch://KEY/log, lists the issue's last ${DEFAULT_ISSUE_READ_EVENTS} events, oldest first; ` + "--events N lists the last N, and --all-events every one. " + "A comment reply chain names the comment each nested reply answers as `Answers: <comment id>`. " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + "A block read prints `Block:`, `Type:` for a block of a document, `Document:`, every attribute a typed block carries " + "(a `check`'s serves, surface, run, when, negative_control and ci_check; a `plan_task`'s serves and needs), `Changed in version:` " + "and `Text:`, then those two sections; a pinned one adds " + "the block's text at that version and whether it is unchanged, changed or removed since, and an absent block, unpinned, " + "reads `No block <id> in <document>.` " + "The pictures the shown messages, asks and comments embed come back as images you see, newest first, at most 8 " + "and 10 MiB of them per read, each a PNG, JPEG, GIF or WebP of at most 3,750,000 bytes (5 MB of base64); a `Pictures:` section names each " + "one shown, in order, and the rest by reference, for dispatch doc-read. A picture this session was already shown is named, not sent again " + "(every request carries the session's history, and the provider refuses one over 32 MB); dispatch doc-read shows it again. " + OWNER_REFERENCE,
|
|
17677
17680
|
arguments: (z) => ({
|
|
17678
17681
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
17679
17682
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -24284,15 +24287,17 @@ function passStandsText(pass) {
|
|
|
24284
24287
|
return "A pass stands: no";
|
|
24285
24288
|
return "A pass stands: not known";
|
|
24286
24289
|
}
|
|
24287
|
-
function readingLines(result, brief) {
|
|
24290
|
+
function readingLines(result, brief, indent = " ") {
|
|
24288
24291
|
const observed = result.observed;
|
|
24289
24292
|
if (observed === "")
|
|
24290
|
-
return [
|
|
24293
|
+
return [`${indent}The role recorded no reading.`];
|
|
24291
24294
|
const cut = brief && result.commit_stands?.answer !== "at_basis";
|
|
24292
24295
|
if (cut && observed.length > BRIEF_READING_CHARACTERS) {
|
|
24293
|
-
return [
|
|
24296
|
+
return [
|
|
24297
|
+
`${indent}Reading: ${observed.slice(0, BRIEF_READING_CHARACTERS)}\u2026 (result ${result.id})`
|
|
24298
|
+
];
|
|
24294
24299
|
}
|
|
24295
|
-
return [
|
|
24300
|
+
return [`${indent}Reading: ${observed}`];
|
|
24296
24301
|
}
|
|
24297
24302
|
function resultLines(check, result, brief) {
|
|
24298
24303
|
const lines = [
|
|
@@ -24304,7 +24309,28 @@ function resultLines(check, result, brief) {
|
|
|
24304
24309
|
}
|
|
24305
24310
|
return [...lines, ...readingLines(result, brief)];
|
|
24306
24311
|
}
|
|
24312
|
+
function ciCheckLines(check, ci, brief) {
|
|
24313
|
+
const passStandsLine = ` ${passStandsText(check.pass_stands)}.`;
|
|
24314
|
+
const pullRequestLine = ` Pull request line: ${ci.line}`;
|
|
24315
|
+
const derived = check.results?.[0];
|
|
24316
|
+
if (derived === undefined) {
|
|
24317
|
+
return [
|
|
24318
|
+
`- ${check.block_id} (${check.when}): no result: ${ci.detail} ${check.text}`,
|
|
24319
|
+
passStandsLine,
|
|
24320
|
+
pullRequestLine
|
|
24321
|
+
];
|
|
24322
|
+
}
|
|
24323
|
+
const stands = commitStandsText(derived.commit_stands);
|
|
24324
|
+
return [
|
|
24325
|
+
`- ${check.block_id} (${check.when}): ${derived.verdict} at ${derived.commit_sha} by ${derived.role} (CI run ${ci.run}, ${ci.case}), ${stands.charAt(0).toLowerCase()}${stands.slice(1)}. ${check.text}`,
|
|
24326
|
+
passStandsLine,
|
|
24327
|
+
pullRequestLine,
|
|
24328
|
+
...readingLines(derived, brief, " ")
|
|
24329
|
+
];
|
|
24330
|
+
}
|
|
24307
24331
|
function checkLines(check, brief) {
|
|
24332
|
+
if (check.ci !== undefined)
|
|
24333
|
+
return ciCheckLines(check, check.ci, brief);
|
|
24308
24334
|
const bases = check.compared_with ?? [];
|
|
24309
24335
|
const reason = check.compared_nothing;
|
|
24310
24336
|
const compared = bases.length > 0 ? `Compared with ${bases.map(basisText).join(", ")}` : reason === undefined ? "Compared with nothing, and this Dispatch server does not say why" : `Compared with nothing: ${COMPARISON_REASONS[reason]}`;
|
|
@@ -28516,7 +28542,7 @@ import { logger as logger3 } from "@oh-my-pi/pi-utils";
|
|
|
28516
28542
|
// package.json
|
|
28517
28543
|
var package_default = {
|
|
28518
28544
|
name: "@sjawhar/pi-legion",
|
|
28519
|
-
version: "19.
|
|
28545
|
+
version: "19.14.0",
|
|
28520
28546
|
license: "Apache-2.0",
|
|
28521
28547
|
type: "module",
|
|
28522
28548
|
omp: {
|
|
@@ -31,7 +31,7 @@ An answered root stands in the admission line until the pass that resumes it, an
|
|
|
31
31
|
- Work in a repository this tree already has a pull request in, which waits on a sibling's merge, is no child and is not parked in `backlog`: write it into the spec of the issue whose pull request carries it — the parent's, or the sibling's when the parent's pull request is in another repository — so one pull request lands it in order.
|
|
32
32
|
- A child that duplicates another issue and is not yet released is never released: fold it by the duplicate rule of `skill://dispatch-first`. The daemon records a child at its release and re-asserts a status only on an issue it has recorded, so that close stands. A released duplicate goes out with `park_child` instead, because its work is folded into the issue you keep. Move an issue to `backlog`, `icebox` or `triage` only when a person asked for that move, or when the work is done, folded into another issue or no longer needed, and cite that reason in a comment on the issue: for a duplicate, name the issue you keep in a `dispatch comment` on the child.
|
|
33
33
|
- Every child names the running system its criteria are proven on (the command, service or page the tester drives) and the repository skill that drives it. If the repository cannot exercise a criterion end to end, building that path is work of this tree.
|
|
34
|
-
- The issue's primary document is the root spec: extend it in place, because a second "spec" artifact replaces the human's document. Mark each requirement of it as a `requirement` block, and write the issue's Verification document (`verification.md`) beside it: one `check` block per thing to be proved, each with `serves` naming the requirements it serves, its `surface` (`browser`, `cli` or `api`), `run`, `when` (`before_merge`, `after_merge` or `default_branch`) and `negative_control`. The checks are the gate every later role reads: the implementer and the tester record a result against each
|
|
34
|
+
- The issue's primary document is the root spec: extend it in place, because a second "spec" artifact replaces the human's document. Mark each requirement of it as a `requirement` block, and write the issue's Verification document (`verification.md`) beside it: one `check` block per thing to be proved, each with `serves` naming the requirements it serves, its `surface` (`browser`, `cli` or `api`), `run`, `when` (`before_merge`, `after_merge` or `default_branch`) and `negative_control`. A check carrying `ci_check` is CI's: it names the CI check run that proves it and takes no `run` (`skill://legion-architect/references/design-gate.md#a-check-ci-proves`). Where a CI job that runs on an ordinary pull request already makes a check's proof, write `ci_check` rather than a command. The checks are the gate every later role reads: the implementer and the tester record a result against each check with no `ci_check`, and the reviewer approves only once a pass stands for every `before_merge` check at the head. The decomposition's order and the plan's tasks go in the children and the planner's `plan` handoff, not the root spec.
|
|
35
35
|
- Before you write a design, state the problem to `task(agent="design-outsider")` and read its answer with `wait`. The brief holds the problem statement and the design principles, and no design of your own. The four questions are where the proposal is stupid, whether the thing in question should exist at all, what the smallest thing that gives the person what they asked for is, and what to delete. Record the answer in a comment on the issue, or in the issue's `plan.md` where one exists, before any action that states or favours a design, and give your reason where you do not follow it. Run the step once per design: at the first design of an issue, and again when a push-back or a review changes what the design is for. It is a challenge, never a gate.
|
|
36
36
|
- Read `skill://legion-architect/references/design-gate.md` before you write the root spec and before any edit to it after approval, because any new version closes the gate. It also names the design gate steps your `Legion addressing` line declares, the document each step records, and says that a sub-architect runs none.
|
|
37
37
|
- **Show the surface before you ask.** Where this tree builds or changes a surface a person opens — a page, a screen, a dashboard — that person sees it and answers before you ask them to approve the spec, because they refuse a spec for a surface they have not seen. Whether a change needs that is your judgement, and a large visual change wants a page they can click rather than a picture. The readings, the round and where the pictures end up: `skill://legion-architect/references/design-gate.md`, "Show the surface before you ask". A change whose only reader surface is text carries that literal text in the spec instead; a change with no reader surface carries neither.
|
|
@@ -79,7 +79,7 @@ A tree often brings its own shortfall written up; that is no permission: your jo
|
|
|
79
79
|
Post it as a `dispatch comment` naming each check and its result, then `legion({ op: "sign_off", issue: "<KEY>" })`.
|
|
80
80
|
|
|
81
81
|
- `sign_off` works only in `accepting` (`SIGNOFF_OUTSIDE_ACCEPTING`), and the daemon refuses it while an issue beneath it is still in the workflow (`SIGNOFF_CHILD_IN_WORKFLOW`, naming each one), so a parent is accepted after its children, on the head of its last round (section 4).
|
|
82
|
-
- When no pass stands for a check at that head, or a result contradicts what you read: `request_backward_move` with `issue`, `to` (`implementing` or `testing`) and a `reason` naming the check by its block id. It counts a review round.
|
|
82
|
+
- When no pass stands for a check at that head, or a result contradicts what you read: `request_backward_move` with `issue`, `to` (`implementing` or `testing`) and a `reason` naming the check by its block id. It counts a review round. A `ci_check` run still going, or GitHub unread, is waited for and moves nothing back. A name no run answers is yours to correct in the check's words.
|
|
83
83
|
- On every end-game wake (`phase-finished`, `catch-up`, `checks-red`, `review-stuck`), read `gh pr view <n> --json mergeable,mergeStateStatus`, because a `CONFLICTING` pull request gets no CI and no wake. Then, and after acceptance, follow `skill://legion-architect/references/acceptance.md`.
|
|
84
84
|
|
|
85
85
|
## 7. Close
|
|
@@ -84,8 +84,8 @@ until this round, where its head must meet it.
|
|
|
84
84
|
Then, in one turn:
|
|
85
85
|
|
|
86
86
|
1. `envoy_publish` to the tester's role topic: "The next round of <KEY> is its last round: a full
|
|
87
|
-
test round of every check of the issue
|
|
88
|
-
reason reaches only the implementer.
|
|
87
|
+
test round of every check of the issue with no `ci_check`, not the forward-merge re-check." The
|
|
88
|
+
backward move's reason reaches only the implementer.
|
|
89
89
|
2. `request_backward_move` to `implementing`, with the reason "Last round: merge the default
|
|
90
90
|
branch your addressing line names into the branch, push, end your forward-merge comment with
|
|
91
91
|
`parent's last round: full test round`, and complete." Never use a hard-coded `main`. The move
|
|
@@ -102,8 +102,9 @@ A criterion proven on a deployed system is proven after that child's deploy, as
|
|
|
102
102
|
deploy skill says.
|
|
103
103
|
|
|
104
104
|
If the pull request merged before its last round, it can carry no new head, so move nothing back.
|
|
105
|
-
Once they have closed, have a fresh `task` subagent run each check on the
|
|
106
|
-
record each result
|
|
105
|
+
Once they have closed, have a fresh `task` subagent run each check with no `ci_check` on the
|
|
106
|
+
default branch and record each result. Read each `ci_check` check's derived result in
|
|
107
|
+
`dispatch results`, which no role records. Post them in the acceptance comment, then `sign_off`.
|
|
107
108
|
|
|
108
109
|
## The order after your acceptance
|
|
109
110
|
|
|
@@ -21,8 +21,9 @@ Mark each requirement of the spec as a `requirement` block, and write the issue'
|
|
|
21
21
|
document (`verification.md`) with it, uploading each version after the first with `--force`: one
|
|
22
22
|
`check` block per thing that must be proved, each with
|
|
23
23
|
`serves` naming the requirements it serves, its `surface`, its `run`, its `when` and its
|
|
24
|
-
`negative_control
|
|
25
|
-
|
|
24
|
+
`negative_control`, or `ci_check` in place of its `run` (below). The human approves both
|
|
25
|
+
documents in one request (step 4 below), and every later role reads the checks: the implementer
|
|
26
|
+
and the tester record a result against each check with no `ci_check`, and the
|
|
26
27
|
reviewer approves only once a pass stands for every `before_merge` check at the head, which is the
|
|
27
28
|
check's own answer in `dispatch results --issue <issue>`, and never a pass at another commit, a
|
|
28
29
|
pass recorded under an older wording of the check or a retracted one.
|
|
@@ -34,6 +35,27 @@ answer, Slack message or direct message of a `Filed for <person> at their reques
|
|
|
34
35
|
evidence of a controller's `Filed for Legion from <role> on <issue>:` line
|
|
35
36
|
([The `Filed for` line](skill://legion-controller/references/finding-asks.md#the-filed-for-line)).
|
|
36
37
|
|
|
38
|
+
## A check CI proves
|
|
39
|
+
|
|
40
|
+
A check carrying `ci_check` is CI's: `ci_check` names the GitHub check run that proves the check
|
|
41
|
+
at the head, and the check takes no `run`. Its `when` is `before_merge`, and it names its
|
|
42
|
+
`negative_control`. No role runs it or records a result for it. `dispatch results` derives its
|
|
43
|
+
one result from the named run (`skill://legion-worker/references/ci-checks.md`). Where a CI job
|
|
44
|
+
that runs on an ordinary pull request already makes a check's proof, write that check as
|
|
45
|
+
`ci_check` rather than as a command. Write such a check by three rules:
|
|
46
|
+
|
|
47
|
+
1. Name the check run of the job that runs the proof, never a roll-up run that stands for other
|
|
48
|
+
jobs. A roll-up run can pass at a head where the job of the check did not run.
|
|
49
|
+
2. Name no job that the repository holds back from an ordinary pull request. Such a job gives no
|
|
50
|
+
pass at any head the reviewer reads, so its proof stays a check with a `run`.
|
|
51
|
+
3. Write in `negative_control` the case inside that job that fails when the property breaks. A
|
|
52
|
+
job's conclusion is not the property: a step with `continue-on-error` keeps its job green,
|
|
53
|
+
and a test deleted from a suite takes its failure with it.
|
|
54
|
+
|
|
55
|
+
On cybermonklabs/legion: `ci-ok` passes when the jobs it did not select were skipped
|
|
56
|
+
(`.github/scripts/ci-ok.sh`), so never name `ci-ok`. Eight slow suites and the full browser lane
|
|
57
|
+
run only in the merge queue or under `full-ci`.
|
|
58
|
+
|
|
37
59
|
## Show the surface before you ask
|
|
38
60
|
|
|
39
61
|
Where this tree builds or changes a surface a person opens — a page, a screen, a dashboard — that
|
|
@@ -44,12 +44,20 @@ for a finished retro only.
|
|
|
44
44
|
at the version your task's `Handoff:` line names, `--phase review --version <n>`, the command
|
|
45
45
|
that line quotes). A pass stands for every `before_merge` check of the issue at the approved
|
|
46
46
|
head, from the implementer and from the tester alike, and the pull request
|
|
47
|
-
body's `Checks` block carries each of those lines.
|
|
47
|
+
body's `Checks` block carries each of those lines. A check carrying `ci_check` is CI's: the
|
|
48
|
+
result that `dispatch results` derives is the pass it needs, and its CI job is its evidence
|
|
49
|
+
(`skill://legion-worker/references/ci-checks.md`). In
|
|
48
50
|
cybermonklabs/legion a surface may also be the daemon's real-process tests, a live proof under
|
|
49
51
|
`scripts/e2e/`, or a live check at the operator's next daemon restart recorded on the pull
|
|
50
|
-
request.
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
request. A `ci_check` check has no pass standing at that head when its derived result is a
|
|
53
|
+
fail, or its run concluded `skipped`, `neutral` or `cancelled`. Wait for a run that has not
|
|
54
|
+
concluded, and read again where GitHub could not be read. Send a name that no run answers
|
|
55
|
+
(`absent`) to the architect as a finding, because the words of the check are wrong. Neither
|
|
56
|
+
wait nor that finding moves the issue back. When a check has no pass standing at that head, or
|
|
57
|
+
a check with no `ci_check` has a unit suite as its only evidence, call the `legion` tool's
|
|
58
|
+
`request_backward_move` with `to: implementing` for the implementer's result or a `ci_check`
|
|
59
|
+
check, or `to: testing` for the tester's result, its `reason` naming the check by its block
|
|
60
|
+
id. When
|
|
53
61
|
retro runs again, that gap is your first learning.
|
|
54
62
|
2. **Get a second reading**, because a reader without your context sees what you stopped seeing.
|
|
55
63
|
First list, in your session, the constraints the issue did not state, choices between two
|
|
@@ -52,7 +52,7 @@ Read each by its `skill://` link: a read by path stops at 300 lines.
|
|
|
52
52
|
|
|
53
53
|
- Before a push, run the identity check (`skill://legion-worker/references/default-branch-check.md`) and then, with the `$default` it set, read your branch's own commit messages: `jj -R "$LEGION_WORKSPACE" log -r "${default}@origin..@" -T 'description ++ "\n"'` — earlier phases' commits in it are expected; never `ancestors(@, 5)`, which stops at five where one measurement found branches of 12 and 28 commits, and never `description.first_line()`, which shows no trailer. Invent no trailer of your own: the pane's jj appends `Omp-Session:` to every commit the pane's shell makes, in any jj repository, and, for a repository the deployment names, the issue line `Dispatch: <KEY>` beside it, that one scoped to the pane's own workspace. A jj repository you clone or create under that workspace is stamped like the workspace, so a commit you make in one carries this deployment's issue key: clone a repository you will push elsewhere outside `$LEGION_WORKSPACE`, and push no commit made under it to a repository that takes no issue key. Three commits carry neither — one `git` made in the colocated workspace, one another process made outside the pane's shell, and, on the Claude harness, one a subagent's bash made, which may not carry the session's environment file (anthropics/claude-code#46696, which `packages/claude-envoy/hooks/session-hook.ts` records and ships a `dispatch` fallback for, though one measurement on the pinned release found those exports present there). A commit of yours that shows a line short is cured by describing it again, since the trailer is appended when a description is set. A re-describe appends the issue line only where the shell it runs in has the pane's jj config overlay, so it adds nothing in a shell that carries none — a subagent's bash, or a pane whose overlay the writer could not make. Where it adds nothing, write the line yourself: put `Dispatch: $LEGION_ISSUE_TRAILER` into the description as a trailer line of its own, and only when `LEGION_ISSUE_TRAILER` is set, since that variable is the deployment's own name for the key this repository takes, and an unset one means the repository takes no key and the line belongs in no commit of it. Look because a base branch can require the issue line in the commit that lands: a squash builds that message from the branch's commit messages, and it leaves a merge commit's message out, so the line belongs in an ordinary commit.
|
|
54
54
|
- Only work is pushed: code, red tests, a forward merge, a rewrite, and the empty commit that carries the pull request onto the commit you pushed (the bullet below). No commit message carries a line or bracket keyword that stops GitHub's workflows (`[skip ci]` and its kin), since every head needs its own checks and a base that requires a check will not merge a head whose checks never ran. Retro pushes nothing: it records what the work taught with `dispatch comment` on the issue.
|
|
55
|
-
- **After a push, read the pull request's head and check that it is your commit.** A branch and a pull request are two objects on GitHub: the push moves the branch, and GitHub then moves the pull request onto the new commit, which is what starts its checks, and a push GitHub does not follow leaves the newer commit with no checks while Legion reads and tests the older one. The step applies once the branch has an open pull request, whose number your task's `Pull request:` line names (`gh pr list --repo <the issue's repository> --head legion/<KEY> --state open --json number --jq '.[0].number'` when it names none): run `gh pr view <n> --repo <the issue's repository> --json headRefOid --jq .headRefOid` about ten seconds after your push, again about ten seconds later, and a last time about thirty seconds after that, with a read that gives the pushed commit ending the step there and only the last read deciding a mismatch, and compare each answer with the commit you pushed, which `jj -R "$LEGION_WORKSPACE" log -r legion/<KEY>@origin --no-graph -T commit_id` prints in the 40 characters `headRefOid` answers in. This read is of the pull request's own head and of no check, so the wait it makes is not a wait on CI (`skill://legion-worker/references/pr-body.md#never-waiting-on-ci`). When the last read still is not your commit, carry the pull request with a commit of its own, an empty one when your work is complete and an empty one just as much when `@` holds work of yours, since a push of a commit the branch already holds moves no ref; the push section of your role prompt gives the one `jj` recipe, which leaves `@` and everything in it where it is. A new head is a different commit, so record each `before_merge` check again at the new head. When that second push does not carry the pull request either, tell your architect the commit you pushed, the head each read gave and the time of each, and end the turn with a WAITING line naming that answer rather than completing: a phase completed here hands the next role a commit the pull request does not name. The push you make to answer an update task is the exception: that task has you answer the daemon and end the turn at once, so make this read in your next turn, before your phase completes. The merger pushes nothing, so this step never falls to it; it reports a mismatch it sees to the architect.
|
|
55
|
+
- **After a push, read the pull request's head and check that it is your commit.** A branch and a pull request are two objects on GitHub: the push moves the branch, and GitHub then moves the pull request onto the new commit, which is what starts its checks, and a push GitHub does not follow leaves the newer commit with no checks while Legion reads and tests the older one. The step applies once the branch has an open pull request, whose number your task's `Pull request:` line names (`gh pr list --repo <the issue's repository> --head legion/<KEY> --state open --json number --jq '.[0].number'` when it names none): run `gh pr view <n> --repo <the issue's repository> --json headRefOid --jq .headRefOid` about ten seconds after your push, again about ten seconds later, and a last time about thirty seconds after that, with a read that gives the pushed commit ending the step there and only the last read deciding a mismatch, and compare each answer with the commit you pushed, which `jj -R "$LEGION_WORKSPACE" log -r legion/<KEY>@origin --no-graph -T commit_id` prints in the 40 characters `headRefOid` answers in. This read is of the pull request's own head and of no check, so the wait it makes is not a wait on CI (`skill://legion-worker/references/pr-body.md#never-waiting-on-ci`). When the last read still is not your commit, carry the pull request with a commit of its own, an empty one when your work is complete and an empty one just as much when `@` holds work of yours, since a push of a commit the branch already holds moves no ref; the push section of your role prompt gives the one `jj` recipe, which leaves `@` and everything in it where it is. A new head is a different commit, so record each `before_merge` check again at the new head. A check carrying `ci_check` is CI's, so skip it. When that second push does not carry the pull request either, tell your architect the commit you pushed, the head each read gave and the time of each, and end the turn with a WAITING line naming that answer rather than completing: a phase completed here hands the next role a commit the pull request does not name. The push you make to answer an update task is the exception: that task has you answer the daemon and end the turn at once, so make this read in your next turn, before your phase completes. The merger pushes nothing, so this step never falls to it; it reports a mismatch it sees to the architect.
|
|
56
56
|
- A planner whose issue moved back from implementing starts on the remote tip, `jj -R "$LEGION_WORKSPACE" new legion/<KEY>@origin`, so a commit it makes never sits on the implementer's unpushed commits.
|
|
57
57
|
|
|
58
58
|
## PR body, review, and the merge gate
|
|
@@ -71,4 +71,4 @@ Read each by its `skill://` link: a read by path stops at 300 lines.
|
|
|
71
71
|
|
|
72
72
|
## Deployment instructions
|
|
73
73
|
|
|
74
|
-
Deployment instructions in your prompt override this skill where they conflict, except four rules: no deferrals; bringing the base into the branch only on a real conflict, a need only the base meets, a retarget, or a parent's last round (`skill://legion-worker/references/conflicts-and-rewrites.md#reintegrating-the-base`); the implementer's own result for every `before_merge` check
|
|
74
|
+
Deployment instructions in your prompt override this skill where they conflict, except four rules: no deferrals; bringing the base into the branch only on a real conflict, a need only the base meets, a retarget, or a parent's last round (`skill://legion-worker/references/conflicts-and-rewrites.md#reintegrating-the-base`); the implementer's own result for every `before_merge` check with no `ci_check`, on a production-like surface at the head that merges, an applied simplify head included (`skill://legion-worker/references/pr-body.md#what-a-result-is`, `skill://legion-worker/references/pr-body.md#the-rules-every-phases-evidence-follows`, `skill://legion-worker/references/ci-checks.md`); and the production check after the close, the tester's wherever the project's `production_check` does not say `off` (`skill://legion-worker/references/merge-gate.md#the-production-check-after-the-close`).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# A check CI proves
|
|
2
|
+
|
|
3
|
+
Part of `skill://legion-worker`. Read it when a check of the issue's Verification document
|
|
4
|
+
carries `ci_check`, before you run, record, judge or write the line of any check. Every path it
|
|
5
|
+
cites is in cybermonklabs/legion.
|
|
6
|
+
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
A `check` block can carry `ci_check`: the name of the GitHub check run that proves the check at
|
|
10
|
+
the head. Such a check has no `run`, its `when` is `before_merge`, and it names its
|
|
11
|
+
`negative_control`. Through the documents API, Dispatch refuses a write that breaks one of these
|
|
12
|
+
rules, or that gives `ci_check` to a check that already holds a recorded result. A write in the
|
|
13
|
+
live editor lands, and the next settlement removes that `ci_check` and names the rule in the
|
|
14
|
+
issue's Activity.
|
|
15
|
+
|
|
16
|
+
## No role runs it
|
|
17
|
+
|
|
18
|
+
A check carrying `ci_check` is CI's. No role runs its work in its own pod, and no role records a
|
|
19
|
+
result for it: Dispatch refuses such a result with `409 CHECK_PROVED_BY_CI`. The CI job stays a
|
|
20
|
+
job like any other, and the rules for a red CI job apply to it. `dispatch results --issue <issue>`
|
|
21
|
+
reads the named check run at the head of the issue's pull request. It prints the one result it
|
|
22
|
+
derives from that run, the same `A pass stands:` line a recorded check gets, and the line for the
|
|
23
|
+
pull request body:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
- <id> (before_merge): <verdict> at <sha> by ci (CI run <name>, <conclusion>), <currency>. <text>
|
|
27
|
+
A pass stands: <yes, from ci | no | not known>.
|
|
28
|
+
Pull request line: - Check <id> (before_merge): <verdict> at <sha>, from CI run <name>. <words>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
When the run gives no result, the command prints the case in place of a verdict:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- <id> (before_merge): no result: <detail> <text>
|
|
35
|
+
A pass stands: <no | not known>.
|
|
36
|
+
Pull request line: - Check <id> (before_merge): CI run <name> has no result (<case>)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The case is one of these:
|
|
40
|
+
|
|
41
|
+
- `not_completed`: the run is still going.
|
|
42
|
+
- `absent`: no run of that name is at the head.
|
|
43
|
+
- `no_head`: Dispatch holds no pull request head of the issue.
|
|
44
|
+
- `neutral`, `skipped` or `cancelled`: the run concluded and proved nothing.
|
|
45
|
+
|
|
46
|
+
The case `github_unreadable` means that Dispatch could not read GitHub. That read is neither a
|
|
47
|
+
pass nor a fail, and the next read tries again. The tester and the reviewer treat it as a run that
|
|
48
|
+
is still going (below). Each read is made at the head, so a push needs no write from any role.
|
|
49
|
+
|
|
50
|
+
## The tester
|
|
51
|
+
|
|
52
|
+
Read `dispatch results --issue <issue>` first. Then run and record only the checks that carry no
|
|
53
|
+
`ci_check`, and the proofs on a real surface that CI cannot make. A check with `ci_check` needs no
|
|
54
|
+
pass from the implementer. It is an entry in `failures` only when its derived result is a fail, or
|
|
55
|
+
its run concluded `skipped`, `neutral` or `cancelled`.
|
|
56
|
+
|
|
57
|
+
## The `Checks` line
|
|
58
|
+
|
|
59
|
+
The implementer writes the line of each such check in the pull request body's `Checks` block. It
|
|
60
|
+
copies the `Pull request line` that `dispatch results` prints. While the named run gives no
|
|
61
|
+
result, that line is the no-result line. The next role that writes the body reads
|
|
62
|
+
`dispatch results` again and puts the derived line in its place.
|
|
63
|
+
|
|
64
|
+
## A run that is still going
|
|
65
|
+
|
|
66
|
+
A named run that has not concluded is no test failure, and it is the fault of no role. The tester
|
|
67
|
+
writes in its `test` handoff's `implementerProof.how` that the run is still going. The handoff
|
|
68
|
+
gets no new field, and the tester fails no round for the run.
|
|
69
|
+
|
|
70
|
+
The reviewer waits for that run by its name, as it waits for a required check that GitHub shows
|
|
71
|
+
`queued` or `in progress`. Until the run concludes, the reviewer does not approve and does not
|
|
72
|
+
request changes for that check. The named run is usually not one the base branch requires, so the
|
|
73
|
+
wait on required checks does not cover it.
|
|
74
|
+
|
|
75
|
+
## A name that no run answers
|
|
76
|
+
|
|
77
|
+
When the head's checks have settled and no run of the named name answers, the words of the check
|
|
78
|
+
are wrong. The tester and the reviewer each send this to the architect as a finding, with
|
|
79
|
+
`envoy_publish` to its role topic. The architect corrects the name or gives the check a command.
|
|
80
|
+
Neither role fails the round or requests changes for it, because the change under review is not
|
|
81
|
+
what is wrong.
|
|
82
|
+
|
|
83
|
+
## What the evidence is
|
|
84
|
+
|
|
85
|
+
The CI job that `ci_check` names is the proof of that check at the head, and no role repeats it.
|
|
86
|
+
This is true also when the job is a unit or integration suite, which proves no other check.
|
|
87
|
+
The limit: such a check claims only that the named job passed at that head. It never takes the
|
|
88
|
+
place of the proof a tester makes on a real surface. The tester continues to prove the surface
|
|
89
|
+
with the checks that CI cannot run.
|
|
90
|
+
|
|
91
|
+
## How the architect writes one
|
|
92
|
+
|
|
93
|
+
The architect names the job and its `negative_control` by three rules:
|
|
94
|
+
[A check CI proves](skill://legion-architect/references/design-gate.md#a-check-ci-proves) in
|
|
95
|
+
`skill://legion-architect/references/design-gate.md`.
|
|
@@ -17,7 +17,7 @@ Every path it cites is in cybermonklabs/legion.
|
|
|
17
17
|
base. Otherwise, never reintegrate the base to pick up the default branch or refresh CI. Each
|
|
18
18
|
merge is a new head, reruns CI and can void a review. A single failed CI job is re-run on its
|
|
19
19
|
own (*Never waiting on CI* in `skill://legion-worker/references/pr-body.md`). After any forward merge, build the branch and
|
|
20
|
-
record the issue's checks again at the merge head, even with no text conflict: a clean merge once changed a
|
|
20
|
+
record the issue's checks again at the merge head, each check with no `ci_check` (a check carrying one is read again from its CI run), even with no text conflict: a clean merge once changed a
|
|
21
21
|
function's arity under the branch's own callers. Before you race another tree's pull request on
|
|
22
22
|
shared files, `envoy_publish` to its implementer's role topic, ask when its next push lands, and
|
|
23
23
|
merge once, after it. A forward merge that leaves the branch's diff unchanged is a
|
|
@@ -70,6 +70,7 @@ as the fingerprint decides (*The reviewer*, below, and
|
|
|
70
70
|
run at the head holds the job, or nothing will run it (a check only a commit status reports, a
|
|
71
71
|
workflow another repository defines), tell the architect and do not approve.
|
|
72
72
|
Approval is refused while any `before_merge` check of the issue's own Verification document has no pass standing at the head being reviewed: `REQUEST_CHANGES` naming each such check by its block id, and `dispatch results --issue <issue>` is the read that decides it, under the check's own line saying whether a pass stands and from which roles. That answer leaves out a pass at another commit, a pass recorded under an older wording of the check and a retracted pass, each of which the command still prints; a fail recorded after a pass leaves that pass standing until someone retracts it.
|
|
73
|
+
A check carrying `ci_check` is CI's: the one result that `dispatch results` derives from the named run decides it (`skill://legion-worker/references/ci-checks.md`). While that run has not concluded, wait for it by its name, and do not approve or request changes for that check. Wait the same way where GitHub could not be read. When no run of that name answers after the head's checks settle, tell the architect as a finding and request no changes for it.
|
|
73
74
|
An issue with no Verification document, or whose Verification document holds no `before_merge` check, is a gap you name in the review body, never a review that asks for changes: say which of the two it is, and tell the architect, who writes the checks. Your own findings and the checks that do exist still decide the review, and on an issue that has none the architect's acceptance is the gate.
|
|
74
75
|
A result proves the head it was recorded at. A result a child recorded against a root's check proves nothing for the root, since it was recorded at the child's head, and a child never records the result that proves a root's check. A child that carries part of a root's requirement proves it with a check on the child's own Verification document whose `serves` names that requirement, at the child's own head. A root's own checks are proven at the root's own head, or, for an `after_merge` check, on the branch the root's pull request merged into or on the repository's default branch, in the root's last round.
|
|
75
76
|
On a docs-only PR the `Thermo` line still records the simplify pass and the defects it
|
|
@@ -34,8 +34,11 @@ later phase keeps it current rather than replacing it:
|
|
|
34
34
|
<verdict>. (on a docs-only PR the simplify half and the defects are recorded as on any other diff, and the pair half reads `thermonuclear pair: not run (docs-only)`)
|
|
35
35
|
|
|
36
36
|
**Checks:** one line per `check` block of the issue's Verification document, in the document's
|
|
37
|
-
order
|
|
37
|
+
order. Each is the line `dispatch result` printed when the result was recorded, or the
|
|
38
|
+
`Pull request line` that `dispatch results` prints for a check with `ci_check`:
|
|
38
39
|
- Check <block id> (<when>): <pass|fail> at <the commit>, recorded by <role>. <the reading that role recorded, cut with an ellipsis where it is long>
|
|
40
|
+
- Check <block id> (before_merge): <pass|fail> at <the commit>, from CI run <name>. <the check's words>
|
|
41
|
+
- Check <block id> (before_merge): CI run <name> has no result (<case>)
|
|
39
42
|
- Check <block id> (after_merge): not yet run
|
|
40
43
|
|
|
41
44
|
**Fast-follow:** "none", or one named cleanup item in a file this pull request does not touch, and where it will land.
|
|
@@ -90,8 +93,9 @@ longer describes the diff is a finding against the implementer, not a line the m
|
|
|
90
93
|
**A check** is a `check` block of the issue's Verification document (`verification.md`). It names
|
|
91
94
|
the requirements it serves, where a person reaches the change (`surface`: `browser`, `cli` or
|
|
92
95
|
`api`), what to `run`, `when` it runs (`before_merge`, `after_merge` or `default_branch`) and its
|
|
93
|
-
`negative_control`.
|
|
94
|
-
|
|
96
|
+
`negative_control`. A check with `ci_check` names the CI check run that proves it in place of a
|
|
97
|
+
`run` (`skill://legion-worker/references/ci-checks.md`). The architect writes the checks with the
|
|
98
|
+
spec; nothing else decides what must be proved.
|
|
95
99
|
|
|
96
100
|
**A result** is one run of one check, recorded with
|
|
97
101
|
`dispatch result --issue <issue> --check <block id> --role <your role> --verdict pass --commit <sha>`,
|
|
@@ -101,7 +105,8 @@ The surface is **production-like** — the repository's real-process test harnes
|
|
|
101
105
|
sandbox repository, a real browser, a devN stack, staging, or a local stack with real migrations,
|
|
102
106
|
one that has the resource the change touches — and `--run` or `--observed` carries a **link** to
|
|
103
107
|
that run, screenshot or e2e; human review does not replace user-facing verification, and a green
|
|
104
|
-
unit suite is not it. A unit or integration test is a regression lock, never a check's result
|
|
108
|
+
unit suite is not it. A unit or integration test is a regression lock, never a check's result,
|
|
109
|
+
except as the CI job that a check's `ci_check` names.
|
|
105
110
|
The agent that develops the change records its results this way before the merge, and whatever
|
|
106
111
|
blocks a check is fixed, not skipped (*When no surface reaches the changed path*, below).
|
|
107
112
|
|
|
@@ -124,10 +129,10 @@ a merged one, and while the check's words have not changed since; an `after_merg
|
|
|
124
129
|
a commit the branch its own issue's pull request merged into carries, or the repository's default
|
|
125
130
|
branch does — that default branch alone where Dispatch knows of no merge of that issue — and a
|
|
126
131
|
`default_branch` result only a commit the repository's default branch carries.
|
|
127
|
-
A push moves the head, with no Dispatch write of anyone's, so each check
|
|
128
|
-
new head. `dispatch results --issue <issue>` prints each check with the
|
|
129
|
-
it and the commit each one was recorded at;
|
|
130
|
-
requirement of the spec no check serves.
|
|
132
|
+
A push moves the head, with no Dispatch write of anyone's, so each check with no `ci_check` is
|
|
133
|
+
recorded again at the new head. `dispatch results --issue <issue>` prints each check with the
|
|
134
|
+
results recorded against it and the commit each one was recorded at;
|
|
135
|
+
`dispatch read --issue <issue>` names each requirement of the spec no check serves.
|
|
131
136
|
|
|
132
137
|
**An issue is proved by its own checks.** Approval is gated by the `before_merge` checks of its
|
|
133
138
|
own Verification document, read at its own head, so a result a child recorded proves nothing for
|
|
@@ -146,20 +151,26 @@ and decides there, the only gate on such an issue.
|
|
|
146
151
|
## The rules every phase's evidence follows
|
|
147
152
|
|
|
148
153
|
- **The implementer records a result for every `before_merge` check before its phase completes,
|
|
149
|
-
and writes the `Checks` lines when the pull request opens.**
|
|
154
|
+
and writes the `Checks` lines when the pull request opens.** A check carrying `ci_check` is
|
|
155
|
+
CI's: the implementer records nothing for it and copies its `Pull request line` from
|
|
156
|
+
`dispatch results` (`skill://legion-worker/references/ci-checks.md`).
|
|
150
157
|
A check with no surface yet is the report of *When no surface reaches the changed path* below,
|
|
151
158
|
never a check left unrecorded. The results are on the Dispatch issue, the lines in the
|
|
152
159
|
PR body, because the reviewer and the merger verify facts on GitHub and never from a handoff.
|
|
153
160
|
The `implement` handoff carries none: Dispatch holds them, and the tester reads them with
|
|
154
161
|
`dispatch results`.
|
|
155
|
-
- **The tester judges the implementer's results and records its own.** It
|
|
162
|
+
- **The tester judges the implementer's results and records its own.** It runs and records no
|
|
163
|
+
check with `ci_check`, whose result `dispatch results` derives. A derived fail, or a run that
|
|
164
|
+
concluded `skipped`, `neutral` or `cancelled`, is a test failure. A run still going, or GitHub
|
|
165
|
+
unread, goes in `implementerProof.how` and fails no round. A name no run answers once the head's
|
|
166
|
+
checks have settled goes to the architect as a finding. It re-runs the
|
|
156
167
|
implementer's command or drives the same surface independently, and records the verdict in
|
|
157
168
|
its `test` handoff as `implementerProof` (`{verdict, how}`). The tester runs the
|
|
158
169
|
application, not CI again. Try to break the changed surface — wrong and boundary inputs, the
|
|
159
170
|
second and the concurrent run, the party it must refuse — judge whether the implementer's tests
|
|
160
171
|
would catch the ways it breaks, writing the red test for one that none would, and
|
|
161
172
|
read CI on GitHub at the head you are judging for everything static: lint, types and the unit
|
|
162
|
-
and integration suites are CI's, read there and recorded for no later step, and no CI lane is
|
|
173
|
+
and integration suites are CI's, read there and recorded for no later step, except a `ci_check` job, and no CI lane is
|
|
163
174
|
rerun as evidence. A lane GitHub shows `queued` or `in progress` is read as such: the tester
|
|
164
175
|
never waits for it, since a required red that settles sends the work back from `testing` and
|
|
165
176
|
the reviewer reads the head's checks before it approves.
|
|
@@ -183,7 +194,7 @@ and decides there, the only gate on such an issue.
|
|
|
183
194
|
`skill://legion-worker/references/conflicts-and-rewrites.md`) at the commit your results name
|
|
184
195
|
and at the new head. Equal: re-run only the
|
|
185
196
|
bare gates — the repository's CI green at the new head and its smoke check — and record each
|
|
186
|
-
check again at the new head, its `--observed` ending
|
|
197
|
+
check with no `ci_check` again at the new head, its `--observed` ending
|
|
187
198
|
`forward-merge re-check <old-sha> → <new-sha>: fingerprint unchanged, bare gates only, class search of earlier findings clean`. A search that finds an instance is a failure, not a re-check: record it under `failures` and run a full test round. The
|
|
188
199
|
real-surface verification is not repeated, except in a parent's last round, which the architect
|
|
189
200
|
or the implementer's forward-merge comment names to you: then run a full test round. Different:
|
|
@@ -228,4 +239,5 @@ once it lands. A code path whose first execution would be after the merge — a
|
|
|
228
239
|
inline step, a post-merge helper, a production-only resource — is a check marked `after_merge`,
|
|
229
240
|
recorded once the merge reaches production by the role the project's `production_check` names,
|
|
230
241
|
on the look its own `wake_at` brought back, and no reason to leave a `before_merge` check
|
|
231
|
-
unrecorded
|
|
242
|
+
unrecorded. Completing with a unit suite as the only evidence, where no `ci_check` names it, is
|
|
243
|
+
the failure this rule stops.
|