AI-generated documentation for AI-driven development
REQUIRED: All documentation MUST follow AISD
Primary Author: AI agents (Claude Code, GitHub Copilot, etc.) Primary Reader: AI agents (code generation, task execution) Secondary Reader: Humans (diff review, approval)
| Agent | Purpose | Access |
|---|---|---|
| Claude Code | Primary development agent | Full filesystem, git, tools |
| GitHub Copilot | Inline code suggestions | Current file context |
| Custom agents | Specialized tasks | Per-task scope |
MUST follow AISD (AI-Structured Documentation):
| Principle | Rule |
|---|---|
| Conciseness | REQUIRED - no prose paragraphs |
| Language | MUST use MUST/REQUIRED/FORBIDDEN |
| Precision | REQUIRED - exact types, ranges, formats |
| Structure | REQUIRED - tables > lists > code blocks |
| Rationale | FORBIDDEN - document WHAT, not WHY |
| Type | Max Lines | Purpose |
|---|---|---|
| Index | 100 | Navigation |
| Spec | 500 | Single responsibility |
Split files when exceeding 500 lines.
# Agent MUST read AISD spec first
# https://github.com/ricksaarge/aisd
# Then read relevant specs
cat doc/*/index.mdMUST match specifications exactly.
FORBIDDEN: Deviation from specs without human approval.
REQUIRED when adding features:
| Change | Action |
|---|---|
| New feature | Update spec BEFORE coding |
| Behavior change | Update spec BEFORE coding |
| Bug fix | Update spec if behavior changes |
All commit messages MUST be English, single line, and follow:
<type>[<area>]: <short-message>
| Element | Constraint |
|---|---|
| type | spec, docs, chore, refactor, test, feat, fix |
| area | stow, zsh, git, vim, brew, ssh, meta |
| short-message | Max 20 words, imperative, lowercase, space-separated, no period |
| Type | Purpose |
|---|---|
spec |
Changes to AISD spec / formats |
docs |
Guides, examples, explanations |
chore |
Repo hygiene, tooling, config |
refactor |
Structural changes without behavior change |
test |
Test cases, validation docs, fixtures |
feat |
New feature or capability |
fix |
Bug fix or correction |
| Area | Purpose |
|---|---|
stow |
GNU Stow configuration and management |
zsh |
Zsh shell configuration |
git |
Git configuration and aliases |
vim |
Vim/Neovim configuration |
brew |
Homebrew packages and setup |
ssh |
SSH configuration |
meta |
README, AGENTS.md, project meta |
feat[zsh]: add git status aliasesdocs[meta]: add install instructionschore[stow]: reorganize package structurefix[git]: correct merge tool configrefactor[vim]: normalize plugin format
❌ FORBIDDEN:
- should, might, could
- typically, usually, often
- reasonable, appropriate, sensible
✅ REQUIRED:
- MUST, REQUIRED, SHALL
- MUST NOT, FORBIDDEN, SHALL NOT
- MAY, OPTIONAL
❌ BAD:
The system validates email addresses to ensure users enter valid data.
Email addresses should be formatted properly with an @ symbol and domain.✅ GOOD:
| Field | Constraint |
|-------|------------|
| Email | MUST match `^[^@]+@[^@]+\.[^@]+$` |REQUIRED before committing AI-generated docs:
# Check forbidden words
grep -rn "should\|might\|could\|typically\|usually" doc/ --include="*.md"
# Check file length
wc -l doc/**/*.md | awk '$1 > 500 {print $2 ": " $1 " lines"}'
# Check line length (avg max 40 chars)
for file in doc/**/*.md; do
non_empty=$(grep -c '[^[:space:]]' "$file")
chars=$(wc -c < "$file")
avg=$(( chars / non_empty ))
[ $avg -gt 40 ] && echo "$file: $avg chars/line"
doneHuman MUST verify:
- No forbidden words
- Only MUST/REQUIRED/FORBIDDEN
- Explicit types and constraints
- Tables/lists (not prose)
- Under 500 lines per file
- Valid cross-references
MUST:
- Read all relevant specs
- Follow exact constraints
- Use specified types
- Implement all REQUIRED features
MUST NOT:
- Guess at unspecified behavior
- Add features not in specs
- Deviate from constraints
- Ignore FORBIDDEN rules
MUST:
- Use tables for structured data
- Specify exact types (UUID, String, Integer)
- Specify exact ranges (1-200, not "short")
- Use authoritative language
MUST NOT:
- Write prose paragraphs
- Use vague terms
- Include rationale or "why"
- Use ambiguous language
doc/
├── research/
│ └── index.md # Research findings
├── architecture/
│ └── index.md # System design
└── */
├── index.md # Domain overview (<100 lines)
└── *.md # Domain specs (<500 lines)
| Location | Max Lines |
|---|---|
| doc/*/index.md | 100 |
| doc//.md | 500 |
| Split when exceeding | Always |
## Installation
| Step | Command |
|------|---------|
| 1 | `./install.sh` |
| 2 | Verify with `./verify.sh` |
**Exit codes**:
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Missing dependencies |
| 2 | Permission denied |## Installation
To install the system, you should run the install script.
This will typically install all dependencies and set up your environment.
If something goes wrong, the script might return an error code.- AISD Spec - AI-Structured Documentation format
- doc/research/index.md - Research findings
Note: Symlink CLAUDE.md → AGENTS.md for Claude Code compatibility.