/rc:rc-memoryfrom rc
Manages project memory under .rc/memory/ — facts, lessons, and golden paths. Automatically recalls relevant knowledge before working and after corrections. Structured with INDEX.md, slug files, and machine-owned lesson store.
Ships in rc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The one place for what RC remembers about this project across turns and sessions. Project-scoped only — never copy memory to another project or a global location. Plain markdown plus one machine-owned JSON store; this skill never edits source code.
.rc/memory/
INDEX.md # one line per fact — the recall entry point
<slug>.md # one durable fact per file
lessons.json # machine-owned lesson store (scripts/lessons.mjs) — do NOT hand-edit
LESSONS.md # rendered playbook, regenerated on every write
observations.jsonl # raw capture appended by the observe hook (transient)
Resolve the project's .rc base directory (nearest .rc walking up; default ./.rc).
The shape of the knowledge decides where it goes; first match wins.
| The knowledge is… | Goes to |
|---|---|
| a standalone statement — a decision, convention, gotcha, term | A — Facts |
| something a verification signal or a user correction taught us | B — Lessons |
| a multi-step route with commands, a required order, and dead-ends | C — Golden paths |
| only true while one task runs | Scratch, below |
| a one-off unlikely to recur | nowhere — drop it |
One <slug>.md per fact, frontmatter plus a short body:
---
title: <short title>
scope: decision | convention | gotcha | glossary | context
tags: [a, b]
created: <YYYY-MM-DD>
updated: <YYYY-MM-DD>
---
<the fact in a few sentences. For a decision, add **Why:** and, if useful, **How to apply:**.>
INDEX.md holds one line per fact, newest last: - [<title>](<slug>.md) — <scope> — <one-line hook>.
It is the only file you read to decide relevance; never dump fact bodies into it.
Consult before implementing, deciding or planning: read INDEX.md, scan the hooks for the task's
terms, open only the matching <slug>.md. For a large store, grep -ri "<term>" .rc/memory/.
Record only when all three hold: (1) a future run needs it to avoid a mistake or rediscovery; (2) it is durable for this project, not one task's execution; (3) it is not already obvious from the repo, git history, or the spec. Reuse the slug to update rather than duplicate. Never store secrets, tokens, credentials, large code blocks, stack traces or raw session logs.
A lesson is what a failure or a correction taught us, and it is only trusted once it recurs
across two distinct features. scripts/lessons.mjs owns every mechanical part — IDs, recurrence
counting, candidate→confirmed promotion, quarantine, pruning, rendering — because that is exactly
the bookkeeping that rots when done by hand. Never hand-edit lessons.json or LESSONS.md.
node "$CLAUDE_PLUGIN_ROOT/scripts/lessons.mjs" add --root <project-root> \
--feature <slug> \
--signal <ac_gap|surviving_mutant|spec_precision_gap|spec_deviation|gate_fail|user_correction> \
--source "<file:line | AC id | mutant id | the correcting turn>" \
--text "<one terse, actionable, canonical sentence>" \
--scope "<optional path/layer/tag for retrieval>"
node "$CLAUDE_PLUGIN_ROOT/scripts/lessons.mjs" list --root <project-root> # confirmed only
node "$CLAUDE_PLUGIN_ROOT/scripts/lessons.mjs" penalize --root <project-root> --id L-007
Record at a verification boundary (a gate failed, a review found a spec deviation, an acceptance
criterion had no test) or the moment the user corrects an approach — --signal user_correction.
Load confirmed lessons before planning and apply them as design constraints for the matching
scope. Candidates are tracked but not trusted: never load them as instructions. If applying a
confirmed lesson causes a failure, penalize it so it heads for quarantine instead of misleading
the next run.
--source, no lesson; the script refuses it. Do not work around it.The observe hook appends {ts, tool, target} lines to observations.jsonl (on by default;
RC_INSTINCTS=0 opts out) and memory-load surfaces the store at SessionStart, nudging a distill
pass once observations accumulate. Reading those lines is how you spot a sequence repeated 3+ times
that nobody flagged out loud; truncate the file after a pass so the next one starts clean.
A route earned the hard way — how to reach a tenant's database, run the migration dance, verify a change live — dies when compressed into one sentence: the commands, the required order and the dead-ends are exactly what the next session needs. Harvest it into a project-local skill in the same turn you earn it.
Promotion gate — all three, or it is not a skill yet:
Short of all three it is still a hypothesis: record it in A with scope: context and an
unverified: line, and harvest it once a check confirms it.
Write it to the host's project skills directory (Claude Code: .claude/skills/<name>/) so it ships
to the team via git and never fires in a repo where its commands do not apply. rc-writing-for-agents
owns the authoring — read it first. The skill carries the commands, paths, required order, gotchas,
and a What didn't work section holding the dead-end. Scan that directory before writing: a
near-identical route is an update, not a second skill competing to trigger. For a credential, record
where it lives — the env var name, the MCP tool, the vault entry — never the value; a harvested
skill is committed.
Notes that are only true while one task runs — files touched, a debugging trail, the current
objective — go in .rc/tasks/<slug>/notes.md and are deleted with the task. They are not memory.
When a scratch note passes the three Record questions in A, promote it to a fact; when it is
what a failure taught, record it as a lesson in B. Do not copy code blocks, stack traces or the
spec into scratch, and do not keep a chronological play-by-play.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetmediumThree short reads, in order
memory, project-knowledge, facts, lessons, golden-paths, recall
32 skills in this plugin
/rcExplains RC — its skills, agents, hooks and artifacts. Use to learn what RC offers. Do not use to run a workflow step./rc-a11yGuias de acessibilidade (a11y) para web seguindo WCAG 2.2 AA — semântica HTML, ARIA, navegação por teclado, gestão de foco, contraste e leitores de tela. Use ao construir ou revisar UI (componentes, formulários, modais, navegação, tabelas). Não use para acessibilidade de PDF, auditoria jurídica de conformidade, ou design visual sem relação com a11y./rc-axumImplements and reviews Axum 0.8+ APIs in Rust — routing, State, extractors, Tower middleware, typed errors, WebSockets, CORS, timeouts, hardening. Use when building or changing Axum backends, handlers, middleware, or WS endpoints. Do not use for SvelteKit (rc-sveltekit), the SQLx data layer alone (rc-sqlx), or Rust language idioms (rc-rust).npx claudepluginhub rodolfochicone/rc-project --plugin rcOther plugins' skills for the same job