trw_before_edit_hint
Provides codebase intelligence before editing a file, returning risk context and prior learnings to inform safe edits.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cache_dir | No | ||
| file_path | Yes | ||
| repo_root | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||