Harness Onboarding
Navigate an existing harness-managed project and generate a structured orientation for new team members. Map the codebase, understand constraints, identify the adoption level, and produce a summary that gets someone productive fast.
When to Use
- A new developer (human or agent) is joining a harness-managed project for the first time
- Resuming work on a project after extended time away and needing to re-orient
- When
on_project_init triggers fire in an existing project (agent starting a new session)
- When someone asks "how does this project work?" or "where do I start?"
- NOT when initializing a new project (use harness-initialize-project)
- NOT when the project has no harness configuration (onboard to harness first with harness-initialize-project)
- NOT when deep-diving into a specific module (use standard code exploration — onboarding gives the big picture)
Process
Phase 1: READ — Load Project Configuration
Read AGENTS.md. This is the primary source of truth for agent behavior in the project. Note:
- Project description and purpose
- Architecture overview
- Conventions and coding standards
- Constraints and forbidden patterns
- Any special instructions or warnings
Read harness.config.json. Extract:
- Project name and stack
- Adoption level (basic, intermediate, advanced)
- Layer definitions and their directory mappings
- Dependency constraints between layers
- Registered skills and their triggers
- Persona configuration (if present)
Read .harness/learnings.md if it exists. This contains hard-won insights from previous sessions — decisions made, gotchas discovered, patterns that worked or failed. Summarize the most recent and most important entries.
Read .harness/state.json if it exists. This reveals what was happening in the last session — current phase, active task, any blockers that were recorded.
Detect the roadmap layout. If docs/roadmap.d/ exists the project uses the sharded roadmap: per-row shards docs/roadmap.d/<slug>.md (plus _meta.md) are canonical and docs/roadmap.md is a generated merge=ours aggregate (do not hand-edit it). New contributors must run the one-time per-clone setup so generated-file merges behave: git config merge.ours.driver true (the .gitattributes merge=ours entry is inert without it — harness validate warns clones that have not run it). Surface this in "Getting Started". If only docs/roadmap.md exists, the project is monolith; if neither, it is file-less or uninitialized. See the adoption guide docs/guides/roadmap-sharding.md.
Phase 2: MAP — Understand the Codebase Structure
Use code_outline to get structural overviews of key modules (functions, classes, exports) without reading full source files. Use code_search to locate patterns, symbols, or conventions across the codebase.
Map the technology stack. Identify from package files, configuration, and code:
- Language(s) and version(s)
- Framework(s) and major libraries
- Test framework and test runner command
- Build tool and build command
- Package manager
- Database or data stores (if applicable)
Map the architecture. Walk the directory structure and identify:
- Top-level organization pattern (monorepo, single package, workspace)
- Source code location and entry points
- Layer boundaries (from
harness.config.json and actual directory structure)
- Shared utilities or common modules
- Configuration files and their purposes
Map the conventions. Look for patterns in existing code:
- File naming conventions (kebab-case, camelCase, PascalCase)
- Test file location and naming (co-located, separate directory,
.test.ts vs .spec.ts)
- Import style (relative, aliases, barrel files)
- Error handling patterns
- Logging patterns
- Code formatting (detect from config files:
.prettierrc, .eslintrc, biome.json)
Map the constraints. Identify what is restricted:
- Forbidden imports (from
harness.config.json dependency constraints)
- Layer boundary rules (which layers can import from which)
- Linting rules that encode architectural decisions
- Any constraints documented in
AGENTS.md that are not yet automated
Map the design system (when present). Look for:
design-system/tokens.json — W3C DTCG design tokens (colors, typography, spacing)
design-system/DESIGN.md — Aesthetic intent, anti-patterns, platform notes
harness.config.json design block — strictness level, enabled platforms, token path
- Active design skills — check if
harness-design-system, harness-accessibility, harness-design, harness-design-web, harness-design-mobile are available
- Design constraint violations — run a quick
harness-accessibility scan to surface any existing issues
- Token coverage — how many components reference tokens vs. hardcoded values
If no design system exists, note this as a potential improvement area.
Map the concerns. Identify areas that need attention:
- Are there TODOs or FIXMEs in the code?
- Does
harness validate pass cleanly, or are there warnings?
- Are there known blockers in
.harness/state.json?
- Is documentation up to date with the code?
- Are there tests? What is the approximate coverage?
Graph-Enhanced Context (when available)
When a knowledge graph exists at .harness/graph/, use graph queries for faster, more accurate codebase mapping:
query_graph — map architecture automatically from module and layer nodes, replacing manual directory walking
search_similar — find entry points and key files by querying for high-connectivity nodes
get_relationships — show layer dependencies and module structure as a traversable graph
Graph queries produce a complete architecture map in seconds, including transitive relationships that directory inspection misses. Fall back to file-based commands if no graph is available.
When deep-diving into specific modules to explain architecture, use code_unfold to expand specific symbols to their full implementation with dependency context.
Phase 3: ORIENT — Identify Adoption Level and Maturity
Confirm the adoption level matches what harness.config.json declares:
- Basic:
AGENTS.md and harness.config.json exist but no layers or constraints
- Intermediate: Layers defined, dependency constraints enforced, at least one custom skill
- Advanced: Personas, state management, learnings, CI integration
Assess harness health. Run harness validate and note any issues. A project that declares intermediate but fails validation is not truly intermediate.
Identify available skills. List the skills configured for the project. Note which are custom (project-specific) vs. standard (harness-provided). Each skill represents a workflow the team has formalized.
Phase 4: SUMMARIZE — Generate Orientation Output
- Produce a structured orientation summary. This is the deliverable. Format:
# Project Orientation: <project-name>
## Overview
<1-2 sentence project description from AGENTS.md>
## Stack
- Language: <language> <version>
- Framework: <framework>
- Tests: <test framework> (`<test command>`)
- Build: <build tool> (`<build command>`)
- Package manager: <pm>
## Architecture
<Brief description of top-level organization>
### Layers
| Layer | Directories | Can Import From |
| ------- | ----------- | ----------------- |
| <layer> | <dirs> | <allowed imports> |
### Key Components
- <component>: <purpose> (<location>)
## Constraints
- <constraint 1>
- <constraint 2>
## Conventions
- <convention 1>
- <convention 2>
## Design System
- **Tokens:** [present/absent] ([token count] tokens in [group count] groups)
- **Aesthetic Intent:** [present/absent] (style: [style], strictness: [level])
- **Platforms:** [web, mobile, or none configured]
- **Accessibility:** [baseline scan result — e.g., "3 warnings, 0 errors"]
- **Design Skills:** [list of available design skills]
## Harness Status
- Adoption level: <level>
- Validation: <pass/fail with summary>
- Available skills: <list>
- State: <current phase/task if applicable>
## Recent Learnings
- <most relevant learnings from .harness/learnings.md>
## Getting Started
1. <first thing to do>
2. <second thing to do>
3. <third thing to do>
Tailor "Getting Started" to the audience. For a new developer: how to set up the dev environment and run tests. For an agent resuming work: what the current task is and what to do next. For a reviewer: where to look and what constraints to check.
Present the summary to the human. Do not write it to a file unless asked. The orientation is a conversation artifact, not a project artifact.
Harness Integration
harness validate — Run during onboarding to assess project health and identify any configuration issues.
harness skill list — List available skills to understand what workflows the team has formalized.
harness check-deps — Run to verify dependency constraints are passing, which confirms layer boundaries are respected.
harness state show — View current state to understand where the last session left off.
AGENTS.md — Primary source of project context and agent instructions.
harness.config.json — Source of structural configuration (layers, constraints, skills).
.harness/learnings.md — Historical context and institutional knowledge.
Success Criteria
- All four configuration sources were read (
AGENTS.md, harness.config.json, .harness/learnings.md, .harness/state.json)
- Technology stack is accurately identified (language, framework, test runner, build tool)
- Architecture is mapped with correct layer boundaries and dependency directions
- Conventions are identified from actual code patterns, not assumed
- Constraints are enumerated from both
harness.config.json and AGENTS.md
- Adoption level is confirmed (not just declared — validated)
- A structured orientation summary is produced with all sections filled
- The "Getting Started" section is actionable and tailored to the audience
harness validate was run and results are reported
Rationalizations to Reject
| Rationalization |
Reality |
| "I can skip reading .harness/learnings.md since it is just historical notes" |
Learnings contain hard-won insights from previous sessions -- decisions made, gotchas discovered, patterns that worked or failed. Skipping them means repeating mistakes already diagnosed. |
| "The harness.config.json says intermediate, so I can report that without validation" |
Declared adoption level must be confirmed, not assumed. A project that declares intermediate but fails harness validate is not truly intermediate. |
| "I will map the architecture by reading the directory names since that is faster than checking conventions in actual code" |
Conventions must be identified from actual code patterns, not assumed from directory structure. File naming, import style, and error handling can only be verified by reading real source files. |
Examples
Example: Onboarding to an Intermediate TypeScript Project
READ:
Read AGENTS.md:
- Project: Widget API — REST service for widget lifecycle management
- Stack: TypeScript, Express, Vitest, PostgreSQL
- Conventions: zod validation, repository pattern, kebab-case files
Read harness.config.json:
- Level: intermediate
- Layers: presentation (src/routes/), business (src/services/), data (src/repositories/)
- Constraints: presentation → business OK, business → data OK, data → presentation FORBIDDEN
Read .harness/learnings.md:
- "Date comparison needs UTC normalization — use Date.now()"
- "The notifications table has a unique constraint on (userId, type) — upsert, don't insert"
Read .harness/state.json:
- Position: Phase execute, Task 4 of 6
- Blocker: none
MAP:
Stack: TypeScript 5.3, Express 4, Vitest 1.2, pg (node-postgres)
Architecture: Single package, 3 layers, entry point src/index.ts
Conventions: kebab-case files, co-located tests (.test.ts), barrel exports
Constraints: 3 layers with strict downward-only imports
Concerns: harness validate passes, 47 tests all passing
ORIENT:
Adoption level: intermediate (confirmed — layers defined, constraints enforced)
Skills: harness-tdd, harness-execution, harness-code-review
State: Mid-execution on a 6-task notification feature plan
SUMMARIZE:
Produce orientation with all sections. Getting Started for this context:
1. Read the plan at docs/changes/notifications/plans/2026-03-14-notifications-plan.md
2. Resume execution at Task 4 (state shows Tasks 1-3 complete)
3. Note the UTC normalization gotcha from learnings before working with dates
Example: Onboarding to a Basic Project
READ:
Read AGENTS.md — exists, minimal content
Read harness.config.json — level: basic, no layers defined
No .harness/learnings.md
No .harness/state.json
MAP and SUMMARIZE:
Adoption level: basic (confirmed — no layers or constraints)
Getting Started:
1. Run npm install && npm test to verify the project builds and tests pass
2. Read AGENTS.md for project context and conventions
3. Consider migrating to intermediate level to add layer boundaries
(use harness-initialize-project to upgrade)
Adoption Maturity
A mental model for where a team sits on the harness adoption curve. Not prescriptive — just orientation.
| Level |
Name |
Description |
| 1 |
Manual |
Write CLAUDE.md by hand, run commands manually. Harness is a reference, not a tool. |
| 2 |
Repeatable |
Skills installed, agent follows conventions consistently. Workflows are codified but enforcement is human-driven. |
| 3 |
Automated |
Mechanical gates in CI. harness validate runs on PRs. Failures auto-log to .harness/failures.md. The system catches mistakes before humans do. |
| 4 |
Self-improving |
Learnings accumulate in .harness/learnings.md. Agents reference past failures before planning. Institutional knowledge compounds across sessions and team members. |
Most teams start at Level 1 and move up as they see the value. There is no pressure to reach Level 4 — each level delivers real benefits on its own.
1---2name: harness-onboarding3description: Harness Onboarding4---5# Harness Onboarding67> Navigate an existing harness-managed project and generate a structured orientation for new team members. Map the codebase, understand constraints, identify the adoption level, and produce a summary that gets someone productive fast.89## When to Use1011- A new developer (human or agent) is joining a harness-managed project for the first time12- Resuming work on a project after extended time away and needing to re-orient13- When `on_project_init` triggers fire in an existing project (agent starting a new session)14- When someone asks "how does this project work?" or "where do I start?"15- NOT when initializing a new project (use harness-initialize-project)16- NOT when the project has no harness configuration (onboard to harness first with harness-initialize-project)17- NOT when deep-diving into a specific module (use standard code exploration — onboarding gives the big picture)1819## Process2021### Phase 1: READ — Load Project Configuration22231. **Read `AGENTS.md`.** This is the primary source of truth for agent behavior in the project. Note:24 - Project description and purpose25 - Architecture overview26 - Conventions and coding standards27 - Constraints and forbidden patterns28 - Any special instructions or warnings29302. **Read `harness.config.json`.** Extract:31 - Project name and stack32 - Adoption level (basic, intermediate, advanced)33 - Layer definitions and their directory mappings34 - Dependency constraints between layers35 - Registered skills and their triggers36 - Persona configuration (if present)37383. **Read `.harness/learnings.md`** if it exists. This contains hard-won insights from previous sessions — decisions made, gotchas discovered, patterns that worked or failed. Summarize the most recent and most important entries.39404. **Read `.harness/state.json`** if it exists. This reveals what was happening in the last session — current phase, active task, any blockers that were recorded.41425. **Detect the roadmap layout.** If `docs/roadmap.d/` exists the project uses the **sharded** roadmap: per-row shards `docs/roadmap.d/<slug>.md` (plus `_meta.md`) are canonical and `docs/roadmap.md` is a **generated** `merge=ours` aggregate (do not hand-edit it). New contributors must run the one-time per-clone setup so generated-file merges behave: `git config merge.ours.driver true` (the `.gitattributes merge=ours` entry is inert without it — `harness validate` warns clones that have not run it). Surface this in "Getting Started". If only `docs/roadmap.md` exists, the project is monolith; if neither, it is file-less or uninitialized. See the adoption guide `docs/guides/roadmap-sharding.md`.4344### Phase 2: MAP — Understand the Codebase Structure4546Use `code_outline` to get structural overviews of key modules (functions, classes, exports) without reading full source files. Use `code_search` to locate patterns, symbols, or conventions across the codebase.47481. **Map the technology stack.** Identify from package files, configuration, and code:49 - Language(s) and version(s)50 - Framework(s) and major libraries51 - Test framework and test runner command52 - Build tool and build command53 - Package manager54 - Database or data stores (if applicable)55562. **Map the architecture.** Walk the directory structure and identify:57 - Top-level organization pattern (monorepo, single package, workspace)58 - Source code location and entry points59 - Layer boundaries (from `harness.config.json` and actual directory structure)60 - Shared utilities or common modules61 - Configuration files and their purposes62633. **Map the conventions.** Look for patterns in existing code:64 - File naming conventions (kebab-case, camelCase, PascalCase)65 - Test file location and naming (co-located, separate directory, `.test.ts` vs `.spec.ts`)66 - Import style (relative, aliases, barrel files)67 - Error handling patterns68 - Logging patterns69 - Code formatting (detect from config files: `.prettierrc`, `.eslintrc`, `biome.json`)70714. **Map the constraints.** Identify what is restricted:72 - Forbidden imports (from `harness.config.json` dependency constraints)73 - Layer boundary rules (which layers can import from which)74 - Linting rules that encode architectural decisions75 - Any constraints documented in `AGENTS.md` that are not yet automated76775. **Map the design system** (when present). Look for:78 - `design-system/tokens.json` — W3C DTCG design tokens (colors, typography, spacing)79 - `design-system/DESIGN.md` — Aesthetic intent, anti-patterns, platform notes80 - `harness.config.json` `design` block — strictness level, enabled platforms, token path81 - Active design skills — check if `harness-design-system`, `harness-accessibility`, `harness-design`, `harness-design-web`, `harness-design-mobile` are available82 - Design constraint violations — run a quick `harness-accessibility` scan to surface any existing issues83 - Token coverage — how many components reference tokens vs. hardcoded values8485 If no design system exists, note this as a potential improvement area.86876. **Map the concerns.** Identify areas that need attention:88 - Are there TODOs or FIXMEs in the code?89 - Does `harness validate` pass cleanly, or are there warnings?90 - Are there known blockers in `.harness/state.json`?91 - Is documentation up to date with the code?92 - Are there tests? What is the approximate coverage?9394### Graph-Enhanced Context (when available)9596When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate codebase mapping:9798- `query_graph` — map architecture automatically from module and layer nodes, replacing manual directory walking99- `search_similar` — find entry points and key files by querying for high-connectivity nodes100- `get_relationships` — show layer dependencies and module structure as a traversable graph101102Graph queries produce a complete architecture map in seconds, including transitive relationships that directory inspection misses. Fall back to file-based commands if no graph is available.103104When deep-diving into specific modules to explain architecture, use `code_unfold` to expand specific symbols to their full implementation with dependency context.105106### Phase 3: ORIENT — Identify Adoption Level and Maturity1071081. **Confirm the adoption level** matches what `harness.config.json` declares:109 - Basic: `AGENTS.md` and `harness.config.json` exist but no layers or constraints110 - Intermediate: Layers defined, dependency constraints enforced, at least one custom skill111 - Advanced: Personas, state management, learnings, CI integration1121132. **Assess harness health.** Run `harness validate` and note any issues. A project that declares intermediate but fails validation is not truly intermediate.1141153. **Identify available skills.** List the skills configured for the project. Note which are custom (project-specific) vs. standard (harness-provided). Each skill represents a workflow the team has formalized.116117### Phase 4: SUMMARIZE — Generate Orientation Output1181191. **Produce a structured orientation summary.** This is the deliverable. Format:120121```markdown122# Project Orientation: <project-name>123124## Overview125126<1-2 sentence project description from AGENTS.md>127128## Stack129130- Language: <language> <version>131- Framework: <framework>132- Tests: <test framework> (`<test command>`)133- Build: <build tool> (`<build command>`)134- Package manager: <pm>135136## Architecture137138<Brief description of top-level organization>139140### Layers141142| Layer | Directories | Can Import From |143| ------- | ----------- | ----------------- |144| <layer> | <dirs> | <allowed imports> |145146### Key Components147148- <component>: <purpose> (<location>)149150## Constraints151152- <constraint 1>153- <constraint 2>154155## Conventions156157- <convention 1>158- <convention 2>159160## Design System161162- **Tokens:** [present/absent] ([token count] tokens in [group count] groups)163- **Aesthetic Intent:** [present/absent] (style: [style], strictness: [level])164- **Platforms:** [web, mobile, or none configured]165- **Accessibility:** [baseline scan result — e.g., "3 warnings, 0 errors"]166- **Design Skills:** [list of available design skills]167168## Harness Status169170- Adoption level: <level>171- Validation: <pass/fail with summary>172- Available skills: <list>173- State: <current phase/task if applicable>174175## Recent Learnings176177- <most relevant learnings from .harness/learnings.md>178179## Getting Started1801811. <first thing to do>1822. <second thing to do>1833. <third thing to do>184```1851862. **Tailor "Getting Started" to the audience.** For a new developer: how to set up the dev environment and run tests. For an agent resuming work: what the current task is and what to do next. For a reviewer: where to look and what constraints to check.1871883. **Present the summary to the human.** Do not write it to a file unless asked. The orientation is a conversation artifact, not a project artifact.189190## Harness Integration191192- **`harness validate`** — Run during onboarding to assess project health and identify any configuration issues.193- **`harness skill list`** — List available skills to understand what workflows the team has formalized.194- **`harness check-deps`** — Run to verify dependency constraints are passing, which confirms layer boundaries are respected.195- **`harness state show`** — View current state to understand where the last session left off.196- **`AGENTS.md`** — Primary source of project context and agent instructions.197- **`harness.config.json`** — Source of structural configuration (layers, constraints, skills).198- **`.harness/learnings.md`** — Historical context and institutional knowledge.199200## Success Criteria201202- All four configuration sources were read (`AGENTS.md`, `harness.config.json`, `.harness/learnings.md`, `.harness/state.json`)203- Technology stack is accurately identified (language, framework, test runner, build tool)204- Architecture is mapped with correct layer boundaries and dependency directions205- Conventions are identified from actual code patterns, not assumed206- Constraints are enumerated from both `harness.config.json` and `AGENTS.md`207- Adoption level is confirmed (not just declared — validated)208- A structured orientation summary is produced with all sections filled209- The "Getting Started" section is actionable and tailored to the audience210- `harness validate` was run and results are reported211212## Rationalizations to Reject213214| Rationalization | Reality |215| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |216| "I can skip reading .harness/learnings.md since it is just historical notes" | Learnings contain hard-won insights from previous sessions -- decisions made, gotchas discovered, patterns that worked or failed. Skipping them means repeating mistakes already diagnosed. |217| "The harness.config.json says intermediate, so I can report that without validation" | Declared adoption level must be confirmed, not assumed. A project that declares intermediate but fails harness validate is not truly intermediate. |218| "I will map the architecture by reading the directory names since that is faster than checking conventions in actual code" | Conventions must be identified from actual code patterns, not assumed from directory structure. File naming, import style, and error handling can only be verified by reading real source files. |219220## Examples221222### Example: Onboarding to an Intermediate TypeScript Project223224**READ:**225226```227Read AGENTS.md:228 - Project: Widget API — REST service for widget lifecycle management229 - Stack: TypeScript, Express, Vitest, PostgreSQL230 - Conventions: zod validation, repository pattern, kebab-case files231232Read harness.config.json:233 - Level: intermediate234 - Layers: presentation (src/routes/), business (src/services/), data (src/repositories/)235 - Constraints: presentation → business OK, business → data OK, data → presentation FORBIDDEN236237Read .harness/learnings.md:238 - "Date comparison needs UTC normalization — use Date.now()"239 - "The notifications table has a unique constraint on (userId, type) — upsert, don't insert"240241Read .harness/state.json:242 - Position: Phase execute, Task 4 of 6243 - Blocker: none244```245246**MAP:**247248```249Stack: TypeScript 5.3, Express 4, Vitest 1.2, pg (node-postgres)250Architecture: Single package, 3 layers, entry point src/index.ts251Conventions: kebab-case files, co-located tests (.test.ts), barrel exports252Constraints: 3 layers with strict downward-only imports253Concerns: harness validate passes, 47 tests all passing254```255256**ORIENT:**257258```259Adoption level: intermediate (confirmed — layers defined, constraints enforced)260Skills: harness-tdd, harness-execution, harness-code-review261State: Mid-execution on a 6-task notification feature plan262```263264**SUMMARIZE:**265266```267Produce orientation with all sections. Getting Started for this context:2681. Read the plan at docs/changes/notifications/plans/2026-03-14-notifications-plan.md2692. Resume execution at Task 4 (state shows Tasks 1-3 complete)2703. Note the UTC normalization gotcha from learnings before working with dates271```272273### Example: Onboarding to a Basic Project274275**READ:**276277```278Read AGENTS.md — exists, minimal content279Read harness.config.json — level: basic, no layers defined280No .harness/learnings.md281No .harness/state.json282```283284**MAP and SUMMARIZE:**285286```287Adoption level: basic (confirmed — no layers or constraints)288Getting Started:2891. Run npm install && npm test to verify the project builds and tests pass2902. Read AGENTS.md for project context and conventions2913. Consider migrating to intermediate level to add layer boundaries292 (use harness-initialize-project to upgrade)293```294295## Adoption Maturity296297A mental model for where a team sits on the harness adoption curve. Not prescriptive — just orientation.298299| Level | Name | Description |300| ----- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |301| 1 | **Manual** | Write `CLAUDE.md` by hand, run commands manually. Harness is a reference, not a tool. |302| 2 | **Repeatable** | Skills installed, agent follows conventions consistently. Workflows are codified but enforcement is human-driven. |303| 3 | **Automated** | Mechanical gates in CI. `harness validate` runs on PRs. Failures auto-log to `.harness/failures.md`. The system catches mistakes before humans do. |304| 4 | **Self-improving** | Learnings accumulate in `.harness/learnings.md`. Agents reference past failures before planning. Institutional knowledge compounds across sessions and team members. |305306Most teams start at Level 1 and move up as they see the value. There is no pressure to reach Level 4 — each level delivers real benefits on its own.