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

@ -174,17 +174,17 @@ and others as "file-authoritative."
Rejected: introduces ambiguity about which records matter; violates the
"single source of truth" principle.
## Workstream Closure Protocol
## Workplan Closure Protocol
When a workstream is about to be marked `completed`, the responsible agent
When a workplan is about to be marked `finished`, the responsible agent
MUST perform a closure review before writing the status change. This prevents
the stale-task accumulation that this ADR was designed to make detectable.
### Steps
1. **Query all non-done tasks** in the workstream via
`GET /tasks/?workstream_id=<uuid>` (filter for `todo`, `in_progress`,
`blocked`).
1. **Query all non-done tasks** in the workplan via
`GET /tasks/?workplan_id=<uuid>` (legacy alias: `workstream_id`; filter for
`todo`, `in_progress`, `blocked`).
2. **Classify each task** into one of three outcomes:
@ -215,13 +215,13 @@ the stale-task accumulation that this ADR was designed to make detectable.
| TASK-ID — title | CUST-WP-XXXX |
```
4. **If any tasks are carried forward**: do not mark the workstream
`completed` yet. Create the new workplan file (or amend an existing active
one), then close the current workstream.
4. **If any tasks are carried forward**: do not mark the workplan
`finished` yet. Create the new workplan file (or amend an existing active
one), then close the current workplan.
5. **Update the workplan frontmatter** `status: completed` and `updated:` date.
5. **Update the workplan frontmatter** `status: finished` and `updated:` date.
6. **Mark the workstream `completed`** in the state hub via MCP or API.
6. **Mark the workplan `finished`** in the state hub via MCP or API (`update_workplan_status`).
### Daily Stale-Task Cleanup

View file

@ -129,7 +129,7 @@ Bootstrap operations inherit `custodian_constitution_v0.1.md`:
- Agent actions must be auditable and reversible within 5 minutes where they
affect production infrastructure.
- Runway below 3 months triggers mandatory Financial Allocator review and
dev-hub workstream deprioritization signal (fin→dev coupling, T25).
dev-hub workplan deprioritization signal (fin→dev coupling, T25).
## 6. Success Criteria for Bootstrap Exit

View file

@ -408,7 +408,7 @@ The Canon Hub MUST remain sparse, stable, and deliberately slower-moving than op
### Purpose
The Dev Hub coordinates software design and implementation work across repositories, workstreams, and coding agents.
The Dev Hub coordinates software design and implementation work across repositories, workplans, and coding agents.
It answers:
@ -429,7 +429,7 @@ It answers:
### Typical Derived Views
* workstream summaries
* workplan summaries
* blocker maps
* dependency graphs
* capability catalogs
@ -778,7 +778,7 @@ Beyond the shared contract, each hub SHOULD expose domain-specific functions.
Examples:
* Dev Hub: workstreams, capabilities, decisions
* Dev Hub: workplans, capabilities, decisions
* Ops Hub: services, incidents, runbooks, access paths
* Sec Hub: controls, exposures, exceptions
* Fin Hub: budgets, commitments, runway