| name | docs |
| description | Instructions for managing documentation for the VAK project. |
Documentation
This skill provides instructions for generating and maintaining documentation.
Documentation Status
| ID | Feature | Status | Notes |
|---|
| DOC-001 | Architecture Documentation | ⏳ Pending | README.md has overview |
| DOC-002 | API Reference | ⏳ Pending | Rustdoc available |
| DOC-003 | Runbook/Operations Guide | ⏳ Pending | - |
| DOC-004 | Policy Authoring Guide | ⏳ Pending | - |
Key Documentation Files
| File | Description |
|---|
README.md | Project overview, architecture, quick start |
TODO.md | Comprehensive task list with status |
AGENTS_README.md | Agent development guide |
AI Kernel Gap Analysis & Roadmap.md | Technical roadmap |
AI Agent Blue Ocean Opportunity.md | Business/market analysis |
Project Feasibility.md | Feasibility assessment |
Prerequisites
rustdoc (part of Rust toolchain)
mdbook (optional, for book-style docs): cargo install mdbook
Instructions
Generate Rust API Docs
To generate documentation for the main crate:
cargo doc --no-deps --open
To generate documentation for all workspace members:
cargo doc --workspace --no-deps --open
Check Doc Tests
To ensure code examples in documentation are valid:
cargo test --doc
Update Key Documents
When changing functionality, update:
README.md - Main project documentation
TODO.md - Update task status
- Module-level
mod.rs files - Update module documentation
.github/skills/ - Update relevant skill files
Generate Coverage Report
To see which items are documented:
cargo doc --document-private-items 2>&1 | grep -i "missing"
Documentation Structure
Module Documentation
Each module in src/ should have documentation in its mod.rs:
Function Documentation
Use triple slashes (///) for documentation comments:
pub fn add(a: i32, b: i32) -> Result<i32, OverflowError> {
a.checked_add(b).ok_or(OverflowError)
}
Unsafe Code Documentation
pub unsafe fn read_raw(ptr: *const u8, size: usize) -> Vec<u8> {
}
Examples
Generating Docs with All Features
cargo doc --all-features --no-deps --open
Documenting Error Types
#[derive(Debug, thiserror::Error)]
pub enum PolicyError {
#[error("policy not found: {0}")]
NotFound(String),
#[error("access denied: {reason}")]
Denied { reason: String },
#[error("invalid context: {0}")]
InvalidContext(String),
}
Building mdBook Documentation
If using mdBook for extended documentation:
mdbook build docs/
mdbook serve docs/
Guidelines
- Public Items: All
pub structs, enums, functions, and modules MUST have documentation.
- Examples: Include usage examples in documentation where possible.
- Errors: Document error conditions in a
# Errors section.
- Panics: Document any potential panics in a
# Panics section.
- Safety: Document safety contracts for
unsafe code in a # Safety section.
- Feature Flags: Document conditional compilation with
cfg attributes.
- Links: Use intra-doc links for cross-references.
- Keep Updated: Update docs when code changes, especially TODO.md status.
TODO: Documentation Needs