[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AQ213NSE3H9827T2A3WP67":3,"skill-same:01M7AQ213NSE3H9827T2A3WP67":51},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7AQ213NSE3H9827T2A3WP67","vigil-learn",null,"Phase L (Learn) — emits verified root-cause finding with evidence chain, walks the cause back to its originating decision, persists failure signature to semantic memory for future de-duplication, routes handoff to the correct downstream Eidolon. Use after `intervention-log.md` has a SURVIVOR to produce the primary deliverable.","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\u002Fvigil\u002Fskills\u002Flearn\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vigil-learn\ndescription: Phase L (Learn) — emits verified root-cause finding with evidence chain, walks the cause back to its originating decision, persists failure signature to semantic memory for future de-duplication, routes handoff to the correct downstream Eidolon. Use after `intervention-log.md` has a SURVIVOR to produce the primary deliverable.\nallowed-tools: git_log, view_file, memory_write, memory_query, schema_validate\nmetadata:\n  methodology: VIGIL\n  phase: L\n---\n\n# SKILL: Learn — emit the verified finding, preserve the lesson\n\n## When to use\n\nLoad when `intervention-log.md` has a SURVIVOR with counterfactual flip. Unload after `root-cause-report.md` is schema-valid and memory entry is written.\n\n---\n\n## Contract\n\n| Field | Value |\n|-------|-------|\n| LLM calls permitted | For composing the root-cause report and the failure-signature abstraction |\n| Tool budget | ≤15% of mission budget |\n| Outputs | `root-cause-report.md` (primary), `verified-patch.diff` (conditional), `failure-signature.yaml` (memory entry), handoff pointer |\n\n---\n\n## The Four Deliverables\n\n### 1. `root-cause-report.md` — primary, always\n\nSchema-validated per `schemas\u002Froot-cause-report.v1.json`. Fills `templates\u002Froot-cause-report.md`.\n\nCore sections:\n\n- **Summary** — one-sentence statement of the root cause\n- **Findings** — `[FINDING-NNN]` records following the team-wide ATLAS schema\n- **Evidence chain** — reproduction → IDG → intervention → flip\n- **Root cause walk-back** — commit\u002Fdecision trail that introduced the defect\n- **Recommended fix** — cited by reference to `verified-patch.diff` if present\n- **Handoff directive** — downstream recipient with rationale\n- **Telemetry** — tokens, tool calls, interventions used, wall clock\n\n### 2. `verified-patch.diff` — conditional\n\nEmitted when:\n\n- Authority ≥ `sandbox`\n- Survivor intervention was a `code_change` type (not oracle injection \u002F state correction)\n- Patch scope ≤3 files and passes minimum-intervention review\n\nNot emitted when:\n\n- Authority = `read-only` (patches are simulated, described textually)\n- Survivor was a non-code-change intervention (downstream fixer must translate)\n- Root cause is `SPEC_DEFECT` (no code patch exists — SPECTRA receives this)\n\n### 3. `failure-signature.yaml` — semantic memory entry\n\nAdded to the persistent memory ledger for future de-duplication. Purpose: if a related failure recurs, VIGIL (or any team member) can retrieve the prior attribution and its fix instead of re-investigating from scratch.\n\n### 4. Handoff directive\n\nA single structured pointer indicating which downstream Eidolon receives this finding and why.\n\n---\n\n## Root-Cause Walk-Back\n\nThe counterfactual intervention identifies *where* the defect lives. The walk-back identifies *when and why* it got there.\n\nProcedure:\n\n1. **Git blame the surviving intervention's target**\n   ```\n   git log --follow -p \u003Cpath> | grep -B 5 \u003Crelevant line>\n   ```\n   Identify the commit(s) that introduced the defective code.\n\n2. **Read the commit message and PR\u002Fissue** (if available)\n   - What problem was it trying to solve?\n   - Was there a spec? Did it change?\n   - Was there a review? What was discussed?\n\n3. **Classify the originating decision**\n\n   | Classification | Meaning | Downstream route |\n   |----------------|---------|------------------|\n   | **Implementation bug** | Spec was clear; code diverged from spec | APIVR-Δ for surgical fix |\n   | **Spec defect** | Spec itself was wrong or ambiguous | SPECTRA to revise spec |\n   | **Contract drift** | Internal contract changed without migration | SPECTRA for planned migration; APIVR-Δ for per-caller patch |\n   | **Upstream dep change** | External dependency changed behavior | APIVR-Δ to pin\u002Fadapt; IDG to document |\n   | **Missing test** | Defect introduced earlier; only surfaced now | APIVR-Δ to add the missing test + fix |\n   | **Environment drift** | Code correct but env\u002Fconfig caused failure | human or APIVR-Δ (if env-as-code) |\n\n4. **Emit the walk-back** as a `[FINDING]` subsection:\n\n   ```markdown\n   ### Originating Decision\n\n   [FINDING-007] The defect was introduced in commit `abc123` (2026-03-14),\n   which replaced `SecureRandom.uuid` with `generate_uuid(session)` to\n   scope tokens to sessions. The replacement function returns `nil` when\n   `session.secret_key` is absent, a case not covered by the commit's tests.\n\n   - evidence:\n     - path: app\u002Fflows\u002Frecord_vote.rb\n       lines: 56\n       excerpt_ref: memex:\u002F\u002Fexcerpt\u002F\u003Chash>\n     - commit: abc123\n       message: \"Scope ballot tokens to sessions\"\n       pr: #472\n   - classification: implementation_bug\n   - downstream_route: APIVR-Δ (surgical fix)\n   - confidence: H\n   ```\n\n---\n\n## Finding Emission — Team-Wide Schema\n\nVIGIL inherits ATLAS's `FINDING-NNN` schema. Every factual claim in the report maps to a finding record:\n\n```yaml\nFINDING-001:\n  claim: \"generate_uuid returns nil when session.secret_key is absent.\"\n  evidence:\n    - path: app\u002Futils\u002Fuuid_gen.rb\n      lines: 12-18\n      excerpt_ref: memex:\u002F\u002Fexcerpt\u002F\u003Chash>\n  confidence: H\n  counterfactual_result: FLIPPED\n  intervention_id: I-001\n```\n\n**Confidence rules for Learn:**\n\n| Tier | Condition |\n|------|-----------|\n| `H` | Deterministic reproduction + counterfactual FLIPPED + clean IDG (single root, no disputed edges) |\n| `M` | Statistical reproduction (≥0.85 CI) + FLIPPED at ≥4\u002F5; OR deterministic FLIPPED but one disputed IDG edge |\n| `L` | Not admissible for `[ROOT-CAUSE]`. Only allowed in escalation briefs as `[HYPOTHESIS-N]`. |\n\n---\n\n## `failure-signature.yaml` — Memory Entry\n\nStructured for matchability against future failures. Written to the semantic memory ledger (typically `memories\u002Fvigil-failures.yaml` in the host project).\n\n```yaml\nsignature_id: VSIG-YYYYMMDD-NNN\nnormalized_error: \"ballot.token = nil at RecordVote#call\"\nerror_class: LOGIC_ERROR\nkey_frames:\n  - \"RecordVote#call\"\n  - \"TokenGenerator#generate_uuid\"\n  - \"Session#secret_key\"\nroot_cause_summary: |\n  generate_uuid returns nil when session.secret_key is absent;\n  callers must check for nil or supply a fallback.\nroot_cause_path: app\u002Futils\u002Fuuid_gen.rb:12-18\noriginating_commit: abc123\ncategory: LOGIC_ERROR\nsubcategory: null-guard-missing\nintervention_pattern: |\n  Add nil-coalescing fallback at call site OR raise in generator on\n  nil input.\nfirst_seen: 2026-04-16\nfrequency: 1                    # incremented on future matches\nrelated_signatures: []          # populated if matched to prior entries\ndownstream_route: APIVR-Delta\nmission_ref: VIGIL-20260416-001\n```\n\n### De-duplication protocol\n\nBefore writing, query existing memory for signatures matching on:\n\n1. `error_class` exact match\n2. `key_frames` overlap ≥2 frames\n3. `root_cause_path` prefix match\n\nIf match found:\n- Increment `frequency`\n- Append current `mission_ref` to the existing entry\n- Add current entry to `related_signatures` bidirectionally\n- Do NOT create a new signature\n\nIf no match: write new entry.\n\nThe ledger has a recency-weighted cap (default 50 entries); older entries with `frequency = 1` are archived during consolidation.\n\n---\n\n## Handoff Directive\n\nSingle structured block at the end of `root-cause-report.md`:\n\n```yaml\nhandoff:\n  primary_recipient: APIVR-Delta | SPECTRA | IDG | FORGE | human\n  rationale: \"One-sentence reason for routing\"\n  artifact_path: \"\u003Cpath to root-cause-report.md>\"\n  supplementary_artifacts:\n    - verified-patch.diff\n    - intervention-log.md\n  fallback_recipient: human\n```\n\nRouting rules:\n\n| Root-cause classification | Primary | Fallback |\n|---------------------------|---------|----------|\n| Implementation bug, patch emitted | APIVR-Δ | human |\n| Implementation bug, no patch (authority=read-only) | APIVR-Δ | human |\n| Spec defect | SPECTRA | human |\n| Contract drift requiring migration | SPECTRA | APIVR-Δ |\n| Env\u002Fconfig issue | human | APIVR-Δ (if env-as-code) |\n| Needs incident chronicling | IDG (in parallel) | — |\n| Ambiguous after escalation | FORGE | human |\n\nIDG is always invoked *in parallel* for high-severity failures (user-facing incidents, production regressions). VIGIL does not chronicle — IDG does — but VIGIL's report is IDG's input.\n\n---\n\n## Envelope Emission\n\nAfter the handoff directive is written, emit the ECL v2.0 envelope sidecar(s) per I-11 and ECL §1. This step is mandatory for VIGIL on all inter-Eidolon hand-offs.\n\n### Step 1 — Compute payload SHA-256\n\n```\nsha256sum root-cause-report-\u003Cmission-id>.md | awk '{print $1}'\n# macOS: shasum -a 256 root-cause-report-\u003Cmission-id>.md | awk '{print $1}'\n```\n\nRecord the hex digest (64 lowercase hex characters).\n\n### Step 2 — Generate message_id and resolve thread_id\n\n- Generate a UUIDv7 (or UUIDv4) as the `message_id` for this envelope.\n- `thread_id`: reuse the inbound envelope's `thread_id` if this mission was entered via escalation (APIVR-Δ → VIGIL) — the thread_id carries through the escalation chain. Generate a new UUID on first emit for consultant or post-hoc missions.\n- `parent_id`: set to the inbound envelope's `message_id` on escalation entry; `null` on consultant\u002Fpost-hoc first emit.\n\n### Step 3 — Fan-out: one envelope per recipient\n\nWhen the handoff routes to multiple recipients (e.g. SPEC_DEFECT → SPECTRA + IDG in parallel):\n\n1. Write the payload `root-cause-report-\u003Cmission-id>.md` **once**.\n2. For each recipient, write a **separate** envelope file:\n   - `root-cause-report-\u003Cmission-id>.envelope.apivr.json`\n   - `root-cause-report-\u003Cmission-id>.envelope.spectra.json`\n   - `root-cause-report-\u003Cmission-id>.envelope.idg.json`\n3. Each envelope has a **distinct** `message_id`; all share the same `thread_id` and `parent_id`.\n4. `artifact.sha256` and `artifact.size_bytes` are identical across all envelopes (same payload bytes).\n5. `constraints.trust_level` MUST differ by contract:\n   - `vigil-to-apivr`: `\"high\"`\n   - `vigil-to-spectra`: `\"high\"`\n   - `vigil-to-idg`: `\"standard\"`\n6. `ise.assertion_grade` (ECL v2.0 §6.5) is set **once per report, identically on every fan-out copy** — it describes how the payload was produced, not who receives it. See `skills\u002Fintervene\u002FSKILL.md` § ISE Grade on the Root-Cause Report for the `validated` \u002F `self-attested` rule. `ise.receiver_authorization` is `{auto_route: true, auto_merge: false, auto_deploy: false}` on every envelope.\n\nFill all fields from `templates\u002Froot-cause-report.envelope.json`. The `objective` field MUST be ≤240 characters. The `context_delta.summary` MUST be ≤200 tokens (heuristic: ≤800 chars using `chars\u002F4`). If `tokens_used > 4000`, warn (do not abort).\n\n### Step 4 — Append emit trace events\n\nFor each envelope written, append one JSONL line to `.eidolons\u002F.trace\u002F\u003Cthread_id>.jsonl` **relative to the consumer project root** (not the VIGIL install target). Create the `.eidolons\u002F.trace\u002F` directory if absent.\n\n```jsonl\n{\"ts\":\"\u003CRFC3339>\",\"event\":\"emit\",\"message_id\":\"\u003Cuuid>\",\"thread_id\":\"\u003Cuuid>\",\"from\":\"vigil@\u003Cversion>\",\"to\":\"\u003Crecipient>@\u003Cversion>\",\"performative\":\"PROPOSE\",\"integrity_method\":\"sha256\",\"context_tokens\":\u003Cint>,\"model\":\"\u003Chost model>\",\"tier\":\"standard\"}\n```\n\n### Step 5 — Escalation-brief envelope (budget exhausted)\n\nOn budget exhaustion (5 interventions, no FLIPPED result), the escalation-brief sidecar uses `templates\u002Fescalation-brief.envelope.json`:\n- `performative`: `\"ESCALATE\"`\n- `to.eidolon`: `\"forge\"` (lateral consult per roster `vigil.handoffs.lateral`)\n- `edge_origin`: `\"roster\"` (the `vigil → forge` edge is declared in `roster\u002Findex.yaml`)\n- `assumptions[]` MUST include `\"trigger: budget-exhausted-no-flip\"` (ECL §2.2.3)\n- `ise.assertion_grade`: always `\"self-attested\"` (ECL v2.0 §6.5) — budget exhaustion with no flip is VIGIL's own bounded-failure judgement, not an externally-gated pass. `ise.receiver_authorization`: `{auto_route: true, auto_merge: false, auto_deploy: false}`.\n\nTrace the emit event to `.eidolons\u002F.trace\u002F\u003Cthread_id>.jsonl` as above, with `performative: \"ESCALATE\"`.\n\n## CRYSTALIUM Memory — ingest, learned-pattern commit, session end\n\nAfter the ECL envelope(s) are emitted (Steps 1–5 above), persist the handoff\nand any reusable debugging lessons to CRYSTALIUM.\n\n### Step C-1 — Ingest (primary persist path)\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cthe validated root-cause-report.envelope.json contents>,\n  payload  = \u003Croot-cause-report.md contents>\n)\n```\n\nThis records the root-cause-report at T1 with full ECL provenance\n(`from.eidolon=vigil` drives tier derivation; `integrity.value` is stored as\n`provenance.content_hash`). The authority flag (I-6) governs codebase writes,\nnot memory substrate access — calling CRYSTALIUM tools is explicitly allowed\nunder all authority modes.\n\n### Step C-2 — Learned-pattern commit (VIGIL extension)\n\nThe Learn phase distils reusable lessons. For each corroborated debugging\npattern surfaced during this mission — a root-cause category, an isolation\ntechnique that proved effective, or an intervention shape that reliably\nflips this class of failure — commit it directly:\n\n```\nmcp__crystalium__commit(\n  layer      = \"procedural\",    # use \"semantic\" for root-cause class knowledge\n  payload    = \u003Cthe learned pattern — concise, matchable on future recall>,\n  provenance = { author_agent: \"vigil\", mission_id: \u003CMISSION-ID> }\n)\n```\n\n**Layer guidance:**\n\n| Content | Layer |\n|---------|-------|\n| Reusable isolation \u002F intervention technique for a failure class | `procedural` |\n| Categorical root-cause knowledge (what pattern causes this signature) | `semantic` |\n| Raw mid-cycle observation not yet generalised | `episodic` |\n\n`author_agent` MUST be `\"vigil\"` on every direct commit. These entries feed\nDream's episodic→semantic promotion gate (corroboration threshold ≥2 across\nmissions).\n\nCommit only patterns corroborated by the counterfactual flip. Speculative\npatterns MUST NOT be committed here — record them in `failure-signature.yaml`\nfor future missions to corroborate.\n\n### Step C-3 — Session end\n\nAfter ingest and any pattern commits complete, call:\n\n```\nmcp__crystalium__session_end()\n```\n\nThis triggers Dream consolidation asynchronously. Call once per mission\ncompletion.\n\n**Graceful skip:** if `mcp__crystalium__*` tools are unavailable (CRYSTALIUM\nnot installed), proceed without memory — skip Steps C-1 through C-3 and mark\nPhase L complete normally. Never hard-fail on absent CRYSTALIUM tools.\n\n---\n\n## Authority-Specific Output Rules\n\n| Authority | What VIGIL emits |\n|-----------|------------------|\n| `read-only` | `root-cause-report.md` with simulated interventions described textually; `[ROOT-CAUSE]` downgraded to `[HYPOTHESIS-N]` with HIGH flag; no `verified-patch.diff` |\n| `sandbox` | `root-cause-report.md` with executed interventions; `[ROOT-CAUSE]` with H\u002FM confidence; `verified-patch.diff` if survivor was code-change type |\n| `write` | Same as sandbox + `verified-patch.diff` ready for application to working branch |\n\nWrite authority does NOT grant VIGIL permission to auto-apply patches. Application is a downstream step performed explicitly, by APIVR-Δ or human.\n\n---\n\n## Pitfalls\n\n- **Emitting `[ROOT-CAUSE]` without counterfactual flip.** Never. If the survivor was `no hypothesis flipped`, there is no `[ROOT-CAUSE]` — emit escalation.\n- **Recommending improvements beyond the verified fix.** VIGIL attributes; it does not design. Broader improvements go to SPECTRA as a separate mission.\n- **Skipping walk-back.** The originating commit is the most valuable information for future prevention. Don't drop it.\n- **Failing to de-duplicate memory.** Signature bloat erodes the memory's value. Always query first.\n- **Routing wrongly.** A spec defect sent to APIVR-Δ wastes cycles — APIVR-Δ can't fix specs. Route by classification, not by convention.\n\n---\n\n*VIGIL Phase L — attribute, patch if authorized, preserve the lesson, emit ECL envelope*\n","# SKILL: Learn — emit the verified finding, preserve the lesson\n\n## When to use\n\nLoad when `intervention-log.md` has a SURVIVOR with counterfactual flip. Unload after `root-cause-report.md` is schema-valid and memory entry is written.\n\n---\n\n## Contract\n\n| Field | Value |\n|-------|-------|\n| LLM calls permitted | For composing the root-cause report and the failure-signature abstraction |\n| Tool budget | ≤15% of mission budget |\n| Outputs | `root-cause-report.md` (primary), `verified-patch.diff` (conditional), `failure-signature.yaml` (memory entry), handoff pointer |\n\n---\n\n## The Four Deliverables\n\n### 1. `root-cause-report.md` — primary, always\n\nSchema-validated per `schemas\u002Froot-cause-report.v1.json`. Fills `templates\u002Froot-cause-report.md`.\n\nCore sections:\n\n- **Summary** — one-sentence statement of the root cause\n- **Findings** — `[FINDING-NNN]` records following the team-wide ATLAS schema\n- **Evidence chain** — reproduction → IDG → intervention → flip\n- **Root cause walk-back** — commit\u002Fdecision trail that introduced the defect\n- **Recommended fix** — cited by reference to `verified-patch.diff` if present\n- **Handoff directive** — downstream recipient with rationale\n- **Telemetry** — tokens, tool calls, interventions used, wall clock\n\n### 2. `verified-patch.diff` — conditional\n\nEmitted when:\n\n- Authority ≥ `sandbox`\n- Survivor intervention was a `code_change` type (not oracle injection \u002F state correction)\n- Patch scope ≤3 files and passes minimum-intervention review\n\nNot emitted when:\n\n- Authority = `read-only` (patches are simulated, described textually)\n- Survivor was a non-code-change intervention (downstream fixer must translate)\n- Root cause is `SPEC_DEFECT` (no code patch exists — SPECTRA receives this)\n\n### 3. `failure-signature.yaml` — semantic memory entry\n\nAdded to the persistent memory ledger for future de-duplication. Purpose: if a related failure recurs, VIGIL (or any team member) can retrieve the prior attribution and its fix instead of re-investigating from scratch.\n\n### 4. Handoff directive\n\nA single structured pointer indicating which downstream Eidolon receives this finding and why.\n\n---\n\n## Root-Cause Walk-Back\n\nThe counterfactual intervention identifies *where* the defect lives. The walk-back identifies *when and why* it got there.\n\nProcedure:\n\n1. **Git blame the surviving intervention's target**\n   ```\n   git log --follow -p \u003Cpath> | grep -B 5 \u003Crelevant line>\n   ```\n   Identify the commit(s) that introduced the defective code.\n\n2. **Read the commit message and PR\u002Fissue** (if available)\n   - What problem was it trying to solve?\n   - Was there a spec? Did it change?\n   - Was there a review? What was discussed?\n\n3. **Classify the originating decision**\n\n   | Classification | Meaning | Downstream route |\n   |----------------|---------|------------------|\n   | **Implementation bug** | Spec was clear; code diverged from spec | APIVR-Δ for surgical fix |\n   | **Spec defect** | Spec itself was wrong or ambiguous | SPECTRA to revise spec |\n   | **Contract drift** | Internal contract changed without migration | SPECTRA for planned migration; APIVR-Δ for per-caller patch |\n   | **Upstream dep change** | External dependency changed behavior | APIVR-Δ to pin\u002Fadapt; IDG to document |\n   | **Missing test** | Defect introduced earlier; only surfaced now | APIVR-Δ to add the missing test + fix |\n   | **Environment drift** | Code correct but env\u002Fconfig caused failure | human or APIVR-Δ (if env-as-code) |\n\n4. **Emit the walk-back** as a `[FINDING]` subsection:\n\n   ```markdown\n   ### Originating Decision\n\n   [FINDING-007] The defect was introduced in commit `abc123` (2026-03-14),\n   which replaced `SecureRandom.uuid` with `generate_uuid(session)` to\n   scope tokens to sessions. The replacement function returns `nil` when\n   `session.secret_key` is absent, a case not covered by the commit's tests.\n\n   - evidence:\n     - path: app\u002Fflows\u002Frecord_vote.rb\n       lines: 56\n       excerpt_ref: memex:\u002F\u002Fexcerpt\u002F\u003Chash>\n     - commit: abc123\n       message: \"Scope ballot tokens to sessions\"\n       pr: #472\n   - classification: implementation_bug\n   - downstream_route: APIVR-Δ (surgical fix)\n   - confidence: H\n   ```\n\n---\n\n## Finding Emission — Team-Wide Schema\n\nVIGIL inherits ATLAS's `FINDING-NNN` schema. Every factual claim in the report maps to a finding record:\n\n```yaml\nFINDING-001:\n  claim: \"generate_uuid returns nil when session.secret_key is absent.\"\n  evidence:\n    - path: app\u002Futils\u002Fuuid_gen.rb\n      lines: 12-18\n      excerpt_ref: memex:\u002F\u002Fexcerpt\u002F\u003Chash>\n  confidence: H\n  counterfactual_result: FLIPPED\n  intervention_id: I-001\n```\n\n**Confidence rules for Learn:**\n\n| Tier | Condition |\n|------|-----------|\n| `H` | Deterministic reproduction + counterfactual FLIPPED + clean IDG (single root, no disputed edges) |\n| `M` | Statistical reproduction (≥0.85 CI) + FLIPPED at ≥4\u002F5; OR deterministic FLIPPED but one disputed IDG edge |\n| `L` | Not admissible for `[ROOT-CAUSE]`. Only allowed in escalation briefs as `[HYPOTHESIS-N]`. |\n\n---\n\n## `failure-signature.yaml` — Memory Entry\n\nStructured for matchability against future failures. Written to the semantic memory ledger (typically `memories\u002Fvigil-failures.yaml` in the host project).\n\n```yaml\nsignature_id: VSIG-YYYYMMDD-NNN\nnormalized_error: \"ballot.token = nil at RecordVote#call\"\nerror_class: LOGIC_ERROR\nkey_frames:\n  - \"RecordVote#call\"\n  - \"TokenGenerator#generate_uuid\"\n  - \"Session#secret_key\"\nroot_cause_summary: |\n  generate_uuid returns nil when session.secret_key is absent;\n  callers must check for nil or supply a fallback.\nroot_cause_path: app\u002Futils\u002Fuuid_gen.rb:12-18\noriginating_commit: abc123\ncategory: LOGIC_ERROR\nsubcategory: null-guard-missing\nintervention_pattern: |\n  Add nil-coalescing fallback at call site OR raise in generator on\n  nil input.\nfirst_seen: 2026-04-16\nfrequency: 1                    # incremented on future matches\nrelated_signatures: []          # populated if matched to prior entries\ndownstream_route: APIVR-Delta\nmission_ref: VIGIL-20260416-001\n```\n\n### De-duplication protocol\n\nBefore writing, query existing memory for signatures matching on:\n\n1. `error_class` exact match\n2. `key_frames` overlap ≥2 frames\n3. `root_cause_path` prefix match\n\nIf match found:\n- Increment `frequency`\n- Append current `mission_ref` to the existing entry\n- Add current entry to `related_signatures` bidirectionally\n- Do NOT create a new signature\n\nIf no match: write new entry.\n\nThe ledger has a recency-weighted cap (default 50 entries); older entries with `frequency = 1` are archived during consolidation.\n\n---\n\n## Handoff Directive\n\nSingle structured block at the end of `root-cause-report.md`:\n\n```yaml\nhandoff:\n  primary_recipient: APIVR-Delta | SPECTRA | IDG | FORGE | human\n  rationale: \"One-sentence reason for routing\"\n  artifact_path: \"\u003Cpath to root-cause-report.md>\"\n  supplementary_artifacts:\n    - verified-patch.diff\n    - intervention-log.md\n  fallback_recipient: human\n```\n\nRouting rules:\n\n| Root-cause classification | Primary | Fallback |\n|---------------------------|---------|----------|\n| Implementation bug, patch emitted | APIVR-Δ | human |\n| Implementation bug, no patch (authority=read-only) | APIVR-Δ | human |\n| Spec defect | SPECTRA | human |\n| Contract drift requiring migration | SPECTRA | APIVR-Δ |\n| Env\u002Fconfig issue | human | APIVR-Δ (if env-as-code) |\n| Needs incident chronicling | IDG (in parallel) | — |\n| Ambiguous after escalation | FORGE | human |\n\nIDG is always invoked *in parallel* for high-severity failures (user-facing incidents, production regressions). VIGIL does not chronicle — IDG does — but VIGIL's report is IDG's input.\n\n---\n\n## Envelope Emission\n\nAfter the handoff directive is written, emit the ECL v2.0 envelope sidecar(s) per I-11 and ECL §1. This step is mandatory for VIGIL on all inter-Eidolon hand-offs.\n\n### Step 1 — Compute payload SHA-256\n\n```\nsha256sum root-cause-report-\u003Cmission-id>.md | awk '{print $1}'\n# macOS: shasum -a 256 root-cause-report-\u003Cmission-id>.md | awk '{print $1}'\n```\n\nRecord the hex digest (64 lowercase hex characters).\n\n### Step 2 — Generate message_id and resolve thread_id\n\n- Generate a UUIDv7 (or UUIDv4) as the `message_id` for this envelope.\n- `thread_id`: reuse the inbound envelope's `thread_id` if this mission was entered via escalation (APIVR-Δ → VIGIL) — the thread_id carries through the escalation chain. Generate a new UUID on first emit for consultant or post-hoc missions.\n- `parent_id`: set to the inbound envelope's `message_id` on escalation entry; `null` on consultant\u002Fpost-hoc first emit.\n\n### Step 3 — Fan-out: one envelope per recipient\n\nWhen the handoff routes to multiple recipients (e.g. SPEC_DEFECT → SPECTRA + IDG in parallel):\n\n1. Write the payload `root-cause-report-\u003Cmission-id>.md` **once**.\n2. For each recipient, write a **separate** envelope file:\n   - `root-cause-report-\u003Cmission-id>.envelope.apivr.json`\n   - `root-cause-report-\u003Cmission-id>.envelope.spectra.json`\n   - `root-cause-report-\u003Cmission-id>.envelope.idg.json`\n3. Each envelope has a **distinct** `message_id`; all share the same `thread_id` and `parent_id`.\n4. `artifact.sha256` and `artifact.size_bytes` are identical across all envelopes (same payload bytes).\n5. `constraints.trust_level` MUST differ by contract:\n   - `vigil-to-apivr`: `\"high\"`\n   - `vigil-to-spectra`: `\"high\"`\n   - `vigil-to-idg`: `\"standard\"`\n6. `ise.assertion_grade` (ECL v2.0 §6.5) is set **once per report, identically on every fan-out copy** — it describes how the payload was produced, not who receives it. See `skills\u002Fintervene\u002FSKILL.md` § ISE Grade on the Root-Cause Report for the `validated` \u002F `self-attested` rule. `ise.receiver_authorization` is `{auto_route: true, auto_merge: false, auto_deploy: false}` on every envelope.\n\nFill all fields from `templates\u002Froot-cause-report.envelope.json`. The `objective` field MUST be ≤240 characters. The `context_delta.summary` MUST be ≤200 tokens (heuristic: ≤800 chars using `chars\u002F4`). If `tokens_used > 4000`, warn (do not abort).\n\n### Step 4 — Append emit trace events\n\nFor each envelope written, append one JSONL line to `.eidolons\u002F.trace\u002F\u003Cthread_id>.jsonl` **relative to the consumer project root** (not the VIGIL install target). Create the `.eidolons\u002F.trace\u002F` directory if absent.\n\n```jsonl\n{\"ts\":\"\u003CRFC3339>\",\"event\":\"emit\",\"message_id\":\"\u003Cuuid>\",\"thread_id\":\"\u003Cuuid>\",\"from\":\"vigil@\u003Cversion>\",\"to\":\"\u003Crecipient>@\u003Cversion>\",\"performative\":\"PROPOSE\",\"integrity_method\":\"sha256\",\"context_tokens\":\u003Cint>,\"model\":\"\u003Chost model>\",\"tier\":\"standard\"}\n```\n\n### Step 5 — Escalation-brief envelope (budget exhausted)\n\nOn budget exhaustion (5 interventions, no FLIPPED result), the escalation-brief sidecar uses `templates\u002Fescalation-brief.envelope.json`:\n- `performative`: `\"ESCALATE\"`\n- `to.eidolon`: `\"forge\"` (lateral consult per roster `vigil.handoffs.lateral`)\n- `edge_origin`: `\"roster\"` (the `vigil → forge` edge is declared in `roster\u002Findex.yaml`)\n- `assumptions[]` MUST include `\"trigger: budget-exhausted-no-flip\"` (ECL §2.2.3)\n- `ise.assertion_grade`: always `\"self-attested\"` (ECL v2.0 §6.5) — budget exhaustion with no flip is VIGIL's own bounded-failure judgement, not an externally-gated pass. `ise.receiver_authorization`: `{auto_route: true, auto_merge: false, auto_deploy: false}`.\n\nTrace the emit event to `.eidolons\u002F.trace\u002F\u003Cthread_id>.jsonl` as above, with `performative: \"ESCALATE\"`.\n\n## CRYSTALIUM Memory — ingest, learned-pattern commit, session end\n\nAfter the ECL envelope(s) are emitted (Steps 1–5 above), persist the handoff\nand any reusable debugging lessons to CRYSTALIUM.\n\n### Step C-1 — Ingest (primary persist path)\n\n```\nmcp__crystalium__ingest(\n  envelope = \u003Cthe validated root-cause-report.envelope.json contents>,\n  payload  = \u003Croot-cause-report.md contents>\n)\n```\n\nThis records the root-cause-report at T1 with full ECL provenance\n(`from.eidolon=vigil` drives tier derivation; `integrity.value` is stored as\n`provenance.content_hash`). The authority flag (I-6) governs codebase writes,\nnot memory substrate access — calling CRYSTALIUM tools is explicitly allowed\nunder all authority modes.\n\n### Step C-2 — Learned-pattern commit (VIGIL extension)\n\nThe Learn phase distils reusable lessons. For each corroborated debugging\npattern surfaced during this mission — a root-cause category, an isolation\ntechnique that proved effective, or an intervention shape that reliably\nflips this class of failure — commit it directly:\n\n```\nmcp__crystalium__commit(\n  layer      = \"procedural\",    # use \"semantic\" for root-cause class knowledge\n  payload    = \u003Cthe learned pattern — concise, matchable on future recall>,\n  provenance = { author_agent: \"vigil\", mission_id: \u003CMISSION-ID> }\n)\n```\n\n**Layer guidance:**\n\n| Content | Layer |\n|---------|-------|\n| Reusable isolation \u002F intervention technique for a failure class | `procedural` |\n| Categorical root-cause knowledge (what pattern causes this signature) | `semantic` |\n| Raw mid-cycle observation not yet generalised | `episodic` |\n\n`author_agent` MUST be `\"vigil\"` on every direct commit. These entries feed\nDream's episodic→semantic promotion gate (corroboration threshold ≥2 across\nmissions).\n\nCommit only patterns corroborated by the counterfactual flip. Speculative\npatterns MUST NOT be committed here — record them in `failure-signature.yaml`\nfor future missions to corroborate.\n\n### Step C-3 — Session end\n\nAfter ingest and any pattern commits complete, call:\n\n```\nmcp__crystalium__session_end()\n```\n\nThis triggers Dream consolidation asynchronously. Call once per mission\ncompletion.\n\n**Graceful skip:** if `mcp__crystalium__*` tools are unavailable (CRYSTALIUM\nnot installed), proceed without memory — skip Steps C-1 through C-3 and mark\nPhase L complete normally. Never hard-fail on absent CRYSTALIUM tools.\n\n---\n\n## Authority-Specific Output Rules\n\n| Authority | What VIGIL emits |\n|-----------|------------------|\n| `read-only` | `root-cause-report.md` with simulated interventions described textually; `[ROOT-CAUSE]` downgraded to `[HYPOTHESIS-N]` with HIGH flag; no `verified-patch.diff` |\n| `sandbox` | `root-cause-report.md` with executed interventions; `[ROOT-CAUSE]` with H\u002FM confidence; `verified-patch.diff` if survivor was code-change type |\n| `write` | Same as sandbox + `verified-patch.diff` ready for application to working branch |\n\nWrite authority does NOT grant VIGIL permission to auto-apply patches. Application is a downstream step performed explicitly, by APIVR-Δ or human.\n\n---\n\n## Pitfalls\n\n- **Emitting `[ROOT-CAUSE]` without counterfactual flip.** Never. If the survivor was `no hypothesis flipped`, there is no `[ROOT-CAUSE]` — emit escalation.\n- **Recommending improvements beyond the verified fix.** VIGIL attributes; it does not design. Broader improvements go to SPECTRA as a separate mission.\n- **Skipping walk-back.** The originating commit is the most valuable information for future prevention. Don't drop it.\n- **Failing to de-duplicate memory.** Signature bloat erodes the memory's value. Always query first.\n- **Routing wrongly.** A spec defect sent to APIVR-Δ wastes cycles — APIVR-Δ can't fix specs. Route by classification, not by convention.\n\n---\n\n*VIGIL Phase L — attribute, patch if authorized, preserve the lesson, emit ECL envelope*\n",{"name":5,"metadata":24,"description":7,"allowed-tools":27},{"phase":25,"methodology":26},"L","VIGIL","git_log, view_file, memory_write, memory_query, schema_validate","main","38c3a82583abf9806de764f89ac0099ad690933a",".eidolons\u002Fvigil\u002Fskills\u002Flearn",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":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Rynaro\u002Fmagicite --skill vigil-learn",{"tool":43,"command":44},"bunx","bunx skills add Rynaro\u002Fmagicite --skill vigil-learn",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Rynaro\u002Fmagicite --skill vigil-learn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRynaro\u002Fmagicite\u002Fblob\u002Fmain\u002F.eidolons\u002Fvigil\u002Fskills\u002Flearn\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"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":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"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":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"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":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"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":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"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",[],[]]