Skip to main content

Library-first code compliance tooling for the IIL Platform (Django, HTMX, Docker, Nginx)

Project description

iil-codeguard

Library-first code compliance tooling for the IIL Platform.

Status: Skeleton (2026-05-10) — implementation per ADR-191 v1.1, ADR-192 v1.1, ADR-193 v1.1 Versioning: CalVer (YYYY.MM.PATCH) Python: 3.12+

What it checks

Category Rules Source
Service Layer SL-001..006 ADR-009 + ADR-192
HTMX Templates HX-001..009 ADR-048 + ADR-192
Docker Compose DC-001..009 ADR-021/022 + ADR-193
Dockerfile DF-001..009 ADR-056 + ADR-193
Nginx (optional) NX-001..005 ADR-060 + ADR-193

All rules emit findings in SARIF 2.1.0 (GitHub Code Scanning native).

Architecture

Core Library (stdlib-first: ast, html.parser, pyyaml)
    │
    ├── CLI: codeguard audit . --format sarif
    ├── Pre-commit Hook
    ├── GitHub Action: codeguard.yml
    └── MCP Server (2 tools: codeguard_audit, codeguard_check_file)

Quick Start (planned)

pip install iil-codeguard

# CLI
codeguard audit .                    # human-readable text
codeguard audit . --format sarif     # SARIF 2.1.0 for GitHub
codeguard check-file apps/views.py   # single file

# Pre-commit
echo '
- repo: https://github.com/achimdehnert/iil-codeguard
  rev: v2026.05.0
  hooks:
    - id: codeguard
' >> .pre-commit-config.yaml

# GitHub Action
# Copy .github/workflows/codeguard.yml from this repo

# MCP (in mcp_config.json)
"iil-codeguard": {
  "command": "iil-codeguard-mcp",
  "args": []
}

Why a separate package?

ADR-191 v1.1 explains the trade-offs vs. extending platform-context:

  • CLI ab Tag 1 → erfasst Dependabot, Web-UI-Edits, External Contributors
  • 2 MCP-Tools statt 4 → kein "god server"
  • Eigenes Repo = unabhängiger Release-Zyklus
  • Pattern wie iil-adrfw (ADR-190)

Empirical Foundation

The rule design is grounded in a 2026-05-10 stakeholder validation across 7 consumer repos:

  • 388 Views (110 CBV, 6 async, 272 FBV)
  • 940 HTMX elements (399 with Django tags inside attribute values)
  • 0 pathological cases ({% %} between HTMX attributes) — covered by HX-009 trip-wire

Status & Roadmap

See ROADMAP.md for the 8.5-day implementation plan.

License

MIT (consistent with other iil-* packages).

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

iil_codeguard-2026.5.1.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

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

iil_codeguard-2026.5.1-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file iil_codeguard-2026.5.1.tar.gz.

File metadata

  • Download URL: iil_codeguard-2026.5.1.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for iil_codeguard-2026.5.1.tar.gz
Algorithm Hash digest
SHA256 211f6469e2f6e6a2f5efee123f76b9860cf78d042471bfbdff219dcb79078a08
MD5 4fdff6707da243d8fff7ca0f0c4c4fce
BLAKE2b-256 4f925a9cddd6c30adc4bbc37e84278b97fff00e1d781b61b1f9b7b4428a51af5

See more details on using hashes here.

File details

Details for the file iil_codeguard-2026.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iil_codeguard-2026.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfa95f95f8ce91b24d6e5afcb66017213639d08f9eb5407b411fad4f16f690e2
MD5 71a43a6b5b1306963b9af848212e3f21
BLAKE2b-256 99f503aaebac9159f4b349551c9a8dcd3e6e4d79c36883b45f0968e3e79b2040

See more details on using hashes here.

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