@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.
- package/dist/bin/harness.js +1 -1
- package/dist/{chunk-IXT3KLVN.js → chunk-5RQKSZLA.js} +4 -3
- package/dist/index.js +1 -1
- package/package.json +6 -4
- package/dist/agents/commands/claude-code/harness/add-component.md +0 -34
- package/dist/agents/commands/claude-code/harness/align-documentation.md +0 -33
- package/dist/agents/commands/claude-code/harness/architecture-advisor.md +0 -41
- package/dist/agents/commands/claude-code/harness/brainstorming.md +0 -42
- package/dist/agents/commands/claude-code/harness/check-mechanical-constraints.md +0 -32
- package/dist/agents/commands/claude-code/harness/cleanup-dead-code.md +0 -33
- package/dist/agents/commands/claude-code/harness/code-review.md +0 -33
- package/dist/agents/commands/claude-code/harness/debugging.md +0 -43
- package/dist/agents/commands/claude-code/harness/detect-doc-drift.md +0 -32
- package/dist/agents/commands/claude-code/harness/diagnostics.md +0 -43
- package/dist/agents/commands/claude-code/harness/enforce-architecture.md +0 -32
- package/dist/agents/commands/claude-code/harness/execution.md +0 -43
- package/dist/agents/commands/claude-code/harness/git-workflow.md +0 -32
- package/dist/agents/commands/claude-code/harness/initialize-project.md +0 -33
- package/dist/agents/commands/claude-code/harness/onboarding.md +0 -32
- package/dist/agents/commands/claude-code/harness/parallel-agents.md +0 -35
- package/dist/agents/commands/claude-code/harness/planning.md +0 -41
- package/dist/agents/commands/claude-code/harness/pre-commit-review.md +0 -38
- package/dist/agents/commands/claude-code/harness/refactoring.md +0 -35
- package/dist/agents/commands/claude-code/harness/skill-authoring.md +0 -35
- package/dist/agents/commands/claude-code/harness/state-management.md +0 -35
- package/dist/agents/commands/claude-code/harness/tdd.md +0 -42
- package/dist/agents/commands/claude-code/harness/validate-context-engineering.md +0 -32
- package/dist/agents/commands/claude-code/harness/verification.md +0 -38
- package/dist/agents/commands/gemini-cli/harness/add-component.toml +0 -240
- package/dist/agents/commands/gemini-cli/harness/align-documentation.toml +0 -238
- package/dist/agents/commands/gemini-cli/harness/architecture-advisor.toml +0 -469
- package/dist/agents/commands/gemini-cli/harness/brainstorming.toml +0 -326
- package/dist/agents/commands/gemini-cli/harness/check-mechanical-constraints.toml +0 -249
- package/dist/agents/commands/gemini-cli/harness/cleanup-dead-code.toml +0 -258
- package/dist/agents/commands/gemini-cli/harness/code-review.toml +0 -461
- package/dist/agents/commands/gemini-cli/harness/debugging.toml +0 -436
- package/dist/agents/commands/gemini-cli/harness/detect-doc-drift.toml +0 -215
- package/dist/agents/commands/gemini-cli/harness/diagnostics.toml +0 -401
- package/dist/agents/commands/gemini-cli/harness/enforce-architecture.toml +0 -222
- package/dist/agents/commands/gemini-cli/harness/execution.toml +0 -381
- package/dist/agents/commands/gemini-cli/harness/git-workflow.toml +0 -325
- package/dist/agents/commands/gemini-cli/harness/initialize-project.toml +0 -257
- package/dist/agents/commands/gemini-cli/harness/onboarding.toml +0 -316
- package/dist/agents/commands/gemini-cli/harness/parallel-agents.toml +0 -221
- package/dist/agents/commands/gemini-cli/harness/planning.toml +0 -405
- package/dist/agents/commands/gemini-cli/harness/pre-commit-review.toml +0 -294
- package/dist/agents/commands/gemini-cli/harness/refactoring.toml +0 -209
- package/dist/agents/commands/gemini-cli/harness/skill-authoring.toml +0 -350
- package/dist/agents/commands/gemini-cli/harness/state-management.toml +0 -354
- package/dist/agents/commands/gemini-cli/harness/tdd.toml +0 -247
- package/dist/agents/commands/gemini-cli/harness/validate-context-engineering.toml +0 -186
- package/dist/agents/commands/gemini-cli/harness/verification.toml +0 -334
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
# Generated by harness generate-slash-commands. Do not edit.
|
|
2
|
-
description = "Auto-fix documentation drift issues"
|
|
3
|
-
prompt = """
|
|
4
|
-
<context>
|
|
5
|
-
Cognitive mode: meticulous-verifier
|
|
6
|
-
Type: flexible
|
|
7
|
-
</context>
|
|
8
|
-
|
|
9
|
-
<objective>
|
|
10
|
-
Auto-fix documentation drift issues
|
|
11
|
-
</objective>
|
|
12
|
-
|
|
13
|
-
<execution_context>
|
|
14
|
-
--- SKILL.md (agents/skills/claude-code/align-documentation/SKILL.md) ---
|
|
15
|
-
# Align Documentation
|
|
16
|
-
|
|
17
|
-
> Sync documentation with code after implementation changes. Keep AGENTS.md, API docs, and architecture docs accurate by mapping code changes to their documentation impact.
|
|
18
|
-
|
|
19
|
-
## When to Use
|
|
20
|
-
|
|
21
|
-
- After completing a feature implementation (post-merge or post-commit)
|
|
22
|
-
- After fixing a bug that changes observable behavior
|
|
23
|
-
- After a refactoring that renames, moves, or restructures code
|
|
24
|
-
- When detect-doc-drift reports findings that need fixing
|
|
25
|
-
- When `on_post_feature` or `on_post_merge` triggers fire
|
|
26
|
-
- NOT during active development — wait until the code is stable
|
|
27
|
-
- NOT for creating documentation for a brand-new project (use validate-context-engineering for initial setup)
|
|
28
|
-
- NOT for fixing code — this skill only changes documentation
|
|
29
|
-
|
|
30
|
-
## Process
|
|
31
|
-
|
|
32
|
-
### Phase 1: Detect — Identify What Changed
|
|
33
|
-
|
|
34
|
-
1. **Run `git diff` against the appropriate baseline.** Choose the baseline based on context:
|
|
35
|
-
- After a feature: diff against the branch point (`git diff main...HEAD`)
|
|
36
|
-
- After a bug fix: diff against the commit before the fix
|
|
37
|
-
- After a refactoring: diff against the commit before refactoring started
|
|
38
|
-
- Periodic sync: diff against the last documentation sync commit
|
|
39
|
-
|
|
40
|
-
2. **Extract the list of changed files.** For each changed file, note:
|
|
41
|
-
- File path (current and previous if renamed/moved)
|
|
42
|
-
- Nature of change (added, modified, deleted, renamed)
|
|
43
|
-
- Changed exports (new, removed, renamed, signature changed)
|
|
44
|
-
- Changed behavior (different return values, new error types, new side effects)
|
|
45
|
-
|
|
46
|
-
3. **Run `harness check-docs`** to identify any documentation that already has broken references due to the changes.
|
|
47
|
-
|
|
48
|
-
### Phase 2: Map — Connect Code Changes to Documentation
|
|
49
|
-
|
|
50
|
-
For each changed file, identify all documentation that references it:
|
|
51
|
-
|
|
52
|
-
**AGENTS.md sections:**
|
|
53
|
-
|
|
54
|
-
- Knowledge map entries that reference the file path
|
|
55
|
-
- Architecture descriptions that mention the module
|
|
56
|
-
- Constraint documentation that references the file's layer or patterns
|
|
57
|
-
- Onboarding guides that walk through the file
|
|
58
|
-
|
|
59
|
-
**API documentation:**
|
|
60
|
-
|
|
61
|
-
- JSDoc/TSDoc comments in the changed files themselves
|
|
62
|
-
- Generated API doc pages that pull from the changed files
|
|
63
|
-
- README examples that demonstrate the changed functions
|
|
64
|
-
- Tutorial or guide pages that use the changed code
|
|
65
|
-
|
|
66
|
-
**Architecture documentation:**
|
|
67
|
-
|
|
68
|
-
- Diagrams that include the changed module
|
|
69
|
-
- Data flow descriptions that reference the changed functions
|
|
70
|
-
- Layer descriptions that list the changed file
|
|
71
|
-
- Dependency documentation that references the changed imports
|
|
72
|
-
|
|
73
|
-
**Inline code comments:**
|
|
74
|
-
|
|
75
|
-
- Comments in OTHER files that reference the changed file or function
|
|
76
|
-
- TODO comments that reference the changed behavior
|
|
77
|
-
- Workaround comments that may no longer apply after the change
|
|
78
|
-
|
|
79
|
-
### Phase 3: Generate — Draft Documentation Updates
|
|
80
|
-
|
|
81
|
-
For each affected documentation location:
|
|
82
|
-
|
|
83
|
-
1. **Draft the specific text change.** Show the old text and the new text. Keep the existing style and tone — documentation updates should be invisible in terms of voice.
|
|
84
|
-
|
|
85
|
-
2. **Preserve context.** When updating a section, do not just change the specific reference — read the surrounding paragraph and ensure it still makes sense. A renamed function may require updating the explanatory text around it, not just the function name.
|
|
86
|
-
|
|
87
|
-
3. **Handle deletions carefully.** When code is deleted, do not just delete the documentation reference. Consider whether the section should be removed entirely, replaced with information about the replacement, or noted as deprecated.
|
|
88
|
-
|
|
89
|
-
4. **Add new sections when needed.** If a new module was added, draft a complete documentation section following the existing AGENTS.md structure and style.
|
|
90
|
-
|
|
91
|
-
### Phase 4: Validate — Verify Documentation Accuracy
|
|
92
|
-
|
|
93
|
-
1. **Run `harness check-docs`** to verify all links and references resolve correctly after the updates.
|
|
94
|
-
|
|
95
|
-
2. **Cross-check each update against the actual code.** Read the updated documentation and verify every claim by looking at the code. Documentation that is wrong is worse than documentation that is missing.
|
|
96
|
-
|
|
97
|
-
3. **Verify no orphaned references remain.** Search documentation files for any remaining references to old names, old paths, or deleted features.
|
|
98
|
-
|
|
99
|
-
4. **Run `harness fix-drift`** to catch any remaining simple drift issues that manual review missed.
|
|
100
|
-
|
|
101
|
-
5. **Commit the documentation update.** Use a commit message that references the original change: "docs: update AGENTS.md for notification service refactoring" or "docs: sync API docs after auth module rename."
|
|
102
|
-
|
|
103
|
-
## What to Update
|
|
104
|
-
|
|
105
|
-
### AGENTS.md Knowledge Map
|
|
106
|
-
|
|
107
|
-
- File paths and module names (renamed or moved files)
|
|
108
|
-
- Module purpose descriptions (changed responsibilities)
|
|
109
|
-
- Constraint descriptions (new or changed rules)
|
|
110
|
-
- Relationship descriptions (new or changed dependencies)
|
|
111
|
-
- Gotcha sections (resolved gotchas, new gotchas)
|
|
112
|
-
|
|
113
|
-
### Inline Code Comments
|
|
114
|
-
|
|
115
|
-
- Function/class doc comments in the changed files (JSDoc, TSDoc)
|
|
116
|
-
- Comments in other files that reference the changed code
|
|
117
|
-
- TODO comments that reference completed or changed work
|
|
118
|
-
- Workaround comments for issues that may now be resolved
|
|
119
|
-
|
|
120
|
-
### Documentation Pages (docs/)
|
|
121
|
-
|
|
122
|
-
- API reference pages that describe changed functions
|
|
123
|
-
- Architecture pages that diagram changed modules
|
|
124
|
-
- Tutorial and guide pages that demonstrate changed code
|
|
125
|
-
- Getting-started guides if entry points changed
|
|
126
|
-
- Changelog entries for user-facing changes
|
|
127
|
-
|
|
128
|
-
## Harness Integration
|
|
129
|
-
|
|
130
|
-
- **`harness check-docs`** — Run before and after updates. Identifies broken references and validates that all documentation links resolve.
|
|
131
|
-
- **`harness fix-drift`** — Auto-fix simple drift issues (broken file paths, renamed references) after manual review confirms correctness.
|
|
132
|
-
- **`harness fix-drift --json`** — Machine-readable output for tracking what was auto-fixed.
|
|
133
|
-
- **`harness validate`** — Run after documentation changes to verify overall project health is maintained.
|
|
134
|
-
|
|
135
|
-
## Success Criteria
|
|
136
|
-
|
|
137
|
-
- `harness check-docs` passes with zero errors after documentation updates
|
|
138
|
-
- Every code change from the diff has been mapped to its documentation impact
|
|
139
|
-
- All file paths in documentation match current file locations
|
|
140
|
-
- All function/class names in documentation match current code
|
|
141
|
-
- All behavioral descriptions in documentation match current implementation
|
|
142
|
-
- Documentation updates are committed with clear references to the triggering code change
|
|
143
|
-
- No orphaned references to old names, paths, or deleted features remain
|
|
144
|
-
|
|
145
|
-
## Examples
|
|
146
|
-
|
|
147
|
-
### Example: Syncing docs after a module rename
|
|
148
|
-
|
|
149
|
-
**Code change:** `src/services/mailer.ts` renamed to `src/services/email-service.ts`. Functions `sendMail()` and `formatMailBody()` renamed to `sendEmail()` and `formatEmailBody()`.
|
|
150
|
-
|
|
151
|
-
**Documentation impact map:**
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
AGENTS.md:34 — "mailer.ts handles email delivery" → update path and description
|
|
155
|
-
AGENTS.md:78 — "Use sendMail() for all outbound email" → update function name
|
|
156
|
-
docs/api.md:156 — sendMail() API reference → update name and import path
|
|
157
|
-
docs/arch.md:45 — architecture diagram lists "mailer" → update to "email-service"
|
|
158
|
-
src/controllers/user-controller.ts:12 — comment "// delegates to mailer" → update
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
**Updates applied:**
|
|
162
|
-
|
|
163
|
-
- AGENTS.md: updated two sections with new file path and function names
|
|
164
|
-
- docs/api.md: updated function reference and import example
|
|
165
|
-
- docs/arch.md: updated module name in architecture description
|
|
166
|
-
- src/controllers/user-controller.ts: updated inline comment
|
|
167
|
-
|
|
168
|
-
**Validation:** `harness check-docs` passes. All references resolve. Commit: "docs: sync documentation after mailer rename to email-service"
|
|
169
|
-
|
|
170
|
-
### Example: Syncing docs after adding error handling
|
|
171
|
-
|
|
172
|
-
**Code change:** `createUser()` in `src/services/user-service.ts` now throws `ValidationError` instead of returning `null` on invalid input.
|
|
173
|
-
|
|
174
|
-
**Documentation impact map:**
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
docs/api.md:89 — "Returns null if validation fails" → update to describe thrown error
|
|
178
|
-
AGENTS.md:52 — No mention of error handling → add note about ValidationError
|
|
179
|
-
src/services/user-service.ts:15 — JSDoc @returns tag → update, add @throws tag
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
**Updates applied:**
|
|
183
|
-
|
|
184
|
-
- docs/api.md: replaced "returns null" with "throws ValidationError" and added example
|
|
185
|
-
- AGENTS.md: added note about error handling pattern in user-service section
|
|
186
|
-
- JSDoc: updated @returns, added @throws ValidationError
|
|
187
|
-
|
|
188
|
-
**Validation:** `harness check-docs` passes. Commit: "docs: update documentation for createUser error handling change"
|
|
189
|
-
|
|
190
|
-
## Escalation
|
|
191
|
-
|
|
192
|
-
- **When you cannot determine what documentation is affected:** Run `harness check-docs` for automated detection. For manual analysis, search all `.md` files and code comments for the old name/path. If the change is large, use detect-doc-drift first to get a complete inventory.
|
|
193
|
-
- **When documentation is in an external system (wiki, Confluence):** Document the needed change and flag it for manual update. Include the specific text that needs changing and the correct replacement.
|
|
194
|
-
- **When the code change is so large that documentation needs a rewrite:** Break the documentation update into sections. Update one section at a time, validating after each. Do not attempt a full rewrite in one pass.
|
|
195
|
-
- **When you disagree with the existing documentation style:** Follow the existing style. Documentation alignment is about accuracy, not style improvement. Style changes should be a separate, deliberate effort.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
--- skill.yaml (agents/skills/claude-code/align-documentation/skill.yaml) ---
|
|
199
|
-
name: align-documentation
|
|
200
|
-
version: "1.0.0"
|
|
201
|
-
description: Auto-fix documentation drift issues
|
|
202
|
-
cognitive_mode: meticulous-verifier
|
|
203
|
-
triggers:
|
|
204
|
-
- manual
|
|
205
|
-
platforms:
|
|
206
|
-
- claude-code
|
|
207
|
-
- gemini-cli
|
|
208
|
-
tools:
|
|
209
|
-
- Bash
|
|
210
|
-
- Read
|
|
211
|
-
- Write
|
|
212
|
-
- Edit
|
|
213
|
-
cli:
|
|
214
|
-
command: harness skill run align-documentation
|
|
215
|
-
args:
|
|
216
|
-
- name: path
|
|
217
|
-
description: Project root path
|
|
218
|
-
required: false
|
|
219
|
-
mcp:
|
|
220
|
-
tool: run_skill
|
|
221
|
-
input:
|
|
222
|
-
skill: align-documentation
|
|
223
|
-
path: string
|
|
224
|
-
type: flexible
|
|
225
|
-
state:
|
|
226
|
-
persistent: false
|
|
227
|
-
files: []
|
|
228
|
-
depends_on:
|
|
229
|
-
- detect-doc-drift
|
|
230
|
-
|
|
231
|
-
</execution_context>
|
|
232
|
-
|
|
233
|
-
<process>
|
|
234
|
-
1. Try: invoke mcp__harness__run_skill with skill: "align-documentation"
|
|
235
|
-
2. If MCP unavailable: follow the SKILL.md workflow provided above directly
|
|
236
|
-
3. Pass through any arguments provided by the user
|
|
237
|
-
</process>
|
|
238
|
-
"""
|