@harness-engineering/cli 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +2 -2
  2. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +5 -7
  3. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +2 -2
  4. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +2 -2
  5. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +4 -5
  6. package/dist/agents/skills/gemini-cli/add-harness-component/SKILL.md +192 -0
  7. package/dist/agents/skills/gemini-cli/add-harness-component/skill.yaml +32 -0
  8. package/dist/agents/skills/gemini-cli/align-documentation/SKILL.md +213 -0
  9. package/dist/agents/skills/gemini-cli/align-documentation/skill.yaml +31 -0
  10. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/SKILL.md +191 -0
  11. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/skill.yaml +32 -0
  12. package/dist/agents/skills/gemini-cli/cleanup-dead-code/SKILL.md +245 -0
  13. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +33 -0
  14. package/dist/agents/skills/gemini-cli/detect-doc-drift/SKILL.md +179 -0
  15. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +30 -0
  16. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +240 -0
  17. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +34 -0
  18. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +397 -0
  19. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/skill.yaml +48 -0
  20. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +2 -2
  21. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +317 -0
  22. package/dist/agents/skills/gemini-cli/harness-brainstorming/skill.yaml +49 -0
  23. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +681 -0
  24. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +45 -0
  25. package/dist/agents/skills/gemini-cli/harness-debugging/SKILL.md +366 -0
  26. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +47 -0
  27. package/dist/agents/skills/gemini-cli/harness-diagnostics/SKILL.md +318 -0
  28. package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +50 -0
  29. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +382 -0
  30. package/dist/agents/skills/gemini-cli/harness-execution/skill.yaml +51 -0
  31. package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +268 -0
  32. package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +31 -0
  33. package/dist/agents/skills/gemini-cli/harness-integrity/SKILL.md +167 -0
  34. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +47 -0
  35. package/dist/agents/skills/gemini-cli/harness-onboarding/SKILL.md +288 -0
  36. package/dist/agents/skills/gemini-cli/harness-onboarding/skill.yaml +30 -0
  37. package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +171 -0
  38. package/dist/agents/skills/gemini-cli/harness-parallel-agents/skill.yaml +33 -0
  39. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +389 -0
  40. package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +49 -0
  41. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +262 -0
  42. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +33 -0
  43. package/dist/agents/skills/gemini-cli/harness-refactoring/SKILL.md +169 -0
  44. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +33 -0
  45. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +4 -5
  46. package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +292 -0
  47. package/dist/agents/skills/gemini-cli/harness-skill-authoring/skill.yaml +32 -0
  48. package/dist/agents/skills/gemini-cli/harness-state-management/SKILL.md +309 -0
  49. package/dist/agents/skills/gemini-cli/harness-state-management/skill.yaml +32 -0
  50. package/dist/agents/skills/gemini-cli/harness-tdd/SKILL.md +177 -0
  51. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +48 -0
  52. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +328 -0
  53. package/dist/agents/skills/gemini-cli/harness-verification/skill.yaml +42 -0
  54. package/dist/agents/skills/gemini-cli/harness-verify/SKILL.md +159 -0
  55. package/dist/agents/skills/gemini-cli/harness-verify/skill.yaml +40 -0
  56. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +224 -0
  57. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +31 -0
  58. package/dist/agents/skills/gemini-cli/validate-context-engineering/SKILL.md +150 -0
  59. package/dist/agents/skills/gemini-cli/validate-context-engineering/skill.yaml +31 -0
  60. package/dist/bin/harness.js +3 -3
  61. package/dist/{chunk-SJECMKSS.js → chunk-E2RTDBMG.js} +25 -13
  62. package/dist/{chunk-LNI4T7R6.js → chunk-KJANDVVC.js} +20 -18
  63. package/dist/{chunk-3JWCBVUZ.js → chunk-RT2LYQHF.js} +1 -1
  64. package/dist/{dist-NT3GXHQZ.js → dist-CCM3L3UE.js} +1 -1
  65. package/dist/{dist-BDO5GFEM.js → dist-K6KTTN3I.js} +3 -3
  66. package/dist/index.js +3 -3
  67. package/dist/validate-cross-check-ZGKFQY57.js +7 -0
  68. package/package.json +6 -6
  69. package/dist/agents/skills/node_modules/.bin/glob +0 -17
  70. package/dist/agents/skills/node_modules/.bin/vitest +0 -17
  71. package/dist/agents/skills/node_modules/.bin/yaml +0 -17
  72. package/dist/templates/advanced/docs/specs/.gitkeep +0 -0
  73. package/dist/templates/intermediate/docs/specs/.gitkeep +0 -0
  74. package/dist/validate-cross-check-2OPGCGGU.js +0 -7
@@ -0,0 +1,288 @@
1
+ # Harness Onboarding
2
+
3
+ > 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.
4
+
5
+ ## When to Use
6
+
7
+ - A new developer (human or agent) is joining a harness-managed project for the first time
8
+ - Resuming work on a project after extended time away and needing to re-orient
9
+ - When `on_project_init` triggers fire in an existing project (agent starting a new session)
10
+ - When someone asks "how does this project work?" or "where do I start?"
11
+ - NOT when initializing a new project (use initialize-harness-project)
12
+ - NOT when the project has no harness configuration (onboard to harness first with initialize-harness-project)
13
+ - NOT when deep-diving into a specific module (use standard code exploration — onboarding gives the big picture)
14
+
15
+ ## Process
16
+
17
+ ### Phase 1: READ — Load Project Configuration
18
+
19
+ 1. **Read `AGENTS.md`.** This is the primary source of truth for agent behavior in the project. Note:
20
+ - Project description and purpose
21
+ - Architecture overview
22
+ - Conventions and coding standards
23
+ - Constraints and forbidden patterns
24
+ - Any special instructions or warnings
25
+
26
+ 2. **Read `harness.yaml`.** Extract:
27
+ - Project name and stack
28
+ - Adoption level (basic, intermediate, advanced)
29
+ - Layer definitions and their directory mappings
30
+ - Dependency constraints between layers
31
+ - Registered skills and their triggers
32
+ - Persona configuration (if present)
33
+
34
+ 3. **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.
35
+
36
+ 4. **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.
37
+
38
+ ### Phase 2: MAP — Understand the Codebase Structure
39
+
40
+ 1. **Map the technology stack.** Identify from package files, configuration, and code:
41
+ - Language(s) and version(s)
42
+ - Framework(s) and major libraries
43
+ - Test framework and test runner command
44
+ - Build tool and build command
45
+ - Package manager
46
+ - Database or data stores (if applicable)
47
+
48
+ 2. **Map the architecture.** Walk the directory structure and identify:
49
+ - Top-level organization pattern (monorepo, single package, workspace)
50
+ - Source code location and entry points
51
+ - Layer boundaries (from `harness.yaml` and actual directory structure)
52
+ - Shared utilities or common modules
53
+ - Configuration files and their purposes
54
+
55
+ 3. **Map the conventions.** Look for patterns in existing code:
56
+ - File naming conventions (kebab-case, camelCase, PascalCase)
57
+ - Test file location and naming (co-located, separate directory, `.test.ts` vs `.spec.ts`)
58
+ - Import style (relative, aliases, barrel files)
59
+ - Error handling patterns
60
+ - Logging patterns
61
+ - Code formatting (detect from config files: `.prettierrc`, `.eslintrc`, `biome.json`)
62
+
63
+ 4. **Map the constraints.** Identify what is restricted:
64
+ - Forbidden imports (from `harness.yaml` dependency constraints)
65
+ - Layer boundary rules (which layers can import from which)
66
+ - Linting rules that encode architectural decisions
67
+ - Any constraints documented in `AGENTS.md` that are not yet automated
68
+
69
+ 5. **Map the design system** (when present). Look for:
70
+ - `design-system/tokens.json` — W3C DTCG design tokens (colors, typography, spacing)
71
+ - `design-system/DESIGN.md` — Aesthetic intent, anti-patterns, platform notes
72
+ - `harness.config.json` `design` block — strictness level, enabled platforms, token path
73
+ - Active design skills — check if `harness-design-system`, `harness-accessibility`, `harness-design`, `harness-design-web`, `harness-design-mobile` are available
74
+ - Design constraint violations — run a quick `harness-accessibility` scan to surface any existing issues
75
+ - Token coverage — how many components reference tokens vs. hardcoded values
76
+
77
+ If no design system exists, note this as a potential improvement area.
78
+
79
+ 6. **Map the concerns.** Identify areas that need attention:
80
+ - Are there TODOs or FIXMEs in the code?
81
+ - Does `harness validate` pass cleanly, or are there warnings?
82
+ - Are there known blockers in `.harness/state.json`?
83
+ - Is documentation up to date with the code?
84
+ - Are there tests? What is the approximate coverage?
85
+
86
+ ### Graph-Enhanced Context (when available)
87
+
88
+ When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate codebase mapping:
89
+
90
+ - `query_graph` — map architecture automatically from module and layer nodes, replacing manual directory walking
91
+ - `search_similar` — find entry points and key files by querying for high-connectivity nodes
92
+ - `get_relationships` — show layer dependencies and module structure as a traversable graph
93
+
94
+ 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.
95
+
96
+ ### Phase 3: ORIENT — Identify Adoption Level and Maturity
97
+
98
+ 1. **Confirm the adoption level** matches what `harness.yaml` declares:
99
+ - Basic: `AGENTS.md` and `harness.yaml` exist but no layers or constraints
100
+ - Intermediate: Layers defined, dependency constraints enforced, at least one custom skill
101
+ - Advanced: Personas, state management, learnings, CI integration
102
+
103
+ 2. **Assess harness health.** Run `harness validate` and note any issues. A project that declares intermediate but fails validation is not truly intermediate.
104
+
105
+ 3. **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.
106
+
107
+ ### Phase 4: SUMMARIZE — Generate Orientation Output
108
+
109
+ 1. **Produce a structured orientation summary.** This is the deliverable. Format:
110
+
111
+ ```markdown
112
+ # Project Orientation: <project-name>
113
+
114
+ ## Overview
115
+
116
+ <1-2 sentence project description from AGENTS.md>
117
+
118
+ ## Stack
119
+
120
+ - Language: <language> <version>
121
+ - Framework: <framework>
122
+ - Tests: <test framework> (`<test command>`)
123
+ - Build: <build tool> (`<build command>`)
124
+ - Package manager: <pm>
125
+
126
+ ## Architecture
127
+
128
+ <Brief description of top-level organization>
129
+
130
+ ### Layers
131
+
132
+ | Layer | Directories | Can Import From |
133
+ | ------- | ----------- | ----------------- |
134
+ | <layer> | <dirs> | <allowed imports> |
135
+
136
+ ### Key Components
137
+
138
+ - <component>: <purpose> (<location>)
139
+
140
+ ## Constraints
141
+
142
+ - <constraint 1>
143
+ - <constraint 2>
144
+
145
+ ## Conventions
146
+
147
+ - <convention 1>
148
+ - <convention 2>
149
+
150
+ ## Design System
151
+
152
+ - **Tokens:** [present/absent] ([token count] tokens in [group count] groups)
153
+ - **Aesthetic Intent:** [present/absent] (style: [style], strictness: [level])
154
+ - **Platforms:** [web, mobile, or none configured]
155
+ - **Accessibility:** [baseline scan result — e.g., "3 warnings, 0 errors"]
156
+ - **Design Skills:** [list of available design skills]
157
+
158
+ ## Harness Status
159
+
160
+ - Adoption level: <level>
161
+ - Validation: <pass/fail with summary>
162
+ - Available skills: <list>
163
+ - State: <current phase/task if applicable>
164
+
165
+ ## Recent Learnings
166
+
167
+ - <most relevant learnings from .harness/learnings.md>
168
+
169
+ ## Getting Started
170
+
171
+ 1. <first thing to do>
172
+ 2. <second thing to do>
173
+ 3. <third thing to do>
174
+ ```
175
+
176
+ 2. **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.
177
+
178
+ 3. **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.
179
+
180
+ ## Harness Integration
181
+
182
+ - **`harness validate`** — Run during onboarding to assess project health and identify any configuration issues.
183
+ - **`harness skill list`** — List available skills to understand what workflows the team has formalized.
184
+ - **`harness check-deps`** — Run to verify dependency constraints are passing, which confirms layer boundaries are respected.
185
+ - **`harness state show`** — View current state to understand where the last session left off.
186
+ - **`AGENTS.md`** — Primary source of project context and agent instructions.
187
+ - **`harness.yaml`** — Source of structural configuration (layers, constraints, skills).
188
+ - **`.harness/learnings.md`** — Historical context and institutional knowledge.
189
+
190
+ ## Success Criteria
191
+
192
+ - All four configuration sources were read (`AGENTS.md`, `harness.yaml`, `.harness/learnings.md`, `.harness/state.json`)
193
+ - Technology stack is accurately identified (language, framework, test runner, build tool)
194
+ - Architecture is mapped with correct layer boundaries and dependency directions
195
+ - Conventions are identified from actual code patterns, not assumed
196
+ - Constraints are enumerated from both `harness.yaml` and `AGENTS.md`
197
+ - Adoption level is confirmed (not just declared — validated)
198
+ - A structured orientation summary is produced with all sections filled
199
+ - The "Getting Started" section is actionable and tailored to the audience
200
+ - `harness validate` was run and results are reported
201
+
202
+ ## Examples
203
+
204
+ ### Example: Onboarding to an Intermediate TypeScript Project
205
+
206
+ **READ:**
207
+
208
+ ```
209
+ Read AGENTS.md:
210
+ - Project: Widget API — REST service for widget lifecycle management
211
+ - Stack: TypeScript, Express, Vitest, PostgreSQL
212
+ - Conventions: zod validation, repository pattern, kebab-case files
213
+
214
+ Read harness.yaml:
215
+ - Level: intermediate
216
+ - Layers: presentation (src/routes/), business (src/services/), data (src/repositories/)
217
+ - Constraints: presentation → business OK, business → data OK, data → presentation FORBIDDEN
218
+
219
+ Read .harness/learnings.md:
220
+ - "Date comparison needs UTC normalization — use Date.now()"
221
+ - "The notifications table has a unique constraint on (userId, type) — upsert, don't insert"
222
+
223
+ Read .harness/state.json:
224
+ - Position: Phase execute, Task 4 of 6
225
+ - Blocker: none
226
+ ```
227
+
228
+ **MAP:**
229
+
230
+ ```
231
+ Stack: TypeScript 5.3, Express 4, Vitest 1.2, pg (node-postgres)
232
+ Architecture: Single package, 3 layers, entry point src/index.ts
233
+ Conventions: kebab-case files, co-located tests (.test.ts), barrel exports
234
+ Constraints: 3 layers with strict downward-only imports
235
+ Concerns: harness validate passes, 47 tests all passing
236
+ ```
237
+
238
+ **ORIENT:**
239
+
240
+ ```
241
+ Adoption level: intermediate (confirmed — layers defined, constraints enforced)
242
+ Skills: harness-tdd, harness-execution, harness-code-review
243
+ State: Mid-execution on a 6-task notification feature plan
244
+ ```
245
+
246
+ **SUMMARIZE:**
247
+
248
+ ```
249
+ Produce orientation with all sections. Getting Started for this context:
250
+ 1. Read the plan at docs/plans/2026-03-14-notifications-plan.md
251
+ 2. Resume execution at Task 4 (state shows Tasks 1-3 complete)
252
+ 3. Note the UTC normalization gotcha from learnings before working with dates
253
+ ```
254
+
255
+ ### Example: Onboarding to a Basic Project
256
+
257
+ **READ:**
258
+
259
+ ```
260
+ Read AGENTS.md — exists, minimal content
261
+ Read harness.yaml — level: basic, no layers defined
262
+ No .harness/learnings.md
263
+ No .harness/state.json
264
+ ```
265
+
266
+ **MAP and SUMMARIZE:**
267
+
268
+ ```
269
+ Adoption level: basic (confirmed — no layers or constraints)
270
+ Getting Started:
271
+ 1. Run npm install && npm test to verify the project builds and tests pass
272
+ 2. Read AGENTS.md for project context and conventions
273
+ 3. Consider migrating to intermediate level to add layer boundaries
274
+ (use initialize-harness-project to upgrade)
275
+ ```
276
+
277
+ ## Adoption Maturity
278
+
279
+ A mental model for where a team sits on the harness adoption curve. Not prescriptive — just orientation.
280
+
281
+ | Level | Name | Description |
282
+ | ----- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
283
+ | 1 | **Manual** | Write `CLAUDE.md` by hand, run commands manually. Harness is a reference, not a tool. |
284
+ | 2 | **Repeatable** | Skills installed, agent follows conventions consistently. Workflows are codified but enforcement is human-driven. |
285
+ | 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. |
286
+ | 4 | **Self-improving** | Learnings accumulate in `.harness/learnings.md`. Agents reference past failures before planning. Institutional knowledge compounds across sessions and team members. |
287
+
288
+ 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.
@@ -0,0 +1,30 @@
1
+ name: harness-onboarding
2
+ version: "1.0.0"
3
+ description: Onboard a new developer to a harness-managed project
4
+ cognitive_mode: advisory-guide
5
+ triggers:
6
+ - manual
7
+ - on_project_init
8
+ platforms:
9
+ - claude-code
10
+ - gemini-cli
11
+ tools:
12
+ - Bash
13
+ - Read
14
+ - Glob
15
+ cli:
16
+ command: harness skill run harness-onboarding
17
+ args:
18
+ - name: path
19
+ description: Project root path
20
+ required: false
21
+ mcp:
22
+ tool: run_skill
23
+ input:
24
+ skill: harness-onboarding
25
+ path: string
26
+ type: flexible
27
+ state:
28
+ persistent: false
29
+ files: []
30
+ depends_on: []
@@ -0,0 +1,171 @@
1
+ # Harness Parallel Agents
2
+
3
+ > Dispatch independent tasks to concurrent agents, integrate results, and verify no conflicts. Only for truly independent problems.
4
+
5
+ ## When to Use
6
+
7
+ - When 3 or more tasks are truly independent (no shared state, no shared files, different subsystems)
8
+ - When tasks involve investigation or implementation in separate parts of the codebase
9
+ - When parallel execution would meaningfully reduce wall-clock time
10
+ - When a plan has tasks explicitly marked as parallelizable
11
+ - NOT when failures across tasks might be related (investigate serially to find the common cause)
12
+ - NOT when tasks need full system understanding to complete correctly
13
+ - NOT when agents would modify the same files or shared state
14
+ - NOT when there are fewer than 3 independent tasks (overhead of coordination outweighs parallelism)
15
+ - NOT when the tasks are sequential by nature (each depends on the previous)
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Identify Independent Problem Domains
20
+
21
+ Before dispatching anything in parallel, rigorously verify independence:
22
+
23
+ 1. **List the candidate tasks.** Pull from the plan, or identify from the current work.
24
+
25
+ 2. **Check file overlap.** For each pair of tasks, compare the files they will read and write. Any overlap in WRITE targets means they are NOT independent. Overlap in READ targets is acceptable only if neither task writes to those files.
26
+
27
+ 3. **Check state overlap.** Do any tasks share database tables, configuration files, environment variables, or in-memory state? If yes, they are NOT independent.
28
+
29
+ 4. **Check import graph overlap.** If Task A modifies module X and Task B imports module X, they are NOT independent — Task B's tests may be affected by Task A's changes.
30
+
31
+ 5. **When in doubt, run serially.** The cost of a false parallel dispatch (merge conflicts, subtle bugs, wasted work) far exceeds the cost of running serially.
32
+
33
+ ### Graph-Enhanced Context (when available)
34
+
35
+ When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate independence verification:
36
+
37
+ - `query_graph` — get the dependency subgraph per candidate task and check for node overlap between tasks
38
+ - `get_impact` — verify tasks do not write to overlapping files or share transitive dependencies
39
+
40
+ Automated graph-based independence verification replaces manual import grep and catches transitive overlaps that file-level checks miss. Fall back to file-based commands if no graph is available.
41
+
42
+ ### Step 2: Create Focused Agent Tasks
43
+
44
+ For each independent task, write a focused agent brief:
45
+
46
+ 1. **Scope.** Exactly what files and directories this agent may touch. Be explicit about boundaries — the agent should not explore outside its scope.
47
+
48
+ 2. **Goal.** One sentence: what is the observable outcome when this agent is done?
49
+
50
+ 3. **Constraints.** What the agent must NOT do:
51
+ - Do not modify files outside your scope
52
+ - Do not install new dependencies without approval
53
+ - Do not change shared configuration
54
+ - Run `harness validate` before your final commit
55
+
56
+ 4. **Expected output.** What the agent should produce:
57
+ - Commit(s) on the current branch
58
+ - Test results (all pass)
59
+ - Summary of what was done and any surprises
60
+
61
+ 5. **Context.** Give each agent the minimum context it needs. Include relevant file paths, type definitions it will use, and API contracts it must respect. Do not dump the entire codebase context — focused agents work better with focused context.
62
+
63
+ ### Step 3: Dispatch Concurrently
64
+
65
+ 1. **Launch agents in parallel.** Use subagent dispatch (TaskCreate or platform-specific parallel execution).
66
+
67
+ 2. **Do not intervene while agents are running** unless one reports a blocker. Let them complete independently.
68
+
69
+ 3. **Collect results.** Wait for all agents to finish. Gather their outputs: commits, test results, and summaries.
70
+
71
+ ### Step 4: Integrate Results
72
+
73
+ 1. **Check for conflicts.** Even with verified independence, unexpected conflicts can occur:
74
+ - Git merge conflicts in any file
75
+ - Two agents added the same import or export
76
+ - Test names collide
77
+ - Shared configuration was modified despite constraints
78
+
79
+ 2. **If conflicts exist, resolve them manually.** Do not ask an agent to fix conflicts it does not have full context for. You have the full picture; the agents did not.
80
+
81
+ 3. **Run the FULL test suite.** Not just each agent's tests — the complete project test suite. Parallel changes can cause integration failures that individual test runs miss.
82
+
83
+ 4. **Run `harness validate`.** Verify project-wide health after integration.
84
+
85
+ 5. **If integration fails,** identify which agent's changes caused the failure. Revert that agent's commits, fix the issue serially, and re-integrate.
86
+
87
+ ### Step 5: Verify and Commit
88
+
89
+ 1. **Verify all observable truths** from the plan are satisfied after integration.
90
+
91
+ 2. **If all tests pass and harness validates,** the parallel execution is complete.
92
+
93
+ 3. **Write a summary** of what was parallelized, what each agent produced, and any integration issues that were resolved.
94
+
95
+ ## Harness Integration
96
+
97
+ - **`harness validate`** — Each agent runs this before its final commit. Run again after integration.
98
+ - **`harness check-deps`** — Run after integration to verify no cross-boundary violations were introduced by the combined changes.
99
+ - **Agent dispatch** — Use platform-specific parallel execution (e.g., Claude Code subagents via TaskCreate, or separate terminal sessions).
100
+ - **Test runner** — Full suite must run after integration, not just individual agent tests.
101
+
102
+ ## Success Criteria
103
+
104
+ - Independence was verified before dispatch (file overlap, state overlap, import graph)
105
+ - Each agent had a focused brief with explicit scope, goal, constraints, and expected output
106
+ - All agents completed successfully (or blockers were reported)
107
+ - Integration produced no merge conflicts (or conflicts were resolved)
108
+ - Full test suite passes after integration
109
+ - `harness validate` passes after integration
110
+ - No agent modified files outside its declared scope
111
+
112
+ ## Examples
113
+
114
+ ### Example: Parallel Implementation of Three Independent Services
115
+
116
+ **Context:** Plan has Tasks 4, 5, and 6 which implement UserService, ProductService, and NotificationService. Each service is in its own directory, has its own types, and has no cross-service dependencies.
117
+
118
+ **Step 1: Verify independence**
119
+
120
+ ```
121
+ Task 4 (UserService): writes src/services/user/*, reads src/types/user.ts
122
+ Task 5 (ProductService): writes src/services/product/*, reads src/types/product.ts
123
+ Task 6 (NotificationService): writes src/services/notification/*, reads src/types/notification.ts
124
+
125
+ File overlap: NONE (different directories, different type files)
126
+ State overlap: NONE (different DB tables, no shared config)
127
+ Import graph: NONE (no cross-service imports)
128
+ Verdict: INDEPENDENT — safe to parallelize
129
+ ```
130
+
131
+ **Step 2: Create agent briefs**
132
+
133
+ ```
134
+ Agent A — UserService:
135
+ Scope: src/services/user/, src/services/user.test.ts
136
+ Goal: UserService with CRUD operations, all tests passing
137
+ Constraints: Do not modify files outside src/services/user/. Run harness validate.
138
+ Context: User type definition in src/types/user.ts, DB helper in src/utils/db.ts
139
+
140
+ Agent B — ProductService:
141
+ Scope: src/services/product/, src/services/product.test.ts
142
+ Goal: ProductService with CRUD operations, all tests passing
143
+ Constraints: Do not modify files outside src/services/product/. Run harness validate.
144
+ Context: Product type definition in src/types/product.ts, DB helper in src/utils/db.ts
145
+
146
+ Agent C — NotificationService:
147
+ Scope: src/services/notification/, src/services/notification.test.ts
148
+ Goal: NotificationService with create and list, all tests passing
149
+ Constraints: Do not modify files outside src/services/notification/. Run harness validate.
150
+ Context: Notification type in src/types/notification.ts, email utility in src/utils/email.ts
151
+ ```
152
+
153
+ **Step 3-4: Dispatch, integrate**
154
+
155
+ ```
156
+ All 3 agents complete. No merge conflicts.
157
+ Run full test suite: 34 tests, all pass.
158
+ Run harness validate: passes.
159
+ ```
160
+
161
+ ### Example: When NOT to Parallelize
162
+
163
+ **Situation:** Tasks 7 and 8 both modify `src/api/routes/index.ts` to add new route handlers.
164
+
165
+ ```
166
+ Task 7: writes src/api/routes/users.ts, MODIFIES src/api/routes/index.ts
167
+ Task 8: writes src/api/routes/products.ts, MODIFIES src/api/routes/index.ts
168
+
169
+ File overlap: BOTH WRITE to src/api/routes/index.ts
170
+ Verdict: NOT INDEPENDENT — run serially
171
+ ```
@@ -0,0 +1,33 @@
1
+ name: harness-parallel-agents
2
+ version: "1.0.0"
3
+ description: Coordinate multiple agents working in parallel on a harness project
4
+ cognitive_mode: constructive-architect
5
+ triggers:
6
+ - manual
7
+ - on_new_feature
8
+ platforms:
9
+ - claude-code
10
+ - gemini-cli
11
+ tools:
12
+ - Bash
13
+ - Read
14
+ - Write
15
+ - Edit
16
+ - Glob
17
+ - Grep
18
+ cli:
19
+ command: harness skill run harness-parallel-agents
20
+ args:
21
+ - name: path
22
+ description: Project root path
23
+ required: false
24
+ mcp:
25
+ tool: run_skill
26
+ input:
27
+ skill: harness-parallel-agents
28
+ path: string
29
+ type: flexible
30
+ state:
31
+ persistent: false
32
+ files: []
33
+ depends_on: []