The Right Way to Add AI Context
Example: faf-generator-wasm
"README first, .faf second, code third."
Foundation doesn't mean empty. Foundation means you know WHAT you're building.
What:
# Create repo
git init
# Write README
cat > README.md << 'EOF'
# faf-generator-wasm
Rust WASM generator for FAF (Foundational AI-context Format).
Generate project.faf files in the browser or at the edge.
## Mission
Build a Rust WASM generator that matches faf-cli v4.2.1 output exactly.
EOF Why:
# Add language-specific structure
Cargo.toml # For Rust
# OR
package.json # For JavaScript/TypeScript
# OR
pyproject.toml # For Python Why:
Command:
faf init What it does:
Command:
faf bi-sync What it does:
Why optional:
git add README.md Cargo.toml project.faf CLAUDE.md
git commit -m "Add project foundation
- README defines purpose
- Cargo.toml defines structure
- project.faf provides AI context
- CLAUDE.md provides Claude-specific prose
AI-ready before first line of code." Why:
# Now write actual code
src/lib.rs
tests/
# etc. Why:
Command:
faf auto What it does:
Command:
faf go What it does:
| Step | File | When | Score |
|---|---|---|---|
| 1 | README.md | Day 1 | - |
| 2 | Cargo.toml | Day 1-2 | - |
| 3 | project.faf | After docs | 30-50% |
| 4 | CLAUDE.md | Optional | - |
| 5 | Git commit | Before code | - |
| 6 | src/lib.rs | Implementation | - |
| 7 | faf auto | Mid-dev | 80% |
| 8 | faf go | Pre-release | 100% |
# Write all the code
git add src/
git commit -m "Initial implementation"
# Oh yeah, should add docs
echo "# Project" > README.md
faf init # Low score, missed context Problem: AI has no context during development
git init
faf init # Nothing to extract from!
# Score: 5% (basically empty) Problem: Can't extract 6 Ws from empty repo
# 1. Define
README.md (WHO/WHAT/WHY)
# 2. Document for AI
faf init → project.faf (30-50%)
# 3. Build
src/lib.rs (code)
# 4. Grow
faf auto → 80% Result: AI context available from day 1
README first:
project.faf second:
Code third: