Skip to content

feat(agent): gate completion on observable verification conditions - #782

Open
dxin66 wants to merge 1 commit into
lsdefine:mainfrom
dxin66:feat/verified-completion-gate
Open

feat(agent): gate completion on observable verification conditions#782
dxin66 wants to merge 1 commit into
lsdefine:mainfrom
dxin66:feat/verified-completion-gate

Conversation

@dxin66

@dxin66 dxin66 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • expose optional verify_conditions through both tool schemas
  • capture the latest real result produced by each tool
  • block no_tool completion while any declared condition remains unsatisfied
  • support file existence, file content, command exit code, and tool output checks

Motivation

GenericAgent currently relies mainly on checklist state and response wording when deciding whether a planned task is complete. This allows an agent to report completion without observable evidence.

This change adds a deterministic completion gate for explicitly declared conditions. It does not attempt to solve semantic plan drift or independent reviewer verification.

Verification

  • added 7 focused verification-condition tests
  • ran 6 existing GA root contract tests
  • 13 tests passed on Python 3.12
  • validated both tool schema files as JSON
  • compiled the changed Python files successfully

Related to #647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant