Checklist coverage: caller requirements against caller evidence

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/requirement-coverage · Id requirement-coverage

Evaluates a checklist of requirements the caller defines (each made of needs on evidence keys: present, equals, one of, min/max, maximum age) against evidence the caller supplies, and returns met / unmet / unknown per requirement with the exact need and value that decided it. For an agent that must prove a task's acceptance criteria were covered before it reports done. Does not judge whether the policy is right, does not fetch evidence, and never reads the clock (pass asOf for age checks); missing, stale or conflicting evidence is unknown, never pass.

What you get

A deterministic done-gate: unmet versus merely unverified requirements are separated, with the witness path.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/requirement-coverage. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/requirement-coverage \
  -H 'content-type: application/json' \
  -d '{"requirements":[{"id":"tests-green","needs":[{"key":"test_exit_code","equals":0}]},{"id":"coverage","needs":[{"key":"coverage_pct","min":80}]},{"id":"reviewed","needs":[{"key":"review_approved"},{"key":"review_bot_ok"}],"mode":"any"}],"evidence":[{"key":"test_exit_code","value":0},{"key":"coverage_pct","value":83.5},{"key":"review_approved","value":true}]}'

Input

FieldTypeRequiredDescription
requirementsarray<object>; max 100 itemsyesThe checklist.
evidencearray<object>; max 500 itemsyesObserved facts. Several items may share a key (conflicts surface as unknown).
asOfstring; length 0..40noReference instant (ISO date or instant) for evidence age; required only when a need sets maxAgeDays. The check never reads the clock.

Example request body

{
  "requirements": [
    {
      "id": "tests-green",
      "needs": [
        {
          "key": "test_exit_code",
          "equals": 0
        }
      ]
    },
    {
      "id": "coverage",
      "needs": [
        {
          "key": "coverage_pct",
          "min": 80
        }
      ]
    },
    {
      "id": "reviewed",
      "needs": [
        {
          "key": "review_approved"
        },
        {
          "key": "review_bot_ok"
        }
      ],
      "mode": "any"
    }
  ],
  "evidence": [
    {
      "key": "test_exit_code",
      "value": 0
    },
    {
      "key": "coverage_pct",
      "value": 83.5
    },
    {
      "key": "review_approved",
      "value": true
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
requirementsarray<object>no
countsobjectnoNon-optional requirements by state; optional ones are counted separately.
unmetarray<string>; max 100 itemsnoIds of required requirements shown unmet.
unknownIdsarray<string>; max 100 itemsnoIds of required requirements the evidence cannot decide.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the compliance-evidence-kit package.

Machine-readable