* Cleanup + Missing greenlet error * fix(messaging): persist a group's active-session pointer so posts reuse it create_session and create_session_with_access_check set group.active_session_id from session.id BEFORE the flush that materializes it — the id is a flush-time uuid4 default, so the pointer was written as NULL and every post opened a fresh session, fragmenting one conversation across many. Flush first, then link, the same ordering the seed path already uses. Two tests fabricated "two distinct sessions" by calling create_session twice on one group, which only differed because of this bug; switch them to two groups so they keep testing their real intent. Add a regression guard that the pointer is actually persisted and a second create reuses the live session. * fix(orchestrator): gate spawns on dependencies and keep cell tasks in their cell The cross-task dependency check ran only on the dev dispatch path, so cell-PM, Main-PM and board agents were spawned onto dependency-blocked tasks and flailed unblock / escalate / notify against an unfinished upstream — climbing ownership of cell work up to the board, which cannot drive it, and deadlocking the task. - Move the dependency gate into the shared spawn readiness check so it covers every role, and auto-block the task so it leaves the pending pool until the upstream reaches a terminal state (then the existing auto-unblock revives it). - Cell-ownership invariant: a backend/frontend/ux_ui task may only be worked or owned by its own cell. The readiness gate refuses a board or Main-PM spawn onto a cell task; reassign refuses and clears such an owner; and on dependency-clear a mis-owned cell task is re-homed to its cell's pending pool instead of reviving under an owner that cannot progress it. - A dependency block is never a CEO signal: notify(target=ceo) is refused while the task is waiting on an unfinished upstream, with a remediate to idle and wait — the block clears on its own. * Uploading images + Fixing pyproject.toml * ++ * revert(orchestrator): drop the cell-ownership block pending a tooling audit The cell-ownership invariant added earlier — a board / Main-PM role may never be spawned onto or reassigned to a cell task, plus re-homing a mis-owned cell task on dependency-clear — was too absolute. It forbids a higher role from stepping in when something genuinely deeper is going on, and contradicts the existing rule that main_pm may hold a task at awaiting_pm_review. The dependency spawn gate already prevents the cascade that handed the board cell tasks; the deadlock it guarded against will be addressed with a return-path approach after auditing what tools the cell PMs actually need. Keeps the dependency gate and the CEO dependency-block notify guard. * docs(prompts): a dependency wait is wait-and-idle, not escalate The cell-PM and Main-PM prompts told agents to escalate_up / retry unblock on a blocked task without distinguishing a dependency wait (which auto-clears the moment the upstream completes) from a real wedge — the source of the escalate/unblock flail and the CEO-notification spam. Split the blocked-state guidance: a cross-cell dependency wait = note + i_am_idle (do not escalate, unblock, or notify the CEO); escalate only a genuinely broken upstream. Fix two stale references to i_am_blocked, a developer-only verb the PMs do not have, to escalate_up. Correct the CLAUDE.md verb-surface table, which understated every role: it listed 4 cell_pm verbs while the flow manifest derives the full set (11, including unclaim and i_am_idle) from lifecycle.spec.intents_for_role. * feat(gateway): cell_pm reassign verb — intra-cell developer hand-off A cell PM can now hand a claimed/in_progress task to another developer in its own cell without unclaim (which drops the work back to the pool and loses the assignee). The branch is keyed to the task, so the work-in-progress is preserved; the new dev is respawned to continue. Intra-cell only: the task must be in the caller's cell and new_assignee must be a developer of that same cell. Wired through every layer: the reassign IntentSpec (composes=(), cell_pm-only), the choreographer verb + intra-cell guard, a reaper-safe TaskService.reassign_active_claim (reseeds the claim heartbeat so the new dev is not immediately reaped), the ReassignRequest schema, the cell_pm flow route, and the MCP flow-server tool. Tracing-waived like unclaim (mechanical hand-off). Regenerated lifecycle/verb artifacts; prompt + CLAUDE.md updated. --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
4.4 KiB
Intent Verbs (gateway-facing surface)
claim_doc_task
Claim awaiting_documentation. Returns evidence inline.
Allowed roles: documenter
Composes: (no atomic actions)
claim_review
Claim a task in awaiting_qa for review. Returns evidence inline.
Allowed roles: qa
Composes: (no atomic actions)
complete
Cell PM merges leaf PR + transitions to completed; Main PM merges root PR + escalates to CEO.
Allowed roles: cell_pm, main_pm
Composes: complete
Side effects: pr_merge
delegate
Create a subtask under the current task. Validates the delegation chain (main_pm->cell_pm; cell_pm->its team's devs) and the assignee-vs-task_type rule (Cell PMs get planning-typed tasks; devs get code/research, UX devs also design). documentation is NOT delegatable — the lifecycle auto-creates the doc phase after the code subtask passes QA.
Allowed roles: cell_pm, main_pm
Composes: create_subtask
escalate_to_ceo
Escalate to CEO with reason. Transitions to awaiting_ceo_approval.
Allowed roles: head_marketing, main_pm, product_owner
Composes: escalate_to_ceo
escalate_up
Escalate to your role's escalation_target.
Allowed roles: cell_pm, main_pm
Composes: (no atomic actions)
fail_review
Fail QA with concrete issues. Transitions to needs_revision.
Allowed roles: qa
Composes: qa_fail
give_me_work
Return your most-actionable task or signal idle.
Allowed roles: cell_pm, developer, documenter, main_pm, qa
Composes: (no atomic actions)
i_am_blocked
Escalate to PM. Logs a struggle journal entry.
Allowed roles: developer, documenter, qa
Composes: block
i_am_done
Submit work for QA. Auto-runs in_progress->verifying then verifying->awaiting_qa. Strict - PR must be open (call open_pr first) and >=1 commit.
Allowed roles: developer
Composes: submit_verification → submit_qa
Preconditions: commits>=1, owns_task
i_am_idle
Signal you have no active work. PMs auto-pause owned in_progress tasks.
Allowed roles: auditor, cell_pm, developer, documenter, head_marketing, main_pm, product_owner, qa
Composes: (no atomic actions)
i_documented
Signal docs complete. Transitions to awaiting_pm_review.
Allowed roles: documenter
Composes: docs_complete
i_will_plan
PM mirror of i_will_work_on for parent tasks. Claim, plan, transition to in_progress; from there delegate subtasks.
Allowed roles: cell_pm, main_pm
Composes: claim → set_plan → start
Preconditions: plan
i_will_work_on
Claim a task, set the plan, and transition to in_progress. Atomic - preconditions checked before any state mutation.
Allowed roles: developer
Composes: claim → set_plan → start
Preconditions: plan
open_pr
Push the branch and open a PR. Atomic - preconditions (assignee, >=1 commit, no prior PR) checked BEFORE any git operation. After success, call i_am_done.
Allowed roles: developer
Composes: (no atomic actions)
Side effects: push_branch, create_pr
Preconditions: commits>=1, no_prior_pr, owns_task
pass_review
Pass QA. Transitions awaiting_qa -> awaiting_documentation.
Allowed roles: qa
Composes: qa_pass
reassign
Hand a claimed/in_progress task to another developer in your own cell. The branch is keyed to the task (not the agent), so it is preserved — the new developer continues the work-in-progress. No status change.
Allowed roles: cell_pm
Composes: (no atomic actions)
resume
Resume a paused task you own. paused -> in_progress.
Allowed roles: cell_pm, developer, documenter, main_pm, qa
Composes: resume
submit_up
Cell PM opens the cell→root PR and moves the cell task to awaiting_pm_review. The same Cell PM then completes it.
Allowed roles: cell_pm
Composes: submit_pm_review
Pre side effects: create_pr
triage
List actionable tasks in your scope.
Allowed roles: auditor, cell_pm, head_marketing, main_pm, product_owner
Composes: (no atomic actions)
triage_all
List actionable tasks across all teams (Main PM only).
Allowed roles: main_pm
Composes: (no atomic actions)
unblock
PM unblocks a blocked task; restores pre-block state.
Allowed roles: cell_pm, main_pm
Composes: unblock
unclaim
Voluntarily release a claim back to pending. The work-in-progress branch is preserved.
Allowed roles: cell_pm, developer, documenter, main_pm, qa
Composes: (no atomic actions)