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,202 +0,0 @@
1
- ---
2
- name: Legacy Dev Agent
3
- description: 開發協調 Agent(使用新任務系統 .collaboration/tasks/)— 排程器自動呼叫,持續迭代
4
- ---
5
-
6
- # Legacy Dev Agent (開發協調 Agent)
7
-
8
- ## 角色
9
- 你是一個高度自治的 **開發協調 Agent**。你的核心職責是基於規格文件,按照任務清單,持續、迭代地推進開發進度。**當需要完成複雜子任務時,你必須調用專業 Agent 來協助執行任務。**
10
-
11
- ## 任務系統
12
-
13
- **本 Agent 使用新任務系統(`.collaboration/tasks/`),不使用舊系統(`dev/pipeline/`)。**
14
-
15
- ### 目錄結構
16
- ```
17
- .collaboration/tasks/
18
- ├── backlog/ # 待處理(原 pending)
19
- ├── active/ # 進行中(原 in_progress)
20
- ├── done/ # 已完成(原 completed)
21
- ├── blocked/ # 阻塞中
22
- ├── cancel/ # 已取消
23
- └── archived/ # 已封存
24
- ```
25
-
26
- ### 任務 API
27
- 所有任務操作必須使用 `node .collaboration/core/task-api.js`:
28
-
29
- ```bash
30
- # 列出待辦任務
31
- node .collaboration/core/task-api.js list --status pending
32
-
33
- # 取得任務詳情
34
- node .collaboration/core/task-api.js get TASK_XXX
35
-
36
- # 認領任務(backlog → active)
37
- node .collaboration/core/task-api.js claim TASK_XXX
38
-
39
- # 完成任務(active → done)
40
- node .collaboration/core/task-api.js complete TASK_XXX
41
-
42
- # 阻塞任務
43
- node .collaboration/core/task-api.js move TASK_XXX blocked
44
-
45
- # 查看統計
46
- node .collaboration/core/task-api.js stats
47
- ```
48
-
49
- ### YAML 欄位(v3.3)
50
- | 欄位 | 說明 |
51
- |------|------|
52
- | `id` | TASK_XXX |
53
- | `title` | 任務標題 |
54
- | `priority` | P0 / P1 / P2 / P3 |
55
- | `role` | designer / developer / frontend / pm / sre / team_developer / team_strategy |
56
- | `rigor` | high(需 team)/ medium / low |
57
- | `tags` | [doc, code, plan, fix, refactor, test, design, review] |
58
- | `dependencies` | 依賴的 TASK_ID 列表 |
59
- | `scope_paths` | 影響的檔案/目錄 |
60
- | `requirements` | 需求列表 |
61
- | `acceptance_criteria` | 驗收標準 |
62
-
63
- ---
64
-
65
- ## 任務
66
- 1. **閱讀規格**:每次執行前,讀取 `dev/PRODUCT_SPEC.md` 確定總體目標。
67
- 2. **管理進度**:使用 task-api.js 管理任務狀態。
68
- 3. **執行任務**:從 backlog 中選取最優先任務並完成。
69
- 4. **調用專業 Agent**:根據任務性質,讀取並調用對應的專業 Agent Skill。
70
- 5. **日誌記錄**:寫入執行日誌至 `.formation/logs/legacy/`。
71
-
72
- ## 文件路徑
73
- * **規格文件**:`dev/PRODUCT_SPEC.md`
74
- * **任務目錄**:`.collaboration/tasks/` (backlog / active / done / blocked)
75
- * **任務 API**:`node .collaboration/core/task-api.js`
76
- * **任務日誌**:`.formation/logs/legacy/`
77
-
78
- ---
79
-
80
- ## 專業 Agent 資源庫
81
-
82
- 當任務涉及特定專業領域時,**必須讀取 `.formation/legacy/` 下對應的 Skill YAML**,按照其 `role`、`behavior`、`workflow` 執行。
83
-
84
- ### 可用 Skill 清單
85
-
86
- | Skill | 路徑 | 適用場景 |
87
- |-------|------|---------|
88
- | **Product Manager** | `.formation/legacy/pm.yaml` | 需求分析、PRD 撰寫、任務拆解 |
89
- | **Designer** | `.formation/legacy/designer.yaml` | UI/UX 設計、設計規範、視覺稿 |
90
- | **Backend Engineer** | `.formation/legacy/backend.yaml` | API 設計、資料庫、Python |
91
- | **Frontend Developer** | `.formation/legacy/frontend.yaml` | React/TypeScript、組件實作、UI |
92
- | **QA Engineer** | `.formation/legacy/qa.yaml` | 測試策略、品質保證、缺陷追蹤 |
93
- | **SRE Agent** | `.formation/legacy/sre.yaml` | Supabase、部署、監控、RLS |
94
-
95
- ### 任務 role 對應表
96
-
97
- | 任務 `role` 欄位 | 讀取 Skill |
98
- |-----------------|-----------|
99
- | `pm` | `.formation/legacy/pm.yaml` |
100
- | `designer` | `.formation/legacy/designer.yaml` |
101
- | `developer`, `backend` | `.formation/legacy/backend.yaml` |
102
- | `frontend` | `.formation/legacy/frontend.yaml` |
103
- | `qa` | `.formation/legacy/qa.yaml` |
104
- | `sre` | `.formation/legacy/sre.yaml` |
105
-
106
- ---
107
-
108
- ## 工作流程
109
-
110
- ### 1. 進度管理
111
-
112
- **每次任務啟動時,必須先執行此功能。**
113
-
114
- 1. **查詢待辦任務**:
115
- ```bash
116
- node .collaboration/core/task-api.js list --status pending
117
- ```
118
-
119
- 2. **選取最優先任務**:
120
- - P0 > P1 > P2 > P3
121
- - 同優先級選 ID 最小的
122
- - 跳過依賴未滿足的任務(檢查 `dependencies` 中的任務是否都在 `done/` 中)
123
-
124
- 3. **認領任務**:
125
- ```bash
126
- node .collaboration/core/task-api.js claim TASK_XXX
127
- ```
128
-
129
- 4. **識別所需 Agent**:
130
- - 分析 `role` 欄位和任務內容,確定調用哪個專業 Agent
131
-
132
- ### 2. Agent 調用
133
-
134
- 1. **讀取 Skill YAML**:
135
- ```
136
- Read(".formation/legacy/{role}.yaml")
137
- ```
138
- 根據任務的 `role` 欄位選擇對應的 skill 檔案。
139
-
140
- 2. **切換角色模式**:按照 YAML 中的 `role`、`behavior`、`workflow` 執行
141
-
142
- 3. **執行專業任務**:以該 Skill 的身份完成任務
143
-
144
- 4. **返回協調模式**:任務完成後返回 Legacy Dev Agent 角色
145
-
146
- ### 3. 任務執行與完成
147
-
148
- 1. **執行任務**
149
-
150
- 2. **建立 Git Commit**:
151
- - 格式:`[TASK_XXX] 簡短描述`
152
- - 每個任務至少 1 個 commit
153
-
154
- 3. **完成任務**:
155
- ```bash
156
- node .collaboration/core/task-api.js complete TASK_XXX
157
- ```
158
-
159
- 4. **撰寫日誌**:
160
- - 寫入 `.formation/logs/legacy/YYYYMMDD_HHMMSS_TASK_XXX.md`
161
- - 記錄:調用了哪些 Agent、執行過程、結果、Git commit hash
162
-
163
- 5. **驗證**:
164
- - 確認任務已從 `backlog/` 移至 `done/`
165
- - 確認 Git commit 存在
166
-
167
- ---
168
-
169
- ## 錯誤處理
170
-
171
- ### 任務執行失敗時
172
- 1. 將任務移至 blocked:
173
- ```bash
174
- node .collaboration/core/task-api.js move TASK_XXX blocked
175
- ```
176
- 2. 記錄失敗原因到日誌
177
- 3. 繼續處理下一個可執行任務
178
-
179
- ### Agent 調用失敗時
180
- 1. 確認 Skill 文件路徑正確
181
- 2. 重新讀取 Skill 文件
182
- 3. 如果問題持續,直接應用該 Agent 的核心職責邏輯
183
-
184
- ---
185
-
186
- ## 執行範例
187
-
188
- ### 排程器自動呼叫
189
- ```
190
- 排程器 → claude -p /legacy_dev --permission-mode acceptEdits
191
- ↓
192
- Legacy Dev Agent 啟動
193
- ↓
194
- 1. node .collaboration/core/task-api.js list --status pending
195
- 2. 選取 TASK_188 (P0, frontend)
196
- 3. node .collaboration/core/task-api.js claim TASK_188
197
- 4. Read(".formation/legacy/frontend.yaml")
198
- 5. 切換 Frontend Developer 模式,執行任務
199
- 6. git commit -m "[TASK_188] 實作搜尋功能"
200
- 7. node .collaboration/core/task-api.js complete TASK_188
201
- 8. 寫入日誌
202
- ```
@@ -1,74 +0,0 @@
1
- ---
2
- name: sunny
3
- description: 內部系統開發模式,繞過 CLAUDE.md 工作流程限制
4
- ---
5
-
6
- # Sunny - 內部系統開發 Agent
7
-
8
- ## 角色
9
-
10
- 你是 **Sunny**,專門處理 Kenaz AI 內部系統開發的 Agent。
11
-
12
- 當用戶需要開發或修改系統本身(如 .collaboration、.rule、.formation 等)時,正常的工作流程規則會產生衝突。你的存在就是為了解決這個問題。
13
-
14
- ## 規則優先級
15
-
16
- ```
17
- 1. .rule/* ← 絕對遵守(永不違反)
18
- 2. .system/sunny/* ← 你的專屬規則
19
- 3. CLAUDE.md ← 可選擇性忽略
20
- ```
21
-
22
- **首次執行時,必須讀取**:`.system/sunny/RULES.json`
23
-
24
- ## 你可以做的事
25
-
26
- - ✅ 直接修改 `.collaboration/`、`.failure/`、`.rule/`、`.formation/` 等系統目錄
27
- - ✅ 直接使用 Task 工具
28
- - ✅ 跳過「展示計劃」步驟,直接執行
29
- - ✅ 不遵循 PM → Design → Dev 流程
30
- - ✅ 修改 CLAUDE.md 本身
31
-
32
- ## 你絕對不能做的事
33
-
34
- - ❌ 違反 `.rule/` 中的任何規則
35
- - ❌ 在專案目錄外輸出檔案(GEN-007)
36
- - ❌ 違反安全相關規則(SEC-*)
37
- - ❌ 破壞資料完整性(DATA-*)
38
-
39
- ## 核心心態
40
-
41
- **完美達成 > 一切**
42
-
43
- - ✅ 只關注:能不能完美達成目標
44
- - ✅ 策略討論聚焦:可行性、不可行性、如何修正策略
45
- - ❌ 不考慮成本(token、時間、API 費用)— 成本都是小事
46
- - ❌ 禁止因成本考量進入保守狀態
47
-
48
- ## 工作風格
49
-
50
- 1. **簡潔** - 減少冗餘說明,直接執行
51
- 2. **高效** - 不需要多輪確認,直接完成任務
52
- 3. **透明** - 完成後簡要回報做了什麼
53
-
54
- ## 啟動提示
55
-
56
- 當用戶使用 `/sunny` 時,回應:
57
-
58
- ```
59
- ☀️ Sunny 模式已啟動
60
-
61
- 規則優先級:.rule/* > .system/sunny/* > CLAUDE.md
62
- 可忽略:工作流程、團隊調用、Pipeline 規則
63
- 絕對遵守:GEN-007、SEC-*、DATA-*
64
-
65
- 請告訴我要做什麼?
66
- ```
67
-
68
- ## 退出
69
-
70
- 當用戶說「退出」、「exit」或工作完成時,回應:
71
-
72
- ```
73
- ☀️ Sunny 模式已結束,恢復正常工作流程。
74
- ```
@@ -1,39 +0,0 @@
1
- /**
2
- * assign 命令 - 分配任務給他人
3
- */
4
-
5
- const { TaskAPI } = require('../../core/task-api.js');
6
- const { getPositional, parseArgs } = require('../utils/arg-parser');
7
- const { success, error } = require('../utils/output');
8
-
9
- module.exports = {
10
- name: 'assign',
11
- description: '分配任務給他人',
12
- options: ['--to'],
13
-
14
- async execute(args) {
15
- const taskId = getPositional(args, 0);
16
- const { to: assignee } = parseArgs(args, ['to']);
17
-
18
- if (!taskId) {
19
- error('缺少任務 ID');
20
- return 1;
21
- }
22
-
23
- if (!assignee) {
24
- error('缺少 --to 參數');
25
- return 1;
26
- }
27
-
28
- try {
29
- const api = new TaskAPI();
30
- const task = await api.claimTask(taskId, assignee);
31
- success(`任務已分配: ${task.id}`);
32
- console.log(`分配給: ${assignee}`);
33
- return 0;
34
- } catch (err) {
35
- error(`分配失敗: ${err.message}`);
36
- return 1;
37
- }
38
- }
39
- };
@@ -1,33 +0,0 @@
1
- /**
2
- * claim 命令 - 認領任務
3
- */
4
-
5
- const { TaskAPI } = require('../../core/task-api.js');
6
- const { getPositional } = require('../utils/arg-parser');
7
- const { success, error } = require('../utils/output');
8
-
9
- module.exports = {
10
- name: 'claim',
11
- description: '認領任務',
12
- options: [],
13
-
14
- async execute(args) {
15
- const taskId = getPositional(args, 0);
16
- if (!taskId) {
17
- error('缺少任務 ID');
18
- return 1;
19
- }
20
-
21
- try {
22
- const api = new TaskAPI();
23
- const task = await api.claimTask(taskId);
24
- success(`任務已認領: ${task.id}`);
25
- console.log(`分配給: ${task.assigned_to.name}`);
26
- console.log(`狀態: ${task.status}`);
27
- return 0;
28
- } catch (err) {
29
- error(`認領失敗: ${err.message}`);
30
- return 1;
31
- }
32
- }
33
- };
@@ -1,44 +0,0 @@
1
- /**
2
- * complete 命令 - 標記任務為完成
3
- */
4
-
5
- const { TaskAPI } = require('../../core/task-api.js');
6
- const { getPositional, parseArgs } = require('../utils/arg-parser');
7
- const { success, error } = require('../utils/output');
8
-
9
- module.exports = {
10
- name: 'complete',
11
- description: '標記任務為完成',
12
- options: ['--actual-hours'],
13
-
14
- async execute(args) {
15
- const taskId = getPositional(args, 0);
16
- if (!taskId) {
17
- error('缺少任務 ID');
18
- return 1;
19
- }
20
-
21
- const parsed = parseArgs(args, ['actual-hours']);
22
-
23
- try {
24
- const api = new TaskAPI();
25
-
26
- const options = {};
27
- if (parsed['actual-hours']) {
28
- options.actual_hours = parseFloat(parsed['actual-hours']);
29
- }
30
-
31
- const task = await api.completeTask(taskId, options);
32
- success(`任務已完成: ${task.id}`);
33
- console.log(`執行者: ${task.executed_by.name}`);
34
- console.log(`完成時間: ${task.executed_by.timestamp}`);
35
- if (task.actual_hours) {
36
- console.log(`實際工時: ${task.actual_hours} 小時`);
37
- }
38
- return 0;
39
- } catch (err) {
40
- error(`完成失敗: ${err.message}`);
41
- return 1;
42
- }
43
- }
44
- };
@@ -1,110 +0,0 @@
1
- /**
2
- * create 命令 - 建立新任務
3
- *
4
- * 支援所有 task-api.js createTask() 欄位:
5
- * 基本:--title, --description, --priority, --role, --complexity, --rigor, --branch
6
- * 陣列(逗號分隔):--tags, --deps, --scope-paths, --feature-ids, --keywords
7
- * 多值(可重複):--requirements, --acceptance-criteria, --technical-notes
8
- * 數值:--estimated-hours
9
- * 文字:--source, --notes
10
- */
11
-
12
- const { TaskAPI } = require('../../core/task-api.js');
13
- const { parseArgs, parseCsv, parseMulti } = require('../utils/arg-parser');
14
- const { success, error } = require('../utils/output');
15
-
16
- module.exports = {
17
- name: 'create',
18
- description: '建立新任務',
19
- options: [
20
- '--title', '--description', '--priority', '--role',
21
- '--tags', '--branch', '--complexity', '--rigor',
22
- '--deps', '--scope-paths', '--estimated-hours',
23
- '--requirements', '--acceptance-criteria', '--technical-notes',
24
- '--feature-ids', '--keywords', '--source', '--notes'
25
- ],
26
-
27
- async execute(args) {
28
- const parsed = parseArgs(args, [
29
- 'title', 'description', 'priority', 'role',
30
- 'branch', 'complexity', 'rigor',
31
- 'estimated-hours', 'source', 'notes'
32
- ]);
33
-
34
- if (!parsed.title) {
35
- error('缺少 --title 參數');
36
- return 1;
37
- }
38
-
39
- try {
40
- const api = new TaskAPI();
41
-
42
- // 逗號分隔的陣列欄位
43
- const tags = parseCsv(args, 'tags');
44
- const dependencies = parseCsv(args, 'deps');
45
- const scopePaths = parseCsv(args, 'scope-paths');
46
- const featureIds = parseCsv(args, 'feature-ids');
47
- const keywords = parseCsv(args, 'keywords');
48
-
49
- // 多值欄位(可重複 --flag "value1" --flag "value2")
50
- const requirements = parseMulti(args, 'requirements');
51
- const acceptanceCriteria = parseMulti(args, 'acceptance-criteria');
52
- const technicalNotes = parseMulti(args, 'technical-notes');
53
-
54
- // 數值欄位
55
- const estimatedHours = parsed['estimated-hours']
56
- ? parseFloat(parsed['estimated-hours'])
57
- : null;
58
-
59
- const taskData = {
60
- title: parsed.title,
61
- description: parsed.description || '',
62
- priority: parsed.priority || 'P2',
63
- role: parsed.role || 'developer',
64
- tags,
65
- branch: parsed.branch || null,
66
- complexity: parsed.complexity || 'medium',
67
- rigor: parsed.rigor || 'medium',
68
- dependencies,
69
- scope_paths: scopePaths,
70
- estimated_hours: estimatedHours,
71
- };
72
-
73
- // 多值欄位:僅在有值時傳入(避免覆蓋 API 預設)
74
- if (requirements.length > 0) taskData.requirements = requirements;
75
- if (acceptanceCriteria.length > 0) taskData.acceptance_criteria = acceptanceCriteria;
76
- if (technicalNotes.length > 0) taskData.technical_notes = technicalNotes;
77
-
78
- // 可選文字欄位
79
- if (featureIds.length > 0) taskData.feature_ids = featureIds;
80
- if (keywords.length > 0) taskData.keywords = keywords;
81
- if (parsed.source) taskData.source = parsed.source;
82
- if (parsed.notes) taskData.notes = parsed.notes;
83
-
84
- const task = await api.createTask(taskData);
85
-
86
- success(`任務已建立: ${task.id}`);
87
- console.log(`Hash: ${task.hash}`);
88
- console.log(`標題: ${task.title}`);
89
- console.log(`優先級: ${task.priority}`);
90
- console.log(`角色: ${task.role}`);
91
- console.log(`嚴謹度: ${task.rigor}`);
92
- console.log(`複雜度: ${task.complexity}`);
93
- if (tags.length > 0) console.log(`標籤: ${tags.join(', ')}`);
94
- if (task.branch) console.log(`分支: ${task.branch}`);
95
- if (dependencies.length > 0) console.log(`依賴: ${dependencies.join(', ')}`);
96
- if (scopePaths.length > 0) console.log(`範圍: ${scopePaths.join(', ')}`);
97
- if (requirements.length > 0) console.log(`需求: ${requirements.length} 項`);
98
- if (acceptanceCriteria.length > 0) console.log(`驗收標準: ${acceptanceCriteria.length} 項`);
99
- if (technicalNotes.length > 0) console.log(`技術筆記: ${technicalNotes.length} 項`);
100
- if (estimatedHours) console.log(`預估工時: ${estimatedHours}h`);
101
- if (keywords.length > 0) console.log(`關鍵字: ${keywords.join(', ')}`);
102
- console.log(`建立者: ${task.created_by.name}`);
103
- console.log(`檔案路徑: ${task._file_path}`);
104
- return 0;
105
- } catch (err) {
106
- error(`建立失敗: ${err.message}`);
107
- return 1;
108
- }
109
- }
110
- };
@@ -1,83 +0,0 @@
1
- /**
2
- * get 命令 - 取得任務詳情
3
- */
4
-
5
- const { TaskAPI } = require('../../core/task-api.js');
6
- const { getPositional } = require('../utils/arg-parser');
7
- const { error } = require('../utils/output');
8
-
9
- // 可選載入 LockManager
10
- let LockManager = null;
11
- try {
12
- LockManager = require('../../core/lock-manager.js').LockManager;
13
- } catch { /* 模組不存在,忽略 */ }
14
-
15
- module.exports = {
16
- name: 'get',
17
- description: '取得任務詳情',
18
- options: [],
19
-
20
- async execute(args) {
21
- const taskId = getPositional(args, 0);
22
- if (!taskId) {
23
- error('缺少任務 ID');
24
- return 1;
25
- }
26
-
27
- try {
28
- const api = new TaskAPI();
29
- const task = await api.getTask(taskId);
30
-
31
- if (!task) {
32
- error(`任務不存在: ${taskId}`);
33
- return 1;
34
- }
35
-
36
- console.log('任務詳情:\n');
37
- console.log(`ID: ${task.id}`);
38
- console.log(`標題: ${task.title}`);
39
- console.log(`描述: ${task.description || '無'}`);
40
- console.log(`狀態: ${task.status}`);
41
- console.log(`優先級: ${task.priority}`);
42
- console.log(`建立者: ${task.created_by.name} (@${task.created_by.git_user})`);
43
- console.log(`建立時間: ${task.created_by.timestamp}`);
44
-
45
- if (task.assigned_to) {
46
- console.log(`分配給: ${task.assigned_to.name} (@${task.assigned_to.git_user})`);
47
- console.log(`分配時間: ${task.assigned_to.timestamp}`);
48
- }
49
-
50
- if (task.executed_by) {
51
- console.log(`執行者: ${task.executed_by.name} (@${task.executed_by.git_user})`);
52
- }
53
-
54
- if (task.collaborators && task.collaborators.length > 0) {
55
- console.log(`協作者: ${task.collaborators.map(c => c.name).join(', ')}`);
56
- }
57
-
58
- console.log(`版本: ${task._version || 1}`);
59
- console.log(`來源: ${task._source}`);
60
-
61
- if (task._file_path) {
62
- console.log(`檔案: ${task._file_path}`);
63
- }
64
-
65
- // 檢查鎖定狀態(如果 LockManager 存在)
66
- if (LockManager) {
67
- const lockMgr = new LockManager();
68
- const lockInfo = await lockMgr.getLockInfo(taskId);
69
- if (lockInfo) {
70
- console.log(`\n🔒 鎖定資訊:`);
71
- console.log(` 鎖定者: ${lockInfo.locked_by}`);
72
- console.log(` 鎖定時間: ${lockInfo.locked_at}`);
73
- console.log(` 過期時間: ${lockInfo.expires_at}`);
74
- }
75
- }
76
-
77
- return 0;
78
- } catch (err) {
79
- error(`查詢失敗: ${err.message}`);
80
- return 1;
81
- }
82
- }
83
- };
@@ -1,52 +0,0 @@
1
- /**
2
- * 命令註冊表
3
- */
4
-
5
- const commands = {
6
- create: require('./create'),
7
- list: require('./list'),
8
- get: require('./get'),
9
- claim: require('./claim'),
10
- assign: require('./assign'),
11
- transfer: require('./transfer'),
12
- complete: require('./complete'),
13
- lock: require('./lock'),
14
- unlock: require('./unlock'),
15
- rebuild: require('./rebuild'),
16
- stats: require('./stats'),
17
- search: require('./search'),
18
- };
19
-
20
- const CommandRegistry = {
21
- /**
22
- * 執行命令
23
- * @param {string} name - 命令名稱
24
- * @param {string[]} args - 參數
25
- * @returns {Promise<number>} 退出碼
26
- */
27
- async execute(name, args) {
28
- const cmd = commands[name];
29
- if (!cmd) {
30
- throw new Error(`未知命令: ${name}`);
31
- }
32
- return cmd.execute(args);
33
- },
34
-
35
- /**
36
- * 取得所有命令
37
- * @returns {Object}
38
- */
39
- getAll() {
40
- return commands;
41
- },
42
-
43
- /**
44
- * 取得命令名稱列表
45
- * @returns {string[]}
46
- */
47
- list() {
48
- return Object.keys(commands);
49
- },
50
- };
51
-
52
- module.exports = { CommandRegistry };
@@ -1,51 +0,0 @@
1
- /**
2
- * list 命令 - 列出任務
3
- */
4
-
5
- const { TaskAPI } = require('../../core/task-api.js');
6
- const { parseArgs } = require('../utils/arg-parser');
7
- const { error } = require('../utils/output');
8
-
9
- module.exports = {
10
- name: 'list',
11
- description: '列出任務',
12
- options: ['--status', '--assigned-to', '--priority'],
13
-
14
- async execute(args) {
15
- const { status, priority } = parseArgs(args, ['status', 'priority']);
16
- const assignedTo = parseArgs(args, ['assigned-to'])['assigned-to'];
17
-
18
- const query = {};
19
- if (status) query.status = status;
20
- if (assignedTo) query.assigned_to = assignedTo;
21
- if (priority) query.priority = priority;
22
-
23
- try {
24
- const api = new TaskAPI();
25
- const tasks = await api.queryTasks(query);
26
-
27
- if (tasks.length === 0) {
28
- console.log('沒有符合條件的任務');
29
- return 0;
30
- }
31
-
32
- console.log(`找到 ${tasks.length} 個任務:\n`);
33
-
34
- tasks.forEach(task => {
35
- const assignee = task.assigned_to ? task.assigned_to.name : '未分配';
36
- const source = task._source === 'new' ? '🆕' : '📦';
37
- console.log(`${source} [${task.id}] ${task.title}`);
38
- console.log(` 狀態: ${task.status} | 優先級: ${task.priority} | 分配給: ${assignee}`);
39
- if (task.description) {
40
- console.log(` 描述: ${task.description.substring(0, 60)}...`);
41
- }
42
- console.log('');
43
- });
44
-
45
- return 0;
46
- } catch (err) {
47
- error(`查詢失敗: ${err.message}`);
48
- return 1;
49
- }
50
- }
51
- };