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

Set up TRW for Cursor

Wire TRW into both Cursor IDE (interactive editor) and Cursor CLI (headless, CI, scripted runs) — one install, two surfaces, shared core loop.

Prerequisites

  • Cursor installed — the IDE for cursor-ide, and/or cursor-agent for cursor-cli.
  • 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 Cursor IDE, Cursor CLI, or both. TRW writes each surface independently; keeping them in sync is handled by re-running the installer.

What the installer writes

Cursor IDE

  • .cursor/rules/ — path-scoped IDE rules translated from TRW skills and conventions.
  • .cursor/mcp.json — registers trw-mcp for the IDE session.
  • .cursor/hooks/ — full hook set enforcing session-start, pre-compact, and deliver ceremony.
  • .cursor/skills/ — slash-skill workflows that mirror the TRW skill catalog.

Cursor CLI

  • AGENTS.md — durable instructions shared with other AGENTS.md-compatible clients.
  • .cursor/cli.json — headless-safe permission baseline.
  • .cursor/hooks.json — the subset of hooks that are safe to run without an interactive terminal.
  • .cursor/mcp.json — shared with the IDE profile when both are installed.

Run your first session

Cursor IDE

Open the repo in Cursor. The rules in .cursor/rules/ load automatically and tell the model to call trw_session_start() first. Session-start hooks run on workspace open, so the run state and prior learnings are surfaced before you type.

Cursor CLI

From the project root, run cursor-agent (or your build’s equivalent). The CLI reads AGENTS.md and .cursor/cli.json. Because there is no IDE event loop, TRW uses instructions plus the headless-safe hook subset to enforce ceremony. In CI you can set TRW_SESSION_ID to keep a stable session identity across reconnects.

Differences from Claude Code

  • IDE rules, not a single instruction file. Cursor IDE uses path-scoped .cursor/rules/ entries instead of one top-level CLAUDE.md. TRW splits guidance along the same path boundaries.
  • Cursor CLI is headless-safe. Interactive hooks (prompt confirmations, TUI pickers) are omitted from .cursor/hooks.json. Anything that would block on stdin is either skipped or downgraded to an instruction-level nudge.
  • Agent teams support is mode-dependent. The IDE can host the full team roster; CLI sessions are narrower and favor the core five-role set.
  • Permissions are explicit. Cursor CLI requires an allowlist in .cursor/cli.json — the installer writes a safe baseline; widen it for your workflow.

Common problems

Next steps

Next

Claude Code is the full-ceremony reference. Concepts explains the loop your Cursor setup runs, regardless of whether you use the IDE or the CLI.