Establish Soul Frame research repository and workplans
Scaffold the research layout from the research program, add INTENT/SCOPE, research instruments, concept stubs, and SOUL-WP-0001–0008 phase workplans. Register the repo with State Hub under domain agents for hub-synced execution.
This commit is contained in:
parent
fbd792326c
commit
c6a5ee951d
63 changed files with 6789 additions and 2 deletions
20
.claude/rules/agents.md
Normal file
20
.claude/rules/agents.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
## Kaizen Agents
|
||||
|
||||
Specialized agent personas available on demand via the state-hub MCP.
|
||||
|
||||
**Discover:** `list_kaizen_agents()` — returns all agents with name, description, category
|
||||
**Load:** `get_kaizen_agent("tdd-workflow")` — returns full instructions; read and follow them
|
||||
|
||||
Common agents:
|
||||
|
||||
| Agent | Category | When to use |
|
||||
|-------|----------|-------------|
|
||||
| `tdd-workflow` | testing | Step-by-step TDD8 workflow for any feature |
|
||||
| `code-refactoring` | quality | Code quality analysis and safe refactoring |
|
||||
| `test-maintenance` | testing | Diagnose and fix failing tests |
|
||||
| `requirements-engineering` | process | Prevent interface/mock mismatches upfront |
|
||||
| `keepaTodofile` | process | Maintain TODO.md during work |
|
||||
| `project-management` | process | Track status, determine next steps |
|
||||
| `datamodel-optimization` | quality | Optimize dataclasses and data structures |
|
||||
|
||||
All 17 agents: call `list_kaizen_agents()` for the full list.
|
||||
23
.claude/rules/architecture.md
Normal file
23
.claude/rules/architecture.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
## Architecture
|
||||
|
||||
Conceptual research stack (not software modules):
|
||||
|
||||
```text
|
||||
INTENT / ResearchProgram → purpose and method
|
||||
Terminology / Claims / TE → revisable research instruments
|
||||
concepts/ → working definitions
|
||||
research/<workstream>/ → literature and synthesis by tradition
|
||||
sources/ → bibliography + source notes
|
||||
paper/ → outline and drafts
|
||||
workplans/SOUL-WP-* → hub-synced execution sequence
|
||||
```
|
||||
|
||||
Working triad: **Body = Action · Mind = Model · Soul = Relation**
|
||||
|
||||
Research sequence is phased (I Foundations → VII Paper); later workplans
|
||||
depend on earlier synthesis. Files are source of truth; State Hub indexes them
|
||||
(ADR-001).
|
||||
|
||||
## Quick Reference
|
||||
|
||||
`~/state-hub/mcp_server/TOOLS.md` — MCP tool reference
|
||||
42
.claude/rules/first-session.md
Normal file
42
.claude/rules/first-session.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
## First Session Protocol
|
||||
|
||||
Triggered when `get_domain_summary("agents")` shows **no workplans**.
|
||||
The project is registered but work has not yet been structured.
|
||||
|
||||
**Step 1 — Read, don't write**
|
||||
- `~/the-custodian/canon/projects/agents/project_charter_v0.1.md` — purpose, scope
|
||||
- `~/the-custodian/canon/projects/agents/roadmap_v0.1.md` — planned phases
|
||||
- Scan repo root: README, directory structure, existing code or docs
|
||||
|
||||
**Step 2 — Survey in-progress work**
|
||||
Look for TODOs, open branches, half-finished files. Note done vs. started but incomplete.
|
||||
|
||||
**Step 3 — Propose workplans to Bernd**
|
||||
Propose 1–3 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/SOUL-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
|
||||
statehub fix-consistency --repo soul-frame
|
||||
```
|
||||
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 agents into N workplans, M tasks",
|
||||
event_type="milestone",
|
||||
topic_id="64418556-3206-457a-ba29-6884b5b12cf3",
|
||||
detail={"workplans": [...], "tasks_created": M}
|
||||
)
|
||||
```
|
||||
|
||||
<!-- Delete or archive this file once past first session -->
|
||||
12
.claude/rules/repo-boundary.md
Normal file
12
.claude/rules/repo-boundary.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
## Repo boundary
|
||||
|
||||
This repo owns **soul-frame** only: conceptual research, terminology, literature
|
||||
mapping, thought experiments, and the Soul Frame paper pathway.
|
||||
|
||||
It does not own:
|
||||
|
||||
- Agent runtime / unattended execution → `agent-harness`, `activity-core`
|
||||
- LLM routing and provider connectivity → `llm-connect`
|
||||
- State Hub implementation → `state-hub`
|
||||
- Custodian coordination canon → `the-custodian`
|
||||
- Production product surfaces for spirits/ghosts → future application repos
|
||||
10
.claude/rules/repo-identity.md
Normal file
10
.claude/rules/repo-identity.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
**Purpose:** Soul Frame — systems-theoretic research program and conceptual
|
||||
framework for person-like informational beings (Body = Action, Mind = Model,
|
||||
Soul = Relation). Central question: when does an informational system become
|
||||
someone that another someone can know?
|
||||
|
||||
**Domain:** agents
|
||||
**Repo slug:** soul-frame
|
||||
**Topic ID:** 64418556-3206-457a-ba29-6884b5b12cf3
|
||||
**WP prefix:** SOUL-WP
|
||||
**Charter:** `INTENT.md` · **Agenda:** `ResearchProgram.md` · **Scope:** `SCOPE.md`
|
||||
100
.claude/rules/session-protocol.md
Normal file
100
.claude/rules/session-protocol.md
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
## Session Protocol
|
||||
|
||||
Dev Hub (State Hub API): http://127.0.0.1:8000
|
||||
MCP server name in `~/.claude.json`: `dev-hub`
|
||||
|
||||
**Step 1 — Orient**
|
||||
|
||||
Read the offline-safe brief first — it works without a live hub connection:
|
||||
```bash
|
||||
cat .custodian-brief.md
|
||||
```
|
||||
Then call the MCP tool for richer cross-domain context when MCP tools are exposed:
|
||||
```
|
||||
get_domain_summary("agents")
|
||||
```
|
||||
If MCP tools are unavailable in the current agent session, use the REST API:
|
||||
```bash
|
||||
curl -s "http://127.0.0.1:8000/state/summary" | python3 -m json.tool
|
||||
```
|
||||
If the hub is offline: `cd ~/state-hub && make api`
|
||||
|
||||
**Step 2 — Check inbox**
|
||||
With MCP tools:
|
||||
```
|
||||
get_messages(to_agent="soul-frame", unread_only=True)
|
||||
```
|
||||
Mark read with `mark_message_read(message_id)`. Reply or act on coordination
|
||||
requests before proceeding.
|
||||
|
||||
Without MCP tools:
|
||||
```bash
|
||||
curl -s "http://127.0.0.1:8000/messages/?to_agent=soul-frame&unread_only=true" \
|
||||
| python3 -m json.tool
|
||||
curl -s -X PATCH "http://127.0.0.1:8000/messages/<id>/read" \
|
||||
-H "Content-Type: application/json" -d '{}'
|
||||
```
|
||||
|
||||
**Step 3 — Scan workplans**
|
||||
```bash
|
||||
ls workplans/
|
||||
```
|
||||
For each file with `status: ready`, `active`, or `blocked`, note pending
|
||||
`wait`/`todo`/`progress` tasks.
|
||||
|
||||
**Step 4 — Present brief**
|
||||
|
||||
1. **Active workplans** for `agents` — title, task counts, blocking decisions
|
||||
2. **Pending tasks** from `workplans/` + any `[repo:soul-frame]` 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 workplans: follow First Session Protocol (`first-session.md`).
|
||||
|
||||
**During work:** `record_decision()` · `add_progress_event()` · `resolve_decision()`
|
||||
|
||||
> State Hub is a *read model*. **Never register workplans or tasks by hand**
|
||||
> (`create_workplan`, `create_task`) — write the workplan file in `workplans/`
|
||||
> and run `fix-consistency`; C-06 registers the workplan and tasks and writes
|
||||
> IDs back into the file. Manual registration creates duplicates when
|
||||
> fix-consistency runs. Work structure belongs in repo files (ADR-001).
|
||||
>
|
||||
> Legacy: `create_workstream` and `/workstreams/` remain as metered aliases —
|
||||
> see `workplan-convention.md` (compatibility footnote).
|
||||
|
||||
**Session close:**
|
||||
1. Update workplan/task statuses in repo files.
|
||||
2. If marking a workplan **finished**: hand off residuals as **live work
|
||||
records** first (intake with `origin: residual` + `origin_ref: <WP-id>`, or
|
||||
a child workplan / decision / engagement). Do not leave actionable leftovers
|
||||
only as prose or in `SCOPE.md`. See work-record-types § Residuals.
|
||||
3. Log progress (below).
|
||||
4. `statehub fix-consistency` when workplan/queue files changed.
|
||||
|
||||
With MCP tools:
|
||||
```
|
||||
add_progress_event(summary="...", topic_id="64418556-3206-457a-ba29-6884b5b12cf3", workplan_id="<uuid>")
|
||||
```
|
||||
Without MCP tools:
|
||||
```bash
|
||||
curl -s -X POST http://127.0.0.1:8000/progress/ \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"topic_id":"64418556-3206-457a-ba29-6884b5b12cf3","workplan_id":"<uuid>","event_type":"note","summary":"what changed","author":"codex"}'
|
||||
```
|
||||
If workplan files were modified, ensure the local copy is up to date first,
|
||||
then sync from the repo checkout:
|
||||
```bash
|
||||
git pull --ff-only
|
||||
statehub fix-consistency
|
||||
```
|
||||
For repos where implementation runs on a remote machine (e.g. CoulombCore),
|
||||
use the pull-before-fix mode from any shell with the State Hub CLI:
|
||||
```bash
|
||||
statehub fix-consistency --repo soul-frame --remote
|
||||
```
|
||||
**C-15** (DB task ahead of file) is normal in multi-machine workflows — writeback
|
||||
will sync the file to match DB. **C-16** (repo behind remote) blocks all writes
|
||||
until you pull — intentional to prevent clobbering remote progress.
|
||||
24
.claude/rules/stack-and-commands.md
Normal file
24
.claude/rules/stack-and-commands.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
## Stack
|
||||
|
||||
Research repository — Markdown-first conceptual work, not a runtime product.
|
||||
|
||||
- **Language:** Markdown (YAML frontmatter on workplans)
|
||||
- **Key deps:** State Hub (`~/state-hub`) for registration and consistency sync
|
||||
- **Layout:** `concepts/`, `research/`, `sources/`, `paper/`, `workplans/`
|
||||
|
||||
## Dev Commands
|
||||
|
||||
```bash
|
||||
# Orient
|
||||
cat INTENT.md SCOPE.md README.md
|
||||
|
||||
# After editing workplans — sync hub read model (files are authoritative)
|
||||
cd ~/state-hub && make fix-consistency REPO=soul-frame
|
||||
|
||||
# Check only
|
||||
cd ~/state-hub && make check-consistency REPO=soul-frame
|
||||
|
||||
# Hub status
|
||||
curl -s http://127.0.0.1:8000/repos/soul-frame | python3 -m json.tool
|
||||
curl -s 'http://127.0.0.1:8000/workplans/?repo=soul-frame' | python3 -m json.tool
|
||||
```
|
||||
71
.claude/rules/workplan-convention.md
Normal file
71
.claude/rules/workplan-convention.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
## Workplan Convention (ADR-001)
|
||||
|
||||
File location: `workplans/SOUL-WP-NNNN-<slug>.md`
|
||||
ID prefix: `SOUL-WP-`
|
||||
|
||||
Work items originate as files in this repo **before** being registered in the hub.
|
||||
|
||||
Canonical workplan frontmatter statuses are:
|
||||
`proposed`, `ready`, `active`, `blocked`, `backlog`, `finished`, `archived`.
|
||||
Use `proposed` for a newly drafted plan, `ready` after review against current
|
||||
repo state, and `finished` when implementation is complete. `stalled` and
|
||||
`needs_review` are derived health labels, not stored statuses.
|
||||
|
||||
Closed workplans may be moved to `workplans/archived/` with a completion-date
|
||||
prefix: `YYMMDD-SOUL-WP-NNNN-<slug>.md`. The frontmatter id remains
|
||||
unchanged; the prefix is only for quick visual reference.
|
||||
|
||||
Small opportunistic tasks discovered during another session use **Ad Hoc Tasks**:
|
||||
`workplans/ADHOC-YYYY-MM-DD.md`, workplan slug `adhoc-YYYY-MM-DD`, and task ids
|
||||
`ADHOC-YYYY-MM-DD-T01`, `T02`, etc. Use adhocs only for low-risk work completed
|
||||
directly. Promote anything requiring analysis, design, approval, dependencies, or
|
||||
multiple planned phases into a normal workplan.
|
||||
|
||||
Ecosystem todos from other agents arrive as `[repo:soul-frame]` hub tasks —
|
||||
visible at session start. Pick one up by creating the workplan file, committing,
|
||||
and running `statehub fix-consistency` — C-06 registers the workplan in the hub.
|
||||
Never register by hand with `create_workplan` (legacy MCP alias: `create_workstream`).
|
||||
|
||||
Task blocks use this shape:
|
||||
|
||||
```task
|
||||
id: SOUL-WP-NNNN-T01
|
||||
status: wait | todo | progress | done | cancel
|
||||
priority: high | medium | low
|
||||
state_hub_task_id: "<uuid>" # written by fix-consistency — do not edit
|
||||
```
|
||||
|
||||
Status progression is `todo` → `progress` → `done`; use `wait` for waiting or
|
||||
blocked work and `cancel` for stopped work.
|
||||
|
||||
### Residuals (role, not kind)
|
||||
|
||||
When finishing a workplan, **actionable leftovers must become live work
|
||||
records** before `status: finished`. Residual is not a registered kind and
|
||||
must not be parked only in `SCOPE.md` or finished-file prose.
|
||||
|
||||
| Shape | Capture as | Links |
|
||||
| --- | --- | --- |
|
||||
| Small Green/Blue parkable | intake (queue YAML / `*-IN-*`) | `origin: residual`, `origin_ref: SOUL-WP-NNNN` |
|
||||
| Multi-step | next workplan | name parent WP; optional promote from residual intake |
|
||||
| Founder gate / time | decision / engagement | same origin fields when from residual intake |
|
||||
|
||||
Fleet listing of residuals is a State Hub concern (`list_intakes` + origin
|
||||
filters; planned `statehub residuals`). Canon:
|
||||
`the-custodian/canon/standards/work-record-types_v0.1.md` § Residuals.
|
||||
|
||||
Workplan frontmatter carries `state_hub_workstream_id` — a legacy field name
|
||||
kept for compatibility; it holds the hub workplan UUID and is written by
|
||||
fix-consistency. Do not edit or rename it.
|
||||
|
||||
### Legacy terminology (compatibility footnote)
|
||||
|
||||
**Workplan** is the fleet term — see
|
||||
`the-custodian/canon/standards/workplan-terminology-fleet_v0.1.md`.
|
||||
**Workstream** is legacy only: some API routes (`/workstreams/`), params
|
||||
(`workstream_id`), MCP aliases (`create_workstream`), and the frontmatter field
|
||||
above remain until `STATE-WP-0069` retires them via legacy-meter. Treat those
|
||||
identifiers as workplan IDs. Prefer `GET /workplans/` and `workplan_id` in new
|
||||
examples and scripts.
|
||||
|
||||
<!-- Ralph Loop rules and HEUREKA sequence: ~/.claude/CLAUDE.md — do not duplicate here -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue