harness-engineer 0.1.0 → 0.2.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.
- package/CHANGELOG.md +13 -0
- package/README.md +52 -27
- package/README.zh-CN.md +52 -27
- package/dist/presets.d.ts +0 -1
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +291 -926
- package/dist/presets.js.map +1 -1
- package/dist/status.js +1 -1
- package/dist/status.js.map +1 -1
- package/dist/tasks.js +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- aligned the default `generic-software` preset with OpenAI's harness engineering article
|
|
6
|
+
- switched the Codex entrypoint from generated `AGENTS.md` to generated `AGENTS.override.md`
|
|
7
|
+
- reorganized generated repository docs around `design-docs`, `product-specs`, `generated`, `references`, and `exec-plans`
|
|
8
|
+
- removed the old `agentadmin-codex` compatibility preset to keep the package repository-independent
|
|
9
|
+
- updated package metadata for published consumers, including `main`, `types`, and `exports`
|
|
10
|
+
|
|
11
|
+
## 0.1.0
|
|
12
|
+
|
|
13
|
+
- initial public release of the `harness-engineer` npm package
|
package/README.md
CHANGED
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
# harness-engineer
|
|
2
2
|
|
|
3
|
-
`harness-engineer` is
|
|
3
|
+
`harness-engineer` is an open-source Codex-first scaffolding CLI for repository-owned orchestration workflows.
|
|
4
4
|
|
|
5
|
-
It
|
|
5
|
+
It packages the "harness as files" pattern into a reusable npm package: fixed roles, durable memory, runbooks, record-system docs, and execution-plan artifacts can all be generated into a blank repository with one command.
|
|
6
6
|
|
|
7
7
|
中文说明见 [README.zh-CN.md](./README.zh-CN.md)。
|
|
8
8
|
|
|
9
9
|
> License: [MIT](./LICENSE)
|
|
10
|
+
> Package: [`harness-engineer` on npm](https://www.npmjs.com/package/harness-engineer)
|
|
11
|
+
> Changelog: [CHANGELOG.md](./CHANGELOG.md)
|
|
12
|
+
|
|
13
|
+
## Why This Shape
|
|
14
|
+
|
|
15
|
+
The default preset is now aligned with OpenAI's harness engineering article:
|
|
16
|
+
|
|
17
|
+
- keep the Codex entrypoint short
|
|
18
|
+
- treat repository docs as the system of record
|
|
19
|
+
- keep execution plans versioned and durable
|
|
20
|
+
- give agents progressively deeper context instead of one giant instruction file
|
|
21
|
+
|
|
22
|
+
The article uses `AGENTS.md` conceptually. This package generates `AGENTS.override.md` because that is the Codex entrypoint this tool targets.
|
|
10
23
|
|
|
11
24
|
## What It Creates
|
|
12
25
|
|
|
13
|
-
- `AGENTS.md` as the short collaboration
|
|
26
|
+
- `AGENTS.override.md` as the short Codex collaboration map
|
|
14
27
|
- `.codex/config.toml` and fixed role files under `.codex/agents/`
|
|
15
28
|
- durable memory under `.codex/memory/`
|
|
16
|
-
- `
|
|
17
|
-
-
|
|
29
|
+
- `ARCHITECTURE.md` plus record-system docs under `docs/design-docs/`, `docs/product-specs/`, `docs/generated/`, and `docs/references/`
|
|
30
|
+
- execution-plan folders under `docs/exec-plans/` and run artifacts under `logs/codex/`
|
|
18
31
|
- a machine-readable `harness-engineer.config.json`
|
|
19
32
|
|
|
20
33
|
## Quick Start
|
|
21
34
|
|
|
22
|
-
|
|
35
|
+
The package is published on npm. The fastest way to scaffold a new repository is:
|
|
23
36
|
|
|
24
37
|
```bash
|
|
25
38
|
pnpm dlx harness-engineer@latest init . \
|
|
26
39
|
--preset generic-software \
|
|
27
40
|
--project-name "Acme Platform" \
|
|
41
|
+
--language bilingual \
|
|
28
42
|
--yes
|
|
29
43
|
|
|
30
44
|
harness-engineer task new 2026-04-02-auth-debug --class B
|
|
@@ -40,12 +54,13 @@ pnpm build
|
|
|
40
54
|
node dist/cli.js init . \
|
|
41
55
|
--preset generic-software \
|
|
42
56
|
--project-name "Acme Platform" \
|
|
57
|
+
--language bilingual \
|
|
43
58
|
--yes
|
|
44
59
|
```
|
|
45
60
|
|
|
46
|
-
## Install
|
|
61
|
+
## Install Options
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
### From npm without installing globally
|
|
49
64
|
|
|
50
65
|
```bash
|
|
51
66
|
pnpm dlx harness-engineer@latest init . \
|
|
@@ -55,13 +70,20 @@ pnpm dlx harness-engineer@latest init . \
|
|
|
55
70
|
--yes
|
|
56
71
|
```
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
### Install into an existing project
|
|
59
74
|
|
|
60
75
|
```bash
|
|
61
76
|
npm install -D harness-engineer
|
|
62
77
|
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
63
78
|
```
|
|
64
79
|
|
|
80
|
+
### Install directly from GitHub
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm install -D git+https://github.com/Dai5297/harness-engineer-codex.git
|
|
84
|
+
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
85
|
+
```
|
|
86
|
+
|
|
65
87
|
## Presets
|
|
66
88
|
|
|
67
89
|
### `generic-software`
|
|
@@ -77,20 +99,24 @@ Fixed roles:
|
|
|
77
99
|
- `reviewer`
|
|
78
100
|
- `qa-guard`
|
|
79
101
|
|
|
80
|
-
|
|
102
|
+
Record-system docs are organized like this:
|
|
81
103
|
|
|
82
|
-
|
|
104
|
+
- `ARCHITECTURE.md`
|
|
105
|
+
- `docs/design-docs/`
|
|
106
|
+
- `docs/product-specs/`
|
|
107
|
+
- `docs/generated/`
|
|
108
|
+
- `docs/references/`
|
|
109
|
+
- `docs/exec-plans/`
|
|
83
110
|
|
|
84
|
-
|
|
111
|
+
## Language Modes
|
|
85
112
|
|
|
86
|
-
|
|
113
|
+
`init` supports three output modes:
|
|
87
114
|
|
|
88
|
-
- `
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `qa-guard`
|
|
115
|
+
- `en` for English-only harness files
|
|
116
|
+
- `zh` for Chinese-localized harness files
|
|
117
|
+
- `bilingual` for bilingual harness docs, including `AGENTS.override.md`
|
|
118
|
+
|
|
119
|
+
Canonical file paths stay unchanged across all three modes.
|
|
94
120
|
|
|
95
121
|
## CLI
|
|
96
122
|
|
|
@@ -108,11 +134,10 @@ harness-engineer init [dir] \
|
|
|
108
134
|
|
|
109
135
|
Notes:
|
|
110
136
|
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- `--dev-command` generates `.codex/environments/environment.toml
|
|
114
|
-
- `init` also adds `harness-engineer` to `devDependencies
|
|
115
|
-
- `--language bilingual` keeps the base `AGENTS.md` canonical and adds a bilingual `AGENTS.override.md` plus localized core harness docs.
|
|
137
|
+
- generates files only when missing by default
|
|
138
|
+
- use `--force` to overwrite managed templates
|
|
139
|
+
- `--dev-command` generates `.codex/environments/environment.toml`
|
|
140
|
+
- `init` also adds `harness-engineer` to `devDependencies`
|
|
116
141
|
|
|
117
142
|
### `task new`
|
|
118
143
|
|
|
@@ -122,7 +147,7 @@ harness-engineer task new <slug> --class A|B|C
|
|
|
122
147
|
|
|
123
148
|
Creates:
|
|
124
149
|
|
|
125
|
-
- `docs/plans/active/<slug>.md`
|
|
150
|
+
- `docs/exec-plans/active/<slug>.md`
|
|
126
151
|
- `logs/codex/active/<slug>/run.md`
|
|
127
152
|
- `logs/codex/active/<slug>/handoff.md`
|
|
128
153
|
|
|
@@ -162,13 +187,13 @@ The package is intentionally source-first. `dist/`, `coverage/`, and `node_modul
|
|
|
162
187
|
|
|
163
188
|
- unit tests for rendering, config helpers, and preset selection
|
|
164
189
|
- integration tests for init, task lifecycle, CLI smoke flow, and status drift detection
|
|
165
|
-
-
|
|
190
|
+
- independence checks to ensure generated output does not retain external-project identifiers or machine-local paths
|
|
166
191
|
|
|
167
192
|
## Repository Layout
|
|
168
193
|
|
|
169
194
|
```text
|
|
170
195
|
src/ source code for the CLI and generators
|
|
171
|
-
tests/ unit
|
|
196
|
+
tests/ unit and integration tests
|
|
172
197
|
```
|
|
173
198
|
|
|
174
199
|
## Open-Source Release Notes
|
package/README.zh-CN.md
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
# harness-engineer
|
|
2
2
|
|
|
3
|
-
`harness-engineer`
|
|
3
|
+
`harness-engineer` 是一个开源的 Codex 优先仓库脚手架 CLI,用来把“harness 作为文件结构”的协作方式封装成可复用 npm 包。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
它可以在空白仓库中一次性生成固定角色、长期记忆、runbook、记录系统文档以及执行计划闭环,让 AI 协作方式能够直接沉淀到仓库本身。
|
|
6
6
|
|
|
7
7
|
> 许可证:[MIT](./LICENSE)
|
|
8
|
+
> npm 包地址:[harness-engineer](https://www.npmjs.com/package/harness-engineer)
|
|
9
|
+
> 更新记录:[CHANGELOG.md](./CHANGELOG.md)
|
|
10
|
+
|
|
11
|
+
## 为什么现在是这个结构
|
|
12
|
+
|
|
13
|
+
默认 preset 已按 OpenAI 的 harness engineering 文章思路调整:
|
|
14
|
+
|
|
15
|
+
- 让 Codex 入口文件保持简短
|
|
16
|
+
- 把仓库文档当成记录系统
|
|
17
|
+
- 把执行计划当成一等工件进行版本化
|
|
18
|
+
- 通过渐进式披露提供上下文,而不是塞一个巨大说明书
|
|
19
|
+
|
|
20
|
+
文章里使用的是 `AGENTS.md` 概念;这个工具面向 Codex,因此实际生成的是 `AGENTS.override.md`。
|
|
8
21
|
|
|
9
22
|
## 它会生成什么
|
|
10
23
|
|
|
11
|
-
- `AGENTS.md`
|
|
24
|
+
- `AGENTS.override.md` 作为简短的 Codex 协作地图
|
|
12
25
|
- `.codex/config.toml` 和 `.codex/agents/` 下的固定角色文件
|
|
13
26
|
- `.codex/memory/` 下的长期记忆
|
|
14
|
-
- `
|
|
15
|
-
- `docs/plans/`
|
|
27
|
+
- `ARCHITECTURE.md` 以及 `docs/design-docs/`、`docs/product-specs/`、`docs/generated/`、`docs/references/` 下的记录系统文档
|
|
28
|
+
- `docs/exec-plans/` 下的执行计划,以及 `logs/codex/` 下的运行产物
|
|
16
29
|
- 机器可读配置 `harness-engineer.config.json`
|
|
17
30
|
|
|
18
31
|
## 快速开始
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
当前版本已经发布到 npm,最快的初始化方式是:
|
|
21
34
|
|
|
22
35
|
```bash
|
|
23
36
|
pnpm dlx harness-engineer@latest init . \
|
|
24
37
|
--preset generic-software \
|
|
25
38
|
--project-name "Acme Platform" \
|
|
39
|
+
--language bilingual \
|
|
26
40
|
--yes
|
|
27
41
|
|
|
28
42
|
harness-engineer task new 2026-04-02-auth-debug --class B
|
|
@@ -38,12 +52,13 @@ pnpm build
|
|
|
38
52
|
node dist/cli.js init . \
|
|
39
53
|
--preset generic-software \
|
|
40
54
|
--project-name "Acme Platform" \
|
|
55
|
+
--language bilingual \
|
|
41
56
|
--yes
|
|
42
57
|
```
|
|
43
58
|
|
|
44
|
-
##
|
|
59
|
+
## 安装方式
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
### 直接从 npm 运行
|
|
47
62
|
|
|
48
63
|
```bash
|
|
49
64
|
pnpm dlx harness-engineer@latest init . \
|
|
@@ -53,13 +68,20 @@ pnpm dlx harness-engineer@latest init . \
|
|
|
53
68
|
--yes
|
|
54
69
|
```
|
|
55
70
|
|
|
56
|
-
|
|
71
|
+
### 安装到现有项目中
|
|
57
72
|
|
|
58
73
|
```bash
|
|
59
74
|
npm install -D harness-engineer
|
|
60
75
|
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
61
76
|
```
|
|
62
77
|
|
|
78
|
+
### 直接从 GitHub 安装
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm install -D git+https://github.com/Dai5297/harness-engineer-codex.git
|
|
82
|
+
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
83
|
+
```
|
|
84
|
+
|
|
63
85
|
## 预设
|
|
64
86
|
|
|
65
87
|
### `generic-software`
|
|
@@ -75,20 +97,24 @@ npx harness-engineer init . --preset generic-software --project-name "Acme Platf
|
|
|
75
97
|
- `reviewer`
|
|
76
98
|
- `qa-guard`
|
|
77
99
|
|
|
78
|
-
|
|
100
|
+
记录系统文档按以下结构组织:
|
|
79
101
|
|
|
80
|
-
|
|
102
|
+
- `ARCHITECTURE.md`
|
|
103
|
+
- `docs/design-docs/`
|
|
104
|
+
- `docs/product-specs/`
|
|
105
|
+
- `docs/generated/`
|
|
106
|
+
- `docs/references/`
|
|
107
|
+
- `docs/exec-plans/`
|
|
81
108
|
|
|
82
|
-
|
|
109
|
+
## 语言模式
|
|
83
110
|
|
|
84
|
-
|
|
111
|
+
`init` 支持三种输出模式:
|
|
85
112
|
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- `qa-guard`
|
|
113
|
+
- `en`:仅英文 harness 文件
|
|
114
|
+
- `zh`:中文本地化 harness 文件
|
|
115
|
+
- `bilingual`:双语 harness 文档,包括 `AGENTS.override.md`
|
|
116
|
+
|
|
117
|
+
三种模式都保持相同的标准文件路径。
|
|
92
118
|
|
|
93
119
|
## CLI 命令
|
|
94
120
|
|
|
@@ -106,11 +132,10 @@ harness-engineer init [dir] \
|
|
|
106
132
|
|
|
107
133
|
说明:
|
|
108
134
|
|
|
109
|
-
-
|
|
110
|
-
- 使用 `--force`
|
|
111
|
-
- 传入 `--dev-command` 时会生成 `.codex/environments/environment.toml
|
|
112
|
-
- `init` 会把 `harness-engineer` 自动加入 `devDependencies
|
|
113
|
-
- `--language bilingual` 会保留标准 `AGENTS.md`,并额外生成双语版 `AGENTS.override.md` 与本地化核心 harness 文档。
|
|
135
|
+
- 默认只生成缺失文件,不覆盖已有模板
|
|
136
|
+
- 使用 `--force` 可以覆盖受管理模板
|
|
137
|
+
- 传入 `--dev-command` 时会生成 `.codex/environments/environment.toml`
|
|
138
|
+
- `init` 会把 `harness-engineer` 自动加入 `devDependencies`
|
|
114
139
|
|
|
115
140
|
### `task new`
|
|
116
141
|
|
|
@@ -120,7 +145,7 @@ harness-engineer task new <slug> --class A|B|C
|
|
|
120
145
|
|
|
121
146
|
会创建:
|
|
122
147
|
|
|
123
|
-
- `docs/plans/active/<slug>.md`
|
|
148
|
+
- `docs/exec-plans/active/<slug>.md`
|
|
124
149
|
- `logs/codex/active/<slug>/run.md`
|
|
125
150
|
- `logs/codex/active/<slug>/handoff.md`
|
|
126
151
|
|
|
@@ -160,13 +185,13 @@ pnpm build
|
|
|
160
185
|
|
|
161
186
|
- 单元测试:渲染、配置、预设选择
|
|
162
187
|
- 集成测试:init、任务生命周期、CLI smoke、status 漂移检查
|
|
163
|
-
-
|
|
188
|
+
- 独立性校验:确保生成结果不再残留外部项目标识或本机绝对路径
|
|
164
189
|
|
|
165
190
|
## 仓库结构
|
|
166
191
|
|
|
167
192
|
```text
|
|
168
193
|
src/ CLI 与生成器源码
|
|
169
|
-
tests/
|
|
194
|
+
tests/ 单元与集成测试
|
|
170
195
|
```
|
|
171
196
|
|
|
172
197
|
## 开源发布说明
|
package/dist/presets.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export interface PresetDefinition {
|
|
|
10
10
|
paths: HarnessPathsConfig;
|
|
11
11
|
roles: HarnessRoleConfig[];
|
|
12
12
|
truthSources: TruthSourceConfig[];
|
|
13
|
-
includeOverrideFile: boolean;
|
|
14
13
|
buildManagedFiles(config: HarnessConfig): GeneratedFile[];
|
|
15
14
|
}
|
|
16
15
|
export declare function getPreset(key: string): PresetDefinition;
|
package/dist/presets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG1G,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG1G,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,EAAE,CAAC;CAC3D;AA8tDD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAQvD"}
|