Implement REUSE-WP-0013 registry establish, update, and stats
Some checks failed
ci / validate-registry (push) Has been cancelled

Add stats, establish (scaffold, publish-check, discover), and update CLI
commands with optional llm-connect bridge, validate --root for sibling repos,
pytest coverage, and documentation for sibling registry onboarding.
This commit is contained in:
2026-06-16 01:21:01 +02:00
parent fb712b4b98
commit 70a5003f6e
19 changed files with 1740 additions and 30 deletions

View File

@@ -104,6 +104,45 @@ reuse-surface hub sync --dry-run
Run the service locally: `REUSE_SURFACE_TOKEN=dev-token reuse-surface serve`
### stats
Registry maturity aggregates and federation readiness.
```bash
reuse-surface stats
reuse-surface stats --format json
reuse-surface stats --federation-ready --raw-url https://.../capabilities.yaml
```
### establish
Bootstrap or discover a capability registry in the current or target repo.
```bash
reuse-surface establish --scaffold --domain helix_forge
reuse-surface establish --scaffold --path ../state-hub
reuse-surface establish --publish-check --raw-url https://.../capabilities.yaml
export LLM_CONNECT_URL=http://127.0.0.1:8088
reuse-surface establish --discover --dry-run
reuse-surface establish --discover --apply
```
`--scaffold` creates `registry/` layout. `--publish-check` probes raw URL and
local index YAML. `--discover` drafts capabilities via llm-connect (optional).
### update
Refresh registry metadata from repo drift signals.
```bash
reuse-surface update --capability capability.registry.register --dry-run
reuse-surface update --all --from-git-since HEAD~5 --apply
reuse-surface update --capability capability.registry.register --suggest-maturity
```
Deterministic patches (`vector_drift`, new `tests/` citations) apply with
`--apply`. LLM suggestions use `--suggest-maturity` and remain review-only.
### report cohorts
Export capability cohorts for planning or implementation reuse decisions.
@@ -140,6 +179,11 @@ Stable IDs and maturity fields are preserved for agent consumption (UC-RS-019).
| Publish catalog | `reuse-surface catalog` |
| Compose federation | `reuse-surface federation compose` |
| Sync federation manifest from hub | `reuse-surface hub sync` |
| Registry stats | `reuse-surface stats` |
| Bootstrap sibling registry | `reuse-surface establish --scaffold` |
| Verify index publish URL | `reuse-surface establish --publish-check` |
| Draft capabilities (LLM) | `reuse-surface establish --discover` |
| Refresh entry metadata | `reuse-surface update` |
| Planning cohort export | `reuse-surface report cohorts` |
| Relation graph | `reuse-surface graph` |