# AWP I0 / I1 Reuse and Source Preflight

**Date:** 2026-08-20  
**Status:** **SOURCE-CONTRACT PASS PARTIAL; LIVE/PRIVATE-SOURCE GATES EXPLICITLY BLOCKED**  
**Purpose:** prevent AWP from silently recreating Platform, Overdeck, native or selected provider mechanics.

## Gate

```text
need mechanic
 -> project-native?
 -> Platform exact source/export/version?
 -> proven Overdeck capability/path/commit?
 -> native/standard?
 -> selected FOSS/provider?
 -> only then AWP-specific semantic/adapter code
```

No unavailable evidence is inferred green.

## Platform Snapshot — Verified

Connected source inspection:

```text
repository   platform-modules/mod
branch       main
revision     b7c7f97fa0c51a1cc2f5d87ee752a3c08a08495a
Node engine  22.x
pnpm         9.7.0
```

The root verify path includes `tools/smoke-awp-upstream.mjs` and package-name import smoke coverage for AWP-approved generic surfaces.

Relevant current package families/dispositions:

| Package | Current observed role | I0/I1 disposition |
|---|---|---|
| `@platform-modules/db` | DB/health/locking/provider mechanics | REUSE-FIRST; AWP owns repositories/transactions/invariants |
| `@platform-modules/auth` | API keys/OAuth/auth engines | REUSE-FIRST; AWP owns Principal/final authorization |
| `@platform-modules/audit` | generic audit mechanics | REUSE-MECHANICS; AWP owns audit meaning/atomicity |
| `@platform-modules/jobs` | bounded jobs/outbox | REUSE for short/bounded work, never durable-workflow authority |
| `@platform-modules/util` | config/logger/idempotency/health/crypto/etc. | REUSE-FIRST; avoid AWP rename wrappers |
| `@platform-modules/realtime` | shared browser/client/server realtime mechanics | REUSE-FIRST; AWP owns recovery/freshness/state authority |
| `@platform-modules/ai` | provider helpers/pricing/redaction | VERIFY-FIT for provider adapters |
| `@platform-modules/ui-primitives` | generic dashboard/data-state primitives | DUPLICATION CHECK; Astryx remains visual authority |
| `@platform-modules/ui-tokens` | token/theme mechanics | VERIFY compatibility with Astryx/AWP |
| `@platform-modules/search` | generic search registry/provider/group mechanics | I3 REUSE-FIRST |
| `@platform-modules/notifications` | inbox/email/webpush mechanics | consume when notification channels activate |

### Runtime pin

I0 baseline must be compatible with the exact Platform revision consumed. Current source requires Node 22.x and pnpm 9.7.0. Do not assume Node 26 from unrelated modernization work.

The final AWP TypeScript patch version/lockfile pin is made in the first I0 workspace and verified in CI.

## Platform Consumer Proof Status

Current source/export and upstream smoke evidence is sufficient to authorize **consumer testing**, not to claim an AWP application integration that does not yet exist.

```text
source/export discovery                 PASS
upstream AWP smoke existence            PASS
exact AWP install/import integration    FIRST I0 CODE WORKSPACE
```

This is not permission to build generic alternatives before the consumer test.

## Subrouter — Current Source/Capability Proof

Selected current source:

```text
repository  manaflow-ai/subrouter
role        local/shared coding-agent account router/proxy
```

Observed current capabilities:

- sticky conversation/session -> account assignment;
- subscription accounts first with API-key support;
- explicit account forcing via `SUBROUTER_CODEX_ACCOUNT_ID` / `X-Subrouter-Account-ID`;
- Codex and Claude routing paths with provider credential replacement;
- account/usage/session/status/admin endpoints;
- live usage/headroom-aware new-session selection;
- server-owned credential stores;
- admin-token and separate account-import-token boundaries;
- multi-tenant account-pool isolation mode;
- security defaults that avoid logging tokens/request bodies/full authorization headers.

Disposition:

```text
Provider candidate for routing/account execution mechanics.
AWP owns Account / Model / Provider identities, authorization, policy,
selection intent, provenance, health interpretation and lifecycle meaning.
```

### What Subrouter can replace

Do not create a generic AWP token/account-routing platform for:

```text
sticky account selection
usage/headroom placement
Codex/Claude proxy credential replacement
basic account pool status/routing
```

until a concrete AWP requirement is shown missing.

### What AWP still owns

```text
stable Account/Model/Provider IDs
Project/Plan/Task/Run account policy
explicit force-account semantics
Attempt provenance
authorization/capability ceilings
credential references (not raw tokens)
provider health normalization
selection explanation/audit
fallback policy
cross-provider semantics
```

Runtime integration remains an I0 adapter consumer proof; source-contract fit is complete.

## Overdeck Physical Harvest — Hard Blocker

Binding rule requires exact source path/commit/capability records. Current connector evidence:

```text
GitHub installation account: platform-modules only
alexcodeplace/overdeck lookup: Not Found through connected GitHub app
installable Overdeck plugin: none found
```

Therefore exact Overdeck physical harvest cannot be completed from this conversation without fabricating evidence. Prior historical references/categories are insufficient under the harvest contract.

Before equivalent custom I0/I1 code, authorized source access must inspect at least:

```text
Git/repository/workspace helpers
trusted publication/merge helpers
K3s/offload/execution helpers
factory/Fabro helpers and failure handling
account/model routing helpers
config/auth/audit/realtime/health helpers
CI runner/check helpers
cleanup/recovery/checkpoint/WIP preservation
CLI/control-surface helpers
```

Known historical evidence such as old account-lock/systray work is reference-only unless its exact current source and fit are revalidated. Botmaster/systray remain outside AWP core unless explicitly integrated as CommunicationEndpoints.

## Selected Provider / Standard Source Proof

### DBOS

Current TypeScript contract supports PostgreSQL-backed durable workflows with checkpointed steps and recovery after process interruption. Selected as durable workflow mechanics behind AWP's `DurableWorkflowProvider` boundary.

Required live proof before gate green:

```text
start -> kill process -> restart/recover
wait/resume
retry
cancel
idempotent external side effect
duplicate delivery
terminal result persistence
```

### Kubernetes WorkspaceProvider

Selected baseline: native Pod/PVC/ServiceAccount/NetworkPolicy/RuntimeClass/owner-reference mechanics. No custom workspace CRD/operator baseline.

Required live proof:

```text
process crash
pod deletion/replacement
AWP/control restart
cancel/retry
recoverable node interruption
WIP/change collection
orphan cleanup
```

### gVisor

Selected isolation runtime where compatible. Kubernetes/containerd support uses `RuntimeClass` -> runsc handler.

Required representative proof on AWP infrastructure:

```text
TypeScript/React coding + build + tests
PHP/WordPress coding + composer/node/wp-cli + tests
network/filesystem/tool behavior
explicit native fallback only for proven incompatibility
```

### Dev Container CLI

Selected project-environment standard/tooling. Current source line supports lockfiles and frozen lockfile behavior.

Required representative proof:

```text
TS/React project definition -> reproducible resolved image/profile
PHP/WordPress definition + DB service -> reproducible resolved image/profile
immutable image digest + provenance recorded
```

### Fabro

Selected Factory workflow provider candidate. Source model is workflow graph execution with agent/prompt/command/conditional/HITL/parallel stages.

Required adapter proof:

```text
AWP FactoryRun ID <-> provider run
stage/events
cancel
retry/resume/checkpoint
artifact/output collection
failure reconciliation
```

### ACP

Current official ACP organization provides stable protocol implementations/official SDKs and current Codex/Claude ACP adapters. TypeScript SDK stable v1 is available; experimental v2 remains opt-in.

Required adapter proof:

```text
Codex supported path
Claude supported path
at least one additional compatible agent
capability discovery
session lifecycle
cancel/error mapping
provider-specific escape hatch without leaking provider types into domain
```

### GitHub VCS / Publication

GitHub is initial VCS provider. Trusted publication is a control-plane boundary; AgentRuns/CI runners never hold reusable publication credentials.

Required proof:

```text
app/auth
ref fidelity / expected head
PR/create/update
trusted publication
review -> merge authorization
idempotency / duplicate delivery
webhook verification
rate-limit/backoff
TOCTOU protection
```

### GitHub Actions + ARC

ARC is selected day-one runner infrastructure. GitHub documents runner scale sets as Kubernetes-managed ephemeral runner capacity; runner pods should live in a separate namespace from operator pods as a security best practice.

Required live proof:

```text
ARC installed
scale set authenticated
real AWP repository workflow lands on ephemeral K3s runner
runner pod removed after job
runner labels/groups documented
untrusted job cannot receive protected secrets
no reusable Git publication credential in runner
privileged workloads use separate explicit trust profile
AWP correlates provider run/check to canonical CI identity
```

### MCP

Use the official Model Context Protocol SDK, not custom wire protocol. Current TypeScript v2 is the stable line for the 2026-07-28 spec and splits server/client packages.

Required AWP control-surface proof:

```text
tool invocation
resource read
transport lifecycle
Principal/policy/audit propagation
error normalization
no MCP-specific authorization bypass
```

## UI Mechanics

Selected direction:

```text
React + Astryx        visual authority
Pragmatic DnD         queue/board dragging mechanics
React Flow            dependency graph mechanics
Chart.js              charts where needed + text/table equivalent
```

AWP owns semantics: dependency legality, Queue order, graph meaning, Goal/Plan/Task relationships. No deck-ui runtime identity.

## No-Build Hold List

Until a concrete fit gap is evidenced, I0/I1 must not create custom equivalents of:

```text
HTTP framework
workflow engine
factory graph engine
CI runner autoscaler
workspace operator/CRD
agent wire protocol
MCP wire protocol
auth/API-key framework
jobs/outbox framework
generic config/logger/idempotency helpers
generic token/account-routing platform
graph/drag/chart mechanics
Kubernetes scheduler/network/policy stack
```

## Status Matrix

```text
Platform repository/package source discovery      PASS
Platform upstream AWP smoke evidence              PASS
Platform exact app consumer integration           FIRST I0 CODE WORKSPACE
Runtime Node/pnpm baseline                         PASS: Node 22.x / pnpm 9.7.0 for current Platform
Subrouter source/capability fit                    PASS (source-contract level)
Subrouter AWP runtime adapter proof                FIRST I0 CODE WORKSPACE
Overdeck I0/I1 physical harvest                    BLOCKED: private source unavailable to current connector
DBOS failure/recovery runtime proof                BLOCKED: no executable Postgres/runtime environment in connector
K8s Workspace/WIP proof                            BLOCKED: no authorized cluster execution connector
 gVisor representative proof                      BLOCKED: no authorized cluster execution connector
Dev Container representative proof                BLOCKED: no authorized Docker/K3s execution connector
Fabro runtime mapping proof                        BLOCKED: no executable provider environment in connector
ACP runtime mapping proof                          SOURCE FIT PASS; live agents require execution environment
GitHub VCS source/API contract                     PASS; live app/publication E2E awaits I0 workspace
GitHub Actions + ARC live runner proof             BLOCKED: no authorized cluster execution connector
MCP source/SDK contract                            PASS; live AWP integration awaits I0 workspace
```

## Exit Condition

A subsystem preflight is green only when exact source/reuse disposition and every required runtime/failure proof for that subsystem is recorded.

A blocked live proof is not an architecture blocker, but it is a **start-work blocker for the code that depends on that proof**. The correct next action is to provide authorized source/cluster execution access or run the committed proof harness against that environment—not to guess.