From f169bd9082963687447816255f9595c7895ea4db Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 22 Jun 2026 23:16:28 +0200 Subject: [PATCH] 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 --- .claude/rules/first-session.md | 10 ++++----- .claude/rules/repo-identity.md | 2 +- .claude/rules/session-protocol.md | 9 ++++---- .claude/rules/workplan-convention.md | 18 +++++++++++++--- AGENTS.md | 21 ++++++++++++------- workplans/RREG-WP-0001-mvp-implementation.md | 2 +- .../RREG-WP-0002-production-hardening.md | 2 +- ...P-0003-automatic-repository-exploration.md | 2 +- ...haracteristic-classification-navigation.md | 2 +- ...REG-WP-0005-scope-md-generation-feature.md | 2 +- ...06-rename-to-repo-scoping-and-integrate.md | 2 +- ...nal-rename-polish-and-knowledge-capture.md | 2 +- ...0008-dependency-aware-scope-propagation.md | 2 +- ...provenance-aware-characteristic-rebuild.md | 2 +- ...10-dependency-visualization-exploration.md | 2 +- ...011-dependency-graph-exploration-polish.md | 2 +- .../RREG-WP-0012-activity-core-context-api.md | 2 +- ...P-0013-self-scoping-baseline-evaluation.md | 2 +- ...-0014-agentic-characteristic-acceptance.md | 2 +- ...G-WP-0015-self-assessment-input-hygiene.md | 2 +- ...16-native-candidate-generation-recovery.md | 2 +- ...EG-WP-0017-finalize-repo-scoping-rename.md | 2 +- ...entic-hierarchy-and-intent-scope-review.md | 2 +- 23 files changed, 57 insertions(+), 39 deletions(-) diff --git a/.claude/rules/first-session.md b/.claude/rules/first-session.md index 6416e2a..56ec025 100644 --- a/.claude/rules/first-session.md +++ b/.claude/rules/first-session.md @@ -1,11 +1,11 @@ ## First Session Protocol -Triggered when `get_domain_summary("capabilities")` shows **no workstreams**. +Triggered when `get_domain_summary("agents")` shows **no workstreams**. The project is registered but work has not yet been structured. **Step 1 — Read, don't write** -- `~/the-custodian/canon/projects/capabilities/project_charter_v0.1.md` — purpose, scope -- `~/the-custodian/canon/projects/capabilities/roadmap_v0.1.md` — planned phases +- `~/the-custodian/canon/projects/agents/project_charter_v0.1.md` — purpose, scope +- `~/the-custodian/canon/projects/agents/roadmap_v0.1.md` — planned phases - Scan repo root: README, directory structure, existing code or docs **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)** ``` -workplans/repo-scoping-WP-NNNN-.md ← write this first +workplans/RREG-WP-NNNN-.md ← write this first ``` Then register in the hub: ``` @@ -28,7 +28,7 @@ create_task(workstream_id="", title="...", priority="high|medium|low") **Step 5 — Record the setup** ``` add_progress_event( - summary="First session: structured capabilities into N workstreams, M tasks", + summary="First session: structured agents into N workstreams, M tasks", event_type="milestone", topic_id="64418556-3206-457a-ba29-6884b5b12cf3", detail={"workstreams": [...], "tasks_created": M} diff --git a/.claude/rules/repo-identity.md b/.claude/rules/repo-identity.md index 501b3b6..e3846ca 100644 --- a/.claude/rules/repo-identity.md +++ b/.claude/rules/repo-identity.md @@ -1,5 +1,5 @@ **Purpose:** repo-scoping - (fill in purpose) -**Domain:** capabilities +**Domain:** agents **Repo slug:** repo-scoping **Topic ID:** 64418556-3206-457a-ba29-6884b5b12cf3 diff --git a/.claude/rules/session-protocol.md b/.claude/rules/session-protocol.md index 4fee6b6..dbb627b 100644 --- a/.claude/rules/session-protocol.md +++ b/.claude/rules/session-protocol.md @@ -1,6 +1,7 @@ ## 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** @@ -10,7 +11,7 @@ cat .custodian-brief.md ``` Then call the MCP tool for richer cross-domain context when MCP tools are exposed: ``` -get_domain_summary("capabilities") +get_domain_summary("agents") ``` If MCP tools are unavailable in the current agent session, use the REST API: ```bash @@ -39,11 +40,11 @@ curl -s -X PATCH "http://127.0.0.1:8000/messages//read" \ ls workplans/ ``` For each file with `status: ready`, `active`, or `blocked`, note pending -`todo`/`in_progress` tasks. +`wait`/`todo`/`progress` tasks. **Step 4 — Present brief** -1. **Active workstreams** for `capabilities` — title, task counts, blocking decisions +1. **Active workstreams** for `agents` — title, task counts, blocking decisions 2. **Pending tasks** from `workplans/` + any `[repo:repo-scoping]` hub tasks 3. **Goal guidance** — if `goal_guidance` in summary: - `needs_workplan`: surface as top action — *"Repo goal '{title}' has no workplan yet"* diff --git a/.claude/rules/workplan-convention.md b/.claude/rules/workplan-convention.md index b9bcc72..8919503 100644 --- a/.claude/rules/workplan-convention.md +++ b/.claude/rules/workplan-convention.md @@ -1,7 +1,7 @@ ## Workplan Convention (ADR-001) -File location: `workplans/repo-scoping-WP-NNNN-.md` -ID prefix: `REPO-WP` +File location: `workplans/RREG-WP-NNNN-.md` +ID prefix: `RREG-WP-` 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. Closed workplans may be moved to `workplans/archived/` with a completion-date -prefix: `YYMMDD-repo-scoping-WP-NNNN-.md`. The frontmatter id remains +prefix: `YYMMDD-RREG-WP-NNNN-.md`. The frontmatter id remains unchanged; the prefix is only for quick visual reference. Small opportunistic tasks discovered during another session use **Ad Hoc Tasks**: @@ -25,4 +25,16 @@ Ecosystem todos from other agents arrive as `[repo:repo-scoping]` hub tasks — visible at session start. Pick one up by creating the workplan file, then registering the workstream. +Task blocks use this shape: + +```task +id: RREG-WP-NNNN-T01 +status: wait | todo | progress | done | cancel +priority: high | medium | low +state_hub_task_id: "" # 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. + diff --git a/AGENTS.md b/AGENTS.md index d88fbdd..588c59c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,10 +4,10 @@ **Purpose:** repo-scoping - (fill in purpose) -**Domain:** capabilities +**Domain:** agents **Repo slug:** repo-scoping **Topic ID:** `64418556-3206-457a-ba29-6884b5b12cf3` -**Workplan prefix:** `REPO-WP-` +**Workplan prefix:** `RREG-WP-` --- @@ -63,8 +63,8 @@ Omit `workstream_id` / `task_id` when not applicable. ```bash curl -s -X PATCH "http://127.0.0.1:8000/tasks/" \ -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 @@ -83,7 +83,7 @@ curl -s -X PATCH "http://127.0.0.1:8000/tasks/" \ 1. `cat .custodian-brief.md` — domain goal and open workstreams (offline-safe) 2. Check inbox: `GET /messages/?to_agent=repo-scoping&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 @@ -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` + + + + --- ## Workplan Convention (ADR-001) @@ -176,7 +181,7 @@ anything needing analysis, design, approval, dependencies, or multiple phases. id: REPO-WP-NNNN type: workplan title: "..." -domain: capabilities +domain: agents repo: repo-scoping status: proposed | ready | active | blocked | backlog | finished | archived owner: codex @@ -198,7 +203,7 @@ derived health labels, not frontmatter statuses. ` ` `task id: REPO-WP-NNNN-T01 -status: todo | in_progress | done | blocked +status: wait | todo | progress | done | cancel priority: high | medium | low state_hub_task_id: "" # written by fix-consistency — do not edit ` ` ` @@ -206,7 +211,7 @@ state_hub_task_id: "" # 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 diff --git a/workplans/RREG-WP-0001-mvp-implementation.md b/workplans/RREG-WP-0001-mvp-implementation.md index 72d6dd6..3d787fb 100644 --- a/workplans/RREG-WP-0001-mvp-implementation.md +++ b/workplans/RREG-WP-0001-mvp-implementation.md @@ -2,7 +2,7 @@ id: RREG-WP-0001 type: workplan title: "Repository Ability Registry — MVP Implementation" -domain: capabilities +domain: agents repo: repo-registry status: done owner: codex diff --git a/workplans/RREG-WP-0002-production-hardening.md b/workplans/RREG-WP-0002-production-hardening.md index bf3bab8..fd73a93 100644 --- a/workplans/RREG-WP-0002-production-hardening.md +++ b/workplans/RREG-WP-0002-production-hardening.md @@ -2,7 +2,7 @@ id: RREG-WP-0002 type: workplan title: "Repository Ability Registry — Production Hardening" -domain: capabilities +domain: agents repo: repo-registry status: done owner: codex diff --git a/workplans/RREG-WP-0003-automatic-repository-exploration.md b/workplans/RREG-WP-0003-automatic-repository-exploration.md index 54580e0..eb06d3c 100644 --- a/workplans/RREG-WP-0003-automatic-repository-exploration.md +++ b/workplans/RREG-WP-0003-automatic-repository-exploration.md @@ -2,7 +2,7 @@ id: RREG-WP-0003 type: workplan title: "Repository Ability Registry — Automatic Repository Exploration" -domain: capabilities +domain: agents repo: repo-registry status: done owner: codex diff --git a/workplans/RREG-WP-0004-characteristic-classification-navigation.md b/workplans/RREG-WP-0004-characteristic-classification-navigation.md index 0e75055..54f6aa5 100644 --- a/workplans/RREG-WP-0004-characteristic-classification-navigation.md +++ b/workplans/RREG-WP-0004-characteristic-classification-navigation.md @@ -2,7 +2,7 @@ id: RREG-WP-0004 type: workplan title: "Repository Ability Registry - Characteristic Classification And Navigation" -domain: capabilities +domain: agents repo: repo-registry status: done owner: codex diff --git a/workplans/RREG-WP-0005-scope-md-generation-feature.md b/workplans/RREG-WP-0005-scope-md-generation-feature.md index 5d2051f..31ef8f7 100644 --- a/workplans/RREG-WP-0005-scope-md-generation-feature.md +++ b/workplans/RREG-WP-0005-scope-md-generation-feature.md @@ -2,7 +2,7 @@ id: RREG-WP-0005 type: workplan title: "SCOPE.md Generation Feature" -domain: capabilities +domain: agents repo: repo-registry status: done owner: codex diff --git a/workplans/RREG-WP-0006-rename-to-repo-scoping-and-integrate.md b/workplans/RREG-WP-0006-rename-to-repo-scoping-and-integrate.md index 3e35df8..b9dae40 100644 --- a/workplans/RREG-WP-0006-rename-to-repo-scoping-and-integrate.md +++ b/workplans/RREG-WP-0006-rename-to-repo-scoping-and-integrate.md @@ -2,7 +2,7 @@ id: RREG-WP-0006 type: workplan title: "Rename to repo-scoping and Full Custodian Integration" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0007-final-rename-polish-and-knowledge-capture.md b/workplans/RREG-WP-0007-final-rename-polish-and-knowledge-capture.md index f71cf50..9423b40 100644 --- a/workplans/RREG-WP-0007-final-rename-polish-and-knowledge-capture.md +++ b/workplans/RREG-WP-0007-final-rename-polish-and-knowledge-capture.md @@ -2,7 +2,7 @@ id: RREG-WP-0007 type: workplan title: "Final Rename Polish and Knowledge Capture" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0008-dependency-aware-scope-propagation.md b/workplans/RREG-WP-0008-dependency-aware-scope-propagation.md index 7baa21a..3d48010 100644 --- a/workplans/RREG-WP-0008-dependency-aware-scope-propagation.md +++ b/workplans/RREG-WP-0008-dependency-aware-scope-propagation.md @@ -2,7 +2,7 @@ id: RREG-WP-0008 type: workplan title: "Dependency-Aware Scope Propagation" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0009-provenance-aware-characteristic-rebuild.md b/workplans/RREG-WP-0009-provenance-aware-characteristic-rebuild.md index bd7af49..a79b3da 100644 --- a/workplans/RREG-WP-0009-provenance-aware-characteristic-rebuild.md +++ b/workplans/RREG-WP-0009-provenance-aware-characteristic-rebuild.md @@ -2,7 +2,7 @@ id: RREG-WP-0009 type: workplan title: "Provenance-Aware Characteristic Rebuild" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0010-dependency-visualization-exploration.md b/workplans/RREG-WP-0010-dependency-visualization-exploration.md index 02da557..a31e773 100644 --- a/workplans/RREG-WP-0010-dependency-visualization-exploration.md +++ b/workplans/RREG-WP-0010-dependency-visualization-exploration.md @@ -2,7 +2,7 @@ id: RREG-WP-0010 type: workplan title: "Dependency Visualization And Exploration" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0011-dependency-graph-exploration-polish.md b/workplans/RREG-WP-0011-dependency-graph-exploration-polish.md index c52b7be..cbc00a1 100644 --- a/workplans/RREG-WP-0011-dependency-graph-exploration-polish.md +++ b/workplans/RREG-WP-0011-dependency-graph-exploration-polish.md @@ -2,7 +2,7 @@ id: RREG-WP-0011 type: workplan title: "Dependency Graph Exploration Polish" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0012-activity-core-context-api.md b/workplans/RREG-WP-0012-activity-core-context-api.md index a027fcc..557251b 100644 --- a/workplans/RREG-WP-0012-activity-core-context-api.md +++ b/workplans/RREG-WP-0012-activity-core-context-api.md @@ -2,7 +2,7 @@ id: RREG-WP-0012 type: workplan title: "Activity-Core Scope Context API" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0013-self-scoping-baseline-evaluation.md b/workplans/RREG-WP-0013-self-scoping-baseline-evaluation.md index 8c60249..1e6064e 100644 --- a/workplans/RREG-WP-0013-self-scoping-baseline-evaluation.md +++ b/workplans/RREG-WP-0013-self-scoping-baseline-evaluation.md @@ -2,7 +2,7 @@ id: RREG-WP-0013 type: workplan title: "Self-Scoping Baseline Evaluation" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0014-agentic-characteristic-acceptance.md b/workplans/RREG-WP-0014-agentic-characteristic-acceptance.md index 2142f44..ec282c5 100644 --- a/workplans/RREG-WP-0014-agentic-characteristic-acceptance.md +++ b/workplans/RREG-WP-0014-agentic-characteristic-acceptance.md @@ -2,7 +2,7 @@ id: RREG-WP-0014 type: workplan title: "Agentic Characteristic Acceptance" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0015-self-assessment-input-hygiene.md b/workplans/RREG-WP-0015-self-assessment-input-hygiene.md index 5fc8ebe..d471651 100644 --- a/workplans/RREG-WP-0015-self-assessment-input-hygiene.md +++ b/workplans/RREG-WP-0015-self-assessment-input-hygiene.md @@ -2,7 +2,7 @@ id: RREG-WP-0015 type: workplan title: "Self-Assessment Input Hygiene" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0016-native-candidate-generation-recovery.md b/workplans/RREG-WP-0016-native-candidate-generation-recovery.md index 30f136c..893bd34 100644 --- a/workplans/RREG-WP-0016-native-candidate-generation-recovery.md +++ b/workplans/RREG-WP-0016-native-candidate-generation-recovery.md @@ -2,7 +2,7 @@ id: RREG-WP-0016 type: workplan title: "Native Candidate Generation Recovery" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0017-finalize-repo-scoping-rename.md b/workplans/RREG-WP-0017-finalize-repo-scoping-rename.md index 3d31d21..55d7cae 100644 --- a/workplans/RREG-WP-0017-finalize-repo-scoping-rename.md +++ b/workplans/RREG-WP-0017-finalize-repo-scoping-rename.md @@ -2,7 +2,7 @@ id: RREG-WP-0017 type: workplan title: "Finalize Repo-Scoping Rename" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex diff --git a/workplans/RREG-WP-0018-agentic-hierarchy-and-intent-scope-review.md b/workplans/RREG-WP-0018-agentic-hierarchy-and-intent-scope-review.md index f246e47..40abbb5 100644 --- a/workplans/RREG-WP-0018-agentic-hierarchy-and-intent-scope-review.md +++ b/workplans/RREG-WP-0018-agentic-hierarchy-and-intent-scope-review.md @@ -2,7 +2,7 @@ id: RREG-WP-0018 type: workplan title: "Agentic Hierarchy And Intent/Scope Review" -domain: capabilities +domain: agents repo: repo-scoping status: done owner: codex