2.1 KiB
AGENTS.md
This repository is the standalone home for the Custodian State Hub service.
Session Start
- Read this file and
SCOPE.md. - Read
.custodian-brief.mdif present. - If the State Hub API is reachable, query the local hub for orientation:
GET http://127.0.0.1:8000/state/summaryGET http://127.0.0.1:8000/messages/?to_agent=hub&unread_only=true
- Mark relevant inbox messages read after acting on them.
- Check
git status --shortbefore editing.
If the API is not reachable, continue from local files. The repo must remain usable offline.
Repository Boundary
State Hub owns:
- FastAPI app, models, schemas, routers, migrations
- MCP server and tool reference
- Observable dashboard
- consistency, registration, SBOM, token, image, and repo-sync scripts
- task-flow engine and flow definitions
- State Hub operational docs, tests, policies, prompts, and infra
The Custodian governance repo owns:
- canon, constitution, values, memory, and broad cross-domain governance
- bridge workplans that coordinate extraction from the old embedded layout
Do not write governance canon directly from this repo.
Build And Test
After the implementation move, the expected command surface is:
make install
make db
make migrate
make test
make api
make mcp-http
make dashboard
When API routers, models, migrations, or consistency logic change, run the
relevant tests before closing the session. Prefer make test when the database
test prerequisites are available.
Workplans
Use workplans/ for State Hub-local workplans. New workplans should use:
SHUB-WP-0001
For migrated Custodian-hosted plans, preserve existing state_hub_workstream_id
and task IDs when safe. Never call create_workstream() or create_task()
manually for a file-backed workplan before the file exists in this repo.
Session Close
- Add a progress event through State Hub if the API is reachable.
- Run consistency sync for this repo once it is registered.
- Record any decisions that change repo ownership, state model, API contracts, or deployment topology.
- Leave the worktree clear or explicitly report remaining uncommitted changes.