/harness-init:harness-init [full|N|N-M]from harness-init
Bootstraps a repository with harness engineering scaffolding: AGENTS.md, docs/ system of record, architectural layer enforcement, linter rules, CI pipeline, and GC scripts. Use when initializing a new project or making an existing repo agent-ready.
Ships in harness-init. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This is the repo initialization subset of harness engineering. Runtime feedback loops, agent review loops, and observability stack setup are out of scope. If the repo already has observability (logs, metrics, tracing), this skill reads it as dynamic context but does not build it.
Source: OpenAI "Harness engineering: leveraging Codex in an agent-first world" (2026-02-11)
<Why_This_Exists> AI agents can only work with what they can see. Without structured documentation, mechanical constraints, and clear layer boundaries, agents make inconsistent architectural decisions, introduce import violations, and produce code that drifts from conventions. This skill front-loads the environment design so every subsequent agent session starts with a map, not a blank slate. </Why_This_Exists>
<Use_When>
<Do_Not_Use_When>
<Execution_Policy>
full = all phases. N = single phase. N-M = phase range. No argument = interactive (asks user what to set up). Phase 0 always runs regardless of argument.git mv for doc restructuring to preserve historyfeat/harness-engineering) if the repo has existing workPhase 1 — AGENTS.md (~100 lines, orientation map)
Read references/agents-md-template.md for the templatePhase 2 — docs/ system of record Required:
ARCHITECTURE.md at repo root (top-level domain map, ~30 lines, points to LAYERS.md)docs/architecture/LAYERS.md (definitive layer hierarchy + remediation guide)docs/golden-principles/ — Read references/golden-principles-guide.md for how to write thesedocs/SECURITY.md — Read references/security-template.md for template and exclusion rules
Recommended:docs/guides/ (setup, testing, deployment — only what's relevant)docs/exec-plans/ — Read references/exec-plan-template.md for the standard (active/ + completed/ subdirs)docs/design-docs/ with index.md (ADR index) and core-beliefs.md (non-negotiable decisions)docs/references/ (external library docs reformatted for LLM consumption, e.g. {library}-llms.txt)docs/DESIGN.md, docs/PLANS.md, docs/QUALITY_SCORE.md
Conditional (by project type):docs/RELIABILITY.md — for services (SLA, error budgets, resilience patterns)docs/STACK.md — stack-specific conventions (replaces OpenAI's FRONTEND.md)docs/product-specs/ — for product-driven projectsdocs/generated/ — auto-generated docs (db-schema.md, api-spec.md)Phase 3 — Architecture boundary test
Read references/boundary-test-template.md for test skeletons, KNOWN_VIOLATIONS format, and ratchet logicRead references/stack-routing.md for import parser and test file path per stackVIOLATION: {file}:{line} imports {target} — {layer} cannot import {target_layer}. See docs/architecture/LAYERS.mdKNOWN_VIOLATIONS stored in tests/architecture/known-violations.json, can only shrinkPhase 4 — Linter boundary enforcement
Read references/stack-routing.md for linter rule name and config location per stackPhase 5 — CI pipeline
Read references/ci-templates.md for starter YAML templates and command validation rulesRead references/stack-routing.md for CI job matrix per stackPhase 6 — Garbage collection
Read references/gc-patterns.md for scan types, safety rules, and migration strategyRead references/stack-routing.md Phase 6 table for per-stack GC toolingRead references/ci-templates.md GC Workflow section for gc.yml templategc command + scheduled GitHub Action (weekly cron, report-only)Phase 7 — Pre-commit hooks (optional)
Read references/stack-routing.md for framework and config per stack<Tool_Usage>
Delegate by intent — platform routes the call. Read references/tool-routing.md for platform-specific mappings.
references/*.md files on demand per phase — don't load all at once
</Tool_Usage><Escalation_And_Stop_Conditions>
gh CLI, LSP, or session state unavailable — skip those dynamic context signals, note what was skipped<Final_Checklist>
npm run gc / make gc / equivalent)project-root/
├── AGENTS.md # ~100 lines, orientation map [Required]
├── ARCHITECTURE.md # Top-level domain map [Required]
├── docs/
│ ├── architecture/
│ │ └── LAYERS.md # Layer hierarchy + enforcement [Required]
│ ├── golden-principles/ # DO/DON'T patterns, 30-60 lines each [Required]
│ ├── SECURITY.md # Auth, secrets, threat model [Required]
│ ├── guides/ # Setup, testing, deployment [Recommended]
│ ├── exec-plans/ # ExecPlan lifecycle [Recommended]
│ │ ├── active/
│ │ ├── completed/
│ │ └── tech-debt-tracker.md
│ ├── design-docs/ # ADRs [Recommended]
│ │ ├── index.md
│ │ ├── core-beliefs.md
│ │ └── {NNNN-title}.md
│ ├── references/ # External docs for LLMs [Recommended]
│ │ └── {library}-llms.txt
│ ├── DESIGN.md # Design philosophy [Recommended]
│ ├── PLANS.md # Exec-plans overview [Recommended]
│ ├── QUALITY_SCORE.md # Per-domain quality grades [Recommended]
│ ├── RELIABILITY.md # SLA, error budgets (services) [Conditional]
│ ├── STACK.md # Stack conventions [Conditional]
│ ├── product-specs/ # Product specs [Conditional]
│ └── generated/ # Auto-generated docs [Conditional]
│ └── {db-schema,api-spec}.md
├── scripts/gc/ # Garbage collection scripts
├── tests/architecture/
│ └── boundary.test.* # Mechanical layer enforcement
└── .github/workflows/
├── ci.yml # lint + typecheck + test + build
└── gc.yml # Weekly entropy scan
Detailed templates and guides are in references/ — read on demand per phase:
references/layer-templates.md — 5 layer models (4 tech stacks + OpenAI original)references/agents-md-template.md — AGENTS.md templatereferences/context-strategy.md — Static vs dynamic context tablesreferences/exec-plan-template.md — ExecPlan (docs/exec-plans/) standardreferences/golden-principles-guide.md — How to write golden principlesreferences/gc-patterns.md — GC scan types + migration strategy for existing reposreferences/security-template.md — SECURITY.md template with exclusion rulesreferences/boundary-test-template.md — Test skeletons, KNOWN_VIOLATIONS format, ratchet logicreferences/tool-routing.md — Platform-specific tool delegation mappingsreferences/stack-routing.md — Stack → tooling decision tables for Phases 3-7references/ci-templates.md — Starter CI YAML for GitHub Actions, GitLab, Makefile
references/agents-md-template.md (opens in a new tab)references/boundary-test-template.md (opens in a new tab)references/ci-templates.md (opens in a new tab)references/context-strategy.md (opens in a new tab)references/exec-plan-template.md (opens in a new tab)references/gc-patterns.md (opens in a new tab)references/golden-principles-guide.md (opens in a new tab)references/layer-templates.md (opens in a new tab)references/security-template.md (opens in a new tab)references/stack-routing.md (opens in a new tab)references/tool-routing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gizele1/harness-init --plugin harness-initOther plugins' skills for the same job