DR-006: EAC Commands System - Convention-Based Command Structure
Status
- [x] Accepted
- [ ] Proposed
- [ ] Rejected
- [ ] Deprecated
- [ ] Superseded
Date: 2024-12-01
Context
Repository operations (build, test, validate, release) need consistent interface, automatic documentation, MCP server exposure for AI integration, and dual execution modes (CLI + programmatic).
Problem: How to provide unified interface for 100+ repository operations across CLI and AI workflows?
Decision
Convention-based command structure with verb-first organization, automatic documentation mapping, and MCP server exposure.
Command Categories (.r2r/eac/commands.yml):
build- Build modules and dependenciescreate- Generate artifacts using AI or templatesget- Retrieve structured data (YAML/JSON)show- Display human-readable output (tables, summaries)validate- Check correctness against contractswork- Git worktree and workspace managementrelease- Release management operationspipeline- CI/CD orchestration
MCP Server Integration:
- Commands exposed as MCP tools via go/eac/mcp/commands
- Tool naming: mcp__commands__<command-name>
- Stdio-based protocol
- Dual execution: CLI (human-readable) vs. MCP (structured data)
Documentation Mapping (automatic):
- validate-specs → docs/reference/commands/validate/specs.md
- create pr → docs/reference/commands/create/pr.md
- work create → docs/reference/commands/work/create.md
Consequences
Positive: Predictable UX, AI-accessible, auto-documentation, dual execution, extensible, consistent patterns
Negative: Convention discipline required, MCP server maintenance, dual output format complexity
Alternatives Considered
- Flat Command Namespace: Rejected - poor discoverability, no organization, name collision risk
- REST API: Rejected - overkill for local tools, server overhead, authentication complexity
- Separate CLI and API: Rejected - duplication, drift risk, maintenance burden
Related Decisions
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.