@harness-engineering/cli 1.2.0 → 1.2.2

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 (52) hide show
  1. package/dist/bin/harness.js +1 -1
  2. package/dist/{chunk-IXT3KLVN.js → chunk-5RQKSZLA.js} +4 -3
  3. package/dist/index.js +1 -1
  4. package/package.json +6 -4
  5. package/dist/agents/commands/claude-code/harness/add-component.md +0 -34
  6. package/dist/agents/commands/claude-code/harness/align-documentation.md +0 -33
  7. package/dist/agents/commands/claude-code/harness/architecture-advisor.md +0 -41
  8. package/dist/agents/commands/claude-code/harness/brainstorming.md +0 -42
  9. package/dist/agents/commands/claude-code/harness/check-mechanical-constraints.md +0 -32
  10. package/dist/agents/commands/claude-code/harness/cleanup-dead-code.md +0 -33
  11. package/dist/agents/commands/claude-code/harness/code-review.md +0 -33
  12. package/dist/agents/commands/claude-code/harness/debugging.md +0 -43
  13. package/dist/agents/commands/claude-code/harness/detect-doc-drift.md +0 -32
  14. package/dist/agents/commands/claude-code/harness/diagnostics.md +0 -43
  15. package/dist/agents/commands/claude-code/harness/enforce-architecture.md +0 -32
  16. package/dist/agents/commands/claude-code/harness/execution.md +0 -43
  17. package/dist/agents/commands/claude-code/harness/git-workflow.md +0 -32
  18. package/dist/agents/commands/claude-code/harness/initialize-project.md +0 -33
  19. package/dist/agents/commands/claude-code/harness/onboarding.md +0 -32
  20. package/dist/agents/commands/claude-code/harness/parallel-agents.md +0 -35
  21. package/dist/agents/commands/claude-code/harness/planning.md +0 -41
  22. package/dist/agents/commands/claude-code/harness/pre-commit-review.md +0 -38
  23. package/dist/agents/commands/claude-code/harness/refactoring.md +0 -35
  24. package/dist/agents/commands/claude-code/harness/skill-authoring.md +0 -35
  25. package/dist/agents/commands/claude-code/harness/state-management.md +0 -35
  26. package/dist/agents/commands/claude-code/harness/tdd.md +0 -42
  27. package/dist/agents/commands/claude-code/harness/validate-context-engineering.md +0 -32
  28. package/dist/agents/commands/claude-code/harness/verification.md +0 -38
  29. package/dist/agents/commands/gemini-cli/harness/add-component.toml +0 -240
  30. package/dist/agents/commands/gemini-cli/harness/align-documentation.toml +0 -238
  31. package/dist/agents/commands/gemini-cli/harness/architecture-advisor.toml +0 -469
  32. package/dist/agents/commands/gemini-cli/harness/brainstorming.toml +0 -326
  33. package/dist/agents/commands/gemini-cli/harness/check-mechanical-constraints.toml +0 -249
  34. package/dist/agents/commands/gemini-cli/harness/cleanup-dead-code.toml +0 -258
  35. package/dist/agents/commands/gemini-cli/harness/code-review.toml +0 -461
  36. package/dist/agents/commands/gemini-cli/harness/debugging.toml +0 -436
  37. package/dist/agents/commands/gemini-cli/harness/detect-doc-drift.toml +0 -215
  38. package/dist/agents/commands/gemini-cli/harness/diagnostics.toml +0 -401
  39. package/dist/agents/commands/gemini-cli/harness/enforce-architecture.toml +0 -222
  40. package/dist/agents/commands/gemini-cli/harness/execution.toml +0 -381
  41. package/dist/agents/commands/gemini-cli/harness/git-workflow.toml +0 -325
  42. package/dist/agents/commands/gemini-cli/harness/initialize-project.toml +0 -257
  43. package/dist/agents/commands/gemini-cli/harness/onboarding.toml +0 -316
  44. package/dist/agents/commands/gemini-cli/harness/parallel-agents.toml +0 -221
  45. package/dist/agents/commands/gemini-cli/harness/planning.toml +0 -405
  46. package/dist/agents/commands/gemini-cli/harness/pre-commit-review.toml +0 -294
  47. package/dist/agents/commands/gemini-cli/harness/refactoring.toml +0 -209
  48. package/dist/agents/commands/gemini-cli/harness/skill-authoring.toml +0 -350
  49. package/dist/agents/commands/gemini-cli/harness/state-management.toml +0 -354
  50. package/dist/agents/commands/gemini-cli/harness/tdd.toml +0 -247
  51. package/dist/agents/commands/gemini-cli/harness/validate-context-engineering.toml +0 -186
  52. package/dist/agents/commands/gemini-cli/harness/verification.toml +0 -334
@@ -1,41 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:planning
4
- description: Structured project planning with harness constraints and validation
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Write
11
- - Edit
12
- - Glob
13
-
14
- ---
15
-
16
- <context>
17
- Cognitive mode: constructive-architect
18
- Type: rigid
19
- </context>
20
-
21
- <objective>
22
- Structured project planning with harness constraints and validation
23
-
24
- Phases:
25
-
26
- - scope: Define goals and constraints
27
- - decompose: Break work into tasks
28
- - sequence: Order tasks and identify dependencies
29
- - validate: Run harness checks on the plan
30
- </objective>
31
-
32
- <execution_context>
33
- @agents/skills/claude-code/harness-planning/SKILL.md
34
- @agents/skills/claude-code/harness-planning/skill.yaml
35
- </execution_context>
36
-
37
- <process>
38
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-planning"
39
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
40
- 3. Pass through any arguments provided by the user
41
- </process>
@@ -1,38 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:pre-commit-review
4
- description: Lightweight pre-commit quality gate combining mechanical checks and AI review
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Glob
11
- - Grep
12
-
13
- ---
14
-
15
- <context>
16
- Type: rigid
17
- </context>
18
-
19
- <objective>
20
- Lightweight pre-commit quality gate combining mechanical checks and AI review
21
-
22
- Phases:
23
-
24
- - mechanical-checks: Run deterministic checks (lint, typecheck, tests)
25
- - classify-changes: Determine if AI review is needed based on change type
26
- - ai-review: Lightweight AI review of staged changes (skipped for docs/config-only) (optional)
27
- </objective>
28
-
29
- <execution_context>
30
- @agents/skills/claude-code/harness-pre-commit-review/SKILL.md
31
- @agents/skills/claude-code/harness-pre-commit-review/skill.yaml
32
- </execution_context>
33
-
34
- <process>
35
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-pre-commit-review"
36
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
37
- 3. Pass through any arguments provided by the user
38
- </process>
@@ -1,35 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:refactoring
4
- description: Safe refactoring with validation before and after changes
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Write
11
- - Edit
12
- - Glob
13
- - Grep
14
-
15
- ---
16
-
17
- <context>
18
- Cognitive mode: meticulous-implementer
19
- Type: flexible
20
- </context>
21
-
22
- <objective>
23
- Safe refactoring with validation before and after changes
24
- </objective>
25
-
26
- <execution_context>
27
- @agents/skills/claude-code/harness-refactoring/SKILL.md
28
- @agents/skills/claude-code/harness-refactoring/skill.yaml
29
- </execution_context>
30
-
31
- <process>
32
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-refactoring"
33
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
34
- 3. Pass through any arguments provided by the user
35
- </process>
@@ -1,35 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:skill-authoring
4
- description: Create and maintain harness skills following the rich skill format
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Write
11
- - Edit
12
- - Glob
13
- - Grep
14
-
15
- ---
16
-
17
- <context>
18
- Cognitive mode: constructive-architect
19
- Type: flexible
20
- </context>
21
-
22
- <objective>
23
- Create and maintain harness skills following the rich skill format
24
- </objective>
25
-
26
- <execution_context>
27
- @agents/skills/claude-code/harness-skill-authoring/SKILL.md
28
- @agents/skills/claude-code/harness-skill-authoring/skill.yaml
29
- </execution_context>
30
-
31
- <process>
32
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-skill-authoring"
33
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
34
- 3. Pass through any arguments provided by the user
35
- </process>
@@ -1,35 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:state-management
4
- description: Manage persistent session state across harness agent sessions
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Write
11
- - Edit
12
- - Glob
13
-
14
- ---
15
-
16
- <context>
17
- Cognitive mode: meticulous-implementer
18
- Type: flexible
19
- State: persistent (files: .harness/state.json)
20
- </context>
21
-
22
- <objective>
23
- Manage persistent session state across harness agent sessions
24
- </objective>
25
-
26
- <execution_context>
27
- @agents/skills/claude-code/harness-state-management/SKILL.md
28
- @agents/skills/claude-code/harness-state-management/skill.yaml
29
- </execution_context>
30
-
31
- <process>
32
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-state-management"
33
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
34
- 3. Pass through any arguments provided by the user
35
- </process>
@@ -1,42 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:tdd
4
- description: Test-driven development integrated with harness validation
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Write
11
- - Edit
12
- - Glob
13
- - Grep
14
-
15
- ---
16
-
17
- <context>
18
- Cognitive mode: meticulous-implementer
19
- Type: rigid
20
- </context>
21
-
22
- <objective>
23
- Test-driven development integrated with harness validation
24
-
25
- Phases:
26
-
27
- - red: Write failing test
28
- - green: Implement minimal code to pass
29
- - refactor: Clean up while keeping tests green (optional)
30
- - validate: Run harness checks
31
- </objective>
32
-
33
- <execution_context>
34
- @agents/skills/claude-code/harness-tdd/SKILL.md
35
- @agents/skills/claude-code/harness-tdd/skill.yaml
36
- </execution_context>
37
-
38
- <process>
39
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-tdd"
40
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
41
- 3. Pass through any arguments provided by the user
42
- </process>
@@ -1,32 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:validate-context-engineering
4
- description: Validate repository context engineering practices (AGENTS.md, doc coverage, knowledge map)
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Glob
11
-
12
- ---
13
-
14
- <context>
15
- Cognitive mode: meticulous-verifier
16
- Type: flexible
17
- </context>
18
-
19
- <objective>
20
- Validate repository context engineering practices (AGENTS.md, doc coverage, knowledge map)
21
- </objective>
22
-
23
- <execution_context>
24
- @agents/skills/claude-code/validate-context-engineering/SKILL.md
25
- @agents/skills/claude-code/validate-context-engineering/skill.yaml
26
- </execution_context>
27
-
28
- <process>
29
- 1. Try: invoke mcp__harness__run_skill with skill: "validate-context-engineering"
30
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
31
- 3. Pass through any arguments provided by the user
32
- </process>
@@ -1,38 +0,0 @@
1
- ## <!-- Generated by harness generate-slash-commands. Do not edit. -->
2
-
3
- name: harness:verification
4
- description: Comprehensive harness verification of project health and compliance
5
- argument-hint: "[--path <path>]"
6
- allowed-tools:
7
-
8
- - Bash
9
- - Read
10
- - Glob
11
-
12
- ---
13
-
14
- <context>
15
- Cognitive mode: meticulous-verifier
16
- Type: rigid
17
- </context>
18
-
19
- <objective>
20
- Comprehensive harness verification of project health and compliance
21
-
22
- Phases:
23
-
24
- - check: Run all harness validation commands
25
- - report: Summarize findings and violations
26
- - remediate: Fix any critical violations
27
- </objective>
28
-
29
- <execution_context>
30
- @agents/skills/claude-code/harness-verification/SKILL.md
31
- @agents/skills/claude-code/harness-verification/skill.yaml
32
- </execution_context>
33
-
34
- <process>
35
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-verification"
36
- 2. If MCP unavailable: read SKILL.md and follow its workflow directly
37
- 3. Pass through any arguments provided by the user
38
- </process>
@@ -1,240 +0,0 @@
1
- # Generated by harness generate-slash-commands. Do not edit.
2
- description = "Add a component to an existing harness project"
3
- prompt = """
4
- <context>
5
- Cognitive mode: constructive-architect
6
- Type: flexible
7
- </context>
8
-
9
- <objective>
10
- Add a component to an existing harness project
11
- </objective>
12
-
13
- <execution_context>
14
- --- SKILL.md (agents/skills/claude-code/add-harness-component/SKILL.md) ---
15
- # Add Harness Component
16
-
17
- > Add layers, documentation, components, or skills to an existing harness project with proper integration. Validate against existing constraints, wire into architecture, and verify the result.
18
-
19
- ## When to Use
20
-
21
- - Adding a new layer to the project's architecture
22
- - Adding a new documentation file that harness should track
23
- - Adding a new component (module, service, package) that must be wired into existing layer boundaries
24
- - Adding a new skill to the project's skill library
25
- - When a plan calls for introducing a new architectural boundary or module
26
- - NOT when initializing a project from scratch (use initialize-harness-project)
27
- - NOT when modifying an existing component (use standard editing workflows)
28
- - NOT when removing components (manual process — removing requires careful dependency analysis)
29
-
30
- ## Process
31
-
32
- ### Phase 1: DETERMINE — Identify What to Add
33
-
34
- 1. **Clarify the component type.** Ask if not obvious from context:
35
- - **Layer:** A new architectural boundary (e.g., adding an "infrastructure" layer to a project that only has "business" and "data")
36
- - **Document:** A documentation file that harness should track for drift detection (e.g., API docs, architecture decision records)
37
- - **Component:** A code module, service, or package that lives within an existing layer
38
- - **Skill:** A new harness skill definition for the project's workflow
39
-
40
- 2. **Gather requirements.** For each type:
41
- - **Layer:** Name, which directories belong to it, which layers it can import from, which layers can import from it
42
- - **Document:** Path, what it documents, which code files it relates to
43
- - **Component:** Name, which layer it belongs to, what it depends on, what will depend on it
44
- - **Skill:** Name, purpose, type (rigid or flexible), triggers
45
-
46
- 3. **Check prerequisites.** The project must already be initialized with harness. If `harness.yaml` does not exist, stop and run initialize-harness-project first.
47
-
48
- ### Phase 2: VALIDATE — Check Against Existing Constraints
49
-
50
- 1. **Read the current configuration.** Load `harness.yaml` and `AGENTS.md` to understand existing layers, constraints, and architecture.
51
-
52
- 2. **Verify the new component does not conflict:**
53
- - Does the layer name already exist?
54
- - Does the component directory already exist?
55
- - Would the new dependency relationships create circular imports?
56
- - Does the component violate any existing forbidden-import rules?
57
-
58
- 3. **If conflicts are found,** report them clearly: "Adding layer X would conflict with existing layer Y because [reason]. Options: [A] rename, [B] merge into existing layer, [C] restructure. Which do you prefer?"
59
-
60
- 4. **Run `harness check-deps`** on the current state to establish a clean baseline. If it already fails, fix existing violations before adding new components.
61
-
62
- ### Phase 3: ADD — Create the Component
63
-
64
- 1. **Run `harness add` with appropriate arguments:**
65
- - Layer: `harness add layer <name> --dirs <dir1,dir2> --imports <allowed-layers>`
66
- - Document: `harness add doc <path> --tracks <related-code-paths>`
67
- - Component: `harness add component <name> --layer <layer-name>`
68
- - Skill: `harness add skill <name> --type <rigid|flexible>`
69
-
70
- 2. **Review generated files and configuration changes.** `harness add` modifies `harness.yaml` and may generate template files. Check that the changes look correct.
71
-
72
- 3. **Create the actual code or content.** `harness add` creates the configuration entry but not necessarily the implementation. Create the directories, files, and initial code as needed.
73
-
74
- ### Phase 4: WIRE — Integrate into Architecture
75
-
76
- 1. **Update imports and exports.** If the new component needs to be imported by existing code, add the imports. If existing code needs to be aware of the new layer, update barrel files or index modules.
77
-
78
- 2. **Update `AGENTS.md`.** Add the new component to the architecture section. Document its purpose, boundaries, and relationships to other components. This keeps agent instructions accurate.
79
-
80
- 3. **Update layer configuration** if the new component changes dependency relationships. Ensure `harness.yaml` reflects the actual import graph.
81
-
82
- 4. **For new skills:** Write the `skill.yaml` and `SKILL.md` files following the harness skill format. Use harness-skill-authoring for guidance on writing good skill content.
83
-
84
- ### Phase 5: VERIFY — Confirm Integration
85
-
86
- 1. **Run `harness validate`** to verify the full project configuration is still valid after the addition.
87
-
88
- 2. **Run `harness check-deps`** to verify no dependency violations were introduced. The new component's imports must respect layer boundaries.
89
-
90
- 3. **If validation fails,** fix the issues before committing. Common causes:
91
- - New layer not properly registered in `harness.yaml`
92
- - Component placed in wrong directory for its declared layer
93
- - Imports from forbidden layers
94
- - `AGENTS.md` references outdated architecture
95
-
96
- 4. **Commit the addition.** All new and modified files in a single atomic commit.
97
-
98
- ## Harness Integration
99
-
100
- - **`harness add layer <name>`** — Register a new architectural layer with directory mappings and import rules.
101
- - **`harness add doc <path>`** — Register a documentation file for drift tracking.
102
- - **`harness add component <name> --layer <layer>`** — Register a new code component within an existing layer.
103
- - **`harness add skill <name> --type <type>`** — Scaffold a new skill definition.
104
- - **`harness validate`** — Verify project configuration after the addition.
105
- - **`harness check-deps`** — Verify dependency constraints are respected after the addition.
106
-
107
- ## Success Criteria
108
-
109
- - The new component is properly registered in `harness.yaml`
110
- - The component's files exist in the correct directories for its declared layer
111
- - `AGENTS.md` is updated to reflect the new component
112
- - `harness validate` passes after the addition
113
- - `harness check-deps` passes after the addition (no new violations)
114
- - No circular dependencies were introduced
115
- - The addition is committed as a single atomic commit
116
-
117
- ## Examples
118
-
119
- ### Example: Adding a New Layer
120
-
121
- ```
122
- Human: "We need an infrastructure layer for external API clients."
123
-
124
- DETERMINE: Adding a layer. Name: infrastructure. Dirs: src/infrastructure/.
125
- Imports from: (none — infrastructure is a leaf layer, no internal dependencies).
126
- Imported by: business layer (services call external APIs through infrastructure).
127
-
128
- VALIDATE:
129
- Read harness.yaml — existing layers: presentation, business, data.
130
- No conflict with "infrastructure" name.
131
- Run: harness check-deps — passes (clean baseline).
132
-
133
- ADD:
134
- harness add layer infrastructure --dirs src/infrastructure --imports none
135
- mkdir -p src/infrastructure
136
-
137
- WIRE:
138
- Update harness.yaml: allow business → infrastructure imports.
139
- Update AGENTS.md: document infrastructure layer purpose and boundaries.
140
-
141
- VERIFY:
142
- harness validate # Pass
143
- harness check-deps # Pass
144
- git add harness.yaml AGENTS.md src/infrastructure/
145
- git commit -m "feat: add infrastructure layer for external API clients"
146
- ```
147
-
148
- ### Example: Adding a Document for Drift Tracking
149
-
150
- ```
151
- Human: "Track our API specification for documentation drift."
152
-
153
- DETERMINE: Adding a document. Path: docs/api-spec.md.
154
- Tracks: src/routes/, src/models/response.ts.
155
-
156
- ADD:
157
- harness add doc docs/api-spec.md --tracks src/routes,src/models/response.ts
158
-
159
- WIRE:
160
- Update AGENTS.md: note that docs/api-spec.md is tracked for drift.
161
-
162
- VERIFY:
163
- harness validate # Pass
164
- git add harness.yaml AGENTS.md
165
- git commit -m "feat: track API spec for documentation drift detection"
166
- ```
167
-
168
- ### Example: Adding a Component to an Existing Layer
169
-
170
- ```
171
- Human: "Add a notification service to the business layer."
172
-
173
- DETERMINE: Adding a component. Name: notification-service. Layer: business.
174
- Depends on: data layer (notification repository). Depended on by: presentation layer (routes).
175
-
176
- VALIDATE:
177
- Read harness.yaml — business layer exists, maps to src/services/.
178
- No existing notification-service directory.
179
- business → data is an allowed import. Presentation → business is allowed.
180
- Run: harness check-deps — passes.
181
-
182
- ADD:
183
- harness add component notification-service --layer business
184
- Create src/services/notification-service.ts
185
- Create src/services/notification-service.test.ts
186
-
187
- WIRE:
188
- Add export to src/services/index.ts (if barrel file exists).
189
- Update AGENTS.md: add notification service to business layer component list.
190
-
191
- VERIFY:
192
- harness validate # Pass
193
- harness check-deps # Pass
194
- git add harness.yaml AGENTS.md src/services/notification-service.*
195
- git commit -m "feat: add notification service to business layer"
196
- ```
197
-
198
-
199
- --- skill.yaml (agents/skills/claude-code/add-harness-component/skill.yaml) ---
200
- name: add-harness-component
201
- version: "1.0.0"
202
- description: Add a component to an existing harness project
203
- cognitive_mode: constructive-architect
204
- triggers:
205
- - manual
206
- platforms:
207
- - claude-code
208
- - gemini-cli
209
- tools:
210
- - Bash
211
- - Read
212
- - Write
213
- - Edit
214
- - Glob
215
- cli:
216
- command: harness skill run add-harness-component
217
- args:
218
- - name: path
219
- description: Project root path
220
- required: false
221
- mcp:
222
- tool: run_skill
223
- input:
224
- skill: add-harness-component
225
- path: string
226
- type: flexible
227
- state:
228
- persistent: false
229
- files: []
230
- depends_on:
231
- - initialize-harness-project
232
-
233
- </execution_context>
234
-
235
- <process>
236
- 1. Try: invoke mcp__harness__run_skill with skill: "add-harness-component"
237
- 2. If MCP unavailable: follow the SKILL.md workflow provided above directly
238
- 3. Pass through any arguments provided by the user
239
- </process>
240
- """