Skip to main content

Configuration

hatch3r is configured through hatch.json (the project manifest), .env.mcp (secrets), and optional customization YAML files.

hatch.json

The project manifest lives at .agents/hatch.json and is created by npx hatch3r init. It controls which tools are enabled, which MCP servers are active, board configuration, and model preferences.

To change your configuration after init, run npx hatch3r config. This interactive command walks through all settings (platform, tools, features, MCP servers, content items) pre-populated with current values, archives removed tool outputs, migrates any manual customizations, and runs a full update.

Minimal example

{
"version": "2.0.0",
"hatch3rVersion": "1.0.0",
"platform": "github",
"namespace": "my-org",
"project": "my-repo",
"repo": "my-repo",
"tools": ["cursor", "claude"],
"features": {
"agents": true,
"skills": true,
"rules": true,
"prompts": true,
"commands": true,
"mcp": true,
"guardrails": false,
"githubAgents": true,
"hooks": true
},
"mcp": {
"servers": ["playwright", "context7", "filesystem", "github"]
},
"managedFiles": []
}

Key fields

FieldTypeDescription
versionstringManifest schema version (2.0.0)
hatch3rVersionstringhatch3r version that generated this manifest
platformstringTarget platform: github, azure-devops, or gitlab (auto-detected from git remote)
namespacestringOrganization, group, or collection (replaces owner)
projectstringProject name (Azure DevOps project or GitLab group)
repostringRepository name
ownerstring(deprecated) GitHub organization or user -- use namespace instead
toolsstring[]Enabled coding tools (cursor, copilot, claude, opencode, windsurf, amp, codex, gemini, cline, aider, kiro, goose, zed)
featuresobjectFeature flags for content types
mcpobjectMCP server configuration
boardobjectGitHub Projects V2 board configuration
modelsobjectAI model preferences
claudeobjectClaude Code permissions and teammate mode
contentobjectContent selection from init (preset, project type, team size, selected item IDs)
workspaceobjectWorkspace settings for workspace-managed repos (optional)
worktreeobjectGit worktree file-isolation settings (see below)
specsobjectProject spec tracking (paths, lastGenerated)
managedFilesstring[]List of files managed by hatch3r

Board configuration

{
"board": {
"owner": "my-org",
"repo": "my-repo",
"defaultBranch": "main",
"projectNumber": 1,
"statusFieldId": null,
"statusOptions": {
"backlog": null,
"ready": null,
"inProgress": null,
"inReview": null,
"done": null
},
"labels": {
"types": [],
"executors": [],
"statuses": [],
"meta": []
},
"branchConvention": "type/issue-number-short-description",
"areas": ["area:frontend", "area:backend", "area:infra"]
}
}

The statusFieldId, statusOptions, and labels fields are populated automatically by hatch3r-board-init.

Model configuration

{
"models": {
"default": "opus",
"agents": {
"hatch3r-lint-fixer": "sonnet",
"hatch3r-test-writer": "gemini-pro"
}
}
}

Model aliases are resolved before emission: opus -> claude-opus-4-6, sonnet -> claude-sonnet-4-6, haiku -> claude-haiku-4-5, codex -> gpt-5.3-codex, etc.

Resolution order (highest precedence first):

  1. .hatch3r/agents/{id}.customize.yaml
  2. hatch.json -> models.agents.{id}
  3. Agent frontmatter model: field
  4. hatch.json -> models.default
  5. Platform auto-select

See the Model Selection guide for full details.

Content selection

The content field tracks which content items are installed. It is populated during hatch3r init and updated by hatch3r config.

{
"content": {
"preset": "standard",
"projectType": "brownfield",
"teamSize": "solo",
"items": {
"agents": ["hatch3r-implementer", "hatch3r-reviewer", "hatch3r-researcher"],
"skills": ["hatch3r-feature", "hatch3r-bug-fix", "hatch3r-refactor"],
"rules": ["hatch3r-code-standards", "hatch3r-testing", "hatch3r-git-conventions"],
"commands": ["hatch3r-workflow", "hatch3r-quick-change", "hatch3r-feature-plan"],
"prompts": ["hatch3r-bug-triage", "hatch3r-code-review", "hatch3r-pr-description"],
"hooks": ["..."],
"githubAgents": []
}
}
}
FieldDescription
presetContent profile used during init: minimal, standard, full, or custom
projectTypegreenfield (new project) or brownfield (existing codebase)
teamSizesolo or team
itemsExplicit list of installed content IDs per type

When content is undefined (legacy projects), hatch3r update and hatch3r sync treat it as "full" and operate on all files. The first hatch3r update on a legacy project auto-migrates by scanning disk and populating the content field.

Workspace configuration

When hatch3r init --workspace is run in a directory containing multiple git repos, hatch3r creates a workspace.json manifest in .agents/. This file tracks workspace-level configuration and per-repo overrides.

{
"version": "1.0.0",
"hatch3rVersion": "1.3.0",
"name": "my-project",
"syncStrategy": "on-sync",
"defaults": {
"platform": "github",
"tools": ["cursor", "claude"],
"features": { "agents": true, "skills": true, "rules": true, "...": true },
"mcp": { "servers": ["github", "playwright"] },
"content": { "preset": "standard", "projectType": "brownfield", "teamSize": "team", "items": { "...": [] } }
},
"repos": [
{
"path": "frontend",
"name": "frontend",
"sync": true,
"overrides": {
"contentOverrides": {
"include": ["hatch3r-a11y-audit"],
"exclude": ["hatch3r-board-fill"]
}
}
},
{
"path": "backend",
"name": "backend",
"sync": true,
"overrides": {
"tools": ["claude"]
}
},
{
"path": "infra",
"name": "infra",
"sync": false
}
]
}
FieldTypeDescription
versionstringWorkspace manifest schema version (1.0.0)
hatch3rVersionstringhatch3r version that created/last updated this workspace
namestringWorkspace display name (defaults to directory name)
syncStrategystring"manual" (explicit --repos flag only) or "on-sync" (cascade on every sync)
defaultsobjectWorkspace-level defaults inherited by all sub-repos (tools, features, MCP, content)
defaults.platformstringDefault platform: github, azure-devops, or gitlab
defaults.toolsstring[]Default tools for all repos
defaults.featuresobjectDefault feature flags
defaults.mcpobjectDefault MCP server config
defaults.contentobjectDefault content selection (same format as hatch.json content)
reposarrayRegistered sub-repo entries
repos[].pathstringRelative path from workspace root to the sub-repo
repos[].namestringDisplay name (defaults to directory name)
repos[].syncbooleanWhether to include this repo in sync cascades
repos[].lastSyncstringISO timestamp of last successful sync
repos[].overridesobjectPer-repo overrides (all optional)
repos[].overrides.toolsstring[]Replaces workspace tools entirely
repos[].overrides.featuresobjectPartial merge on top of workspace features
repos[].overrides.mcpobjectReplaces workspace MCP config entirely
repos[].overrides.contentOverrides.includestring[]Content IDs to add beyond workspace selection
repos[].overrides.contentOverrides.excludestring[]Content IDs to remove from workspace selection

Content inheritance follows three layers: workspace defaults, then per-repo include additions, then per-repo exclude removals. Protected items (core agents) cannot be excluded.

When a sub-repo is synced, its hatch.json receives a workspace field with provenance metadata:

{
"workspace": {
"rootPath": "..",
"lastSync": "2026-03-16T10:00:00.000Z",
"syncVersion": "1.3.0",
"workspaceChecksum": "a1b2c3...",
"excludedContent": ["hatch3r-board-fill"],
"localContent": []
}
}

Manage repos and sync settings interactively with hatch3r config or edit workspace.json directly.

Worktree isolation

{
"worktree": {
"enabled": true,
"extraPatterns": [],
"nodeModules": "symlink"
}
}
FieldTypeDefaultDescription
enabledbooleantrue (auto-enabled for Claude)Enable worktree file isolation
extraPatternsstring[][]Additional gitignore patterns to include in worktrees
nodeModulesstring"symlink"Strategy for node_modules: "symlink" or "skip"

When enabled, hatch3r init and hatch3r sync generate a .worktreeinclude file listing gitignored files that should be copied or symlinked into new worktrees. The Claude adapter automatically triggers hatch3r worktree-setup when it detects git worktree add.

Claude Code permissions

{
"claude": {
"permissions": {
"allow": ["Read", "Edit", "MultiEdit", "Write", "Grep", "Glob", "LS", "TodoRead", "TodoWrite"],
"deny": []
},
"teammateMode": "tool-using"
}
}

.env.mcp

Secrets for MCP servers are stored in .env.mcp at the project root. This file is gitignored and generated by hatch3r init.

# GitHub MCP server -- Classic PAT: repo, read:org, project.
# Fine-grained: Contents(RW), Issues(RW), Pull Requests(RW), Projects(RW)
GITHUB_PAT=ghp_xxxxxxxxxxxx

# Brave Search (free: 2,000 queries/month)
BRAVE_API_KEY=xxxxxxxx

When you add new MCP servers and re-run hatch3r init or hatch3r sync, new variables are appended without overwriting existing values.

Required environment variables

ServerEnv VarHow to Get It
GitHubGITHUB_PATCreate a PAT
Azure DevOpsAZURE_DEVOPS_PAT, AZURE_DEVOPS_ORGCreate a PAT
GitLabGITLAB_TOKENCreate a PAT
Brave SearchBRAVE_API_KEYBrave Search API
SentrySENTRY_AUTH_TOKENSentry Auth Tokens
PostgresPOSTGRES_URLYour PostgreSQL connection string
LinearLINEAR_API_KEYLinear API keys

Playwright, Context7, and Filesystem are enabled by default and require no configuration. Platform-specific MCP servers (GitHub, Azure DevOps, or GitLab) are configured based on your selected platform during init.

Customization Files

hatch3r supports per-entity customization via YAML files in .hatch3r/. See the Customization guide for full details.

.hatch3r/
agents/
hatch3r-reviewer.customize.yaml
hatch3r-implementer.customize.yaml
commands/
hatch3r-workflow.customize.yaml
skills/
hatch3r-feature.customize.yaml
rules/
hatch3r-code-standards.customize.yaml

Customization files take highest precedence in model resolution and allow project-specific behavior overrides without modifying managed agent definitions. Use hatch3r-agent-customize, hatch3r-command-customize, hatch3r-skill-customize, or hatch3r-rule-customize to manage them.

Adapter Settings

Each adapter reads the manifest and canonical content to generate tool-specific output. The adapter determines:

  • Output paths -- where generated files are written (e.g., .cursor/rules/, .github/agents/)
  • Format -- how content is transformed (MDC frontmatter, YAML frontmatter, TOML, bridge markdown)
  • Feature gates -- which content types are emitted based on features.* flags

See the Adapter Capability Matrix for the full per-tool breakdown of output paths, formats, and capabilities.