Stop reviewing the
same bugs

Your senior engineer left a review comment 3 months ago. Nobody read it again. A junior dev "fixed" the code. The bot approved it.

This skill mines your PR history, extracts the lessons, and teaches the AI reviewer to never make the same mistake twice.

claude install-skill sscarduzio/pr-war-stories
⚠️ This actually happened
avatar gilfoyle Contributor 3 months ago ···

Be careful — MemoryStorageAdapter preserves object references intentionally. The === check is correct. Don't change it to deep equality.

This cost us two days last quarter.

❌ 3 months later: junior dev changed === to deepEqual
🤖 Bugbot: Approved
💡 With pr-war-stories: Blocked — rule from PR #748

AI reviewers have no memory

🧠

AI reviewers are amnesiac

Cursor Bugbot, CodeRabbit, and Copilot review every PR from scratch. They don't know your team's history or your past incidents.

📝

Knowledge dies on merged PRs

Review comments explaining why something is wrong are the most valuable institutional knowledge. They live on PRs nobody reads again.

🔇

Context overload kills quality

Dumping 50 rules into a config file means every rule competes for attention. The bot starts ignoring everything.

Three memory layers,
each for a different reader

Not all knowledge belongs in the same place. Rules go where they're most effective.

Layer 1 -- Bot memory

.cursor/BUGBOT.md

Read by Bugbot at review time

Hierarchical rules the bot checks against every diff. Token-budgeted: fewer rules = more attention per rule.

"Never use Promise.all on unbounded arrays. Use a concurrency limiter."
Layer 2 -- Developer memory

LESSONS.md

Read by IDE assistants at write time

Universal engineering lessons read by Claude Code and Cursor before developers write code.

"In-memory state is a cache, not a source of truth. Query the database for conflict detection."
Layer 3 -- File memory

Inline comments

Visible in diff when that file changes

Rules that apply to one file, placed in source code. The bot sees them when that file is in a PR.

// WARNING: Runtime-evaluated // JS string. Cannot import. // Do not DRY. (See PR #760)

Every lesson gets triaged
before placement

Not everything belongs in BUGBOT.md. The wrong placement wastes the bot's attention or hides knowledge where nobody sees it.

New lesson from PR review
Can the bot
check this
on a diff?
Yes — reviewable
Which code
does it
affect?
.cursor/BUGBOT.md
Cross-cutting — every PR
apps/frontend/.cursor/BUGBOT.md
App-specific
apps/.../editor/.cursor/BUGBOT.md
Module-specific
packages/.cursor/BUGBOT.md
Shared packages
Bot traverses upward — deeper modules get more context
No — not enforceable
Applies to
one file?
Yes
Inline comment
In the source code itself
No
LESSONS.md
IDE reads before coding

Knowledge capture is automated.
No lesson falls through the cracks.

A GitHub Action fires on every merged PR. Human review comments are surfaced automatically.

1

PR Merged

Code lands on main

2

Action Fires

Extracts review comments

3

Summary Posted

Harvest proposal on PR

4

Classify

/pr-war-stories harvest

5

Bot Learns

Rules on next review

✓ Next PR catches moreloop continues

War stories from production

Actual lessons extracted from merged PRs. Each one prevented the same bug from recurring.

💥
PR #781

Promise.all on 200 files = OOM

BUGBOT.md
- await Promise.all(files.map(upload))
+ await asyncPool(3, files, upload)
🎨
PR #775

LLM CSS change broke schema editor

BUGBOT.md
- .custom-antlayout { height: 100% }
+ .schema-editor-layout { height: 100% }
PR #748

=== is correct. Don't "fix" it.

Inline
- if (deepEqual(prev, next))
+ if (prev === next) // intentional ref check
PR #741

useState is 1 frame late

LESSONS.md
- const [val, setVal] = useState(x)
+ const valRef = useRef(x) // sync capture

One command to install.
One command to bootstrap.

Install the skill

Installclaude install-skill sscarduzio/pr-war-stories
Setup/pr-war-stories setup
Harvest/pr-war-stories harvest
Audit/pr-war-stories audit
Reads your PR history automatically
Rules scoped to each module
Learns from every merged PR
Won't overload the bot

Works with Cursor Bugbot. Any GitHub repo. Any language. MIT licensed.