Status: proposed application-service contract
Date: 2026-09-22
Scope: provider-neutral orchestration across existing canonical IDKMesh artifacts
This specification defines the application-service boundary that connects the existing IDKMesh product components into one usable lifecycle.
It does not define a new correctness protocol.
The service coordinates existing canonical artifacts:
WorkUnit
-> RoutingDecision
-> attempt/provider reference
-> CandidateReference
-> ResultManifest
-> EvaluatorPlan
-> VerificationResult
-> Run Evidence Report
-> Human Decision Record
The service may persist lifecycle events/references, but it must not create a second competing source of truth for those canonical artifacts.
The Product Spine Service owns:
It does not own:
Allowed states:
proposed
previewed
admission_blocked
admitted
dispatched
attempt_failed
candidate_observed
normalized
verification_requested
verification_error
evidence_ready
awaiting_human_decision
decided
cancelled
This state is an operational projection. Canonical evidence artifacts remain the source for their own semantics.
Must be side-effect free.
Input minimum:
Output minimum:
Must run before secret materialization or external work.
Checks:
Output:
Requires explicit admitted connector.
Output:
The operation must be idempotent.
Returns normalized attempt state and, when present, CandidateReference.
Observation never means candidate acceptance.
Validates:
Output:
Verification remains evaluator-owned.
The service may invoke/request the verifier but may not fabricate or reinterpret a VerificationResult.
Assembles the non-selecting Run Evidence Report from retained references.
The report must include failed/control-error attempts, not only favorable ones.
Allowed decisions:
Output:
The operation does not merge, push, or mutate protected application state.
Each mutating service operation must have a deterministic request digest.
At minimum, dispatch identity binds:
Rules:
same idempotency key + same request digest
-> return existing outcome
same idempotency key + different request digest
-> conflict / fail closed
Normalize operational errors so routing/escalation does not confuse them with reasoning failures.
Minimum classes:
The service must preserve:
routing != dispatch authority
dispatch != candidate acceptance
candidate != verified result
verification recommendation != human decision
human decision != merge execution
No service method named or shaped as merge belongs in v0.1.
Secret references may be inspected before admission.
Secret values may be materialized only:
Secret values must never be stored in:
Provider-specific code implements connector/adapter interfaces.
The application service must not contain logic like:
if provider == "jules": ...
elif provider == "openhands": ...
elif provider == "gemini": ...
Provider behavior should enter through normalized connector interfaces.
Local development may use SQLite.
GitHub-only deployment may use the durable Git-native ledger from #597.
The service contract must not depend on one storage backend.
Required persisted facts are stable IDs, state transitions, request digests, artifact references/digests, actor identities, and provider/runtime references.
The same service state should feed:
These surfaces may render differently but must not compute independent business rules.
Before any credentialed provider is accepted as proof of the service, implement an offline fixture path:
fixture WorkUnit
-> deterministic RoutingDecision
-> fake admitted connector
-> fake attempt
-> fake CandidateReference
-> canonical ResultManifest fixture
-> real deterministic verifier fixture
-> Run Evidence Report
-> Human Decision Record pending/recording path
Acceptance:
v0.1 must preserve the existing canonical WorkUnit, ResultManifest, VerificationResult, Run Evidence Report, and Human Decision Record contracts.
If integration reveals a missing field, prefer adding a referenced operational record before changing canonical evidence schemas.
Schema changes require explicit versioning and migration/compatibility review.
Every run projection should make visible:
No opaque aggregate score is required.
A conforming implementation can drive one deterministic vertical slice from preview through human-decision recording while: