From lisa
Root cause analysis methodology. Evidence gathering from logs, execution path tracing, strategic log placement, and building irrefutable proof chains.
npx claudepluginhub codyswanngt/lisa --plugin lisaThis skill uses the workspace's default tool permissions.
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.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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.
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.
logs/, tmp/, stdout/stderr output).next/, dist/, build output)package.json scripts for log-related commandsscripts/*log*, scripts/*tail*, scripts/*watch*.env files referencing log groups or log streams# Discover available log groups
aws logs describe-log-groups --query 'logGroups[].logGroupName' --output text
# Tail recent logs with filter
aws logs filter-log-events \
--log-group-name "/aws/lambda/function-name" \
--start-time $(date -d '30 minutes ago' +%s000) \
--filter-pattern "ERROR" \
--query 'events[].message' --output text
# Follow live logs
aws logs tail "/aws/lambda/function-name" --follow --since 10m
When existing logs are insufficient, add targeted log statements to prove or disprove hypotheses.
// Bad: Vague, unhelpful
console.log("here");
console.log("data:", data);
// Good: Precise, searchable, includes context
console.log("[DEBUG:issue-123] processOrder entry", {
orderId: order.id,
status: order.status,
itemCount: order.items.length,
timestamp: new Date().toISOString(),
});
| Placement | Purpose |
|---|---|
| Function entry | Confirm the function is called and with what arguments |
| Before conditional branches | Verify which branch is taken and why |
| Before/after async operations | Detect timing issues, race conditions, failed awaits |
| Before/after data transformations | Catch where data becomes corrupted or unexpected |
| Error handlers and catch blocks | Ensure errors are not silently swallowed |
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.
Build an evidence chain that is irrefutable:
Symptom: [exact error message or behavior]
|
v
Proximate cause: [file:line] -- [the line that directly produces the error]
|
v
Root cause: [file:line] -- [the underlying reason]
|
v
Proof: [log output / test result / reproduction that confirms the chain]
After root cause is confirmed, remove all debug log statements added during investigation. Leave only:
Verify cleanup:
# Search for any remaining debug markers
grep -rn "\[DEBUG:" src/ --include="*.ts" --include="*.tsx" --include="*.js"
## Root Cause Analysis
### Evidence Trail
| Step | Location | Evidence | Conclusion |
|------|----------|----------|------------|
| 1 | file:line | Log output or observed value | What this proves |
| 2 | file:line | Log output or observed value | What this proves |
### Root Cause
**Proximate cause:** The line that directly produces the error.
**Root cause:** The underlying reason this line behaves incorrectly.
**Proof:** The specific evidence that confirms this beyond doubt.
### Recommended Fix
What needs to change and why. Include file:line references.
[DEBUG:issue-name]) so they are easy to find and clean up