# Observable Skill runtime

Treat the run trace as canonical execution evidence, not optional commentary.

## Start

1. Call `list_skill_packages`.
2. If `elser-studio@0.4.1` is absent, call `register_skill_package` with the exact bundled manifest.
3. Call `start_skill_run` before the first project mutation or generation submission.
4. Freeze the user request and target ids in `input`.
5. Declare only gates required by the requested scope.

Recommended gate ids:

- `scope_resolved`
- `canon_read`
- `story_structure_reviewed`
- `reference_policy_verified`
- `references_assembled`
- `prompt_quality_passed`
- `media_tasks_terminal`
- `take_review_completed`
- `canvas_synchronized`

## Update

- Call `update_skill_run` with `moduleId` immediately after loading a root or domain module.
- Record each quality gate with concrete evidence. A task status alone is not visual take evidence.
- Record a degradation before taking any fallback, including manual script replacement, reduced media scope, missing review access, provider substitution, timeout, or skipped gate.
- Resolve a degradation only when the original requirement is restored. Otherwise finish the run as `degraded` or `failed`.

## Finish

`finish_skill_run(status=completed)` is intentionally rejected when a required gate is not passed or a degradation remains unresolved. Do not weaken the gate list after execution to manufacture success.

The desktop materializes each run as a standard text node so an already-open canvas shows loaded modules, gate outcomes, degradations, and terminal status without requiring a reload.
