@codyswann/lisa 2.198.0 → 2.198.2

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 (155) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  4. package/plugins/lisa/.codex-plugin/skills/lisa-debrief/SKILL.md +3 -1
  5. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +30 -34
  6. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +6 -2
  7. package/plugins/lisa/.codex-plugin/skills/lisa-intake/SKILL.md +10 -16
  8. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +28 -32
  9. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +28 -32
  10. package/plugins/lisa/.codex-plugin/skills/lisa-monitor/SKILL.md +3 -1
  11. package/plugins/lisa/.codex-plugin/skills/lisa-plan/SKILL.md +6 -2
  12. package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +13 -42
  13. package/plugins/lisa/.codex-plugin/skills/lisa-research/SKILL.md +3 -1
  14. package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +3 -1
  15. package/plugins/lisa/agents/github-agent.md +3 -1
  16. package/plugins/lisa/agents/github-build-intake.md +2 -2
  17. package/plugins/lisa/agents/jira-agent.md +3 -1
  18. package/plugins/lisa/agents/jira-build-intake.md +2 -2
  19. package/plugins/lisa/agents/linear-agent.md +3 -1
  20. package/plugins/lisa/agents/linear-build-intake.md +2 -2
  21. package/plugins/lisa/rules/eager/intent-routing.md +2 -2
  22. package/plugins/lisa/rules/reference/intent-routing.md +4 -4
  23. package/plugins/lisa/skills/lisa-debrief/SKILL.md +3 -1
  24. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +31 -35
  25. package/plugins/lisa/skills/lisa-implement/SKILL.md +6 -2
  26. package/plugins/lisa/skills/lisa-intake/SKILL.md +10 -16
  27. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +29 -33
  28. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +29 -33
  29. package/plugins/lisa/skills/lisa-monitor/SKILL.md +3 -1
  30. package/plugins/lisa/skills/lisa-plan/SKILL.md +6 -2
  31. package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +13 -42
  32. package/plugins/lisa/skills/lisa-research/SKILL.md +3 -1
  33. package/plugins/lisa/skills/lisa-verify/SKILL.md +3 -1
  34. package/plugins/lisa-agy/agents/github-agent.md +3 -1
  35. package/plugins/lisa-agy/agents/github-build-intake.md +2 -2
  36. package/plugins/lisa-agy/agents/jira-agent.md +3 -1
  37. package/plugins/lisa-agy/agents/jira-build-intake.md +2 -2
  38. package/plugins/lisa-agy/agents/linear-agent.md +3 -1
  39. package/plugins/lisa-agy/agents/linear-build-intake.md +2 -2
  40. package/plugins/lisa-agy/plugin.json +1 -1
  41. package/plugins/lisa-agy/skills/lisa-debrief/SKILL.md +3 -1
  42. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +31 -35
  43. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +6 -2
  44. package/plugins/lisa-agy/skills/lisa-intake/SKILL.md +10 -16
  45. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +29 -33
  46. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +29 -33
  47. package/plugins/lisa-agy/skills/lisa-monitor/SKILL.md +3 -1
  48. package/plugins/lisa-agy/skills/lisa-plan/SKILL.md +6 -2
  49. package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +13 -42
  50. package/plugins/lisa-agy/skills/lisa-research/SKILL.md +3 -1
  51. package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +3 -1
  52. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  55. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-copilot/agents/github-agent.agent.md +3 -1
  59. package/plugins/lisa-copilot/agents/github-build-intake.agent.md +2 -2
  60. package/plugins/lisa-copilot/agents/jira-agent.agent.md +3 -1
  61. package/plugins/lisa-copilot/agents/jira-build-intake.agent.md +2 -2
  62. package/plugins/lisa-copilot/agents/linear-agent.agent.md +3 -1
  63. package/plugins/lisa-copilot/agents/linear-build-intake.agent.md +2 -2
  64. package/plugins/lisa-copilot/rules/eager/intent-routing.md +2 -2
  65. package/plugins/lisa-copilot/rules/reference/intent-routing.md +4 -4
  66. package/plugins/lisa-copilot/skills/lisa-debrief/SKILL.md +3 -1
  67. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +31 -35
  68. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +6 -2
  69. package/plugins/lisa-copilot/skills/lisa-intake/SKILL.md +10 -16
  70. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +29 -33
  71. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +29 -33
  72. package/plugins/lisa-copilot/skills/lisa-monitor/SKILL.md +3 -1
  73. package/plugins/lisa-copilot/skills/lisa-plan/SKILL.md +6 -2
  74. package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +13 -42
  75. package/plugins/lisa-copilot/skills/lisa-research/SKILL.md +3 -1
  76. package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +3 -1
  77. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-cursor/agents/github-agent.md +3 -1
  79. package/plugins/lisa-cursor/agents/github-build-intake.md +2 -2
  80. package/plugins/lisa-cursor/agents/jira-agent.md +3 -1
  81. package/plugins/lisa-cursor/agents/jira-build-intake.md +2 -2
  82. package/plugins/lisa-cursor/agents/linear-agent.md +3 -1
  83. package/plugins/lisa-cursor/agents/linear-build-intake.md +2 -2
  84. package/plugins/lisa-cursor/rules/intent-routing-reference.mdc +4 -4
  85. package/plugins/lisa-cursor/rules/intent-routing.mdc +2 -2
  86. package/plugins/lisa-cursor/skills/lisa-debrief/SKILL.md +3 -1
  87. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +31 -35
  88. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +6 -2
  89. package/plugins/lisa-cursor/skills/lisa-intake/SKILL.md +10 -16
  90. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +29 -33
  91. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +29 -33
  92. package/plugins/lisa-cursor/skills/lisa-monitor/SKILL.md +3 -1
  93. package/plugins/lisa-cursor/skills/lisa-plan/SKILL.md +6 -2
  94. package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +13 -42
  95. package/plugins/lisa-cursor/skills/lisa-research/SKILL.md +3 -1
  96. package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +3 -1
  97. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  99. package/plugins/lisa-expo-agy/plugin.json +1 -1
  100. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  104. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  105. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  109. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  110. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  114. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  115. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  119. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  120. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  124. package/plugins/lisa-rails-agy/plugin.json +1 -1
  125. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  129. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  130. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  134. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  135. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  137. package/plugins/src/base/agents/github-agent.md +3 -1
  138. package/plugins/src/base/agents/github-build-intake.md +2 -2
  139. package/plugins/src/base/agents/jira-agent.md +3 -1
  140. package/plugins/src/base/agents/jira-build-intake.md +2 -2
  141. package/plugins/src/base/agents/linear-agent.md +3 -1
  142. package/plugins/src/base/agents/linear-build-intake.md +2 -2
  143. package/plugins/src/base/rules/eager/intent-routing.md +2 -2
  144. package/plugins/src/base/rules/reference/intent-routing.md +4 -4
  145. package/plugins/src/base/skills/lisa-debrief/SKILL.md +3 -1
  146. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +31 -35
  147. package/plugins/src/base/skills/lisa-implement/SKILL.md +6 -2
  148. package/plugins/src/base/skills/lisa-intake/SKILL.md +10 -16
  149. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +29 -33
  150. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +29 -33
  151. package/plugins/src/base/skills/lisa-monitor/SKILL.md +3 -1
  152. package/plugins/src/base/skills/lisa-plan/SKILL.md +6 -2
  153. package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +13 -42
  154. package/plugins/src/base/skills/lisa-research/SKILL.md +3 -1
  155. package/plugins/src/base/skills/lisa-verify/SKILL.md +3 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lisa-jira-build-intake
3
- description: "Symmetric counterpart to notion-prd-intake on the JIRA side. Scans a JIRA project (or JQL filter) for tickets in the configured `ready` status, claims the first eligible ticket by transitioning to the configured `claimed` status, runs the implementation/build flow via jira-agent, transitions to the configured `done` status on completion, then exits. Enforces the claim-time arm of the `leaf-only-lifecycle` rule: a parent/container with open child work (or a childless Epic) that still carries a stale build-ready status is skipped or safe-blocked with a lifecycle-repair comment, never claimed. The `ready` status is the human-flipped signal that a TODO ticket is truly ready for development — mirroring how Notion PRDs work product Draft → Ready → (us) In Review → Blocked|Ticketed."
3
+ description: "Symmetric counterpart to notion-prd-intake on the JIRA side. Scans a JIRA project (or JQL filter) for tickets in the configured `ready` status, claims the first eligible ticket by transitioning to the configured `claimed` status, runs the implementation/build flow via the jira-agent workflow in-session (culminating in lisa-implement), transitions to the configured `done` status on completion, then exits. Enforces the claim-time arm of the `leaf-only-lifecycle` rule: a parent/container with open child work (or a childless Epic) that still carries a stale build-ready status is skipped or safe-blocked with a lifecycle-repair comment, never claimed. The `ready` status is the human-flipped signal that a TODO ticket is truly ready for development — mirroring how Notion PRDs work product Draft → Ready → (us) In Review → Blocked|Ticketed."
4
4
  allowed-tools: ["Skill", "Bash"]
5
5
  ---
6
6
 
@@ -13,7 +13,7 @@ All Atlassian operations in this skill go through `lisa-atlassian-access`. Do no
13
13
  1. A JIRA project key (e.g. `SE`) — scans that project for tickets in the configured `ready` status.
14
14
  2. A full JQL filter (e.g. `project = SE AND component = "frontend" AND Status = Ready`) — used as-is. The skill will not append a `Status = <ready>` clause if the JQL already names a status, so callers can intentionally widen. It also auto-scopes the query to the current repo (Phase 1 step 2) unless the JQL already constrains repo (a `repo:` label or `component =` term), so a multi-repo project / forwarded assignee filter is not widened to sibling repos by accident.
15
15
 
16
- Run one build-intake cycle. The first eligible ready ticket is claimed, built via the `lisa-jira-agent` flow, transitioned to the configured `done` status (env-aware — see below), then the cycle exits. Remaining ready tickets stay queued for later scheduler invocations.
16
+ Run one build-intake cycle. The first eligible ready ticket is claimed, built via the `jira-agent` workflow run in-session (Phase 3c, culminating in `lisa-implement`), transitioned to the configured `done` status (env-aware — see below), then the cycle exits. Remaining ready tickets stay queued for later scheduler invocations.
17
17
 
18
18
  ## Workflow resolution
19
19
 
@@ -68,17 +68,17 @@ else
68
68
  fi
69
69
  ```
70
70
 
71
- Run one build-intake cycle. The first eligible ticket in `$READY` is claimed by transitioning to `$CLAIMED`, built via the `lisa-jira-agent` flow, transitioned to `$DONE` on completion, then the cycle exits.
71
+ Run one build-intake cycle. The first eligible ticket in `$READY` is claimed by transitioning to `$CLAIMED`, built via the in-session lifecycle (Phase 3c), transitioned to `$DONE` on completion, then the cycle exits.
72
72
 
73
73
  ## Confirmation policy
74
74
 
75
- Do NOT ask the caller whether to proceed. Once invoked with a project key or JQL, run the cycle to completion — claim and dispatch the first eligible ticket through `lisa-jira-agent`, transition a successful build to `$DONE`, write the summary, and exit. The caller (a human or a cron) has already authorized the run by invoking the skill; re-prompting defeats the purpose of a background queue.
75
+ Do NOT ask the caller whether to proceed. Once invoked with a project key or JQL, run the cycle to completion — claim and dispatch the first eligible ticket through the in-session lifecycle (Phase 3c), transition a successful build to `$DONE`, write the summary, and exit. The caller (a human or a cron) has already authorized the run by invoking the skill; re-prompting defeats the purpose of a background queue.
76
76
 
77
77
  Specifically forbidden:
78
78
 
79
79
  - Previewing projected scope (ticket count, projected PR count, build duration) and asking whether to continue.
80
80
  - Offering A/B/C-style choices like "proceed / skip a few / dry-run only" — the documented behavior IS the default.
81
- - Pausing because the queue is large, tickets look complex, or tickets are likely to be `Blocked` by `lisa-jira-agent`'s pre-flight gate. The pre-flight `Blocked` outcome is a valid terminal state of the per-ticket lifecycle (owned by `lisa-jira-agent`), not a failure mode — surfacing those tickets to humans is success.
81
+ - Pausing because the queue is large, tickets look complex, or tickets are likely to be `Blocked` by the pre-flight gate. The pre-flight `Blocked` outcome is a valid terminal state of the per-ticket lifecycle, not a failure mode — surfacing those tickets to humans is success.
82
82
  - Pausing because the build flow looks expensive. The cost of one cycle is bounded; the cost of stalling a scheduled cron waiting on a human is unbounded.
83
83
 
84
84
  The only legitimate reasons to stop early:
@@ -155,7 +155,7 @@ A JIRA project can oversee multiple repos (`frontend` / `backend` / `infrastruct
155
155
 
156
156
  Build intake claims **only independently implementable leaf work units**. This enforces the claim-time arm of the vendor-neutral `leaf-only-lifecycle` rule: a parent/container that still carries a stale build-ready status (e.g. `Ready` applied before this rule existed, or hand-applied to an Epic/Story) is **never claimed** — intake skips it or safe-blocks it with a clear lifecycle-repair message. It is the claim-time complement to the write-time labeling in `lisa-jira-write-ticket` and the validate-time S15 gate in `lisa-jira-validate-ticket`; all three cite the same rule so the classification never drifts. **Never silently implement a container.**
157
157
 
158
- Run this gate **before** the claim transition, starting with the oldest/highest-priority ready candidate. Do NOT transition, comment "Claimed", or invoke `lisa-jira-agent` for a ticket that fails the gate.
158
+ Run this gate **before** the claim transition, starting with the oldest/highest-priority ready candidate. Do NOT transition, comment "Claimed", or dispatch the lifecycle for a ticket that fails the gate.
159
159
 
160
160
  **Resolve container vs. leaf — structural first, then nominal.** Per `leaf-only-lifecycle` the classification is structural: a ticket is a **container** if it has **open** child work, whatever its declared type; otherwise the **issue type** decides. Resolve child work using the same hierarchy `lisa-jira-read-ticket` uses — JIRA's native Epic → Story → Sub-task parentage (Epic link / parent field for Stories under an Epic, and the subtask relationship for Sub-tasks under a Story/Task). Issue links (`blocks` / `is blocked by`) express cross-item dependencies and are **not** parentage — do not count them as children.
161
161
 
@@ -203,43 +203,39 @@ Transition the ticket from `$READY` to `$CLAIMED` by invoking `lisa-atlassian-ac
203
203
 
204
204
  If the transition fails (permission, missing transition, race), log under "Errors" in the cycle summary and skip this ticket. **Do not invoke the build flow on a ticket you didn't successfully claim.**
205
205
 
206
- #### 3c. Return or run the build delegation
206
+ #### 3c. Run the per-ticket lifecycle in-session (never as a subagent)
207
207
 
208
- After the claim succeeds, the per-ticket build must run under `lisa-jira-agent` (the per-ticket lifecycle agent), but a teammate running this skill must not spawn that named peer itself. Claude teams are flat: only the lead can add a named teammate. Therefore:
208
+ After the claim succeeds, run the per-ticket lifecycle defined by the `jira-agent` workflow **in the current session** — never by spawning `jira-agent` (or any named worker) via the `Agent` tool. The lifecycle culminates in a team-first flow (`lisa-implement`), and that flow can only create its agent team from the lead session: a spawned teammate cannot add named teammates (Claude teams are flat), so dispatching the build into a subagent strands `lisa-implement` without its team and collapses the build into a single inline worker. Concretely:
209
209
 
210
- - If you are the team lead/root agent, spawn or invoke `lisa-jira-agent` with the ticket key and wait for its structured result.
211
- - If you are a teammate, stop this skill's direct work and return a structured `delegation-request` to the lead instead of calling `Agent` with `name` or otherwise spawning `jira-agent` as a named peer.
212
- - A private anonymous helper is allowed only when the helper is not a roster peer and the `Agent` call omits `name`; it must not replace this `jira-agent` delegation.
210
+ 1. **Run the gates in-session** via their skills, exactly as `jira-agent.md` defines them and with all of its gating behaviors intact:
211
+ - `lisa-jira-read-ticket` the full ticket graph (mandatory; never ad-hoc reads)
212
+ - `lisa-jira-verify` pre-flight quality gate, including the draft-then-block procedure on FAIL
213
+ - `lisa-ticket-triage` — analytical triage gate (a `BLOCKED` verdict stops the cycle with findings posted)
214
+ - Intent determination from the issue type
215
+ 2. **Dispatch the flow in-session:** when the gates pass, invoke the lifecycle skill via the Skill tool — `lisa-implement <TICKET>` for Build / Fix / Improve / Investigate-Only (or `lisa-plan` for an Epic) — passing the full context bundle from the read step. `lisa-implement`'s own orchestration preamble then creates the per-item agent team (input-resolver, Roster Decision, specialist fanout) exactly as a direct invocation would.
216
+ 3. **Milestone sync and evidence** (`lisa-jira-sync`, `lisa-jira-evidence`) happen at the milestones the `jira-agent` workflow defines, within the dispatched flow.
213
217
 
214
- Return this payload shape to the lead:
218
+ If you are somehow running this skill as a spawned teammate inside an existing team (nested misrouting — Intake keeps this chain in the lead session), do NOT run the lifecycle inline and do NOT spawn named peers. Return this payload to the lead so the lead session can run this Phase 3c in-session:
215
219
 
216
220
  ```json
217
221
  {
218
222
  "type": "delegation-request",
219
- "agent": "jira-agent",
223
+ "phase": "jira-build-intake 3c",
220
224
  "workItem": "<TICKET>",
221
225
  "context": {
222
226
  "claimedStatus": "$CLAIMED",
223
227
  "doneResolution": "Resolve $DONE from the PR base branch per this skill's Workflow resolution section"
224
228
  },
225
229
  "onSuccess": "Confirm the returned PR is merged, then apply Phase 3d and Phase 3d.1",
226
- "onBlockedOrError": "Leave the ticket where jira-agent left it and record the surfaced outcome"
230
+ "onBlockedOrError": "Leave the ticket where the lifecycle left it and record the surfaced outcome"
227
231
  }
228
232
  ```
229
233
 
230
- `lisa-jira-agent` owns:
231
- - Reading the full ticket graph (`lisa-jira-read-ticket`)
232
- - Running its own pre-flight quality gate (`lisa-jira-verify`)
233
- - Running ticket triage (`lisa-ticket-triage`)
234
- - Routing to the appropriate flow (Build / Fix / Investigate / Improve based on type)
235
- - Posting progress comments via `lisa-jira-sync`
236
- - Posting evidence via `lisa-jira-evidence`
237
-
238
- The lead waits for `lisa-jira-agent` to return, then resumes this scanner with the returned outcome:
234
+ The lifecycle run returns one of the following outcomes; resume this scanner with it:
239
235
  - **Success** — the build flow completed and a PR exists; evidence posted. The PR may already be **merged** or still **open** (auto-merge enabled, awaiting checks/merge). "Success" means the build work is sound — it does **not** assert the change reached an environment. The env transition in 3d gates on the PR actually being merged; an open PR does not advance the ticket to a `done` env status.
240
- - **Blocked by jira-verify pre-flight gate** — `lisa-jira-agent` itself transitions the ticket to `Blocked` and reassigns to Reporter. This is correct and expected — let it stand. Record the outcome and move on.
241
- - **Duplicate already fixed** — `lisa-jira-agent` / `lisa-ticket-triage` returned `DUPLICATE_ALREADY_FIXED` with a canonical ticket reference and empirical base-branch evidence. Post the triage finding, ensure the native `duplicates <canonical>` link exists, transition to the terminal `$DONE` status with resolution `Duplicate`, and do not open a PR. If the canonical fix is merged but not yet on the production branch, the close comment must say the production error can recur until the canonical ticket promotes and that recurrence is tracked by the canonical ticket; do not reopen this duplicate for that recurrence.
242
- - **Blocked by ticket-triage ambiguities** — `lisa-jira-agent` posts findings and stops. The ticket stays in `$CLAIMED`. Surface to human; do not auto-transition. Record under "Errors" with reason `"Triage found ambiguities — see comments on <ticket-key>"`.
236
+ - **Blocked by jira-verify pre-flight gate** — the pre-flight gate (jira-agent workflow step 2) transitions the ticket to `Blocked` and reassigns to Reporter. This is correct and expected — let it stand. Record the outcome and move on.
237
+ - **Duplicate already fixed** — `lisa-ticket-triage` returned `DUPLICATE_ALREADY_FIXED` with a canonical ticket reference and empirical base-branch evidence. Post the triage finding, ensure the native `duplicates <canonical>` link exists, transition to the terminal `$DONE` status with resolution `Duplicate`, and do not open a PR. If the canonical fix is merged but not yet on the production branch, the close comment must say the production error can recur until the canonical ticket promotes and that recurrence is tracked by the canonical ticket; do not reopen this duplicate for that recurrence.
238
+ - **Blocked by ticket-triage ambiguities** — triage posts findings and the lifecycle stops. The ticket stays in `$CLAIMED`. Surface to human; do not auto-transition. Record under "Errors" with reason `"Triage found ambiguities — see comments on <ticket-key>"`.
243
239
  - **Errored** — exception, missing config, etc. Leave the ticket in `$CLAIMED` for human investigation. Record under "Errors" with the exception summary.
244
240
 
245
241
  #### 3c.1 Close duplicate already fixed
@@ -261,7 +257,7 @@ This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of
261
257
 
262
258
  A `done` env status (`On Dev`, `On Stg`, or the terminal value) asserts that the code has actually reached that environment. Never set it for a PR that is merely open: auto-merge can be blocked indefinitely (a required rebase / `BEHIND` branch, failing checks, an unaddressed review), and the change may never land. Setting `On Stg` on an open PR makes a ticket *claim* a deploy that never happened. Transition only after confirming the PR merged.
263
259
 
264
- If `lisa-jira-agent` returned Success:
260
+ If the lifecycle run returned Success:
265
261
  1. **Confirm the PR merged.** Read the live state of the ticket's PR — `gh pr view <pr> --json state,mergedAt,mergeStateStatus,url`:
266
262
  - **Merged** (`state == MERGED`) → proceed to resolve and apply `$DONE` below. Where the env deploy is observable (a deploy workflow run / deployment status keyed to the merged-into branch via `deploy.branches`), confirm it did not fail before transitioning; a still-running deploy is treated like an open PR (leave in `$CLAIMED` for a later cycle), a failed deploy is recorded as an Error.
267
263
  - **Open / not yet merged** → do **not** transition. The build is sound but the change has reached no environment yet. Record the ticket under **"PR open — awaiting merge"** in the summary (with the PR URL and its `mergeStateStatus`), leave it in `$CLAIMED`, and stop. A later `lisa-repair-intake` cycle drives the open PR to merge — re-syncing a `BEHIND` branch so the already-enabled auto-merge can land, or surfacing a real blocker — and, once it is merged, applies this same env transition. Do **not** comment "Build complete" or file anything: the work is in-flight, not done.
@@ -275,7 +271,7 @@ If `lisa-jira-agent` returned Success:
275
271
  5. If `$DONE` is terminal, verify the resulting JIRA issue is natively closed/resolved: status category is `Done`, and resolution is set when the project's workflow requires one. If the transition screen requires an explicit resolution, use the configured default resolution if present; otherwise record an Error naming the missing workflow setup rather than silently landing in an unresolved Done-named status.
276
272
  6. Post a `[claude-build-intake]` comment via `lisa-atlassian-access` `operation: comment key: <TICKET> body: "Build complete. PR <URL> merged. Transitioned to $DONE."` Include whether terminal native resolution was verified, already satisfied, skipped for an intermediate env, or blocked by workflow setup.
277
273
 
278
- For any non-Success outcome, do NOT transition. The ticket sits in `$CLAIMED` (or wherever `lisa-jira-agent` left it for the Blocked case) — the cycle's job is done; humans take it from there.
274
+ For any non-Success outcome, do NOT transition. The ticket sits in `$CLAIMED` (or wherever the lifecycle left it for the Blocked case) — the cycle's job is done; humans take it from there.
279
275
 
280
276
  #### 3d.1 Roll up the parent chain (forward rollup)
281
277
 
@@ -322,8 +318,8 @@ Total PRs opened: <n>
322
318
  ## Idempotency & safety
323
319
 
324
320
  - **Leaf-only claim gate runs first**: Phase 3a classifies each candidate before any claim; a container with open child work (or a childless Epic) is skipped/safe-blocked, never claimed (the `leaf-only-lifecycle` rule's claim-time arm). The safe-block comment is idempotent — a re-entrant cycle does not re-post it.
325
- - **Claim-first ordering**: `$CLAIMED` set BEFORE `lisa-jira-agent` invocation — no double-pickup.
326
- - **No writes outside the lifecycle**: this skill only transitions `$READY → $CLAIMED` and `$CLAIMED → $DONE`, then verifies terminal native resolution when `$DONE` is the true terminal state per `leaf-only-lifecycle`. Every other status change is owned by `lisa-jira-agent` (which suggests transitions but only auto-transitions on the verify-FAIL path).
321
+ - **Claim-first ordering**: `$CLAIMED` set BEFORE the lifecycle dispatch — no double-pickup.
322
+ - **No writes outside the lifecycle**: this skill only transitions `$READY → $CLAIMED` and `$CLAIMED → $DONE`, then verifies terminal native resolution when `$DONE` is the true terminal state per `leaf-only-lifecycle`. Every other status change is owned by the per-ticket lifecycle (jira-agent workflow, which suggests transitions but only auto-transitions on the verify-FAIL path).
327
323
  - **Duplicate terminal exception**: `DUPLICATE_ALREADY_FIXED` is the only triage outcome that may close a claimed ticket without a PR from this cycle. It must include a canonical ticket reference and empirical base-branch evidence, and it resolves as Duplicate rather than as completed build work.
328
324
  - **Terminal native closure**: for terminal `$DONE`, the resulting JIRA issue must be in a resolved / closed state (`statusCategory = Done` and resolution set when required). Intermediate env statuses stay unresolved / open.
329
325
  - **One item per cycle**: per-ticket exceptions are caught and recorded, then the cycle exits. The scheduler owns retrying or moving on to the next ready item.
@@ -360,9 +356,9 @@ If a ready-equivalent status does not exist in the JIRA project's workflow, this
360
356
  - **Scope the query to the current repo.** Per `repo-scope-split`, append the repo pre-filter (Phase 1 step 2) so a multi-repo JIRA project — or a forwarded `assignee` filter — never pulls sibling repos' ready tickets into the candidate set. It is the cheap query-time arm of the same rule whose authoritative claim-time arm is the 3a.0 gate; the two must agree on how the current repo is resolved. Skip the augmentation (do not fail) only when the current repo can't be resolved or the JQL already constrains repo.
361
357
  - **Claim leaves only.** Per the `leaf-only-lifecycle` rule, never claim a container — a ticket with open child work, or a childless Epic — even if it carries the build-ready status. Skip or safe-block it (Phase 3a); never silently implement a container.
362
358
  - Never transition a ticket the cycle didn't claim. The `$CLAIMED` transition is the signature of cycle ownership.
363
- - Never bypass `lisa-jira-agent` to do build work directly. `lisa-jira-agent` owns the per-ticket lifecycle (read, verify, triage, route, sync, evidence). This skill is the dispatcher, not the builder.
359
+ - Never do build work directly from this scanner — the per-ticket lifecycle (the `jira-agent` workflow culminating in `lisa-implement`) owns it (read, verify, triage, route, sync, evidence). This skill is the dispatcher, not the builder. And never spawn that lifecycle as a subagent; run it in-session per Phase 3c so `lisa-implement` can create its agent team.
364
360
  - Never auto-transition past `$DONE`. Downstream statuses are owned by QA / product / a future verification-intake skill — not this one.
365
361
  - Never resolve / close a JIRA ticket at intermediate env statuses (`On Dev`, `On Stg`, or configured equivalents). Native resolution is terminal-only.
366
- - If the ticket has no Validation Journey or no sign-in credentials in its description, `lisa-jira-agent`'s pre-flight verify will catch it and transition to `Blocked` — **don't try to fix the ticket from here**. Pre-flight gating is `lisa-jira-agent`'s job; running build work on a thin ticket produces broken work.
367
- - On any unexpected response from `lisa-jira-agent` (status it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
362
+ - If the ticket has no Validation Journey or no sign-in credentials in its description, the pre-flight verify gate will catch it and transition to `Blocked` — **don't try to fix the ticket from here**. Pre-flight gating is the lifecycle's job; running build work on a thin ticket produces broken work.
363
+ - On any unexpected outcome from the lifecycle run (status it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
368
364
  - Never pick an arbitrary env for `$DONE` resolution. If `done` is a map and env is ambiguous, fail loudly.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lisa-linear-build-intake
3
- description: "Symmetric counterpart to lisa-jira-build-intake on the Linear side. Scans a Linear team for Issues carrying the configured `ready` build label, claims the first eligible Issue by relabeling to the configured `claimed` label, runs the implementation/build flow via lisa-linear-agent, relabels to the configured `done` label on completion, then exits. Enforces the claim-time arm of the `leaf-only-lifecycle` rule: a parent/container with open child work (or a childless Epic) that still carries a stale build-ready label is skipped or safe-blocked with a lifecycle-repair comment, never claimed. The `ready` label is the human-flipped signal that an Issue is truly ready for development — mirroring how Notion PRDs work Draft → Ready → (us) In Review → Blocked|Ticketed."
3
+ description: "Symmetric counterpart to lisa-jira-build-intake on the Linear side. Scans a Linear team for Issues carrying the configured `ready` build label, claims the first eligible Issue by relabeling to the configured `claimed` label, runs the implementation/build flow via the linear-agent workflow in-session (culminating in lisa-implement), relabels to the configured `done` label on completion, then exits. Enforces the claim-time arm of the `leaf-only-lifecycle` rule: a parent/container with open child work (or a childless Epic) that still carries a stale build-ready label is skipped or safe-blocked with a lifecycle-repair comment, never claimed. The `ready` label is the human-flipped signal that an Issue is truly ready for development — mirroring how Notion PRDs work Draft → Ready → (us) In Review → Blocked|Ticketed."
4
4
  allowed-tools: ["Skill", "Bash"]
5
5
  ---
6
6
 
@@ -12,7 +12,7 @@ allowed-tools: ["Skill", "Bash"]
12
12
  2. The literal token `linear` — falls back to `linear.teamKey` from `.lisa.config.json`.
13
13
  3. A pre-built Linear MCP filter (advanced) — used as-is.
14
14
 
15
- Run one build-intake cycle. The first eligible ready Issue is claimed, built via the `lisa-linear-agent` flow, relabeled to the configured `done` label on completion, then the cycle exits. Remaining ready Issues stay queued for later scheduler invocations.
15
+ Run one build-intake cycle. The first eligible ready Issue is claimed, built via the `linear-agent` workflow run in-session (Phase 3c, culminating in `lisa-implement`), relabeled to the configured `done` label on completion, then the cycle exits. Remaining ready Issues stay queued for later scheduler invocations.
16
16
 
17
17
  This skill is the destination of the `lisa-tracker-build-intake` shim when `tracker = "linear"`.
18
18
 
@@ -79,13 +79,13 @@ Reads `linear.workspace`, `linear.teamKey`, and `linear.labels.build.*` from `.l
79
79
 
80
80
  ## Confirmation policy
81
81
 
82
- Do NOT ask the caller whether to proceed. Once invoked with a team key, run the cycle to completion — claim and dispatch the first eligible Issue through `lisa-linear-agent`, transition a successful build to `$DONE`, write the summary, and exit. The caller (a human or a cron) has already authorized the run by invoking the skill.
82
+ Do NOT ask the caller whether to proceed. Once invoked with a team key, run the cycle to completion — claim and dispatch the first eligible Issue through the in-session lifecycle (Phase 3c), transition a successful build to `$DONE`, write the summary, and exit. The caller (a human or a cron) has already authorized the run by invoking the skill.
83
83
 
84
84
  Specifically forbidden:
85
85
 
86
86
  - Previewing projected scope (Issue count, projected PR count, build duration) and asking whether to continue.
87
87
  - Offering A/B/C-style choices like "proceed / skip a few / dry-run only" — the documented behavior IS the default.
88
- - Pausing because the queue is large, items look complex, or items are likely to be `status:blocked` by `lisa-linear-agent`'s pre-flight gate. The pre-flight `status:blocked` outcome is a valid terminal state of the per-Issue lifecycle.
88
+ - Pausing because the queue is large, items look complex, or items are likely to be `status:blocked` by the pre-flight gate. The pre-flight `status:blocked` outcome is a valid terminal state of the per-Issue lifecycle.
89
89
  - Pausing because the build flow looks expensive.
90
90
 
91
91
  The only legitimate reasons to stop early:
@@ -105,7 +105,7 @@ ready → claimed → review → done(env-keyed) (downstream)
105
105
 
106
106
  (Defaults: `status:ready` / `status:in-progress` / `status:code-review` / `status:on-dev`/`status:on-stg`/`status:done`.)
107
107
 
108
- This skill ONLY transitions `$READY → $CLAIMED` on claim, and `$CLAIMED → $DONE` on completion. It never touches `status:done`-as-terminal, `$REVIEW` (owned by `lisa-linear-agent` / `lisa-linear-evidence`), or `status:blocked` (owned by `lisa-linear-agent`'s pre-flight gate).
108
+ This skill ONLY transitions `$READY → $CLAIMED` on claim, and `$CLAIMED → $DONE` on completion. It never touches `status:done`-as-terminal, `$REVIEW` (owned by the lifecycle / `lisa-linear-evidence`), or `status:blocked` (owned by the pre-flight gate).
109
109
 
110
110
  **Pre-flight check**: at start of each cycle, confirm `$READY`, `$CLAIMED`, and the relevant `$DONE` variants exist on the team via `lisa-linear-access operation: list-issue-labels`. If `$READY` is missing, stop and report adoption needed. The other labels can be created on demand.
111
111
 
@@ -147,7 +147,7 @@ A Linear team can oversee multiple repos (`frontend` / `backend` / `infrastructu
147
147
 
148
148
  Build intake claims **only independently implementable leaf work units**. This enforces the claim-time arm of the vendor-neutral `leaf-only-lifecycle` rule: a parent/container that still carries a stale build-ready label (e.g. `status:ready` applied before this rule existed, or hand-applied to a Project-grouped parent Issue) is **never claimed** — intake skips it or safe-blocks it with a clear lifecycle-repair message. It is the claim-time complement to the write-time labeling in `lisa-linear-write-issue` and the validate-time S15 gate in `lisa-linear-validate-issue`; all three cite the same rule so the classification never drifts. **Never silently implement a container.**
149
149
 
150
- Run this gate **before** the claim relabel, starting with the oldest/highest-priority ready candidate. Do NOT relabel, comment "Claimed", or invoke `lisa-linear-agent` for an Issue that fails the gate.
150
+ Run this gate **before** the claim relabel, starting with the oldest/highest-priority ready candidate. Do NOT relabel, comment "Claimed", or dispatch the lifecycle for an Issue that fails the gate.
151
151
 
152
152
  **Resolve container vs. leaf — structural first, then nominal.** Per `leaf-only-lifecycle` the classification is structural: an Issue is a **container** if it has **open** child work, whatever its declared type; otherwise the **type label** decides. Resolve child work using the same hierarchy `lisa-linear-read-issue` uses — Linear's native parentage: an Issue groups **sub-issues** via `parentId`, and a **Project** (the Epic equivalent) groups Issues via `projectId`. Relations (`save_issue_relation` — `blocks` / `is blocked by`) express dependencies and are **not** parentage — do not count them as children.
153
153
 
@@ -196,43 +196,39 @@ This is the idempotency lock — a re-entrant cycle's `label: $READY` filter wil
196
196
 
197
197
  If the relabel fails (permission, race), record under "Errors" and skip. **Do not invoke the build flow on an Issue you didn't successfully claim.**
198
198
 
199
- #### 3c. Return or run the build delegation
199
+ #### 3c. Run the per-Issue lifecycle in-session (never as a subagent)
200
200
 
201
- After the claim succeeds, the per-Issue build must run under `lisa-linear-agent` (the per-Issue lifecycle agent), but a teammate running this skill must not spawn that named peer itself. Claude teams are flat: only the lead can add a named teammate. Therefore:
201
+ After the claim succeeds, run the per-Issue lifecycle defined by the `linear-agent` workflow **in the current session** — never by spawning `linear-agent` (or any named worker) via the `Agent` tool. The lifecycle culminates in a team-first flow (`lisa-implement`), and that flow can only create its agent team from the lead session: a spawned teammate cannot add named teammates (Claude teams are flat), so dispatching the build into a subagent strands `lisa-implement` without its team and collapses the build into a single inline worker. Concretely:
202
202
 
203
- - If you are the team lead/root agent, spawn or invoke `lisa-linear-agent` with the Issue identifier and wait for its structured result.
204
- - If you are a teammate, stop this skill's direct work and return a structured `delegation-request` to the lead instead of calling `Agent` with `name` or otherwise spawning `linear-agent` as a named peer.
205
- - A private anonymous helper is allowed only when the helper is not a roster peer and the `Agent` call omits `name`; it must not replace this `linear-agent` delegation.
203
+ 1. **Run the gates in-session** via their skills, exactly as `linear-agent.md` defines them and with all of its gating behaviors intact:
204
+ - `lisa-linear-read-issue` the full Issue graph (mandatory; never ad-hoc reads)
205
+ - `lisa-linear-verify` pre-flight quality gate, including the draft-then-block procedure on FAIL
206
+ - `lisa-ticket-triage` — analytical triage gate (a `BLOCKED` verdict stops the cycle with findings posted)
207
+ - Intent determination from the type label
208
+ 2. **Dispatch the flow in-session:** when the gates pass, invoke the lifecycle skill via the Skill tool — `lisa-implement <ISSUE-ID>` for Build / Fix / Improve / Investigate-Only (or `lisa-plan` for an Epic-equivalent) — passing the full context bundle from the read step. `lisa-implement`'s own orchestration preamble then creates the per-item agent team (input-resolver, Roster Decision, specialist fanout) exactly as a direct invocation would.
209
+ 3. **Milestone sync and evidence** (`lisa-linear-sync`, `lisa-linear-evidence`) happen at the milestones the `linear-agent` workflow defines, within the dispatched flow.
206
210
 
207
- Return this payload shape to the lead:
211
+ If you are somehow running this skill as a spawned teammate inside an existing team (nested misrouting — Intake keeps this chain in the lead session), do NOT run the lifecycle inline and do NOT spawn named peers. Return this payload to the lead so the lead session can run this Phase 3c in-session:
208
212
 
209
213
  ```json
210
214
  {
211
215
  "type": "delegation-request",
212
- "agent": "linear-agent",
216
+ "phase": "linear-build-intake 3c",
213
217
  "workItem": "<ISSUE-ID>",
214
218
  "context": {
215
219
  "claimedLabel": "$CLAIMED",
216
220
  "doneResolution": "Resolve $DONE from the PR base branch per this skill's Workflow resolution section"
217
221
  },
218
222
  "onSuccess": "Confirm the returned PR is merged, then apply Phase 3d and Phase 3d.1",
219
- "onBlockedOrError": "Leave the Issue where linear-agent left it and record the surfaced outcome"
223
+ "onBlockedOrError": "Leave the Issue where the lifecycle left it and record the surfaced outcome"
220
224
  }
221
225
  ```
222
226
 
223
- `lisa-linear-agent` owns:
224
- - Reading the full Issue graph (`lisa-linear-read-issue`)
225
- - Running its own pre-flight quality gate (`lisa-linear-verify`)
226
- - Running ticket triage (`lisa-ticket-triage`)
227
- - Routing to the appropriate flow (Build / Fix / Investigate / Improve based on type)
228
- - Posting progress comments via `lisa-linear-sync`
229
- - Posting evidence via `lisa-linear-evidence`
230
-
231
- The lead waits for `lisa-linear-agent` to return, then resumes this scanner with the returned outcome:
227
+ The lifecycle run returns one of the following outcomes; resume this scanner with it:
232
228
  - **Success** — the build flow completed and a PR exists; evidence posted. The PR may already be **merged** or still **open** (auto-merge enabled, awaiting checks/merge). "Success" means the build work is sound — it does **not** assert the change reached an environment. The env transition in 3d gates on the PR actually being merged; an open PR does not advance the Issue to a `done` env status.
233
- - **Blocked by linear-verify pre-flight gate** — `lisa-linear-agent` itself relabels to `status:blocked` and assigns to creator. Let it stand. Record and move on.
234
- - **Duplicate already fixed** — `lisa-linear-agent` / `lisa-ticket-triage` returned `DUPLICATE_ALREADY_FIXED` with a canonical Issue reference and empirical base-branch evidence. Post the triage finding, ensure the native `duplicates <canonical>` relationship exists when Linear exposes it (otherwise leave an explicit relation/comment reference), apply the terminal `$DONE` label, move the native Issue to the configured canceled-as-duplicate or completed terminal state, and do not open a PR. If the canonical fix is merged but not yet on the production branch, the close comment must say the production error can recur until the canonical Issue promotes and that recurrence is tracked by the canonical Issue; do not reopen this duplicate for that recurrence.
235
- - **Blocked by ticket-triage ambiguities** — agent posts findings and stops. The Issue stays at `$CLAIMED`. Surface to human; do not auto-transition. Record under "Errors".
229
+ - **Blocked by linear-verify pre-flight gate** — the pre-flight gate (linear-agent workflow step 2) relabels to `status:blocked` and assigns to creator. Let it stand. Record and move on.
230
+ - **Duplicate already fixed** — `lisa-ticket-triage` returned `DUPLICATE_ALREADY_FIXED` with a canonical Issue reference and empirical base-branch evidence. Post the triage finding, ensure the native `duplicates <canonical>` relationship exists when Linear exposes it (otherwise leave an explicit relation/comment reference), apply the terminal `$DONE` label, move the native Issue to the configured canceled-as-duplicate or completed terminal state, and do not open a PR. If the canonical fix is merged but not yet on the production branch, the close comment must say the production error can recur until the canonical Issue promotes and that recurrence is tracked by the canonical Issue; do not reopen this duplicate for that recurrence.
231
+ - **Blocked by ticket-triage ambiguities** — triage posts findings and the lifecycle stops. The Issue stays at `$CLAIMED`. Surface to human; do not auto-transition. Record under "Errors".
236
232
  - **Errored** — exception, missing config, etc. Leave at `$CLAIMED`. Record with exception summary.
237
233
 
238
234
  #### 3c.1 Close duplicate already fixed
@@ -254,7 +250,7 @@ This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of
254
250
 
255
251
  A `done` env state (`status:on-dev`, `status:on-stg`, or the terminal value) asserts that the code has actually reached that environment. Never set it for a PR that is merely open: auto-merge can be blocked indefinitely (a required rebase / `BEHIND` branch, failing checks, an unaddressed review), and the change may never land. Relabeling an Issue `status:on-stg` on an open PR makes it *claim* a deploy that never happened. Transition only after confirming the PR merged.
256
252
 
257
- If `lisa-linear-agent` returned Success:
253
+ If the lifecycle run returned Success:
258
254
  1. **Confirm the PR merged.** Read the live state of the Issue's PR — `gh pr view <pr> --json state,mergedAt,mergeStateStatus,url`:
259
255
  - **Merged** (`state == MERGED`) → proceed to resolve and apply `$DONE` below. Where the env deploy is observable (a deploy workflow run / deployment status keyed to the merged-into branch via `deploy.branches`), confirm it did not fail before relabeling; a still-running deploy is treated like an open PR (leave at `$CLAIMED`), a failed deploy is recorded as an Error.
260
256
  - **Open / not yet merged** → do **not** transition. The build is sound but the change has reached no environment yet. Record the Issue under **"PR open — awaiting merge"** in the summary (with the PR URL and its `mergeStateStatus`), leave it at `$CLAIMED`, and stop. A later `lisa-repair-intake` cycle drives the open PR to merge — re-syncing a `BEHIND` branch so the already-enabled auto-merge can land, or surfacing a real blocker — and, once merged, applies this same env transition. Do **not** comment "Build complete" or change the native state.
@@ -268,7 +264,7 @@ If `lisa-linear-agent` returned Success:
268
264
  5. If `$DONE` is terminal, move the native Linear Issue state to the configured Done / Completed state. Resolve that state from project configuration if present; otherwise inspect the team workflow for a terminal state with `state.type = "completed"` and a name such as `Done` or `Completed`. If no terminal state can be resolved, record an Error and leave the labels as the source of truth — do not invent a state name.
269
265
  6. Post a `[claude-build-intake]` comment: `"Build complete. PR <URL> merged. Transitioned to $DONE."` Include whether native closure was applied, already satisfied, skipped for an intermediate env, or unavailable for setup reasons.
270
266
 
271
- For any non-Success outcome, do NOT transition. The Issue sits where the agent left it — humans take it from there.
267
+ For any non-Success outcome, do NOT transition. The Issue sits where the lifecycle left it — humans take it from there.
272
268
 
273
269
  #### 3d.1 Roll up the parent chain (forward rollup)
274
270
 
@@ -315,8 +311,8 @@ Total PRs opened: <n>
315
311
  ## Idempotency & safety
316
312
 
317
313
  - **Leaf-only claim gate runs first**: Phase 3a classifies each candidate before any claim; a container with open child work (or a childless Epic) is skipped/safe-blocked, never claimed (the `leaf-only-lifecycle` rule's claim-time arm). The safe-block comment is idempotent — a re-entrant cycle does not re-post it.
318
- - **Claim-first ordering**: `$CLAIMED` set BEFORE agent invocation — no double-pickup.
319
- - **No writes outside the lifecycle**: this skill only adds/removes `$READY`, `$CLAIMED`, `$DONE`, plus terminal-only native state completion required by `leaf-only-lifecycle`. Every other label change (and non-terminal native state change) is owned by the agent or `lisa-linear-evidence`.
314
+ - **Claim-first ordering**: `$CLAIMED` set BEFORE the lifecycle dispatch — no double-pickup.
315
+ - **No writes outside the lifecycle**: this skill only adds/removes `$READY`, `$CLAIMED`, `$DONE`, plus terminal-only native state completion required by `leaf-only-lifecycle`. Every other label change (and non-terminal native state change) is owned by the per-Issue lifecycle or `lisa-linear-evidence`.
320
316
  - **Duplicate terminal exception**: `DUPLICATE_ALREADY_FIXED` is the only triage outcome that may close a claimed Issue without a PR from this cycle. It must include a canonical Issue reference and empirical base-branch evidence, and it closes through the configured duplicate/canceled terminal path rather than as completed build work.
321
317
  - **Terminal native closure**: after the `$DONE` label is applied, move the Linear Issue to a native completed state only when `$DONE` is the true terminal done value; intermediate env labels stay open / active.
322
318
  - **One item per cycle**: per-Issue exceptions are caught and recorded, then the cycle exits. The scheduler owns retrying or moving on to the next ready item.
@@ -338,9 +334,9 @@ If the team hasn't adopted these labels, the first run exits with an adoption hi
338
334
 
339
335
  - **Claim leaves only.** Per the `leaf-only-lifecycle` rule, never claim a container — an Issue with open child work, or a childless Epic — even if it carries the build-ready label. Skip or safe-block it (Phase 3a); never silently implement a container.
340
336
  - Never relabel an Issue the cycle didn't claim. The `$CLAIMED` transition is the signature of cycle ownership.
341
- - Never bypass `lisa-linear-agent` to do build work directly. The agent owns the per-Issue lifecycle.
337
+ - Never do build work directly from this scanner — the per-Issue lifecycle (the `linear-agent` workflow culminating in `lisa-implement`) owns it. And never spawn that lifecycle as a subagent; run it in-session per Phase 3c so `lisa-implement` can create its agent team.
342
338
  - Never auto-transition past `$DONE`. Downstream labels are owned by QA / product / a future verification-intake skill.
343
339
  - Never move the native Linear state to Done / Completed for intermediate env states (`status:on-dev`, `status:on-stg`, or configured equivalents). Native completion happens only at the terminal `done` value.
344
- - If the Issue has no Validation Journey or no sign-in credentials in its description, `lisa-linear-agent`'s pre-flight verify will catch it and relabel to `status:blocked` — don't try to fix the Issue from here.
345
- - On any unexpected response from `lisa-linear-agent` (label it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
340
+ - If the Issue has no Validation Journey or no sign-in credentials in its description, the pre-flight verify gate will catch it and relabel to `status:blocked` — don't try to fix the Issue from here.
341
+ - On any unexpected outcome from the lifecycle run (label it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
346
342
  - Never pick an arbitrary env for `$DONE` resolution. If `done` is a map and env is ambiguous, fail loudly.
@@ -17,7 +17,9 @@ Spot-check application health, **audit observability completeness**, and **file
17
17
 
18
18
  ## Orchestration: agent team
19
19
 
20
- If you are NOT already operating inside an agent team (no prior successful team-creation or subagent-delegation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
20
+ You are "inside an agent team" only if you are yourself a spawned teammate or subagent you were spawned into a team context, or your context names a team lead you report to. A lead/root session that has previously spawned subagents is still the lead and retains full authority to create this flow's team.
21
+
22
+ If you are NOT inside an agent team by that definition, the very first thing you do is establish team orchestration.
21
23
 
22
24
  Use the team tool for the current runtime:
23
25
 
@@ -10,7 +10,9 @@ Decompose the PRD/spec at `$ARGUMENTS` into ordered work items with acceptance c
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior successful team-creation or subagent-delegation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
13
+ You are "inside an agent team" only if you are yourself a spawned teammate or subagent you were spawned into a team context, or your context names a team lead you report to. A lead/root session that has previously spawned subagents is still the lead: prior `Agent` calls in the session (e.g., an Intake cycle's bounded scan helpers) do NOT make this a nested flow, and the lead retains full authority to create this flow's team.
14
+
15
+ If you are NOT inside an agent team by that definition, the very first thing you do is establish team orchestration.
14
16
 
15
17
  Use the team tool for the current runtime:
16
18
 
@@ -22,7 +24,9 @@ If no team creation or subagent delegation tool is available, explicitly state t
22
24
 
23
25
  Until the team is established, the first Codex teammate has been spawned, or the no-team fallback has been declared, do NOT call any of: `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. The initial Claude `Agent` spawn described above is the only pre-team exception because it establishes the team. Reading the PRD, exploring the code, fetching context — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
24
26
 
25
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates and do NOT collapse the nested flow into a single inline worker. A nested team-first flow must still bring in the specialists it requires by adding them to the existing team, not by doing the work itself:
27
+ Note that `lisa-intake` dispatching this skill is NOT the nested case: Intake is a thin dispatcher that creates no team of its own and invokes this skill via the Skill tool in the lead session precisely so this preamble fires treat an Intake dispatch exactly like a direct invocation and run the full team-first flow above.
28
+
29
+ If you ARE already inside an agent team by the definition above (you are a teammate that was handed this skill via the Skill tool from within another flow's team), do NOT create a second team — many harnesses reject double-creates — and do NOT collapse the nested flow into a single inline worker. A nested team-first flow must still bring in the specialists it requires by adding them to the existing team, not by doing the work itself:
26
30
 
27
31
  - **Claude:** teams are flat and only the lead can add named teammates, so do NOT call `Agent` with a `name` from a teammate (the harness rejects it: *"Teammates cannot spawn other teammates — the team roster is flat"*). Send the team lead a message naming the specialist teammate(s) this flow needs, their task assignments, and completion criteria, then coordinate through the shared task list until they finish. An anonymous subagent (`Agent` with `name` omitted) is permitted only for bounded one-shot work whose result returns directly to you — it is not a substitute for the required lifecycle specialists.
28
32
  - **Codex:** do NOT call `TeamCreate`. If the lead/root agent is addressable (you were given its id/handle), send it a request to `multi_agent_v1.spawn_agent` the specialist agent(s), including each agent's prompt, ownership, and expected result. If no lead handle exists but `spawn_agent` is available to you, spawn only the bounded specialist agent(s) this flow needs, `wait_agent` for their results, and relay those results upward to the parent/lead.
@@ -112,48 +112,19 @@ The only legitimate reasons to stop early:
112
112
  - No stuck/close-out candidates, or none actionable this cycle. Exit cleanly with the idle-case
113
113
  summary.
114
114
 
115
- ## Orchestration: agent team
116
-
117
- If you are NOT already operating inside an agent team (no prior successful team-creation or
118
- subagent-delegation tool call in this session, not spawned into a team context), the very first
119
- thing you do is establish team orchestration.
120
-
121
- Use the team tool for the current runtime:
122
-
123
- - Claude Code >= 2.1.178: there is no `TeamCreate` tool; the team forms automatically when you spawn
124
- the first teammate with `Agent`. That first spawn should be the bounded specialist needed to start
125
- this flow. On older Claude Code that still exposes `TeamCreate`, the explicit team-create path is
126
- also acceptable.
127
- - Codex: do not call `TeamCreate`; Codex does not expose that Claude tool. Use `tool_search`
128
- with a query like `multi-agent tools` to load `multi_agent_v1`, then use
129
- `multi_agent_v1.spawn_agent` for teammate delegation. Treat the first successful `spawn_agent`
130
- call as establishing team orchestration.
131
- - Other runtimes: use the current runtime's tool-discovery mechanism to discover and call the
132
- appropriate multi-agent/team tool.
133
-
134
- If no team creation or subagent delegation tool is available, explicitly state that team
135
- orchestration is unavailable in this runtime, continue as the lead agent, and preserve the
136
- workflow's review, verification, and task-tracking obligations locally.
137
-
138
- Until the team is established, the first Codex teammate has been spawned, or the no-team
139
- fallback has been declared, do NOT call any of: `TaskCreate`, `Skill`, MCP tools
140
- (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`.
141
- The initial Claude `Agent` spawn described above is the only pre-team exception because it
142
- establishes the team.
143
- Scanning the queue, evaluating staleness, and dispatching per-item repairs — all of those are
144
- tasks for the team you are about to create, not for the lead session before orchestration
145
- exists.
146
-
147
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill
148
- tool), do NOT create a second team — many harnesses reject double-creates — and do NOT collapse the nested flow into a single inline worker. A nested team-first flow must still bring in the specialists it requires by adding them to the existing team, not by doing the work itself:
149
-
150
- - **Claude:** teams are flat and only the lead can add named teammates, so do NOT call `Agent` with a `name` from a teammate (the harness rejects it: *"Teammates cannot spawn other teammates — the team roster is flat"*). Send the team lead a message naming the specialist teammate(s) this flow needs, their task assignments, and completion criteria, then coordinate through the shared task list until they finish. An anonymous subagent (`Agent` with `name` omitted) is permitted only for bounded one-shot work whose result returns directly to you — it is not a substitute for the required lifecycle specialists.
151
- - **Codex:** do NOT call `TeamCreate`. If the lead/root agent is addressable (you were given its id/handle), send it a request to `multi_agent_v1.spawn_agent` the specialist agent(s), including each agent's prompt, ownership, and expected result. If no lead handle exists but `spawn_agent` is available to you, spawn only the bounded specialist agent(s) this flow needs, `wait_agent` for their results, and relay those results upward to the parent/lead.
152
-
153
- Treat the first successful lead-spawn request (or, on the Codex fallback, the first specialist spawn) as preserving team orchestration. Never satisfy a team-first lifecycle flow by doing all the work inline. The cycle's outer team is created by repair-intake. Each per-item repair it runs
154
- (`lisa:<source>-to-tracker` for a PRD, `lisa:<tracker>-agent` for a build item) executes within
155
- the same team — those skills' orchestration preambles detect the existing team and skip creating
156
- a second one. One team per cron cycle.
115
+ ## Orchestration: thin dispatcher (no team of its own)
116
+
117
+ Repair-intake follows the same orchestration contract as `lisa-intake`: it creates NO agent team and spawns NO named teammates. It is a bounded scanner/dispatcher — resolve the queue, evaluate staleness, pick the actionable candidates, and run each repair in the current session.
118
+
119
+ The reasoning is the same as Intake's: a repair that resumes stalled build work may culminate in a team-first lifecycle skill (`lisa-implement`, `lisa-plan`), and those skills can only create their agent team from the lead session — a spawned teammate cannot add named teammates (Claude teams are flat), so pushing the repair into a subagent strands the lifecycle skill without its team and collapses it into a single inline worker. Therefore:
120
+
121
+ - **Scanning, staleness evaluation, and per-item repairs run inline in this session** (Bash / MCP / vendor skills via the Skill tool — `lisa-<source>-to-tracker` for a PRD, the `<tracker>-agent` workflow's gate skills for a build item).
122
+ - **Any repair that dispatches a lifecycle flow does so via the Skill tool in this same session — never an `Agent` spawn** — so the lifecycle skill's team-first preamble fires exactly as a direct invocation would.
123
+ - The only permissible `Agent` use is a bounded **anonymous** helper (`Agent` with `name` omitted) for scan-side legwork whose result returns directly to this session.
124
+
125
+ Codex: the same contract applies — run the scan inline in the root session and invoke any lifecycle skill there so it can `multi_agent_v1.spawn_agent` its own team; do not `spawn_agent` the lifecycle flow itself. Other runtimes: apply the same rule through their equivalent delegation surface; if the runtime has no team/subagent tooling at all, the lifecycle skill's own no-team fallback handles it.
126
+
127
+ If a teammate inside an existing team somehow invokes this skill (it is a session entry point, not a nested flow), do not scan or repair from there: return a structured `delegation-request` to the team lead asking it to run the repair cycle in the lead session, and surface the misrouting.
157
128
 
158
129
  ## Source dispatch
159
130
 
@@ -25,7 +25,9 @@ Produce a PRD for the problem in `$ARGUMENTS`, then create it in the configured
25
25
 
26
26
  ## Orchestration: agent team
27
27
 
28
- If you are NOT already operating inside an agent team (no prior successful team-creation or subagent-delegation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
28
+ You are "inside an agent team" only if you are yourself a spawned teammate or subagent you were spawned into a team context, or your context names a team lead you report to. A lead/root session that has previously spawned subagents is still the lead and retains full authority to create this flow's team.
29
+
30
+ If you are NOT inside an agent team by that definition, the very first thing you do is establish team orchestration.
29
31
 
30
32
  Use the team tool for the current runtime:
31
33
 
@@ -10,7 +10,9 @@ Ship the current branch and prove it works in the target environment.
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior successful team-creation or subagent-delegation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
13
+ You are "inside an agent team" only if you are yourself a spawned teammate or subagent you were spawned into a team context, or your context names a team lead you report to. A lead/root session that has previously spawned subagents is still the lead and retains full authority to create this flow's team.
14
+
15
+ If you are NOT inside an agent team by that definition, the very first thing you do is establish team orchestration.
14
16
 
15
17
  Use the team tool for the current runtime:
16
18