harness-engineer 0.1.0 → 0.2.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/CHANGELOG.md +18 -0
- package/README.md +55 -27
- package/README.zh-CN.md +55 -27
- package/dist/presets.d.ts +0 -1
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +420 -951
- 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,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
- clarified that `harness-engineer init` bootstraps the full repository-owned Codex baseline in one command
|
|
6
|
+
- updated generated prompts and documentation to tell Codex to reuse the scaffolded subagents, config, memory, runbooks, and docs before inventing ad hoc setup
|
|
7
|
+
|
|
8
|
+
## 0.2.0
|
|
9
|
+
|
|
10
|
+
- aligned the default `generic-software` preset with OpenAI's harness engineering article
|
|
11
|
+
- switched the Codex entrypoint from generated `AGENTS.md` to generated `AGENTS.override.md`
|
|
12
|
+
- reorganized generated repository docs around `design-docs`, `product-specs`, `generated`, `references`, and `exec-plans`
|
|
13
|
+
- removed the old `agentadmin-codex` compatibility preset to keep the package repository-independent
|
|
14
|
+
- updated package metadata for published consumers, including `main`, `types`, and `exports`
|
|
15
|
+
|
|
16
|
+
## 0.1.0
|
|
17
|
+
|
|
18
|
+
- initial public release of the `harness-engineer` npm package
|
package/README.md
CHANGED
|
@@ -1,36 +1,52 @@
|
|
|
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
|
|
31
45
|
harness-engineer status
|
|
32
46
|
```
|
|
33
47
|
|
|
48
|
+
That single `init` command is intended to bootstrap the full repository-owned Codex baseline in one pass: fixed subagents, `.codex` config, durable memory, runbooks, record-system docs, and task directories.
|
|
49
|
+
|
|
34
50
|
If you are running from this source repository:
|
|
35
51
|
|
|
36
52
|
```bash
|
|
@@ -40,12 +56,13 @@ pnpm build
|
|
|
40
56
|
node dist/cli.js init . \
|
|
41
57
|
--preset generic-software \
|
|
42
58
|
--project-name "Acme Platform" \
|
|
59
|
+
--language bilingual \
|
|
43
60
|
--yes
|
|
44
61
|
```
|
|
45
62
|
|
|
46
|
-
## Install
|
|
63
|
+
## Install Options
|
|
47
64
|
|
|
48
|
-
|
|
65
|
+
### From npm without installing globally
|
|
49
66
|
|
|
50
67
|
```bash
|
|
51
68
|
pnpm dlx harness-engineer@latest init . \
|
|
@@ -55,13 +72,20 @@ pnpm dlx harness-engineer@latest init . \
|
|
|
55
72
|
--yes
|
|
56
73
|
```
|
|
57
74
|
|
|
58
|
-
|
|
75
|
+
### Install into an existing project
|
|
59
76
|
|
|
60
77
|
```bash
|
|
61
78
|
npm install -D harness-engineer
|
|
62
79
|
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
63
80
|
```
|
|
64
81
|
|
|
82
|
+
### Install directly from GitHub
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install -D git+https://github.com/Dai5297/harness-engineer-codex.git
|
|
86
|
+
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
87
|
+
```
|
|
88
|
+
|
|
65
89
|
## Presets
|
|
66
90
|
|
|
67
91
|
### `generic-software`
|
|
@@ -77,20 +101,24 @@ Fixed roles:
|
|
|
77
101
|
- `reviewer`
|
|
78
102
|
- `qa-guard`
|
|
79
103
|
|
|
80
|
-
|
|
104
|
+
Record-system docs are organized like this:
|
|
81
105
|
|
|
82
|
-
|
|
106
|
+
- `ARCHITECTURE.md`
|
|
107
|
+
- `docs/design-docs/`
|
|
108
|
+
- `docs/product-specs/`
|
|
109
|
+
- `docs/generated/`
|
|
110
|
+
- `docs/references/`
|
|
111
|
+
- `docs/exec-plans/`
|
|
83
112
|
|
|
84
|
-
|
|
113
|
+
## Language Modes
|
|
85
114
|
|
|
86
|
-
|
|
115
|
+
`init` supports three output modes:
|
|
87
116
|
|
|
88
|
-
- `
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `qa-guard`
|
|
117
|
+
- `en` for English-only harness files
|
|
118
|
+
- `zh` for Chinese-localized harness files
|
|
119
|
+
- `bilingual` for bilingual harness docs, including `AGENTS.override.md`
|
|
120
|
+
|
|
121
|
+
Canonical file paths stay unchanged across all three modes.
|
|
94
122
|
|
|
95
123
|
## CLI
|
|
96
124
|
|
|
@@ -108,11 +136,11 @@ harness-engineer init [dir] \
|
|
|
108
136
|
|
|
109
137
|
Notes:
|
|
110
138
|
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- `--dev-command` generates `.codex/environments/environment.toml
|
|
114
|
-
- `init` also adds `harness-engineer` to `devDependencies
|
|
115
|
-
-
|
|
139
|
+
- generates files only when missing by default
|
|
140
|
+
- use `--force` to overwrite managed templates
|
|
141
|
+
- `--dev-command` generates `.codex/environments/environment.toml`
|
|
142
|
+
- `init` also adds `harness-engineer` to `devDependencies`
|
|
143
|
+
- `init` is designed to fully scaffold the baseline harness, not just create a minimal starter file
|
|
116
144
|
|
|
117
145
|
### `task new`
|
|
118
146
|
|
|
@@ -122,7 +150,7 @@ harness-engineer task new <slug> --class A|B|C
|
|
|
122
150
|
|
|
123
151
|
Creates:
|
|
124
152
|
|
|
125
|
-
- `docs/plans/active/<slug>.md`
|
|
153
|
+
- `docs/exec-plans/active/<slug>.md`
|
|
126
154
|
- `logs/codex/active/<slug>/run.md`
|
|
127
155
|
- `logs/codex/active/<slug>/handoff.md`
|
|
128
156
|
|
|
@@ -162,13 +190,13 @@ The package is intentionally source-first. `dist/`, `coverage/`, and `node_modul
|
|
|
162
190
|
|
|
163
191
|
- unit tests for rendering, config helpers, and preset selection
|
|
164
192
|
- integration tests for init, task lifecycle, CLI smoke flow, and status drift detection
|
|
165
|
-
-
|
|
193
|
+
- independence checks to ensure generated output does not retain external-project identifiers or machine-local paths
|
|
166
194
|
|
|
167
195
|
## Repository Layout
|
|
168
196
|
|
|
169
197
|
```text
|
|
170
198
|
src/ source code for the CLI and generators
|
|
171
|
-
tests/ unit
|
|
199
|
+
tests/ unit and integration tests
|
|
172
200
|
```
|
|
173
201
|
|
|
174
202
|
## Open-Source Release Notes
|
package/README.zh-CN.md
CHANGED
|
@@ -1,34 +1,50 @@
|
|
|
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
|
|
29
43
|
harness-engineer status
|
|
30
44
|
```
|
|
31
45
|
|
|
46
|
+
这条 `init` 命令的目标就是一次性铺好完整的仓库内 Codex 基线:固定子代理、`.codex` 配置、长期记忆、runbook、记录系统文档以及任务目录。
|
|
47
|
+
|
|
32
48
|
如果你是在当前源码仓库里本地运行:
|
|
33
49
|
|
|
34
50
|
```bash
|
|
@@ -38,12 +54,13 @@ pnpm build
|
|
|
38
54
|
node dist/cli.js init . \
|
|
39
55
|
--preset generic-software \
|
|
40
56
|
--project-name "Acme Platform" \
|
|
57
|
+
--language bilingual \
|
|
41
58
|
--yes
|
|
42
59
|
```
|
|
43
60
|
|
|
44
|
-
##
|
|
61
|
+
## 安装方式
|
|
45
62
|
|
|
46
|
-
|
|
63
|
+
### 直接从 npm 运行
|
|
47
64
|
|
|
48
65
|
```bash
|
|
49
66
|
pnpm dlx harness-engineer@latest init . \
|
|
@@ -53,13 +70,20 @@ pnpm dlx harness-engineer@latest init . \
|
|
|
53
70
|
--yes
|
|
54
71
|
```
|
|
55
72
|
|
|
56
|
-
|
|
73
|
+
### 安装到现有项目中
|
|
57
74
|
|
|
58
75
|
```bash
|
|
59
76
|
npm install -D harness-engineer
|
|
60
77
|
npx harness-engineer init . --preset generic-software --project-name "Acme Platform"
|
|
61
78
|
```
|
|
62
79
|
|
|
80
|
+
### 直接从 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
|
+
|
|
63
87
|
## 预设
|
|
64
88
|
|
|
65
89
|
### `generic-software`
|
|
@@ -75,20 +99,24 @@ npx harness-engineer init . --preset generic-software --project-name "Acme Platf
|
|
|
75
99
|
- `reviewer`
|
|
76
100
|
- `qa-guard`
|
|
77
101
|
|
|
78
|
-
|
|
102
|
+
记录系统文档按以下结构组织:
|
|
79
103
|
|
|
80
|
-
|
|
104
|
+
- `ARCHITECTURE.md`
|
|
105
|
+
- `docs/design-docs/`
|
|
106
|
+
- `docs/product-specs/`
|
|
107
|
+
- `docs/generated/`
|
|
108
|
+
- `docs/references/`
|
|
109
|
+
- `docs/exec-plans/`
|
|
81
110
|
|
|
82
|
-
|
|
111
|
+
## 语言模式
|
|
83
112
|
|
|
84
|
-
|
|
113
|
+
`init` 支持三种输出模式:
|
|
85
114
|
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- `qa-guard`
|
|
115
|
+
- `en`:仅英文 harness 文件
|
|
116
|
+
- `zh`:中文本地化 harness 文件
|
|
117
|
+
- `bilingual`:双语 harness 文档,包括 `AGENTS.override.md`
|
|
118
|
+
|
|
119
|
+
三种模式都保持相同的标准文件路径。
|
|
92
120
|
|
|
93
121
|
## CLI 命令
|
|
94
122
|
|
|
@@ -106,11 +134,11 @@ harness-engineer init [dir] \
|
|
|
106
134
|
|
|
107
135
|
说明:
|
|
108
136
|
|
|
109
|
-
-
|
|
110
|
-
- 使用 `--force`
|
|
111
|
-
- 传入 `--dev-command` 时会生成 `.codex/environments/environment.toml
|
|
112
|
-
- `init` 会把 `harness-engineer` 自动加入 `devDependencies
|
|
113
|
-
-
|
|
137
|
+
- 默认只生成缺失文件,不覆盖已有模板
|
|
138
|
+
- 使用 `--force` 可以覆盖受管理模板
|
|
139
|
+
- 传入 `--dev-command` 时会生成 `.codex/environments/environment.toml`
|
|
140
|
+
- `init` 会把 `harness-engineer` 自动加入 `devDependencies`
|
|
141
|
+
- `init` 的设计目标是完整铺设基线 harness,而不仅是生成一个最小起步文件
|
|
114
142
|
|
|
115
143
|
### `task new`
|
|
116
144
|
|
|
@@ -120,7 +148,7 @@ harness-engineer task new <slug> --class A|B|C
|
|
|
120
148
|
|
|
121
149
|
会创建:
|
|
122
150
|
|
|
123
|
-
- `docs/plans/active/<slug>.md`
|
|
151
|
+
- `docs/exec-plans/active/<slug>.md`
|
|
124
152
|
- `logs/codex/active/<slug>/run.md`
|
|
125
153
|
- `logs/codex/active/<slug>/handoff.md`
|
|
126
154
|
|
|
@@ -160,13 +188,13 @@ pnpm build
|
|
|
160
188
|
|
|
161
189
|
- 单元测试:渲染、配置、预设选择
|
|
162
190
|
- 集成测试:init、任务生命周期、CLI smoke、status 漂移检查
|
|
163
|
-
-
|
|
191
|
+
- 独立性校验:确保生成结果不再残留外部项目标识或本机绝对路径
|
|
164
192
|
|
|
165
193
|
## 仓库结构
|
|
166
194
|
|
|
167
195
|
```text
|
|
168
196
|
src/ CLI 与生成器源码
|
|
169
|
-
tests/
|
|
197
|
+
tests/ 单元与集成测试
|
|
170
198
|
```
|
|
171
199
|
|
|
172
200
|
## 开源发布说明
|
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;AAs0DD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAQvD"}
|