plugins/lisa-copilot/skills/root-cause-analysis/SKILL.md
Root cause analysis methodology. Evidence gathering from logs, execution path tracing, strategic log placement, and building irrefutable proof chains.
npx skillsauth add codyswanngt/lisa root-cause-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 updocumentation
Onboard a user to the project via its LLM Wiki. Interviews the user about themselves in relation to the project, captures that to project-scoped memory only, then gives a guided tour of what the project is and sample questions they can ask. Use when someone is new to the project or asks to be onboarded. Read-mostly — it does not open PRs or write PII into the wiki.
documentation
Migrate an existing, hand-rolled wiki implementation onto the lisa-wiki kernel — phased and compatibility-first, with a strict no-loss guarantee. Use when adopting lisa-wiki in a repo that already has its own wiki/, ingest skills, docs, or roles. Renaming things into the canonical shape is fine; losing functionality or data is not. Ends by running /doctor.
development
Health-check the LLM Wiki. Reports orphan pages, contradictions, stale claims, broken internal links, missing index/log coverage, structure-manifest violations, and secret/tenant leaks. Use periodically or before hardening a wiki. Read-only — it reports findings, it does not fix them.
testing
Ingest source material into the LLM Wiki. With an argument (URL, file path, or prompt) it ingests that one source; with no argument it runs a full ingest across every enabled non-external-write source. Routes to the right connector, then runs the ordered pipeline (source note → synthesis → index → log → verify → state → commit/PR). Use whenever new knowledge should enter the wiki.