PDD version 0.34.1

pdd-kit lint

Check that the Product Model is structurally sound, after every edit and in CI.

npx @itai-gendler/pdd-kit lint [--json]

Options

OptionMeaning
--jsonPrint the result as JSON instead of lines

What it does

  1. Finds the model. See Choosing the Product Model.
  2. Checks every file against the rules for its resource type. Each rule is listed on its type's page: the model as a whole, the Product, Entities, Interfaces, Experiences and Screens, Domains, Capabilities, Journeys, Business Rules, Variations and References.
  3. Checks that every code Reference points at a file Git tracks.
  4. Prints each error and warning, then a one-line verdict.

It only reads. A clean result means the model is well formed, not that it matches the code. Use pdd-verify for that.

JSON output

{
  "ok": false,
  "errors": ["/repo/product-model/capabilities/place-order/capability.md: missing H1 title"],
  "warnings": [],
  "counts": {
    "interfaces": 3, "experiences": 2, "screens": 1, "domains": 2, "entities": 6,
    "capabilities": 3, "capabilityScenarios": 4, "journeys": 2,
    "journeyScenarios": 3, "businessRules": 2
  }
}

Each error and warning is one string, prefixed with the file it concerns (for a resource, its absolute path). When no model is found, the output is { "ok": false, "errors": ["<message>"], "warnings": [], "counts": {} }.

Exits 0 when there are no errors (warnings never fail lint), 1 when there are errors or no model is found, and 2 for an unknown option.

Run it in CI

Run lint on every pull request, not only when product-model/ changes: a code rename can break a code Reference. Add pdd-kit as a devDependency at the version your skills were installed from (recorded in .pdd-kit-install.json beside the skills), so CI and your agent agree:

.github/workflows/pdd-kit.yml
name: pdd-kit
on: pull_request

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22 # any version from 20.12
          cache: npm
      - run: npm ci
      - run: npx @itai-gendler/pdd-kit lint

Warnings never fail the job; errors do. A green lint checks structure only: whether the code does what the model says is pdd-verify's job.

Next

  • view to read the model as a report.