Skip to main content
TRW
Skip to content
TRWopencode — Client Guide

Set up TRW for opencode

Drop TRW into opencode’s command-first terminal workflow — your slash commands become TRW skills, your agents become TRW specialists, and your instructions persist across sessions.

Prerequisites

  • opencode installed and on your PATH.
  • Python 3.10+ (3.11+ recommended) and pip 22+.
  • A git repository you can write to.

Install

curl -fsSL https://trwframework.com/install.sh | bash

When the installer prompts for target clients, select OpenCode. The bootstrap installs trw-mcp and writes the opencode surface into the repo.

What the installer writes

  • opencode.json — opencode’s root config. Registers trw-mcp as an MCP server and wires the command and agent directories.
  • .opencode/INSTRUCTIONS.md — durable instructions opencode reads every session. Encodes the TRW tool lifecycle so it survives context compaction.
  • .opencode/commands/ — TRW’s slash-skill catalog translated into opencode commands (sprint init, PRD grooming, project health, etc.).
  • .opencode/agents/ — specialist agents from the TRW roster mapped onto opencode’s agent surface.
  • .trw/config.yaml — repo-local TRW config listing opencode in target_platforms.

Run your first session

From the project root, run opencode. On startup it loads opencode.json and .opencode/INSTRUCTIONS.md, which tell the model to begin with trw_session_start().

  1. trw_session_start() — loads prior learnings and any active run state.
  2. Use the TRW commands in .opencode/commands/ the same way you already use opencode commands. Slash-discoverable, same behavior as the Claude Code skills.
  3. Record discoveries with trw_learn(summary, detail).
  4. Finish with trw_build_check() then trw_deliver().

Differences from Claude Code

  • No hooks directory. opencode doesn’t host TRW’s hook automation. Session-start, pre-compact, and deliver ceremony are enforced through instructions and commands instead of event triggers.
  • Commands replace skills. The slash-skill catalog lives at .opencode/commands/. Names and behaviors mirror the Claude Code skills so muscle memory carries over.
  • Agent teams are command-driven. Agents live in .opencode/agents/, but orchestration is invoked through commands rather than a native team API.
  • One config file, not three. opencode.json carries MCP, command, and agent wiring — there is no separate .mcp.json.

Common problems

Next steps

Next

Skills shows the slash-commands opencode exposes after install. Concepts explains what the loop they invoke actually does.