بنقرة واحدة
knowledge-base
// Project-specific prompt optimization knowledge management. Use when storing or retrieving learned patterns from comparisons. Provides schema, extraction criteria, capacity management, and retention scoring.
// Project-specific prompt optimization knowledge management. Use when storing or retrieving learned patterns from comparisons. Provides schema, extraction criteria, capacity management, and retention scoring.
Analyzes and optimizes prompts using BP-001~008 patterns and 3-step flow (detect, optimize, balance). Use when "optimize this prompt", "review prompt quality", "analyze prompt issues", or creating/reviewing rashomon skill content.
Git worktree management for isolated parallel prompt execution. Use when creating isolated environments for prompt comparison or managing worktree lifecycle. Provides creation, cleanup, and orphan detection scripts.
Creates or updates Claude Code skills through interactive dialog, then evaluates effectiveness by parallel execution comparison. Use when creating new skills, updating existing skills, or evaluating skill quality.
Compares original and optimized prompts by parallel execution in git worktrees. Use when evaluating prompt improvement effects or learning prompt engineering through concrete examples.
| name | knowledge-base |
| description | Project-specific prompt optimization knowledge management. Use when storing or retrieving learned patterns from comparisons. Provides schema, extraction criteria, capacity management, and retention scoring. |
| user-invocable | false |
{project_root}/.claude/.rashomon/prompt-knowledge.yaml
patterns:
- name: "Pattern name"
what_to_look_for: |
When this pattern applies
improvement: |
How to improve when detected
learned_from: "Date and context"
confidence: 0.0-1.0
times_applied: 0
anti_patterns:
- name: "Anti-pattern name"
what_to_look_for: |
What to avoid
why_bad: |
Why problematic in this project
learned_from: "Date and context"
confidence: 0.0-1.0
metadata:
last_updated: "ISO-8601 timestamp"
total_comparisons: 0
patterns_count: 0
anti_patterns_count: 0
max_entries: 20
ALL conditions must be true:
Confidence Assignment:
| Evidence | Confidence |
|---|---|
| Multiple comparisons confirmed | 0.8+ |
| Single comparison, clear effect | 0.5-0.7 |
| Effect present but uncertain | 0.3-0.5 |
Minimum threshold: 0.3 (entries below this are skipped)
ALL conditions must be true:
Save only entries that are:
Maximum: 20 entries (patterns + anti_patterns combined)
Retention Score: confidence * (1 + log(times_applied + 1))
This formula:
Key Principle: Old entries are valuable. Retention depends on confidence and usage frequency.
Eviction Process:
At start of prompt analysis:
.claude/.rashomon/prompt-knowledge.yaml (if exists)what_to_look_for against current prompttimes_applied for patterns usedAfter comparison (if structural improvement found):
patterns:
- name: "TypeScript interface reference"
what_to_look_for: |
Code generation prompts creating TypeScript types without
referencing existing type definitions in src/types/
improvement: |
Add: "Reference existing types in src/types/ to maintain
consistency and avoid duplicate type definitions"
learned_from: "2026-01-14: Comparison showed better type reuse"
confidence: 0.7
times_applied: 3
When comparison results require knowledge base updates:
Confidence Adjustments:
Entry Management: