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

@ -116,9 +116,9 @@ use `domain_id` FK for filtering. Remove reliance on string comparison.
---
## Pass 2 — Align Workstream with ADR-001
## Pass 2 — Align Workplan with ADR-001
**Scope:** Resolve I-2. Breaking change to workstream schema. `topic_id`
**Scope:** Resolve I-2. Breaking change to workplan schema. `topic_id`
becomes a nullable secondary annotation; `repo_id` becomes the primary FK.
Workplan frontmatter format gains `repo_slug` field.
@ -135,13 +135,13 @@ state_hub_task_id: "b34b6bb0-3968-464f-b340-389c4758821e"
```
Operations:
1. Add `repo_id` UUID FK (nullable) to `workstreams`
2. Backfill `repo_id` using heuristic: workstream → topic → domain → first
repo for that domain (adequate for current data; all custodian workstreams
1. Add `repo_id` UUID FK (nullable) to `workplans`
2. Backfill `repo_id` using heuristic: workplan → topic → domain → first
repo for that domain (adequate for current data; all custodian workplans
map to the-custodian repo)
3. For topics without a repo: leave nullable (MCP tooling handles this)
### Task T08: Update Workstream model
### Task T08: Update Workplan model
```task
id: T08
@ -154,7 +154,7 @@ state_hub_task_id: "6f1fcf2c-824b-4e3e-884f-5e48b5dea51d"
Add `repo_id: Mapped[uuid.UUID | None]` nullable FK to `managed_repos`.
Keep `topic_id` as nullable secondary. Add `repo` relationship.
### Task T09: Update workstream router and MCP tools
### Task T09: Update workplan router and MCP tools
```task
id: T09
@ -165,7 +165,7 @@ state_hub_task_id: "58a23afa-601a-40a5-b658-2603dc006d13"
```
- `create_workstream` MCP tool: add optional `repo_id` / `repo_slug` param
- Workstream read schema: expose `repo_id` and `repo_slug`
- Workplan read schema: expose `repo_id` and `repo_slug`
- Dependency resolution in `state/summary` uses `repo.domain` when available
### Task T10: Update workplan frontmatter format