feat: Add invariants system for Plan Mode verification
Adds rulespec.yaml and envelope.yaml support for machine-readable invariant checking during plan completion. - Add invariants module with Rulespec, ActionEnvelope, and evaluation logic - Add Invariants section to system prompt with workflow instructions - Show rulespec/envelope file status in plan verification output - Rulespec written during planning (captures constraints from task) - Envelope written after implementation (documents what was built)
This commit is contained in:
@@ -63,7 +63,7 @@ pub fn format_tool_result_summary(
|
||||
tool_result: &str,
|
||||
tool_success: bool,
|
||||
) -> ToolOutputFormat {
|
||||
let is_todo_tool = tool_name == "todo_read" || tool_name == "todo_write";
|
||||
let is_self_handled = is_self_handled_tool(tool_name);
|
||||
let is_compact_tool = matches!(
|
||||
tool_name,
|
||||
"read_file"
|
||||
@@ -77,7 +77,7 @@ pub fn format_tool_result_summary(
|
||||
| "plan_approve"
|
||||
);
|
||||
|
||||
if is_todo_tool {
|
||||
if is_self_handled {
|
||||
ToolOutputFormat::SelfHandled
|
||||
} else if is_compact_tool {
|
||||
if !tool_success {
|
||||
|
||||
Reference in New Issue
Block a user