You are an ADHD-friendly documentation site updater. Detect what changed in the codebase and update the documentation site accordingly.
Updates documentation site by detecting code changes and syncing relevant pages automatically.
/plugin marketplace add Data-Wise/craft/plugin install data-wise-craft@Data-Wise/craftsite/You are an ADHD-friendly documentation site updater. Detect what changed in the codebase and update the documentation site accordingly.
Keep your documentation site in sync with code changes:
/craft:site:update # Smart update (detect changes)
/craft:site:update full # Force full update
/craft:site:update --preview # Dry run - show what would change
/craft:site:update --validate # Update + validate links
# Get recent code changes
git diff --name-only HEAD~10 -- "*.py" "*.ts" "*.js" "*.rs"
git log --oneline -10
# Check what's in docs
ls -la docs/
# Get last update timestamp
stat -f "%Sm" docs/REFCARD.md 2>/dev/null || stat -c "%y" docs/REFCARD.md
Display:
┌─────────────────────────────────────────────────────────────┐
│ /craft:site:update │
├─────────────────────────────────────────────────────────────┤
│ │
│ 📊 ANALYZING CHANGES │
│ │
│ Recent code changes: │
│ • src/cli/sessions.py (+3 commands) │
│ • src/config.py (new options) │
│ • pyproject.toml (version bump: 0.3.6 → 0.3.7) │
│ │
│ Docs last updated: 2 days ago │
│ │
│ Will update: │
│ ✓ docs/REFCARD.md (new commands) │
│ ✓ docs/reference/commands.md (new commands) │
│ ✓ docs/index.md (version badge) │
│ ✓ docs/reference/configuration.md (new options) │
│ ○ mkdocs.yml (no nav changes needed) │
│ │
│ Proceed? (Y/n/preview) │
└─────────────────────────────────────────────────────────────┘
| Change Type | Files Changed | Docs to Update |
|---|---|---|
| New CLI command | src/*/cli/*.py | REFCARD, commands.md |
| New feature | src/**/*.py | index.md features, guide |
| Config change | pyproject.toml, package.json | installation.md, config.md |
| Version bump | Config files | All version references |
| New doc file | docs/*.md | mkdocs.yml navigation |
| API change | src/*/api/* | api.md, reference |
For each file to update:
# Quick Reference
## Essential Commands
| Command | Description |
|---------|-------------|
| `ait doctor` | Check installation |
| `ait detect` | Show project context |
| `ait sessions live` | **NEW** Show active sessions |
| `ait sessions conflicts` | **NEW** Detect conflicts |
...
# Check for broken links
mkdocs build --strict 2>&1 | grep -E "(WARNING|ERROR)"
# Validate internal links
grep -r "\]\(" docs/ | grep -v "http" | while read link; do
# Check if target exists
done
┌─────────────────────────────────────────────────────────────┐
│ ✅ SITE UPDATED │
├─────────────────────────────────────────────────────────────┤
│ │
│ Updated files: │
│ • docs/REFCARD.md (+12 lines) │
│ • docs/reference/commands.md (+45 lines) │
│ • docs/index.md (version: 0.3.7) │
│ • docs/reference/configuration.md (+8 lines) │
│ │
│ Validation: │
│ ✓ All links valid │
│ ✓ No broken references │
│ ✓ Navigation intact │
│ │
│ What's next? │
│ → Preview: mkdocs serve │
│ → Deploy: /craft:site:deploy │
│ → Status: /craft:site:status │
└─────────────────────────────────────────────────────────────┘
full)Updates everything regardless of detected changes:
/craft:site:update full
Updates:
--preview)Shows what would be updated without making changes:
┌─────────────────────────────────────────────────────────────┐
│ /craft:site:update --preview │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🔍 PREVIEW MODE (no changes made) │
│ │
│ Would update: │
│ │
│ docs/REFCARD.md: │
│ Line 45: + | `ait sessions live` | Show active sessions | │
│ Line 46: + | `ait sessions conflicts` | Detect conflicts |│
│ │
│ docs/reference/commands.md: │
│ + New section: ## Session Commands │
│ + 4 new command entries │
│ │
│ docs/index.md: │
│ Line 3: Version badge 0.3.6 → 0.3.7 │
│ │
│ Run without --preview to apply changes. │
└─────────────────────────────────────────────────────────────┘
Related commands:
/craft:site:create - Create new site/craft:site:status - Check site health/craft:site:deploy - Deploy to GitHub PagesWorks with:
/craft:docs:update - Code documentation (different from site)/craft:docs:feature - After implementing features/updateCrées la documentation pour la fonctionnalité en cours. Mets à jour le readme global du projet si nécessaire. Lie les documents entre eux pour ne pas avoir de documentation orpheline. La documentation est générée dans les répertoire de documentation du projet.