Skip to main content
TRW
Skip to content
TRWConfig Schema Reference

Config schema reference

Every field in .trw/config.yaml, its default, and the env var that overrides it. The live source is the Pydantic TRWConfig model — treat this page as a flat view of that model.

File location

The config file lives at .trw/config.yaml at the repo root. It is created by trw-mcp init-project and contains only the overrides you choose — every unspecified field inherits its default.

Precedence (highest wins):

  1. Environment variables prefixed TRW_.
  2. .trw/config.yaml overrides.
  3. Field defaults declared in models/config/_fields_*.py.

Unknown keys (in both env and config.yaml) are silently ignored — model_config.extra = "ignore" on the BaseSettings class.

Top-level keys

The flat keys you see in config.yaml are the same as the field names on TRWConfig. A curated list of the keys users touch most often:

KeyTypeDefaultDescription
framework_versionstr"v24.6_TRW"Pinned framework version for this repo.
target_platformslist[str]["claude-code"]Client profiles the installer keeps in sync. First entry resolves the primary client profile.
ceremony_mode"full" | "light""full"Profile-derived when unchanged. light suppresses chatty nudges.
response_format"yaml" | "json""yaml"MCP tool response format.
mcp_transportstr"stdio"Transport when starting the server. streamable-http for shared-server mode.
mcp_hoststr"127.0.0.1"Bind address when transport is HTTP/SSE.
mcp_portint8100Bind port when transport is HTTP/SSE.
installation_idstr""Installation ID used for telemetry correlation.
parallelism_maxint10Maximum concurrent shards/waves during orchestration.
timebox_hoursint8Total session timebox in hours.
task_rootstr"docs"Root directory for PRDs and task artifacts.
runs_rootstr".trw/runs"Directory for run artifacts.
build_check_enabledbooltrueWhether trw_build_check gates delivery.
embeddings_enabledboolfalseEnable dense vector embeddings (requires the [vectors] extra).
platform_urlstr""Primary platform URL for sync and telemetry.
platform_api_keySecretStr""Platform API key. Prefer TRW_PLATFORM_API_KEY in CI.

Check source for the full list of ~200 fields: trw-mcp/src/trw_mcp/models/config/. Run trw-mcp config-reference for a generated list keyed by env var name.

Sub-configs

Fields on TRWConfig are grouped into domain sub-configs for type-narrowed access (config.build, config.memory, etc.). The sub-config models are defined in _sub_models.py. At the YAML layer they remain flat keys.

build

KeyDefaultDescription
build_check_enabledtrueRun build-check as a delivery gate.
build_check_coverage_min85.0Minimum coverage percentage to pass the gate.
build_check_pytest_cmdnullOverride the pytest invocation; null uses the default.
build_gate_enforcement"lenient"One of strict, lenient, off.
mutation_enabledfalseOpt-in mutation testing.
auto_checkpoint_tool_interval25Tool calls between auto trw_checkpoint suggestions.

memory

KeyDefaultDescription
learning_max_entries500Cap on total learnings before pruning runs.
recall_max_results25Default result cap for trw_recall.
memory_store_path".trw/memory/vectors.db"SQLite database path for the memory store.
dedup_skip_threshold0.95Cosine threshold above which dedupe treats entries as duplicates.
dedup_merge_threshold0.85Cosine threshold above which near-duplicates merge.
memory_consolidation_enabledtruePeriodic cluster consolidation of related entries.

orchestration

KeyDefaultDescription
parallelism_max10Maximum parallel shards.
timebox_hours8Session timebox.
max_research_waves3Cap on research iteration waves.
auto_recall_enabledtrueAuto-inject relevant learnings before tool calls.
agent_teams_enabledtrueGate for Agent Teams. Requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in the client env.

ceremony

KeyDefaultDescription
nudge_enablednullNull defers to profile. Set explicit true/false to force.
nudge_urgency_mode"adaptive"One of adaptive, always_low, always_high, off.
nudge_budget_chars600Character budget per nudge (clamped 100-2000).
phase_gate_enforcement"lenient"strict, lenient, or off.
cleanup_on_boottrueRun the stale-pin + stale-run sweep on server startup.
run_staleness_hours48Hours with no activity before a run is sweep-eligible.

tools

KeyDefaultDescription
tool_exposure_mode"all"One of all, core, minimal, standard, custom.
tool_exposure_list[]Explicit tool names when mode is custom.
tool_descriptions_variant"default"One of default, minimal, verbose.
mcp_server_instructions_enablednullSend MCP instructions string; null defers to profile.

Example config

Trimmed and commented version of the .trw/config.yaml this repo uses today. Every field not listed falls back to its default.

# .trw/config.yaml
framework_version: v24.6_TRW

# Orchestration
parallelism_max: 10
timebox_hours: 8

# Platform sync (optional — local runs work without these)
platform_urls:
  - https://api.trwframework.com
  - http://localhost:8000
platform_telemetry_enabled: true
installation_id: trw-framework-dev

# MCP transport — this dev repo runs a shared streamable-http server.
# User projects should leave these at defaults (stdio).
mcp_transport: streamable-http
mcp_host: 127.0.0.1
mcp_port: 8100

# Client profiles to keep in sync.
target_platforms:
  - claude-code
  - cursor-ide
  - cursor-cli
  - opencode
  - codex
  - copilot
  - gemini

# Memory
embeddings_enabled: true
retrieval_embedding_model: all-MiniLM-L6-v2

# Secrets belong in env vars, not config.yaml. Shown here for completeness.
# platform_api_key: "${TRW_PLATFORM_API_KEY}"

Live copy: .trw/config.yaml.

Env var overrides

Every field on TRWConfig accepts an environment-variable override with the TRW_ prefix. The lookup is case-insensitive; unknown vars are ignored (same policy as unknown YAML keys).

PatternExample variableMaps to config key
ScalarTRW_TASK_ROOT=docstask_root
NumberTRW_BUILD_CHECK_COVERAGE_MIN=90build_check_coverage_min
BoolTRW_EMBEDDINGS_ENABLED=trueembeddings_enabled
List (JSON)TRW_TARGET_PLATFORMS=["cursor-ide","codex"]target_platforms
SecretTRW_PLATFORM_API_KEY=trw_dk_…platform_api_key
TransportTRW_MCP_TRANSPORT=streamable-httpmcp_transport
PortTRW_MCP_PORT=8181mcp_port

Generator for the full list: trw-mcp config-reference. Prefix configured in _main_fields.py via SettingsConfigDict(env_prefix="TRW_").

Related pages

Next

The config guide walks the most-changed fields with context. CLI flags show which of those fields you can override per-run.