Commercial metrics narrative
Thin wrapper. The work happens in the commercial-metrics-narrator subagent, which owns the rules, the reference files and the deterministic computation step.
This exists so the invocation people already use keeps working after the move to a subagent. Nobody calling it needs to know it changed.
What to do
Hand off to the subagent, passing through whatever the caller gave you.
Agent(
subagent_type: "commercial-metrics-narrator",
run_in_background: false,
prompt: "Write the commercial metrics narrative for run date <YYYYMMDD>.
<anything else the caller said, verbatim>"
)
Run it in the foreground. The subagent will pause partway through to ask the user for business context to overlay on the numbers, and that question has to reach the user rather than a background task queue.
What you handle before handing off
A missing run date. If the caller did not give one, look for the most recent output/<YYYYMMDD>/commercial_metrics_onepager_data and confirm it with them in one line before handing off. Do not hand off with an unresolved date.
A different phrasing of the same job. "Redo August", "the country narrative", "narrative_country.json" all mean this. Hand off.
What you do not handle
Do not compute anything. Do not read the CSVs. Do not draft bullets and pass them down. The whole point of the subagent is that the computation is deterministic and the writing happens with the reference files loaded.
After it returns
Relay the subagent's report to the user in full, in particular any unresolved flag and any check that failed or warned. Those are the reason this process exists in the shape it does, and they are useless if they stop at the subagent boundary.