Harness config is an open-source specification proposal and alpha TypeScript reference implementation for repository-local AI agent configuration. It keeps durable prompts, skills, rules, hooks, and instruction parts in reviewed source roots, then projects them into the live harness surfaces each tool reads.
.harness/ source -> validate -> preview activation -> live surfaces
AGENTS.md .agents/ .claude/ .cursor/ custom targets
Harness config has two independent version lines:
| Line | Current status | Meaning |
|---|---|---|
| Specification | v1 proposal |
File shape, manifest schema, projection model, ignore grammar, and conformance contract. |
| Reference implementation | 1.0.0-alpha.9 |
The npm packages and CLI implementation. Package releases do not imply a spec change. |
Treat the v1 file shape and activation model as a public proposal while public releases, conformance fixtures, adopter repositories, and external feedback mature. Once v1 is accepted, incompatible repository or implementation changes are reserved for v2.
Modern repositories often carry several AI-tool surfaces side by side:
AGENTS.md
CLAUDE.md
.agents/
.claude/
.cursor/
.github/copilot-instructions.md
.github/instructions/*.instructions.md
Each surface is useful. The problem starts when the same prompt, skill, rule, or hook is copied into multiple places and only one copy changes. Some tools also write settings, permissions, allow-lists, learned commands, or local state back into the same folders they read.
That leaves teams with a practical question:
Which file is the reviewed source of truth, and which files are just live runtime surfaces?
Harness config makes that ownership boundary explicit.
Harness config separates three things that are often mixed together:
- Repo-owned source: durable configuration reviewed in Git, commonly under
./.harness. - Generated harness surfaces: files and folders such as
AGENTS.md,.agents/,.claude/,.cursor/, or another declared output. - Runtime-owned mutable files: target files seeded from source once, then left to the harness runtime unless the user explicitly forces re-projection.
The result is a one-way projection model:
reviewed source roots
-> manifest + profiles + overrides + ignore/mutable rules
-> dry-run activation plan
-> explicit live harness surfaces
The standard is implementation-neutral. harnessc is the alpha reference CLI;
the contract is the repository shape and activation behavior.
Requires Node.js >=22.12.0.
Run the CLI through npm:
npx harnessc
npx harnessc init
npx harnessc validate
npx harnessc explain .agents/skills/review/SKILL.md
npx harnessc activate
npx harnessc activate --yesThe important CLI rule is simple:
no --yes -> preview only
--yes -> write changes
Use the website and specification as the reference when asking an AI agent to adopt the standard:
Update this repository to use Harness config. Use https://www.harnessconfig.dev/
as the reference, keep reusable agent instructions under .harness, and project
explicit targets with harnessc.
.harness/
harness.toml
resources/
skills/
review/
SKILL.md
.claude/
SKILL.md
dir/
AGENTS.md/
.harnessComposable
100_intro.md
200_rules.md
.harnessIgnore
.harnessMutable
version = 1
[[resources]]
path = "./.harness/resources"
[[targets]]
path = "./.agents"
[[targets]]
path = "./.claude"
[[dir]]
path = "./.harness/dir"In that shape:
[[resources]]projects reusable resources into every declared target.[[targets]]declares static live target folders that may receive projection; an optionalparentcan place those outputs under an external folder such as a sibling worktree.[[dir]]produces repo-relative outputs such asAGENTS.md.[[resources]].path,[[dir]].path, and[[targets]].parentmay use gitignore-style wildcard patterns.[[targets]].pathis always explicit because activation may need to create it..claude/inside a resource is a target-derived override for the.claudetarget..harnessComposableassembles one output file from ordered parts.
- Explicit targets only. A folder receives projection only when declared in the selected manifest. There are no implicit target folders, and target paths stay static even when a parent pattern expands to multiple output parents.
- Ordered source roots.
[[resources]]and[[dir]]entries define the source roots that participate in projection; wildcard entries expand only to existing real directories. - Copy projection. Targets are materialized as ordinary files, not symlinks.
- Dry-run first.
harnessc init,harnessc activate, and extension activation preview by default and write only with--yes. - Live surfaces are outputs.
.agents/,.claude/,.cursor/, and similar folders are harness surfaces, not source repositories. - Mutable is not ignore.
.harnessIgnoreexcludes files from projection..harnessMutableseeds files once and then treats target bytes as runtime-owned. - Profiles and dir composition are local file contracts. Profiles add
source overlays;
[[dir]]composes or copies repo-relative outputs. - Cleanup is conservative. Unmanaged and orphaned outputs are preserved by default unless cleanup is explicit.
- Local-first tooling. Validation, planning, and activation operate on repository files locally.
Harness config is conservative because activation mutates live files:
- planned creates, updates, removals, keeps, orphaned managed outputs, preserved unmanaged entries, and mutable skips are visible before writes;
- unmanaged files are kept by default;
- target-output
.harnessIgnoreand.harnessProfilefiles are preserved as local controls; - symlinks are treated as leaf entries and are not followed;
- target symlink replacement requires an explicit policy or flag.
Harness config does not collect telemetry. The harnessc CLI does not send
analytics, usage events, file paths, repository names, command history, machine
identifiers, or error reports. The CLI does not make network requests during
normal validation, planning, or activation.
Harness config is not a hosted service, package manager, marketplace, permission system, memory layer, synchronization service, or agent SDK. It does not define how a harness runtime behaves after reading its files.
Those concerns belong in tools and products that build on top of the standard. Harness config keeps v1 focused on the repo-local source-to-surface contract.
| Package | Purpose |
|---|---|
harnessc |
Public npx harnessc command. |
@harnessconfig/cli |
Scoped CLI implementation package. |
@harnessconfig/core |
TypeScript schemas, validation, planning, projection, ignore parsing, and dir composition helpers. |
The examples/ directory contains runnable scenarios:
- 01 multi runtime, one source
- 02 profile mode switching
- 03 team kits
- 04 composable instructions
- 05 runtime-owned state
- 06 layered local overlays
- 07 worktree fleet wildcards
- 08 monorepo package wildcards
- 09 isolated profile packs
Profile-switching examples use --remove-orphans when applying a new profile
so unedited outputs from the previous profile are cleaned up. Use
--remove-unmanaged for target files that no configured source can produce
anymore, such as outputs from deleted or newly ignored source files.
| Document | Use it for |
|---|---|
| Rationale | Why the source-to-surface model exists. |
| Standard | Normative v1 repository contract. |
| Tooling | CLI behavior, flags, dry-run semantics, and output ownership. |
| Conformance | Repository, tool, projection, dir, profile, ignore, and mutable-file claims. |
| Adoption | Migration and setup guidance. |
| Diagnostics | Diagnostic codes and expected meanings. |
| Testing | Scenario map and fixture coverage. |
| Governance | Versioning, proposal process, and spec evolution. |
| Release notes | Package release history. |
Website: https://www.harnessconfig.dev/
Specification: https://www.harnessconfig.dev/specifications/v1/
Install and build:
pnpm install
pnpm buildFocused checks:
pnpm --filter @harnessconfig/core test
pnpm --filter @harnessconfig/cli test
pnpm run harness:check
pnpm run check
pnpm run lintFull release-quality gate:
pnpm run qualityUse the built CLI directly when testing fixtures:
node packages/cli/dist/bin.js validate --root <fixture>
node packages/cli/dist/bin.js activate --root <fixture>
node packages/cli/dist/bin.js activate --root <fixture> --yesRegenerate this repository's own projected harness outputs:
pnpm run harness:activateIssues, compatibility notes, examples, and pull requests are welcome. Start with:
Harness config is released under the Apache License 2.0.
