Skip to content

<objective> Land the Anda shape check and both Phase 3 decision notes with their doc-anchored tests. No network I/O in this plan.

Purpose: Close ANDA-01 and ANDA-04 on evidence (D-61, D-66) and give every later plan one place to cite for open-question defaults. Output: Shape module, two decision notes, four appended resolution sections, and two doc tests. </objective>

<execution_context> @~/.claude/gsd-core/workflows/execute-plan.md @~/.claude/gsd-core/templates/summary.md </execution_context>

<context> @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/phases/03-container-runtime-and-bridges/03-CONTEXT.md @.planning/phases/03-container-runtime-and-bridges/03-PATTERNS.md </context>

<tasks>

<task type="tdd"> <name>Task 1: Anda shape check plus boundary and no-shim tests</name> <files>src/anda/shape.ts, test/anda/boundary-decision.test.ts, test/anda/no-shim.test.ts</files> <read_first> - src/contract/validate.ts (result union shape ValidationOk lines 109-119; detail text names the field, never the value, per the privacy rule; no schema added here per F-P3-03 and D-73) - docs/integration/anda.md Q1 (documented anonymous route GET /.well-known/information returning AppInformation) and Q4 (no protocol or engine version on any route) </read_first> <behavior> - Test: boundary-decision test reads docs/integration/anda-decision.md and asserts it records the HTTP boundary (S-12), the evidence (anda.md Q1 and the routes), the shape-handshake limitation (D-61, OQ-P3-09 default), the no-shim decision (D-66), and the licence conflict (OQ-P3-11) - Test: no-shim test asserts src/anda/native/ does not exist and the decision note cites GET /.well-known/information - Test titles cite ANDA-01 (boundary) and ANDA-04 (no-shim) </behavior> <action>Write the failing tests first per behavior (they fail while docs/integration/anda-decision.md is absent), then implement checkAppInformationShape(value) in src/anda/shape.ts per D-61 as hand-written code with no schema file and no ajv use: body must be a JSON object with engines as an array, default_engine as a string or null, and start_time_ms as a non-negative integer; any mismatch returns ANDA_VERSION_MISMATCH with detail naming the field. Never claim this is a protocol version check; it is a shape handshake until Anda publishes a version surface (OQ-P3-09 default). Then write docs/integration/anda-decision.md per the CONTEXT specifics: HTTP boundary S-12 with Q1 evidence, shape-handshake limitation D-61, no-shim decision D-66 with the documented-surface evidence, licence conflict OQ-P3-11 carried open (no Anda code or dependency added, so it does not block this phase).</action> <acceptance_criteria> - test/anda/boundary-decision.test.ts asserts all five recorded items by reading the note file - test/anda/no-shim.test.ts asserts the native directory absence and the route citation - src/anda/shape.ts has no dependency beyond core and contract (D-50) </acceptance_criteria> <verify> <automated>npx tsc -p tsconfig.json && node --test dist/test/anda/boundary-decision.test.js dist/test/anda/no-shim.test.js</automated> <fails_when>non-zero exit, or the summary shows 0 passed</fails_when> </verify> <done>Shape check and both decision tests green against the written note.</done> </task>

<task type="auto"> <name>Task 2: Runtime decision note and resolution appends</name> <files>docs/integration/runtime-decision.md, docs/integration/podman.md, docs/integration/openshell.md, docs/integration/agentos.md, docs/integration/anda.md</files> <read_first> - docs/integration/podman.md (Q5 libpod routes not verified; open questions 1-4; read date and URLs stay untouched) - docs/integration/openshell.md (Q1 launch conflict, Q2 Podman 5.x minimum, version caveat 0.1.2 versus 0.1.5) - docs/integration/agentos.md (Q1 library versus hosted, Q5 native binaries not documented) - docs/integration/anda.md (Q2 RPC schema, Q3 credentials, Q6 licence conflict) </read_first> <action>Write docs/integration/runtime-decision.md per the CONTEXT specifics: layering S-08 with its conflict against RT-01 and RT-03 wording (D-46, D-47, reported as a requirement-wording decision without editing the text); Podman gate S-09 with 4.9.3 versus 5.x and PODMAN_UNSUPPORTED_VERSION; OpenShell pin S-10 with the 0.1.2 verbs and the 0.1.5 drift (OQ-P3-12 default: pin 0.1.2, re-verify on upgrade); AgentOS mode S-11 with library primary and hosted gated; every OQ-P3 item OQ-P3-01 through OQ-P3-16 with its default and the module it blocks, marking OQ-P3-05 and OQ-P3-06 as blocking the concrete AgentOS driver and its dependency, OQ-P3-10 as blocking the phase that first calls POST /{id}, and F-P3-08 (runtime/ versus run/ directory names, keeping runtime/ per D-57). Then append a short Phase 3 resolution section to each of podman.md, openshell.md, agentos.md, and anda.md that points to the two decision notes; do not edit their sourced answers, URLs, or read dates.</action> <acceptance_criteria> - docs/integration/runtime-decision.md covers S-08 with D-46/D-47, S-09, S-10, S-11, and all sixteen OQ-P3 items with defaults and blocked modules - Each of the four integration notes gains only an appended Phase 3 resolution section pointing at the decision notes </acceptance_criteria> <verify> <automated>npx tsc -p tsconfig.json && node --test dist/test/anda/boundary-decision.test.js dist/test/anda/no-shim.test.js</automated> <fails_when>non-zero exit, or grep of the four notes shows edits outside the appended section</fails_when> </verify> <done>Runtime note complete and all four notes point at it with sourced answers untouched.</done> </task>

</tasks>

<threat_model>

Trust Boundaries ​

BoundaryDescription
Anda response body -> shape checkUntrusted JSON crosses into the handshake; extra fields are ignored, missing or mistyped fields fail closed
decision note -> implementerRecorded defaults cross into later plans; a wrong default must be gated, never silently trusted

STRIDE Threat Register ​

Threat IDCategoryComponentSeverityDispositionMitigation Plan
T-03-05S (Spoofing)src/anda/shape.tsmediummitigateUnknown or missing fields fail closed to ANDA_VERSION_MISMATCH; detail names the field, never echoes the value
T-03-06I (Information Disclosure)docs/integration/anda-decision.mdlowmitigateNote records that no credentials are produced in Phase 3 (OQ-P3-10); no credential material appears in the note
</threat_model>

<verification> npx tsc -p tsconfig.json && node --test dist/test/anda/boundary-decision.test.js dist/test/anda/no-shim.test.js; grep the two test files for ANDA-01 and ANDA-04. </verification>

<success_criteria> Shape handshake fails closed on malformed bodies, and both decision notes record the boundary, the limitation, the no-shim evidence, and every open-question default. </success_criteria>

<output> Create .planning/phases/03-container-runtime-and-bridges/03-03-SUMMARY.md when done </output>

AGPL-3.0-only. Copyright (C) 2026 Spectrum Web Co/swcstudiospace.