Skip to main content
TRW
Skip to content
TRWGitHub Copilot — Client Guide

Client guide

Set up TRW for GitHub Copilot CLI

Use Copilot’s current project MCP format, keep guidance close to the files it governs, and inspect repository hooks before they execute.

project MCP2 path rules5 hooks4 agents13 skills

Support model

Several native surfaces, one explicit workflow

Copilot CLI supports project MCP configuration, repository and path-specific instructions, hooks, custom agents, and task-matched skills. TRW installs each surface, but guidance and automation do not prove that a test ran or a delivery gate passed.

Context

Layered instructions

Repo-wide rules combine with matching path instructions and applicable AGENTS.md files.

Tools

Project MCP

The shared root .mcp.json registers trw-mcp for the current CLI.

Automation

Hooks + adapter

Copilot JSON events are translated into the shared TRW hook scripts.

Installation

Initialize the Copilot target

trw-mcp init-project . --ide copilot

Before running

Review existing .mcp.json, .github/, and shared instruction files in the target repository.

The guided installer can select the same target. The bootstrap merges recognized MCP, instruction, and hook structures while writing managed agents and skills. Review the resulting diff—especially executable hook commands—before committing it.

Generated surface map

Inspect the surface that owns the behavior

.mcp.jsonInspect
TRW behavior
Shared project-level MCP registration for trw-mcp
Boundary
Current Copilot CLI docs prefer this over the legacy .vscode/mcp.json path
.github/copilot-instructions.mdInspect
TRW behavior
Repository-wide TRW guidance merged between managed markers
Boundary
Copilot CLI loads this alongside applicable AGENTS.md guidance
.github/instructions/*.instructions.mdInspect
TRW behavior
Two generated path rules for Python tests and TypeScript/React files
Boundary
Each rule applies only when its applyTo pattern matches
.github/hooks/hooks.jsonInspect
TRW behavior
Five lifecycle hook groups plus an executable JSON adapter script
Boundary
Hooks execute project commands; inspect them before using Copilot in the repository
.github/agents/*.agent.mdInspect
TRW behavior
Four custom agents: explorer, implementer, reviewer, and docs researcher
Boundary
Profiles make roles available; selection and delegation remain task-dependent
.github/skills/*/SKILL.mdInspect
TRW behavior
Thirteen current Copilot skill packages
Boundary
Skills load when relevant; installation does not execute them

Current counts are source-derived: two path templates, five hook events, four agent templates, and 13 Copilot skill directories. Recheck after upgrading TRW.

First verified run

Verify the server before the ceremony

1List serversRun copilot mcp list and confirm the project trw entry.
2Inspect toolsUse /mcp in Copilot CLI and inspect the active server.
3Start explicitlyCall trw_session_start before relying on recalled state.
4Validate in the shellRun the repository’s actual tests, lint, or build command.
5Record observed evidenceReport the result with trw_build_check, then deliver.

Executable hooks

Five events, one adapter boundary

TRW writes sessionStart, userPromptSubmitted, preToolUse, postToolUse, and sessionEnd groups. Each group calls trw-copilot-adapter.sh, which translates Copilot’s stdin JSON and invokes a shared TRW hook script.

01

sessionStart

02

userPromptSubmitted

03

preToolUse

04

postToolUse

05

sessionEnd

Troubleshooting

Diagnose the owning layer

trw is absent from /mcp

Run copilot mcp list, inspect the project .mcp.json, and confirm that the configured trw-mcp command resolves in Copilot’s environment.

An instruction is not applied

Confirm the repository root, then check the path rule’s applyTo pattern. Copilot combines matching sources; avoid contradictory guidance.

A hook does not fire

Inspect the hook file, executable adapter mode, and referenced shared script. Do not regenerate blindly over an unreadable user hook file.

A custom agent lacks TRW tools

Verify the shared trw server first. Agent profiles reference that server; they do not create a second registration or prove the server initialized.

Current instruction support varies by Copilot surface. The official support matrix documents what Copilot CLI, IDE chat, cloud agent, and code review consume.

Keep going

If you haven't installed yet, start with the quickstart. If you have, the lifecycle page explains what TRW actually does once it's running.