@codyswann/lisa 2.231.0 → 2.232.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) 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-apply/SKILL.md +9 -2
  5. package/plugins/lisa/.codex-plugin/skills/lisa-rework-triage/SKILL.md +155 -0
  6. package/plugins/lisa/.codex-plugin/skills/lisa-rework-triage/agents/openai.yaml +4 -0
  7. package/plugins/lisa/.codex-plugin/skills/lisa-ticket-triage/SKILL.md +20 -0
  8. package/plugins/lisa/agents/learner.md +8 -1
  9. package/plugins/lisa/agents/learnings-synthesizer.md +4 -1
  10. package/plugins/lisa/commands/rework-triage.md +6 -0
  11. package/plugins/lisa/skills/lisa-debrief-apply/SKILL.md +9 -2
  12. package/plugins/lisa/skills/lisa-rework-triage/SKILL.md +155 -0
  13. package/plugins/lisa/skills/lisa-rework-triage/agents/openai.yaml +4 -0
  14. package/plugins/lisa/skills/lisa-ticket-triage/SKILL.md +21 -1
  15. package/plugins/lisa-agy/agents/learner.md +8 -1
  16. package/plugins/lisa-agy/agents/learnings-synthesizer.md +4 -1
  17. package/plugins/lisa-agy/commands/lisa/rework-triage.md +6 -0
  18. package/plugins/lisa-agy/plugin.json +1 -1
  19. package/plugins/lisa-agy/skills/lisa-debrief-apply/SKILL.md +9 -2
  20. package/plugins/lisa-agy/skills/lisa-rework-triage/SKILL.md +155 -0
  21. package/plugins/lisa-agy/skills/lisa-ticket-triage/SKILL.md +21 -1
  22. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  25. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-copilot/agents/learner.agent.md +8 -1
  29. package/plugins/lisa-copilot/agents/learnings-synthesizer.agent.md +4 -1
  30. package/plugins/lisa-copilot/commands/lisa/rework-triage.md +6 -0
  31. package/plugins/lisa-copilot/skills/lisa-debrief-apply/SKILL.md +9 -2
  32. package/plugins/lisa-copilot/skills/lisa-rework-triage/SKILL.md +155 -0
  33. package/plugins/lisa-copilot/skills/lisa-ticket-triage/SKILL.md +21 -1
  34. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-cursor/agents/learner.md +8 -1
  36. package/plugins/lisa-cursor/agents/learnings-synthesizer.md +4 -1
  37. package/plugins/lisa-cursor/commands/lisa/rework-triage.md +6 -0
  38. package/plugins/lisa-cursor/skills/lisa-debrief-apply/SKILL.md +9 -2
  39. package/plugins/lisa-cursor/skills/lisa-rework-triage/SKILL.md +155 -0
  40. package/plugins/lisa-cursor/skills/lisa-ticket-triage/SKILL.md +21 -1
  41. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-expo-agy/plugin.json +1 -1
  44. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  59. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  63. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  64. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails-agy/plugin.json +1 -1
  69. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  73. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  74. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  79. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  81. package/plugins/src/base/agents/learner.md +8 -1
  82. package/plugins/src/base/agents/learnings-synthesizer.md +4 -1
  83. package/plugins/src/base/commands/rework-triage.md +6 -0
  84. package/plugins/src/base/skills/lisa-debrief-apply/SKILL.md +9 -2
  85. package/plugins/src/base/skills/lisa-rework-triage/SKILL.md +155 -0
  86. package/plugins/src/base/skills/lisa-ticket-triage/SKILL.md +21 -1
package/package.json CHANGED
@@ -102,7 +102,7 @@
102
102
  "form-data": ">=4.0.6"
103
103
  },
104
104
  "name": "@codyswann/lisa",
105
- "version": "2.231.0",
105
+ "version": "2.232.0",
106
106
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
107
107
  "main": "dist/index.js",
108
108
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.231.0",
3
+ "version": "2.232.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.231.0",
3
+ "version": "2.232.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -29,8 +29,11 @@ For every row marked **Accept**:
29
29
  | Edge case | Edge Case Brainstorm checklist in `intent-routing.md` | Append the new pattern + question to the matching group (Navigation, Data, Failure, Input, Auth, or a new group if none fit). Use the row's `Summary` and `Evidence` link as a citation comment. |
30
30
  | Recurring gotcha | Memory file (`project_*.md`) | Write a new memory entry with `type: project`, structured as: rule, **Why:**, **How to apply:**. Add an index line to `MEMORY.md`. |
31
31
  | Process friction | Configured project rules file | Append a one-line guideline to the `.lisa.config.json` `projectRulesFile` destination (default `PROJECT_RULES.md`) under an appropriate heading (or create one). |
32
- | Tooling gap | Configured tracker | Create a new ticket via `lisa-tracker-write` with `issue_type: Task`, summary derived from the row's `Summary`, description citing the evidence and the originating debrief doc. Label appropriately (`type:tooling`, `lifecycle-improvement`, etc.). |
32
+ | Tooling gap | Configured tracker — or upstream Lisa when harness-level | **Split by level.** Project-level (a missing project script, hook, or automation) → create a ticket via `lisa-tracker-write` with `issue_type: Task`, summary derived from the row's `Summary`, description citing the evidence and the originating debrief doc, labeled `type:tooling` / `lifecycle-improvement`. Harness-level (a Lisa skill/gate/agent that should have caught the issue but didn't) → file an upstream Lisa issue exactly per the "Filing upstream" procedure in `lisa-rework-triage` (dedupe search first, three-audience description, evidence chain, `self-hardening` label; repo from `.lisa.config.json` `hardening.upstreamRepo`, default `CodySwannGT/lisa`). |
33
33
  | Convention drift | `CLAUDE.md` for project-wide agent operating instructions; otherwise the configured project rules file for codebase conventions | Append the convention as a one-paragraph note under the relevant section. If no relevant section exists, create one. |
34
+ | Decomposition infidelity | Upstream Lisa repo | File an upstream Lisa issue per the "Filing upstream" procedure in `lisa-rework-triage`, citing the PRD text vs. the distorted ticket AC and naming the gate that passed it. |
35
+ | PRD defect | Source PRD | Comment on the PRD via the `lisa-prd-backlink` lineage quoting the defective requirement and the failure it missed; flag for product review. Never silently edit the spec. |
36
+ | Missing tool access | Configured tracker | Create a provisioning ticket via `lisa-tracker-write` (`issue_type: Task`, `type:tooling`) describing the missing tool/credential/environment and which flow needs it. |
34
37
 
35
38
  For every row marked **Reject** or **Defer**: no action. Defer is a no-op for `apply` but worth surfacing in the run summary — the human may want to revisit at the next debrief.
36
39
 
@@ -51,8 +54,12 @@ Applied <n> learnings:
51
54
  <n> edge cases → intent-routing.md
52
55
  <n> gotchas → memory
53
56
  <n> friction → PROJECT_RULES.md
54
- <n> tooling gaps → <tracker> (<key1>, <key2>, ...)
57
+ <n> tooling gaps (project) → <tracker> (<key1>, <key2>, ...)
58
+ <n> tooling gaps (harness) → upstream Lisa (<issue-url1>, ...)
55
59
  <n> convention drift → CLAUDE.md
60
+ <n> decomposition infidelity → upstream Lisa (<issue-url1>, ...)
61
+ <n> PRD defects → PRD comments (<prd-link1>, ...)
62
+ <n> missing tool access → <tracker> (<key1>, ...)
56
63
  Skipped:
57
64
  <n> rejected, <n> deferred, <n> already-applied
58
65
  Failed:
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: lisa-rework-triage
3
+ description: "Rework detection and…"
4
+ allowed-tools: ["Skill", "Bash", "Read", "Glob", "Grep"]
5
+ ---
6
+
7
+ # Rework Triage: $ARGUMENTS
8
+
9
+ Classify why a previous agent attempt at this ticket failed, and convert that cause into a
10
+ structural improvement. This is the self-hardening arm of the lifecycle: every classified
11
+ failure either hardens the harness (an upstream Lisa issue), the project (a provisioning or
12
+ environment ticket), or the spec (a PRD defect flag). A rework cycle that fixes the bug but
13
+ never asks *why the agent got it wrong* guarantees the mistake recurs.
14
+
15
+ The caller MUST have run `lisa-tracker-read` first and provided the context bundle (all
16
+ comments chronological, linked PRs with review state, issue links, parent epic). Do not
17
+ classify from a bare summary — evidence-free classification is worse than none.
18
+
19
+ ## Phase 1 — Rework detection
20
+
21
+ A ticket is **rework** when it was previously implemented by this lifecycle and has returned
22
+ to a build-ready state. Evaluate these signals in order; the first confirmed signal suffices.
23
+ If none confirm, output `## Verdict: NOT_REWORK` and stop — this skill takes no action on
24
+ first-attempt work.
25
+
26
+ 1. **Status history shows a post-implementation regression transition.** The ticket's
27
+ changelog contains a transition from a post-build state (the configured `claimed`, any
28
+ `done.*` environment state — e.g. `On Dev`, `On Stg` — or a review state) back to the
29
+ configured `ready` state.
30
+ - JIRA: fetch the changelog via the `lisa-atlassian-access` REST substrate —
31
+ `GET /rest/api/3/issue/<KEY>/changelog` — and scan `items[].field == "status"` entries.
32
+ - GitHub: `gh issue view <n> --json timelineItems` (or the timeline API) — scan for the
33
+ `$DONE`/environment label being removed and `$READY` re-added after a linked PR merged.
34
+ - Linear: the Issue history relation — scan state changes from a completed/started state
35
+ back to the ready-labeled state.
36
+ 2. **Merged linked PR + build-ready again.** The bundle shows at least one linked PR that is
37
+ `MERGED`, while the ticket currently carries the build-ready role. First-attempt tickets
38
+ never have merged PRs.
39
+ 3. **Prior lifecycle claim marker.** The comments contain a prior implementation-cycle
40
+ marker for THIS ticket: a `[claude-build-intake]` claim comment, or a build-evidence
41
+ comment posted by `lisa-tracker-evidence` (`[lisa-evidence]` / the vendor evidence
42
+ header). Only markers proving a prior *implementation* attempt qualify —
43
+ `[lisa-rework-triage]` comments and other unrelated `[lisa-*]` annotations never do.
44
+ 4. **Explicit rework marker.** A `rework`, `qa-fail`, or `regression` label applied by QA or
45
+ the verify lifecycle.
46
+
47
+ Record which signal fired — it is part of the evidence trail.
48
+
49
+ ## Phase 2 — Failure-cause classification
50
+
51
+ Classify the failed attempt into **exactly one primary cause**. Every classification must
52
+ cite concrete evidence from the bundle, the codebase, or the PRD lineage — a cause without
53
+ evidence is `UNCLASSIFIED`, which is itself a surfaced outcome, never a silent default.
54
+
55
+ | Cause | Definition | Required evidence |
56
+ |-------|------------|-------------------|
57
+ | `decomposition-infidelity` | The ticket misrepresents the PRD requirement it implements — the agent built what the ticket said, but the ticket distorted the spec. | Resolve the ticket's requirement id(s) from the source PRD's `## Tickets` section (written by `lisa-prd-backlink` — each entry carries `requirements: ["R#"]` and the register maps R# to verbatim PRD text). Quote the PRD text vs. the ticket's AC and name the divergence. |
58
+ | `prd-defect` | The ticket faithfully captured the PRD, but the PRD itself was wrong, ambiguous, or missing the failing case. | Quote the PRD requirement and the QA failure it does not cover or contradicts. |
59
+ | `missing-tool-access` | The agent lacked a tool, credential, environment, or permission the work required, and worked around it blindly. | The prior cycle's comments/PR show the gap (skipped verification step, "could not access", missing env credentials, absent MCP tool) — cite the marker. |
60
+ | `implementation-defect` | Spec and ticket were right; the agent's code was wrong. | The failing behavior contradicts an AC the ticket states correctly; cite the AC and the failure report. |
61
+ | `environment-data` | The failure is caused by environment or data state (drift, missing fixtures, shared-state collision), not by the code under test. | The failure reproduces only in the affected environment, or the report references data absent from the environment's seed/fixtures. |
62
+ | `verification-gap` | The code was wrong AND the verification lifecycle should have caught it — the codified regression test was missing, too weak, or asserted the wrong thing. | Name the verification/codify-verification artifact from the prior cycle that failed to catch this class of failure. Frequently a **secondary** cause alongside `implementation-defect`; record both, primary first. |
63
+
64
+ Classification sources, in priority order: the QA failure report (comments), the prior
65
+ cycle's evidence comment and PR review thread, the PRD requirement register via
66
+ `lisa-prd-backlink` lineage, and the codebase itself (Glob/Grep the failing surface).
67
+
68
+ ## Phase 3 — Post the triage comment
69
+
70
+ Post one structured comment on the ticket via the vendor comment surface (`lisa-atlassian-access
71
+ operation: comment`, `gh issue comment`, or the Linear comment mutation):
72
+
73
+ ```text
74
+ [lisa-rework-triage] Rework detected (signal: <signal>)
75
+ Fingerprint: <ticket-key>|<last merged PR number, or none>|<primary cause>
76
+ Primary cause: <cause>
77
+ Secondary cause: <cause or none>
78
+ Evidence: <2-4 lines citing the specific PRD text / AC / comment / PR review / environment fact>
79
+ Hardening action: <what Phase 4 filed, with link — or "none required (implementation-defect)">
80
+ ```
81
+
82
+ **Idempotency:** the fingerprint is the literal `Fingerprint:` line —
83
+ `<ticket-key>|<last merged PR number>|<primary cause>`, with `none` as the PR component
84
+ when detection fired on a claim marker or label and no merged PR exists. Before posting,
85
+ scan existing comments for a `[lisa-rework-triage]` block whose `Fingerprint:` line
86
+ matches — if present, skip posting and report `already-triaged`. One triage per bounce,
87
+ never one per cycle re-entry.
88
+
89
+ ## Phase 4 — Route the cause to its hardening destination
90
+
91
+ Each cause has exactly one destination. File through the proper write path — never raw
92
+ ticket creation — so every hardening artifact passes the same quality gates as any other
93
+ Lisa work item.
94
+
95
+ | Primary cause | Destination | Action |
96
+ |---------------|-------------|--------|
97
+ | `decomposition-infidelity` | **Upstream Lisa issue** | The decomposition pipeline produced an unfaithful ticket and every gate passed it — that is a harness defect. File per "Filing upstream" below, citing the PRD text, the distorted ticket AC, and which gate should have caught it. |
98
+ | `verification-gap` | **Upstream Lisa issue** | The verification lifecycle passed work it should have failed. File per "Filing upstream", citing the missed failure class and the weak/missing codified test. |
99
+ | `missing-tool-access` | Project tracker | Create a provisioning ticket via `lisa-tracker-write` (`issue_type: Task`, labeled `type:tooling`) describing the missing tool/credential/environment and which flow needs it. Link it `blocks` the rework ticket. |
100
+ | `environment-data` | Project tracker | Create an environment-hardening ticket via `lisa-tracker-write` citing the drift/fixture/shared-state evidence. Link `relates to` the rework ticket. |
101
+ | `prd-defect` | Source PRD | Comment on the PRD (via the `lisa-prd-backlink` lineage) quoting the defective requirement and the QA failure; flag for product review. Do NOT silently edit the PRD — spec changes are a human gate. |
102
+ | `implementation-defect` (no secondary) | None | Normal fix path; the classification comment is the record. Pass the pattern to the `learner` phase — repeated implementation defects of the same shape escalate to `verification-gap`. |
103
+
104
+ **Secondary causes route too.** A recorded secondary cause triggers its own row's
105
+ destination in addition to the primary's: `implementation-defect` with a
106
+ `verification-gap` secondary files the upstream Lisa issue per the `verification-gap`
107
+ row — the code being wrong does not excuse the verification lifecycle for passing it.
108
+ Deduplicate against the primary's filing (one upstream issue per failure class, not one
109
+ per cause slot).
110
+ | `UNCLASSIFIED` | Surface to human | Include in the triage comment and the caller's summary; a human decides. Never guess a cause to avoid this outcome. |
111
+
112
+ ### Filing upstream
113
+
114
+ Upstream issues target the Lisa repository itself so the harness gets fixed for every
115
+ project at once. Resolve the repo from `.lisa.config.json` `hardening.upstreamRepo`;
116
+ default `CodySwannGT/lisa`.
117
+
118
+ 1. **Dedupe first.** `gh issue list -R <upstream> --state open --search "<fingerprint terms>"`
119
+ — if an open issue already covers this failure class, comment the new occurrence on it
120
+ (evidence compounds; duplicates dilute) and link it instead of filing.
121
+ 2. **File with the same bar as any ticket:** a three-audience description (what failed for
122
+ the operator, what the harness did wrong, what to change), the verbatim evidence chain
123
+ (PRD text → ticket AC → QA failure → gate that passed it), and a `self-hardening` label:
124
+ `gh issue create -R <upstream> --title "<gate/skill>: <failure class>" --label self-hardening`.
125
+ 3. **Close the loop.** Reference the upstream issue URL in the triage comment. The upstream
126
+ repo's own build intake implements it; the next kernel release ships the hardening to
127
+ every host project.
128
+
129
+ ## Verdict
130
+
131
+ ```text
132
+ ## Verdict: [NOT_REWORK | REWORK_CLASSIFIED | ALREADY_TRIAGED]
133
+
134
+ **Signal:** [status-history | merged-pr | claim-marker | label | n/a]
135
+ **Primary cause:** [cause | n/a]
136
+ **Secondary cause:** [cause | none]
137
+ **Hardening filed:** [upstream <url> | tracker <key> | prd-comment | none | pending-human]
138
+ ```
139
+
140
+ The caller (ticket-triage Phase 2.5, or a standalone invocation) incorporates this into its
141
+ own findings. `REWORK_CLASSIFIED` never blocks the fix — the rework ticket proceeds to
142
+ implementation regardless; hardening runs alongside, not in front of, shipping the fix. The
143
+ one exception: `missing-tool-access` with the gap still present should surface as a Phase 3
144
+ ambiguity in the calling triage ("prior attempt lacked <tool>; it is still unavailable"),
145
+ which blocks per the normal triage rules.
146
+
147
+ ## Rules
148
+
149
+ - Never classify without evidence; `UNCLASSIFIED` beats a guess.
150
+ - One primary cause. Record a secondary only when the evidence genuinely supports both.
151
+ - Fire only on confirmed rework — first-attempt tickets exit at Phase 1 with `NOT_REWORK`.
152
+ - All ticket/issue writes go through `lisa-tracker-write` or `gh` as specified — never
153
+ bypass the quality gates this loop exists to strengthen.
154
+ - Noise discipline: one triage comment per bounce (fingerprinted), no upstream issue without
155
+ the dedupe search, and upstream issues describe failure *classes*, not single incidents.
@@ -0,0 +1,4 @@
1
+ display_name: "Rework Triage"
2
+ short_description: "Rework detection and…"
3
+ default_prompt:
4
+ - "Use $lisa-rework-triage: Rework detection and…."
@@ -67,6 +67,23 @@ Note which phases other repos have already covered and what findings they posted
67
67
  - Do NOT duplicate findings already posted by another repo
68
68
  - DO add supplementary findings specific to THIS repo's codebase
69
69
 
70
+ ## Phase 2.5 -- Rework Detection & Failure Classification
71
+
72
+ Invoke `lisa-rework-triage` with the context bundle. It detects whether this ticket is
73
+ **rework** — previously implemented work bounced back from QA/staging — and, when it is,
74
+ classifies why the previous agent attempt failed (decomposition infidelity, PRD defect,
75
+ missing tool access, implementation defect, environment/data, verification gap), posts the
76
+ `[lisa-rework-triage]` comment, and routes the cause to its hardening destination (upstream
77
+ Lisa issue, provisioning ticket, or PRD defect flag). See that skill for the taxonomy,
78
+ evidence requirements, and routing table.
79
+
80
+ - `NOT_REWORK` → proceed to Phase 3; nothing to carry forward.
81
+ - `REWORK_CLASSIFIED` / `ALREADY_TRIAGED` → carry the classification into the output
82
+ structure (see below) and proceed to Phase 3 — a classified rework still gets fixed;
83
+ hardening runs alongside the fix, never in front of it. Exception: a `missing-tool-access`
84
+ cause whose gap is **still present** must be raised as a Phase 3 ambiguity ("prior attempt
85
+ lacked <tool>; it is still unavailable"), which blocks per the normal rules.
86
+
70
87
  ## Phase 3 -- Ambiguity Detection
71
88
 
72
89
  Examine the ticket summary, description, and acceptance criteria. Look for:
@@ -175,6 +192,9 @@ Structure all output with clear section headers so the caller can parse and post
175
192
  ### Verification Methodology
176
193
  [Phase 5 table, or "No acceptance criteria to verify."]
177
194
 
195
+ ### Rework Classification
196
+ [Phase 2.5 verdict block from lisa-rework-triage, or "Not rework (first attempt)."]
197
+
178
198
  ## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
179
199
  ```
180
200
 
@@ -21,19 +21,26 @@ Invoke `skill-evaluator` (via Agent tool with `subagent_type: "skill-evaluator"`
21
21
 
22
22
  - **CREATE SKILL** -- broad, reusable, complex, stable, not redundant. Invoke `/skill-creator`.
23
23
  - **ADD TO RULES** -- simple rule to append to `.claude/rules/PROJECT_RULES.md`.
24
+ - **UPSTREAM** -- the learning is a harness defect, not project knowledge: a Lisa skill, gate,
25
+ agent, or hook mis-behaved or should have caught something and didn't. Project rules can't
26
+ fix the harness; file it upstream so every host project gets the fix.
24
27
  - **OMIT** -- too narrow, already documented, or temporary. Discard.
25
28
 
26
29
  ### Step 3: Act on Decisions
27
30
 
28
31
  - CREATE SKILL: invoke `/skill-creator` via the Skill tool
29
32
  - ADD TO RULES: use Edit to append to `.claude/rules/PROJECT_RULES.md`
33
+ - UPSTREAM: file an upstream Lisa issue per the "Filing upstream" procedure in
34
+ `lisa-rework-triage` (dedupe search first, three-audience description, evidence chain,
35
+ `self-hardening` label; repo from `.lisa.config.json` `hardening.upstreamRepo`, default
36
+ `CodySwannGT/lisa`)
30
37
  - OMIT: no action
31
38
 
32
39
  ### Step 4: Output Summary
33
40
 
34
41
  | Learning | Decision | Action Taken |
35
42
  |----------|----------|-------------|
36
- | [learning text] | CREATE SKILL / ADD TO RULES / OMIT | [what was done] |
43
+ | [learning text] | CREATE SKILL / ADD TO RULES / UPSTREAM / OMIT | [what was done] |
37
44
 
38
45
  ## Rules
39
46
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: learnings-synthesizer
3
- description: "Learnings synthesizer for the Debrief flow. Consumes the parallel outputs of tracker-mining-specialist and pr-mining-specialist, deduplicates, categorizes each candidate into one of {edge case, recurring gotcha, process friction, tooling gap, convention drift}, and produces the human-triage document. Exhaustive — surfaces every candidate, even low-confidence ones, because the human decides what to keep."
3
+ description: "Learnings synthesizer for the Debrief flow. Consumes the parallel outputs of tracker-mining-specialist and pr-mining-specialist, deduplicates, categorizes each candidate into one of {edge case, recurring gotcha, process friction, tooling gap, convention drift, decomposition infidelity, prd defect, missing tool access}, and produces the human-triage document. Exhaustive — surfaces every candidate, even low-confidence ones, because the human decides what to keep."
4
4
  skills: []
5
5
  ---
6
6
 
@@ -38,6 +38,9 @@ Map every finding to exactly one category. When a finding could fit two, pick th
38
38
  | **Process friction** | A step in the lifecycle that consistently slowed the work — long status stalls, repeated reopen cycles, force-pushes after approval, missing journey replays, ambiguous AC that required mid-PR clarification. | `PROJECT_RULES.md` guideline, or a tooling-gap ticket if the friction is automatable |
39
39
  | **Tooling gap** | Something that should have been automated, an agent that should have caught the issue but didn't, a missing skill, a hook that didn't fire. | A new ticket via `lisa-tracker-write` |
40
40
  | **Convention drift** | An unwritten rule revealed by review comments — "we don't do X here", "always use the Y helper", "this folder uses pattern Z". The convention is real but undocumented. | `CLAUDE.md` or `PROJECT_RULES.md` |
41
+ | **Decomposition infidelity** | A ticket misrepresented the PRD requirement it claimed to implement — the agent built what the ticket said, but the ticket distorted the spec, and every gate passed it. A harness defect, not a project one. (`lisa-rework-triage` classifies these at claim time; debrief catches the ones that slipped through a whole initiative.) | Upstream Lisa issue (`hardening.upstreamRepo`, default `CodySwannGT/lisa`) |
42
+ | **PRD defect** | The ticket faithfully captured the PRD, but the PRD itself was wrong, ambiguous, or missing the failing case. A spec problem, not an agent problem. | Comment on the source PRD via `lisa-prd-backlink` lineage; flag for product review — never silently edit the spec |
43
+ | **Missing tool access** | An agent lacked a tool, credential, environment, or permission the work required, and the failure traces to that gap rather than to the code. | Provisioning ticket via `lisa-tracker-write` (`type:tooling`) |
41
44
 
42
45
  A finding that does not fit any category is itself a signal — surface it under a sixth ad-hoc category `Uncategorized` with a note explaining why no category fit. Better to surface than to drop.
43
46
 
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Detect whether a ticket is rework bounced back from QA/staging, classify why the previous agent attempt failed, and route the cause to its hardening destination (upstream Lisa issue, provisioning ticket, or PRD defect flag)."
3
+ argument-hint: "<ticket-key-or-url>"
4
+ ---
5
+
6
+ Use the /lisa-rework-triage skill to detect and classify rework on the given ticket. $ARGUMENTS
@@ -29,8 +29,11 @@ For every row marked **Accept**:
29
29
  | Edge case | Edge Case Brainstorm checklist in `intent-routing.md` | Append the new pattern + question to the matching group (Navigation, Data, Failure, Input, Auth, or a new group if none fit). Use the row's `Summary` and `Evidence` link as a citation comment. |
30
30
  | Recurring gotcha | Memory file (`project_*.md`) | Write a new memory entry with `type: project`, structured as: rule, **Why:**, **How to apply:**. Add an index line to `MEMORY.md`. |
31
31
  | Process friction | Configured project rules file | Append a one-line guideline to the `.lisa.config.json` `projectRulesFile` destination (default `PROJECT_RULES.md`) under an appropriate heading (or create one). |
32
- | Tooling gap | Configured tracker | Create a new ticket via `lisa-tracker-write` with `issue_type: Task`, summary derived from the row's `Summary`, description citing the evidence and the originating debrief doc. Label appropriately (`type:tooling`, `lifecycle-improvement`, etc.). |
32
+ | Tooling gap | Configured tracker — or upstream Lisa when harness-level | **Split by level.** Project-level (a missing project script, hook, or automation) → create a ticket via `lisa-tracker-write` with `issue_type: Task`, summary derived from the row's `Summary`, description citing the evidence and the originating debrief doc, labeled `type:tooling` / `lifecycle-improvement`. Harness-level (a Lisa skill/gate/agent that should have caught the issue but didn't) → file an upstream Lisa issue exactly per the "Filing upstream" procedure in `lisa-rework-triage` (dedupe search first, three-audience description, evidence chain, `self-hardening` label; repo from `.lisa.config.json` `hardening.upstreamRepo`, default `CodySwannGT/lisa`). |
33
33
  | Convention drift | `CLAUDE.md` for project-wide agent operating instructions; otherwise the configured project rules file for codebase conventions | Append the convention as a one-paragraph note under the relevant section. If no relevant section exists, create one. |
34
+ | Decomposition infidelity | Upstream Lisa repo | File an upstream Lisa issue per the "Filing upstream" procedure in `lisa-rework-triage`, citing the PRD text vs. the distorted ticket AC and naming the gate that passed it. |
35
+ | PRD defect | Source PRD | Comment on the PRD via the `lisa-prd-backlink` lineage quoting the defective requirement and the failure it missed; flag for product review. Never silently edit the spec. |
36
+ | Missing tool access | Configured tracker | Create a provisioning ticket via `lisa-tracker-write` (`issue_type: Task`, `type:tooling`) describing the missing tool/credential/environment and which flow needs it. |
34
37
 
35
38
  For every row marked **Reject** or **Defer**: no action. Defer is a no-op for `apply` but worth surfacing in the run summary — the human may want to revisit at the next debrief.
36
39
 
@@ -51,8 +54,12 @@ Applied <n> learnings:
51
54
  <n> edge cases → intent-routing.md
52
55
  <n> gotchas → memory
53
56
  <n> friction → PROJECT_RULES.md
54
- <n> tooling gaps → <tracker> (<key1>, <key2>, ...)
57
+ <n> tooling gaps (project) → <tracker> (<key1>, <key2>, ...)
58
+ <n> tooling gaps (harness) → upstream Lisa (<issue-url1>, ...)
55
59
  <n> convention drift → CLAUDE.md
60
+ <n> decomposition infidelity → upstream Lisa (<issue-url1>, ...)
61
+ <n> PRD defects → PRD comments (<prd-link1>, ...)
62
+ <n> missing tool access → <tracker> (<key1>, ...)
56
63
  Skipped:
57
64
  <n> rejected, <n> deferred, <n> already-applied
58
65
  Failed:
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: lisa-rework-triage
3
+ description: "Rework detection and agent-failure classification. When a claimed ticket turns out to be rework — previously implemented work bounced back from QA/staging — this skill detects it, classifies WHY the previous agent attempt failed (decomposition infidelity, PRD defect, missing tool access, implementation defect, environment/data, verification gap), posts a structured triage comment, and routes each cause to its hardening destination — including upstream Lisa issues so the harness itself gets fixed and the same mistake structurally cannot repeat. Vendor-neutral: consumes the lisa-tracker-read context bundle; invoked automatically by lisa-ticket-triage Phase 2.5 and runnable standalone."
4
+ allowed-tools: ["Skill", "Bash", "Read", "Glob", "Grep"]
5
+ ---
6
+
7
+ # Rework Triage: $ARGUMENTS
8
+
9
+ Classify why a previous agent attempt at this ticket failed, and convert that cause into a
10
+ structural improvement. This is the self-hardening arm of the lifecycle: every classified
11
+ failure either hardens the harness (an upstream Lisa issue), the project (a provisioning or
12
+ environment ticket), or the spec (a PRD defect flag). A rework cycle that fixes the bug but
13
+ never asks *why the agent got it wrong* guarantees the mistake recurs.
14
+
15
+ The caller MUST have run `lisa-tracker-read` first and provided the context bundle (all
16
+ comments chronological, linked PRs with review state, issue links, parent epic). Do not
17
+ classify from a bare summary — evidence-free classification is worse than none.
18
+
19
+ ## Phase 1 — Rework detection
20
+
21
+ A ticket is **rework** when it was previously implemented by this lifecycle and has returned
22
+ to a build-ready state. Evaluate these signals in order; the first confirmed signal suffices.
23
+ If none confirm, output `## Verdict: NOT_REWORK` and stop — this skill takes no action on
24
+ first-attempt work.
25
+
26
+ 1. **Status history shows a post-implementation regression transition.** The ticket's
27
+ changelog contains a transition from a post-build state (the configured `claimed`, any
28
+ `done.*` environment state — e.g. `On Dev`, `On Stg` — or a review state) back to the
29
+ configured `ready` state.
30
+ - JIRA: fetch the changelog via the `lisa-atlassian-access` REST substrate —
31
+ `GET /rest/api/3/issue/<KEY>/changelog` — and scan `items[].field == "status"` entries.
32
+ - GitHub: `gh issue view <n> --json timelineItems` (or the timeline API) — scan for the
33
+ `$DONE`/environment label being removed and `$READY` re-added after a linked PR merged.
34
+ - Linear: the Issue history relation — scan state changes from a completed/started state
35
+ back to the ready-labeled state.
36
+ 2. **Merged linked PR + build-ready again.** The bundle shows at least one linked PR that is
37
+ `MERGED`, while the ticket currently carries the build-ready role. First-attempt tickets
38
+ never have merged PRs.
39
+ 3. **Prior lifecycle claim marker.** The comments contain a prior implementation-cycle
40
+ marker for THIS ticket: a `[claude-build-intake]` claim comment, or a build-evidence
41
+ comment posted by `lisa-tracker-evidence` (`[lisa-evidence]` / the vendor evidence
42
+ header). Only markers proving a prior *implementation* attempt qualify —
43
+ `[lisa-rework-triage]` comments and other unrelated `[lisa-*]` annotations never do.
44
+ 4. **Explicit rework marker.** A `rework`, `qa-fail`, or `regression` label applied by QA or
45
+ the verify lifecycle.
46
+
47
+ Record which signal fired — it is part of the evidence trail.
48
+
49
+ ## Phase 2 — Failure-cause classification
50
+
51
+ Classify the failed attempt into **exactly one primary cause**. Every classification must
52
+ cite concrete evidence from the bundle, the codebase, or the PRD lineage — a cause without
53
+ evidence is `UNCLASSIFIED`, which is itself a surfaced outcome, never a silent default.
54
+
55
+ | Cause | Definition | Required evidence |
56
+ |-------|------------|-------------------|
57
+ | `decomposition-infidelity` | The ticket misrepresents the PRD requirement it implements — the agent built what the ticket said, but the ticket distorted the spec. | Resolve the ticket's requirement id(s) from the source PRD's `## Tickets` section (written by `lisa-prd-backlink` — each entry carries `requirements: ["R#"]` and the register maps R# to verbatim PRD text). Quote the PRD text vs. the ticket's AC and name the divergence. |
58
+ | `prd-defect` | The ticket faithfully captured the PRD, but the PRD itself was wrong, ambiguous, or missing the failing case. | Quote the PRD requirement and the QA failure it does not cover or contradicts. |
59
+ | `missing-tool-access` | The agent lacked a tool, credential, environment, or permission the work required, and worked around it blindly. | The prior cycle's comments/PR show the gap (skipped verification step, "could not access", missing env credentials, absent MCP tool) — cite the marker. |
60
+ | `implementation-defect` | Spec and ticket were right; the agent's code was wrong. | The failing behavior contradicts an AC the ticket states correctly; cite the AC and the failure report. |
61
+ | `environment-data` | The failure is caused by environment or data state (drift, missing fixtures, shared-state collision), not by the code under test. | The failure reproduces only in the affected environment, or the report references data absent from the environment's seed/fixtures. |
62
+ | `verification-gap` | The code was wrong AND the verification lifecycle should have caught it — the codified regression test was missing, too weak, or asserted the wrong thing. | Name the verification/codify-verification artifact from the prior cycle that failed to catch this class of failure. Frequently a **secondary** cause alongside `implementation-defect`; record both, primary first. |
63
+
64
+ Classification sources, in priority order: the QA failure report (comments), the prior
65
+ cycle's evidence comment and PR review thread, the PRD requirement register via
66
+ `lisa-prd-backlink` lineage, and the codebase itself (Glob/Grep the failing surface).
67
+
68
+ ## Phase 3 — Post the triage comment
69
+
70
+ Post one structured comment on the ticket via the vendor comment surface (`lisa-atlassian-access
71
+ operation: comment`, `gh issue comment`, or the Linear comment mutation):
72
+
73
+ ```text
74
+ [lisa-rework-triage] Rework detected (signal: <signal>)
75
+ Fingerprint: <ticket-key>|<last merged PR number, or none>|<primary cause>
76
+ Primary cause: <cause>
77
+ Secondary cause: <cause or none>
78
+ Evidence: <2-4 lines citing the specific PRD text / AC / comment / PR review / environment fact>
79
+ Hardening action: <what Phase 4 filed, with link — or "none required (implementation-defect)">
80
+ ```
81
+
82
+ **Idempotency:** the fingerprint is the literal `Fingerprint:` line —
83
+ `<ticket-key>|<last merged PR number>|<primary cause>`, with `none` as the PR component
84
+ when detection fired on a claim marker or label and no merged PR exists. Before posting,
85
+ scan existing comments for a `[lisa-rework-triage]` block whose `Fingerprint:` line
86
+ matches — if present, skip posting and report `already-triaged`. One triage per bounce,
87
+ never one per cycle re-entry.
88
+
89
+ ## Phase 4 — Route the cause to its hardening destination
90
+
91
+ Each cause has exactly one destination. File through the proper write path — never raw
92
+ ticket creation — so every hardening artifact passes the same quality gates as any other
93
+ Lisa work item.
94
+
95
+ | Primary cause | Destination | Action |
96
+ |---------------|-------------|--------|
97
+ | `decomposition-infidelity` | **Upstream Lisa issue** | The decomposition pipeline produced an unfaithful ticket and every gate passed it — that is a harness defect. File per "Filing upstream" below, citing the PRD text, the distorted ticket AC, and which gate should have caught it. |
98
+ | `verification-gap` | **Upstream Lisa issue** | The verification lifecycle passed work it should have failed. File per "Filing upstream", citing the missed failure class and the weak/missing codified test. |
99
+ | `missing-tool-access` | Project tracker | Create a provisioning ticket via `lisa-tracker-write` (`issue_type: Task`, labeled `type:tooling`) describing the missing tool/credential/environment and which flow needs it. Link it `blocks` the rework ticket. |
100
+ | `environment-data` | Project tracker | Create an environment-hardening ticket via `lisa-tracker-write` citing the drift/fixture/shared-state evidence. Link `relates to` the rework ticket. |
101
+ | `prd-defect` | Source PRD | Comment on the PRD (via the `lisa-prd-backlink` lineage) quoting the defective requirement and the QA failure; flag for product review. Do NOT silently edit the PRD — spec changes are a human gate. |
102
+ | `implementation-defect` (no secondary) | None | Normal fix path; the classification comment is the record. Pass the pattern to the `learner` phase — repeated implementation defects of the same shape escalate to `verification-gap`. |
103
+
104
+ **Secondary causes route too.** A recorded secondary cause triggers its own row's
105
+ destination in addition to the primary's: `implementation-defect` with a
106
+ `verification-gap` secondary files the upstream Lisa issue per the `verification-gap`
107
+ row — the code being wrong does not excuse the verification lifecycle for passing it.
108
+ Deduplicate against the primary's filing (one upstream issue per failure class, not one
109
+ per cause slot).
110
+ | `UNCLASSIFIED` | Surface to human | Include in the triage comment and the caller's summary; a human decides. Never guess a cause to avoid this outcome. |
111
+
112
+ ### Filing upstream
113
+
114
+ Upstream issues target the Lisa repository itself so the harness gets fixed for every
115
+ project at once. Resolve the repo from `.lisa.config.json` `hardening.upstreamRepo`;
116
+ default `CodySwannGT/lisa`.
117
+
118
+ 1. **Dedupe first.** `gh issue list -R <upstream> --state open --search "<fingerprint terms>"`
119
+ — if an open issue already covers this failure class, comment the new occurrence on it
120
+ (evidence compounds; duplicates dilute) and link it instead of filing.
121
+ 2. **File with the same bar as any ticket:** a three-audience description (what failed for
122
+ the operator, what the harness did wrong, what to change), the verbatim evidence chain
123
+ (PRD text → ticket AC → QA failure → gate that passed it), and a `self-hardening` label:
124
+ `gh issue create -R <upstream> --title "<gate/skill>: <failure class>" --label self-hardening`.
125
+ 3. **Close the loop.** Reference the upstream issue URL in the triage comment. The upstream
126
+ repo's own build intake implements it; the next kernel release ships the hardening to
127
+ every host project.
128
+
129
+ ## Verdict
130
+
131
+ ```text
132
+ ## Verdict: [NOT_REWORK | REWORK_CLASSIFIED | ALREADY_TRIAGED]
133
+
134
+ **Signal:** [status-history | merged-pr | claim-marker | label | n/a]
135
+ **Primary cause:** [cause | n/a]
136
+ **Secondary cause:** [cause | none]
137
+ **Hardening filed:** [upstream <url> | tracker <key> | prd-comment | none | pending-human]
138
+ ```
139
+
140
+ The caller (ticket-triage Phase 2.5, or a standalone invocation) incorporates this into its
141
+ own findings. `REWORK_CLASSIFIED` never blocks the fix — the rework ticket proceeds to
142
+ implementation regardless; hardening runs alongside, not in front of, shipping the fix. The
143
+ one exception: `missing-tool-access` with the gap still present should surface as a Phase 3
144
+ ambiguity in the calling triage ("prior attempt lacked <tool>; it is still unavailable"),
145
+ which blocks per the normal triage rules.
146
+
147
+ ## Rules
148
+
149
+ - Never classify without evidence; `UNCLASSIFIED` beats a guess.
150
+ - One primary cause. Record a secondary only when the evidence genuinely supports both.
151
+ - Fire only on confirmed rework — first-attempt tickets exit at Phase 1 with `NOT_REWORK`.
152
+ - All ticket/issue writes go through `lisa-tracker-write` or `gh` as specified — never
153
+ bypass the quality gates this loop exists to strengthen.
154
+ - Noise discipline: one triage comment per bounce (fingerprinted), no upstream issue without
155
+ the dedupe search, and upstream issues describe failure *classes*, not single incidents.
@@ -0,0 +1,4 @@
1
+ display_name: "Rework Triage"
2
+ short_description: "Rework detection and agent-failure classification"
3
+ default_prompt:
4
+ - "Use $lisa-rework-triage: Rework detection and agent-failure classification."
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lisa-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 (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."
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, plans verification methodology, and — via lisa-rework-triage in Phase 2.5 — detects rework bounced back from QA/staging and classifies why the previous agent attempt failed. 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
 
@@ -67,6 +67,23 @@ Note which phases other repos have already covered and what findings they posted
67
67
  - Do NOT duplicate findings already posted by another repo
68
68
  - DO add supplementary findings specific to THIS repo's codebase
69
69
 
70
+ ## Phase 2.5 -- Rework Detection & Failure Classification
71
+
72
+ Invoke `lisa-rework-triage` with the context bundle. It detects whether this ticket is
73
+ **rework** — previously implemented work bounced back from QA/staging — and, when it is,
74
+ classifies why the previous agent attempt failed (decomposition infidelity, PRD defect,
75
+ missing tool access, implementation defect, environment/data, verification gap), posts the
76
+ `[lisa-rework-triage]` comment, and routes the cause to its hardening destination (upstream
77
+ Lisa issue, provisioning ticket, or PRD defect flag). See that skill for the taxonomy,
78
+ evidence requirements, and routing table.
79
+
80
+ - `NOT_REWORK` → proceed to Phase 3; nothing to carry forward.
81
+ - `REWORK_CLASSIFIED` / `ALREADY_TRIAGED` → carry the classification into the output
82
+ structure (see below) and proceed to Phase 3 — a classified rework still gets fixed;
83
+ hardening runs alongside the fix, never in front of it. Exception: a `missing-tool-access`
84
+ cause whose gap is **still present** must be raised as a Phase 3 ambiguity ("prior attempt
85
+ lacked <tool>; it is still unavailable"), which blocks per the normal rules.
86
+
70
87
  ## Phase 3 -- Ambiguity Detection
71
88
 
72
89
  Examine the ticket summary, description, and acceptance criteria. Look for:
@@ -175,6 +192,9 @@ Structure all output with clear section headers so the caller can parse and post
175
192
  ### Verification Methodology
176
193
  [Phase 5 table, or "No acceptance criteria to verify."]
177
194
 
195
+ ### Rework Classification
196
+ [Phase 2.5 verdict block from lisa-rework-triage, or "Not rework (first attempt)."]
197
+
178
198
  ## Verdict: [NOT_RELEVANT | DUPLICATE_ALREADY_FIXED | BLOCKED | PASSED_WITH_FINDINGS | PASSED]
179
199
  ```
180
200
 
@@ -21,19 +21,26 @@ Invoke `skill-evaluator` (via Agent tool with `subagent_type: "skill-evaluator"`
21
21
 
22
22
  - **CREATE SKILL** -- broad, reusable, complex, stable, not redundant. Invoke `/skill-creator`.
23
23
  - **ADD TO RULES** -- simple rule to append to `.claude/rules/PROJECT_RULES.md`.
24
+ - **UPSTREAM** -- the learning is a harness defect, not project knowledge: a Lisa skill, gate,
25
+ agent, or hook mis-behaved or should have caught something and didn't. Project rules can't
26
+ fix the harness; file it upstream so every host project gets the fix.
24
27
  - **OMIT** -- too narrow, already documented, or temporary. Discard.
25
28
 
26
29
  ### Step 3: Act on Decisions
27
30
 
28
31
  - CREATE SKILL: invoke `/skill-creator` via the Skill tool
29
32
  - ADD TO RULES: use Edit to append to `.claude/rules/PROJECT_RULES.md`
33
+ - UPSTREAM: file an upstream Lisa issue per the "Filing upstream" procedure in
34
+ `lisa-rework-triage` (dedupe search first, three-audience description, evidence chain,
35
+ `self-hardening` label; repo from `.lisa.config.json` `hardening.upstreamRepo`, default
36
+ `CodySwannGT/lisa`)
30
37
  - OMIT: no action
31
38
 
32
39
  ### Step 4: Output Summary
33
40
 
34
41
  | Learning | Decision | Action Taken |
35
42
  |----------|----------|-------------|
36
- | [learning text] | CREATE SKILL / ADD TO RULES / OMIT | [what was done] |
43
+ | [learning text] | CREATE SKILL / ADD TO RULES / UPSTREAM / OMIT | [what was done] |
37
44
 
38
45
  ## Rules
39
46
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: learnings-synthesizer
3
- description: "Learnings synthesizer for the Debrief flow. Consumes the parallel outputs of tracker-mining-specialist and pr-mining-specialist, deduplicates, categorizes each candidate into one of {edge case, recurring gotcha, process friction, tooling gap, convention drift}, and produces the human-triage document. Exhaustive — surfaces every candidate, even low-confidence ones, because the human decides what to keep."
3
+ description: "Learnings synthesizer for the Debrief flow. Consumes the parallel outputs of tracker-mining-specialist and pr-mining-specialist, deduplicates, categorizes each candidate into one of {edge case, recurring gotcha, process friction, tooling gap, convention drift, decomposition infidelity, prd defect, missing tool access}, and produces the human-triage document. Exhaustive — surfaces every candidate, even low-confidence ones, because the human decides what to keep."
4
4
  skills: []
5
5
  ---
6
6
 
@@ -38,6 +38,9 @@ Map every finding to exactly one category. When a finding could fit two, pick th
38
38
  | **Process friction** | A step in the lifecycle that consistently slowed the work — long status stalls, repeated reopen cycles, force-pushes after approval, missing journey replays, ambiguous AC that required mid-PR clarification. | `PROJECT_RULES.md` guideline, or a tooling-gap ticket if the friction is automatable |
39
39
  | **Tooling gap** | Something that should have been automated, an agent that should have caught the issue but didn't, a missing skill, a hook that didn't fire. | A new ticket via `lisa-tracker-write` |
40
40
  | **Convention drift** | An unwritten rule revealed by review comments — "we don't do X here", "always use the Y helper", "this folder uses pattern Z". The convention is real but undocumented. | `CLAUDE.md` or `PROJECT_RULES.md` |
41
+ | **Decomposition infidelity** | A ticket misrepresented the PRD requirement it claimed to implement — the agent built what the ticket said, but the ticket distorted the spec, and every gate passed it. A harness defect, not a project one. (`lisa-rework-triage` classifies these at claim time; debrief catches the ones that slipped through a whole initiative.) | Upstream Lisa issue (`hardening.upstreamRepo`, default `CodySwannGT/lisa`) |
42
+ | **PRD defect** | The ticket faithfully captured the PRD, but the PRD itself was wrong, ambiguous, or missing the failing case. A spec problem, not an agent problem. | Comment on the source PRD via `lisa-prd-backlink` lineage; flag for product review — never silently edit the spec |
43
+ | **Missing tool access** | An agent lacked a tool, credential, environment, or permission the work required, and the failure traces to that gap rather than to the code. | Provisioning ticket via `lisa-tracker-write` (`type:tooling`) |
41
44
 
42
45
  A finding that does not fit any category is itself a signal — surface it under a sixth ad-hoc category `Uncategorized` with a note explaining why no category fit. Better to surface than to drop.
43
46
 
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Detect whether a ticket is rework bounced back from QA/staging, classify why the previous agent attempt failed, and route the cause to its hardening destination (upstream Lisa issue, provisioning ticket, or PRD defect flag)."
3
+ argument-hint: "<ticket-key-or-url>"
4
+ ---
5
+
6
+ Use the /lisa-rework-triage skill to detect and classify rework on the given ticket. $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.231.0",
3
+ "version": "2.232.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"