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:
2026-06-22 23:16:28 +02:00
parent 2afeb86ed2
commit 635521406f
29 changed files with 66 additions and 48 deletions

View File

@@ -1,11 +1,11 @@
## First Session Protocol ## First Session Protocol
Triggered when `get_domain_summary("railiance")` shows **no workstreams**. Triggered when `get_domain_summary("financials")` shows **no workstreams**.
The project is registered but work has not yet been structured. The project is registered but work has not yet been structured.
**Step 1 — Read, don't write** **Step 1 — Read, don't write**
- `~/the-custodian/canon/projects/railiance/project_charter_v0.1.md` — purpose, scope - `~/the-custodian/canon/projects/financials/project_charter_v0.1.md` — purpose, scope
- `~/the-custodian/canon/projects/railiance/roadmap_v0.1.md` — planned phases - `~/the-custodian/canon/projects/financials/roadmap_v0.1.md` — planned phases
- Scan repo root: README, directory structure, existing code or docs - Scan repo root: README, directory structure, existing code or docs
**Step 2 — Survey in-progress work** **Step 2 — Survey in-progress work**
@@ -17,7 +17,7 @@ roadmap phase. **Wait for approval before creating.**
**Step 4 — Create workplan file first, then DB record (ADR-001)** **Step 4 — Create workplan file first, then DB record (ADR-001)**
``` ```
workplans/railiance-fabric-WP-NNNN-<slug>.md ← write this first workplans/RAIL-FAB-WP-NNNN-<slug>.md ← write this first
``` ```
Then register in the hub: Then register in the hub:
``` ```
@@ -28,7 +28,7 @@ create_task(workstream_id="<id>", title="...", priority="high|medium|low")
**Step 5 — Record the setup** **Step 5 — Record the setup**
``` ```
add_progress_event( add_progress_event(
summary="First session: structured railiance into N workstreams, M tasks", summary="First session: structured financials into N workstreams, M tasks",
event_type="milestone", event_type="milestone",
topic_id="ca369340-a64e-442e-98f1-a4fa7dc74a38", topic_id="ca369340-a64e-442e-98f1-a4fa7dc74a38",
detail={"workstreams": [...], "tasks_created": M} detail={"workstreams": [...], "tasks_created": M}

View File

@@ -1,5 +1,5 @@
**Purpose:** railiance-fabric - (fill in purpose) **Purpose:** railiance-fabric - (fill in purpose)
**Domain:** railiance **Domain:** financials
**Repo slug:** railiance-fabric **Repo slug:** railiance-fabric
**Topic ID:** ca369340-a64e-442e-98f1-a4fa7dc74a38 **Topic ID:** ca369340-a64e-442e-98f1-a4fa7dc74a38

View File

@@ -1,6 +1,7 @@
## Session Protocol ## Session Protocol
State Hub: http://127.0.0.1:8000 Dev Hub (State Hub API): http://127.0.0.1:8000
MCP server name in `~/.claude.json`: `dev-hub`
**Step 1 — Orient** **Step 1 — Orient**
@@ -10,7 +11,7 @@ cat .custodian-brief.md
``` ```
Then call the MCP tool for richer cross-domain context when MCP tools are exposed: Then call the MCP tool for richer cross-domain context when MCP tools are exposed:
``` ```
get_domain_summary("railiance") get_domain_summary("financials")
``` ```
If MCP tools are unavailable in the current agent session, use the REST API: If MCP tools are unavailable in the current agent session, use the REST API:
```bash ```bash
@@ -39,11 +40,11 @@ curl -s -X PATCH "http://127.0.0.1:8000/messages/<id>/read" \
ls workplans/ ls workplans/
``` ```
For each file with `status: ready`, `active`, or `blocked`, note pending For each file with `status: ready`, `active`, or `blocked`, note pending
`todo`/`in_progress` tasks. `wait`/`todo`/`progress` tasks.
**Step 4 — Present brief** **Step 4 — Present brief**
1. **Active workstreams** for `railiance` — title, task counts, blocking decisions 1. **Active workstreams** for `financials` — title, task counts, blocking decisions
2. **Pending tasks** from `workplans/` + any `[repo:railiance-fabric]` hub tasks 2. **Pending tasks** from `workplans/` + any `[repo:railiance-fabric]` hub tasks
3. **Goal guidance** — if `goal_guidance` in summary: 3. **Goal guidance** — if `goal_guidance` in summary:
- `needs_workplan`: surface as top action — *"Repo goal '{title}' has no workplan yet"* - `needs_workplan`: surface as top action — *"Repo goal '{title}' has no workplan yet"*

View File

@@ -1,7 +1,7 @@
## Workplan Convention (ADR-001) ## Workplan Convention (ADR-001)
File location: `workplans/railiance-fabric-WP-NNNN-<slug>.md` File location: `workplans/RAIL-FAB-WP-NNNN-<slug>.md`
ID prefix: `RAILIANCE-WP` ID prefix: `RAIL-FAB-WP-`
Work items originate as files in this repo **before** being registered in the hub. Work items originate as files in this repo **before** being registered in the hub.
@@ -12,7 +12,7 @@ repo state, and `finished` when implementation is complete. `stalled` and
`needs_review` are derived health labels, not stored statuses. `needs_review` are derived health labels, not stored statuses.
Closed workplans may be moved to `workplans/archived/` with a completion-date Closed workplans may be moved to `workplans/archived/` with a completion-date
prefix: `YYMMDD-railiance-fabric-WP-NNNN-<slug>.md`. The frontmatter id remains prefix: `YYMMDD-RAIL-FAB-WP-NNNN-<slug>.md`. The frontmatter id remains
unchanged; the prefix is only for quick visual reference. unchanged; the prefix is only for quick visual reference.
Small opportunistic tasks discovered during another session use **Ad Hoc Tasks**: Small opportunistic tasks discovered during another session use **Ad Hoc Tasks**:
@@ -25,4 +25,16 @@ Ecosystem todos from other agents arrive as `[repo:railiance-fabric]` hub tasks
visible at session start. Pick one up by creating the workplan file, then registering visible at session start. Pick one up by creating the workplan file, then registering
the workstream. the workstream.
Task blocks use this shape:
```task
id: RAIL-FAB-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
```
Status progression is `todo``progress``done`; use `wait` for waiting or
blocked work and `cancel` for stopped work.
<!-- Ralph Loop rules and HEUREKA sequence: ~/.claude/CLAUDE.md — do not duplicate here --> <!-- Ralph Loop rules and HEUREKA sequence: ~/.claude/CLAUDE.md — do not duplicate here -->

View File

@@ -4,10 +4,10 @@
**Purpose:** railiance-fabric - (fill in purpose) **Purpose:** railiance-fabric - (fill in purpose)
**Domain:** railiance **Domain:** financials
**Repo slug:** railiance-fabric **Repo slug:** railiance-fabric
**Topic ID:** `ca369340-a64e-442e-98f1-a4fa7dc74a38` **Topic ID:** `ca369340-a64e-442e-98f1-a4fa7dc74a38`
**Workplan prefix:** `RAILIANCE-WP-` **Workplan prefix:** `RAIL-FAB-WP-`
--- ---
@@ -63,8 +63,8 @@ Omit `workstream_id` / `task_id` when not applicable.
```bash ```bash
curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \ curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"status": "in_progress"}' -d '{"status": "progress"}'
# values: todo | in_progress | done | blocked # values: wait | todo | progress | done | cancel
``` ```
### Flag a task for human review ### Flag a task for human review
@@ -83,7 +83,7 @@ curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
1. `cat .custodian-brief.md` — domain goal and open workstreams (offline-safe) 1. `cat .custodian-brief.md` — domain goal and open workstreams (offline-safe)
2. Check inbox: `GET /messages/?to_agent=railiance-fabric&unread_only=true`; mark read 2. Check inbox: `GET /messages/?to_agent=railiance-fabric&unread_only=true`; mark read
3. Scan workplans: `ls workplans/` — note `status: ready`, `active`, or `blocked` files and open tasks 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:** **During work:**
- Update task statuses in workplan files as tasks progress - Update task statuses in workplan files as tasks progress
@@ -151,6 +151,11 @@ every repo's agent instructions because it is high-frequency, high-risk, and eas
get wrong. get wrong.
**Canon:** `~/ops-warden/wiki/CredentialRouting.md` · catalog `~/ops-warden/registry/routing/catalog.yaml` **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) ## Workplan Convention (ADR-001)
@@ -176,7 +181,7 @@ anything needing analysis, design, approval, dependencies, or multiple phases.
id: RAILIANCE-WP-NNNN id: RAILIANCE-WP-NNNN
type: workplan type: workplan
title: "..." title: "..."
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: proposed | ready | active | blocked | backlog | finished | archived status: proposed | ready | active | blocked | backlog | finished | archived
owner: codex owner: codex
@@ -198,7 +203,7 @@ derived health labels, not frontmatter statuses.
` ` `task ` ` `task
id: RAILIANCE-WP-NNNN-T01 id: RAILIANCE-WP-NNNN-T01
status: todo | in_progress | done | blocked status: wait | todo | progress | done | cancel
priority: high | medium | low priority: high | medium | low
state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit
` ` ` ` ` `
@@ -206,7 +211,7 @@ state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit
Task description text. 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: To create a new workplan:
1. Write the file following the format above 1. Write the file following the format above

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0001 id: RAIL-FAB-WP-0001
type: workplan type: workplan
title: "Railiance Ecosystem Graph Model" title: "Railiance Ecosystem Graph Model"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0002 id: RAIL-FAB-WP-0002
type: workplan type: workplan
title: "Railiance Ecosystem Registry Service" title: "Railiance Ecosystem Registry Service"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0003 id: RAIL-FAB-WP-0003
type: workplan type: workplan
title: "Registry Feed And Library Inventory" title: "Registry Feed And Library Inventory"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0004 id: RAIL-FAB-WP-0004
type: workplan type: workplan
title: "Registry Inventory And Drift Views" title: "Registry Inventory And Drift Views"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0005 id: RAIL-FAB-WP-0005
type: workplan type: workplan
title: "Registry Hardening" title: "Registry Hardening"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0006 id: RAIL-FAB-WP-0006
type: workplan type: workplan
title: "Multi-Repo Registry Onboarding" title: "Multi-Repo Registry Onboarding"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0007 id: RAIL-FAB-WP-0007
type: workplan type: workplan
title: "All Local Repo Onboarding" title: "All Local Repo Onboarding"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: completed status: completed
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0008 id: RAIL-FAB-WP-0008
type: workplan type: workplan
title: "Interactive Fabric Map" title: "Interactive Fabric Map"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0009 id: RAIL-FAB-WP-0009
type: workplan type: workplan
title: "Graph Explorer UI Refinement" title: "Graph Explorer UI Refinement"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0010 id: RAIL-FAB-WP-0010
type: workplan type: workplan
title: "Repo Reality Scanner" title: "Repo Reality Scanner"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0011 id: RAIL-FAB-WP-0011
type: workplan type: workplan
title: "Operational Rescan Loops" title: "Operational Rescan Loops"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0012 id: RAIL-FAB-WP-0012
type: workplan type: workplan
title: "Baseline Rollout And Conflict Review" title: "Baseline Rollout And Conflict Review"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0013 id: RAIL-FAB-WP-0013
type: workplan type: workplan
title: "Path Scoped Duplicate Identity" title: "Path Scoped Duplicate Identity"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0014 id: RAIL-FAB-WP-0014
type: workplan type: workplan
title: "Runtime Topology Discovery" title: "Runtime Topology Discovery"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0015 id: RAIL-FAB-WP-0015
type: workplan type: workplan
title: "Runtime Entity Taxonomy Refinement" title: "Runtime Entity Taxonomy Refinement"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0016 id: RAIL-FAB-WP-0016
type: workplan type: workplan
title: "Canon-Aligned Graph Model Reset And Reingest" title: "Canon-Aligned Graph Model Reset And Reingest"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0017 id: RAIL-FAB-WP-0017
type: workplan type: workplan
title: "Financial Fabric Model Reset" title: "Financial Fabric Model Reset"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0018 id: RAIL-FAB-WP-0018
type: workplan type: workplan
title: "Accountability Root Discovery And Update Loop" title: "Accountability Root Discovery And Update Loop"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0019 id: RAIL-FAB-WP-0019
type: workplan type: workplan
title: "Duplicate Repository Identity Review" title: "Duplicate Repository Identity Review"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0020 id: RAIL-FAB-WP-0020
type: workplan type: workplan
title: "Deployment Zone Discovery And Visualization" title: "Deployment Zone Discovery And Visualization"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,7 +2,7 @@
id: RAIL-FAB-WP-0021 id: RAIL-FAB-WP-0021
type: workplan type: workplan
title: "Zone Boundary Overlays" title: "Zone Boundary Overlays"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex

View File

@@ -2,11 +2,11 @@
id: RAIL-FAB-WP-0022 id: RAIL-FAB-WP-0022
type: workplan type: workplan
title: "Promote graph zones to first-class visualization entities" title: "Promote graph zones to first-class visualization entities"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex
topic_slug: railiance-fabric topic_slug: railiance
created: "2026-05-24" created: "2026-05-24"
updated: "2026-05-24" updated: "2026-05-24"
state_hub_workstream_id: "343f8383-ba5e-4d60-b55e-81611954d9b9" state_hub_workstream_id: "343f8383-ba5e-4d60-b55e-81611954d9b9"

View File

@@ -2,11 +2,11 @@
id: RAIL-FAB-WP-0023 id: RAIL-FAB-WP-0023
type: workplan type: workplan
title: "Improve zone labels and dragging" title: "Improve zone labels and dragging"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex
topic_slug: railiance-fabric topic_slug: railiance
created: "2026-05-25" created: "2026-05-25"
updated: "2026-06-05" updated: "2026-06-05"
state_hub_workstream_id: "f02e14c5-e60f-4950-b1a2-682c38b30431" state_hub_workstream_id: "f02e14c5-e60f-4950-b1a2-682c38b30431"

View File

@@ -2,11 +2,11 @@
id: RAIL-FAB-WP-0024 id: RAIL-FAB-WP-0024
type: workplan type: workplan
title: "Stabilize zone containers and layout zone subgraphs" title: "Stabilize zone containers and layout zone subgraphs"
domain: railiance domain: financials
repo: railiance-fabric repo: railiance-fabric
status: finished status: finished
owner: codex owner: codex
topic_slug: railiance-fabric topic_slug: railiance
created: "2026-05-25" created: "2026-05-25"
updated: "2026-05-25" updated: "2026-05-25"
state_hub_workstream_id: "63202459-2f73-409a-8881-307a5fc1835a" state_hub_workstream_id: "63202459-2f73-409a-8881-307a5fc1835a"