state-hub/scripts
tegwick b564ac7046
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 4s
C-33: generated per-repo work-record index (CUST-WP-0061-T04)
First cut of the transclusion-style index named in the stage-3 seed: a
WORK-RECORDS.md at repo root listing kind/id/status/lane/source for
every workplan, task, intake, decision, and engagement found in the
repo -- derived purely from files (no hub query), matching the ADR-001
rebuild principle. Full markitect transclusion rendering is a
follow-on, not this first cut.

- _generate_work_record_index(): reuses iter_workplan_files/
  parse_frontmatter/get_tasks_from_workplan for workplan+task rows,
  and the repo-wide yaml-block scan already proven by C-31/C-32 for
  intake/decision/engagement rows. Archived workplans excluded (index
  is for current orientation, not history); closed decisions/intakes/
  engagements stay listed. Returns None (no file written) for repos
  with zero work records, to avoid clutter.
- _check_work_record_index_freshness(): C-33, WARN+fixable when
  WORK-RECORDS.md is missing or its content differs from a fresh
  regeneration.
- fix_repo C-33 dispatch: overwrites the file with the regenerated
  content.

13 new tests (generation across all kinds, sort order, archived
exclusion, self-scan exclusion, freshness detection incl. idempotence).
No regressions: full repo suite green (561 tests).

Live-verified at two scales: binky-control (5 workplans, 31 tasks, 3
intake, 4 decisions, 5 engagements) and the-custodian (52 workplans,
332 tasks) -- both generated correctly on first run, confirmed
idempotent (identical second run produces no C-33 fix), and the larger
repo's scan added no material overhead to the existing ~1.5min
fix-consistency run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 01:25:26 +02:00
..
project_rules Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
backfill_codex_token_events.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
benchmark_summary_cache.py feat(summary): revision-gated cache with stale-while-revalidate (STATE-WP-0066) 2026-06-22 16:27:32 +02:00
bootstrap-env.sh Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
capture_legacy_meter_evidence.py Add 8-hour default window for legacy-meter deploy monitoring 2026-07-09 01:36:02 +02:00
capture_sbom_tools.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
check_doi.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
cleanup_stale_tasks.py STATE-WP-0070: identity headers, archive 0069, phase-2 workplan 2026-07-09 00:39:09 +02:00
codex-state-hub-mcp.sh chore: update standalone state hub wiring 2026-05-17 20:01:21 +02:00
compare_consistency_sweep_parallel.py finish(STATE-WP-0064): cut over scheduler and split sweep errors from failures 2026-06-22 01:20:59 +02:00
complete_statehub_bootstrap.py Extend complete_statehub_bootstrap for five Forgejo-migrated repos 2026-07-08 15:14:48 +02:00
consistency_check.py C-33: generated per-repo work-record index (CUST-WP-0061-T04) 2026-07-21 01:25:26 +02:00
dev_hub_up.sh feat(dev-hub): custodian dev up and files-first local hub (CUST-WP-0054-T07) 2026-07-08 11:42:49 +02:00
ensure_gitignore_claude_rules.py Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
gitea_inventory.py feat(CUST-WP-0014): repo sync automation & Gitea inventory 2026-03-16 01:41:16 +01:00
ingest_capabilities.py feat(capability-requests): add cross-domain capability catalog and request routing 2026-03-19 21:07:50 +01:00
ingest_sbom.py fix(api): normalize trailing slashes — no slash on param routes 2026-04-26 15:13:01 +02:00
ingest_tpsc.py feat(tpsc): Third-Party Services Catalog (CUST-WP-0023) 2026-03-20 00:15:26 +01:00
install_hooks.sh chore: add local consistency sync cli 2026-07-02 00:15:16 +02:00
mcp_hub_profile.sh feat(dev-hub): custodian dev up and files-first local hub (CUST-WP-0054-T07) 2026-07-08 11:42:49 +02:00
mcp_registration.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
migrate_mcp_config.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
normalize_attached_repo_workplans.py Fix workplan frontmatter join and prefix inference (STATE-WP-0067) 2026-06-22 23:16:15 +02:00
patch_mcp_cwd.py Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
project_claude_md.template feat(register): modular @-import CLAUDE.md structure (ops-bridge pattern) 2026-03-16 18:35:02 +01:00
promote_intake.py CUST-WP-0061-T03: the promotion transition (statehub promote-intake) 2026-07-21 01:06:01 +02:00
propagate_credential_routing.py Add shared credential-routing template and propagation tooling 2026-06-18 22:48:43 +02:00
pull_image.py Add state-hub v0.1 — local-first state service for the Custodian 2026-02-24 17:47:49 +01:00
push-seal.md Load limiting safeguards 2026-05-06 04:04:53 +02:00
recently_on_scope.py Implement RecentlyOnScope domain digest 2026-05-22 13:45:53 +02:00
register-mcp.sh Rename MCP server identifier from state-hub to dev-hub 2026-06-22 20:46:14 +02:00
register_from_classification.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
register_project.sh Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
repo_sync.py feat(consistency): T04 push seal — closed-loop writeback for automated commits 2026-04-21 01:43:40 +02:00
seed.py feat(api): CUST-WP-0018 — API hardening & code quality 2026-03-18 02:17:04 +01:00
seed_wp0012_suggestions.py Finish CUST-WP-0011 and implement STATE-WP-0061 suggestion backlog. 2026-07-06 10:52:49 +02:00
smoke_dashboard_load.sh Optimize dashboard overview loading 2026-06-06 00:42:00 +02:00
spine_migration_data.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
spine_migration_dry_run.py feat(classification-spine): implement STATE-WP-0065 repo-anchored model 2026-06-22 13:52:13 +02:00
task_token_hook.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
token_reconcile.py Fixed and improved token tracking 2026-05-23 13:59:05 +02:00
update_agent_instruction_files.py Add gitignore-claude template and wire into registration flows 2026-07-08 15:06:18 +02:00
validate_repo_adr.py STATE-WP-0070: identity headers, archive 0069, phase-2 workplan 2026-07-09 00:39:09 +02:00