repo-manager/docs/repository-standards_v0.1.md

2.8 KiB

Repository standards v0.1

Repo Manager implements Custodian canon. It does not author a second definition. This note is an index.

Concern Canon
Categories and .repo-classification.yaml the-custodian/canon/standards/repo-classification-standard_v1.0.md
prj- layout, GOAL.md, anti-pattern both purpose docs the-custodian/canon/standards/project-repository-flavor_v0.1.md
One workplan prefix per repository the-custodian/canon/architecture/adr-007-workplan-identity-and-repo-worker-topology.md

Flavor resolution

Precedence, then warn on disagreement (do not silently pick a winner for operators — the first match is used only to choose the required-file set):

  1. .repo-classification.yaml category
  2. GOAL.md repo_flavor
  3. slug prefix prj-

prj- layout (GOAL.md, no INTENT.md) applies when the slug starts with prj- or GOAL.md declares repo_flavor: project. Not every category: project repo is a prj- repo.

Commands

rmgr conform --path .
rmgr prefix-uniqueness --root ..

prefix-uniqueness is detection only. It does not rename files. Registry: config/workplan-prefix-registry.yaml.

Work: RMGR-WP-0004-T01, RMGR-WP-0004-T08.

Identifier registrar (interim)

Until UUIDv5 derivation lands (RMGR-WP-0005-T03), only the registrar instance may mint state_hub_workstream_id / state_hub_task_id into files (ADR-007 decision 2). Other hubs may read and project; they must not write new hub primary keys into git.

Signal Registrar?
STATEHUB_REGISTRAR=1 / true / yes / on yes
STATEHUB_REGISTRAR=0 / false / no / off no
env unset, hostname starts with railiance yes
env unset, any other hostname no

Accepted cost: new workplan/task registration requires connectivity to the registrar. Disconnected work cannot register until T03. Implementation: repo_manager.registrar.is_identifier_registrar; consumed by statehub fix-consistency C-06 / C-11 / C-32.

The production fleet sweep is disabled and is not the interactive recovery path. Repo Manager provides a bounded on-demand registrar for one clean, up-to-date repository at a time:

uv run --project ~/repo-manager rmgr registrar-reconcile \
  --path /path/to/repo --confirm-primary --push

The command verifies the authoritative State Hub health endpoint, refuses dirty or ahead/behind branches and retired Gitea origins, serializes local registrar runs, and grants STATEHUB_REGISTRAR=1 only to its scoped child process. Agents must not export that variable themselves. If the command is unavailable, send one deduplicated request to repo-manager; repeated fix-consistency runs cannot resolve the gate and waste execution time.

Work: RMGR-WP-0005-T01.