Automation scripts for the Ambient Code reference repository.
Updates or validates the repository map (.repomap.txt) - an AI-friendly code structure map that optimizes context window usage.
Usage:
# Regenerate repomap
./scripts/update-repomap.sh
# Validate repomap is current (CI usage)
./scripts/update-repomap.sh --check
# Show help
./scripts/update-repomap.sh --helpFeatures:
- Automatically regenerates
.repomap.txtusingrepomap.py - Validates that repomap is current (useful for CI)
- Clear error messages with dependency installation hints
- Used by pre-commit hook to auto-update on code changes
When to use:
- After adding/removing files or functions
- Before creating pull requests
- When structural changes occur
- Automatically triggered by pre-commit hook
Dependencies: Installed via requirements.txt:
uv pip install -r requirements.txtValidates all Mermaid diagrams in the documentation.
Usage:
./scripts/validate-mermaid.shPurpose: Ensures Mermaid diagrams are syntactically correct before committing, preventing broken diagrams in documentation.
Initial repository setup script.
Usage:
./scripts/setup.shWhat it does:
- Installs dependencies
- Sets up pre-commit hooks
- Initializes development environment
Records demonstration videos/screenshots for documentation.
Usage:
./scripts/record-demo.shScripts for automated code review workflows.
Performs automated review of reference documentation.
Usage:
./scripts/autonomous-review/review-reference.shScripts for continuous validation and testing.
Template for autonomous validation and fix loops.
Test scripts for validation workflows:
run-all.sh- Run all validation teststest-autonomous-fix-loop.sh- Test autonomous fix loop
Common workflows:
# Setup new development environment
./scripts/setup.sh
# Update repomap after code changes
./scripts/update-repomap.sh
# Validate documentation
./scripts/validate-mermaid.sh
markdownlint docs/**/*.md --fix
# Run all validation tests
./scripts/validation/tests/run-all.shThese scripts are integrated into GitHub Actions workflows:
update-repomap.sh --check- CI job validates repomap is currentvalidate-mermaid.sh- CI job validates diagrams before merge- Pre-commit hook - Auto-runs
update-repomap.shon code changes
- All scripts use
#!/usr/bin/env bashfor portability - Scripts include error handling (
set -euo pipefail) - Scripts provide helpful error messages with actionable suggestions
- Scripts follow the "fail fast" principle