create-issue
Create a comprehensive, well-structured GitHub issue with embedded agent instructions for autonomous PR lifecycle management.
Extract learnings from recent PR reviews, conversations, and session patterns to update the knowledge base
$ npx -y skills add dsifry/metaswarm --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/self-reflectContext preview
What this command does when you run it.
Extract learnings from recent PR reviews, conversations, and session patterns to update the knowledge base
description: Extract learnings from recent PR reviews, conversations, and session patterns to update the knowledge base
You are performing a self-reflection for the BEADS agent swarm. Your job is to analyze PR review comments, conversation history, and session patterns to extract high-quality, reusable learnings.
**Philosophy**: Be judicious. Quality over quantity. Each learning should make future development measurably better.
GITHUB_TOKEN=$(gh auth token) npx tsx scripts/beads-fetch-pr-comments.ts --days 7
This outputs PR comments to `.beads/temp/pr-comments.json`.
cat .beads/temp/pr-comments.json | jq -r '.comments[].body' | grep -A5 "^Learnt from:" | grep "^Learning:" | sed 's/^Learning: //' | sort -u
**NOT all CodeRabbit learnings are equal.** Evaluate each one:
For each potential learning, ask:
1. **Would this prevent a bug?** If yes, high priority. 2. **Would this save review cycles?** If yes, add it. 3. **Is this codebase-specific or universal?** Tag accordingly. 4. **Do we already have this?** Check for semantic duplicates. 5. **Can an agent act on this?** If not actionable, skip it. 6. **Would this confuse a naive agent?** If a future agent without context wouldn't benefit, skip it.
Analyze current context window and optionally historical sessions for implicit insights:
**Strategic patterns to look for:**
| Pattern | Usually indicates | Value | | ----------------------------- | -------------------------- | --------- | | "The problem was..." | Debugging insight | High | | "It turns out..." | Discovery moment | High | | "We decided to..." | Architectural decision | Very High | | "The reason we..." | Rationale worth preserving | Very High | | "Unlike what you'd expect..." | Non-obvious behavior | High | | "Never do X because..." | Gotcha/pitfall | High |
**Filter**: Only capture insights that are codebase-specific, non-obvious, actionable, and durable.
Review Claude instructions and config for improvement opportunities:
Present findings interactively: explain issue -> propose change -> get feedback -> implement.
Beyond CodeRabbit's structured learnings, look for **recurring patterns** in review comments:
cat .beads/temp/pr-comments.json | jq -r '.comments[] | select(.reviewerType == "coderabbit") | .body' | grep -i "nitpick\|issue\|suggestion\|consider\|should\|must\|avoid" | head -50
Look for these patterns across multiple PRs:
1. **Repeated corrections**: Same issue flagged in multiple PRs -> Create a learning 2. **Architectural feedback**: Comments about service design, dependencies -> Capture the principle 3. **Testing feedback**: Mock patterns, test structure issues -> Document the pattern 4. **Type safety issues**: Repeated type casting problems -> Create a gotcha 5. **Performance concerns**: N+1 queries, memory issues -> Document with context
Present learnings as a numbered list for user selection:
## Candidate Learnings 1. **<Brief title>** - <One sentence description> 2. **<Brief title>** - <One sentence description> 3. **<Brief title>** - <One sentence description> --- Which numbers do you want to capture? (all / 1,2,3 / none)
**After user selects**, classify each approved learning interactively:
**Fact**: [extracted core insight] **Type**: [pattern|gotcha|decision|api_behavior|security|performance] **Applies to**: [file patterns or components] **Confidence**: [high|medium|low] Does this look right? (yes / edit)
When a new learning conflicts with an existing one:
| Situation | Action | | -------------------------------------- | ------------------------------------- | | New learning is more specific/accurate | New supersedes old | | Both capture different valid aspects | Keep both, add distinguishing context | | New learning contradicts old | Ask user which is correct | | Old learning is a subset of new | Merge into comprehensive learning |
**The key question**: Would having both learnings confuse a naive agent, or complement each other?
For each validated learning, add it to the appropriate knowledge base JSONL file followin
A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.
Create a comprehensive, well-structured GitHub issue with embedded agent instructions for autonomous PR lifecycle management.
Check the status of external AI tools (Codex CLI, Gemini CLI) and their configuration.
Handle review comments on pull requests with appropriate responses and resolutions.
Analyze the session and write a self-contained handoff document so a fresh agent can resume the work — outputs a single "Read…
Monitor a PR through to merge - handles CI failures, reviews, and thread resolution
Load relevant knowledge base facts into context before starting work