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