debate_set_topic_priority
- Category: debate
- Access: write
- Audience: administrative (ordinary users do not normally call this directly)
Purpose
Sets the conductor-owned P0..P7 priority lane in topic metadata, with reason, next action, and blockers. The cross-topic triage authority behind debate_work_queue ordering.
Arguments
Required: topic_id, role, lane, reason.
Optional: blocked_by, next_action.
-
topic_id: existing debate topic. -
role. Note: Must name the CONDUCTOR role verbatim and be declared in the topic. -
lane. Note: P0..P7, case-insensitive on input and stored uppercased with a derived rank. -
reason. Note: Required and non-blank; stored and echoed back. -
blocked_by. Note: Optional blocker surfaced by the work queue. -
next_action. Note: Optional explicit next step surfaced by the work queue.
Result
Object with topic_id, lane, rank, reason, next_action, blocked_by, and updated_at.
Boundaries
Two gates in order: the role argument must read CONDUCTOR, and the caller must hold the conductor role (star scope alone never suffices). The topic must declare the role. Shape validation runs before either gate.
Lifecycle / side effects
Lane write persists atomically with an audit/history event and immediately reshapes work-queue ordering for the topic.
Errors
Bad lanes, missing reasons, undeclared roles, non-conductor callers, and unknown topics are rejected; failures change nothing.
Example
{
"lane": "P1",
"next_action": "Answer open Q",
"reason": "Blocks release packaging",
"role": "CONDUCTOR",
"topic_id": "<uuid>"
}
Result shape:
{
"blocked_by": "",
"lane": "P1",
"next_action": "Answer open Q",
"rank": 7,
"reason": "Blocks release packaging",
"topic_id": "<uuid>",
"updated_at": "<iso-8601>"
}
See also
debate_work_queue, debate_init, debate_protocol_state, debate_state, debate_reconcile_project.