Observed Invocation Loop

SkillMonitoring & ops

Observed Invocation Loop wraps Arcanum-managed skill, sigil, and spell invocations with a guaranteed post-run observability handoff. It turns each managed invocation into a safe invocation envelope, appends exactly one telemetry signal, updates reflection counters, and routes to reflection when configured thresholds are met.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Observed Invocation Loop skill

What this skill tells your AI

The instructions your AI receives, as published by cyberalchemyai/arcanum in .claude/skills/observed-invocation-loop/SKILL.md and read by ahel’s review.

Identity

  • Canonical ID: observed-invocation-loop
  • Aliases: Capability Observability Loop
  • Scope: library
  • Status: baseline-ready

Status boundary: baseline-ready means the repository-local Codex command surface, generic observer, reflection routing, threshold scoping, dedupe safety, Stop-hook closeout status, and legacy ledger migration checks have passing evidence. The old .arcanum/runtimes/ adapter-folder model is not part of this status boundary.

Purpose

Observed Invocation Loop wraps Arcanum-managed skill, sigil, and spell invocations with a guaranteed post-run observability handoff. It turns each managed invocation into a safe invocation envelope, appends exactly one telemetry signal, updates reflection counters, and routes to reflection when configured thresholds are met.

The spell does not replace experiment-harness. Experiment Harness remains a validation-loop producer. This spell owns the general invocation path.

The observability handoff is hook-first. Telemetry emission must be enforced by Codex hooks, wrappers, or deterministic command runners wherever possible; agent-authored closeout text is useful evidence, but it must not be the only mechanism that appends telemetry.

Trigger Conditions

  • A skill, sigil, or spell is invoked through an Arcanum Codex command, hook, wrapper, or orchestration layer.
  • A maintainer needs confidence that capability telemetry was appended after a run.
  • Reflection thresholds should be evaluated after real usage.
  • A reusable capability needs evidence-backed maintenance without forcing every run through the experiment harness.

Required Sigils

SigilRole In SpellRequired Mode
signal-observerRead or receive an invocation envelope, append telemetry, update reflection counters, and emit reflection recommendation.observe
workflow-reflectAnalyze accumulated telemetry and write a reflection report when thresholds or manual routing require it.reflect

Optional Sigils

SigilUse WhenNotes
observability-setupThe repository does not yet have .arcanum/observability/.Install or repair the observability package before strict telemetry is required.
sigil-developmentReflection proposes a sigil update and the user approves mutation.Reflection itself remains non-mutating.
spellcraftReflection proposes a spell update and the user approves mutation.Spell lifecycle execution stays outside this spell.
decision-gateTelemetry strictness, privacy, or reflection routing has a blocker-level ambiguity.Use only for consequential unresolved choices.

Prerequisites

  • Invocation is routed through an Arcanum-managed Codex command, hook, orchestrator, or wrapper.
  • The managed adapter or hook is responsible for observation closeout; agent attention is only a fallback/manual repair path.
  • Repository observability exists at .arcanum/observability/, or the run explicitly allows telemetry to be skipped.
  • The invoked capability can provide enough post-run evidence to assemble an invocation envelope.
  • Privacy rules permit storing summaries, paths, validation state, and signal metadata.

Shared State

StateOwnerUpdated ByConsumed By
invocation envelopeCodex hook or wrappercapability wrappersignal-observer
central signal ledgerobservability packagesignal-observerworkflow-reflect, maintainers
hook operations ledgerobservability packageobserver/reflection hookshook-health review
reflection stateobservability packagesignal-observer, workflow-reflectthreshold evaluator
reflection reportsobservability packageworkflow-reflectsigil-development, spellcraft, maintainers

Execution Phases

PhaseSigilInputOutputGateFailure Policy
1Codex command or hookuser request and target capabilityobserved run metadatatarget capability resolvedblock if capability cannot be resolved
2target capabilitymanaged invocation contextprimary capability resultprimary run completed, blocked, or failed with evidencereturn primary result honestly
3Codex hook or wrapperprimary result and metadatainvocation envelopeenvelope has required fields and no sensitive raw contentflag when telemetry is skipped; block only if strict mode requires telemetry
4signal-observerinvocation envelopetelemetry row and threshold recommendationexactly one append or deduped skipnever hide primary result unless strict telemetry mode is active
5workflow-reflecttelemetry ledger and threshold resultreflection report or insufficient-signal resultonly run on threshold or manual requestskip when no threshold and no manual reflection request
6spell closeoutphase outputsobserved invocation resultprimary result and observability state are reportedflag unresolved telemetry or reflection gaps

Gates

GateRequired EvidenceResult
managed invocationcapability ran through Arcanum command, hook, wrapper, or orchestratorpass or block
envelope validitytimestamp, capability id, kind, mode, execution status, outputs, validation, observer evidencepass or flag
telemetry appendledger append, dedupe skip, or explicit skipped reasonpass, flag, or block in strict mode
threshold evaluationreflection trigger and recommendation recordedpass or flag
reflection routereport written, skipped with reason, or queuedpass or flag
hook enforcementCodex hook or deterministic wrapper performed the observation handoffpass or flag

Native Runtime And Hook Contract

Arcanum-managed runtime packages and explicit legacy command adapters must make observer envelope setup task zero. Native agent receipts, Codex hooks, and deterministic handoff wrappers perform the observability handoff. tools/arcanum --exec --adapter native-skill may prepare receipt metadata, but native skill/subagent execution remains the primary runtime surface. The system must not rely on the agent remembering to call signal-observer.

Required phases:

PhaseResponsibilityRequired Evidence
startResolve capability id, kind, tier, mode, request summary, and run id.observed run metadata or equivalent local variables
executeRun or dry-run the target capability while preserving the primary result.primary status, outputs, changed files, validation
envelopeAssemble a privacy-safe invocation envelope.capability.id, capability.kind, legacy sigil, execution status, observer fields
observeCall framework/observability/scripts/observe-invocation.sh.OBSERVATION, LEDGER, LEDGER_LINE, REFLECTION_TRIGGER, RECOMMENDATION, DEDUPE_KEY
reflectIf enabled and recommended, call framework/observability/scripts/reflect-invocation-signals.sh.report path or skipped reason
closeoutReturn primary result plus telemetry status.observed invocation result

Required capability kinds:

KindExample AdapterRequired capability.kind
skillgenerated native package such as arcanum-orchestrate/SKILL.mdskill
sigilgenerated native package such as arcanum-sigil-signal-observer/SKILL.mdsigil
spellgenerated native package such as arcanum-spell-invoke/SKILL.mdspell

Adapter controls:

  • OBSERVED_INVOCATION_STRICT=1: telemetry append failure blocks closeout.
  • OBSERVED_REFLECT=off|auto|always: controls reflection report execution.
  • Manual observer calls are allowed for diagnostics only and do not satisfy hook-enforcement evidence.
  • signals/sigil-invocations.jsonl is the telemetry and dedupe recovery source of truth. by-sigil/ and by-capability/ contain compact indexes that can be rebuilt from the central ledger.

Automatic Attachment

OIL should be attached through Arcanum runtime package generation, not by hand-editing each generated package or command. The propagation owner is the runtime installer/generator: when it creates or refreshes a native package or explicit legacy Codex command, the artifact must include observer envelope task-zero metadata and the installed hooks must be present.

Recommended generated marker:

<!-- arcanum:capability-id <id> -->
<!-- arcanum:capability-kind <skill|sigil|spell> -->
<!-- arcanum:capability-tier <tier> -->
<!-- arcanum:capability-alias <alias> -->
<!-- arcanum:command <command> -->

Generated native packages are the installed runtime surface. Legacy Codex commands are compatibility adapters only:

  • native package: host-specific skill directory such as $CODEX_HOME/skills/<package>/SKILL.md, .github/skills/<package>/SKILL.md, or .claude/skills/<package>/SKILL.md
  • legacy command: .codex/commands/<command>.md
  • legacy bare-id alias for sigils and spells: .codex/commands/<id>.md
  • hook config: .codex/hooks.json
  • hook scripts: .codex/hooks/
  • required closeout: UserPromptSubmit opens the envelope, PostToolUse records evidence, Stop closes through observe-invocation.sh

Prefixed names such as arcanum-spell-invoke remain stable compatibility names. Bare aliases such as invoke and interrogation are preferred user-facing package names when the host runtime supports them and there is no collision.

Existing adapters should be refreshed idempotently by marker block. If a file has local changes and no safe marker insertion point, report a conflict instead of overwriting.

Local Customization

  • Spell root: .arcanum/spells/
  • Local paths: .arcanum/observability/
  • Gate strictness: standard by default; strict mode may block when telemetry cannot be appended.
  • Interaction mode: guided-auto for managed Codex commands.

Observability

Record spell-level telemetry when .arcanum/observability/ exists:

  • target capability id and kind,
  • invocation mode,
  • primary execution status,
  • envelope path,
  • telemetry append status,
  • dedupe status,
  • reflection trigger,
  • reflection report path or skip reason,
  • follow-up route.

Output Contract

Return:

## Observed Invocation Loop Result

- Spell: observed-invocation-loop
- Capability: <id>
- Capability kind: skill | sigil | spell
- Mode: <mode>
- Primary status: pass | flag | block | fail
- Envelope: <path or n/a>
- Telemetry: recorded | deduped | skipped | failed
- Ledger: <path or n/a>
- Reflection trigger: none | manual | usage-threshold | output-threshold | gap-threshold | severe-gap
- Reflection: report written | skipped | queued | failed
- Report: <path or n/a>
- Next route: none | workflow-reflect | sigil-development | spellcraft | decision-gate

Signals

GitHub stars
25
Forks
3
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
observed-invocation-loop
Source
github.com/cyberalchemyai/arcanum