@harness-engineering/cli 1.4.0 → 1.6.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.
- package/dist/agents/personas/architecture-enforcer.yaml +1 -0
- package/dist/agents/personas/code-reviewer.yaml +43 -0
- package/dist/agents/personas/codebase-health-analyst.yaml +32 -0
- package/dist/agents/personas/documentation-maintainer.yaml +2 -0
- package/dist/agents/personas/entropy-cleaner.yaml +3 -0
- package/dist/agents/personas/graph-maintainer.yaml +27 -0
- package/dist/agents/personas/parallel-coordinator.yaml +29 -0
- package/dist/agents/personas/performance-guardian.yaml +26 -0
- package/dist/agents/personas/security-reviewer.yaml +35 -0
- package/dist/agents/personas/task-executor.yaml +41 -0
- package/dist/agents/skills/README.md +8 -0
- package/dist/agents/skills/claude-code/add-harness-component/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +8 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +25 -0
- package/dist/agents/skills/claude-code/harness-debugging/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +150 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +41 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +135 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +139 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +20 -6
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +154 -0
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +49 -0
- package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +9 -0
- package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +33 -2
- package/dist/agents/skills/claude-code/harness-refactoring/SKILL.md +19 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +206 -0
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +41 -0
- package/dist/agents/skills/claude-code/harness-state-management/SKILL.md +22 -8
- package/dist/agents/skills/claude-code/harness-tdd/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +131 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/skill.yaml +44 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +10 -0
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +9 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +494 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +150 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +41 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +135 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +44 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +139 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/skill.yaml +44 -0
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +154 -0
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +231 -0
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +236 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +657 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/skill.yaml +57 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +102 -0
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +41 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +131 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/skill.yaml +44 -0
- package/dist/agents/skills/tests/platform-parity.test.ts +131 -0
- package/dist/agents/skills/tests/schema.ts +2 -0
- package/dist/bin/harness.js +2 -2
- package/dist/{chunk-EFZOLZFB.js → chunk-ACMDUQJG.js} +4 -2
- package/dist/{chunk-C3J2HW4Y.js → chunk-O6NEKDYP.js} +2002 -487
- package/dist/{create-skill-4GKJZB5R.js → create-skill-NZDLMMR6.js} +1 -1
- package/dist/index.d.ts +265 -143
- package/dist/index.js +30 -4
- package/package.json +3 -2
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
# Harness Release Readiness
|
|
2
|
+
|
|
3
|
+
> Audit, fix, and track your project's path to a publishable release. No release without a passing report.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Before publishing packages to npm — audit readiness and fix gaps
|
|
8
|
+
- At milestone boundaries — check progress toward release (fires on `on_milestone` trigger)
|
|
9
|
+
- When resuming release prep after a previous session — loads state and shows what changed
|
|
10
|
+
- NOT for actually performing the release (that is CI/CD — Changesets, GitHub Actions, etc.)
|
|
11
|
+
- NOT for non-npm targets (Docker, PyPI, etc.) — this skill is npm-focused
|
|
12
|
+
- NOT when the project has no packages to publish (use harness-verification for general health)
|
|
13
|
+
|
|
14
|
+
## Arguments
|
|
15
|
+
|
|
16
|
+
- **`--comprehensive`** — Run additional checks beyond the standard set: API doc coverage, example project validation, dependency health audit, and git hygiene scan. These checks are slower and may require network access (e.g., `npm audit`). Omit for a fast standard audit.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### Iron Law
|
|
21
|
+
|
|
22
|
+
**No release may be performed without a passing release readiness report.**
|
|
23
|
+
|
|
24
|
+
If the report shows failures, the project is not ready. Fix the failures first. A "mostly passing" report is not a passing report — every failure is a risk that lands on your users.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### Phase 1: AUDIT — Release-Specific Checks
|
|
29
|
+
|
|
30
|
+
#### Session Resumption
|
|
31
|
+
|
|
32
|
+
Before running checks, look for existing state:
|
|
33
|
+
|
|
34
|
+
1. Read `.harness/release-readiness.json`. If it exists, this is a resumption.
|
|
35
|
+
2. Display a delta summary:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Release Readiness — resuming from <timestamp>
|
|
39
|
+
|
|
40
|
+
Since last run:
|
|
41
|
+
✓ N items fixed (<list>)
|
|
42
|
+
→ N items remaining (<list>)
|
|
43
|
+
|
|
44
|
+
Re-running full audit...
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. If no state file exists, this is a fresh run. Proceed directly to checks.
|
|
48
|
+
|
|
49
|
+
#### Monorepo Detection
|
|
50
|
+
|
|
51
|
+
Detect whether the project is a monorepo:
|
|
52
|
+
|
|
53
|
+
1. Check for `packages/*/package.json` or a `workspaces` field in root `package.json`.
|
|
54
|
+
2. If monorepo: collect all non-private packages. Run packaging checks against each independently. Run shared checks (docs, repo hygiene, CI/CD) once at the root.
|
|
55
|
+
3. If single package: run all checks against the root `package.json`.
|
|
56
|
+
|
|
57
|
+
#### Standard Checks (always run)
|
|
58
|
+
|
|
59
|
+
Run every check below. Record each as **pass**, **warn**, or **fail**:
|
|
60
|
+
|
|
61
|
+
- **pass** — check satisfied, no action needed
|
|
62
|
+
- **warn** — not blocking but should be addressed before release (e.g., missing optional field)
|
|
63
|
+
- **fail** — must be fixed before release
|
|
64
|
+
|
|
65
|
+
##### Packaging (per package)
|
|
66
|
+
|
|
67
|
+
| Check | Severity if missing |
|
|
68
|
+
| ------------------------------------------------------------------------------------ | ------------------- |
|
|
69
|
+
| `name` field exists and is scoped (`@org/name`) or valid unscoped name | fail |
|
|
70
|
+
| `version` field exists and is valid semver | fail |
|
|
71
|
+
| `license` field exists | fail |
|
|
72
|
+
| `exports` or `main` field exists (entry point is defined) | fail |
|
|
73
|
+
| `files` field exists (controls what gets published) | fail |
|
|
74
|
+
| `publishConfig` field exists with `access: "public"` (for scoped packages) | warn |
|
|
75
|
+
| `repository` field exists with valid URL | warn |
|
|
76
|
+
| `bugs` field exists | warn |
|
|
77
|
+
| `homepage` field exists | warn |
|
|
78
|
+
| `description` field exists | warn |
|
|
79
|
+
| Build succeeds: run the project's build command | fail |
|
|
80
|
+
| `pnpm pack --dry-run` produces expected files (no test files, no src if dist exists) | warn |
|
|
81
|
+
|
|
82
|
+
##### Documentation (root level)
|
|
83
|
+
|
|
84
|
+
| Check | Severity if missing |
|
|
85
|
+
| ----------------------------------------------------------------------------------------------------------------- | ------------------- |
|
|
86
|
+
| `README.md` exists | fail |
|
|
87
|
+
| README contains an install/quickstart section (search for `install`, `getting started`, `quickstart`, or `npm i`) | warn |
|
|
88
|
+
| README contains a usage or API section | warn |
|
|
89
|
+
| `CHANGELOG.md` exists | fail |
|
|
90
|
+
| CHANGELOG has at least one entry (not empty or template-only) | warn |
|
|
91
|
+
| `LICENSE` file exists | fail |
|
|
92
|
+
|
|
93
|
+
##### Repo Hygiene (root level)
|
|
94
|
+
|
|
95
|
+
| Check | Severity if missing |
|
|
96
|
+
| ------------------------------------------------------------------------------------------- | ------------------- |
|
|
97
|
+
| `CONTRIBUTING.md` exists | warn |
|
|
98
|
+
| `CODE_OF_CONDUCT.md` exists | warn |
|
|
99
|
+
| `SECURITY.md` exists | warn |
|
|
100
|
+
| `.gitignore` exists and covers `node_modules`, `dist`, `.env` | fail |
|
|
101
|
+
| No `TODO` or `FIXME` in published source files (files matching each package's `files` glob) | warn |
|
|
102
|
+
|
|
103
|
+
##### CI/CD (root level)
|
|
104
|
+
|
|
105
|
+
| Check | Severity if missing |
|
|
106
|
+
| --------------------------------------------------------------- | ------------------- |
|
|
107
|
+
| CI workflow file exists (`.github/workflows/ci.yml` or similar) | fail |
|
|
108
|
+
| Release/publish workflow file exists | warn |
|
|
109
|
+
| `test` script exists in root `package.json` | fail |
|
|
110
|
+
| `lint` script exists in root `package.json` | warn |
|
|
111
|
+
| `typecheck` or `tsc` script exists in root `package.json` | warn |
|
|
112
|
+
| `harness validate` passes (project-level health check) | fail |
|
|
113
|
+
|
|
114
|
+
#### Comprehensive Checks (only with `--comprehensive`)
|
|
115
|
+
|
|
116
|
+
These checks run only when `--comprehensive` is passed. They are slower and may require network access.
|
|
117
|
+
|
|
118
|
+
##### API Documentation
|
|
119
|
+
|
|
120
|
+
| Check | Severity if missing |
|
|
121
|
+
| ------------------------------------------------------------- | ------------------- |
|
|
122
|
+
| Exported functions/classes/types have JSDoc or TSDoc comments | warn |
|
|
123
|
+
| Coverage threshold: >80% of exports documented | warn |
|
|
124
|
+
|
|
125
|
+
To check: for each package, read the main entry point (`exports` or `main`), find all `export` statements, and verify each has a preceding doc comment (`/** ... */`).
|
|
126
|
+
|
|
127
|
+
##### Examples
|
|
128
|
+
|
|
129
|
+
| Check | Severity if missing |
|
|
130
|
+
| -------------------------------------------------------------------------------------- | ------------------- |
|
|
131
|
+
| Example projects exist (in `examples/` directory) | warn |
|
|
132
|
+
| Each example's `package.json` references workspace packages at current versions | warn |
|
|
133
|
+
| Each example builds successfully: `cd examples/<name> && npm install && npm run build` | fail |
|
|
134
|
+
|
|
135
|
+
##### Dependency Health
|
|
136
|
+
|
|
137
|
+
| Check | Severity if missing |
|
|
138
|
+
| ---------------------------------------------------------------------- | ------------------- |
|
|
139
|
+
| `npm audit` reports no high or critical vulnerabilities | fail |
|
|
140
|
+
| No deprecated dependencies (check `npm outdated` for deprecated flags) | warn |
|
|
141
|
+
|
|
142
|
+
##### Git Hygiene
|
|
143
|
+
|
|
144
|
+
| Check | Severity if missing |
|
|
145
|
+
| ------------------------------------------------------------------------------------------------------------------- | ------------------- |
|
|
146
|
+
| No binary files >1MB tracked in git (check with `git ls-files`) | warn |
|
|
147
|
+
| `.gitignore` covers common artifacts: `.env`, `.DS_Store`, `*.log`, `coverage/` | warn |
|
|
148
|
+
| No secrets detected in tracked files (search for patterns: `API_KEY=`, `SECRET=`, `PASSWORD=`, private key headers) | fail |
|
|
149
|
+
|
|
150
|
+
#### Output
|
|
151
|
+
|
|
152
|
+
After all checks complete, produce a structured summary for the next phases:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
AUDIT COMPLETE
|
|
156
|
+
|
|
157
|
+
Packaging: 8/12 passed, 2 warnings, 2 failures
|
|
158
|
+
Docs: 5/6 passed, 1 warning, 0 failures
|
|
159
|
+
Hygiene: 3/5 passed, 2 warnings, 0 failures
|
|
160
|
+
CI/CD: 4/5 passed, 1 warning, 0 failures
|
|
161
|
+
[comprehensive] API Docs: skipped (use --comprehensive)
|
|
162
|
+
[comprehensive] Examples: skipped (use --comprehensive)
|
|
163
|
+
[comprehensive] Dep Health: skipped (use --comprehensive)
|
|
164
|
+
[comprehensive] Git Hygiene: skipped (use --comprehensive)
|
|
165
|
+
|
|
166
|
+
Total: 20/28 passed, 6 warnings, 2 failures
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Proceed to Phase 2: MAINTAIN.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Phase 2: MAINTAIN — Parallel Maintenance Skill Dispatch
|
|
174
|
+
|
|
175
|
+
Run existing maintenance skills to catch issues that release-specific checks do not cover. These skills are independent of each other and should be dispatched in parallel.
|
|
176
|
+
|
|
177
|
+
#### Dispatch
|
|
178
|
+
|
|
179
|
+
Launch 4 agents concurrently using the Agent tool. Each agent runs one maintenance skill against the project root:
|
|
180
|
+
|
|
181
|
+
| Agent | Skill | Purpose |
|
|
182
|
+
| ----- | ------------------------------- | --------------------------------------------------------------- |
|
|
183
|
+
| 1 | `/harness:detect-doc-drift` | Find documentation that has fallen out of sync with code |
|
|
184
|
+
| 2 | `/harness:cleanup-dead-code` | Find unused exports, imports, and files |
|
|
185
|
+
| 3 | `/harness:enforce-architecture` | Validate layer boundaries and dependency rules |
|
|
186
|
+
| 4 | `/harness:diagnostics` | Classify any existing errors and route to resolution strategies |
|
|
187
|
+
|
|
188
|
+
Example dispatch (Claude Code):
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Use the Agent tool to launch 4 agents in parallel:
|
|
192
|
+
|
|
193
|
+
Agent 1: "Run /harness:detect-doc-drift on this project and return findings as a structured list"
|
|
194
|
+
Agent 2: "Run /harness:cleanup-dead-code on this project and return findings as a structured list"
|
|
195
|
+
Agent 3: "Run /harness:enforce-architecture on this project and return findings as a structured list"
|
|
196
|
+
Agent 4: "Run /harness:diagnostics on this project and return findings as a structured list"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### Result Collection
|
|
200
|
+
|
|
201
|
+
Wait for all agents to complete. Set a 2-minute timeout per agent — if an agent exceeds this, treat it as failed. For each agent:
|
|
202
|
+
|
|
203
|
+
1. If the agent succeeded: extract its findings as a list of issues with file paths and descriptions.
|
|
204
|
+
2. If the agent failed (error, timeout, or exceeded 2-minute limit): log the failure reason and continue. A failed maintenance check does not block the release readiness report — it is reported as "unavailable" in the final report.
|
|
205
|
+
|
|
206
|
+
#### Merge
|
|
207
|
+
|
|
208
|
+
Combine findings from all maintenance skills into a unified structure:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
MAINTENANCE RESULTS
|
|
212
|
+
|
|
213
|
+
Doc Drift: 2 issues found
|
|
214
|
+
- docs/api/index.md references removed function `parseConfig`
|
|
215
|
+
- docs/guides/getting-started.md version number outdated (0.7.0 → 0.8.0)
|
|
216
|
+
|
|
217
|
+
Dead Code: 0 issues found (clean)
|
|
218
|
+
|
|
219
|
+
Architecture: 0 violations found (clean)
|
|
220
|
+
|
|
221
|
+
Diagnostics: 1 warning
|
|
222
|
+
- TypeScript strict mode warning in packages/cli/src/init.ts:42
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Carry these results forward to Phase 3 (FIX) and Phase 4 (REPORT).
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### Phase 3: FIX — Auto-Remediation
|
|
230
|
+
|
|
231
|
+
Review all findings from Phase 1 (AUDIT) and Phase 2 (MAINTAIN). For each fixable finding, offer to apply a fix. Non-fixable findings are listed with remediation guidance for the human.
|
|
232
|
+
|
|
233
|
+
#### Fixable Findings
|
|
234
|
+
|
|
235
|
+
| Finding | Auto-Fix |
|
|
236
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
237
|
+
| Missing `publishConfig` in package.json | Add `"publishConfig": { "access": "public" }` |
|
|
238
|
+
| Missing `repository` field in package.json | Add `"repository": { "type": "git", "url": "<detected from git remote>" }` |
|
|
239
|
+
| Missing `bugs` field in package.json | Add `"bugs": { "url": "<repository>/issues" }` |
|
|
240
|
+
| Missing `homepage` field in package.json | Add `"homepage": "<repository>#readme"` |
|
|
241
|
+
| Missing `description` field in package.json | Add `"description": ""` with a TODO comment for the human to fill in |
|
|
242
|
+
| Missing `files` field in package.json | Add `"files": ["dist"]` (or `["dist", "src"]` if no build step) |
|
|
243
|
+
| Missing `CONTRIBUTING.md` | Generate from template with standard sections (how to contribute, development setup, PR process) |
|
|
244
|
+
| Missing `CODE_OF_CONDUCT.md` | Generate Contributor Covenant v2.1 |
|
|
245
|
+
| Missing `SECURITY.md` | Generate template with vulnerability reporting instructions |
|
|
246
|
+
| Missing `CHANGELOG.md` (file does not exist) | Generate skeleton with `# Changelog` header and initial entry from git log since last tag |
|
|
247
|
+
| Doc drift detected | Delegate to `/harness:align-documentation` |
|
|
248
|
+
| Dead code found | Delegate to `/harness:cleanup-dead-code` (with `--fix` intent) |
|
|
249
|
+
|
|
250
|
+
#### Prompting
|
|
251
|
+
|
|
252
|
+
Present each fix individually:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
[1/6] Fix: Add "repository" field to packages/core/package.json
|
|
256
|
+
Value: { "type": "git", "url": "https://github.com/org/repo.git" }
|
|
257
|
+
[y]es / [n]o / [a]ll remaining
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
- **y** — Apply this fix and show the next one.
|
|
261
|
+
- **n** — Skip this fix. Record it as "skipped" in state.
|
|
262
|
+
- **a** — Apply this fix and all remaining fixes without prompting.
|
|
263
|
+
|
|
264
|
+
After each batch of fixes (or after each individual fix if not batching), run `harness validate` to ensure the fixes did not introduce new issues.
|
|
265
|
+
|
|
266
|
+
#### Non-Fixable Findings
|
|
267
|
+
|
|
268
|
+
These require human judgment and cannot be auto-fixed. List them with guidance:
|
|
269
|
+
|
|
270
|
+
| Finding | Guidance |
|
|
271
|
+
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
272
|
+
| `TODO`/`FIXME` in published source | List each location with file:line. Human must resolve or move to a tracked issue. |
|
|
273
|
+
| README missing usage/API sections | Suggest section structure but do not generate content — only the author knows the API. |
|
|
274
|
+
| CHANGELOG exists but has no entries (empty or template-only) | Suggest running `git log --oneline <last-tag>..HEAD` to generate entries. Unlike a missing file (auto-fixable above), an empty CHANGELOG needs human-authored content. |
|
|
275
|
+
| CI workflow missing | Provide a starter template but flag for human review before committing. |
|
|
276
|
+
| Build failure | Show the error output. Do not attempt to fix build issues automatically. |
|
|
277
|
+
|
|
278
|
+
#### Output
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
FIX COMPLETE
|
|
282
|
+
|
|
283
|
+
Applied: 4 fixes
|
|
284
|
+
Skipped: 1 fix (README usage section — requires human)
|
|
285
|
+
Failed: 0 fixes
|
|
286
|
+
|
|
287
|
+
Remaining manual items:
|
|
288
|
+
- [ ] Write usage section in README.md
|
|
289
|
+
- [ ] Resolve TODO in packages/cli/src/init.ts:42
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Proceed to Phase 4: REPORT.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
### Phase 4: REPORT — Final Output
|
|
297
|
+
|
|
298
|
+
Write two artifacts: a human-readable report and a machine-readable state file.
|
|
299
|
+
|
|
300
|
+
#### 1. Release Readiness Report (`release-readiness-report.md`)
|
|
301
|
+
|
|
302
|
+
Write to the project root by default. If the project uses `.harness/reports/` for generated reports, write there instead. Use this template:
|
|
303
|
+
|
|
304
|
+
```markdown
|
|
305
|
+
# Release Readiness Report
|
|
306
|
+
|
|
307
|
+
**Date:** YYYY-MM-DD
|
|
308
|
+
**Project:** <project name>
|
|
309
|
+
**Flags:** standard | comprehensive
|
|
310
|
+
|
|
311
|
+
## Summary
|
|
312
|
+
|
|
313
|
+
**Result: PASS / FAIL**
|
|
314
|
+
|
|
315
|
+
| Category | Passed | Warnings | Failures |
|
|
316
|
+
| -------------------------- | ------------ | -------- | -------- |
|
|
317
|
+
| Packaging | N/N | N | N |
|
|
318
|
+
| Documentation | N/N | N | N |
|
|
319
|
+
| Repo Hygiene | N/N | N | N |
|
|
320
|
+
| CI/CD | N/N | N | N |
|
|
321
|
+
| Maintenance — Doc Drift | N issues | — | — |
|
|
322
|
+
| Maintenance — Dead Code | N issues | — | — |
|
|
323
|
+
| Maintenance — Architecture | N violations | — | — |
|
|
324
|
+
| Maintenance — Diagnostics | N warnings | — | — |
|
|
325
|
+
|
|
326
|
+
## Packaging
|
|
327
|
+
|
|
328
|
+
### <package-name> [pass/warn/fail per check]
|
|
329
|
+
|
|
330
|
+
- [x] name: `@org/package`
|
|
331
|
+
- [x] version: `1.0.0`
|
|
332
|
+
- [ ] missing `files` field
|
|
333
|
+
|
|
334
|
+
(Repeat for each package in monorepo)
|
|
335
|
+
|
|
336
|
+
## Documentation
|
|
337
|
+
|
|
338
|
+
- [x] README.md exists
|
|
339
|
+
- [x] README has install section
|
|
340
|
+
- [ ] README missing usage section
|
|
341
|
+
|
|
342
|
+
## Repo Hygiene
|
|
343
|
+
|
|
344
|
+
- [x] CONTRIBUTING.md exists
|
|
345
|
+
- [ ] SECURITY.md missing
|
|
346
|
+
|
|
347
|
+
## CI/CD
|
|
348
|
+
|
|
349
|
+
- [x] CI workflow exists
|
|
350
|
+
- [x] Release workflow exists
|
|
351
|
+
|
|
352
|
+
## Maintenance Results
|
|
353
|
+
|
|
354
|
+
### Doc Drift
|
|
355
|
+
|
|
356
|
+
(findings from detect-doc-drift, or "clean")
|
|
357
|
+
|
|
358
|
+
### Dead Code
|
|
359
|
+
|
|
360
|
+
(findings from cleanup-dead-code, or "clean")
|
|
361
|
+
|
|
362
|
+
### Architecture
|
|
363
|
+
|
|
364
|
+
(findings from enforce-architecture, or "clean")
|
|
365
|
+
|
|
366
|
+
### Diagnostics
|
|
367
|
+
|
|
368
|
+
(findings from diagnostics, or "clean")
|
|
369
|
+
|
|
370
|
+
## Fixes Applied
|
|
371
|
+
|
|
372
|
+
- Added `repository` field to packages/core/package.json
|
|
373
|
+
- Generated SECURITY.md from template
|
|
374
|
+
|
|
375
|
+
## Remaining Items
|
|
376
|
+
|
|
377
|
+
- [ ] Write usage section in README.md
|
|
378
|
+
- [ ] Resolve TODO in packages/cli/src/init.ts:42
|
|
379
|
+
- [ ] Add `files` field to packages/types/package.json
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Result** is **PASS** only when: zero failures across all categories AND zero maintenance issues with "fail" severity. Warnings alone do not block a PASS.
|
|
383
|
+
|
|
384
|
+
#### 2. State File (`.harness/release-readiness.json`)
|
|
385
|
+
|
|
386
|
+
Write to `.harness/release-readiness.json`. This file enables session resumption.
|
|
387
|
+
|
|
388
|
+
```json
|
|
389
|
+
{
|
|
390
|
+
"schemaVersion": 1,
|
|
391
|
+
"timestamp": "YYYY-MM-DDTHH:MM:SSZ",
|
|
392
|
+
"flags": {
|
|
393
|
+
"comprehensive": false
|
|
394
|
+
},
|
|
395
|
+
"summary": {
|
|
396
|
+
"result": "FAIL",
|
|
397
|
+
"passed": 14,
|
|
398
|
+
"warned": 2,
|
|
399
|
+
"failed": 2,
|
|
400
|
+
"total": 18
|
|
401
|
+
},
|
|
402
|
+
"categories": {
|
|
403
|
+
"packaging": {
|
|
404
|
+
"passed": 5,
|
|
405
|
+
"warned": 1,
|
|
406
|
+
"failed": 1,
|
|
407
|
+
"findings": [
|
|
408
|
+
{
|
|
409
|
+
"package": "packages/types",
|
|
410
|
+
"check": "files field exists",
|
|
411
|
+
"severity": "fail",
|
|
412
|
+
"fixable": true,
|
|
413
|
+
"fixed": false
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
"documentation": {
|
|
418
|
+
"passed": 5,
|
|
419
|
+
"warned": 1,
|
|
420
|
+
"failed": 0,
|
|
421
|
+
"findings": []
|
|
422
|
+
},
|
|
423
|
+
"repo-hygiene": {
|
|
424
|
+
"passed": 3,
|
|
425
|
+
"warned": 2,
|
|
426
|
+
"failed": 0,
|
|
427
|
+
"findings": []
|
|
428
|
+
},
|
|
429
|
+
"ci-cd": {
|
|
430
|
+
"passed": 4,
|
|
431
|
+
"warned": 1,
|
|
432
|
+
"failed": 0,
|
|
433
|
+
"findings": []
|
|
434
|
+
},
|
|
435
|
+
"maintenance": {
|
|
436
|
+
"doc-drift": { "issues": 2, "findings": [] },
|
|
437
|
+
"dead-code": { "issues": 0, "findings": [] },
|
|
438
|
+
"architecture": { "issues": 0, "findings": [] },
|
|
439
|
+
"diagnostics": { "issues": 1, "findings": [] }
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"fixes": {
|
|
443
|
+
"applied": ["added-repository-field-core", "generated-security-md"],
|
|
444
|
+
"pending": ["add-files-field-types", "doc-drift-api-index"],
|
|
445
|
+
"skipped": ["readme-usage-section"]
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
#### Session Resumption Behavior
|
|
451
|
+
|
|
452
|
+
When the skill is invoked and `.harness/release-readiness.json` exists:
|
|
453
|
+
|
|
454
|
+
1. Load the previous state.
|
|
455
|
+
2. Re-run all checks (do not trust cached results — code may have changed).
|
|
456
|
+
3. Compare new results against previous state.
|
|
457
|
+
4. Display a delta:
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
Release Readiness — resuming from 2026-03-19T10:30:00Z
|
|
461
|
+
|
|
462
|
+
Since last run:
|
|
463
|
+
✓ 2 items fixed (added "files" field to types, resolved doc drift in api/index.md)
|
|
464
|
+
↑ 1 new issue (CONTRIBUTING.md was deleted)
|
|
465
|
+
→ 1 item remaining (TODO in cli/init.ts:42)
|
|
466
|
+
|
|
467
|
+
Previous: 14/18 passed (FAIL)
|
|
468
|
+
Current: 16/19 passed (FAIL)
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
#### Milestone Trigger Variant
|
|
472
|
+
|
|
473
|
+
When the skill fires via `on_milestone` trigger, use progress framing instead of pass/fail:
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
Release Readiness Progress — Milestone: <milestone name>
|
|
477
|
+
|
|
478
|
+
16/18 checks passing (up from 12/18 last run)
|
|
479
|
+
1 item auto-fixable
|
|
480
|
+
1 item requires manual attention
|
|
481
|
+
|
|
482
|
+
Trend: ↑ improving (4 items resolved since last milestone)
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
This framing is informational — it does not block anything. It gives the team a sense of trajectory.
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## Harness Integration
|
|
490
|
+
|
|
491
|
+
- **`harness validate`** — Run after auto-fixes to verify project health. Also included in AUDIT phase as a meta-check (does the project pass its own validation?).
|
|
492
|
+
- **Sub-skill invocations** — Phase 2 dispatches `detect-doc-drift`, `cleanup-dead-code`, `enforce-architecture`, and `diagnostics` as parallel agents. Phase 3 delegates fixes to `align-documentation` and `cleanup-dead-code`.
|
|
493
|
+
- **State file** — `.harness/release-readiness.json` enables session resumption and progress tracking. This file is read at the start of each invocation and written at the end.
|
|
494
|
+
- **Report file** — `release-readiness-report.md` is written to the project root. It is a snapshot, not a tracked artifact — regenerate it on each run.
|
|
495
|
+
|
|
496
|
+
## Success Criteria
|
|
497
|
+
|
|
498
|
+
1. Running `/harness:release-readiness` on a project with known gaps produces a report that identifies all of them — no false negatives on standard checks
|
|
499
|
+
2. Running it on a clean project produces an all-pass report with no false positives
|
|
500
|
+
3. Maintenance skills are dispatched in parallel and their results appear in the unified report
|
|
501
|
+
4. Auto-fix applies correct changes — package.json modifications are valid JSON, generated files match project conventions
|
|
502
|
+
5. State file persists across sessions and subsequent runs show accurate deltas
|
|
503
|
+
6. `--comprehensive` flag activates additional checks without affecting standard check behavior
|
|
504
|
+
7. `on_milestone` trigger fires and produces a progress-style report (not just pass/fail)
|
|
505
|
+
8. Monorepo support: each package is audited independently with per-package results in the report
|
|
506
|
+
9. `harness validate` passes after the skill's SKILL.md and skill.yaml are written
|
|
507
|
+
|
|
508
|
+
## Examples
|
|
509
|
+
|
|
510
|
+
### Example: First Run on a Monorepo with Gaps
|
|
511
|
+
|
|
512
|
+
**Context:** A TypeScript monorepo with 3 packages. Two packages are missing `files` fields, README lacks a usage section, and SECURITY.md does not exist.
|
|
513
|
+
|
|
514
|
+
**Phase 1: AUDIT**
|
|
515
|
+
|
|
516
|
+
```
|
|
517
|
+
No existing state found. Running fresh audit.
|
|
518
|
+
|
|
519
|
+
Checking packages/core...
|
|
520
|
+
✓ name: @myorg/core
|
|
521
|
+
✓ version: 1.2.0
|
|
522
|
+
✓ license: MIT
|
|
523
|
+
✓ exports defined
|
|
524
|
+
✗ files field missing (fail)
|
|
525
|
+
✗ publishConfig missing (warn)
|
|
526
|
+
|
|
527
|
+
Checking packages/utils...
|
|
528
|
+
✓ name: @myorg/utils
|
|
529
|
+
✓ version: 0.3.0
|
|
530
|
+
✓ license: MIT
|
|
531
|
+
✓ exports defined
|
|
532
|
+
✗ files field missing (fail)
|
|
533
|
+
|
|
534
|
+
Checking packages/cli...
|
|
535
|
+
✓ name: @myorg/cli (all fields present)
|
|
536
|
+
|
|
537
|
+
Documentation:
|
|
538
|
+
✓ README.md exists
|
|
539
|
+
✗ README missing usage section (warn)
|
|
540
|
+
✓ CHANGELOG.md exists with entries
|
|
541
|
+
✓ LICENSE exists
|
|
542
|
+
|
|
543
|
+
Repo Hygiene:
|
|
544
|
+
✓ CONTRIBUTING.md exists
|
|
545
|
+
✓ CODE_OF_CONDUCT.md exists
|
|
546
|
+
✗ SECURITY.md missing (warn)
|
|
547
|
+
✓ .gitignore covers node_modules, dist, .env
|
|
548
|
+
|
|
549
|
+
CI/CD:
|
|
550
|
+
✓ CI workflow: .github/workflows/ci.yml
|
|
551
|
+
✓ Release workflow: .github/workflows/release.yml
|
|
552
|
+
✓ test, lint, typecheck scripts present
|
|
553
|
+
|
|
554
|
+
AUDIT COMPLETE
|
|
555
|
+
Packaging: 9/12 passed, 1 warning, 2 failures
|
|
556
|
+
Docs: 5/6 passed, 1 warning, 0 failures
|
|
557
|
+
Hygiene: 4/5 passed, 1 warning, 0 failures
|
|
558
|
+
CI/CD: 5/5 passed, 0 warnings, 0 failures
|
|
559
|
+
Total: 23/28 passed, 3 warnings, 2 failures
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**Phase 2: MAINTAIN**
|
|
563
|
+
|
|
564
|
+
```
|
|
565
|
+
Dispatching 4 maintenance agents in parallel...
|
|
566
|
+
|
|
567
|
+
Doc Drift: 1 issue — docs/api/core.md references removed function `legacyParse`
|
|
568
|
+
Dead Code: 0 issues (clean)
|
|
569
|
+
Architecture: 0 violations (clean)
|
|
570
|
+
Diagnostics: 0 warnings (clean)
|
|
571
|
+
|
|
572
|
+
MAINTENANCE COMPLETE — 1 issue found
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
**Phase 3: FIX**
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
5 fixable findings:
|
|
579
|
+
|
|
580
|
+
[1/5] Fix: Add "files": ["dist"] to packages/core/package.json
|
|
581
|
+
[y]es / [n]o / [a]ll remaining
|
|
582
|
+
> y
|
|
583
|
+
✓ Applied
|
|
584
|
+
|
|
585
|
+
[2/5] Fix: Add "files": ["dist"] to packages/utils/package.json
|
|
586
|
+
[y]es / [n]o / [a]ll remaining
|
|
587
|
+
> y
|
|
588
|
+
✓ Applied
|
|
589
|
+
|
|
590
|
+
[3/5] Fix: Add "publishConfig": { "access": "public" } to packages/core/package.json
|
|
591
|
+
[y]es / [n]o / [a]ll remaining
|
|
592
|
+
> a
|
|
593
|
+
✓ Applied (and all remaining)
|
|
594
|
+
|
|
595
|
+
[4/5] Fix: Generate SECURITY.md from template
|
|
596
|
+
✓ Applied (batch)
|
|
597
|
+
|
|
598
|
+
[5/5] Fix: Delegate doc drift to /harness:align-documentation
|
|
599
|
+
✓ Applied (batch) — docs/api/core.md updated
|
|
600
|
+
|
|
601
|
+
Running harness validate... ✓ passes
|
|
602
|
+
|
|
603
|
+
FIX COMPLETE — 5 applied, 0 skipped, 0 failed
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
**Phase 4: REPORT**
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
Writing release-readiness-report.md...
|
|
610
|
+
Writing .harness/release-readiness.json...
|
|
611
|
+
|
|
612
|
+
# Release Readiness Report
|
|
613
|
+
Date: 2026-03-19
|
|
614
|
+
Result: PASS (after fixes)
|
|
615
|
+
|
|
616
|
+
28/28 checks passed, 0 warnings, 0 failures
|
|
617
|
+
Maintenance: all clean
|
|
618
|
+
|
|
619
|
+
Fixes applied this session: 5
|
|
620
|
+
Remaining manual items:
|
|
621
|
+
- [ ] Write usage section in README.md (optional — warning only)
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
### Example: Resuming After Partial Fixes
|
|
625
|
+
|
|
626
|
+
```
|
|
627
|
+
Release Readiness — resuming from 2026-03-18T14:20:00Z
|
|
628
|
+
|
|
629
|
+
Since last run:
|
|
630
|
+
✓ 3 items fixed (added files fields, generated SECURITY.md)
|
|
631
|
+
→ 2 items remaining (doc drift in api/core.md, README usage section)
|
|
632
|
+
|
|
633
|
+
Re-running full audit...
|
|
634
|
+
|
|
635
|
+
Previous: 23/28 passed (FAIL)
|
|
636
|
+
Current: 27/28 passed (PASS — 1 warning remaining)
|
|
637
|
+
|
|
638
|
+
The project is release-ready. The remaining warning (README usage section) is not blocking.
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
## Gates
|
|
642
|
+
|
|
643
|
+
These are hard stops. Violating any gate means the process has broken down.
|
|
644
|
+
|
|
645
|
+
- **No release without a passing report.** If the report result is FAIL, the project must not be released. Fix all failures first.
|
|
646
|
+
- **No skipping the MAINTAIN phase.** Maintenance checks catch issues that release-specific checks miss (dead code, architecture drift, doc drift). They must run every time.
|
|
647
|
+
- **No auto-fix without prompting.** Every fix must be presented to the human before being applied (unless the human chose `all` to batch-approve remaining fixes). Silent fixes are not allowed.
|
|
648
|
+
- **All findings must have evidence.** Do not report a check as failed without showing the specific file, line, or field that caused the failure. "Packaging looks incomplete" is not a finding — "packages/core/package.json is missing the `files` field" is.
|
|
649
|
+
- **State must be written.** After every run, `.harness/release-readiness.json` must be updated. Without state, session resumption is impossible and progress is lost.
|
|
650
|
+
|
|
651
|
+
## Escalation
|
|
652
|
+
|
|
653
|
+
- **When there are too many failures to fix in one session:** Present the full report, highlight the most impactful fixes (failures before warnings, blocking before non-blocking), and suggest a prioritized fix order. Save state so the next session can pick up where this one left off.
|
|
654
|
+
- **When a maintenance skill is unavailable or errors out:** Report it as "unavailable" in the maintenance section. Do not block the rest of the report. Suggest running the failed skill manually: "Doc drift check failed — run `/harness:detect-doc-drift` separately to investigate."
|
|
655
|
+
- **When monorepo packages have inconsistent configurations:** Flag the inconsistency explicitly: "packages/core has `publishConfig` but packages/utils does not. Should all packages use the same publishing configuration?" Ask the human before applying a uniform fix.
|
|
656
|
+
- **When the project has no build command:** Some packages are types-only and have no build step. Skip the build check for packages without a `build` script and note it as "N/A" rather than a failure.
|
|
657
|
+
- **When fixes conflict with each other:** Present both findings and let the human choose. Example: dead code cleanup wants to remove a function, but doc drift fix references that function in updated docs. Human must decide which takes priority.
|