How rv-01/ecc works
1. What this repository is
ECC is a distribution and control surface for agentic developer workflows, not a single application. Its main job is to package reusable behavior — agents, skills, commands, hooks, rules, and MCP config — and install that behavior into multiple AI harnesses such as Claude Code, Cursor, OpenCode, Codex, Zed, Gemini, and Copilot.
2. The top-level architecture boundary
The repo is split between:
- source-of-truth content: agents/, skills/, commands/, rules/, hooks/, mcp-configs/
- installer/runtime plumbing: scripts/, manifests/, schemas/, install.sh, install.ps1, package.json
- tool-specific adapters: .claude/, .cursor/, .codex/, .opencode/, .zed/, .gemini/, .codebuddy/, .trae/
- documentation and validation: docs/, tests/, CI workflows
3. Primary functional surface: skills
Skills are the main workflow abstraction in ECC. They encode reusable procedures for things like TDD, review, security, research, content generation, and domain-specific stacks. They are meant to be invoked directly or auto-selected by the harness, and many have companion files for specific agents or harness formats.
4. Secondary surface: agents
Agents are specialized subagents that handle bounded tasks such as planning, reviewing, build repair, and language- or domain-specific analysis. In the Claude/OpenCode/Cursor world they are mostly markdown-defined prompts; in Codex they also have structured agent configs under .agents/skills/*/agents/openai.yaml and .codex/agents/*.toml.
5. Command compatibility layer
commands/ preserves slash-command entry points like /plan, /code-review, /build-fix, /quality-gate, /go-test, and /python-review. legacy-command-shims/ holds retired aliases such as /tdd and /eval. Architecturally, commands are a compatibility layer over the skills-first model.
6. Rules as always-on policy
rules/ contains the always-follow guidance installed into user or project rule directories. The structure is intentionally layered: common/ plus language-specific packs such as TypeScript, Python, Go, Swift, PHP, and ArkTS. These rules act as guardrails for style, security, testing, performance, and workflow behavior.
7. Hook-driven runtime enforcement
The hooks/ and scripts/hooks/ trees implement event-based automation. They cover session start/end, file edit reactions, pre-submit checks, prompt inspection, compact suggestions, and quality gates. The important architectural idea is that enforcement is done at the harness event layer, so behavior can be reactive without requiring manual commands.
8. Installer and selective deployment pipeline
The repo supports selective installation rather than a monolithic copy. manifests/, schemas/, and scripts/lib/install-* drive component selection, profile resolution, target detection, and apply-state tracking. This is how ECC can install only a minimal profile, only rules, only hooks, or a full bundle depending on the target harness and user choice.
9. State and lifecycle management
Installations are tracked with a state store, and runtime session behavior is tracked separately. The Node-side utilities under scripts/lib/state-store and scripts/lib/session-* support install history, session adapters, alias handling, and orchestration metadata. This makes uninstall, repair, sync, and status commands possible without blindly touching unrelated files.
10. Cross-harness adapter layer
The repo contains explicit adapters for each supported environment:
- Claude Code via .claude/ and plugin manifests
- Cursor via .cursor/ and hook adapter translation
- OpenCode via .opencode/
- Codex via .codex/ and AGENTS.md
- Zed, Gemini, Trae, CodeBuddy, Antigravity via their own local surfaces
This is a key boundary: the repo keeps one canonical content model, then fans it out into harness-specific config formats.
11. Control-plane and dashboard work
ecc2/ is a separate Rust control-plane prototype. It has its own session manager, daemon, worktree, observability, notifications, and TUI dashboard modules, plus a Tkinter dashboard entry point at ecc_dashboard.py. This is an alpha subsystem distinct from the main packaging/runtime pipeline and is aimed at interactive operator status and session control.
12. Verification and CI
tests/ plus GitHub Actions validate the repo’s surface area, install manifests, hook behavior, command registry, security checks, and cross-harness compatibility. The test suite is important architecturally because the repo’s value depends on keeping many generated surfaces aligned: docs, manifests, commands, agents, skills, hooks, and tool-specific adapters.
13. External services and integrations
The repo integrates with Claude Code plugins, GitHub Marketplace, MCP servers, AgentShield security scanning, and several harness-specific model/runtime ecosystems. These are not core business logic, but they materially shape the architecture because the repo’s artifacts are meant to be installed into and executed by those external environments.
14. High-level data flow
A typical flow is: user selects a profile or command → installer resolves target/components from manifests → files are copied or generated into the harness-specific surface → hooks execute at runtime events → session/state data is persisted or summarized → optional learning, review, or dashboard commands read that state back out. That closed loop — content definition, installation, runtime enforcement, and feedback into state — is the central architecture of ECC.
Main entry points: install-targets Targets · scripts Scripts · hooks Hooks · install-apply.js Installer
Components 25
Canonical content
Source-of-truth workflow definitions installed into harnesses.
- Skills · Primary reusable procedures and capability packs.
skills - Agents · Bounded-task subagents for planning, review, repair, and analysis.
agents - Commands · Compatibility entry points over the skills-first model.
commands - Rules · Installed guardrails for style, security, testing, and workflow behavior.
rules - Hooks · Reactive runtime enforcement triggered by harness events.
hooks - MCP configs · Model context protocol server definitions and integration config.
mcp-configs
Installer runtime
Selective install, state tracking, and session orchestration.
- Manifests · Profiles, modules, and component manifests for selective deployment.
manifests - Schemas · JSON schemas for install, plugin, hook, and state data.
schemas - Scripts · Core CLI, CI, hook, and adapter plumbing.
scripts - State store · Persistence for install history, lifecycle metadata, and session records.
scripts/lib/state-store - Session adapters · Canonical session bridging across harness-specific histories and aliases.
scripts/lib/session-adapters - Installer · Resolves profiles, targets, and applies files into harness surfaces.
scripts/install-apply.js
Harness adapters
Tool-specific surfaces and translation layers.
- Targets · Harness-specific install destinations and surface mappings.
scripts/lib/install-targets - Claude · Claude Code adapter surface and plugin packaging.
.claude - Cursor · Cursor hooks, rules, and skill translation surface.
.cursor - OpenCode · OpenCode commands, prompts, plugins, and hook integration.
.opencode - Codex · Codex agent configs, AGENTS.md, and plugin packaging.
.codex - Zed · Zed settings surface for installing ECC behavior.
.zed - Gemini · Gemini-specific local surface and adaptation layer.
.gemini - CodeBuddy · CodeBuddy installer and uninstall surface.
.codebuddy
Validation
Docs, tests, and CI that keep generated surfaces aligned.
- Docs · Guides, architecture notes, and release references.
docs - Tests · Cross-surface regression tests for manifests, hooks, commands, and adapters.
tests - CI workflows · GitHub Actions validating compatibility and release surfaces.
.github/workflows
Connections 24
- Skills → Commands: invoked by · Commands wrap or dispatch into skills.
- Skills → Agents: uses · Skills may call specialized subagents.
- Rules → Hooks: enforced by · Rules are operationalized through runtime hooks.
- Hooks → Scripts: implemented in · Hook behavior is mostly scripted plumbing.
- Manifests → Installer: drives · Profiles and modules determine what gets installed.
- Schemas → Manifests: validates · Schemas constrain manifest and install data.
- Scripts → Installer: orchestrates · Installer scripts resolve targets and apply content.
- Scripts → State store: persists · Install and session lifecycle data is stored.
- Scripts → Session adapters: bridges · Session adapters normalize harness history and metadata.
- Installer → Targets: selects · Installer chooses harness-specific destinations.
- Targets → Claude: maps to · Claude project/home surfaces receive content.
- Targets → Cursor: maps to · Cursor project surfaces and hook translation.
- Targets → OpenCode: maps to · OpenCode local surface receives generated config.
- Targets → Codex: maps to · Codex home/project layout is populated.
- Targets → Zed: maps to · Zed receives settings and local configuration.
- Targets → Gemini: maps to · Gemini-specific adaptation is applied.
- Targets → CodeBuddy: maps to · CodeBuddy install scripts provide a harness surface.
- Docs → Tests: documented by · Docs and examples are covered by regression tests.
- Tests → CI workflows: run in · CI executes validation suites and surface checks.
- ECC2 → Dashboard: exposes · ECC2 presents operator status through a dashboard.
- ECC2 → Session adapters: manages · Control-plane session logic is separate but related.
- Scripts → Docs: described in · Installer and adapter behavior is documented.
- Commands → Docs: reflected in · Command registry and guides are kept in sync.
- Hooks → Tests: verified by · Hook behavior is regression-tested.