reins-cli
v0.1.5
Published
Scaffold, audit, and evolve projects using the Harness Engineering methodology
Downloads
263
Maintainers
Readme
reins — Harness Engineering CLI
Scaffold, audit, and evolve projects using the Harness Engineering methodology.
Relationship to the Reins skill
reins-cliis the execution engine (deterministic JSON commands).- The Reins skill is the control plane that teaches coding agents when/how to call this CLI.
- Human operators steer intent; agents execute with Reins command outputs.
For end-user agent workflows, install the skill first:
npx skills add WellDunDun/reinsWhat is Harness Engineering?
A development methodology where humans steer and agents execute. All code — application logic, tests, CI, docs, tooling — is written by AI agents. Humans design environments, specify intent, and build feedback loops.
Install
# From npm
# "." means "current directory"
npx reins-cli@latest audit .
# Or clone and link
git clone https://github.com/WellDunDun/reins.git
cd reins/cli/reins
bun install
bun linkCommands
Path reminder: . = current directory, .. = parent directory.
reins init <path>
Scaffold the full harness engineering structure in a directory:
reins init .
reins init ./my-project --name "My Project"
reins init . --force # Overwrite existing files
reins init . --pack auto # Adaptive pack selection from project signals
reins init . --pack agent-factory # Optional advanced automation packCreates:
AGENTS.md— Concise map (~100 lines) pointing to deeper docsARCHITECTURE.md— Domain map with layered architecture rulesdocs/golden-principles.md— Mechanical taste rulesdocs/design-docs/— Indexed design documents with verification trackingdocs/design-docs/core-beliefs.md— Agent-first operating principlesdocs/product-specs/— Product specification registrydocs/exec-plans/— Active plans, completed plans, tech debt trackerdocs/references/— External LLM-friendly reference docsdocs/generated/— Auto-generated documentation
Pack modes:
--pack autoselects a compatible pack when stack signals are clear, otherwise keeps base scaffold.--pack agent-factoryexplicitly scaffolds advanced automation:scripts/lint-structure.mjs,scripts/doc-gardener.mjs,scripts/check-changed-doc-freshness.mjs,scripts/pr-review.mjs.github/workflows/risk-policy-gate.yml,.github/workflows/pr-review-bot.yml,.github/workflows/structural-lint.yml
reins audit <path>
Score a project against harness engineering principles (0-24):
reins audit .Scores six dimensions (variable max per dimension, 24 total):
- Repository Knowledge (0-4) — AGENTS.md, docs/, versioned plans
- Architecture Enforcement (0-3) — ARCHITECTURE.md, dependency rules, linters
- Agent Legibility (0-5) — Bootable app, observability, lean dependencies
- Golden Principles (0-3) — Documented rules, CI enforcement, cleanup process
- Agent Workflow (0-6) — Agent config, PR templates, merge gates, orchestration readiness
- Garbage Collection (0-3) — Debt tracking, doc-gardening, quality grades
Returns a maturity level:
- L0: Manual (0-6) — Traditional engineering
- L1: Inloop (7-12) — Agents help, humans still code
- L2: Guided Outloop (13-18) — Humans steer, agents execute
- L3: Full Outloop (19-21) — Agents handle full lifecycle
- L4: Zero Touch (22-24) — System maintains itself
reins evolve <path>
Show the evolution path from your current maturity level to the next:
reins evolve .
reins evolve . --apply # Auto-run scaffolding stepsRuns an audit, identifies your current level, and returns a step-by-step roadmap to level up — including which steps are automatable and which require human decisions.
reins doctor <path>
Check project health with prescriptive fixes:
reins doctor .Returns pass/fail/warn for each check with specific fix instructions.
reins compare <path> <baseline.json>
Compare the current audit score against a saved baseline:
reins audit . > baseline.json
# ... make changes ...
reins compare . baseline.jsonReturns a dimension-by-dimension diff showing score deltas and maturity level changes, useful for tracking progress over time or validating that a set of changes improved readiness.
Output
All commands output deterministic JSON, making them composable with other tools:
reins audit . | jq '.maturity_level'
reins doctor . | jq '.checks[] | select(.status == "fail")'Methodology
Based on OpenAI's internal experiment building a product with zero manually-written code:
- Repository is the system of record — All knowledge versioned in-repo
- Progressive disclosure — Short AGENTS.md as map, deep docs elsewhere
- Layered domain architecture — Types > Config > Repo > Service > Runtime > UI
- Golden principles — Mechanical taste enforced in CI
- Garbage collection — Background agents clean drift continuously
- Corrections are cheap — Minimal blocking merge gates
Runtime
- Runtime: Bun or Node.js
- Language: TypeScript
- Output: JSON
