Shepherd learn

From mshadmanrahman/pm-pilot · View interactive version

Shepherd learn is an AI agent skill from the GitHub repository mshadmanrahman/pm-pilot. Capture what a bug session taught into a learning log that future sessions read. Records root cause, wrong assumptions, recurring patterns, and any triage verdict that turned out wrong. Use at the end of a bug session.

How to use this skill

Skill file

/shepherd-learn — Capture Session Lessons

End-of-session command that captures what you learned into the institutional memory. This is what makes Bug Shepherd smarter over time.

Audience: Anyone who just finished a bug session. The lessons are written in plain language, not code.

Why This Matters

Every bug session teaches something. Without capturing it, you (or your team) will repeat the same mistakes, fall into the same traps, and waste time rediscovering the same patterns. The learning log is Bug Shepherd's institutional memory.

Workflow

1. Review the Session

Analyze what happened in this session:

2. Identify Lessons

Extract lessons in these categories:

Investigation Lessons:

Technical Lessons (even for non-developers):

Process Lessons:

Pattern Lessons:

3. Check for Repeated Mistakes

Read .claude/learning-log.md and check:

```

"REPEATED MISTAKE: This is the same pattern as session {date} ({ticket})."

"The lesson was: {previous lesson}"

"Suggestion: Add a review check to catch this pattern."

```

4. Write Learning Log Entry

Append a structured entry to .claude/learning-log.md:

---

### {TICKET-ID} | {Short description} | {date}

**Bug:** {One-line description}
**Root Cause:** {One-line root cause in plain language}
**Iterations:** {number} (1 = got it right first try)
**Category:** {UI/UX | i18n | Performance | Functionality | Data | Infrastructure}

**Lesson:**
{2-3 sentences capturing the key insight. Written so someone unfamiliar with the codebase can understand.}

**Pattern:**
{Is this part of a broader pattern? What other bugs might look similar?}

**Process Note:**
{Optional: any workflow improvement suggestion}

5. Update Backlog

Update the bug's status in .claude/backlog-live.md:

6. Suggest Process Improvements

Based on the session, proactively suggest improvements:

Session complete: {TICKET-ID}

Lessons captured in learning-log.md
{count} total entries in learning log

Suggestions:
- {improvement 1, if any}
- {improvement 2, if any}

Run /clear to reset for the next session.

Learning Log Format

The learning log (.claude/learning-log.md) follows this format:

# Bug Shepherd Learning Log
> Institutional memory for {project.name}
> Read this at the start of every session.

## How to Use This Log
- Scan for entries related to your current bug's category
- Look for patterns that might apply
- If you find yourself repeating a documented mistake, stop and re-read

## Entries

{Entries are appended here in reverse chronological order}

The Compounding Effect

After 10 sessions, the learning log typically reveals:

This is the real value of Bug Shepherd: it gets smarter the more you use it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.