From reflect
Show reflection metrics, pending reviews, sidecar coverage, and GraphRAG health. Read-only views into the reflect system state. Can also approve/reject pending low-confidence items.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reflect:reflect-statusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Show the current state of the reflect system: metrics, pending reviews, sidecar
Show the current state of the reflect system: metrics, pending reviews, sidecar coverage, and GraphRAG health. Also handles review of pending low-confidence items.
When invoked, display the following sections:
python {{HOME_TOOL_DIR}}/skills/reflect/scripts/state_manager.py status
Shows:
python {{HOME_TOOL_DIR}}/skills/reflect/scripts/metrics_updater.py --show
Shows:
Check how many knowledge notes have entity sidecars:
# Count knowledge notes
NOTES=$(find docs/solutions -name "*.md" -not -name "README.md" 2>/dev/null | wc -l | tr -d ' ')
# Count sidecars
SIDECARS=$(find docs/solutions -name "*.entities.yaml" 2>/dev/null | wc -l | tr -d ' ')
# Find notes missing sidecars
for md in $(find docs/solutions -name "*.md" -not -name "README.md" 2>/dev/null); do
sidecar="${md%.md}.entities.yaml"
if [[ ! -f "$sidecar" ]]; then
echo "MISSING: $md"
fi
done
Display:
Sidecar Coverage: 15/18 (83%)
Missing sidecars:
- docs/solutions/build-errors/webpack-chunk-error.md
- docs/solutions/testing-patterns/playwright-retry.md
- docs/solutions/api-integrations/stripe-webhook.md
If coverage < 100%: Suggest running /reflect:consolidate to generate missing sidecars.
if command -v reflect >/dev/null 2>&1; then
reflect stats
elif [[ -x "$HOME/.local/bin/reflect" ]]; then
"$HOME/.local/bin/reflect" stats
fi
Shows:
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/memory_discovery.py stats
Shows:
If orphaned dirs > 0: Suggest running /reflect:consolidate to merge them.
If unindexed memories found: Suggest running /reflect:ingest to index into GraphRAG + QMD.
Check if .agents/MEMORY.md exists and its line count:
if [[ -f .agents/MEMORY.md ]]; then
LINES=$(wc -l < .agents/MEMORY.md | tr -d ' ')
echo "Project memory: .agents/MEMORY.md ($LINES/200 lines)"
else
echo "Project memory: not found (run /reflect:consolidate to create)"
fi
Every 0-result recall is appended to ~/.reflect/knowledge-gaps.jsonl by
recall.py (normalized query + session id). Queries that came up empty in
>=2 distinct sessions are knowledge gaps — users keep asking about them
with no learnings in the KB. This is the curation backlog.
python3 {{HOME_TOOL_DIR}}/skills/reflect-status/scripts/knowledge_gaps.py
Shows:
Options: --min-sessions 1 to include one-off gaps, --format json for
programmatic use.
If repeat gaps exist: Suggest capturing learnings for those topics via
/reflect or /reflect:ingest — once indexed, the gap stops recurring.
Every UPDATE to a learning snapshots its old form into the learning_history
table in ~/.reflect/reflect.db (and, for knowledge notes, an append-only
{slug}.history.yaml sidecar next to the note). Show the update count per
learning:
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/reflect_db.py history
Shows, per learning (most-updated first):
If a learning has an unusually high update count: its belief keeps getting
revised — inspect the snapshots (learning_history.snapshot_json or the
.history.yaml sidecar) to see why the rule kept changing.
Every new learning write runs deterministic contradiction detection against
recent in-scope learnings sharing >= 1 concept tag (negation-stripped token
Jaccard > 0.9 with a negation marker in exactly one of the two — e.g. saving
"never use foo" against an existing "use foo"). The OLDER learning is demoted
(is_latest = 0, superseded_by_learning_id set) and a
contradiction_detected audit event is written to the events table in
~/.reflect/reflect.db, mirrored to ~/.reflect/events.jsonl.
python3 {{HOME_TOOL_DIR}}/skills/reflect/scripts/reflect_db.py contradictions
Shows:
If contradictions exist: the demoted side is preserved (history snapshot +
is_latest = 0, never deleted) — review the pairs to confirm the newer rule
is actually the correct one; if the flip was wrong, re-state the older rule
so it wins the next round.
When invoked as reflect review or when there are pending items, enter review mode.
python {{HOME_TOOL_DIR}}/skills/reflect/scripts/state_manager.py pending
For each pending item, show:
Review actions:
approve N -- Promote item N to full confidence, apply the changereject N -- Remove item N from pending queueapprove all -- Promote all pending itemsreject all -- Clear all pending itemsskip -- Leave pending for laterWhen approving:
reflect add CLI (reflect-kb)# Done internally via state_manager
python -c "
import sys; sys.path.insert(0, '{{HOME_TOOL_DIR}}/skills/reflect/scripts')
from state_manager import clear_pending_review
clear_pending_review(INDEX)
"
Flag items that have been pending for more than 7 days:
STALE (14 days): "Consider using memoization for expensive renders"
- Detected: 2026-03-30
- Recommend: reject (too old, context lost) or approve if still relevant
Present everything in a clean dashboard format:
# Reflect Status Dashboard
## System State
| Metric | Value |
|--------|-------|
| Auto-Reflect | Disabled |
| Last Reflection | 2026-04-12 14:30:00 |
| State Directory | ~/.reflect |
## Aggregate Metrics
| Metric | Value |
|--------|-------|
| Sessions Analyzed | 42 |
| Signals Detected | 156 |
| Changes Proposed | 114 |
| Changes Accepted | 89 (78%) |
| Skills Created | 5 |
| Estimated Time Saved | ~7.4 hours |
## Confidence Breakdown
| Level | Count |
|-------|-------|
| High | 45 |
| Medium | 32 |
| Low | 12 |
## Most Updated Agents
| Agent | Updates |
|-------|---------|
| code-reviewer | 23 |
| backend-developer | 18 |
| frontend-developer | 12 |
| security-agent | 8 |
| solution-architect | 5 |
## Sidecar Coverage
15/18 knowledge notes have sidecars (83%)
3 notes missing sidecars -- run /reflect:consolidate to fix
## GraphRAG Health
- Indexed learnings: 34
- Entities: 112
- Relationships: 87
- Last indexed: 2026-04-12
## Orphaned Memories
- Orphaned dirs: 3
- Total lines: 127
- Suggest: /reflect:consolidate
## Knowledge Gaps (negative recall)
Knowledge gap — users keep asking about these with no learnings:
- **istio sidecar injection failures** — 3 sessions, 5 asks, last 2026-04-11
- **bun workspace hoisting** — 2 sessions, 2 asks, last 2026-04-09
Suggest: capture learnings for these topics, then /reflect:ingest
## Learning Update History
| Learning | Updates | Last Updated |
|----------|---------|--------------|
| never use var in this codebase | 4 | 2026-04-12 |
| prefer uv over pip | 2 | 2026-04-10 |
## Contradictions
Contradictions detected: 2
| Older (demoted) | Newer (kept) | Similarity |
|-----------------|--------------|------------|
| use fab deploy | never use fab deploy | 1.00 |
| commit straight to main | don't commit straight to main | 1.00 |
## Pending Reviews: 2
1. [MEDIUM] "Consider cursor-based pagination for large datasets" (5 days)
2. [LOW] "Memoize expensive component renders" (12 days, STALE)
Review pending items? (approve N / reject N / skip)
Metrics show 0:
/reflect at least once to initialize metricsls ~/.reflect/GraphRAG stats unavailable:
command -v reflectuv tool install --upgrade 'git+https://github.com/stevengonsalvez/ainb-reflect-memory.git[graph]'Sidecar count is 0:
/reflect:consolidate to generate missing sidecarsnpx claudepluginhub stevengonsalvez/agents-in-a-box --plugin reflectCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.