trw_profile_explain
Explain which layer contributed each field value in a resolved profile, showing the full override chain across 6 layers including defaults, org, domain, task-type, session, and client.
Instructions
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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | ||
| prd_path | No | ||
| task_name | No | ||
| task_type | No |