fix(repair-audit/s2): add audit traceability doc and PR-body patches (Refs #2, #3, #4, #5)

This commit is contained in:
John Smith committed 2026-10-12 00:18:29 -04:00
1 parent e625dbea51
commit 72dd39ddde
5 files changed
+385

No files matched your search

+97
View File
@@ -0,0 +1,97 @@
# Release 0.2.0: Phase 2 · Godot Editor Companion Addon
Phase 2 builds the GDScript companion addon in `companion/addons/godot_opencode/`,
the editor-side half of the godot-opencode bridge. It listens loopback-only on
port 9500, authenticates the OpenCode plugin side over the per-port loopback
capability token, and executes editor mutations on the main thread inside a
frame budget. Phase 1 (plugin TS: effect lifecycle, capability/HMAC, WS+JSONRPC,
registry/circuit, bindings) is the peer this addon talks to.
No Godot binary is available in CI for this milestone, so GDScript behavior is
pinned by headless-mock TS harnesses (`companion/tests/`, 28 tests) that mirror
the addon contracts plus GDScript static syntax checks (tabs, no Python-isms,
no credential leakage). Live-editor verification is tracked as follow-up.
## What landed (tickets 2.1–2.6, each merged `--no-ff` with QA + auditor PASS)
- **2.1 — Addon scaffold & authenticated WebSocket server**
`plugin.cfg`, `plugin.gd` (`_enter_tree`/`_exit_tree`), `connection.gd`
(TCPServer on 127.0.0.1:9500 + WebSocketPeer upgrade), `utils/error_codes.gd`.
First frame must be `auth_hello` proving HMAC-SHA256 over
`nonce:9500:server` with the `websocket` capability token; constant-time
compare; generic reject reasons only (no credential leakage).
- **2.2 — Main-thread frame budgeter & dispatcher** (`dispatcher.gd`)
FIFO queue, `PACKET_DRAIN_CAP_PER_TICK=32`, `budget_ms=4.0` per tick, spillover
counter; connection enqueues decoded frames and routes responses by
`request_id` back to the issuing peer.
- **2.3 — Cooperative transport servicing during blocking runs**
`service_transport_during_exclusive_run()`: polls peers directly while the
main thread is blocked, answers heartbeat pongs (keeps the 20s/60s keepalive
alive), rejects inbound mutations with `EDITOR_NOT_READY` /
`EDITOR_TEST_RUNNING` (sub-code never promoted), 2048-packet flood cap.
- **2.4 — EditorUndoRedoManager & dynamic node mutation** (`undo_manager.gd`)
Add/delete/rename/set-property as atomic actions; undo steps re-resolve
targets **by path at undo time** (index clamp on reinsert) — middle-child
deletes and reorder-between-do-and-undo cannot drift.
- **2.5 — Core domain handlers** (`handlers/`)
`node_handler` (create/delete/reparent/set-property + `instantiate_scene`
with `GEN_EDIT_STATE_INSTANCE`, invalid scene refs rejected),
`signal_handler` (list/connect/disconnect, editor-internal filtered),
`resource_handler` (search/load/inspect/assign for `.tres`/`.res`/uid).
All registered on the dispatcher by `plugin.gd`.
- **2.6 — Out-of-band debugger & engine bridge** (`debugger/debugger_plugin.gd`)
`EditorDebuggerPlugin` capturing the `opencode` channel: console lines,
unhandled exceptions (always with stack), query responses routed by id;
forwarded through the bridge connection as events.
## Gate (ticket 2.7)
- `bun x biome check ./packages/` — clean (22 files)
- `tsc --noEmit` — clean
- `bun test ./packages/plugin/test/` — 46 pass
- `bun test ./companion/tests/` — 28 pass
## Follow-up (not blocking)
- Live-editor verification once a Godot 4.x binary is available: enable addon
in a test project, run handshake round-trip, exercise undo/redo and the
exclusive-run heartbeat path against the real `EditorUndoRedoManager`.
## Traceability (per-ticket SHA / Files / Verification)
Phase-2 HEAD: `846ce82` (merge of ticket 2.6). Full table: `docs/AUDIT-TRACEABILITY.md`.
| Ticket | Feature SHA | Merge SHA | Files | Verification |
| :--- | :--- | :--- | :--- | :--- |
| 2.1 Addon scaffold + authenticated WebSocket server | `4913cd5` | `0c6721d` | `companion/addons/godot_opencode/connection.gd`, `companion/addons/godot_opencode/plugin.cfg`, `companion/addons/godot_opencode/plugin.gd`, `companion/addons/godot_opencode/utils/error_codes.gd`, `companion/tests/handshake_harness.test.ts` | 74 pass, 0 fail (`bun test ./packages/plugin/test/ ./companion/tests/`) |
| 2.2 Main-thread frame budgeter + dispatcher | `6071b3b` | `df6ed72` | `companion/addons/godot_opencode/connection.gd`, `companion/addons/godot_opencode/dispatcher.gd`, `companion/tests/dispatcher_harness.test.ts` | 74 pass, 0 fail |
| 2.3 Cooperative transport servicing during blocking runs | `a5ccd8f` | `1188d7e` | `companion/addons/godot_opencode/connection.gd`, `companion/tests/exclusive_run_harness.test.ts` | 74 pass, 0 fail |
| 2.4 EditorUndoRedoManager with path-based undo | `8b00c79` | `f5b0419` | `companion/addons/godot_opencode/undo_manager.gd`, `companion/tests/undo_harness.test.ts` | 74 pass, 0 fail |
| 2.5 Core domain handlers (node/signal/resource) | `65ca60e` | `94c2ec4` | `companion/addons/godot_opencode/connection.gd`, `companion/addons/godot_opencode/handlers/node_handler.gd`, `companion/addons/godot_opencode/handlers/resource_handler.gd`, `companion/addons/godot_opencode/handlers/signal_handler.gd`, `companion/addons/godot_opencode/plugin.gd`, `companion/tests/handlers_harness.test.ts` | 74 pass, 0 fail |
| 2.6 Out-of-band debugger + engine bridge | `fc8f263` | `846ce82` | `companion/addons/godot_opencode/connection.gd`, `companion/addons/godot_opencode/debugger/debugger_plugin.gd`, `companion/addons/godot_opencode/plugin.gd`, `companion/tests/debugger_harness.test.ts` | 74 pass, 0 fail |
## Summary by Sourcery
Deliver the Phase 2 Godot Editor companion and complete the core authenticated bridge, editor mutation, debugger integration, and plugin-side transport foundations.
New Features:
- Add a Godot Editor companion addon with an authenticated loopback WebSocket bridge on port 9500.
- Support undoable scene-node, signal, and resource editor operations with main-thread dispatch and frame-budget enforcement.
- Bridge Godot debugger console output, exceptions, and engine query responses to the plugin side.
- Add the TypeScript plugin lifecycle, Godot tool/RPC bindings, secure capability storage, HMAC handshake, session readiness, circuit breaking, JSON-RPC, and WebSocket transport foundations.
Bug Fixes:
- Prevent editor mutations during exclusive runs while preserving heartbeat servicing and bounding packet floods.
- Make undo and redo resilient to node reordering and sibling index drift by resolving scene targets at operation time.
- Reject malformed, oversized, unauthenticated, or unsafe capability and transport data without exposing credentials.
Enhancements:
- Establish shared editor readiness and protocol error semantics across the TypeScript plugin and GDScript addon.
Build:
- Add Bun lockfile coverage for the expanded plugin and companion tooling.
Tests:
- Add headless TypeScript contract harnesses for the Godot addon and comprehensive plugin tests covering security, transport, lifecycle, bindings, sessions, and failure handling.
Traceability: docs/AUDIT-TRACEABILITY.md (Refs #2)
+59
View File
@@ -0,0 +1,59 @@
# Release 0.3.0: Phase 3 · Dual-Mode Verification & Pre-Flight Engine
Phase 3 adds the verification layer for godot-opencode: headless Godot checks
that degrade gracefully when no binary is present, plus pre-flight safety
gates for writes and commits. All tests pass **without** a Godot binary
(no `godot` on PATH in CI); runners shell out when a binary exists and return
structured `unavailable` diagnostics otherwise.
## Tickets
- **3.1 Headless CLI Syntax & Type Checker** (`packages/plugin/src/verify/headless.ts`)
`HeadlessRunner` wraps `godot --headless --check-only -s <script>`, parses
`SCRIPT ERROR` / `at: … (file:line:col)` locations into `{file,line,col,message}`.
Binary-missing → `{status:"unavailable"}` (no throw); hangs → `{status:"timeout"}`.
- **3.2 Scene & Resource Validator** (`packages/plugin/src/verify/scene.ts`,
`companion/validate_scene.gd`) — pure-`.tscn` parsing of `ext_resource` deps
and `[connection]` refs; missing files and broken signal refs reported as
structured issues. GDScript harness emits single-JSON-object results headlessly.
- **3.3 GUT Test Runner** (`packages/plugin/src/verify/gut.ts`) — runs
`gut_cmdln.gd -gdir=res://tests/ -gexit`; parses TAP and JUnit into
`{pass,fail,tests[],timings}` with failure stacks preserved.
- **3.4 Safety Middleware & Write Guards** (`packages/plugin/src/guards/middleware.ts`)
`tool.hook("execute.before")`-compatible interceptor with structural interfaces
only (no `@opencode/*` imports). Blocks `rm -rf *`, `git push --force`,
`git reset --hard`; gates `.gd`/`.tscn` writes behind pre-flight syntax checks
(fail-open on `unavailable`, fail-closed on `error`).
- **3.5 Pre-Commit Validation Hook** (`scripts/validate-commit.sh` + TS harness)
Validates staged `.json` tables parse, GDScript quick check (conflict markers +
`int`/`String` type slips), optional test gate (`--run-tests`).
## Verification (gate 3.6)
- `bunx biome check packages/` — clean
- `bunx tsc --noEmit` — clean
- `bun test ./packages/plugin/test/ ./companion/tests/` — **99 pass, 0 fail**
- `scripts/validate-commit.sh` — `ok` on every ticket commit
- No Godot binary on PATH: full suite green via mocks + `unavailable` paths
## Traceability (per-ticket commit SHA / Files / Verification)
Sequential commits on top of phase-2 HEAD `846ce82` (no merge commits).
Full table: `docs/AUDIT-TRACEABILITY.md`.
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 3.1 Headless CLI syntax + type checker | `3d6579f` | `packages/plugin/src/verify/headless.ts`, `packages/plugin/test/headless.test.ts` | 99 pass, 0 fail (`bun test ./packages/plugin/test/ ./companion/tests/`); `scripts/validate-commit.sh` ok |
| 3.2 Scene + resource validator with headless harness | `2ed1db1` | `companion/validate_scene.gd`, `packages/plugin/src/verify/scene.ts`, `packages/plugin/test/scene.test.ts` | 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.3 GUT test runner (TAP + JUnit parsing) | `0e25b12` | `packages/plugin/src/verify/gut.ts`, `packages/plugin/test/gut.test.ts` | 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.4 Safety middleware + write guards | `194e1ac` | `packages/plugin/src/guards/middleware.ts`, `packages/plugin/test/middleware.test.ts` | 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.5 Pre-commit validation hook | `03d7c06` | `packages/plugin/test/validate-commit.test.ts`, `scripts/validate-commit.sh` | 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
## Notes
- `main` untouched; this PR targets `main` from `integration/phase-3` (5 commits on top of phase-2 HEAD `846ce82`).
- `MASTER_ORCHESTRATOR_PROMPT.md` (untracked, pre-existing) intentionally excluded.
- Worktree isolation was collapsed to sequential commits: single-agent execution,
no parallel workers, so no cross-ticket interference was possible.
Traceability: docs/AUDIT-TRACEABILITY.md (Refs #3)
+71
View File
@@ -0,0 +1,71 @@
# Release 0.4.0: Phase 4 · Studio Swarm & Director Gating
## Summary
Phase 4 adds the studio collaboration layer on top of the Phase 3 verification
harness: a transform-compatible agent roster, a deterministic 26-gate director
protocol, five mock-testable slash commands, and an idempotent model-context
interceptor. All modules define minimal structural interfaces locally —
zero `@opencode/*` imports.
## Tickets
- **4.1 Studio Agent Roster** (`packages/plugin/src/studio/agents.ts`)
10 agents in 3 tiers. Directors (`technical-director`, `creative-director`,
`producer`; `opus`/`pro`) enforce `shell:deny edit:deny`; Leads
(`lead-programmer`, `game-designer`, `qa-lead`) enforce `shell:deny
edit:ask`; Specialists (`godot-architect`, `godot-gdscript-specialist`,
`godot-shader-specialist`, `godot-qa-tester`) allow both.
`studioAgentTransform` is a `ctx.agent.transform()`-compatible callback.
Unknown ids throw (`requireStudioAgent`, `checkStudioPermission`).
- **4.2 Director Gate Protocol** (`packages/plugin/src/studio/gates.ts`)
26 gates (`CD-PILLARS` … `QL-TEST-COVERAGE`). Line 1
`[GATE-ID]: APPROVE|CONCERNS|REJECT|NOT ASSESSED` + criteria;
`parseGateVerdict` rejects malformed/unknown/lowercase lines.
`aggregateGateVerdicts` enforces REJECT > CONCERNS > NOT ASSESSED >
APPROVE (empty → NOT ASSESSED).
- **4.3 Slash Commands** (`packages/plugin/src/studio/commands.ts`)
`setup-godot`, `adr`, `dev-story` (load → spawn → GUT → headless →
commit, aborts on first failure), `story-done` (8-phase acceptance
audit), `gate-check` (worst-verdict aggregation; REJECT → `ok:false`).
`registerStudioCommands` is `ctx.command.transform()`-compatible;
unknown commands throw.
- **4.4 Context Packing** (`packages/plugin/src/studio/context.ts`)
`studioContextHook` is `ctx.session.hook("context")`-compatible; injects
engine version, editor status, active scene tree behind
`<!-- godot-context -->`. Repeat hooks replace in place — never duplicate —
and pre-existing system entries are preserved.
## Verification (explicit paths, `./packages/` only)
- `bun test ./packages/plugin/test/agents.test.ts ./packages/plugin/test/gates.test.ts ./packages/plugin/test/commands.test.ts ./packages/plugin/test/context.test.ts` → 24 pass
- Full plugin suite (13 pre-existing files, explicit paths) → 71 pass
- `./node_modules/.bin/biome check packages/plugin/src/studio/ <4 test files>` → clean
- `./node_modules/.bin/tsc --noEmit` → exit 0
- No `@opencode/*` imports in `packages/plugin/src/studio/` (grep-verified;
only doc comments mention the name)
## Traceability (lumped commit SHA / per-ticket Files / Verification)
**ATOMICITY: lumped — see H3.** Phase 4 ships as a single commit `d0ce544`
(`feat(phase-4): studio swarm roster, director gates, slash commands, context packing`)
covering tickets 4.1–4.4. Per-ticket file groups inside the lumped commit.
Full table: `docs/AUDIT-TRACEABILITY.md`.
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 4.1 Studio agent roster | `d0ce544` (lumped) | `packages/plugin/src/studio/agents.ts`, `packages/plugin/test/agents.test.ts` | 123 pass, 0 fail (explicit paths); TDD RED→GREEN per ticket; `bun run check` clean |
| 4.2 Director gate protocol | `d0ce544` (lumped) | `packages/plugin/src/studio/gates.ts`, `packages/plugin/test/gates.test.ts` | 123 pass, 0 fail (explicit paths); TDD RED→GREEN per ticket; `bun run check` clean |
| 4.3 Slash commands | `d0ce544` (lumped) | `packages/plugin/src/studio/commands.ts`, `packages/plugin/test/commands.test.ts` | 123 pass, 0 fail (explicit paths); TDD RED→GREEN per ticket; `bun run check` clean |
| 4.4 Context packing | `d0ce544` (lumped) | `packages/plugin/src/studio/context.ts`, `packages/plugin/test/context.test.ts` | 123 pass, 0 fail (explicit paths); TDD RED→GREEN per ticket; `bun run check` clean |
## Notes
- Gate roster pins the 26 pre-production gates (`CD-*`/`TD-*`/`PR-*`/`AD-*`/
`LP-*`/`QL-*`); `ND-CONSISTENCY`/`AD-VISUAL` are out of scope for 0.4.0.
- TDD failing-first per ticket: tests landed RED (missing module), then
GREEN after implementation.
- Constitution honored: main untouched, explicit `git add`, checks scoped to
`./packages/`, no reviewer-prompt execution.
Traceability: docs/AUDIT-TRACEABILITY.md (Refs #4)
+71
View File
@@ -0,0 +1,71 @@
# Release 1.0.0: Full-Stack Production & Visual Inspection
Phase 5 (tickets 5.1–5.5) on top of Phase-4 HEAD `d0ce544`. No Godot
binary or viewport in CI — vision/indexing legs degrade gracefully
(stale-fallback detection, `unavailable` statuses) with mock harnesses.
## What landed
- **5.1 Viewport Vision & Screenshots**
- `companion/addons/godot_opencode/viewport_handler.gd` (2D/3D capture,
AABB framing, `capture_status`, stale fallback past 1000 ms)
- `packages/plugin/src/vision/viewport.ts` (`frameAABB`,
`isStaleFrame`, `parseCaptureResult`, `MAIN_LOOP_STALL_MSEC=1000`)
- `godot_capture_viewport` tool binding; framing math + stale detection
unit-tested (`test/viewport.test.ts`, 12 tests).
- **5.2 Shaders & UI Themes**
- `handlers/shader_handler.gd` + `handlers/theme_handler.gd`, wired in
`plugin.gd`; `src/studio/shaders.ts` (spatial/canvas-item gen,
uniform injection, StyleBoxFlat/font/color overrides);
`godot_shader_generate` + `godot_theme_apply_style` tools;
uniform-injection + style-override round-trip tests.
- **5.3 Scene Graph Indexing**
- `src/indexer/project.ts` (VariantParser-subset `.tscn` parse,
`project.godot` autoloads, injectable FS, Markdown architecture map);
fixture project indexed + rendered (`test/project-index.test.ts`).
- **5.4 E2E Production Benchmark**
- `src/verify/production.ts` + `test/e2e-production.test.ts`:
brief → dev-story (mock) → scene → typed GDScript → signal →
HUD style → GUT (mock TAP) → headless (`unavailable`-tolerant) →
viewport (`stale`-tolerant). Green without engine; real GUT/headless
failures still fail the pipeline.
- **5.5 Docs** — `docs/INSTALL.md`, `docs/API.md`,
`docs/ARCHITECTURE.md`, `docs/RELEASE-1.0.0.md`.
## Verification
- `bun run check` (Biome + `tsc --noEmit`): clean, exit 0.
- New tests: 28/28 pass across the 4 Phase-5 files.
- `bun test packages/plugin/test/`: 123 pass; the single combined-run
`1 fail + 1 error` (a `review/opencode` module-resolution artifact in
gitignored `review/`) **pre-exists on Phase-4 HEAD** (verified via
`git stash`); every file passes in isolation — no regressions.
- `bun test packages/` repo-wide sweeps gitignored `review/` reference
material and is not a valid gate; explicit paths per ticket.
## Traceability (lumped commit SHA / per-ticket Files / Verification)
**ATOMICITY: lumped — see H3.** Phase 5 ships as a single commit `e625dbe`
(`feat(phase-5): viewport vision, shaders/themes, scene indexing, e2e benchmark, 1.0.0 docs`)
covering tickets 5.1–5.5 + docs, on top of Phase-4 HEAD `d0ce544`.
Per-ticket file groups inside the lumped commit.
Full table: `docs/AUDIT-TRACEABILITY.md`.
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 5.1 Viewport vision + screenshots | `e625dbe` (lumped) | `companion/addons/godot_opencode/viewport_handler.gd`, `packages/plugin/src/vision/viewport.ts`, `packages/plugin/test/viewport.test.ts`, `packages/plugin/src/bindings/tools.ts` (`godot_capture_viewport` binding) | 151 combined pass, 0 fail; 12/12 viewport tests; stale-tolerant without engine |
| 5.2 Shaders + UI themes | `e625dbe` (lumped) | `companion/addons/godot_opencode/handlers/shader_handler.gd`, `companion/addons/godot_opencode/handlers/theme_handler.gd`, `companion/addons/godot_opencode/plugin.gd` (wiring), `packages/plugin/src/studio/shaders.ts`, `packages/plugin/test/shaders.test.ts` | 151 combined pass, 0 fail; uniform-injection + style-override round-trip tests |
| 5.3 Scene graph indexing | `e625dbe` (lumped) | `packages/plugin/src/indexer/project.ts`, `packages/plugin/test/project-index.test.ts` | 151 combined pass, 0 fail; fixture project indexed + rendered |
| 5.4 E2E production benchmark | `e625dbe` (lumped) | `packages/plugin/src/verify/production.ts`, `packages/plugin/test/e2e-production.test.ts` | 151 combined pass, 0 fail; green without engine; real GUT/headless failures still fail the pipeline |
| 5.5 Docs (1.0.0) | `e625dbe` (lumped) | `docs/INSTALL.md`, `docs/API.md`, `docs/ARCHITECTURE.md`, `docs/RELEASE-1.0.0.md` | Docs-only; `bun run check` clean |
Counts: 123 plugin-only + 28 companion = 151 combined
(explicit paths; bare sweeps of gitignored `review/` are not a gate).
## Known limits (no engine in CI)
- GDScript handlers are statically reviewed, not engine-executed;
runtime validation (`capture_viewport`, style apply) needs a Godot 4
editor pass on a machine with the binary.
Traceability: docs/AUDIT-TRACEABILITY.md (Refs #5)
+87
View File
@@ -0,0 +1,87 @@
# Audit Traceability — godot-opencode Phases 1–5
Per-ticket commit SHA, file list, and verification evidence for every phase.
All SHAs verified with `git cat-file -e <sha>`; all files verified with
`git ls-tree -r --name-only integration/phase-<N>`.
Repair-audit context: S1 harnesses land on top in `integration/repair-audit`.
Published history (`d0ce544`, `e625dbe`) is immutable to agents — see H3.
All references use `Refs`, never `Closes`/`Fixes`.
## Test-evidence floors (explicit paths only)
| Phase | Tests | Result | Command |
| :--- | :--- | :--- | :--- |
| P1 | 46 | 0 fail | `bun test ./packages/plugin/test/` |
| P2 | 74 | 0 fail | `bun test ./packages/plugin/test/ ./companion/tests/` (46 plugin + 28 companion) |
| P3 | 99 | 0 fail | `bun test ./packages/plugin/test/ ./companion/tests/` |
| P4 | 123 | 0 fail | `bun test ./packages/plugin/test/ ./companion/tests/` (explicit paths; bare sweeps of gitignored `review/` are not a gate) |
| P5 | 151 | 0 fail | `bun test ./packages/plugin/test/ ./companion/tests/` — 123 plugin-only + 28 companion = 151 combined (explicit paths; bare sweeps of `review/` are not a gate) |
## Phase 1 — Plugin foundations (branch `integration/phase-1`)
| Ticket | Feature SHA | Merge SHA | Files | Verification |
| :--- | :--- | :--- | :--- | :--- |
| 1.1 Monorepo scaffolding + effect lifecycle | `65038a6` | `fb0d5f3` | `packages/plugin/src/effect.ts`, `packages/plugin/src/index.ts`, `packages/plugin/src/plugin.ts`, `packages/plugin/test/plugin.test.ts` | P1 floor: 46 pass, 0 fail (`bun test ./packages/plugin/test/`) |
| 1.2 Loopback capability + HMAC security | `8a8dcdc` | `eadba50` | `packages/plugin/src/security/capability.ts`, `packages/plugin/src/security/handshake.ts`, `packages/plugin/test/capability.test.ts`, `packages/plugin/test/handshake.test.ts` | P1 floor: 46 pass, 0 fail |
| 1.3 Native WebSocket + JSON-RPC engine | `772c253` | `95be83d` | `packages/plugin/src/transport/jsonrpc.ts`, `packages/plugin/src/transport/websocket.ts`, `packages/plugin/test/jsonrpc.test.ts`, `packages/plugin/test/websocket.test.ts` | P1 floor: 46 pass, 0 fail |
| 1.4 Readiness state machine + circuit breaker | `9bbbc68` | `7c3f388` | `packages/plugin/src/session/circuit.ts`, `packages/plugin/src/session/registry.ts`, `packages/plugin/test/circuit.test.ts`, `packages/plugin/test/registry.test.ts` | P1 floor: 46 pass, 0 fail |
| 1.5 Tool transform + RPC namespace adapters | `4386438` | `9713d36` | `packages/plugin/src/bindings/rpc.ts`, `packages/plugin/src/bindings/tools.ts`, `packages/plugin/test/bindings.test.ts` | P1 floor: 46 pass, 0 fail |
## Phase 2 — Godot Editor companion addon (branch `integration/phase-2`)
| Ticket | Feature SHA | Merge SHA | Files | Verification |
| :--- | :--- | :--- | :--- | :--- |
| 2.1 Addon scaffold + authenticated WebSocket server | `4913cd5` | `0c6721d` | `companion/addons/godot_opencode/connection.gd`, `companion/addons/godot_opencode/plugin.cfg`, `companion/addons/godot_opencode/plugin.gd`, `companion/addons/godot_opencode/utils/error_codes.gd`, `companion/tests/handshake_harness.test.ts` | P2 floor: 74 pass, 0 fail (`bun test ./packages/plugin/test/ ./companion/tests/`) |
| 2.2 Main-thread frame budgeter + dispatcher | `6071b3b` | `df6ed72` | `companion/addons/godot_opencode/connection.gd` (enqueue/routing), `companion/addons/godot_opencode/dispatcher.gd`, `companion/tests/dispatcher_harness.test.ts` | P2 floor: 74 pass, 0 fail |
| 2.3 Cooperative transport servicing during blocking runs | `a5ccd8f` | `1188d7e` | `companion/addons/godot_opencode/connection.gd` (exclusive-run servicing), `companion/tests/exclusive_run_harness.test.ts` | P2 floor: 74 pass, 0 fail |
| 2.4 EditorUndoRedoManager with path-based undo | `8b00c79` | `f5b0419` | `companion/addons/godot_opencode/undo_manager.gd`, `companion/tests/undo_harness.test.ts` | P2 floor: 74 pass, 0 fail |
| 2.5 Core domain handlers (node/signal/resource) | `65ca60e` | `94c2ec4` | `companion/addons/godot_opencode/connection.gd` (dispatch wiring), `companion/addons/godot_opencode/handlers/node_handler.gd`, `companion/addons/godot_opencode/handlers/resource_handler.gd`, `companion/addons/godot_opencode/handlers/signal_handler.gd`, `companion/addons/godot_opencode/plugin.gd` (registration), `companion/tests/handlers_harness.test.ts` | P2 floor: 74 pass, 0 fail |
| 2.6 Out-of-band debugger + engine bridge | `fc8f263` | `846ce82` | `companion/addons/godot_opencode/connection.gd` (bridge), `companion/addons/godot_opencode/debugger/debugger_plugin.gd`, `companion/addons/godot_opencode/plugin.gd` (wiring), `companion/tests/debugger_harness.test.ts` | P2 floor: 74 pass, 0 fail |
Phase-2 HEAD: `846ce82` (merge of ticket 2.6).
## Phase 3 — Dual-mode verification & pre-flight engine (branch `integration/phase-3`)
Sequential commits on top of phase-2 HEAD `846ce82` (no merge commits).
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 3.1 Headless CLI syntax + type checker | `3d6579f` | `packages/plugin/src/verify/headless.ts`, `packages/plugin/test/headless.test.ts` | P3 floor: 99 pass, 0 fail (`bun test ./packages/plugin/test/ ./companion/tests/`); `scripts/validate-commit.sh` ok |
| 3.2 Scene + resource validator with headless harness | `2ed1db1` | `companion/validate_scene.gd`, `packages/plugin/src/verify/scene.ts`, `packages/plugin/test/scene.test.ts` | P3 floor: 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.3 GUT test runner (TAP + JUnit parsing) | `0e25b12` | `packages/plugin/src/verify/gut.ts`, `packages/plugin/test/gut.test.ts` | P3 floor: 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.4 Safety middleware + write guards | `194e1ac` | `packages/plugin/src/guards/middleware.ts`, `packages/plugin/test/middleware.test.ts` | P3 floor: 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
| 3.5 Pre-commit validation hook | `03d7c06` | `packages/plugin/test/validate-commit.test.ts`, `scripts/validate-commit.sh` | P3 floor: 99 pass, 0 fail; `scripts/validate-commit.sh` ok |
## Phase 4 — Studio swarm & director gating (branch `integration/phase-4`)
**ATOMICITY: lumped — see H3.** Single commit `d0ce544`
(`feat(phase-4): studio swarm roster, director gates, slash commands, context packing`)
covers tickets 4.1–4.4. Per-ticket file groups inside the lumped commit:
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 4.1 Studio agent roster | `d0ce544` (lumped) | `packages/plugin/src/studio/agents.ts`, `packages/plugin/test/agents.test.ts` | P4 floor: 123 pass, 0 fail (explicit paths); TDD RED→GREEN per ticket; `bun run check` clean; no `@opencode/*` imports in `packages/plugin/src/studio/` (grep-verified) |
| 4.2 Director gate protocol | `d0ce544` (lumped) | `packages/plugin/src/studio/gates.ts`, `packages/plugin/test/gates.test.ts` | P4 floor: 123 pass, 0 fail; `bun run check` clean |
| 4.3 Slash commands | `d0ce544` (lumped) | `packages/plugin/src/studio/commands.ts`, `packages/plugin/test/commands.test.ts` | P4 floor: 123 pass, 0 fail; `bun run check` clean |
| 4.4 Context packing | `d0ce544` (lumped) | `packages/plugin/src/studio/context.ts`, `packages/plugin/test/context.test.ts` | P4 floor: 123 pass, 0 fail; `bun run check` clean |
## Phase 5 — Full-stack production & visual inspection (branch `integration/phase-5`)
**ATOMICITY: lumped — see H3.** Single commit `e625dbe`
(`feat(phase-5): viewport vision, shaders/themes, scene indexing, e2e benchmark, 1.0.0 docs`)
covers tickets 5.1–5.5 + docs. Per-ticket file groups inside the lumped commit:
| Ticket | Commit SHA | Files | Verification |
| :--- | :--- | :--- | :--- |
| 5.1 Viewport vision + screenshots | `e625dbe` (lumped) | `companion/addons/godot_opencode/viewport_handler.gd`, `packages/plugin/src/vision/viewport.ts`, `packages/plugin/test/viewport.test.ts`, `packages/plugin/src/bindings/tools.ts` (`godot_capture_viewport` binding) | P5 floor: 151 combined pass, 0 fail; 12/12 viewport tests; stale-tolerant without engine |
| 5.2 Shaders + UI themes | `e625dbe` (lumped) | `companion/addons/godot_opencode/handlers/shader_handler.gd`, `companion/addons/godot_opencode/handlers/theme_handler.gd`, `companion/addons/godot_opencode/plugin.gd` (wiring), `packages/plugin/src/studio/shaders.ts`, `packages/plugin/test/shaders.test.ts` | P5 floor: 151 combined pass, 0 fail; uniform-injection + style-override round-trip tests |
| 5.3 Scene graph indexing | `e625dbe` (lumped) | `packages/plugin/src/indexer/project.ts`, `packages/plugin/test/project-index.test.ts` | P5 floor: 151 combined pass, 0 fail; fixture project indexed + rendered |
| 5.4 E2E production benchmark | `e625dbe` (lumped) | `packages/plugin/src/verify/production.ts`, `packages/plugin/test/e2e-production.test.ts` | P5 floor: 151 combined pass, 0 fail; green without engine; real GUT/headless failures still fail the pipeline |
| 5.5 Docs (1.0.0) | `e625dbe` (lumped) | `docs/INSTALL.md`, `docs/API.md`, `docs/ARCHITECTURE.md`, `docs/RELEASE-1.0.0.md` | Docs-only; `bun run check` clean |
Counts: 123 plugin-only + 28 companion = 151 combined
(explicit paths; bare sweeps of gitignored `review/` are not a gate).
Note: S1 repair harnesses land on top in `integration/repair-audit`,
after `e625dbe`.