@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,317 @@
1
+ # Harness Brainstorming
2
+
3
+ > Design exploration to spec to plan. No implementation before design approval. Think first, build second.
4
+
5
+ ## When to Use
6
+
7
+ - Starting a new feature or project that requires design decisions
8
+ - When the problem space is ambiguous and needs exploration before planning
9
+ - When multiple implementation approaches exist and tradeoffs must be weighed
10
+ - When `on_new_feature` trigger fires and the scope is non-trivial
11
+ - NOT when the implementation path is already clear (go straight to harness-planning)
12
+ - NOT when fixing a bug with an obvious root cause (use harness-debugging or harness-tdd)
13
+ - NOT when the task is a simple refactor with no design decisions (use harness-refactoring)
14
+
15
+ ## Process
16
+
17
+ ### Iron Law
18
+
19
+ **No implementation may begin before the design is approved by the human.**
20
+
21
+ If you find yourself writing production code, tests, or scaffolding before the human has signed off on the design, STOP. You are in the wrong skill. Brainstorming produces a spec document, not code.
22
+
23
+ ---
24
+
25
+ ### Phase 1: EXPLORE — Gather Context
26
+
27
+ 1. **Read the existing codebase.** Understand the current architecture, constraints, and conventions. Check AGENTS.md, existing specs in `docs/`, and relevant source files.
28
+
29
+ 2. **Identify the problem boundary.** What exactly needs to be solved? What is explicitly out of scope? Write down both.
30
+
31
+ 3. **Check for prior art.** Has this problem been partially solved elsewhere in the codebase? Are there existing patterns that should be followed or deliberately broken?
32
+
33
+ 4. **Assess scope.** If the problem spans more than 3 major subsystems or would take more than 2 weeks to implement, it is too large. Decompose into sub-projects first, then brainstorm each one separately.
34
+
35
+ ---
36
+
37
+ ### Phase 2: EVALUATE — Ask Questions and Narrow
38
+
39
+ 1. **Ask ONE question at a time.** Do not dump a list of 10 questions on the human. Ask the most important question first. Wait for the answer. Let the answer inform the next question.
40
+
41
+ When asking a clarifying question, use `emit_interaction` with `type: 'question'`:
42
+
43
+ ```json
44
+ emit_interaction({
45
+ path: "<project-root>",
46
+ type: "question",
47
+ question: {
48
+ text: "For auth, should we use:",
49
+ options: ["A) existing JWT middleware", "B) OAuth2 via provider X", "C) external service"]
50
+ }
51
+ })
52
+ ```
53
+
54
+ This records the question in state and returns a formatted prompt to present.
55
+
56
+ 2. **Prefer multiple choice.** Instead of "How should we handle auth?", ask "For auth, should we: (A) use existing JWT middleware, (B) add OAuth2 via provider X, or (C) delegate to an external service?" Give 2-4 concrete options with brief tradeoff notes.
57
+
58
+ 3. **When the human answers, acknowledge and build on it.** Do not re-ask clarified points. Track decisions as they accumulate.
59
+
60
+ 4. **Apply YAGNI ruthlessly.** For every proposed capability, ask: "Do we need this for the stated goal, or is this speculative?" If speculative, cut it. If the human insists, note it as a future consideration, not a requirement.
61
+
62
+ 5. **Continue until you have enough clarity** to propose concrete approaches. Typically 3-7 questions are sufficient. If you need more than 10, the scope is too large — decompose.
63
+
64
+ ### Context Keywords
65
+
66
+ During Phase 2, extract 5-10 domain keywords that capture the problem space. Include them in the spec frontmatter:
67
+
68
+ ```
69
+ **Keywords:** auth, middleware, session-tokens, refresh-flow, OAuth2
70
+ ```
71
+
72
+ These keywords flow into the `handoff.json` `contextKeywords` field when the spec is handed off to planning. Select keywords that would help a fresh agent — one that has never seen this conversation — understand the domain area quickly.
73
+
74
+ ---
75
+
76
+ ### Phase 3: PRIORITIZE — Propose Approaches
77
+
78
+ 1. **Propose 2-3 concrete approaches.** Not 1 (no choice), not 5 (decision paralysis). Each approach must include:
79
+ - **Summary:** One sentence describing the approach
80
+ - **How it works:** Key technical decisions (what data structures, what APIs, what patterns)
81
+ - **Tradeoffs:** What you gain, what you lose, what gets harder later
82
+ - **Estimated complexity:** Low / Medium / High, with a brief justification
83
+ - **Risk:** What could go wrong, what assumptions might be wrong
84
+
85
+ When presenting approach tradeoffs, use conventional markdown patterns:
86
+
87
+ ```
88
+ **[IMPORTANT]** Approach 1 trades simplicity for extensibility
89
+ **[SUGGESTION]** Consider Approach 2 if real-time requirements emerge later
90
+ ```
91
+
92
+ 2. **Be honest about tradeoffs.** Do not soft-sell a preferred approach. If approach A is simpler but less extensible, say so plainly.
93
+
94
+ 3. **State your recommendation** and why, but defer to the human's decision.
95
+
96
+ 4. **Wait for the human to choose.** Do not proceed until an approach is selected.
97
+
98
+ ---
99
+
100
+ ### Phase 4: VALIDATE — Write the Spec
101
+
102
+ 1. **Present the design section by section.** Do not dump the entire spec at once. Present each major section, get feedback, and incorporate it before moving to the next:
103
+ - Overview and goals
104
+ - Decisions made (with rationale from the brainstorming conversation)
105
+ - Technical design (data structures, APIs, file layout)
106
+ - Success criteria (observable, testable outcomes)
107
+ - Implementation order (high-level phases, not detailed tasks — that is harness-planning's job)
108
+
109
+ 2. **Run soundness review.** After all sections are reviewed and the spec is drafted, invoke `harness-soundness-review --mode spec` against the draft. Do not proceed to write the spec to `docs/` until the soundness review converges with no remaining issues.
110
+
111
+ 3. **Write the spec to `docs/`.** Write proposals to `docs/changes/<feature>/proposal.md`. This keeps change proposals organized by feature in a consistent location.
112
+
113
+ 4. **Run `harness validate`** to verify the spec file is properly placed and the project remains healthy.
114
+
115
+ 5. **Request sign-off via `emit_interaction`:**
116
+
117
+ ```json
118
+ emit_interaction({
119
+ path: "<project-root>",
120
+ type: "confirmation",
121
+ confirmation: {
122
+ text: "Approve spec at <file-path>?",
123
+ context: "<one-paragraph summary of the design>"
124
+ }
125
+ })
126
+ ```
127
+
128
+ The human must explicitly approve before this skill is complete.
129
+
130
+ 6. **Write handoff and suggest transition.** After the human approves the spec:
131
+
132
+ Write `.harness/handoff.json`:
133
+
134
+ ```json
135
+ {
136
+ "fromSkill": "harness-brainstorming",
137
+ "phase": "VALIDATE",
138
+ "summary": "<1-sentence spec summary>",
139
+ "artifacts": ["<spec file path>"],
140
+ "decisions": [{ "what": "<decision>", "why": "<rationale>" }],
141
+ "contextKeywords": ["<domain keywords from Phase 2>"]
142
+ }
143
+ ```
144
+
145
+ Call `emit_interaction`:
146
+
147
+ ```json
148
+ {
149
+ "type": "transition",
150
+ "transition": {
151
+ "completedPhase": "brainstorming",
152
+ "suggestedNext": "planning",
153
+ "reason": "Spec approved and written to docs/",
154
+ "artifacts": ["<spec file path>"],
155
+ "requiresConfirmation": true,
156
+ "summary": "<Spec title> -- <key design choices>. <N> success criteria, <N> implementation phases."
157
+ }
158
+ }
159
+ ```
160
+
161
+ If the user confirms: invoke harness-planning with the spec path.
162
+ If the user declines: stop. The handoff is written for future invocation.
163
+
164
+ ---
165
+
166
+ ### Scope Check
167
+
168
+ At any point during brainstorming, if the design reveals that the project is larger than initially expected:
169
+
170
+ 1. **Identify natural decomposition boundaries.** Where can the project be split into independently deliverable pieces?
171
+ 2. **Propose sub-projects.** Each sub-project should be brainstormable and plannable on its own.
172
+ 3. **Get approval for the decomposition** before continuing to brainstorm any individual sub-project.
173
+
174
+ ## Party Mode
175
+
176
+ When activated with `--party`, add a multi-perspective evaluation step after proposing approaches.
177
+
178
+ ### Perspective Selection
179
+
180
+ Select 2-3 perspectives based on design topic:
181
+
182
+ | Topic | Perspectives |
183
+ | -------------- | -------------------------------------------- |
184
+ | API / backend | Backend Developer, API Consumer, Operations |
185
+ | UI / frontend | Developer, Designer, End User |
186
+ | Infrastructure | Architect, SRE, Developer |
187
+ | Data model | Backend Developer, Data Consumer, Migration |
188
+ | Library / SDK | Library Author, Library Consumer, Maintainer |
189
+ | Cross-cutting | Architect, Security, Developer |
190
+ | Default | Architect, Developer, User/Consumer |
191
+
192
+ ### Evaluation Process
193
+
194
+ For each proposed approach, evaluate from each perspective:
195
+
196
+ ```
197
+ ### Approach N: [name]
198
+
199
+ **[Perspective 1] perspective:**
200
+ [Assessment]. Concern: [specific concern or "None"].
201
+
202
+ **[Perspective 2] perspective:**
203
+ [Assessment]. Concern: [specific concern or "None"].
204
+
205
+ **[Perspective 3] perspective:**
206
+ [Assessment]. Concern: [specific concern or "None"].
207
+
208
+ **Synthesis:** [Consensus summary. Address raised concerns. Recommend proceed/revise.]
209
+ ```
210
+
211
+ Converge on a recommendation that addresses all concerns before presenting the design.
212
+
213
+ ## Harness Integration
214
+
215
+ - **`harness validate`** — Run after writing the spec to `docs/`. Verifies project health and that the new spec file is properly placed.
216
+ - **`harness check-docs`** — Run to verify the spec does not conflict with existing documentation.
217
+ - **Spec location** — Specs go to `docs/changes/<feature>/proposal.md`. Follow existing naming patterns.
218
+ - **Handoff to harness-planning** — Once the spec is approved, invoke harness-planning to create the implementation plan from the spec.
219
+ - **`emit_interaction`** -- Call at the end of Phase 4 to suggest transitioning to harness-planning. Uses confirmed transition (waits for user approval).
220
+
221
+ #### Requirement Phrasing
222
+
223
+ When brainstorming produces requirements or acceptance criteria that will feed into planning, prefer EARS sentence patterns for behavioral requirements. See the EARS Requirement Patterns section in harness-planning for the full template reference. Key patterns:
224
+
225
+ - **Event-driven:** "When [trigger], the system shall [response]."
226
+ - **Unwanted:** "If [condition], then the system shall not [behavior]."
227
+
228
+ These patterns make requirements testable and unambiguous. Apply them when the output of brainstorming includes specific behavioral expectations.
229
+
230
+ ## Success Criteria
231
+
232
+ - A spec document exists in `docs/` with all required sections (overview, decisions, technical design, success criteria, implementation order)
233
+ - The human explicitly approved the design before any implementation
234
+ - YAGNI was applied: no speculative features made it into the spec
235
+ - 2-3 approaches were presented with honest tradeoffs before a decision was made
236
+ - Questions were asked one at a time with multiple-choice options where possible
237
+ - `harness validate` passes after the spec is written
238
+ - If scope was too large, it was decomposed into sub-projects with the human's approval
239
+
240
+ ## Examples
241
+
242
+ ### Example: Designing a Notification System
243
+
244
+ **EXPLORE:**
245
+
246
+ ```
247
+ Read AGENTS.md — project is a TypeScript monorepo with React frontend and Express backend.
248
+ Read existing docs/ — no prior notification specs. Found docs/changes/user-auth/proposal.md as naming example.
249
+ Checked src/services/ — no notification code exists. Found email utility in src/utils/email.ts.
250
+ Scope assessment: single subsystem (notifications), estimated 1 week. Proceed.
251
+ ```
252
+
253
+ **EVALUATE:**
254
+
255
+ ```
256
+ Q1: "For notifications, should we support:
257
+ (A) Email only (simplest, covers 90% of use cases)
258
+ (B) Email + in-app (covers real-time needs)
259
+ (C) Email + in-app + push (full coverage, most complex)?"
260
+ Human: "B — email and in-app."
261
+
262
+ Q2: "For in-app notifications, should we:
263
+ (A) Poll from client every 30s (simple, slight delay)
264
+ (B) WebSocket push (real-time, more infrastructure)?"
265
+ Human: "A — polling is fine for now."
266
+
267
+ Q3: "Should notifications be stored permanently or expire after 30 days?"
268
+ Human: "Expire after 30 days."
269
+ ```
270
+
271
+ **PRIORITIZE:**
272
+
273
+ ```
274
+ Approach 1: Event-driven with queue
275
+ - Services emit events, notification worker consumes and dispatches
276
+ - Tradeoff: More infrastructure (needs queue), but decoupled and scalable
277
+ - Complexity: Medium
278
+ - Risk: Queue adds operational overhead
279
+
280
+ Approach 2: Direct service calls
281
+ - Services call NotificationService directly
282
+ - Tradeoff: Simpler, but couples services to notification logic
283
+ - Complexity: Low
284
+ - Risk: Harder to add channels later, synchronous blocking
285
+
286
+ Recommendation: Approach 2. YAGNI — direct calls are sufficient for email + polling.
287
+ We can migrate to event-driven later if we add push notifications.
288
+ Human: "Agreed, approach 2."
289
+ ```
290
+
291
+ **VALIDATE:**
292
+
293
+ ```
294
+ Wrote docs/changes/notification-system/proposal.md
295
+ Sections: Overview, Decisions, Technical Design, Success Criteria, Implementation Order
296
+ harness validate — passes
297
+ "Spec written to docs/changes/notification-system/proposal.md. Ready for sign-off?"
298
+ Human: "Approved."
299
+ ```
300
+
301
+ ## Gates
302
+
303
+ These are hard stops. Violating any gate means the process has broken down.
304
+
305
+ - **No implementation before approval.** No production code, no test code, no scaffolding, no "let me just set up the directory structure." The spec must be approved first. If you wrote code, delete it.
306
+ - **No skipping the question phase.** You must ask at least one clarifying question before proposing approaches. If you think you already know the answer, you are making assumptions — validate them.
307
+ - **No single-approach proposals.** Always present at least 2 approaches with tradeoffs. A single approach is a recommendation disguised as a decision — the human has no real choice.
308
+ - **No speculative features.** Every capability in the spec must trace to a stated requirement. "We might need this later" is not a requirement. Cut it.
309
+ - **No section-dump specs.** Present the design section by section with feedback between each. Do not write the entire spec and ask "looks good?"
310
+
311
+ ## Escalation
312
+
313
+ - **When the human cannot decide between approaches:** Identify the key differentiator. Ask: "The main difference is X. Given your priorities, does X matter more than Y?" If still stuck, suggest building a small spike to compare (but the spike is NOT production code).
314
+ - **When scope keeps growing during brainstorming:** Stop brainstorming. Explicitly say: "The scope has expanded beyond the original problem. Should we (A) decompose into sub-projects, or (B) revisit the original goal to narrow it?" Do not continue accumulating scope.
315
+ - **When the problem domain is unfamiliar:** State what you do not know. Ask the human if they have domain expertise, documentation, or a reference implementation. Do not guess at domain-specific requirements.
316
+ - **When requirements conflict with existing architecture:** Flag the conflict explicitly: "The spec calls for X, but the current architecture assumes Y. Should we (A) change the spec to work within current architecture, or (B) plan an architecture change as a prerequisite?"
317
+ - **When you have asked more than 10 questions without converging:** The problem is too large or too ambiguous. Stop and propose a decomposition or a scoping exercise before continuing.
@@ -0,0 +1,49 @@
1
+ name: harness-brainstorming
2
+ version: "1.0.0"
3
+ description: Structured ideation and exploration with harness methodology
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
+ - emit_interaction
19
+ cli:
20
+ command: harness skill run harness-brainstorming
21
+ args:
22
+ - name: path
23
+ description: Project root path
24
+ required: false
25
+ mcp:
26
+ tool: run_skill
27
+ input:
28
+ skill: harness-brainstorming
29
+ path: string
30
+ type: rigid
31
+ phases:
32
+ - name: explore
33
+ description: Generate ideas and possibilities
34
+ required: true
35
+ - name: evaluate
36
+ description: Assess ideas against constraints
37
+ required: true
38
+ - name: prioritize
39
+ description: Select and sequence top ideas
40
+ required: true
41
+ - name: validate
42
+ description: Run harness checks on selected approach
43
+ required: true
44
+ state:
45
+ persistent: false
46
+ files: []
47
+ depends_on:
48
+ - harness-planning
49
+ - harness-soundness-review