- Anomalies observed: 2 pre-existing test failures in `src/features/opencode-skill-loader/skill-content.test.ts` — ambiguous short name resolution returns 2 resolved skills instead of 1 when "debugging" + "playwright" are queried together. This is a REAL baseline failure; do not fix as part of this refactor plan unless explicitly directed.
## [2026-05-20T15:12:12Z] Task 2 pre-flight
-`src/shared/deep-merge.ts`: pure, zero imports.
-`src/shared/snake-case.ts`: imports `./deep-merge` only (moved together) — pure after extraction.
-`src/shared/record-type-guard.ts`: pure, zero imports.
-`src/shared/extract-semver.ts`: pure, zero imports.
- Extracted model resolution pipeline surface into `packages/model-core/` with moved sources/tests and package scaffold (`package.json`, `tsconfig.json`, barrel `src/index.ts`).
- Verdict: REJECT. T6 `lsp-core` deferral accepted and not considered.
- Evidence written under `.omo/evidence/w2-qa-*.txt` for all 10 requested checks.
- Blocking failures:
- Test delta drifted from baseline: `bun test` produced 7311 pass / 1 skip / 3 fail / 1 error / 7315 tests; extra failure is `src/shared/tmux/runner.test.ts:202` after timeout at `src/shared/tmux/runner.test.ts:199`.
-`/tmp/w2-qa-equiv.ts` could not resolve `@oh-my-opencode/utils` from `/private/tmp/w2-qa-equiv.ts:1`.
- Dependency DAG violation: `packages/agents-md-core/package.json:19` depends on `@oh-my-opencode/rules-engine`, a cross-Wave-2 internal dependency beyond utils.
-`packages/rules-core/` still exists, although only `node_modules/` remains inside.
- Passing blocking checks: package symlinks/LSP references, OpenCode coupling sweep, build exit 0, and `dist/` remained 13M.
- Informational coverage concerns: `ast-grep-core`, `comment-checker-core`, `boulder-state`, and `agents-md-core` have zero co-located package tests; `boulder-state` has no critical-path test files.
- Per-file re-export shims at original src/ locations (never `export *`)
- opencode-coupling-audit.test.ts enforces zero Bun.* or src/ coupling in package production code (test files exempt)
- ProviderCache, ConnectedProvidersAdapter, SpawnFn DI interfaces for harness independence
- API designed for future pi/codex adoption
**Deferred future tracks:**
- T6 lsp-core extraction (submodule strategy)
- Pi adapter layer (senpi + extensions)
- Codex adapter layer
- rules-engine full Engine DI (originally planned in T4, scoped to rename only)
- 3 orphan re-export shims for cleanup (apply-patch-edits.ts, model-capability-aliases.ts, model-capability-guardrails.ts)
- Tmux runner test flake (documented)
**Key learnings:**
- Subagents running bash inherit the parent's cwd, NOT the worktree path — must use `workdir` parameter explicitly. FIX-6 subagent deleted from main repo by accident before catching this.
- Coupling audit regex `\bBun\.` is too broad; negative lookbehind `(?<!runtime\.)\bBun\.` correctly distinguishes legitimate dual-runtime shim from production violations.
- Test files importing test data from outside the package are acceptable — audit must exclude `*.test.ts` to avoid false positives.
- Git worktrees + cherry-pick is the cleanest parallel-work pattern when subagents work on independent fixes.
- Subagent overconfidence: marks "done" even when typecheck failures persist; orchestrator-side verification is non-negotiable.