[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AQ3GBYGR00HMP6F0W5WKFE":3,"skill-same:01M7AQ3GBYGR00HMP6F0W5WKFE":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7AQ3GBYGR00HMP6F0W5WKFE","vivi-memory-management",null,"Load at Vivi session start, session end, or when you notice a repeating pattern across tasks. CRYSTALIUM-primary memory protocol: when mcp__crystalium__* tools are available, route ALL memory through CRYSTALIUM (recall\u002Fcommit\u002Fingest\u002Fplan_checkpoint\u002Fsession_end). The local agents\u002Fmemories\u002F*.md files are the standalone fallback for when CRYSTALIUM is absent — EIIS conformance. Never write both.","Rynaro\u002Fmagicite","Rynaro","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5271543?v=4","01M70CFYFMB316W23THVQAQ42M","Henrique A. Lavezzo","01M7APN2KCVWBNY727T57KR2ZJ",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmemory-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vivi-memory-management\ndescription: \"Load at Vivi session start, session end, or when you notice a repeating pattern across tasks. CRYSTALIUM-primary memory protocol: when mcp__crystalium__* tools are available, route ALL memory through CRYSTALIUM (recall\u002Fcommit\u002Fingest\u002Fplan_checkpoint\u002Fsession_end). The local agents\u002Fmemories\u002F*.md files are the standalone fallback for when CRYSTALIUM is absent — EIIS conformance. Never write both.\"\nmetadata:\n  methodology: Vivi\n---\n\n# Memory Management Skill\n\n**Primary rule:** If `mcp__crystalium__*` tools are available, route all memory\nthrough CRYSTALIUM. The local `agents\u002Fmemories\u002F*.md` files are the standalone\nfallback for when CRYSTALIUM is absent (EIIS conformance — Vivi works\nuninstalled). **Never write to both in the same session.**\n\nSee `methodology\u002Fcortex\u002Fmemory-protocol.md` (nexus) for the full\nlayer × tier matrix, Dream consolidation knobs, and `plan_checkpoint`\u002F\n`plan_replan` semantics.\n\n---\n\n## Routing Decision (run once at session start)\n\n```\nIF mcp__crystalium__recall is callable\n  → CRYSTALIUM path (§ CRYSTALIUM Protocol below)\nELSE\n  → Local-file path (§ Standalone Fallback below)\n```\n\n---\n\n## CRYSTALIUM Protocol (when installed)\n\n**Trust tier:** T1 (set process-wide via `CRYSTALIUM_CALLER_TIER=T1`).\n`author_agent` MUST be `\"vivi\"` on every direct `commit` call.\n\n### Session Start — Memory Recall (A-ANALYZE Step 1)\n\n```\nmcp__crystalium__recall(\n  scope  = { project: \u003Ccwd-project>, agent_class_visibility: \"vivi\" },\n  query  = \u003Ctask goal + domain + module area>,\n  k      = 8,\n  layers = [\"semantic\", \"episodic\", \"procedural\"]\n)\n```\n\n- `episodic` — past task outcomes in the same domain\n- `semantic` — known failure root causes, architectural decisions, conventions\n- `procedural` — verified reusable skills for this task type\n\nFold relevant hits into mission context (≤ 1-2K tokens summarized).\n\n### Per-Iteration Failure-Signature Recall (V-VERIFY, inside --fix-hook)\n\n**ADAPTER-NOT-ENGINE: the CODER (Vivi) issues this call; sandbox.sh never does.**\n\nBefore making any edit in a `--fix-hook` invocation, derive the failure-signature from\n`$EIDOLONS_SANDBOX_FEEDBACK` and query procedural\u002Fsemantic memory for prior fixes:\n\n```\nfeedback = parse_json($EIDOLONS_SANDBOX_FEEDBACK)\n\n# Build the failure signature (keyed by stable, localized fields — not the full log)\nfailure_sig = {\n  loci:      feedback.loci,        # file:line array — normalized by the substrate\n  test_name: feedback.test_name,   # failing test identifiers\n  failing:   feedback.failing      # failure category\u002Flabel\n}\n\nmcp__crystalium__recall(\n  scope  = { project: \u003Ccwd-project>, agent_class_visibility: \"vivi\" },\n  query  = failure_sig,            # keyed by the localized failure signal\n  k      = 4,\n  layers = [\"procedural\", \"semantic\"]   # LEAD with procedural + semantic; NOT raw episodic\n)\n```\n\n**HARD precision-gate (CTIM-Rover counter-evidence).** Raw episodic memory (prior\nattempt transcripts, exact stack traces, full diffs) DEGRADES SE-agent performance —\nit re-introduces self-conditioning through the back door. This recall is PRECISION-GATED:\n\n- Lead with `layer=procedural` (verified fix-PATTERNS: \"for this class of failure at\n  these file:line targets, the pattern is...\") and `layer=semantic` (root-cause knowledge:\n  \"this framework version has this class of bug\").\n- Do NOT retrieve raw `episodic` trajectories here. If `layers=[\"episodic\"]`-only results\n  are returned, IGNORE them. They are indexed by task outcome, not by failure signature,\n  and applying a prior attempt's full trajectory is exactly the self-conditioning the\n  fresh-context discipline prohibits.\n- A low-confidence recall (score below threshold, or no relevant hit) is IGNORED, not\n  blindly applied. A bad procedural hit is worse than no hit — it steers the repair\n  toward a known-wrong path.\n- If the recall surfaces a procedural entry that matches the failure signature (high\n  confidence), use it to short-circuit re-derivation of the fix strategy. Document that\n  you are reusing a stored pattern (auditability).\n\nCross-Eidolon composability: VIGIL persists failure-signatures (from its root-cause-report\nhand-offs) into CRYSTALIUM with matching `loci`\u002F`test_name`\u002F`failing` keys. When a Vivi\nfailure signature matches a VIGIL-authored entry, the recall surfaces it — enabling\ncross-Eidolon pattern reuse without any direct inter-Eidolon call.\n\n**Graceful skip:** if `mcp__crystalium__recall` is unavailable or the call fails,\nproceed to the edit step without delay. Never block the fix-hook on a memory miss.\n\n### Plan Phase — Checkpoint + Replan\n\nAfter the Execution Plan is produced (P-PLAN phase output):\n\n```\nmcp__crystalium__plan_checkpoint(\n  plan_id  = \u003Ctask-slug + date, e.g. \"add-widget-search-2026-06-01\">,\n  state    = \u003Cfull execution plan snapshot including scope, strategy, steps>,\n  step     = \"initial\",\n  metadata = { author_agent: \"vivi\", task_title: \u003Ctitle> }\n)\n```\n\nReturns a `checkpoint_id`. Store it in the working execution plan context.\n\nIf the plan is revised mid-cycle (methodology abort rules — \"stop and return to\nPlan\" — fire at I-IMPLEMENT or V-VERIFY):\n\n```\nmcp__crystalium__plan_replan(\n  plan_id            = \u003Csame plan_id>,\n  from_checkpoint_id = \u003Ccheckpoint_id>,\n  new_plan           = { diff: \u003Cwhat changed and why>, supersedes_id: \u003Ccheckpoint_id> }\n)\n```\n\nThis records the branch decision before the revised plan is executed, keeping\nthe execution history auditable.\n\n### Implement Phase — Skill Reuse + Procedural Commit\n\n**Before building:** if recall surfaced a procedural entry (verified skill) for\nthis task type, invoke it:\n\n```\nmcp__crystalium__skill_invoke(\n  skill_id = \u003Cprocedural entry id from recall>,\n  context  = \u003Ccurrent task context>\n)\n```\n\nUse the `result` to short-circuit re-derivation. Do NOT auto-promote the\n`skill_invoke` result — commit a summary if it proves valuable (see Reflect below).\n\n**After verifying a new reusable pattern:** if a skill-class discovery is made\nand passes Verify:\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",\n  payload = \u003Cverified skill description: what, where, how to use>,\n  provenance = { author_agent: \"vivi\", quality: \"verified\" }\n)\n```\n\nUnverified patterns → `layer = \"semantic\"` with a `quality: candidate` tag.\n\n### Mandatory Post-pass^k Commit (V-VERIFY, on loop success)\n\n**ADAPTER-NOT-ENGINE: the CODER (Vivi) issues this call; sandbox.sh never does.**\n\nWhen the sandbox loop exits with `final=\"passed\"` (confirmed pass^k-green — NOT just\na single green run), Vivi **MUST** commit the verified fix-pattern to procedural memory.\nThis is MANDATORY, not discretionary. A pass^k-green is an extremely high-quality\nsignal — the fix is reproducible. Discarding it wastes the most reliable learning\nopportunity in the loop.\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",\n  payload = {\n    pattern_name:      \u003Cbrief description of the fix, e.g. \"nil-guard before X.call in foo.go:42\">,\n    failure_signature: {\n      loci:      \u003Cthe loci array from feedback.json that triggered this fix>,\n      test_name: \u003Cthe failing test names>,\n      failing:   \u003Cthe failure category>\n    },\n    fix_diff:          \u003Cthe minimal diff that resolved the failure>,\n    anchoring_tests:   \u003Cthe test name(s) that confirmed pass^k>,\n    domain:            \u003Cmodule\u002Farea>,\n    quality:           \"verified\",\n    pass_k:            \u003Ck value used, e.g. 2>\n  },\n  provenance = { author_agent: \"vivi\", quality: \"verified\" }\n)\n```\n\nThe `failure_signature` field is the admission record: it makes this entry retrievable\nby the Per-Iteration Failure-Signature Recall (above) the next time the same class of\nfailure appears — in this session or a future one, by Vivi or by VIGIL.\n\n**If the commit call fails:** log the failure to stderr and continue — never block the\nsuccess path on a memory write. The fix is already applied; the commit is a durability\nenhancement, not a gate.\n\n### Verify Phase — Ingest Completion Report (V-VERIFY \u002F I-exit)\n\nAfter the `vivi-completion-report.envelope.json` ECL envelope is produced and\nthe payload is verified:\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cvivi-completion-report.envelope.json contents>,\n  payload  = \u003Ccompletion report contents>\n)\n```\n\nThis records the handoff at T1 with full ECL provenance (`from.eidolon=vivi`\ndrives tier derivation; `integrity.value` stored as `provenance.content_hash`).\n\n### Reflect \u002F Delta Phase — Episodic + Semantic Commits + Session End\n\nAfter the task completes (Δ-DELTA success path) or exhausts retries (R-REFLECT\nescalation path):\n\n**Task outcome:**\n```\nmcp__crystalium__commit(\n  layer   = \"episodic\",\n  payload = {\n    task_title:    \u003Ctitle>,\n    domain:        \u003Cmodule\u002Farea>,\n    outcome:       \"SUCCESS\" | \"PARTIAL\" | \"FAILED\" | \"ESCALATED\",\n    summary:       \u003Cone sentence>,\n    key_decisions: \u003Cwhat was chosen and why>,\n    lesson:        \u003Cone takeaway>\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**If failures occurred (root cause):**\n```\nmcp__crystalium__commit(\n  layer   = \"semantic\",\n  payload = {\n    failure_category: \u003Ctaxonomy category>,\n    context:          \u003Cwhat was being done>,\n    root_cause:       \u003Cwhat went wrong>,\n    prevention:       \u003Chow to avoid in future>,\n    domain:           \u003Carea\u002Fmodule>\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**If new patterns discovered:**\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",  # or \"semantic\" if unverified\n  payload = {\n    pattern_name: \u003Cname>,\n    location:     \u003Cfile:line or directory>,\n    type:         \u003CModel | Service | Component | Utility | Convention | Architecture>,\n    purpose:      \u003Cwhat it does>,\n    usage_hint:   \u003Cone line>,\n    quality:      \"verified\" | \"candidate\"\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**Session end (once per task completion):**\n```\nmcp__crystalium__session_end()\n```\n\nThis triggers Dream consolidation asynchronously. Dream handles dedup,\npromotion, and stale-removal automatically — do NOT hand-consolidate when\nCRYSTALIUM is present.\n\n**Graceful skip:** if any `mcp__crystalium__*` call fails or the tool is\nunavailable, fall through to the Standalone Fallback path silently. Never\nhard-fail.\n\n---\n\n## CRYSTALIUM call → local-file mapping\n\n| Vivi local protocol | CRYSTALIUM call (when installed) |\n|---|---|\n| Session-Start: read task-log\u002Ffailure-catalog\u002Fpattern-registry\u002Fsession-handoff | `recall(scope, query, k, layers=[semantic, episodic, procedural])` |\n| Session-End: update task-log.md (outcome) | `commit(layer=episodic, provenance={author_agent:\"vivi\"})` |\n| Session-End: update failure-catalog.md (root cause\u002Fprevention) | `commit(layer=semantic, provenance={author_agent:\"vivi\"})` |\n| Session-End: update pattern-registry.md (reusable asset\u002Fpattern) | `commit(layer=procedural, ...)` (verified) or `layer=semantic` (candidate) |\n| Write session-handoff.md | `plan_checkpoint(state=\u003Cplan snapshot incl. scope>)` |\n| Revise plan mid-cycle | `plan_replan(diff={...,supersedes_id})` |\n| Manual Memory Consolidation | **Dream consolidation — automatic via `session_end`**; do NOT hand-consolidate when CRYSTALIUM present |\n| Memory Query Patterns | `recall` with appropriate `query`\u002F`layers` |\n\n---\n\n## Standalone Fallback (when CRYSTALIUM absent)\n\nUse when `mcp__crystalium__*` tools are unavailable. The local Reflexion\nprotocol is fully independent — Vivi is EIIS-standalone-conformant.\n\n### Memory Architecture\n\n```\nagents\u002Fmemories\u002F\n├── task-log.md          # Completed tasks with outcomes (≤ 30 entries)\n├── pattern-registry.md  # Discovered assets and architectural patterns\n├── failure-catalog.md   # Root causes and prevention strategies (≤ 30 entries)\n├── delta-history.md     # Normalization suggestions with status\n└── session-handoff.md   # Checkpoint for session boundaries\n```\n\n### Session Start Protocol\n\n```\n1. Read task-log.md — scan last 5-10 entries for:\n   - Work in the same domain as current task\n   - Open items or follow-ups from previous tasks\n   - Recent patterns that might apply\n\n2. Read failure-catalog.md — scan for:\n   - Failures in the same domain or file area\n   - Prevention strategies relevant to current task type\n   - Known gotchas in the technology stack\n\n3. Read session-handoff.md — if exists:\n   - Resume from last checkpoint\n   - Verify assumptions are still valid\n   - Check if codebase has changed since handoff\n\n4. Read pattern-registry.md — scan for:\n   - Known reusable assets in the target domain\n   - Architectural decisions and their rationale\n   - Team conventions discovered in past sessions\n```\n\n**Budget**: Memory recall should take ≤ 1-2K tokens of context.\n\n### Session End Protocol\n\n#### Update Task Log\n\nAdd entry to `agents\u002Fmemories\u002Ftask-log.md`:\n\n```markdown\n### [DATE] — [Task Title]\n- **Domain**: [module\u002Farea]\n- **Outcome**: SUCCESS | PARTIAL | FAILED | ESCALATED\n- **Summary**: [one sentence]\n- **Key decisions**: [what was chosen and why]\n- **Assets**: [discovered or created]\n- **Lesson**: [one takeaway for future tasks]\n```\n\n#### Update Failure Catalog (if failures occurred)\n\nAdd entry to `agents\u002Fmemories\u002Ffailure-catalog.md`:\n\n```markdown\n### [DATE] — [Failure Category]: [Brief description]\n- **Context**: [what was being done]\n- **Error**: [one-line error summary]\n- **Root cause**: [what actually went wrong]\n- **Fix applied**: [what resolved it]\n- **Prevention**: [how to avoid this in future]\n- **Domain**: [area\u002Fmodule for searchability]\n```\n\n#### Update Pattern Registry (if new patterns discovered)\n\nAdd entry to `agents\u002Fmemories\u002Fpattern-registry.md`:\n\n```markdown\n### [Asset\u002FPattern Name]\n- **Location**: [file:line or directory]\n- **Type**: Model | Service | Component | Utility | Convention | Architecture\n- **Purpose**: [what it does]\n- **Usage example**: [how to use it, one line]\n- **Quality**: Tested | Untested | Deprecated\n- **Discovered**: [date]\n```\n\n#### Write Session Handoff (if work is incomplete)\n\nWrite to `agents\u002Fmemories\u002Fsession-handoff.md`:\n\n```markdown\n## Session Handoff — [DATE]\n\n### Task in Progress\n- **Goal**: [acceptance criteria]\n- **Current phase**: A | P | I | V | R | Δ\n- **Branch**: [git branch name]\n\n### Completed Steps\n1. [step] — done\n\n### Remaining Steps\n2. [step] — next\n3. [step] — blocked on [reason]\n\n### Key State\n- Files modified: [list]\n- Tests: [X passing, Y failing]\n- Open questions: [any ambiguities]\n\n### Context to Re-inject\n- [Critical decision that must be remembered]\n- [Important constraint discovered during work]\n```\n\n### Memory Consolidation (standalone only)\n\nRun consolidation when any memory file exceeds its cap:\n\n| File | Cap | Consolidation Strategy |\n|------|-----|----------------------|\n| task-log.md | 30 entries | Merge old entries by domain into summaries, keep recent 15 as-is |\n| failure-catalog.md | 30 entries | Deduplicate by root cause pattern, archive resolved patterns |\n| pattern-registry.md | No hard cap | Remove entries for deleted\u002Fdeprecated code, merge duplicates |\n| delta-history.md | 20 entries | Remove implemented suggestions, archive rejected ones |\n| session-handoff.md | 1 entry | Overwrite on each session end (always current) |\n\n**Note:** When CRYSTALIUM is present, Dream consolidation handles dedup,\npromotion, and pruning automatically. Do NOT run the manual consolidation\nprotocol above when CRYSTALIUM is installed.\n\n---\n\n## In-Session Task Tracking (both paths)\n\nDuring implementation, maintain a structured task list in working context\nregardless of which memory path is active:\n\n```markdown\n## Active Task: [title]\nPhase: IMPLEMENT (step 3 of 5)\n\n### Progress\n- [x] TASK-1: Discover existing assets — DONE\n- [x] TASK-2: Write test anchors — DONE\n- [ ] TASK-3: Extend WidgetQuery with #search_by_text — IN PROGRESS\n- [ ] TASK-4: Add controller action — PENDING\n- [ ] TASK-5: Run full verification suite — PENDING\n```\n\n**Re-inject this checklist** after every tool use \u002F verification cycle.\n\n---\n\n## Anti-Patterns in Memory\n\n### What NOT to Store\n\n- Exact code snippets (they go stale; store patterns and locations)\n- Speculative conclusions (record only validated patterns)\n- Emotional commentary (record objective quality assessments)\n- Raw error logs (store classified root causes, not full stack traces)\n- Information about deleted or heavily refactored files\n\n### What ALWAYS to Store\n\n- Successful patterns with locations (high reuse value)\n- Failure root causes with prevention strategies (avoid repeating mistakes)\n- Architectural decisions with rationale (institutional knowledge)\n- Asset discovery results (reduces future Analyze phase time)\n- Team conventions not documented elsewhere\n\n---\n\n## ECL_VERSION\n\nWhen restoring a session, query `ECL_VERSION` alongside the Eidolon version.\nDrift > 1 minor relative to the consumer's expected envelope version triggers\na warning surface — see ECL v2.0 §7.2.\n\n---\n\n*Memory Management Skill — CRYSTALIUM-primary, local-file fallback, Dream-aware*\n","# Memory Management Skill\n\n**Primary rule:** If `mcp__crystalium__*` tools are available, route all memory\nthrough CRYSTALIUM. The local `agents\u002Fmemories\u002F*.md` files are the standalone\nfallback for when CRYSTALIUM is absent (EIIS conformance — Vivi works\nuninstalled). **Never write to both in the same session.**\n\nSee `methodology\u002Fcortex\u002Fmemory-protocol.md` (nexus) for the full\nlayer × tier matrix, Dream consolidation knobs, and `plan_checkpoint`\u002F\n`plan_replan` semantics.\n\n---\n\n## Routing Decision (run once at session start)\n\n```\nIF mcp__crystalium__recall is callable\n  → CRYSTALIUM path (§ CRYSTALIUM Protocol below)\nELSE\n  → Local-file path (§ Standalone Fallback below)\n```\n\n---\n\n## CRYSTALIUM Protocol (when installed)\n\n**Trust tier:** T1 (set process-wide via `CRYSTALIUM_CALLER_TIER=T1`).\n`author_agent` MUST be `\"vivi\"` on every direct `commit` call.\n\n### Session Start — Memory Recall (A-ANALYZE Step 1)\n\n```\nmcp__crystalium__recall(\n  scope  = { project: \u003Ccwd-project>, agent_class_visibility: \"vivi\" },\n  query  = \u003Ctask goal + domain + module area>,\n  k      = 8,\n  layers = [\"semantic\", \"episodic\", \"procedural\"]\n)\n```\n\n- `episodic` — past task outcomes in the same domain\n- `semantic` — known failure root causes, architectural decisions, conventions\n- `procedural` — verified reusable skills for this task type\n\nFold relevant hits into mission context (≤ 1-2K tokens summarized).\n\n### Per-Iteration Failure-Signature Recall (V-VERIFY, inside --fix-hook)\n\n**ADAPTER-NOT-ENGINE: the CODER (Vivi) issues this call; sandbox.sh never does.**\n\nBefore making any edit in a `--fix-hook` invocation, derive the failure-signature from\n`$EIDOLONS_SANDBOX_FEEDBACK` and query procedural\u002Fsemantic memory for prior fixes:\n\n```\nfeedback = parse_json($EIDOLONS_SANDBOX_FEEDBACK)\n\n# Build the failure signature (keyed by stable, localized fields — not the full log)\nfailure_sig = {\n  loci:      feedback.loci,        # file:line array — normalized by the substrate\n  test_name: feedback.test_name,   # failing test identifiers\n  failing:   feedback.failing      # failure category\u002Flabel\n}\n\nmcp__crystalium__recall(\n  scope  = { project: \u003Ccwd-project>, agent_class_visibility: \"vivi\" },\n  query  = failure_sig,            # keyed by the localized failure signal\n  k      = 4,\n  layers = [\"procedural\", \"semantic\"]   # LEAD with procedural + semantic; NOT raw episodic\n)\n```\n\n**HARD precision-gate (CTIM-Rover counter-evidence).** Raw episodic memory (prior\nattempt transcripts, exact stack traces, full diffs) DEGRADES SE-agent performance —\nit re-introduces self-conditioning through the back door. This recall is PRECISION-GATED:\n\n- Lead with `layer=procedural` (verified fix-PATTERNS: \"for this class of failure at\n  these file:line targets, the pattern is...\") and `layer=semantic` (root-cause knowledge:\n  \"this framework version has this class of bug\").\n- Do NOT retrieve raw `episodic` trajectories here. If `layers=[\"episodic\"]`-only results\n  are returned, IGNORE them. They are indexed by task outcome, not by failure signature,\n  and applying a prior attempt's full trajectory is exactly the self-conditioning the\n  fresh-context discipline prohibits.\n- A low-confidence recall (score below threshold, or no relevant hit) is IGNORED, not\n  blindly applied. A bad procedural hit is worse than no hit — it steers the repair\n  toward a known-wrong path.\n- If the recall surfaces a procedural entry that matches the failure signature (high\n  confidence), use it to short-circuit re-derivation of the fix strategy. Document that\n  you are reusing a stored pattern (auditability).\n\nCross-Eidolon composability: VIGIL persists failure-signatures (from its root-cause-report\nhand-offs) into CRYSTALIUM with matching `loci`\u002F`test_name`\u002F`failing` keys. When a Vivi\nfailure signature matches a VIGIL-authored entry, the recall surfaces it — enabling\ncross-Eidolon pattern reuse without any direct inter-Eidolon call.\n\n**Graceful skip:** if `mcp__crystalium__recall` is unavailable or the call fails,\nproceed to the edit step without delay. Never block the fix-hook on a memory miss.\n\n### Plan Phase — Checkpoint + Replan\n\nAfter the Execution Plan is produced (P-PLAN phase output):\n\n```\nmcp__crystalium__plan_checkpoint(\n  plan_id  = \u003Ctask-slug + date, e.g. \"add-widget-search-2026-06-01\">,\n  state    = \u003Cfull execution plan snapshot including scope, strategy, steps>,\n  step     = \"initial\",\n  metadata = { author_agent: \"vivi\", task_title: \u003Ctitle> }\n)\n```\n\nReturns a `checkpoint_id`. Store it in the working execution plan context.\n\nIf the plan is revised mid-cycle (methodology abort rules — \"stop and return to\nPlan\" — fire at I-IMPLEMENT or V-VERIFY):\n\n```\nmcp__crystalium__plan_replan(\n  plan_id            = \u003Csame plan_id>,\n  from_checkpoint_id = \u003Ccheckpoint_id>,\n  new_plan           = { diff: \u003Cwhat changed and why>, supersedes_id: \u003Ccheckpoint_id> }\n)\n```\n\nThis records the branch decision before the revised plan is executed, keeping\nthe execution history auditable.\n\n### Implement Phase — Skill Reuse + Procedural Commit\n\n**Before building:** if recall surfaced a procedural entry (verified skill) for\nthis task type, invoke it:\n\n```\nmcp__crystalium__skill_invoke(\n  skill_id = \u003Cprocedural entry id from recall>,\n  context  = \u003Ccurrent task context>\n)\n```\n\nUse the `result` to short-circuit re-derivation. Do NOT auto-promote the\n`skill_invoke` result — commit a summary if it proves valuable (see Reflect below).\n\n**After verifying a new reusable pattern:** if a skill-class discovery is made\nand passes Verify:\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",\n  payload = \u003Cverified skill description: what, where, how to use>,\n  provenance = { author_agent: \"vivi\", quality: \"verified\" }\n)\n```\n\nUnverified patterns → `layer = \"semantic\"` with a `quality: candidate` tag.\n\n### Mandatory Post-pass^k Commit (V-VERIFY, on loop success)\n\n**ADAPTER-NOT-ENGINE: the CODER (Vivi) issues this call; sandbox.sh never does.**\n\nWhen the sandbox loop exits with `final=\"passed\"` (confirmed pass^k-green — NOT just\na single green run), Vivi **MUST** commit the verified fix-pattern to procedural memory.\nThis is MANDATORY, not discretionary. A pass^k-green is an extremely high-quality\nsignal — the fix is reproducible. Discarding it wastes the most reliable learning\nopportunity in the loop.\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",\n  payload = {\n    pattern_name:      \u003Cbrief description of the fix, e.g. \"nil-guard before X.call in foo.go:42\">,\n    failure_signature: {\n      loci:      \u003Cthe loci array from feedback.json that triggered this fix>,\n      test_name: \u003Cthe failing test names>,\n      failing:   \u003Cthe failure category>\n    },\n    fix_diff:          \u003Cthe minimal diff that resolved the failure>,\n    anchoring_tests:   \u003Cthe test name(s) that confirmed pass^k>,\n    domain:            \u003Cmodule\u002Farea>,\n    quality:           \"verified\",\n    pass_k:            \u003Ck value used, e.g. 2>\n  },\n  provenance = { author_agent: \"vivi\", quality: \"verified\" }\n)\n```\n\nThe `failure_signature` field is the admission record: it makes this entry retrievable\nby the Per-Iteration Failure-Signature Recall (above) the next time the same class of\nfailure appears — in this session or a future one, by Vivi or by VIGIL.\n\n**If the commit call fails:** log the failure to stderr and continue — never block the\nsuccess path on a memory write. The fix is already applied; the commit is a durability\nenhancement, not a gate.\n\n### Verify Phase — Ingest Completion Report (V-VERIFY \u002F I-exit)\n\nAfter the `vivi-completion-report.envelope.json` ECL envelope is produced and\nthe payload is verified:\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cvivi-completion-report.envelope.json contents>,\n  payload  = \u003Ccompletion report contents>\n)\n```\n\nThis records the handoff at T1 with full ECL provenance (`from.eidolon=vivi`\ndrives tier derivation; `integrity.value` stored as `provenance.content_hash`).\n\n### Reflect \u002F Delta Phase — Episodic + Semantic Commits + Session End\n\nAfter the task completes (Δ-DELTA success path) or exhausts retries (R-REFLECT\nescalation path):\n\n**Task outcome:**\n```\nmcp__crystalium__commit(\n  layer   = \"episodic\",\n  payload = {\n    task_title:    \u003Ctitle>,\n    domain:        \u003Cmodule\u002Farea>,\n    outcome:       \"SUCCESS\" | \"PARTIAL\" | \"FAILED\" | \"ESCALATED\",\n    summary:       \u003Cone sentence>,\n    key_decisions: \u003Cwhat was chosen and why>,\n    lesson:        \u003Cone takeaway>\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**If failures occurred (root cause):**\n```\nmcp__crystalium__commit(\n  layer   = \"semantic\",\n  payload = {\n    failure_category: \u003Ctaxonomy category>,\n    context:          \u003Cwhat was being done>,\n    root_cause:       \u003Cwhat went wrong>,\n    prevention:       \u003Chow to avoid in future>,\n    domain:           \u003Carea\u002Fmodule>\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**If new patterns discovered:**\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",  # or \"semantic\" if unverified\n  payload = {\n    pattern_name: \u003Cname>,\n    location:     \u003Cfile:line or directory>,\n    type:         \u003CModel | Service | Component | Utility | Convention | Architecture>,\n    purpose:      \u003Cwhat it does>,\n    usage_hint:   \u003Cone line>,\n    quality:      \"verified\" | \"candidate\"\n  },\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**Session end (once per task completion):**\n```\nmcp__crystalium__session_end()\n```\n\nThis triggers Dream consolidation asynchronously. Dream handles dedup,\npromotion, and stale-removal automatically — do NOT hand-consolidate when\nCRYSTALIUM is present.\n\n**Graceful skip:** if any `mcp__crystalium__*` call fails or the tool is\nunavailable, fall through to the Standalone Fallback path silently. Never\nhard-fail.\n\n---\n\n## CRYSTALIUM call → local-file mapping\n\n| Vivi local protocol | CRYSTALIUM call (when installed) |\n|---|---|\n| Session-Start: read task-log\u002Ffailure-catalog\u002Fpattern-registry\u002Fsession-handoff | `recall(scope, query, k, layers=[semantic, episodic, procedural])` |\n| Session-End: update task-log.md (outcome) | `commit(layer=episodic, provenance={author_agent:\"vivi\"})` |\n| Session-End: update failure-catalog.md (root cause\u002Fprevention) | `commit(layer=semantic, provenance={author_agent:\"vivi\"})` |\n| Session-End: update pattern-registry.md (reusable asset\u002Fpattern) | `commit(layer=procedural, ...)` (verified) or `layer=semantic` (candidate) |\n| Write session-handoff.md | `plan_checkpoint(state=\u003Cplan snapshot incl. scope>)` |\n| Revise plan mid-cycle | `plan_replan(diff={...,supersedes_id})` |\n| Manual Memory Consolidation | **Dream consolidation — automatic via `session_end`**; do NOT hand-consolidate when CRYSTALIUM present |\n| Memory Query Patterns | `recall` with appropriate `query`\u002F`layers` |\n\n---\n\n## Standalone Fallback (when CRYSTALIUM absent)\n\nUse when `mcp__crystalium__*` tools are unavailable. The local Reflexion\nprotocol is fully independent — Vivi is EIIS-standalone-conformant.\n\n### Memory Architecture\n\n```\nagents\u002Fmemories\u002F\n├── task-log.md          # Completed tasks with outcomes (≤ 30 entries)\n├── pattern-registry.md  # Discovered assets and architectural patterns\n├── failure-catalog.md   # Root causes and prevention strategies (≤ 30 entries)\n├── delta-history.md     # Normalization suggestions with status\n└── session-handoff.md   # Checkpoint for session boundaries\n```\n\n### Session Start Protocol\n\n```\n1. Read task-log.md — scan last 5-10 entries for:\n   - Work in the same domain as current task\n   - Open items or follow-ups from previous tasks\n   - Recent patterns that might apply\n\n2. Read failure-catalog.md — scan for:\n   - Failures in the same domain or file area\n   - Prevention strategies relevant to current task type\n   - Known gotchas in the technology stack\n\n3. Read session-handoff.md — if exists:\n   - Resume from last checkpoint\n   - Verify assumptions are still valid\n   - Check if codebase has changed since handoff\n\n4. Read pattern-registry.md — scan for:\n   - Known reusable assets in the target domain\n   - Architectural decisions and their rationale\n   - Team conventions discovered in past sessions\n```\n\n**Budget**: Memory recall should take ≤ 1-2K tokens of context.\n\n### Session End Protocol\n\n#### Update Task Log\n\nAdd entry to `agents\u002Fmemories\u002Ftask-log.md`:\n\n```markdown\n### [DATE] — [Task Title]\n- **Domain**: [module\u002Farea]\n- **Outcome**: SUCCESS | PARTIAL | FAILED | ESCALATED\n- **Summary**: [one sentence]\n- **Key decisions**: [what was chosen and why]\n- **Assets**: [discovered or created]\n- **Lesson**: [one takeaway for future tasks]\n```\n\n#### Update Failure Catalog (if failures occurred)\n\nAdd entry to `agents\u002Fmemories\u002Ffailure-catalog.md`:\n\n```markdown\n### [DATE] — [Failure Category]: [Brief description]\n- **Context**: [what was being done]\n- **Error**: [one-line error summary]\n- **Root cause**: [what actually went wrong]\n- **Fix applied**: [what resolved it]\n- **Prevention**: [how to avoid this in future]\n- **Domain**: [area\u002Fmodule for searchability]\n```\n\n#### Update Pattern Registry (if new patterns discovered)\n\nAdd entry to `agents\u002Fmemories\u002Fpattern-registry.md`:\n\n```markdown\n### [Asset\u002FPattern Name]\n- **Location**: [file:line or directory]\n- **Type**: Model | Service | Component | Utility | Convention | Architecture\n- **Purpose**: [what it does]\n- **Usage example**: [how to use it, one line]\n- **Quality**: Tested | Untested | Deprecated\n- **Discovered**: [date]\n```\n\n#### Write Session Handoff (if work is incomplete)\n\nWrite to `agents\u002Fmemories\u002Fsession-handoff.md`:\n\n```markdown\n## Session Handoff — [DATE]\n\n### Task in Progress\n- **Goal**: [acceptance criteria]\n- **Current phase**: A | P | I | V | R | Δ\n- **Branch**: [git branch name]\n\n### Completed Steps\n1. [step] — done\n\n### Remaining Steps\n2. [step] — next\n3. [step] — blocked on [reason]\n\n### Key State\n- Files modified: [list]\n- Tests: [X passing, Y failing]\n- Open questions: [any ambiguities]\n\n### Context to Re-inject\n- [Critical decision that must be remembered]\n- [Important constraint discovered during work]\n```\n\n### Memory Consolidation (standalone only)\n\nRun consolidation when any memory file exceeds its cap:\n\n| File | Cap | Consolidation Strategy |\n|------|-----|----------------------|\n| task-log.md | 30 entries | Merge old entries by domain into summaries, keep recent 15 as-is |\n| failure-catalog.md | 30 entries | Deduplicate by root cause pattern, archive resolved patterns |\n| pattern-registry.md | No hard cap | Remove entries for deleted\u002Fdeprecated code, merge duplicates |\n| delta-history.md | 20 entries | Remove implemented suggestions, archive rejected ones |\n| session-handoff.md | 1 entry | Overwrite on each session end (always current) |\n\n**Note:** When CRYSTALIUM is present, Dream consolidation handles dedup,\npromotion, and pruning automatically. Do NOT run the manual consolidation\nprotocol above when CRYSTALIUM is installed.\n\n---\n\n## In-Session Task Tracking (both paths)\n\nDuring implementation, maintain a structured task list in working context\nregardless of which memory path is active:\n\n```markdown\n## Active Task: [title]\nPhase: IMPLEMENT (step 3 of 5)\n\n### Progress\n- [x] TASK-1: Discover existing assets — DONE\n- [x] TASK-2: Write test anchors — DONE\n- [ ] TASK-3: Extend WidgetQuery with #search_by_text — IN PROGRESS\n- [ ] TASK-4: Add controller action — PENDING\n- [ ] TASK-5: Run full verification suite — PENDING\n```\n\n**Re-inject this checklist** after every tool use \u002F verification cycle.\n\n---\n\n## Anti-Patterns in Memory\n\n### What NOT to Store\n\n- Exact code snippets (they go stale; store patterns and locations)\n- Speculative conclusions (record only validated patterns)\n- Emotional commentary (record objective quality assessments)\n- Raw error logs (store classified root causes, not full stack traces)\n- Information about deleted or heavily refactored files\n\n### What ALWAYS to Store\n\n- Successful patterns with locations (high reuse value)\n- Failure root causes with prevention strategies (avoid repeating mistakes)\n- Architectural decisions with rationale (institutional knowledge)\n- Asset discovery results (reduces future Analyze phase time)\n- Team conventions not documented elsewhere\n\n---\n\n## ECL_VERSION\n\nWhen restoring a session, query `ECL_VERSION` alongside the Eidolon version.\nDrift > 1 minor relative to the consumer's expected envelope version triggers\na warning surface — see ECL v2.0 §7.2.\n\n---\n\n*Memory Management Skill — CRYSTALIUM-primary, local-file fallback, Dream-aware*\n",{"name":5,"metadata":24,"description":7},{"methodology":25},"Vivi","main","38c3a82583abf9806de764f89ac0099ad690933a",".eidolons\u002Fvivi\u002Fskills\u002Fmemory-management",0,"https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite","https:\u002F\u002Fgithub.com\u002FRynaro","https:\u002F\u002Fhlavezzo.me","A Code Alchemist with a passion for weaving tales and inscribing transmutation circles in pure code.","2026-10-14 02:35:37",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Rynaro\u002Fmagicite --skill vivi-memory-management",{"tool":41,"command":42},"bunx","bunx skills add Rynaro\u002Fmagicite --skill vivi-memory-management",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Rynaro\u002Fmagicite --skill vivi-memory-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmemory-management\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7AQ4GHJQVV8TJBJ8T1V7ZQ9","wine-dxvk-cache-clear","Clear a stale DXVK shader cache that is causing graphical corruption in a\nWine or Proton game. Use when: a game shows corrupted textures or shader\nflicker that started after a driver or DXVK version change.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Ftoy-registry\u002Fskills\u002Fwine-dxvk-cache-clear\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7AQ4CY1NHSMY1HCZ91387YY","steam-download-region-fix","Fix a Steam client stuck at very low download speed by changing its\ndownload region. Use when: Steam downloads are far below the local\ninternet speed for every game, not just one.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Ftoy-registry\u002Fskills\u002Fsteam-download-region-fix\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7AQ49P7Y0CDRSYMPVABX80K","proton-battleye-eac-toggle","Toggle BattlEye or Easy Anti-Cheat runtime support for a Steam Proton game.\nUse when: a multiplayer game refuses to launch with an anti-cheat error under Proton.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Ftoy-registry\u002Fskills\u002Fproton-battleye-eac-toggle\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7AQ45326FAP3X4Q86FK1X4N","vivi-verify-incoming","Load when reading any upstream artefact handed off to Vivi that carries a sibling .envelope.json. BLOCKING per ECL §6.2.2: the orchestrator MUST have verified the envelope's SHA-256 (eidolons verify-envelope --block \u002F eidolons run --verify) and recorded a verify_pass before dispatch. If no verify_pass exists for the message_id, or a verify_fail is present, REFUSE to process the payload and hand back to the orchestrator. Symmetric receiver gate — every Eidolon enforces it identically.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fverify-incoming\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7AQ402861P0P3C2TEGFGMA1","vivi-parallel-tracks","Load ONLY under TRANCE authorization when the Plan phase yields N independent, non-overlapping implementation tracks (disjoint file sets). Operationalizes the TRANCE G4 form — parallel multi-track implementation in mandatory git-worktree isolation, max 5 clean-context tracks, a per-track verifier cascade, a non-fungible per-track ≤3 reflection budget, explicit stop conditions, and a single-threaded merge\u002Faggregation step. Absent TRANCE gating, Vivi runs exactly as today: single-track A→P→I→V→Δ\u002FR.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fparallel-tracks\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7AQ3RH9BZF9ZMTC7VG5P7PB","vivi-methodology","Full Vivi cycle reference — A(nalyze) → P(lan) → I(mplement) → V(erify) → Δ(Delta)\u002FR(eflect). Use when the task is a non-trivial feature implementation in a brownfield codebase and you need the complete methodology reference: complexity routing, evidence-grounded planning rules, test-anchoring requirements, and failure-escalation thresholds.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmethodology\u002FSKILL.md",[],[]]