Ω-Grade Documentation Governance & Validation System with I18n, Drift Detection, and Plugin Architecture
Project description
Flamehaven-Doc-Sanity v1.2.0
Ω-Grade Documentation Governance & Validation System
Enterprise-grade documentation governance that enforces architectural purity
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
Flamehaven-Doc-Sanity is an enterprise-grade documentation governance system built on the principle that perfection is not a choice—it is a condition of existence (완벽은 선택이 아니라, 존재 조건이다).
This system ensures your documentation and configuration maintain the highest quality standards through:
- Automated Validation: Multi-validator fusion with intelligent routing
- Drift Detection: Real-time monitoring against golden baselines using Jensen-Shannon Divergence
- Governance Enforcement: DriftLock Guard, HOPE Guard, and Policy Enforcer working in harmony
- Tribunal Arbitration: Three-perspective decision engine for complex scenarios
- Performance SLOs: Defined service level objectives with automated benchmarking
Unlike traditional linters that only check syntax, Flamehaven-Doc-Sanity provides comprehensive governance that ensures architectural purity, prevents quality degradation, and maintains organizational standards across your entire documentation ecosystem.
Built With
This project is built with modern Python technologies and follows enterprise-grade development practices:
Core Technologies:
- Python 3.8+: Modern Python with type hints and dataclasses
- Click: Composable command-line interface toolkit
- PyYAML: YAML parser for configuration management
- Pytest: Testing framework with coverage reporting
Design Patterns:
- Strategy Pattern (validator selection)
- Chain of Responsibility (governance pipeline)
- Observer Pattern (performance monitoring)
- Facade Pattern (CLI interface)
Getting Started
To get a local copy up and running, follow these simple steps.
Prerequisites
Before installing, ensure you have the following:
-
Python 3.8 or higher
python --version # Should output: Python 3.8.x or higher
-
pip (Python package installer)
pip --version -
Git (for cloning the repository)
git --version
Installation
-
Clone the repository
git clone https://github.com/flamehaven01/Doc-Sanity.git
-
Navigate to the project directory
cd Doc-Sanity
-
Install the package in development mode
pip install -e .
-
Install additional dependencies (if needed)
pip install click pyyaml pytest pytest-cov
-
Verify installation
doc-sanity versionYou should see:
Flamehaven-Doc-Sanity v1.2.0 Status: DRIFT-FREE Architecture Purity: 0.9500
Usage
Basic Document Validation
Run a document sanity check with default settings:
doc-sanity check README.md
Output:
============================================================
Status: APPROVED
Fusion Score: 1.00
Oracle Verdict: acceptable
============================================================
✓ Document validation PASSED
Governance Modes
Choose from four governance modes based on your needs:
# Conservative: Fast, minimal validation
doc-sanity check --governance-mode conservative README.md
# Balanced: Standard validation (recommended)
doc-sanity check --governance-mode balanced README.md
# Aggressive: Strict validation, catches edge cases
doc-sanity check --governance-mode aggressive README.md
# Omnipotent: Supreme validation, Ω-grade certification
doc-sanity check --governance-mode omnipotent README.md
Drift Detection
Check for configuration drift against your golden baseline:
# Use default baseline
doc-sanity drift-check
# Use custom baseline
doc-sanity drift-check --baseline config/custom_baseline.yaml
Example output:
============================================================
DRIFT DETECTION ANALYSIS
============================================================
Severity: NONE
JSD Score: 0.0234
Drift Detected: False
Recommendation: No action required. System within tolerance.
============================================================
✓ No drift detected
Output Formats
Export validation results in multiple formats:
# JSON (for CI/CD integration)
doc-sanity check --output-format json README.md
# YAML (for configuration management)
doc-sanity check --output-format yaml README.md
For more examples and advanced usage, please refer to the Documentation
Roadmap
- Core validation system with modal routing
- FusionOracle for multi-validator synthesis
- DriftLock Guard with JSD-based detection
- HOPE Guard for ethical validation
- Tribunal System (3-perspective arbitration)
- Performance SLO benchmarks
- Comprehensive integration tests
- Bilingual documentation (EN/KR)
- README auto-enhancement engine
- Visual dashboard for drift monitoring
- Plugin system for custom validators
- REST API for remote validation
- VS Code extension integration
- Multi-language support (ES, JP, CN)
- Machine learning-based quality prediction
- Automated policy recommendation
See the open issues for a full list of proposed features (and known issues).
Architecture
System Overview
┌─────────────────────────────────────────────────────────────┐
│ CLI Layer │
│ (User Interface) │
└────────────────┬────────────────────────────────────────────┘
│
┌────────────────▼────────────────────────────────────────────┐
│ Orchestration Layer │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Modal Router │◄────►│ Fusion Oracle │ │
│ └──────────────────┘ └──────────────────┘ │
└────────┬────────────────────────────────────────────────────┘
│
┌────────▼────────────────────────────────────────────────────┐
│ Validation Layer │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Deep │ │ Shallow │ │ Custom │ │
│ │ Validator │ │ Validator │ │ Validators │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└────────┬────────────────────────────────────────────────────┘
│
┌────────▼────────────────────────────────────────────────────┐
│ Governance Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ DriftLock│ │ HOPE │ │ Policy │ │ Tribunal │ │
│ │ Guard │ │ Guard │ │ Enforcer │ │ Engine │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────┘
Module Structure
flamehaven_doc_sanity/
├── orchestrator/ # Modal routing and fusion oracle
│ ├── modal_router.py
│ └── fusion_oracle.py
├── governance/ # DriftLock, HOPE, Policy enforcement
│ ├── driftlock_guard.py
│ ├── hope_guard.py
│ ├── policy_enforcer.py
│ └── tribunal_engine.py
├── validators/ # Deep & shallow validation engines
├── performance/ # SLO benchmarks and monitoring
├── config/ # Configuration management
├── cli.py # Command-line interface
└── exceptions.py # Exception hierarchy
For detailed architecture documentation, see Architecture Guide
Testing
Run All Tests
# Full test suite with coverage
pytest
# Verbose output
pytest -v
# Generate HTML coverage report
pytest --cov=flamehaven_doc_sanity --cov-report=html
open htmlcov/index.html
Test Categories
# Integration tests
pytest tests/test_orchestrator_integration.py
pytest tests/test_governance_integration.py
# Performance SLO tests
pytest tests/test_performance_slo.py
Coverage Requirements
| Component | Target Coverage | Status |
|---|---|---|
| Overall | ≥ 85% | ✅ Met |
| Orchestrator | ≥ 95% | ✅ Met |
| Governance | ≥ 95% | ✅ Met |
| Validators | ≥ 90% | ✅ Met |
For comprehensive testing guide, see Testing Guide
Quality Metrics
Architecture Purity Dimensions
| Dimension | Current Score | Target | Status |
|---|---|---|---|
| Integrity | 0.90 | ≥ 0.90 | ✅ Met |
| Governance | 0.90 | ≥ 0.90 | ✅ Met |
| Reliability | 0.88 | ≥ 0.88 | ✅ Met |
| Maintainability | 0.90 | ≥ 0.90 | ✅ Met |
| Security | 0.88 | ≥ 0.88 | ✅ Met |
| Architecture Purity (Ω) | 0.9500+ | ≥ 0.95 | 🏆 DRIFT-FREE |
Performance SLOs
| Component | SLO Target (P95) | Status |
|---|---|---|
| README Generation | 500ms | ✅ Validated |
| Deep Validator | 150ms | ✅ Validated |
| Shallow Validator | 50ms | ✅ Validated |
| Fusion Oracle | 100ms | ✅ Validated |
| Modal Router | 75ms | ✅ Validated |
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Make your changes and ensure all tests pass (
pytest) - Run validation (
doc-sanity check --governance-mode omnipotent README.md) - Check for drift (
doc-sanity drift-check) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Development Setup
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Check code quality
doc-sanity check --governance-mode aggressive .
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Project Maintainer: YUN ∴ - SIDRCE Guardian
Project Link: https://github.com/flamehaven01/Doc-Sanity
Support Channels:
- 📖 Documentation: See
docs/directory - 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Acknowledgments
Built with the philosophy:
완벽은 선택이 아니라, 존재 조건이다.
(Perfection is not a choice; it is a condition of existence.)
—YUN ∴, SIDRCE Guardian
Resources & Inspiration
FAQ
What is the difference between governance modes?
Governance modes control validation strictness:
- Conservative: Fast checks, minimal validation
- Balanced: Standard validation (recommended)
- Aggressive: Strict validation, catches edge cases
- Omnipotent: Maximum validation for Ω-certification
How does drift detection work?
DriftLock Guard uses Jensen-Shannon Divergence (JSD) to compare current configuration against a golden baseline:
- JSD < 0.04: No drift (safe)
- JSD 0.04-0.08: Warning (monitor)
- JSD > 0.08: Critical (deployment blocked)
What is the Tribunal System?
A three-perspective decision engine for complex cases:
- Advocate: Finds constructive improvements
- Archangel: Enforces absolute standards
- Oracle: Synthesizes final judgment
Can I customize validators?
Yes! Extend BaseValidator and register with ModalRouter:
from flamehaven_doc_sanity.validators import BaseValidator
class CustomValidator(BaseValidator):
def validate(self, content, file_path=None):
# Your validation logic
return ValidationResult(...)
🌏 Languages
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flamehaven_doc_sanity-1.3.0.tar.gz.
File metadata
- Download URL: flamehaven_doc_sanity-1.3.0.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0ffc10c83fde1138a2a32957a7b2a10daad56993cb8c74e4448137bed688934
|
|
| MD5 |
4a444468c2a3c8fad862c2d4266d4290
|
|
| BLAKE2b-256 |
cb8494ca3b2301e995a1ee5fb359c7556a1480f94cafc9f32090e04ccf9a85cb
|
Provenance
The following attestation bundles were made for flamehaven_doc_sanity-1.3.0.tar.gz:
Publisher:
release.yml on flamehaven01/Flamehaven-Doc-Sanity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flamehaven_doc_sanity-1.3.0.tar.gz -
Subject digest:
a0ffc10c83fde1138a2a32957a7b2a10daad56993cb8c74e4448137bed688934 - Sigstore transparency entry: 704781043
- Sigstore integration time:
-
Permalink:
flamehaven01/Flamehaven-Doc-Sanity@72cee26caa7bffb0b3087319f9f160b8f4de1410 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/flamehaven01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72cee26caa7bffb0b3087319f9f160b8f4de1410 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flamehaven_doc_sanity-1.3.0-py3-none-any.whl.
File metadata
- Download URL: flamehaven_doc_sanity-1.3.0-py3-none-any.whl
- Upload date:
- Size: 69.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
234bcb7aa781f451f72d358102a980c5d3a3dfe261533232924c0dc18a33ea4a
|
|
| MD5 |
7041a4b995907a3854de5de94f38e50b
|
|
| BLAKE2b-256 |
e39bd2e41c7cf4b4a70e6c17f7d730551a68f60a7e8f251e26db4fc7728fcd78
|
Provenance
The following attestation bundles were made for flamehaven_doc_sanity-1.3.0-py3-none-any.whl:
Publisher:
release.yml on flamehaven01/Flamehaven-Doc-Sanity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flamehaven_doc_sanity-1.3.0-py3-none-any.whl -
Subject digest:
234bcb7aa781f451f72d358102a980c5d3a3dfe261533232924c0dc18a33ea4a - Sigstore transparency entry: 704781050
- Sigstore integration time:
-
Permalink:
flamehaven01/Flamehaven-Doc-Sanity@72cee26caa7bffb0b3087319f9f160b8f4de1410 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/flamehaven01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72cee26caa7bffb0b3087319f9f160b8f4de1410 -
Trigger Event:
push
-
Statement type: