@vaubaan/harness 0.0.0-stage → 1.3.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +307 -2
- package/dist/agents/coding.agent.md +182 -0
- package/dist/agents/merge.agent.md +139 -0
- package/dist/agents/planning.agent.md +194 -0
- package/dist/agents/review.agent.md +176 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +2924 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/clean-code.cmd.md +26 -0
- package/dist/commands/decision.cmd.md +19 -0
- package/dist/commands/doc-audit.cmd.md +24 -0
- package/dist/commands/drift.cmd.md +18 -0
- package/dist/commands/handbook.cmd.md +21 -0
- package/dist/commands/readme.cmd.md +19 -0
- package/dist/commands/spec.cmd.md +20 -0
- package/dist/commands/test-plan.cmd.md +22 -0
- package/dist/commands/workflow.cmd.md +19 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1706 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +42 -0
- package/dist/init.js +1088 -0
- package/dist/init.js.map +1 -0
- package/dist/linters/index.d.ts +43 -0
- package/dist/linters/index.js +727 -0
- package/dist/linters/index.js.map +1 -0
- package/dist/parser/index.d.ts +247 -0
- package/dist/parser/index.js +114 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/render-B9_kNtQc.d.ts +50 -0
- package/dist/render.d.ts +3 -0
- package/dist/render.js +572 -0
- package/dist/render.js.map +1 -0
- package/dist/skills/clean-code-guardian.skill.md +391 -0
- package/dist/skills/decision-record-writer.skill.md +166 -0
- package/dist/skills/doc-audit.skill.md +257 -0
- package/dist/skills/drift-detector.skill.md +173 -0
- package/dist/skills/handbook-writer.skill.md +185 -0
- package/dist/skills/readme-writer.skill.md +131 -0
- package/dist/skills/spec-writer.skill.md +165 -0
- package/dist/skills/test-plan-writer.skill.md +179 -0
- package/dist/skills/workflow-writer.skill.md +168 -0
- package/dist/templates/code-quality.md.tmpl +57 -0
- package/dist/templates/coding-workflow.md.tmpl +88 -0
- package/dist/templates/decision.md.tmpl +60 -0
- package/dist/templates/e2e-tests.md.tmpl +62 -0
- package/dist/templates/handbook.md.tmpl +58 -0
- package/dist/templates/integration-tests.md.tmpl +50 -0
- package/dist/templates/readme.md.tmpl +51 -0
- package/dist/templates/spec.md.tmpl +64 -0
- package/package.json +82 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,308 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vaubaan/harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Project conventions as code.**
|
|
4
|
+
|
|
5
|
+
Write down once how your project is built — its architecture, decisions, quality rules and workflow. Claude Code, Codex and OpenCode read the same conventions, and linters tell you when code and docs drift apart.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@vaubaan/harness)
|
|
8
|
+
[](https://github.com/vaubaan/harness/actions/workflows/ci.yml)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx -y @vaubaan/harness init .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Why
|
|
18
|
+
|
|
19
|
+
Coding agents are fast, but they don't know your project. So you end up:
|
|
20
|
+
|
|
21
|
+
- repeating the same instructions in every session;
|
|
22
|
+
- maintaining a `CLAUDE.md`, an `AGENTS.md` and an OpenCode config that slowly disagree;
|
|
23
|
+
- discovering that the agent changed behavior the docs still describe the old way.
|
|
24
|
+
|
|
25
|
+
The harness puts your conventions where they belong — in versioned docs inside the repo — and renders them into the native format of each agent. One source of truth, every engine, checked on every turn.
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
Requires Node.js 20 or later.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx -y @vaubaan/harness init .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This renders, for each engine:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
AGENTS.md # how to work in this project (all engines)
|
|
39
|
+
CLAUDE.md # imports AGENTS.md for Claude Code
|
|
40
|
+
.claude/ # agents, skills, commands, Stop hook
|
|
41
|
+
.codex/ .agents/skills/ # agents, skills, Stop hook
|
|
42
|
+
.opencode/ # agents, commands, Stop hook plugin
|
|
43
|
+
.harness-manifest.json # what was written, for update/uninstall
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
All of these are **generated and gitignored**. What you commit is your `docs/` folder. Add these entries to `.gitignore`:
|
|
47
|
+
|
|
48
|
+
```gitignore
|
|
49
|
+
# generated by @vaubaan/harness
|
|
50
|
+
AGENTS.md
|
|
51
|
+
CLAUDE.md
|
|
52
|
+
.claude/
|
|
53
|
+
.codex/
|
|
54
|
+
.agents/
|
|
55
|
+
.opencode/
|
|
56
|
+
.mcp.json
|
|
57
|
+
.harness-manifest.json
|
|
58
|
+
.harness-overrides/
|
|
59
|
+
# Stop hook retry state and skill reports
|
|
60
|
+
.harness/
|
|
61
|
+
.vaubaan/
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`npx @vaubaan/harness check .` tells you if an entry is missing.
|
|
65
|
+
|
|
66
|
+
Then open your agent and ask it to fill the gaps:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/doc-audit # what's missing or stale in your docs
|
|
70
|
+
/spec # write the spec of a subsystem, guided
|
|
71
|
+
/decision # turn an implicit choice into an ADR
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
> [!NOTE]
|
|
75
|
+
> `init` regenerates `AGENTS.md` and `CLAUDE.md` at the root. If you already have hand-written ones, move their content into `docs/` (or your README) first.
|
|
76
|
+
|
|
77
|
+
## How it works
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
docs/ your conventions, versioned in Git
|
|
81
|
+
│ spec · decisions · handbook · tests · workflow · quality
|
|
82
|
+
│
|
|
83
|
+
▼ init
|
|
84
|
+
AGENTS.md .claude/ .codex/ .opencode/
|
|
85
|
+
│ generated for each engine, gitignored
|
|
86
|
+
│
|
|
87
|
+
▼
|
|
88
|
+
Claude Code · Codex · OpenCode read the same conventions, write the code
|
|
89
|
+
│ ▲
|
|
90
|
+
│ end of each turn │ report: what drifted
|
|
91
|
+
▼ │
|
|
92
|
+
linters (Stop hook) ────┘
|
|
93
|
+
│
|
|
94
|
+
▼
|
|
95
|
+
CI same checks on every pull request
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
1. **Your docs are the conventions.** A small, fixed layout under `docs/` says what the project does, why it's built that way, and how it actually works today.
|
|
99
|
+
2. **The harness renders one pivot format into each engine's native layout.** Agents, skills and commands are written once and land where each engine looks for them.
|
|
100
|
+
3. **Linters keep docs and code in sync.** At the end of each agent turn, a Stop hook runs them; if something drifted, the agent gets the report and fixes it before handing back. The same linters run in CI.
|
|
101
|
+
|
|
102
|
+
The work order every agent follows is: **understand the docs → fill the gaps → code → update the docs → commit.**
|
|
103
|
+
|
|
104
|
+
## Your docs
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
README.md # pitch, quick start
|
|
108
|
+
docs/
|
|
109
|
+
spec/<subsystem>.md # what and why — tech-agnostic
|
|
110
|
+
decisions/<slug>.md # ADRs: Context, Decision, Consequences, Rejected alternatives
|
|
111
|
+
handbook/<feature>.md # how it actually works today (tracks the code it describes)
|
|
112
|
+
tests/integration-tests.md # core scenarios
|
|
113
|
+
tests/e2e-tests.md
|
|
114
|
+
workflow/coding-workflow.md # CI, branches, PRs, release
|
|
115
|
+
quality/code-quality.md # optional — your code-quality rules
|
|
116
|
+
skills/*.skill.md # optional — your own domain skills
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Handbooks and test plans declare the code they describe in a `tracks:` frontmatter field. When that code changes and the doc doesn't, the drift linter notices.
|
|
120
|
+
|
|
121
|
+
Every file has a template and a writer skill, so you rarely start from a blank page.
|
|
122
|
+
|
|
123
|
+
## What's included
|
|
124
|
+
|
|
125
|
+
**4 agents** — rendered side by side; you pick one when you start a session.
|
|
126
|
+
|
|
127
|
+
| Agent | Role |
|
|
128
|
+
|---|---|
|
|
129
|
+
| `planning` | Turns a request into an implementation plan; drafts missing specs and test plans first. |
|
|
130
|
+
| `coding` | Implements a feature in doc-first order: docs, code, doc update, commit. |
|
|
131
|
+
| `review` | Audits a diff or codebase and returns an actionable verdict, including doc gaps. |
|
|
132
|
+
| `merge` | Merges (PR + tag) and makes sure a final ADR records the decision. |
|
|
133
|
+
|
|
134
|
+
**9 skills**, each with a slash command:
|
|
135
|
+
|
|
136
|
+
| Command | Skill | What it does |
|
|
137
|
+
|---|---|---|
|
|
138
|
+
| `/doc-audit` | `doc-audit` | Audits completeness and freshness of all doc pillars. |
|
|
139
|
+
| `/drift` | `drift-detector` | Finds where docs no longer match the code. |
|
|
140
|
+
| `/spec` | `spec-writer` | Guided writing of a tech-agnostic spec. |
|
|
141
|
+
| `/decision` | `decision-record-writer` | Writes an ADR, spotting implicit decisions in your diff. |
|
|
142
|
+
| `/handbook` | `handbook-writer` | Documents how a feature is actually implemented. |
|
|
143
|
+
| `/test-plan` | `test-plan-writer` | Keeps integration and e2e test plans up to date. |
|
|
144
|
+
| `/workflow` | `workflow-writer` | Documents CI, environments, PR process, branches, release. |
|
|
145
|
+
| `/readme` | `readme-writer` | Keeps the README in sync with the code. |
|
|
146
|
+
| `/clean-code` | `clean-code-guardian` | Reviews code quality against your `docs/quality/` rules. |
|
|
147
|
+
|
|
148
|
+
**14 linters** — mechanical checks, fast enough to run on every turn.
|
|
149
|
+
|
|
150
|
+
<details>
|
|
151
|
+
<summary>See the list</summary>
|
|
152
|
+
|
|
153
|
+
| Linter | Checks |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `readme-presence`, `readme-sections` | `README.md` exists and has a title and a quick start. |
|
|
156
|
+
| `doc-layout`, `cardinal-files` | The `docs/` folders and required files exist. |
|
|
157
|
+
| `spec-has-content`, `spec-tech-agnostic` | Specs exist and don't name frameworks or vendors. |
|
|
158
|
+
| `decision-schema` | Each ADR has its four sections. |
|
|
159
|
+
| `adr-no-tracks`, `orphan-decisions` | ADRs stay frozen and are referenced somewhere. |
|
|
160
|
+
| `frontmatter-tracks`, `tracks-drift` | Tracked paths exist; docs aren't older than the code they track. |
|
|
161
|
+
| `cross-links` | Links between docs resolve. |
|
|
162
|
+
| `gitignore-harness` | Generated files stay out of Git. |
|
|
163
|
+
| `quality-schema` | `docs/quality/code-quality.md` has its sections, if you use it. |
|
|
164
|
+
|
|
165
|
+
</details>
|
|
166
|
+
|
|
167
|
+
## Engine support
|
|
168
|
+
|
|
169
|
+
| | Claude Code | Codex | OpenCode |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| Agents | `.claude/agents/` | `.codex/agents/*.toml` | `.opencode/agents/` |
|
|
172
|
+
| Skills | `.claude/skills/` | `.agents/skills/` | reuses the above |
|
|
173
|
+
| Slash commands | ✓ | — invoke skills by name | ✓ |
|
|
174
|
+
| Stop hook | `.claude/settings.json` | `.codex/hooks.json` | plugin (1.x and 2.x) |
|
|
175
|
+
| Hook runs after | workspace trust | project trust **and** hook approval (`/hooks`) | — |
|
|
176
|
+
| MCP (opt-in) | `.mcp.json` | `.codex/config.toml` | `.opencode/opencode.json` |
|
|
177
|
+
|
|
178
|
+
Only use one engine? `--engines=claude-code` (or `codex-cli`, `opencode`, comma-separated).
|
|
179
|
+
|
|
180
|
+
## Adopting it on an existing project
|
|
181
|
+
|
|
182
|
+
You don't have to write all the docs on day one.
|
|
183
|
+
|
|
184
|
+
- **See where you stand:** `npx @vaubaan/harness lint` lists what's missing, with the skill that fixes each item.
|
|
185
|
+
- **Let the agent do the first pass:** `/doc-audit`, then `/spec`, `/handbook` and `/decision` on the parts you touch.
|
|
186
|
+
- **Pause the Stop hook while you bootstrap:** `HARNESS_LINT_DISABLE=1`, or install without it: `init . --no-stop-hook`. When a retry makes no progress, the hook lets the turn end.
|
|
187
|
+
- **Back out anytime:** `npx @vaubaan/harness uninstall .` removes what `init` wrote. Your own files, and config entries you edited, are left in place.
|
|
188
|
+
|
|
189
|
+
## Use it in CI
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
# .github/workflows/docs.yml
|
|
193
|
+
name: docs
|
|
194
|
+
on: [push, pull_request]
|
|
195
|
+
jobs:
|
|
196
|
+
lint:
|
|
197
|
+
runs-on: ubuntu-latest
|
|
198
|
+
steps:
|
|
199
|
+
- uses: actions/checkout@v4
|
|
200
|
+
- uses: actions/setup-node@v4
|
|
201
|
+
with:
|
|
202
|
+
node-version: 22
|
|
203
|
+
- run: npx -y @vaubaan/harness lint
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`lint` exits non-zero on errors. Use `--format json` for machine-readable output and `--pillar <name>` to check a single pillar.
|
|
207
|
+
|
|
208
|
+
## Commands
|
|
209
|
+
|
|
210
|
+
| Command | What it does |
|
|
211
|
+
|---|---|
|
|
212
|
+
| `init <dir>` | Render the harness into a project. |
|
|
213
|
+
| `update [dir]` | Re-render with the installed version, keeping your settings. `--dry-run --json` previews. |
|
|
214
|
+
| `uninstall <dir>` | Remove what `init` wrote, leaving your own files in place. |
|
|
215
|
+
| `lint` | Run the linters. |
|
|
216
|
+
| `check <dir>` | Quick layout check: doc folders and `.gitignore`. |
|
|
217
|
+
| `render --out <dir>` | Preview the render somewhere harmless. |
|
|
218
|
+
|
|
219
|
+
Run them with `npx @vaubaan/harness <command>`. If the package is installed in the project (`npm i -D @vaubaan/harness`), that uses the local version; otherwise `npx` downloads it (`-y` skips the confirmation prompt).
|
|
220
|
+
|
|
221
|
+
## Configuration
|
|
222
|
+
|
|
223
|
+
<details>
|
|
224
|
+
<summary><b>Ignore paths in lint</b></summary>
|
|
225
|
+
|
|
226
|
+
`node_modules/` and `dist/` are ignored by default. Add more in `.harnessrc.json` (or `.harnessrc`, `.harnessrc.yaml`, `harness.config.js`, or a `"harness"` key in `package.json`):
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"lint": {
|
|
231
|
+
"ignore": ["vendor/**", "packages/legacy/**"]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Patterns use [fast-glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) syntax and add to the defaults.
|
|
237
|
+
|
|
238
|
+
</details>
|
|
239
|
+
|
|
240
|
+
<details>
|
|
241
|
+
<summary><b>Local overrides</b></summary>
|
|
242
|
+
|
|
243
|
+
Try a custom agent, skill or command without forking, in a gitignored `.harness-overrides/` folder:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
.harness-overrides/
|
|
247
|
+
agents/ *.agent.md
|
|
248
|
+
skills/ *.skill.md
|
|
249
|
+
commands/ *.cmd.md
|
|
250
|
+
disable.yaml # disable: [readme-writer, workflow-writer]
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Overrides are personal and disposable. Skills meant for the whole team go in `docs/skills/`, which is versioned. See [overrides loading](./docs/handbook/overrides-loading.md).
|
|
254
|
+
|
|
255
|
+
</details>
|
|
256
|
+
|
|
257
|
+
<details>
|
|
258
|
+
<summary><b>MCP servers</b></summary>
|
|
259
|
+
|
|
260
|
+
None by default. `init . --with-mcp=context7` adds [Context7](https://github.com/upstash/context7) (library documentation) to each engine's MCP config. Codex only loads project config in a trusted project.
|
|
261
|
+
|
|
262
|
+
</details>
|
|
263
|
+
|
|
264
|
+
<details>
|
|
265
|
+
<summary><b>Updating</b></summary>
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
npm i -D @vaubaan/harness@latest
|
|
269
|
+
npx @vaubaan/harness update . --dry-run --json # preview
|
|
270
|
+
npx @vaubaan/harness update .
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`update` keeps your engines, hook preference, MCP entries and hook edits. Generated files you modified are reported instead of overwritten: move the change to `.harness-overrides/`, or keep the file as yours with `--preserve AGENTS.md`. A backup is written outside the project before any change. Details: [updating a project](./docs/handbook/project-update.md).
|
|
274
|
+
|
|
275
|
+
</details>
|
|
276
|
+
|
|
277
|
+
## FAQ
|
|
278
|
+
|
|
279
|
+
**Does it phone home?** No. No telemetry, no daemon. It writes files and runs linters locally.
|
|
280
|
+
|
|
281
|
+
**Do I need all three engines?** No. Everything is rendered for all three by default because it costs nothing, but `--engines` narrows it.
|
|
282
|
+
|
|
283
|
+
**Can I write my docs in another language?** Prose, yes. The linters look for English section headings (`## Context`, `## Decision`…); French headings are also accepted.
|
|
284
|
+
|
|
285
|
+
**Does it work in a monorepo?** Run it at the repository root and use `lint.ignore` for sub-projects you don't want checked.
|
|
286
|
+
|
|
287
|
+
**Is this tied to Vaubaan?** No. Vaubaan builds it and uses it on its own projects — including this one, which is harnessed by itself.
|
|
288
|
+
|
|
289
|
+
## Documentation
|
|
290
|
+
|
|
291
|
+
- [Spec](./docs/spec/coding-agent-harness.md) — what the harness is and why
|
|
292
|
+
- [Decisions](./docs/decisions/) — architecture choices and their alternatives
|
|
293
|
+
- [Handbook](./docs/handbook/) — how each part works today
|
|
294
|
+
- [Test plans](./docs/tests/) and [workflow](./docs/workflow/coding-workflow.md)
|
|
295
|
+
- [Changelog](./CHANGELOG.md)
|
|
296
|
+
|
|
297
|
+
## Contributing
|
|
298
|
+
|
|
299
|
+
Issues and pull requests are welcome. Setup, conventions and the doc-first workflow are in [CONTRIBUTING.md](./CONTRIBUTING.md); security reports go through [SECURITY.md](./SECURITY.md).
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
git clone https://github.com/vaubaan/harness.git && cd harness
|
|
303
|
+
npm ci && npm run ci
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## License
|
|
307
|
+
|
|
308
|
+
[Apache 2.0](./LICENSE) — see [NOTICE](./NOTICE).
|