From 8849ee85400cb1f6ac6776c7bdc95e8a110279c0 Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 22 Jun 2026 23:16:27 +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 | 14 +++++------ .claude/rules/repo-identity.md | 4 +-- .claude/rules/session-protocol.md | 13 +++++----- .claude/rules/workplan-convention.md | 18 ++++++++++--- AGENTS.md | 25 +++++++++++-------- workplans/MKTT-WP-0001-repo-foundation.md | 2 +- .../MKTT-WP-0002-markitect-main-migration.md | 2 +- ...KTT-WP-0003-core-toolkit-implementation.md | 2 +- ...TT-WP-0004-practical-contract-framework.md | 2 +- ...-runtime-context-and-assessment-engines.md | 2 +- ...WP-0006-cache-backend-architecture-core.md | 2 +- ...-advanced-query-and-local-index-backend.md | 2 +- ...0008-agent-working-memory-context-cache.md | 2 +- ...009-access-controlled-knowledge-gateway.md | 2 +- ...-reference-processor-literate-workflows.md | 2 +- ...11-markdown-dataflow-pipeline-workflows.md | 2 +- .../MKTT-WP-0012-document-function-layer.md | 2 +- ...TT-WP-0013-internal-extension-framework.md | 2 +- ...terprise-iam-access-control-integration.md | 2 +- ...render-and-document-function-extensions.md | 2 +- ...ic-memory-graphs-and-service-blueprints.md | 2 +- ...7-cli-api-polish-and-practical-adoption.md | 2 +- .../MKTT-WP-0018-source-adapter-contract.md | 2 +- ...0019-source-adapter-contract-refinement.md | 2 +- ...-WP-0020-render-export-adapter-contract.md | 2 +- ...WP-0021-render-reference-asset-manifest.md | 2 +- 26 files changed, 67 insertions(+), 49 deletions(-) diff --git a/.claude/rules/first-session.md b/.claude/rules/first-session.md index f88b382..deab537 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("markitect")` shows **no workstreams**. +Triggered when `get_domain_summary("communication")` shows **no workstreams**. The project is registered but work has not yet been structured. **Step 1 — Read, don't write** -- `~/the-custodian/canon/projects/markitect/project_charter_v0.1.md` — purpose, scope -- `~/the-custodian/canon/projects/markitect/roadmap_v0.1.md` — planned phases +- `~/the-custodian/canon/projects/communication/project_charter_v0.1.md` — purpose, scope +- `~/the-custodian/canon/projects/communication/roadmap_v0.1.md` — planned phases - Scan repo root: README, directory structure, existing code or docs **Step 2 — Survey in-progress work** @@ -17,20 +17,20 @@ roadmap phase. **Wait for approval before creating.** **Step 4 — Create workplan file first, then DB record (ADR-001)** ``` -workplans/markitect-tool-WP-NNNN-.md ← write this first +workplans/MKTT-WP-NNNN-.md ← write this first ``` Then register in the hub: ``` -create_workstream(topic_id="5571d954-0d30-4950-980d-7bcaaad8e3e2", title="...", owner="...", description="...") +create_workstream(topic_id="36c7421b-c537-4723-bf75-42a3ebc6a1dc", title="...", owner="...", description="...") create_task(workstream_id="", title="...", priority="high|medium|low") ``` **Step 5 — Record the setup** ``` add_progress_event( - summary="First session: structured markitect into N workstreams, M tasks", + summary="First session: structured communication into N workstreams, M tasks", event_type="milestone", - topic_id="5571d954-0d30-4950-980d-7bcaaad8e3e2", + topic_id="36c7421b-c537-4723-bf75-42a3ebc6a1dc", detail={"workstreams": [...], "tasks_created": M} ) ``` diff --git a/.claude/rules/repo-identity.md b/.claude/rules/repo-identity.md index abe812f..74121e0 100644 --- a/.claude/rules/repo-identity.md +++ b/.claude/rules/repo-identity.md @@ -1,5 +1,5 @@ **Purpose:** markitect-tool - (fill in purpose) -**Domain:** markitect +**Domain:** communication **Repo slug:** markitect-tool -**Topic ID:** 5571d954-0d30-4950-980d-7bcaaad8e3e2 +**Topic ID:** 36c7421b-c537-4723-bf75-42a3ebc6a1dc diff --git a/.claude/rules/session-protocol.md b/.claude/rules/session-protocol.md index 2d59b99..ea9249f 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("markitect") +get_domain_summary("communication") ``` 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 `markitect` — title, task counts, blocking decisions +1. **Active workstreams** for `communication` — title, task counts, blocking decisions 2. **Pending tasks** from `workplans/` + any `[repo:markitect-tool]` hub tasks 3. **Goal guidance** — if `goal_guidance` in summary: - `needs_workplan`: surface as top action — *"Repo goal '{title}' has no workplan yet"* @@ -61,13 +62,13 @@ If no workstreams: follow First Session Protocol (`first-session.md`). **Session close:** With MCP tools: ``` -add_progress_event(summary="...", topic_id="5571d954-0d30-4950-980d-7bcaaad8e3e2", workstream_id="") +add_progress_event(summary="...", topic_id="36c7421b-c537-4723-bf75-42a3ebc6a1dc", workstream_id="") ``` Without MCP tools: ```bash curl -s -X POST http://127.0.0.1:8000/progress/ \ -H "Content-Type: application/json" \ - -d '{"topic_id":"5571d954-0d30-4950-980d-7bcaaad8e3e2","workstream_id":"","event_type":"note","summary":"what changed","author":"codex"}' + -d '{"topic_id":"36c7421b-c537-4723-bf75-42a3ebc6a1dc","workstream_id":"","event_type":"note","summary":"what changed","author":"codex"}' ``` If workplan files were modified, ensure the local copy is up to date first: ```bash diff --git a/.claude/rules/workplan-convention.md b/.claude/rules/workplan-convention.md index 4a2fd5b..3389e6a 100644 --- a/.claude/rules/workplan-convention.md +++ b/.claude/rules/workplan-convention.md @@ -1,7 +1,7 @@ ## Workplan Convention (ADR-001) -File location: `workplans/markitect-tool-WP-NNNN-.md` -ID prefix: `MARKITECT-WP` +File location: `workplans/MKTT-WP-NNNN-.md` +ID prefix: `MKTT-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-markitect-tool-WP-NNNN-.md`. The frontmatter id remains +prefix: `YYMMDD-MKTT-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:markitect-tool]` 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: MKTT-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 0c60e9a..835b78d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,10 +4,10 @@ **Purpose:** markitect-tool - (fill in purpose) -**Domain:** markitect +**Domain:** communication **Repo slug:** markitect-tool -**Topic ID:** `5571d954-0d30-4950-980d-7bcaaad8e3e2` -**Workplan prefix:** `MARKITECT-WP-` +**Topic ID:** `36c7421b-c537-4723-bf75-42a3ebc6a1dc` +**Workplan prefix:** `MKTT-WP-` --- @@ -28,7 +28,7 @@ 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=5571d954-0d30-4950-980d-7bcaaad8e3e2&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 @@ -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=markitect-tool&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: MARKITECT-WP-NNNN type: workplan title: "..." -domain: markitect +domain: communication repo: markitect-tool status: proposed | ready | active | blocked | backlog | finished | archived owner: codex @@ -198,7 +203,7 @@ derived health labels, not frontmatter statuses. ` ` `task id: MARKITECT-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/MKTT-WP-0001-repo-foundation.md b/workplans/MKTT-WP-0001-repo-foundation.md index 42286c5..25c5a98 100644 --- a/workplans/MKTT-WP-0001-repo-foundation.md +++ b/workplans/MKTT-WP-0001-repo-foundation.md @@ -2,7 +2,7 @@ id: MKTT-WP-0001 type: workplan title: "markitect-tool Repository Foundation" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0002-markitect-main-migration.md b/workplans/MKTT-WP-0002-markitect-main-migration.md index d70dc71..c9bacb5 100644 --- a/workplans/MKTT-WP-0002-markitect-main-migration.md +++ b/workplans/MKTT-WP-0002-markitect-main-migration.md @@ -2,7 +2,7 @@ id: MKTT-WP-0002 type: workplan title: "markitect-main Scope Extraction" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0003-core-toolkit-implementation.md b/workplans/MKTT-WP-0003-core-toolkit-implementation.md index b251570..24c0e6e 100644 --- a/workplans/MKTT-WP-0003-core-toolkit-implementation.md +++ b/workplans/MKTT-WP-0003-core-toolkit-implementation.md @@ -2,7 +2,7 @@ id: MKTT-WP-0003 type: workplan title: "Core Markdown Toolkit Implementation" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0004-practical-contract-framework.md b/workplans/MKTT-WP-0004-practical-contract-framework.md index 201265a..4ef81fd 100644 --- a/workplans/MKTT-WP-0004-practical-contract-framework.md +++ b/workplans/MKTT-WP-0004-practical-contract-framework.md @@ -2,7 +2,7 @@ id: MKTT-WP-0004 type: workplan title: "Practical Document Contract Framework" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0005-runtime-context-and-assessment-engines.md b/workplans/MKTT-WP-0005-runtime-context-and-assessment-engines.md index f4255af..6d9f613 100644 --- a/workplans/MKTT-WP-0005-runtime-context-and-assessment-engines.md +++ b/workplans/MKTT-WP-0005-runtime-context-and-assessment-engines.md @@ -2,7 +2,7 @@ id: MKTT-WP-0005 type: workplan title: "Runtime Context, Form, and Assessment Engines" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0006-cache-backend-architecture-core.md b/workplans/MKTT-WP-0006-cache-backend-architecture-core.md index f987a74..1800a86 100644 --- a/workplans/MKTT-WP-0006-cache-backend-architecture-core.md +++ b/workplans/MKTT-WP-0006-cache-backend-architecture-core.md @@ -2,7 +2,7 @@ id: MKTT-WP-0006 type: workplan title: "Optional Cache Backend Architecture Core" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0007-advanced-query-and-local-index-backend.md b/workplans/MKTT-WP-0007-advanced-query-and-local-index-backend.md index 926a1a3..9de0374 100644 --- a/workplans/MKTT-WP-0007-advanced-query-and-local-index-backend.md +++ b/workplans/MKTT-WP-0007-advanced-query-and-local-index-backend.md @@ -2,7 +2,7 @@ id: MKTT-WP-0007 type: workplan title: "Advanced Query and Local Index Backend" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0008-agent-working-memory-context-cache.md b/workplans/MKTT-WP-0008-agent-working-memory-context-cache.md index 7a6227f..7e82865 100644 --- a/workplans/MKTT-WP-0008-agent-working-memory-context-cache.md +++ b/workplans/MKTT-WP-0008-agent-working-memory-context-cache.md @@ -2,7 +2,7 @@ id: MKTT-WP-0008 type: workplan title: "Agent Working Memory Context Cache" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0009-access-controlled-knowledge-gateway.md b/workplans/MKTT-WP-0009-access-controlled-knowledge-gateway.md index 22b849e..055ab4b 100644 --- a/workplans/MKTT-WP-0009-access-controlled-knowledge-gateway.md +++ b/workplans/MKTT-WP-0009-access-controlled-knowledge-gateway.md @@ -2,7 +2,7 @@ id: MKTT-WP-0009 type: workplan title: "Access-Controlled Knowledge Gateway" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0010-content-reference-processor-literate-workflows.md b/workplans/MKTT-WP-0010-content-reference-processor-literate-workflows.md index 0c5cfcf..e7a2c34 100644 --- a/workplans/MKTT-WP-0010-content-reference-processor-literate-workflows.md +++ b/workplans/MKTT-WP-0010-content-reference-processor-literate-workflows.md @@ -2,7 +2,7 @@ id: MKTT-WP-0010 type: workplan title: "Content References, Processors, and Literate Workflows" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0011-markdown-dataflow-pipeline-workflows.md b/workplans/MKTT-WP-0011-markdown-dataflow-pipeline-workflows.md index 53f0a71..a7f7947 100644 --- a/workplans/MKTT-WP-0011-markdown-dataflow-pipeline-workflows.md +++ b/workplans/MKTT-WP-0011-markdown-dataflow-pipeline-workflows.md @@ -2,7 +2,7 @@ id: MKTT-WP-0011 type: workplan title: "Markdown Dataflow Pipeline Workflows" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0012-document-function-layer.md b/workplans/MKTT-WP-0012-document-function-layer.md index 2209905..09b4d2d 100644 --- a/workplans/MKTT-WP-0012-document-function-layer.md +++ b/workplans/MKTT-WP-0012-document-function-layer.md @@ -2,7 +2,7 @@ id: MKTT-WP-0012 type: workplan title: "Document Function Layer" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0013-internal-extension-framework.md b/workplans/MKTT-WP-0013-internal-extension-framework.md index 87759a2..d83f354 100644 --- a/workplans/MKTT-WP-0013-internal-extension-framework.md +++ b/workplans/MKTT-WP-0013-internal-extension-framework.md @@ -2,7 +2,7 @@ id: MKTT-WP-0013 type: workplan title: "Internal Extension Framework and Canonical Processing Model" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0014-enterprise-iam-access-control-integration.md b/workplans/MKTT-WP-0014-enterprise-iam-access-control-integration.md index 32a0ce0..93f7d50 100644 --- a/workplans/MKTT-WP-0014-enterprise-iam-access-control-integration.md +++ b/workplans/MKTT-WP-0014-enterprise-iam-access-control-integration.md @@ -2,7 +2,7 @@ id: MKTT-WP-0014 type: workplan title: "Enterprise IAM Access-Control Integration" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0015-render-and-document-function-extensions.md b/workplans/MKTT-WP-0015-render-and-document-function-extensions.md index 9b48082..9bae75a 100644 --- a/workplans/MKTT-WP-0015-render-and-document-function-extensions.md +++ b/workplans/MKTT-WP-0015-render-and-document-function-extensions.md @@ -2,7 +2,7 @@ id: MKTT-WP-0015 type: workplan title: "Document Function Value Contracts" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0016-agentic-memory-graphs-and-service-blueprints.md b/workplans/MKTT-WP-0016-agentic-memory-graphs-and-service-blueprints.md index 89cbc3d..a212c44 100644 --- a/workplans/MKTT-WP-0016-agentic-memory-graphs-and-service-blueprints.md +++ b/workplans/MKTT-WP-0016-agentic-memory-graphs-and-service-blueprints.md @@ -2,7 +2,7 @@ id: MKTT-WP-0016 type: workplan title: "Memory Graph Profile Contract And Context Package Compiler" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0017-cli-api-polish-and-practical-adoption.md b/workplans/MKTT-WP-0017-cli-api-polish-and-practical-adoption.md index 7f09b03..4fbf61f 100644 --- a/workplans/MKTT-WP-0017-cli-api-polish-and-practical-adoption.md +++ b/workplans/MKTT-WP-0017-cli-api-polish-and-practical-adoption.md @@ -2,7 +2,7 @@ id: MKTT-WP-0017 type: workplan title: "CLI/API Polish And Practical Adoption" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0018-source-adapter-contract.md b/workplans/MKTT-WP-0018-source-adapter-contract.md index f938e0d..c8f3bbe 100644 --- a/workplans/MKTT-WP-0018-source-adapter-contract.md +++ b/workplans/MKTT-WP-0018-source-adapter-contract.md @@ -2,7 +2,7 @@ id: MKTT-WP-0018 type: workplan title: "Source Adapter Interface And Markdown Normalization Contract" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0019-source-adapter-contract-refinement.md b/workplans/MKTT-WP-0019-source-adapter-contract-refinement.md index 9917c07..7ac175a 100644 --- a/workplans/MKTT-WP-0019-source-adapter-contract-refinement.md +++ b/workplans/MKTT-WP-0019-source-adapter-contract-refinement.md @@ -2,7 +2,7 @@ id: MKTT-WP-0019 type: workplan title: "Source Adapter Contract Refinement" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0020-render-export-adapter-contract.md b/workplans/MKTT-WP-0020-render-export-adapter-contract.md index e7d3453..72baf2b 100644 --- a/workplans/MKTT-WP-0020-render-export-adapter-contract.md +++ b/workplans/MKTT-WP-0020-render-export-adapter-contract.md @@ -2,7 +2,7 @@ id: MKTT-WP-0020 type: workplan title: "Render Export Adapter Contract" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect diff --git a/workplans/MKTT-WP-0021-render-reference-asset-manifest.md b/workplans/MKTT-WP-0021-render-reference-asset-manifest.md index b7a58fa..fb68209 100644 --- a/workplans/MKTT-WP-0021-render-reference-asset-manifest.md +++ b/workplans/MKTT-WP-0021-render-reference-asset-manifest.md @@ -2,7 +2,7 @@ id: MKTT-WP-0021 type: workplan title: "Render Reference And Asset Manifest Contract" -domain: markitect +domain: communication status: done owner: markitect-tool topic_slug: markitect