Regenerate agent instructions from state-hub templates (CUST-WP-0055 T01)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s

Sync AGENTS.md, CLAUDE.md, and .claude/rules from updated project_rules
templates: workplan-first session protocol, legacy terminology footnote,
and GET /workplans/ examples.
This commit is contained in:
tegwick 2026-07-08 14:50:19 +02:00
parent 8ea196298b
commit f8d0ef3c0f
8 changed files with 249 additions and 88 deletions

View file

@ -1,26 +1,42 @@
## First Session Protocol
Triggered when State Hub shows no workstreams for `core-hub`.
Triggered when `get_domain_summary("infotech")` shows **no workplans**.
The project is registered but work has not yet been structured.
**Step 1 - Read, do not write yet**
- `INTENT.md`
- `SCOPE.md`
- `docs/research/2026-06-27-core-hub-lineage-and-platform-reset.md`
- `docs/specs/README.md`
- Existing files under `workplans/`
**Step 1 — Read, don't write**
- `~/the-custodian/canon/projects/infotech/project_charter_v0.1.md` — purpose, scope
- `~/the-custodian/canon/projects/infotech/roadmap_v0.1.md` — planned phases
- Scan repo root: README, directory structure, existing code or docs
**Step 2 - Survey in-progress work**
Look for untracked files, open workplans, and half-finished specs. Note done vs. started but incomplete.
**Step 2 — Survey in-progress work**
Look for TODOs, open branches, half-finished files. Note done vs. started but incomplete.
**Step 3 - Structure work in files first**
Create or update `workplans/CORE-WP-NNNN-<slug>.md` before relying on State Hub records.
**Step 4 - Sync the read model**
After workplan changes, run from `~/state-hub`:
**Step 3 — Propose workplans to Bernd**
Propose 13 workplans — each a coherent strand, weeks to months, anchored to a
roadmap phase. **Wait for approval before creating.**
**Step 4 — Write the workplan file; fix-consistency registers it (ADR-001)**
```
workplans/CORE-WP-NNNN-<slug>.md ← write this, commit it
```
Then register by running the consistency check — do **not** call
`create_workplan`/`create_task` yourself; manual registration duplicates what
C-06 creates from the file:
```bash
make fix-consistency REPO=core-hub
statehub fix-consistency --repo core-hub
```
C-06 creates the hub workplan + tasks and writes `state_hub_workstream_id`
(legacy frontmatter name — holds the workplan UUID) and `state_hub_task_id`
back into the file.
**Step 5 — Record the setup**
```
add_progress_event(
summary="First session: structured infotech into N workplans, M tasks",
event_type="milestone",
topic_id="cee7bedf-2b48-46ef-8601-006474f2ad7a",
detail={"workplans": [...], "tasks_created": M}
)
```
**Step 5 - Record progress**
Post a non-secret progress note to State Hub summarizing the setup or implementation work.
<!-- Delete or archive this file once past first session -->