Which gitignore, CODEOWNERS or glob rule matches a path
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
| Field | Type | Required | Description |
|---|---|---|---|
kind | string; one of "gitignore", "codeowners", "glob" | yes | |
rules | string; length 0..40000 | yes | File text, at most 300 pattern lines. |
paths | array<object>; max 25 items | yes |
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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
kind | string | no | |
ruleCount | integer | no | Pattern rules compiled (comments, blank and invalid lines excluded). |
results | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent