@wnlen/agent-execution-template 0.8.22 → 0.8.23

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.
@@ -73,24 +73,31 @@ const TEXT = {
73
73
  `,
74
74
  unknown: "未知",
75
75
  sourceMissing: "找不到模板来源",
76
- ready: "Agent Execution Template 协议已安装。项目上下文尚未初始化。",
77
- initGuide: `下一步,把这句话发给你的 AI coding 工具:
76
+ ready: "Agent Execution Template 已安装。",
77
+ initGuide: `你现在可以这样用:
78
78
 
79
- 开始初始化这个项目
79
+ 1. 第一次整理项目上下文
80
+ 【发给 AI】
80
81
 
81
- 如果你已经有确定资料:
82
- 1. 放到 ai/project/inbox/
83
- 2. 对 AI 说: 开始初始化这个项目,并吸收 ai/project/inbox/ 里的资料
82
+ 开始初始化这个项目
84
83
 
85
- 资料路径:
86
- - 已确定资料: ai/project/inbox/
87
- - 未决定的新想法: ai/project/inbox/ideas/
84
+ 2. 已有 README、PRD、架构文档或业务规则
85
+ 先放到 ai/project/inbox/
86
+ 【发给 AI】
88
87
 
89
- 忘了下一步时运行:
90
- npx -y @wnlen/agent-execution-template next
88
+ 开始初始化这个项目,并吸收 ai/project/inbox/ 里的资料
91
89
 
92
- 已完成:
93
- - 根目录 AI 入口: AGENTS.md / CLAUDE.md`,
90
+ 3. 后续有新资料要合并
91
+ 放到 ai/project/inbox/
92
+ 【发给 AI】
93
+
94
+ 整合 ai/project/inbox/ 里的新资料
95
+
96
+ 4. 有还没确定的新想法、产品方向或架构调整
97
+ 放到 ai/project/inbox/ideas/
98
+ 【发给 AI】
99
+
100
+ 把 ai/project/inbox/ideas/ 里的新灵感生成方向修订提案`,
94
101
  start: "开始:",
95
102
  startPrompt: "开始初始化这个项目",
96
103
  then: "然后:",
@@ -178,24 +185,31 @@ Usage:
178
185
  `,
179
186
  unknown: "unknown",
180
187
  sourceMissing: "Template source not found",
181
- ready: "Agent Execution Template protocol installed. Project context is not initialized yet.",
182
- initGuide: `Next, send this to your AI coding tool:
188
+ ready: "Agent Execution Template installed.",
189
+ initGuide: `You can use it like this:
190
+
191
+ 1. Set up project context for the first time
192
+ [Send to AI]
193
+
194
+ Start initializing this project
195
+
196
+ 2. You already have a README, PRD, architecture doc, or business rules
197
+ Put them in ai/project/inbox/
198
+ [Send to AI]
183
199
 
184
- Start initializing this project
200
+ Start initializing this project and absorb the material in ai/project/inbox/
185
201
 
186
- If you already have confirmed material:
187
- 1. Put it in ai/project/inbox/
188
- 2. Tell the AI: Start initializing this project and absorb the material in ai/project/inbox/
202
+ 3. Later, you have new material to merge
203
+ Put it in ai/project/inbox/
204
+ [Send to AI]
189
205
 
190
- Material paths:
191
- - Confirmed material: ai/project/inbox/
192
- - Undecided ideas: ai/project/inbox/ideas/
206
+ Reconcile the new material in ai/project/inbox/
193
207
 
194
- If you forget the next step, run:
195
- npx -y @wnlen/agent-execution-template next
208
+ 4. You have an undecided idea, product direction, or architecture change
209
+ Put it in ai/project/inbox/ideas/
210
+ [Send to AI]
196
211
 
197
- Completed:
198
- - Root AI entrypoints: AGENTS.md / CLAUDE.md`,
212
+ Generate a direction amendment proposal from ai/project/inbox/ideas/`,
199
213
  start: "Start:",
200
214
  startPrompt: "Start initializing this project",
201
215
  then: "Then:",
@@ -587,11 +601,11 @@ function init({ lang = DEFAULT_LANG, verbose = false, quiet = false, manageEntry
587
601
 
588
602
  ${text.initGuide}${sourceNotice}
589
603
 
590
- ${text.files}: ${summarizeChanges(changes, lang)}
591
604
  ${text.check}: ${commandHint("doctor")}
592
605
  `);
593
606
 
594
607
  if (verbose) {
608
+ console.log(`${text.files}: ${summarizeChanges(changes, lang)}`);
595
609
  printChanges(text.details, changes, lang);
596
610
  }
597
611
  }
package/docs/SPEC.md CHANGED
@@ -24,7 +24,7 @@ npx 安装协议 -> AI 整理项目上下文 -> 人类确认 -> AI 生成任务
24
24
 
25
25
  ```text
26
26
  Protocol: v0.8
27
- Package: @wnlen/agent-execution-template@0.8.22
27
+ Package: @wnlen/agent-execution-template@0.8.23
28
28
  中文安装: npx -y @wnlen/agent-execution-template init
29
29
  英文安装: npx -y @wnlen/agent-execution-template init --lang en
30
30
  ```
@@ -420,7 +420,7 @@ npx -y @wnlen/agent-execution-template doctor
420
420
  ```text
421
421
  Agent Execution Template 检查
422
422
 
423
- 模板版本: 0.8.22
423
+ 模板版本: 0.8.23
424
424
  模板语言: zh
425
425
 
426
426
  [通过] ai/template/LANG
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wnlen/agent-execution-template",
3
- "version": "0.8.22",
3
+ "version": "0.8.23",
4
4
  "description": "Low-friction AI execution protocol template for coding agents.",
5
5
  "bin": {
6
6
  "agent-execution-template": "bin/agent-execution-template.js"
@@ -1 +1 @@
1
- 0.8.22
1
+ 0.8.23
@@ -1 +1 @@
1
- 0.8.22
1
+ 0.8.23
package/test/selftest.js CHANGED
@@ -154,22 +154,33 @@ function testInitUpdateDoctor() {
154
154
  assert(read(cwd, "ai/template/rules/core.md").includes("ai/project/refs/final-shape.md"), "core rules should route direction refs");
155
155
  assert(read(cwd, "ai/project/proposals/final-shape-updates/_template.md").includes("`accepted`"), "proposal template should describe accepted status");
156
156
  const initOutput = run(["init"], cwd);
157
- assert(initOutput.includes("开始初始化这个项目"), "init output should provide compact natural bootstrap prompt");
158
- assert(initOutput.includes("根目录 AI 入口: AGENTS.md / CLAUDE.md"), "init output should mention root AI compatibility entrypoints");
159
- assert(initOutput.includes("协议已安装。项目上下文尚未初始化"), "init output should distinguish protocol install from project context bootstrap");
160
- assert(initOutput.includes("下一步,把这句话发给你的 AI coding 工具"), "init output should guide the AI bootstrap as the next step");
157
+ assert(initOutput.includes("Agent Execution Template 已安装。"), "init output should confirm installation");
158
+ assert(initOutput.includes("你现在可以这样用:"), "init output should introduce scenario-based usage");
159
+ assert(initOutput.includes("1. 第一次整理项目上下文"), "init output should cover first-time project context setup");
160
+ assert(initOutput.includes("【发给 AI】\n\n 开始初始化这个项目"), "init output should make the bootstrap prompt visually prominent");
161
+ assert(initOutput.includes("2. 已有 README、PRD、架构文档或业务规则"), "init output should cover initialization with existing material");
161
162
  assert(initOutput.includes("开始初始化这个项目,并吸收 ai/project/inbox/ 里的资料"), "init output should explain bootstrap with existing material");
162
- assert(initOutput.includes("已确定资料: ai/project/inbox/"), "init output should explain confirmed material path");
163
- assert(initOutput.includes("未决定的新想法: ai/project/inbox/ideas/"), "init output should explain idea inbox path");
164
- assert(initOutput.includes("agent-execution-template next"), "init output should tell users how to recover the next step");
165
- assert(initOutput.includes("文件已就绪:"), "init output should summarize file changes");
163
+ assert(initOutput.includes("3. 后续有新资料要合并"), "init output should cover later material reconciliation");
164
+ assert(initOutput.includes("整合 ai/project/inbox/ 里的新资料"), "init output should show the reconcile prompt");
165
+ assert(initOutput.includes("4. 有还没确定的新想法、产品方向或架构调整"), "init output should cover undecided ideas");
166
+ assert(initOutput.includes("把 ai/project/inbox/ideas/ 里的新灵感生成方向修订提案"), "init output should show the strategy proposal prompt");
167
+ assert(!initOutput.includes("项目上下文尚未初始化"), "init output should not state the obvious uninitialized context");
168
+ assert(!initOutput.includes("忘了下一步时运行"), "init output should not show next as the default fallback");
169
+ assert(!initOutput.includes("根目录 AI 入口"), "init output should not mention root AI entrypoint implementation details");
170
+ assert(!initOutput.includes("资料路径:"), "init output should not show abstract material path categories");
171
+ assert(!initOutput.includes("已确定资料:"), "init output should not show abstract confirmed material path categories");
172
+ assert(!initOutput.includes("未决定的新想法:"), "init output should not show abstract idea path categories");
173
+ assert(!initOutput.includes("agent-execution-template next"), "init output should not tell users to remember the next command");
174
+ assert(!initOutput.includes("文件已就绪:"), "init output should hide file change summaries by default");
166
175
  assert(initOutput.includes("检查安装:"), "init output should show install check command");
167
176
  assert(!initOutput.includes("维护者提示"), "init output should not show source checkout guidance in user projects");
168
177
  assert(!initOutput.includes("[已更新]"), "init output should hide detailed file changes by default");
169
178
  assert(!initOutput.includes("Read ai/template/bootstrap.md"), "init output should not use weak Read bootstrap command");
170
179
  assert(countOccurrences(read(cwd, "AGENTS.md"), "agent-execution-template:start") === 1, "init should not duplicate AGENTS.md managed blocks");
171
180
  assert(countOccurrences(read(cwd, "CLAUDE.md"), "agent-execution-template:start") === 1, "init should not duplicate CLAUDE.md managed blocks");
172
- assert(run(["init", "--verbose"], cwd).includes("[已更新] ai/template/VERSION"), "init --verbose should show detailed file changes");
181
+ const verboseInitOutput = run(["init", "--verbose"], cwd);
182
+ assert(verboseInitOutput.includes("文件已就绪:"), "init --verbose should summarize file changes");
183
+ assert(verboseInitOutput.includes("[已更新] ai/template/VERSION"), "init --verbose should show detailed file changes");
173
184
  assert(countOccurrences(read(cwd, "AGENTS.md"), "agent-execution-template:start") === 1, "re-running init should keep one AGENTS.md managed block");
174
185
  assert(countOccurrences(read(cwd, "CLAUDE.md"), "agent-execution-template:start") === 1, "re-running init should keep one CLAUDE.md managed block");
175
186
  const reconcileOutput = run(["reconcile"], cwd);
@@ -273,15 +284,24 @@ function testEnglishInitUpdateDoctor() {
273
284
  assert(read(cwd, "ai/template/reconcile.md").includes("ai/project/inbox/processed/raw/file.md"), "English reconcile prompt should archive absorbed raw inbox material");
274
285
  assert(read(cwd, "ai/template/reconcile.md").includes("Unabsorbed material"), "English reconcile handoff should audit unabsorbed material");
275
286
  assert(read(cwd, "ai/template/reconcile.md").includes("Conflict handling"), "English reconcile handoff should audit conflict handling");
276
- assert(initOutput.includes("Start initializing this project"), "English init output should provide English bootstrap prompt");
277
- assert(initOutput.includes("Root AI entrypoints: AGENTS.md / CLAUDE.md"), "English init output should mention root AI compatibility entrypoints");
278
- assert(initOutput.includes("protocol installed. Project context is not initialized yet"), "English init output should distinguish protocol install from project context bootstrap");
279
- assert(initOutput.includes("Next, send this to your AI coding tool"), "English init output should guide the AI bootstrap as the next step");
287
+ assert(initOutput.includes("Agent Execution Template installed."), "English init output should confirm installation");
288
+ assert(initOutput.includes("You can use it like this:"), "English init output should introduce scenario-based usage");
289
+ assert(initOutput.includes("1. Set up project context for the first time"), "English init output should cover first-time project context setup");
290
+ assert(initOutput.includes("[Send to AI]\n\n Start initializing this project"), "English init output should make the bootstrap prompt visually prominent");
291
+ assert(initOutput.includes("2. You already have a README, PRD, architecture doc, or business rules"), "English init output should cover initialization with existing material");
280
292
  assert(initOutput.includes("Start initializing this project and absorb the material in ai/project/inbox/"), "English init output should explain bootstrap with existing material");
281
- assert(initOutput.includes("Confirmed material: ai/project/inbox/"), "English init output should explain confirmed material path");
282
- assert(initOutput.includes("Undecided ideas: ai/project/inbox/ideas/"), "English init output should explain idea inbox path");
283
- assert(initOutput.includes("agent-execution-template next"), "English init output should tell users how to recover the next step");
284
- assert(initOutput.includes("Files ready:"), "English init output should summarize file changes");
293
+ assert(initOutput.includes("3. Later, you have new material to merge"), "English init output should cover later material reconciliation");
294
+ assert(initOutput.includes("Reconcile the new material in ai/project/inbox/"), "English init output should show the reconcile prompt");
295
+ assert(initOutput.includes("4. You have an undecided idea, product direction, or architecture change"), "English init output should cover undecided ideas");
296
+ assert(initOutput.includes("Generate a direction amendment proposal from ai/project/inbox/ideas/"), "English init output should show the strategy proposal prompt");
297
+ assert(!initOutput.includes("Project context is not initialized yet"), "English init output should not state the obvious uninitialized context");
298
+ assert(!initOutput.includes("If you forget the next step"), "English init output should not show next as the default fallback");
299
+ assert(!initOutput.includes("Root AI entrypoints"), "English init output should not mention root AI entrypoint implementation details");
300
+ assert(!initOutput.includes("Material paths:"), "English init output should not show abstract material path categories");
301
+ assert(!initOutput.includes("Confirmed material:"), "English init output should not show abstract confirmed material path categories");
302
+ assert(!initOutput.includes("Undecided ideas:"), "English init output should not show abstract idea path categories");
303
+ assert(!initOutput.includes("agent-execution-template next"), "English init output should not tell users to remember the next command");
304
+ assert(!initOutput.includes("Files ready:"), "English init output should hide file change summaries by default");
285
305
  assert(initOutput.includes("Check install:"), "English init output should show install check command");
286
306
  assert(!initOutput.includes("Maintainer note"), "English init output should not show source checkout guidance in user projects");
287
307
  assert(!initOutput.includes("[UPDATED]"), "English init output should hide detailed file changes by default");