[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71S2WCK6YYDW5NHKZK7E3B5":3,"skill-same:01M71S2WCK6YYDW5NHKZK7E3B5":71},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M71S2WCK6YYDW5NHKZK7E3B5","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\u002Fprisma","Rynaro","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5271543?v=4","01M70CFYFMB316W23THVQAQ42M","Henrique A. Lavezzo","01M71RXA8ZHEPZR3GERY09ERGD",1,"MIT","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvigil\u002Fskills\u002Flearn\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"vigil learn","learn","vigil","query","phase","semantic memory","for","verified","de","chain","duplication","handoff","back","log","evidence","view","write","decision","git","memory","2026-11-10 13:02:02",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":44,"description":7,"allowed-tools":47},{"phase":45,"methodology":46},"L","VIGIL","git_log, view_file, memory_write, memory_query, schema_validate","main","42ce382409178ece647a93f841a86119e8d74a65",".eidolons\u002Fvigil\u002Fskills\u002Flearn",0,"https:\u002F\u002Fgithub.com\u002FRynaro\u002Fprisma","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-18 20:39:25",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add Rynaro\u002Fprisma --skill vigil-learn",{"tool":63,"command":64},"bunx","bunx skills add Rynaro\u002Fprisma --skill vigil-learn",{"tool":66,"command":67},"pnpm","pnpm dlx skills add Rynaro\u002Fprisma --skill vigil-learn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRynaro\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvigil\u002Fskills\u002Flearn\u002FSKILL.md",true,[],[72,97,126,151,179,200],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":39},"01M71S3X05FSJA01D22MH39Y0W","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\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fverify-incoming\u002FSKILL.md",[],[79,80,81,82,83,84,85,86,87,31,88,89,90,91,92,93,94,95,25,96],"verify","vivi verify incoming","verify incoming","run","sha-256","json","orchestrator","process","dispatch","message","upstream","id","receiver","block","ecl","hand","load","when",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":108,"publishedAt":39},"01M71S3S2E46S6AZEV07AJ75TK","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\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fparallel-tracks\u002FSKILL.md",[103],{"categoryNo":104,"categoryName":105,"taxonomyType":106,"taxonomyTypeDesc":107},"01JBSEEDCAT000000000000040","财务","PROFESSION","适用职业",[109,110,111,112,113,114,115,116,117,118,119,120,121,95,122,123,124,125,23,96],"parallel","tracks","parallel tracks","vivi parallel tracks","file","only","reflection","clean","plan phase","as","verifier","form","multi","worktree isolation","track","gating","single",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":39},"01M71S3N09VY1H2QHXXP4SKY2X","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\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmethodology\u002FSKILL.md",[],[133,134,135,136,137,138,33,139,140,141,142,143,144,145,146,147,148,149,150,96],"methodology","vivi methodology","planning","escalation","Rules","use","complexity","delta","task","cycle","feature implementation","brownfield","full","requirements","feature","complete","thresholds","you",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":162,"publishedAt":39},"01M71S3GT0M84EHZ2SJZKV61N9","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\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Fmemory-management\u002FSKILL.md",[157],{"categoryNo":158,"categoryName":159,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[38,163,164,165,166,167,168,169,35,170,171,172,173,174,175,176,150,177,178,96],"management","memory management","vivi memory management","MCP","commit","tasks","plan","never","files","route","across","local","end","session start","standalone","at",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":39},"01M71S3E067YRRFH7304VYYF32","vivi-loop-native","Load in Vivi's V (Verify) phase. The core capability that distinguishes Vivi from its predecessor APIVR-Δ: drive the closed, autonomous, bounded edit-run-test loop (`eidolons sandbox loop`) as its `--fix-hook`, consuming localized feedback, retrying in fresh context, refusing to game the tests, and gating on pass^k. Use whenever the task has an executable test oracle and a loop-competent host.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Floop-native\u002FSKILL.md",[],[186,187,188,189,190,191,192,193,194,195,196,138,141,197,118,198,199,95,124,23],"loop","native","vivi loop native","oracle","sandbox","test","core","game","feedback","autonomous","fix","tests","fresh","host",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":206,"publishedAt":39},"01M71S3AEKYH0JD0CFJ4GHA98E","vivi-failure-recovery","Load when the Vivi Verify phase produces failures — test fails, lint error, build break, or three consecutive unsuccessful attempts at the same category. Provides the failure classification taxonomy, bounded debugging protocol, and escalation thresholds. Use to avoid the 'random retries' anti-pattern.","https:\u002F\u002Fgithub.com\u002FRynaro\u002Fprisma\u002Fblob\u002Fmain\u002F.eidolons\u002Fvivi\u002Fskills\u002Ffailure-recovery\u002FSKILL.md",[],[207,208,209,136,210,211,138,212,213,149,214,215,216,95,178,217,218,23,96,219],"recovery","vivi failure recovery","debugging","classification","taxonomy","three","pattern","error","retries","random","break","bounded","same"]