record-project-memory
Skill10 starsChanged 4 months agoMITView on GitHub
Use when a task has converged (end of resolve-issue, process-code-review, or the final orchestrator report) and a durable, reusable lesson was learned. Distils only the lessons that clear a strict promotion bar and appends them — after a dedup/supersede/prune curation pass — to the per-project compound memory file, never recording trivia, secrets, or PII.
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-problemSkill
- api-reviewSkill
- article-writingSkill
- assignment-compliance-checkSkill
- automation-audit-opsSkill
- autonomous-loopsSkill
- benchmark-optimization-loopSkill
- benchmarkSkill
- blueprintSkill
- class-refactoringSkill
- cleanup-local-branchesSkill
- codebase-simplification-auditSkill
- code-review-bugsnagSkill
- code-review-githubSkill
- code-review-jiraSkill
- code-reviewSkill
- composer-updateSkill
- create-issues-from-textSkill
- create-issueSkill
- create-missing-tests-in-prSkill
- create-testSkill
- design-systemSkill
- docker-patternsSkill
- e2e-testingSkill
- frontend-a11ySkill
- frontend-design-directionSkill
- frontend-patternsSkill
- frontend-slidesSkill
- git-workflowSkill
- laravel-authorization-reviewSkill
- laravel-securitySkill
- laravel-telescopeSkill
- latency-critical-systemsSkill
- merge-github-prSkill
- mysql-patternsSkill
- mysql-problem-solverSkill
- penetration-testerSkill
- postgres-patternsSkill
- prepare-issue-contextSkill
- process-code-reviewSkill
- product-capabilitySkill
- production-auditSkill
- pr-staged-merge-planSkill
- pr-summarySkill
- redis-patternsSkill
- refactor-entry-point-to-actionSkill
- refresh-claude-mdSkill
- resolve-issueSkill
- rewrite-tests-pestSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-threat-analysisSkill
- seoSkill
- skill-creatorSkill
- slack-messagingSkill
- smartest-project-additionSkill
- test-driven-developmentSkill
- tester-cookbookSkill
- test-like-humanSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Do not run this skill mid-task, before convergence, or for a task that produced no durable lesson.
- Very specific: line 33
If it does not exist, plan to create it with a one-line index header (# Project memory — <project>).
- Very specific: line 34
If the project demonstrably has no docs/ tree and refuses to grow one, fall back to the project's existing learnings / decision-log file …
- Distinctive: line 40
Keep a candidate only when it clears all of:
- Distinctive: line 63
Read the existing file and curate so it stays small and non-redundant:
- Distinctive: line 76
Every candidate lesson was run through the three-gate promotion bar.
- Distinctive: line 78
No secrets, credentials, tokens, or PII were written.
- Very specific: line 79
Only the memory file was modified — no production code, tests, CLAUDE.md, or .cursor/rules/project.mdc.
- Distinctive: line 83
Use blader/humanizer for all skill outputs to keep the text natural and human-friendly.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Constraints
- Apply
@rules/compound-engineering/general.mdcCompound Memory (per project) — this skill is the write side of that rule; it owns the promotion bar, the curation pass, and the file convention defined there. - Apply
@rules/git/general.mdc - Write-only to the memory file. This skill modifies exactly one file:
docs/memory/PROJECT_MEMORY.mdin the project being worked on. It never edits production code, tests, configuration,CLAUDE.md, or.cursor/rules/project.mdc. - Never record secrets, credentials, tokens, or PII — apply the same prohibition the security rules apply to logs and tracker comments. When a lesson can only be stated with a secret, generalize it until the secret is gone or drop the entry.
- Per-project only. The memory file lives in the target project, never in this shared rules package. Never write a project lesson into
rules/**as a global rule. - Output must be in English (the memory file is a code artifact, like
CLAUDE.md).
Use when
- A
@skills/resolve-issueor@skills/process-code-reviewrun has converged (review loop at 0 Critical / 0 Moderate) and is about to publish its final report. - An orchestrating run reaches its final report after the convergence gate.
- The user explicitly asks to record a lesson into project memory.
Do not run this skill mid-task, before convergence, or for a task that produced no durable lesson.
Inputs
CONVERGED_CONTEXT— required. The converged task context: what was implemented/fixed, the review findings that recurred, the wrong turns taken, and the design decisions made. The orchestrator passes this from the shared brief; a skill passes its own run context.SOURCE_REF— required. The PR / issue link to record in each entry'sSource:field.AGENT_ROLE— optional. The role writing this entry:orchestration,analysis,implementation,review, orshared. When omitted, defaults toshared. Written as theRole:field of every entry produced in this invocation. Pass the caller's own role — do not guess.
Required approach
1. Locate (or plan) the memory file
- Target
docs/memory/PROJECT_MEMORY.mdin the project being worked on. - If it does not exist, plan to create it with a one-line index header (
# Project memory — <project>). Creating it is allowed; this is the file's first write. - If the project demonstrably has no
docs/tree and refuses to grow one, fall back to the project's existing learnings / decision-log file per@rules/compound-engineering/general.mdc. Never fall back toCLAUDE.mdor.cursor/rules/project.mdcthemselves.
2. Extract candidate lessons from the converged context
List every candidate lesson the task surfaced: a recurring review finding, a non-obvious bug cause, a rejected approach, an architectural decision, or the canonical "this kind of change belongs in an existing part of the system, not a new abstraction" insight.
3. Apply the promotion bar (all three gates must pass)
Keep a candidate only when it clears all of:
- Recurs beyond this task — it generalizes to future work, not a one-off detail of this issue.
- Cost real effort to discover — non-obvious, surprising, or learned after a wrong turn.
- Not already captured — not already obvious from the code, the tests, the git history, or an existing rule.
Drop every candidate that fails any gate. If no candidate clears the bar, record nothing and report no entry: nothing cleared the promotion bar — a trivial task writes nothing.
4. Format each surviving lesson
One entry per lesson, in the greppable format from the rule:
### <slug> — <one-line lesson>
- Trigger: <the recurring situation that makes this lesson apply again>
- Rule: <the decision / what to do next time>
- Example: <a concrete pointer: file / area / symbol>
- Source: <PR / issue link> Added: <YYYY-MM-DD>
- Role: <orchestration | analysis | implementation | review | shared><slug> is kebab-case and unique within the file. Added: is today's date. Role: is the value of the AGENT_ROLE input (defaults to shared when not provided). Strip any secret / credential / token / PII before writing.
5. Curation pass (before appending)
Read the existing file and curate so it stays small and non-redundant:
- Dedup — if an equivalent entry exists (same or very similar slug / lesson), do not add a duplicate; strengthen the existing entry only when the new occurrence adds a sharper trigger or example.
- Supersede — when a new lesson replaces or contradicts an older entry, update (or mark superseded) the old one instead of keeping both.
- Prune — remove entries whose referenced code was removed or whose lesson was promoted into a real
rules/**file. - Soft cap — when the file grows large, consolidate related entries rather than letting it sprawl.
- Role dedup — when deduplicating, consider entries with the same slug across different
Role:values: if bothimplementationandsharedcarry the same lesson, keep thesharedone and remove the role-specific one. Never widen a role-specific entry tosharedunless the lesson genuinely applies across all roles.
6. Write and report
- Apply the curated changes to the memory file (append new entries, edit/remove superseded or pruned ones).
- Report in conversation: the slugs added, edited, pruned, and the count that failed the promotion bar — so the convergence handoff records what memory changed.
Done when
- Every candidate lesson was run through the three-gate promotion bar.
- Surviving lessons were written to
docs/memory/PROJECT_MEMORY.mdin the entry format, after the curation pass deduped/superseded/pruned. - No secrets, credentials, tokens, or PII were written.
- Only the memory file was modified — no production code, tests,
CLAUDE.md, or.cursor/rules/project.mdc. - The report lists the slugs added/edited/pruned, or states
no entry: nothing cleared the promotion bar.
Output Humanization
- Use blader/humanizer for all skill outputs to keep the text natural and human-friendly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

