# Wave-2 Cross-Goal CONFLICT MAP + Execution Plan
Read-only planning. No code edits, no web. Generated by omk-planner under
skills: omk-plan-first, omk-adaptorch-orchestration-review.
Date: 2026-06-10 | Runtime: OMK hard-fork (omk-parallel-orchestrator).

## Goals in flight (parallel)
- **G1 weights+hygiene** — req `omk-remediation-hardening-...-request.json`
  (result `...-result.json`, status in_progress, halted post-Phase-0).
- **G2 theme T3-T5** — req `theme-contract-t3-t5-...-request.json`
  (result `proof/theme-2026-06-10/t3-t5-orchestration-result.json`).
- **G3 safety kill gate** — req `execute-the-omk-safety-kill-gate-...-request.json`
  (result `proof/rust-lane-2026-06-10/kill-execution/orchestration-result.json`).

Recon basis: `proof/phase0-2026-06-10/recon.md`. Git head shows T5a/T5b/G1-color
already landed (e86413b/31db95b/38a1e50/22708c3/7a83cec); Wave 2 = remaining
T3/T4 + G1 weight-normalize + G3 removal.

---

## 1. FILE-OWNERSHIP MATRIX

### G1 — weight normalization + hygiene (sole owner)
| file | action |
|---|---|
| src/runtime/router-v2-scoring.ts | normalize composite abs-sum 1.20→1.0 (:136-144) |
| src/runtime/contracts/weakness-remediation.ts | normalize RELEASE_GATE_WEIGHTS 1.20→1.0 (:35-45) |
| schemas/omk.weights.v1.json | externalized weight contract (new/own) |
| .gitattributes | linguist-vendored guard (append-only; no overlap w/ existing chrome-ext line) |

### G2 — theme T3-T5 (sole owner)
| file | action |
|---|---|
| src/cli/theme/terminal-capability.ts | honor --no-color, OKLab 24bit→xterm-256 LUT (16-255) |
| src/cli/theme/* (compiler/render tables) | compile night-city.theme.json at startup |
| themes/ , src/brand/night-city.theme.json | source tokens |
| src/brand/palette.ts | becomes compiled-from-theme (SOLE owner; see note) |
| src/util/chat-cockpit.ts | hex/SGR debt migration |
| src/commands/cockpit/render.ts | hex/SGR debt migration |
| src/cli/ui/*renderer*.ts (rust-forge/green-rain/neon-grid) | hex/SGR migration |
| scripts/assets-build.mjs, ASSET_PROVENANCE.md | T4 SVG regen + provenance |
| tests/+proof/ theme snapshots | 4-tier truecolor/256/16/NO_COLOR |

### G3 — safety kill gate (sole owner)
| file | action |
|---|---|
| crates/, Cargo.toml, Cargo.lock | remove |
| scripts/build-native.mjs, rust-safety-check.mjs, normalize-native-artifacts.mjs | remove |
| src/util/native-safety.ts | remove |
| src/commands/doctor/checks.ts, src/schema/proof-bundle.schema.ts, src/contracts/proof.ts | drop native-safety import/lane refs (G3 owns; verify no G2 overlap — none) |
| docs/adr/ (from adr-draft-no-native-lane.md) | commit ADR |
| src/util/secret-scanner.ts (:729 getLineColumn) | newline-offset index perf fix |
| tool dispatch (writableRoots), buildSafeKimiChildEnv | enforce/dedupe |

### SHARED files (NO single goal may free-edit — serialize via integration owner)
| file | claimants | nature |
|---|---|---|
| **package.json** | G3 (remove rust:build/native:build/native:normalize/rust:check + scrub verify:no-kimi, release:check/full/rc, native:no-kimi:turn), G2 (assets:build present; minor wiring only) | structural removal vs minor edit |
| **.github/workflows/ci.yml** | G3 (remove native:build @ L42,L151 + cargo steps in build/smoke/release), G2 (theme:check/color:gate/assets:check @ L35-39 already wired — confirm/extend only) | same file, different hunks |
| **.github/workflows/release.yml, smoke-test.yml** | G3 sole (cargo/native steps) | G3-only; not contested by G2/G1 |
| **release-gate.mjs / release:* scripts** | G3 sole (native:build step removal) | G3-only |

Note: src/brand/palette.ts and its importers (cockpit/render.ts, chat-cockpit.ts,
ui renderers) are ALL inside the G2 lane → not cross-goal shared. Listed in prompt
as "likely shared" but verified G2-internal.

---

## 2. CONFLICT-FREE CODER LANE PARTITIONS (Wave 2)

- **Lane A = G1** (1 coder + reviewer): weight files + schema + .gitattributes.
  Fully disjoint from G2/G3. Runs fully parallel.
- **Lane B = G2** (2 coders: capability+compiler / assets+migration; reviewer
  a11y; qa snapshots+grep): all theme/brand/ui/cockpit/assets files.
  Disjoint from G1 and G3 EXCEPT shared package.json + ci.yml (deferred).
- **Lane C = G3** (coder removal / coder TS-perf / security writableRoots;
  reviewer+qa): crates removal + TS follow-ups. Disjoint EXCEPT shared
  package.json + ci.yml + release/smoke yml (release/smoke are G3-sole).
- **Lane Z = INTEGRATION OWNER (single coder)**: the ONLY writer of the two
  contested files **package.json** and **.github/workflows/ci.yml**. Runs AFTER
  Lane B and Lane C feature work is staged. Applies G3 removals first, then G2
  additions, in one serialized commit per file. Eliminates merge conflict.

Parallel batches:
- **Batch W2.1 (parallel):** Lane A (full), Lane B (all non-shared), Lane C
  (all non-shared incl. release.yml/smoke-test.yml/release-gate which are G3-sole).
- **Batch W2.2 (serialized, Lane Z):** package.json then ci.yml — G3 hunks then
  G2 hunks. Single owner, no concurrent writers.

---

## 3. SHARED-FILE RESOLUTION
- **package.json** → single owner Lane Z. Order: (a) G3 deletes
  rust:build/native:build/native:normalize/rust:check and scrubs them from
  verify:no-kimi, release:check, release:full, release:rc, native:no-kimi:turn;
  (b) THEN G2 confirms/wires assets:build. G1 does not touch package.json.
- **ci.yml** → single owner Lane Z. Order: (a) G3 removes native:build (L42,L151)
  + cargo steps in build/verify/benchmark jobs; (b) THEN G2 keeps/extends
  theme:check/color:gate/assets:check (L35-39). Re-validate fast-gate job after.
- **release.yml / smoke-test.yml / release-gate.mjs** → G3-sole (no contention),
  done in Batch W2.1 by Lane C.

---

## 4. QUALITY GATES (run AFTER Wave 2, per goal)
Run order per goal; all are existing npm scripts.

- **G1:** `npm run schema:check` (omk.weights.v1.json valid + sums=1.0) →
  `lint` → `build:clean` → `test` (routing golden/invariant tests unchanged).
- **G2:** `npm run schema:check` → `theme:check` → `color:gate` →
  `assets:check` → `lint` → `build:clean` → `test` (4-tier snapshots).
- **G3:** `npm run schema:check` → `lint` → `secret:scan` →
  `secret:scan:runtime` (getLineColumn bench) → `build:clean` → `test`.
- **Integration (after Lane Z):** full `npm run verify` then a non-rust
  `release:check` dry run with native:build removed — confirm no dangling
  rust:build/native:build references remain.

Evidence dirs: G1 `.omk/goals/...-result.json` + proof/phase0; G2
`proof/theme-2026-06-10/`; G3 `proof/rust-lane-2026-06-10/kill-execution/`;
integration `proof/orchestration-2026-06-10/`.

---

## 5. ORDERING CONSTRAINTS (decision: pick one)
1. **G3 package.json/ci.yml edits land BEFORE G2's** (chosen). Rationale: G3 is
   structural removal touching release chains; doing removals first yields a
   clean base; G2's asset/theme additions rebase trivially. Lane Z enforces
   G3→G2 within each shared file.
2. G1 has zero ordering dependency — may merge any time (disjoint files).
3. G3 release.yml/smoke-test.yml/release-gate (G3-sole) must land before the
   final integration `release:check` dry run.
4. Lane Z (Batch W2.2) is gated on Batch W2.1 completion of BOTH Lane B and
   Lane C feature work; do not start shared-file edits while features in flight.
5. Final full `npm run verify` runs only after Batch W2.2.

## Risks / blockers
- G3 must scrub native:build from ALL release:* + verify chains; a missed ref
  breaks `release:check`. Mitigation: grep `native:build|rust:build|cargo`
  across package.json + .github + scripts before integration gate.
- G2 color:gate may flag G3-touched files if any color literal lingers post-
  removal; run color:gate after Lane Z.
- G1 weight renormalization must golden-test routing before/after (B2 risk from
  recon). Do not merge G1 without routing snapshot diff.
