feat(terminology): prose sweep tool and custodian workplan cleanup (CUST-WP-0055 T04)
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 6s

Add sweep_workstream_prose.py for agent-guidance files, sweep active workplan
prose in-repo, tighten scan allowlist exclusions, and update ADR-001 closure
protocol to workplan-first terminology.
This commit is contained in:
codex 2026-07-08 16:35:37 +02:00
parent 3bdefb3c4a
commit 2e0deee2ef
42 changed files with 312 additions and 186 deletions

View file

@ -22,7 +22,7 @@ remaining sustained load on the API worker comes from the dashboard polling patt
- **`index.md` alone** runs 4 independent polling loops firing 11 API calls per cycle:
`/state/summary`, `/sbom/snapshots/`, `/progress/`, `/workstreams/`, `/tasks/?limit=2000`,
`/topics/`, `/repos/`, `/workstreams/workplan-index`
- **`workstreams.md` and `dependencies.md`** each call `/state/summary` (the most
- **`workplans.md` and `dependencies.md`** each call `/state/summary` (the most
expensive endpoint — queries 10+ tables) every 60 s just to extract dependency
edges from `open_workstreams[].depends_on`
- **Reference data** (`/topics/`, `/repos/`) is fetched independently by 10+ pages
@ -100,7 +100,7 @@ priority: high
state_hub_task_id: "cb7608d3-5dad-4b51-9b91-080539f7aa65"
```
`workstreams.md` and `dependencies.md` call `/state/summary` (a ~10-table query)
`workplans.md` and `dependencies.md` call `/state/summary` (a ~10-table query)
only to extract `open_workstreams[].{id, depends_on, blocks}`. Add a dedicated
endpoint that returns just this:
@ -109,7 +109,7 @@ GET /state/deps
→ [{"id": "...", "title": "...", "status": "...", "depends_on": [...], "blocks": [...]}]
```
Query: `SELECT id, title, status FROM workstreams WHERE status IN ('active','blocked')`
Query: `SELECT id, title, status FROM workplans WHERE status IN ('active','blocked')`
plus the dependency join — roughly 1/10th the work of the full summary.
**Implementation:** New route in `api/routers/state.py` (or a new `deps.py`).
@ -118,7 +118,7 @@ Schema: `WorkstreamDepStub` already exists in `api/schemas/workstream_dependency
---
### T4 — Replace `/state/summary` in workstreams.md and dependencies.md
### T4 — Replace `/state/summary` in workplans.md and dependencies.md
```task
id: CUST-WP-0039-T4
@ -128,7 +128,7 @@ depends_on: [CUST-WP-0039-T3]
state_hub_task_id: "b80dce9c-b1ef-4606-9460-5100d6f58bce"
```
Switch `workstreams.md` and `dependencies.md` to use the new `/state/deps` endpoint
Switch `workplans.md` and `dependencies.md` to use the new `/state/deps` endpoint
instead of the full `/state/summary`. Both pages construct a dep-edge map from
`open_workstreams[].depends_on`; `/state/deps` provides exactly that.