feat: add fast forge work-record reconciliation
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a053ff-1d6f-7fe2-ac1c-a6eb40a42a0c
This commit is contained in:
parent
a65cef02cf
commit
34f5cb3fc3
22 changed files with 799 additions and 162 deletions
|
|
@ -58,14 +58,10 @@ If no workplans: follow First Session Protocol (`first-session.md`).
|
|||
|
||||
> State Hub is a *read model*. **Never register workplans or tasks by hand**
|
||||
> (`create_workplan`, `create_task`) — write the workplan file in `workplans/`
|
||||
> and run `fix-consistency`; C-06 registers the workplan and tasks and writes
|
||||
> IDs back into the file. Manual registration creates duplicates when
|
||||
> 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.
|
||||
> and run `uv run --project ~/repo-manager rmgr sync --path . --push`.
|
||||
> Repo Manager assigns missing deterministic IDs; central derives the exact
|
||||
> pushed Forgejo commit. Manual registration creates duplicate ownership.
|
||||
> Work structure belongs in repo files (ADR-001).
|
||||
>
|
||||
> Legacy: `create_workstream` and `/workstreams/` remain as metered aliases —
|
||||
> see `workplan-convention.md` (compatibility footnote).
|
||||
|
|
@ -77,9 +73,8 @@ If no workplans: follow First Session Protocol (`first-session.md`).
|
|||
a child workplan / decision / engagement). Do not leave actionable leftovers
|
||||
only as prose or in `SCOPE.md`. See work-record-types § Residuals.
|
||||
3. Log progress (below).
|
||||
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.
|
||||
4. `uv run --project ~/repo-manager rmgr sync --path . --push` when workplan
|
||||
files changed. Use `statehub fix-consistency` separately for a deep audit.
|
||||
|
||||
With MCP tools:
|
||||
```
|
||||
|
|
@ -95,13 +90,7 @@ If workplan files were modified, ensure the local copy is up to date first,
|
|||
then sync from the repo checkout:
|
||||
```bash
|
||||
git pull --ff-only
|
||||
statehub fix-consistency
|
||||
uv run --project ~/repo-manager rmgr sync --path . --push
|
||||
```
|
||||
For repos where implementation runs on a remote machine (e.g. CoulombCore),
|
||||
use the pull-before-fix mode from any shell with the State Hub CLI:
|
||||
```bash
|
||||
statehub fix-consistency --repo {REPO_SLUG} --remote
|
||||
```
|
||||
**C-15** (DB task ahead of file) is normal in multi-machine workflows — writeback
|
||||
will sync the file to match DB. **C-16** (repo behind remote) blocks all writes
|
||||
until you pull — intentional to prevent clobbering remote progress.
|
||||
The sync refuses uncommitted workplan files and a branch behind its upstream.
|
||||
This prevents a workstation projection from getting ahead of the forge source.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue