Era Code
Era Code is a CLI tool for establishing AI governance in software projects. It provides a structured framework for AI-assisted development through a two-tier system of immutable Constitution principles and customizable Directives.
Installation
npm install -g @era-laboratories/era-code
Trouble installing? Configure GitHub Packages access
- Run:
gh auth refresh --scopes read:packages --hostname github.com
- Run:
curl -fsSL https://gist.githubusercontent.com/crouch-era/094fab65d3b4d5e0dfbf2196f4d2afe5/raw/68b34fdfd9218fc0259daea05291b941089477b4/gistfile1.txt | ORG=era-laboratories bash
Quick Links
- Getting Started
- Commands Reference
- Configuration
- Agents Guide
- Claude Code Guide
- Skills Reference
- Directives Guide
- MCP Servers
Features
- Constitution: Immutable governance principles for AI safety and security
- Directives: Project-specific guidelines that teams can customize
- Two Harnesses: First-class support for both OpenCode (
era-code start) and Claude Code (era-code claude), driven by a single template source - Implementation Pipeline: Automated code → test → review → validate workflow
- Specialized Agents: Coder, test-writer, reviewer, debugger, and more
- Skills System: Reusable procedures for consistent behavior
- MCP Servers: Built-in support for Linear, Notion, Slack (baseline), and other integrations
- Decision Logging:
/decision-logcommand for Google Sheets decision logs with risk matrix integration - Linear Integration:
/linear-createcommand for creating issues/projects, with automatic tracking in orchestration - Backup/Restore: Safe migration and directive preservation
How It Works
Era Code establishes a governance hierarchy:
- Constitution (immutable) - Safety, security, and core principles managed by Era
- Directives (customizable) - Coding standards, workflows, and patterns your team defines
The constitution cannot be overridden by directives. If a conflict exists, the constitution always wins.
Agents
Era Code configures specialized agents for different tasks:
| Agent | Purpose |
|---|---|
orchestration | Main coding agent, coordinates the implementation pipeline |
plan | Strategic planning, creates docs/plans |
coder | Implementation specialist, writes production code |
test-writer | Test specialist, generates tests |
reviewer | Code review with APPROVE/REJECT verdicts |
debugger | Systematic debugging with root cause analysis |
researcher | Documentation and API research |
explore | Fast codebase navigation |
For non-trivial changes, orchestration follows an implementation pipeline: Plan → Research → Evaluate → Implement → Test → Review → Validate.
See the Agents Guide for details.
Change the default with:
era-code config --set settings.default_agent=orchestration
Requirements
- Node.js 20+
- npm or yarn