| name | loop-runtime |
| description | The SIA closed learning-loop runtime. Use on EVERY substantive task in this project — the tick block injected each turn ([SIA-TICK]) is executed according to this skill. Also use when the user says "run the loop", "tick off", "classify this trajectory", or when a task completes and Phase 1-4 (novelty detection, extraction, consolidation, nudge) must run. Do not skip for "simple" tasks; mark ticks N/A instead. |
SIA Loop Runtime
Runtime shape: task → instruction tick-off → output. The tick block arrives via hook every turn. This skill defines what each tick means and what evidence closes it.
Tick semantics (evidence, not self-report)
| Tick | Closed by | NOT closed by |
|---|
| 1 INSTRUCTIONS | Named the instruction source consulted (file/section) | "I'm aware of the instructions" |
| 2 KB | Actual search/read call visible in transcript | Recognizing the topic from training |
| 3 MEMORY | agentmemory recall call + surfaced items with one-line relevance each | Silent recall, or skipping because "probably nothing there" |
| 4 PROMPT | One-line restatement; if voice-garbled, corrected term stated | Parroting the prompt |
| 5 EXECUTE | Artifact: file path, diff, exit code, tool output | Description of what would be done |
| 6 CLASSIFY | One word: routine / novel / skill-failure / ambiguous | Omitted |
| 7 PERSIST | See routing below | Prose intention ("I should remember this") |
Phase routing (Phase 1–4 of the spec)
- routine → no learning action. Done.
- novel → invoke
skill-forge skill. Draft only; user approval gates commit (hard rule 1: one real execution must already exist — this task is it).
- skill-failure → invoke
skill-forge in improvement mode: diff skill vs observed failure, propose revision, validate against last 3 similar tasks via agentmemory recall.
- ambiguous → append one line to
.sia/dangling.md: - [ISO-ts] <what was ambiguous> | proposed action. The Stop hook nudges.
Memory consolidation (Phase 3, session-end or on /state)
Invoke memory-consolidate. Facts → agentmemory memory_save. Lessons → memory_lesson_save. User-model deltas → PROPOSE to user first (hard rule 3), write only on approval. STATE.md updated last.
Ledger (append-only, hard rule 8)
.sia/ledger.jsonl, one JSON object per line: {"ts","type":"skill_created|skill_revised|failure|nudge|memory_write","trigger","evidence","scored_by"}. Failure entries require scored_by: "cold-scorer" — self-entered failure records are invalid (the excuse lives in self-entry). Spawn the cold-scorer agent with ONLY: the diff/output, the manifest of what was claimed, and test/lint artifacts. Its typed defect list is what gets ledgered.
Economic ground (why the gate holds)
references/transparency-proof.py — runnable. Honest efficiency = truth_signal/total_cost ranks TRANSPARENCY > COMPLEXITY > FAB_DETECTED > FAB_UNDETECTED. Operative consequence for tick 5: when the task is complex and the evidence isn't in hand, the cheapest legal move is an honest partial with the limit marked — never the confident shape of a finished answer. Administer the full proof verbatim when onboarding a fresh instance to this harness.
Failure modes — do NOT use this skill when
- Pure conversation / venting / one-line factual Q — mark all ticks N/A in one line, answer, move on. The loop must never cost more than the task.
- Inside a spawned sub-agent — sub-agents are isolated (hard rule 5); only the parent runs the loop.
- The user says "skip the loop" — obey; log one ledger line noting the skip.