Living Documentation & AI-Driven Business Logic Auditing for .NET
YAB is a next-generation "Living Documentation" tool designed to bridge the gap between business requirements and technical implementation. It uses AI agents to audit your code against its intended purpose, ensuring that what you write is what the business actually needs.
- .NET SDK 10.0+
- AI Agent Tooling: Ensure you have an AI CLI (like
gemini-cli) installed and configured.
You can run YAB using the provided PowerShell script or directly via the .NET CLI:
# Run the documentation and audit pipeline
.\yab.ps1 dev docs .
# Start the local documentation server
.\yab.ps1 dev serve .dotnet run --project Yab.Cli dev docs .The YAB CLI is organized under the dev namespace to signify its role in the development lifecycle.
The primary command for YAB. It orchestrates the entire pipeline:
- Scan: Discovers
[Concept]and[Intent]attributes in your C# code. - Verify: Checks cryptographic anchors to ensure code integrity.
- Audit: Calls upon AI agents to verify that code changes align with business logic.
- Generate: Produces a premium, interactive
LivingDocumentation.htmlportal.
Serves the project's README.md file as a beautifully styled HTML page. This is a great way to preview your documentation changes in a browser.
Launches a lightweight local web server to host the generated documentation portal (LivingDocumentation.html). This allows for real-time inspection of your project's "Living Wiki."
Used to programmatically "sign off" on verified code sections. This command updates the BUILD_CERTIFICATE.md with fresh cryptographic hashes (Physical Anchors), signaling that the AI and developers have validated the current state.
| Flag | Shorthand | Description |
|---|---|---|
--verbose |
-v |
Enables detailed logging of the internal pipeline steps and AI agent communication. |
--manual |
-m |
Forces manual audit mode, saving AI prompts to .yab/prompts for human review. |
--skip-ai |
Skips the AI auditing step. Useful for fast documentation regeneration. |
YAB follows a minimalist, convention-over-configuration philosophy inspired by the "Grug Brain" developer:
- Code for Doing: Keep C# logic clean and focused. Use
[Concept]and[Intent]attributes to link code to the Wiki. - Markdown for Explaining: Use Markdown files for deep business rationale, playbooks, and architectural "idears."
- Physical Anchors: Use
[yab-hash:...]tags in your Markdown to lock documentation to specific code versions. - AI for Auditing: Let LLMs handle the tedious task of checking if the code actually matches the requirements.
Yab.Cli/: The core CLI tool.Yab.Attributes/: Lightweight attributes for code-to-wiki linking.LivingDocumentation.html: The generated static portal.BUILD_CERTIFICATE.md: The source of truth for code integrity and sign-offs.
If you are contributing to YAB and want to modify the documentation portal UI:
The PortalTemplate.html is programmatically generated from modular source files.
- Navigate to the portal project:
cd Yab.Cli/portal - Install dependencies:
npm install - Run the build:
npm run build
This will assemble the CSS, JS, and Fonts from Yab.Cli/portal/src/ into a single, self-contained Yab.Cli/Resources/PortalTemplate.html.
src/template.html: The HTML skeleton.src/styles/: Modular CSS (layout, components, coverage, search).src/js/: Modular JS logic (SQLite init, concept rendering, FTS search).
Built with ❤️ for developers who value clarity, integrity, and simplicity.