Architecture Documentation Standards β
These standards keep our docs agent-friendly, link-stable, and easy to maintain.
1) Language and tone β
- English only
- Short, specific sentences; avoid marketing language
- Prefer active voice; use consistent terminology across sections
2) File, path, and slug rules β
- One topic per file; filename is the canonical slug
- Use kebab-case for filenames and directories (e.g.,
experience-layer
,context-assembler
) - Section landing pages live at
index.md
orREADME.md
inside a directory - Link using clean URLs (no
.md
, no/index
):/architecture/orchestration/
3) Frontmatter (keep flat and predictable) β
Recommended keys:
title
: Short, human-facing titledescription
: One-line summary under 140 charslastmod
: ISO date string (YYYY-MM-DD)status
: draft | alpha | beta | stable | deprecatedaudience
: humans,agents | developers | researcherstags
: comma-separated keywordspriority
: 0.3β1.0 (for sitemap weighting, optional)
Example:
yaml
---
title: "ACS (Adaptive Context Scaling) Architecture Specification"
description: "Technical spec for ACS orchestrator."
lastmod: 2025-09-05
status: alpha
audience: humans,agents
tags: orchestration,acs
priority: 0.9
---
4) Links and references β
- Internal: absolute from
/docs
root, clean URLs (e.g.,/architecture/evaluation/
) - Avoid relative
../..
chains; they rot easily when moving files - Do not link to
/README
or/index
; always target directory root - External links should include the canonical URL; avoid trackers or redirects
5) Code fences and media β
- Prefer
txt
for metrics and query snippets to avoid extra highlighters - Use
mermaid
sparingly; keep diagrams small and purposeful - All images live next to the doc or in a local
image/
folder in the same section
6) Structure and ordering β
- Use
order:
in frontmatter to control sibling ordering when needed - Add small table of contents only for long (> ~100 lines) specs
- Each section directory should have a landing page describing:
- Scope and responsibilities
- Interfaces and dependencies
- Key data models or contracts
- Links to deep dives and implementation guides
7) Drafts and change control β
- Mark early work with
status: draft
oralpha
- For breaking changes in contracts, add an ADR or change note and update the Contracts section
- Keep a brief changelog for orchestration and other fast-moving areas
8) Accessibility and privacy β
- No raw secrets or sensitive personal data in examples
- Redact or synthesize data samples
- Favor text over heavy images; include alt text if images are necessary
9) Quality gates before merge β
npm run links:check-internal
β zero broken internal linksnpm run docs:build
β passes without dead-link failures- Optional:
npm run seo
for sitemap refresh
10) Common pitfalls to avoid β
- Linking to
/.../index
or/.../README
(use/.../
) - Mixing relative and absolute link styles
- Large, nested lists without context; prefer short sections with clear headings
If a change impacts navigation or slugs, add temporary redirects in .vitepress/config.mjs
(rewrites) and remove them once links are updated across the site.