Skip to main content

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
  1. Run:
gh auth refresh --scopes read:packages --hostname github.com
  1. Run:
curl -fsSL https://gist.githubusercontent.com/crouch-era/094fab65d3b4d5e0dfbf2196f4d2afe5/raw/68b34fdfd9218fc0259daea05291b941089477b4/gistfile1.txt | ORG=era-laboratories bash

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-log command for Google Sheets decision logs with risk matrix integration
  • Linear Integration: /linear-create command 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:

  1. Constitution (immutable) - Safety, security, and core principles managed by Era
  2. 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:

AgentPurpose
orchestrationMain coding agent, coordinates the implementation pipeline
planStrategic planning, creates docs/plans
coderImplementation specialist, writes production code
test-writerTest specialist, generates tests
reviewerCode review with APPROVE/REJECT verdicts
debuggerSystematic debugging with root cause analysis
researcherDocumentation and API research
exploreFast 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