Skip to content

Commit 24ac63d

Browse files
committed
test: add OpenCode eval suite + register opencode in x-x init
Adds a third agentTarget (opencode -> .opencode/commands) so `x-x init --agents opencode` writes the bundled SKILL.md tree alongside the existing Claude/Codex paths. The Go install code is generic over agentTargets; only constants.go and the e2e/PS1 mirrors needed updates. Adds skills-evals coverage for OpenCode: - opencode_driver.py drives `opencode run --format json --model deepseek/...` one turn per subprocess (`--continue` for follow-ups, per anomalyco/opencode#7345 there is no stdin-multi-turn protocol). The auto-yes loop becomes "spawn a fresh process whose prompt is 'yes'". - compose_skill_prompt inlines a SKILL.md template + task into the prompt because `opencode run` does not currently resolve slash commands (#7345, with feature requests #2330 and #5073 tracking a --command flag / `opencode run "/cmd"` resolver). Sidesteps the resolver gap until those land; still exercises the agent's behavior against the skill prompt. - resolve_skill_template walks .opencode/commands/<name>/SKILL.md at project then user scope, matching the project-then-user rule in the bundled SKILL.md docs. - conftest selects backend by X_X_AGENT_KEY (default claude) and filters collection so a session runs exactly one agent's files. - Four opencode tests mirror the claude scenarios (smoke + todo + extends + supersedes-todo). - Two workflows (manual-opencode-judge.yml + user-scope variant) wire the new env (X_X_AGENT_KEY=opencode, DEEPSEEK_API_KEY direct — no ANTHROPIC_* mirror needed since OpenCode reads the deepseek provider key directly). E2E parity: bash and PowerShell e2e gain OPENCODE_SKILLS_REL mirrors, an opencode-only install case, an all-three install case, and the shared-docs / resolution-anchor invariants now scan the OpenCode root alongside Claude and Codex. constants_e2e_test.go mirrors OPENCODE_SKILLS_REL. Doc updates: docs/public/reference.md lists opencode as a recognized --agents key with the headless-resolution caveat; docs/internal/adding-agent-eval-backend.md documents the per-agent file-naming convention and the X_X_AGENT_KEY filter. Renames test_stream_json_smoke.py -> test_claude_stream_json_smoke.py so every test file matches the test_<agent>_<scenario>.py pattern the conftest filter keys on. Signed-off-by: Tanzim Saqib <[email protected]>
1 parent c0983de commit 24ac63d

13 files changed

Lines changed: 1121 additions & 61 deletions

‎constants.go‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ var agentTargets = []agentTarget{
120120
// config.toml, etc.) still lives under .codex/ — see Codex docs:
121121
// https://developers.openai.com/codex/hooks for the lookup order.
122122
{"codex", "Codex CLI", ".agents/skills", "codex", ".codex"},
123+
// OpenCode's TUI resolves slash commands from `.opencode/commands/`
124+
// (project) or `~/.config/opencode/commands/` (user). We install the
125+
// bundled SKILL.md tree under the project- / user-scope `.opencode/commands/`
126+
// root so the on-disk shape matches Claude/Codex. Note: at the time of
127+
// writing, `opencode run` does NOT resolve slash commands
128+
// (anomalyco/opencode#7345, #2330, #5073) — the TUI does, the headless
129+
// `run` does not. Until those land, automated callers (including
130+
// skills-evals/src/skills_evals/opencode_driver.py) must inline the
131+
// SKILL.md content into the prompt rather than relying on `/x-plan`-style
132+
// resolution. We ship to `.opencode/commands/` anyway so interactive
133+
// TUI use of the bundled skills works today without a re-install.
134+
// No per-agent config is bundled for OpenCode yet (auth + provider
135+
// routing live outside the install scope, in `~/.local/share/opencode/`).
136+
{"opencode", "OpenCode", ".opencode/commands", "", ""},
123137
}
124138

125139
// skillsSubdir is the directory inside ~/.x-x/agents/ that holds the

‎constants_e2e_test.go‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ func TestE2EShellConstantsMatchGo(t *testing.T) {
4949
"SHARED_DOC_SYSTEMS": sharedDocSystems,
5050
"SHARED_DOC_EARS": sharedDocEars,
5151

52-
"CLAUDE_SKILLS_REL": agentTargets[0].skillsRel,
53-
"CLAUDE_CONFIG_REL": agentTargets[0].configRel,
54-
"CODEX_SKILLS_REL": agentTargets[1].skillsRel,
55-
"CODEX_CONFIG_REL": agentTargets[1].configRel,
52+
"CLAUDE_SKILLS_REL": agentTargets[0].skillsRel,
53+
"CLAUDE_CONFIG_REL": agentTargets[0].configRel,
54+
"CODEX_SKILLS_REL": agentTargets[1].skillsRel,
55+
"CODEX_CONFIG_REL": agentTargets[1].configRel,
56+
"OPENCODE_SKILLS_REL": agentTargets[2].skillsRel,
57+
// OpenCode has no per-agent config bundled — agentTargets[2].configRel
58+
// is "" and is intentionally not mirrored on the shell side.
5659
}
5760

5861
for name, expected := range want {

‎docs/internal/adding-agent-eval-backend.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ section below maps to something already shipped there.
1717
`manual-claude-judge-user-scope.yml` (user scope). They share the
1818
same pytest scenarios and differ only in the `X_X_INSTALL_SCOPE`
1919
env var.
20-
- Four pytest scenarios under `skills-evals/tests/`:
21-
- `test_stream_json_smoke.py` — format-check on the protocol (runs first)
20+
- Four pytest scenarios under `skills-evals/tests/` per agent. The
21+
filename pattern is `test_<agent>_<scenario>.py`; the conftest's
22+
`pytest_collection_modifyitems` reads `X_X_AGENT_KEY` (default
23+
`claude`) and deselects every file that doesn't match the active
24+
agent, so a session runs exactly one backend's collection without
25+
cross-contamination. Claude's set today:
26+
- `test_claude_stream_json_smoke.py` — shape-check on the wire (runs first)
2227
- `test_claude_plan_extends.py` — bidirectional `extends:` /
2328
`extended_by:` link mechanic, planner only
2429
- `test_claude_reminders_supersedes_todo.py` — full e2e with
2530
supersedes mechanic + artifact verification
2631
- `test_claude_todo.py` — original single-plan baseline
32+
OpenCode ships the same four scenarios under `test_opencode_*.py`.
2733
- Two DeepEval `GEval` judges backed by DeepSeek-flash:
2834
`PlanJudge` (plan-file validity) and `ArtifactJudge` (produced
2935
artifact correctness).

‎docs/public/reference.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ Running `x-x` with no arguments prints the about banner and command list. Use on
2424

2525
Installs every bundled skill into the locations each agent looks for, then seeds the project's `.x-plans/` scaffold. Five questions run in order; when stdin is a terminal with arrow-key select / multiselect and Shift+Tab back-navigation, so you can revise an earlier answer before submitting the final group. When stdin is piped or redirected, the same questions fall back to line-by-line prompts (which the CI test harness exercises).
2626

27-
1. **Which agents?** Multi-select over every registered agent (Claude Code, Codex CLI today). Blank line / no toggle accepts the default (all agents).
27+
1. **Which agents?** Multi-select over every registered agent (Claude Code, Codex CLI, OpenCode today). Blank line / no toggle accepts the default (all agents).
2828
2. **Which scope?** Decides where the bundled SKILLS land. Either way, `.x-plans/` is seeded in the current working directory — that's how the project marker check (`./.x-plans/_config.lock`) recognizes the directory as an x-x project.
29-
- **This project only** — skills under the current working directory (`.claude/skills/`, `.agents/skills/`).
30-
- **All my projects (user scope)** — skills under `$HOME` (`~/.claude/skills/`, `~/.agents/skills/`).
29+
- **This project only** — skills under the current working directory (`.claude/skills/`, `.agents/skills/`, `.opencode/commands/`).
30+
- **All my projects (user scope)** — skills under `$HOME` (`~/.claude/skills/`, `~/.agents/skills/`, `~/.opencode/commands/`).
3131
3. **Prefix width for plan files** — zero-padded width for plan filenames (e.g. width `4` → `0001-foo.md`). Default: `4`.
3232
4. **Maximum lines per plan** — cap enforced by `x-x plans lint`. Keeps AI agents on a short leash: forces them to split sprawling work into smaller, reviewable plans. Default: `30`.
3333
5. **Pause for review after every…** — `task` reviews each EARS criterion as the planner finishes it (tight loop, more interruptions); `plan` reviews only at plan boundaries (looser loop, larger diffs). Default: `task`.
3434

3535
Every prompt has a non-interactive flag twin — pass any subset to skip the matching prompt, or pass all five to drive `init` end-to-end without reading stdin at all (CI / scripted installs):
3636

37-
- `--agents claude,codex` — comma-separated agent keys (repeatable). Skips the agent picker.
37+
- `--agents claude,codex,opencode` — comma-separated agent keys (repeatable). Skips the agent picker. Recognized keys: `claude` (Claude Code), `codex` (Codex CLI), `opencode` (OpenCode). OpenCode's TUI resolves slash commands from `.opencode/commands/` (project) or `~/.config/opencode/commands/` (user); `x-x init` writes the bundled SKILL.md tree to `.opencode/commands/` / `~/.opencode/commands/` matching the path layout used for Claude/Codex. Headless invocation via `opencode run` does not currently resolve `/x-plan`-style slash commands (anomalyco/opencode#7345); automated callers must inline the SKILL.md content into their prompts.
3838
- `--scope project|user` — skips the scope prompt.
3939
- `--prefix-width N` — positive integer; seeds `prefix_width` in `_config.lock`.
4040
- `--max-plan-lines N` — positive integer; seeds `max_plan_lines` in `_config.lock`.

‎scripts/e2e_test.ps1‎

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ Set-Variable -Option Constant -Name SHARED_DOC_EARS -Value '_ears.md'
6969

7070
Set-Variable -Option Constant -Name OWNED_SKILLS -Value @($SKILL_SHARED_DIR, $SKILL_X_PLAN_DIR, $SKILL_X_X_DIR)
7171

72-
# agentTargets in constants.go — index 0 = Claude Code, 1 = Codex CLI.
73-
Set-Variable -Option Constant -Name CLAUDE_SKILLS_REL -Value '.claude\skills'
74-
Set-Variable -Option Constant -Name CLAUDE_CONFIG_REL -Value '.claude'
75-
Set-Variable -Option Constant -Name CODEX_SKILLS_REL -Value '.agents\skills'
76-
Set-Variable -Option Constant -Name CODEX_CONFIG_REL -Value '.codex'
72+
# agentTargets in constants.go — index 0 = Claude Code, 1 = Codex CLI,
73+
# 2 = OpenCode. OpenCode ships no per-agent config today (configRel is "")
74+
# so there is no OPENCODE_CONFIG_REL mirror.
75+
Set-Variable -Option Constant -Name CLAUDE_SKILLS_REL -Value '.claude\skills'
76+
Set-Variable -Option Constant -Name CLAUDE_CONFIG_REL -Value '.claude'
77+
Set-Variable -Option Constant -Name CODEX_SKILLS_REL -Value '.agents\skills'
78+
Set-Variable -Option Constant -Name CODEX_CONFIG_REL -Value '.codex'
79+
Set-Variable -Option Constant -Name OPENCODE_SKILLS_REL -Value '.opencode\commands'
7780

7881
# Bundled config filenames (not constants in Go; pinned here for assertions).
7982
Set-Variable -Option Constant -Name CLAUDE_SETTINGS_FILE -Value 'settings.json'
@@ -999,6 +1002,19 @@ try {
9991002
Assert-IsDir 'codex skills tree' (Join-Path $projInitBoth (Join-Path $CODEX_SKILLS_REL $SKILL_X_X_DIR))
10001003
} finally { Pop-Location }
10011004

1005+
Start-Case 'init --agents claude,codex,opencode installs all three skill trees'
1006+
Reset-UserHome
1007+
$projInitAll = New-FreshProject
1008+
Push-Location $projInitAll
1009+
try {
1010+
Invoke-XX init --scope project --agents 'claude,codex,opencode' `
1011+
--prefix-width 4 --max-plan-lines 30 --review-per task
1012+
Assert-Eq 'exit 0' $RunRC 0
1013+
Assert-IsDir 'claude skills tree' (Join-Path $projInitAll (Join-Path $CLAUDE_SKILLS_REL $SKILL_X_X_DIR))
1014+
Assert-IsDir 'codex skills tree' (Join-Path $projInitAll (Join-Path $CODEX_SKILLS_REL $SKILL_X_X_DIR))
1015+
Assert-IsDir 'opencode skills tree' (Join-Path $projInitAll (Join-Path $OPENCODE_SKILLS_REL $SKILL_X_X_DIR))
1016+
} finally { Pop-Location }
1017+
10021018
Start-Case 'init refuses re-run on an already-initialized project'
10031019
Reset-UserHome
10041020
$projInitRe = New-FreshProject
@@ -2353,6 +2369,19 @@ try {
23532369
Assert-NotExists 'claude skills NOT present' (Join-Path $projF2 (Join-Path $CLAUDE_SKILLS_REL $SKILL_X_X_DIR))
23542370
} finally { Pop-Location }
23552371

2372+
Start-Case 'init --agents=opencode single-agent install'
2373+
Reset-UserHome
2374+
$projF2o = New-FreshProject
2375+
Push-Location $projF2o
2376+
try {
2377+
Invoke-XX init --scope project --agents=opencode `
2378+
--prefix-width 4 --max-plan-lines 30 --review-per task
2379+
Assert-Eq 'exit 0' $RunRC 0
2380+
Assert-IsDir 'opencode skills present' (Join-Path $projF2o (Join-Path $OPENCODE_SKILLS_REL $SKILL_X_X_DIR))
2381+
Assert-NotExists 'claude skills NOT present' (Join-Path $projF2o (Join-Path $CLAUDE_SKILLS_REL $SKILL_X_X_DIR))
2382+
Assert-NotExists 'codex skills NOT present' (Join-Path $projF2o (Join-Path $CODEX_SKILLS_REL $SKILL_X_X_DIR))
2383+
} finally { Pop-Location }
2384+
23562385
Start-Case 'init --prefix-width=6 seeds the lock with 6'
23572386
Reset-UserHome
23582387
$projF3 = New-FreshProject

‎scripts/e2e_test.sh‎

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,16 @@ readonly CLAUDE_SKILLS_REL=".claude/skills" # agentTargets[0].skillsRel
5353
readonly CLAUDE_CONFIG_REL=".claude" # agentTargets[0].configRel
5454
readonly CODEX_SKILLS_REL=".agents/skills" # agentTargets[1].skillsRel
5555
readonly CODEX_CONFIG_REL=".codex" # agentTargets[1].configRel
56+
readonly OPENCODE_SKILLS_REL=".opencode/commands" # agentTargets[2].skillsRel
57+
# OpenCode currently ships no per-agent config (configSrc / configRel are
58+
# empty), so no OPENCODE_CONFIG_REL mirror is needed.
5659
# Parent of CODEX_SKILLS_REL — used by isolation cases that seed sibling
5760
# files alongside the Codex skills dir. Derived (not a Go constant) to
5861
# avoid drift if agentTargets[1].skillsRel ever moves.
5962
readonly CODEX_SKILLS_PARENT="${CODEX_SKILLS_REL%/*}"
63+
# Parent of OPENCODE_SKILLS_REL — used by reset_user_home to wipe the
64+
# whole .opencode/ tree between cases. Derived for the same drift reason.
65+
readonly OPENCODE_SKILLS_PARENT="${OPENCODE_SKILLS_REL%/*}"
6066

6167
# Bundle-provided config filenames (agents/<configSrc>/* in the embed). Not
6268
# named in constants.go (the embed tree is the source) but pinned here
@@ -170,6 +176,7 @@ reset_user_home() {
170176
rm -rf "$HOME/${CLAUDE_CONFIG_REL}" \
171177
"$HOME/${CODEX_CONFIG_REL}" \
172178
"$HOME/${CODEX_SKILLS_PARENT}" \
179+
"$HOME/${OPENCODE_SKILLS_PARENT}" \
173180
"$HOME/${XX_HOME_DIR}"
174181
}
175182

@@ -585,6 +592,26 @@ assert_eq "exit 0" "$RUN_RC" "0"
585592
assert_is_dir "claude installed" "$PROJ_AB/${CLAUDE_SKILLS_REL}/${SKILL_X_X_DIR}"
586593
assert_is_dir "codex installed" "$PROJ_AB/${CODEX_SKILLS_REL}/${SKILL_X_X_DIR}"
587594

595+
case_start "x-x init --agents=opencode installs only OpenCode"
596+
reset_user_home
597+
PROJ_AO="$(fresh_project)"
598+
cd "$PROJ_AO"
599+
run_capture "" init --agents=opencode --scope=project
600+
assert_eq "exit 0" "$RUN_RC" "0"
601+
assert_is_dir "opencode installed" "$PROJ_AO/${OPENCODE_SKILLS_REL}/${SKILL_X_X_DIR}"
602+
assert_absent "claude NOT installed" "$PROJ_AO/${CLAUDE_SKILLS_REL}"
603+
assert_absent "codex NOT installed" "$PROJ_AO/${CODEX_SKILLS_REL}"
604+
605+
case_start "x-x init --agents=claude,codex,opencode (all three)"
606+
reset_user_home
607+
PROJ_AT="$(fresh_project)"
608+
cd "$PROJ_AT"
609+
run_capture "" init --agents=claude,codex,opencode --scope=project
610+
assert_eq "exit 0" "$RUN_RC" "0"
611+
assert_is_dir "claude installed" "$PROJ_AT/${CLAUDE_SKILLS_REL}/${SKILL_X_X_DIR}"
612+
assert_is_dir "codex installed" "$PROJ_AT/${CODEX_SKILLS_REL}/${SKILL_X_X_DIR}"
613+
assert_is_dir "opencode installed" "$PROJ_AT/${OPENCODE_SKILLS_REL}/${SKILL_X_X_DIR}"
614+
588615
case_start "x-x init --agents=invalid rejects unknown agent"
589616
reset_user_home
590617
cd "$(fresh_project)"
@@ -1208,7 +1235,7 @@ reset_user_home
12081235
# Trigger the lazy first-run write of ~/${XX_HOME_DIR}/agents/ via bare
12091236
# x-x, then wipe the install dirs so skill remove has nothing to do.
12101237
run_capture "" >/dev/null
1211-
rm -rf "$HOME/${CLAUDE_CONFIG_REL}" "$HOME/${CODEX_SKILLS_PARENT}" "$HOME/${CODEX_CONFIG_REL}"
1238+
rm -rf "$HOME/${CLAUDE_CONFIG_REL}" "$HOME/${CODEX_SKILLS_PARENT}" "$HOME/${CODEX_CONFIG_REL}" "$HOME/${OPENCODE_SKILLS_PARENT}"
12121239
run_capture "" skills remove --user
12131240
assert_eq "exit 0 on empty state" "$RUN_RC" "0"
12141241
assert_contains "summary line" "$RUN_OUT" "Removed 0"
@@ -1338,23 +1365,25 @@ readonly SHARED_DOC_FILES="${SHARED_DOC_PLAN_FIRST} ${SHARED_DOC_SYSTEMS} ${SHAR
13381365
# The bundled-source path under the repo, joined here so call sites stay flat.
13391366
readonly SHARED_BUNDLE_DIR="${REPO_ROOT}/${AGENTS_EMBED_ROOT}/${SKILLS_SUBDIR}/${SKILL_SHARED_DIR}"
13401367

1341-
case_start "shared docs land at both agent roots under project scope"
1368+
case_start "shared docs land at every agent root under project scope"
13421369
reset_user_home
13431370
PROJ_SD1="$(fresh_project)"
13441371
cd "$PROJ_SD1"
1345-
run_capture "" init --scope=project --agents=claude,codex
1372+
run_capture "" init --scope=project --agents=claude,codex,opencode
13461373
assert_eq "init exit 0" "$RUN_RC" "0"
13471374
for fname in $SHARED_DOC_FILES; do
13481375
assert_is_file "project Claude has $fname" \
13491376
"$PROJ_SD1/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
13501377
assert_is_file "project Codex has $fname" \
13511378
"$PROJ_SD1/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
1379+
assert_is_file "project OpenCode has $fname" \
1380+
"$PROJ_SD1/${OPENCODE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
13521381
done
13531382

1354-
case_start "shared docs land at both agent roots under user scope"
1383+
case_start "shared docs land at every agent root under user scope"
13551384
reset_user_home
13561385
cd "$(fresh_project)"
1357-
run_capture "" init --scope=user --agents=claude,codex
1386+
run_capture "" init --scope=user --agents=claude,codex,opencode
13581387
assert_eq "init exit 0" "$RUN_RC" "0"
13591388
for fname in $SHARED_DOC_FILES; do
13601389
# User-scope installs are symlinks on macOS/Linux; assert through the
@@ -1363,25 +1392,31 @@ for fname in $SHARED_DOC_FILES; do
13631392
"$HOME/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
13641393
assert_exists "user Codex has $fname (via symlink)" \
13651394
"$HOME/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
1395+
assert_exists "user OpenCode has $fname (via symlink)" \
1396+
"$HOME/${OPENCODE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}"
13661397
done
13671398

1368-
case_start "shared docs are byte-identical across Claude and Codex roots"
1399+
case_start "shared docs are byte-identical across all agent roots"
13691400
# Reuses PROJ_SD1 from the project-scope case above. At project scope the
1370-
# two copies are independent file writes; equal bytes proves the embed
1371-
# walk wrote the same content to both destinations.
1401+
# three copies are independent file writes; equal bytes proves the embed
1402+
# walk wrote the same content to every destination.
13721403
for fname in $SHARED_DOC_FILES; do
1373-
claude_sha="$(sha256_of "$PROJ_SD1/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1374-
codex_sha="$(sha256_of "$PROJ_SD1/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1375-
assert_eq "project $fname Claude≡Codex sha256" "$claude_sha" "$codex_sha"
1404+
claude_sha="$(sha256_of "$PROJ_SD1/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1405+
codex_sha="$(sha256_of "$PROJ_SD1/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1406+
opencode_sha="$(sha256_of "$PROJ_SD1/${OPENCODE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1407+
assert_eq "project $fname Claude≡Codex sha256" "$claude_sha" "$codex_sha"
1408+
assert_eq "project $fname Claude≡OpenCode sha256" "$claude_sha" "$opencode_sha"
13761409
done
1377-
# Same property at user scope. Both sides symlink into ~/.x-x/agents/,
1410+
# Same property at user scope. Every side symlinks into ~/.x-x/agents/,
13781411
# so the digests collapse onto the single bundled source — still a useful
13791412
# invariant: if init ever started copying instead of linking, byte drift
13801413
# would be the first thing we'd see.
13811414
for fname in $SHARED_DOC_FILES; do
1382-
claude_sha="$(sha256_of "$HOME/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1383-
codex_sha="$(sha256_of "$HOME/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1384-
assert_eq "user $fname Claude≡Codex sha256" "$claude_sha" "$codex_sha"
1415+
claude_sha="$(sha256_of "$HOME/${CLAUDE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1416+
codex_sha="$(sha256_of "$HOME/${CODEX_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1417+
opencode_sha="$(sha256_of "$HOME/${OPENCODE_SKILLS_REL}/${SKILL_SHARED_DIR}/${fname}")"
1418+
assert_eq "user $fname Claude≡Codex sha256" "$claude_sha" "$codex_sha"
1419+
assert_eq "user $fname Claude≡OpenCode sha256" "$claude_sha" "$opencode_sha"
13851420
done
13861421

13871422
case_start "installed shared docs match the embed source byte-for-byte"
@@ -1404,8 +1439,10 @@ readonly RESOLUTION_ANCHOR="Check project scope first, then user scope"
14041439
for root in \
14051440
"$PROJ_SD1/${CLAUDE_SKILLS_REL}" \
14061441
"$PROJ_SD1/${CODEX_SKILLS_REL}" \
1442+
"$PROJ_SD1/${OPENCODE_SKILLS_REL}" \
14071443
"$HOME/${CLAUDE_SKILLS_REL}" \
1408-
"$HOME/${CODEX_SKILLS_REL}"; do
1444+
"$HOME/${CODEX_SKILLS_REL}" \
1445+
"$HOME/${OPENCODE_SKILLS_REL}"; do
14091446
for skill in "${SKILL_X_X_DIR}" "${SKILL_X_PLAN_DIR}"; do
14101447
body="$(cat "${root}/${skill}/${SKILL_MANIFEST_FILE}")"
14111448
assert_contains "resolution anchor in ${root}/${skill}" "$body" "$RESOLUTION_ANCHOR"
@@ -1427,8 +1464,10 @@ docs_to_scan=(
14271464
for root in \
14281465
"$PROJ_SD1/${CLAUDE_SKILLS_REL}" \
14291466
"$PROJ_SD1/${CODEX_SKILLS_REL}" \
1467+
"$PROJ_SD1/${OPENCODE_SKILLS_REL}" \
14301468
"$HOME/${CLAUDE_SKILLS_REL}" \
1431-
"$HOME/${CODEX_SKILLS_REL}"; do
1469+
"$HOME/${CODEX_SKILLS_REL}" \
1470+
"$HOME/${OPENCODE_SKILLS_REL}"; do
14321471
for rel in "${docs_to_scan[@]}"; do
14331472
body="$(cat "${root}/${rel}")"
14341473
assert_not_contains "no hardcoded Claude path in ${root}/${rel}" "$body" "$FORBIDDEN_PATH"

0 commit comments

Comments
 (0)