# WritersLogic Path Rules Evaluator

> WritersLogic Path Rules Evaluator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Evaluates up to 25 file paths against .gitignore, CODEOWNERS, or glob patterns and reports per-path match status, winning rule, and reason

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/path-rules?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-path-rules-evaluator-0cbc0639
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZcGfkuvD6eLma9Fl43q9k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-path-rules-evaluator-0cbc0639 -d '<json body>'
```

Example prompt: Check these 5 paths — src/app/index.ts, dist/bundle.js, .env, node_modules/lodash/index.js, and docs/README.md — against this .gitignore text and tell me which ones would be ignored, which rule matched each one, and why.

## When to prefer this

Use this endpoint when you need deterministic, rule-traceable evaluation of file paths against .gitignore, CODEOWNERS, or glob patterns — especially when you need to know not just whether a path matched but exactly which rule won and why. Prefer this over running git check-ignore locally when operating in an agent context without a local git repo, or when you need to validate expectations (pass/fail assertions) for a batch of paths programmatically.

## Known failure modes

- More than 25 paths submitted — request rejected
- Rules text exceeds 40,000 characters or more than 300 pattern lines — request rejected
- Invalid kind enum value — request rejected
- Path exceeds 300 characters or 12 segments — path rejected
- Nested .gitignore files or info/exclude not evaluated — only root-level file honored
- GitHub team resolution not performed for CODEOWNERS — raw owner strings returned
- Branch-specific CODEOWNERS rules not evaluated

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

For each submitted path: whether it matched (ignored/owned/matched), the line number and pattern text of the winning rule, the reason it matched or did not (last-match-wins logic, directory-only rules, negation, re-include blocked by excluded parent, CODEOWNERS owner list). For CODEOWNERS mode: flags lines GitHub would skip due to negation, character ranges, or bad owners. If per-path expectations were provided, a pass/fail result is included for each path.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "enum": [
    "gitignore",
    "codeowners",
    "glob"
   ],
   "type": "string"
  },
  "paths": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "path"
    ],
    "properties": {
     "path": {
      "type": "string",
      "maxLength": 300,
      "description": "Repository-relative path with / separators, at most 12 segments."
     },
     "isDir": {
      "type": "boolean",
      "description": "gitignore/glob: the path is a directory (a trailing / also says so)."
     },
     "expect": {
      "enum": [
       "match",
       "no-match"
      ],
      "type": "string",
      "description": "match = ignored (gitignore), owned (codeowners, default), matched (glob)."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 25,
   "minItems": 1
  },
  "rules": {
   "type": "string",
   "maxLength": 40000,
   "description": "File text, at most 300 pattern lines."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-path-rules-evaluator-0cbc0639/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
