@codyswann/lisa 4.100.2 → 4.100.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/all/copy-overwrite/scripts/lib/history-secret-scanner.mjs +57 -11
  2. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
  3. package/dist/core/config-shadowing.d.ts.map +1 -1
  4. package/dist/core/config-shadowing.js +3 -1
  5. package/dist/core/config-shadowing.js.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  7. package/dist/core/lisa-owned-hash-ledger.js +28 -0
  8. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  9. package/dist/core/lisa-owned-templates.d.ts +6 -1
  10. package/dist/core/lisa-owned-templates.d.ts.map +1 -1
  11. package/dist/core/lisa-owned-templates.js +9 -1
  12. package/dist/core/lisa-owned-templates.js.map +1 -1
  13. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  14. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  15. package/dist/core/upstream-evidence-manifest.js +15 -8
  16. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  17. package/package.json +4 -4
  18. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +1 -1
  21. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +1 -1
  22. package/plugins/lisa/rules/reference/rejection-detection.md +2 -2
  23. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +1 -1
  24. package/plugins/lisa/skills/lisa-track/SKILL.md +1 -1
  25. package/plugins/lisa-agy/plugin.json +1 -1
  26. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +1 -1
  27. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +1 -1
  28. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  31. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  35. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-copilot/rules/reference/rejection-detection.md +2 -2
  37. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +1 -1
  38. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +1 -1
  39. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-cursor/rules/rejection-detection-reference.mdc +2 -2
  41. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +1 -1
  42. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +1 -1
  43. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  45. package/plugins/lisa-devin/rules/reference/rejection-detection.md +2 -2
  46. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +1 -1
  47. package/plugins/lisa-devin/skills/lisa-track/SKILL.md +1 -1
  48. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  50. package/plugins/lisa-expo-agy/plugin.json +1 -1
  51. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  55. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  58. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  62. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  65. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  69. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  72. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  76. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  78. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  79. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  83. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  85. package/plugins/lisa-rails-agy/plugin.json +1 -1
  86. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  90. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  92. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  93. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  97. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  99. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  100. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  104. package/plugins/src/base/rules/reference/rejection-detection.md +2 -2
  105. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +1 -1
  106. package/plugins/src/base/skills/lisa-track/SKILL.md +1 -1
  107. package/scripts/generate-lisa-owned-hash-ledger.mjs +2 -1
  108. package/scripts/lisa-ci-failure-redispatch.mjs +216 -18
  109. package/scripts/lisa-ci-rework-route.mjs +24 -49
package/package.json CHANGED
@@ -196,7 +196,7 @@
196
196
  "qs": "^6.16.0"
197
197
  },
198
198
  "name": "@codyswann/lisa",
199
- "version": "4.100.2",
199
+ "version": "4.100.4",
200
200
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
201
201
  "main": "dist/index.js",
202
202
  "exports": {
@@ -359,7 +359,7 @@
359
359
  "test": "tests"
360
360
  },
361
361
  "types": "./dist/index.d.ts",
362
- "lisaReleaseCommit": "978305505839cdf1e48df75f6fd0eebe2342d727",
363
- "gitHead": "978305505839cdf1e48df75f6fd0eebe2342d727",
364
- "lisaReleaseTag": "v4.100.2"
362
+ "lisaReleaseCommit": "13bac9587ae2dc1f11a98baa466e115c8131057e",
363
+ "gitHead": "13bac9587ae2dc1f11a98baa466e115c8131057e",
364
+ "lisaReleaseTag": "v4.100.4"
365
365
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -499,7 +499,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
499
499
 
500
500
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
501
501
 
502
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
502
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
503
503
 
504
504
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
505
505
 
@@ -86,7 +86,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
86
86
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
87
87
  ```
88
88
 
89
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
89
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
90
90
 
91
91
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
92
92
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -41,7 +41,7 @@ An artifact this flow produced is **never** a rejection-reflection trigger, no m
41
41
 
42
42
  ## CI-rework exemption (a failed required check is not a rejection)
43
43
 
44
- When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
44
+ When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
45
45
 
46
46
  ## Reflect on a `rejection-reclaim`
47
47
 
@@ -132,7 +132,7 @@ This is the **trigger-side** half of the no-learning-loops guard. The claim-time
132
132
 
133
133
  A backward move is only a teaching signal when a person judged the work. The Lisa repository's `lisa-ci-failure-redispatch` workflow also moves items backward — `$CLAIMED` to `$READY` — when a required check fails on the item's PR, and posts `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` as it does. That move is **CI rework**: the defect is a red check the agent has not fixed yet, not an approach a reviewer named as wrong, and reflecting on it would file a learning about a failure the agent is about to fix on the same branch.
134
134
 
135
- So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
135
+ So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
136
136
 
137
137
  Today only the GitHub arm has a producer (the workflow is Lisa-repository-only and is not shipped to hosts), so the Jira and Linear arms never see the marker; the exemption is stated vendor-neutrally so a future producer on those trackers inherits it.
138
138
 
@@ -497,7 +497,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
497
497
 
498
498
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
499
499
 
500
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
500
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
@@ -84,7 +84,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
84
84
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
85
85
  ```
86
86
 
87
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
87
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
88
88
 
89
89
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
90
90
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -497,7 +497,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
497
497
 
498
498
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
499
499
 
500
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
500
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
@@ -84,7 +84,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
84
84
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
85
85
  ```
86
86
 
87
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
87
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
88
88
 
89
89
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
90
90
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -41,7 +41,7 @@ An artifact this flow produced is **never** a rejection-reflection trigger, no m
41
41
 
42
42
  ## CI-rework exemption (a failed required check is not a rejection)
43
43
 
44
- When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
44
+ When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
45
45
 
46
46
  ## Reflect on a `rejection-reclaim`
47
47
 
@@ -132,7 +132,7 @@ This is the **trigger-side** half of the no-learning-loops guard. The claim-time
132
132
 
133
133
  A backward move is only a teaching signal when a person judged the work. The Lisa repository's `lisa-ci-failure-redispatch` workflow also moves items backward — `$CLAIMED` to `$READY` — when a required check fails on the item's PR, and posts `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` as it does. That move is **CI rework**: the defect is a red check the agent has not fixed yet, not an approach a reviewer named as wrong, and reflecting on it would file a learning about a failure the agent is about to fix on the same branch.
134
134
 
135
- So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
135
+ So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
136
136
 
137
137
  Today only the GitHub arm has a producer (the workflow is Lisa-repository-only and is not shipped to hosts), so the Jira and Linear arms never see the marker; the exemption is stated vendor-neutrally so a future producer on those trackers inherits it.
138
138
 
@@ -497,7 +497,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
497
497
 
498
498
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
499
499
 
500
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
500
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
@@ -84,7 +84,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
84
84
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
85
85
  ```
86
86
 
87
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
87
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
88
88
 
89
89
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
90
90
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -46,7 +46,7 @@ An artifact this flow produced is **never** a rejection-reflection trigger, no m
46
46
 
47
47
  ## CI-rework exemption (a failed required check is not a rejection)
48
48
 
49
- When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
49
+ When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
50
50
 
51
51
  ## Reflect on a `rejection-reclaim`
52
52
 
@@ -137,7 +137,7 @@ This is the **trigger-side** half of the no-learning-loops guard. The claim-time
137
137
 
138
138
  A backward move is only a teaching signal when a person judged the work. The Lisa repository's `lisa-ci-failure-redispatch` workflow also moves items backward — `$CLAIMED` to `$READY` — when a required check fails on the item's PR, and posts `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` as it does. That move is **CI rework**: the defect is a red check the agent has not fixed yet, not an approach a reviewer named as wrong, and reflecting on it would file a learning about a failure the agent is about to fix on the same branch.
139
139
 
140
- So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
140
+ So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
141
141
 
142
142
  Today only the GitHub arm has a producer (the workflow is Lisa-repository-only and is not shipped to hosts), so the Jira and Linear arms never see the marker; the exemption is stated vendor-neutrally so a future producer on those trackers inherits it.
143
143
 
@@ -497,7 +497,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
497
497
 
498
498
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
499
499
 
500
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
500
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
@@ -84,7 +84,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
84
84
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
85
85
  ```
86
86
 
87
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
87
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
88
88
 
89
89
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
90
90
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -41,7 +41,7 @@ An artifact this flow produced is **never** a rejection-reflection trigger, no m
41
41
 
42
42
  ## CI-rework exemption (a failed required check is not a rejection)
43
43
 
44
- When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
44
+ When the newest Lisa marker comment on the item (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` (no `[lisa-ci-cleared]` on that comment) **authored by `github-actions[bot]`**, naming a PR that is open, same-repository, and bound to this item, its return to `$READY` is **CI rework**: an automation moved it because a required check failed on its PR, not because a reviewer rejected it. Short-circuit to `forward-only` — no rejection learning, no candidate — and route the claim to the existing PR, as the build-intake arm specifies. The second dispatch path — `lisa-implement` resolving the item through `lisa-track` (how the session manager dispatches) — routes it the same way, to `lisa-drive-pr-to-merge` on that PR; both paths decide through the shared `scripts/lisa-ci-rework-route.mjs` helper. Read the markers before the claim posts its own comment. A marker from any other author, or one whose PR fails those checks, is no marker; a marker whose PR has merged or closed counts as cleared.
45
45
 
46
46
  ## Reflect on a `rejection-reclaim`
47
47
 
@@ -132,7 +132,7 @@ This is the **trigger-side** half of the no-learning-loops guard. The claim-time
132
132
 
133
133
  A backward move is only a teaching signal when a person judged the work. The Lisa repository's `lisa-ci-failure-redispatch` workflow also moves items backward — `$CLAIMED` to `$READY` — when a required check fails on the item's PR, and posts `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->` as it does. That move is **CI rework**: the defect is a red check the agent has not fixed yet, not an approach a reviewer named as wrong, and reflecting on it would file a learning about a failure the agent is about to fix on the same branch.
134
134
 
135
- So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
135
+ So before classifying as `rejection-reclaim`, read the item's comments: when the newest comment carrying a Lisa marker (claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`) is an uncleared `[lisa-ci-failed]` marker (its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`) **authored by `github-actions[bot]`** — the workflow's identity; anyone can type the marker, so no other author counts — and the PR it names is open, not cross-repository, and binds this item through its `Work-Item:` line, treat the item as `forward-only`. No rejection learning is assembled and no `[lisa-rejection-candidate]` is recorded. Read the markers **before** the claim writes its own comment, which is itself a newer Lisa marker. The build-intake arm routes such an item to `lisa-drive-pr-to-merge` on the PR the marker names rather than to `lisa-implement`. The second dispatch path does the same: when the session manager (or anyone) runs `lisa-implement` on the item, `lisa-track` decides the route before its claim comment and `lisa-implement` drives the existing PR instead of building again, filing no rejection learning. Both paths decide through one helper, `scripts/lisa-ci-rework-route.mjs`, so they cannot disagree. Agent work is not complete while the named PR's required checks are failing, and a marker whose PR has merged or closed counts as cleared.
136
136
 
137
137
  Today only the GitHub arm has a producer (the workflow is Lisa-repository-only and is not shipped to hosts), so the Jira and Linear arms never see the marker; the exemption is stated vendor-neutrally so a future producer on those trackers inherits it.
138
138
 
@@ -497,7 +497,7 @@ A blocker is active if it is open and has no cleared status label. Treat `status
497
497
 
498
498
  Before the claim mutation, apply `claim-time-guards` — **Value before claim**, or **Worth doing** in `lisa-track` on runtimes without the rule tree (Antigravity). A ready label establishes neither value nor permission to expand scope. Respect the preceding human-hold gate; a declined incidental item consumes this cycle's one processed disposition.
499
499
 
500
- **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
500
+ **CI rework is read before everything else in 3b — before rejection detection, and before this phase posts its own claim comment.** When a required check fails on an agent's PR, the `lisa-ci-failure-redispatch` workflow moves the item from `$CLAIMED` back to `$READY` and comments a visible line plus `<!-- [lisa-ci-failed] pr=<n> sha=<head> -->`. A marker counts **only when its comment is authored by `github-actions[bot]`** (the workflow's identity) — anyone can type the marker, so a comment from any other author is ignored. A marker is **uncleared** while its comment carries no `<!-- [lisa-ci-cleared] run=<id> -->`; a later all-green run on the PR clears it, and a marker whose PR has merged or closed counts as cleared. From the read bundle's comments, take the **newest** comment carrying any Lisa marker (`[lisa-…]` or `[claude-build-intake]`; claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds`); when it is an uncleared, bot-authored `[lisa-ci-failed]` marker, **verify the PR it names** before trusting it: `gh pr view <n> --repo <org>/<repo> --json state,isCrossRepository,body` must show `state` is `OPEN`, `isCrossRepository` is `false`, and a body whose `Work-Item:` binds this item (`<org>/<repo>#<number>`). If any check fails or the read errors, treat the item as carrying no marker and continue with ordinary 3b. These checks and the loop bound below are implemented once in `scripts/lisa-ci-rework-route.mjs`, which `lisa-track` also runs on the `lisa-implement` dispatch path so the two paths cannot disagree; where that script exists (the Lisa repository — it is not shipped to hosts), run `node scripts/lisa-ci-rework-route.mjs --item <org>/<repo>#<number>` and act on its printed `route` — `ci-rework`, `blocked` (the loop bound), or `implement` (no marker) — instead of re-deriving the checks. When every check passes, classify the item **`ci-rework`**. Read it first so the route is decided from the comments as they stood before this claim; claim comments are ignored by the rule above, so even a re-posted claim cannot hide the signal, and a Lisa marker typed by an untrusted commenter cannot either. A `ci-rework` item is **CI rework, not a QA rejection**: its claimed-to-ready move is the workflow's, not a reviewer's, so rejection detection treats it as `forward-only` and **no rejection learning** is filed — no `lisa-persist-learning` candidate, no `[lisa-rejection-candidate]` marker (the `rejection-detection` rule's CI-rework exemption). It also skips claim-time archaeology and takes precedence over the `already-implemented` route below: the open PR that check finds is the one to fix, not proof that the work shipped. Carry `ci-rework` and the marker's `pr=<n>` into 3c. **Bound the loop.** Every claimed-to-ready bounce gives the item a fresh ready-lane entry, which resets the `two-failed-attempts` valve below, so a PR that keeps failing would be re-dispatched forever. When the item carries 3 or more bot-authored `[lisa-ci-failed]` markers for the same PR, intake does not re-dispatch: it does not claim, moves the item to the configured blocked role and adds the `human_needed` label (`github.labels.build.blocked` and `github.labels.build.human_needed`, per `config-resolution`), posts a plain-English comment naming the PR and its failing checks (for example: "Pull request #<n> has failed its required checks <k> times (<check names>). Lisa has stopped retrying; a person needs to look at why it keeps failing."), and stops this item's cycle. **Agent work is not complete while the named PR's required checks are failing** — no success outcome, done label, or close may be recorded for the item until that PR merges with its required checks green.
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
@@ -84,7 +84,7 @@ Decide the dispatch route from the item's comments as they stand **before** this
84
84
  node scripts/lisa-ci-rework-route.mjs --item <canonical-ref>
85
85
  ```
86
86
 
87
- It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) and failure markers from anyone other than `github-actions[bot]` do not count as Lisa markers for this purpose — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
87
+ It only reads, and prints one JSON object. It is the one place the trust rules live, shared with `lisa-github-build-intake` 3b so the two dispatch paths cannot disagree: the newest counted Lisa marker must be an uncleared `[lisa-ci-failed]` marker authored by `github-actions[bot]` — claim comments and session-manager notes (`[lisa-tracker-claim]`, `[claude-build-intake]`, `[lisa-session-manager]`) never count as Lisa markers for this purpose, failure markers count only from `github-actions[bot]`, and any other later Lisa marker counts only from a trusted author — `github-actions[bot]`, the item's author, or a configured `sessionManager.trustedAuthorIds` entry; only entries committed in `.lisa.config.json` count, never `.lisa.config.local.json`, because the producer runs in CI on a fresh checkout, and the account Lisa posts as counts as trusted only when it is the item's author or is listed in `sessionManager.trustedAuthorIds` — and the pull request it names must be open, from this repository rather than a fork, and bound to this item by its `Work-Item:` line. Act on its `route`:
88
88
 
89
89
  - When `route` is `implement` (any `reason`): resolve and claim the item the normal way below, and return `route: implement`.
90
90
  - When `route` is `ci-rework`: return `route: ci-rework pr=<n>`, `failing_checks` and `head_ref` (the JSON's `pr`, `failingChecks` and `headRefName`). Continue through the hold check and the claim below unchanged: the claim is what moves the item from the ready lane back to the claimed lane, the same re-claim build intake 3b performs, and the binding names the same item. A ci-rework item is CI rework, not a rejection: it takes no rejection detection and records no rejection learning (the `rejection-detection` rule's CI-rework exemption).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.100.2",
3
+ "version": "4.100.4",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"