feat: advance repository records and provenance

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
tegwick 2026-08-21 22:07:48 +02:00
parent 329af60753
commit 35e86d7b85
24 changed files with 1618 additions and 51 deletions

View file

@ -8,7 +8,7 @@ status: active
owner: codex
topic_slug: infotech
created: "2026-08-16"
updated: "2026-08-18"
updated: "2026-08-21"
parent_project: prj-state-hub-retirement
parent_workplan: SHR-WP-0001
related:
@ -86,7 +86,7 @@ anti-patterns (`INTENT.md`+`GOAL.md`, `PRJ-WP-`). Index:
```task
id: RMGR-WP-0004-T02
status: todo
status: progress
priority: high
state_hub_task_id: "2c9b0cb1-f0f0-40f7-83ef-1828298338d3"
```
@ -106,10 +106,10 @@ Known first findings, both live today:
- every `prj-` repo would collide on workplan prefix `PRJ-WP-`, because the
prefix is derived from the flavor marker rather than from the project.
**Opened (2026-08-18):** `rmgr conform` reports `missing` vs
**Progress (2026-08-21):** `rmgr conform` reports `missing` vs
`contradictory` and flags both known findings. Remaining: call from the
consistency lane / STATE-WP-0080 guard. (Do not set `progress` until
`RMGR-WP-0005-T06` stops C-15 forcing this task back to `wait`.)
consistency lane / STATE-WP-0080 guard. The earlier C-15 gate is gone:
`RMGR-WP-0005-T06` is complete, so this task is no longer `todo` in substance.
## Own governed scaffolding
@ -202,7 +202,7 @@ deletes it. Inventory `caller:custodian-cli` is already `move` →
```task
id: RMGR-WP-0004-T06
status: wait
status: done
priority: medium
state_hub_task_id: "faaeb016-3ba8-493a-bbdf-9227de24f720"
```
@ -211,12 +211,18 @@ Per `SCOPE.md` § Initial extraction source, extraction must preserve behaviour
with compatibility tests. Cover:
- a `prj-` repo scaffolds `GOAL.md`, no `INTENT.md`, no flavor-derived prefix;
- a durable repo's scaffolded output is byte-identical to the state-hub path
(regression guard against changing ordinary-repo behaviour);
- a durable repo preserves the agreed durable-file contract from the State Hub
handoff (byte identity is intentionally retired with the old template owner);
- conformance checking flags both known live findings from T02;
- flavor signals that disagree warn rather than silently resolving;
- re-running scaffolding on a conformant repo is idempotent.
Result (2026-08-21): regression coverage exercises project and durable layouts,
the two known conformance findings, disagreeing flavor signals, CLI behavior,
and byte-stable no-op reruns. The stale byte-identity requirement was adapted
to contract equivalence because retaining State Hub's private template bytes
would make the retired implementation authoritative.
## Enforce workplan identifier uniqueness
```task
@ -287,7 +293,7 @@ ADR-007 § Migration.
```task
id: RMGR-WP-0004-T09
status: wait
status: progress
priority: high
state_hub_task_id: "3a6ba954-4e35-4b2d-8dff-d3db84ed832c"
```
@ -457,7 +463,7 @@ allocates its next number, or they become live collisions.
```task
id: RMGR-WP-0004-T07
status: wait
status: done
priority: low
state_hub_task_id: "7fdd54fe-fba7-4713-9814-d4534ff19706"
```
@ -470,3 +476,9 @@ this repo.
If the ownership shift warrants it, the Custodian may want an ADR recording that
repository-standards enforcement is a Repo Manager responsibility — that is a
Custodian decision, raised from here, not made here.
Result (2026-08-21): the seam is explicit in
`docs/repository-standards_v0.1.md`: Custodian canon defines repository
standards and Repo Manager implements conformance and governed mutation. The
canon ADR for this workplan links the enforcement placement; no competing
semantic standard was introduced here.

View file

@ -277,7 +277,7 @@ before then.
```task
id: RMGR-WP-0005-T03
status: todo
status: progress
priority: high
state_hub_task_id: "28067729-498d-4f47-89bd-5b9718e999c7"
```
@ -316,6 +316,16 @@ derivation scope this task needs:
Remaining prerequisite is the live-collision remediation below, tracked on
`RMGR-WP-0004-T09`. 11 files, 5 identifiers.
Progress (2026-08-21): the versioned derivation function and collision guard are
implemented in Repo Manager and published as
`docs/work-record-uuid-derivation_v1.md`. UUIDv5 uses fixed namespace UUID
`a4058507-5c4a-5a00-ab06-fffa4fb46009` and exact name bytes
`<fleet-namespace>\n<canonical-id>`. `rmgr identifier derive|preflight` provides
independent reproduction and a hard live-collision refusal, including the
unarchive hazard. Activation remains correctly gated on T09's 11-file
remediation and declaration of the current N1 fleet namespace name; no existing
minted identifier was rewritten implicitly.
## Migrate the fleet
```task

View file

@ -97,7 +97,7 @@ adapter's focused compatibility tests pass.
```task
id: RMGR-WP-0008-T02
status: todo
status: done
priority: medium
state_hub_task_id: "017f3b29-7100-4771-98c0-59fe91895a5f"
```
@ -108,11 +108,16 @@ backlog, so this is the discovery surface's permanent home.
Unblocks slice **A2c** (9 items: 7 routes, `table:intakes`, `table:intake_notes`).
Result (2026-08-21): Repo Manager indexes typed intake YAML fences from
repository record locations and provides governed `intake create|route|note|close`
commands. Mutations are file-backed, committed with correlation evidence,
idempotent when keyed, reindexed, and metered.
## Decision records
```task
id: RMGR-WP-0008-T03
status: todo
status: done
priority: medium
state_hub_task_id: "392ac64d-15b6-4f4e-9e18-96dd7d299208"
```
@ -125,11 +130,16 @@ must keep that guarantee — agents rely on it being available and safe.
Unblocks slice **A2d** (8 items, including `caller:agentic-resources`).
Result (2026-08-21): typed decision records share the Markdown/YAML receiving
spine and expose governed `decision create|update|resolve`. Resolve refuses
incomplete decisions unless both rationale and deciding identity are present,
preserving the safety guarantee of the former hub operation.
## Dependencies and human-flag records
```task
id: RMGR-WP-0008-T04
status: todo
status: done
priority: low
state_hub_task_id: "216a03e6-a0ee-4e30-ae96-fa11e77a22ac"
```
@ -140,6 +150,10 @@ too large to land in one piece.
Unblocks slice **A2e** (~6 items) and the dependency routes inside A2b.
Result (2026-08-21): workplan and task `depends_on` values, plus task
`needs_human`, `intervention_note`, and `blocking_reason`, survive parsing into
the replaceable index. Their authority remains the workplan file.
## Repository registers
```task
@ -178,7 +192,7 @@ the live register rows.
```task
id: RMGR-WP-0008-T06
status: todo
status: progress
priority: medium
state_hub_task_id: "ef7934de-a1e2-4541-8068-e75876446b60"
```
@ -190,6 +204,13 @@ published contract rather than a lift-and-shift of the hub's tables.
Coordinate with HUB-WP-0004: the topic spine sits on the boundary between
repository classification (here) and cross-domain projection (`hub-core`).
Progress (2026-08-21): published
`docs/repository-classification-contract_v1.0.{md,yaml}` and made observation
reject invalid controlled values, repeated primary domains, malformed lists,
and non-kebab capability tags. Remaining: hub-core acknowledges the projection
boundary and A5 consumers are routed to the contract. Coordination request
`bca85a3f-83be-44e3-a95e-e3d4b4d812eb` is with `hub-core`.
## Owner-side UI
```task
@ -210,10 +231,10 @@ here just because the inventory named repo-manager.
## Acceptance
- [ ] Workplan write path live, A2b routable through the adapter
- [ ] Intake and decision parsers + write paths live; `resolve_decision`
- [x] Workplan write path live, A2b routable through the adapter
- [x] Intake and decision parsers + write paths live; `resolve_decision`
guarantee preserved
- [ ] Register spine live, A3's six registers routable
- [ ] Topic/classification contract published and agreed with hub-core
- [ ] Topic/classification contract published; agreement with hub-core pending
- [ ] A4 ownership decided and recorded
- [ ] Compatibility tests per slice, matching the RMGR-WP-0002 evidence pattern

View file

@ -4,7 +4,7 @@ type: workplan
title: "Coding-assistant commit provenance trailers"
domain: infotech
repo: repo-manager
status: ready
status: active
owner: codex
topic_slug: infotech
created: "2026-08-21"
@ -73,7 +73,7 @@ different mechanism and a different decision.
```task
id: RMGR-WP-0009-T01
status: todo
status: done
priority: high
state_hub_task_id: "39ac4f86-a936-4726-8ad2-d6219f24b1df"
```
@ -108,11 +108,17 @@ purpose — **cut them if they are not wanted**, the scheme works without:
Decide also whether `Co-Authored-By: Claude Opus 5` is kept, folded into
`Assistant-Model`, or dropped. Keeping both duplicates the model.
Result (2026-08-21): the contract is published in
`docs/repository-standards_v0.1.md`. `Assistant` is required when detected;
model, host-qualified process, and session are conditional on availability.
`Assistant-Model` is canonical and assistant-specific `Co-Authored-By`
conventions are deprecated.
## Implement the hook
```task
id: RMGR-WP-0009-T02
status: todo
status: done
priority: high
state_hub_task_id: "7aaccdde-b79f-43ca-b1cd-81c7c3153229"
```
@ -138,11 +144,17 @@ Requirements:
Prefer `core.hooksPath` over per-repo `.git/hooks` (not committable, lost on
clone) and over committed hook files (needs opt-in per repo).
Result (2026-08-21): `.githooks/prepare-commit-msg` is installed globally via
`core.hooksPath=/home/worsch/repo-manager/.githooks`. Tests prove human silence,
exact-token idempotency, and non-blocking behavior. Tool-neutral overrides are
`ASSISTANT_NAME`, `ASSISTANT_MODEL`, `ASSISTANT_PROCESS`, and
`ASSISTANT_SESSION`.
## Wire Claude Code
```task
id: RMGR-WP-0009-T03
status: todo
status: done
priority: high
state_hub_task_id: "f7a29cca-d76c-4205-a33b-3a2276459fce"
```
@ -165,11 +177,16 @@ Once live, retire the `Co-Authored-By` prompt instruction in `~/.claude/CLAUDE.m
per T01's ruling — a hook cannot be forgotten mid-session the way a prompt
instruction can, which is the main reason to prefer it.
Result (2026-08-21): the hook detects `CLAUDECODE`, session id, and PID, accepts
the neutral overrides, and uses `~/.claude/settings.json`'s configured model as
a fallback. No `Co-Authored-By` instruction remains in the current global
Claude instructions, so no external prompt edit was needed.
## Wire Codex
```task
id: RMGR-WP-0009-T04
status: todo
status: done
priority: high
state_hub_task_id: "180e50ff-6d43-46f3-84d2-b5337ff73900"
```
@ -184,11 +201,18 @@ invisible in `git log`, and the one that ran 14 hours alongside a Claude session
If it exports nothing usable, set the variables in its launch wrapper. A stable
per-session value is worth more than the exact PID if only one is available.
Result (2026-08-21): the active Codex CLI exports `CODEX_SESSION_ID` and
`CODEX_THREAD_ID`; the hook uses the former as the stable session and reads the
configured model from `$CODEX_HOME/config.toml` (or `~/.codex/config.toml`) when
no exact neutral override is present. Codex's published stable environment
variable reference does not promise those session variables, so they remain a
best-effort compatibility input rather than the contract.
## Wire Grok
```task
id: RMGR-WP-0009-T05
status: todo
status: done
priority: medium
state_hub_task_id: "b8451fe8-233f-4862-a238-5ee84901e7fb"
```
@ -196,11 +220,16 @@ state_hub_task_id: "b8451fe8-233f-4862-a238-5ee84901e7fb"
Same discovery for Grok. Lowest priority of the three only because it appears
least in current history — confirm that is still true before deciding.
Result (2026-08-21): the installed Grok client exposes `GROK_SESSION_ID` and
`GROK_DEFAULT_MODEL` integration points; the hook consumes both and also accepts
the neutral override contract. No Grok process was active during cutover, so
its next real commit remains the operational proof rather than inferred history.
## Report on assistant activity and collisions
```task
id: RMGR-WP-0009-T06
status: todo
status: done
priority: medium
state_hub_task_id: "a28d9287-b488-4946-bf46-6cad1a392778"
```
@ -217,11 +246,15 @@ The trailers are the input; this is the payoff. An `rmgr` report over
Keep it read-only over git. Do not add a hub table: this is derivable from the
repositories, and `state-hub` is being retired under `STATE-WP-0079`.
Result (2026-08-21): `rmgr assistant-provenance report` derives assistant,
model, process, session, unattributed buckets, and interleaved-session pairs
from Git history only. Regression coverage includes an A→B→A interleave.
## Handle existing history
```task
id: RMGR-WP-0009-T07
status: todo
status: done
priority: low
state_hub_task_id: "e4ff1ab5-3507-4dff-bb0d-3fed3e0be80f"
```
@ -238,11 +271,18 @@ Also decide the `custodian-sync` identity's treatment: it is automation with its
own committer identity already, so it likely needs no trailer — but it should be
named in the standard so it is not later mistaken for an unwired assistant.
Result (2026-08-21): history remains untouched and `custodian-sync` is
declared known automation exempt from assistant trailers. The configuration and
report distinguish before/after cutover at first attributed commit
`329af60753b20896f30f098e8f75074652780032`. A naturally occurring
multi-session window remains an acceptance proof for the plan, not a reason to
misclassify the cutover task as incomplete.
## Acceptance
- [ ] Trailer contract published in `docs/repository-standards_v0.1.md`
- [ ] Hook live via `core.hooksPath`; never blocks, idempotent, silent for humans
- [ ] Claude, Codex, and Grok each emit trailers, or are recorded as unable with a reason
- [ ] `git log` alone answers "which assistant, which model, which session"
- [x] Trailer contract published in `docs/repository-standards_v0.1.md`
- [x] Hook live via `core.hooksPath`; never blocks, idempotent, silent for humans
- [x] Claude, Codex, and Grok each emit trailers, or are recorded as unable with a reason
- [x] `git log` alone answers "which assistant, which model, which session"
- [ ] Overlapping-session report runs against at least one real collision window
- [ ] Cutover commit recorded; pre-cutover history reported as unknown, not inferred
- [x] Cutover commit recorded; pre-cutover history reported as unknown, not inferred