Lane F
August 28, 2026 · View on GitHub
Status: Proposed.
Evidence roots: packages/adaptorch-wpl/, .omk/runs/adaptorch-native-loop-algorithm-20260701/final-part1-core-algorithm.md, packages/coding-agent/src/core/adaptorch-bridge.ts, packages/coding-agent/docs/loadout-domains/README.md.
Not a shipped runtime: this spec describes a preview path (planning, routing, and evidence contracts) unless a future implementation lane wires it.
Inputs
| Input | Type | Source | Notes |
|---|---|---|---|
task_text | string | user / lane kickoff | Primary routing signal; may be truncated for headroom. |
path_hints | string[] | cwd, owned paths, globs | Optional; used for domain triggers and write-scope checks. |
upstream_tags | string[] | goal id, lane role, preset | e.g. grok-adaptorch-prod, omk-planner. |
payload_shape | object | planner / DAG artifact | Non-empty subtasks array plus optional dependencies; descriptions are bounded and sanitized, with no secrets or session ids. |
provider_profile | enum | session | xai | default | other registered provider. |
adaptorch_transport | optional | MCP grant | If absent, preview runs local-only (OMK compose + deterministic fallbacks). |
lane_grants[] | object[] | root coordinator | Each: scope, authority, skills, MCP, acceptance, evidence path. |
budget_caps | object | loop / goal | max_lanes, max_dispatch_preview_calls, wall-clock cap (immutable per preview instance). |
Hard input exclusions (never pass into AdaptOrch advisory or preview payloads): raw full prompts or hashes, bulk file lists, session/user ids, live-turn tool names, hook stderr, credentials, and .env material. subtasks[].description contains only the bounded, sanitized task summary needed by the topology router.
Stage A — Signal intake and domain preview
Purpose: Normalize the kickoff into scored domain signals and a confidence band before any external control-plane call.
Steps:
- Lowercase and tokenize
task_text; mergepath_hintsandupstream_tagsinto the scoring buffer. - Score each registered domain profile (keyword, regex, extension, path triggers) per
loadout-domainsrules. - Emit
domain_leader,confidence(confident|tentative|fallback), andambiguousflag (runner-up within margin). - Attach recommended read-only skills tier (max 2–3) from domain + task class — do not bulk-load the catalog.
Outputs: PreviewSignalRecord { domain_id, confidence, ambiguous, suggested_skills[] }.
Stage B — Topology preview (AdaptOrch read/local)
Purpose: Classify execution topology without submitting adaptorch_run.
Precondition: adaptorch_transport granted and payload_shape is sanitized.
Steps:
- Call
adaptorch_capabilitiesonce per preview session (cache TTL). - Call
adaptorch_route_topologywithpayload_shapeas the tool's top-level argument object. - Read
raw.topologyand validate it againstadaptorch_capabilities.topologies. - If transport is missing or the value is outside that advertised set, set
topology = nulland record a boundedskipped_reason.
Outputs: TopologyPreview { topology: string | null, raw_redacted_summary }.
Stage C — Lane grant and loadout compose
Purpose: Turn topology + domain into non-overlapping lane grants for parallel workers.
Steps:
- Treat topology as advice only. For any proposed parallel lane set, decompose along write-scope boundaries (one writer per file) and validate dependencies independently.
- Compose each lane:
scope,authority,skills[],mcp[], relevant hooks,acceptance,evidence_output_path. - Run read-only authority stripping and always-on security hooks policy.
- Reject parallel grants that share the same write path.
Outputs: LaneGrantTable[], compose_diagnostics[].
Stage D — Dispatch cardinality preview
Purpose: Preview how many adaptorch_run invocations a full loop might need without issuing them.
Steps:
- Read
observed_cardinality_modeif configured (single_call|fanout_n|uncalibrated). - Under
single_call:expected_run_ids = 1per dispatch record. - Under
fanout_n: derive N only from an explicit caller-owned dispatch template; topology names alone do not determine call count. Label the result as a hypothesis until calibrated. - Flag
cardinality_anomalyif prior observations disagree with mode.
Outputs: DispatchPreview { cardinality_mode, expected_run_ids, anomaly_flag }.
Stage E — Verification preview (adjudicator contract)
Purpose: State what evidence the Outcome Adjudicator would require before any run exists.
Steps:
- Select verifier registry entry by packet
kind(string class, stable across retries). - List required checks: terminal run status, artifact presence, trace sanity, scope/schema/content gates.
- Map foreseeable
reason_codevalues to disposition classes (escalate,reroute_on_recurrence,retry_same_topology) — preview only, noadjudicate()call.
Outputs: VerificationPreview { kind, required_checks[], reason_code_map_summary }.
Stage F — Evidence and synthesis contract
Purpose: Fix the artifact paths and synthesis inputs for the root coordinator.
Steps:
- Require per-lane evidence files under
.omk/goals/<goal-id>/evidence/(or lane grant path). - Define synthesis inputs: explorer facts, planner DAG, tester output, reviewer verdict — no success claims without attached evidence class.
- Optional: if synthesis is explicitly authorized post-evidence, list allowed tools; else local
SYNTHESIS.mdmerge. - Emit
PreviewResultbundle for operators and doc cross-links.
Outputs: PreviewResult, pointers to packages/coding-agent/docs/adaptorch-preview.md and this file.
Algorithm 1 — PreviewOrchestrate
function PreviewOrchestrate(inputs):
assert inputs.task_text is non-empty
A <- StageA_SignalIntake(inputs.task_text, inputs.path_hints, inputs.upstream_tags)
if inputs.adaptorch_transport is granted and inputs.payload_shape is sanitized:
B <- StageB_TopologyPreview(inputs.adaptorch_transport, inputs.payload_shape)
else:
B <- { topology: null, skipped_reason: transport_or_shape }
C <- StageC_ComposeLanes(A, B, inputs.lane_grants, inputs.budget_caps)
D <- StageD_DispatchCardinalityPreview(B, loop_config.observed_cardinality_mode)
E <- StageE_VerificationPreview(C.default_kind)
F <- StageF_EvidenceContract(inputs.goal_id, C.lanes)
return PreviewResult(A, B, C, D, E, F)
Algorithm 2 — TopologyClassifyPreview
function TopologyClassifyPreview(transport, payload_shape):
caps <- transport.call("adaptorch_capabilities", {})
if caps indicates unsupported connector:
return { topology: null, skipped_reason: capabilities }
raw <- transport.call("adaptorch_route_topology", payload_shape)
topology <- extract_enum(raw.topology, caps.topologies)
if topology is missing:
return { topology: null, skipped_reason: unparseable }
return { topology: topology, raw_redacted_summary: redact(raw) }
Algorithm 3 — ClaimSafeNarration
function ClaimSafeNarration(preview_result, utterance):
FORBIDDEN <- phrases implying production AdaptOrch execution without run evidence
ALLOWED <- planning, routing preview, lane grants, read/local tool names, fallback paths
if utterance matches any FORBIDDEN pattern:
return { ok: false, rewrite_hint: use ALLOWED framing + cite evidence path }
if utterance claims "done" or "verified":
require preview_result.F.evidence_paths exist and tester evidence class satisfied
return { ok: true, utterance }
Acceptance (Lane F)
| Criterion | Evidence |
|---|---|
| This spec exists at the path above | read in session |
| adaptorch-preview.md links here | link check in intro doc |
| No adaptorch-wpl src edits | git status scoped to docs + goal only |
| Algorithms 1–3 present as pseudocode | this file Algorithms section |