@harness-engineering/cli 1.2.0 → 1.3.0

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-APYEWOCR.js} +355 -19
  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,186 +0,0 @@
1
- # Generated by harness generate-slash-commands. Do not edit.
2
- description = "Validate repository context engineering practices (AGENTS.md, doc coverage, knowledge map)"
3
- prompt = """
4
- <context>
5
- Cognitive mode: meticulous-verifier
6
- Type: flexible
7
- </context>
8
-
9
- <objective>
10
- Validate repository context engineering practices (AGENTS.md, doc coverage, knowledge map)
11
- </objective>
12
-
13
- <execution_context>
14
- --- SKILL.md (agents/skills/claude-code/validate-context-engineering/SKILL.md) ---
15
- # Validate Context Engineering
16
-
17
- > Validate AGENTS.md quality and evolve it as the codebase changes. Good context engineering means AI agents always have accurate, current knowledge about the project.
18
-
19
- ## When to Use
20
-
21
- - After adding new files, modules, or packages to the project
22
- - After renaming, moving, or deleting significant files
23
- - After changing public APIs, architectural patterns, or conventions
24
- - When onboarding a new contributor (human or AI) and want to verify context is current
25
- - When `on_context_check` or `on_pre_commit` triggers fire
26
- - Periodically (weekly or per-sprint) as a hygiene check
27
- - NOT when making trivial changes (typo fixes, comment updates, formatting)
28
- - NOT during active feature development — run this between features or at cycle boundaries
29
-
30
- ## Process
31
-
32
- ### Phase 1: Audit — Run Automated Checks
33
-
34
- 1. **Run `harness validate`** to check overall project health. Review any context-related warnings or errors in the output.
35
-
36
- 2. **Run `harness check-docs`** to detect documentation gaps, broken links, and stale references. Capture the full output for analysis.
37
-
38
- 3. **Review AGENTS.md manually.** Automated tools catch structural issues but miss semantic drift. Read each section and ask: "Is this still true?"
39
-
40
- ### Phase 2: Detect Gaps
41
-
42
- Categorize findings into four types:
43
-
44
- 1. **Undocumented files.** New source files, modules, or packages that are not mentioned in AGENTS.md or any knowledge map section. These are the highest priority — an AI agent encountering these files has no context.
45
-
46
- 2. **Broken links.** References to files, functions, or URLs that no longer exist. These actively mislead agents.
47
-
48
- 3. **Stale sections.** Content that was accurate when written but no longer reflects reality. Examples: renamed functions still referenced by old name, removed features still described, changed conventions not updated.
49
-
50
- 4. **Missing context.** Sections that exist but lack critical information. A module is listed but its purpose, constraints, or relationships are not explained. An AI agent can find the file but does not understand why it exists or how to use it correctly.
51
-
52
- ### Phase 3: Suggest Updates
53
-
54
- For each gap, generate a specific suggestion:
55
-
56
- - **Undocumented files:** Draft a new section or entry with the file path, purpose, key exports, and relationship to existing modules. Use the existing AGENTS.md style and structure.
57
- - **Broken links:** Identify the correct target (renamed file, moved function) or recommend removal if the target was deleted.
58
- - **Stale sections:** Draft replacement text that reflects current reality. Show the diff between old and new.
59
- - **Missing context:** Draft additional content that fills the gap. Focus on what an AI agent needs to know: purpose, constraints, relationships, and gotchas.
60
-
61
- ### Phase 4: Apply with Approval
62
-
63
- 1. **Present all suggestions as a grouped list.** Organize by section of AGENTS.md for easy review.
64
-
65
- 2. **Apply approved changes.** Update AGENTS.md with the approved suggestions. Preserve existing formatting and style.
66
-
67
- 3. **Re-run `harness check-docs`** to verify all fixes are clean. No new issues should be introduced.
68
-
69
- 4. **Commit the update.** Use a descriptive commit message that summarizes what was updated and why.
70
-
71
- ## What Makes Good AGENTS.md Content
72
-
73
- Good context engineering treats AGENTS.md as a **dynamic knowledge base**, not a static document.
74
-
75
- - **Accuracy over completeness.** A small, accurate AGENTS.md is better than a comprehensive but stale one. Every statement must be verifiable against the current codebase.
76
- - **Purpose-first descriptions.** Do not just list files. Explain WHY each module exists, what problem it solves, and what constraints apply to it.
77
- - **Relationship mapping.** Show how modules connect. Which modules depend on which? What are the boundaries? An agent reading one section should understand how it fits into the whole.
78
- - **Gotchas and constraints.** Document the non-obvious. What will break if someone does X? What patterns must be followed? What is forbidden and why?
79
- - **Change-friendly structure.** Organize so that adding a new module means adding one section, not updating ten places. Use consistent formatting so automated tools can parse it.
80
- - **Actionable guidance.** Every section should help an agent make correct decisions. "This module handles authentication" is less useful than "This module handles authentication. All auth changes must go through the AuthService class. Direct database access for auth data is forbidden — use the repository layer."
81
-
82
- ## Harness Integration
83
-
84
- - **`harness validate`** — Full project health check. Reports context gaps as part of overall validation.
85
- - **`harness check-docs`** — Focused documentation audit. Detects broken links, missing references, stale sections, and undocumented files.
86
- - **`harness fix-drift`** — Auto-fix simple drift issues (broken links, renamed references). Use after manual review confirms the fixes are correct.
87
-
88
- ## Success Criteria
89
-
90
- - `harness check-docs` passes with zero errors and zero warnings
91
- - Every source file that contains public API or architectural significance is referenced in AGENTS.md
92
- - All file paths and function names in AGENTS.md match the current codebase
93
- - All links (internal and external) resolve correctly
94
- - AGENTS.md sections accurately describe current module purposes, constraints, and relationships
95
- - A new AI agent reading AGENTS.md can navigate the codebase and make correct decisions without additional guidance
96
-
97
- ## Examples
98
-
99
- ### Example: New module added but not documented
100
-
101
- **Audit output from `harness check-docs`:**
102
-
103
- ```
104
- WARNING: Undocumented file detected: src/services/notification-service.ts
105
- - File contains 3 public exports: NotificationService, NotificationType, sendNotification
106
- - File is imported by 4 other modules
107
- - No AGENTS.md section references this file
108
- ```
109
-
110
- **Suggested update:**
111
-
112
- ```markdown
113
- ### Notification Service (`src/services/notification-service.ts`)
114
-
115
- Handles all outbound notifications (email, Slack, webhook). All notification delivery
116
- must go through `NotificationService` — direct use of transport libraries (nodemailer,
117
- Slack SDK) outside this module is forbidden.
118
-
119
- - `NotificationType` — enum of supported notification channels
120
- - `sendNotification()` — primary entry point; routes to the correct transport
121
- - Requires `NOTIFICATION_CONFIG` environment variables to be set
122
- - Respects rate limits defined in `harness.config.json` under `notifications`
123
- ```
124
-
125
- **Apply:** Add the section under the Services heading in AGENTS.md. Re-run `harness check-docs` to confirm the warning is resolved.
126
-
127
- ### Example: Renamed function still referenced by old name
128
-
129
- **Audit output:**
130
-
131
- ```
132
- ERROR: Broken reference in AGENTS.md line 47: `calculateShipping()`
133
- - Function was renamed to `computeShippingCost()` in commit abc123
134
- - Located in src/services/shipping.ts
135
- ```
136
-
137
- **Fix:** Replace `calculateShipping()` with `computeShippingCost()` in AGENTS.md. Verify no other references to the old name exist.
138
-
139
- ## Escalation
140
-
141
- - **When AGENTS.md is severely outdated (>20 issues):** Do not attempt to fix everything at once. Prioritize: broken links first, then undocumented public APIs, then stale descriptions. Batch the work across multiple commits.
142
- - **When you are unsure whether a section is stale:** Check git blame for the section and compare against recent changes to the referenced files. If the section has not been updated since the referenced files changed, it is likely stale.
143
- - **When the project has no AGENTS.md:** Escalate to the human. Creating an AGENTS.md from scratch is a significant decision about project structure and should be done intentionally, not automatically.
144
-
145
-
146
- --- skill.yaml (agents/skills/claude-code/validate-context-engineering/skill.yaml) ---
147
- name: validate-context-engineering
148
- version: "1.0.0"
149
- description: Validate repository context engineering practices (AGENTS.md, doc coverage, knowledge map)
150
- cognitive_mode: meticulous-verifier
151
- triggers:
152
- - manual
153
- - on_pr
154
- - on_commit
155
- platforms:
156
- - claude-code
157
- - gemini-cli
158
- tools:
159
- - Bash
160
- - Read
161
- - Glob
162
- cli:
163
- command: harness skill run validate-context-engineering
164
- args:
165
- - name: path
166
- description: Project root path
167
- required: false
168
- mcp:
169
- tool: run_skill
170
- input:
171
- skill: validate-context-engineering
172
- path: string
173
- type: flexible
174
- state:
175
- persistent: false
176
- files: []
177
- depends_on: []
178
-
179
- </execution_context>
180
-
181
- <process>
182
- 1. Try: invoke mcp__harness__run_skill with skill: "validate-context-engineering"
183
- 2. If MCP unavailable: follow the SKILL.md workflow provided above directly
184
- 3. Pass through any arguments provided by the user
185
- </process>
186
- """
@@ -1,334 +0,0 @@
1
- # Generated by harness generate-slash-commands. Do not edit.
2
- description = "Comprehensive harness verification of project health and compliance"
3
- prompt = """
4
- <context>
5
- Cognitive mode: meticulous-verifier
6
- Type: rigid
7
- </context>
8
-
9
- <objective>
10
- Comprehensive harness verification of project health and compliance
11
-
12
- Phases:
13
- - check: Run all harness validation commands
14
- - report: Summarize findings and violations
15
- - remediate: Fix any critical violations
16
- </objective>
17
-
18
- <execution_context>
19
- --- SKILL.md (agents/skills/claude-code/harness-verification/SKILL.md) ---
20
- # Harness Verification
21
-
22
- > 3-level evidence-based verification. No completion claims without fresh evidence. "Should work" is not evidence.
23
-
24
- ## When to Use
25
-
26
- - After completing any implementation task (before claiming "done")
27
- - After executing a plan or spec (verify all deliverables)
28
- - When validating work done by another agent or in a previous session
29
- - When resuming work after a context reset (re-verify before continuing)
30
- - When `on_commit` or `on_pr` triggers fire and verification is needed
31
- - NOT as a replacement for tests (verification checks that tests exist and pass, not that logic is correct)
32
- - NOT for in-progress work (verify at completion boundaries, not mid-stream)
33
-
34
- ### Verification Tiers
35
-
36
- Harness uses a two-tier verification model:
37
-
38
- | Tier | Skill | When | What |
39
- | -------------- | --------------------------------- | -------------------------- | -------------------------------------------------- |
40
- | **Quick gate** | harness-execution (built-in) | After every task | test + lint + typecheck + build + harness validate |
41
- | **Deep audit** | harness-verification (this skill) | Milestones, PRs, on-demand | EXISTS → SUBSTANTIVE → WIRED |
42
-
43
- Use this skill (deep audit) for milestone boundaries, before creating PRs, or when the quick gate passes but something feels wrong. Do NOT invoke this skill after every individual task — that is what the quick gate handles.
44
-
45
- ## Process
46
-
47
- ### Iron Law
48
-
49
- **No completion claim may be made without fresh verification evidence collected in THIS session.**
50
-
51
- Cached results, remembered outcomes, and "it worked last time" are not evidence. Run the checks. Read the output. Report what you observed.
52
-
53
- The words "should", "probably", "seems to", and "I believe" are forbidden in verification reports. Replace with "verified: [evidence]" or "not verified: [what is missing]."
54
-
55
- ---
56
-
57
- ### Level 1: EXISTS — The Artifact Is Present
58
-
59
- For every artifact that was supposed to be created or modified:
60
-
61
- 1. **Check that the file exists on disk.** Use `ls`, `stat`, or read the file. Do not assume it exists because you wrote it — file writes can fail silently.
62
-
63
- 2. **Check that the file has content.** An empty file is not an artifact. Read the file and confirm it has non-trivial content.
64
-
65
- 3. **Check the file is in the right location.** Compare the actual path against the spec or plan. A file in the wrong directory is not "present."
66
-
67
- 4. **Record the result.** For each expected artifact:
68
- ```
69
- [EXISTS: PASS] path/to/file.ts (247 lines)
70
- [EXISTS: FAIL] path/to/missing-file.ts — file not found
71
- ```
72
-
73
- Do not proceed to Level 2 until all Level 1 checks pass. Missing files must be created first.
74
-
75
- ---
76
-
77
- ### Level 2: SUBSTANTIVE — Not a Stub
78
-
79
- For every artifact that passed Level 1:
80
-
81
- 1. **Read the file content.** Do not skim — read it thoroughly.
82
-
83
- 2. **Scan for anti-patterns** that indicate stub or placeholder implementations:
84
- - `TODO` or `FIXME` comments (especially `TODO: implement`)
85
- - `throw new Error('not implemented')`
86
- - `() => {}` (empty arrow functions)
87
- - `return null`, `return undefined`, `return {}` as the only logic
88
- - `pass` (Python placeholder)
89
- - `placeholder`, `stub`, `mock` in non-test code
90
- - Functions with only a comment describing what they should do
91
- - Interfaces or types defined but never implemented
92
-
93
- 3. **Verify real implementation exists.** The file must contain actual logic that performs the described behavior. A function that only returns a hardcoded value is a stub unless that is the correct behavior.
94
-
95
- 4. **Check for completeness against the spec.** If the spec says "handles errors X, Y, Z," verify all three are handled, not just X.
96
-
97
- 5. **Record the result.** For each artifact:
98
- ```
99
- [SUBSTANTIVE: PASS] path/to/file.ts — real implementation, no stubs
100
- [SUBSTANTIVE: FAIL] path/to/file.ts — contains TODO on line 34, empty handler on line 67
101
- ```
102
-
103
- Do not proceed to Level 3 until all Level 2 checks pass. Stubs must be replaced with real implementations first.
104
-
105
- ---
106
-
107
- ### Level 3: WIRED — Connected to the System
108
-
109
- For every artifact that passed Level 2:
110
-
111
- 1. **Verify the artifact is imported/required** by at least one other file in the system (unless it is an entry point).
112
-
113
- 2. **Verify the artifact is called/used.** An import that is never called is dead code. Trace the usage:
114
- - Functions: called from at least one other function or test
115
- - Components: rendered in at least one parent or route
116
- - Types: used in at least one function signature or variable declaration
117
- - Configuration: loaded and applied by the system
118
- - Tests: executed by the test runner
119
-
120
- 3. **Verify the artifact is tested.** There must be at least one test that exercises the artifact's behavior. Check:
121
- - Test file exists
122
- - Test imports or references the artifact
123
- - Test makes assertions about the artifact's behavior
124
- - Test actually runs (not skipped with `.skip` or `xit`)
125
-
126
- 4. **Run the tests.** Execute the test suite and verify tests pass. Do not trust "they passed earlier" — run them now.
127
-
128
- 5. **Run harness checks.** Execute `harness validate` and verify the artifact integrates correctly with the project's constraints.
129
-
130
- 6. **Record the result.** For each artifact:
131
- ```
132
- [WIRED: PASS] path/to/file.ts — imported by 3 files, tested in file.test.ts (4 tests, all pass)
133
- [WIRED: FAIL] path/to/file.ts — exported but not imported by any other file
134
- ```
135
-
136
- ---
137
-
138
- ### Anti-Pattern Scan
139
-
140
- Run this scan across all changed files as a final check:
141
-
142
- ```
143
- Scan targets: TODO, FIXME, XXX, HACK, PLACEHOLDER, NOT_IMPLEMENTED
144
- Code patterns: () => {}, return null (as sole body), pass, raise NotImplementedError
145
- Test patterns: .skip, xit, xdescribe, @pytest.mark.skip, pending
146
- ```
147
-
148
- Any match is a verification failure. Either fix it or explicitly document why it is acceptable (e.g., "TODO is tracked in issue #123 and out of scope for this task").
149
-
150
- ---
151
-
152
- ### Gap Identification
153
-
154
- After running all three levels, produce a structured gap report:
155
-
156
- ```
157
- ## Verification Report
158
-
159
- ### Level 1: EXISTS
160
- - [PASS] path/to/file-a.ts (120 lines)
161
- - [PASS] path/to/file-b.ts (85 lines)
162
- - [FAIL] path/to/file-c.ts — not found
163
-
164
- ### Level 2: SUBSTANTIVE
165
- - [PASS] path/to/file-a.ts — real implementation
166
- - [FAIL] path/to/file-b.ts — TODO on line 22
167
-
168
- ### Level 3: WIRED
169
- - [PASS] path/to/file-a.ts — imported, tested, harness passes
170
- - [NOT CHECKED] path/to/file-b.ts — blocked by Level 2 failure
171
-
172
- ### Anti-Pattern Scan
173
- - path/to/file-b.ts:22 — TODO: implement validation
174
-
175
- ### Gaps
176
- 1. path/to/file-c.ts must be created
177
- 2. path/to/file-b.ts:22 must be implemented (not stub)
178
-
179
- ### Verdict: INCOMPLETE — 2 gaps must be resolved
180
- ```
181
-
182
- ---
183
-
184
- ### Regression Test Verification
185
-
186
- When verifying a bug fix, apply this extended protocol:
187
-
188
- 1. **Write** the regression test that reproduces the bug
189
- 2. **Run** the test — it must PASS (proving the fix works)
190
- 3. **Revert** the fix (temporarily): `git stash` or comment out the fix
191
- 4. **Run** the test — it must FAIL (proving the test actually catches the bug)
192
- 5. **Restore** the fix: `git stash pop` or uncomment
193
- 6. **Run** the test — it must PASS again (proving the fix is the reason)
194
-
195
- If step 4 passes (test does not fail without the fix), the test is not a valid regression test. It does not catch the bug. Rewrite it.
196
-
197
- ## Harness Integration
198
-
199
- - **`harness validate`** — Run in Level 3 WIRED check. Verifies project-wide health and constraint compliance.
200
- - **`harness check-deps`** — Run in Level 3 to verify new artifacts respect dependency boundaries.
201
- - **`harness check-docs`** — Run to verify documentation is updated for new artifacts. Missing docs for new public APIs is a gap.
202
- - **Test runner** — Must be run fresh (not cached) during Level 3. Read actual output, check exit codes.
203
-
204
- All commands must be run fresh in the current session. Do not rely on results from a previous session or a previous run in the same session if code has changed since.
205
-
206
- ## Success Criteria
207
-
208
- - Every claimed deliverable has been verified at all 3 levels
209
- - No anti-patterns remain in delivered code
210
- - Verification report uses the structured format with PASS/FAIL per artifact per level
211
- - All verification evidence was collected fresh in the current session
212
- - No forbidden language ("should", "probably", "seems to") appears in the report
213
- - All gaps are explicitly identified with specific remediation steps
214
- - Regression tests (for bug fixes) pass the 5-step revert check
215
-
216
- ## Non-Determinism Tolerance
217
-
218
- For mechanical checks (tests pass, lint clean, types check), results are binary — pass or fail. No tolerance.
219
-
220
- For behavioral verification (did the agent follow a convention, did the output match a style guide), accept threshold-based results:
221
-
222
- - Run the check multiple times if needed
223
- - "Agent followed the constraint in 4/5 runs" = pass
224
- - "Agent followed the constraint in 2/5 runs" = fail — the convention is poorly written, not the agent
225
-
226
- If a behavioral convention fails more than 40% of the time, the convention needs rewriting. Blame the instruction, not the executor.
227
-
228
- ## Examples
229
-
230
- ### Example: Verifying a New Service Module
231
-
232
- Task: "Create UserService with create, read, update, delete operations."
233
-
234
- ```
235
- ## Verification Report
236
-
237
- ### Level 1: EXISTS
238
- - [PASS] src/services/user-service.ts (189 lines)
239
- - [PASS] src/services/user-service.test.ts (245 lines)
240
- - [PASS] src/services/index.ts (updated — exports UserService)
241
-
242
- ### Level 2: SUBSTANTIVE
243
- - [PASS] src/services/user-service.ts — all 4 CRUD methods implemented with
244
- validation, error handling, and database calls
245
- - [PASS] src/services/user-service.test.ts — 12 tests covering happy paths,
246
- error cases, and edge cases (no skipped tests)
247
-
248
- ### Level 3: WIRED
249
- - [PASS] src/services/user-service.ts — imported by src/api/routes/users.ts,
250
- tested in user-service.test.ts (12 tests, all pass)
251
- - [PASS] harness validate — passes
252
- - [PASS] harness check-deps — no boundary violations
253
-
254
- ### Anti-Pattern Scan
255
- - No matches found
256
-
257
- ### Gaps
258
- (none)
259
-
260
- ### Verdict: COMPLETE — all artifacts verified at all levels
261
- ```
262
-
263
- ## Gates
264
-
265
- - **No completion without evidence.** You may not say "done," "complete," "finished," or "implemented" without a verification report showing PASS at all 3 levels for all deliverables.
266
- - **No stale evidence.** Evidence must be from the current session. "I checked earlier" is not evidence. Run it again.
267
- - **No forbidden language.** "Should work," "probably fine," "seems correct," and "I believe it works" are not verification statements. Replace with observed evidence or state "not verified."
268
- - **No skipping levels.** Level 1 before Level 2. Level 2 before Level 3. Each level depends on the previous.
269
- - **No satisfaction before evidence.** The natural inclination after writing code is to feel done. Resist it. Feeling done is not being done. Evidence is being done.
270
-
271
- ## Escalation
272
-
273
- - **When an artifact cannot pass Level 3 (WIRED) because the system it connects to does not exist yet:** Document the gap explicitly. State what integration is missing and what must be built. Do not mark it as PASS.
274
- - **When anti-pattern scan finds TODOs that are intentional:** Each must be justified with a tracked issue number. "TODO: implement" with no issue reference is not acceptable. "TODO(#123): add rate limiting after infrastructure is ready" is acceptable.
275
- - **When tests pass but you suspect they are not testing real behavior:** Read the test assertions carefully. If tests only check "does not throw" or assert on mock return values without verifying real behavior, flag them as SUBSTANTIVE failures.
276
- - **When verification reveals the spec itself is incomplete:** Do not fill in the gaps yourself. Escalate to the human: "Verification found that the spec does not define behavior for [scenario]. How should this be handled?"
277
- - **When you cannot run harness checks:** If `harness validate` or `harness check-deps` cannot be run (missing configuration, broken tooling), this is a blocking issue. Do not skip verification — fix the tooling or escalate.
278
-
279
- After verification completes, append a tagged learning:
280
-
281
- - **YYYY-MM-DD [skill:harness-verification] [outcome:pass/fail]:** Verified [feature]. [Brief note on what was found or confirmed.]
282
-
283
-
284
- --- skill.yaml (agents/skills/claude-code/harness-verification/skill.yaml) ---
285
- name: harness-verification
286
- version: "1.0.0"
287
- description: Comprehensive harness verification of project health and compliance
288
- cognitive_mode: meticulous-verifier
289
- triggers:
290
- - manual
291
- - on_pr
292
- - on_commit
293
- platforms:
294
- - claude-code
295
- - gemini-cli
296
- tools:
297
- - Bash
298
- - Read
299
- - Glob
300
- cli:
301
- command: harness skill run harness-verification
302
- args:
303
- - name: path
304
- description: Project root path
305
- required: false
306
- mcp:
307
- tool: run_skill
308
- input:
309
- skill: harness-verification
310
- path: string
311
- type: rigid
312
- phases:
313
- - name: check
314
- description: Run all harness validation commands
315
- required: true
316
- - name: report
317
- description: Summarize findings and violations
318
- required: true
319
- - name: remediate
320
- description: Fix any critical violations
321
- required: true
322
- state:
323
- persistent: false
324
- files: []
325
- depends_on: []
326
-
327
- </execution_context>
328
-
329
- <process>
330
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-verification"
331
- 2. If MCP unavailable: follow the SKILL.md workflow provided above directly
332
- 3. Pass through any arguments provided by the user
333
- </process>
334
- """