@codyswann/lisa 2.309.2 → 2.309.3

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 (79) hide show
  1. package/dist/core/upstream-evidence-manifest.js +4 -4
  2. package/package.json +1 -1
  3. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  4. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  5. package/plugins/lisa/.codex-plugin/skills/lisa-bug-triage/SKILL.md +2 -2
  6. package/plugins/lisa/.codex-plugin/skills/lisa-reproduce-bug/SKILL.md +40 -69
  7. package/plugins/lisa/.codex-plugin/skills/lisa-reproduce-bug/agents/openai.yaml +2 -2
  8. package/plugins/lisa/.codex-plugin/skills/lisa-root-cause-analysis/SKILL.md +88 -108
  9. package/plugins/lisa/.codex-plugin/skills/lisa-root-cause-analysis/agents/openai.yaml +2 -2
  10. package/plugins/lisa/agents/debug-specialist.md +13 -97
  11. package/plugins/lisa/skills/lisa-bug-triage/SKILL.md +2 -2
  12. package/plugins/lisa/skills/lisa-reproduce-bug/SKILL.md +40 -69
  13. package/plugins/lisa/skills/lisa-reproduce-bug/agents/openai.yaml +2 -2
  14. package/plugins/lisa/skills/lisa-root-cause-analysis/SKILL.md +88 -108
  15. package/plugins/lisa/skills/lisa-root-cause-analysis/agents/openai.yaml +2 -2
  16. package/plugins/lisa-agy/agents/debug-specialist.md +13 -97
  17. package/plugins/lisa-agy/plugin.json +1 -1
  18. package/plugins/lisa-agy/skills/lisa-bug-triage/SKILL.md +2 -2
  19. package/plugins/lisa-agy/skills/lisa-reproduce-bug/SKILL.md +40 -69
  20. package/plugins/lisa-agy/skills/lisa-root-cause-analysis/SKILL.md +88 -108
  21. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  24. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/agents/debug-specialist.agent.md +13 -97
  28. package/plugins/lisa-copilot/skills/lisa-bug-triage/SKILL.md +2 -2
  29. package/plugins/lisa-copilot/skills/lisa-reproduce-bug/SKILL.md +40 -69
  30. package/plugins/lisa-copilot/skills/lisa-root-cause-analysis/SKILL.md +88 -108
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/agents/debug-specialist.md +13 -97
  33. package/plugins/lisa-cursor/skills/lisa-bug-triage/SKILL.md +2 -2
  34. package/plugins/lisa-cursor/skills/lisa-reproduce-bug/SKILL.md +40 -69
  35. package/plugins/lisa-cursor/skills/lisa-root-cause-analysis/SKILL.md +88 -108
  36. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-agy/plugin.json +1 -1
  39. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  49. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  54. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  59. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails-agy/plugin.json +1 -1
  64. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  69. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  74. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  76. package/plugins/src/base/agents/debug-specialist.md +13 -97
  77. package/plugins/src/base/skills/lisa-bug-triage/SKILL.md +2 -2
  78. package/plugins/src/base/skills/lisa-reproduce-bug/SKILL.md +40 -69
  79. package/plugins/src/base/skills/lisa-root-cause-analysis/SKILL.md +88 -108
@@ -1,155 +1,135 @@
1
1
  ---
2
2
  name: lisa-root-cause-analysis
3
- description: "Root cause analysis methodology. Evidence gathering from logs, execution path tracing, strategic log placement, and building irrefutable proof chains."
3
+ description: "Prove what causes a defect: hypotheses written down before evidence is gathered, positive confirmation by execution rather than by surviving a disproof, a symptom-keyed technique menu including git bisect, and a declared stopping point that escalates an unresolved verdict instead of drifting."
4
4
  ---
5
5
 
6
6
  # Root Cause Analysis
7
7
 
8
- Definitively prove what is causing a problem. Do not guess. Do not theorize without evidence. Trace the actual execution path, read real logs, and produce irrefutable proof of root cause.
8
+ Produce a proof, not an explanation. Every link in the chain rests on something observed a log line, a stack frame, an exit code, a bisect verdict.
9
9
 
10
- **Core principle: "Show me the proof."** Every conclusion must be backed by concrete evidence -- a log line, a stack trace, a reproducible sequence, or a failing test.
10
+ ## Confirm by executing, not by reasoning
11
11
 
12
- ## Phase 1: Gather Evidence from Logs
12
+ The characteristic failure of this work is a fluent wrong answer: a plausible story assembled from reading code and delivered with confidence. Reading is how a hypothesis is formed. Running something is how it is confirmed. **Do not report a cause you have not executed against.**
13
13
 
14
- ### Local Logs
14
+ ## Surviving a disproof is not proof
15
15
 
16
- - Search application logs in the project directory (`logs/`, `tmp/`, stdout/stderr output)
17
- - Run tests with verbose logging enabled to capture execution flow
18
- - Check framework-specific log locations (e.g., `.next/`, `dist/`, build output)
16
+ A candidate that no observation has killed is **still standing**, not confirmed. Elimination narrows the field; it does not establish a cause. Closing requires a **positive confirmation**: an execution whose output is what the cause predicts and would not be what it produces if the cause were something else.
19
17
 
20
- ### Remote Logs (AWS CloudWatch, etc.)
18
+ That leaves three honest verdicts, and the output has to be able to say each:
21
19
 
22
- - Discover existing scripts and tools in the project for tailing logs:
23
- - Check `package.json` scripts for log-related commands
24
- - Search for shell scripts: `scripts/*log*`, `scripts/*tail*`, `scripts/*watch*`
25
- - Look for AWS CLI wrappers, CloudWatch log group configurations
26
- - Check for `.env` files referencing log groups or log streams
27
- - Use discovered tools first before falling back to raw CLI commands
28
- - When using AWS CLI directly:
29
- ```bash
30
- # Discover available log groups
31
- aws logs describe-log-groups --query 'logGroups[].logGroupName' --output text
20
+ - **confirmed** a positive confirmation was executed and is recorded.
21
+ - **inconclusive** — one candidate is standing, nothing killed it, nothing confirmed it. Say so; do not promote it.
22
+ - **unresolved / blocked** the investigation stopped before reaching a cause. See the stopping rule.
32
23
 
33
- # Tail recent logs with filter
34
- aws logs filter-log-events \
35
- --log-group-name "/aws/lambda/function-name" \
36
- --start-time $(date -d '30 minutes ago' +%s000) \
37
- --filter-pattern "ERROR" \
38
- --query 'events[].message' --output text
24
+ Only *confirmed* justifies a fix. An inconclusive verdict can still be useful — it narrows the next attempt — but it must be labelled.
39
25
 
40
- # Follow live logs
41
- aws logs tail "/aws/lambda/function-name" --follow --since 10m
42
- ```
26
+ ## Write the hypotheses down first
43
27
 
44
- ## Phase 2: Trace the Execution Path
28
+ Before gathering evidence, list the candidate causes — two or three is normal — and beside each, the observation that would **kill** it. Then go looking for the killing observations rather than for support.
45
29
 
46
- - Start from the error and work backward through the call stack
47
- - Read every function in the chain -- do not skip intermediate code
48
- - Identify the exact line where behavior diverges from expectation
49
- - Map the data flow: what value was expected vs. what value was actually present
30
+ A candidate you cannot state a disproof for is not a hypothesis; it is a hunch, and it will survive any amount of evidence. Keep the list updated as you work, and ship the eliminated candidates in the output: they are how a reader knows you looked.
50
31
 
51
- ## Phase 3: Strategic Log Placement
32
+ ## Pick the technique from the symptom
52
33
 
53
- When existing logs are insufficient, add targeted log statements to prove or disprove hypotheses.
34
+ | What you know | Reach for |
35
+ | --- | --- |
36
+ | **It used to work**, and a good commit can be named | `git bisect` — preconditions below |
37
+ | A stack trace or error location | Work backward from the throw; read the frames that carry the value, skip the plumbing |
38
+ | Only that the result is wrong, no location | Instrument first. Reading code to localize an unlocalized defect is the slowest move available |
39
+ | Intermittent | Loop it. Log timestamps and identity either side of async boundaries; look for overlap, staleness, out-of-order completion |
40
+ | Works locally, fails deployed | Diff the environments — version, config, data, permissions, network — before touching code |
41
+ | Wrong shape, missing field, unexpected null | Log the actual value at each transformation, not the type you expect |
42
+ | Possibly a dependency | Pin the exact installed version; read its changelog and issues before blaming local code |
54
43
 
55
- ### Log Statement Guidelines
44
+ ### git bisect
56
45
 
57
- - **Be surgical** -- add the minimum number of log statements needed to confirm the root cause
58
- - **Include context** -- log the actual values, not just "reached here"
59
- - **Use structured format** -- make logs easy to find and parse
46
+ The highest-leverage move available for a regression, and consistently underused: it answers *which change* in log₂(n) steps instead of log₂(n) hours of reading. It needs three things and wastes time without them.
60
47
 
61
- ```typescript
62
- // Bad: Vague, unhelpful
63
- console.log("here");
64
- console.log("data:", data);
48
+ 1. **A known-good commit** — from the last release, the last green run, or the reporter's "it worked on…".
49
+ 2. **A deterministic, non-interactive check** that exits non-zero on the defect. The failing test from `reproduce-bug` usually is one.
50
+ 3. **A runnable checkout at every step.** Where a fresh checkout needs a dependency install or build before tests run, fold that into the bisect command. Otherwise every step fails for the wrong reason and the verdict is noise.
65
51
 
66
- // Good: Precise, searchable, includes context
67
- console.log("[DEBUG:issue-123] processOrder entry", {
68
- orderId: order.id,
69
- status: order.status,
70
- itemCount: order.items.length,
71
- timestamp: new Date().toISOString(),
72
- });
52
+ ```bash
53
+ git bisect start <bad> <good>
54
+ git bisect run <cmd> # <cmd> must install/build if the checkout needs it
73
55
  ```
74
56
 
75
- ### Placement Strategy
57
+ Read the blamed commit before believing it. Bisect names the change that *surfaced* the defect, which is not always the change that introduced it.
76
58
 
77
- | Placement | Purpose |
78
- |-----------|---------|
79
- | Function entry | Confirm the function is called and with what arguments |
80
- | Before conditional branches | Verify which branch is taken and why |
81
- | Before/after async operations | Detect timing issues, race conditions, failed awaits |
82
- | Before/after data transformations | Catch where data becomes corrupted or unexpected |
83
- | Error handlers and catch blocks | Ensure errors are not silently swallowed |
59
+ ## Find the logs the project already has
84
60
 
85
- ### Hypothesis Elimination
61
+ Look for existing tooling before reaching for a raw CLI: `package.json` scripts, `scripts/*log*`, `scripts/*tail*`, AWS CLI wrappers, log-group names in `.env`. Project tooling already encodes the credentials, regions, and group names you would otherwise guess at.
86
62
 
87
- When multiple hypotheses exist, design a log placement strategy that eliminates all but one. Each log statement should be placed to confirm or rule out a specific hypothesis.
63
+ Where no wrapper exists:
88
64
 
89
- ## Phase 4: Prove the Root Cause
65
+ ```bash
66
+ aws logs describe-log-groups --query 'logGroups[].logGroupName' --output text
67
+ aws logs tail "/aws/lambda/<name>" --follow --since 30m
68
+ ```
90
69
 
91
- Build an evidence chain that is irrefutable:
70
+ If remote logs are unreachable, name the log group and the time window needed rather than proceeding without them.
92
71
 
93
- 1. **The symptom** -- what the user observes (error message, wrong output, crash)
94
- 2. **The proximate cause** -- the line of code that directly produces the symptom
95
- 3. **The root cause** -- the underlying reason the proximate cause occurs
96
- 4. **The proof** -- log output, test result, or reproduction steps that confirm each link
72
+ ## Instrument surgically
97
73
 
98
- ### Evidence Chain Format
74
+ Add the fewest statements that decide between live hypotheses, and make each carry values rather than announce arrival. Guard the access — instrumentation that throws while reading its own subject tells you nothing about the defect.
99
75
 
100
- ```text
101
- Symptom: [exact error message or behavior]
102
- |
103
- v
104
- Proximate cause: [file:line] -- [the line that directly produces the error]
105
- |
106
- v
107
- Root cause: [file:line] -- [the underlying reason]
108
- |
109
- v
110
- Proof: [log output / test result / reproduction that confirms the chain]
111
- ```
76
+ ```typescript
77
+ // Useless: proves a line ran.
78
+ console.log("here", data);
112
79
 
113
- ## Phase 5: Clean Up
80
+ // Useful: decides a hypothesis, and survives the shape it is investigating.
81
+ console.log("[DEBUG:issue-123] processOrder entry", {
82
+ orderId: order?.id,
83
+ status: order?.status,
84
+ itemCount: order?.items?.length ?? null,
85
+ });
86
+ ```
114
87
 
115
- After root cause is confirmed, **remove all debug log statements** added during investigation. Leave only:
88
+ Highest-yield placements: function entry (called at all, with what), either side of a branch (which way, on what value), either side of an `await` (timing, staleness), around transformations (where the shape changes), and inside `catch` blocks (what is being swallowed).
116
89
 
117
- - Log statements that belong in the application permanently (error logging, audit trails)
118
- - Statements explicitly requested by the user
90
+ The `[DEBUG:<issue>]` prefix exists so cleanup is mechanical rather than remembered. Once the verdict is recorded, remove every one — keeping only logging that belongs in the product permanently and verify across every source root the project has, not just one:
119
91
 
120
- Verify cleanup:
121
92
  ```bash
122
- # Search for any remaining debug markers
123
- grep -rn "\[DEBUG:" src/ --include="*.ts" --include="*.tsx" --include="*.js"
93
+ git grep -n "\[DEBUG:"
124
94
  ```
125
95
 
126
- ## Output Format
96
+ ## Stop before you drift
97
+
98
+ Declare a budget before starting: a number of instrumentation rounds, or a wall-clock box. Two signatures mean stop now rather than push on.
99
+
100
+ - **Two consecutive hypotheses falsified with no new information gained.** Widening the search against the same evidence is not progress.
101
+ - **The budget is spent.**
102
+
103
+ Stopping is a legitimate outcome and not a silent one. Record the verdict as **unresolved / blocked** and escalate a decision-ready report: the symptom, the hypotheses tried and how each was killed, the evidence collected, and the single thing that would unblock the work — an access grant, a log group, a reproduction on the real path. A blocked investigation reported clearly is worth more than a confident guess, and costs the next agent far less.
104
+
105
+ ## Output
106
+
107
+ `Cause` and `Fix` are required only for a **confirmed** verdict. For *inconclusive* or *unresolved*, record what is known and name the unblocker instead — an unresolved investigation must be representable without inventing a cause to fill the field.
127
108
 
128
109
  ```text
129
110
  ## Root Cause Analysis
130
111
 
131
- ### Evidence Trail
132
- | Step | Location | Evidence | Conclusion |
133
- |------|----------|----------|------------|
134
- | 1 | file:line | Log output or observed value | What this proves |
135
- | 2 | file:line | Log output or observed value | What this proves |
112
+ **Verdict:** confirmed | inconclusive | unresolved
136
113
 
137
- ### Root Cause
138
- **Proximate cause:** The line that directly produces the error.
139
- **Root cause:** The underlying reason this line behaves incorrectly.
140
- **Proof:** The specific evidence that confirms this beyond doubt.
114
+ ### Hypotheses
115
+ | Candidate | Would be killed by | Status |
116
+ |---|---|---|
117
+ | ... | the observation that would disprove it | eliminated / standing / confirmed |
141
118
 
142
- ### Recommended Fix
143
- What needs to change and why. Include file:line references.
144
- ```
119
+ ### Evidence trail
120
+ | Step | Location | Observed | Proves |
121
+ |---|---|---|---|
122
+ | 1 | file:line | log output, value, exit code | what this establishes |
145
123
 
146
- ## Rules
124
+ ### Cause — confirmed verdicts only
125
+ **Proximate:** file:line — the line that directly produces the symptom.
126
+ **Root:** file:line — why that line behaves that way.
127
+ **Confirmation:** the command run and its output, and why that output would differ
128
+ if the cause were something else. Not an argument.
147
129
 
148
- - Never guess at root cause -- prove it with evidence
149
- - Read the actual code in the execution path -- do not rely on function names or comments to infer behavior
150
- - When adding debug logs, use a consistent prefix (e.g., `[DEBUG:issue-name]`) so they are easy to find and clean up
151
- - Remove all temporary debug log statements after investigation is complete
152
- - If remote log access is unavailable, report what logs would be needed and from where
153
- - Prefer project-specific tooling and scripts over raw CLI commands for log access
154
- - If the root cause is in a third-party dependency, identify the exact version and known issue
155
- - Always verify the fix resolves the issue -- do not mark investigation complete without proof
130
+ ### Fix confirmed verdicts only
131
+ What changes and why, with file:line references. Anything that must not change.
132
+
133
+ ### Unblocker inconclusive or unresolved verdicts
134
+ The single thing that would let the next attempt proceed, and who can grant it.
135
+ ```