Open-source engineering framework for disciplined AI-assisted software development across coding agents, testing, documentation, architecture, security, and CI.
Developer toolsShell · HTMLGitHub @esanacoreOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
Eric's Engineering Constitution is a reusable framework for AI-assisted software development standards. It is the single source of truth for how humans and AI agents should work across your software repositories.
Each project includes this repository as a constitution/ Git submodule alongside a small set of local project files, giving every project:Read the full README ↗Eric's Engineering Constitution is a reusable framework for AI-assisted software development standards. It is the single source of truth for how humans and AI agents should work across your software repositories.
Each project includes this repository as a constitution/ Git submodule alongside a small set of local project files, giving every project:
Click the infographic above or open the interactive demo to explore it.
Supported platforms: Linux, macOS, and Windows (through Git Bash). Every
script here is bash, so the one thing each platform needs is bash 4 or
later and Git 2.x; expand your platform below for how to get them. CI
runs the full suite on Ubuntu only; the suites are kept portable to Windows
Git Bash (see docs/TROUBLESHOOTING.md), and macOS is not covered by CI.
bash 4+ is standard. Install Git if it is missing:
sudo apt install git # Debian, Ubuntu
sudo dnf install git # Fedora
bash --version | head -n 1 && git --version
macOS ships /bin/bash 3.2, which these scripts do not support (they use
associative arrays and ${var,,} case conversion, both bash 4). Install a current bash with Homebrew and let it
shadow the system one:
brew install bash git
bash --version | head -n 1 # must report 4.x or 5.x, not 3.2
If it still reports 3.2, Homebrew's bin is not first on your PATH; run
eval "$(brew shellenv)" (or add it to ~/.zprofile) and open a new shell.
Install Git for Windows, which includes Git Bash (bash 5.x), from PowerShell:
winget install --id Git.Git -e
Then open a Git Bash window and run every command on this page there —
the scripts are bash, not PowerShell or cmd. Git Bash spells Windows paths
as /c/Users/you/project. WSL also works; inside it, follow the Linux block.
bash --version | head -n 1 && git --version
Then, from a bash shell on any platform, bootstrap a project — the command is the same everywhere:
git clone https://github.com/esanacore/engineering-constitution.git
cd engineering-constitution
./scripts/bootstrap.sh /path/to/project <repository-url>
"Getting Started" below covers publishing your own copy, choosing which AI tool instruction files to install, and manual installation.
Start with CONSTITUTION.md (the principles), AI_WORKFLOW.md (the agent
workflow), and INTEGRATION.md (adopting it in a project). The roadmap is
TODO.md, the release history is CHANGELOG.md, the release process is
RELEASES.md, and contribution rules are in CONTRIBUTING.md.
CONSTITUTION.md: Authoritative engineering principles.AI_WORKFLOW.md: Step-by-step AI agent workflow.INTEGRATION.md: Submodule workflow, agent reading order, how to use the constitution in your IDE (Visual Studio, VS Code, JetBrains), project-specific overrides, and VERSION update strategy.TESTING.md: Testing expectations and reporting standards.DOCUMENTATION.md: Documentation requirements and checklists.SECURITY.md: Security review standards.OPERATIONS.md: Operations and infrastructure standards.ARCHITECTURE.md: Architecture and ADR expectations.RELEASES.md: Release and changelog standards.TODO_GUIDELINES.md: TODO.md structure and maintenance rules.KNOWLEDGE_SOURCES.md: How to drop in book/reference sources and turn them into agent-consumable summaries via sources/.skills/: 25 built-in agent skills that enforce constitution rules autonomously — validated by scripts/check_skills.sh; see INTEGRATION.md's "Agent Skills" for how each tool loads them.templates/: Files to copy into projects.templates/docs/PRODUCT_REQUIREMENTS.md: Optional product requirements template.templates/docs/MVP_BACKLOG.md: Optional milestone backlog template for early-stage products.templates/docs/SESSION_PLAN.md: Session planning template for crash-recovery documentation.templates/docs/OTS_SOFTWARE.md: OTS software inventory template (FDA OTS / IEC 62304 SOUP-informed third-party dependency register).templates/wiki/Home.md: Wiki landing-page scaffold installed into every adopter as the required wiki/Home.md (see docs/adr/0001-wiki-subsystem.md).templates/docs/INCIDENT_POSTMORTEM.md: Blameless postmortem template, copied per incident into docs/incidents/.templates/.github/pull_request_template.md and templates/.github/CODEOWNERS: Installed by bootstrap so every pull request carries the Completion Checklist and the trivial-change declaration, and code ownership is a host-enforced setting rather than a memory.templates/demo.html: Single-file demo-page scaffold installed into every adopter; product-facing repositories fill it in and publish it (see "Demo Page" and ).engineering-constitution/
├── CONSTITUTION.md ← Authoritative engineering principles (start here)
├── AI_WORKFLOW.md ← Required step-by-step AI agent workflow
├── INTEGRATION.md ← Submodule workflow, agent reading order, multi-tool setup
├── TESTING.md ← Testing expectations, coverage, CI enforcement
├── DOCUMENTATION.md ← Documentation requirements and README/CHANGELOG standards
├── SECURITY.md ← Security review standards
├── OPERATIONS.md ← Operations and infrastructure standards
├── ARCHITECTURE.md ← Architecture, ADR, and visual-diagram expectations
├── RELEASES.md ← Versioning, changelog, and release-cutting standards
├── TODO_GUIDELINES.md ← TODO.md structure and maintenance rules
├── KNOWLEDGE_SOURCES.md ← How to drop in reference sources under sources/
├── VERSION ← Single source of truth for the framework's version
├── README.md / TODO.md / CHANGELOG.md ← This repository's own governance docs
├── AGENTS.md, CLAUDE.md, COPILOT_INSTRUCTIONS.md, ... ← This repo's own agent instructions
│
├── templates/ ← Files scripts/bootstrap.sh copies into adopting projects
│ ├── docs/ ← docs/ templates (ARCHITECTURE, SETUP, TEST_PLAN, SESSION_PLAN, ADR, ...)
│ ├── .claude/settings.json ← Claude Code hooks (freshness at start, Next Steps at stop) + permissions deny list
│ └── .github/
│ ├── workflows/ ← CI gate templates (version, compliance, tests, doc-freshness, wiki, ...), SHA-pinned
│ ├── agents/ ← Solon, the Copilot custom agent
│ └── pull_request_template.md, CODEOWNERS, dependabot.yml
│
├── docs/ ← This repo's own governance docs (TEST_PLAN, ARCHITECTURE, OPERATIONS, ...)
│ └── adr/ ← Architecture Decision Records for the framework itself
├── .github/ ← This repo's own CI (tests, release-tag-alignment, wiki-sync), PR template, CODEOWNERS
├── scripts/ ← bootstrap.sh plus every checker, auditor, and its tests
│ └── lib/ ← Concern-scoped libraries sourced by bootstrap.sh
├── examples/ ← A worked sample-project layout + OPERATIONS.example.md
├── sources/ ← Book/reference sources distilled into agent-consumable summaries
├── skills/ ← 25 built-in agent skills that execute constitution rules autonomously
├── mcp-server/ ← MCP server exposing constitution docs/sources as resources
└── wiki/ ← This repo's own wiki (Home + Getting Started, Bootstrap Script, Governance Checkers, ...)
INTEGRATION.md's "Project File Structure" section shows the mirror image of this: what an adopting project looks like once it pulls this repository in as a constitution/ submodule.
Every adopting project pulls this repository in as a read-only constitution/ submodule, layers a small set of local files on top (agent entry points, tool-specific rule files, CI workflows), and lets AI agents and CI gates enforce the same standards documented here — see INTEGRATION.md for the full reading order and multi-tool setup.
Diagram source: assets/diagrams/how-it-works.mmd (see assets/diagrams/README.md to regenerate the SVG after editing it). It's a pre-rendered image rather than a live mermaid code block because GitHub's native mobile apps don't render Mermaid — only github.com in a browser does.
You do not install anything "for the constitution." Open a bootstrapped
repository in Visual Studio, VS Code, or a JetBrains IDE and your
AI coding assistant (GitHub Copilot, Continue.dev, Cursor, …) automatically
reads the instruction files committed to the repo — chiefly AGENTS.md, plus
any tool-specific file such as .github/copilot-instructions.md — which point
it at the constitution/ submodule. Visual Studio users also get Solon, a
constitution-aware GitHub Copilot custom agent.
See INTEGRATION.md, "Using the Constitution in Your IDE," for the per-IDE
setup steps and a one-line prompt to verify the constitution is actually loaded.
Adopting repositories carry the same guidance in their own docs/HELP.md.
Current version: 1.54.0
See VERSION.
Publish this repository somewhere your projects can access it:
cd /path/to/engineering-constitution
git remote add origin <repository-url>
git push -u origin main
Use that <repository-url> in the bootstrap commands below.
Run the bootstrap script to set up the constitution in any Git repository:
./scripts/bootstrap.sh /path/to/project <repository-url>
The target project must already be a Git repository. Pass --force to overwrite previously generated files:
./scripts/bootstrap.sh --force /path/to/project <repository-url>
By default, bootstrap installs one agent instruction file: AGENTS.md, the
cross-vendor standard that most tools read directly. Tools that hardcode their
own filename are opt-in, so an adopting repository does not carry instruction
files for tools nobody on the project uses:
# Just AGENTS.md (default)
./scripts/bootstrap.sh /path/to/project <repository-url>
# Add Claude Code and Cursor support
./scripts/bootstrap.sh --agents=claude,cursor /path/to/project <repository-url>
# Every vendor file (the pre-1.38.0 behavior)
./scripts/bootstrap.sh --agents=all /path/to/project <repository-url>
Supported keys: claude, cursor, copilot, goose, openhands,
antigravity, continue, aider, generic, all. Run
./scripts/bootstrap.sh --help for the files each one installs.
A default bootstrap adds 12 root entries instead of 24.
mkdir my-project
cd my-project
git init
cd /path/to/engineering-constitution
./scripts/bootstrap.sh /path/to/my-project <repository-url>
Customize the generated files (README.md, TODO.md, CHANGELOG.md, docs/adr/0001-record-architecture-decisions.md), then commit:
cd /path/to/my-project
git add .
git commit -m "Add Eric's engineering constitution"
./scripts/bootstrap.sh /path/to/existing-project <repository-url>
The script adds the constitution submodule, creates missing governance files, and writes an adoption report to .constitution-bootstrap/adoption-report.md. Existing files are never overwritten by default — template copies are placed in .constitution-bootstrap/templates/ for manual merging.
After running it:
.constitution-bootstrap/adoption-report.md for detected project context and recommended merge steps..gitmodules, the constitution submodule reference, generated files, and any merged changes.Every repository the bootstrap script touches gets a standardized adoption badge in its README.md:
<!-- CONSTITUTION_START -->
[](https://github.com/esanacore/engineering-constitution)
<!-- CONSTITUTION_END -->
The badge is managed between the CONSTITUTION_START / CONSTITUTION_END markers, so it is added to existing READMEs (after the first heading), refreshed in place when the constitution is updated, and never duplicated on re-runs. The badge link points at the bootstrap source when it is a public Git URL and falls back to the canonical repository otherwise.
If you prefer not to use the bootstrap script:
git submodule add <repository-url> constitution
cp constitution/templates/AGENTS.md AGENTS.md
cp constitution/templates/CLAUDE.md CLAUDE.md
# ...and so on for the other template files; see scripts/bootstrap.sh for the full list
The constitution deliberately draws on named authoritative sources (see
ARCHITECTURE.md's citations of Clean Architecture and Design Patterns)
rather than absorbing influence ad hoc. sources/ is the drop-in location for
new books, papers, or long-form articles that could inform a future change,
and KNOWLEDGE_SOURCES.md is the full reference for this workflow — this is
the short version, for working in your own clone of this repository:
sources/raw/ — gitignored, so
it's never committed.bash scripts/check_source_summaries.sh scan to see what's NEW or
CHANGED and needs a summary.sources/summaries/, following the template in KNOWLEDGE_SOURCES.md
(Why This Matters, Key Takeaways, Where It Could Apply).bash scripts/check_source_summaries.sh record <relative-path>. This refuses to run until the summary actually exists.CONSTITUTION.md, ARCHITECTURE.md,
TESTING.md, etc.), then update CHANGELOG.md and TODO.md per this
repository's own Completion Checklist and cut a release per RELEASES.md
once user-facing changes accumulate.DOCUMENTATION.mddocs/adr/0002-demo-page-requirement.mdexamples/sample-project/: Example project layout.examples/OPERATIONS.example.md: Fully worked docs/OPERATIONS.md runbook for a deployed service.scripts/bootstrap.sh: Script to initialize an existing repository. Owns argument parsing, the --agents vendor selection, and the install manifest; the concerns that change for their own reasons live in scripts/lib/ and are sourced at startup.scripts/lib/: Libraries sourced by the two largest scripts, one file per concern. For bootstrap.sh: bootstrap_readme.sh (constitution badge), bootstrap_migrate.sh (seeding TODO.md/CHANGELOG.md from a project's existing backlog or release notes), bootstrap_report.sh (the adoption report and project detection), bootstrap_dependabot.sh (one Dependabot entry per dependency manifest at the root). For check_architecture.sh: architecture_languages.sh (how each language spells imports and what it resolves them against), architecture_layers.sh (the declared layer table as a graph), architecture_signals.sh (advisory structural heuristics that never fail a build). Sourced, never executed directly.scripts/run_all_tests.sh: The framework's own "Full suite" — runs every scripts/test_*.sh and names each failing suite; run in CI by .github/workflows/tests.yml alongside a self-governance job that turns the shipped checkers on this repository.scripts/check_instruction_templates.sh: Reference checker that verifies every agent instruction file present (AGENTS.md, CLAUDE.md, .cursorrules, the Solon agent, ...) carries the same guidance anchors, so a rule added to one vendor file is not silently missing from another.scripts/check_demo_page.sh: Reference checker that verifies demo.html meets the mechanical half of DOCUMENTATION.md's "Demo Page" standard — no remote resource loads, scripts and styles inline, no build-output references, no localhost/private-network URLs, linked from README.md.scripts/check_next_steps.sh: Reference checker that verifies a handoff (default docs/AGENT_HANDOFF.md) or a pull request body (--file -) ends with a well-formed Next Steps procedure — numbered checklist, every step tagged HUMAN/AGENT/AUTOMATED, every human-only step named up front and described (AI_WORKFLOW.md, "Next Steps Procedure"; ADR-0005).scripts/check_readme.sh: Reference checker for the mechanical half of DOCUMENTATION.md's README standard — fenced command blocks come with a supported-platforms statement and mention Windows and macOS (as supported or unsupported); <details> blocks have the blank lines the renderer needs, are not nested or left open, say what is inside, and hold no headings; a PowerShell or cmd Windows block uses no POSIX shell commands (a Git Bash block is a bash block). --file points it at docs/SETUP.md and friends.scripts/next_steps_hook.sh: Claude Code SessionStart/Stop hook (registered in templates/.claude/settings.json and this repository's .claude/settings.json). When a session that made commits tries to end without updating docs/AGENT_HANDOFF.md, with a malformed Next Steps procedure, or with a final reply that has no Next Steps section, it blocks the stop once and tells the agent what is missing.scripts/check_skills.sh: Reference checker that validates every skills/*/SKILL.md (front-matter name matches its directory, description present, referenced scripts exist).scripts/test_checker_contract.sh: Meta-test holding every check_*.sh to the shared checker contract (--help, exit 2 on a bad option, --strict where documented, executable bit, a paired negative-case suite, CI annotations). Every checker sources scripts/lib/ci_annotations.sh and emits ::warning:: / ::error:: under GitHub Actions.scripts/bump_adopters.sh: Fleet bump for step 9 of cutting a release — re-pins every adopter's constitution/ submodule to the release commit, one branch and pull request per repository, idempotently.scripts/check_traceability.sh: Reference checker that verifies every requirement ID has a verifying-test entry in the traceability matrix.scripts/check_ots_inventory.sh: Reference checker that cross-checks the dependencies declared in root-level manifests against the OTS software inventory (docs/OTS_SOFTWARE.md), so a dependency added without documentation is flagged in the same change.scripts/check_compliance.sh: Reference checker that verifies an adopting repository carries the expected governance files.scripts/check_architecture.sh: Reference checker that verifies source-code dependencies point inward per the Dependency Rule, using the layer table a project declares in docs/ARCHITECTURE.md. The one checker that inspects code structure rather than file presence — a repository can be fully compliant and still have its domain layer importing its database. Also reports advisory structural signals (oversized files, crowded directories) that never fail a build.scripts/check_version_alignment.sh: Reference checker that verifies adopter-facing Constitution version references match the pinned constitution/VERSION.scripts/check_release_tag_alignment.sh: Source-repo checker that verifies VERSION, the matching v<VERSION> tag, and HEAD stay aligned after a release.scripts/check_constitution_freshness.sh: Single-repository freshness check (the audit_adopters.sh companion for one repository instead of a fleet), run by the .claude/settings.json SessionStart hook so a Claude Code session flags a stale constitution/ submodule immediately instead of waiting on CI or Dependabot.scripts/run_declared_tests.sh: Runs the test command an adopting repository declares in docs/TEST_PLAN.md, enforcing it in CI.scripts/check_doc_freshness.sh: Blunt CI tripwire that flags a pull request changing source files without touching README.md/CHANGELOG.md.scripts/check_wiki_freshness.sh: CI tripwire that flags a pull request adding or removing source files without touching the wiki that catalogues them — a higher bar than doc-freshness (modifications alone never trip it). See docs/adr/0001-wiki-subsystem.md.scripts/check_wiki_links.sh: Reference checker that verifies a wiki directory's internal integrity — flagging dangling [[WikiLinks]] (targets with no page) and orphan pages (linked by nothing). Resolves links by GitHub wiki rules; warns by default, --strict to fail.scripts/measure_instruction_weight.sh: On-demand meter (not a gate) that reports bytes, words, and estimated tokens for every document in the agent required-reading order — per document and in total, with an advisory HEAVY flag above ~8,000 estimated tokens. A reading bullet that scopes its read ("open items" for TODO.md; "the Unreleased section and the most recent release" for CHANGELOG.md) is measured as instructed, and a conditional one ("when the task touches …"; "read on demand") counts as 0, with the whole-file figure alongside and both totals at the end. The one hard failure is a reading list naming a file that does not exist. Motivated by sources/summaries/articles/the-harness-is-the-thing.md: instruction weight has a per-session cost, and it should be measured rather than trimmed by taste.scripts/check_secrets.sh: Sweeps tracked and untracked-but-not-gitignored files for secrets that should never reach a remote (credential-shaped filenames, high-confidence content patterns), and checks .gitignore coverage.scripts/setup-machine.sh: One-time, per-machine installer for the AI-agent toolchain the templates point at (Bun, gstack, goose, goosetown). Not invoked by bootstrap.sh — a machine is provisioned once, explicitly; a repository is bootstrapped by writing files only. Idempotent, skips anything already installed..github/workflows/release-tag-alignment.yml: Source-repo release guard that runs scripts/check_release_tag_alignment.sh on every pushed v* tag, and can be re-run manually for a chosen ref..github/workflows/tests.yml: Source-repo CI — the full test suite plus the self-governance checkers on every pull request and push to main.docs/adr/: The framework's own ADRs: 0001 (wiki subsystem), 0002 (compatibility policy — what "breaking" means for a governance framework), 0003 (the proportionate workflow for trivial changes). Changes to the Required Files, Required Workflow, checker contract, or compatibility policy require one (DOCUMENTATION.md, "ADR Triggers for the Framework Itself").