kenaz 0.3.18 → 0.3.19

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.
Files changed (308) hide show
  1. package/core/.claude/commands/agent-worker.md +1 -1
  2. package/core/.claude/commands/architect.md +1 -2
  3. package/core/.claude/commands/spec.md +1 -1
  4. package/core/.claude/commands//347/224/242/345/223/201.md +1 -1
  5. package/core/.claude/hooks/__tests__/task-1977-dedupe-guard.test.js +8 -8
  6. package/core/.claude/skills/architect_agent/SKILL.md +11 -92
  7. package/core/.claude/skills/assessment_agent/SKILL.md +0 -1
  8. package/core/.claude/skills/backend_engineer/SKILL.md +3 -6
  9. package/core/.claude/skills/code_reviewer/SKILL.md +1 -1
  10. package/core/.claude/skills/code_reviewer/patterns.yaml +1 -1
  11. package/core/.claude/skills/designer/SKILL.md +3 -6
  12. package/core/.claude/skills/dev_agent/SKILL.md +30 -491
  13. package/core/.claude/skills/developer/SKILL.md +3 -6
  14. package/core/.claude/skills/feature_agent/SKILL.md +3 -17
  15. package/core/.claude/skills/product_manager/SKILL.md +29 -1064
  16. package/core/.claude/skills/qa_engineer/SKILL.md +12 -17
  17. package/core/.claude/skills/spec_optimizer/SKILL.md +25 -275
  18. package/core/.claude/skills/sre_agent/SKILL.md +3 -6
  19. package/core/.collaboration/README.md +2 -3
  20. package/core/.collaboration/core/task-api.js +5 -138
  21. package/core/.collaboration/docs/CLI.md +0 -2
  22. package/core/.failure/INDEX.yaml +6 -40
  23. package/core/.failure/agent-execution/FAIL-013-search-cwd-drift-and-case-mismatch.yaml +1 -1
  24. package/core/.failure/tools/README.md +9 -227
  25. package/core/.formation/bifrost/launch.js +1 -6
  26. package/core/.formation/bifrost/launch.test.js +1 -1
  27. package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
  28. package/core/.formation/bifrost/shared/ansuz-boot-policy.test.js +1 -2
  29. package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
  30. package/core/.formation/tools/dispatch.js +1 -1
  31. package/core/.formation/tools/loader.js +17 -140
  32. package/core/.formation/tools/post-complete.js +0 -31
  33. package/core/.rule/INDEX.yaml +0 -18
  34. package/core/.rule/general/agent-workflow.yaml +14 -164
  35. package/core/.rule/general/project-self-containment.yaml +8 -19
  36. package/core/.rule/general/rust-verify-target.yaml +6 -5
  37. package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
  38. package/core/.specialist/Amelia/capability.yaml +12 -12
  39. package/core/.specialist/Amelia/workflow.yaml +2 -2
  40. package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
  41. package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
  42. package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
  43. package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
  44. package/core/.specialist/Ansuz/core.yaml +6 -108
  45. package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
  46. package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
  47. package/core/.specialist/Ansuz/knowledge.yaml +0 -4
  48. package/core/.specialist/Ansuz/rule.yaml +0 -1
  49. package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
  50. package/core/.specialist/tests/runtime-discovery/README.md +1 -1
  51. package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
  52. package/core/.specialist/tools/prompt-files.test.js +1 -0
  53. package/core/.specialist/tools/task-bridge.js +1 -66
  54. package/core/.system/README.md +11 -552
  55. package/core/.system/collaboration/README.md +10 -174
  56. package/core/CLAUDE.md +1 -6
  57. package/core/KENAZ_CORE_VERSION +1 -1
  58. package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
  59. package/core/dev/scripts/run-rust-tests.js +9 -45
  60. package/core/dev/scripts/rust-verify-worktree.js +4 -4
  61. package/core/dev/scripts/verify-target-dir.js +6 -6
  62. package/core/plugins/kenaz/INVENTORY.md +8 -8
  63. package/core/plugins/kenaz/commands/architect.md +1 -2
  64. package/core/plugins/kenaz/commands/spec.md +1 -1
  65. package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
  66. package/core/plugins/kenaz/guidance.md +1 -1
  67. package/core/plugins/kenaz/scripts/sync.js +1 -1
  68. package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
  69. package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
  70. package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
  71. package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
  72. package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
  73. package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
  74. package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
  75. package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
  76. package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
  77. package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
  78. package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
  79. package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
  80. package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
  81. package/package.json +6 -6
  82. package/core/.claude/commands/archive.md +0 -24
  83. package/core/.claude/commands/init.md +0 -112
  84. package/core/.claude/commands/legacy_dev.md +0 -18
  85. package/core/.claude/commands/product-review.md +0 -131
  86. package/core/.claude/commands/strategy.md +0 -141
  87. package/core/.claude/commands/sunny.md +0 -1
  88. package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
  89. package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
  90. package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
  91. package/core/.claude/hooks/_substrate-paths.js +0 -95
  92. package/core/.claude/hooks/context-check.js +0 -51
  93. package/core/.claude/hooks/fatigue-check.js +0 -52
  94. package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
  95. package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
  96. package/core/.claude/hooks/handoff-staleness.js +0 -197
  97. package/core/.claude/hooks/jev-thalamus-context.js +0 -17
  98. package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
  99. package/core/.claude/hooks/lease-release.js +0 -119
  100. package/core/.claude/hooks/lease-touch.js +0 -96
  101. package/core/.claude/hooks/reflex-feedback.js +0 -5
  102. package/core/.claude/hooks/session-init.ps1 +0 -49
  103. package/core/.claude/hooks/sound-event.js +0 -70
  104. package/core/.claude/hooks/sound-event.sh +0 -37
  105. package/core/.claude/hooks/stream-delta.js +0 -169
  106. package/core/.claude/no-hooks.settings.json +0 -3
  107. package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
  108. package/core/.claude/skills/sunny/SKILL.md +0 -74
  109. package/core/.collaboration/cli/commands/assign.js +0 -39
  110. package/core/.collaboration/cli/commands/claim.js +0 -33
  111. package/core/.collaboration/cli/commands/complete.js +0 -44
  112. package/core/.collaboration/cli/commands/create.js +0 -110
  113. package/core/.collaboration/cli/commands/get.js +0 -83
  114. package/core/.collaboration/cli/commands/index.js +0 -52
  115. package/core/.collaboration/cli/commands/list.js +0 -51
  116. package/core/.collaboration/cli/commands/lock.js +0 -45
  117. package/core/.collaboration/cli/commands/rebuild.js +0 -39
  118. package/core/.collaboration/cli/commands/search.js +0 -61
  119. package/core/.collaboration/cli/commands/stats.js +0 -61
  120. package/core/.collaboration/cli/commands/transfer.js +0 -41
  121. package/core/.collaboration/cli/commands/unlock.js +0 -48
  122. package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
  123. package/core/.collaboration/cli/formatters/index.js +0 -7
  124. package/core/.collaboration/cli/task-cli.js +0 -46
  125. package/core/.collaboration/cli/utils/arg-parser.js +0 -74
  126. package/core/.collaboration/cli/utils/git-user.js +0 -25
  127. package/core/.collaboration/cli/utils/index.js +0 -9
  128. package/core/.collaboration/cli/utils/output.js +0 -10
  129. package/core/.collaboration/config/default.yaml +0 -189
  130. package/core/.collaboration/core/conflict-resolver.js +0 -461
  131. package/core/.collaboration/core/conflict-resolver.test.js +0 -389
  132. package/core/.collaboration/core/migrate-legacy.js +0 -260
  133. package/core/.collaboration/docs/API.md +0 -787
  134. package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
  135. package/core/.collaboration/docs/FAQ.md +0 -695
  136. package/core/.collaboration/docs/MIGRATION.md +0 -804
  137. package/core/.collaboration/docs/examples/README.md +0 -320
  138. package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
  139. package/core/.collaboration/docs/examples/basic-usage.js +0 -184
  140. package/core/.collaboration/docs/examples/team-workflow.js +0 -352
  141. package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
  142. package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
  143. package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
  144. package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
  145. package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
  146. package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
  147. package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
  148. package/core/.failure/pipeline/README.md +0 -95
  149. package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
  150. package/core/.failure/tools/USAGE_GUIDE.md +0 -323
  151. package/core/.failure/tools/check_failures.ps1 +0 -387
  152. package/core/.failure/tools/log_failure.ps1 +0 -474
  153. package/core/.formation/.episode-input.json +0 -10
  154. package/core/.formation/.merge-lock +0 -1
  155. package/core/.formation/lead.yaml +0 -118
  156. package/core/.formation/legacy.bak/designer.yaml +0 -57
  157. package/core/.formation/legacy.bak/pm.yaml +0 -57
  158. package/core/.formation/legacy.bak/qa.yaml +0 -57
  159. package/core/.formation/legacy.bak/review.yaml +0 -62
  160. package/core/.formation/legacy.bak/scheduler.yaml +0 -129
  161. package/core/.formation/legacy.bak/sre.yaml +0 -57
  162. package/core/.formation/role-map.yaml +0 -274
  163. package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
  164. package/core/.formation/roles/_shared/modules/security.yaml +0 -103
  165. package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
  166. package/core/.formation/roles/backend/role.yaml +0 -93
  167. package/core/.formation/roles/code_reviewer/role.yaml +0 -102
  168. package/core/.formation/roles/database_optimizer/role.yaml +0 -107
  169. package/core/.formation/roles/designer/role.yaml +0 -66
  170. package/core/.formation/roles/developer/role.yaml +0 -75
  171. package/core/.formation/roles/frontend/role.yaml +0 -134
  172. package/core/.formation/roles/incident_response/role.yaml +0 -89
  173. package/core/.formation/roles/qa/role.yaml +0 -89
  174. package/core/.formation/roles/security/role.yaml +0 -87
  175. package/core/.formation/roles/sre/role.yaml +0 -66
  176. package/core/.formation/skills/coordinator.yaml +0 -52
  177. package/core/.formation/solo/diagnosis.yaml +0 -78
  178. package/core/.formation/solo/strategy.yaml +0 -121
  179. package/core/.formation/tests/hello.txt +0 -2
  180. package/core/.formation/tools/coordinator.js +0 -350
  181. package/core/.formation/tools/jev-correction.js +0 -214
  182. package/core/.formation/tools/jev-correction.test.js +0 -178
  183. package/core/.formation/tools/log-reader.js +0 -232
  184. package/core/.formation/tools/revert-daemon-state.js +0 -162
  185. package/core/.formation/tools/test-drift.js +0 -148
  186. package/core/.formation/unit/heimdall.yaml +0 -96
  187. package/core/.formation/unit/plan.yaml +0 -67
  188. package/core/.formation/unit/think.yaml +0 -58
  189. package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
  190. package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
  191. package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
  192. package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
  193. package/core/.kenaz/muninn_episode_write.ps1 +0 -17
  194. package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
  195. package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
  196. package/core/.kenaz/runes_TASK_1428.json +0 -57
  197. package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
  198. package/core/.kenaz/tmp_props.json +0 -1
  199. package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
  200. package/core/.rule/MECHANIZED.md +0 -61
  201. package/core/.rule/general/cortex-memory-recall.yaml +0 -446
  202. package/core/.rule/general/pipeline.yaml +0 -246
  203. package/core/.rule/general/sunny-access-control.yaml +0 -60
  204. package/core/.rule/general/system-invariants.yaml +0 -231
  205. package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
  206. package/core/.rule/pipeline/auto-update.yaml +0 -282
  207. package/core/.rule/pipeline/task-execution.yaml +0 -365
  208. package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
  209. package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
  210. package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
  211. package/core/.specialist/Ansuz/workflow.yaml +0 -1225
  212. package/core/.specialist/experiments/rg_benchmark.js +0 -523
  213. package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
  214. package/core/.specialist/tools/jev-optional-context.js +0 -107
  215. package/core/.specialist/tools/jev-optional-context.test.js +0 -152
  216. package/core/.specialist/tools/memory-action-log.js +0 -839
  217. package/core/.specialist/tools/phase-gate.js +0 -3534
  218. package/core/.specialist/tools/phase-gate.test.js +0 -85
  219. package/core/.specialist/tools/precompute-runner.js +0 -444
  220. package/core/.specialist/tools/rule-engine.js +0 -621
  221. package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
  222. package/core/.synapse/memory-shared.json.sync +0 -1
  223. package/core/.system/agent-skills/README.md +0 -724
  224. package/core/.system/cli-tools/README.md +0 -724
  225. package/core/.system/cortex/MODULES.md +0 -1046
  226. package/core/.system/dashboard/FRONTEND.md +0 -812
  227. package/core/.system/dashboard/README.md +0 -737
  228. package/core/.system/failure/README.md +0 -723
  229. package/core/.system/formation/LEGACY_SKILLS.md +0 -974
  230. package/core/.system/formation/POST_COMPLETE.md +0 -602
  231. package/core/.system/formation/README.md +0 -1094
  232. package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
  233. package/core/.system/kenaz/README.md +0 -787
  234. package/core/.system/memory/README.md +0 -719
  235. package/core/.system/pipeline/README.md +0 -712
  236. package/core/.system/rule/README.md +0 -794
  237. package/core/.system/sunny/README.md +0 -476
  238. package/core/.system/sunny/RULES.json +0 -89
  239. package/core/.system/sunny/knowledge/INDEX.md +0 -37
  240. package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
  241. package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
  242. package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
  243. package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
  244. package/core/.system/sunny/teammates/README.md +0 -107
  245. package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
  246. package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
  247. package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
  248. package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
  249. package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
  250. package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
  251. package/core/.system/sunny/tools.json +0 -101
  252. package/core/dev/scripts/cleanup-queue.js +0 -184
  253. package/core/dev/scripts/cleanup_queue.js +0 -86
  254. package/core/dev/scripts/legacy/README.md +0 -39
  255. package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
  256. package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
  257. package/core/dev/scripts/matrix/CLI_README.md +0 -214
  258. package/core/dev/scripts/matrix/README.md +0 -310
  259. package/core/dev/scripts/matrix/package-lock.json +0 -4266
  260. package/core/dev/scripts/matrix/package.json +0 -55
  261. package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
  262. package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
  263. package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
  264. package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
  265. package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
  266. package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
  267. package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
  268. package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
  269. package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
  270. package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
  271. package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
  272. package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
  273. package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
  274. package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
  275. package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
  276. package/core/dev/scripts/matrix/src/index.ts +0 -62
  277. package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
  278. package/core/dev/scripts/matrix/src/parser.ts +0 -281
  279. package/core/dev/scripts/matrix/src/serializer.ts +0 -151
  280. package/core/dev/scripts/matrix/src/validator.ts +0 -301
  281. package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
  282. package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
  283. package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
  284. package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
  285. package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
  286. package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
  287. package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
  288. package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
  289. package/core/dev/scripts/matrix/tsconfig.json +0 -20
  290. package/core/dev/scripts/matrix/types/index.d.ts +0 -111
  291. package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
  292. package/core/dev/scripts/matrix/types/index.js +0 -8
  293. package/core/dev/scripts/matrix/types/index.js.map +0 -1
  294. package/core/dev/scripts/matrix/types/index.ts +0 -124
  295. package/core/dev/scripts/memory-usage-report.js +0 -152
  296. package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
  297. package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
  298. package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
  299. package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
  300. package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
  301. package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
  302. package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
  303. package/core/dev/scripts/validate_pipeline.js +0 -197
  304. package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
  305. package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
  306. package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
  307. package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
  308. package/core/plugins/kenaz/commands/strategy.md +0 -141
@@ -1,282 +0,0 @@
1
- rule_id: PPL-003
2
- title: 任務完成後必須更新 Pipeline 系統
3
- category: pipeline
4
- severity: critical
5
- status: active
6
- created_at: 2026-02-06
7
- author: PM Lead (Product Manager Agent)
8
-
9
- description: |
10
- 當任務完成並提交 Git commit 時,必須同步更新 Pipeline 系統的所有相關文件。
11
- 這是防止 FAIL-003(TASK_QUEUE 污染)問題的核心規則。
12
-
13
- context: |
14
- 問題背景:
15
- - Pipeline 多次出現不一致(PROGRESS.md 說完成,TASK_QUEUE.json 說 pending)
16
- - 已完成任務文件未歸檔到 completed/ 目錄
17
- - 統計數據不一致,影響進度追蹤
18
- - 用戶反覆提到 "Pipeline 常常不對"
19
-
20
- 根本原因:
21
- - Developer Agent 未執行完整的 Pipeline 更新流程
22
- - 缺少自動化驗證機制
23
- - 缺少強制性檢查清單
24
-
25
- requirements:
26
- 1_update_task_queue:
27
- description: 更新 TASK_QUEUE.json 中任務的狀態與元數據
28
- steps:
29
- - 更新任務的 status 為 "completed"
30
- - 填寫 completed_at(ISO 8601 格式,含時區)
31
- - 填寫 completed_by(Agent 名稱)
32
- - 填寫 git_commit(Git commit hash,如果有)
33
- - 重新計算 statistics 統計數據(pending, in_progress, blocked, completed, total)
34
- - 更新 last_updated 時間戳
35
- validation:
36
- - 執行 JSON 語法驗證:node -e "JSON.parse(require('fs').readFileSync('dev/pipeline/TASK_QUEUE.json', 'utf8'))"
37
- - 確保統計數據與實際任務狀態一致
38
-
39
- 2_move_task_file:
40
- description: 將任務文件從 tasks/ 移動到 completed/
41
- steps:
42
- - 確認任務文件在 tasks/ 目錄存在
43
- - 移動文件到 completed/ 目錄(保持文件名不變)
44
- - 驗證文件成功移動(tasks/ 中已無該文件)
45
- - 驗證文件在 completed/ 中存在
46
- example: |
47
- # PowerShell
48
- Move-Item "dev/pipeline/tasks/TASK_XXX.yaml" "dev/pipeline/completed/"
49
-
50
- # Bash
51
- mv dev/pipeline/tasks/TASK_XXX.yaml dev/pipeline/completed/
52
-
53
- 3_update_progress:
54
- description: 更新 PROGRESS.md 的進度記錄
55
- steps:
56
- - 更新 "Last Update" 區塊(時間、Agent、Action)
57
- - 更新 "Current Queue Status" 統計數據
58
- - 更新 "Pending Tasks" 列表(移除已完成任務)
59
- - 更新 "Recently Completed" 列表(加入剛完成的任務)
60
- - 新增 "Recent Activity" 記錄
61
- validation:
62
- - 確保 PROGRESS.md 的統計數據與 TASK_QUEUE.json 一致
63
- - 確保無 Markdown 格式錯誤
64
-
65
- 4_verify_consistency:
66
- description: 驗證 Pipeline 系統一致性
67
- steps:
68
- - 執行驗證腳本:.\dev\scripts\validate_pipeline.ps1
69
- - 確保無錯誤輸出
70
- - 如果有錯誤,執行自動修復:.\dev\scripts\fix_pipeline.ps1
71
- mandatory: true
72
- failure_action: "修復不一致後再 commit"
73
-
74
- enforcement:
75
- who_must_follow:
76
- - Developer Agent(單一任務開發)
77
- - PM Lead(多任務並行整合,遵循 TEAM-002)
78
- - Backend Team / Frontend Team(團隊模式開發)
79
- - 所有完成任務的 Agent
80
-
81
- when_to_apply:
82
- - 任務完成並準備提交 Git commit 時
83
- - PM Lead 整合多個團隊的成果時
84
- - 手動標記任務為 completed 時
85
-
86
- verification_timing:
87
- - Git commit 前(pre-commit hook)
88
- - 任務完成後立即執行
89
- - 每日自動檢查(可選)
90
-
91
- violation_consequence:
92
- immediate:
93
- - Pipeline 不一致,進度追蹤錯誤
94
- - 可能重複執行已完成任務
95
- - 統計數據不準確,影響決策
96
- - Git commit 被 pre-commit hook 阻止
97
-
98
- long_term:
99
- - 累積技術債,需要手動修復
100
- - 團隊協作效率降低
101
- - 用戶信任度下降("Pipeline 常常不對")
102
-
103
- automation:
104
- validation_script: dev/scripts/validate_pipeline.ps1
105
- fix_script: dev/scripts/fix_pipeline.ps1
106
- git_hook: .git/hooks/pre-commit
107
-
108
- checklist:
109
- title: "Pipeline 更新完成檢查清單"
110
- items:
111
- - label: "TASK_QUEUE.json 已更新任務 status 為 completed"
112
- required: true
113
- - label: "TASK_QUEUE.json 已填寫 completed_at, completed_by, git_commit"
114
- required: true
115
- - label: "TASK_QUEUE.json statistics 已更新"
116
- required: true
117
- - label: "TASK_QUEUE.json JSON 語法驗證通過"
118
- required: true
119
- - label: "任務文件已移動到 dev/pipeline/completed/"
120
- required: true
121
- - label: "tasks/ 目錄中已無該任務文件"
122
- required: true
123
- - label: "PROGRESS.md Last Update 已更新"
124
- required: true
125
- - label: "PROGRESS.md Statistics 已更新"
126
- required: true
127
- - label: "PROGRESS.md Pending Tasks 列表已更新"
128
- required: true
129
- - label: "PROGRESS.md Recently Completed 已加入"
130
- required: true
131
- - label: "validate_pipeline.ps1 驗證通過"
132
- required: true
133
- - label: "日誌已寫入 dev/pipeline/logs/"
134
- required: false
135
-
136
- examples:
137
- good_practice: |
138
- # 完整的 Pipeline 更新流程範例
139
-
140
- ## Step 1: 更新 TASK_QUEUE.json
141
- ```json
142
- {
143
- "id": "TASK_XXX",
144
- "status": "completed", // ✓ 更新狀態
145
- "completed_at": "2026-02-06T22:00:00+08:00", // ✓ 填寫時間
146
- "completed_by": "Developer Agent", // ✓ 填寫執行者
147
- "git_commit": "a1b2c3d" // ✓ 填寫 commit hash
148
- }
149
-
150
- "statistics": {
151
- "pending": 0, // ✓ 重新計算
152
- "completed": 10 // ✓ 增加 1
153
- }
154
-
155
- "last_updated": "2026-02-06T22:00:00+08:00" // ✓ 更新時間
156
- ```
157
-
158
- ## Step 2: 移動文件
159
- ```powershell
160
- Move-Item "dev/pipeline/tasks/TASK_XXX.yaml" "dev/pipeline/completed/"
161
- ```
162
-
163
- ## Step 3: 更新 PROGRESS.md
164
- ```markdown
165
- ## Last Update
166
- - **Time**: 2026-02-06 22:00
167
- - **Agent**: Developer Agent
168
- - **Action**: TASK_XXX 完成!...
169
-
170
- ### Pending Tasks
171
- 無待處理任務 // ✓ 移除已完成任務
172
-
173
- ### Recently Completed
174
- | TASK_XXX | ... ✅ | // ✓ 加入剛完成的任務
175
- ```
176
-
177
- ## Step 4: 驗證一致性
178
- ```powershell
179
- .\dev\scripts\validate_pipeline.ps1
180
- # 輸出:✅ Pipeline 狀態完全一致!
181
- ```
182
-
183
- ## Step 5: Git Commit
184
- ```bash
185
- git add .
186
- git commit -m "[TASK_XXX] 完成任務描述"
187
- # pre-commit hook 自動驗證 Pipeline,通過後提交
188
- ```
189
-
190
- bad_practice: |
191
- # ❌ 錯誤的做法(導致 Pipeline 不一致)
192
-
193
- ## 錯誤 1: 只更新 PROGRESS.md,忘記 TASK_QUEUE.json
194
- ```markdown
195
- ## Last Update
196
- - **Action**: TASK_XXX 完成!
197
- ```
198
-
199
- 但 TASK_QUEUE.json 中 TASK_XXX 仍然是 "status": "pending" ❌
200
-
201
- ## 錯誤 2: 更新狀態但不移動文件
202
- ```json
203
- { "id": "TASK_XXX", "status": "completed" } // ✓ 狀態更新
204
- ```
205
-
206
- 但文件還在 tasks/ 目錄 ❌
207
-
208
- ## 錯誤 3: 移動文件但不更新統計
209
- ```powershell
210
- Move-Item "tasks/TASK_XXX.yaml" "completed/" // ✓ 文件移動
211
- ```
212
-
213
- 但 statistics.completed 沒有增加 ❌
214
-
215
- ## 錯誤 4: 直接 commit 不驗證
216
- ```bash
217
- git commit -m "完成" # ❌ 沒有執行 validate_pipeline.ps1
218
- ```
219
-
220
- 結果:Pipeline 不一致,用戶抱怨 "Pipeline 常常不對"
221
-
222
- prevention_tools:
223
- automated_validation:
224
- script: dev/scripts/validate_pipeline.ps1
225
- description: 自動檢查 Pipeline 一致性
226
- usage: |
227
- # 基本驗證
228
- .\dev\scripts\validate_pipeline.ps1
229
-
230
- # 詳細模式
231
- .\dev\scripts\validate_pipeline.ps1 -Detailed
232
-
233
- # 自動修復
234
- .\dev\scripts\validate_pipeline.ps1 -Fix
235
-
236
- automated_fix:
237
- script: dev/scripts/fix_pipeline.ps1
238
- description: 自動修復 Pipeline 不一致
239
- usage: |
240
- # 執行修復
241
- .\dev\scripts\fix_pipeline.ps1
242
-
243
- # 模擬運行(不實際修改)
244
- .\dev\scripts\fix_pipeline.ps1 -DryRun
245
-
246
- git_hook:
247
- file: .git/hooks/pre-commit
248
- description: Git commit 前自動驗證 Pipeline
249
- setup: |
250
- # 建立 pre-commit hook
251
- .\dev\scripts\setup_git_hooks.ps1
252
-
253
- related_failures:
254
- - FAIL-003: TASK_QUEUE 污染問題
255
- - 多次 Pipeline 不一致事件(2026-02-06 兩次)
256
-
257
- related_rules:
258
- - PPL-002: 已完成任務必須封存到 .memory/
259
- - TEAM-002: PM Lead 團隊成果整合規則
260
- - AGT-005: 失敗時必須查閱失敗經驗
261
-
262
- maintenance:
263
- review_frequency: 每月
264
- next_review: 2026-03-06
265
- effectiveness_metric: Pipeline 不一致事件發生次數(目標:0 次/月)
266
-
267
- notes: |
268
- 這個規則是從多次 Pipeline 不一致事件中總結出來的核心預防措施。
269
-
270
- 重要性:
271
- - Critical 級別:違反此規則會導致整個 Pipeline 系統失效
272
- - 必須嚴格執行,無例外
273
-
274
- 執行難度:
275
- - 已提供自動化工具(validate, fix, git hook)
276
- - 有明確的檢查清單
277
- - 有詳細的範例
278
-
279
- 預期效果:
280
- - 完全消除 Pipeline 不一致問題
281
- - 提升團隊協作效率
282
- - 增強用戶信任度
@@ -1,365 +0,0 @@
1
- # .rule/pipeline/task-execution.yaml
2
- # Pipeline 任務執行規則 - 定義完整的任務執行規範
3
-
4
- _meta:
5
- category: "pipeline"
6
- priority: 1 # 高優先級(僅次於核心原則)
7
- applies_to:
8
- - "ai_agent"
9
- - "lead_agent"
10
- last_updated: "2026-02-09"
11
- description: |
12
- 定義 Lead Agent 和所有 Agent 執行 Pipeline 任務的標準流程。
13
- 涵蓋任務拆分、依賴管理、並行執行、Team 選擇等核心流程。
14
-
15
- rules:
16
- # ======================================
17
- # 任務拆分與粒度
18
- # ======================================
19
- - id: "PPL-101"
20
- title: "任務拆分粒度標準"
21
- description: |
22
- 任務應拆分為 15-20 分鐘可完成的單元。
23
- 拆分依據:
24
- - 一個任務 = 一個功能點/組件/API/文檔
25
- - 避免過大任務(> 1 小時)或過小任務(< 5 分鐘)
26
- - 每個任務必須有明確的驗收標準
27
- severity: "must"
28
- rationale: |
29
- 適當粒度確保:
30
- - 並行執行效率最大化
31
- - 失敗範圍可控(易於重試)
32
- - 進度追蹤準確
33
- examples:
34
- - good: "建立用戶登入 API - POST /api/auth/login"
35
- - bad: "建立完整認證系統(太大)"
36
- - bad: "修改變數名稱(太小,應合併到其他任務)"
37
-
38
- # ======================================
39
- # 依賴管理
40
- # ======================================
41
- - id: "PPL-102"
42
- title: "依賴管理規則"
43
- description: |
44
- 任務定義必須明確 dependencies 字段。
45
- - 無依賴(dependencies: []):立即執行
46
- - 有依賴:等待依賴任務完成
47
- - 依賴任務 ID 必須存在於 Pipeline
48
- severity: "must"
49
- rationale: "確保執行順序正確,避免前置條件未滿足"
50
- examples:
51
- - task: "TASK_002: 實現登入 API"
52
- dependencies: ["TASK_001"] # 依賴 TASK_001(資料庫架構)
53
- - task: "TASK_003: 建立登入頁面"
54
- dependencies: ["TASK_002"] # 依賴 TASK_002(API)
55
-
56
- # ======================================
57
- # 並行執行
58
- # ======================================
59
- - id: "PPL-103"
60
- title: "並行執行策略"
61
- description: |
62
- 系統自動判斷可並行任務:
63
- - 無依賴 + 無 scope_paths 衝突 → 可並行
64
- - 有依賴或路徑衝突 → 順序執行
65
-
66
- Lead Agent 職責:
67
- - 識別可並行任務(dependencies: [])
68
- - 檢查 scope_paths 衝突(PPL-111)
69
- - 啟動多個 Agent 執行
70
- severity: "should"
71
- rationale: "最大化並行效率,縮短總執行時間"
72
- examples:
73
- - scenario: "3 個獨立 API 開發任務"
74
- approach: "同時啟動 3 個 Backend Agent"
75
- - scenario: "前端依賴後端 API"
76
- approach: "先執行後端,再執行前端"
77
-
78
- # ======================================
79
- # Agent Type 命名規則
80
- # ======================================
81
- - id: "PPL-105"
82
- title: "agent_type 命名規則"
83
- description: |
84
- 任務定義中的 agent_type 字段命名規範:
85
- - 直接使用 Agent 名稱(developer, strategy, backend 等)
86
- - 必須與 .claude/skills/ 中的 Agent 名稱一致
87
- severity: "must"
88
- rationale: "確保 Lead Agent 能正確調用對應的 Team 或 Agent"
89
- examples:
90
- - correct: "agent_type: developer" # 調用 Developer Agent
91
- - correct: "agent_type: strategy" # 調用 Strategy Agent
92
- - incorrect: "agent_type: developer-agent" # 錯誤格式(應用底線)
93
-
94
- # ======================================
95
- # Feature ID 自動分配
96
- # ======================================
97
- - id: "PPL-106"
98
- title: "Feature ID 自動分配"
99
- description: |
100
- Lead Agent 拆分任務時:
101
- - 為同一功能的任務分配相同 feature_id
102
- - Feature ID 格式:F-XXX(3 位數字)
103
- - 記錄於任務的 feature_ids 字段(陣列)
104
-
105
- 用途:
106
- - 追蹤功能完整度
107
- - 過濾相關任務
108
- - 生成功能報告
109
- severity: "must"
110
- rationale: "實現功能級追蹤,而非僅任務級"
111
- examples:
112
- - feature: "F-016: 統一開發流程規範"
113
- tasks:
114
- - "TASK_147: 建立 task-execution.yaml"
115
- - "TASK_148: 更新 Lead Agent Skill"
116
- - "TASK_149: 建立測試案例"
117
-
118
- # ======================================
119
- # 工作啟動流程
120
- # ======================================
121
- - id: "PPL-107"
122
- title: "工作啟動前展示計劃"
123
- description: |
124
- Lead Agent 開始執行前必須:
125
- 1. 讀取 F-XXX 文檔(如果指定)
126
- 2. 讀取所有相關 TASK_XXX.yaml
127
- 3. 分析任務範圍和依賴
128
- 4. **展示完整執行計劃給用戶**(含任務列表、優先級、並行策略)
129
- 5. 等待用戶確認
130
- 6. 開始執行
131
- severity: "must"
132
- rationale: |
133
- 防止誤解需求、避免不必要的工作、確保用戶對計劃有控制權
134
- examples:
135
- - good: |
136
- Lead Agent: "分析完成,計劃執行 5 個任務:
137
- - TASK_147 (P0): 建立規則文檔
138
- - TASK_148 (P1): 更新 Lead Agent
139
- - TASK_149 (P1): 建立測試
140
-
141
- 並行策略:147 和 149 可並行。
142
-
143
- 是否開始執行?"
144
- - bad: "已讀取任務,開始執行。" # 未展示計劃
145
-
146
- # ======================================
147
- # 任務失敗處理
148
- # ======================================
149
- - id: "PPL-108"
150
- title: "任務失敗立即報告"
151
- description: |
152
- 任務失敗時 Worker Agent 必須:
153
- 1. 立即停止後續步驟
154
- 2. 記錄失敗原因到日誌
155
- 3. 更新任務狀態為 blocked
156
- 4. 通知 Leader
157
- 5. 不可靜默失敗或繼續執行
158
- severity: "must"
159
- rationale: "早期發現問題,避免錯誤傳播,節省調試時間"
160
- examples:
161
- - failure_scenario: "API 測試失敗"
162
- correct_action: |
163
- 1. 記錄失敗日誌
164
- 2. 更新 TASK_QUEUE.json: status=blocked
165
- 3. 通知 Leader Agent 任務已阻塞
166
- - incorrect: "測試失敗但繼續建立 commit(錯誤傳播)"
167
-
168
- # ======================================
169
- # Git Commit 策略
170
- # ======================================
171
- - id: "PPL-109"
172
- title: "階段性 Git Commit 策略"
173
- description: |
174
- Worker Agent 執行任務時:
175
- - 完成一個階段 → 建立一次 commit
176
- - Commit message 必須包含 [TASK_XXX] 標記
177
- - 任務完成時至少產生 1 個 commit
178
- - 允許多個 commit(對應不同階段)
179
- severity: "must"
180
- rationale: "提供可驗證的輸出,便於追蹤和回滾"
181
- examples:
182
- - single_commit: "[TASK_147] 建立 Pipeline 執行規則文檔"
183
- - multiple_commits: |
184
- - "[TASK_148] 更新 Lead Agent Skill - 新增 Stage 1-3"
185
- - "[TASK_148] 更新 Lead Agent Skill - 新增 Stage 4-6"
186
- - "[TASK_148] 更新 Lead Agent Skill - 新增範例和測試"
187
-
188
- # ======================================
189
- # 任務完成後續動作
190
- # ======================================
191
- - id: "PPL-110"
192
- title: "任務完成後續動作"
193
- description: |
194
- Worker Agent 完成任務後自動執行:
195
- 1. 建立 Git commit(包含 [TASK_XXX])
196
- 2. 更新 TASK_QUEUE.json: status=completed
197
- 3. 記錄執行日誌
198
- 4. 檢查是否有依賴此任務的其他任務(解除阻塞)
199
-
200
- Leader Agent 檢測到完成後:
201
- 1. 驗證輸出(Git commit 存在)
202
- 2. 檢查驗收標準是否滿足
203
- 3. 啟動下一個任務(如果有)
204
- severity: "must"
205
- rationale: "自動化流程,確保 Pipeline 持續運行"
206
-
207
- # ======================================
208
- # Scope Paths 衝突檢測
209
- # ======================================
210
- - id: "PPL-111"
211
- title: "scope_paths 衝突檢測"
212
- description: |
213
- Lead Agent 啟動任務前必須檢測:
214
- - 讀取所有 in_progress 任務的 scope_paths
215
- - 檢查新任務的 scope_paths 是否衝突
216
- - 衝突定義:路徑重疊(包含或被包含)
217
-
218
- 衝突處理:
219
- - 有衝突 → 等待衝突任務完成
220
- - 無衝突 → 啟動新任務
221
- severity: "must"
222
- rationale: "防止多個 Agent 同時修改相同文件,避免 Git 衝突"
223
- examples:
224
- - conflict: |
225
- - TASK_A: scope_paths: [".rule/pipeline/"]
226
- - TASK_B: scope_paths: [".rule/pipeline/task-execution.yaml"]
227
- → 衝突(B 包含在 A 中)
228
- - no_conflict: |
229
- - TASK_A: scope_paths: [".rule/pipeline/"]
230
- - TASK_B: scope_paths: [".rule/general/"]
231
- → 無衝突(路徑不重疊)
232
-
233
- # ======================================
234
- # 回歸保護(Regression Guard)
235
- # ======================================
236
- - id: "PPL-113"
237
- title: "回歸保護 — Agent + Script 協作模型"
238
- description: |
239
- Agent 判斷要跑什麼測試,透過 --test-cmd 傳給 post-complete.js 執行。
240
- 腳本依序跑每組測試、記錄結果、處理閉環。
241
-
242
- === 流程 ===
243
- 1. Agent 完成任務後,根據 scope_paths 和實際修改的檔案判斷需要哪些測試
244
- 2. Agent 透過 --test-cmd 參數傳給 post-complete.js(可多次指定)
245
- 3. 腳本依序執行每組測試,記錄結果
246
- 4. 全過 → 繼續 commit + merge
247
- 5. 有失敗 → 開 FIX 單(閉環),繼續 commit
248
-
249
- === Agent 傳遞測試指令 ===
250
- post-complete.js --task=TASK_XXX \
251
- --test-cmd "node dev/scripts/rust-verify-worktree.js run <branch> <filter>"
252
-
253
- 如果 Agent 未傳 --test-cmd,腳本 fallback 到自動偵測所有可用測試套件。
254
-
255
- === Agent 測試判斷指引 ===
256
- - 修改 dashboard/src-tauri/ (Rust, kenaz-server) → --test-cmd "node dev/scripts/rust-verify-worktree.js run <branch> <filter>"(Dashboard 前端與 pty-server 已於 2026-10-11 移除)
257
- - 修改 kenaz-cortex/ (Python) → --test-cmd "cd kenaz-cortex && pytest"
258
- - 只修改 .yaml/.md/設定檔 → --skip-tests(無需測試)
259
- - 修改多個子系統 → 多個 --test-cmd,分別指定
260
-
261
- === 閉環機制(不阻塞 Pipeline)===
262
- - 測試失敗時,腳本自動開 FIX 單(P1, tags: fix,regression)
263
- - FIX 單含防重複機制(已有未解決 regression 單則跳過建立)
264
- - 當前任務照常 commit + merge(不中止)
265
- - FIX 單排入 backlog 等待下一輪執行
266
-
267
- === 重要限制 ===
268
- - 只跑已有的測試,不要求 Agent 額外寫測試
269
- - Agent 判斷 + 腳本執行,兩者互補
270
- - 失敗時記錄到執行日誌,不自動重試
271
- severity: "must"
272
- rationale: |
273
- Agent 比腳本更了解上下文,能精準判斷需要哪些測試。
274
- 腳本負責可靠執行、結果收集、閉環處理。
275
- Agent 忘記傳參時,auto-detect fallback 保底。
276
- 防止 Agent 完成 TASK_B 時意外破壞 TASK_A 的功能。
277
- examples:
278
- - scenario: "修改了 kenaz-server 的 Rust 與 plugin 的 JS"
279
- action: |
280
- Agent 判斷:改了 dashboard/src-tauri/ 和 plugins/kenaz/scripts/
281
- → post-complete.js --task=TASK_XXX \
282
- --test-cmd "node dev/scripts/rust-verify-worktree.js run <branch> peer" \
283
- --test-cmd "node --test plugins/kenaz/scripts/kenaz.test.js"
284
- → 腳本依序跑 2 組測試
285
- → 全過 → 繼續 PPL-109 commit
286
- - scenario: "只修改了 Python 後端 API"
287
- action: |
288
- Agent 判斷:只改了 kenaz-cortex/
289
- → post-complete.js --task=TASK_XXX \
290
- --test-cmd "cd kenaz-cortex && pytest"
291
- → 全過 → 繼續
292
- - scenario: "只修改了 .rule/ YAML 設定"
293
- action: |
294
- Agent 判斷:純設定檔,無對應測試
295
- → post-complete.js --task=TASK_XXX --skip-tests
296
- - scenario: "Agent 忘記傳 --test-cmd"
297
- action: |
298
- → post-complete.js --task=TASK_XXX(無 --test-cmd)
299
- → 腳本 fallback:自動偵測所有測試套件
300
- → 依序執行找到的測試
301
-
302
- # ======================================
303
- # 驗收標準驗證
304
- # ======================================
305
- - id: "PPL-112"
306
- title: "驗收標準驗證"
307
- description: |
308
- Worker Agent 完成任務後:
309
- - 讀取任務的 acceptance_criteria
310
- - 逐項檢查是否滿足
311
- - 在日誌中記錄驗證結果
312
- - 只有全部滿足才標記為 completed
313
-
314
- 驗證方式:
315
- - 文件存在性:檢查路徑
316
- - Git commit:git log -1 --oneline | grep "[TASK_XXX]"
317
- - 語法正確:執行語法檢查工具
318
- severity: "must"
319
- rationale: "確保任務輸出符合要求,提高品質"
320
- examples:
321
- - criteria: "README.md 已更新,包含新章節"
322
- verification: |
323
- 1. 檢查文件存在: test -f README.md
324
- 2. 檢查內容: grep "新章節" README.md
325
- 3. 檢查 commit: git log -1 | grep "[TASK_XXX]"
326
-
327
- # ======================================
328
- # 快速參考
329
- # ======================================
330
- quick_reference:
331
- lead_agent_checklist:
332
- - "讀取 F-XXX 和所有 TASK_XXX.yaml"
333
- - "分析任務、依賴、scope_paths"
334
- - "展示執行計劃給用戶(PPL-107)"
335
- - "等待用戶確認"
336
- - "檢查 scope_paths 衝突(PPL-111)"
337
- - "啟動 Agent 執行任務"
338
- - "監控執行狀態"
339
- - "驗證輸出(Git commit + 驗收標準)"
340
-
341
- worker_agent_checklist:
342
- - "讀取任務定義"
343
- - "記錄階段日誌(想法、行動、結果)"
344
- - "執行開發工作"
345
- - "失敗時立即報告(PPL-108)"
346
- - "執行回歸測試(PPL-113)"
347
- - "完成時建立 commit(PPL-109)"
348
- - "驗證驗收標準(PPL-112)"
349
- - "更新 TASK_QUEUE.json: status=completed"
350
-
351
- task_yaml_template:
352
- id: "TASK_XXX"
353
- title: "任務標題"
354
- description: "詳細描述"
355
- priority: "P0" # P0/P1/P2/P3
356
- status: "pending" # pending/in_progress/completed/blocked
357
- agent_type: "developer" # Agent 名稱
358
- source: "F-XXX" # Feature ID
359
- feature_ids: ["F-XXX"] # 所屬功能
360
- dependencies: [] # 依賴任務 ID
361
- scope_paths: [] # 修改路徑
362
- requirements: [] # 需求列表
363
- acceptance_criteria: [] # 驗收標準
364
- estimated_hours: 0.25
365
- complexity: "simple" # simple/medium/complex