@fengrru/goal-verifier
v0.1.0
Published
Independent goal completion verification prevents false completions with LLM-based review, gap analysis, and dead-loop protection
Maintainers
Readme
@fengrru/goal-verifier
Independent goal completion verification for AI agents.
Install
npm install @fengrru/goal-verifierQuick Start
import { GoalVerifier } from "@fengrru/goal-verifier"
const verifier = new GoalVerifier({
provider: llmProvider,
maxRetries: 3,
})
const result = await verifier.verify({
goal: "Implement user authentication",
completedSteps: [...],
output: generatedCode,
})
console.log(result.status) // "satisfied" | "gap_found" | "impossible"
console.log(result.gaps) // what's missingVerification States
| State | Description | |-------|-------------| | satisfied | Goal fully achieved | | gap_found | Partial completion, missing items | | impossible | Goal cannot be achieved |
Features
- Independent LLM call: doesn't share main agent attention
- Gap analysis: identifies what's missing
- Loop prevention: maxRetries → force pass
- Heuristic fallback: DAG completion rate when LLM fails
Documentation
- API Reference — TypeDoc-generated API docs
- Source Code
- Examples
License
MIT
