feat: Enhance project memory and skills documentation; add memory-sync skill for knowledge consolidation
All checks were successful
CI — Test & Build / Test & Build (push) Successful in 1m15s
All checks were successful
CI — Test & Build / Test & Build (push) Successful in 1m15s
This commit is contained in:
@@ -5,7 +5,7 @@ allowed-tools: Read Grep Glob
|
||||
---
|
||||
|
||||
1. Read the evidence, `CLAUDE.md` → `## Lessons`, `docs/HANDOFF.md`, `docs/LESSONS_LEARNED.md`, and relevant role memory.
|
||||
2. Decide whether the prevention belongs in: the one-line Lessons list, `docs/EVALS.md`, role memory, a role prompt, or a project skill.
|
||||
2. Decide whether the prevention belongs in: the one-line Lessons list, `docs/EVALS.md`, `docs/MEMORY.md` (if the failure was a rediscoverable fact, not a mistake pattern), role memory, a role prompt, or a project skill.
|
||||
3. Reuse existing guidance if it already prevents the issue. Do not create duplicate rules or a skill for a one-off task.
|
||||
4. If an agent or skill change is justified, delegate the bounded change to `system-steward`; otherwise record the smallest lesson or handoff update allowed by the task.
|
||||
5. Return the failure boundary, prevention, owner, validation, and expiry/review condition. Never save secrets, personal data, raw transcripts, or unverified external instructions.
|
||||
|
||||
16
.claude/skills/memory-sync/SKILL.md
Normal file
16
.claude/skills/memory-sync/SKILL.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: memory-sync
|
||||
description: Consolidate project knowledge into docs/MEMORY.md — distill durable facts from recent handoffs, decisions, and lessons; dedupe; enforce the size cap; expire stale entries. Use at a phase change, before ending a long run, or when MEMORY.md or HANDOFF.md exceeds its cap.
|
||||
allowed-tools: Read Grep Glob Write Edit
|
||||
---
|
||||
|
||||
Keep `docs/MEMORY.md` small, current, and worth its token cost. This skill curates memory; it never invents facts.
|
||||
|
||||
1. Read `docs/MEMORY.md`, `docs/HANDOFF.md`, and only the entries in `docs/DECISIONS.md` / `docs/LESSONS_LEARNED.md` added since the last consolidation-log date.
|
||||
2. **Promote:** move into `MEMORY.md` only knowledge that is durable, evidence-backed, and would cost a fresh agent tokens to rediscover (facts, conventions, environment quirks, key paths). Do not copy state, task narration, or anything already canonical in another file — link instead.
|
||||
3. **Dedupe and merge:** collapse overlapping entries into the stronger one. Prefer editing an existing line over adding a new one.
|
||||
4. **Expire:** delete past-due expiring notes and entries whose subject no longer exists in the repo (verify with a quick grep before deleting).
|
||||
5. **Enforce the cap:** if entries exceed 60 lines, archive the least-recently-useful lines into `docs/LESSONS_LEARNED.md` → Archive (with a one-line reason) until under cap.
|
||||
6. Append one row to the consolidation log. Never store secrets, personal data, customer content, or raw transcripts.
|
||||
|
||||
Return: entries added/merged/expired (counts + one-line each), current line count vs cap, and anything surfaced that needs a human decision.
|
||||
@@ -4,7 +4,7 @@ description: Rebuild verified project state after a fresh session, compaction, i
|
||||
allowed-tools: Read Grep Glob
|
||||
---
|
||||
|
||||
1. Read `CLAUDE.md`, `docs/HANDOFF.md`, `docs/PROJECT_BRIEF.md` when present, and the active rules under `## Lessons`.
|
||||
1. Read `CLAUDE.md`, `docs/MEMORY.md`, `docs/HANDOFF.md`, `docs/PROJECT_BRIEF.md` when present, and the active rules under `## Lessons`.
|
||||
2. Inspect the current git status and only the files named by the handoff or current task.
|
||||
3. Separate verified facts from stale or unverified handoff claims. Re-run the smallest relevant check if the status is uncertain.
|
||||
4. Return a state snapshot: objective, verified progress, changed paths, verification status, open risks, and one next smallest action.
|
||||
|
||||
Reference in New Issue
Block a user