Back to list
dug-21

reflexion

by dug-21

0🍴 0📅 Jan 21, 2026

SKILL.md


name: "reflexion" description: "Record feedback on pattern effectiveness. Stores episodes that train the recommendation system and enable pattern discovery via learner."

Reflexion - Evaluate Pattern Effectiveness

What This Skill Does

Records feedback on patterns and approaches used during work. This feedback:

  1. Trains the recommendation system for better pattern suggestions
  2. Provides data for learner skill to auto-discover new patterns
  3. Tracks what works and what doesn't over time

Use this AFTER completing work to record what helped and what didn't.


Quick Reference

# Store feedback
agentdb reflexion store "session-id" "task description" reward success "critique"

# Retrieve similar experiences
agentdb reflexion retrieve "search query" --k 5 --only-successes

# Get critique summary
agentdb reflexion critique-summary "topic" true

Primary Method: Store Feedback

agentdb reflexion store \
  "dp-004" \
  "Used domain-adapter pattern for new HTTP source" \
  1.0 \
  true \
  "Pattern was complete - followed Source trait steps exactly, tests passed first try"

Parameters (positional)

PositionParameterDescription
1session-idFeature ID (e.g., dp-004, air-011)
2taskDescription of what you did
3rewardSuccess score 0-1
4successtrue or false
5critiqueSpecific feedback (required)
6inputOptional: task input
7outputOptional: task output
8latency-msOptional: execution time
9tokensOptional: tokens used

Examples

Pattern Worked Well

agentdb reflexion store \
  "dp-004" \
  "Used domain-adapter pattern for new HTTP source" \
  1.0 \
  true \
  "Pattern was complete - followed Source trait steps exactly, tests passed first try"

Pattern Partially Worked

agentdb reflexion store \
  "dp-004" \
  "Used add-stream pattern but needed adjustment" \
  0.6 \
  true \
  "Pattern missing retention field requirement added in v2.0 - should update pattern via save-pattern"

Pattern Failed

agentdb reflexion store \
  "dp-004" \
  "Pattern mqtt-routing failed for multi-topic subscription" \
  0.2 \
  false \
  "Pattern assumes single topic per source - needs update for multi-topic. Used workaround with topic array."

No Pattern Found

agentdb reflexion store \
  "dp-004" \
  "Implemented TimescaleDB continuous aggregate - no existing pattern" \
  0.85 \
  true \
  "No pattern existed. Created new approach using hypertable + continuous_aggregate. Should save as new pattern."

Retrieve Similar Experiences

# Find successful similar work
agentdb reflexion retrieve "HTTP source implementation" \
  --k 5 \
  --only-successes \
  --min-reward 0.7

# Find failures to learn from
agentdb reflexion retrieve "MQTT configuration" \
  --k 5 \
  --only-failures

# Get synthesized summary
agentdb reflexion retrieve "parquet storage" \
  --k 10 \
  --synthesize-context

Retrieve Parameters

ParameterDescription
--kNumber of results
--only-successesOnly successful episodes
--only-failuresOnly failed episodes
--min-rewardMinimum reward threshold
--synthesize-contextGenerate summary

Get Critique Summary

Aggregate lessons from critiques:

# Get critique summary for failures
agentdb reflexion critique-summary "mqtt" true

# Get all critiques for a topic
agentdb reflexion critique-summary "architecture" false

Reward Scale

ScoreMeaningWhen to Use
1.0PerfectPattern/approach worked exactly as expected
0.8GoodMinor adjustments needed
0.6PartialSignificant modifications required
0.4WeakMarginally helpful, major workarounds
0.2FailedDidn't work, caused issues
0.0HarmfulActively wrong, wasted time

Session ID Convention

Use consistent session IDs for aggregation:

Session IDUse For
{feature-id}Feature work (e.g., dp-004, air-011)
{feature-id}-{phase}Specific phase (e.g., dp-004-spec)
maintenanceBug fixes, refactoring
explorationResearch, spikes, experiments

Critique Best Practices

Good critiques (specific, actionable):

"Pattern was complete - followed steps exactly and deployment succeeded"
"Missing retention field that's now required in v2.0 schema"
"TimescaleDB connection pattern assumed localhost but we use Docker networking"
"Architecture pattern outdated - ADR-005 superseded the approach"

Poor critiques (vague, unusable):

"It worked"              # Too vague
"Failed"                 # No actionable info
"Good pattern"           # Doesn't explain what made it good

The Pattern Workflow

1. BEFORE work:  get-pattern  → Search for relevant patterns
2. DURING work:  Apply patterns, note gaps and discoveries
3. AFTER work:   reflexion    → Record what helped (THIS SKILL)
                 save-pattern → Store NEW discoveries (if any)
                 learner      → Auto-discover patterns from episodes (periodic)

After Recording Feedback

If your critique identifies a pattern that needs updating:

# 1. Record the feedback (this skill)
agentdb reflexion store \
  "dp-004" \
  "Used add-stream pattern" \
  0.6 \
  true \
  "Pattern missing required retention field"

# 2. Update the pattern (save-pattern skill)
agentdb skill create \
  "add-stream-v2" \
  "Add Data Stream (v2.0): Now requires retention field. Steps: 1) Create config.yaml, 2) Add retention field (required), 3) Run sync..." \
  "tags: streams, config, updated"

  • get-pattern - Search patterns BEFORE work
  • save-pattern - Store NEW patterns after discovering reusable approaches
  • learner - Auto-discover patterns from reflexion episodes

What NOT to Use This For

Don't RecordUse Instead
New patterns you discoveredsave-pattern
Swarm coordination stateclaude-flow memory tools
Transient task/agent memoryclaude-flow memory tools
Architecture decisionssave-pattern

Reflexion is for FEEDBACK on work done, not storing new knowledge.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon