Skip to main content

CLI-first Markdown structure checker for repositories

Project description

docguard

CLI-first Markdown structure checker for repositories.

Docguard helps teams keep documentation from growing too large, becoming unreachable from index files, or drifting away from expected document types such as ADRs.

Quick start

Install from PyPI as docguard-structure (CLI command remains docguard; this is not the unrelated docguard-cli package). Use uv add docguard-structure, then run uv run docguard docs/ --summary. Equivalent with pip: pip install docguard-structure. Git-based install: usage guide — Install from Git.

Configure [tool.docguard] in pyproject.toml using the configuration example. Full install commands, pytest integration, and exit codes: usage guide. To adopt docguard in another repository, see Use in another repository.

docguard docs/ --summary

What this tool checks

Docguard focuses on document structure and repository health. Prose style checks (DG-STYLE001, DG-STYLE002) flag decorative strong emphasis and conversational phrasing in body text; they are not a general Markdown formatter.

Phase What you can check Diagnostics Typical default
Core Document and section size; typed document shape; index reachability; prose style DG-SIZE001, DG-SIZE002, DG-FORMAT001, DG-FORMAT003, DG-ORG003, DG-STYLE001, DG-STYLE002 on when configured; prose style warning
Phase 2 Link structure between files: orphans and hub dead ends DG-ORG001, DG-ORG002 opt-in, warning
Phase 3 Structure inside each file: mixed roles and heading level skips DG-SPLIT001, DG-FORMAT002 opt-in, warning
Duplicate guidance Repeated commands, list guidance, or prose paragraphs across the scan scope; headings and paragraphs opt-in DG-SPLIT002 opt-in, warning

Phase 2 details: organization rules. Phase 3 and duplicate guidance details: structure rules. Prose style details: prose style rules. To adopt docguard in another repository, see Use in another repository.

Development

Requires Python 3.11+ and uv on PATH:

uv pip install -e ".[dev]"
uv run pytest
uv run docguard README.md CONTEXT.md docs/ --summary

Documentation

Status

Alpha (Development Status :: 3 - Alpha). Configuration keys, diagnostic JSON fields, and rule defaults may change; breaking changes are recorded in CHANGELOG.md. Exit codes and existing diagnostic meanings are preserved where practical.

Phase 3 structure diagnostics (DG-SPLIT001, DG-FORMAT002) and prose style diagnostics (DG-STYLE001, DG-STYLE002) are implemented. Release readiness is documented in docs/release-readiness.md.

Repository navigation

Relative links for clone checkouts and docguard reachability checks:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docguard_structure-0.2.0.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docguard_structure-0.2.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file docguard_structure-0.2.0.tar.gz.

File metadata

  • Download URL: docguard_structure-0.2.0.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docguard_structure-0.2.0.tar.gz
Algorithm Hash digest
SHA256 99c16cc934d0e25327a25a23a040d0f78c0f88c1b8bea068757b7e934fd7001b
MD5 ccfbd8159db435ca04058be66fa1fdf2
BLAKE2b-256 f17c5b80d49ab91cfe1dfef4e998d5fa6db6543a716ef929beb629a98dcc240e

See more details on using hashes here.

Provenance

The following attestation bundles were made for docguard_structure-0.2.0.tar.gz:

Publisher: publish.yml on takuto-NA/docguard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docguard_structure-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for docguard_structure-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 862c9585641364d035e5905f89368bcf826fd514a73dd157fb87cb261f3351c2
MD5 9e70a5dd1e1055dad75c459840db82e6
BLAKE2b-256 7a1d7677231cf9a79ce74bb1e949d2c4b9ed4fc5da9be520912f720a02b51eeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for docguard_structure-0.2.0-py3-none-any.whl:

Publisher: publish.yml on takuto-NA/docguard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page