trw_instructions_sync
Synchronizes TRW behavioral protocol and ceremony guidance into the client instruction file. Use when onboarding a project, updating protocols, or switching IDE clients.
Instructions
Sync TRW protocol and ceremony guidance into the client's instruction file.
Use when:
Onboarding a new project and the instruction file (CLAUDE.md / AGENTS.md) does not yet contain the TRW auto-generated section.
You've changed the behavioral protocol template and need it re-rendered.
You switch IDE clients and need the correct surface written.
Renders behavioral protocol and ceremony guidance into the auto-generated
block of whichever client surface is present (CLAUDE.md, AGENTS.md,
.codex/INSTRUCTIONS.md). Learnings are not promoted into the instruction file —
trw_session_start() recall handles that (PRD-CORE-093).
Output: ClaudeMdSyncResultDict with fields {status: "success"|"error", files_written: list[str], sections_synced: int}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Sync scope — "root" for project instruction file, "sub" for module-level. | root |
| client | No | Target client(s) to write instructions for. "auto" (default) — detect via IDE config dirs; "claude-code" — write CLAUDE.md only; "opencode" — write AGENTS.md only; "codex" — write .codex/INSTRUCTIONS.md only; "all" — write every detected/known client surface. | auto |
| target_dir | No | Target directory for sub-instruction file generation. |