Tool: refine_thoughts
Purpose
Apply an explicit feedback-loop refinement to a thought node. This is the GoT operator for corrections produced by critique, verification failure, or adversarial review.
Input
deliberation_id: target deliberation.source_node_id: thought being refined.node_id: accepted alias forsource_node_idfor compatibility.critique: optional critique that motivated the refinement.verification_failure: optional failed claim, evidence gap, or CoVe finding.refined_content: optional replacement/corrected content.branch_id: optional branch label for the new refinement node.
At least one of critique, verification_failure, or refined_content is required.
Behavior
- Creates a new thought node tagged
got,refined, andfeedback-loop. - Adds a strict directed
refinesedge from the new node to the source node. - Rejects cycles in the strict GoT subgraph.
- Respects
limits.max_nodesandlimits.max_edgesbefore mutating state. - Updates the frontier to the new refinement node.
Output
refined_node_id: ID of the new correction node.refinement_edge: therefinesedge with critique/failure notes.frontier_nodes: updated frontier.analysis: heuristic provenance and limitations.
Failure Semantics
Limit failures, missing source nodes, missing refinement inputs, and cycle rejections return structured MCP errors. The operation is atomic on limit failure: no node or edge is inserted when the refinement cannot be accepted.