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.

Category: Enquiry · Compare: Requirement navigator → health view (planned)

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

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

ArgumentTypeRequiredWhat it is
includeDevelopedbooleanList 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"
  } ]
}