You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 24ac63d
Browse filesBrowse the repository at this point in the historyBrowse files
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]>
Copy file name to clipboardExpand all lines: docs/public/reference.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,17 +24,17 @@ Running `x-x` with no arguments prints the about banner and command list. Use on
24
24
25
25
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).
26
26
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).
28
28
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/`).
31
31
3.**Prefix width for plan files** — zero-padded width for plan filenames (e.g. width `4` → `0001-foo.md`). Default: `4`.
32
32
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`.
33
33
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`.
34
34
35
35
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):
-`--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.
38
38
-`--scope project|user` — skips the scope prompt.
39
39
-`--prefix-width N` — positive integer; seeds `prefix_width` in `_config.lock`.
40
40
-`--max-plan-lines N` — positive integer; seeds `max_plan_lines` in `_config.lock`.
0 commit comments