This repository has been archived on 2026-07-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core-hub/.claude/rules/session-protocol.md

49 lines
1.1 KiB
Markdown

## Session Protocol
Dev Hub (State Hub API): http://127.0.0.1:8000
**Step 1 - Orient**
```bash
cat .custodian-brief.md
cat INTENT.md
cat SCOPE.md
ls workplans/
```
Use REST when MCP tools are unavailable:
```bash
curl -s "http://127.0.0.1:8000/workstreams/?topic_id=cee7bedf-2b48-46ef-8601-006474f2ad7a&status=active" | python3 -m json.tool
```
**Step 2 - Check inbox**
```bash
curl -s "http://127.0.0.1:8000/messages/?to_agent=core-hub&unread_only=true" | python3 -m json.tool
```
Mark read when handled.
**Step 3 - Scan workplans**
```bash
ls workplans/
```
For each file with `status: ready`, `active`, or `blocked`, note pending `wait`/`todo`/`progress` tasks.
**Step 4 - Work file-first**
State Hub is a read/cache/index layer. Work structure belongs in repo files under ADR-001.
**Session close**
```bash
cd ~/state-hub
make fix-consistency REPO=core-hub
curl -s -X POST http://127.0.0.1:8000/progress/ \
-H "Content-Type: application/json" \
-d '{"topic_id":"cee7bedf-2b48-46ef-8601-006474f2ad7a","event_type":"note","summary":"what changed","author":"codex"}'
```