IDKMesh

IDKMesh API Control-Plane Architecture

Status: planning baseline
Date: 2026-09-23
Program: #713
Companion plan: API_V1_PROFESSIONALIZATION_PLAN_2026-09-23.md

Purpose

This document defines how IDKMesh API surfaces fit together so the Control Tower, connector control plane, Product Spine, CLI, and future multi-user service do not evolve into separate systems with different semantics.

Architectural rule

one domain model
+ one application-service layer
+ multiple transport/client adapters

HTTP, CLI, GitHub Actions, browser UI, and provider connectors are adapters. They may transform transport details but may not redefine WorkUnits, runs, evidence, human decisions, or authority.

Logical layers

1. Domain contracts

Canonical domain objects remain independently versioned:

No HTTP endpoint may create a competing replacement object merely for UI convenience.

2. Application services

Application services own use-case semantics:

They are provider-neutral and transport-neutral.

3. Policy / authority boundary

Before a state-changing application service executes, it receives explicit:

A service may return requires_approval; it must not invent missing approval.

4. Persistence

Persistence adapters retain:

Persistence stores decisions/evidence; it does not grant authority.

5. Transport adapters

Profiles:

Local HTTP

Network HTTP

CLI

Calls the same application services. CLI flags are not a parallel policy model.

GitHub-native adapters

GitHub events/actions are untrusted inputs until normalized and authorized. Labels/comments are projections or triggers, not canonical authority.

Namespace

Product HTTP resources converge on:

/api/v1

Runtime probes remain outside the product namespace:

Object schema versions remain independent from URL compatibility versions.

Resource ownership map

Resource/use case Canonical owner
projects ProjectManifest/Product Spine
connections/probes Connector Control Plane (#570/#580)
WorkUnit preview Product Spine + connector service
routes RoutingDecision / connector kernel
runs Product Spine / run service
attempts/candidates run service + CandidateReference
result manifests ResultManifest contract
verification verifier/evidence service
run evidence Run Evidence Report
human decisions Human Decision Record
events canonical event service (#741)
integration execution separate protected integration authority

Read versus mutation separation

Read surfaces may aggregate projections, but must expose the underlying provenance/digests.

Mutation surfaces must add:

Human Decision boundary

The Human Decision API records:

who decided
what decision
why
which exact evidence digest
when

It does not:

A later integration actor must independently consume the decision plus policy.

Event architecture

Events are append-only facts about state transitions, not a replacement for the domain records they reference.

The future event service must support:

SSE is the first live-delivery transport because current needs are one-way observation.

Local-to-network evolution

The local API is not thrown away when network mode arrives.

Shared:

Replaced/extended:

Failure model

The API distinguishes:

A worker/provider failure is a domain outcome and should not automatically be reported as an HTTP server failure when the request itself was processed correctly.

Security model

Local

The session token protects the local browser/API boundary. It is not a user identity.

Network

Principal identity comes from a trusted authentication adapter and is evaluated through #670 policy semantics. Role/authority is never inferred from model output, issue text, labels, or self-declared headers.

Operational model

All HTTP services should converge on the reusable runtime baseline:

Later network services add:

Implementation ownership

The API program does not absorb existing subsystems.

Anti-patterns

Reject designs that:

Architecture completion evidence

This architecture is considered implemented only when:

  1. Control Tower and connector endpoints share the conventions/application service boundary;
  2. domain objects are schema-bound;
  3. mutations enforce identity/policy/idempotency;
  4. persistence and events are restart-safe;
  5. a client can follow WorkUnit -> run -> evidence -> human decision without provider-specific knowledge;
  6. integration remains separately authorized.