trw-mcp — Prompts
Excerpt 1: FRAMEWORK.md — Phase Model (from src/trw_mcp/data/framework.md)
Technique: Structured constraint + rationalization watchlist (same pattern as superpowers' Iron Law, but with explicit anti-skip safeguards labeled as such).
## PHASES
RESEARCH -> PLAN -> IMPLEMENT -> VALIDATE -> REVIEW -> DELIVER
| Phase | Exit Criteria | Skills | Cap |
|-------|---------------|--------|-----|
| RESEARCH | plan.md draft, >=3 evidence paths, formation selected. | `/trw-framework-check` | 25% |
| PLAN | Acceptance criteria, shards planned, wave_manifest.yaml created. | `/trw-sprint-init`, `/trw-prd-new`, `/trw-prd-ready` | 15% |
| IMPLEMENT | Shards/waves complete OR checkpointed, tests written. | `/trw-test-strategy` | 35% |
| VALIDATE | Coverage >= target, gates pass, no P0. Run `trw_build_check(scope="full")`. | `/trw-test-strategy` | 10% |
| REVIEW | Critic reviewed, simplifications applied, reflection completed. | `/trw-memory-audit` | 10% |
| DELIVER | PR created OR archived, final.md, CLAUDE.md synced. | `/trw-deliver`, `/trw-sprint-finish` | 5% |
ORC tracks elapsed wall-clock against TIMEBOX_HOURS. ORC MUST NOT advance until exit criteria met OR cap exceeded with rationale. Refine plan until stable — fixing a plan is cheaper than rewriting code.
## RATIONALIZATION WATCHLIST
If you catch yourself thinking any of these, stop and follow the process — these are the exact thoughts that precede ceremony skips:
Excerpt 2: trw-lead agent definition (from src/trw_mcp/data/agents/trw-lead.md)
Technique: Persona-md with tool whitelist and behavioral framing. Explicit disallowedTools array is unusual — most persona-md frameworks only whitelist.
---
name: trw-lead
description: >
Team orchestration lead. Use when coordinating multi-agent sprint execution —
spawning teammates, routing file-ownership messages, managing worktrees,
gating phase transitions across the 6-phase RESEARCH through DELIVER
lifecycle. Not for single-file edits (use trw-implementer) or read-only
reviews (use trw-reviewer). Does not write production code; stays in
delegate mode during IMPLEMENT.
model: opus
effort: high
maxTurns: 200
memory: project
allowedTools:
- Read
- Edit
- Write
- Bash
- Skill
- TaskCreate
- TaskUpdate
- TaskList
- TeamCreate
- SendMessage
- EnterWorktree
- mcp__trw__trw_session_start
- mcp__trw__trw_build_check
- mcp__trw__trw_deliver
disallowedTools:
- NotebookEdit
---
Excerpt 3: trw-deliver skill (from src/trw_mcp/data/skills/trw-deliver/SKILL.md)
Technique: Multi-step workflow with explicit rationalization watchlist — makes agent self-monitor for ceremony bypass.
## Rationalization Watchlist
| Thought | Why it's wrong | Consequence |
|---------|---------------|-------------|
| "The build passed earlier, I can skip the pre-flight check" | Build state changes between VALIDATE and DELIVER — new code may have been added | Shipping with a stale build check is the #1 cause of broken deliveries |
| "Team learning synthesis is optional, I'll skip it" | Duplicate/conflicting learnings from teammates pollute future recall | Next session loads contradictory advice — agents get confused and make worse decisions |
| "I'll just call trw_deliver directly, the skill is overkill" | The skill adds build verification + team synthesis that raw trw_deliver skips | Manual delivery skips validation steps — 3x more defects in audits |
Excerpt 4: session-start.sh hook (value-oriented framing)
Technique: Behavioral framing via hooks — explains value rather than commanding. Anthropic guidance on emphatic language avoidance implemented as shell script.
# PRD-INFRA-002-FR01: Unified SessionStart hook
# Framing: value-oriented — explains what each tool gives the agent.
# Research: Anthropic context engineering, motivation framing, self-interest framing.
# Fail-open: any error silently exits 0.
#
# Performance: ~23ms avg latency (benchmarked 2026-03-29, 3 runs).
# Fires once per session event, not on every tool call.
And from data/messages/messages.yaml (via messaging.py):
# Value-oriented framing examples:
# Do: "Call X to load your prior learnings"
# Don't: "You MUST call X"
# Do: "Without it, you're working without context"
# Don't: "CRITICAL: Skipping means you WILL fail"