Files
kaizen-agentic/.claude/rules/session-protocol.md
tegwick ed0960e2a2 chore: migrate CLAUDE.md to @-import rule structure (custodian integration)
Register with state-hub under custodian domain. Replace monolithic CLAUDE.md
with thin @-import index; distribute content into .claude/rules/ per ops-bridge pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 22:21:16 +01:00

1.6 KiB

Session Protocol

State Hub: http://127.0.0.1:8000

Step 1 — Orient

get_domain_summary("custodian")

If offline: cd ~/the-custodian/state-hub && make api

Step 2 — Check inbox

get_messages(to_agent="kaizen-agentic", unread_only=True)

Mark read with mark_message_read(message_id). Reply or act on coordination requests before proceeding.

Step 3 — Scan workplans

ls workplans/

For each file with status: active, note pending todo/in_progress tasks.

Step 4 — Present brief

  1. Active workstreams for custodian — title, task counts, blocking decisions
  2. Pending tasks from workplans/ + any [repo:kaizen-agentic] hub tasks
  3. Goal guidance — if goal_guidance in summary:
    • needs_workplan: surface as top action — "Repo goal '{title}' has no workplan yet"
    • alignment_warnings: flag if active work is not aligned with current goal
  4. Suggested next action — highest-priority open item
  5. SBOM status — flag if last_sbom_at is unset for this repo

If no workstreams: follow First Session Protocol (first-session.md).

During work: record_decision() · add_progress_event() · resolve_decision()

State Hub is a read model. Bootstrap tools (create_workstream, create_task) are First Session Protocol only. Work structure belongs in repo files (ADR-001).

Session close:

add_progress_event(summary="...", topic_id="cee7bedf-2b48-46ef-8601-006474f2ad7a", workstream_id="<uuid>")

If workplan files were modified:

cd ~/the-custodian/state-hub && make fix-consistency REPO=kaizen-agentic