ek9_check_requirements
Answers status (healthy | violations | dangling-anchors) and healthy first, then requirementCount, developedCount, outstandingCount, violations[] (the store is broken), danglingAnchors[] (a @Test names a requirement that does not exist), outstanding[] (the backlog) and unanchoredTests[] (the authoring work-list) - the whole graph, nothing to verify.
When to use it
'Is the requirement graph healthy, and what is still outstanding?' is one call: {} - no cursor, no id; the whole store plus the last compile's @Test anchors.
When not to use it
- Reading ONE requirement in depth (title, children, anchors) - use
ek9_query_requirement(mode=detail). - Anchoring a test to a requirement from the work-list — use
ek9_anchor_testwith the file + testName this tool reports. - Confirming a requirement is actually FIT (passing/adequate tests) — developed means 'someone claimed it', not correct; use
ek9_run_testsand the quality report.
Details
Four disjoint findings: violations[] (store broken, fix a file; kind is GraphViolation kebab-cased), danglingAnchors[] (a @Test names a non-existent requirement — most urgent), outstanding[] (nothing anchors it yet — backlog, carries title), unanchoredTests[] (NOT a fault — the authoring work-list, each entry ready for ek9_anchor_test). A requirement is DEVELOPED when a @Test names it, a rule anchor binds it, or every live child is developed (viaChildren separates the last case). anchorsResolved distinguishes '0 anchors' from 'nothing compiled'; errors when no workspace is configured (cannot locate .ek9-ai/requirements/).
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
includeDeveloped | boolean | List every developed requirement with its anchoring tests, not just the counts. Verbose on a large graph. |
Recorded calls
Real calls, recorded against small projects and checked on every build - a changed answer fails it. 3 of the 6 recorded are shown.
Check requirements developed
Request
{ }
Response
{
"anchorsResolved" : true,
"danglingAnchors" : [ ],
"developedCount" : 1,
"healthy" : true,
"meta" : {
"serverMs" : "<timing>"
},
"outstanding" : [ ],
"outstandingCount" : 0,
"requirementCount" : 1,
"status" : "healthy",
"unanchoredTestCount" : 0,
"unanchoredTests" : [ ],
"violations" : [ ]
}
Check requirements outstanding
Request
{ }
Response
{
"anchorsResolved" : true,
"danglingAnchors" : [ ],
"developedCount" : 0,
"healthy" : true,
"meta" : {
"serverMs" : "<timing>"
},
"outstanding" : [ {
"requirement" : "REQ:settlement",
"title" : "Settle cleared payments"
} ],
"outstandingCount" : 1,
"requirementCount" : 1,
"status" : "healthy",
"unanchoredTestCount" : 0,
"unanchoredTests" : [ ],
"violations" : [ ]
}
Check requirements violations
Request
{ }
Response
{
"anchorsResolved" : true,
"danglingAnchors" : [ ],
"developedCount" : 0,
"healthy" : false,
"meta" : {
"serverMs" : "<timing>"
},
"outstanding" : [ ],
"outstandingCount" : 0,
"requirementCount" : 0,
"status" : "violations",
"unanchoredTestCount" : 0,
"unanchoredTests" : [ ],
"violations" : [ {
"detail" : "frontmatter is never closed - no second '---'",
"file" : "REQ-broken.md",
"kind" : "unparseable-node"
} ]
}