بنقرة واحدة
arib-memory-search
Memory | Semantic search across project memory — claude-mem MCP with grep fallback
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Memory | Semantic search across project memory — claude-mem MCP with grep fallback
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Memory | Code-graph subsystem — a native lightweight IMPORT graph (which file imports which, god-node candidates) built with ripgrep/grep, so a large monorepo can be navigated by structure instead of re-grepping every session. build/refresh/query. Honest scope: structural import graph, NOT semantic (no call-graph/type resolution); no Graphify dependency. Loads ON DEMAND only (zero always-on tokens). ADR-034.
Dev | Over-engineering review — reads a diff/module and returns a delete-list of bloat (single-use abstractions, premature generalization, speculative config, dead options) WITHOUT stripping legitimate structure. Advisory: returns recommendations, never auto-deletes. The on-demand companion to the ponytail-lite tripwire hook. Authored natively (no Ponytail dependency). ADR-033.
Wave | Pre-wave requirement lock — Act 1 derives the requirements from the codebase + memory (an honest grill, not guesswork), Act 2 hands the locked plan to an independent model (Codex) to tear apart until sign-off. Produces waves/<id>/PLAN.md + PLAN-REVIEW-LOG.md. Auto-chained idempotently from /arib-wave-start. If Act 2 can't run (no Codex), the wave proceeds but HOLDS MERGE for a human. Absorbs grill-me-codex (ADR-032).
Wave | Start a multi-session delivery wave — branch, plan, parallel architect+planner
Engine | Command the engineering team to deliver a known goal — dispatches the engineer-manager to decompose → dispatch specialists (parallel where safe) → integrate → reconcile (verification-agent) → merge gate. Scales its own reach: runs inline for a bounded goal, escalates to a parallel Workflow for a broad one, and paces under /loop for a multi-turn campaign — only when it needs to. Use when a goal needs a coordinated TEAM, not one specialist. Sibling of /arib-engine: the engine DISCOVERS its own backlog; /arib-build EXECUTES a goal you hand it.
Stack | NestJS architecture & patterns reference — modules/providers/DI, DTO+validation, guards/interceptors/pipes/filters, config, async lifecycle, testing, and the security + performance pitfalls that bite at scale. Use when building or reviewing a NestJS backend. Composes with security-auditor (OWASP), database-guardian (TypeORM/Prisma migrations), and performance (N+1). Authored natively (the ECC graft was unsourceable; this is CCM's own, MIT).
| name | arib-memory-search |
| argument-hint | <search query> |
| description | Memory | Semantic search across project memory — claude-mem MCP with grep fallback |
This skill answers "what did we decide / discover / document about X?" across the project's persistent memory.
It uses a two-layer hybrid — but be honest about the default:
By default there is NO vector recall. A stock CCM install has no
claude-memon PATH and noCLAUDE_MEM_API_KEY, so Layer 2 (grep) is the entire surface. Layer 1 is opt-in — installing + configuring claude-mem turns it on. Don't tell the user "semantic memory" is active unless Step 1 actually confirms the MCP responds.
claude-mem MCP if configured.
Vector search across all session memory; returns the top semantically relevant
records regardless of which markdown file they live in. Note: claude-mem is
exposed three ways (MCP tool, claude-mem CLI, npx claude-mem server) — pin
the version and confirm the actual surface at setup, not at recall time.grep across memory/*.md.
Finds exact strings and known phrases. This is the guaranteed floor.The skill prefers Layer 1 when available and falls back to Layer 2 otherwise (fail-open: grep always works). Both layers are queried for high-stakes lookups so the answer is cross-checked.
bugs_and_fixes.md.CONSTRAINTS.md./arib-memory-search "auth token rotation"
/arib-memory-search "why did we drop kafka"
/arib-memory-search "migration that broke staging"
If `CLAUDE_MEM_API_KEY` is set AND the claude-mem MCP responds → Layer 1 active.
Otherwise → Layer 2 only.
Call the MCP's semantic search with the user's query. Expect ranked results with a relevance score and the source session id.
Top results:
- [score 0.91] session 2026-04-19 — "decided to drop kafka in favor of
redis streams because the team headcount didn't justify kafka ops cost"
- [score 0.83] session 2026-04-22 — "kafka mention: confirmed redis streams
cap at 1M msg/day; revisit at 800K"
Run a grep across memory/*.md for the literal query string and the 2–3
strongest keywords from it.
grep -rni --include='*.md' "<query>" memory/ | head -20
If the two layers agree: report the unified answer with citations to both. If they disagree: report both and flag the divergence — the live layer may have a record the export hasn't captured yet, or vice versa.
If neither layer has a hit: say so explicitly. Do not fabricate.
Every claim in the answer must point to either:
session-2026-04-19T13:22:01Z)memory/architecture_decisions.md:142)No citation = do not include the claim.
User: /arib-memory-search "why did we drop kafka"
Layer 1 (claude-mem): not configured (CLAUDE_MEM_API_KEY unset).
Layer 2 (grep): 3 hits.
- memory/architecture_decisions.md:142
"ADR-007: dropped kafka in favor of redis streams. Headcount didn't
justify kafka ops cost. Confirmed redis caps at 1M msg/day."
- memory/change_log.md:88
"kafka producer code removed in PR #421"
- memory/bugs_and_fixes.md:203
"redis-streams: fixed consumer-group rebalance bug (2026-04-12)"
Answer: kafka was dropped in ADR-007 (memory/architecture_decisions.md:142)
because headcount didn't justify the ops cost. Redis streams replaced
it; production cap was 1M msg/day at decision time. Producer code
removed in change_log.md:88. One known issue post-migration: rebalance
bug fixed 2026-04-12 (bugs_and_fixes.md:203).
User: /arib-memory-search "should we use a queue"
Layer 1 (claude-mem): 2 results, scores 0.87 and 0.81.
- session-2026-04-22 — "ADR-007: dropped kafka..." (score 0.87)
- session-2026-04-29 — "considered SQS for X but went with redis..."
Layer 2 (grep): 0 hits for "queue".
Answer: I found 2 relevant decisions in semantic recall (cite session
ids), even though grep on "queue" returned nothing — the discussion
was about kafka and SQS specifically. ADR-007 is the most relevant.
Layer-2 grep miss is expected: the decision is paraphrased, not
literal.
Note to user: confirms the value of the semantic layer for paraphrased
recall. Without claude-mem configured, this query would have returned
"no hits".
User: /arib-memory-search "graphql federation strategy"
Layer 1: 0 results above 0.5 threshold.
Layer 2: 0 hits.
Answer: No prior decision recorded about graphql federation. If you're
about to make a decision, consider:
- Adding an ADR to architecture/DECISIONS.md
- Recording the decision in memory/architecture_decisions.md after
the session
Do NOT fabricate prior context. Empty is empty.
Query received
|
v
[Is CLAUDE_MEM_API_KEY set AND MCP responding?]
|
+-- yes --> Layer 1 query (vector search, top-5 by score)
| |
| +--> Always also run Layer 2 (grep) for cross-check
|
+-- no --> Layer 2 only (grep memory/*.md)
|
v
[Layer 1 and Layer 2 agree?]
|
+-- yes --> Report unified answer with both sets of citations
+-- no --> Report both, flag the divergence to the user
Layer 1 may have a record the export hasn't captured
yet, or Layer 2 may show a more recent markdown edit
the MCP hasn't re-indexed.
|
v
[Both empty?]
|
+-- yes --> Say so explicitly. Suggest creating a memory record
| if the user is about to make a decision worth preserving.
+-- no --> Cite every claim. No citation = drop the claim.
Stale MCP index. If memory/semantic_export.md is newer than the
MCP's last indexed timestamp, Layer 2 will see records Layer 1
doesn't. Report from both; flag the staleness to the user; suggest
running scripts/memory-export.sh and reindexing.
Conflicting records (same fact, different decisions). Memory is append-only — older decisions can be superseded but are never edited. If a query returns conflicting facts, sort by date and report the newest as authoritative; mention the older ones for context.
Query is too vague. "what did we decide" — refuse and ask for refinement. Don't dump 100 hits.
Query is a question about CCM itself, not the project. This skill
searches memory/, which is project state. Methodology questions
belong in CLAUDE.md, Training/, or reference/. Redirect.
Regulated-data project with MCP disabled. This is the intended configuration. Layer 2 alone is the correct answer; do not warn about Layer 1 absence.
memory/ files missing or corrupted: report what you can; flag
to the user that memory state needs attention before proceeding with
decisions.scripts/memory-export.sh — exports the live MCP into memory/semantic_export.md.memory/MEMORY_PROTOCOL.md — full protocol for memory file format and lifecycle..mcp.json — claude-mem server stub..claude/skills/arib-session-start/SKILL.md — runs at session start; reads memory/*.md to seed context..claude/skills/arib-session-end/SKILL.md — writes session_notes.md and other memory files at session end. Memory grows from there.