reuse-surface/reuse_surface
tegwick bca7165e02
Some checks failed
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
ci / validate-registry (push) Has been cancelled
Build and Publish Container Image / build-and-push (push) Successful in 1m23s
REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence
reuse_surface/reports.py: collect_reuse_events() merges the hub's
GET /v1/reuse-events (if reachable) with this repo's local JSONL fallback,
deduped. collect_reuse_report() aggregates per-capability consumer counts,
outcome breakdown, and last-used. collect_reused_by_suggestions() proposes
evidence-gated relation_add patches -- only for capabilities this repo
owns, only for consumer repos not already listed -- reusing the existing
patches.py:apply_patches mechanism (relation_add already isn't in
SAFE_DETERMINISTIC_KINDS, so it was already never auto-applied by
maintain --auto).

New CLI: reuse-surface report reuse [--capability-id] [--format]
[--suggest-relations] [--apply]. --apply requires --suggest-relations and
is the only thing that writes -- nothing happens automatically from
telemetry alone.

schemas/capability.schema.yaml: added relations.reused_by as a new
repoSlugList type, distinct from the existing capability-id relations,
since reused-by targets are consumer repo slugs.

specs/CapabilityMaturityStandard.md Sec8.9: what observed-reuse evidence
counts toward R2->R3 (single corroborating consumer) vs R3->R4+ (multiple
independent consumers) and what it never substitutes for.

19 new pytest cases, 162 total pass. Live-verified with synthetic local
events against a real capability entry: --suggest-relations --apply
correctly wrote relations.reused_by via the real apply_patches path
(reverted after, since it was a smoke test).

Deliberately deferred: surfacing consumer counts in the catalog/graph --
graph.py's relation model is capability-to-capability edges, a different
namespace than repo-slug reused_by targets; catalog.py doesn't currently
parse full front matter per entry. Left for a follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:47:51 +02:00
..
hub REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
__init__.py Complete REUSE-WP-0003: registry CLI, docs alignment, and coverage 2026-06-15 01:12:09 +02:00
catalog.py Complete WP-0006 through WP-0009: registry expansion, catalog, graph, tests 2026-06-15 02:24:20 +02:00
cli.py REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence 2026-07-07 22:47:51 +02:00
establish.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
federation.py Implement WP-0011 hub service, CLI, and deployment artifacts 2026-06-15 08:48:06 +02:00
forge_host.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
graph.py Complete REUSE-WP-0005: registry federation and relation graphs 2026-06-15 01:43:02 +02:00
hub_client.py REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
hub_sync.py Implement REUSE-WP-0012 federation scale and intent alignment 2026-06-16 00:42:50 +02:00
interactive.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
llm_bridge.py Implement REUSE-WP-0013 registry establish, update, and stats 2026-06-16 01:21:01 +02:00
maintain.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
maintain_llm.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
overlaps.py Complete REUSE-WP-0004: CI, overlap detection, and catalog generation 2026-06-15 01:20:31 +02:00
patches.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
plan_check.py REUSE-WP-0019-T04: reuse telemetry store and recording 2026-07-07 22:32:19 +02:00
registry.py WP-0016 finished: interactive registry maintain with llm-connect automation 2026-06-18 04:00:39 +02:00
registry_update.py REUSE-WP-0019-T01: forge host abstraction + URL migration inventory 2026-07-07 18:14:30 +02:00
reports.py REUSE-WP-0019-T05: reuse telemetry aggregation into R-axis evidence 2026-07-07 22:47:51 +02:00
statehub_bridge.py REUSE-WP-0018 T01/T02/T04/T06: plan-check deterministic matching + State Hub bridge 2026-07-07 00:57:18 +02:00
stats.py REUSE-WP-0014: T11 docs, roster stats, workplan finished 2026-06-16 02:09:57 +02:00