# Harness Gap Matrix

This maintainer-facing matrix tracks how SEED Harness is being hardened against
the reference corpora named in `docs/GOAL.md`. Source paths below are
repo-relative paths inside the referenced upstream corpora, not local machine
paths.

## Reference Anchors

- OpenCode graphify: plugin config, command, tool, MCP, and hook API surface.
- oh-my-openagent graphify: layered plugin architecture, hook composition,
  delegation, skill/MCP loading, continuation, team mode, and browser skill
  provider selection.
- Code as Agent Harness graphify: `section_3_4_harness_control_through_the_plan_execute_and_verify_loop`,
  `section_3_4_3_sandboxed_execution_and_permissioned_state_transition`,
  `section_5_2_1_harness_level_evaluation_and_oracle_adequacy`,
  `section_5_2_4_transactional_shared_program_state_and_semantic_conflict_resolution`,
  and `section_5_2_6_multimodal_code_harness_systems`.
- gstack graphify: browser manager, content-security layers, prompt-injection
  defense, eval collection, skill e2e tests, and release/audit discipline.

## Current Matrix

| Area | Reference pattern | Current SEED state | Remaining gap | Validation path |
|---|---|---|---|---|
| Plugin shell | OpenCode plugin/config/command/tool hooks; oh-my-openagent layered managers and five-tier hook composition (`src/hooks`, `src/plugin-handlers`) | SEED has plugin export, config handler, command handler, tool registry, system/message/session/tool/event hooks, and initial tool executors for delegation/reporting | `src/tools/registry.ts` is still a large central module; follow-up/background/session/media tools should keep moving into focused executors without changing the OpenCode surface | Config-handler tests, plugin command integration, tool executor coverage, `npm run verify` |
| Team runtime | oh-my-openagent team mode and Code-as-Harness shared program state | Mailboxes, acknowledgements, task board, ownership, dependencies, member status, cleanup, resume, task revisions, and stale-update conflict records are durable state | Conflict handling is deterministic revision-based; richer semantic merge suggestions and member progress summaries are still shallow | Team-mode unit tests, `runtime.team-member-state`, `runtime.team-cleanup`, `runtime.team-conflict-check`, task dependency eval |
| Continuation | oh-my-openagent continuation hooks; Code-as-Harness context compaction and state offloading | Continuation snapshots include run, tasks, team state, background work, durable parent-session background notifications, evidence refs, pending decisions, and next actions | Live parent prompt dispatch can still add defer/retry policy on top of the durable queue | Session compacting tests, `runtime.continuation-next-actions`, `runtime.background-parent-notification` |
| Observability | oh-my-openagent hook/log surfaces; gstack typed telemetry and review/task logs | SEED writes JSONL trace, evidence, and event-driven 10-minute activity journal windows through a focused observability module while preserving the old trace-store facade | More live child-session transcript capture and black-box workflow oracle checks remain future work | Activity-journal unit tests, `/seed-status` integration, `runtime.activity-journal`, `npm run verify` |
| Delegation and skills | oh-my-openagent `src/tools/delegate-task/skill-resolver.ts`, `src/features/opencode-skill-loader`, browser-provider-gated skills | Delegation can inject requested skills, recommend ready skills from task intent/target agent/category metadata, block missing required MCPs, store injected skill artifacts, and record model attempts | Category-level routing is still metadata-scored rather than policy-driven; automatic skill use is opt-in with `auto_skills` | Delegation tests, `runtime.skill-context-delegation`, `runtime.skill-recommendation`, skill validation eval |
| Model routing | oh-my-openagent model fallback and runtime fallback patterns | SEED supports model profiles, fallback chains, route preflight, recorded attempts, and retry boundaries | Provider availability is inferred from config; richer live provider diagnostics can be added later | Model route tests, `runtime.model-route-check` |
| Media and browser evidence | oh-my-openagent browser automation docs and skills (`docs/reference/features.md`, `src/features/builtin-skills/skills/dev-browser.ts`, `src/config/schema/browser-automation.ts`); gstack browser manager and screenshot/accessibility tests (`browse/src/browser-manager.ts`, `browse/test/commands.test.ts`) | `seed_look_at` inspects local image/PDF/text evidence and recognizes `type: "seed.browser_snapshot"` JSON with untrusted browser content, linked screenshot provenance, policy audit, artifact JSON, and evidence ledger entry. `seed_browser_snapshot` creates that snapshot schema from local files or explicit external URL captures, and `docs/browser-media-sidecar.md` defines the persistent sidecar boundary. | The sidecar is designed but not implemented: persistent sessions, interaction, ref maps, authenticated state workflows, lifecycle leases, and sidecar evals remain future work | Media tests, `runtime.document-inspection-policy`, `runtime.browser-snapshot-inspection`, `runtime.browser-snapshot-capture`, sidecar design review |
| Browser/document security | gstack content-security and security architecture (`ARCHITECTURE.md`, `browse/src/content-security.ts`, `browse/src/security.ts`) | SEED marks external/browser content as untrusted evidence, wraps inspected text/browser content in a `seed.trust_boundary` envelope, strips simple hidden HTML text from visible browser evidence, warns on ARIA/title injection cues and unsafe URL references, and can fail policy audit on configured canary-token leakage | Security is still static and deterministic; there is no live DOM computed-style stripping, ML classifier, interactive user override, or session-wide injected canary yet | Content-security unit tests, policy audit tests, document/browser snapshot evals, `runtime.browser-content-security`, release audit |
| Eval and telemetry | Code-as-Harness oracle adequacy; gstack eval collector and skill e2e suites | SEED has deterministic evals for install, evidence/report/telemetry, team state, continuation, model route, skills, policy, document/browser inspection, and a black-box fixture runner that verifies final report, trace, activity journal, artifact index, and transcript together | More real OpenCode CLI/provider workflow oracles are still needed for fully external delegated task success | `runtime.black-box-artifact-bundle`, `npm run e2e:blackbox`, `npm run verify`, cleanroom validation, canary package validation |
| Artifact and release discipline | gstack audit/release patterns and Code-as-Harness verifiable state | Run/artifact schemas are versioned; artifacts are indexed/readable; release audit, package canary, and cleanroom checks exist | Retention/deletion policy and broader migration fixtures can be expanded | Artifact-store tests, `seed_artifact_read`, `npm run canary:package`, `npm run verify:cleanroom` |

## Near-Term Bias

Prefer work that turns a named harness capability into executable, verifiable,
stateful code. Avoid adding a prompt or doc label unless a corresponding tool,
state transition, artifact, eval, or smoke path proves the behavior.
