一键导入
memory-curate
Audit and curate the memory system -- identify signal vs noise, score entries, and archive low-quality learnings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit and curate the memory system -- identify signal vs noise, score entries, and archive low-quality learnings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
The Code reporting discipline AND the reporting-system operations command. Discipline half — the "one spine" rule (every reportable unit of work lands one Weekly Work Tracker row, Source-tagged), field mapping, Bridge auto-mirror tie-in. Operations half (proposal 07) — /reporting status (registry tail, trust metrics, drift, next scheduled runs, log locations), /reporting run <pipeline>, /reporting heal. Use when finishing reportable work, when asked "how should I report this" / "log this for the report", at session end to capture unreported work, or for pipeline ops — "/reporting", "reporting status", "is reporting healthy", "run the health check", "why is a report row missing/stale".
Generate the weekly FourthOS sponsor update package for Carly (VP) and Christian (CTO). Pulls live portfolio data from the FourthOS Notion cockpit, refreshes the Notion Update Package page, renders a progressive-disclosure HTML artifact set (Tier 1 briefing dashboard, Tier 2 teaching deep-dive), stages it UNLISTED to the ai-enablement-decks GitHub Pages site, and notifies Dave to review before promoting it live. Use when asked to generate, build, preview, or promote the FourthOS weekly sponsor update, or when the CCv3-FourthOS-Weekly scheduled task runs. Triggers on "fourthos weekly", "sponsor update", "Carly update", "Christian update", "weekly portfolio update".
Run a feature through the full tri-model Game Plan pipeline — rostered roles (Claude hub, Grok builder/researcher, Codex reviewer/fixer), a workroom disk bus, and human gates. Use when the user types /game-plan [feature], says "run the game plan on X", "full crew on this", "roster this feature", or wants a multi-milestone feature built with cross-model build/review separation. Opt-in orchestrator on top of /workroom; for one-shot tasks use /grok or /codex directly, for trivial edits use neither.
Detect drift between the continuous-claude repo and the active ~/.claude/ directory
Initialize Continuous Claude v3 for a new project with full toolset activation. Creates project CLAUDE.md (interview-driven, 8 sections), ROADMAP.md, knowledge tree, Serena code intelligence, and project registry entry. Use when opening a new project folder for the first time, starting a new project, setting up CCv3 in an existing repo, or the user says "init project", "setup project", "new project", "initialize", "start new project".
Query and manage the centralized project registry for port assignments, stack info, dev commands, and project status
| name | memory-curate |
| description | Audit and curate the memory system -- identify signal vs noise, score entries, and archive low-quality learnings. |
| allowed-tools | ["Bash","Read"] |
Audit and curate the persistent memory system (PostgreSQL archival_memory table). Most auto-extracted entries are noise. This skill identifies signal vs noise and helps clean up.
References:
references/scoring-rubric.mdActivate this skill when the user says any of:
/memory-curate # Dry-run audit (default, report only)
/memory-curate --archive # Archive noise entries (requires confirmation)
/memory-curate --restore # Restore previously archived entries
archival_memory_archived, never hard-deletedRun the following to fetch all memory entries:
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"SELECT id, session_id,
COALESCE(metadata->>'learning_type', metadata->>'type') AS learning_type,
content,
metadata->'tags' AS tags,
metadata->>'confidence' AS confidence,
created_at
FROM archival_memory
WHERE valid_until IS NULL -- only live (non-superseded) entries
ORDER BY created_at DESC;"
Schema note (verified 2026-07-16):
archival_memoryhas NO top-levellearning_type/tags/confidence/contextcolumns — they live inside themetadatajsonb (metadata->>'learning_type'ormetadata->>'type',metadata->'tags',metadata->>'confidence'). The archive tablearchival_memory_archivedlikewise has onlyid, session_id, agent_id, content, metadata, embedding, created_at, project_id, scope, archived_at, archive_reason.
If the table has many entries, paginate with LIMIT/OFFSET:
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"SELECT COUNT(*) FROM archival_memory;"
Apply the scoring rubric from references/scoring-rubric.md to each entry:
| Points | Criterion | Signal (metadata-aware) |
|---|---|---|
| +3 | Manual store | metadata->'tags' does NOT contain periodic/extraction AND metadata->>'type' is a manual type (WORKING_SOLUTION, ERROR_FIX, ARCHITECTURAL_DECISION, USER_PREFERENCE, CODEBASE_PATTERN, FAILED_APPROACH). NOTE: the old session_id LIKE '%auto-%' heuristic is DEAD — 0/707 session_ids match it. |
| +2 | Unique content > 100 chars with specific file paths or error messages | length(content) > 100 |
| +1 | High confidence | metadata->>'confidence' = 'high' |
| +1 | Contains actionable fix (error message paired with solution) | — |
| -2 | Periodic extraction noise | metadata->'tags' ?& array['periodic','extraction'] |
| -1 | Content is heartbeat/checkpoint | content ILIKE 'Mid-session checkpoint at%' / 'Session checkpoint at%' / 'Periodic extraction%' |
| -1 | Near-duplicate of another entry (identical/similar content, same topic) | e.g. the 27 identical 'Goal: Ralph orchestration for story unknown' placeholders (curated 2026-07-16) |
| -1 | Generic statement with no specific details | — |
| Score | Class | Meaning |
|---|---|---|
| >= 3 | KEEP | High-quality signal -- retain |
| 1-2 | REVIEW | Ambiguous -- present to user for decision |
| <= 0 | ARCHIVE | Noise -- recommend removal |
Format the curation report as follows:
Memory Curation Report
======================
Total entries: N
KEEP: X (signal)
REVIEW: Y (needs decision)
ARCHIVE: Z (noise)
Top 10 Highest Quality:
1. [ID] [type] score=S "first 80 chars of content..."
2. ...
Archive Candidates (bottom 10):
1. [ID] [type] score=S "first 80 chars of content..."
2. ...
REVIEW entries (need your decision):
1. [ID] [type] score=S "first 80 chars of content..."
Reason: <why it's ambiguous>
Stop here in dry-run mode (default). Ask the user what they want to do:
REQUIRED: User must explicitly say "archive" or "confirm" before proceeding.
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"CREATE TABLE IF NOT EXISTS archival_memory_archived (
LIKE archival_memory INCLUDING ALL,
archived_at TIMESTAMP DEFAULT NOW(),
archive_reason TEXT
);"
Show exactly what will be archived -- list all entries by ID with content preview.
Archive entries (copy then delete):
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"INSERT INTO archival_memory_archived (id, session_id, agent_id, content, metadata, embedding, created_at, project_id, scope, archive_reason)
SELECT id, session_id, agent_id, content, metadata, embedding, created_at, project_id, scope, 'memory-curate: score <= 0'
FROM archival_memory
WHERE id IN (<comma-separated IDs>)
ON CONFLICT (id) DO NOTHING;"
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"DELETE FROM archival_memory WHERE id IN (<comma-separated IDs>);"
To restore previously archived entries:
# List archived entries
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"SELECT id, COALESCE(metadata->>'learning_type', metadata->>'type') AS learning_type, content, archived_at, archive_reason FROM archival_memory_archived ORDER BY archived_at DESC;"
# Restore specific entries
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c \
"INSERT INTO archival_memory (id, session_id, agent_id, content, metadata, embedding, created_at, project_id, scope)
SELECT id, session_id, agent_id, content, metadata, embedding, created_at, project_id, scope
FROM archival_memory_archived
WHERE id IN (<comma-separated IDs>)
ON CONFLICT (id) DO NOTHING;
DELETE FROM archival_memory_archived WHERE id IN (<comma-separated IDs>);"
All database operations use the standard connection:
docker exec continuous-claude-postgres psql -U claude -d continuous_claude -c "SQL"
Credentials: postgresql://claude:claude_dev@localhost:5432/continuous_claude
Write the curation report to:
$CLAUDE_PROJECT_DIR/.claudedocs/memory-curation-report.md
Include: date, total entries, KEEP/REVIEW/ARCHIVE counts, top entries, archive candidates, and any actions taken.