kenaz 0.3.17 → 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 (316) 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/hooks/synapse-first-investigation.js +15 -0
  7. package/core/.claude/skills/architect_agent/SKILL.md +11 -92
  8. package/core/.claude/skills/assessment_agent/SKILL.md +0 -1
  9. package/core/.claude/skills/backend_engineer/SKILL.md +3 -6
  10. package/core/.claude/skills/code_reviewer/SKILL.md +1 -1
  11. package/core/.claude/skills/code_reviewer/patterns.yaml +1 -1
  12. package/core/.claude/skills/designer/SKILL.md +3 -6
  13. package/core/.claude/skills/dev_agent/SKILL.md +30 -491
  14. package/core/.claude/skills/developer/SKILL.md +3 -6
  15. package/core/.claude/skills/feature_agent/SKILL.md +3 -17
  16. package/core/.claude/skills/product_manager/SKILL.md +29 -1064
  17. package/core/.claude/skills/qa_engineer/SKILL.md +12 -17
  18. package/core/.claude/skills/spec_optimizer/SKILL.md +25 -275
  19. package/core/.claude/skills/sre_agent/SKILL.md +3 -6
  20. package/core/.collaboration/README.md +2 -3
  21. package/core/.collaboration/core/task-api.js +5 -138
  22. package/core/.collaboration/docs/CLI.md +0 -2
  23. package/core/.failure/INDEX.yaml +6 -40
  24. package/core/.failure/agent-execution/FAIL-013-search-cwd-drift-and-case-mismatch.yaml +1 -1
  25. package/core/.failure/tools/README.md +9 -227
  26. package/core/.formation/bifrost/exec.js +29 -4
  27. package/core/.formation/bifrost/launch.js +1 -6
  28. package/core/.formation/bifrost/launch.test.js +1 -1
  29. package/core/.formation/bifrost/provider-launch.js +18 -11
  30. package/core/.formation/bifrost/provider-launch.test.js +26 -2
  31. package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
  32. package/core/.formation/bifrost/shared/ansuz-boot-policy.test.js +1 -2
  33. package/core/.formation/tools/__tests__/dispatch-cwd-project.test.js +42 -0
  34. package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
  35. package/core/.formation/tools/__tests__/subagent-executor.test.js +3 -2
  36. package/core/.formation/tools/dispatch.js +15 -2
  37. package/core/.formation/tools/loader.js +17 -140
  38. package/core/.formation/tools/post-complete.js +0 -31
  39. package/core/.rule/INDEX.yaml +0 -18
  40. package/core/.rule/general/agent-workflow.yaml +14 -164
  41. package/core/.rule/general/project-self-containment.yaml +8 -19
  42. package/core/.rule/general/rust-verify-target.yaml +6 -5
  43. package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
  44. package/core/.specialist/Amelia/capability.yaml +12 -12
  45. package/core/.specialist/Amelia/workflow.yaml +2 -2
  46. package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
  47. package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
  48. package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
  49. package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
  50. package/core/.specialist/Ansuz/core.yaml +6 -108
  51. package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
  52. package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
  53. package/core/.specialist/Ansuz/knowledge.yaml +0 -4
  54. package/core/.specialist/Ansuz/rule.yaml +0 -1
  55. package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
  56. package/core/.specialist/tests/runtime-discovery/README.md +1 -1
  57. package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
  58. package/core/.specialist/tools/prompt-files.test.js +1 -0
  59. package/core/.specialist/tools/task-bridge.js +1 -66
  60. package/core/.system/README.md +11 -552
  61. package/core/.system/collaboration/README.md +10 -174
  62. package/core/CLAUDE.md +1 -6
  63. package/core/KENAZ_CORE_VERSION +1 -1
  64. package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
  65. package/core/dev/scripts/run-rust-tests.js +30 -46
  66. package/core/dev/scripts/run-rust-tests.test.js +17 -0
  67. package/core/dev/scripts/rust-verify-worktree.js +4 -4
  68. package/core/dev/scripts/verify-target-dir.js +6 -6
  69. package/core/plugins/kenaz/INVENTORY.md +8 -8
  70. package/core/plugins/kenaz/commands/architect.md +1 -2
  71. package/core/plugins/kenaz/commands/spec.md +1 -1
  72. package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
  73. package/core/plugins/kenaz/guidance.md +1 -1
  74. package/core/plugins/kenaz/scripts/sync.js +1 -1
  75. package/core/plugins/kenaz/scripts/ygg.js +6 -0
  76. package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
  77. package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
  78. package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
  79. package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
  80. package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
  81. package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
  82. package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
  83. package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
  84. package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
  85. package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
  86. package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
  87. package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
  88. package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
  89. package/package.json +6 -6
  90. package/core/.claude/commands/archive.md +0 -24
  91. package/core/.claude/commands/init.md +0 -112
  92. package/core/.claude/commands/legacy_dev.md +0 -18
  93. package/core/.claude/commands/product-review.md +0 -131
  94. package/core/.claude/commands/strategy.md +0 -141
  95. package/core/.claude/commands/sunny.md +0 -1
  96. package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
  97. package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
  98. package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
  99. package/core/.claude/hooks/_substrate-paths.js +0 -95
  100. package/core/.claude/hooks/context-check.js +0 -51
  101. package/core/.claude/hooks/fatigue-check.js +0 -52
  102. package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
  103. package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
  104. package/core/.claude/hooks/handoff-staleness.js +0 -197
  105. package/core/.claude/hooks/jev-thalamus-context.js +0 -17
  106. package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
  107. package/core/.claude/hooks/lease-release.js +0 -119
  108. package/core/.claude/hooks/lease-touch.js +0 -96
  109. package/core/.claude/hooks/reflex-feedback.js +0 -5
  110. package/core/.claude/hooks/session-init.ps1 +0 -49
  111. package/core/.claude/hooks/sound-event.js +0 -70
  112. package/core/.claude/hooks/sound-event.sh +0 -37
  113. package/core/.claude/hooks/stream-delta.js +0 -169
  114. package/core/.claude/no-hooks.settings.json +0 -3
  115. package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
  116. package/core/.claude/skills/sunny/SKILL.md +0 -74
  117. package/core/.collaboration/cli/commands/assign.js +0 -39
  118. package/core/.collaboration/cli/commands/claim.js +0 -33
  119. package/core/.collaboration/cli/commands/complete.js +0 -44
  120. package/core/.collaboration/cli/commands/create.js +0 -110
  121. package/core/.collaboration/cli/commands/get.js +0 -83
  122. package/core/.collaboration/cli/commands/index.js +0 -52
  123. package/core/.collaboration/cli/commands/list.js +0 -51
  124. package/core/.collaboration/cli/commands/lock.js +0 -45
  125. package/core/.collaboration/cli/commands/rebuild.js +0 -39
  126. package/core/.collaboration/cli/commands/search.js +0 -61
  127. package/core/.collaboration/cli/commands/stats.js +0 -61
  128. package/core/.collaboration/cli/commands/transfer.js +0 -41
  129. package/core/.collaboration/cli/commands/unlock.js +0 -48
  130. package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
  131. package/core/.collaboration/cli/formatters/index.js +0 -7
  132. package/core/.collaboration/cli/task-cli.js +0 -46
  133. package/core/.collaboration/cli/utils/arg-parser.js +0 -74
  134. package/core/.collaboration/cli/utils/git-user.js +0 -25
  135. package/core/.collaboration/cli/utils/index.js +0 -9
  136. package/core/.collaboration/cli/utils/output.js +0 -10
  137. package/core/.collaboration/config/default.yaml +0 -189
  138. package/core/.collaboration/core/conflict-resolver.js +0 -461
  139. package/core/.collaboration/core/conflict-resolver.test.js +0 -389
  140. package/core/.collaboration/core/migrate-legacy.js +0 -260
  141. package/core/.collaboration/docs/API.md +0 -787
  142. package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
  143. package/core/.collaboration/docs/FAQ.md +0 -695
  144. package/core/.collaboration/docs/MIGRATION.md +0 -804
  145. package/core/.collaboration/docs/examples/README.md +0 -320
  146. package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
  147. package/core/.collaboration/docs/examples/basic-usage.js +0 -184
  148. package/core/.collaboration/docs/examples/team-workflow.js +0 -352
  149. package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
  150. package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
  151. package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
  152. package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
  153. package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
  154. package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
  155. package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
  156. package/core/.failure/pipeline/README.md +0 -95
  157. package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
  158. package/core/.failure/tools/USAGE_GUIDE.md +0 -323
  159. package/core/.failure/tools/check_failures.ps1 +0 -387
  160. package/core/.failure/tools/log_failure.ps1 +0 -474
  161. package/core/.formation/.episode-input.json +0 -10
  162. package/core/.formation/.merge-lock +0 -1
  163. package/core/.formation/lead.yaml +0 -118
  164. package/core/.formation/legacy.bak/designer.yaml +0 -57
  165. package/core/.formation/legacy.bak/pm.yaml +0 -57
  166. package/core/.formation/legacy.bak/qa.yaml +0 -57
  167. package/core/.formation/legacy.bak/review.yaml +0 -62
  168. package/core/.formation/legacy.bak/scheduler.yaml +0 -129
  169. package/core/.formation/legacy.bak/sre.yaml +0 -57
  170. package/core/.formation/role-map.yaml +0 -274
  171. package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
  172. package/core/.formation/roles/_shared/modules/security.yaml +0 -103
  173. package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
  174. package/core/.formation/roles/backend/role.yaml +0 -93
  175. package/core/.formation/roles/code_reviewer/role.yaml +0 -102
  176. package/core/.formation/roles/database_optimizer/role.yaml +0 -107
  177. package/core/.formation/roles/designer/role.yaml +0 -66
  178. package/core/.formation/roles/developer/role.yaml +0 -75
  179. package/core/.formation/roles/frontend/role.yaml +0 -134
  180. package/core/.formation/roles/incident_response/role.yaml +0 -89
  181. package/core/.formation/roles/qa/role.yaml +0 -89
  182. package/core/.formation/roles/security/role.yaml +0 -87
  183. package/core/.formation/roles/sre/role.yaml +0 -66
  184. package/core/.formation/skills/coordinator.yaml +0 -52
  185. package/core/.formation/solo/diagnosis.yaml +0 -78
  186. package/core/.formation/solo/strategy.yaml +0 -121
  187. package/core/.formation/tests/hello.txt +0 -2
  188. package/core/.formation/tools/coordinator.js +0 -350
  189. package/core/.formation/tools/jev-correction.js +0 -214
  190. package/core/.formation/tools/jev-correction.test.js +0 -178
  191. package/core/.formation/tools/log-reader.js +0 -232
  192. package/core/.formation/tools/revert-daemon-state.js +0 -162
  193. package/core/.formation/tools/test-drift.js +0 -148
  194. package/core/.formation/unit/heimdall.yaml +0 -96
  195. package/core/.formation/unit/plan.yaml +0 -67
  196. package/core/.formation/unit/think.yaml +0 -58
  197. package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
  198. package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
  199. package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
  200. package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
  201. package/core/.kenaz/muninn_episode_write.ps1 +0 -17
  202. package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
  203. package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
  204. package/core/.kenaz/runes_TASK_1428.json +0 -57
  205. package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
  206. package/core/.kenaz/tmp_props.json +0 -1
  207. package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
  208. package/core/.rule/MECHANIZED.md +0 -61
  209. package/core/.rule/general/cortex-memory-recall.yaml +0 -446
  210. package/core/.rule/general/pipeline.yaml +0 -246
  211. package/core/.rule/general/sunny-access-control.yaml +0 -60
  212. package/core/.rule/general/system-invariants.yaml +0 -231
  213. package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
  214. package/core/.rule/pipeline/auto-update.yaml +0 -282
  215. package/core/.rule/pipeline/task-execution.yaml +0 -365
  216. package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
  217. package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
  218. package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
  219. package/core/.specialist/Ansuz/workflow.yaml +0 -1225
  220. package/core/.specialist/experiments/rg_benchmark.js +0 -523
  221. package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
  222. package/core/.specialist/tools/jev-optional-context.js +0 -107
  223. package/core/.specialist/tools/jev-optional-context.test.js +0 -152
  224. package/core/.specialist/tools/memory-action-log.js +0 -839
  225. package/core/.specialist/tools/phase-gate.js +0 -3534
  226. package/core/.specialist/tools/phase-gate.test.js +0 -85
  227. package/core/.specialist/tools/precompute-runner.js +0 -444
  228. package/core/.specialist/tools/rule-engine.js +0 -621
  229. package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
  230. package/core/.synapse/memory-shared.json.sync +0 -1
  231. package/core/.system/agent-skills/README.md +0 -724
  232. package/core/.system/cli-tools/README.md +0 -724
  233. package/core/.system/cortex/MODULES.md +0 -1046
  234. package/core/.system/dashboard/FRONTEND.md +0 -812
  235. package/core/.system/dashboard/README.md +0 -737
  236. package/core/.system/failure/README.md +0 -723
  237. package/core/.system/formation/LEGACY_SKILLS.md +0 -974
  238. package/core/.system/formation/POST_COMPLETE.md +0 -602
  239. package/core/.system/formation/README.md +0 -1094
  240. package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
  241. package/core/.system/kenaz/README.md +0 -787
  242. package/core/.system/memory/README.md +0 -719
  243. package/core/.system/pipeline/README.md +0 -712
  244. package/core/.system/rule/README.md +0 -794
  245. package/core/.system/sunny/README.md +0 -476
  246. package/core/.system/sunny/RULES.json +0 -89
  247. package/core/.system/sunny/knowledge/INDEX.md +0 -37
  248. package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
  249. package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
  250. package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
  251. package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
  252. package/core/.system/sunny/teammates/README.md +0 -107
  253. package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
  254. package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
  255. package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
  256. package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
  257. package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
  258. package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
  259. package/core/.system/sunny/tools.json +0 -101
  260. package/core/dev/scripts/cleanup-queue.js +0 -184
  261. package/core/dev/scripts/cleanup_queue.js +0 -86
  262. package/core/dev/scripts/legacy/README.md +0 -39
  263. package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
  264. package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
  265. package/core/dev/scripts/matrix/CLI_README.md +0 -214
  266. package/core/dev/scripts/matrix/README.md +0 -310
  267. package/core/dev/scripts/matrix/package-lock.json +0 -4266
  268. package/core/dev/scripts/matrix/package.json +0 -55
  269. package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
  270. package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
  271. package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
  272. package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
  273. package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
  274. package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
  275. package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
  276. package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
  277. package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
  278. package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
  279. package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
  280. package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
  281. package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
  282. package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
  283. package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
  284. package/core/dev/scripts/matrix/src/index.ts +0 -62
  285. package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
  286. package/core/dev/scripts/matrix/src/parser.ts +0 -281
  287. package/core/dev/scripts/matrix/src/serializer.ts +0 -151
  288. package/core/dev/scripts/matrix/src/validator.ts +0 -301
  289. package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
  290. package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
  291. package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
  292. package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
  293. package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
  294. package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
  295. package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
  296. package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
  297. package/core/dev/scripts/matrix/tsconfig.json +0 -20
  298. package/core/dev/scripts/matrix/types/index.d.ts +0 -111
  299. package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
  300. package/core/dev/scripts/matrix/types/index.js +0 -8
  301. package/core/dev/scripts/matrix/types/index.js.map +0 -1
  302. package/core/dev/scripts/matrix/types/index.ts +0 -124
  303. package/core/dev/scripts/memory-usage-report.js +0 -152
  304. package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
  305. package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
  306. package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
  307. package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
  308. package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
  309. package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
  310. package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
  311. package/core/dev/scripts/validate_pipeline.js +0 -197
  312. package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
  313. package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
  314. package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
  315. package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
  316. package/core/plugins/kenaz/commands/strategy.md +0 -141
@@ -7,8 +7,7 @@
7
7
  **設計理念**:
8
8
  - **目錄即狀態**:任務狀態由檔案所在目錄決定,無需在檔案中維護狀態欄位
9
9
  - **YAML 格式**:人類可讀,支援多行文字和結構化資料
10
- - **雙層 API**:task-api.js(完整功能)+ task-api-json.js(JSON 輸出供 Dashboard 使用)
11
- - **向後相容**:與舊 TASK_QUEUE.json 格式相容,支援平滑遷移
10
+ - **單一 API**:task-api.js(完整功能 + CLI,`--format json` 輸出機器可讀 JSON)
12
11
 
13
12
  ---
14
13
 
@@ -18,8 +17,7 @@
18
17
  .collaboration/
19
18
  ├── core/ # 核心 API
20
19
  │ ├── task-api.js # 主 API(完整功能 + CLI)
21
- │ ├── task-api-json.js # JSON 輸出包裝(供 Dashboard 使用)
22
- │ └── migrate-legacy.js # 遷移工具(dev/pipeline → .collaboration)
20
+ │ └── migrate-legacy.js # 一次性遷移工具(dev/pipeline → tasks)
23
21
  ├── tasks/ # 任務檔案(目錄即狀態)
24
22
  │ ├── backlog/ # 待處理任務 (status: pending)
25
23
  │ ├── active/ # 進行中任務 (status: in_progress)
@@ -191,69 +189,9 @@ node <core>/k-cli/dist/index.js task get TASK_XXX --project-path . --json
191
189
 
192
190
  ---
193
191
 
194
- ### 2. task-api-json.js(JSON 輸出包裝)
192
+ ### 2. JSON 輸出
195
193
 
196
- **用途**:包裝 `task-api.js`,輸出純 JSON 格式(與舊版 TASK_QUEUE.json 相容),供 Tauri Dashboard 使用。
197
-
198
- **使用方式**:
199
-
200
- ```bash
201
- # 輸出所有任務(JSON 格式)
202
- node .collaboration/core/task-api-json.js
203
-
204
- # 輸出單個任務
205
- node .collaboration/core/task-api-json.js --task TASK_194
206
- ```
207
-
208
- **輸出格式**:
209
-
210
- ```json
211
- {
212
- "version": "3.3.0",
213
- "tasks": [
214
- {
215
- "id": "TASK_194",
216
- "hash": "357cd130-e843-4718-b858-7cc56bdae4e5",
217
- "title": "系統文檔:.collaboration 新任務系統",
218
- "status": "in_progress",
219
- "priority": "P1",
220
- "role": "developer",
221
- "rigor": "medium",
222
- "tags": ["docs"],
223
- "complexity": "simple",
224
- "estimated_hours": 0.3,
225
- "dependencies": [],
226
- "scope_paths": [".system/collaboration/"],
227
- "requirements": ["閱讀核心 JS 檔案", "建立 README.md"],
228
- "acceptance_criteria": ["README.md 涵蓋 API 使用方式"],
229
- "created_by": {
230
- "name": "{os_user}",
231
- "git_user": "{git_user}",
232
- "timestamp": "2026-02-18T15:07:00.995Z"
233
- },
234
- "_file_path": ".collaboration/tasks/active/TASK_194_{git_user}.yaml",
235
- "_source": "collaboration"
236
- }
237
- ],
238
- "statistics": {
239
- "total": 124,
240
- "pending": 2,
241
- "in_progress": 1,
242
- "completed": 108,
243
- "blocked": 0,
244
- "cancelled": 13
245
- },
246
- "metadata": {
247
- "last_updated": "2026-02-18T15:30:00.000Z",
248
- "directories": ["backlog", "active", "done", "cancel", "blocked", "archived"]
249
- }
250
- }
251
- ```
252
-
253
- **關鍵轉換**:
254
- - `role` 向後相容為 `agent_type`
255
- - 人員欄位 (`created_by`, `executed_by`) 轉為 `TaskPerson` 格式(匹配 Rust struct)
256
- - 陣列欄位確保為字串陣列(避免物件混入)
194
+ 需要機器可讀輸出時用 `node .collaboration/core/task-api.js list --format json`。
257
195
 
258
196
  ---
259
197
 
@@ -306,118 +244,19 @@ keywords: []
306
244
 
307
245
  ## 與舊系統的關係
308
246
 
309
- ### 雙軌制說明
310
-
311
- 專案同時維護兩套任務系統,處於**漸進式遷移**階段:
312
-
313
- | 系統 | 路徑 | ID 範圍 | 格式 | 狀態 | 適用場景 |
314
- |------|------|---------|------|------|---------|
315
- | **新系統(Collaboration)** | `.collaboration/tasks/{status}/` | TASK_151~196+ | 目錄 + YAML | ✅ 主力系統(推薦) | 手動協作、簡單流程 |
316
- | **舊系統(Pipeline)** | `dev/pipeline/TASK_QUEUE.json` + `completed/` | TASK_134~187 | JSON + YAML | ⚠️ 相容支援(逐步淘汰) | 排程器、Multi-Agent 並行開發 |
317
-
318
- **查詢任務時必須兩邊都查**:
319
- - 新系統:`node .collaboration/core/task-api.js get TASK_XXX`
320
- - 舊系統:`dev/pipeline/completed/TASK_XXX_*.yaml` 或 `dev/pipeline/TASK_QUEUE.json`
321
-
322
- ---
323
-
324
- ### 詳細差異對照
325
-
326
- | 特性 | Pipeline System(舊) | Collaboration System(新) | 說明 |
327
- |------|---------------------|--------------------------|------|
328
- | **狀態管理** | JSON 索引集中式 | 目錄分散式 | 新系統移動檔案即改變狀態,簡化流程 |
329
- | **任務格式** | JSON 索引 + YAML 檔案 | 純 YAML(目錄即狀態) | 新系統無需在 YAML 中維護狀態欄位 |
330
- | **查詢介面** | Python API + JSON | Node.js CLI + JSON 輸出 | 新系統支援 `--help` 和過濾查詢 |
331
- | **路徑鎖定** | ✅ `lock_manager.py` | ❌ 無 | 舊系統支援並行開發衝突檢測 |
332
- | **依賴解析** | ✅ `dependency_resolver.py` | ⚠️ 基礎支援 | 舊系統有拓撲排序、循環檢測、關鍵路徑 |
333
- | **統計查詢** | ✅ 豐富(含關鍵路徑、依賴圖) | ⚠️ 基礎(僅數量統計) | 舊系統功能更完善 |
334
- | **排程器整合** | ✅ Single-Agent、Multi-Agent | ⚠️ Formation 有限支援 | 舊系統為排程器設計 |
335
- | **Dashboard 支援** | ✅ Tauri API 呼叫 | ✅ Tauri API 呼叫 | 兩者皆支援 JSON 輸出 |
336
- | **衝突避免** | ✅ `scope_paths` + 路徑鎖定 | ⚠️ `scope_paths` 欄位(無自動檢測) | 舊系統自動防衝突 |
337
- | **孤兒鎖定清理** | ✅ 自動清理 | ❌ 不適用 | 舊系統處理 Agent crash |
338
- | **驗證腳本** | ✅ `validate_pipeline.ps1` | ❌ 無 | 舊系統有一致性檢查 |
339
- | **複雜度** | ⚠️ 較高(需理解鎖定機制) | ✅ 較低(目錄即狀態) | 新系統更易上手 |
340
- | **適用場景** | 排程器、並行開發 | 手動協作、簡單流程 | 根據場景選擇系統 |
341
-
342
- **選擇建議**:
343
- - ✅ **使用新系統(Collaboration)**:手動協作、簡單任務流程、不需要並行開發
344
- - ✅ **使用舊系統(Pipeline)**:需要自動化排程器、Multi-Agent 並行開發、路徑衝突檢測
345
-
346
- ---
347
-
348
- ### 遷移方向
349
-
350
- **目標**:逐步將 Pipeline 系統的功能整合到 Collaboration 系統,最終淘汰舊系統。
351
-
352
- **階段 1:雙軌制運行**(當前階段)
353
- - ✅ 兩套系統並存,保持相容
354
- - ✅ 新任務優先建立在 Collaboration 系統
355
- - ✅ Formation 系統已支援三層 fallback(新系統 → 舊 YAML → 舊 JSON)
356
-
357
- **階段 2:功能補齊**(計劃中)
358
- - [ ] 實現路徑鎖定機制(移植 `lock_manager.py` 到 Node.js)
359
- - [ ] 增強依賴解析(拓撲排序、循環檢測、關鍵路徑)
360
- - [ ] 建立驗證工具(`validate_collaboration.js`)
361
- - [ ] 統計查詢增強(依賴圖、執行時間預估)
362
-
363
- **階段 3:排程器遷移**(計劃中)
364
- - [ ] 更新 Single-Agent 排程器使用新系統
365
- - [ ] 更新 Multi-Agent 排程器使用新系統
366
- - [ ] 保留舊系統的 Python orchestrator 模組作為參考實現
367
-
368
- **階段 4:全面遷移**(計劃中)
369
- - [ ] 將 `dev/pipeline/TASK_QUEUE.json` 中的任務匯入新系統
370
- - [ ] 封存舊系統文件至 `.legacy/`
371
- - [ ] 更新 CLAUDE.md、規則文檔移除舊系統引用
372
-
373
- **遷移工具**:
374
- ```bash
375
- # 匯出新系統任務為舊格式(供排程器使用)
376
- node .collaboration/core/migrate-legacy.js export
247
+ `dev/pipeline/TASK_QUEUE.json` 的舊任務佇列已凍結,不再新增或更新。所有任務在 `.kenaz/tasks/{status}/`(YAML,目錄即狀態);`.collaboration/tasks/` 只在 `.kenaz/tasks/` 不存在時作為 legacy fallback。查舊任務可參考 `dev/pipeline/` 的歷史檔案,新任務一律用 task-api。
377
248
 
378
- # 匯入舊系統任務到新系統(未來遷移用)
379
- node .collaboration/core/migrate-legacy.js import
380
-
381
- # 雙向同步(開發中)
382
- node .collaboration/core/migrate-legacy.js sync
383
- ```
384
-
385
- **相關文檔**:
386
- - 舊系統文檔:`.system/pipeline/README.md`
387
- - 遷移腳本:`.collaboration/core/migrate-legacy.js`
388
- - Formation 整合:`.formation/tools/loader.js:180-220`
249
+ `migrate-legacy.js` 為一次性遷移工具,僅供查閱歷史資料格式。
389
250
 
390
251
  ---
391
252
 
392
- ## 整合與使用場景
393
-
394
- ### 1. Formation 系統整合
395
-
396
- `.formation/tools/loader.js` 已更新為三層 fallback:
397
- 1. 優先讀取新系統(`.collaboration/tasks/`)
398
- 2. 降級讀取舊 YAML(`dev/pipeline/completed/`)
399
- 3. 最終降級讀取舊 JSON(`dev/pipeline/TASK_QUEUE.json`)
400
-
401
- ### 2. Dashboard 整合
402
-
403
- Tauri Dashboard 透過 Rust API 呼叫 `task-api-json.js`:
404
- ```rust
405
- // dashboard/src-tauri/src/features/task/manager.rs
406
- pub async fn get_tasks() -> Result<TaskQueue, TaskError> {
407
- let output = Command::new("node")
408
- .args(&[".collaboration/core/task-api-json.js"])
409
- .output()?;
410
- let json = String::from_utf8(output.stdout)?;
411
- serde_json::from_str(&json)
412
- }
413
- ```
253
+ ## 使用場景
414
254
 
415
- ### 3. Dev Agent 整合
255
+ Ansuz 派工前先開卡(`create`),subagent 完成後 `complete`;任務卡的 scope_paths 供並行任務避免路徑衝突(無自動檢測,由派工者檢查)。
416
256
 
417
- Dev Agent 使用新系統查詢任務:
418
257
  ```bash
419
258
  # 列出待辦任務
420
- node .collaboration/core/task-api.js list --status pending --role developer
259
+ node .collaboration/core/task-api.js list --status backlog --role developer
421
260
 
422
261
  # 認領任務
423
262
  node .collaboration/core/task-api.js claim TASK_194
@@ -554,16 +393,13 @@ async moveTask(taskId, newStatus) {
554
393
  - **Claim 保號**:共享模式下從 Pool 認領任務保留原編號;只有真正的本地檔案碰撞才重編號(碰撞時先比對 `hash` 欄位 — 相同代表同一張卡返家,原地更新不重編)。重編號從 lease 消耗(counter 在共享模式下只記錄最後消耗的 lease 編號,不是配號權威)。
555
394
  - **Relay 端**:`id_counters` 表以 `(team_id, project)` 隔離,單一 transaction 內原子配號。
556
395
 
557
- **相關實作**:`task-api.js generateTaskID()/_allocateFromRelay()`、`dashboard/src/app/api/tasks/move/route.ts`(claim 路徑)、`yggdrasil-relay/src/routes/tasks.rs allocate_ids`(端點文檔見 `yggdrasil-relay/DESIGN.md`)。
396
+ **相關實作**:`task-api.js generateTaskID()/_allocateFromRelay()`、`yggdrasil-relay/src/routes/tasks.rs allocate_ids`(端點文檔見 `yggdrasil-relay/DESIGN.md`)。
558
397
 
559
398
  ---
560
399
 
561
400
  ## 參考連結
562
401
 
563
402
  - YAML 範例:`.collaboration/tasks/TASK_Example_{git_user}.yaml`
564
- - 舊系統文檔:`.system/pipeline/README.md`(待建立)
565
- - Formation 整合:`.formation/tools/loader.js:180-220`
566
- - Dashboard 整合:`dashboard/src-tauri/src/features/task/manager.rs`
567
403
 
568
404
  ---
569
405
 
package/core/CLAUDE.md CHANGED
@@ -38,7 +38,7 @@ session 開始時先鎖定語言(對照用戶第一條訊息 + cwd/CLAUDE.md
38
38
  - 「這個檔案有哪些 symbol?」→ `kenaz_lsp_symbols`
39
39
  - **文字 / 概念搜尋** → `Grep` / `Glob`(精確字串、正則、枚舉;需用 `|` 猜多個關鍵字時,就多組關鍵字一起 Grep)。
40
40
  - Session 初始化時用 `ToolSearch "kenaz_lsp"` 偵測 LSP 工具。ToolSearch 未找到 → 該 session 全程降級用 Grep/Glob。
41
- - 修改非 trivial symbol 前:用 `kenaz_lsp_references` / `kenaz_lsp_callers` 看影響範圍(FAIL-009)。trivial 改動可跳過。
41
+ - 修改非 trivial symbol 前:用 `kenaz_lsp_references` / `kenaz_lsp_callers` 看影響範圍。trivial 改動可跳過。
42
42
  - 所有 `kenaz_lsp_*` 呼叫必須明確帶 `projectPath`。
43
43
 
44
44
  **記憶系統已移除(2026-10-11,TASK_2411)**:Synapse / Hippocampus / Cortex recall / embeddings 與 Alaya seeds/bijas 已移除,`synapse_*`、`hippocampus_*`、`cortex_*`、`alaya_recall` 不再存在;教訓用 `kenaz learn add` 與 Claude 原生記憶檔;`~/.kenaz/cortex/*.db` 與 `.synapse/` 資料留在磁碟上、不再開啟。
@@ -97,12 +97,7 @@ KenazAI 是一個 Claude Code 多 Agent 協作系統,包含:
97
97
  | `/產品` | 需求分析、PRD |
98
98
  | `/設計` | UI/UX 設計 |
99
99
  | `/評估` | 深度評估 |
100
- | `/sre` | Supabase 管理、部署、SLO/Error Budget |
101
- | `/init` | 初始化新專案 |
102
- | `/進度` | 查看開發進度 |
103
100
  | `/spec` | 規格優化與文件整理 |
104
- | `/strategy` | 策略智庫 |
105
- | `/sunny` | 內部系統開發模式 |
106
101
 
107
102
  完整指令列表見 `.claude/commands/`。
108
103
 
@@ -1 +1 @@
1
- 0.3.17
1
+ 0.3.19
@@ -17,7 +17,7 @@ const path = require('path');
17
17
  const { spawnSync } = require('child_process');
18
18
 
19
19
  const ROOT = path.resolve(__dirname, '..', '..');
20
- const TARGETS = ['dev/scripts/check-file-size.js', '.memory/tools/memory-agent.js'];
20
+ const TARGETS = ['dev/scripts/check-file-size.js'];
21
21
  // Shipped modules (not CLIs): static check only. cognitive.js swallowed the missing
22
22
  // module in a try/catch and silently returned fallback rules in kenaz-core.
23
23
  const MODULES = ['.formation/tools/post-complete/cognitive.js'];
@@ -1,24 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * run-rust-tests.js — make `cargo test --lib` actually runnable on Windows (TASK_1619).
3
+ * run-rust-tests.js — build the kenaz-dashboard lib test binary and run it (TASK_1619).
4
4
  *
5
- * Root cause: the kenaz-dashboard lib unittest binary needs the Common-Controls v6
6
- * manifest (rfd crate statically imports comctl32!TaskDialogIndirect, which only
7
- * exists in the v6 SxS assembly). build.rs emits `cargo:rustc-link-arg-tests=
8
- * /MANIFEST:EMBED + /MANIFESTINPUT:test.manifest`, but cargo applies those flags
9
- * only to integration test targets (tests/), NOT to the lib unittest unit —
10
- * verified empirically 2026-06-11: the build-script output file contains the
11
- * directives while the rustc -v link invocation does not. Result: the loader
12
- * binds comctl32 5.82 from WinSxS and dies with STATUS_ENTRYPOINT_NOT_FOUND
13
- * (0xc0000139, bash exit 127) before any test runs.
14
- *
15
- * A global `cargo:rustc-link-arg` is NOT safe: tauri-build already embeds an
16
- * RT_MANIFEST resource for the app binary; adding /MANIFESTINPUT there creates
17
- * a duplicate-manifest link failure.
18
- *
19
- * Fix here: build with --no-run, copy the test exe to a stable fresh name
20
- * (the copy's new timestamp busts the per-path SxS activation-context cache),
21
- * drop an external .manifest beside it, then exec it with passthrough args.
5
+ * Builds with --no-run (so compiler errors can be rendered readably from the JSON
6
+ * message stream), locates the lib unittest executable and execs it with the filter
7
+ * and passthrough args. The Windows Common-Controls manifest workaround this script
8
+ * used to carry was only needed for rfd's static TaskDialogIndirect import; rfd is
9
+ * gone and the test exe starts fine without any manifest.
22
10
  *
23
11
  * Usage:
24
12
  * node dev/scripts/run-rust-tests.js [test-filter] [-- extra-harness-args]
@@ -36,7 +24,6 @@ const { verifyTargetDir } = require('./verify-target-dir.js');
36
24
 
37
25
  const repoRoot = path.resolve(__dirname, '..', '..');
38
26
  const crateDir = path.join(repoRoot, 'dashboard', 'src-tauri');
39
- const manifestSrc = path.join(crateDir, 'test.manifest');
40
27
 
41
28
  // TASK_2058: parse `[test-filter] [-- extra-harness-args]`.
42
29
  //
@@ -115,11 +102,29 @@ function renderCompilerErrors(stdoutText, maxErrors = 20) {
115
102
  return out;
116
103
  }
117
104
 
105
+ // The shared verify cache only grows (incremental builds are never pruned): it reached 551 GB by 2026-10-12.
106
+ // Every KENAZ_VERIFY_CLEAN_DAYS (default 7) days run `cargo clean` on it first. A stamp file, not a size walk:
107
+ // walking hundreds of GB takes minutes. cargo clean takes cargo's own lock, so a running build is waited for.
108
+ const CLEAN_STAMP = '.kenaz-last-clean';
109
+ function periodicClean(targetDir, env, { now = Date.now(), run = spawnSync, log = (m) => process.stderr.write(m) } = {}) {
110
+ const days = Number(env.KENAZ_VERIFY_CLEAN_DAYS || 7);
111
+ const stamp = path.join(targetDir, CLEAN_STAMP);
112
+ let last = 0;
113
+ try { last = fs.statSync(stamp).mtimeMs; } catch (_) { /* never stamped */ }
114
+ const touch = () => { try { fs.mkdirSync(targetDir, { recursive: true }); fs.writeFileSync(stamp, new Date(now).toISOString() + '\n'); } catch (_) { /* best effort */ } };
115
+ if (!last) { touch(); return 'stamped'; } // first run after this change: start the clock, do not wipe
116
+ if (!(days > 0) || now - last < days * 86400000) return 'fresh';
117
+ log(`[run-rust-tests] verify cache last cleaned ${Math.round((now - last) / 86400000)} days ago: cargo clean (one full rebuild follows)\n`);
118
+ const r = run('cargo', ['clean'], { cwd: crateDir, env, encoding: 'utf8', shell: false });
119
+ touch();
120
+ return r && r.status === 0 ? 'cleaned' : 'clean-failed';
121
+ }
122
+
118
123
  function main() {
119
124
  const exeArgs = buildExeArgs(process.argv.slice(2));
120
125
 
121
126
  // TASK_1879: default to the canonical shared verify target dir. Avoids both
122
- // Windows MAX_PATH (vendor/kuzu CMake) and the live tauri-dev lock on the
127
+ // Windows MAX_PATH and the live tauri-dev lock on the
123
128
  // repo's own target/. Explicit CARGO_TARGET_DIR still wins.
124
129
  const env = { ...process.env };
125
130
  if (!env.CARGO_TARGET_DIR) {
@@ -131,6 +136,8 @@ function main() {
131
136
  );
132
137
  }
133
138
 
139
+ if (env.CARGO_TARGET_DIR === verifyTargetDir()) periodicClean(env.CARGO_TARGET_DIR, env);
140
+
134
141
  // 1. Build the lib test binary without running it.
135
142
  const build = spawnSync(
136
143
  'cargo',
@@ -172,31 +179,8 @@ function main() {
172
179
  fail(`could not locate lib test executable (got: ${testExe})`);
173
180
  }
174
181
 
175
- // 3. Non-Windows: no manifest problem — run the artifact directly.
176
- if (process.platform !== 'win32') {
177
- const direct = spawnSync(testExe, exeArgs, { stdio: 'inherit' });
178
- process.exit(direct.status ?? 1);
179
- }
180
-
181
- // 4. Windows: copy to a stable name + external manifest (cache-busting copy).
182
- if (!fs.existsSync(manifestSrc)) {
183
- fail(`test.manifest not found at ${manifestSrc}`);
184
- }
185
- const runDir = path.dirname(testExe);
186
- const runExe = path.join(runDir, 'kenaz_dashboard_unit_tests.exe');
187
- fs.copyFileSync(testExe, runExe); // fresh timestamp invalidates SxS manifest cache
188
- fs.copyFileSync(manifestSrc, `${runExe}.manifest`);
189
- // Stage the PDB too so panic backtraces keep symbols (best effort).
190
- const pdb = testExe.replace(/\.exe$/i, '.pdb');
191
- if (fs.existsSync(pdb)) {
192
- try {
193
- fs.copyFileSync(pdb, runExe.replace(/\.exe$/i, '.pdb'));
194
- } catch {
195
- /* non-fatal */
196
- }
197
- }
198
-
199
- const run = spawnSync(runExe, exeArgs, { stdio: 'inherit' });
182
+ // 3. Run the artifact directly.
183
+ const run = spawnSync(testExe, exeArgs, { stdio: 'inherit' });
200
184
  process.exit(run.status ?? 1);
201
185
  }
202
186
 
@@ -204,4 +188,4 @@ if (require.main === module) {
204
188
  main();
205
189
  }
206
190
 
207
- module.exports = { parseArgs, buildExeArgs, renderCompilerErrors };
191
+ module.exports = { parseArgs, buildExeArgs, renderCompilerErrors, periodicClean, CLEAN_STAMP };
@@ -152,3 +152,20 @@ test('renderCompilerErrors: cap applied -> first N kept + omitted-count note', (
152
152
  'error[E0001]: synthetic error 1\n... 2 more errors omitted\n'
153
153
  );
154
154
  });
155
+
156
+ test('periodicClean: first run only stamps; fresh = nothing; older than N days = cargo clean then restamp', () => {
157
+ const fs = require('node:fs'), os = require('node:os'), path = require('node:path');
158
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'rrt-clean-'));
159
+ const calls = [];
160
+ const run = (cmd, args) => { calls.push([cmd, ...args].join(' ')); return { status: 0 }; };
161
+ const t0 = Date.parse('2026-10-01T00:00:00Z');
162
+ assert.equal(mod.periodicClean(dir, {}, { now: t0, run, log: () => {} }), 'stamped');
163
+ assert.deepEqual(calls, [], 'never wipes on the first run');
164
+ const stamp = path.join(dir, mod.CLEAN_STAMP);
165
+ fs.utimesSync(stamp, t0 / 1000, t0 / 1000);
166
+ assert.equal(mod.periodicClean(dir, {}, { now: t0 + 6 * 86400000, run, log: () => {} }), 'fresh');
167
+ assert.deepEqual(calls, []);
168
+ assert.equal(mod.periodicClean(dir, {}, { now: t0 + 8 * 86400000, run, log: () => {} }), 'cleaned');
169
+ assert.deepEqual(calls, ['cargo clean']);
170
+ assert.equal(mod.periodicClean(dir, { KENAZ_VERIFY_CLEAN_DAYS: '30' }, { now: t0 + 10 * 86400000, run, log: () => {} }), 'fresh', 'restamped, and the window is configurable');
171
+ });
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * PROBLEM: a Rust-scoped worktree subagent cannot safely run `cargo`/
7
7
  * `run-rust-tests.js` in its OWN task worktree. That worktree is a fresh
8
- * source root, so kuzu (a [patch] path dependency, see verify-target-dir.js)
9
- * has to be rebuilt from scratch via CMake — 10+ minutes, which blows the
8
+ * source root, so the whole dependency tree (see verify-target-dir.js)
9
+ * has to be rebuilt from scratch — minutes, which blows the
10
10
  * Bash foreground timeout and, per prompt.js rule 13/feedback_agent_orphan_
11
11
  * build_holds_lock, leaves an orphan cargo holding the shared target-dir
12
12
  * lock forever.
@@ -14,7 +14,7 @@
14
14
  * FIX: ONE canonical, reused worktree (this script owns it) that agents
15
15
  * check out their branch into, run a single narrow test filter in, and
16
16
  * hand back. The cache stays warm across dispatches because it is always
17
- * the SAME source root (kuzu's build artifacts are keyed per source root).
17
+ * the SAME source root (build artifacts are keyed per source root).
18
18
  *
19
19
  * Marker file `.kenaz-rust-verify` inside the worktree is the safety
20
20
  * invariant: every subcommand that would touch (create/checkout/lock in)
@@ -67,7 +67,7 @@ const RUNNER_REL_PATH = path.join('dev', 'scripts', 'run-rust-tests.js');
67
67
  // and the old `path.resolve(__dirname, '..', '..')` returned the WORKTREE
68
68
  // root, not the main repo — deriving a stray `<repoRoot>/.kenaz-worktrees/
69
69
  // <repoRoot-basename>/rust-verify` path nested inside the task worktree
70
- // and paying a cold kuzu build, exactly what this script exists to avoid.
70
+ // and paying a cold build, exactly what this script exists to avoid.
71
71
  //
72
72
  // Fix: ask git. `git rev-parse --git-common-dir` always resolves to the
73
73
  // MAIN repo's shared `.git` directory, even when run from a linked
@@ -6,9 +6,9 @@
6
6
  * generators, taskgen templates, verify scripts, formation runner/integration)
7
7
  * must take the value from here instead of inventing its own directory.
8
8
  *
9
- * Why a short path at all (Windows): vendor/kuzu's CMake object paths exceed
10
- * MAX_PATH (260) when the target dir sits under the repo or a worktree
11
- * (worktree paths add ~40 chars). A short root like C:/t/... keeps CMake alive.
9
+ * Why a short path at all (Windows): deep C/C++ dependency object paths
10
+ * can approach MAX_PATH (260) when the target dir sits under the repo or a
11
+ * worktree (worktree paths add ~40 chars). A short root like C:/t/... avoids it.
12
12
  *
13
13
  * Why ONE shared directory (user decision 2026-08-22): the previous convention
14
14
  * — "each dispatch invents a unique dir (C:/t/vis, C:/t/emb, C:/t1599, ...)
@@ -27,10 +27,10 @@
27
27
  * cargo.exe / build-script-build.exe at 0% CPU with NO rustc children
28
28
  * (nothing is compiling). Only in the orphan case kill the holder.
29
29
  *
30
- * Cache-heat caveat: kuzu is a [patch] path dependency, so its build artifacts
31
- * are keyed per source root. Verifies from the SAME checkout (main repo, or a
30
+ * Cache-heat caveat: workspace crates' build artifacts are keyed per
31
+ * source root. Verifies from the SAME checkout (main repo, or a
32
32
  * reused worktree) get the warm cache; a verify from a NEW worktree path
33
- * recompiles kuzu but coexists in the same dir without invalidating others.
33
+ * recompiles them but coexists in the same dir without invalidating others.
34
34
  * The dir therefore still grows across many distinct worktree roots — when it
35
35
  * gets too big, delete the whole canonical dir while no cargo is running; it
36
36
  * is pure cache and rebuilds itself.
@@ -13,7 +13,7 @@ off = every hook exits before reading stdin. assist = silent telemetry/bookkeepi
13
13
  | agent-flow POST (Notification, Pre/PostToolUse, PostToolUseFailure, SessionEnd, Stop, SubagentStart/Stop; user-level curl) | ship | assist | skipped silently when backend down |
14
14
  | SessionStart agent-flow ping | ship | assist | |
15
15
  | SessionStart guidance (new, replaces injecting CLAUDE.md) | ship | full | `guidance.md` |
16
- | _run-user-prompt.js (runs handoff-staleness, fatigue-check, daemon-outbox, turn-context, task-bridge, lease-touch, stream-delta) | ship | full | prints context |
16
+ | _run-user-prompt.js (runs daemon-outbox, turn-context, task-bridge, correction-detect; see DEFAULT_HOOKS) | ship | full | prints context |
17
17
  | memory-guard.js | ship | full | |
18
18
  | synapse-first-investigation.js | ship | full | |
19
19
  | task-bridge.js (PostToolUse Task*) | ship | assist | |
@@ -26,19 +26,19 @@ off = every hook exits before reading stdin. assist = silent telemetry/bookkeepi
26
26
 
27
27
  Hooks only act in Kenaz projects (`.kenaz/project.yaml`, `_project-guard.js`): run `/kenaz init` once in a fresh project.
28
28
 
29
- ## Commands (25)
29
+ ## Commands (13)
30
30
  | Class | Commands |
31
31
  |---|---|
32
- | ship (12 + new `/kenaz`) | Ansuz, Amelia, architect, dev, incident, review, security, spec, strategy, 產品, 設計, 評估 |
33
- | core | Huginn, sunny, lead, agent-worker, canary |
34
- | retire | archive, init, 進度, 開發, legacy_dev, 產品檢視, product-review, multi-agent, dev, lead (user retired 2026-10-09 with Formation) |
32
+ | ship (11 + new `/kenaz`) | Ansuz, Amelia, architect, incident, review, security, spec, 產品, 設計, 評估 |
33
+ | core | Huginn, canary, agent-worker (invoked by the Rust scheduler with `--task`/`--agent`) |
34
+ | removed | strategy (Strategy Agent skill gone), archive, init, 進度, legacy_dev, 產品檢視, product-review, sunny (Pipeline / TASK_QUEUE / retired-subsystem commands; `/dev`, `/lead`, `/開發`, `multi-agent` retired earlier with Formation) |
35
35
 
36
- ## Skills (45)
36
+ ## Skills
37
37
  | Class | Skills |
38
38
  |---|---|
39
39
  | ship (34) | architect_agent, assessment_agent, backend_agent, backend_engineer, code_reviewer, dev_agent, designer, developer, feature_agent, frontend_agent, incident_response, product_manager, qa_engineer, security_agent, spec_optimizer, sre_agent, adapt, animate, audit, bolder, clarify, colorize, critique, delight, distill, extract, frontend-design, harden, normalize, onboard, optimize, polish, quieter, ui-ux-pro-max |
40
- | core | heimdall, huginn, sunny, optimization_agent |
41
- | retire | legacy_dev |
40
+ | core | heimdall, huginn, optimization_agent |
41
+ | removed | legacy_dev, sunny |
42
42
  | third-party / domain (not shipped; install separately from .agents/skills) | vercel-react-best-practices, supabase-postgres-best-practices, remotion-best-practices, pcb-review |
43
43
 
44
44
  ## Open items / caveats
@@ -17,8 +17,7 @@
17
17
  - 撰寫模組接口規範
18
18
 
19
19
  4. **產出文件**:
20
- - 更新 `dev/pipeline/TASK_QUEUE.json`
21
- - 建立任務文件至 `dev/pipeline/tasks/`
20
+ - 用 `node "${CLAUDE_PLUGIN_ROOT}/hooks/core-resolve.js" .collaboration/core/task-api.js create` 建立任務卡(`.kenaz/tasks/backlog/`)
22
21
  - 撰寫接口文檔至 `docs/`
23
22
 
24
23
  請開始執行系統架構設計。
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 使用場景
6
6
 
7
- - 完成重要里程碑後,需要整理記憶點
7
+ - 完成重要里程碑後,需要整理文件與任務狀態
8
8
  - 需要更新 PRODUCT_SPEC.md 的 Feature 狀態
9
9
  - 需要從 .failure/ 提取失敗經驗
10
10
  - 定期維護文件(建議每週)
@@ -10,6 +10,6 @@
10
10
  - 深度理解用戶需求
11
11
  - 進行需求分析
12
12
  - 將需求拆解為開發任務
13
- - 將任務寫入 Pipeline 系統
13
+ - 用 `node "${CLAUDE_PLUGIN_ROOT}/hooks/core-resolve.js" .collaboration/core/task-api.js create` 建立任務卡(`.kenaz/tasks/backlog/`),完成後建議交給 `/Ansuz` 派工
14
14
 
15
15
  請開始執行產品需求分析。
@@ -1,5 +1,5 @@
1
1
  [Kenaz plugin: mode full] Kenaz MCP tools (kenaz-dashboard) are available when kenaz-server runs on localhost:18080.
2
2
  - Code navigation: kenaz_lsp_callers / kenaz_lsp_references / kenaz_lsp_definition / kenaz_lsp_symbols (always pass projectPath). Text search: Grep/Glob.
3
3
  - Collaboration: kenaz_peer_send / kenaz_peer_threads (other sessions, other machines, Codex), /kenaz ygg status|join.
4
- - Reply in the user's language. Commands: /Ansuz, /Amelia, /review, /security, /incident, /spec, /strategy.
4
+ - Reply in the user's language. Commands: /Ansuz, /Amelia, /review, /security, /incident, /spec.
5
5
  - Switch: /kenaz off | assist | full (or env KENAZ_MODE). off disables every Kenaz hook.
@@ -16,7 +16,7 @@ const SKILLS = [
16
16
  'adapt', 'animate', 'audit', 'bolder', 'clarify', 'colorize', 'critique', 'delight', 'distill', 'extract',
17
17
  'frontend-design', 'harden', 'normalize', 'onboard', 'optimize', 'polish', 'quieter', 'ui-ux-pro-max',
18
18
  ];
19
- const COMMANDS = ['Amelia', 'Ansuz', 'architect', 'incident', 'review', 'security', 'spec', 'strategy', '產品', '設計', '評估'];
19
+ const COMMANDS = ['Amelia', 'Ansuz', 'architect', 'incident', 'review', 'security', 'spec', '產品', '設計', '評估'];
20
20
 
21
21
  // Core-relative references become plugin-relative / core-resolved.
22
22
  // In a user's project (npm install) the core lives in ~/.kenaz/core, not the project folder, so a
@@ -76,6 +76,10 @@ function buildStatus(cfg, relay, peer) {
76
76
  waiting_mail: peer && typeof peer.waiting_count === 'number' ? peer.waiting_count : null,
77
77
  undeliverable_mail: peer && typeof peer.undeliverable_count === 'number' ? peer.undeliverable_count : null,
78
78
  // TASK_2380: real delivery mode per live session (push | pull-on-prompt | none), never a bare 'enabled'.
79
+ // TASK_2436: when the poller last reached the relay, and the relay's same-name warning.
80
+ last_poll_at: peer && peer.last_poll_at ? peer.last_poll_at : null,
81
+ last_poll_ok: peer && typeof peer.last_poll_ok === 'boolean' ? peer.last_poll_ok : null,
82
+ same_name_warning: peer && peer.same_name_warning ? peer.same_name_warning : '',
79
83
  delivery_mode: peer && peer.delivery_mode ? peer.delivery_mode : 'unknown',
80
84
  delivery_note: peer && peer.delivery_note ? peer.delivery_note : '',
81
85
  sessions: peer && Array.isArray(peer.sessions) ? peer.sessions : [],
@@ -95,6 +99,7 @@ function renderStatus(s) {
95
99
  'Pending mail: ' + (s.pending_mail == null ? 'unknown' : s.pending_mail),
96
100
  'Waiting for a session: ' + (s.waiting_mail == null ? 'unknown' : s.waiting_mail) + ' (stored on this node, readable)',
97
101
  'Undeliverable: ' + (s.undeliverable_mail == null ? 'unknown' : s.undeliverable_mail),
102
+ 'Last poll: ' + (s.last_poll_at ? s.last_poll_at + (s.last_poll_ok === false ? ' (FAILED)' : ' (ok)') : 'none yet'),
98
103
  'Delivery: ' + s.delivery_mode + (s.sessions.length ? '' : ' (no live sessions)'),
99
104
  ];
100
105
  for (const x of s.sessions) L.push(' - ' + x.agent + ' ' + String(x.session_id).slice(0, 8) + ': ' + x.delivery_mode);
@@ -102,6 +107,7 @@ function renderStatus(s) {
102
107
  L.push('', 'New team key (shown once, save it): ' + s.created.key + (s.created.team_name ? ' [' + s.created.team_name + ']' : ''));
103
108
  L.push('share with teammates: kenaz ygg join ' + s.created.key);
104
109
  }
110
+ if (s.same_name_warning) L.push('WARNING: ' + s.same_name_warning);
105
111
  if (s.room_warning) L.push('WARNING: ' + s.room_warning);
106
112
  if (s.delivery_note) L.push('Note: ' + s.delivery_note);
107
113
  return L.join('\n');