一键导入
learner
Auto-discover patterns from reflexion episodes. Run post-feature to consolidate successful approaches into reusable patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Auto-discover patterns from reflexion episodes. Run post-feature to consolidate successful approaches into reusable patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
On-demand vision alignment check. Spawns ndp-vision-guardian to review SPARC artifacts against product/vision/ALIGNMENT-CRITERIA.md.
Validate planning swarm output: artifact existence, AC coverage, pattern IDs, stale references, internal consistency. Produces a glass box report.
NDP 4-tier implementation validation. Tier 1: compilation (build+test+anti-stub). Tier 2: process adherence. Tier 3: spec compliance. Tier 4: risk classification. Produces glass box reports.
Retrieve APPLICATION patterns (architecture, procedures, conventions) from AgentDB using multi-signal retrieval: pattern search, causal recall, and RL predictions. Use BEFORE implementing to ensure consistency.
AgentDB pattern lifecycle management: list, get, delete, deprecate, update, stats, search, duplicates. Use when cleaning up stale patterns, removing deprecated entries, finding duplicates, or auditing pattern health. Workaround for missing MCP delete/update tools (GH Issue #42).
Record feedback on pattern effectiveness. Stores episodes that train the recommendation system, feed the RL engine for smarter pattern ranking, build causal knowledge, and enable pattern discovery via learner.
| name | learner |
| description | Auto-discover patterns from reflexion episodes. Run post-feature to consolidate successful approaches into reusable patterns. |
Analyzes reflexion episodes to automatically discover:
agentdb_pattern_storeRun this AFTER completing a feature to consolidate learnings.
Note: For manual pattern storage, use
save-patternskill. This skill uses MCP tools exclusively. All discovered knowledge goes to the patterns table (searchable viaget-pattern).
# Discover causal patterns from episodes
mcp__agentdb__learner_discover(min_attempts=3, min_success_rate=0.6, min_confidence=0.7)
# Query causal edges
mcp__agentdb__causal_query(min_confidence=0.5, limit=10)
# View database statistics
mcp__agentdb__agentdb_stats(detailed=true)
# Search discovered patterns
mcp__agentdb__agentdb_pattern_search(task="feature-topic", k=5)
Auto-discover causal patterns from reflexion episodes:
mcp__agentdb__learner_discover(
min_attempts=3,
min_success_rate=0.6,
min_confidence=0.7,
dry_run=false
)
| Parameter | Type | Default | Description |
|---|---|---|---|
min_attempts | number | 3 | Minimum times pattern was tried |
min_success_rate | number | 0.6 | Minimum success rate |
min_confidence | number | 0.7 | Statistical confidence threshold |
dry_run | boolean | false | Preview without storing |
Standard discovery:
mcp__agentdb__learner_discover(min_attempts=3, min_success_rate=0.6, min_confidence=0.7)
Aggressive (more patterns, lower thresholds):
mcp__agentdb__learner_discover(min_attempts=2, min_success_rate=0.5, min_confidence=0.6)
Conservative (fewer, higher-confidence patterns):
mcp__agentdb__learner_discover(min_attempts=5, min_success_rate=0.8, min_confidence=0.9)
Dry run (preview without storing):
mcp__agentdb__learner_discover(min_attempts=3, min_success_rate=0.6, min_confidence=0.7, dry_run=true)
After learner_discover returns results, store high-value discoveries to the patterns table so get-pattern can find them:
mcp__agentdb__agentdb_pattern_store(
taskType="learner:discovered-pattern-name",
approach="Description of the discovered pattern, including cause-effect relationship and how to apply it",
successRate=0.85,
tags=["learner", "auto-discovered", "topic"]
)
This replaces the legacy agentdb skill consolidate command, which wrote to the skills table (orphaned from get-pattern searches).
mcp__agentdb__causal_query(min_confidence=0.5, limit=10)
With filters:
# Filter by cause
mcp__agentdb__causal_query(cause="Source trait", min_confidence=0.7, min_uplift=0.1, limit=20)
# Filter by effect
mcp__agentdb__causal_query(effect="data ingestion", min_confidence=0.8, limit=10)
mcp__agentdb__agentdb_pattern_search(task="data ingestion", k=5)
mcp__agentdb__skill_search(task="data ingestion", k=5)
mcp__agentdb__agentdb_stats(detailed=true)
These operations have no MCP equivalent. Use CLI when needed:
# Remove episodes older than 90 days with reward < 0.5
agentdb reflexion prune 90 0.5
# Remove low-confidence causal edges
agentdb learner prune 0.5 0.05 90
Run after completing a feature:
# 1. Discover causal patterns
mcp__agentdb__learner_discover(min_attempts=3, min_success_rate=0.7, min_confidence=0.8)
# 2. Review results, then store valuable patterns to patterns table
mcp__agentdb__agentdb_pattern_store(
taskType="learner:pattern-name",
approach="What was discovered and how to apply it",
successRate=0.85,
tags=["learner", "auto-discovered"]
)
# 3. View what was learned
mcp__agentdb__agentdb_stats(detailed=true)
# 4. Search patterns to verify they're findable
mcp__agentdb__agentdb_pattern_search(task="feature-topic", k=5)
Cause: "Using Source trait with health_check"
Effect: "Reliable data ingestion with automatic recovery"
Uplift: 0.35 (35% improvement)
Confidence: 0.92
taskType: "learner:http-source-reliability"
approach: "Implementing health_check on Source trait leads to 35% more reliable ingestion..."
successRate: 0.89
tags: ["learner", "auto-discovered", "source-trait"]
| Parameter | Low (exploratory) | Standard | High (conservative) |
|---|---|---|---|
min_attempts | 2 | 3 | 5 |
min_success_rate | 0.5 | 0.7 | 0.9 |
min_confidence | 0.6 | 0.8 | 0.95 |
| Frequency | Action | Tool |
|---|---|---|
| Post-feature | Discover patterns | mcp__agentdb__learner_discover |
| Post-feature | Store to patterns table | mcp__agentdb__agentdb_pattern_store |
| Monthly | Review stats | mcp__agentdb__agentdb_stats |
| Quarterly | Prune stale data | agentdb reflexion prune (CLI) |
1. BEFORE work: get-pattern → Search for relevant patterns
2. DURING work: Apply patterns, note gaps
3. AFTER work: reflexion → Record what helped
save-pattern → Store NEW discoveries manually
learner → Auto-discover patterns (THIS SKILL)
get-pattern - Search patterns BEFORE worksave-pattern - Store NEW patterns manuallyreflexion - Record feedback that feeds learner| Don't Use For | Use Instead |
|---|---|
| Storing specific patterns | save-pattern |
| Recording work feedback | reflexion |
| Searching patterns | get-pattern |
Learner is for AUTOMATIC discovery, not manual pattern management.