diff --git a/workplans/CUST-WP-0043-state-hub-repo-extraction.md b/workplans/CUST-WP-0043-state-hub-repo-extraction.md index 5bee26f..bdad861 100644 --- a/workplans/CUST-WP-0043-state-hub-repo-extraction.md +++ b/workplans/CUST-WP-0043-state-hub-repo-extraction.md @@ -77,13 +77,100 @@ Out of scope: `CUST-WP-0042`. - Changing production deployment topology beyond path and repo ownership. +## Extraction Boundary Inventory + +Inventory captured on 2026-05-17 against +`/home/worsch/the-custodian/state-hub` and target stub +`/home/worsch/state-hub`. + +### Move To `state-hub` + +These paths are tracked service source or service-owned operations assets and +should become authoritative in `/home/worsch/state-hub`: + +| Path | Handling | +|------|----------| +| `.dockerignore` | Move; revisit because current Docker context excludes `tests`, `docs`, and `infra`. | +| `.env.example` | Move; remains the safe config template. | +| `Dockerfile` | Move; update build context references after extraction. | +| `Makefile` | Move; becomes the primary State Hub command surface. | +| `README.md` | Move/merge with standalone repo baseline README. | +| `alembic.ini` | Move. | +| `api/` | Move; FastAPI app, models, schemas, routers, event publisher. | +| `custodian_cli.py` | Move; update any repo-root assumptions. | +| `dashboard/observablehq.config.js` | Move. | +| `dashboard/package.json` | Move. | +| `dashboard/package-lock.json` | Move. | +| `dashboard/src/` | Move; dashboard source and data loaders. | +| `docs/` | Move; State Hub operational and architecture docs. | +| `flows/` | Move; task-flow definitions. | +| `infra/` | Move; local Postgres compose and infra docs. | +| `mcp_server/` | Move; MCP server and tool reference. | +| `migrations/` | Move; Alembic migration environment and versions. | +| `policies/` | Move; repo DoI and workstream DoD policies. | +| `prompts/` | Move; State Hub prompt assets. | +| `pyproject.toml` | Move; Python package/dependency definition. | +| `scripts/` | Move; consistency, registration, SBOM, token, image, and repo-sync tooling. | +| `task_flow_engine/` | Move; embedded flow evaluator package. | +| `tests/` | Move; keep in repo even though Docker image currently excludes it. | +| `uv.lock` | Move; required for reproducible `uv sync`. | + +### Keep In `the-custodian` + +These remain Custodian-owned after extraction: + +| Path | Handling | +|------|----------| +| `canon/`, `memory/`, `runtime/`, root `workplans/` | Stay in `the-custodian`; not part of State Hub service source. | +| Root `AGENTS.md`, `CLAUDE.md`, `.custodian-brief.md`, `SCOPE.md` | Stay, but update to point State Hub code work at `/home/worsch/state-hub`. | +| `workplans/CUST-WP-0043-state-hub-repo-extraction.md` | Stay as the bridge plan until extraction is complete. | +| `workplans/CUST-WP-0042-workplan-state-model-cleanup.md` | Re-home or bridge after standalone repo registration; do not duplicate blindly. | +| `state-hub/` | Remove or replace with a small pointer only after standalone verification passes. | + +### Regenerate Locally + +These paths are useful locally but should not be copied as source: + +| Path | Handling | +|------|----------| +| `.venv/` | Regenerate with `make install` / `uv sync`. | +| `dashboard/node_modules/` | Regenerate with the dashboard package manager install. | +| `dashboard/dist/` | Regenerate via Observable build/preview. | +| `dashboard/src/.observablehq/` | Regenerate as Observable cache. | +| `.pytest_cache/` | Regenerate from test runs. | +| `**/__pycache__/`, `*.pyc` | Regenerate from Python execution. | + +### Discard / Do Not Copy + +These are local, sensitive, or machine-specific: + +| Path | Handling | +|------|----------| +| `.env` | Do not copy; secrets/local config stay local. | +| `.claude/settings.local.json` | Do not copy; machine/user-local Claude settings. | +| `kubectl` | Do not copy unless later proven to be a tracked intentional helper; currently ignored and machine-local. | + +### Target Stub State + +`/home/worsch/state-hub` currently contains only `.git/`, `.gitignore`, +`LICENSE`, and a repo-seed README. It needs a service-specific baseline before +the implementation move: + +- README that identifies State Hub as the live FastAPI/MCP/dashboard service. +- `AGENTS.md` with the State Hub session protocol. +- `SCOPE.md` for repo discovery and capability registration. +- A `workplans/` directory or explicit decision about the repo-local workplan + prefix before re-homing `CUST-WP-0042`. +- A tightened `.gitignore` that keeps `uv.lock`, docs, infra, and tests + trackable while excluding runtime/build/cache/secrets. + ## Tasks ### T01 - Inventory Extraction Boundary ```task id: CUST-WP-0043-T01 -status: todo +status: in_progress priority: high state_hub_task_id: "1d1e1cd6-96ac-4840-9c11-2867ada1116d" ```