# Workstream caller sweep — 2026-07-09

**Parent:** `STATE-WP-0070` T01 follow-up after `STATE-WP-0071` railiance01 deploy.  
**Evidence:** `docs/evidence/workstream-caller-inventory-20260709.md`  
**Meter context:** 8-hour capture (`legacy-meter-weekly-review-20260709.json`) — `GET /workstreams/` ~1,752 calls/window; attribution mostly `unknown`.

## Method

1. Targeted `rg` across `state-hub`, `activity-core`, `the-custodian`, fleet repos (Python/JS/YAML).
2. Fleet terminology scan: `the-custodian/tools/scan_workstream_terminology.py --json` (82 repos).
3. Cross-check against `docs/evidence/workstream-caller-inventory-20260708.md`.

## Fleet scan summary (82 repos)

| Repo | Occurrences | Notable runtime patterns |
| --- | ---: | --- |
| state-hub | 13,562 | `path:workstreams/` 171; `api:workstream_id` 603; python 800 |
| activity-core | 176 | `context_resolvers/state_hub.py`, k8s prompt YAML |
| the-custodian | 1,220 | `runtime/prompts/daily_statehub_wsgi_triage.md` |
| wise-validator | (small) | `reporter.py` progress POST |
| agentic-resources | 11 py | `curate/decisions.py` dual-write |

Most fleet hits are workplans, agent-guidance, or session_memory blobs — not live REST callers.

## Actionable HTTP callers (fix in STATE-WP-0072)

| Caller | Repo | Legacy | Fix |
| --- | --- | --- | --- |
| `dashboard/src/workstreams/[id].md` | state-hub | `GET /tasks/?workstream_id=` | `?workplan_id=` |
| `custodian_cli.py` | state-hub | `POST /tasks/`, `/progress/` body `workstream_id` | `workplan_id` |
| `docs/onboarding.md` | state-hub | curl `GET /workstreams/?status=active` | `/workplans/` |
| `runtime/prompts/daily_statehub_wsgi_triage.md` | the-custodian | `/workstreams/workplan-index` (410), `?workstream_id=` | `/workplans/index`, `?workplan_id=` |
| `k8s/railiance/21-custodian-runtime.yaml` | activity-core | Same prompt projection | Sync with custodian prompt |
| `wise-validator/reporter.py` | wise-validator | progress body `workstream_id` | `workplan_id` |
| `session_memory/curate/decisions.py` | agentic-resources | dual-write both scope keys | `workplan_id` only |

## Confirmed migrated (no regression)

- `consistency_check.py`, `cleanup_stale_tasks.py`, `validate_repo_adr.py` → `/workplans/`
- Dashboard list pages + data loaders → `/workplans/`
- MCP server REST → `/workplans/` (legacy tool names remain)
- activity-core resolver fetches → `/workplans/*`
- can-you-assist `shell_session.py` → `/workplans/?`

## Intentional legacy (STATE-WP-0070 — meter-gated)

- `api/routers/workstreams.py`, `workstream_dependencies.py`, execution intent alias
- Query/body aliases on tasks/progress/decisions (until T04)
- MCP aliases, `state://workstreams/` resource
- DB/response fields, `state_hub_workstream_id` frontmatter

## Verification

```bash
python scripts/capture_legacy_meter_evidence.py   # 8h default
rg '/workstreams|workstream_id' --glob '!**/workplans/**' --glob '!**/tests/**' <repo>
```