Recipe catalog / plan-completeness
Grade plan completeness
How completely does plan cover what task requires, on a five-level rubric?
You need to check an agent-written plan against the task before execution starts, so missing requirements are caught while they are cheap to add.
Explore this recipe interactively ยท Source and implementation guide
Use plan-completeness in TypeScript
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { planCompleteness } from 'jev-recipes/plan-completeness';
const result = await planCompleteness({
"task": "Add an Export as CSV button to the reports page. The export must respect the filters currently applied and must work for guest accounts as well as members.",
"plan": "1. Add an Export as CSV button beside the existing PDF export control. 2. Create a /reports/export.csv endpoint that serializes the current report query. 3. Pass the active filter parameters from the page to the new endpoint. 4. Add an integration test that exports a filtered report and checks the rows match the filtered view.",
"minConfidence": 0.8
});
console.log(result);
Input contract
| Field | Type | Needed |
|---|---|---|
| task | string | Required |
| plan | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"task": {
"type": "string"
},
"plan": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"task",
"plan"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"score": {
"type": "number",
"minimum": 0
},
"level": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"completeness": {
"type": "string",
"enum": [
"none",
"partial",
"mostly",
"nearly",
"complete"
]
}
},
"required": [
"model",
"usage",
"status",
"score",
"level",
"confidence",
"probabilities",
"completeness"
],
"additionalProperties": false
}
}Saved example result
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo plan-completeness.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"score": 2.06,
"level": 2,
"confidence": 0.82,
"probabilities": {
"0": 0.01,
"1": 0.05,
"2": 0.82,
"3": 0.11,
"4": 0.01
},
"completeness": "mostly"
}
Evaluation evidence
No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.
Use the evaluation guide to measure this decision on your own labeled cases.
Limitations
- Grades coverage of stated and clearly implied requirements. It does not judge whether the planned steps would actually work.
- The top level requires a verification step. A plan that covers everything but never checks the result grades one level lower by design.
Related recipes
- answer-coverage: Use answer-coverage to check a finished draft against explicit questions rather than a plan against a task.
- clarify: Use clarify when the task itself is ambiguous, since a plan cannot cover requirements the task never made clear.