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
Metadata
Release files for flamehaven-doc-sanity 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flamehaven_doc_sanity-1.3.0.tar.gz | 68.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flamehaven_doc_sanity-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 137.8 kB
Release files / flamehaven_doc_sanity-1.3.0.tar.gz
| Download URL | flamehaven_doc_sanity-1.3.0.tar.gz |
|---|---|
| Size | 68.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0ffc10c83fde1138a2a32957a7b2a10daad56993cb8c74e4448137bed688934
|
|
BLAKE2b-256 checksum How to use checksums |
cb8494ca3b2301e995a1ee5fb359c7556a1480f94cafc9f32090e04ccf9a85cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2025.
Transparency logRelease files / flamehaven_doc_sanity-1.3.0-py3-none-any.whl
| Download URL | flamehaven_doc_sanity-1.3.0-py3-none-any.whl |
|---|---|
| Size | 69.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
234bcb7aa781f451f72d358102a980c5d3a3dfe261533232924c0dc18a33ea4a
|
|
BLAKE2b-256 checksum How to use checksums |
e39bd2e41c7cf4b4a70e6c17f7d730551a68f60a7e8f251e26db4fc7728fcd78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2025.
Transparency logSecurity for flamehaven-doc-sanity 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for flamehaven_doc_sanity-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.