Goal
baton today ships slash commands for Claude Code only. Extend support to three additional CLI tools so a single ./install.sh provisions the harness into whichever directives ecosystem the adopter uses.
Target tools (in priority order):
| Tool |
Rules file |
User-level commands dir |
Format |
| Claude Code |
~/.claude/CLAUDE.md |
~/.claude/commands/*.md |
markdown + frontmatter |
| OpenAI Codex CLI |
AGENTS.md (canonical) |
~/.codex/prompts/*.md |
markdown |
| Gemini CLI |
GEMINI.md or AGENTS.md |
~/.gemini/commands/*.toml |
TOML |
| OpenCode (SST) |
AGENTS.md |
~/.config/opencode/command/ |
markdown |
Cursor (no user-level commands) and Aider (no slash-command surface) are explicitly out of scope.
Why
The seven rules and three role contracts are tool-agnostic prose — they describe a protocol, not a tool. Restricting the install path to Claude Code is a packaging artefact, not a design constraint. Cross-tool support multiplies the adoption surface for zero rule-content rework.
Proposed architecture — two layers
Layer 1 — universal core (tool-agnostic, single source of truth):
~/.baton/
├── role-prompts/{planner,implementer,verifier}.md
├── release-mode-template/*
├── bin/release-verify.sh
└── AGENTS-fragment.md
Role-prompt content lives here once. Every tool's slash command reads the same file.
Layer 2 — per-tool adapter shims:
adapters/
├── claude-code/ # *.md slash commands → ~/.claude/commands/
├── codex/ # *.md prompts → ~/.codex/prompts/
├── gemini/ # *.toml commands → ~/.gemini/commands/
└── opencode/ # *.md commands → ~/.config/opencode/command/
Each adapter command is a thin wrapper whose only behaviour is "read ~/.baton/role-prompts/<role>.md and follow it as your governing instructions." No role-content duplication.
install.sh evolution
Multi-tool installer:
./install.sh # auto-detect tools, install all matching adapters
./install.sh --tools=claude-code,codex # explicit subset
./install.sh --core-only # Layer 1 only, skip all adapters
./install.sh --list-detected-tools # probe + report, no install
Detection probes:
- Claude Code:
[[ -d ~/.claude ]]
- Codex:
command -v codex OR [[ -d ~/.codex ]]
- Gemini:
command -v gemini OR [[ -d ~/.gemini ]]
- OpenCode:
command -v opencode OR [[ -d ~/.config/opencode ]]
Migration path from v0.1.x users
Anyone who installed v0.1.x onto a machine should be able to either:
- (a) Clean and re-install:
rm -rf ~/.claude/baton ~/.claude/bin ~/.claude/commands/{plan,implement,verify,merge}-* then re-run the new install.sh.
- (b) Re-run
install.sh directly — it should be idempotent enough to overwrite the v0.1.x Claude-Code shims in place and additionally drop Layer 1 at its new ~/.baton/ home. Adapters point at $HOME/.baton/... instead of $HOME/.claude/baton/....
Rule content does not change across this transition.
Acceptance criteria
Out of scope for this issue
- Claude Code plugin packaging (
.claude-plugin/plugin.json + marketplace install). Separate issue when this lands.
- IDE-only integrations (VS Code Copilot, JetBrains AI Assistant).
- Cursor adapter (no user-level command surface; project-level only — covered if/when someone needs it).
- Aider adapter (no slash-command surface at all; documented manual paste-role-prompts workflow only).
Reference
Full design is in ROADMAP.md. This issue tracks execution.
Goal
baton today ships slash commands for Claude Code only. Extend support to three additional CLI tools so a single
./install.shprovisions the harness into whichever directives ecosystem the adopter uses.Target tools (in priority order):
~/.claude/CLAUDE.md~/.claude/commands/*.mdAGENTS.md(canonical)~/.codex/prompts/*.mdGEMINI.mdor AGENTS.md~/.gemini/commands/*.tomlAGENTS.md~/.config/opencode/command/Cursor (no user-level commands) and Aider (no slash-command surface) are explicitly out of scope.
Why
The seven rules and three role contracts are tool-agnostic prose — they describe a protocol, not a tool. Restricting the install path to Claude Code is a packaging artefact, not a design constraint. Cross-tool support multiplies the adoption surface for zero rule-content rework.
Proposed architecture — two layers
Layer 1 — universal core (tool-agnostic, single source of truth):
Role-prompt content lives here once. Every tool's slash command reads the same file.
Layer 2 — per-tool adapter shims:
Each adapter command is a thin wrapper whose only behaviour is "read
~/.baton/role-prompts/<role>.mdand follow it as your governing instructions." No role-content duplication.install.shevolutionMulti-tool installer:
Detection probes:
[[ -d ~/.claude ]]command -v codexOR[[ -d ~/.codex ]]command -v geminiOR[[ -d ~/.gemini ]]command -v opencodeOR[[ -d ~/.config/opencode ]]Migration path from v0.1.x users
Anyone who installed v0.1.x onto a machine should be able to either:
rm -rf ~/.claude/baton ~/.claude/bin ~/.claude/commands/{plan,implement,verify,merge}-*then re-run the newinstall.sh.install.shdirectly — it should be idempotent enough to overwrite the v0.1.x Claude-Code shims in place and additionally drop Layer 1 at its new~/.baton/home. Adapters point at$HOME/.baton/...instead of$HOME/.claude/baton/....Rule content does not change across this transition.
Acceptance criteria
core/(or equivalent)adapters/claude-code/reproduces existing v0.1.x behaviour (regression-pinned)adapters/codex/lands four prompts at~/.codex/prompts/that successfully load~/.baton/role-prompts/<role>.mdadapters/gemini/lands four.tomlcommands at~/.gemini/commands/that load the same role promptsadapters/opencode/lands four.mdcommands at~/.config/opencode/command/that load the same role promptsinstall.shauto-detects each tool and installs its adapter when present; explicit--tools=override worksinstall.sh --dry-runprints all four adapters' would-be paths without copying/plan-release→/implement-slice→/verify-sliceend-to-end on a non-Claude-Code tool to validate the adapter path (smoke test, not exhaustive)Out of scope for this issue
.claude-plugin/plugin.json+ marketplace install). Separate issue when this lands.Reference
Full design is in ROADMAP.md. This issue tracks execution.