Which gitignore, CODEOWNERS or glob rule matches a path

$0.005 USDC per call · Developer and security · POST /api/v1/path-rules · Id path-rules

Evaluates up to 25 file paths against the text of a .gitignore, a CODEOWNERS file or a list of glob patterns and reports, per path, whether it matched, the winning rule's line and pattern, and why (last match wins, directory-only rules, negation, a re-include blocked by an excluded parent directory, CODEOWNERS owner lists). Optional per-path expectations turn it into a pass/fail check, and CODEOWNERS lines GitHub would skip (negation, [ ] ranges, bad owners) are reported. Evaluates one root-level file only: no nested .gitignore files, no info/exclude, no GitHub team resolution or branch rules.

What you get

Answers 'is this path ignored / who reviews it' exactly instead of guessing from the pattern.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/path-rules. 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/path-rules \
  -H 'content-type: application/json' \
  -d '{"kind":"gitignore","rules":"build/\n*.log\n!keep.log\n/vendor/*\n!/vendor/keep","paths":[{"path":"build/out.js"},{"path":"keep.log"},{"path":"vendor/keep","isDir":true}]}'

Input

FieldTypeRequiredDescription
kindstring; one of "gitignore", "codeowners", "glob"yes
rulesstring; length 0..40000yesFile text, at most 300 pattern lines.
pathsarray<object>; max 25 itemsyes

Example request body

{
  "kind": "gitignore",
  "rules": "build/\n*.log\n!keep.log\n/vendor/*\n!/vendor/keep",
  "paths": [
    {
      "path": "build/out.js"
    },
    {
      "path": "keep.log"
    },
    {
      "path": "vendor/keep",
      "isDir": 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.
kindstringno
ruleCountintegernoPattern rules compiled (comments, blank and invalid lines excluded).
resultsarray<object>no
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 code-preflight-kit package.

Machine-readable