@@ -27,8 +27,8 @@ Read the ADRs for *why*; read this for *what* and *how it fits together*.
2727 ┌────────────────┐ REST ┌──────────────────────────────────────────────────────────┐
2828 │ Terminal │────────▶│ ┌───────────┐ ┌────────────┐ ┌──────────────────────┐ │
2929 │ controller │◀────────│ │Repository │ │ Workflow │ │ Lifecycle engine: │ │
30- │ └─ dashboard │ REST/ │ │ (SQLite) │ │ registry │ │ state machine, ball , │ │
31- │ (Textual) │ MCP │ └───────────┘ └────────────┘ │ DoD enforcement │ │
30+ │ └─ dashboard │ REST/ │ │ (SQLite) │ │ registry │ │ state machine, turn , │ │
31+ │ (Textual) │ MCP │ └───────────┘ └────────────┘ │ responsibility enforcement │ │
3232 └───────┬────────┘ │ REST API · MCP surface (artifacts + task tools) │ │
3333 │ └───────▲─────────────────────────────▲──────────────────┘
3434 │ tmux attach (local) │ REST (register, pull work) │ MCP (+ some REST)
7272so its responsibilities split by * where they run* :
7373
7474- ** Control-plane side (deterministic, in the task service):** the workflow class's
75- declarative members (state set, transitions, foreground/background classification, DoD
76- * definitions* ) and any deterministic imperative methods (compute next state, list cleanup
75+ declarative members (state set, transitions, foreground/background classification,
76+ responsibility * definitions* ) and any deterministic imperative methods (compute next state, list cleanup
7777 steps, construct a non-reasoning forge request). No LLM.
7878- ** Container side (LLM, in the task container):** the workflow's ** skills** — the
7979 agent-driven procedures it contributes (planning, implementing, ` babysit-ci ` 's
@@ -94,8 +94,8 @@ The single authority over task state (ADR 0006). Responsibilities:
9494 mutates state * through* it, which provides the serialization that gives integrity.
9595- ** Hosts the workflow registry** (ADR 0004) — on startup, loads workflow classes via
9696 path-based registration; dispatches to the active workflow per task.
97- - ** Runs the lifecycle engine** — applies workflow-defined transitions, enforces DoD gating,
98- maintains the ` : agent: ` /` : user: ` ball (workflows supply only the fg/bg classification).
97+ - ** Runs the lifecycle engine** — applies workflow-defined transitions, enforces responsibility gating,
98+ maintains the ` agent ` /` user ` turn (workflows supply only the fg/bg classification).
9999- ** Exposes two interfaces:** a ** REST API** (dashboard, session service, in-container
100100 skills) and an ** MCP surface** (in-container agents: artifacts as resources, task
101101 operations as tools). See §5.
@@ -136,7 +136,7 @@ the task service. It:
136136| Client | Protocol | Used for |
137137| ---| ---| ---|
138138| Terminal controller / dashboard | ** REST** | queries (task list/detail), commands (create idea, promote, advance, drop), runner/status views |
139- | In-container agent | ** MCP** | artifacts as resources (plan/notes, ADR 0003); task operations as tools (set slug, advance, report DoD verdict , append log) |
139+ | In-container agent | ** MCP** | artifacts as resources (plan/notes, ADR 0003); task operations as tools (set slug, advance, report responsibility status , append log) |
140140| In-container skills | ** REST** (some) | operations not natural as MCP tools, or when a skill needs the broader API |
141141| Session service | ** REST** | register as runner, pull assigned work, report session lifecycle/health |
142142
@@ -150,7 +150,7 @@ Every port is a Python ABC in the core; adapters live in the owning component.
150150| Port | ABC responsibility | Adapter now | Future adapters | ADR |
151151| ---| ---| ---| ---| ---|
152152| ** Repository** | persist tasks, repos, history; enforce transitions | SQLite | Postgres | 0001/0006 |
153- | ** Workflow** | define a lifecycle (states, DoD , skills, deterministic methods) | parity, free-form | user/agent-authored | 0004 |
153+ | ** Workflow** | define a lifecycle (states, responsibilities , skills, deterministic methods) | parity, free-form | user/agent-authored | 0004 |
154154| ** Execution backend** (session service) | spawn/stop a task's session; inject secrets; run image | local Docker+tmux | remote, non-container | 0005/0008 |
155155| ** Artifact store** | read/write per-task files (plan, notes) | local filesystem | object storage | 0003 |
156156| ** Presentation** | render + drive the system | Textual TUI | web UI, other-lang dashboard | 0002 |
@@ -167,7 +167,8 @@ registration. Sketch of the ABC's two faces:
167167- ** Declarative members** (data the control plane reads):
168168 - ` states ` , ` transitions ` , and per-state ` foreground ` /` background ` classification;
169169 - ` transition_policy ` (user-approved vs. auto-advance);
170- - ` definition_of_done(state) ` → checklist + verdict semantics (` PENDING ` /` PASS ` /` UNSATISFIABLE ` );
170+ - ` responsibilities(state) ` → the agent's obligations for that state (each settles to a
171+ ` status ` : ` PENDING ` → ` MET ` /` FAILED ` , a ` FAILED ` one needs a comment);
171172 - ` skills() ` → the catalogue of workflow-specific skills exposed in the container (e.g.
172173 ` babysit-ci ` ), on top of the core operations (` advance ` , ` drop ` ). A free-form workflow
173174 contributes few or none.
@@ -193,10 +194,13 @@ active workflow*, not a fixed global list.
193194- ** Repo** — first-class (ADR 0007): identity, default base, association to its env config +
194195 creds volume (references, ** never secret values** ).
195196- ** Task** — stable internal ** id** (generated at creation), ` repo_id ` , ` workflow ` , current
196- ` state ` , ball holder (` agent ` /` user ` ), ` mode ` (fg/bg), git refs (branch/worktree), optional
197+ ` state ` , ** ` turn ` ** (` agent ` /` user ` ), ` mode ` (fg/bg), git refs (branch/worktree), optional
197198 forge refs (PR), and an ** optional ` slug ` ** (see §8.3).
198- - ** History** — append-only transition log per task (timestamp, from/to state, via, DoD
199- verdict). This is cloude-cade's ` ** Log ` as structured rows.
199+ - ** History** — append-only transition log per task. Each entry: timestamp, from/to state,
200+ via, and the ** responsibilities settled that turn** (each with its ` status ` and, if
201+ ` FAILED ` , the agent's comment). This is cloude-cade's ` ** Log ` as structured rows — but
202+ responsibilities are ** agent-only** obligations (a deliberate divergence: cloude-cade's DoD
203+ could include user items; here user actions just drive transitions directly).
200204
201205### 8.2 Artifacts (ADR 0003)
202206
@@ -225,7 +229,7 @@ mounted creds. Values never enter the DB, artifacts, or image layers.
225229
2262301 . ** Idea → task.** A user captures an idea / promotes it via the dashboard (REST). The task
227231 service creates a Task row (internal id, chosen workflow, ` repo_id ` ), in the workflow's
228- initial state, with the ball held appropriately. No slug yet.
232+ initial state, with the turn assigned appropriately. No slug yet.
2292332 . ** Assign & spawn.** The task service assigns the task to a session service (runner). The
230234 runner builds/selects the composed image (ADR 0005), injects the repo's secrets (ADR 0007),
231235 creates the task container (sibling, DooD) and its tmux session, and starts the agent.
@@ -237,8 +241,8 @@ mounted creds. Values never enter the DB, artifacts, or image layers.
2372415 . ** Work.** The agent plans/implements; artifacts (plan/notes) flow over MCP; the agent runs
238242 workflow skills (e.g. ` babysit-ci ` ) that may use ` gh ` /git and call back over REST/MCP to
239243 request transitions. The task service deterministically enforces the workflow's state
240- machine and DoD gating, flips the ball per the fg/bg classification, and appends history.
241- 6 . ** Observe & steer.** The dashboard reflects state/ball /history live (REST); the user
244+ machine and responsibility gating, flips the turn per the fg/bg classification, and appends history.
245+ 6 . ** Observe & steer.** The dashboard reflects state/turn /history live (REST); the user
242246 presses ` t ` to drop into a task's tmux and back.
2432477 . ** Terminal states & cleanup.** On COMPLETE/DROPPED (or the workflow's terminals), cleanup
244248 runs the core's agnostic teardown (tmux/worktree/branch) plus the workflow's specific
@@ -259,12 +263,12 @@ mounted creds. Values never enter the DB, artifacts, or image layers.
259263
260264```
261265panopticon/
262- core/ # ports (ABCs), domain models, state-machine + ball + DoD engine — no LLM/UI/DB
266+ core/ # ports (ABCs), domain models, state-machine + turn + responsibility engine — no LLM/UI/DB
263267 taskservice/ # control plane: REST + MCP servers, repository adapter (SQLite), workflow loader
264268 sessionservice/# runner: execution-backend adapter (Docker+tmux), image build/compose, secret injection
265269 terminal/ # `panopticon` CLI + dashboard (Textual) — presentation adapter
266270 workflows/ # built-in workflow classes (parity, free-form) on a registered path
267- container/ # in-container entrypoint, hooks (slug, ball ), skill definitions, REST/MCP client
271+ container/ # in-container entrypoint, hooks (slug, turn ), skill definitions, REST/MCP client
268272```
269273
270274The determinism invariant maps onto packages: only ` container/ ` (and user workflow * skills* )
0 commit comments