docs: route registrar skips through repo-manager
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
tegwick 2026-08-21 21:38:29 +02:00
parent de58a0cf90
commit 30b17adde1
4 changed files with 45 additions and 2 deletions

View file

@ -118,6 +118,15 @@ curl -s -X PATCH "http://127.0.0.1:8000/tasks/<task_id>" \
``` ```
Coding agents should run this directly; ask the operator only if the CLI or Coding agents should run this directly; ask the operator only if the CLI or
State Hub API is unavailable. This syncs task status from files into the hub DB. State Hub API is unavailable. This syncs task status from files into the hub DB.
If C-06/C-11 reports that this host is not the identifier registrar, do not
retry, export `STATEHUB_REGISTRAR`, or register records by hand. Commit and
push the file-backed work first, then run the repo-manager fallback once:
```bash
uv run --project ~/repo-manager rmgr registrar-reconcile \
--path . --confirm-primary --push
```
If unavailable, send one deduplicated registrar request to `repo-manager`
naming the repo and canonical ids; UUID absence does not block local work.
--- ---
@ -195,5 +204,6 @@ not a kind. Fleet list lives on State Hub, not in `SCOPE.md`.
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
2. Run `statehub fix-consistency` locally; ask the operator only if the CLI or 2. Run `statehub fix-consistency` locally.
State Hub API is unavailable. 3. On a non-registrar C-06/C-11 skip, use the repo-manager fallback documented
above exactly once; never set registrar authority directly.

View file

@ -29,6 +29,18 @@ C-06 creates the hub workplan + tasks and writes `state_hub_workstream_id`
(legacy frontmatter name — holds the workplan UUID) and `state_hub_task_id` (legacy frontmatter name — holds the workplan UUID) and `state_hub_task_id`
back into the file. back into the file.
If C-06/C-11 is skipped because the host is not the identifier registrar,
commit and push the new workplan, then invoke the governed fallback once:
```bash
uv run --project ~/repo-manager rmgr registrar-reconcile \
--path . --confirm-primary --push
```
Never export `STATEHUB_REGISTRAR` or create the hub records manually. If the
fallback is unavailable, send one request to `repo-manager` and keep working
from the authoritative files.
**Step 5 — Record the setup** **Step 5 — Record the setup**
``` ```
add_progress_event( add_progress_event(

View file

@ -61,6 +61,11 @@ If no workplans: follow First Session Protocol (`first-session.md`).
> and run `fix-consistency`; C-06 registers the workplan and tasks and writes > and run `fix-consistency`; C-06 registers the workplan and tasks and writes
> IDs back into the file. Manual registration creates duplicates when > IDs back into the file. Manual registration creates duplicates when
> fix-consistency runs. Work structure belongs in repo files (ADR-001). > fix-consistency runs. Work structure belongs in repo files (ADR-001).
> If C-06/C-11 is skipped on a non-registrar host, do not retry or set registrar
> authority directly. Commit and push the file changes, then run once:
> `uv run --project ~/repo-manager rmgr registrar-reconcile --path .
> --confirm-primary --push`. If unavailable, send one deduplicated request to
> `repo-manager` and continue from the files.
> >
> Legacy: `create_workstream` and `/workstreams/` remain as metered aliases — > Legacy: `create_workstream` and `/workstreams/` remain as metered aliases —
> see `workplan-convention.md` (compatibility footnote). > see `workplan-convention.md` (compatibility footnote).
@ -73,6 +78,8 @@ If no workplans: follow First Session Protocol (`first-session.md`).
only as prose or in `SCOPE.md`. See work-record-types § Residuals. only as prose or in `SCOPE.md`. See work-record-types § Residuals.
3. Log progress (below). 3. Log progress (below).
4. `statehub fix-consistency` when workplan/queue files changed. 4. `statehub fix-consistency` when workplan/queue files changed.
A non-registrar C-06/C-11 skip uses the scoped repo-manager fallback above;
repeated consistency runs cannot assign the missing UUIDs.
With MCP tools: With MCP tools:
``` ```

View file

@ -26,6 +26,20 @@ visible at session start. Pick one up by creating the workplan file, committing,
and running `statehub fix-consistency` — C-06 registers the workplan in the hub. and running `statehub fix-consistency` — C-06 registers the workplan in the hub.
Never register by hand with `create_workplan` (legacy MCP alias: `create_workstream`). Never register by hand with `create_workplan` (legacy MCP alias: `create_workstream`).
If `fix-consistency` reports C-06/C-11 skipped because this host is not the
identifier registrar, further retries cannot help. Do not set
`STATEHUB_REGISTRAR` and do not create hub rows manually. Commit and push the
file-backed work, then run the scoped repo-manager fallback once:
```bash
uv run --project ~/repo-manager rmgr registrar-reconcile \
--path . --confirm-primary --push
```
If it is unavailable, send one request to `repo-manager` naming the repository
and missing canonical ids. Continue local work from files; hub UUID absence is
an indexing delay, not a reason to repeat the same checks.
Task blocks use this shape: Task blocks use this shape:
```task ```task