@codyswann/lisa 2.174.0 → 2.174.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/rules/eager/leaf-only-lifecycle.md +2 -0
- package/plugins/lisa/rules/reference/leaf-only-lifecycle.md +1 -0
- package/plugins/lisa/skills/github-build-intake/SKILL.md +25 -0
- package/plugins/lisa/skills/intake/SKILL.md +1 -0
- package/plugins/lisa/skills/jira-build-intake/SKILL.md +19 -0
- package/plugins/lisa/skills/linear-build-intake/SKILL.md +19 -0
- package/plugins/lisa/skills/ticket-triage/SKILL.md +10 -6
- package/plugins/lisa/skills/tracker-build-intake/SKILL.md +21 -0
- package/plugins/lisa/skills/tracker-verify/SKILL.md +1 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/github-build-intake/SKILL.md +25 -0
- package/plugins/lisa-agy/skills/intake/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/jira-build-intake/SKILL.md +19 -0
- package/plugins/lisa-agy/skills/linear-build-intake/SKILL.md +19 -0
- package/plugins/lisa-agy/skills/ticket-triage/SKILL.md +10 -6
- package/plugins/lisa-agy/skills/tracker-build-intake/SKILL.md +21 -0
- package/plugins/lisa-agy/skills/tracker-verify/SKILL.md +1 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/eager/leaf-only-lifecycle.md +2 -0
- package/plugins/lisa-copilot/rules/reference/leaf-only-lifecycle.md +1 -0
- package/plugins/lisa-copilot/skills/github-build-intake/SKILL.md +25 -0
- package/plugins/lisa-copilot/skills/intake/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/jira-build-intake/SKILL.md +19 -0
- package/plugins/lisa-copilot/skills/linear-build-intake/SKILL.md +19 -0
- package/plugins/lisa-copilot/skills/ticket-triage/SKILL.md +10 -6
- package/plugins/lisa-copilot/skills/tracker-build-intake/SKILL.md +21 -0
- package/plugins/lisa-copilot/skills/tracker-verify/SKILL.md +1 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/leaf-only-lifecycle-reference.mdc +1 -0
- package/plugins/lisa-cursor/rules/leaf-only-lifecycle.mdc +2 -0
- package/plugins/lisa-cursor/skills/github-build-intake/SKILL.md +25 -0
- package/plugins/lisa-cursor/skills/intake/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/jira-build-intake/SKILL.md +19 -0
- package/plugins/lisa-cursor/skills/linear-build-intake/SKILL.md +19 -0
- package/plugins/lisa-cursor/skills/ticket-triage/SKILL.md +10 -6
- package/plugins/lisa-cursor/skills/tracker-build-intake/SKILL.md +21 -0
- package/plugins/lisa-cursor/skills/tracker-verify/SKILL.md +1 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/eager/leaf-only-lifecycle.md +2 -0
- package/plugins/src/base/rules/reference/leaf-only-lifecycle.md +1 -0
- package/plugins/src/base/skills/github-build-intake/SKILL.md +25 -0
- package/plugins/src/base/skills/intake/SKILL.md +1 -0
- package/plugins/src/base/skills/jira-build-intake/SKILL.md +19 -0
- package/plugins/src/base/skills/linear-build-intake/SKILL.md +19 -0
- package/plugins/src/base/skills/ticket-triage/SKILL.md +10 -6
- package/plugins/src/base/skills/tracker-build-intake/SKILL.md +21 -0
- package/plugins/src/base/skills/tracker-verify/SKILL.md +1 -0
package/package.json
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"ws": ">=8.20.1"
|
|
92
92
|
},
|
|
93
93
|
"name": "@codyswann/lisa",
|
|
94
|
-
"version": "2.174.
|
|
94
|
+
"version": "2.174.1",
|
|
95
95
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
96
96
|
"main": "dist/index.js",
|
|
97
97
|
"exports": {
|
|
@@ -38,4 +38,6 @@ When a leaf reaches the true terminal `done` (the production / final-env value),
|
|
|
38
38
|
|
|
39
39
|
Intermediate env-keyed states (`status:on-dev`, `On Stg`, etc.) remain open. Idempotent — if already closed, report and continue.
|
|
40
40
|
|
|
41
|
+
Duplicate closeout is a narrow terminal exception: build intake may close a claimed item without a PR only when `ticket-triage` returns `DUPLICATE_ALREADY_FIXED` with a canonical item reference and empirical base-branch proof. Close it through provider duplicate semantics, not as completed build work. `BLOCKED`, ambiguous, duplicate-of-open, and other human-owned dispositions are not auto-closed.
|
|
42
|
+
|
|
41
43
|
Full vendor mechanics + the state machine in prose: [reference/leaf-only-lifecycle.md](../reference/leaf-only-lifecycle.md).
|
|
@@ -104,6 +104,7 @@ This action is **terminal-only**:
|
|
|
104
104
|
- Intermediate env-keyed states such as `status:on-dev`, `status:on-stg`, `On Dev`, or `On Stg` remain open / unresolved / active. They are deployment waypoints, not terminal completion.
|
|
105
105
|
- A single-environment project whose `done` resolves to one value treats that value as terminal. In this repo, `production: main` means `status:done` / `Done` is terminal.
|
|
106
106
|
- A multi-environment project treats only the production / final environment's `done` value as terminal unless the project explicitly configures `done` as a single string. Do not close native work items at lower environments.
|
|
107
|
+
- Duplicate closeout is a narrow terminal exception: build intake may close a claimed item without a PR only when `ticket-triage` returns `DUPLICATE_ALREADY_FIXED` with a canonical item reference and empirical proof that the canonical fix is present on the relevant base branch. That closeout uses the provider's duplicate semantics (`Duplicate` resolution, duplicate/canceled state, or GitHub not-planned close with a duplicate link/comment), not the normal "completed build" reason. `BLOCKED`, ambiguous, duplicate-of-open, and other human-owned dispositions are not auto-closed.
|
|
107
108
|
- The native finalization must be idempotent. If the item is already closed / completed / resolved, report that and continue.
|
|
108
109
|
- If a provider exposes no native close / archive operation, or a project has not configured the native Done state, record a capability-aware no-op or setup error according to the vendor skill. Do not invent a state name.
|
|
109
110
|
|
|
@@ -270,9 +270,30 @@ Wait for `lisa:github-agent` to return. Capture its outcome:
|
|
|
270
270
|
|
|
271
271
|
- **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.
|
|
272
272
|
- **Blocked by github-verify pre-flight gate** — `lisa:github-agent` itself relabels the issue to `status:blocked` (or removes `$CLAIMED` and reassigns to the original author). This is correct and expected — let it stand. Record and move on.
|
|
273
|
+
- **Duplicate already fixed** — `lisa:github-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 GitHub exposes it (otherwise leave an explicit cross-reference comment/body link), remove `$CLAIMED`, add the terminal `$DONE` label, close the issue with `gh issue close --reason "not planned"`, 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.
|
|
273
274
|
- **Blocked by ticket-triage ambiguities** — `lisa:github-agent` posts findings and stops. The issue stays in `$CLAIMED`. Surface to human; do not auto-relabel. Record under "Errors".
|
|
274
275
|
- **Errored** — exception, missing config, etc. Leave the issue in `$CLAIMED` for human investigation. Record under "Errors".
|
|
275
276
|
|
|
277
|
+
#### 3c.1 Close duplicate already fixed
|
|
278
|
+
|
|
279
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
280
|
+
|
|
281
|
+
1. Verify the structured result includes a canonical issue reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
282
|
+
2. Post or preserve the triage-finding comment that explains why this issue is a duplicate and names the canonical issue.
|
|
283
|
+
3. Ensure a native `duplicates <canonical>` link exists when GitHub exposes issue relationships; if this installation cannot create that relationship, leave an explicit issue cross-reference comment/body link and record the limitation in the summary.
|
|
284
|
+
4. Resolve terminal `$DONE` exactly as in Phase 3d. For a single-env repo, `$DONE` is terminal; for env-keyed config, only the production/final value is terminal.
|
|
285
|
+
5. Replace `$CLAIMED` with `$DONE`, then close the issue as duplicate/not-planned:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
gh issue edit <number> --repo <org>/<repo> --remove-label "$CLAIMED" --add-label "$DONE"
|
|
289
|
+
gh issue comment <number> --repo <org>/<repo> --body "[claude-build-intake] Closed as duplicate of <canonical>. Canonical fix: <PR-or-commit>. Evidence: <base-branch-proof>."
|
|
290
|
+
gh issue close <number> --repo <org>/<repo> --reason "not planned"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical issue promotes, and recurrence is tracked by the canonical issue rather than by reopening this duplicate.
|
|
294
|
+
|
|
295
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
296
|
+
|
|
276
297
|
#### 3d. Transition to $DONE (only after the PR is merged)
|
|
277
298
|
|
|
278
299
|
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.
|
|
@@ -336,6 +357,8 @@ Issues processed: <n>
|
|
|
336
357
|
- <org>/<repo>#<number> <title> — build-ready on a parent/container; moved $READY → $CLAIMED without invoking lisa:github-agent; lifecycle-repair comment posted
|
|
337
358
|
- Skipped (active blockers): <n>
|
|
338
359
|
- <org>/<repo>#<number> <title> — waiting on <blocker refs>
|
|
360
|
+
- Duplicate already fixed (closed as duplicate): <n>
|
|
361
|
+
- <org>/<repo>#<number> <title> — duplicate of <canonical>; no PR opened
|
|
339
362
|
- Blocked (pre-flight verify failed): <n>
|
|
340
363
|
- <org>/<repo>#<number> <title> — see issue comments
|
|
341
364
|
- Held (triage found ambiguities): <n>
|
|
@@ -352,6 +375,7 @@ Total PRs opened: <n>
|
|
|
352
375
|
- **Dependency hold runs before leaf claim**: explicit `Blocked by:` relationships are resolved after container repair is ruled out but before `$READY → $CLAIMED`; active blockers leave the leaf candidate in `$READY` and are reported as skipped, not blocked.
|
|
353
376
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE `lisa:github-agent` invocation for leaves; containers are also moved to `$CLAIMED` to leave the ready pickup queue, but are not dispatched.
|
|
354
377
|
- **No writes outside the lifecycle**: this skill only relabels `$READY → $CLAIMED` and `$CLAIMED → $DONE`. For containers, `$READY → $CLAIMED` is a lifecycle repair, not a direct build claim. Every other label change is owned by `lisa:github-agent`.
|
|
378
|
+
- **Duplicate terminal exception**: `DUPLICATE_ALREADY_FIXED` is the only triage outcome that may close a claimed item without a PR from this cycle. It must include a canonical issue reference and empirical base-branch evidence, and it closes as duplicate/not-planned rather than as completed build work.
|
|
355
379
|
- **Terminal native closure**: after `$CLAIMED → $DONE`, close the GitHub issue only when `$DONE` is the true terminal done value per `leaf-only-lifecycle`; intermediate env labels stay open.
|
|
356
380
|
- **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.
|
|
357
381
|
- **Single cycle per repo**: do not run two `lisa:github-build-intake` cycles in parallel against the same repo — concurrent claims could race. The scheduling layer is responsible for serialization.
|
|
@@ -378,6 +402,7 @@ If the repo has not adopted the `status:*` label namespace, this skill cannot ru
|
|
|
378
402
|
- Never bypass `lisa:github-agent` to do build work directly. `lisa:github-agent` owns the per-issue lifecycle.
|
|
379
403
|
- Never auto-transition past `$DONE`. Downstream labels (terminal `status:done`, etc.) are owned by QA / PM / merge automation.
|
|
380
404
|
- Never close a GitHub issue at intermediate env states (`status:on-dev`, `status:on-stg`, or configured equivalents). Native close happens only at the terminal `done` value.
|
|
405
|
+
- Never auto-close a `BLOCKED`, ambiguous, or duplicate-of-open issue. Auto-close is allowed only for `DUPLICATE_ALREADY_FIXED`.
|
|
381
406
|
- If the issue has no Validation Journey or no sign-in credentials, `lisa:github-agent`'s pre-flight verify will catch it — **don't try to fix the issue from here**.
|
|
382
407
|
- On any unexpected response from `lisa:github-agent` (status it doesn't claim, missing PR URL on success), record as Error and surface — never assume.
|
|
383
408
|
- Never pick an arbitrary env for `$DONE` resolution. If `done` is a map and env is ambiguous, fail loudly.
|
|
@@ -105,6 +105,7 @@ The single-item skills (`lisa:plan`, `lisa:implement`) and the per-vendor batch
|
|
|
105
105
|
- GitHub PRDs → `lisa:github-prd-intake` handles per-item: claim (relabel issue to `prd-in-review`), dry-run validate, branch to `prd-blocked` or `prd-ticketed` (with clarifying-question comments posted directly on the PRD issue), coverage audit
|
|
106
106
|
- JIRA tickets → `lisa:jira-build-intake` handles per-item: claim, dispatch to `lisa:jira-agent`, transition to On Dev on success
|
|
107
107
|
- GitHub build issues (when `tracker = github`) → `lisa:tracker-build-intake` → `lisa:github-build-intake` handles per-item: optional ready-queue assignee filtering, claim (relabel to `status:in-progress`), dispatch to `lisa:github-agent`, relabel to `status:on-dev` on success
|
|
108
|
+
- Duplicate-already-fixed build tickets are the one build-intake closeout exception: when `ticket-triage` returns `DUPLICATE_ALREADY_FIXED` with a canonical item and empirical base-branch evidence, the vendor build-intake skill closes the claimed ticket as a duplicate without opening a PR. This does not apply to `BLOCKED`, ambiguous, duplicate-of-open, or otherwise human-owned terminal dispositions.
|
|
108
109
|
- **Closing the PRD loop:** beyond claiming one Ready PRD, every PRD scanner also runs the closure rollup (`ticketed → shipped`, Phase 3f) and **dispatches `lisa:verify-prd` for one shipped PRD** (Phase 3g) each cycle — so a shipped PRD does not sit unverified. On pass the PRD goes `shipped → verified`; on fail it is re-opened `shipped → ticketed` with **build-ready fix tickets** that auto-build and trigger a re-verify (never `blocked`). The scanner only dispatches; `lisa:verify-prd` owns the transition (per the `prd-lifecycle-rollup` rule's "Closing the loop" section), and the self-healing loop continues until the PRD verifies.
|
|
109
110
|
5. **Stop after one item** — a claimed Ready item, a safe-blocked container, or a per-item error ends the *ready-claim* portion of the cycle. The per-vendor PRD scanner still runs its rollup and one verify-prd dispatch. Remaining Ready items stay untouched for later scheduler invocations.
|
|
110
111
|
6. **Summary report** — the single processed/skipped/error item, total processed, total errors. Before returning, record intake usage on the persisted cycle-summary artifact via `lisa:usage-accounting` so the summary carries a direct `intake` entry in the canonical `## Lisa Usage` section. If the claimed / skipped work item's parent-child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same cycle; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
|
|
@@ -196,9 +196,25 @@ Invoke the `lisa:jira-agent` (existing per-ticket lifecycle agent) with the tick
|
|
|
196
196
|
Wait for `lisa:jira-agent` to return. Capture its outcome:
|
|
197
197
|
- **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.
|
|
198
198
|
- **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.
|
|
199
|
+
- **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.
|
|
199
200
|
- **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>"`.
|
|
200
201
|
- **Errored** — exception, missing config, etc. Leave the ticket in `$CLAIMED` for human investigation. Record under "Errors" with the exception summary.
|
|
201
202
|
|
|
203
|
+
#### 3c.1 Close duplicate already fixed
|
|
204
|
+
|
|
205
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
206
|
+
|
|
207
|
+
1. Verify the structured result includes a canonical ticket reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
208
|
+
2. Post or preserve the triage-finding comment that explains why this ticket is a duplicate and names the canonical ticket.
|
|
209
|
+
3. Ensure the native `duplicates <canonical>` link exists through `lisa:atlassian-access`.
|
|
210
|
+
4. Resolve the terminal `$DONE` value exactly as in Phase 3d. For env-keyed workflows, duplicate closeout uses the production/final done status, not an intermediate `On Dev`/`On Stg` waypoint.
|
|
211
|
+
5. Transition to `$DONE` with JIRA resolution `Duplicate`. If `acli` cannot set resolution on transition, use the Atlassian REST transition-with-fields path exposed by `lisa:atlassian-access`, or a documented follow-up edit that sets the resolution immediately after transition. Do not report success with an empty resolution when the workflow requires one.
|
|
212
|
+
6. Post a close comment naming the canonical ticket, PR/commit, and base-branch evidence.
|
|
213
|
+
|
|
214
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical ticket promotes, and recurrence is tracked by the canonical ticket rather than by reopening this duplicate.
|
|
215
|
+
|
|
216
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
217
|
+
|
|
202
218
|
#### 3d. Transition to $DONE (only after the PR is merged)
|
|
203
219
|
|
|
204
220
|
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.
|
|
@@ -249,6 +265,8 @@ Tickets processed: <n>
|
|
|
249
265
|
- <ticket-key> <summary> → PR <URL> (mergeStateStatus: <state>)
|
|
250
266
|
- Skipped (container — leaf-only-lifecycle): <n>
|
|
251
267
|
- <ticket-key> <summary> — build-ready on a parent with open child work; lifecycle-repair comment posted
|
|
268
|
+
- Duplicate already fixed (closed as Duplicate): <n>
|
|
269
|
+
- <ticket-key> <summary> — duplicate of <canonical>; no PR opened
|
|
252
270
|
- Blocked (pre-flight verify failed): <n>
|
|
253
271
|
- <ticket-key> <summary> — see ticket comments
|
|
254
272
|
- Held (triage found ambiguities): <n>
|
|
@@ -264,6 +282,7 @@ Total PRs opened: <n>
|
|
|
264
282
|
- **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.
|
|
265
283
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE `lisa:jira-agent` invocation — no double-pickup.
|
|
266
284
|
- **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).
|
|
285
|
+
- **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.
|
|
267
286
|
- **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.
|
|
268
287
|
- **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.
|
|
269
288
|
- **Single cycle per query**: do not run two `lisa:jira-build-intake` cycles concurrently against overlapping queries — concurrent claims could race. The scheduling layer (when added) is responsible for serialization.
|
|
@@ -207,9 +207,25 @@ Invoke `lisa:linear-agent` (per-Issue lifecycle agent) with the Issue identifier
|
|
|
207
207
|
Wait for the agent to return. Capture its outcome:
|
|
208
208
|
- **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.
|
|
209
209
|
- **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.
|
|
210
|
+
- **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.
|
|
210
211
|
- **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".
|
|
211
212
|
- **Errored** — exception, missing config, etc. Leave at `$CLAIMED`. Record with exception summary.
|
|
212
213
|
|
|
214
|
+
#### 3c.1 Close duplicate already fixed
|
|
215
|
+
|
|
216
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
217
|
+
|
|
218
|
+
1. Verify the structured result includes a canonical Issue reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
219
|
+
2. Post or preserve the triage-finding comment that explains why this Issue is a duplicate and names the canonical Issue.
|
|
220
|
+
3. Ensure a native `duplicates <canonical>` relationship exists when Linear exposes one; if this workspace cannot create that relationship, leave an explicit relation/comment reference and record the limitation in the summary.
|
|
221
|
+
4. Resolve the terminal `$DONE` value exactly as in Phase 3d. For env-keyed workflows, duplicate closeout uses the production/final done label, not an intermediate `status:on-dev`/`status:on-stg` waypoint.
|
|
222
|
+
5. Update labels by removing `$CLAIMED` and adding terminal `$DONE`, then move the native Linear state to the configured canceled-as-duplicate state. If no duplicate/canceled state is configured, use the configured terminal completed state only when that is the project's duplicate-close convention; otherwise record setup as an Error rather than inventing a state.
|
|
223
|
+
6. Post a close comment naming the canonical Issue, PR/commit, and base-branch evidence.
|
|
224
|
+
|
|
225
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical Issue promotes, and recurrence is tracked by the canonical Issue rather than by reopening this duplicate.
|
|
226
|
+
|
|
227
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
228
|
+
|
|
213
229
|
#### 3d. Relabel to $DONE (only after the PR is merged)
|
|
214
230
|
|
|
215
231
|
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.
|
|
@@ -260,6 +276,8 @@ Issues processed: <n>
|
|
|
260
276
|
- <ID> <title> → PR <URL> (mergeStateStatus: <state>)
|
|
261
277
|
- Skipped (container — leaf-only-lifecycle): <n>
|
|
262
278
|
- <ID> <title> — build-ready on a parent with open child work; lifecycle-repair comment posted
|
|
279
|
+
- Duplicate already fixed (closed as duplicate): <n>
|
|
280
|
+
- <ID> <title> — duplicate of <canonical>; no PR opened
|
|
263
281
|
- status:blocked (pre-flight verify failed): <n>
|
|
264
282
|
- <ID> <title> — see Issue comments
|
|
265
283
|
- Held (triage found ambiguities): <n>
|
|
@@ -275,6 +293,7 @@ Total PRs opened: <n>
|
|
|
275
293
|
- **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.
|
|
276
294
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE agent invocation — no double-pickup.
|
|
277
295
|
- **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`.
|
|
296
|
+
- **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.
|
|
278
297
|
- **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.
|
|
279
298
|
- **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.
|
|
280
299
|
- **Single cycle per team**: do not run two concurrent cycles against the same team — concurrent claims could race.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ticket-triage
|
|
3
|
-
description: "Analytical triage gate for tickets in the configured destination tracker (JIRA, GitHub Issues, or Linear). Detects requirement ambiguities, identifies edge cases from codebase analysis, and plans verification methodology. Posts findings to the ticket and produces a verdict (BLOCKED/PASSED_WITH_FINDINGS/PASSED) that gates whether implementation can proceed. Vendor-neutral: the caller (jira-agent or github-agent) is responsible for fetching the ticket via lisa:tracker-read, running the pre-flight gate via lisa:tracker-verify, and posting findings via the matching vendor comment tool."
|
|
3
|
+
description: "Analytical triage gate for tickets in the configured destination tracker (JIRA, GitHub Issues, or Linear). Detects requirement ambiguities, identifies edge cases from codebase analysis, and plans verification methodology. Posts findings to the ticket and produces a verdict (DUPLICATE_ALREADY_FIXED/BLOCKED/PASSED_WITH_FINDINGS/PASSED) that gates whether implementation can proceed. Vendor-neutral: the caller (jira-agent or github-agent) is responsible for fetching the ticket via lisa:tracker-read, running the pre-flight gate via lisa:tracker-verify, and posting findings via the matching vendor comment tool."
|
|
4
4
|
allowed-tools: ["Read", "Glob", "Grep", "Bash"]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -48,11 +48,13 @@ From the context bundle, evaluate relationships before analyzing this ticket in
|
|
|
48
48
|
|
|
49
49
|
- **Open blockers (`is blocked by`)**: if any blocker is not `Done` or its linked PR is not merged, raise an ambiguity: "Blocker {KEY} is not shipped — work cannot meaningfully start." This is an automatic `BLOCKED` verdict unless the human confirms the blocker state is acceptable.
|
|
50
50
|
- **Epic siblings in progress**: if a sibling under the same epic is `In Progress` / `In Review` with a different assignee and overlapping scope, raise it as an edge case in Phase 4 ("Duplicate-work risk with {KEY}").
|
|
51
|
-
- **`duplicates` / `is duplicated by` links**:
|
|
51
|
+
- **`duplicates` / `is duplicated by` links**:
|
|
52
|
+
- If this ticket is a duplicate of an open canonical ticket whose fix is not yet merged into the base branch, verdict is `BLOCKED` with the recommendation to close as duplicate manually rather than implement.
|
|
53
|
+
- If this ticket is a duplicate of canonical work that is already merged/deployed, verdict is `DUPLICATE_ALREADY_FIXED`. This verdict must carry the canonical ticket reference, the canonical PR/commit reference, and empirical evidence that the canonical fix is present on the relevant base branch. Never emit this verdict from a name/label match alone.
|
|
52
54
|
- **`relates to` links with shipped PRs**: flag the PRs in the verification methodology (Phase 5) as prior art worth reviewing before writing new code.
|
|
53
55
|
|
|
54
56
|
Do not re-fetch tickets — the bundle already has the context.
|
|
55
|
-
If Phase 1.5 finds an automatic blocker condition (`is blocked by` not shipped, or duplicate-of-open), emit `BLOCKED` immediately and skip to Phase 6 output formatting.
|
|
57
|
+
If Phase 1.5 finds an automatic blocker condition (`is blocked by` not shipped, or duplicate-of-open), emit `BLOCKED` immediately and skip to Phase 6 output formatting. If it finds a duplicate whose canonical fix is empirically present on the base branch, emit `DUPLICATE_ALREADY_FIXED` immediately and skip to Phase 6 output formatting.
|
|
56
58
|
|
|
57
59
|
## Phase 2 -- Cross-Repo Awareness
|
|
58
60
|
|
|
@@ -142,6 +144,7 @@ Every verification method must be specific enough that an automated agent could
|
|
|
142
144
|
Evaluate the findings and produce exactly one verdict:
|
|
143
145
|
|
|
144
146
|
- **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
|
|
147
|
+
- **`DUPLICATE_ALREADY_FIXED`** -- This ticket duplicates canonical work whose fix is already merged/deployed and empirically confirmed present on the relevant base branch. Work MUST NOT proceed. The caller must post the triage finding, ensure the native `duplicates <canonical>` link exists when the tracker supports one, and return the structured canonical reference/evidence to build intake for terminal duplicate closeout.
|
|
145
148
|
- **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent) MUST transition the ticket to `Blocked` and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
|
|
146
149
|
- **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
|
|
147
150
|
- **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
|
|
@@ -149,7 +152,7 @@ Evaluate the findings and produce exactly one verdict:
|
|
|
149
152
|
Output format:
|
|
150
153
|
|
|
151
154
|
```text
|
|
152
|
-
## Verdict: [NOT_RELEVANT | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
155
|
+
## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
153
156
|
|
|
154
157
|
**Ambiguities found:** [count]
|
|
155
158
|
**Edge cases identified:** [count]
|
|
@@ -172,11 +175,12 @@ Structure all output with clear section headers so the caller can parse and post
|
|
|
172
175
|
### Verification Methodology
|
|
173
176
|
[Phase 5 table, or "No acceptance criteria to verify."]
|
|
174
177
|
|
|
175
|
-
## Verdict: [NOT_RELEVANT | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
178
|
+
## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
176
179
|
```
|
|
177
180
|
|
|
178
181
|
The caller is responsible for:
|
|
179
182
|
1. Posting the findings as comments on the ticket (using whatever Jira mechanism is available)
|
|
180
183
|
2. Adding the `claude-triaged-{repo}` label to the ticket
|
|
181
184
|
3. If `BLOCKED` due to Phase 0 (missing required description content): transitioning the ticket to `Blocked`, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
|
|
182
|
-
4. If `
|
|
185
|
+
4. If `DUPLICATE_ALREADY_FIXED`: return the canonical ticket reference and empirical base-branch evidence to build intake so it can close the ticket as a terminal duplicate without opening a PR.
|
|
186
|
+
5. If `BLOCKED` due to Phase 1.5 (open blockers, duplicate-of-open) or Phase 3 (ambiguities): stopping all work and reporting to the human; do NOT auto-transition status in these cases.
|
|
@@ -12,6 +12,8 @@ See the `config-resolution` rule for configuration and dispatch table.
|
|
|
12
12
|
|
|
13
13
|
The vendor scanners also own the terminal native-closure step from `leaf-only-lifecycle`: after a leaf reaches the true terminal `done` value, they close / resolve / complete the native tracker item where supported, while leaving intermediate env states open.
|
|
14
14
|
|
|
15
|
+
They also forward the narrow duplicate terminal exception from `ticket-triage`: when a claimed item returns `DUPLICATE_ALREADY_FIXED` with a canonical item reference and empirical base-branch evidence, the vendor scanner posts the triage finding, ensures a native `duplicates <canonical>` link where supported, and closes the item as a duplicate without opening a PR. This is distinct from `BLOCKED`; open blockers, ambiguous tickets, and duplicate-of-open findings stay held for human action.
|
|
16
|
+
|
|
15
17
|
## Workflow
|
|
16
18
|
|
|
17
19
|
1. Resolve tracker config (same logic as `lisa:tracker-write`).
|
|
@@ -55,10 +57,29 @@ This shim also forwards the `leaf-only-lifecycle` terminal native-closure contra
|
|
|
55
57
|
|
|
56
58
|
Intermediate env states are not native closure. A vendor scanner that resolves `On Dev`, `On Stg`, `status:on-dev`, `status:on-stg`, or a configured equivalent leaves the item open / unresolved.
|
|
57
59
|
|
|
60
|
+
## Duplicate-already-fixed terminal contract (forwarded to every vendor)
|
|
61
|
+
|
|
62
|
+
`DUPLICATE_ALREADY_FIXED` is the only triage verdict that may close a claimed build item without a PR from the current cycle. The vendor scanner must require:
|
|
63
|
+
|
|
64
|
+
- canonical ticket/issue reference;
|
|
65
|
+
- canonical PR/commit reference;
|
|
66
|
+
- empirical evidence that the canonical fix is present on the relevant base branch.
|
|
67
|
+
|
|
68
|
+
Vendor closeout behavior:
|
|
69
|
+
|
|
70
|
+
| Tracker | Duplicate closeout |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `github` | apply terminal `$DONE`, ensure/link `duplicates <canonical>` where available, then `gh issue close --reason "not planned"` |
|
|
73
|
+
| `jira` | transition to terminal `$DONE` with resolution `Duplicate` and ensure the native duplicates link |
|
|
74
|
+
| `linear` | apply terminal `$DONE`, ensure/link duplicate relationship where available, then move to the configured canceled-as-duplicate or terminal duplicate state |
|
|
75
|
+
|
|
76
|
+
If the canonical fix is merged but not yet on the production branch, the close comment must preserve the production-promotion caveat: the production error can recur until the canonical item promotes, and recurrence is tracked by the canonical item rather than by reopening this duplicate.
|
|
77
|
+
|
|
58
78
|
## Rules
|
|
59
79
|
|
|
60
80
|
- Single cycle per invocation — the vendor skill processes at most one eligible `Ready` item and exits. Scheduler repetition works the rest of the queue.
|
|
61
81
|
- The vendor skills run their own pre-flight checks (JIRA workflow transitions for the JIRA path; label namespace adoption for the GitHub and Linear paths) before processing items. Never bypass.
|
|
62
82
|
- **Leaf-only dispatch, every vendor.** Per the `leaf-only-lifecycle` rule, each vendor scanner dispatches leaf work units only and moves or safe-blocks a container (open child work, or a childless Epic) carrying a stale build-ready role according to its lifecycle semantics. This shim does not re-implement the gate — it relies on the vendor scanner's Phase 3a — but the contract is uniform across `jira`, `github`, and `linear` so behavior never drifts by tracker.
|
|
63
83
|
- **Terminal native closure, every capable vendor.** Per the same rule, each vendor scanner finalizes native open/closed state only at the true terminal `done` value. This shim never performs native closure itself, but callers can rely on the dispatched vendor scanner to apply the contract.
|
|
84
|
+
- **Duplicate already fixed, every vendor.** Auto-close without a PR is allowed only for `DUPLICATE_ALREADY_FIXED` with canonical reference and empirical base-branch evidence. Do not conflate this with `BLOCKED`.
|
|
64
85
|
- Never run two intake cycles concurrently against overlapping queues — the scheduling layer is responsible for serialization.
|
|
@@ -25,3 +25,4 @@ See the `config-resolution` rule for configuration and dispatch table.
|
|
|
25
25
|
- Read-only.
|
|
26
26
|
- The same gates run pre-write and post-write — this shim simply chooses the vendor implementation.
|
|
27
27
|
- If the vendor verify reports `FAIL`, callers must NOT auto-fix from this layer. Surface the failures to the caller and let the higher-level skill decide.
|
|
28
|
+
- Duplicate closeout is not a verifier shortcut. A build-intake ticket may be auto-closed as duplicate only when downstream triage returns `DUPLICATE_ALREADY_FIXED` with a canonical ticket reference and empirical evidence that the canonical fix is present on the relevant base branch; ordinary verifier `FAIL`/`PASS` output never implies duplicate resolution.
|
|
@@ -270,9 +270,30 @@ Wait for `lisa:github-agent` to return. Capture its outcome:
|
|
|
270
270
|
|
|
271
271
|
- **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.
|
|
272
272
|
- **Blocked by github-verify pre-flight gate** — `lisa:github-agent` itself relabels the issue to `status:blocked` (or removes `$CLAIMED` and reassigns to the original author). This is correct and expected — let it stand. Record and move on.
|
|
273
|
+
- **Duplicate already fixed** — `lisa:github-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 GitHub exposes it (otherwise leave an explicit cross-reference comment/body link), remove `$CLAIMED`, add the terminal `$DONE` label, close the issue with `gh issue close --reason "not planned"`, 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.
|
|
273
274
|
- **Blocked by ticket-triage ambiguities** — `lisa:github-agent` posts findings and stops. The issue stays in `$CLAIMED`. Surface to human; do not auto-relabel. Record under "Errors".
|
|
274
275
|
- **Errored** — exception, missing config, etc. Leave the issue in `$CLAIMED` for human investigation. Record under "Errors".
|
|
275
276
|
|
|
277
|
+
#### 3c.1 Close duplicate already fixed
|
|
278
|
+
|
|
279
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
280
|
+
|
|
281
|
+
1. Verify the structured result includes a canonical issue reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
282
|
+
2. Post or preserve the triage-finding comment that explains why this issue is a duplicate and names the canonical issue.
|
|
283
|
+
3. Ensure a native `duplicates <canonical>` link exists when GitHub exposes issue relationships; if this installation cannot create that relationship, leave an explicit issue cross-reference comment/body link and record the limitation in the summary.
|
|
284
|
+
4. Resolve terminal `$DONE` exactly as in Phase 3d. For a single-env repo, `$DONE` is terminal; for env-keyed config, only the production/final value is terminal.
|
|
285
|
+
5. Replace `$CLAIMED` with `$DONE`, then close the issue as duplicate/not-planned:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
gh issue edit <number> --repo <org>/<repo> --remove-label "$CLAIMED" --add-label "$DONE"
|
|
289
|
+
gh issue comment <number> --repo <org>/<repo> --body "[claude-build-intake] Closed as duplicate of <canonical>. Canonical fix: <PR-or-commit>. Evidence: <base-branch-proof>."
|
|
290
|
+
gh issue close <number> --repo <org>/<repo> --reason "not planned"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical issue promotes, and recurrence is tracked by the canonical issue rather than by reopening this duplicate.
|
|
294
|
+
|
|
295
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
296
|
+
|
|
276
297
|
#### 3d. Transition to $DONE (only after the PR is merged)
|
|
277
298
|
|
|
278
299
|
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.
|
|
@@ -336,6 +357,8 @@ Issues processed: <n>
|
|
|
336
357
|
- <org>/<repo>#<number> <title> — build-ready on a parent/container; moved $READY → $CLAIMED without invoking lisa:github-agent; lifecycle-repair comment posted
|
|
337
358
|
- Skipped (active blockers): <n>
|
|
338
359
|
- <org>/<repo>#<number> <title> — waiting on <blocker refs>
|
|
360
|
+
- Duplicate already fixed (closed as duplicate): <n>
|
|
361
|
+
- <org>/<repo>#<number> <title> — duplicate of <canonical>; no PR opened
|
|
339
362
|
- Blocked (pre-flight verify failed): <n>
|
|
340
363
|
- <org>/<repo>#<number> <title> — see issue comments
|
|
341
364
|
- Held (triage found ambiguities): <n>
|
|
@@ -352,6 +375,7 @@ Total PRs opened: <n>
|
|
|
352
375
|
- **Dependency hold runs before leaf claim**: explicit `Blocked by:` relationships are resolved after container repair is ruled out but before `$READY → $CLAIMED`; active blockers leave the leaf candidate in `$READY` and are reported as skipped, not blocked.
|
|
353
376
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE `lisa:github-agent` invocation for leaves; containers are also moved to `$CLAIMED` to leave the ready pickup queue, but are not dispatched.
|
|
354
377
|
- **No writes outside the lifecycle**: this skill only relabels `$READY → $CLAIMED` and `$CLAIMED → $DONE`. For containers, `$READY → $CLAIMED` is a lifecycle repair, not a direct build claim. Every other label change is owned by `lisa:github-agent`.
|
|
378
|
+
- **Duplicate terminal exception**: `DUPLICATE_ALREADY_FIXED` is the only triage outcome that may close a claimed item without a PR from this cycle. It must include a canonical issue reference and empirical base-branch evidence, and it closes as duplicate/not-planned rather than as completed build work.
|
|
355
379
|
- **Terminal native closure**: after `$CLAIMED → $DONE`, close the GitHub issue only when `$DONE` is the true terminal done value per `leaf-only-lifecycle`; intermediate env labels stay open.
|
|
356
380
|
- **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.
|
|
357
381
|
- **Single cycle per repo**: do not run two `lisa:github-build-intake` cycles in parallel against the same repo — concurrent claims could race. The scheduling layer is responsible for serialization.
|
|
@@ -378,6 +402,7 @@ If the repo has not adopted the `status:*` label namespace, this skill cannot ru
|
|
|
378
402
|
- Never bypass `lisa:github-agent` to do build work directly. `lisa:github-agent` owns the per-issue lifecycle.
|
|
379
403
|
- Never auto-transition past `$DONE`. Downstream labels (terminal `status:done`, etc.) are owned by QA / PM / merge automation.
|
|
380
404
|
- Never close a GitHub issue at intermediate env states (`status:on-dev`, `status:on-stg`, or configured equivalents). Native close happens only at the terminal `done` value.
|
|
405
|
+
- Never auto-close a `BLOCKED`, ambiguous, or duplicate-of-open issue. Auto-close is allowed only for `DUPLICATE_ALREADY_FIXED`.
|
|
381
406
|
- If the issue has no Validation Journey or no sign-in credentials, `lisa:github-agent`'s pre-flight verify will catch it — **don't try to fix the issue from here**.
|
|
382
407
|
- On any unexpected response from `lisa:github-agent` (status it doesn't claim, missing PR URL on success), record as Error and surface — never assume.
|
|
383
408
|
- Never pick an arbitrary env for `$DONE` resolution. If `done` is a map and env is ambiguous, fail loudly.
|
|
@@ -105,6 +105,7 @@ The single-item skills (`lisa:plan`, `lisa:implement`) and the per-vendor batch
|
|
|
105
105
|
- GitHub PRDs → `lisa:github-prd-intake` handles per-item: claim (relabel issue to `prd-in-review`), dry-run validate, branch to `prd-blocked` or `prd-ticketed` (with clarifying-question comments posted directly on the PRD issue), coverage audit
|
|
106
106
|
- JIRA tickets → `lisa:jira-build-intake` handles per-item: claim, dispatch to `lisa:jira-agent`, transition to On Dev on success
|
|
107
107
|
- GitHub build issues (when `tracker = github`) → `lisa:tracker-build-intake` → `lisa:github-build-intake` handles per-item: optional ready-queue assignee filtering, claim (relabel to `status:in-progress`), dispatch to `lisa:github-agent`, relabel to `status:on-dev` on success
|
|
108
|
+
- Duplicate-already-fixed build tickets are the one build-intake closeout exception: when `ticket-triage` returns `DUPLICATE_ALREADY_FIXED` with a canonical item and empirical base-branch evidence, the vendor build-intake skill closes the claimed ticket as a duplicate without opening a PR. This does not apply to `BLOCKED`, ambiguous, duplicate-of-open, or otherwise human-owned terminal dispositions.
|
|
108
109
|
- **Closing the PRD loop:** beyond claiming one Ready PRD, every PRD scanner also runs the closure rollup (`ticketed → shipped`, Phase 3f) and **dispatches `lisa:verify-prd` for one shipped PRD** (Phase 3g) each cycle — so a shipped PRD does not sit unverified. On pass the PRD goes `shipped → verified`; on fail it is re-opened `shipped → ticketed` with **build-ready fix tickets** that auto-build and trigger a re-verify (never `blocked`). The scanner only dispatches; `lisa:verify-prd` owns the transition (per the `prd-lifecycle-rollup` rule's "Closing the loop" section), and the self-healing loop continues until the PRD verifies.
|
|
109
110
|
5. **Stop after one item** — a claimed Ready item, a safe-blocked container, or a per-item error ends the *ready-claim* portion of the cycle. The per-vendor PRD scanner still runs its rollup and one verify-prd dispatch. Remaining Ready items stay untouched for later scheduler invocations.
|
|
110
111
|
6. **Summary report** — the single processed/skipped/error item, total processed, total errors. Before returning, record intake usage on the persisted cycle-summary artifact via `lisa:usage-accounting` so the summary carries a direct `intake` entry in the canonical `## Lisa Usage` section. If the claimed / skipped work item's parent-child graph is already known, prefer `record_and_rollup` so ancestor totals refresh in the same cycle; otherwise still write the direct entry, and if runtime usage is unavailable, use `source: unavailable` with nullable token/cost fields instead of skipping the row.
|
|
@@ -196,9 +196,25 @@ Invoke the `lisa:jira-agent` (existing per-ticket lifecycle agent) with the tick
|
|
|
196
196
|
Wait for `lisa:jira-agent` to return. Capture its outcome:
|
|
197
197
|
- **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.
|
|
198
198
|
- **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.
|
|
199
|
+
- **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.
|
|
199
200
|
- **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>"`.
|
|
200
201
|
- **Errored** — exception, missing config, etc. Leave the ticket in `$CLAIMED` for human investigation. Record under "Errors" with the exception summary.
|
|
201
202
|
|
|
203
|
+
#### 3c.1 Close duplicate already fixed
|
|
204
|
+
|
|
205
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
206
|
+
|
|
207
|
+
1. Verify the structured result includes a canonical ticket reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
208
|
+
2. Post or preserve the triage-finding comment that explains why this ticket is a duplicate and names the canonical ticket.
|
|
209
|
+
3. Ensure the native `duplicates <canonical>` link exists through `lisa:atlassian-access`.
|
|
210
|
+
4. Resolve the terminal `$DONE` value exactly as in Phase 3d. For env-keyed workflows, duplicate closeout uses the production/final done status, not an intermediate `On Dev`/`On Stg` waypoint.
|
|
211
|
+
5. Transition to `$DONE` with JIRA resolution `Duplicate`. If `acli` cannot set resolution on transition, use the Atlassian REST transition-with-fields path exposed by `lisa:atlassian-access`, or a documented follow-up edit that sets the resolution immediately after transition. Do not report success with an empty resolution when the workflow requires one.
|
|
212
|
+
6. Post a close comment naming the canonical ticket, PR/commit, and base-branch evidence.
|
|
213
|
+
|
|
214
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical ticket promotes, and recurrence is tracked by the canonical ticket rather than by reopening this duplicate.
|
|
215
|
+
|
|
216
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
217
|
+
|
|
202
218
|
#### 3d. Transition to $DONE (only after the PR is merged)
|
|
203
219
|
|
|
204
220
|
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.
|
|
@@ -249,6 +265,8 @@ Tickets processed: <n>
|
|
|
249
265
|
- <ticket-key> <summary> → PR <URL> (mergeStateStatus: <state>)
|
|
250
266
|
- Skipped (container — leaf-only-lifecycle): <n>
|
|
251
267
|
- <ticket-key> <summary> — build-ready on a parent with open child work; lifecycle-repair comment posted
|
|
268
|
+
- Duplicate already fixed (closed as Duplicate): <n>
|
|
269
|
+
- <ticket-key> <summary> — duplicate of <canonical>; no PR opened
|
|
252
270
|
- Blocked (pre-flight verify failed): <n>
|
|
253
271
|
- <ticket-key> <summary> — see ticket comments
|
|
254
272
|
- Held (triage found ambiguities): <n>
|
|
@@ -264,6 +282,7 @@ Total PRs opened: <n>
|
|
|
264
282
|
- **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.
|
|
265
283
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE `lisa:jira-agent` invocation — no double-pickup.
|
|
266
284
|
- **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).
|
|
285
|
+
- **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.
|
|
267
286
|
- **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.
|
|
268
287
|
- **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.
|
|
269
288
|
- **Single cycle per query**: do not run two `lisa:jira-build-intake` cycles concurrently against overlapping queries — concurrent claims could race. The scheduling layer (when added) is responsible for serialization.
|
|
@@ -207,9 +207,25 @@ Invoke `lisa:linear-agent` (per-Issue lifecycle agent) with the Issue identifier
|
|
|
207
207
|
Wait for the agent to return. Capture its outcome:
|
|
208
208
|
- **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.
|
|
209
209
|
- **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.
|
|
210
|
+
- **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.
|
|
210
211
|
- **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".
|
|
211
212
|
- **Errored** — exception, missing config, etc. Leave at `$CLAIMED`. Record with exception summary.
|
|
212
213
|
|
|
214
|
+
#### 3c.1 Close duplicate already fixed
|
|
215
|
+
|
|
216
|
+
Run this only when the returned triage verdict is exactly `DUPLICATE_ALREADY_FIXED`.
|
|
217
|
+
|
|
218
|
+
1. Verify the structured result includes a canonical Issue reference, the canonical PR/commit, and empirical evidence that the canonical fix is present on the base branch. If any piece is missing, treat the outcome as Held instead of closing.
|
|
219
|
+
2. Post or preserve the triage-finding comment that explains why this Issue is a duplicate and names the canonical Issue.
|
|
220
|
+
3. Ensure a native `duplicates <canonical>` relationship exists when Linear exposes one; if this workspace cannot create that relationship, leave an explicit relation/comment reference and record the limitation in the summary.
|
|
221
|
+
4. Resolve the terminal `$DONE` value exactly as in Phase 3d. For env-keyed workflows, duplicate closeout uses the production/final done label, not an intermediate `status:on-dev`/`status:on-stg` waypoint.
|
|
222
|
+
5. Update labels by removing `$CLAIMED` and adding terminal `$DONE`, then move the native Linear state to the configured canceled-as-duplicate state. If no duplicate/canceled state is configured, use the configured terminal completed state only when that is the project's duplicate-close convention; otherwise record setup as an Error rather than inventing a state.
|
|
223
|
+
6. Post a close comment naming the canonical Issue, PR/commit, and base-branch evidence.
|
|
224
|
+
|
|
225
|
+
If the canonical fix is merged but not yet present on the production branch, append the production-promotion caveat to the close comment: the production error can recur until the canonical Issue promotes, and recurrence is tracked by the canonical Issue rather than by reopening this duplicate.
|
|
226
|
+
|
|
227
|
+
This path is distinct from `BLOCKED`: ambiguity, open blockers, and duplicate-of-open findings remain held for human action and must not be auto-closed.
|
|
228
|
+
|
|
213
229
|
#### 3d. Relabel to $DONE (only after the PR is merged)
|
|
214
230
|
|
|
215
231
|
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.
|
|
@@ -260,6 +276,8 @@ Issues processed: <n>
|
|
|
260
276
|
- <ID> <title> → PR <URL> (mergeStateStatus: <state>)
|
|
261
277
|
- Skipped (container — leaf-only-lifecycle): <n>
|
|
262
278
|
- <ID> <title> — build-ready on a parent with open child work; lifecycle-repair comment posted
|
|
279
|
+
- Duplicate already fixed (closed as duplicate): <n>
|
|
280
|
+
- <ID> <title> — duplicate of <canonical>; no PR opened
|
|
263
281
|
- status:blocked (pre-flight verify failed): <n>
|
|
264
282
|
- <ID> <title> — see Issue comments
|
|
265
283
|
- Held (triage found ambiguities): <n>
|
|
@@ -275,6 +293,7 @@ Total PRs opened: <n>
|
|
|
275
293
|
- **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.
|
|
276
294
|
- **Claim-first ordering**: `$CLAIMED` set BEFORE agent invocation — no double-pickup.
|
|
277
295
|
- **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`.
|
|
296
|
+
- **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.
|
|
278
297
|
- **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.
|
|
279
298
|
- **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.
|
|
280
299
|
- **Single cycle per team**: do not run two concurrent cycles against the same team — concurrent claims could race.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ticket-triage
|
|
3
|
-
description: "Analytical triage gate for tickets in the configured destination tracker (JIRA, GitHub Issues, or Linear). Detects requirement ambiguities, identifies edge cases from codebase analysis, and plans verification methodology. Posts findings to the ticket and produces a verdict (BLOCKED/PASSED_WITH_FINDINGS/PASSED) that gates whether implementation can proceed. Vendor-neutral: the caller (jira-agent or github-agent) is responsible for fetching the ticket via lisa:tracker-read, running the pre-flight gate via lisa:tracker-verify, and posting findings via the matching vendor comment tool."
|
|
3
|
+
description: "Analytical triage gate for tickets in the configured destination tracker (JIRA, GitHub Issues, or Linear). Detects requirement ambiguities, identifies edge cases from codebase analysis, and plans verification methodology. Posts findings to the ticket and produces a verdict (DUPLICATE_ALREADY_FIXED/BLOCKED/PASSED_WITH_FINDINGS/PASSED) that gates whether implementation can proceed. Vendor-neutral: the caller (jira-agent or github-agent) is responsible for fetching the ticket via lisa:tracker-read, running the pre-flight gate via lisa:tracker-verify, and posting findings via the matching vendor comment tool."
|
|
4
4
|
allowed-tools: ["Read", "Glob", "Grep", "Bash"]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -48,11 +48,13 @@ From the context bundle, evaluate relationships before analyzing this ticket in
|
|
|
48
48
|
|
|
49
49
|
- **Open blockers (`is blocked by`)**: if any blocker is not `Done` or its linked PR is not merged, raise an ambiguity: "Blocker {KEY} is not shipped — work cannot meaningfully start." This is an automatic `BLOCKED` verdict unless the human confirms the blocker state is acceptable.
|
|
50
50
|
- **Epic siblings in progress**: if a sibling under the same epic is `In Progress` / `In Review` with a different assignee and overlapping scope, raise it as an edge case in Phase 4 ("Duplicate-work risk with {KEY}").
|
|
51
|
-
- **`duplicates` / `is duplicated by` links**:
|
|
51
|
+
- **`duplicates` / `is duplicated by` links**:
|
|
52
|
+
- If this ticket is a duplicate of an open canonical ticket whose fix is not yet merged into the base branch, verdict is `BLOCKED` with the recommendation to close as duplicate manually rather than implement.
|
|
53
|
+
- If this ticket is a duplicate of canonical work that is already merged/deployed, verdict is `DUPLICATE_ALREADY_FIXED`. This verdict must carry the canonical ticket reference, the canonical PR/commit reference, and empirical evidence that the canonical fix is present on the relevant base branch. Never emit this verdict from a name/label match alone.
|
|
52
54
|
- **`relates to` links with shipped PRs**: flag the PRs in the verification methodology (Phase 5) as prior art worth reviewing before writing new code.
|
|
53
55
|
|
|
54
56
|
Do not re-fetch tickets — the bundle already has the context.
|
|
55
|
-
If Phase 1.5 finds an automatic blocker condition (`is blocked by` not shipped, or duplicate-of-open), emit `BLOCKED` immediately and skip to Phase 6 output formatting.
|
|
57
|
+
If Phase 1.5 finds an automatic blocker condition (`is blocked by` not shipped, or duplicate-of-open), emit `BLOCKED` immediately and skip to Phase 6 output formatting. If it finds a duplicate whose canonical fix is empirically present on the base branch, emit `DUPLICATE_ALREADY_FIXED` immediately and skip to Phase 6 output formatting.
|
|
56
58
|
|
|
57
59
|
## Phase 2 -- Cross-Repo Awareness
|
|
58
60
|
|
|
@@ -142,6 +144,7 @@ Every verification method must be specific enough that an automated agent could
|
|
|
142
144
|
Evaluate the findings and produce exactly one verdict:
|
|
143
145
|
|
|
144
146
|
- **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
|
|
147
|
+
- **`DUPLICATE_ALREADY_FIXED`** -- This ticket duplicates canonical work whose fix is already merged/deployed and empirically confirmed present on the relevant base branch. Work MUST NOT proceed. The caller must post the triage finding, ensure the native `duplicates <canonical>` link exists when the tracker supports one, and return the structured canonical reference/evidence to build intake for terminal duplicate closeout.
|
|
145
148
|
- **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent) MUST transition the ticket to `Blocked` and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
|
|
146
149
|
- **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
|
|
147
150
|
- **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
|
|
@@ -149,7 +152,7 @@ Evaluate the findings and produce exactly one verdict:
|
|
|
149
152
|
Output format:
|
|
150
153
|
|
|
151
154
|
```text
|
|
152
|
-
## Verdict: [NOT_RELEVANT | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
155
|
+
## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
153
156
|
|
|
154
157
|
**Ambiguities found:** [count]
|
|
155
158
|
**Edge cases identified:** [count]
|
|
@@ -172,11 +175,12 @@ Structure all output with clear section headers so the caller can parse and post
|
|
|
172
175
|
### Verification Methodology
|
|
173
176
|
[Phase 5 table, or "No acceptance criteria to verify."]
|
|
174
177
|
|
|
175
|
-
## Verdict: [NOT_RELEVANT | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
178
|
+
## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
|
|
176
179
|
```
|
|
177
180
|
|
|
178
181
|
The caller is responsible for:
|
|
179
182
|
1. Posting the findings as comments on the ticket (using whatever Jira mechanism is available)
|
|
180
183
|
2. Adding the `claude-triaged-{repo}` label to the ticket
|
|
181
184
|
3. If `BLOCKED` due to Phase 0 (missing required description content): transitioning the ticket to `Blocked`, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
|
|
182
|
-
4. If `
|
|
185
|
+
4. If `DUPLICATE_ALREADY_FIXED`: return the canonical ticket reference and empirical base-branch evidence to build intake so it can close the ticket as a terminal duplicate without opening a PR.
|
|
186
|
+
5. If `BLOCKED` due to Phase 1.5 (open blockers, duplicate-of-open) or Phase 3 (ambiguities): stopping all work and reporting to the human; do NOT auto-transition status in these cases.
|