contrib-consolidate
Internal phase — consolidate a contributor's L1 atoms into an L3 persona (11 dimensions). Invoked by contrib-profile / `/contrib build`.
Consolidate L1 memory atoms into L2 scene blocks and L3 persona. Invoked by the memory-consolidator agent, or manually via /memory-consolidate.
$ npx -y skills add baodq97/tencentdb-agent-memory --skill memory-consolidate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/memory-consolidateContext preview
The summary Claude sees to decide when to auto-load this skill.
Consolidate L1 memory atoms into L2 scene blocks and L3 persona. Invoked by the memory-consolidator agent, or manually via /memory-consolidate.
name: memory-consolidate description: Consolidate L1 memory atoms into L2 scene blocks and L3 persona. Invoked by the memory-consolidator agent, or manually via /memory-consolidate.
Analyze L1 atoms and produce L2 scene blocks + L3 persona. You perform all reasoning — no external LLM needed.
Consolidation is a **distillation of the memory store's own atoms** — NOT a code audit. Work ONLY from what `tmem consolidate-context` returns (atoms, scenes, persona, changelog). Do **NOT** `grep`, `find`, `cat`, `ls`, `sed`, read repo source/docs, or otherwise explore the filesystem — measured, that "spelunking" is the single largest cost driver of a consolidation run and adds no quality. If the atoms are thin, write less; never go looking in the repo to pad a scene.
tmem consolidate-context # status + scenes + atoms DELTA + persona + doctrine + changelog, as JSON
This single call replaces the old status / scenes-list / atoms / persona reads. Parse the JSON once:
here.** Do not read, fold or write anything; there is no partial work to do and two folds of one store overwrite each other's merges. Report the message and finish.
to run memory-seed first and stop.
matches, so the scene updates in place instead of duplicating.
per-project watermark), so the pool you reason over stays bounded no matter how large the store grows. Cold start (no watermark) returns the full pool, correct for the first run. This call also CUTS the window this run may fold: whatever another session captures while you work is deliberately left for the next run, and step 5 credits exactly the window you were handed here — never "everything in the store as of when you finished".
to MERGE into (step 4) — you do not re-read them separately.
(To force a full re-read of atoms instead of the delta, use `tmem atoms project` with no flag or `--since <iso-timestamp>`.)
Do not consolidate atoms blindly — the measured store was ~40% junk/duplicate and 16% of mined "fixes" were themselves errors. First remove exact duplicates with the hard script:
tmem dedup --atoms --dry-run # then --apply if the plan looks right
Then, for the remaining atoms, decide per atom against the existing pool (search candidates with `tmem search "<key phrase>"`):
the correction in, keep the union of timestamps, do NOT inflate priority.
non-redundant atom.
Drop a mined error→fix atom whose fix ITSELF errored later in the transcript (flailing) — a wrong fix enshrined as a rule is worse than none. Cross-type merges are allowed (an episodic + a persona describing the same fact → one atom of the better type).
Group project-scoped atoms by topic into narrative scenes.
**Important:** If a scene with the same topic already exists (from the `scenes` list in step 1), reuse that exact name so the file gets updated instead of duplicated.
Write ALL scenes in ONE call — pass a JSON array on stdin (this is one tool-call instead of one per scene):
cat <<'SCENES_EOF' | tmem write-scenes
[
{ "name": "Scene Name", "summary": "One-line summary, max 80 chars", "heat": 3,
"body": "## Key Facts\n- Fact 1\n- Fact 2\n\n## Decisions\n- What was decided and why" },
{ "name": "Another Scene", "summary": "…", "heat": 5, "body": "## Key Facts\n- …" }
]
SCENES_EOFA reused `name` overwrites in place (no duplicate). `body` defaults to `summary` if omitted. (For a one-off single scene you may still use `tmem write-scene --name … --summary … --heat … < body`, but prefer the batch.)
**Guidelines:**
**How scene-body FACTS are delivered** (the body is a per-turn recall surface now, not just an on-demand read):
Each `- ` bullet under `## Key Facts` and `## Decisions` is indexed and, every turn, ranked against the user's prompt and injected — the top few — into a `<recalled-facts>` block (own budget, ~700 chars, project scenes first). This is the PRIMARY per-turn memory: raw L1 episodic atoms are no longer recalled (they were measured to echo the current turn, 1/10 helpful), so a fact reaches a future agent ONLY if it is a scene-body bullet here. Measured: distilling facts into this block lifted real-query helpfulness from 1/10 to 5/10.
So write each bullet as a **self-contained answering fact that carries the outcome**, not a topic label:
launcher bug" is useless out of context; "tmem.js resolved the plugin-cache cli.js before its own sibling, so `npx @baodq97/tmem` ran stale code — fixed by making the sibling authoritative (v0.7.3)" answers the question by
Four-layer long-term memory (L0 Conversation → L1 Atom → L2 Scene → L3 Persona) for Claude Code, inspired by Tencent/TencentDB-Agent-Memory. Fully local — no external Gateway, no paid API, no Python.
Repo: baodq97/tencentdb-agent-memory
Internal phase — consolidate a contributor's L1 atoms into an L3 persona (11 dimensions). Invoked by contrib-profile / `/contrib build`.
Internal phase — extract L1 contributor atoms from a GitHub subject's raw activity. Invoked by contrib-profile / `/contrib ingest`.
Orchestrator for Contributor Intelligence. Trigger when the user pastes a GitHub profile/repo URL or handle and asks to profile, analyze, learn from, or study…
Internal phase — synthesize learnable playbooks, cross-engineer common capabilities, and you-vs-role-model comparisons from built personas. Invoked by…
Extract L1 memory atoms from Claude Code conversation history. Run manually via /memory-seed.
Open the memory visualiser in the browser — a health check on the memory store: is it working, what is wrong, and what to run to fix it. Run manually via…