Imported from jayhjenkins/ProductOSv0.2 (
.claude/skills/metric-scorecard-fetch/SKILL.md). Install upstream withnpx skills add jayhjenkins/ProductOSv0.2 --skill metric-scorecard-fetch. Copyright stays with the author.
Scorecard Fetch & Render (Dispatcher)
This skill is the long-lived scorecard orchestrator. It holds only metric slugs + results — never
all metric specs at once. Each metric's calculation lives in its own self-contained file under
.claude/skills/metric-scorecard-fetch/metrics/<slug>.md. These definitions are independent of the
temporal quarterly Rocks/OKR skill — do not couple them.
Flow
-
Resolve
as_of_date= last completed Saturday on/before today:python3 -c "import datetime as d;t=d.date.today();print(t-d.timedelta(days=(t.weekday()-5)%7))" -
Read
datasets/scorecard/registry.jsonto get the metric list. -
Fetch
home-waufirst (the/1k-WAUmetrics and stickiness need its value). Dispatch a subagent (general-purpose) handed ONLY the contents ofmetrics/home-wau.md+ theas_of_date. -
Dispatch the remaining
autometrics in parallel — one subagent each, in a single message with multiple Agent calls. Hand each subagent ONLY:- the contents of its own
metrics/<slug>.md - the resolved
as_of_date - if its file lists
depends_on: home-wau, also the already-computed home-wau integer value Instruct each to execute its spec exactly and return ONLY its JSON contract line (nothing else).
- the contents of its own
-
Handle non-auto metrics:
manual(hoai-weekly-interactions): reuse the prior week's value from values.json if present (statusmanual_carried); else value null, statusmanual.deferred(new-resident-activation-rate): value null, statusdeferred.
-
Collect all results into a dict keyed by slug, write it with the Write tool to
/tmp/scorecard_results_<as_of>.json, then record + render:python3 scripts/build_scorecard_dashboard.py --week <as_of> --record /tmp/scorecard_results_<as_of>.json -
Report the dashboard path and a one-line summary per metric (value + status). Flag any
error/stalemetric and any value outside its file's stated Sanity range.
Conventions
- Pendo subId=4818486697721856. Databricks is_prod, READ-ONLY (never modify data).
- Saturday-anchored as_of; Sun–Sat weeks; windows inclusive of as_of.
- Never overwrite past weeks — the renderer appends to the time series.
- If a subagent errors, record status=error (carry last-known value if any) and continue; never let one metric block the others.
- Do NOT write to SharePoint — the human copies values from the rendered HTML.