dev-harness-cli 1.0.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 (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +299 -0
  3. package/adapters/amazon-q/README.md +23 -0
  4. package/adapters/antigravity/README.md +22 -0
  5. package/adapters/claude-code/README.md +30 -0
  6. package/adapters/cline/README.md +23 -0
  7. package/adapters/codex/README.md +31 -0
  8. package/adapters/copilot/README.md +23 -0
  9. package/adapters/cursor/README.md +29 -0
  10. package/adapters/gemini/README.md +23 -0
  11. package/adapters/generic/README.md +40 -0
  12. package/adapters/hermes/README.md +31 -0
  13. package/adapters/hermes/SKILL.md +89 -0
  14. package/adapters/hermes/scripts/init.mjs +27 -0
  15. package/adapters/hermes/scripts/phase.mjs +27 -0
  16. package/adapters/hermes/scripts/validate.mjs +27 -0
  17. package/adapters/kilo-code/README.md +23 -0
  18. package/adapters/openclaw/README.md +22 -0
  19. package/adapters/pi/README.md +22 -0
  20. package/adapters/roo/README.md +23 -0
  21. package/adapters/windsurf/README.md +23 -0
  22. package/cli/commands/checkpoint.mjs +94 -0
  23. package/cli/commands/config.mjs +268 -0
  24. package/cli/commands/contract.mjs +155 -0
  25. package/cli/commands/detect-tool.mjs +112 -0
  26. package/cli/commands/init.mjs +351 -0
  27. package/cli/commands/learn.mjs +47 -0
  28. package/cli/commands/pause.mjs +34 -0
  29. package/cli/commands/phase.mjs +182 -0
  30. package/cli/commands/resume.mjs +33 -0
  31. package/cli/commands/rollback.mjs +261 -0
  32. package/cli/commands/set-mode.mjs +75 -0
  33. package/cli/commands/status.mjs +168 -0
  34. package/cli/commands/validate.mjs +118 -0
  35. package/cli/commands/worktree.mjs +298 -0
  36. package/cli/harness-dev.mjs +88 -0
  37. package/cli/lib/args.mjs +111 -0
  38. package/cli/lib/command-helpers.mjs +50 -0
  39. package/cli/lib/config-registry.mjs +329 -0
  40. package/cli/lib/constants.mjs +30 -0
  41. package/cli/lib/contract.mjs +306 -0
  42. package/cli/lib/detect-stack.mjs +235 -0
  43. package/cli/lib/errors.mjs +71 -0
  44. package/cli/lib/file-io.mjs +90 -0
  45. package/cli/lib/gates.mjs +492 -0
  46. package/cli/lib/git.mjs +144 -0
  47. package/cli/lib/help.mjs +246 -0
  48. package/cli/lib/modes.mjs +92 -0
  49. package/cli/lib/output.mjs +49 -0
  50. package/cli/lib/paths.mjs +75 -0
  51. package/cli/lib/phases.mjs +58 -0
  52. package/cli/lib/platform.mjs +78 -0
  53. package/cli/lib/progress.mjs +357 -0
  54. package/cli/lib/ralph-inner.mjs +314 -0
  55. package/cli/lib/ralph-outer.mjs +249 -0
  56. package/cli/lib/ralph-output.mjs +178 -0
  57. package/cli/lib/scaffold.mjs +431 -0
  58. package/cli/lib/schemas/stacks.json +477 -0
  59. package/cli/lib/state.mjs +333 -0
  60. package/cli/lib/templates.mjs +264 -0
  61. package/cli/lib/tool-registry.mjs +218 -0
  62. package/cli/lib/validate-schema.mjs +131 -0
  63. package/cli/lib/vars.mjs +114 -0
  64. package/package.json +50 -0
  65. package/schema/harness-config.schema.json +127 -0
  66. package/templates/AGENTS.md +63 -0
  67. package/templates/ci/github-actions.yml +78 -0
  68. package/templates/ci/gitlab-ci.yml +59 -0
  69. package/templates/docs/agents/evaluator.md +14 -0
  70. package/templates/docs/agents/generator.md +13 -0
  71. package/templates/docs/agents/planner.md +13 -0
  72. package/templates/docs/agents/simplifier.md +13 -0
  73. package/templates/docs/phases/build.md +41 -0
  74. package/templates/docs/phases/define.md +51 -0
  75. package/templates/docs/phases/plan.md +36 -0
  76. package/templates/docs/phases/review.md +42 -0
  77. package/templates/docs/phases/ship.md +43 -0
  78. package/templates/docs/phases/simplify.md +40 -0
  79. package/templates/docs/phases/verify.md +38 -0
  80. package/templates/evaluator-rubric.md +28 -0
  81. package/templates/init.ps1 +97 -0
  82. package/templates/init.sh +102 -0
  83. package/templates/sprint-contract.md +31 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nous Research
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,299 @@
1
+ # Dev Harness
2
+
3
+ **Agent-agnostic development pipeline CLI.** Scaffold, phase orchestrate, gate validate, and iterate any software project — works with any coding agent (Claude Code, Codex, OpenCode, Cursor, etc.).
4
+
5
+ ```bash
6
+ npx github:bakr-bagaber/dev-harness init --stack python --target my-project
7
+ cd my-project
8
+ npx github:bakr-bagaber/dev-harness phase define
9
+ ```
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ # Quick start (no install)
15
+ npx github:bakr-bagaber/dev-harness --help
16
+
17
+ # Global install from GitHub
18
+ npm install -g https://github.com/bakr-bagaber/dev-harness.git
19
+ harness-dev --help
20
+
21
+ # Or clone and install
22
+ git clone https://github.com/bakr-bagaber/dev-harness.git
23
+ cd dev-harness && npm install -g .
24
+ ```
25
+
26
+ Requires **Node.js >= 18**.
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ # Scaffold a new project
32
+ harness-dev init --stack python --target my-app
33
+
34
+ # Check status
35
+ cd my-app
36
+ harness-dev status
37
+
38
+ # Start the DEFINE phase
39
+ harness-dev phase define
40
+ ```
41
+
42
+ ## Supported Stacks
43
+
44
+ | Stack | Detection | Config File |
45
+ |-------|-----------|-------------|
46
+ | Python | `pyproject.toml`, `setup.py`, `*.py` | `pyproject.toml` |
47
+ | Java | `pom.xml`, `build.gradle`, `*.java` | `pom.xml` |
48
+ | Kotlin | `build.gradle.kts`, `*.kt` | `build.gradle.kts` |
49
+ | Node.js | `package.json`, `*.js`, `*.ts` | `package.json` |
50
+ | Go | `go.mod`, `*.go` | `go.mod` |
51
+ | Rust | `Cargo.toml`, `*.rs` | `Cargo.toml` |
52
+ | C | `*.c` | `CMakeLists.txt` |
53
+ | C++ | `*.cpp`, `*.hpp` | `CMakeLists.txt` |
54
+ | .NET | `*.cs`, `*.fs` | `global.json` |
55
+ | MATLAB | `*.m` | (none) |
56
+ | VHDL | `*.vhdl`, `*.vhd` | (none) |
57
+ | Verilog | `*.v`, `*.sv` | (none) |
58
+ | Generic | fallback | (none) |
59
+
60
+ ## Commands
61
+
62
+ | Command | Description |
63
+ |---------|-------------|
64
+ | `init` | Scaffold project (21 files) |
65
+ | `status` | Show current state |
66
+ | `phase <name>` | Invoke a phase |
67
+ | `validate` | Run gate checks |
68
+ | `config get/set` | Read/write config |
69
+ | `learn <msg>` | Save a lesson |
70
+ | `set-mode` | copilot / autopilot |
71
+ | `pause` / `resume` | Control autopilot |
72
+ | `contract propose/review/status/escalate` | Sprint contract negotiation |
73
+ | `worktree create/list/prune/remove` | Git worktree management |
74
+ | `checkpoint create <label>` | Git tag checkpoint |
75
+ | `rollback list/to/branch` | Rollback to checkpoint |
76
+
77
+ ## Phase Pipeline
78
+
79
+ ```
80
+ INIT → DEFINE → PLAN → BUILD → VERIFY → [SIMPLIFY] → REVIEW → SHIP
81
+ ```
82
+
83
+ Two loop modes:
84
+ - **Copilot** (default): one phase at a time, human decides when to advance
85
+ - **Autopilot**: auto-advances through pipeline after each gate passes
86
+
87
+ ## Output Contracts
88
+
89
+ All commands produce machine-parseable JSON with `--json`:
90
+
91
+ ```json
92
+ {"command":"status","status":"ok","message":"Phase: define, Stack: Node.js",
93
+ "currentPhase":"define","mode":"copilot","recentLessons":[]}
94
+ ```
95
+
96
+ Errors go to stderr: `{"error":"CliError","message":"...","exitCode":N}`
97
+
98
+ Exit codes: `0` success, `1` validation failure, `2` usage error, `3` internal error
99
+
100
+ ## Architecture
101
+
102
+ ```
103
+ cli/
104
+ ├── harness-dev.mjs — Entry point + command router
105
+ ├── lib/
106
+ │ ├── args.mjs — Argument parser
107
+ │ ├── errors.mjs — Error handling + exit codes
108
+ │ ├── help.mjs — Help text + per-command help
109
+ │ ├── detect-stack.mjs — 13-stack detection engine
110
+ │ ├── vars.mjs — Stack variable resolution
111
+ │ ├── templates.mjs — Template engine ({{VAR}} substitution)
112
+ │ ├── state.mjs — Config I/O + phase transitions
113
+ │ ├── phases.mjs — Pure phase pipeline logic
114
+ │ ├── progress.mjs — progress.md reader/writer
115
+ │ ├── gates.mjs — Phase gate validation
116
+ │ ├── ralph-inner.mjs — Inner loop engine
117
+ │ ├── ralph-outer.mjs — Outer loop engine
118
+ │ ├── ralph-output.mjs — Phase instruction text builders
119
+ │ ├── modes.mjs — Copilot/autopilot modes
120
+ │ ├── contract.mjs — Sprint contract negotiation
121
+ │ ├── git.mjs — Centralized git operations
122
+ │ ├── paths.mjs — Centralized path resolution
123
+ │ ├── file-io.mjs — JSON/text I/O helpers
124
+ │ ├── output.mjs — JSON/human output helpers
125
+ │ ├── command-helpers.mjs— Shared arg parsing + phaseLabel
126
+ │ ├── constants.mjs — Centralized magic numbers
127
+ │ ├── scaffold.mjs — Stack-specific scaffolding assets
128
+ │ ├── validate-schema.mjs— Minimal JSON-schema validator
129
+ │ └── schemas/
130
+ │ └── stacks.json — 13-stack metadata (CLI-internal)
131
+ ├── commands/ — 13 command handlers
132
+ │ ├── init.mjs, status.mjs, phase.mjs, validate.mjs, config.mjs
133
+ │ ├── learn.mjs, set-mode.mjs, pause.mjs, resume.mjs
134
+ │ └── contract.mjs, worktree.mjs, rollback.mjs, checkpoint.mjs
135
+ templates/ — Scaffold templates (AGENTS.md, init.sh, ci/, docs/, etc.)
136
+ schema/ — Published JSON schemas (harness-config, feature-list)
137
+ test/ — Test suites (test-t*.mjs + run-all.mjs)
138
+ dist/install.sh — One-liner installation script (curl-pipe-bash)
139
+ adapters/ — Tool adapters (claude-code, cursor, codex, hermes, generic)
140
+ docs/ — TOOL_INTEGRATION.md (per-tool setup guides)
141
+ references/ — Historical audit reports
142
+ history/ — Project audit log, changelog, decisions, issues
143
+ docs-site-templates/ — Docusaurus/Sphinx scaffolds (experimental)
144
+ ```
145
+
146
+ ## Agent Integration
147
+
148
+ harness-dev works with any coding agent via stdout JSON contracts and AGENTS.md project conventions. Use `--agent-tool` at scaffold time to generate tool-specific files, or `detect-tool` to discover which tools are configured.
149
+
150
+ ```bash
151
+ # Scaffold with a specific tool
152
+ harness-dev init --stack node --agent-tool claude-code --target my-project
153
+
154
+ # Or scaffold generically (AGENTS.md only — works with most tools)
155
+ harness-dev init --stack node --target my-project
156
+
157
+ # Detect which tools are configured
158
+ harness-dev detect-tool --target my-project
159
+ ```
160
+
161
+ **Supported tools:** `claude-code` (CLAUDE.md), `cursor` (.cursorrules), `codex`, `aider`, `continue`, `opencode` (all read AGENTS.md), `hermes` (SKILL.md), `generic` (default).
162
+
163
+ See [docs/TOOL_INTEGRATION.md](docs/TOOL_INTEGRATION.md) for per-tool setup guides and the adapter architecture.
164
+
165
+ ### Claude Code
166
+
167
+ ```bash
168
+ harness-dev init --stack node --agent-tool claude-code --target my-project
169
+ cd my-project
170
+ # Claude reads CLAUDE.md automatically
171
+ harness-dev phase build
172
+ # Claude follows the phase instructions, runs:
173
+ harness-dev validate
174
+ ```
175
+
176
+ ### Codex CLI
177
+
178
+ ```bash
179
+ harness-dev init --stack go --agent-tool codex --target my-project
180
+ cd my-project
181
+ # Codex reads AGENTS.md from project root
182
+ harness-dev status --json
183
+ # → Machine-readable state for agent decision-making
184
+ ```
185
+
186
+ ### Cursor
187
+
188
+ ```bash
189
+ harness-dev init --stack rust --agent-tool cursor --target my-project
190
+ cd my-project
191
+ # .cursorrules generated with harness conventions
192
+ harness-dev phase build
193
+ ```
194
+
195
+ ### Generic Agent Workflow
196
+
197
+ ```bash
198
+ harness-dev phase build
199
+ # → Prints task instructions for agent
200
+ # → Agent reads AGENTS.md + progress.md + sprint-contract.md
201
+ # → Agent implements → calls `harness-dev validate`
202
+ # → Gate passes → `harness-dev phase verify`
203
+ ```
204
+
205
+ ## API Reference
206
+
207
+ ### JSON Output Contract (all commands)
208
+
209
+ ```json
210
+ {
211
+ "command": "<command_name>",
212
+ "status": "ok" | "not_implemented" | "error",
213
+ "message": "Human-readable status or error detail"
214
+ }
215
+ ```
216
+
217
+ Additional command-specific fields are included (e.g. `currentPhase`, `stack`, `mode`).
218
+
219
+ ### Error Contract
220
+
221
+ ```json
222
+ {
223
+ "error": "CliError",
224
+ "message": "Description of the problem",
225
+ "exitCode": 1
226
+ }
227
+ ```
228
+
229
+ Errors always go to **stderr** so stdout stays parseable.
230
+
231
+ ### Exit Codes
232
+
233
+ | Code | Meaning |
234
+ |------|---------|
235
+ | 0 | Success |
236
+ | 1 | Validation failure |
237
+ | 2 | Usage error |
238
+ | 3 | Internal error |
239
+
240
+ ### All Commands
241
+
242
+ | Command | JSON Fields | Description |
243
+ |---------|-------------|-------------|
244
+ | `init` | `project`, `stack`, `filesCreated` | Scaffold harness project |
245
+ | `status` | `currentPhase`, `mode`, `stack`, `gateStatus`, `checksPassing`, `checksTotal`, `recentLessons`, `nextAction` | Show current state |
246
+ | `phase <name>` | `phase`, `previousPhase`, `gateResult`, `iteration` | Invoke a phase |
247
+ | `validate` | `phase`, `checks[]`, `overall`, `failures[]` | Run gate checks |
248
+ | `config get <key>` | `key`, `value` | Read config value |
249
+ | `config set <key> <value>` | `key`, `previous`, `current` | Write config value |
250
+ | `learn <msg>` | `lesson` | Append a lesson |
251
+ | `set-mode copilot\|autopilot` | `previous`, `current` | Switch mode |
252
+ | `pause` / `resume` | `paused` | Control autopilot |
253
+ | `contract propose\|review\|status\|escalate` | `status`, `agreed`, `round`, `pinned` | Sprint contract |
254
+ | `worktree create\|list\|prune\|remove` | `worktrees[]`, `action`, `name` | Git worktree |
255
+ | `checkpoint create <label>` | `tag`, `commit` | Git checkpoint |
256
+ | `rollback list\|to\|branch` | `checkpoints[]`, `restored` | Rollback |
257
+
258
+ ## Project Structure
259
+
260
+ ```
261
+ cli/ — CLI source
262
+ ├── harness-dev.mjs — Entry point + command router
263
+ ├── lib/ — Core libraries
264
+ │ ├── git.mjs — Centralized git operations
265
+ │ ├── state.mjs — Config I/O + phase transitions (re-exports phases.mjs)
266
+ │ ├── phases.mjs — Pure phase pipeline logic
267
+ │ ├── ralph-inner.mjs — Inner loop (work → validate → retry)
268
+ │ ├── ralph-outer.mjs — Outer loop (phase auto-advance)
269
+ │ ├── ralph-output.mjs — Phase instruction text builders
270
+ │ ├── gates.mjs — Phase gate validation
271
+ │ ├── contract.mjs — Sprint contract negotiation
272
+ │ ├── paths.mjs — Centralized path resolution
273
+ │ ├── file-io.mjs — JSON/text I/O helpers
274
+ │ ├── output.mjs — JSON/human output helpers
275
+ │ ├── command-helpers.mjs — Shared arg parsing + phaseLabel
276
+ │ ├── constants.mjs — Centralized magic numbers
277
+ │ ├── scaffold.mjs — Stack-specific scaffolding assets
278
+ │ ├── templates.mjs — Template engine
279
+ │ ├── detect-stack.mjs — Stack detection
280
+ │ ├── validate-schema.mjs — Minimal JSON-schema validator
281
+ │ └── schemas/stacks.json — Stack metadata (CLI-internal)
282
+ ├── commands/ — Command handlers (13 commands)
283
+ templates/ — Scaffold templates (AGENTS.md, init.sh, ci/, docs/, etc.)
284
+ schema/ — Published JSON schemas (harness-config, feature-list)
285
+ test/ — Test suites (test-t*.mjs + run-all.mjs)
286
+ dist/install.sh — One-liner install script
287
+ adapters/ — Tool adapters (claude-code, cursor, codex, hermes, generic)
288
+ docs/ — TOOL_INTEGRATION.md (per-tool setup guides)
289
+ references/ — Historical audit reports (T5-T14)
290
+ history/ — Project audit log, changelog, decisions, issues
291
+ docs-site-templates/ — Docusaurus/Sphinx scaffolds (experimental, T25)
292
+ PROJECT_PLAN.md — Full task breakdown (T1-T20)
293
+ SPEC.md — Original architecture specification
294
+ dev-harness.md — Internal project note (Obsidian)
295
+ ```
296
+
297
+ ## License
298
+
299
+ MIT
@@ -0,0 +1,23 @@
1
+ # Amazon Q Developer Adapter
2
+
3
+ Amazon Q Developer reads .amazonq/rules.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ harness-dev init --stack node --agent-tool amazon-q --target my-project
9
+ cd my-project
10
+ ```
11
+
12
+ ## Files Generated
13
+
14
+ - `AGENTS.md` — canonical harness conventions (always generated)
15
+ - `.amazonq/rules.md` — Amazon Q Developer-specific rules file (generated from AGENTS.md content)
16
+ - `harness-config.json` — with `agentTool: "amazon-q"`
17
+
18
+ ## How It Works
19
+
20
+ The harness generates AGENTS.md as the canonical conventions file. For tools
21
+ with a specific rules file, the harness copies AGENTS.md content to the
22
+ tool-specific filename (e.g. .amazonq/rules.md) with an optional header. The tool then
23
+ reads its native file and follows the harness phase instructions.
@@ -0,0 +1,22 @@
1
+ # Antigravity 2 Adapter
2
+
3
+ Antigravity 2 (IDE/CLI/SDK) — assumed to read AGENTS.md.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ harness-dev init --stack node --agent-tool antigravity --target my-project
9
+ cd my-project
10
+ ```
11
+
12
+ ## Files Generated
13
+
14
+ - `AGENTS.md` — canonical harness conventions (always generated)
15
+ - `harness-config.json` — with `agentTool: "antigravity"`
16
+
17
+ ## How It Works
18
+
19
+ The harness generates AGENTS.md as the canonical conventions file. For tools
20
+ with a specific rules file, the harness copies AGENTS.md content to the
21
+ tool-specific filename (e.g. AGENTS.md) with an optional header. The tool then
22
+ reads its native file and follows the harness phase instructions.
@@ -0,0 +1,30 @@
1
+ # Claude Code Adapter
2
+
3
+ Claude Code reads `AGENTS.md` from the project root automatically. When you
4
+ scaffold with `harness-dev init --agent-tool claude-code`, the harness generates
5
+ a `CLAUDE.md` that points Claude at the harness conventions.
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ # Scaffold with Claude Code adapter
11
+ harness-dev init --stack node --agent-tool claude-code --target my-project
12
+ cd my-project
13
+
14
+ # Claude Code picks up CLAUDE.md automatically
15
+ claude
16
+ ```
17
+
18
+ ## Files Generated
19
+
20
+ - `CLAUDE.md` — Claude-specific entry point (references AGENTS.md)
21
+ - `AGENTS.md` — canonical harness conventions (always generated)
22
+ - `harness-config.json` — with `agentTool: "claude-code"`
23
+
24
+ ## How It Works
25
+
26
+ Claude Code reads `CLAUDE.md` on startup. The generated `CLAUDE.md` includes
27
+ the harness quick-start, phase pipeline, and commands — same content as
28
+ `AGENTS.md` but in the file Claude looks for. Claude then follows the phase
29
+ instructions emitted by `harness-dev phase <name>` and runs
30
+ `harness-dev validate` after each phase.
@@ -0,0 +1,23 @@
1
+ # Cline Adapter
2
+
3
+ Cline (VS Code extension) reads .clinerules.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ harness-dev init --stack node --agent-tool cline --target my-project
9
+ cd my-project
10
+ ```
11
+
12
+ ## Files Generated
13
+
14
+ - `AGENTS.md` — canonical harness conventions (always generated)
15
+ - `.clinerules` — Cline-specific rules file (generated from AGENTS.md content)
16
+ - `harness-config.json` — with `agentTool: "cline"`
17
+
18
+ ## How It Works
19
+
20
+ The harness generates AGENTS.md as the canonical conventions file. For tools
21
+ with a specific rules file, the harness copies AGENTS.md content to the
22
+ tool-specific filename (e.g. .clinerules) with an optional header. The tool then
23
+ reads its native file and follows the harness phase instructions.
@@ -0,0 +1,31 @@
1
+ # Codex CLI Adapter
2
+
3
+ Codex CLI reads `AGENTS.md` from the project root natively — no tool-specific
4
+ file is needed. When you scaffold with `harness-dev init --agent-tool codex`,
5
+ the harness sets `agentTool: "codex"` in config but does not generate any
6
+ extra files (AGENTS.md is already the canonical entry point).
7
+
8
+ ## Usage
9
+
10
+ ```bash
11
+ # Scaffold with Codex adapter
12
+ harness-dev init --stack node --agent-tool codex --target my-project
13
+ cd my-project
14
+
15
+ # Codex reads AGENTS.md automatically
16
+ codex
17
+ ```
18
+
19
+ ## Files Generated
20
+
21
+ - `AGENTS.md` — canonical harness conventions (always generated; Codex reads this)
22
+ - `harness-config.json` — with `agentTool: "codex"`
23
+
24
+ ## How It Works
25
+
26
+ Codex CLI reads `AGENTS.md` on startup. The generated `AGENTS.md` includes
27
+ the harness quick-start, phase pipeline, agent roles, and commands. Codex
28
+ then follows the phase instructions emitted by `harness-dev phase <name>`
29
+ and runs `harness-dev validate` after each phase.
30
+
31
+ No `.codexrules` or similar file is needed — AGENTS.md is the standard.
@@ -0,0 +1,23 @@
1
+ # GitHub Copilot Adapter
2
+
3
+ GitHub Copilot reads .github/copilot-instructions.md.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ harness-dev init --stack node --agent-tool copilot --target my-project
9
+ cd my-project
10
+ ```
11
+
12
+ ## Files Generated
13
+
14
+ - `AGENTS.md` — canonical harness conventions (always generated)
15
+ - `.github/copilot-instructions.md` — GitHub Copilot-specific rules file (generated from AGENTS.md content)
16
+ - `harness-config.json` — with `agentTool: "copilot"`
17
+
18
+ ## How It Works
19
+
20
+ The harness generates AGENTS.md as the canonical conventions file. For tools
21
+ with a specific rules file, the harness copies AGENTS.md content to the
22
+ tool-specific filename (e.g. .github/copilot-instructions.md) with an optional header. The tool then
23
+ reads its native file and follows the harness phase instructions.
@@ -0,0 +1,29 @@
1
+ # Cursor Adapter
2
+
3
+ Cursor reads `.cursorrules` from the project root. When you scaffold with
4
+ `harness-dev init --agent-tool cursor`, the harness generates a `.cursorrules`
5
+ file that embeds the harness conventions.
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ # Scaffold with Cursor adapter
11
+ harness-dev init --stack node --agent-tool cursor --target my-project
12
+ cd my-project
13
+
14
+ # Open in Cursor — .cursorrules is loaded automatically
15
+ cursor .
16
+ ```
17
+
18
+ ## Files Generated
19
+
20
+ - `.cursorrules` — Cursor-specific rules (embeds harness conventions)
21
+ - `AGENTS.md` — canonical harness conventions (always generated)
22
+ - `harness-config.json` — with `agentTool: "cursor"`
23
+
24
+ ## How It Works
25
+
26
+ Cursor loads `.cursorrules` as system context for every chat. The generated
27
+ file includes the phase pipeline, agent roles, and the rule that the agent
28
+ must run `harness-dev validate` after each phase. Cursor then follows the
29
+ instructions emitted by `harness-dev phase <name>`.
@@ -0,0 +1,23 @@
1
+ # Gemini CLI Adapter
2
+
3
+ Google Gemini CLI reads GEMINI.md on startup.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ harness-dev init --stack node --agent-tool gemini --target my-project
9
+ cd my-project
10
+ ```
11
+
12
+ ## Files Generated
13
+
14
+ - `AGENTS.md` — canonical harness conventions (always generated)
15
+ - `GEMINI.md` — Gemini CLI-specific rules file (generated from AGENTS.md content)
16
+ - `harness-config.json` — with `agentTool: "gemini"`
17
+
18
+ ## How It Works
19
+
20
+ The harness generates AGENTS.md as the canonical conventions file. For tools
21
+ with a specific rules file, the harness copies AGENTS.md content to the
22
+ tool-specific filename (e.g. GEMINI.md) with an optional header. The tool then
23
+ reads its native file and follows the harness phase instructions.
@@ -0,0 +1,40 @@
1
+ # Generic Adapter (Default)
2
+
3
+ The generic adapter is the default when no `--agent-tool` is specified at
4
+ scaffold time. It generates only `AGENTS.md` — the canonical, tool-agnostic
5
+ harness conventions file that any coding agent can read.
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ # Scaffold with generic adapter (default — no flag needed)
11
+ harness-dev init --stack node --target my-project
12
+ cd my-project
13
+ ```
14
+
15
+ ## Files Generated
16
+
17
+ - `AGENTS.md` — canonical harness conventions (read by Claude Code, Codex,
18
+ Aider, Continue, OpenCode, and any tool that follows the AGENTS.md standard)
19
+ - `harness-config.json` — with `agentTool: null` (unspecified)
20
+
21
+ ## How It Works
22
+
23
+ Any agent tool that reads `AGENTS.md` from the project root will pick up the
24
+ harness conventions automatically. The agent follows the phase instructions
25
+ emitted by `harness-dev phase <name>` and runs `harness-dev validate` after
26
+ each phase.
27
+
28
+ ## Supported Tools (no adapter needed)
29
+
30
+ These tools read `AGENTS.md` natively and work with the generic adapter:
31
+
32
+ - **Claude Code** — reads AGENTS.md (but also supports CLAUDE.md; use
33
+ `--agent-tool claude-code` for the dedicated adapter)
34
+ - **Codex CLI** — reads AGENTS.md
35
+ - **Aider** — reads AGENTS.md via `--read AGENTS.md`
36
+ - **Continue** — reads AGENTS.md
37
+ - **OpenCode** — reads AGENTS.md
38
+
39
+ If your tool isn't listed, the generic adapter is the right choice —
40
+ AGENTS.md is the emerging standard for agent-readable project conventions.
@@ -0,0 +1,31 @@
1
+ # Hermes Adapter
2
+
3
+ Hermes is an agentic coding platform. This adapter provides the Hermes skill
4
+ manifest (`SKILL.md`) and thin wrapper scripts that delegate to the dev-harness
5
+ CLI. When you scaffold with `harness-dev init --agent-tool hermes`, the harness
6
+ generates the Hermes skill files alongside the standard `AGENTS.md`.
7
+
8
+ ## Usage
9
+
10
+ ```bash
11
+ # Scaffold with Hermes adapter
12
+ harness-dev init --stack node --agent-tool hermes --target my-project
13
+ cd my-project
14
+
15
+ # Hermes loads the skill via SKILL.md
16
+ ```
17
+
18
+ ## Files
19
+
20
+ - `SKILL.md` — Hermes skill manifest (YAML frontmatter + command docs)
21
+ - `scripts/init.mjs`, `scripts/phase.mjs`, `scripts/validate.mjs` — thin
22
+ `spawnSync` wrappers that delegate to the CLI
23
+ - `templates` — symlink to the main `templates/` directory (shared, not duplicated)
24
+ - `AGENTS.md` — canonical harness conventions (always generated)
25
+
26
+ ## How It Works
27
+
28
+ The wrapper scripts resolve the CLI path relative to their own location and
29
+ call `node cli/harness-dev.mjs <command>` with the forwarded arguments. No
30
+ logic is duplicated — the scripts are pure delegation. The `templates`
31
+ symlink ensures Hermes sees the same templates the CLI uses.