reflect
Compare expected vs actual outcomes with deviation type to compute reflective signals and a dual-signal score, enabling pattern extraction and belief updates for continuous improvement.
Instructions
Core pedagogical loop. Provide deviation_type and optionally objective_signals; server computes ReflectiveSignals and a dual-signal SCORE. Closes the loop on patterns, beliefs, and v1.4 control-plane nodes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>",
"expected_outcome": "<expected_outcome>",
"actual_outcome": "<actual_outcome>",
"deviation_type": "<deviation_type>"
},
"name": "reflect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ||
| pattern_type | No | ||
| actual_outcome | Yes | ||
| deviation_type | Yes | ||
| extract_pattern | No | ||
| confidence_delta | No | ||
| expected_outcome | Yes | ||
| next_time_recipe | No | ||
| objective_signals | No | Optional environment-sourced signals. Recognised keys: tests_delta (int), lint_delta (int, negative = improvement), files_touched (int), predicted_files (int), impact_fidelity (float 0-1), retry_count (int), rollback_count (int). Unknown keys are ignored. | |
| applied_pattern_ids | No | ||
| pattern_description | No | ||
| verification_results | No | Optional closeout checks. Each item may reference an existing VERIFICATION node with verification_id, or may be an inline summary with status plus summary/command/result/evidence. Inline summaries are accepted and stored as non-blocking VERIFICATION nodes. | |
| decisions_reconsidered | No | ||
| assumptions_invalidated | No |