Normalize agent instructions and workplan frontmatter (STATE-WP-0067)

- Align agent files with on-disk workplan prefixes (infer from workplan ids)
- Set workplan domain to registered domain_slug; add topic_slug where applicable
- Repair frontmatter delimiter formatting; migrate legacy task status literals
- Regenerate AGENTS.md, CLAUDE.md, and .claude/rules from State Hub templates
This commit is contained in:
tegwick 2026-06-22 23:16:29 +02:00
parent b31409649c
commit a3cec3f221
23 changed files with 90 additions and 68 deletions

View file

@ -2,12 +2,12 @@
## Repo Identity
**Purpose:** Django 6 + Tailwind + HTMX bid management app
**Purpose:** Coulomb project repository (bootstrapped from repo-seed template)
**Domain:** vergabe_teilnahme
**Repo slug:** vergabe_teilnahme
**Topic ID:** `7d4d3e35-312f-4723-bde9-ddb43799109e`
**Workplan prefix:** `VERGABE_TEILNAHME-WP-`
**Domain:** communication
**Repo slug:** vergabe-teilnahme
**Topic ID:** `36c7421b-c537-4723-bf75-42a3ebc6a1dc`
**Workplan prefix:** `WP-`
---
@ -28,11 +28,11 @@ there is no MCP server for Codex agents.
cat .custodian-brief.md
# Active workstreams for this domain
curl -s "http://127.0.0.1:8000/workstreams/?topic_id=7d4d3e35-312f-4723-bde9-ddb43799109e&status=active" \
curl -s "http://127.0.0.1:8000/workstreams/?topic_id=36c7421b-c537-4723-bf75-42a3ebc6a1dc&status=active" \
| python3 -m json.tool
# Check inbox
curl -s "http://127.0.0.1:8000/messages/?to_agent=vergabe_teilnahme&unread_only=true" \
curl -s "http://127.0.0.1:8000/messages/?to_agent=vergabe-teilnahme&unread_only=true" \
| python3 -m json.tool
```
@ -63,8 +63,8 @@ Omit `workstream_id` / `task_id` when not applicable.
```bash
curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
-H "Content-Type: application/json" \
-d '{"status": "in_progress"}'
# values: todo | in_progress | done | blocked
-d '{"status": "progress"}'
# values: wait | todo | progress | done | cancel
```
### Flag a task for human review
@ -81,9 +81,9 @@ curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
**Start:**
1. `cat .custodian-brief.md` — domain goal and open workstreams (offline-safe)
2. Check inbox: `GET /messages/?to_agent=vergabe_teilnahme&unread_only=true`; mark read
2. Check inbox: `GET /messages/?to_agent=vergabe-teilnahme&unread_only=true`; mark read
3. Scan workplans: `ls workplans/` — note `status: ready`, `active`, or `blocked` files and open tasks
4. Check blocked tasks: `GET /tasks/?needs_human=true`
4. Check human-needed tasks: `GET /tasks/?needs_human=true`
**During work:**
- Update task statuses in workplan files as tasks progress
@ -95,7 +95,7 @@ curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
3. Note for the custodian operator: after workplan file changes, run from
`~/state-hub`:
```bash
make fix-consistency REPO=vergabe_teilnahme
make fix-consistency REPO=vergabe-teilnahme
```
This syncs task status from files into the hub DB.
@ -151,6 +151,11 @@ every repo's agent instructions because it is high-frequency, high-risk, and eas
get wrong.
**Canon:** `~/ops-warden/wiki/CredentialRouting.md` · catalog `~/ops-warden/registry/routing/catalog.yaml`
<!-- REPO-AGENTS-EXTENSIONS -->
<!-- Append repo-specific agent instructions below this marker.
The state-hub template sync preserves content after this line. -->
---
## Workplan Convention (ADR-001)
@ -158,10 +163,10 @@ get wrong.
Work items originate as files in this repo — not in the hub. The hub is a
read/cache/index layer that rebuilds from files.
**File location:** `workplans/VERGABE_TEILNAHME-WP-NNNN-<slug>.md`
**File location:** `workplans/VERGABE-WP-NNNN-<slug>.md`
**Archived location:** finished workplans may move to
`workplans/archived/YYMMDD-VERGABE_TEILNAHME-WP-NNNN-<slug>.md`. The `YYMMDD` prefix is
`workplans/archived/YYMMDD-VERGABE-WP-NNNN-<slug>.md`. The `YYMMDD` prefix is
the completion/archive date; the frontmatter `id` does not change.
**Ad Hoc Tasks:** small opportunistic fixes discovered during a session use
@ -173,11 +178,11 @@ anything needing analysis, design, approval, dependencies, or multiple phases.
```yaml
---
id: VERGABE_TEILNAHME-WP-NNNN
id: VERGABE-WP-NNNN
type: workplan
title: "..."
domain: vergabe_teilnahme
repo: vergabe_teilnahme
domain: communication
repo: vergabe-teilnahme
status: proposed | ready | active | blocked | backlog | finished | archived
owner: codex
topic_slug: ...
@ -197,8 +202,8 @@ derived health labels, not frontmatter statuses.
## Task Title
` ` `task
id: VERGABE_TEILNAHME-WP-NNNN-T01
status: todo | in_progress | done | blocked
id: VERGABE-WP-NNNN-T01
status: wait | todo | progress | done | cancel
priority: high | medium | low
state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit
` ` `
@ -206,9 +211,9 @@ state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit
Task description text.
```
Status progression: `todo``in_progress` → `done` (or `blocked`)
Status progression: `todo``progress` → `done`; use `wait` for waiting/blocked work and `cancel` for stopped work.
To create a new workplan:
1. Write the file following the format above
2. Notify the custodian operator to run `make fix-consistency REPO=vergabe_teilnahme`
2. Notify the custodian operator to run `make fix-consistency REPO=vergabe-teilnahme`
(or send a message to the hub agent via `POST /messages/`)