Commit Graph

75 Commits

Author SHA1 Message Date
977d0814de chore(workplan): mark CUST-WP-0033 done — all tasks completed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 15:31:29 +02:00
2cd3099ebf feat(canon): add Interface Change Registry concept and workplan
Concept doc captures the design for coordinated API evolution in agent
ecosystems: InterfaceChange entity, draft→published→resolved lifecycle,
TPSC-derived dependency routing, inbox-based notifications, pre-change
coordination via planned_for, and deliberate deferral of webhooks.

CUST-WP-0033 workplan: 6 tasks (model, API, dispatch integration,
MCP tools, dashboard, webhook EP).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 15:13:11 +02:00
9bc761c2b5 feat(railiance): implement CUST-WP-0032 Haskell build machine infra
Packer build definition, cloud-init autoinstall, GHCup toolchain script,
boot-time registration agent (state-hub + autossh dual tunnel), systemd
unit, key injection, remote-build Makefile, smoke test, and deployment
README. All 15 tasks complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 12:01:30 +02:00
efe1387ede refine(CUST-WP-0032): incorporate all four architecture decisions
- Packer uses NAT during build; setup-vm.sh does post-import bridged config
- Bake GHC 9.8.4 (primary) + 9.6.6 (LTS coverage); drop Stack + HLS
- state-hub always via forward tunnel port 18000 (CoulombCore pattern)
- autossh opens -R (reverse SSH) + -L 18000 (state-hub forward) together
- Decisions section replaces Open Questions; all four resolved 2026-04-20

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 01:05:28 +02:00
f432b76613 feat(railiance): add CUST-WP-0032 Haskell build machine workplan
15-task plan across 5 phases: Packer VirtualBox image, boot-time
registration agent (POST /capability-catalog/), autossh SSH bridge
integration (ports 12221-12230), state-hub capability bootstrap,
and remote build Makefile workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 01:00:26 +02:00
d58ef71339 feat(capability-registry): CUST-WP-0031 domain capability registry
- Migration p3k4l5m6n7o8: nullable repo_id FK on capability_catalog
- PATCH /capability-catalog/{id} endpoint for back-filling repo attribution
- register_capability MCP tool accepts optional repo_slug
- get_domain_summary now includes compact capabilities list (type+title+repo_slug)
- New get_capability_profile MCP tool: domain → repos → capabilities tree
- 6 repo descriptions populated; 25 catalog entries attributed to repos
- 9 new capabilities registered for personhood, foerster_capabilities, coulomb_social
- TOOLS.md: Capability Catalog & Requests section with full tool reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 17:23:45 +02:00
36db3c4ec7 feat(workplan): CUST-WP-0031 domain capability registry
7-task workplan to give worker agents efficient MCP access to domain/repo
scope and capabilities without exploring source repos directly.

Phase 1 (code): repo_id FK on CapabilityCatalog, capabilities in
get_domain_summary, new get_capability_profile MCP tool.
Phase 2 (data): populate missing repo descriptions, back-fill repo_id
on 25 existing entries, register capabilities for 3 empty domains.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 16:49:21 +02:00
f5c166e77e feat(dashboard): add repo filter, sort order, and max results controls to Token Cost page
Three reactive dropdowns below the Token Cost heading:
- Filter by repo: client-side filter via 3-level chain resolution
- Sort by: Tokens Total (default), Tokens In, Out, Event Count, Most Recent
- Show: 10/20/50/100/500 rows per table (default 20)

Applies uniformly to By Repo, By Workplan, and Top Tasks tables.
"Most Recent" derives last_event_at per group from the fetched events.
Truncated tables show a "Showing M of N" count below.

Completes CUST-WP-0030 T07–T09.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 00:02:17 +02:00
fc5a55a27a chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T09: todo → done
2026-03-29 23:59:22 +02:00
4b79c243dc chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T08: todo → done
2026-03-29 23:59:22 +02:00
6744ad5f74 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T07: todo → done
2026-03-29 23:59:22 +02:00
20ce332d55 feat(dashboard): entity list UX — REF column, name cells, detail pages (CUST-WP-0030)
- ref-cell.js: REF column component — click=copy deeplink, dblclick=open
- field-help.js: field registry + fieldRow helper with help-tip decoration;
  FK fields (task_id, workstream_id, repo_id) render as async-linked cells
  with entity-title bubble-help on hover
- GET /token-events/{id} endpoint + get-by-id tests
- GET /repos/by-id/{repo_id} UUID lookup endpoint
- Landing pages: /token-events/[id], /workstreams/[id], /repos/[slug], /tasks/[id]
- token-cost.md: REF + Name columns on all three tables; parallel fetch of
  workstreams/tasks for title resolution
- reference.md: entity detail page URL scheme documented

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 22:35:35 +02:00
3e54cb05c8 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T06: todo → done
2026-03-29 20:38:00 +02:00
943be6fb97 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T05: todo → done
2026-03-29 19:55:58 +02:00
99a8ba66e9 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T04: todo → done
2026-03-29 19:55:58 +02:00
94aee3d845 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T03: todo → done
2026-03-29 19:55:58 +02:00
df84198c2e chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T02: todo → done
2026-03-29 19:55:58 +02:00
b36e7d469c chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - T01: todo → done
2026-03-29 19:55:58 +02:00
d65bc701da feat(token-tracking): record AI token consumption per task (CUST-WP-0029)
Introduces end-to-end token consumption tracking so agent work is
visible as a cost/effort metric alongside tasks and workplans.

- Migration o2j3k4l5m6n7: token_events table with FK indexes on
  task_id, workstream_id, repo_id, created_at
- ORM model, Pydantic schemas (TokenEventCreate, TokenEventRead with
  computed tokens_total, TokenSummary)
- Router: POST /token-events/, GET /token-events/ (7 filters),
  GET /token-events/summary/ (task|workstream|repo|commit|release scope)
- MCP tools: record_token_event, get_token_summary (formatted table)
- update_task_status enriched with optional tokens_in/tokens_out
  passthrough — one call creates status update + token event
- Dashboard token-cost.md page: by-repo bar, by-workplan table,
  by-model bar, top-10 tasks by tokens
- ralph-workplan skill updated with token reporting guidance and
  per-task heuristics for estimating counts
- Tests: test_token_events.py + test_token_passthrough.py (182 pass)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 17:46:46 +02:00
af592401c0 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T07: todo → done
2026-03-29 16:26:24 +02:00
aaca84dd46 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T06: todo → done
2026-03-29 16:26:24 +02:00
422d869309 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T05: todo → done
2026-03-29 16:26:24 +02:00
dc49ef13b7 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T04: todo → done
2026-03-29 16:26:24 +02:00
c87a74904c chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T03: todo → done
2026-03-29 16:26:24 +02:00
c76ee32206 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T02: todo → done
2026-03-29 16:26:24 +02:00
b5c5ed8815 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-29:
  - CUST-WP-0029-T01: todo → done
2026-03-29 16:26:24 +02:00
77a28d242c fix(wp-0028): correct T06 state_hub_task_id after checker resequence 2026-03-27 02:11:47 +01:00
66a7cd19f1 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-27:
  - CUST-WP-0028-T06: todo → done
2026-03-27 01:02:15 +01:00
f2bde496cb chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-27:
  - CUST-WP-0028-T06: todo → cancelled
2026-03-27 01:01:43 +01:00
d061c777d1 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-27:
  - update .custodian-brief.md for the-custodian
2026-03-27 00:52:18 +01:00
f1b72aab82 chore(workplan): mark CUST-WP-0026 done — all tasks completed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 12:16:33 +01:00
626061dff1 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - CUST-WP-0026-T05: todo → done
2026-03-26 11:41:51 +01:00
9d538fa80b chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - CUST-WP-0026-T04: todo → done
2026-03-26 11:41:50 +01:00
84306d1a7a chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - CUST-WP-0026-T03: todo → done
2026-03-26 11:41:50 +01:00
a48c59793c chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - CUST-WP-0026-T02: todo → done
2026-03-26 11:41:50 +01:00
7cbc5751d4 chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-03-26:
  - CUST-WP-0026-T01: todo → done
2026-03-26 11:41:50 +01:00
efbbef76b0 feat(capability-requests): add routing dispute & reroute workflow (CUST-WP-0027)
Adds a structured dispute mechanism when capability request routing is wrong:
- New `routing_disputed` status with four DB columns (dispute_reason, disputed_by,
  dispute_suggested_domain, disputed_at) via Alembic migration m0h1i2j3k4l5
- POST /capability-requests/{id}/dispute — any party can flag misrouting with a reason
  and optional suggested domain; notifies custodian + current fulfilling domain
- POST /capability-requests/{id}/reroute — custodian re-routes to correct domain via
  catalog_entry_id or direct slug; appends audit trail to routing_note; resets to requested
- Two new MCP tools: dispute_capability_routing and reroute_capability_request
- Dashboard: amber disputed-banner at top of Summary, routing_disputed Kanban column,
  dispute details (reason, suggested domain, raised-by) shown on disputed cards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:58:52 +01:00
e31693ad67 feat(workplan): CUST-WP-0027 — capability request dispute & negotiation
Adds a routing_disputed status, dispute/reroute endpoints, MCP tools,
and dashboard highlighting so any agent can flag a misrouting and
negotiate before a request is accepted.

Also rerouted 0e0aefd7 (KeyCape GHCR image) from railiance → netkingdom
and created netkingdom catalog entry for container image publishing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:42:25 +01:00
ad3024e55f feat(workplan): CUST-WP-0026 — distributed consistency for multi-machine state sync
Addresses false status regressions when work progresses on CoulombCore
via ops-bridge but local workplan files are stale. Three-layer fix:
T01 no-regress rule (C-13), T02 pull gate (C-14), T03 DB→file writeback.
Plus session protocol update and fix-consistency-remote Makefile target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 01:04:00 +01:00
0777e5b2f0 feat: add FOS/credential standards, big-picture guidance, and CUST-WP-0025 workplan
- canon/standards/credential-management_v0.1.md: single root-of-trust credential hierarchy standard
- canon/standards/federated-organization-standard_v1.0.md: FOS reference architecture (VSM-based)
- wiki/BigPictureGuidance.md: integration guidance for OAS + FOS orthogonal layers
- workplans/CUST-WP-0025-fos-hub-bootstrap.md: 4-phase plan (identity, hub-core extraction, ops-hub, fin-hub)
- state-hub/Makefile: treat exit 2 (warnings-only) as success in check-consistency targets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 23:48:13 +01:00
f94ee008b5 feat(doi): Repository DoI automated gate and dashboard integration (CUST-WP-0024)
Implements the 14-criterion DoI checklist as a runnable gate with API,
MCP tools, CLI script, and dashboard integration.

Core components:
- api/doi_engine.py — async engine evaluating all 14 criteria (asyncio.to_thread
  for non-blocking HTTP self-calls), shared by API and CLI
- api/schemas/doi.py — DoICriterion, DoIReport, DoISummaryEntry schemas
- api/routers/repos.py — GET /repos/{slug}/doi + GET /repos/doi/summary
- scripts/check_doi.py — CLI: make check-doi REPO=<slug> / check-doi-all
- mcp_server/server.py — check_repo_doi(), get_doi_summary() tools

Dashboard (repos.md):
- DoI tier badge per repo (None/Core/Standard/Full) colour-coded red→green
- Domain block shows lowest DoI tier across its repos
- DoI KPI card in summary row
- DoI filter in All Repos Table
- Link to Repository DoI policy page

Also fixes: TPSC snapshots 500 error (missing nested selectinload for
catalog_entry relationship in list_snapshots endpoint).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 01:08:18 +01:00
c7a893f068 feat(tpsc): Third-Party Services Catalog (CUST-WP-0023)
Introduces TPSC for tracking external service dependencies with GDPR
compliance maturity (CNIL/IAPP CMMI scale), pricing model, ToS, and
data retention information across all repos.

Primary data:
- canon/tpsc/{openai,anthropic,gemini,openrouter}-api.yaml — service definitions
- tpsc.yaml in each repo (llm-connect seeded with 4 services)

State-hub additions:
- Migration j7e8f9a0b1c2: tpsc_catalog + tpsc_snapshots + tpsc_entries
- api/models/tpsc.py, api/schemas/tpsc.py, api/routers/tpsc.py
- /tpsc/catalog/, /tpsc/ingest/, /tpsc/snapshots/, /tpsc/report/gdpr endpoints
- 4 MCP tools: register_service, list_services, ingest_tpsc_tool, get_gdpr_report
- scripts/ingest_tpsc.py + make ingest-tpsc[/-all] targets
- Dashboard: tpsc.md page + docs/tpsc.md

GDPR maturity scale: unknown | non_compliant | initial | developing | defined | managed | certified
Warnings triggered at: unknown, non_compliant, initial

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:15:26 +01:00
f85c5e4d49 feat(capability-requests): add cross-domain capability catalog and request routing
Introduces a capability catalog (CUST-WP-0022) so domains can advertise what
they provide and agents can request capabilities from other domains with
auto-routing, lifecycle tracking, and task-unblocking on completion.

- New models: CapabilityCatalog, CapabilityRequest with full lifecycle
  (requested → accepted → in_progress → ready_for_review → completed/rejected/withdrawn)
- Migration i6d7e8f9a0b1: capability_catalog + capability_requests tables
- Router /capability-catalog and /capability-requests with accept/status endpoints
- 7 new MCP tools: register_capability, list_capabilities, request_capability,
  accept_capability_request, update_capability_request_status,
  list_capability_requests, get_capability_request
- StateSummary gains open_capability_requests count
- Dashboard: capability-requests.md page + docs/capabilities.md + docs/scope.md
- SCOPE.md: three seed capabilities documented (MCP registration, state tracking, SBOM)
- scope.template: Provided Capabilities section with example block
- scripts/ingest_capabilities.py + make ingest-capabilities[/-all] targets

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:07:50 +01:00
27eb6b14ad feat(CUST-WP-0021): multi-host repo path hardening — all 5 tasks complete
- T01 (done prior): registered host_paths for bnt-lap001 (14 repos) and
  COULOMBCORE (6 repos) via POST /repos/{slug}/paths/
- T02: validate_repo_adr now accepts repo_slug (not raw path); resolves
  local path via host_paths[hostname] → local_path; clear error for
  unregistered/missing paths
- T03: ingest_sbom_tool lockfile_path is now optional and relative to
  resolved repo root; absolute paths accepted with deprecation warning
- T04: check_repo_consistency pre-flight guard — fetches repo, resolves
  path, returns clear error before spawning subprocess if path missing
- T05: TOOLS.md — updated validate_repo_adr row (slug not path);
  added Multi-Host & Remote Agent Usage section documenting design
  boundary, remote agent workflow, and update_repo_path usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:53:25 +01:00
60b72a7b1d feat(workplan): CUST-WP-0021 multi-host repo path hardening
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:47:15 +01:00
ec92c8e95e feat(tests): pytest-asyncio test suite — 119 tests across 3 modules
Infrastructure (T01):
- tests/conftest.py: sync schema setup (psycopg2), per-test table
  truncation, async ASGI client with get_session override
- pyproject.toml: [tool.pytest.ini_options] asyncio_mode=auto
- Makefile: make test target with TEST_DATABASE_URL

Core router tests (T02): 19 tests
- domains, topics, workstreams, tasks, decisions + state summary
- Caught real bug: topic router missing duplicate-slug 409 guard (fixed)

TD/EP/Contributions/SBOM tests (T03): 10 tests
- CRUD + status transitions + lifecycle guard + SBOM ingest

MCP smoke tests (T04): 12 tests
- get_state_summary, create_task, update_task_status,
  add_progress_event, flag_for_human HTTP shapes

CI gate (T05): make test documented in CLAUDE.md session protocol

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 12:00:06 +01:00
9aa54f8133 feat(api): CUST-WP-0018 — API hardening & code quality
T01: Fix datetime.utcnow() → datetime.now(tz=timezone.utc) in MCP server
T02: Wrap _get/_post/_patch/_delete with try/except; return error dicts
T03: Log warnings when write_log skips missing project path
T04: Add priority + due_date_before filters to GET /tasks/
T05: Add owner + slug filters to GET /workstreams/
T06: Add offset param to GET /progress/ for proper pagination
T07: Low-severity bundle:
  - CORS origins from CORS_ORIGINS env var (TD-017)
  - seed.py upsert domains+topics on re-run (TD-011)
  - normalise filter bar CSS → filter-text-input everywhere (TD-016)
  - add 30.5 avg-days-per-month comment in decisions.md (TD-019)
  - TD-009, TD-018 already resolved by existing code

Closes CUST-WP-0018.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 02:17:04 +01:00
02b7d4ae62 feat(dashboard): CUST-WP-0019 — Repository nav section, config.js cleanup
T01: Restructure nav — "Repos" → collapsible "Repository" section with
     Repo Sync, SBOM, Debt as sub-pages; Debt moved out of Workstreams
T02: workstream-dod.md migrated from inline const API to config.js import
T03: todo.md suggestion filter (done in previous commit)

Closes CUST-WP-0019. Resolves UI suggestion c2fc284a.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 02:01:10 +01:00
fa70641dae chore(workplans): inject state_hub_workstream_id and task IDs from fix-consistency
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 01:58:26 +01:00
2dfbb19a8f feat(workplans): CUST-WP-0018/0019/0020 — API hardening, dashboard UX polish, test suite
Consolidates all open technical debt into three workplans:
- CUST-WP-0018: API hardening & code quality (TD-006–019 medium/high items)
- CUST-WP-0019: Dashboard UX polish (Repos nav restructure, config.js cleanup,
  todo filter fix for new suggestion workflow statuses)
- CUST-WP-0020: pytest test suite with real DB (TD-014)

Also fixes todo.md Suggestions filter: was checking status===open but new
suggestions enter with status=submitted; now excludes terminal statuses only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 01:55:37 +01:00