@wnlen/agent-execution-template 0.8.14 → 0.8.15
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/docs/SPEC.md +2 -2
- package/package.json +1 -1
- package/template/en/ai/template/VERSION +1 -1
- package/template/en/ai/template/bootstrap.md +26 -0
- package/template/en/ai/template/prompt.md +6 -3
- package/template/en/ai/template/reconcile.md +10 -2
- package/template/zh/ai/template/VERSION +1 -1
- package/template/zh/ai/template/bootstrap.md +23 -0
- package/template/zh/ai/template/prompt.md +4 -2
- package/template/zh/ai/template/reconcile.md +11 -3
- package/test/selftest.js +16 -0
package/docs/SPEC.md
CHANGED
|
@@ -22,7 +22,7 @@ npx 安装协议 -> AI 整理项目上下文 -> 人类确认 -> AI 生成任务
|
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
24
|
Protocol: v0.8
|
|
25
|
-
Package: @wnlen/agent-execution-template@0.8.
|
|
25
|
+
Package: @wnlen/agent-execution-template@0.8.15
|
|
26
26
|
中文安装: npx -y @wnlen/agent-execution-template init
|
|
27
27
|
英文安装: npx -y @wnlen/agent-execution-template init --lang en
|
|
28
28
|
```
|
|
@@ -390,7 +390,7 @@ npx -y @wnlen/agent-execution-template doctor
|
|
|
390
390
|
```text
|
|
391
391
|
Agent Execution Template 检查
|
|
392
392
|
|
|
393
|
-
模板版本: 0.8.
|
|
393
|
+
模板版本: 0.8.15
|
|
394
394
|
模板语言: zh
|
|
395
395
|
|
|
396
396
|
[通过] ai/template/LANG
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.8.
|
|
1
|
+
0.8.15
|
|
@@ -89,6 +89,14 @@ or acceptance.
|
|
|
89
89
|
## Output Rules
|
|
90
90
|
|
|
91
91
|
- Mark unknown facts as `Unknown`; do not present guesses as facts.
|
|
92
|
+
- If this bootstrap run absorbs `ai/project/inbox/*.md` or
|
|
93
|
+
`ai/project/inbox/raw/*.md`, move absorbed material to
|
|
94
|
+
`ai/project/inbox/processed/` after writing context. Preserve relative paths:
|
|
95
|
+
move `ai/project/inbox/raw/file.md` to
|
|
96
|
+
`ai/project/inbox/processed/raw/file.md`. If a filename conflicts, keep the
|
|
97
|
+
original filename and add a date or sequence number. Do not move
|
|
98
|
+
`ai/project/inbox/ideas/**`.
|
|
99
|
+
- Leave unabsorbed material in place and explain why in the final response.
|
|
92
100
|
- Initialization content in `final-shape.md`, `module-map.md`, and
|
|
93
101
|
`roadmap.md` must cite evidence sources. If evidence is insufficient, keep
|
|
94
102
|
placeholders or write `Unknown`; do not invent a vision.
|
|
@@ -144,6 +152,15 @@ Written:
|
|
|
144
152
|
- ai/project/refs/constraints.md
|
|
145
153
|
- ai/project/refs/decisions.md
|
|
146
154
|
|
|
155
|
+
Absorbed material:
|
|
156
|
+
- file; write "none" if there is none
|
|
157
|
+
|
|
158
|
+
Unabsorbed material:
|
|
159
|
+
- file: reason; write "none" if there is none
|
|
160
|
+
|
|
161
|
+
Conflict handling:
|
|
162
|
+
- conflict or tradeoff; write "none" if there is none
|
|
163
|
+
|
|
147
164
|
Reply with:
|
|
148
165
|
- Confirm, draft task 1
|
|
149
166
|
- Confirm, but do: <one-sentence task>
|
|
@@ -184,6 +201,15 @@ Written:
|
|
|
184
201
|
- ai/project/refs/decisions.md
|
|
185
202
|
- ai/project/task.md
|
|
186
203
|
|
|
204
|
+
Absorbed material:
|
|
205
|
+
- file; write "none" if there is none
|
|
206
|
+
|
|
207
|
+
Unabsorbed material:
|
|
208
|
+
- file: reason; write "none" if there is none
|
|
209
|
+
|
|
210
|
+
Conflict handling:
|
|
211
|
+
- conflict or tradeoff; write "none" if there is none
|
|
212
|
+
|
|
187
213
|
Reply with:
|
|
188
214
|
- Confirm, execute
|
|
189
215
|
- Correction: <what to change>
|
|
@@ -23,9 +23,12 @@ Then choose the mode:
|
|
|
23
23
|
`proposed`, update it to `accepted` based on that explicit confirmation.
|
|
24
24
|
- If the user says "Start initializing this project and absorb the material in ai/project/inbox/",
|
|
25
25
|
or asks to initialize while also absorbing material from
|
|
26
|
-
`ai/project/inbox/`,
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
`ai/project/inbox/`, inspect `ai/project/project.md` first. If it already
|
|
27
|
+
exists and is not empty, placeholder-only, or clearly incomplete, follow
|
|
28
|
+
`ai/template/reconcile.md` instead of bootstrapping again. If it is empty,
|
|
29
|
+
placeholder-only, or clearly incomplete, follow `ai/template/bootstrap.md`
|
|
30
|
+
and treat `ai/project/inbox/*.md` and `ai/project/inbox/raw/*.md` as part of
|
|
31
|
+
the bootstrap input for this run; stop after project-context confirmation.
|
|
29
32
|
- If the user says "Reconcile the new material in ai/project/inbox/", asks to
|
|
30
33
|
reconcile, merge, absorb, update context, handle new material, mentions
|
|
31
34
|
`reconcile` or `ai/project/inbox/`, or if `ai/project/inbox/` contains
|
|
@@ -98,8 +98,10 @@ Do not modify these unless the human explicitly asks:
|
|
|
98
98
|
- `ai/project/metrics.json`
|
|
99
99
|
- `ai/project/archive/**`
|
|
100
100
|
|
|
101
|
-
After applying reconciliation, move the processed `ai/project/inbox/*.md`
|
|
102
|
-
material into `ai/project/inbox/processed/`.
|
|
101
|
+
After applying reconciliation, move the processed `ai/project/inbox/*.md` and
|
|
102
|
+
`ai/project/inbox/raw/*.md` material into `ai/project/inbox/processed/`.
|
|
103
|
+
Preserve relative paths: move `ai/project/inbox/raw/file.md` to
|
|
104
|
+
`ai/project/inbox/processed/raw/file.md`. If a filename conflicts, keep the
|
|
103
105
|
original name and add a date or sequence number. Do not move
|
|
104
106
|
`ai/project/inbox/ideas/**`; direction ideas should continue through
|
|
105
107
|
`strategy_update`.
|
|
@@ -117,11 +119,17 @@ Updated:
|
|
|
117
119
|
Archived material:
|
|
118
120
|
- ai/project/inbox/processed/file.md
|
|
119
121
|
|
|
122
|
+
Unabsorbed material:
|
|
123
|
+
- file: reason; write "none" if there is none
|
|
124
|
+
|
|
120
125
|
Key changes:
|
|
121
126
|
- Added:
|
|
122
127
|
- Corrected:
|
|
123
128
|
- Deprecated:
|
|
124
129
|
|
|
130
|
+
Conflict handling:
|
|
131
|
+
- conflict or tradeoff; write "none" if there is none
|
|
132
|
+
|
|
125
133
|
Still uncertain:
|
|
126
134
|
- Up to 3 items; write "none" if there are none
|
|
127
135
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.8.
|
|
1
|
+
0.8.15
|
|
@@ -80,6 +80,11 @@
|
|
|
80
80
|
## 输出规则
|
|
81
81
|
|
|
82
82
|
- 未知事实标记为 `Unknown`;不要把猜测当成事实。
|
|
83
|
+
- 如果本次引导吸收了 `ai/project/inbox/*.md` 或 `ai/project/inbox/raw/*.md`,
|
|
84
|
+
写入上下文后必须把已吸收资料移动到 `ai/project/inbox/processed/`。保留相对路径:
|
|
85
|
+
`ai/project/inbox/raw/file.md` 移动到 `ai/project/inbox/processed/raw/file.md`。
|
|
86
|
+
如果文件名冲突,保留原文件名并添加日期或序号。不要移动 `ai/project/inbox/ideas/**`。
|
|
87
|
+
- 未吸收资料必须留在原位置,并在最终回复中说明原因。
|
|
83
88
|
- 对 `final-shape.md`、`module-map.md`、`roadmap.md` 的初始化内容必须标明证据来源;
|
|
84
89
|
如果证据不足,保持占位或写 `Unknown`,不要编造愿景。
|
|
85
90
|
- 有帮助时,在相关文件中记录证据来源。
|
|
@@ -131,6 +136,15 @@
|
|
|
131
136
|
- ai/project/refs/constraints.md
|
|
132
137
|
- ai/project/refs/decisions.md
|
|
133
138
|
|
|
139
|
+
已吸收资料:
|
|
140
|
+
- file;没有则写“无”
|
|
141
|
+
|
|
142
|
+
未吸收资料:
|
|
143
|
+
- file:原因;没有则写“无”
|
|
144
|
+
|
|
145
|
+
冲突处理:
|
|
146
|
+
- 冲突或取舍;没有则写“无”
|
|
147
|
+
|
|
134
148
|
请直接回复:
|
|
135
149
|
- 确认,按建议 1 起草任务
|
|
136
150
|
- 确认,但改做:<一句话任务>
|
|
@@ -171,6 +185,15 @@
|
|
|
171
185
|
- ai/project/refs/decisions.md
|
|
172
186
|
- ai/project/task.md
|
|
173
187
|
|
|
188
|
+
已吸收资料:
|
|
189
|
+
- file;没有则写“无”
|
|
190
|
+
|
|
191
|
+
未吸收资料:
|
|
192
|
+
- file:原因;没有则写“无”
|
|
193
|
+
|
|
194
|
+
冲突处理:
|
|
195
|
+
- 冲突或取舍;没有则写“无”
|
|
196
|
+
|
|
174
197
|
请直接回复:
|
|
175
198
|
- 确认,执行
|
|
176
199
|
- 修正:<你要改的地方>
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
`apply_strategy_update` 起草或执行应用任务;如果 proposal 仍为
|
|
21
21
|
`proposed`,先根据这次明确确认更新为 `accepted`。
|
|
22
22
|
- 如果用户说“开始初始化这个项目,并吸收 ai/project/inbox/ 里的资料”,
|
|
23
|
-
或要求初始化时一并吸收 `ai/project/inbox/`
|
|
24
|
-
`ai/
|
|
23
|
+
或要求初始化时一并吸收 `ai/project/inbox/` 里的资料,先检查
|
|
24
|
+
`ai/project/project.md`。如果它已经存在且不是空文件、占位内容或明显不完整,
|
|
25
|
+
执行 `ai/template/reconcile.md`,不要重新 bootstrap;如果它为空、只有占位内容或
|
|
26
|
+
明显不完整,执行 `ai/template/bootstrap.md`,并把 `ai/project/inbox/*.md` 与
|
|
25
27
|
`ai/project/inbox/raw/*.md` 视为本次引导输入的一部分;在项目上下文确认后停止。
|
|
26
28
|
- 如果用户说“整合 ai/project/inbox/ 里的新资料”,要求整合/合并/吸收/
|
|
27
29
|
更新上下文/处理新资料,提到 `reconcile` 或 `ai/project/inbox/`,
|
|
@@ -94,9 +94,11 @@
|
|
|
94
94
|
- `ai/project/metrics.json`
|
|
95
95
|
- `ai/project/archive/**`
|
|
96
96
|
|
|
97
|
-
应用整合完成后,必须把本次已整合的 `ai/project/inbox/*.md`
|
|
98
|
-
`ai/project/inbox/processed
|
|
99
|
-
|
|
97
|
+
应用整合完成后,必须把本次已整合的 `ai/project/inbox/*.md` 和
|
|
98
|
+
`ai/project/inbox/raw/*.md` 资料移动到 `ai/project/inbox/processed/`。保留相对路径:
|
|
99
|
+
`ai/project/inbox/raw/file.md` 移动到 `ai/project/inbox/processed/raw/file.md`。
|
|
100
|
+
如果文件名冲突,保留原文件名并添加日期或序号。不要移动
|
|
101
|
+
`ai/project/inbox/ideas/**`;方向灵感应继续走 `strategy_update`。
|
|
100
102
|
|
|
101
103
|
## 最终交接
|
|
102
104
|
|
|
@@ -111,11 +113,17 @@
|
|
|
111
113
|
已归档资料:
|
|
112
114
|
- ai/project/inbox/processed/file.md
|
|
113
115
|
|
|
116
|
+
未吸收资料:
|
|
117
|
+
- file:原因;没有则写“无”
|
|
118
|
+
|
|
114
119
|
关键变化:
|
|
115
120
|
- 新增:
|
|
116
121
|
- 修正:
|
|
117
122
|
- 废弃:
|
|
118
123
|
|
|
124
|
+
冲突处理:
|
|
125
|
+
- 冲突或取舍;没有则写“无”
|
|
126
|
+
|
|
119
127
|
仍不确定:
|
|
120
128
|
- 最多 3 条;没有则写“无”
|
|
121
129
|
|
package/test/selftest.js
CHANGED
|
@@ -72,14 +72,22 @@ function testInitUpdateDoctor() {
|
|
|
72
72
|
assert(read(cwd, "ai/template/bootstrap.md").includes("我建议下一步做"), "bootstrap prompt should recommend next steps");
|
|
73
73
|
assert(read(cwd, "ai/template/bootstrap.md").includes("不要让人类主动去文件管理器里寻找问题"), "bootstrap prompt should not offload file inspection to humans");
|
|
74
74
|
assert(read(cwd, "ai/template/bootstrap.md").includes("任务草稿摘要"), "bootstrap prompt should support task draft summary when a goal is provided");
|
|
75
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("ai/project/inbox/processed/raw/file.md"), "bootstrap prompt should archive absorbed raw inbox material");
|
|
76
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("已吸收资料"), "bootstrap handoff should audit absorbed material");
|
|
77
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("未吸收资料"), "bootstrap handoff should audit unabsorbed material");
|
|
78
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("冲突处理"), "bootstrap handoff should audit conflict handling");
|
|
75
79
|
assert(read(cwd, "ai/template/prompt.md").includes("任务草稿交接"), "execution prompt should include task handoff");
|
|
76
80
|
assert(read(cwd, "ai/template/prompt.md").includes("开始初始化这个项目"), "execution prompt should route natural bootstrap entry");
|
|
77
81
|
assert(read(cwd, "ai/template/prompt.md").includes("开始初始化这个项目,并吸收 ai/project/inbox/ 里的资料"), "execution prompt should route bootstrap with inbox material");
|
|
82
|
+
assert(read(cwd, "ai/template/prompt.md").includes("不要重新 bootstrap"), "execution prompt should reconcile inbox material when project context already exists");
|
|
78
83
|
assert(read(cwd, "ai/template/prompt.md").includes("整合 ai/project/inbox/ 里的新资料"), "execution prompt should route natural reconcile entry");
|
|
79
84
|
assert(read(cwd, "ai/template/prompt.md").includes("继续推进这个项目"), "execution prompt should route natural continue entry");
|
|
80
85
|
assert(read(cwd, "ai/template/prompt.md").includes("strategy_update"), "execution prompt should route strategy updates");
|
|
81
86
|
assert(read(cwd, "ai/template/reconcile.md").includes("上下文整合"), "init should install reconcile prompt");
|
|
82
87
|
assert(read(cwd, "ai/template/reconcile.md").includes("整合计划"), "reconcile prompt should require a plan first");
|
|
88
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("ai/project/inbox/processed/raw/file.md"), "reconcile prompt should archive absorbed raw inbox material");
|
|
89
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("未吸收资料"), "reconcile handoff should audit unabsorbed material");
|
|
90
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("冲突处理"), "reconcile handoff should audit conflict handling");
|
|
83
91
|
assert(read(cwd, "ai/template/protocol.md").includes("引导读取范围"), "init should install bootstrap protocol");
|
|
84
92
|
assert(read(cwd, "ai/template/protocol.md").includes("推荐下一步最值得做的任务"), "protocol should require recommended next steps");
|
|
85
93
|
assert(read(cwd, "ai/template/protocol.md").includes("上下文整合模式"), "protocol should include context reconcile mode");
|
|
@@ -129,8 +137,13 @@ function testEnglishInitUpdateDoctor() {
|
|
|
129
137
|
assert(read(cwd, "ai/template/bootstrap.md").includes("ai/project/refs/roadmap.md"), "English bootstrap prompt should initialize roadmap");
|
|
130
138
|
assert(read(cwd, "ai/template/bootstrap.md").includes("Recommended next step"), "English bootstrap prompt should recommend next steps");
|
|
131
139
|
assert(read(cwd, "ai/template/bootstrap.md").includes("Do not make the human hunt through files"), "English bootstrap prompt should not offload file inspection to humans");
|
|
140
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("ai/project/inbox/processed/raw/file.md"), "English bootstrap prompt should archive absorbed raw inbox material");
|
|
141
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("Absorbed material"), "English bootstrap handoff should audit absorbed material");
|
|
142
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("Unabsorbed material"), "English bootstrap handoff should audit unabsorbed material");
|
|
143
|
+
assert(read(cwd, "ai/template/bootstrap.md").includes("Conflict handling"), "English bootstrap handoff should audit conflict handling");
|
|
132
144
|
assert(read(cwd, "ai/template/prompt.md").includes("Start initializing this project"), "English execution prompt should route natural bootstrap entry");
|
|
133
145
|
assert(read(cwd, "ai/template/prompt.md").includes("Start initializing this project and absorb the material in ai/project/inbox/"), "English execution prompt should route bootstrap with inbox material");
|
|
146
|
+
assert(read(cwd, "ai/template/prompt.md").includes("instead of bootstrapping again"), "English execution prompt should reconcile inbox material when project context already exists");
|
|
134
147
|
assert(read(cwd, "ai/template/prompt.md").includes("Reconcile the new material in ai/project/inbox/"), "English execution prompt should route natural reconcile entry");
|
|
135
148
|
assert(read(cwd, "ai/template/prompt.md").includes("Continue this project"), "English execution prompt should route natural continue entry");
|
|
136
149
|
assert(read(cwd, "ai/template/prompt.md").includes("strategy_update"), "English execution prompt should route strategy updates");
|
|
@@ -142,6 +155,9 @@ function testEnglishInitUpdateDoctor() {
|
|
|
142
155
|
assert(read(cwd, "ai/project/proposals/final-shape-updates/_template.md").includes("`accepted`"), "English proposal template should describe accepted status");
|
|
143
156
|
assert(read(cwd, "ai/template/reconcile.md").includes("Context Reconcile"), "English init should install English reconcile prompt");
|
|
144
157
|
assert(read(cwd, "ai/template/reconcile.md").includes("reconciliation plan"), "English reconcile prompt should require a plan first");
|
|
158
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("ai/project/inbox/processed/raw/file.md"), "English reconcile prompt should archive absorbed raw inbox material");
|
|
159
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("Unabsorbed material"), "English reconcile handoff should audit unabsorbed material");
|
|
160
|
+
assert(read(cwd, "ai/template/reconcile.md").includes("Conflict handling"), "English reconcile handoff should audit conflict handling");
|
|
145
161
|
assert(initOutput.includes("Start initializing this project"), "English init output should provide English bootstrap prompt");
|
|
146
162
|
assert(initOutput.includes("[Initialize]"), "English init output should distinguish pre-bootstrap guidance");
|
|
147
163
|
assert(initOutput.includes("Start initializing this project and absorb the material in ai/project/inbox/"), "English init output should explain bootstrap with existing material");
|