Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

AI Engineering Handbook

This repository is a Documentation-as-Code hub for building production-grade AI systems. In the era of AI-backed development, AI systems — RAG pipelines, coding agents, AI assistants — consume documentation as their primary input. Poor documentation produces poor AI outputs. This repository treats documentation with the same rigor as production source code: versioned, tested, lifecycle-managed, and machine-readable.

Content is generated through a hybrid LLM methodology, cross-validated by multiple models, and reviewed by a human before promotion. Architectural decisions are governed by ADRs with machine-readable YAML frontmatter, enabling AI agents to filter and retrieve decisions by status, date, and scope.

Mission: To build reliable, machine-readable documentation infrastructure that AI systems can trust as authoritative input — while enabling MLOps engineers and AI architects to construct audit-ready AI systems using a hybrid LLM+SLM methodology.

🛠️ Developer & Agent Governance

ADRs are the Primary Source of Truth (PSoT) and the authoritative root for all other files in this repository. Every structural, methodological, or tooling decision is recorded as an ADR before implementation; all other governance files (including AGENTS.md and Modular SOPs) are derived from and must align with the established ADRs.

This repository is a strictly governed environment. AI agents and human developers MUST adhere to the following knowledge discovery chain before performing any modification:

  1. Project Governance (AGENTS.md / QWEN.md): Read this first. It defines the global invariants (Always/Never rules) and the mandatory agentic loop: Analysis →\rightarrow Knowledge Discovery (Pull) →\rightarrow Execution →\rightarrow Verification.

  2. Modular SOPs (.qwen/skills/): For complex tasks, do not guess. Search for and invoke the corresponding Standard Operating Procedure (SOP) in the skills directory.

Failure to follow this chain is a violation of the project’s architectural integrity.

What’s new?

v3.1.0 — “The Industrialization of Intelligence”

v3.0.0 — “The Agents Emerge”

v2.8.0 — “The Prompt Physics”

Live Documentation Site

The rendered knowledge base is published on GitHub Pages (ADR-26022). GitHub is the source of truth; the site is the rendered view for reading.

Documentation as Source Code for AI

Traditional documentation is written for humans to read after the fact. In AI-backed development, documentation is the primary input that AI systems consume to produce outputs. This makes documentation quality a first-class engineering concern: stale docs produce hallucinations, unstructured metadata makes retrieval blind, missing lifecycle allows noise to accumulate.

This repository implements the Documentation-as-Code paradigm:

This stands in direct opposition to pre-AI knowledge bases — collections of articles with no enforced structure, no traceability, and no automated verification.

See the full rationale in architecture/manifesto.md.

In this paradigm: prompts = source code, articles = build artifacts, reviews = QA gates.

Architectural Governance

ADRs provide the formal record of decisions that drive the repository’s evolution.

Hub-and-Spoke Ecosystem

This repository is the standards hub — it holds conventions, specifications, and ecosystem ADRs (ADR-26020). Implementation lives in independent spokes:

Methodology

Content generation follows a tool-agnostic, cognitive-model approach:

Coverage

Content is organized around five layers of AI systems. Security is a cross-cutting concern woven into all layers, not a separate layer.

  1. Execution & Optimization: CPU/GPU hybrid pipelines, VRAM/RAM management, NVIDIA tuning

  2. Model Development: SLM selection, tokenization, embeddings

  3. Prompt Engineering: Modular design, XML schemas, template lifecycle, consultant prompts

  4. Orchestration: RAG, workflow chaining, agent specialization, structured output

  5. Context Management: Vector stores, hybrid retrieval, indexing strategies

Read more in A Multi-Layered AI System Architecture.

Repository Structure

.
├── 0_intro/                # Introductory material, high-level overviews
├── ai_agents/              # Real-world agent framework analysis (assembled product)
│   ├── context_management/ # Context window strategy analysis
│   ├── session_history_management/ # Session history analysis
│   ├── skills/             # Skill system analysis
│   └── tooling/            # Tool architecture analysis
├── research/               # External source code repos for comparative study
│   ├── ai_coding_agents/   # Nested git repos (external agent source code)
│   └── ai_infrastructure/  # Nested git repos (non-agent AI projects)
├── ai_system_layers/       # Core content organized by layer (engine parts catalog)
│   ├── 1_execution/        # CPU/GPU optimization, CUDA, VRAM management
│   ├── 2_model/            # Model selection, tokenization, embeddings
│   ├── 3_prompts/          # Prompt-as-Infrastructure: formatting, versioning, consultants
│   ├── 4_orchestration/    # Workflow, agent specialization, structured output
│   └── 5_context/          # RAG, knowledge bases, hybrid retrieval
├── architecture/           # Architectural governance
│   ├── adr/                # Formal ADR documents (YAML frontmatter, machine-readable)
│   ├── evidence/           # Architecture Knowledge Base (analyses, sources, retrospectives)
│   ├── packages/           # Spoke package documentation and PoCs
│   └── post-mortems/       # Retrospectives on failures and lessons learned
├── misc/                   # Non-core work
│   ├── in_progress/        # Drafts, experiments, work-in-progress
│   ├── plan/               # Implementation plans (saved between context switches)
│   └── pr/                 # Telegram channel posts, review checklists
├── mlops/                  # MLOps tooling and pipelines
│   ├── ci_cd/              # GitHub Actions, quality-gate scripts
│   └── security/           # Secret scanning, compliance checks
├── security/               # Centralized security policy hub (placeholder)
└── tools/                  # Supporting utilities
    ├── configs/            # Tool configuration files
    ├── docs/               # Documentation generation helpers, style guides
    ├── scripts/            # Automation: link checking, ADR validation, Jupytext sync
    └── tests/              # Test suites for scripts

Toolchain & CI/CD

The repository uses automated validation to enforce documentation quality:

Authorship & Contact

My name is Vadim Rudakov, I am a Systems Engineer and AI Methodology Architect from Sverdlovsk oblast, Russia. This repository solves a specific problem: the fragility of AI prototypes and the risk of institutional “tribal knowledge.”

The repository is licensed under GPLv3 for its core assets and CC-BY-SA 4.0 for the article content.

Contact Information

Vadim Rudakov, rudakow.wadim@gmail.com