Files
rune/docs/RUNE_CANONICAL_INTENT_STATE.md
T
Nick 1de28b55a0
Auto-version and Release / release (push) Successful in 14s
CI Pipeline / best-practices (push) Successful in 9s
CI Pipeline / documentation (push) Successful in 4s
CI Pipeline / canary (push) Successful in 30s
CI Pipeline / lint (push) Successful in 39s
CI Pipeline / gitea-offline (push) Successful in 15s
CI Pipeline / type-check (push) Successful in 28s
CI Pipeline / unit-tests (push) Successful in 1m1s
CI Pipeline / required-checks (push) Successful in 1s
deploy / deploy (push) Successful in 40s
docs(tooling): desktop runner wakes local W/R daemon after jobs (v0.3, Gitea authoritative)
2026-09-12 16:16:58 +01:00

21 KiB
Raw Blame History

RUNE CANONICAL INTENT STATE

v1.0 · 2026-09-10 · Owner: Rune · Review: Nick This artifact is the project's authoritative answer to: "What were we trying to achieve, what interrupted it, what remains, and where do we return?" It is state, not a planning framework. Update it when intent changes; do not extend it into a second roadmap system.


PRIMARY INTENT

Build Rune: a stateful, quality-first coding assistant whose cognitive systems are genuinely reachable from live execution — measured by the Runtime Reachability doctrine (IMPLEMENTED → CALLED BY PRODUCTION → CHANGES EXECUTION → PERSISTED → OBSERVABLE → END-TO-END PROVEN), not by module existence.

The parent work at the moment of interruption: Epic #284 — the adaptive development pipeline (successor to the ratified Research-to-Build process #257/RP0–RP14). Doctrine: research buys down uncertainty; it is not a tax on every code change. Three process depths (LOCAL_FIX / STANDARD_CHANGE / RESEARCHED_CHANGE), reversible routes, one canonical route authority, the ratified pipeline as the high-assurance fallback.

CURRENT ACTIVE WORK

Deployment Contract v1 + ADAPT-LIVE acceptance closure (master 5c8b252+, 2026-09-11).

CORRECTION RECORD (intent-continuity evidence, 2026-09-11): the previous tranche declared "ADAPT-LIVE complete" while an unresolved user-established blocker existed (deployed TUI launch broken; version bumping stalled). Honest status:

  • Deployment Contract v1: PROVEN — deterministic CI-qualified deploy pipeline (stage → verify → REAL TUI startup canary via Textual run_test → atomic promote, last-good rollback); loop-guarded auto-version convergence (0.66.0 → 0.66.2 on push events; chore(release) never re-bumps); launcher deployable; runtime reports deployed SHA/version.
  • ADAPT-LIVE: IMPLEMENTATION SUBSTANTIALLY PRESENT, ACCEPTANCE PROVEN ON DEPLOYED RUNTIME — route discriminator (defect/change language + leading-verb governance), DESIGN-LITE, completion truth (mutation tasks without mutating tool evidence cannot complete), verification→probe→escalate BEFORE terminal, deployed-runtime canaries: LOCAL_FIX/STANDARD_CHANGE honestly fail NOT_COMPLETED with text-only responses (false success structurally impossible), conversation tasks complete normally, TWO REAL Evidence Probes through the deployed runtime with genuine cited evidence (pytest exit-code semantics + empirical check; deployed-tree source inspection). Escalation-with-real-worker partially proven (the competent worker correctly GROUNDS rather than fabricates escalation; unresolved-case escalation proven at module level).
  • Earlier "ADAPT-LIVE complete" declaration (e92c993) was PREMATURE — recorded as evidence for the future intent-continuity system: a child task must not replace unresolved parent acceptance obligations merely because its implementation completed.

Delivered across the tranche:

  • Route discriminator (defect vs change language, provenance-tracked) separates LOCAL_FIX from STANDARD_CHANGE
  • LOCAL_FIX: focused verification policy, no research; verifiability NONE no longer blocks defect-class narrow tasks
  • STANDARD_CHANGE: DESIGN-LITE record (bounded build-contract, no model call) + integration verification
  • RESEARCHED_CHANGE: unchanged high-assurance fallback (research_required nonterminal disposition)
  • Evidence Probe LIVE via verification-driven trigger: real verification failure on the operator spine → one bounded probe → GROUNDED resumes / unresolved ESCALATES to RESEARCHED_CHANGE (route change, not task failure; opt-in via MIMO_PROBE_ENABLED=1 in the TUI launcher)
  • Probe-grounded downgrade (§7): fully-grounded probes downgrade STANDARD_CHANGE → LOCAL_FIX with recorded trigger
  • Canary evidence: route latency 0.2–16ms vs fixed-depth 384s+ wasted on LOCAL tasks; escalation proven LOCAL_FIX → probe → RESEARCHED_CHANGE with persisted evidence

Reachability detour (CLOSED):

  • Runtime Reachability audit (one live spine identified; dead cognitive subnet mapped)
  • Unified Core route authority (src/rune/adaptive_router.py + evidence_probe.py + route_risk_flags.py) consumed by both the research executor and RuneOperator.send_task
  • Builder bridge live-consumed: ~/.mimocode/hooks/builder-bridge.ts → builder_bridge_cli.py → Rune Core preflight in actual MiMo context (fire-trace: /tmp/rune-bridge-fire.log)
  • research_required nonterminal disposition; route_ref reference model; PL0 experience ledger with live producer and TELEMETRY/CANDIDATE qualification
  • recall_uplift vendored into core (PROVISIONAL — A/B documented, not proven equivalent)

WHY CURRENT WORK INTERRUPTED THE PARENT

The ADAPT-2 audit found classify_route() had zero production callers — the route authority was architecturally implemented but cognitively dead. Wiring it honestly forced the discovery that Rune Core itself was not reachable from any live path the user experiences (the TUI path was live but disconnected from adaptive cognition; the MiMo builder session consumed none of it). Fixing that root defect was a precondition for every ADAPT capability being anything more than dead machinery: adaptive routes are worthless if nothing live consumes them.

RETURN CONDITION

This detour is complete when:

  • One canonical route authority consumed by production (operator + research executor)
  • Research dispatch causes a real disposition (research_required, not failure)
  • Terminal-outcome semantics corrected (no false task.outcome on nonterminal routing)
  • Builder bridge consumed by the actual MiMo harness with measured overhead
  • Deferred defects recorded (below), not chased
  • ADAPT intent recovered and reconciled (this artifact, Part B)
  • THIS TRANCHE: the ADAPT status matrix disposition is agreed and the next tranche selected (Part D)

RETURN TARGET / CURRENT: PL1 Process Learning — FIRST TRANCHE LIVE (2026-09-11)

PL1-01 structured Experience records: scripts/pl1_records.py (task_id, route resolved from route.jsonl, proof level, failure class, candidate status). PL1-02 failure classification in the PL0 vocabulary (research_dispatch, NOT_COMPLETED_NO_MUTATION_EVIDENCE, verification_failure, model_refusal, UNKNOWN). PL1-03 first learning loop: recurring prose-instead-of-mutation family → structural correction (route-driven instruction in the user context block) + replay contract (NOT_COMPLETED gate) — record PE-1789102658-0269 (SEED 2026-09-11 → VALIDATED 2026-09-12: two fresh deployed held-out mutation tasks completed-with-evidence — task_2661189c9073 + task_6e4885031355, LOCAL_FIX, Verboo-pinned, mutation + exit-code verification, ledger PE-9207213099-0270; substrate corrections 6965fc7 flat-ChatMessage contract + a2463ad resume transport selection applied between; caveat: corrections developer-applied structurally, not autonomous self-modification; PROMOTED requires repetition/soak). PL1-04 promotion discipline: SEED→CANDIDATE→VALIDATED→PROMOTED via process_experience; structural fixes preferred. PL1-05 metrics: first_pass_accepted, mutation_failures, research_dispatches, false_completion_rate (0.0 — structurally prevented), candidates vs evidence-only split.

Remaining ADAPT obligations for later epics: ADAPT-5 budgets, ADAPT-6 evidence capsule, ADAPT-7 DESIGN consolidation, ADAPT-10 legibility, FINAL-12 cross-track benchmark, D7 release-job-on-Pi.

OPEN OBLIGATIONS (deferred defects — recorded, NOT chased)

ID Obligation Evidence Destination
D1 memory_store.delete_entry() leaves contentless-FTS ghosts (requires special FTS5 INSERT ... VALUES('delete') cleanup; retrieval can ghost-hit deleted entries) 2026-09-10 QX7 purge required manual FTS commands in both stores Memory-foundation work (deferred by design — handoff §17)
D2 Builder-bridge hook lives at ~/.mimocode/hooks/builder-bridge.ts with a hardcoded repo path — no canonical ownership, no repeatable install/sync; a harness reinstall silently loses Rune's builder integration. (PARTIALLY CLOSED 2026-09-10: the Rune CODE side now has a deterministic deploy pipeline — .gitea/workflows/deploy.yml, stage→verify→promote with last-good rollback; the HOOK side still hand-installed) Hook hand-installed 2026-09-10; deploy pipeline live (run 14243 success, e2e verified 51e14d6) Scaffolding (SC1/SC2 territory) for hook deployment when the bridge becomes user-facing
D3 /tmp/rune-bridge-fire.log fire-trace is ephemeral (lost on reboot) — standing observability, not durable telemetry; accurate description: per-boot injection evidence only Design note in hook source Fold into OBS-1-style durable telemetry when next touched; no project now
D4 recall_uplift retrieval-quality effect unproven (PROVISIONAL) — recall row counts match but surfaced IDs differ; harness original retained at ~/.config/opencode/scripts/ for rollback A/B table in module docstring Compare in FINAL-12 or first memory-foundation pass
D5 CloudStubAdapter declared-not-live: router can elect cloud models that execution cannot run (routing_mode=cloud is telemetry theater) Audit §A fragmentation 1 When cloud execution is actually wanted; otherwise retire the election path
D6 Dead cognitive subnet (salience_gate, cognitive_budgeter, tiered_executor, progressive_escalation, verification_layer, outcome_ledger + companions): implemented, unconsumed, partially duplicated by ADAPT-2 Reachability audit §C Disposition in Scaffolding/PL1 review: RETIRE more likely than RESURRECT — superseded or absorbed

PARKED INNOVATIONS

  • Intent-continuity spine: this artifact is the manual v1. The automated version (intent-state tracking that survives detours without a human handoff) belongs after PL1 — PL1's experience machinery is its natural producer. Do not build early.
  • Substrate: deferred behind a domain-neutral education phase (handoff §16). Unchanged.
  • Scaffolding SC1–SC8: deferred until adaptive/live/learning foundations are credible (handoff §15). Unchanged.
  • Control benchmarking (born-isolated disposal control vs full Rune): deferred to system maturity (handoff §18). Preserve passive instrumentation meanwhile — task.outcome + route.jsonl + StageAttempt already cover the required fields.

SUPERSEDED APPROACHES

  • Option A/B route placement (route-in-operator / two-worlds): superseded by Option C unified core authority (Nick decision, 2026-09-10).
  • progressive_escalation.py ladder: superseded by adaptive_router.py (duplicated concept; the original was never wired).
  • outcome_ledger.py as separate authority: superseded by the event-driven task.outcome + process_experience.py flow.
  • Fixed-depth research pipeline as universal path: superseded by adaptive routing (the existence proof: 2 of 3 task classes cannot pass its OUTWARD gate).
  • per-message cognitive pipeline (P0-04): deliberately removed; the ContextBroker owns model-facing context. Do not resurrect.
  • Manual handoff files as the only intent carrier: superseded by this artifact (handoffs remain valuable input, not the system of record).

ADAPT RECONCILIATION (Epic #284, recovered 2026-09-10)

What ADAPT was supposed to become

From epic #284 verbatim: "convert the proven high-assurance research process into an adaptive universal engineering framework that applies only as much process as the uncertainty deserves." One framework, three depths, reversible routes, escalation/downgrade as first-class recorded transitions, the ratified pipeline as fallback, FINAL-12 cross-track benchmark as the ratification gate. Success criteria: 5/5 limitations dispositioned, all three routes through one canonical authority, FINAL-12 beats fixed-depth without quality regression.

Status matrix

Capability Status Current owner Live consumer Future destination Reason
Route authority (classify/escalate/downgrade/floor) BUILT_AND_LIVE src/rune/adaptive_router.py Operator send_task + research executor ISSUE dispatch PL1 consumes its decisions Wired, persisted, canaried
Route decisions on the operator spine BUILT_AND_LIVE rune_operator._route_task_class Every send_task — route.jsonl + route_ref verified
RESEARCHED_CHANGE disposition BUILT_AND_LIVE rune_operator.send_task Floor tasks halt local path, research_required + dispatch Research consumer (below) Live canary bf5eb53 + this tranche
Targeted Evidence Probe BUILT_NOT_LIVE src/rune/evidence_probe.py Wired in executor dispatch; gated behind MIMO_PROBE_ENABLED (nobody sets it) ADAPT-LIVE tranche: decide the runtime policy and prove one real probe The §6 qualification stands
Verification-driven escalation BUILT_NOT_LIVE adaptive_router.escalate_on_verification_failure Contract message names the hook; no automatic caller ADAPT-LIVE tranche: wire into the local lane's verify step Handoff §6 of bridge tranche; still true
LOCAL_FIX execution path PARTIAL Route exists; execution = ordinary model path Operator completes LOCAL tasks normally ADAPT-3/#292: regression-gated fast path per issue spec Route changes nothing for LOCAL today beyond disposition recording
STANDARD_CHANGE path (DESIGN-LITE) PARTIAL Route exists Same ordinary path ADAPT-4/#293 DESIGN-LITE step Same reason
RESEARCHED_CHANGE bounded execution PARTIAL Dispatch persisted; orchestrator = MiMo session (documented §11 gap) Session drives executor CLI manually ADAPT-5/#294 budgets + the §11 orchestrator decision Recorded honestly in dispatch payload
Evidence capsule (#295) PARTIAL (proto: builder capsule) builder_bridge MiMo hook ADAPT-6 after paths exist The bridge capsule is task-preflight, not OUTWARD evidence compression
DESIGN consolidation (#296) NOT STARTED — — ADAPT-7, after ADAPT-5 A/B experiment design exists in issue
Deterministic-first QUALIFY (#297) BUILT_AND_LIVE (pipeline) / NOT_LIVE (operator) _execute_qualify in executor Research pipeline only ADAPT-8: reuse for STANDARD_CHANGE DESIGN-LITE gate Already deterministic-first per RP8
Legibility audit (#299) NOT STARTED — — ADAPT-10, after routes live Depends on 3/4/5/9
Escalation/downgrade real acceptance (#300) BUILT_NOT_LIVE Module-level canaries pass No real-task demonstration ADAPT-11: the acceptance IS real tasks escalating Needs paths first
FINAL-12 cross-track benchmark (#301) NOT STARTED — — Final epic gate Explicitly last
OBS-1 telemetry (#287) BUILT_AND_LIVE (pipeline) stage_telemetry.py Research executor Extend to operator path in ADAPT-LIVE StageAttempt records verified in B3-v3
Artifact authority / retry (#298) BUILT_AND_LIVE _resolve_worker_artifact Research executor — ADAPT-9 closed
Task routing vs model routing separation BUILT_AND_LIVE Two authorities, distinct Both live Never collapse Handoff §5 doctrine, honored in code
Dead subnet (salience→budget→tier→escalate→verify→outcome) ABSORBED_BY_NEW_ARCHITECTURE / RETIRE candidates src/rune/*.py None Disposition review during PL1/Scaffolding progressive_escalation duplicated by adaptive_router; outcome_ledger by task.outcome flow; verification_layer concepts live in _verification_and_outcome
Builder bridge BUILT_AND_LIVE hook + CLI + builder_bridge.py MiMo harness (this session) Scaffolding owns deployment (D2) Fire-trace proven

What fell off the roadmap during the detour (Part D input)

  1. ADAPT-3/4/5 route execution paths (the epic's core; everything else waits on them).
  2. The §11 research-orchestrator boundary decision (MiMo session is the honest current answer; it predates the detour but was never dispositioned).
  3. Probe runtime policy (MIMO_PROBE_ENABLED ownership) — recorded, never decided.
  4. FINAL-12's dependency list silently grew (operator-path telemetry, builder-bridge overhead numbers) without issue updates.
  5. Epic #284 body still says "ADAPT-2 → {ADAPT-3,4,5}" with no record of the detour — the issue tracker and reality diverged until this artifact.

PART D — NEXT RECOMMENDATION

COMPLETE REMAINING ADAPT TRANCHE (one bounded tranche: "ADAPT-LIVE"), then PL1.

Reasoning from recovered obligations, not momentum:

  • PL1's input is route-accuracy and escalation-outcome evidence. Today routes change execution only at the RESEARCHED_CHANGE boundary. LOCAL_FIX and STANDARD_CHANGE — the two depths the measured baseline proved the fixed-depth pipeline fails — do not have distinct execution paths. Without them, PL1 would learn from a system that exercises one route out of three.
  • The escalation chain (local solve → verification failure → probe → research) is the epic's spine and is entirely canary-level today. ADAPT-11's acceptance ("real tasks demonstrate escalation") cannot be satisfied by more module tests.
  • The Evidence Probe needs one decision (who enables it at runtime) and one real demonstration — small, but it cannot be skipped because §3's progressive behavior (local → probe → research) is otherwise fictional at the probe step.
  • Nothing here justifies the intent-continuity spine yet: this artifact covers the need manually, and PL1 will automate it with better machinery.

ADAPT-LIVE contents (smallest coherent adaptive loop):

  1. LOCAL_FIX lane: routed task → implementation → real verification (_verification_and_outcome) → escalation hook wired on verification failure (completes the §7 chain end-to-end).
  2. STANDARD_CHANGE lane: DESIGN-LITE step per #293 (bounded, deterministic structure, no research dossier).
  3. Probe policy decision + one real probe through the production path (MIMO_PROBE_ENABLED set by the operator runtime, not tests).
  4. ADAPT-11 acceptance demonstration on 2–3 real tasks across the three depths, with telemetry.
  5. Update epic #284 with the detour record + this matrix; close the gap between tracker and reality.

Then: PL1 (T9), with the intent-continuity spine as PL1's first or second deliverable (it is an experience-system product, not a separate architecture project).

GITEA RECONCILIATION (2026-09-11)

Part A-J executed. 15 issues closed (HISTORICAL_EVIDENCE/SUPERSEDED/ACCEPTED_LIMITATION) with evidence. Bug label cleaned: 16 misleading labels removed (open bugs 24→8). #259/#258 updated to current architecture. Remote tracking fixed (master tracks gitea/master, not stale origin). PL1 metrics corrected (NOT_YET_MEASURABLE where evidence doesn't support numbers). D7: bump works, release job fails on Pi — ROOT_CAUSE_UNKNOWN_DEFERRED. Automation noise: 5 duplicate bump commits per logical change (queue-drain artifact, not live recursion — version converges, commit history doesn't).

DEFECT D7 (2026-09-11): RESOLVED — release-job failures root-caused

History: the release job failed on every push since 03:16 (c2528c1). Superseded diagnosis: "Pi-side backup step logs Failed to connect to 127.0.0.1:3000" was a red herring — the Pi backup step was never the failing job.

Root causes (live-proven T15 Part F, 2026-09-11 evening):

  1. c2528c1 left a corrupted shell fragment after the converged-check fi in auto-version.yml — the release job died at bash parse time (exit 2) before any bump. Fixed in c35b604.
  2. release_convergence() never assigned the release boundary — all 959+ commits classified as unreleased, so the warranted bump never converged and queued runs each wrote their own bump commit. Fixed in e395ee1 (boundary wiring) + 9e0b855 (boundary grep must match subjects only, not bodies) + c35018f (numeric semver comparison: '0.66.9' < '0.66.10' is False lexicographically, which silently skipped warranted bumps as version_ahead_of_target).
  3. The per-file contents PUT committed one commit per version surface — five same-version bump commits per real bump (the "duplicate bump cascade" since 0.66.2, misdiagnosed as queue drain). Fixed in 470d82f
    • d68fd1e (single ChangeFiles commit).

Live proof: experiment A (trigger d68fd1e, warranted patch) → exactly one bump commit a4afc77 (0.66.11), all five surfaces in one commit, queue drained, zero delayed duplicates, zero workflow failures.

Local CI tooling (developer-side, NOT Rune runtime): W/R-v0.3 reactive wake (2026-09-12)

The desktop gitea-runner (v3.3.0) now runs host.post_task_script = /usr/local/bin/gitea-wr-wake.sh after every job: a sub-second fire-and-forget POST to the local W/R daemon (127.0.0.1:8791/wake), which sweeps waiting external waits through AUTHORITATIVE Gitea verification (bounded retry for the reporter-ack window; 60s reconciler demoted to fallback). Runner event ≠ success proof. Config: /etc/gitea-desktop-runner/config.yaml (backup: config.yaml.pre-wr03). Measured: terminal→verified wait transition ~2s (was 0-30s polling). INTERACTIVE_AUTO_RESUME remains NOT YET SAFE (no supported MiMo busy/idle signal) — headless-only dispatch, unchanged.