[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AQ3RH9BZF9ZMTC7VG5P7PB":3,"skill-same:01M7AQ3RH9BZF9ZMTC7VG5P7PB":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},"01M7AQ3RH9BZF9ZMTC7VG5P7PB","vivi-methodology",null,"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.","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\u002Fmethodology\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vivi-methodology\ndescription: \"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.\"\nmetadata:\n  methodology: Vivi\n---\n\n# Vivi Methodology\n\nFeature implementation through evidence-grounded planning, test-anchored development, and structured self-improvement in brownfield codebases.\n\n---\n\n## A — ANALYZE Phase\n\n### Step 1: Memory Recall\n\n**CRYSTALIUM path** (when `mcp__crystalium__*` available):\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` surfaces past task outcomes; `semantic` surfaces failure root causes\nand architectural decisions; `procedural` surfaces verified reusable skills.\nFold relevant hits into mission context (≤ 1-2K tokens summarized).\n\n**Standalone path** (when CRYSTALIUM absent): query `agents\u002Fmemories\u002F` for past\ntasks in the same module, known reusable assets, and previous failure patterns.\n\nScore matches by: path proximity → recency → outcome quality. Budget: ≤ 20 entries.\n\nSee `agents\u002Fskills\u002Fmemory-management\u002FSKILL.md` for the full routing decision and protocol.\n\n### Step 2: Repo Map Generation\nBefore reading any file in detail, generate a structural overview:\n\n```\n1. List directory tree for the target domain (2-3 levels deep)\n2. Identify key files by convention:\n   - Models\u002Fentities: app\u002Fmodels\u002FDOMAIN\u002F\n   - Controllers\u002Fhandlers: app\u002Fcontrollers\u002F or equivalent\n   - Tests: spec\u002F or test\u002F mirroring source structure\n   - Configuration: config\u002F, .env patterns\n3. For each key file, extract:\n   - Public interface (method signatures, exported functions)\n   - Dependencies (imports, includes, requires)\n   - Test coverage existence (yes\u002Fno)\n4. Rank by reference frequency: files imported by many others = high leverage\n```\n\nOutput: Compressed structural summary (~50-100 lines). This is your navigation map.\n\n### Step 3: Requirements Decomposition\nState explicitly:\n- **Goal**: What problem does this solve? One sentence.\n- **Scope IN**: Files, modules, features being changed\n- **Scope OUT**: What is explicitly NOT being changed (boundaries)\n- **Acceptance criteria**: Observable, testable conditions for \"done\"\n\n### Step 4: Asset Discovery (MANDATORY)\n\nSearch the codebase BEFORE planning. Discover what already exists.\n\n| Asset Type | Search Pattern | Purpose |\n|------------|---------------|---------|\n| Domain models | `app\u002Fmodels\u002FDOMAIN\u002F` | Business logic, state machines |\n| Repositories | `app\u002Fmodels\u002FDOMAIN\u002Frepository.*` | Data access patterns |\n| Services | `app\u002Fservices\u002FDOMAIN\u002F` | Orchestration, business rules |\n| View components | `app\u002Fcomponents\u002FDOMAIN\u002F` | UI building blocks |\n| Query objects | `app\u002Fmodels\u002FDOMAIN\u002Fqueries\u002F` | Complex data retrieval |\n| Workers\u002FJobs | `app\u002Fjobs\u002F`, `app\u002Fworkers\u002F` | Async processing |\n| Serializers | `app\u002Fserializers\u002F` | API response shaping |\n| Shared utilities | `lib\u002F`, `app\u002Flib\u002F` | Cross-cutting helpers |\n| Config\u002FConstants | `config\u002F`, `app\u002Fconstants\u002F` | Feature flags, settings |\n| Test factories | `spec\u002Ffactories\u002F`, `test\u002Ffactories\u002F` | Test data patterns |\n\nFor EACH discovered asset, record:\n\n| Field | Values |\n|-------|--------|\n| Location | file:line |\n| Purpose | One-line description |\n| Relevance | HIGH \u002F MED \u002F LOW |\n| Quality | Has tests? Recent changes? Known issues? |\n| Verdict | USE \u002F EXTEND \u002F WRAP \u002F AVOID |\n| Rationale | Why this verdict (one sentence) |\n\n### Step 5: Collision Mapping\nIdentify risk zones:\n- Files to **modify** (existing, may break things)\n- Files to **create** (new, may collide with in-flight work)\n- **High-risk zones**: Low test coverage, heavily imported, recently changed by others\n- **Integration points**: Where new code touches existing code\n\n**Phase output**: Discovery Report (use `agents\u002Ftemplates\u002Fdiscovery-report.md`)\n\n---\n\n## P — PLAN Phase\n\n### Step 1: Test Anchor Generation\n\nBEFORE designing any solution, write the test expectations:\n\n```\nFor each acceptance criterion:\n  1. Describe the test case in plain language\n  2. Specify: input state → action → expected outcome\n  3. Identify what existing test patterns to follow\n  4. Note which test helpers\u002Ffactories already exist\n```\n\nThese test anchors become the source of truth for implementation correctness. Implementation is done when these tests pass.\n\n**ANTI-OVERFIT rule (mandatory).** Test anchors derive from the **acceptance\ncriteria + EXISTING test patterns** in the codebase — never reverse-engineered\nfrom a candidate implementation. Writing tests *after* (or to fit) the code you\nintend to write reproduces the field's named failure: agents over-fit\nimplementations to tests they authored in hindsight (DESIGN-RATIONALE Decision 3;\nSWE-bench-style contamination\u002Foverfitting). If you cannot state an anchor from\nthe acceptance criteria alone, the criterion is under-specified — clarify it,\ndo not invent an implementation-shaped test.\n\n**CAPTURE-LIVE-FIRST gate (mandatory).** When the task parses external CLI\nstdout\u002Fstderr, or consumes a serde-renamed \u002F IPC payload, **stage the verbatim\nlive capture as the fixture BEFORE writing the parser.** Fabricated fixtures\npass 10\u002F10 tests vacuously while every assumption about the real output is\nwrong. Capture one real sample (or a one-line dump of the live payload) first;\nthat capture is the anchor.\n\n**RED-GATE rule (mandatory — Stage 2).** For a fix\u002Frepair task, the reproduction\ntest anchor MUST be verified to **FAIL on the unmodified base tree** before any\nimplementation begins. The substrate enforces this mechanically: pass\n`--require-red` to `eidolons sandbox loop` — a reproduction that already passes\nis **VACUOUS** (`final=vacuous-reproduction`) and cannot anchor a fix. The\nevidence is decisive: patching is near-solved when the repro test is *right*;\nrepro-test validity — not patch generation — is the bottleneck (TDFlow: 88.8%\nvs 49% with verified repro tests). On a vacuous verdict, return to THIS step\nand re-derive the anchor from the acceptance criteria — do NOT burn loop\nattempts against a test that cannot fail.\n\n### Step 2: Strategy Generation (Tree-of-Thoughts)\n\nGenerate 3-5 genuinely different strategies. Requirements:\n- At least ONE strategy maximizes use of discovered internal assets\n- At least ONE strategy is the conservative\u002Fminimal-change approach\n- NO strawmen — every strategy must be plausibly the best choice\n- Each strategy must differ in at least one of: architecture, coupling, scope, or risk profile\n\nFor each strategy, document:\n- **Approach**: 2-3 sentence description\n- **Files touched**: List with change type (modify\u002Fcreate)\n- **Assets used**: Which discovered assets and how\n- **Test impact**: New tests needed, existing tests affected\n- **Risk profile**: What could go wrong\n\n### Step 3: Strategy Scoring\n\nScore each strategy on four dimensions (1-3 scale):\n\n| Dimension | 1 (Poor) | 2 (Acceptable) | 3 (Good) |\n|-----------|----------|-----------------|----------|\n| **Risk** | High blast radius, low coverage in affected areas | Moderate, some coverage gaps | Low blast radius, good coverage |\n| **Effort** | 3+ days, multi-team coordination | 1-2 days, single team | \u003C 1 day, contained changes |\n| **Alignment** | Ignores internal assets, creates parallel paths | Partial internal asset reuse | Full Internal First compliance |\n| **Maintainability** | Adds technical debt, unclear ownership | Neutral to codebase health | Improves patterns, reduces duplication |\n\n**Total: 4-12** (higher = better)\n\n### Step 4: Deep Evaluation of Top 2\n\nExpand the top 2 scoring strategies with:\n- Detailed step-by-step implementation plan\n- Specific file changes with pseudocode\n- Dependency chain (what must be done first)\n- Abort conditions (what would make this strategy fail)\n- Blockers and unknowns\n\nRe-score after deep evaluation. Hidden issues often emerge here.\n\n### Step 5: Selection with Justification\n\nDocument:\n- **Selected strategy**: Name + final score + one-paragraph justification\n- **Runner-up**: Name + score + why it was rejected\n- **Confidence level**: HIGH \u002F MED \u002F LOW\n- **Abort conditions**: Specific signals that mean \"stop and re-plan\"\n- **Boundaries**: Files\u002Fsystems explicitly out of scope for this implementation\n\n**Phase output**: Execution Plan (use `agents\u002Ftemplates\u002Fexecution-plan.md`)\n\n### Memory: Plan Checkpoint (CRYSTALIUM)\n\nAfter the Execution Plan is produced, call (if CRYSTALIUM available):\n\n```\nmcp__crystalium__plan_checkpoint(\n  plan_id  = \u003Ctask-slug + date>,\n  state    = \u003Cfull execution plan snapshot>,\n  step     = \"initial\",\n  metadata = { author_agent: \"vivi\", task_title: \u003Ctitle> }\n)\n```\n\nStore the returned `checkpoint_id` in working context. If the plan is revised\nmid-cycle (the abort rules below fire), call `plan_replan` before re-entering\nPlan:\n\n```\nmcp__crystalium__plan_replan(\n  plan_id            = \u003Cplan_id>,\n  from_checkpoint_id = \u003Ccheckpoint_id>,\n  new_plan           = { diff: \u003Cwhat changed and why>, supersedes_id: \u003Ccheckpoint_id> }\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip these calls silently.\n\n### ECL emit on FORGE consultation\n\nIf Plan-phase reasoning calls for a FORGE consultation (adversarial reasoning, trade-off arbitration), emit a `reasoning-request.envelope.json` next to the question artefact (template at `templates\u002Freasoning-request.envelope.json`). Required: `to.eidolon=forge`, `performative=REQUEST`, `artifact.kind=reasoning-request`. Body validates against `schemas\u002F_base-profile.v1.json`. `ise.assertion_grade=\"self-attested\"` (ECL v2.0 §6.5.2; this envelope precedes any loop-native verification — see `skills\u002Floop-native\u002FSKILL.md` §6 for the grade rationale). Skip the envelope when `ECL_VERSION` is absent.\n\n---\n\n## I — IMPLEMENT Phase\n\n### Memory: Skill Reuse (CRYSTALIUM)\n\nBefore building, if the A-ANALYZE recall surfaced a procedural entry for this\ntask type, invoke it (if CRYSTALIUM available):\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. After verifying a new reusable\npattern, commit it:\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",   # \"semantic\" if unverified\n  payload = \u003Cpattern: name, location, purpose, usage_hint, quality>,\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip these calls silently.\n\n### Execution Priority\n\nFollow this order strictly:\n\n1. **USE** — Assets marked USE AS-IS. Wire them in directly.\n2. **EXTEND** — Assets marked EXTEND. Add methods\u002Ffeatures to existing code.\n3. **WRAP** — Assets marked WRAP. Create adapter layer for legacy interfaces.\n4. **CREATE** — New code only when Discovery confirmed no suitable internal alternative.\n\n### Architect\u002FEditor Separation\n\nFor Complex-tier tasks, separate reasoning from editing:\n\n```\nARCHITECT PASS (reasoning):\n  - Describe WHAT needs to change and WHY\n  - Specify the interface contracts between components\n  - Define the data flow through the change\n\nEDITOR PASS (implementation):\n  - Translate architect output into actual code edits\n  - Follow existing code style and conventions exactly\n  - Produce minimal, targeted diffs (not rewrites)\n```\n\n### Implementation Rules\n\n- Write tests for new functionality FIRST (test-anchored from Plan phase)\n- One logical change per commit. Each commit should pass linter + existing tests.\n- If you discover an asset not found in Analyze, STOP and update the Discovery Report.\n- If implementation reveals the plan is wrong, STOP and return to Plan phase.\n- Track progress with structured task list:\n\n```\n## Task Progress\n- [x] TASK-1: Create factory method for Widget — DONE\n- [ ] TASK-2: Extend WidgetRepository with #find_active — IN PROGRESS\n- [ ] TASK-3: Add WidgetComponent for list view — BLOCKED (needs TASK-2)\n- [ ] TASK-4: Wire controller action — PENDING\n```\n\n### Targeted Test Execution\n\nRun tests incrementally, not all at once:\n1. Run the SINGLE most relevant test after each change\n2. Fix that failure before moving to the next change\n3. Run the broader test suite only after all individual tests pass\n4. This prevents the overcorrection cascade (fixing one thing, breaking another)\n\n### ECL emit on Implement-phase exit\n\nOn phase exit, emit `vivi-completion-report.envelope.json` next to the completion artefact (template at `templates\u002Fvivi-completion-report.envelope.json`). Required: `to.eidolon=idg`, `performative=PROPOSE`, `artifact.kind=vivi-completion-report`, `integrity.method=sha256` matching the payload bytes. Profile schema: `schemas\u002Fvivi-completion-report-profile.v1.json` (required keys: `files_changed_count`, `tests_run`, `tests_passed`). `ise.assertion_grade=\"validated\"` (ECL v2.0 §6.5.2) — justified because this envelope is only reachable after the V-phase closed loop passed **pass^k** against the regression + anchoring tests (`skills\u002Floop-native\u002FSKILL.md` §4, §6); that is the spec-mandated verification gate the `validated` grade requires, not a self-report. Skip when `ECL_VERSION` is absent.\n\nAfter the envelope is produced and verified (V-VERIFY phase), ingest it into\nCRYSTALIUM (if available):\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cvivi-completion-report.envelope.json contents>,\n  payload  = \u003Ccompletion report contents>\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip silently.\n\n---\n\n## V — VERIFY Phase (loop-native)\n\nVivi does **not** \"run the checks once and decide.\" It **drives the closed loop**\n`eidolons sandbox loop` (see `skills\u002Floop-native\u002FSKILL.md`) and acts as its\n`--fix-hook`: the loop runs the verification, and on failure re-invokes Vivi's\nrepair step (R, below) in **fresh context**, bounded, until green or capped. This\nis the core of the loop-native cycle and the reason Vivi supersedes its\npredecessor — which ran V once and handed the running back.\n\n### Configure the loop\n- `--tests`, or split `--regression`\u002F`--reproduction`: the success command(s).\n  Success = the Plan-phase **test-anchors** plus the existing suite, with\n  **regression-first, then the new acceptance test** (passing only the new test\n  FAILS — anti-reward-hacking).\n- `--protect \u003Cglob>`: the anchoring tests; the fix-hook MUST NOT edit them\n  (a mutation aborts → VIGIL).\n- `--k \u003Cn>`: pass^k — a green that is non-deterministic across k re-runs is\n  **flaky → BLOCKED**, not accepted.\n- `--max-attempts N` + `--via \u003Cisolation>`: the bounded cap and the host sandbox\n  (untrusted\u002FLLM-authored code needs ≥ container isolation, R8-03).\n- `--require-red`: mechanical red gate — the reproduction anchor must FAIL on\n  the base tree before any fix attempt (P-phase RED-GATE rule, enforced).\n- `--fanout N`: parallel-sample-and-select shape for standard-tier hosts (see\n  Host-adaptive shape below) — N independent fresh-context candidates,\n  externally selected; NO self-repair iteration.\n- `--judge-hook \u003Ccmd>`: external diff-review judge over a surviving candidate\n  (layered hack detection — the sealed holdout alone is insufficient).\n\n### Verification checks (run by the loop each iteration)\n| Check | Pass criteria |\n|-------|---------------|\n| Regression (full suite) | no new failures — **runs FIRST** |\n| Test-anchors (new) | all pass |\n| Linter | zero new violations |\n| Coverage | no decrease in affected files |\n| Build \u002F Type check | clean |\n| pass^k | green stable across k re-runs (else flaky → BLOCKED) |\n\n### Decision\n- Loop reaches green (regression + reproduction + pass^k) → it emits a\n  **candidate diff** (diff-not-apply; the human applies) → proceed to **Δ**.\n- Loop caps \u002F flaky \u002F `protected-tests-mutated` → proceed to **R** (already\n  bounded); on the 3-same-category \u002F cap threshold, escalate to VIGIL.\n\n### Host-adaptive shape (Stage 2) — iterate vs fanout\nThe loop's gain belongs to an RL-trained \u002F loop-competent host; on a weak host\n**self-repair iteration is the wrong shape** — feeding failures back injects new\nerrors (RLEF; the self-repair literature). Vivi therefore picks the LOOP SHAPE\nby host tier instead of falling off the loop entirely:\n\n| Host tier | Shape | Invocation |\n|-----------|-------|------------|\n| thinking \u002F loop-competent | **iterate** | `--max-attempts 3 --k 2 --require-red` |\n| standard \u002F weak | **fanout** | `--fanout 3 --max-attempts 1 --k 2 --require-red` |\n\nIn **fanout**, each candidate is an INDEPENDENT fresh-context, single-shot fix\ngenerated from the same base tree + the same localized base-failure feedback;\nthe substrate selects the survivor externally (tests + pass^k + holdout +\njudge). The weak-host model never judges its own retry — selection is external\nby construction (R2E-Gym hybrid-verifier evidence: +8pp over either filter\nalone; parallel sampling beats sequential self-repair on weak models).\n\n### Host-contingency \u002F graceful degradation\nIf no adequate isolation is available, or the substrate (`eidolons sandbox`) is\nabsent entirely, **degrade**: run the checks once, emit a diff for the human,\nand recommend the conservative fallback (`eidolons add apivr`). Never run\nuntrusted code without `--via` or an explicit `--allow-unsafe-host`.\n\n---\n\n## R — REFLECT Phase (Failure Only) — fresh-context repair\n\nR runs as the loop's `--fix-hook` on each failing iteration. Load skill:\n`skills\u002Ffailure-recovery\u002FSKILL.md`.\n\n### Fresh-context per attempt (the decisive discipline)\n**Each repair attempt starts from a CLEAN context**: the localized feedback\n(`$EIDOLONS_SANDBOX_FEEDBACK` — failing test ids, assertion, `file:line` loci,\nfull log) + the original acceptance criteria + the current working tree — **NOT**\nthe accumulated \"prior error + new hypothesis\" transcript. Carrying the prior\ntrajectory re-creates self-conditioning (long-horizon execution failure is\ndominated by models conditioning on their own prior errors). This is the single\nbiggest change from the predecessor's same-context retry, and it is why the loop\nhelps rather than degrades.\n\n### Evidence Gate (MANDATORY)\n\n**STOP** if you have no concrete artifact (the loop's localized feedback IS the\nartifact: assertion + `file:line`). No artifacts = ESCALATE. Never guess at fixes.\n\n### ECL emit on 3-failure escalation\n\nWhen the 3-same-category threshold fires (the methodology counter is the\n**authority**; the loop's `--max-attempts` is the substrate **ceiling** —\nwhichever trips first), wrap the escalation in a `repair-failed-report.envelope.json`\n(template at `templates\u002Frepair-failed-report.envelope.json`). Required:\n`to.eidolon=vigil`, `performative=ESCALATE`, `trust_level=high`,\n`assumptions[0]=\"trigger: 3-failure-same-category\"`. Profile schema:\n`schemas\u002Frepair-failed-report-profile.v1.json` (keys `attempts>=3`,\n`failure_category`, `last_test_command`). `ise.assertion_grade=\"self-attested\"`\n(ECL v2.0 §6.5.2) — the escalation is Vivi's own bounded-failure judgement, not\nan externally-gated pass. Skip the sidecar when `ECL_VERSION` is\nabsent (the escalation still happens).\n\n### Failure Protocol (fresh-context, localized)\n\nSee `skills\u002Ffailure-recovery\u002FSKILL.md` for the full taxonomy. Quick reference:\n\n| Iteration | Condition | Action |\n|-----------|-----------|--------|\n| Each | localized feedback present | Targeted fix to the reported loci, from **fresh context** |\n| 2nd, same category | — | A genuinely different approach (the feedback drives it, not the prior narrative) |\n| 3rd, same category | — | **ESCALATE** to VIGIL (cap reached) |\n| Any | LOW confidence \u002F no artifact | **ESCALATE** immediately |\n| Any | fix would edit an anchoring test or exceed scope | **ABORT** (anti-reward-hacking) → escalate |\n\n### Escalation Format\n\nWhen escalating, provide:\n```\n## Escalation: [task description]\n\n### What was attempted\n1. [Approach 1]: [what happened]\n2. [Approach 2]: [what happened]\n\n### Evidence collected\n- [error output, test results, etc.]\n\n### My assessment\n- Root cause hypothesis: [best guess with confidence]\n- What I need: [specific help required]\n\n### Suggested next steps for human\n1. [concrete suggestion]\n```\n\n---\n\n## Δ — DELTA Phase (Success Only)\n\nAfter successful verification, evaluate the touched code for normalization opportunities.\n\n### Candidate Scoring\n\n```\nPriority = (Severity + Frequency + Velocity) - Cost\n```\n\nEach factor scored 1-3. Threshold: **≥ 3 to suggest**.\n\n| Factor | 1 | 2 | 3 |\n|--------|---|---|---|\n| Severity | Cosmetic | Moderate coupling | Architectural debt |\n| Frequency | Seen once | Seen 2-3 times | Pattern across codebase |\n| Velocity | Stable area | Moderate change rate | Active development area |\n| Cost | Major refactor | Moderate effort | Quick improvement |\n\n### Anti-Criteria (Reject if ANY match)\n\n- First occurrence only → premature abstraction\n- Dormant area (> 6 months since last meaningful change)\n- High cost but affects ≤ 2 files\n- \"Might be useful someday\" reasoning\n- Would require changes outside current domain\n\n### Output Format\n\n```\n## Delta Suggestions\n\n### Δ-1: [Title]\n- Pattern: [what was observed]\n- Location: [file:line references]\n- Score: Severity(X) + Frequency(X) + Velocity(X) - Cost(X) = [total]\n- Suggestion: [specific improvement]\n- Effort estimate: [hours\u002Fdays]\n\nStatus: SUGGESTION ONLY — Do not implement\n```\n\n**CRITICAL**: Delta suggestions are OUTPUT ONLY. Never implement infrastructure suggestions. Log them to `agents\u002Fmemories\u002Fdelta-history.md` for future reference.\n\n---\n\n## Post-Task: Memory Update (Δ\u002FR phase)\n\nAfter every task (success or failure), update memory via the active path.\nSee `agents\u002Fskills\u002Fmemory-management\u002FSKILL.md` for the full protocol.\n\n**CRYSTALIUM path** (when available):\n\n```\n# Task outcome\nmcp__crystalium__commit(layer=\"episodic\", payload={task_title, domain, outcome,\n  summary, key_decisions, lesson}, provenance={author_agent:\"vivi\"})\n\n# Failure root causes (if any)\nmcp__crystalium__commit(layer=\"semantic\", payload={failure_category, context,\n  root_cause, prevention, domain}, provenance={author_agent:\"vivi\"})\n\n# New patterns (if discovered and verified)\nmcp__crystalium__commit(layer=\"procedural\", payload={pattern_name, location,\n  purpose, usage_hint, quality:\"verified\"}, provenance={author_agent:\"vivi\"})\n\n# End session\nmcp__crystalium__session_end()   # triggers Dream consolidation\n```\n\n**Standalone path** (when CRYSTALIUM absent): write to `agents\u002Fmemories\u002F`\nfiles per `skills\u002Fmemory-management\u002FSKILL.md §Standalone Fallback`.\n\n---\n\n*Vivi Methodology — Flow-engineered, test-anchored, context-aware*\n","# Vivi Methodology\n\nFeature implementation through evidence-grounded planning, test-anchored development, and structured self-improvement in brownfield codebases.\n\n---\n\n## A — ANALYZE Phase\n\n### Step 1: Memory Recall\n\n**CRYSTALIUM path** (when `mcp__crystalium__*` available):\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` surfaces past task outcomes; `semantic` surfaces failure root causes\nand architectural decisions; `procedural` surfaces verified reusable skills.\nFold relevant hits into mission context (≤ 1-2K tokens summarized).\n\n**Standalone path** (when CRYSTALIUM absent): query `agents\u002Fmemories\u002F` for past\ntasks in the same module, known reusable assets, and previous failure patterns.\n\nScore matches by: path proximity → recency → outcome quality. Budget: ≤ 20 entries.\n\nSee `agents\u002Fskills\u002Fmemory-management\u002FSKILL.md` for the full routing decision and protocol.\n\n### Step 2: Repo Map Generation\nBefore reading any file in detail, generate a structural overview:\n\n```\n1. List directory tree for the target domain (2-3 levels deep)\n2. Identify key files by convention:\n   - Models\u002Fentities: app\u002Fmodels\u002FDOMAIN\u002F\n   - Controllers\u002Fhandlers: app\u002Fcontrollers\u002F or equivalent\n   - Tests: spec\u002F or test\u002F mirroring source structure\n   - Configuration: config\u002F, .env patterns\n3. For each key file, extract:\n   - Public interface (method signatures, exported functions)\n   - Dependencies (imports, includes, requires)\n   - Test coverage existence (yes\u002Fno)\n4. Rank by reference frequency: files imported by many others = high leverage\n```\n\nOutput: Compressed structural summary (~50-100 lines). This is your navigation map.\n\n### Step 3: Requirements Decomposition\nState explicitly:\n- **Goal**: What problem does this solve? One sentence.\n- **Scope IN**: Files, modules, features being changed\n- **Scope OUT**: What is explicitly NOT being changed (boundaries)\n- **Acceptance criteria**: Observable, testable conditions for \"done\"\n\n### Step 4: Asset Discovery (MANDATORY)\n\nSearch the codebase BEFORE planning. Discover what already exists.\n\n| Asset Type | Search Pattern | Purpose |\n|------------|---------------|---------|\n| Domain models | `app\u002Fmodels\u002FDOMAIN\u002F` | Business logic, state machines |\n| Repositories | `app\u002Fmodels\u002FDOMAIN\u002Frepository.*` | Data access patterns |\n| Services | `app\u002Fservices\u002FDOMAIN\u002F` | Orchestration, business rules |\n| View components | `app\u002Fcomponents\u002FDOMAIN\u002F` | UI building blocks |\n| Query objects | `app\u002Fmodels\u002FDOMAIN\u002Fqueries\u002F` | Complex data retrieval |\n| Workers\u002FJobs | `app\u002Fjobs\u002F`, `app\u002Fworkers\u002F` | Async processing |\n| Serializers | `app\u002Fserializers\u002F` | API response shaping |\n| Shared utilities | `lib\u002F`, `app\u002Flib\u002F` | Cross-cutting helpers |\n| Config\u002FConstants | `config\u002F`, `app\u002Fconstants\u002F` | Feature flags, settings |\n| Test factories | `spec\u002Ffactories\u002F`, `test\u002Ffactories\u002F` | Test data patterns |\n\nFor EACH discovered asset, record:\n\n| Field | Values |\n|-------|--------|\n| Location | file:line |\n| Purpose | One-line description |\n| Relevance | HIGH \u002F MED \u002F LOW |\n| Quality | Has tests? Recent changes? Known issues? |\n| Verdict | USE \u002F EXTEND \u002F WRAP \u002F AVOID |\n| Rationale | Why this verdict (one sentence) |\n\n### Step 5: Collision Mapping\nIdentify risk zones:\n- Files to **modify** (existing, may break things)\n- Files to **create** (new, may collide with in-flight work)\n- **High-risk zones**: Low test coverage, heavily imported, recently changed by others\n- **Integration points**: Where new code touches existing code\n\n**Phase output**: Discovery Report (use `agents\u002Ftemplates\u002Fdiscovery-report.md`)\n\n---\n\n## P — PLAN Phase\n\n### Step 1: Test Anchor Generation\n\nBEFORE designing any solution, write the test expectations:\n\n```\nFor each acceptance criterion:\n  1. Describe the test case in plain language\n  2. Specify: input state → action → expected outcome\n  3. Identify what existing test patterns to follow\n  4. Note which test helpers\u002Ffactories already exist\n```\n\nThese test anchors become the source of truth for implementation correctness. Implementation is done when these tests pass.\n\n**ANTI-OVERFIT rule (mandatory).** Test anchors derive from the **acceptance\ncriteria + EXISTING test patterns** in the codebase — never reverse-engineered\nfrom a candidate implementation. Writing tests *after* (or to fit) the code you\nintend to write reproduces the field's named failure: agents over-fit\nimplementations to tests they authored in hindsight (DESIGN-RATIONALE Decision 3;\nSWE-bench-style contamination\u002Foverfitting). If you cannot state an anchor from\nthe acceptance criteria alone, the criterion is under-specified — clarify it,\ndo not invent an implementation-shaped test.\n\n**CAPTURE-LIVE-FIRST gate (mandatory).** When the task parses external CLI\nstdout\u002Fstderr, or consumes a serde-renamed \u002F IPC payload, **stage the verbatim\nlive capture as the fixture BEFORE writing the parser.** Fabricated fixtures\npass 10\u002F10 tests vacuously while every assumption about the real output is\nwrong. Capture one real sample (or a one-line dump of the live payload) first;\nthat capture is the anchor.\n\n**RED-GATE rule (mandatory — Stage 2).** For a fix\u002Frepair task, the reproduction\ntest anchor MUST be verified to **FAIL on the unmodified base tree** before any\nimplementation begins. The substrate enforces this mechanically: pass\n`--require-red` to `eidolons sandbox loop` — a reproduction that already passes\nis **VACUOUS** (`final=vacuous-reproduction`) and cannot anchor a fix. The\nevidence is decisive: patching is near-solved when the repro test is *right*;\nrepro-test validity — not patch generation — is the bottleneck (TDFlow: 88.8%\nvs 49% with verified repro tests). On a vacuous verdict, return to THIS step\nand re-derive the anchor from the acceptance criteria — do NOT burn loop\nattempts against a test that cannot fail.\n\n### Step 2: Strategy Generation (Tree-of-Thoughts)\n\nGenerate 3-5 genuinely different strategies. Requirements:\n- At least ONE strategy maximizes use of discovered internal assets\n- At least ONE strategy is the conservative\u002Fminimal-change approach\n- NO strawmen — every strategy must be plausibly the best choice\n- Each strategy must differ in at least one of: architecture, coupling, scope, or risk profile\n\nFor each strategy, document:\n- **Approach**: 2-3 sentence description\n- **Files touched**: List with change type (modify\u002Fcreate)\n- **Assets used**: Which discovered assets and how\n- **Test impact**: New tests needed, existing tests affected\n- **Risk profile**: What could go wrong\n\n### Step 3: Strategy Scoring\n\nScore each strategy on four dimensions (1-3 scale):\n\n| Dimension | 1 (Poor) | 2 (Acceptable) | 3 (Good) |\n|-----------|----------|-----------------|----------|\n| **Risk** | High blast radius, low coverage in affected areas | Moderate, some coverage gaps | Low blast radius, good coverage |\n| **Effort** | 3+ days, multi-team coordination | 1-2 days, single team | \u003C 1 day, contained changes |\n| **Alignment** | Ignores internal assets, creates parallel paths | Partial internal asset reuse | Full Internal First compliance |\n| **Maintainability** | Adds technical debt, unclear ownership | Neutral to codebase health | Improves patterns, reduces duplication |\n\n**Total: 4-12** (higher = better)\n\n### Step 4: Deep Evaluation of Top 2\n\nExpand the top 2 scoring strategies with:\n- Detailed step-by-step implementation plan\n- Specific file changes with pseudocode\n- Dependency chain (what must be done first)\n- Abort conditions (what would make this strategy fail)\n- Blockers and unknowns\n\nRe-score after deep evaluation. Hidden issues often emerge here.\n\n### Step 5: Selection with Justification\n\nDocument:\n- **Selected strategy**: Name + final score + one-paragraph justification\n- **Runner-up**: Name + score + why it was rejected\n- **Confidence level**: HIGH \u002F MED \u002F LOW\n- **Abort conditions**: Specific signals that mean \"stop and re-plan\"\n- **Boundaries**: Files\u002Fsystems explicitly out of scope for this implementation\n\n**Phase output**: Execution Plan (use `agents\u002Ftemplates\u002Fexecution-plan.md`)\n\n### Memory: Plan Checkpoint (CRYSTALIUM)\n\nAfter the Execution Plan is produced, call (if CRYSTALIUM available):\n\n```\nmcp__crystalium__plan_checkpoint(\n  plan_id  = \u003Ctask-slug + date>,\n  state    = \u003Cfull execution plan snapshot>,\n  step     = \"initial\",\n  metadata = { author_agent: \"vivi\", task_title: \u003Ctitle> }\n)\n```\n\nStore the returned `checkpoint_id` in working context. If the plan is revised\nmid-cycle (the abort rules below fire), call `plan_replan` before re-entering\nPlan:\n\n```\nmcp__crystalium__plan_replan(\n  plan_id            = \u003Cplan_id>,\n  from_checkpoint_id = \u003Ccheckpoint_id>,\n  new_plan           = { diff: \u003Cwhat changed and why>, supersedes_id: \u003Ccheckpoint_id> }\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip these calls silently.\n\n### ECL emit on FORGE consultation\n\nIf Plan-phase reasoning calls for a FORGE consultation (adversarial reasoning, trade-off arbitration), emit a `reasoning-request.envelope.json` next to the question artefact (template at `templates\u002Freasoning-request.envelope.json`). Required: `to.eidolon=forge`, `performative=REQUEST`, `artifact.kind=reasoning-request`. Body validates against `schemas\u002F_base-profile.v1.json`. `ise.assertion_grade=\"self-attested\"` (ECL v2.0 §6.5.2; this envelope precedes any loop-native verification — see `skills\u002Floop-native\u002FSKILL.md` §6 for the grade rationale). Skip the envelope when `ECL_VERSION` is absent.\n\n---\n\n## I — IMPLEMENT Phase\n\n### Memory: Skill Reuse (CRYSTALIUM)\n\nBefore building, if the A-ANALYZE recall surfaced a procedural entry for this\ntask type, invoke it (if CRYSTALIUM available):\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. After verifying a new reusable\npattern, commit it:\n\n```\nmcp__crystalium__commit(\n  layer   = \"procedural\",   # \"semantic\" if unverified\n  payload = \u003Cpattern: name, location, purpose, usage_hint, quality>,\n  provenance = { author_agent: \"vivi\" }\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip these calls silently.\n\n### Execution Priority\n\nFollow this order strictly:\n\n1. **USE** — Assets marked USE AS-IS. Wire them in directly.\n2. **EXTEND** — Assets marked EXTEND. Add methods\u002Ffeatures to existing code.\n3. **WRAP** — Assets marked WRAP. Create adapter layer for legacy interfaces.\n4. **CREATE** — New code only when Discovery confirmed no suitable internal alternative.\n\n### Architect\u002FEditor Separation\n\nFor Complex-tier tasks, separate reasoning from editing:\n\n```\nARCHITECT PASS (reasoning):\n  - Describe WHAT needs to change and WHY\n  - Specify the interface contracts between components\n  - Define the data flow through the change\n\nEDITOR PASS (implementation):\n  - Translate architect output into actual code edits\n  - Follow existing code style and conventions exactly\n  - Produce minimal, targeted diffs (not rewrites)\n```\n\n### Implementation Rules\n\n- Write tests for new functionality FIRST (test-anchored from Plan phase)\n- One logical change per commit. Each commit should pass linter + existing tests.\n- If you discover an asset not found in Analyze, STOP and update the Discovery Report.\n- If implementation reveals the plan is wrong, STOP and return to Plan phase.\n- Track progress with structured task list:\n\n```\n## Task Progress\n- [x] TASK-1: Create factory method for Widget — DONE\n- [ ] TASK-2: Extend WidgetRepository with #find_active — IN PROGRESS\n- [ ] TASK-3: Add WidgetComponent for list view — BLOCKED (needs TASK-2)\n- [ ] TASK-4: Wire controller action — PENDING\n```\n\n### Targeted Test Execution\n\nRun tests incrementally, not all at once:\n1. Run the SINGLE most relevant test after each change\n2. Fix that failure before moving to the next change\n3. Run the broader test suite only after all individual tests pass\n4. This prevents the overcorrection cascade (fixing one thing, breaking another)\n\n### ECL emit on Implement-phase exit\n\nOn phase exit, emit `vivi-completion-report.envelope.json` next to the completion artefact (template at `templates\u002Fvivi-completion-report.envelope.json`). Required: `to.eidolon=idg`, `performative=PROPOSE`, `artifact.kind=vivi-completion-report`, `integrity.method=sha256` matching the payload bytes. Profile schema: `schemas\u002Fvivi-completion-report-profile.v1.json` (required keys: `files_changed_count`, `tests_run`, `tests_passed`). `ise.assertion_grade=\"validated\"` (ECL v2.0 §6.5.2) — justified because this envelope is only reachable after the V-phase closed loop passed **pass^k** against the regression + anchoring tests (`skills\u002Floop-native\u002FSKILL.md` §4, §6); that is the spec-mandated verification gate the `validated` grade requires, not a self-report. Skip when `ECL_VERSION` is absent.\n\nAfter the envelope is produced and verified (V-VERIFY phase), ingest it into\nCRYSTALIUM (if available):\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cvivi-completion-report.envelope.json contents>,\n  payload  = \u003Ccompletion report contents>\n)\n```\n\n**Graceful skip:** if CRYSTALIUM unavailable, skip silently.\n\n---\n\n## V — VERIFY Phase (loop-native)\n\nVivi does **not** \"run the checks once and decide.\" It **drives the closed loop**\n`eidolons sandbox loop` (see `skills\u002Floop-native\u002FSKILL.md`) and acts as its\n`--fix-hook`: the loop runs the verification, and on failure re-invokes Vivi's\nrepair step (R, below) in **fresh context**, bounded, until green or capped. This\nis the core of the loop-native cycle and the reason Vivi supersedes its\npredecessor — which ran V once and handed the running back.\n\n### Configure the loop\n- `--tests`, or split `--regression`\u002F`--reproduction`: the success command(s).\n  Success = the Plan-phase **test-anchors** plus the existing suite, with\n  **regression-first, then the new acceptance test** (passing only the new test\n  FAILS — anti-reward-hacking).\n- `--protect \u003Cglob>`: the anchoring tests; the fix-hook MUST NOT edit them\n  (a mutation aborts → VIGIL).\n- `--k \u003Cn>`: pass^k — a green that is non-deterministic across k re-runs is\n  **flaky → BLOCKED**, not accepted.\n- `--max-attempts N` + `--via \u003Cisolation>`: the bounded cap and the host sandbox\n  (untrusted\u002FLLM-authored code needs ≥ container isolation, R8-03).\n- `--require-red`: mechanical red gate — the reproduction anchor must FAIL on\n  the base tree before any fix attempt (P-phase RED-GATE rule, enforced).\n- `--fanout N`: parallel-sample-and-select shape for standard-tier hosts (see\n  Host-adaptive shape below) — N independent fresh-context candidates,\n  externally selected; NO self-repair iteration.\n- `--judge-hook \u003Ccmd>`: external diff-review judge over a surviving candidate\n  (layered hack detection — the sealed holdout alone is insufficient).\n\n### Verification checks (run by the loop each iteration)\n| Check | Pass criteria |\n|-------|---------------|\n| Regression (full suite) | no new failures — **runs FIRST** |\n| Test-anchors (new) | all pass |\n| Linter | zero new violations |\n| Coverage | no decrease in affected files |\n| Build \u002F Type check | clean |\n| pass^k | green stable across k re-runs (else flaky → BLOCKED) |\n\n### Decision\n- Loop reaches green (regression + reproduction + pass^k) → it emits a\n  **candidate diff** (diff-not-apply; the human applies) → proceed to **Δ**.\n- Loop caps \u002F flaky \u002F `protected-tests-mutated` → proceed to **R** (already\n  bounded); on the 3-same-category \u002F cap threshold, escalate to VIGIL.\n\n### Host-adaptive shape (Stage 2) — iterate vs fanout\nThe loop's gain belongs to an RL-trained \u002F loop-competent host; on a weak host\n**self-repair iteration is the wrong shape** — feeding failures back injects new\nerrors (RLEF; the self-repair literature). Vivi therefore picks the LOOP SHAPE\nby host tier instead of falling off the loop entirely:\n\n| Host tier | Shape | Invocation |\n|-----------|-------|------------|\n| thinking \u002F loop-competent | **iterate** | `--max-attempts 3 --k 2 --require-red` |\n| standard \u002F weak | **fanout** | `--fanout 3 --max-attempts 1 --k 2 --require-red` |\n\nIn **fanout**, each candidate is an INDEPENDENT fresh-context, single-shot fix\ngenerated from the same base tree + the same localized base-failure feedback;\nthe substrate selects the survivor externally (tests + pass^k + holdout +\njudge). The weak-host model never judges its own retry — selection is external\nby construction (R2E-Gym hybrid-verifier evidence: +8pp over either filter\nalone; parallel sampling beats sequential self-repair on weak models).\n\n### Host-contingency \u002F graceful degradation\nIf no adequate isolation is available, or the substrate (`eidolons sandbox`) is\nabsent entirely, **degrade**: run the checks once, emit a diff for the human,\nand recommend the conservative fallback (`eidolons add apivr`). Never run\nuntrusted code without `--via` or an explicit `--allow-unsafe-host`.\n\n---\n\n## R — REFLECT Phase (Failure Only) — fresh-context repair\n\nR runs as the loop's `--fix-hook` on each failing iteration. Load skill:\n`skills\u002Ffailure-recovery\u002FSKILL.md`.\n\n### Fresh-context per attempt (the decisive discipline)\n**Each repair attempt starts from a CLEAN context**: the localized feedback\n(`$EIDOLONS_SANDBOX_FEEDBACK` — failing test ids, assertion, `file:line` loci,\nfull log) + the original acceptance criteria + the current working tree — **NOT**\nthe accumulated \"prior error + new hypothesis\" transcript. Carrying the prior\ntrajectory re-creates self-conditioning (long-horizon execution failure is\ndominated by models conditioning on their own prior errors). This is the single\nbiggest change from the predecessor's same-context retry, and it is why the loop\nhelps rather than degrades.\n\n### Evidence Gate (MANDATORY)\n\n**STOP** if you have no concrete artifact (the loop's localized feedback IS the\nartifact: assertion + `file:line`). No artifacts = ESCALATE. Never guess at fixes.\n\n### ECL emit on 3-failure escalation\n\nWhen the 3-same-category threshold fires (the methodology counter is the\n**authority**; the loop's `--max-attempts` is the substrate **ceiling** —\nwhichever trips first), wrap the escalation in a `repair-failed-report.envelope.json`\n(template at `templates\u002Frepair-failed-report.envelope.json`). Required:\n`to.eidolon=vigil`, `performative=ESCALATE`, `trust_level=high`,\n`assumptions[0]=\"trigger: 3-failure-same-category\"`. Profile schema:\n`schemas\u002Frepair-failed-report-profile.v1.json` (keys `attempts>=3`,\n`failure_category`, `last_test_command`). `ise.assertion_grade=\"self-attested\"`\n(ECL v2.0 §6.5.2) — the escalation is Vivi's own bounded-failure judgement, not\nan externally-gated pass. Skip the sidecar when `ECL_VERSION` is\nabsent (the escalation still happens).\n\n### Failure Protocol (fresh-context, localized)\n\nSee `skills\u002Ffailure-recovery\u002FSKILL.md` for the full taxonomy. Quick reference:\n\n| Iteration | Condition | Action |\n|-----------|-----------|--------|\n| Each | localized feedback present | Targeted fix to the reported loci, from **fresh context** |\n| 2nd, same category | — | A genuinely different approach (the feedback drives it, not the prior narrative) |\n| 3rd, same category | — | **ESCALATE** to VIGIL (cap reached) |\n| Any | LOW confidence \u002F no artifact | **ESCALATE** immediately |\n| Any | fix would edit an anchoring test or exceed scope | **ABORT** (anti-reward-hacking) → escalate |\n\n### Escalation Format\n\nWhen escalating, provide:\n```\n## Escalation: [task description]\n\n### What was attempted\n1. [Approach 1]: [what happened]\n2. [Approach 2]: [what happened]\n\n### Evidence collected\n- [error output, test results, etc.]\n\n### My assessment\n- Root cause hypothesis: [best guess with confidence]\n- What I need: [specific help required]\n\n### Suggested next steps for human\n1. [concrete suggestion]\n```\n\n---\n\n## Δ — DELTA Phase (Success Only)\n\nAfter successful verification, evaluate the touched code for normalization opportunities.\n\n### Candidate Scoring\n\n```\nPriority = (Severity + Frequency + Velocity) - Cost\n```\n\nEach factor scored 1-3. Threshold: **≥ 3 to suggest**.\n\n| Factor | 1 | 2 | 3 |\n|--------|---|---|---|\n| Severity | Cosmetic | Moderate coupling | Architectural debt |\n| Frequency | Seen once | Seen 2-3 times | Pattern across codebase |\n| Velocity | Stable area | Moderate change rate | Active development area |\n| Cost | Major refactor | Moderate effort | Quick improvement |\n\n### Anti-Criteria (Reject if ANY match)\n\n- First occurrence only → premature abstraction\n- Dormant area (> 6 months since last meaningful change)\n- High cost but affects ≤ 2 files\n- \"Might be useful someday\" reasoning\n- Would require changes outside current domain\n\n### Output Format\n\n```\n## Delta Suggestions\n\n### Δ-1: [Title]\n- Pattern: [what was observed]\n- Location: [file:line references]\n- Score: Severity(X) + Frequency(X) + Velocity(X) - Cost(X) = [total]\n- Suggestion: [specific improvement]\n- Effort estimate: [hours\u002Fdays]\n\nStatus: SUGGESTION ONLY — Do not implement\n```\n\n**CRITICAL**: Delta suggestions are OUTPUT ONLY. Never implement infrastructure suggestions. Log them to `agents\u002Fmemories\u002Fdelta-history.md` for future reference.\n\n---\n\n## Post-Task: Memory Update (Δ\u002FR phase)\n\nAfter every task (success or failure), update memory via the active path.\nSee `agents\u002Fskills\u002Fmemory-management\u002FSKILL.md` for the full protocol.\n\n**CRYSTALIUM path** (when available):\n\n```\n# Task outcome\nmcp__crystalium__commit(layer=\"episodic\", payload={task_title, domain, outcome,\n  summary, key_decisions, lesson}, provenance={author_agent:\"vivi\"})\n\n# Failure root causes (if any)\nmcp__crystalium__commit(layer=\"semantic\", payload={failure_category, context,\n  root_cause, prevention, domain}, provenance={author_agent:\"vivi\"})\n\n# New patterns (if discovered and verified)\nmcp__crystalium__commit(layer=\"procedural\", payload={pattern_name, location,\n  purpose, usage_hint, quality:\"verified\"}, provenance={author_agent:\"vivi\"})\n\n# End session\nmcp__crystalium__session_end()   # triggers Dream consolidation\n```\n\n**Standalone path** (when CRYSTALIUM absent): write to `agents\u002Fmemories\u002F`\nfiles per `skills\u002Fmemory-management\u002FSKILL.md §Standalone Fallback`.\n\n---\n\n*Vivi Methodology — Flow-engineered, test-anchored, context-aware*\n",{"name":5,"metadata":24,"description":7},{"methodology":25},"Vivi","main","38c3a82583abf9806de764f89ac0099ad690933a",".eidolons\u002Fvivi\u002Fskills\u002Fmethodology",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-methodology",{"tool":41,"command":42},"bunx","bunx skills add Rynaro\u002Fmagicite --skill vivi-methodology",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Rynaro\u002Fmagicite --skill vivi-methodology","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmethodology\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},"01M7AQ3GBYGR00HMP6F0W5WKFE","vivi-memory-management","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.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmemory-management\u002FSKILL.md",[],[]]