record-project-memory
/record-project-memory
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.
- Author
- pekral ↗
- Repository
- cursor-rules ↗
- Licence
- MIT
- Last repository change
- 03.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 03.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
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.
Original author description
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.
How it works
- Constraints
- Use when
- Inputs
- Required approach
- Done when
- Output Humanization
SKILL.md preview
--- name: record-project-memory description: "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." license: MIT metadata: author: "Petr Král (pekral.cz)" --- ## Constraints - Apply `@rules/compound-engineering/general.mdc` *Compound 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.md` in 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-issue` or `@skills/process-code-review` run 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's `Source:` field. - `AGENT_ROLE` — optional. The role writing this entry: `orchestration`, `analysis`, `implementation`, `review`, or `shared`. When omitted, defaults to `shared`. Written as the `Role:` 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.md` in 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 to `CLAUDE.md` or `.cursor/rules/project.mdc` themselves. ### 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: 1. **Recurs beyond this task** — it generalizes to future work, not a one-off detail of this issue. 2. **Cost real effort to discover** — non-obvious, surprising, or learned after a wrong turn. 3. **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 both `implementation` and `shared` carry the same lesson, keep the `shared` one and remove the role-specific one. Never widen a role-specific entry to `shared` unless 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.md` in 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](https://github.com/blader/humanizer) for all skill outputs to keep the text natural and human-friendly.
Versions
The database has no other skills named record-project-memory.
Database snapshot: 13.11.2026 · package version 1374f0fd6332 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90agent-memory
Recall durable project decisions, capture explicitly authorized lessons, and review memory history or corrections using the bundled local memory server. Use when continuity across sessions matters; skip standalone tasks that need no prior context. - 98learner
Turns real agent failures, repeated prompts, team-specific workflows, and durable project lessons into better SDD skills or memory entries. Use when the user asks to create/update/refine skills, extract reusable lessons, improve skill routing, encode team process, or save… - 90sugar-memory
Use Sugar's local persistent memory in Hermes. Activate at the start of non-trivial work to recall prior decisions, error patterns and guidelines, before making a decision past sessions may already have settled, and after finishing work when something durable was learned. Do NOT… - 100memory
In T3 Code only, run one incremental pass of a project's long-term memory: read the project's threads, record and publish sourced notes, and maintain its knowledge pages. Use in the configured memory thread, when its schedule fires or the user asks for a pass. - 100rc-memory
Project memory under .rc/memory/ — facts, lessons, golden paths. Use before working and after a correction. Do not use to edit source. - 100lessons
Capture and curate durable lessons in `.agent/lessons/` — one file per lesson, indexed in its README, surfaced by tier (enforced hook / routed doc / indexed). Use whenever the user corrects a repeatable mistake ('don't do that anymore', 'I already told you', 'remember this'),…