Skip to content

Quickstart

Five steps to wire jk-standards into an existing repository. Everything below assumes you already have git, Python 3.11+, and pre-commit installed.

Create jk-standards.yaml at the repo root. Every field is optional — this minimal shape gets you started:

version: 1
doc_roots:
- path: docs
extensions: [".md"]
taxonomy:
classes: [generated, gated, archived]
drift_map: .github/docs-drift-map.yml

For the full field surface see the Configuration reference.

Create .github/docs-drift-map.yml. Each mapping declares that a change to matching sources must be accompanied by a change to the mapped doc (or a Docs-Not-Affected: trailer):

version: 1
mappings:
- sources:
- "src/**"
doc: "docs/reference.md"
reason: "reference.md documents the public API surface."

Reasons are shown in the failure message when the check trips — write them for a future engineer, not for you today.

Every doc under doc_roots needs a class: frontmatter block. Three values are recognized by default:

  • class: gated — living current-state doc, linted every commit
  • class: archived — frozen dated record, exempt from lint
  • class: generated — machine-produced output, freshness-checked
---
class: gated
title: My doc
---
# ...

Run jk-standards doc-taxonomy — it will name every doc missing a class.

Add jk-standards to your .pre-commit-config.yaml, pinned to a release tag:

- repo: https://github.com/JimAKennedy/jk-standards
rev: v0.1.0
hooks:
- id: doc-taxonomy
- id: status-prose
- id: file-line-refs

Then pre-commit install — the hooks will run on every commit.

Add a workflow that calls jk-standards’ shipped one — it runs every check plus doc-drift (which needs the PR merge base):

jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          fetch-depth: 0

      - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
        with:
          python-version: ${{ inputs.python-version }}

      - name: Install jk-standards
        run: pip install "git+https://github.com/JimAKennedy/jk-standards@${{ inputs.toolkit-ref }}"

      - name: Run checks
        run: jk-standards all --config "${{ inputs.config }}"

In your consuming repo:

.github/workflows/docs.yml
name: docs
on: [pull_request, push]
jobs:
discipline:
uses: JimAKennedy/jk-standards/.github/workflows/doc-discipline.yml@v0.1.0

That’s it. The rest of the discipline lands progressively: enable count-drift when you have inventory nouns to gate, enable behavioral-claims when you want prose to cite tests, add entries to generated: when you have generated docs to freshness-check. Adoption is designed to be incremental — checks whose config section is empty report themselves as skipped rather than failing.