Follow the practices defined in ~/Projects/SiteNetSoft/ai-skills/:
dev-practices/golang/β Go style, error handling, functions, testing, lintingdev-practices/git/β Git authorship rules, multi-repo workspace patterns
amadla is the top-level orchestrator for the Amadla tool pipeline. It reads .hery entity files, builds a dependency graph from _requires, topologically sorts them, and shells out to registered tools in order.
main.go β Root Cobra command with --config flag
cmd/
run.go β Core pipeline: load config β read .hery β build DAG β sort β exec tools
init.go β Bootstrap tools.hery by scanning PATH for standard Amadla tools
list.go β Tabular display of registered tools and their status
doctor.go β Verify tool installation and compatibility
dag/
dag.go β Topological sort with cycle detection (DFS)
toolconfig/
toolconfig.go β Parse tools.hery, resolve tool binaries via PATH
- Loads
~/.config/amadla/tools.hery(or--configpath) - Builds
entity_type β toollookup from config - Reads
.heryfiles from target directory, extracts_typeand_requires - Builds DAG, topologically sorts
- For each entity in order: marshals to JSON, pipes to tool's stdin, sets
AMADLA_ENTITYenv var --dry-runprints execution order without running
The standard execution pipeline is: raise -> lay -> enjoin -> weaver -> waiter
- raise provisions infrastructure (VMs, cloud instances)
- lay handles installation only: Package, Application, ProgrammingLanguage entities
- enjoin handles system state configuration: User, Service, Cron, System/, Security/ entities
- weaver generates configuration files from templates
- waiter handles deployment strategies
Config-driven via tools.hery (entity type amadla.org/entity/tools@v1.0.0). Tools are resolved by explicit path or PATH lookup. amadla init bootstraps by scanning PATH for the standard tool names (raise, lay, enjoin, weaver, doorman, judge, unravel, waiter, conduct, lighthouse, garbage, dryrun, hery).
make test # Run all tests
go test ./... # Same, without coverageFunction variables (osStat, execLookPath, etc.) in toolconfig/ follow the project-wide DI pattern for test mocking.