audit-infra
Infrastructure-first security audit — secrets, supply chain, CI/CD, LLM/skill security, OWASP, STRIDE. Complements /audit-solana (program-level)
Memory consolidation — dedupe, contradiction-check, prune, and re-rank MEMORY.md + CLAUDE.md Project Learnings. Run after major refactors
> /plugin marketplace add solanabr/solana-ai-kit > /plugin install solana-ai-kit@stbr
How it fires
How this command gets triggered: by you, by Claude, or both.
/dreamContext preview
What this command does when you run it.
Memory consolidation — dedupe, contradiction-check, prune, and re-rank MEMORY.md + CLAUDE.md Project Learnings. Run after major refactors
description: "Memory consolidation — dedupe, contradiction-check, prune, and re-rank MEMORY.md + CLAUDE.md Project Learnings. Run after major refactors"
<!-- Schema adapted from the learn skill (gstack via sendaifun/solana-new), MIT © 2026 SendAI and Superteam. Local-only — no sync, no telemetry. -->
You are consolidating this project's memory. Like sleep, this pass doesn't add new knowledge — it merges duplicates, resolves contradictions, discards what's stale, and strengthens what's proven. Touch ONLY `MEMORY.md` and (with confirmation) the `## Project Learnings` section of `CLAUDE.md`. Never modify project code.
Every entry in `MEMORY.md` is typed and structured. Sections: `## Patterns`, `## Pitfalls`, `## Preferences`, `## Architecture`, `## Tools`.
### kebab-case-key - **Insight:** One clear sentence - **Confidence:** N/10 - **Source:** command/agent/session that produced it (e.g. debug-user-tx, manual) - **Files:** relative/path.rs, other/path.ts (optional) - **Date:** YYYY-MM-DD
Entries missing fields get them backfilled during consolidation (unknown source → `legacy`, missing date → today, missing confidence → 5/10).
Flag for removal:
Auto-remove dead references and transient leftovers. For stale-but-plausible entries, ask the user: remove / keep (re-date to today) / update insight.
Within each section, order entries by confidence descending, then date descending. Highest-signal knowledge reads first.
`MEMORY.md` loads every session start — hard cap **200 lines / 25KB**, index-pointer style (one-line insights pointing at files, not essays). The richer typed fields (confidence, dates, insight) used during steps 2–5 are processing-only — the written `MEMORY.md` keeps the index-pointer format, with that metadata living in the linked detail files, not the index.
An entry graduates from MEMORY.md to CLAUDE.md `## Project Learnings` when ALL hold:
Propose the export list; on confirmation append bullets under the matching subsection and remove the originals from MEMORY.md (CLAUDE.md is always loaded — keeping both wastes tokens).
| Write | Never write | |-------|-------------| | Reusable patterns, pitfalls that cost > 10 min, user preferences, architecture decisions with trade-offs, tool choices with reasons | Secrets, keys, tokens, wallet addresses tied to the user, or anything resembling credential material | | One-line insights + file pointers | File contents, code blocks > 3 lines, command transcripts | | Confirmed, dated knowledge | Transient state: current branch, in-flight tasks, TODO lists, session-specific context | | | Anything already stated in README or CLAUDE.md |
If a candidate entry contains something from the "never" column, strip it or drop the entry — there is no exception path.
## Dream Report — <date> | Stage | Result | |-------|--------| | Collected | N entries (P pat / Q pit / R pref / S arch / T tool), M malformed fixed | | Merged | N duplicates folded | | Contradictions | N resolved (list keys), N escalated to user | | Pruned | N removed (dead refs: n, stale: n, transient: n) | | Exported | N promoted to CLAUDE.md (or "none proposed") | | Size | X lines / Y KB (cap: 200 / 25KB) ✓ |
Production-ready Claude Code configuration for full-stack Solana development. Combines best practices from multiple sources into an agent-optimized, token-efficient config you can install and adapt to your specific project.
Repo: solanabr/solana-ai-kit
Infrastructure-first security audit — secrets, supply chain, CI/CD, LLM/skill security, OWASP, STRIDE. Complements /audit-solana (program-level)
Benchmark CU usage and compare against baseline for regression detection