Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

#!/bin/bash

Documentation Placement Validator

Use in pre-commit hooks or CI

cd /home/adminator/projects/neuais.com

echo “Validating documentation placement…” ERRORS=0

Check for unapproved .md files at root

echo “Checking root directory…” INVALID=$(find . -maxdepth 1 -type f -name “.md” ! -name “-README.md” ! -name “README.md” ! -name “plan.md” 2>/dev/null || true)

if [ -n “$INVALID” ]; then echo “❌ Invalid docs at root:” echo “$INVALID” | sed ‘s/^/ /’ ERRORS=$((ERRORS + 1)) fi

if [ $ERRORS -eq 0 ]; then echo “✅ Documentation placement valid” exit 0 else echo “” echo “Fix: Move docs to docs-internal/ or docs-external/” exit 1 fi