feat(capability-requests): add routing_note, PATCH endpoint, word-boundary fix, and ops-bridge tunnel targets
- Add `routing_note` column (migration l9g0h1i2j3k4) to persist why a request was routed to a given domain
- Fix substring-match bug in `_route_capability`: use `\b` word-boundary regex so 'postgres' no longer matches inside 'postgresql'
- Include `title` in keyword scoring for better routing accuracy
- Return `routing_note` string from `_route_capability` and store it on the request
- Add `PATCH /capability-requests/{id}` endpoint + `CapabilityRequestPatch` schema to correct mutable metadata (catalog_entry_id, priority, blocking_task_id, fulfilling_workstream_id)
- Add `patch_capability_request` MCP tool wrapping the new endpoint
- Add 105 lines of routing tests (word-boundary, title-match, multi-entry scoring, broadcast fallback)
- Add `tunnels-up`, `tunnels-status`, `tunnels-check` Makefile targets for ops-bridge managed tunnels
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 03:47:54 +01:00
|
|
|
.PHONY: install install-cli db db-tools migrate seed api dashboard check test clean register-project validate-adr add-domain rename-domain add-repo list-repos register-path cleanup-stale tunnel tunnel-daemon tunnel-loop tunnel-status tunnel-stop tunnels-up tunnels-status tunnels-check install-hooks install-hooks-all gitea-inventory
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
|
|
|
|
|
COMPOSE = docker compose -f infra/docker-compose.yml --env-file .env
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
uv sync
|
|
|
|
|
|
2026-02-24 22:55:41 +01:00
|
|
|
## Symlink the custodian CLI into ~/.local/bin so it's on PATH system-wide
|
|
|
|
|
install-cli: install
|
|
|
|
|
mkdir -p ~/.local/bin
|
|
|
|
|
ln -sf "$(shell pwd)/.venv/bin/custodian" ~/.local/bin/custodian
|
|
|
|
|
@echo "Installed: custodian → $$(readlink -f ~/.local/bin/custodian)"
|
|
|
|
|
@echo "Make sure ~/.local/bin is on your PATH:"
|
|
|
|
|
@echo " echo 'export PATH=\"\$$HOME/.local/bin:\$$PATH\"' >> ~/.bashrc && source ~/.bashrc"
|
|
|
|
|
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
db:
|
|
|
|
|
$(COMPOSE) up -d postgres
|
|
|
|
|
|
|
|
|
|
db-tools:
|
|
|
|
|
$(COMPOSE) --profile tools up -d
|
|
|
|
|
|
|
|
|
|
migrate:
|
|
|
|
|
uv run alembic upgrade head
|
|
|
|
|
|
|
|
|
|
seed:
|
|
|
|
|
uv run python scripts/seed.py
|
|
|
|
|
|
2026-03-19 00:05:56 +01:00
|
|
|
## Start (or restart) the MCP SSE server on :8001 — primary transport for Claude Code.
|
|
|
|
|
## Remote clients (e.g. COULOMBCORE) connect via the ops-bridge tunnel (port 18001).
|
|
|
|
|
## Registration: claude mcp add-json -s user state-hub '{"type":"sse","url":"http://127.0.0.1:8001/sse"}'
|
2026-03-16 00:13:14 +01:00
|
|
|
mcp-http:
|
2026-03-19 00:05:56 +01:00
|
|
|
@fuser -k 8001/tcp 2>/dev/null && echo "Stopped running MCP server" || true
|
2026-03-16 00:13:14 +01:00
|
|
|
MCP_TRANSPORT=sse MCP_PORT=8001 uv run python mcp_server/server.py
|
|
|
|
|
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
dashboard:
|
2026-03-18 23:18:31 +01:00
|
|
|
@fuser -k 3000/tcp 2>/dev/null && echo "Stopped running dashboard" || true
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
cd dashboard && npm run dev
|
|
|
|
|
|
|
|
|
|
check:
|
|
|
|
|
curl -sf http://127.0.0.1:8000/state/health | python3 -m json.tool
|
|
|
|
|
|
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
|
|
|
test:
|
|
|
|
|
TEST_DATABASE_URL=postgresql+asyncpg://custodian:changeme@127.0.0.1:5432/custodian_test \
|
|
|
|
|
uv run pytest -x -q
|
|
|
|
|
|
feat(ops+workplans): fix tunnel targets, plan custodian migration, close legacy ADR-001 gaps
Tunnel (state-hub/Makefile):
- Replace interactive `make tunnel` (now non-blocking with -N flag)
- Add tunnel-daemon (autossh background), tunnel-loop (reconnect fallback),
tunnel-status, tunnel-stop
- Default COULOMBCORE=tegwick@92.205.130.254; TUNNEL_PORT configurable
- Clarified server topology: COULOMBCORE=92.205.130.254 (old),
Railiance01=92.205.62.239 (ThreePhoenix node 1)
Workplans:
- CUST-WP-0011: Migrate Custodian State Hub to ThreePhoenix cluster —
9-task plan with hard pre-condition gates (3-node cluster, Longhorn HA,
backup drill), data migration, 2-week stabilisation, WSL2 retirement
- CUST-WP-0000: Retroactive record for state-hub v0.1 (pre-ADR-001)
- CUST-WP-0000b: Retroactive record for state-hub v0.2 (pre-ADR-001)
Consistency: repo now ✓ PASS (0 fail, 18 warn — all pre-ADR-001 C-12 history)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 01:09:07 +01:00
|
|
|
## COULOMBCORE host (default target for tunnel targets)
|
|
|
|
|
COULOMBCORE ?= tegwick@92.205.130.254
|
|
|
|
|
TUNNEL_PORT ?= 8000
|
|
|
|
|
|
|
|
|
|
## Foreground reverse tunnel — good for debugging. Ctrl-C to stop.
|
|
|
|
|
## Usage: make tunnel HOST=tegwick@92.205.130.254
|
2026-03-10 01:19:38 +01:00
|
|
|
tunnel:
|
|
|
|
|
@test -n "$(HOST)" || (echo "ERROR: HOST is required. Usage: make tunnel HOST=user@hostname"; exit 1)
|
feat(ops+workplans): fix tunnel targets, plan custodian migration, close legacy ADR-001 gaps
Tunnel (state-hub/Makefile):
- Replace interactive `make tunnel` (now non-blocking with -N flag)
- Add tunnel-daemon (autossh background), tunnel-loop (reconnect fallback),
tunnel-status, tunnel-stop
- Default COULOMBCORE=tegwick@92.205.130.254; TUNNEL_PORT configurable
- Clarified server topology: COULOMBCORE=92.205.130.254 (old),
Railiance01=92.205.62.239 (ThreePhoenix node 1)
Workplans:
- CUST-WP-0011: Migrate Custodian State Hub to ThreePhoenix cluster —
9-task plan with hard pre-condition gates (3-node cluster, Longhorn HA,
backup drill), data migration, 2-week stabilisation, WSL2 retirement
- CUST-WP-0000: Retroactive record for state-hub v0.1 (pre-ADR-001)
- CUST-WP-0000b: Retroactive record for state-hub v0.2 (pre-ADR-001)
Consistency: repo now ✓ PASS (0 fail, 18 warn — all pre-ADR-001 C-12 history)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 01:09:07 +01:00
|
|
|
@echo "Opening reverse tunnel → $(HOST) (remote :$(TUNNEL_PORT) → local :$(TUNNEL_PORT))"
|
2026-03-10 01:19:38 +01:00
|
|
|
@echo "Keep this terminal open. Ctrl-C to close the tunnel."
|
feat(ops+workplans): fix tunnel targets, plan custodian migration, close legacy ADR-001 gaps
Tunnel (state-hub/Makefile):
- Replace interactive `make tunnel` (now non-blocking with -N flag)
- Add tunnel-daemon (autossh background), tunnel-loop (reconnect fallback),
tunnel-status, tunnel-stop
- Default COULOMBCORE=tegwick@92.205.130.254; TUNNEL_PORT configurable
- Clarified server topology: COULOMBCORE=92.205.130.254 (old),
Railiance01=92.205.62.239 (ThreePhoenix node 1)
Workplans:
- CUST-WP-0011: Migrate Custodian State Hub to ThreePhoenix cluster —
9-task plan with hard pre-condition gates (3-node cluster, Longhorn HA,
backup drill), data migration, 2-week stabilisation, WSL2 retirement
- CUST-WP-0000: Retroactive record for state-hub v0.1 (pre-ADR-001)
- CUST-WP-0000b: Retroactive record for state-hub v0.2 (pre-ADR-001)
Consistency: repo now ✓ PASS (0 fail, 18 warn — all pre-ADR-001 C-12 history)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 01:09:07 +01:00
|
|
|
ssh -N -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" \
|
|
|
|
|
-R $(TUNNEL_PORT):127.0.0.1:$(TUNNEL_PORT) $(HOST)
|
|
|
|
|
|
|
|
|
|
## Background tunnel to COULOMBCORE with auto-reconnect.
|
|
|
|
|
## Uses autossh if available; prints install hint and exits if not.
|
|
|
|
|
## After running, COULOMBCORE can reach the State Hub at http://127.0.0.1:8000
|
|
|
|
|
tunnel-daemon:
|
|
|
|
|
@if command -v autossh >/dev/null 2>&1; then \
|
|
|
|
|
echo "Starting autossh tunnel → $(COULOMBCORE)"; \
|
|
|
|
|
autossh -f -N -M 0 \
|
|
|
|
|
-o "ServerAliveInterval=30" \
|
|
|
|
|
-o "ServerAliveCountMax=3" \
|
|
|
|
|
-o "ExitOnForwardFailure=yes" \
|
|
|
|
|
-R $(TUNNEL_PORT):127.0.0.1:$(TUNNEL_PORT) $(COULOMBCORE); \
|
|
|
|
|
echo "Tunnel running in background. Use 'make tunnel-status' to check."; \
|
|
|
|
|
else \
|
|
|
|
|
echo "autossh not found — install it: sudo apt-get install autossh"; \
|
|
|
|
|
echo "Fallback: run 'make tunnel-loop HOST=$(COULOMBCORE)' in a dedicated terminal."; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
## Reconnect loop — works without autossh. Run in a terminal you can leave open.
|
|
|
|
|
## Usage: make tunnel-loop HOST=tegwick@92.205.130.254
|
|
|
|
|
tunnel-loop:
|
|
|
|
|
@test -n "$(HOST)" || (echo "ERROR: HOST is required. Usage: make tunnel-loop HOST=user@hostname"; exit 1)
|
|
|
|
|
@echo "Reconnect loop → $(HOST). Ctrl-C to stop."
|
|
|
|
|
@while true; do \
|
|
|
|
|
echo "[$(shell date -u +%Y-%m-%dT%H:%M:%SZ)] Connecting..."; \
|
|
|
|
|
ssh -N -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" \
|
|
|
|
|
-o "ExitOnForwardFailure=yes" \
|
|
|
|
|
-R $(TUNNEL_PORT):127.0.0.1:$(TUNNEL_PORT) $(HOST) || true; \
|
|
|
|
|
echo "[$(shell date -u +%Y-%m-%dT%H:%M:%SZ)] Connection lost — retrying in 5s..."; \
|
|
|
|
|
sleep 5; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
## Check whether a tunnel is currently active
|
|
|
|
|
tunnel-status:
|
|
|
|
|
@if command -v autossh >/dev/null 2>&1 && pgrep -f "autossh.*$(TUNNEL_PORT)" > /dev/null 2>&1; then \
|
|
|
|
|
echo "autossh tunnel: RUNNING (PIDs: $$(pgrep -f 'autossh.*$(TUNNEL_PORT)' | tr '\n' ' '))"; \
|
|
|
|
|
elif pgrep -f "ssh.*-R $(TUNNEL_PORT)" > /dev/null 2>&1; then \
|
|
|
|
|
echo "ssh tunnel: RUNNING (PIDs: $$(pgrep -f 'ssh.*-R $(TUNNEL_PORT)' | tr '\n' ' '))"; \
|
|
|
|
|
else \
|
|
|
|
|
echo "Tunnel: NOT running"; \
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
## Stop any active tunnel (autossh or plain ssh)
|
|
|
|
|
tunnel-stop:
|
|
|
|
|
@pkill -f "autossh.*$(TUNNEL_PORT)" 2>/dev/null && echo "autossh stopped" || true
|
|
|
|
|
@pkill -f "ssh.*-R $(TUNNEL_PORT)" 2>/dev/null && echo "ssh loop stopped" || true
|
2026-03-10 01:19:38 +01:00
|
|
|
|
feat(capability-requests): add routing_note, PATCH endpoint, word-boundary fix, and ops-bridge tunnel targets
- Add `routing_note` column (migration l9g0h1i2j3k4) to persist why a request was routed to a given domain
- Fix substring-match bug in `_route_capability`: use `\b` word-boundary regex so 'postgres' no longer matches inside 'postgresql'
- Include `title` in keyword scoring for better routing accuracy
- Return `routing_note` string from `_route_capability` and store it on the request
- Add `PATCH /capability-requests/{id}` endpoint + `CapabilityRequestPatch` schema to correct mutable metadata (catalog_entry_id, priority, blocking_task_id, fulfilling_workstream_id)
- Add `patch_capability_request` MCP tool wrapping the new endpoint
- Add 105 lines of routing tests (word-boundary, title-match, multi-entry scoring, broadcast fallback)
- Add `tunnels-up`, `tunnels-status`, `tunnels-check` Makefile targets for ops-bridge managed tunnels
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 03:47:54 +01:00
|
|
|
## ops-bridge managed tunnels (preferred over tunnel-*/tunnel-daemon)
|
|
|
|
|
## Requires ops-bridge: bridge is at /home/worsch/.local/bin/bridge
|
|
|
|
|
tunnels-up:
|
|
|
|
|
bridge up
|
|
|
|
|
|
|
|
|
|
tunnels-status:
|
|
|
|
|
bridge status
|
|
|
|
|
|
|
|
|
|
## End-to-end check: verifies SSH process alive + remote port listening on COULOMBCORE.
|
|
|
|
|
## Exits non-zero if any tunnel is not fully operational.
|
|
|
|
|
tunnels-check:
|
|
|
|
|
bridge check
|
|
|
|
|
|
2026-03-18 23:20:45 +01:00
|
|
|
## Start (or restart) the full backend — db + migrate + uvicorn.
|
|
|
|
|
## Stops uvicorn on :8000 if already running, then starts fresh.
|
|
|
|
|
api: db
|
2026-03-18 23:16:44 +01:00
|
|
|
@echo "Waiting for postgres..."; \
|
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9 10; do \
|
|
|
|
|
nc -z 127.0.0.1 5432 2>/dev/null && break; \
|
|
|
|
|
sleep 1; \
|
|
|
|
|
done
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
$(MAKE) migrate
|
2026-03-18 23:18:31 +01:00
|
|
|
@fuser -k 8000/tcp 2>/dev/null && echo "Stopped running API" || true
|
2026-03-18 23:20:45 +01:00
|
|
|
uv run uvicorn api.main:app --reload --host 127.0.0.1 --port 8000
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
|
2026-02-24 22:22:53 +01:00
|
|
|
## Register a project: make register-project DOMAIN=railiance PROJECT_PATH=/home/worsch/railiance
|
|
|
|
|
register-project:
|
|
|
|
|
@test -n "$(DOMAIN)" || (echo "ERROR: DOMAIN is required. Usage: make register-project DOMAIN=<domain> PROJECT_PATH=<path>"; exit 1)
|
|
|
|
|
@test -n "$(PROJECT_PATH)" || (echo "ERROR: PROJECT_PATH is required."; exit 1)
|
|
|
|
|
scripts/register_project.sh "$(DOMAIN)" "$(PROJECT_PATH)"
|
|
|
|
|
|
feat(state-hub): implement v0.5 — dynamic domains & multi-repo
Replaces the hardcoded 6-domain PostgreSQL ENUM with a first-class
`domains` DB table, and adds a `managed_repos` table for multi-repo
support per domain.
P1 — Domain as a DB entity:
- Migration b1c2d3e4f5a6: creates `domains` table, migrates topics.domain
ENUM column to domain_id FK, drops the domain ENUM type
- Domain ORM model (api/models/domain.py) + Pydantic schemas
- Domain API router: GET/POST /domains/, GET/PATCH /domains/{slug}/,
rename and archive endpoints with EP/TD cascade on rename
- Topic model updated: domain_id FK + @property domain_slug for
backwards-compatible JSON serialization (field renamed domain → domain_slug)
- TopicCreate/TopicRead updated; seed.py rewritten to use FK lookup
P2 — Multi-repo support:
- ManagedRepo ORM model (api/models/managed_repo.py) + schemas
- Repo API router: GET/POST /repos/, GET/PATCH /repos/{slug}/, archive
- Makefile: add-domain, rename-domain, add-repo, list-repos targets
- register_project.sh: verify domain via /domains/ API + POST /repos/
P3 — MCP tools & live validation:
- 6 new MCP tools: list_domains, create_domain, rename_domain,
archive_domain, list_domain_repos, register_repo
- EP/TD routers: replace hardcoded VALID_DOMAINS set with per-request
DB lookup — returns 422 with list of valid slugs on unknown domain
- State summary: adds domains: list[DomainSummary] (slug, name,
repo_count, active_workstream_count, ep_count, td_count)
- TOOLS.md updated with domain management section
P4 — Dashboard:
- New domains.md page with KPI row + domain cards + repo lists
- domains.json.py + repos.json.py data loaders
- Domains page added to observablehq.config.js nav
- workstreams.md, extensions.md, techdept.md: domain_slug fix +
dynamic domain list loaded from /domains/ API (no longer hardcoded)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 15:20:15 +01:00
|
|
|
## Add a second repo to an existing domain: make add-repo DOMAIN=railiance REPO_PATH=/home/worsch/railiance-infra
|
|
|
|
|
add-repo:
|
|
|
|
|
@test -n "$(DOMAIN)" || (echo "ERROR: DOMAIN is required."; exit 1)
|
|
|
|
|
@test -n "$(REPO_PATH)" || (echo "ERROR: REPO_PATH is required."; exit 1)
|
|
|
|
|
scripts/register_project.sh "$(DOMAIN)" "$(REPO_PATH)" --additional
|
|
|
|
|
|
|
|
|
|
## Create a new domain: make add-domain DOMAIN=my_domain NAME="My Domain"
|
|
|
|
|
add-domain:
|
|
|
|
|
@test -n "$(DOMAIN)" || (echo "ERROR: DOMAIN is required (slug)."; exit 1)
|
|
|
|
|
@test -n "$(NAME)" || (echo "ERROR: NAME is required (display name)."; exit 1)
|
|
|
|
|
curl -sf -X POST http://127.0.0.1:8000/domains/ \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d "{\"slug\": \"$(DOMAIN)\", \"name\": \"$(NAME)\"}" | python3 -m json.tool
|
|
|
|
|
|
|
|
|
|
## Rename a domain: make rename-domain DOMAIN=old_slug NEW_SLUG=new_slug NEW_NAME="New Name"
|
|
|
|
|
rename-domain:
|
|
|
|
|
@test -n "$(DOMAIN)" || (echo "ERROR: DOMAIN (old slug) is required."; exit 1)
|
|
|
|
|
@test -n "$(NEW_SLUG)" || (echo "ERROR: NEW_SLUG is required."; exit 1)
|
|
|
|
|
@test -n "$(NEW_NAME)" || (echo "ERROR: NEW_NAME is required."; exit 1)
|
|
|
|
|
curl -sf -X PATCH http://127.0.0.1:8000/domains/$(DOMAIN)/rename \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d "{\"new_slug\": \"$(NEW_SLUG)\", \"new_name\": \"$(NEW_NAME)\"}" | python3 -m json.tool
|
|
|
|
|
|
2026-03-16 16:30:55 +01:00
|
|
|
## Register this machine's local path for a repo: make register-path REPO=marki-docx PATH=/home/tegwick/marki-docx
|
|
|
|
|
register-path:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make register-path REPO=<slug> PATH=<path>"; exit 1)
|
|
|
|
|
@test -n "$(PATH)" || (echo "ERROR: PATH is required. Usage: make register-path REPO=<slug> PATH=<path>"; exit 1)
|
|
|
|
|
curl -sf -X POST "http://127.0.0.1:8000/repos/$(REPO)/paths/" \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d "{\"host\": \"$$(hostname)\", \"path\": \"$(PATH)\"}" | python3 -m json.tool
|
|
|
|
|
|
feat(state-hub): implement v0.5 — dynamic domains & multi-repo
Replaces the hardcoded 6-domain PostgreSQL ENUM with a first-class
`domains` DB table, and adds a `managed_repos` table for multi-repo
support per domain.
P1 — Domain as a DB entity:
- Migration b1c2d3e4f5a6: creates `domains` table, migrates topics.domain
ENUM column to domain_id FK, drops the domain ENUM type
- Domain ORM model (api/models/domain.py) + Pydantic schemas
- Domain API router: GET/POST /domains/, GET/PATCH /domains/{slug}/,
rename and archive endpoints with EP/TD cascade on rename
- Topic model updated: domain_id FK + @property domain_slug for
backwards-compatible JSON serialization (field renamed domain → domain_slug)
- TopicCreate/TopicRead updated; seed.py rewritten to use FK lookup
P2 — Multi-repo support:
- ManagedRepo ORM model (api/models/managed_repo.py) + schemas
- Repo API router: GET/POST /repos/, GET/PATCH /repos/{slug}/, archive
- Makefile: add-domain, rename-domain, add-repo, list-repos targets
- register_project.sh: verify domain via /domains/ API + POST /repos/
P3 — MCP tools & live validation:
- 6 new MCP tools: list_domains, create_domain, rename_domain,
archive_domain, list_domain_repos, register_repo
- EP/TD routers: replace hardcoded VALID_DOMAINS set with per-request
DB lookup — returns 422 with list of valid slugs on unknown domain
- State summary: adds domains: list[DomainSummary] (slug, name,
repo_count, active_workstream_count, ep_count, td_count)
- TOOLS.md updated with domain management section
P4 — Dashboard:
- New domains.md page with KPI row + domain cards + repo lists
- domains.json.py + repos.json.py data loaders
- Domains page added to observablehq.config.js nav
- workstreams.md, extensions.md, techdept.md: domain_slug fix +
dynamic domain list loaded from /domains/ API (no longer hardcoded)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 15:20:15 +01:00
|
|
|
## List repos for a domain: make list-repos DOMAIN=railiance
|
|
|
|
|
list-repos:
|
|
|
|
|
@test -n "$(DOMAIN)" || (echo "ERROR: DOMAIN is required."; exit 1)
|
|
|
|
|
curl -sf "http://127.0.0.1:8000/repos/?domain=$(DOMAIN)" | python3 -m json.tool
|
|
|
|
|
|
2026-03-12 04:40:26 +01:00
|
|
|
## Ingest SBOM data for a repo (all mechanisms: lockfiles + ansible + sbom-tools.yaml).
|
|
|
|
|
## Auto-detect all sources: make ingest-sbom REPO=the-custodian REPO_PATH=/home/worsch/the-custodian
|
feat(sbom): scan mode, domain grouping dashboard, SBOM convention doc
- ingest_sbom.py: add --scan flag (recursive lockfile discovery) +
--lockfile repeatable for explicit multi-file ingestion; skip
.venv/node_modules/.git/dist/etc; Makefile gains SCAN= and REPO_PATH= vars
- sbom.md: add /domains/ fetch; domain-level summary table; per-repo
accordion with details/summary; domain filter on package table; dual-
licence false-positive note; +1 KPI card (Domains Covered)
- canon/standards/sbom-convention_v0.1.md: authoritative lockfile table,
ingest workflow (single/scan/explicit), snapshot semantics, direct-vs-
transitive caveats, licence governance + copyleft escalation, update
cadence, multi-repo domain pattern, planned enhancements
First ingest: the-custodian — 420 pkgs (88 python + 332 node), 13 licence
groups, 1 copyleft flag (jszip dual-licensed MIT OR GPL-3.0-or-later)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:15:40 +01:00
|
|
|
## Single lockfile (explicit): make ingest-sbom REPO=the-custodian LOCKFILE=/path/to/uv.lock
|
2026-03-12 04:40:26 +01:00
|
|
|
## Dry-run (no submit): make ingest-sbom REPO=the-custodian REPO_PATH=... DRY_RUN=1
|
|
|
|
|
## Tip: run capture-tools first for repos with system-level tool dependencies.
|
2026-02-28 17:28:49 +01:00
|
|
|
ingest-sbom:
|
feat(sbom): scan mode, domain grouping dashboard, SBOM convention doc
- ingest_sbom.py: add --scan flag (recursive lockfile discovery) +
--lockfile repeatable for explicit multi-file ingestion; skip
.venv/node_modules/.git/dist/etc; Makefile gains SCAN= and REPO_PATH= vars
- sbom.md: add /domains/ fetch; domain-level summary table; per-repo
accordion with details/summary; domain filter on package table; dual-
licence false-positive note; +1 KPI card (Domains Covered)
- canon/standards/sbom-convention_v0.1.md: authoritative lockfile table,
ingest workflow (single/scan/explicit), snapshot semantics, direct-vs-
transitive caveats, licence governance + copyleft escalation, update
cadence, multi-repo domain pattern, planned enhancements
First ingest: the-custodian — 420 pkgs (88 python + 332 node), 13 licence
groups, 1 copyleft flag (jszip dual-licensed MIT OR GPL-3.0-or-later)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:15:40 +01:00
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required."; exit 1)
|
|
|
|
|
uv run python scripts/ingest_sbom.py --repo "$(REPO)" \
|
|
|
|
|
$(if $(LOCKFILE),--lockfile "$(LOCKFILE)") \
|
2026-03-12 04:40:26 +01:00
|
|
|
$(if $(REPO_PATH),--repo-path "$(REPO_PATH)") \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
|
|
|
|
|
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
|
|
|
## Ingest capability declarations from SCOPE.md into the catalog.
|
|
|
|
|
## Usage: make ingest-capabilities REPO=the-custodian [REPO_PATH=/home/worsch/the-custodian]
|
|
|
|
|
## Or: make ingest-capabilities-all
|
|
|
|
|
## Add DRY_RUN=1 to preview without writing.
|
|
|
|
|
ingest-capabilities:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required."; exit 1)
|
|
|
|
|
uv run python scripts/ingest_capabilities.py --repo "$(REPO)" \
|
|
|
|
|
$(if $(REPO_PATH),--repo-path "$(REPO_PATH)") \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
|
|
|
|
|
|
|
|
|
ingest-capabilities-all:
|
|
|
|
|
uv run python scripts/ingest_capabilities.py --all \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
|
|
|
|
|
2026-03-20 01:08:18 +01:00
|
|
|
## Check Repository Definition of Integrated (DoI) criteria for a repo.
|
|
|
|
|
## Usage: make check-doi REPO=llm-connect
|
|
|
|
|
## Or: make check-doi-all
|
|
|
|
|
## Add JSON=1 for machine-readable output.
|
|
|
|
|
check-doi:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required."; exit 1)
|
|
|
|
|
uv run python scripts/check_doi.py --repo "$(REPO)" $(if $(JSON),--json)
|
|
|
|
|
|
|
|
|
|
check-doi-all:
|
|
|
|
|
uv run python scripts/check_doi.py --all $(if $(JSON),--json)
|
|
|
|
|
|
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
|
|
|
## Ingest tpsc.yaml service declarations from a repo into the TPSC catalog.
|
|
|
|
|
## Usage: make ingest-tpsc REPO=llm-connect
|
|
|
|
|
## Or: make ingest-tpsc-all
|
|
|
|
|
## Add DRY_RUN=1 to preview without writing.
|
|
|
|
|
ingest-tpsc:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required."; exit 1)
|
|
|
|
|
uv run python scripts/ingest_tpsc.py --repo "$(REPO)" \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
|
|
|
|
|
|
|
|
|
ingest-tpsc-all:
|
|
|
|
|
uv run python scripts/ingest_tpsc.py --all \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
|
|
|
|
|
2026-03-12 04:40:26 +01:00
|
|
|
## Run SBOM capture agent for a repo — generates/updates sbom-tools.yaml.
|
|
|
|
|
## Usage: make capture-tools REPO=railiance-infra [REPO_PATH=/home/worsch/railiance-infra]
|
|
|
|
|
## Add DRY_RUN=1 to preview without writing.
|
|
|
|
|
capture-tools:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required."; exit 1)
|
|
|
|
|
uv run python scripts/capture_sbom_tools.py --repo "$(REPO)" \
|
|
|
|
|
$(if $(REPO_PATH),--repo-path "$(REPO_PATH)") \
|
|
|
|
|
$(if $(DRY_RUN),--dry-run)
|
2026-02-28 17:28:49 +01:00
|
|
|
|
feat(custodian): add ADR-001 compliance validator
Scripts, Makefile target, and MCP tool for checking a repository
against ADR-001 (workplans as repo artefacts, state-hub as cache).
Checks performed:
File-side: workplans/ dir exists, valid YAML frontmatter (required
fields, type, status, id format), filename matches id, embedded
task blocks have id/status/priority.
State-hub cross-reference: state_hub_workstream_id references
resolve to real DB records; orphan detection flags active DB
workstreams with no backing workplan file.
Usage:
make validate-adr REPO=<path> [DOMAIN=<slug>]
validate_repo_adr(repo_path, domain_slug?) # MCP tool
Running against the-custodian itself correctly surfaces the 4
pre-ADR-001 workstreams that still need workplan files written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 12:00:09 +01:00
|
|
|
## Check a repo for ADR-001 compliance: make validate-adr REPO=/path/to/repo [DOMAIN=custodian]
|
|
|
|
|
validate-adr:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make validate-adr REPO=<path> [DOMAIN=<slug>]"; exit 1)
|
|
|
|
|
uv run python scripts/validate_repo_adr.py "$(REPO)" $(if $(DOMAIN),--domain "$(DOMAIN)",)
|
|
|
|
|
|
2026-03-16 16:30:55 +01:00
|
|
|
## Check a single repo for ADR-001 consistency: make check-consistency REPO=the-custodian [REPO_PATH=/override]
|
2026-03-20 23:48:13 +01:00
|
|
|
## Exit 0 = clean, exit 2 = warnings only (treated as success), exit 1 = failures
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
check-consistency:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make check-consistency REPO=<slug>"; exit 1)
|
2026-03-16 16:30:55 +01:00
|
|
|
uv run python scripts/consistency_check.py --repo "$(REPO)" \
|
|
|
|
|
$(if $(API_BASE),--api-base "$(API_BASE)",) \
|
2026-03-20 23:48:13 +01:00
|
|
|
$(if $(REPO_PATH),--repo-path "$(REPO_PATH)",); \
|
|
|
|
|
e=$$?; [ $$e -eq 2 ] && exit 0 || exit $$e
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
|
2026-03-16 16:30:55 +01:00
|
|
|
## Check and auto-fix a single repo: make fix-consistency REPO=the-custodian [REPO_PATH=/override]
|
2026-03-20 23:48:13 +01:00
|
|
|
## Exit 0 = clean, exit 2 = warnings only (treated as success), exit 1 = failures
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
fix-consistency:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make fix-consistency REPO=<slug>"; exit 1)
|
2026-03-16 16:30:55 +01:00
|
|
|
uv run python scripts/consistency_check.py --repo "$(REPO)" --fix \
|
|
|
|
|
$(if $(API_BASE),--api-base "$(API_BASE)",) \
|
2026-03-20 23:48:13 +01:00
|
|
|
$(if $(REPO_PATH),--repo-path "$(REPO_PATH)",); \
|
|
|
|
|
e=$$?; [ $$e -eq 2 ] && exit 0 || exit $$e
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
|
|
|
|
|
## Check all registered repos for ADR-001 consistency
|
|
|
|
|
check-consistency-all:
|
2026-03-20 23:48:13 +01:00
|
|
|
uv run python scripts/consistency_check.py --all $(if $(API_BASE),--api-base "$(API_BASE)",); \
|
|
|
|
|
e=$$?; [ $$e -eq 2 ] && exit 0 || exit $$e
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
|
|
|
|
|
## Check and auto-fix all registered repos
|
|
|
|
|
fix-consistency-all:
|
2026-03-20 23:48:13 +01:00
|
|
|
uv run python scripts/consistency_check.py --all --fix $(if $(API_BASE),--api-base "$(API_BASE)",); \
|
|
|
|
|
e=$$?; [ $$e -eq 2 ] && exit 0 || exit $$e
|
feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)
Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.
MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all
Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
CUST-WP-0006 and CUST-WP-0007 task blocks
Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:16:00 +01:00
|
|
|
|
2026-03-02 00:32:35 +01:00
|
|
|
## Cancel open tasks belonging to completed/archived workstreams.
|
|
|
|
|
## Safe to run at any time; also suitable for a daily cron job.
|
|
|
|
|
## Cron example: 0 3 * * * cd ~/the-custodian/state-hub && make cleanup-stale
|
|
|
|
|
cleanup-stale:
|
|
|
|
|
uv run python scripts/cleanup_stale_tasks.py
|
|
|
|
|
|
2026-03-16 01:41:16 +01:00
|
|
|
## Install custodian post-commit sync hook into one repo: make install-hooks REPO=marki-docx
|
|
|
|
|
install-hooks:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make install-hooks REPO=<slug>"; exit 1)
|
|
|
|
|
bash scripts/install_hooks.sh --repo "$(REPO)"
|
|
|
|
|
|
|
|
|
|
## Install custodian post-commit sync hook into all active registered repos
|
|
|
|
|
install-hooks-all:
|
|
|
|
|
bash scripts/install_hooks.sh --all
|
|
|
|
|
|
|
|
|
|
## Remove custodian post-commit sync hook from one repo: make remove-hooks REPO=marki-docx
|
|
|
|
|
remove-hooks:
|
|
|
|
|
@test -n "$(REPO)" || (echo "ERROR: REPO is required. Usage: make remove-hooks REPO=<slug>"; exit 1)
|
|
|
|
|
bash scripts/install_hooks.sh --repo "$(REPO)" --remove
|
|
|
|
|
|
|
|
|
|
## Compare Gitea coulomb org repos against state-hub registered repos
|
|
|
|
|
## Requires GITEA_TOKEN in env or .env: make gitea-inventory GITEA_TOKEN=<token>
|
|
|
|
|
gitea-inventory:
|
|
|
|
|
uv run python scripts/gitea_inventory.py $(if $(JSON),--json)
|
|
|
|
|
|
Add state-hub v0.1 — local-first state service for the Custodian
Implements the first live layer of the Custodian cognitive infrastructure:
PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable
Framework telemetry dashboard.
- state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard)
- 5 DB tables: topics, workstreams, tasks, decisions, progress_events
- 11 MCP tools + 5 resources registered in .mcp.json
- Observable dashboard: Overview, Workstreams, Decisions, Progress pages
- CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual)
- ~/.claude/CLAUDE.md: global cross-project reference to the hub
- scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 17:47:49 +01:00
|
|
|
clean:
|
|
|
|
|
$(COMPOSE) down -v
|