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.
1. Add a config file
Section titled “1. Add a config file”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.ymlFor the full field surface see the Configuration reference.
2. Add a drift map
Section titled “2. Add a drift map”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.
3. Classify existing docs
Section titled “3. Classify existing docs”Every doc under doc_roots needs a class: frontmatter block. Three
values are recognized by default:
class: gated— living current-state doc, linted every commitclass: archived— frozen dated record, exempt from lintclass: generated— machine-produced output, freshness-checked
---class: gatedtitle: My doc---
# ...Run jk-standards doc-taxonomy — it will name every doc missing a class.
4. Wire the pre-commit hooks
Section titled “4. Wire the pre-commit hooks”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-refsThen pre-commit install — the hooks will run on every commit.
5. Wire the reusable CI workflow
Section titled “5. Wire the reusable CI workflow”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:
name: docson: [pull_request, push]jobs: discipline: uses: JimAKennedy/jk-standards/.github/workflows/doc-discipline.yml@v0.1.0That’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.
What’s next
Section titled “What’s next”- How to adopt in a repo — same walkthrough in more depth, with worked examples.
- How to add a check — writing your own check and exposing it via the CLI + hooks + emitters.
- Checks reference — every check, its rule, and its escape hatch.