Skip to main content
Glama

trw-mcp

Persistent engineering memory for AI coding agents — an MCP server for cross-session recall, evidence-backed delivery, and spec-driven development. Part of TRW Framework.

Python 3.10+ License: BSL 1.1 MCP Docs

Release status: Alpha and source-available under BSL 1.1. The current package is suitable for evaluation and dogfooding, but it does not claim a production-stable API or support SLA.

Coding-agent sessions are usually stateless. TRW keeps project knowledge in .trw/ and recalls relevant learnings when the next session starts.

Quick start · Core tools · Configuration · Security and network behavior · Development

How it fits

trw-mcp is the MCP server component of TRW (The Real Work) — a methodology layer for AI-assisted development that turns each coding session's discoveries into permanent institutional knowledge. It works alongside trw-memory, the standalone memory engine.

  • trw-mcp (this repo): MCP server with 45 tools, 26 skills, 11 agents

  • trw-memory: Standalone memory engine with hybrid retrieval, scoring, and lifecycle

Related MCP server: myBrAIn

What it does

trw-mcp is a Model Context Protocol server that gives AI coding agents persistent engineering memory. It records what you learn during development sessions — patterns, gotchas, architecture decisions — and recalls relevant knowledge at the start of every new session. Over time, your AI coding assistant accumulates captured learnings in .trw/ and recalls them at session start. Whether this yields measurable task-completion lift is an open empirical question; early SWE-bench single-shot measurements (n=40/47) showed null. See the verification docs for the current methodology and evidence posture.

Beyond memory, the server provides:

  • Run lifecycle — phases, checkpoints, events, resumable state, and delivery records.

  • Verification gates — project-native build evidence and structured review/delivery checks.

  • Requirements workflowsAARE-F PRDs, validation, and requirement-to-code traceability.

  • Client integration — generated instruction files, hooks, skills, and capability-aware tool exposure for supported coding clients.

  • Code intelligence — lexical/symbol search, before-edit context, dependency relationships, and risk signals.

Dogfooding scale: thousands of tests across hundreds of PRDs, dogfooded across the TRW monorepo (coverage gate enforced at 80%, 90% target for new code). This codebase was built by AI agents using TRW. Scale proves the framework is usable at volume; whether it improves outcomes vs baseline is measured via the eval bench, not inferred from these counts.

Quick Start

Requires Python 3.10+ and a Git repository. The installer supports Claude Code, Codex, Cursor, OpenCode, Copilot, and Antigravity; use --ide all when a repository is shared across clients. See the full quickstart guide for client-specific setup.

# Recommended: install TRW
curl -fsSL https://trwframework.com/install.sh | bash

# Bootstrap the current repository (client is auto-detected)
cd /path/to/your/repo
trw-mcp init-project .

# Confirm the installation and resolved client surfaces
trw-mcp doctor .

Manual / advanced install

# Install from PyPI
pip install trw-mcp

# Or install from source
git clone https://github.com/wallter/trw-mcp.git
cd trw-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

Deploy to a Project

trw-mcp init-project bootstraps the full TRW framework in any git repository. Full configuration reference at trwframework.com/docs/config.

trw-mcp init-project .              # current directory
trw-mcp init-project /path/to/repo  # specific project
trw-mcp init-project . --ide codex  # force Codex bootstrap
trw-mcp init-project . --force      # overwrite existing files

Every installation creates .trw/ plus the Claude-compatible baseline used by the core bootstrap (.mcp.json, CLAUDE.md, and .claude/ hooks, skills, and agent definitions). The selected client integration then adds its own instruction, MCP, hook, skill, and agent surfaces where supported. Bundled skills and agent definitions are runtime inputs to init-project and update-project, not examples that can be discarded. Managed updates preserve user-authored content where the target format supports safe merging; review --force before using it in a customized repository.

Configuration

Settings via environment variables (prefix TRW_) or .trw/config.yaml. Full reference at trwframework.com/docs/config.

# .trw/config.yaml — top settings (all optional, shown with defaults)
embeddings_enabled: true           # Vector search on by default (install the [vectors] extra to use it)
learning_max_entries: 500          # Max learnings before auto-pruning
build_check_enabled: true          # Run pytest+mypy on trw_build_check
deliver_gate_mode: "block_coding"  # Block delivery for coding/rca/eval tasks without a passing build record;
                                   # set to "advisory" to restore warn-only posture (changed 2026-06-10)
observation_masking: true          # Reduce verbosity in long sessions
ceremony_mode: "full"              # "full" or "light"

Telemetry & network behavior

trw-mcp is local-first: with the default configuration it persists everything under your project's .trw/ directory and makes no outbound network calls except the optional embedding-model download described below. There is no built-in usage tracking, phone-home, or content upload unless you explicitly enable it.

What can touch the network, when, and how to turn it off

Surface

When

Default

Opt-out / control

Embedding model download

First vector operation downloads all-MiniLM-L6-v2 from huggingface.co (only when the [vectors]/[embeddings] extra is installed)

embeddings_enabled: true

TRW_OFFLINE=1 (or HF_HUB_OFFLINE=1) suppresses the download and degrades to keyword-only recall; a disclosure log line is emitted before any fetch

Usage telemetry

Only if explicitly enabled

off (gated by platform_telemetry_enabled, default false)

leave platform_telemetry_enabled=false; see PRD-SEC-004

Learning-content publishing

Only if explicitly enabled

off (gated by learning_sharing_enabled, default false)

leave learning_sharing_enabled=false; learning content is never published off-box by default

With TRW_OFFLINE=1 set, session_start makes zero huggingface.co calls — a testable invariant for air-gapped deployments.

Environment-variable inventory

Variable

Purpose

Default

TRW_OFFLINE

Master offline switch — blocks the huggingface.co embedding-model download

unset (online)

HF_HUB_OFFLINE

Upstream huggingface_hub offline switch — also honored by trw-mcp

unset

TRW_PROBE_ENABLED

Enables the optional sandboxed trw_probe experiment tool

unset (probe disabled)

ENABLE_TOOL_SEARCH

Force-enable/disable MCP tool-search auto-deferral (true/false)

auto-detected

TRW_LOG_LEVEL

Explicit log level (DEBUG/INFO/WARNING/ERROR/CRITICAL)

derived from --debug / defaults

TRW_PLATFORM_API_KEY

Platform credential (PRD-SEC-005) — read from the environment, kept out of git-tracked config

unset

TRW_CONFIG_STRICT

Fail closed on a malformed .trw/config.yaml instead of reverting to defaults

unset (fail-open, but loud)

MEMORY_*

trw-memory engine knobs (see the trw-memory README)

per-field

A malformed .trw/config.yaml always emits a WARNING (and a stderr notice) rather than being silently discarded; set TRW_CONFIG_STRICT=1 to make the load fail closed so security overrides are never dropped unnoticed.

Security defaults

Capability

Default

Notes

Field-level encryption

off

opt-in via trw-memory encryption_enabled

Secret redaction in logs

on

API keys, tokens, and secret-named fields are masked in log output by default

PII detection (memory content)

warn

PII (emails, API keys, etc.) is detected and logged but stored as-is by default (pii_action: warn); set pii_action: block to reject such writes, or redact to mask them

Recall output filtering

redact

SEC-001 recall filter masks flagged values returned by recall (recall_filter_mode: redact)

Memory poisoning detection

observe

detects and records statistical anomalies, does not quarantine, by default

Remote sync / publishing

off

learning_sharing_enabled=false, platform_telemetry_enabled=false

.trw/ directory permissions

0700

state/secret dirs are owner-only

memory.db / secret files

0600

owner read/write only (consistent with pins.json)

Enterprise hardening recipe

For an air-gapped or compliance-sensitive deployment:

export TRW_OFFLINE=1            # no huggingface.co egress; keyword-only recall
export TRW_CONFIG_STRICT=1      # malformed config fails closed, never silently reverts
# Leave telemetry + learning-sharing at their secure defaults:
#   platform_telemetry_enabled: false
#   learning_sharing_enabled:   false

Then verify: .trw/ dirs are 0700, memory.db is 0600, and no outbound connection is attempted at session_start.

MCP Tools (45)

The table below covers the most-used tools out of the full 45. For the complete, always-current list run trw-mcp config-reference or browse the tool reference docs.

Category

Tools

Purpose

Session

session_start, init, status, checkpoint, pre_compact_checkpoint, heartbeat, adopt_run

Run lifecycle, progress tracking, and pin/liveness management

Learning

learn, learn_update, recall, instructions_sync

Knowledge capture, retrieval, and instruction-file refresh

Quality

build_check, review, deliver

Verification and delivery

Requirements

prd_create, prd_validate, prd_diff

Spec-driven development with AARE-F PRDs

Code intelligence

code_search, code_symbol, code_index_update, before_edit_hint, before_edit_hint_batch, codebase_risk_report

Repo-aware search, symbol lookup, and risk signals

Observability

query_events, surface_diff, mcp_security_status

Event history, surface diffs, and security status

Skills (26)

Slash-command workflows — zero tokens until triggered. Full skill reference at trwframework.com/docs.

Sprint & Delivery: /trw-sprint-init · /trw-sprint-finish · /trw-sprint-team · /trw-deliver · /trw-commit · /trw-reflect

Requirements: /trw-prd-new · /trw-prd-ready · /trw-prd-groom · /trw-prd-review · /trw-exec-plan

Quality: /trw-audit · /trw-self-review · /trw-delegate · /trw-dry-check · /trw-security-check · /trw-test-strategy

Framework: /trw-framework-check · /trw-project-health · /trw-memory-audit · /trw-memory-optimize

Agents (11)

Optional specialized agent definitions for clients and harnesses that support delegation. TRW does not require multi-agent execution; the same lifecycle works sequentially.

Role

Agent

Purpose

Core Team

trw-lead, trw-implementer, trw-tester, trw-researcher, trw-reviewer, trw-auditor, trw-adversarial-auditor

Orchestration, TDD, testing, research, review, audit, spec-vs-code audit

Requirements

trw-prd-groomer, trw-requirement-writer, trw-requirement-reviewer

PRD lifecycle specialists

Quality

trw-traceability-checker

Requirement-to-code-and-test traceability verification

The 6-Phase Model

TRW implements a structured execution lifecycle: RESEARCH → PLAN → IMPLEMENT → VALIDATE → REVIEW → DELIVER with phase gates, build checks, adversarial audits, and delivery ceremony. See FRAMEWORK.md for the full specification, or read the lifecycle overview at trwframework.com/docs/lifecycle.

CLI Commands

trw-mcp init-project .                # Deploy TRW to a project
trw-mcp update-project .              # Update existing installation
trw-mcp doctor .                      # Diagnose environment and client setup
trw-mcp check-instructions .          # Validate instruction-tool parity (exit 1 on mismatch)
trw-mcp audit .                       # Audit TRW configuration
trw-mcp config-reference              # Print all TRW_ environment variables
trw-mcp version-status                # Compare package, framework, and live-server versions
trw-mcp export --format json          # Export learnings
trw-mcp uninstall .                   # Remove TRW from a project

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v --cov=trw_mcp --cov-report=term-missing

# Type checking (strict mode)
mypy --strict src/trw_mcp/

# Targeted testing during development
pytest tests/test_tools_learning.py -k "test_recall" -v

Architecture

src/trw_mcp/
  server/             # FastMCP entry point, middleware chain
  bootstrap/          # init-project: deploy TRW to target repos
  models/             # Pydantic v2 models (config, run, learning, etc.)
  tools/              # MCP tool implementations
  state/              # State management (persistence, validation, analytics)
  middleware/         # FastMCP middleware (ceremony, observation masking, response optimizer)
  telemetry/          # Telemetry pipeline (models, sender, anonymizer)
  data/               # Bundled hooks, skills, agents for init-project

Troubleshooting

MCP connection error: "[Errno 2] No such file or directory" The MCP server process crashed. In Claude Code, type /mcp to reconnect. For other clients, restart your CLI tool.

trw_session_start() returns "No learnings found" This is normal on first use — learnings accumulate as you work. Call trw_learn() to save discoveries, then trw_deliver() to persist them.

stale .trw/ state after upgrading Run trw-mcp update-project . to migrate your project state to the latest schema. If issues persist, backup and re-initialize with trw-mcp init-project . --force.

Embeddings not working despite embeddings_enabled=true Embeddings require the [vectors] extra: pip install 'trw-mcp[vectors]'. Without it, vector search silently degrades to keyword-only.

Debugging

Enable debug logging:

trw-mcp --debug serve              # Debug mode with file logging
TRW_LOG_LEVEL=DEBUG trw-mcp serve  # Via environment variable

Logs are written to .trw/logs/trw-mcp-YYYY-MM-DD.jsonl.

License

Business Source License 1.1 — source-available, free for non-competing use. Converts to Apache 2.0 on 2030-03-21. See the full license terms.


Built by Tyler Wall · TRW Framework · Documentation · License

Available Tools

41 tools
trw_adopt_runA

Transfer an existing run's pin to the caller's session.

Use when:

  • Resuming a run started by another session (fresh context, same task).

  • Reclaiming a run whose previous owner went away without delivering.

Guards:

  • Out-of-project run_path raises StateError (no force override).

  • Terminal status (delivered/complete/failed) requires force=True.

  • Live owner (heartbeat within pin_ttl_hours) requires force=True and emits run_adopted_potential_writer_conflict WARN when displaced.

Input:

  • run_path: absolute path to the run directory to adopt (required).

  • force: override terminal-status and live-owner guards.

Output: TrwAdoptRunResultDict with fields {adopted_run_id, previous_pin_key, from_pin_key, to_pin_key, adopted_ts, from_owner_was_live, force_used}.

Example: trw_adopt_run(run_path="/repo/.trw/runs//") → {"adopted_run_id": "", "from_pin_key": "sess-a", "to_pin_key": "sess-b", "force_used": false, ...}

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNo
run_pathNo

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavior: guards (StateError for out-of-project, terminal status requiring force, live owner conflict), force parameter effects, and warning emission. This is comprehensive for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Use when, Guards, Input, Output, Example). It is reasonably concise, though some redundancy exists (e.g., repeating force description in Guards and Input).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description correctly lists output fields and provides an example. Combined with the comprehensive behavioral details, it leaves no gaps for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description compensates by explaining run_path as an absolute path and force as an override for guards. It adds meaning beyond schema defaults (false/empty string) but could provide examples of valid run_path values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Transfer an existing run's pin to the caller's session,' which is a specific verb-resource combination. It clearly distinguishes this tool from siblings focused on other operations (e.g., trw_deliver, trw_init).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Use when' scenarios: resuming a run from another session or reclaiming an abandoned run. It also details guards and conditions, guiding the agent on when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_agent_work_evidenceA

Export canonical privacy-safe AgentWorkEvidence for a TRW run.

Use when a judge, eval harness, reviewer, or knowledge-graph importer needs one schema-valid work record instead of scraping run internals.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_pathNoOptional explicit run directory.
include_eventsNoInclude safe event references without payload bodies.
include_schemaNoInclude the JSON Schema for AgentWorkEvidence v1.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It mentions 'privacy-safe' and 'schema-valid', implying data sanitization and standardized output. However, it does not disclose permissions, side effects, or what happens if run_path is null. More details on behavioral traits would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, with the purpose front-loaded and usage guidelines in the second sentence. Every word adds value with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description could explain the return structure (e.g., 'returns a JSON object conforming to AgentWorkEvidence v1'). It also omits clarification on default behavior when run_path is not provided. For a tool with three optional parameters, these gaps reduce completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with descriptions for all three parameters. The description adds no extra semantic meaning beyond what the schema already offers, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Export' and the resource 'privacy-safe AgentWorkEvidence' for a TRW run. It distinguishes from siblings by noting it avoids scraping run internals, and among siblings like trw_validate_agent_work_evidence, the purpose is unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists who should use it (judge, eval harness, reviewer, knowledge-graph importer) and what alternative to avoid (scraping run internals). While it does not enumerate sibling tools as alternatives, the provided context is sufficient for most use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_before_edit_hintB

Return cold-start codebase intelligence for file_path.

Use when an agent is about to edit a file and needs sidecar-backed risk context plus relevant prior learnings before reading broadly.

Sources:

  • trw-distill sidecar (tier-gated; requires team/pro/enterprise)

  • existing learnings via trw_recall (always)

Returns BeforeEditHintResult.model_dump() enriched by client tier. NEVER raises — failure paths populate distill_status + distill_action so the operator gets an actionable next step.

ParametersJSON Schema
NameRequiredDescriptionDefault
cache_dirNo
file_pathYes
repo_rootNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses it never raises, details failure paths (distill_status/action), mentions sources (sidecar, recalls), and tier-gating. It does not explicitly state side effects but implies read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is concise (6 lines) with clear sections: purpose, usage, sources, error behavior. Front-loaded, no fluff, but could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, reducing need for return value detail. Description covers purpose, usage, error handling, and sources. Missing: optional parameter descriptions and operational details like rate limits or permissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage. Description explains the main parameter file_path but ignores cache_dir and repo_root, leaving those semantically unenriched.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool returns cold-start codebase intelligence for a file_path, with an explicit use case (before editing). However, it does not explicitly differentiate from its sibling trw_before_edit_hint_batch, though the name implies singular vs batch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description explains when to use (before editing a file needing risk context and prior learnings) but does not provide exclusions or compare with alternatives like trw_before_edit_hint_batch.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_before_edit_hint_batchA

Return c735+c743 BeforeYouEditBatch for the current SHA.

Use when an agent is planning a multi-file edit and needs batched before-edit hints from a persisted trw-distill sidecar.

Tier-gated (paid tiers only — see trw_before_edit_hint for the free-tier learnings counterpart). Returns BeforeEditHintBatchResult.model_dump(). NEVER raises.

ParametersJSON Schema
NameRequiredDescriptionDefault
cache_dirNo
repo_rootNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses return type (model_dump()), promises never raises, and mentions tier-gating. Does not mention mutations, but tool name suggests read-only operation. Minor gap: no mention of whether it relies on sidecar state or any prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each serving a distinct purpose: purpose, usage context, and constraints. No superfluous text, front-loaded with the core verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return format is covered. However, parameter semantics are missing, and the description assumes the agent knows about 'current SHA' and 'persisted trw-distill sidecar'. The description is adequate for an agent with context, but incomplete for a new one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the two parameters (cache_dir, repo_root). The agent has no guidance on what values to provide, leaving the agent to guess or ignore the parameters. This significantly hinders correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does: 'Return c735+c743 BeforeYouEditBatch for the current SHA.' It specifies the resource (batch hints) and distinguishes from the sibling tool trw_before_edit_hint by noting it's for multi-file edits and is paid-tier only.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage guidance: 'Use when an agent is planning a multi-file edit and needs batched before-edit hints.' Also provides alternative for free-tier users: 'see trw_before_edit_hint for the free-tier learnings counterpart.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_build_checkA

Record build/test results for ceremony tracking and delivery gates.

Use when:

  • You just ran project-native validation (via shell/CI/script) and need the outcome logged.

  • You want the delivery gate to see the latest pass/fail + coverage.

  • You want Q-learning feedback attached to a phase transition.

This tool does NOT execute subprocesses — run validation commands first, then call this with the results.

Input:

  • tests_passed: True or False — required; no default guess.

  • test_count: total checks/tests that ran.

  • failure_count: number that failed.

  • coverage_pct: 0.0-100.0, if measured.

  • static_checks_clean: preferred neutral status for configured static/type/lint/schema checks.

  • mypy_clean: legacy compatibility alias; use only for older clients or Python-specific reports.

  • scope: label like full, quick, type-check, cargo test, npm test.

  • failures: optional list of up to 10 failure descriptions.

  • run_path: optional run directory for event logging.

  • min_coverage: when set, falls tests_passed to False if coverage_pct is below the threshold (adds coverage_threshold_failed flag).

Output: dict with fields {status, run_id?, outcome, tests_passed, coverage_pct, static_checks_clean, mypy_clean, coverage_threshold_failed?, gate_effects: list[str]}.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeNofull
failuresNo
run_pathNo
mypy_cleanNo
test_countNo
coverage_pctNo
min_coverageNo
tests_passedNo
failure_countNo
static_checks_cleanNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It reveals critical behaviors: does not execute subprocesses, conditionally fails tests based on min_coverage, and lists output fields. It does not mention authorization or side effects, but for a recording tool, it is sufficiently transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Use when, Input, Output) and front-loaded with the main purpose. While it is fairly long due to 10 parameters, every sentence adds value; no wasted words. Slightly verbose but efficient for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, no annotations, and no output schema, the description is exceptionally complete. It covers all parameter meanings, usage context, behavioral nuances, and output fields. An agent can confidently invoke the tool without additional documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, but the tool description compensates excellently. Every parameter is explained with its purpose, constraints, and behavioral effects (e.g., min_coverage falling tests_passed, mypy_clean as legacy alias). This adds significant value beyond the plain schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool records build/test results for ceremony tracking and delivery gates. It specifies the verb (record) and resource (build/test results), and the multiple use cases (after validation, for delivery gates, Q-learning feedback) differentiate it from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use scenarios and a key when-not instruction: 'This tool does NOT execute subprocesses — run validation commands first, then call this with the results.' It lacks explicit alternative tool names, but the context is clear enough for most agents.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_checkpointA

Append a progress snapshot so work survives context compaction.

Use when:

  • You complete a milestone or before context compaction/interruption.

  • After each meaningful work batch so another agent can resume safely.

Input: optional run_path plus required message. Optional shard_id and wave_id annotate delegated or wave-aware progress.

Output: dict with status, run_path, checkpoint path, and message metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageNo
wave_idNo
run_pathNo
shard_idNo

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It explains the output format and the survival property, but does not disclose side effects, permissions, or safety characteristics. It provides sufficient transparency for a non-destructive logging tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with distinct sections for purpose, usage, input, and output. Every sentence adds value and there is no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description covers purpose, usage, parameter meanings, and output format. It is fairly complete for the tool's simplicity, though it lacks details on default behavior when run_path is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning beyond the schema by clarifying that message is required (contradicting schema) and that shard_id and wave_id are for annotation. However, it misstates required status, reducing reliability. Schema coverage is 0% so compensation is needed, but the contradiction harms clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool appends a progress snapshot for survival across context compaction. The verb 'append' and resource 'progress snapshot' are specific, and the purpose is distinct from siblings like trw_pre_compact_checkpoint or trw_heartbeat.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists when to use: after a milestone or before compaction/interruption, and after each meaningful work batch. This provides clear guidance, though it does not mention when not to use or identify alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_claude_md_syncA

Deprecated alias for trw_instructions_sync.

Use when: maintaining backward compatibility with older callers; prefer trw_instructions_sync in new code. This alias emits a deprecation warning on every invocation and will be removed in a future release.

Output: same as trw_instructions_sync — ClaudeMdSyncResultDict with fields {status, files_written, sections_synced}.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeNoroot
clientNoauto
target_dirNo

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the deprecation warning on every invocation and states output is identical to trw_instructions_sync. Though it doesn't detail the sync operation itself, the alias behavior and output equivalence are sufficiently transparent for a deprecated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise and front-loaded: the first sentence declares deprecation and alias. Every sentence adds value, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a deprecated alias, the description adequately covers purpose and output equivalence. However, it lacks parameter documentation and no output schema is provided, which is a gap for correct invocation. Completes the immediate context but leaves invocation details underspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description does not explain the parameters (scope, client, target_dir) at all. It only mentions output fields. This leaves the agent with no semantic guidance for parameter values beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a deprecated alias for trw_instructions_sync, with a specific verb ('maintaining backward compatibility') and resource ('alias'). It distinguishes itself from siblings by noting deprecation and redirecting to the preferred tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly specifies when to use (backward compatibility) and when not to ('prefer trw_instructions_sync in new code'). Also mentions deprecation warning and future removal, guiding the agent's decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_codebase_risk_reportA

Return c737/c739 ranked composite-risk report for the current SHA.

Use when a reviewer needs file-level structural risk ordering from a persisted trw-distill sidecar before prioritizing review effort.

Tier-gated. top_n=0 returns all entries; default 20. Returns CodebaseRiskReportResult.model_dump() enriched by client tier. NEVER raises.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNo
cache_dirNo
repo_rootNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full burden. It discloses tier-gating, top_n behavior (default 20, 0 returns all), return format (model_dump enriched by tier), and states 'NEVER raises'. It lacks details on prerequisites like sidecar existence or authentication, but provides substantial behavioral information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no wasted words. It front-loads the purpose, then usage, then details. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 3 parameters and an output schema (so return values are documented), the description covers purpose, usage, key parameter, and behavioral note. The only gap is the two undocumented parameters (cache_dir, repo_root). Overall very functional.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It explains top_n thoroughly (0 returns all, default 20) but does not explain cache_dir or repo_root at all. Only one of three parameters is given meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns a 'c737/c739 ranked composite-risk report for the current SHA', providing a specific verb and resource. It distinguishes itself from sibling tools like trw_entity_risk_map by referencing specific report codes and the use case for review prioritization.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use when a reviewer needs file-level structural risk ordering...before prioritizing review effort', giving clear context. It does not explicitly state when not to use or mention alternative tools, but the use case is specific enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_code_index_updateA

Update the local SHA-256 code-index manifest.

Use when an agent needs a fresh local code-index manifest before code search or symbol analysis without returning file bodies.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoReclassify all discovered files as freshly added.
pathsNoOptional repo-relative file or directory limits.
repo_rootYesRepository root to index.

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions 'update' but does not clarify whether the operation is destructive, idempotent, or what side effects occur (e.g., disk writes). Missing details about safety, permissions, or concurrency risks for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. The first sentence names the action and object (the manifest), and the second provides concrete usage guidance. Perfectly front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains why to use it and when, but given no output schema and lack of annotations, it omits behavioral context like idempotency, prerequisites (e.g., repo_root validity), and how paths affect the index. Schema descriptions help, but the overall completeness is average for a tool with three parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, setting baseline at 3. The description adds no extra meaning beyond the schema; it only names the tool's purpose. The parameter descriptions in the schema already explain force, paths, and repo_root adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states it updates a 'local SHA-256 code-index manifest' and specifies its use case: 'before code search or symbol analysis without returning file bodies.' This clearly distinguishes it from siblings like trw_code_search and trw_code_symbol, which operate on the index instead of updating it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description tells when to use the tool ('before code search or symbol analysis'). It implies an ordering dependency but does not explicitly state when not to use it or mention alternatives. Given sibling names, the context is sufficient but could be more precise.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_code_symbolA

Find local indexed symbols with exact matches ranked first.

Use when an agent needs symbol locations from the local code index without scanning or returning full file bodies.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
top_kNo
symbolYes
repo_rootYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must carry full burden. Discloses indexing behavior and ranking, but lacks details on return format, failure modes, or whether results are limited to exact matches.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, no redundant information. Efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 4 parameters, no output schema, and no annotations, the description fails to cover parameter meaning or return value structure. Incomplete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet description provides no explanation of parameters like 'path' or 'top_k'. The required 'repo_root' and 'symbol' are not clarified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb 'find' and specific resource 'local indexed symbols' with 'exact matches ranked first'. Distinguishes from siblings like trw_code_search and trw_code_index_update.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when to use: 'when an agent needs symbol locations from the local code index'. Also states what it avoids: 'without scanning or returning full file bodies.' Could be more explicit about alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_cross_repo_orderingA

Return the latest c745 CrossRepoOrderingAggregate.

Use when comparing structural-risk ordering consistency across multiple repositories from a persisted aggregate sidecar.

Sidecar SHA derived from sorted-repo-names (NOT git HEAD), so operator passes sidecar_path/sidecar_dir or the tool searches the repo-default location for the most-recent aggregate. Tier-gated. NEVER raises.

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_rootNo
sidecar_dirNo
sidecar_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses key traits: 'NEVER raises' (no exceptions), 'Tier-gated' (auth restriction), and explains sidecar SHA derivation. Could mention side effects (none) but overall strong transparency for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is six sentences, each purposeful. Front-loaded with purpose, then usage, then behavioral details. No repetition or fluff. Efficiently uses whitespace.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 optional params, output schema exists, and no annotations, the description covers purpose, usage, and behavioral traits. It notes that the tool searches repo-default location if sidecar path not given. Minor gaps: no mention of return format or idempotency, but output schema handles return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% parameter coverage, so description must compensate. It mentions sidecar_path and sidecar_dir options but does not explain repo_root. Also lacks details on parameter types, defaults, or constraints. Only partial guidance on how parameters affect behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it returns the latest c745 CrossRepoOrderingAggregate. The verb 'Return' and specific resource name make the action unambiguous, distinguishing it from sibling tools like trw_ordering_compare by focusing on cross-repo aggregate sidecar.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'when comparing structural-risk ordering consistency across multiple repositories from a persisted aggregate sidecar.' Also clarifies that sidecar SHA is derived from sorted repo names, not git HEAD. However, no explicit when-not-to-use or alternatives listed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_deliverA

Persist learnings and progress so future sessions inherit this session's work.

Use when:

  • Your session is about to end and you want discoveries to persist for future agents.

  • A milestone is reached and you want to close out the current run directory.

Before calling, check: did you record at least one discovery with trw_learn? If not, add even a one-line root-cause learning so the next agent avoids re-discovery.

Runs reflect + checkpoint synchronously, then launches housekeeping (consolidation, publish, telemetry, tier sweep) in the background. Background work is concurrency-safe — overlapping batches are skipped rather than queued.

Input:

  • run_path: path to run directory (auto-detected if None).

  • skip_reflect: skip reflection step (e.g., already reflected).

  • skip_index_sync: skip INDEX/ROADMAP sync step.

  • allow_unverified: explicit override for delivery without a passing trw_build_check record. Use only for documented acceptable failures.

  • unverified_reason: required rationale when allow_unverified is true.

Output: DeliverResultDict with fields {run_path: str, reflect: dict, checkpoint: dict, deferred: str, critical_steps_completed: int, deferred_steps: int, errors: list, success: bool, learning_reflection?: str}.

Example: trw_deliver() → {"run_path": "/path/...", "critical_steps_completed": 2, "deferred": "launched", "success": true}

See Also: trw_checkpoint, trw_instructions_sync

ParametersJSON Schema
NameRequiredDescriptionDefault
run_pathNo
skip_reflectNo
skip_index_syncNo
allow_unverifiedNo
unverified_reasonNo

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden. It explains synchronous execution of reflect and checkpoint, then asynchronous background work with concurrency safety (overlapping batches skipped). However, it doesn't detail error handling or what happens on failures beyond the output errors field. Still, it covers key behavioral traits well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections: purpose, use cases, pre-check, behavior, parameters, output, example, see also. Each sentence adds value; no fluff. The length is appropriate given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description provides a detailed output structure with field names and types, plus an example. It covers the essential aspects but could be more explicit about some fields like 'deferred' and 'critical_steps_completed'. Overall, it gives enough context for an agent to understand what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description explains each parameter clearly: run_path (auto-detected), skip_reflect, skip_index_sync, allow_unverified (explicit override), unverified_reason (required rationale). This adds significant meaning beyond the bare schema, though it doesn't elaborate on data types beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Persist learnings and progress so future sessions inherit this session's work.' It uses a specific verb (persist) and resource (learnings and progress). It also distinguishes from siblings by listing see-also tools and explaining what this tool does differently (e.g., background housekeeping vs trw_checkpoint).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides 'Use when' scenarios: session about to end, milestone reached. Includes a precondition check ('did you record at least one discovery with trw_learn?') and advice to add a learning if not. This gives clear decision support for when to call the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_entity_risk_mapA

Return entity-level structural risk rows for the current SHA.

Use when a reviewer needs symbol/function/class/endpoint blast-radius triage from a persisted sidecar. Tier-gated. top_n=0 returns all matching rows. NEVER raises for sidecar failures.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNo
cache_dirNo
repo_rootNo
changed_onlyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses one important behavioral trait: 'NEVER raises for sidecar failures.' However, it does not mention whether the tool is read-only, requires specific permissions, or has side effects. The disclosure is incomplete for a tool without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with four sentences, each serving a purpose: stating the action, providing usage context, explaining a parameter behavior, and giving a safety guarantee. Front-loaded with the primary purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists, the description does not fully explain all parameters (only top_n is partially covered). It also does not clarify what 'structural risk rows' entail. For a tool with 4 parameters and no schema descriptions, the description is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must add meaning. It only explains the top_n parameter (top_n=0 returns all matching rows). The other three parameters (cache_dir, repo_root, changed_only) are not described. This partially compensates but leaves significant gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Return' and the resource 'entity-level structural risk rows for the current SHA'. It also provides a use case: when a reviewer needs symbol/function/class/endpoint blast-radius triage from a persisted sidecar. This distinguishes it from sibling tools like trw_codebase_risk_report.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description specifies when to use the tool ('when a reviewer needs ... triage') and mentions it is tier-gated. It does not explicitly mention when not to use or provide alternatives, but the context is clear enough for an agent to understand the intended scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_heartbeatA

Refresh the caller's pin heartbeat and append a heartbeat event.

Use when:

  • A long-running campaign needs to keep its pin alive between work units.

  • You want to probe whether the current run is stale enough to checkpoint.

Rate-limit: if now - last_heartbeat_ts < 60s the call short-circuits (no events.jsonl append, no pin-store write) and returns rate_limited=True so long-running loops don't spam the audit trail. Rate-limit state lives in pins.json::<pin_key>::last_heartbeat_ts so the 60s window survives server restart.

Input:

  • message: optional context string logged alongside the heartbeat event.

Output: TrwHeartbeatResultDict — on success {run_id, last_heartbeat_ts, stale_after_ts, age_hours, should_checkpoint, rate_limited}; on missing-pin {error: "no_active_pin", hint: "call trw_init or trw_adopt_run first"}.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageNo

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It fully discloses the rate-limiting behavior, the short-circuit condition based on a 60-second window, the state persistence in pins.json, the output structure on success, and the error case for missing pin. This is a comprehensive behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with a one-line summary. It uses clear section headers (Use when, Rate-limit, Input, Output) and bullet points for readability. Every sentence adds value without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description lists the result fields (run_id, last_heartbeat_ts, etc.) and error case. Given the tool's simplicity (one optional parameter), the description is complete and provides sufficient context for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description must compensate. It does so by explaining the only parameter 'message' as 'optional context string logged alongside the heartbeat event.' This adds meaning beyond the schema's default and type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Refresh the caller's pin heartbeat and append a heartbeat event.' It uses specific verbs and resources, and given the sibling tools like trw_init, trw_checkpoint, and trw_probe, the description provides context that distinguishes it as a keep-alive mechanism for long-running campaigns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage scenarios: 'Use when: - A long-running campaign needs to keep its pin alive between work units. - You want to probe whether the current run is stale enough to checkpoint.' This gives clear guidance on when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_initA

Create a run directory and register it as the active run.

Use when:

  • Starting a new task, sprint, or investigation that needs persistent TRW state.

  • You need run metadata, framework assets, and active-run pinning before work begins.

Bootstraps state, run metadata, events, framework assets, optional wave/artifact metadata, and a trace/profile-aware task_profile.

Input: task_name plus optional objective, config_overrides, task_root, wave_manifest, complexity signals, artifacts, and protection flag.

Output: dict with run_id, run_path, task_dir, phase, and status fields.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_typeNoimplementation
artifactsNo
objectiveNo
prd_scopeNo
protectedNo
task_nameNo
task_rootNo
task_typeNo
planning_modeNo
wave_manifestNo
complexity_hintNo
config_overridesNo
complexity_signalsNo

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It mentions creating, registering, bootstrapping state, metadata, events, and assets, but lacks details on side effects, failure modes, or required permissions. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with a lead sentence and bullet points. It is reasonably concise, though some redundancy exists. The bullet list improves readability without excessive length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (13 params, no output schema, no annotations), the description is incomplete. It briefly mentions output fields but doesn't explain their semantics, error conditions, or preconditions. More detail is needed for an initialization tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 13 parameters with 0% description coverage. The description lists some parameters (task_name, objective, config_overrides, etc.) but omits others like run_type, task_type, planning_mode, and doesn't explain their meanings or formats. This leaves significant gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Create a run directory and register it as the active run' with a clear verb and resource. It lists specific actions like bootstrapping state, run metadata, etc., distinguishing it from sibling tools like trw_adopt_run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use when' bullet points provide clear context: starting a new task, sprint, investigation needing persistent state. While it doesn't explicitly state when not to use or name alternatives, the guidance is sufficient for typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_instructions_syncA

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}.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeNoSync scope — "root" for project instruction file, "sub" for module-level.root
clientNoTarget 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_dirNoTarget directory for sub-instruction file generation.

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but the description explains what the tool does (renders guidance into instruction files) and what it does not do (promote learnings). It also mentions the output format. However, it does not clarify whether it overwrites or merges existing content, leaving some behavioral ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured: a summary sentence, bullet-pointed use cases, a behavioral paragraph, and output format. Every sentence is informative and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's purpose (sync multiple instruction files) and 3 parameters fully documented, the description covers use cases, behavior, and output. It is complete enough for an agent to decide when and how to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by contextualizing parameters (e.g., 'auto' client detection, scope for root vs sub), which goes beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool syncs TRW protocol and ceremony guidance into the client's instruction file. It uses a specific verb ('Sync') and resource, and distinguishes from sibling tools like trw_session_start by noting that learnings are not promoted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly lists three 'Use when' scenarios: onboarding new project, after changing protocol template, and when switching IDE clients. Also states when not to use (for learning promotion) and directs to trw_session_start for that purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_learnA

Persist a non-obvious discovery so future agents inherit the finding.

Use when:

  • You just found a root cause, gotcha, or durable pattern worth remembering.

  • Capture it the moment you validate an approach that prevents repeated mistakes.

  • You hit an architecture constraint that is not obvious from reading the code.

Only record learnings that:

  • prevent repeated mistakes,

  • change future implementation/debugging/review behavior,

  • are specific enough to recall later. Routine observations ("I read the file", "the test passed") degrade recall quality.

Required:

  • summary: one-line headline.

  • detail: full finding with context, symptoms, and why it matters.

Recommended:

  • tags: keywords for trw_recall filtering. Accepts a JSON list (["a","b"]) OR a comma/whitespace-separated string ("a,b c").

  • impact: 0.0-1.0; high values surface more often.

Advanced (auto-detected if omitted):

  • shard/source/client/model/type/domain/phase/team/protection metadata.

  • scope: write-tier override (PRD-CORE-185). "auto" (default) routes portable learnings to the machine-local user tier when a user-scope store is present, else the project tier; "project"/"user" force it. Most learnings need only summary and detail. Adding tags and impact improves recall precision. All other fields are auto-detected.

Output: LearnResultDict with {id: str, status: "saved"|"deduped"|"error", dedup_match?: dict, ceremony_hint?: str}.

See Also: trw_recall, trw_learn_update

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
typeNopattern
scopeNoauto
detailNo
domainNo
impactNo
expiresNo
summaryNo
evidenceNo
model_idNo
shard_idNo
task_typeNo
assertionsNo
confidenceNounverified
nudge_lineNo
source_typeNoagent
team_originNo
phase_originNo
client_profileNo
phase_affinityNo
protection_tierNonormal
source_identityNo
consolidated_fromNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly indicates this is a write operation (persist), describes the output status (saved/deduped/error), and mentions auto-detection of metadata. It could explicitly state idempotency or deduplication behavior, but it does cover the main behavioral aspects. Score 4 for good but not exhaustive transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively long but well-organized into sections (purpose, use-when, only-record, required, recommended, advanced, output). It is front-loaded with the purpose and usage conditions. Every sentence adds value, and the structure aids readability. Could be slightly more concise, but it remains effective. Score 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 23 optional parameters and no output schema, the description covers the tool's purpose, usage guidelines, key parameter semantics, auto-detection behavior, output format, and related tools. It is sufficiently complete for an agent to understand when and how to invoke the tool. Score 4.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must add meaning beyond parameter names. It does: it explains that `summary` and `detail` are required, `tags` accepts JSON list or string, `impact` is 0.0-1.0, and `scope` has auto/project/user options. It instructs that most other fields are auto-detected. Although not all 23 parameters are individually described, the description prioritizes the most important ones and covers their semantics well. Score 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Persist a non-obvious discovery so future agents inherit the finding.' It uses a specific verb ('persist') and resource ('non-obvious discovery'), and it distinguishes the tool from siblings like `trw_recall` (retrieve) and `trw_learn_update` (update). The purpose is crystal clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Use when' conditions and a list of what qualifies as a valid learning. It also specifies what not to record ('Routine observations...'). It includes 'See Also: trw_recall, trw_learn_update' to guide alternative tool selection. This is exemplary usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_learn_updateA

Update an existing learning — status, fields, or feedback signal.

Use when:

  • The issue a learning describes has been fixed (status="resolved").

  • A pattern is no longer applicable (status="obsolete").

  • Detail or summary can be sharpened now that root cause is clearer.

  • You want to boost/demote an entry's recall ranking via feedback.

Output: dict with fields {status: "updated"|"not_found"|"invalid", error?: str, field_updated?: str}.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoReplace the entry's tag set. Passing `[]` clears all tags. Callers are responsible for dedup/normalization.
typeNoUpdated type — "incident", "pattern", "convention", "hypothesis", or "workaround".
detailNoUpdated detail text (replaces existing detail).
domainNoUpdated domain tags.
impactNoUpdated impact score (0.0-1.0).
statusNoNew status — "active", "resolved", or "obsolete". Resolved/obsolete entries stop appearing in recall.
expiresNoUpdated expiration date/condition.
summaryNoUpdated summary text (replaces existing summary).
feedbackNoSignal whether this learning was helpful or unhelpful — "helpful" or "unhelpful". Affects recall ranking via feedback-aware decay (PRD-CORE-132).
task_typeNoUpdated task type identifier.
assertionsNoReplace assertions on this entry (PRD-CORE-086 FR12). Empty list removes all.
confidenceNoUpdated confidence — "unverified", "low", "medium", "high", or "verified".
nudge_lineNoUpdated nudge text (max 80 chars, auto-truncated).
supersedesNoid of a PRIOR learning that THIS learning replaces/corrects (PRD-CORE-194 FR04). Closes the prior record's validity window (sets its invalid_from + invalidated_by=this id) and RETAINS it — never a delete. Fires ONLY when explicitly passed; a routine field edit never closes a window.
learning_idNoID of the learning to update (e.g., "L-abc12345").
team_originNo
phase_originNo
phase_affinityNoUpdated phase affinities.
protection_tierNoUpdated protection tier.

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It details effects: updating status stops entries from appearing in recall, feedback affects ranking, and the supersedes parameter closes prior validity windows. It also describes the output shape. However, it lacks information on authorization or rate limits, which would be needed for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with a clear opening sentence followed by bullet points for usage. It is well-structured and front-loaded with the core purpose. No extraneous information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 19 parameters and no output schema, the description covers key aspects: when to use, effects of parameters (especially supersedes and feedback), and the output structure with status and error fields. However, it could mention idempotency or whether updates are partial or replace all fields, but the schema descriptions handle most parameter details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 89%, so baseline is 3. The tool description adds value by explaining how parameters like feedback affect recall ranking and how supersedes closes validity windows. This context goes beyond the schema descriptions, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Update an existing learning — status, fields, or feedback signal' with specific verb and resource. It lists concrete use cases (e.g., fixing a learned issue, marking obsolete, sharpening details) which make the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists when to use the tool with bullet points: status transitions, detail refinement, feedback adjustment. This provides clear context for invocation, even though it doesn't explicitly mention when not to use it or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_mcp_security_statusD
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_meta_tune_rollbackA

Roll back a previously promoted meta-tune proposal.

Use when a promoted candidate is causing regressions and you need to restore the prior surface content while writing an entry to the SAFE-001 audit log.

Returns: dict serialization of the rollback result, including the proposal id and the restored content hash.

ParametersJSON Schema
NameRequiredDescriptionDefault
state_dirNo
proposal_idYes
audit_log_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It discloses writing to an audit log and returning a dict with proposal id and content hash. However, it does not mention idempotency, reversibility, or required permissions, leaving gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, front-loaded with the action, then usage condition, then return format. Every sentence adds value, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters and no annotations, the description explains purpose and return but fails to describe optional parameters and prerequisites (e.g., proposal must exist and be promoted). Output schema exists but doesn't fully compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description explains none of the three parameters. It only implies 'proposal_id' as the key parameter but omits 'state_dir' and 'audit_log_path', which have defaults and anyOf types that need clarification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Roll back a previously promoted meta-tune proposal' with a specific verb and resource. It distinguishes this tool from siblings by focusing on a unique operation not evident in other tool names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use when a promoted candidate is causing regressions and you need to restore prior surface content while writing an audit log entry.' Provides clear context for use but does not mention when not to use or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_ordering_compareA

Return c741 RiskOrderingComparison for the current SHA.

Use when comparing two persisted risk-ordering sidecars for overlap and rank-correlation drift.

Tier-gated. NEVER raises.

ParametersJSON Schema
NameRequiredDescriptionDefault
cache_dirNo
repo_rootNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses 'NEVER raises' and 'Tier-gated', which are useful behavioral traits. However, it does not explicitly state whether the tool is read-only or has side effects, leaving some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each adding value: purpose, usage, and traits. It is concise, front-loaded, and contains no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the output and usage adequately, but fails to cover the input parameters. Given that schema coverage is 0%, this is a notable gap, though the tool is simple and params are optional.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has two parameters (cache_dir, repo_root) with no descriptions (0% coverage). The description does not mention or clarify these parameters, so it adds no meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a 'RiskOrderingComparison' for the current SHA, and specifies it compares two persisted risk-ordering sidecars. This is specific and distinct from siblings like trw_cross_repo_ordering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use when comparing two persisted risk-ordering sidecars', providing clear context. It also mentions 'Tier-gated' and 'NEVER raises', which guide availability and error behavior, though no explicit alternatives are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_pipeline_healthA

Probe the five compounding-pipeline signals (sync_push, graph_edges, embedding_coverage, recall_feedback, bandit_state). Returns a structured report with degraded flag and advisory.

Use when:

  • trw_session_start returns a pipeline_health_advisory and you need the full per-signal breakdown to diagnose which subsystem is degraded.

  • Performing a routine operator health check outside of ceremony.

Checks: sync_push (consecutive_failures + last_push_at age), graph_edges (knowledge graph empty?), embedding_coverage (< 10%?), recall_feedback (all recall_count=0?), and bandit_state (mtime stale?).

Returns a structured report with:

  • degraded: True if any signal is degraded.

  • advisory: Compact single-line string naming degraded signals.

  • Per-signal sub-dicts with detailed status.

All probes are read-only and fail-open individually.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavioral traits: all probes are read-only and fail-open individually. It details what each signal checks (sync_push, graph_edges, etc.) and the output structure, leaving no ambiguity about safety or behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Efficient and well-structured: front-loaded with purpose, followed by usage conditions, then detailed signal checks. Every line earns its place without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema or annotations, the description fully covers the return format (degraded flag, advisory, per-signal details) and documents all five signal checks. Complete for a parameterless, read-only probe tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters (100% coverage trivially), so the description adds all necessary meaning. It explains the structured output and per-signal sub-dicts, which is entirely beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it probes five specific pipeline signals and returns a structured report with degraded flag and advisory. Tool name aligns with purpose, and the detailed breakdown distinguishes it from sibling tools like trw_probe or trw_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use scenarios: when trw_session_start returns a pipeline_health_advisory, or for routine health checks. Lacks explicit when-not-to-use or alternatives, but the guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_prd_createA

Generate an AARE-F compliant PRD from a feature description.

Use when:

  • You have a feature request or requirements and need a structured PRD.

  • Before writing code for a P0/P1/P2 feature or risky behavioral change.

  • You want auto-incremented PRD ID, YAML frontmatter, and catalogue sync.

Produces 12 standard sections, confidence scores, and traceability links. Updates INDEX.md/ROADMAP.md when index_auto_sync_on_status_change is on.

Input:

  • input_text: feature request or description (becomes Problem Statement + Background).

  • category: one of CORE, QUAL, INFRA, LOCAL, EXPLR, RESEARCH, FIX (plus any values added to .trw/config.yaml::extra_prd_categories).

  • priority: P0, P1, P2, or P3 — drives base confidence scores.

  • title: auto-generated from input_text when empty.

  • sequence: auto-increments from existing catalogue when default (1).

  • risk_level: optional critical|high|medium|low — scales validation strictness.

Output: PrdCreateResultDict with fields {prd_id: str, title: str, category: str, priority: str, output_path: str, content: str, sections_generated: int, index_synced: bool}.

Example: trw_prd_create(input_text="Add rate limiting to public API", category="CORE", priority="P1") → {"prd_id": "PRD-CORE-001", "output_path": "docs/requirements-aare-f/prds/PRD-CORE-001.md", "sections_generated": 12, "index_synced": true, ...}

See Also: trw_prd_validate

ParametersJSON Schema
NameRequiredDescriptionDefault
titleNo
categoryNoCORE
priorityNoP1
sequenceNo
input_textYes
risk_levelNo

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description fully carries the burden. It details outputs (12 sections, confidence scores, traceability), auto-update behavior for INDEX.md/ROADMAP.md, auto-generation of title and sequence, and scaling of validation based on risk_level. Does not explicitly mention whether it overwrites existing files or is purely append, but the creation context implies non-destructive behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections: purpose, usage conditions, parameter list with bullets, output description, example, and cross-reference. No extraneous sentences; each part serves a distinct role.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no annotations and no output schema, the description covers all needed context: inputs, processing behavior, output structure (with fields enumerated), side effects (catalogue sync), and an illustrative example. It is fully self-contained for an agent to understand and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but the tool description provides detailed semantic context for all 6 parameters including default behavior, valid values, and impact on output. For example, 'category: one of CORE, QUAL, INFRA...' and 'title: auto-generated from input_text when empty'—adds meaning far beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it generates an AARE-F compliant PRD from a feature description. It lists specific use cases and distinguishes itself from sibling tool 'trw_prd_validate' via the 'See Also' section, providing a specific verb+resource+scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use when' bullets outline appropriate contexts: having a feature request, before writing code for P0/P1/P2 features, and need for structured PRD with auto-increment IDs. Also implies when not to use via reference to 'trw_prd_validate'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_prd_diffB

Diff two PRD files with requirement, metric, and acceptance-gate focus.

Use when:

  • Reviewing changes between two PRD versions or drafts.

  • Auditing how requirements or acceptance criteria have evolved.

ParametersJSON Schema
NameRequiredDescriptionDefault
after_pathYes
before_pathYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must carry full burden. It only states the tool diffs files with a specific focus; it omits whether the tool is read-only, whether it modifies anything, required permissions, output format, or side effects. Minimal behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences plus a bullet list. Front-loaded with purpose. No unnecessary words or repetition. Efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and only two parameters. Description lacks output format (e.g., text diff, structured change report), safety information, or prerequisites. Incomplete for an AI agent to fully understand invocation outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for parameter descriptions. Parameter names 'before_path' and 'after_path' imply order but the description does not clarify path format (local, repo, relative) or constraints. No added semantic value beyond names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb+resource: 'Diff two PRD files' with a specific focus on requirements, metrics, and acceptance-gates. Distinguishable from sibling tools like trw_prd_create and trw_prd_validate, though not explicitly differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use when' bullets provide two clear scenarios: reviewing changes between versions and auditing evolution. Lacks when-not-to-use or alternative tool mentions, but the context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_prd_validateA

Score a PRD against the V2 validation suite before implementation.

Use when:

  • A PRD just landed and you need a READY / NEEDS-WORK verdict before coding.

  • You want ambiguity / completeness / traceability gates checked in one call.

Runs structure compliance, content quality, AARE-F compliance, and ambiguity analysis. Catches issues here that would otherwise cause rework.

Input:

  • prd_path: path to the PRD markdown file (required).

Output: ValidateResultDict with fields {total_score: float (0-100), quality_tier: str, grade: str, valid: bool, ambiguity_rate: float, completeness_score: float, traceability_coverage: float, improvement_suggestions: list[ImprovementSuggestionDict], failures: list[ValidationFailureDict], dimensions: list[DimensionScoreDict], path: str, sections_found: list[str], sections_expected: list[str], smell_findings: list[dict], ears_classifications: list[dict], readability: dict[str, float], section_scores: list[SectionScoreDict], effective_risk_level: str, risk_scaled: bool, status_drift_warnings: list[str], integrity_warnings: list[str], cache: dict}.

quality_tier values: "skeleton" | "draft" | "review" | "approved" (QualityTier enum; no "PRODUCTION" tier exists).

Example: trw_prd_validate(prd_path="docs/requirements-aare-f/prds/PRD-QUAL-074.md") → {"total_score": 87, "quality_tier": "approved", "grade": "A", "valid": true, "improvement_suggestions": []}

ParametersJSON Schema
NameRequiredDescriptionDefault
prd_pathNo

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description fully discloses that the tool runs structure compliance, content quality, AARE-F compliance, and ambiguity analysis. It also notes that it catches issues that would cause rework. It does not mention side effects, auth needs, or rate limits, but for a read-only validation tool, this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, use cases, what it checks, input/output, and an example. It is concise yet complete, with no wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there is no output schema, the description provides a detailed breakdown of the return structure, including enum values for quality_tier and a crucial note that no 'PRODUCTION' tier exists. This level of detail compensates for the lack of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only one parameter and 0% schema description coverage, the description adds meaning by stating 'path to the PRD markdown file (required).' There is a minor inconsistency: the schema has a default empty string and no required field, but the description still provides useful context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scores a PRD against a V2 validation suite before implementation. It distinguishes from siblings like trw_prd_create and trw_prd_diff by focusing on validation rather than creation or diffing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use when: A PRD just landed...' and 'You want ambiguity / completeness / traceability gates checked in one call.' It does not mention when not to use or alternatives, but the context is clear enough for an agent to decide.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_pre_compact_checkpointA

Capture a safety checkpoint before the context window compacts.

Use when:

  • Invoked by the PreCompact hook on imminent context compaction.

  • You suspect compaction is near and want a clean resume point on disk.

PRD-CORE-165 FR-01: pass directive (the active operator directive / task you are mid-flight on) and context_anchor (where you are in it — e.g. the in-flight experiment or handoff pointer). These live in the conversation, not in trw state, so they cannot be auto-derived; when supplied they are persisted into the pre-compact state and surfaced on the next trw_session_start so the post-compaction session resumes exactly instead of re-orienting by hand. Both are optional and backward-compatible.

Best-effort: sub-step failures populate status but do not raise.

Output: PreCompactResultDict with fields {status: "written"|"skipped"|"error", reason?: str, checkpoint_path?: str, instructions_path?: str, compact_state_path?: str, directive?: str, context_anchor?: str}.

ParametersJSON Schema
NameRequiredDescriptionDefault
directiveNo
context_anchorNo

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, but the description fully covers behavior: it is best-effort (sub-step failures populate status without raising), explains output fields, and notes parameters are conversation-derived. There is no contradiction with absent annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage, parameter explanation, best-effort note, output format). Every sentence is informative, and it is front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and high complexity, the description is extremely complete: it covers purpose, usage context, parameter semantics, behavior, and output structure. No significant gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet the description explains both 'directive' and 'context_anchor' in detail: their purpose, why they cannot be auto-derived, and that they are optional. This adds substantial meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Capture a safety checkpoint before the context window compacts' with a specific verb and resource. It differentiates from siblings like 'trw_checkpoint' and 'trw_session_start' by focusing on the pre-compaction scenario.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use when:' conditions are provided: invoked by PreCompact hook or when compaction is suspected. This gives clear guidance on when to invoke the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_probeA

Run a bounded, sandboxed experiment to resolve a disputed plan assumption.

Use when, during the PLAN phase, two plan branches disagree on a load-bearing, empirically resolvable claim a rubric cannot adjudicate (e.g. "this parser handles a 50MB JSONL stream without OOM"). The command runs inside the shared SAFE-001 sandbox (subprocess + seccomp + no-network default), bounded by timeout_s and memory_mb, and a typed ProbeResult with verdict in {supports, refutes, inconclusive} comes back.

Budget is enforced per planning_mode (DIRECT=0, DUAL_DRAFT=1, TRIANGULATED=2, TRIANGULATED_WITH_PROBE=3); exhaustion returns a typed budget error. Identical probes within a run are served from cache.

Returns: dict serialization of ProbeResult (or a typed error dict on validation failure / budget exhaustion / feature-flag disabled).

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idNounknown
commandYes
memory_mbNo
timeout_sNo
hypothesisYes
allow_networkNo
hypothesis_idNo
planning_modeNoTRIANGULATED_WITH_PROBE

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It details the sandbox environment (SAFE-001, subprocess, seccomp, no-network default), resource bounds (timeout_s, memory_mb), return type (ProbeResult with verdict), budget enforcement, and caching. It does not mention potential side effects or cleanup, which prevents a perfect score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured paragraph. It starts with the primary purpose, then usage context, execution details, and return value. Information is front-loaded. Some phrasing could be more concise (e.g., 'a typed...comes back'), but overall it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters (2 required), 0% schema coverage, and an output schema (exists but not detailed), the description covers main usage, sandbox, return type, budget errors, and caching. It mentions error returns but lacks specifics on error handling or edge cases. Overall, it is fairly complete for a probe tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions key parameters (command, timeout_s, memory_mb, etc.) but does not explain each in detail or provide format constraints. For example, it does not clarify the 'run_id' parameter's purpose or the valid values for 'planning_mode'. While context is given, precise semantics are lacking.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Run a bounded, sandboxed experiment to resolve a disputed plan assumption.' It specifies the action (run experiment) and the resource (disputed assumption), and distinguishes from sibling tools by referencing the PLAN phase and plan branch disagreements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use the tool: 'during the PLAN phase, two plan branches disagree on a load-bearing, empirically resolvable claim a rubric cannot adjudicate.' Provides an example. However, it does not specify when not to use it or suggest alternative tools, which slightly lowers the score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_probe_budget_statusA

Report live probe budget usage for a session (read-only, FR-10).

Use when you need to detect runaway probe usage before it becomes cost/latency creep. Returns {used, remaining, total, planning_mode, by_hypothesis_id, by_mode} consistent with emitted ProbeEvents in the same run. Read-only — never mutates budget state.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idNounknown
planning_modeNoTRIANGULATED_WITH_PROBE

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It explicitly states 'Read-only — never mutates budget state' and discloses the return structure. It does not mention rate limits or prerequisites, but for a read-only report, this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with three sentences, front-loaded with purpose, and structured into two clear paragraphs. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with 2 optional params and an output schema, the description covers purpose, use case, return structure, and behavior. The output schema exists so return value details are not needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description only mentions 'planning_mode' in the return context, not its input meaning. Parameters 'run_id' and 'planning_mode' are not explained, leaving the agent to rely on defaults without guidance on when to override.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reports live probe budget usage for a session (read-only), with a specific verb and resource. It distinguishes from siblings like 'trw_probe' and 'trw_status' by focusing on budget usage and mentioning FR-10.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly describes when to use ('detect runaway probe usage before it becomes cost/latency creep') and states it's read-only. While it doesn't name alternatives, the context is clear enough for an agent to choose this over similar tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_profile_explainA

Explain the resolved profile's per-field layer attribution.

Use when:

  • A surprising ceremony/review/build-check gate fires and you need to see WHICH layer contributed the offending value.

  • Auditing the policy in force for the session (NIST 24h reconstruction).

Resolves the full 6-layer chain (defaults → org → domain → task-type → session → client) and reports, for every surface field, its effective value, the origin layer, and the full override chain.

Input (all optional — inferred when omitted):

  • domain: override the inferred domain layer (e.g. frontend).

  • task_type: override the inferred task-type layer (e.g. bugfix).

  • prd_path: PRD/file path used to infer the domain when not explicit.

  • task_name: task name used to infer the task-type when not explicit.

Output: dict with fields (list of {field, value, origin_layer, override_chain}), layers_applied, surface_snapshot_id, session_override_hash, and resolved_profile. On error: a {error: str} payload (fail-open, never raises).

ParametersJSON Schema
NameRequiredDescriptionDefault
domainNo
prd_pathNo
task_nameNo
task_typeNo

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: it resolves a 6-layer chain, reports per-field attribution with override chain, and on error returns a fail-open payload (never raises). This transparently covers the tool's operational characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a clear opening statement, separate 'Use when' section, input list, and output definition. No unnecessary words; all sentences add value. It is concise yet comprehensive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of annotations and output schema, the description fully covers input parameter semantics, output structure (dict with fields, layers_applied, etc.), and error behavior. It is complete for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description explains each parameter's purpose (e.g., 'override the inferred domain layer'), their optionality, and hints at values (e.g., 'frontend'). This adds significant meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's function: 'Explain the resolved profile's per-field layer attribution.' It uses a specific verb ('explain') and resource ('resolved profile's per-field layer attribution'), and details the output (effective value, origin layer, override chain). This clearly distinguishes it from sibling tools, which cover other aspects of the trw ecosystem.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides two explicit use cases: 'when a surprising ceremony/review/build-check gate fires' and 'when auditing the policy in force for the session.' It also notes that all inputs are optional and inferred when omitted, guiding the agent on when to override defaults. No when-not guidance is given, but the specificity is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_query_eventsB

Return a merged cross-emitter event view for a session.

ParametersJSON Schema
NameRequiredDescriptionDefault
filtersNoOptional extra equality filters. Supported keys: ``run_id``, ``event_type``, ``emitter``.
session_idNoWhen provided, restrict results to events whose ``session_id`` matches. Pass ``None`` for cross-session trend queries.

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral disclosure burden. It omits traits like read-only nature, ordering, pagination, or rate limits, providing insufficient transparency for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence that efficiently states the primary action. However, it could be slightly expanded to include key details without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and simple parameters, the description does not explain return values or what 'merged cross-emitter event view' entails, leaving notable gaps for a query tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already describes both parameters well. The description adds no additional meaning beyond stating 'session', which is already covered by the schema's session_id description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Return a merged cross-emitter event view for a session' clearly states the verb and resource, distinguishing this tool from siblings like trw_recall or trw_probe by specifying 'merged cross-emitter event view'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for querying events for a session but does not explicitly state when to use this tool versus alternatives or provide exclusions, leaving usage guidance implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_recallA

Retrieve prior learnings relevant to your current task.

Use when:

  • You are about to work in an unfamiliar area of the codebase.

  • You suspect a bug has been seen before and want prior root-cause notes.

  • You want a narrow tag/impact slice before spawning a subagent.

See Also: trw_learn, trw_session_start.

Results are ranked by combined relevance (query match on summary/tags/detail) and utility (impact, type-aware recency decay, prior feedback). Context boosts prioritize entries matching your current domain, phase, and team.

Output: RecallResultDict with fields {learnings: list[{id, summary, detail?, tags, impact, ...}], count: int, query: str, ceremony_hint?: str}.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tag filter — only return entries matching these tags.
as_ofNoOptional ISO-8601 instant (PRD-CORE-194). Time-travel recall — returns records whose validity window contained T. Malformed values raise a clean validation error. Default None = open records only.
queryNoSearch query (keywords matched against summaries/details). Use "*" to list all (auto-enables compact mode).
topicNoOptional topic slug from knowledge topology. When provided, only returns learnings belonging to that topic cluster.
statusNoOptional status filter — 'active', 'resolved', or 'obsolete'.active
compactNoWhen True, return only essential fields per learning. When None (default), auto-enables for wildcard queries.
shard_idNoOptional shard identifier for receipt attribution.
min_impactNoMinimum impact score filter (0.0-1.0). Use 0.7 for high-impact only.
max_resultsNoMaximum learnings to return (default 25, 0 = unlimited).
token_budgetNoOptional max token ceiling for the serialized result. Must be > 0. When omitted, a sane default cap is applied so a recall can never overflow the context window (anti-collapse guard).
include_tiersNoOptional tier scope (PRD-CORE-185). Project entries are ALWAYS included; this flag only controls whether machine-local USER-tier entries are added on top. None (default) and any list containing "user" federate the user tier when a user-scope store is present; ["project"] (no "user") restricts to project-only. A user-only query is intentionally not expressible -- the project tier is the local source of truth and is never excluded.
ultra_compactNoWhen True, return only ``{learnings, count, ceremony_hint}`` with each learning reduced to ``{id, summary}``.
include_supersededNoWhen True, also return superseded records, ranked strictly below open ones (each flagged superseded/invalidated_by).

Output Schema

ParametersJSON Schema
NameRequiredDescription
countNo
queryNo
compactNo
contextNoShape of the context dict returned by ``collect_context()`` and embedded in ``RecallResultDict``. Both keys are optional — populated only when the corresponding YAML file exists in the ``.trw/context/`` directory.
patternsNo
learningsNo
max_resultsNo
tokens_usedNo
ceremony_hintNo
tokens_budgetNo
total_matchesNo
total_availableNo
tokens_truncatedNo
duplicates_collapsedNo
topic_filter_ignoredNo
topic_filter_warningNo

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses ranking logic (relevance, utility, context boosts), time-travel recall, auto-compact for wildcards, anti-collapse guard, tier inclusion behavior, and output shape. This is comprehensive for a retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concisely structured: purpose sentence, bulleted use cases, ranking explanation, output format. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (13 parameters, output schema exists), the description covers purpose, usage, ranking, and output. It is complete for an agent to decide when and how to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The main description adds contextual insight (e.g., ranking, compact mode auto-enable) but does not significantly extend parameter semantics beyond the already thorough schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Retrieve prior learnings relevant to your current task,' which is a specific verb+resource. It distinguishes from siblings by mentioning 'See Also: trw_learn, trw_session_start' and providing unique use-case bullets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists three when-to-use scenarios (unfamiliar area, suspected recurring bug, narrow slice before subagent) and mentions alternative tools. This provides clear guidance on appropriate contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_request_tool_accessA

Grant this session single-use access to a phase-masked tool.

Use when a genuine cross-phase or emergency-debug need requires a tool the current phase masks — and only then, since every grant is logged to telemetry. The grant is single-use (one subsequent call) and the TTL is capped at 5 minutes regardless of ttl_seconds.

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonYesNon-empty audit reason (>= 20 chars).
tool_nameYesThe masked tool to temporarily expose.
ttl_secondsNoRequested TTL; clamped to a 5-minute maximum.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, but the description effectively discloses key behaviors: single-use grant, telemetry logging, TTL capped at 5 minutes regardless of ttl_seconds. It does not mention error handling or results of unused grants, but core behavioral traits are well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long, each sentence providing essential information without redundancy. It is front-loaded with the core purpose, then guidelines, then parameter nuance. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is no output schema, the description adequately explains input parameters and behavior. It mentions session scope, logging, and TTL limits. It assumes domain knowledge about 'phase-masked', which is acceptable for a specialized tool. Minor gap: it doesn't describe what happens after the grant is used or expires.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for its three parameters. The description adds value by clarifying that the grant is single-use and the TTL is capped at 5 minutes, which goes beyond the schema's default and maximum description. This helps the agent understand the effective behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to grant single-use access to a phase-masked tool. The verb 'grant' and resource 'phase-masked tool access' are specific, and the description distinguishes this tool from siblings by focusing on access control rather than actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description specifies when to use the tool: for genuine cross-phase or emergency-debug needs when a tool is masked. It also advises caution due to telemetry logging. While it doesn't explicitly list alternatives, the context of siblings makes the usage clear. Slight gap in mentioning when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_reviewA

Compute a structured code-review verdict and persist a review.yaml artifact.

Use when:

  • Gating a PR or delivery and you need a pass/warn/block verdict with receipts.

  • You have pre-collected findings from a reviewer subagent (auto mode).

  • You want to detect spec-vs-code drift between a PRD and git diff (reconcile).

Modes:

  • manual: caller passes findings=[...] directly (backward compatible).

  • auto: multi-reviewer analysis with confidence filtering.

  • cross_model: route diff to an external model family.

  • reconcile: compare PRD FRs against git diff.

Input:

  • findings: list[{category, severity, description}] — triggers manual mode.

  • run_path: explicit run directory; auto-detected when None.

  • mode: explicit mode override; auto-detected when None.

  • reviewer_findings: pre-collected findings from subagent layer (auto).

  • prd_ids: explicit PRD IDs; reconcile mode auto-discovers when None.

Output: dict with fields {verdict: "pass"|"warn"|"block", findings_count: int, categories: dict, review_path: str, run_id: str, mode: str}.

Example: trw_review(findings=[{"category":"security","severity":"high","description":"..."}]) → {"verdict": "block", "findings_count": 1, "review_path": ".../review.yaml", "mode": "manual"}

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNo
prd_idsNo
findingsNo
run_pathNo
reviewer_findingsNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions persistence (writes review.yaml) and describes modes, but does not disclose side effects, authentication needs, or rate limits. It provides basic behavioral context but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (summary, use when, modes, input, output, example) and front-loads the main action. It is somewhat lengthy but every section adds value. Could be slightly more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description details output fields and covers parameter behavior and modes. It provides an example. For a tool with 5 parameters and multiple modes, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description explains all parameters (findings, run_path, mode, reviewer_findings, prd_ids) with types and usage context. It compensates well for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool computes a code-review verdict and persists a review.yaml artifact. It specifies modes and outputs, but does not explicitly differentiate from sibling tools like trw_prd_create or trw_prd_diff. However, the modes (manual, auto, cross_model, reconcile) provide implicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use when' section provides specific scenarios (gating PR, pre-collected findings, spec-vs-code drift) and lists four modes with contexts. It does not explicitly state when not to use, but the guidelines are clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_session_startA

Load prior learnings + any active run so you start with full context.

Use when:

  • Starting a new session (first action, before reading code or editing).

  • Resuming after context compaction and you need the pin and learnings reloaded.

  • Switching onto an unfamiliar task and want a focused recall on the topic.

Recalls high-impact learnings (patterns, gotchas, architecture decisions) and checks for an active run (phase, progress, last checkpoint). Partial-failure resilient: a failure in one sub-step does not block the others.

Input:

  • query: optional focus string. When set, performs a focused recall on your topic AND a baseline high-impact recall, then merges + dedupes. Empty string or "*" uses default wildcard behavior.

  • verbose: when False (default) returns a COMPACT payload — the learnings list is capped to the top-K most relevant (with a learnings_omitted "N more" indicator) and the low-signal diagnostic sub-blocks (embed_health/assertion_health/sync_health/step_durations_ms) are folded into a one-line health_summary to cut token cost. Run/pin recovery, errors, framework_reminder, and degraded advisories are always preserved. Set verbose=True for the full diagnostic payload (legacy behavior).

Output: SessionStartResultDict with fields {learnings: list, learnings_count: int, learnings_omitted?: int, run: RunStatusDict, auto_recalled?: list, health_summary?: str (compact), embed_health?: dict (verbose), assertion_health?: dict (verbose), framework_reminder: str, errors: list, success: bool, compact: bool, payload_token_estimate: int}.

Example: trw_session_start(query="sqlite extension macos") → {"learnings": [...], "learnings_count": 8, "compact": true, "health_summary": "embed=ok; start=42ms (verbose=True for ...)", "run": {"active_run": "/path/...", "phase": "IMPLEMENT"}, ...}

See Also: trw_init, trw_recall

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
verboseNo

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, but the description fully discloses behavioral traits: compact vs verbose payload, partial-failure resilience, and output structure, compensating for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections, bullet points, and an example. Every sentence contributes value, making it informative yet concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (two optional params, no nested objects, no output schema), the description thoroughly covers inputs, outputs, edge cases, and behavior, leaving no ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters (query and verbose) are explained in detail, covering default behavior, wildcard, and compact/verbose differences, adding substantial meaning beyond the schema which has 0% coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool loads prior learnings and active runs for full context, and distinguishes itself from siblings like trw_init and trw_recall via a 'See Also' section.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit use cases are listed: starting a new session, resuming after compaction, switching tasks, with guidance on when to use and partial-failure resilience, plus references to alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_skill_discoveryA

Rank eligible SKILL.md files without executing them.

Use when an agent needs safe skill recommendations from explicit SKILL.md paths before invoking any workflow.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoManifest validation mode, either "compat" or "strict".compat
queryYesNatural-language search terms.
active_capNoOptional PRD-QUAL-111-FR03 bound. ``None`` (default) is a no-op (all eligible candidates returned). A positive integer truncates to the top-N after the existing sort.
skill_pathsYesExplicit SKILL.md paths to inspect.
include_privateNoInclude non-user-invocable skills when true.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must fully disclose behavior. It states 'without executing them' (safe, read-only) and 'Rank eligible' (a ranking operation), but doesn't explain 'eligible' criteria, side effects, or returned data shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences—no redundancy, front-loaded with action, and straight to the point. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

5 parameters and no output schema. The description covers core purpose but omits details about return format (e.g., just rankings? scores?) and leaves 'eligible' undefined. Adequate but with notable gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with adequate parameter descriptions (e.g., mode enum, query, active_cap). The tool description adds 'Rank eligible SKILL.md files' but doesn't enrich parameter meaning beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Rank eligible SKILL.md files without executing them.' The verb 'Rank' and resource 'eligible SKILL.md files' are specific. This distinguishes it from sibling tools like trw_adopt_run, which likely executes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises 'Use when an agent needs safe skill recommendations from explicit SKILL.md paths before invoking any workflow.' This provides a clear context and purpose, though it could explicitly state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_statusA

Report the active run's phase, wave progress, shard state, and last activity.

Use when:

  • Resuming after context compaction or a session restart.

  • Deciding whether to checkpoint, advance phase, or re-delegate a wave.

Input:

  • run_path: path to the run directory. Auto-detects from pin if None.

Output: TrwStatusDict with fields {run_id, task, phase, status, confidence, framework, event_count, reflection, waves?, wave_progress?, wave_status?, reversions, last_activity_ts?, hours_since_activity?, stale_count}.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_pathNo

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so description carries full burden. It indicates read-only behavior by saying 'report' and describes auto-detection of run_path. However, it does not explicitly state that the tool is non-destructive or address permissions/rate limits, which would elevate transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured with clear sections: main purpose, use cases, input, and output. It is front-loaded with the core action and contains no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given only one parameter and no output schema, the description lists expected output fields and provides usage context. It could mention error conditions (e.g., run not found) but is otherwise adequate for a status reporting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter run_path is explained: 'path to the run directory. Auto-detects from pin if None.' This adds meaning beyond the schema type and default, clarifying behavior when omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool reports the active run's phase, wave progress, shard state, and last activity. It uses a specific verb ('report') and resource ('active run's state'), and distinguishes itself from sibling tools like trw_checkpoint or trw_adopt_run.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides two use cases: resuming after context compaction/session restart, and deciding whether to checkpoint/advance/re-delegate. It does not mention when not to use or alternatives, but the provided guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_submit_feedbackA

Submit a memo to the TRW maintainer (PRD-CORE-182).

Use when:

  • You found a bug, installation problem, or rough edge worth flagging.

  • You want to send a feature request or piece of feedback that deserves a real reply instead of disappearing into a personal log.

  • You want the maintainer to see exactly which trw-mcp / Python / OS you are on without retyping it — environment metadata is attached automatically.

Input:

  • category: one of bugfix, installation, feedback, feature_request, question, other.

  • subject: short headline (1-200 chars, no newlines).

  • message: full memo body (10-10000 chars).

  • contact_email: optional reply-to address; defaults to no reply-to.

  • metadata: optional extra key/value pairs (16 keys max, 200 char values max). Merged on top of the auto-attached environment dict.

Output: dict with success, submission_id (when 200), error (when non-200), status_code (HTTP status or 0 on validation/transport error), and metadata_attached (the dict actually sent so you can audit it locally).

Never raises — transport and validation failures are reported in the error field.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYes
subjectYes
categoryYes
metadataNo
contact_emailNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses key behaviors: automatic metadata attachment, error handling that never raises, and output format. This adds substantial value beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections, front-loads purpose, and each sentence adds value. Slightly verbose but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers input, output fields, error handling, and automatic metadata. With an output schema present, it is complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description explains each parameter in detail: category options, subject constraints, message length, optional contact_email, and metadata limits. Fully compensates for missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool submits a memo to the TRW maintainer and lists specific use cases (bug, installation problem, feature request, etc.). It distinguishes itself from the sibling tools, none of which are for feedback submission.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a 'Use when:' section with explicit scenarios, providing clear context. It does not list exclusions or alternatives, but the positive guidance is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_surface_classifyA

Classify a meta-tune surface as control vs advisory.

Use when you need to know whether a candidate path is governed by the SAFE-001 control surface registry before promoting a meta-tune proposal.

Returns: dict with classification ("control"|"advisory"), surfaces (list of surface names), and rationale.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the return format (dict with classification, surfaces, rationale) but does not explicitly state that the operation is read-only or safe, nor mention any side effects or authorization needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise: two sentences for purpose and usage, plus a clear return format. No wasted words, and the key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple classification tool with one parameter, the description covers the return format but lacks clarity on the input path and any prerequisites. It is adequate but not fully complete given the missing parameter details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'path' lacks description in the schema (0% coverage). The description only mentions 'candidate path' in the context of usage but does not define what the path represents (file path, URL, etc.), leaving ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Classify a meta-tune surface as control vs advisory,' providing a specific verb and resource. While it doesn't explicitly differentiate from siblings like trw_surface_diff, the purpose is unambiguous and distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a concrete use case: 'Use when you need to know whether a candidate path is governed by the SAFE-001 control surface registry before promoting a meta-tune proposal.' However, it lacks when-not-to-use or alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_surface_diffB

Structured diff between two surface snapshots.

Returns {added, removed, changed} lists of surface_id strings. changed entries appear in both snapshots with different content_hash values.

ParametersJSON Schema
NameRequiredDescriptionDefault
snapshot_id_aYes
snapshot_id_bYes

TDQS

B3.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite lacking annotations, the description discloses the diff logic by explaining that 'changed' entries appear in both snapshots with different content_hash values, and it lists the output fields. This provides clear behavioral transparency about the comparison criterion and result structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise at two sentences: the first states the overall purpose and the second details the output format. Every word earns its place with no redundancy, and the key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters and no output schema, the description adequately explains core functionality and output structure. However, it omits context such as error behavior when snapshots are missing or prerequisites for the input IDs, which would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema includes two required string parameters (snapshot_id_a, snapshot_id_b) with no descriptions, and the tool description adds no clarification about them. Schema coverage is 0%, so the description should compensate but does not, leaving parameter semantics largely implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs a 'structured diff between two surface snapshots' and specifies the return format with 'added, removed, changed' lists of surface_id strings. The purpose is specific and actionable, though it does not explicitly differentiate from sibling tools like trw_surface_classify.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor are there any prerequisites or exclusions mentioned. The description is purely functional without contextual usage advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

trw_validate_agent_work_evidenceA

Validate an AgentWorkEvidence candidate and return structured errors.

Use when an external producer or fixture needs schema validation before evidence is accepted by a judge or graph-ingestion pipeline.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYesCandidate AgentWorkEvidence JSON object.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states that the tool 'return structured errors' but does not detail what 'structured errors' means, whether it is read-only, or if any side effects occur. The description is adequate but lacks depth on behavioral specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences, front-loaded with the core action, and contains no unnecessary words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and no output schema. The description explains the purpose and usage context well. However, it does not describe the return format or error structure, which would be helpful for a validation tool. Still, it is mostly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter 'data', and its schema description is 'Candidate AgentWorkEvidence JSON object.' The tool description adds the same wording, so it provides minimal extra meaning beyond the schema. With high coverage, baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool validates an AgentWorkEvidence candidate and returns structured errors. It uses a specific verb ('validate') and resource ('AgentWorkEvidence candidate'), and it distinguishes itself from siblings like 'trw_agent_work_evidence' by focusing on validation rather than creation or retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context for when to use: 'Use when an external producer or fixture needs schema validation before evidence is accepted...' This gives clear guidance, though it does not mention when not to use or list alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation4/5

Most tools have distinct, well-described purposes, but a few overlaps exist (e.g., trw_claude_md_sync as a deprecated alias for trw_instructions_sync, and trw_before_edit_hint vs trw_before_edit_hint_batch). One tool lacks a description entirely (trw_mcp_security_status), causing ambiguity. Overall, descriptions are detailed enough to distinguish the majority.

Naming Consistency4/5

All tool names consistently use the 'trw_' prefix and snake_case, which is predictable. However, the pattern varies between verb_noun (e.g., trw_adopt_run), noun (e.g., trw_status), and noun_noun (e.g., trw_code_symbol), with no strict adherence to a single convention. The consistency is good but not perfect.

Tool Count2/5

41 tools is excessive for most MCP servers, far exceeding the typical 3-15 well-scoped range. While the server attempts to cover a broad framework, many tools are highly specific or deprecated, suggesting the surface could be streamlined. Agents may struggle to navigate this many options efficiently.

Completeness4/5

The tool set covers a wide range of TRW framework needs: run lifecycle, learnings, code indexing/search, PRD management, validation, reviews, and probes. Minor gaps exist (e.g., no explicit run deletion or listing), but the core workflows are well-supported. The surface is comprehensive for its intended domain.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that provides persistent project context, workflow management, and knowledge capture for AI coding agents. It enables agents to maintain structured memory across sessions by tracking project profiles, conventions, skills, and technical debt.
    7
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides persistent memory and contextual awareness to language models, enabling project onboarding, recall of architectural rules, and code consistency across sessions.
    32
    MIT
  • F
    license
    B
    quality
    C
    maintenance
    MCP server that gives AI coding assistants persistent memory, structural code graph analysis, and safe multi-agent coordination, enabling them to answer architectural questions, track decisions across sessions, and coordinate safely in multi-agent workflows.
    39
    4
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that captures and recalls coding session memory (failures, decisions, diffs) for AI agents, enabling cross-agent continuity and preventing repeated mistakes.
    106
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wallter/trw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server