Language-Specific Commands
Most EAC commands are language-agnostic and work across all supported languages. However, some commands are specific to certain languages.
Go-Specific Commands
| Command | Purpose | Why Go-Only? |
|---|---|---|
validate-go-tidy |
Validates Go module dependencies are tidy | Runs go mod tidy and checks for changes |
validate-dependencies |
Checks go.mod against module contracts | Parses go.mod files to build dependency graph |
These commands specifically interact with Go's module system (go.mod) and toolchain.
Language-Agnostic Commands
All other commands work across languages via capability-based dispatch. Commands check module capabilities and delegate to appropriate language-specific handlers.
Build Commands
Dispatch to language-specific handlers:
| Module Type | Handler | Builds |
|---|---|---|
go |
GoHandler | Go libraries and executables with cross-compilation |
typescript |
NpmHandler | npm packages via npm install and tsc |
container |
BuildxHandler | Docker images with multi-platform support |
docs |
MkdocsHandler | Documentation sites and PDFs |
static |
NoneHandler or ScriptsHandler | No build or custom scripts |
Commands:
build- Builds modules using appropriate handlershow-build-summary- Shows build resultsshow-build-times- Analyzes build performance
Test Commands
Dispatch to language-specific runners:
| Module Type | Test Types | Runners |
|---|---|---|
go |
gotest, godog |
GoRunner - Runs go test and godog |
typescript |
mocha, cucumber-js |
MochaRunner, TsCucumberRunner |
Commands:
test- Runs tests using appropriate runnertest-suite- Executes test suites with filteringtest-debug- Debugs test failuresshow-test-summary- Shows test resultsshow-test-timings- Analyzes test performance
Validation Commands
Work on contracts, specifications, and code quality regardless of language:
validate- Runs all validationsvalidate-contracts- JSON schema validationvalidate-specs- Gherkin specification validationvalidate-markdown- Markdown lintingvalidate-module-files- File ownership validationvalidate-module-hierarchy- Dependency graph validationvalidate-test-tags- Test tag contract validation
Security Commands
Scan any codebase with language-aware tools:
scan- Runs all security scansscan-vuln- Vulnerability scanning (Trivy)scan-sast- Static analysis (Semgrep)scan-secrets- Secret detection (Trivy)scan-iac- Infrastructure as Code scanning (Trivy)scan-sbom- Software Bill of Materials generationscan-compliance- Compliance checking (Trivy)scan-zap- Dynamic application security testing (OWASP ZAP)
Security tools detect languages automatically.
Release Management
Version control and changelog generation work across all module types:
release-changelog- Generates changelogs from commitsrelease-this- Prepares module for releaserelease-pending- Checks for pending releasesrelease-check-ci- Verifies CI status before releaserelease-generate-module-calver- Generates calendar version tagsrelease-get-version- Extracts version from changelogrelease-tag-pending- Creates git tags for releases
Module Management
Introspection and discovery commands work with all module types:
show-modules- Lists all modulesshow-moduletypes- Lists module typesshow-dependencies- Shows dependency graphshow-files- Shows file ownershipget-modules- Returns module data as JSONget-dependencies- Returns dependencies as JSONget-execution-order- Calculates build order
AI Workflows
AI commands generate language-appropriate outputs:
create-spec- Generates Gherkin specificationscreate-design- Generates Structurizr architecture diagramscreate-commit-message- Generates commit messagescreate-pr- Generates pull request descriptionscreate-squash-message- Generates squash commit messages
AI providers adapt output to module context.
Workspace Management
Git worktree operations work regardless of module language:
work-create- Creates feature workspacework-commit- Commits with AI-generated messageswork-pull- Syncs workspace with mainwork-merge- Merges workspace changeswork-remove- Removes workspaceshow-workspaces- Lists all workspaces
Documentation
Documentation generation supports multiple formats:
serve-docs- Starts MkDocs serverserve-design- Starts Structurizr Lite servertemplates-apply- Applies documentation templatestemplates-install- Installs templatestemplates-list- Lists template variables
How Capability-Based Dispatch Works
EAC uses a capability matching system to route commands to appropriate handlers:
1. Modules Declare Capabilities
In .r2r/eac/repository.yml:
2. Handlers Register Capabilities
In handler implementation:
type GoHandler struct {
Capabilities []string
}
func (h *GoHandler) GetCapabilities() []string {
return []string{"go_module", "cross_compile"}
}
3. Commands Dispatch to Matching Handler
4. Handler Executes Language-Specific Logic
The handler runs the appropriate build tools (go build, npm install, docker buildx, etc.).
Adding Language Support
To add support for a new language:
- Create a handler - Implement the
BuilderorRunnerinterface - Register capabilities - Define what the handler can do
- Define module type - Create default file patterns and settings
- Register handler - Add to handler registry in
init()
See Module Types Reference for detailed instructions.
Language Support Summary
| Language | Native Support | Build | Test | Notes |
|---|---|---|---|---|
| Go | ✅ Yes | ✅ Full | ✅ gotest, godog | Complete toolchain integration |
| TypeScript | ✅ Yes | ✅ Full | ✅ mocha, cucumber-js | npm and tsc support |
| JavaScript | ✅ Yes | ✅ npm | ✅ mocha, cucumber-js | Via TypeScript module type |
| Docker | ✅ Yes | ✅ buildx | - | Language-agnostic containerization |
| Python | ⚠️ Container | ⚠️ Custom | ⚠️ Custom | Use container type with Dockerfile |
| Rust | ⚠️ Container | ⚠️ Custom | ⚠️ Custom | Use container type with Dockerfile |
| Java | ⚠️ Container | ⚠️ Custom | ⚠️ Custom | Use container type with Dockerfile |
Legend:
- ✅ Full - Native handler with comprehensive support
- ⚠️ Custom - Requires Dockerfile or custom scripts
- - - Not applicable or not supported
Related Documentation
- Module Types Reference - Detailed module type specifications
- Architecture - System architecture and component design
- Build Command - Build command reference
- Test Command - Test command reference
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.