Skip to content

[AIT-9] ascii-guard linting#80

Merged
fxstein merged 8 commits intomainfrom
fxstein/AIT-9-ascii-guard-linting
Jan 31, 2026
Merged

[AIT-9] ascii-guard linting#80
fxstein merged 8 commits intomainfrom
fxstein/AIT-9-ascii-guard-linting

Conversation

@fxstein
Copy link
Owner

@fxstein fxstein commented Jan 31, 2026

Closes AIT-9

Summary

Integrated ascii-guard linting into pre-commit hooks and CI/CD workflows to automatically validate ASCII art alignment in documentation. Cleaned 17+ existing documentation files.

Changes

  • Pre-commit: Enabled ascii-guard hook with uv run ascii-guard lint
  • CI/CD: Added ASCII art linting step to docs-quality job
  • Dependencies: Updated ascii-guard from >=0.1.0 to >=1.5.0
  • Tests: Created validation tests for ascii-guard integration
  • Documentation:
    • Fixed 7 ASCII art boxes in 3 files
    • Updated CONTRIBUTING.md with pre-commit and ASCII art guidelines
    • Created design document (docs/design/ascii-guard-integration.md)

Bug Reports Filed

Discovered 2 bugs in ascii-guard during integration:

  • #31 - Doubles vertical bar instead of adding space
  • #32 - Adds extra vertical bar at line end instead of padding

Test Plan

  • Pre-commit hook runs on markdown commits
  • Validation tests pass (2/2)
  • Documentation cleaned (100 files, 0 errors after fixes)
  • CI/CD workflow passes on this PR

Add comprehensive design document for integrating ascii-guard linting
into pre-commit hooks and CI/CD workflows. Document covers:

- ascii-guard tool overview and purpose
- Integration points (pre-commit, CI/CD)
- Configuration requirements
- Document cleanup strategy (17+ files with ASCII art)
- Testing approach and validation tests
- Implementation plan and rollout sequence

Design document location: docs/design/ascii-guard-integration.md

Completes task #272.1 for Linear issue AIT-9.
Ready for human review (task #272.2).
Simplified design document per feedback:
- Removed verbose details about ascii-guard features
- Focused on WHY (AI-generated diagrams have alignment errors)
- Focused on HOW (5-step rollout sequence)
- Cut document from 520 lines to ~60 lines

Design document location: docs/design/ascii-guard-integration.md
…ask#272.4)

Add ascii-guard linting to catch ASCII art alignment errors:

Pre-commit (.pre-commit-config.yaml):
- Uncommented ascii-guard hook
- Changed entry from 'ascii-guard lint' to 'uv run ascii-guard lint'
- Added exclude pattern for .ai-todo/

CI/CD (.github/workflows/ci-cd.yml):
- Added 'Lint ASCII art boxes' step to docs-quality job
- Runs after markdownlint, before TODO.md linting

Dependencies (pyproject.toml):
- Updated ascii-guard from >=0.1.0 to >=1.5.0

Related: AIT-9
…272.6)

Tests (tests/validation/test_ascii_art_validation.py):
- test_ascii_guard_installed: Verify ascii-guard is executable
- test_ascii_guard_passes_on_all_docs: Verify docs pass linting

Documentation fixes:
- Fixed 7 ASCII art boxes in 3 files:
  - docs/design/GIT_HOOKS_DESIGN.md (4 boxes)
  - docs/design/BUG_REPORTING_DESIGN.md (1 box)
  - docs/archive/RELEASE_NUMBERING_MAPPING.md (2 boxes)

All validation tests now pass.

Related: AIT-9
Add pre-commit hooks section documenting:
- How to install pre-commit hooks
- ASCII art guidelines using ascii-guard
- Manual commands for linting and fixing

Completes ascii-guard integration for AIT-9.
All subtasks completed:
- Design document created and approved
- Pre-commit hook enabled
- CI/CD integration added
- Validation tests created (passing)
- Documentation cleaned (7 boxes fixed)
- CONTRIBUTING.md updated

Related: AIT-9
@linear
Copy link

linear bot commented Jan 31, 2026

Changed from glob patterns to directory path:
- Before: uv run ascii-guard lint '**/*.md' '**/*.mdc'
- After: uv run ascii-guard lint docs/

Glob patterns with quotes don't expand in CI/CD shell.
Using directory path is simpler and works correctly.

Related: AIT-9
Add .ascii-guard.toml configuration:
- Scan all text files in repository
- Exclude .ai-todo/, .venv/, build artifacts
- 10MB file size limit

Fix CI/CD command:
- Changed from glob patterns to directory scan: 'uv run ascii-guard lint .'
- Scans entire repo (254 files) according to config
- Properly excludes configured directories

Verified locally: 254 files checked, 49 boxes found, 0 errors.

Related: AIT-9
@fxstein fxstein merged commit f7ca7af into main Jan 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant