kenaz 0.3.18 → 0.3.20

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 (329) 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__/arms.test.js +41 -0
  30. package/core/.formation/tools/__tests__/diagnose-bug.test.js +10 -0
  31. package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
  32. package/core/.formation/tools/arms.js +48 -0
  33. package/core/.formation/tools/dispatch.js +24 -15
  34. package/core/.formation/tools/kenaz-stats.js +32 -8
  35. package/core/.formation/tools/kenaz-stats.test.js +15 -2
  36. package/core/.formation/tools/loader.js +17 -140
  37. package/core/.formation/tools/post-complete.js +0 -31
  38. package/core/.formation/tools/prompt.js +16 -1
  39. package/core/.formation/tools/prompt.test.js +20 -0
  40. package/core/.rule/INDEX.yaml +0 -18
  41. package/core/.rule/general/agent-workflow.yaml +14 -164
  42. package/core/.rule/general/project-self-containment.yaml +8 -19
  43. package/core/.rule/general/rust-verify-target.yaml +6 -5
  44. package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
  45. package/core/.specialist/Amelia/capability.yaml +12 -12
  46. package/core/.specialist/Amelia/workflow.yaml +2 -2
  47. package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
  48. package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
  49. package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
  50. package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
  51. package/core/.specialist/Ansuz/core.yaml +6 -108
  52. package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
  53. package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
  54. package/core/.specialist/Ansuz/knowledge.yaml +0 -4
  55. package/core/.specialist/Ansuz/rule.yaml +0 -1
  56. package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
  57. package/core/.specialist/tests/runtime-discovery/README.md +1 -1
  58. package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
  59. package/core/.specialist/tools/ansuz-boot-fast.js +7 -4
  60. package/core/.specialist/tools/ansuz-boot-fast.test.js +10 -3
  61. package/core/.specialist/tools/prompt-files.test.js +1 -0
  62. package/core/.specialist/tools/task-bridge.js +1 -66
  63. package/core/.system/README.md +11 -552
  64. package/core/.system/collaboration/README.md +10 -174
  65. package/core/CLAUDE.md +1 -6
  66. package/core/KENAZ_CORE_VERSION +1 -1
  67. package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
  68. package/core/dev/scripts/peer-identity-e2e.js +402 -0
  69. package/core/dev/scripts/peer-identity-e2e.md +47 -0
  70. package/core/dev/scripts/relay-admin.js +94 -0
  71. package/core/dev/scripts/relay-admin.test.js +131 -0
  72. package/core/dev/scripts/run-rust-tests.js +9 -45
  73. package/core/dev/scripts/rust-verify-worktree.js +4 -4
  74. package/core/dev/scripts/verify-target-dir.js +6 -6
  75. package/core/plugins/kenaz/INVENTORY.md +8 -8
  76. package/core/plugins/kenaz/README.md +10 -0
  77. package/core/plugins/kenaz/commands/architect.md +1 -2
  78. package/core/plugins/kenaz/commands/spec.md +1 -1
  79. package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
  80. package/core/plugins/kenaz/guidance.md +1 -1
  81. package/core/plugins/kenaz/hooks/kenaz-hook.js +2 -1
  82. package/core/plugins/kenaz/hooks/sdk-gate.js +9 -0
  83. package/core/plugins/kenaz/scripts/kenaz.test.js +15 -3
  84. package/core/plugins/kenaz/scripts/sync.js +1 -1
  85. package/core/plugins/kenaz/scripts/ygg.js +8 -0
  86. package/core/plugins/kenaz/scripts/ygg.test.js +72 -0
  87. package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
  88. package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
  89. package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
  90. package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
  91. package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
  92. package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
  93. package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
  94. package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
  95. package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
  96. package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
  97. package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
  98. package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
  99. package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
  100. package/core/plugins/kenaz-peer/hooks/register.test.ts +32 -0
  101. package/core/plugins/kenaz-peer/hooks/register.ts +9 -0
  102. package/package.json +6 -6
  103. package/core/.claude/commands/archive.md +0 -24
  104. package/core/.claude/commands/init.md +0 -112
  105. package/core/.claude/commands/legacy_dev.md +0 -18
  106. package/core/.claude/commands/product-review.md +0 -131
  107. package/core/.claude/commands/strategy.md +0 -141
  108. package/core/.claude/commands/sunny.md +0 -1
  109. package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
  110. package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
  111. package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
  112. package/core/.claude/hooks/_substrate-paths.js +0 -95
  113. package/core/.claude/hooks/context-check.js +0 -51
  114. package/core/.claude/hooks/fatigue-check.js +0 -52
  115. package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
  116. package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
  117. package/core/.claude/hooks/handoff-staleness.js +0 -197
  118. package/core/.claude/hooks/jev-thalamus-context.js +0 -17
  119. package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
  120. package/core/.claude/hooks/lease-release.js +0 -119
  121. package/core/.claude/hooks/lease-touch.js +0 -96
  122. package/core/.claude/hooks/reflex-feedback.js +0 -5
  123. package/core/.claude/hooks/session-init.ps1 +0 -49
  124. package/core/.claude/hooks/sound-event.js +0 -70
  125. package/core/.claude/hooks/sound-event.sh +0 -37
  126. package/core/.claude/hooks/stream-delta.js +0 -169
  127. package/core/.claude/no-hooks.settings.json +0 -3
  128. package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
  129. package/core/.claude/skills/sunny/SKILL.md +0 -74
  130. package/core/.collaboration/cli/commands/assign.js +0 -39
  131. package/core/.collaboration/cli/commands/claim.js +0 -33
  132. package/core/.collaboration/cli/commands/complete.js +0 -44
  133. package/core/.collaboration/cli/commands/create.js +0 -110
  134. package/core/.collaboration/cli/commands/get.js +0 -83
  135. package/core/.collaboration/cli/commands/index.js +0 -52
  136. package/core/.collaboration/cli/commands/list.js +0 -51
  137. package/core/.collaboration/cli/commands/lock.js +0 -45
  138. package/core/.collaboration/cli/commands/rebuild.js +0 -39
  139. package/core/.collaboration/cli/commands/search.js +0 -61
  140. package/core/.collaboration/cli/commands/stats.js +0 -61
  141. package/core/.collaboration/cli/commands/transfer.js +0 -41
  142. package/core/.collaboration/cli/commands/unlock.js +0 -48
  143. package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
  144. package/core/.collaboration/cli/formatters/index.js +0 -7
  145. package/core/.collaboration/cli/task-cli.js +0 -46
  146. package/core/.collaboration/cli/utils/arg-parser.js +0 -74
  147. package/core/.collaboration/cli/utils/git-user.js +0 -25
  148. package/core/.collaboration/cli/utils/index.js +0 -9
  149. package/core/.collaboration/cli/utils/output.js +0 -10
  150. package/core/.collaboration/config/default.yaml +0 -189
  151. package/core/.collaboration/core/conflict-resolver.js +0 -461
  152. package/core/.collaboration/core/conflict-resolver.test.js +0 -389
  153. package/core/.collaboration/core/migrate-legacy.js +0 -260
  154. package/core/.collaboration/docs/API.md +0 -787
  155. package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
  156. package/core/.collaboration/docs/FAQ.md +0 -695
  157. package/core/.collaboration/docs/MIGRATION.md +0 -804
  158. package/core/.collaboration/docs/examples/README.md +0 -320
  159. package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
  160. package/core/.collaboration/docs/examples/basic-usage.js +0 -184
  161. package/core/.collaboration/docs/examples/team-workflow.js +0 -352
  162. package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
  163. package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
  164. package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
  165. package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
  166. package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
  167. package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
  168. package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
  169. package/core/.failure/pipeline/README.md +0 -95
  170. package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
  171. package/core/.failure/tools/USAGE_GUIDE.md +0 -323
  172. package/core/.failure/tools/check_failures.ps1 +0 -387
  173. package/core/.failure/tools/log_failure.ps1 +0 -474
  174. package/core/.formation/.episode-input.json +0 -10
  175. package/core/.formation/.merge-lock +0 -1
  176. package/core/.formation/lead.yaml +0 -118
  177. package/core/.formation/legacy.bak/designer.yaml +0 -57
  178. package/core/.formation/legacy.bak/pm.yaml +0 -57
  179. package/core/.formation/legacy.bak/qa.yaml +0 -57
  180. package/core/.formation/legacy.bak/review.yaml +0 -62
  181. package/core/.formation/legacy.bak/scheduler.yaml +0 -129
  182. package/core/.formation/legacy.bak/sre.yaml +0 -57
  183. package/core/.formation/role-map.yaml +0 -274
  184. package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
  185. package/core/.formation/roles/_shared/modules/security.yaml +0 -103
  186. package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
  187. package/core/.formation/roles/backend/role.yaml +0 -93
  188. package/core/.formation/roles/code_reviewer/role.yaml +0 -102
  189. package/core/.formation/roles/database_optimizer/role.yaml +0 -107
  190. package/core/.formation/roles/designer/role.yaml +0 -66
  191. package/core/.formation/roles/developer/role.yaml +0 -75
  192. package/core/.formation/roles/frontend/role.yaml +0 -134
  193. package/core/.formation/roles/incident_response/role.yaml +0 -89
  194. package/core/.formation/roles/qa/role.yaml +0 -89
  195. package/core/.formation/roles/security/role.yaml +0 -87
  196. package/core/.formation/roles/sre/role.yaml +0 -66
  197. package/core/.formation/skills/coordinator.yaml +0 -52
  198. package/core/.formation/solo/diagnosis.yaml +0 -78
  199. package/core/.formation/solo/strategy.yaml +0 -121
  200. package/core/.formation/tests/hello.txt +0 -2
  201. package/core/.formation/tools/coordinator.js +0 -350
  202. package/core/.formation/tools/jev-correction.js +0 -214
  203. package/core/.formation/tools/jev-correction.test.js +0 -178
  204. package/core/.formation/tools/log-reader.js +0 -232
  205. package/core/.formation/tools/revert-daemon-state.js +0 -162
  206. package/core/.formation/tools/test-drift.js +0 -148
  207. package/core/.formation/unit/heimdall.yaml +0 -96
  208. package/core/.formation/unit/plan.yaml +0 -67
  209. package/core/.formation/unit/think.yaml +0 -58
  210. package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
  211. package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
  212. package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
  213. package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
  214. package/core/.kenaz/muninn_episode_write.ps1 +0 -17
  215. package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
  216. package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
  217. package/core/.kenaz/runes_TASK_1428.json +0 -57
  218. package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
  219. package/core/.kenaz/tmp_props.json +0 -1
  220. package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
  221. package/core/.rule/MECHANIZED.md +0 -61
  222. package/core/.rule/general/cortex-memory-recall.yaml +0 -446
  223. package/core/.rule/general/pipeline.yaml +0 -246
  224. package/core/.rule/general/sunny-access-control.yaml +0 -60
  225. package/core/.rule/general/system-invariants.yaml +0 -231
  226. package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
  227. package/core/.rule/pipeline/auto-update.yaml +0 -282
  228. package/core/.rule/pipeline/task-execution.yaml +0 -365
  229. package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
  230. package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
  231. package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
  232. package/core/.specialist/Ansuz/workflow.yaml +0 -1225
  233. package/core/.specialist/experiments/rg_benchmark.js +0 -523
  234. package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
  235. package/core/.specialist/tools/jev-optional-context.js +0 -107
  236. package/core/.specialist/tools/jev-optional-context.test.js +0 -152
  237. package/core/.specialist/tools/memory-action-log.js +0 -839
  238. package/core/.specialist/tools/phase-gate.js +0 -3534
  239. package/core/.specialist/tools/phase-gate.test.js +0 -85
  240. package/core/.specialist/tools/precompute-runner.js +0 -444
  241. package/core/.specialist/tools/rule-engine.js +0 -621
  242. package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
  243. package/core/.synapse/memory-shared.json.sync +0 -1
  244. package/core/.system/agent-skills/README.md +0 -724
  245. package/core/.system/cli-tools/README.md +0 -724
  246. package/core/.system/cortex/MODULES.md +0 -1046
  247. package/core/.system/dashboard/FRONTEND.md +0 -812
  248. package/core/.system/dashboard/README.md +0 -737
  249. package/core/.system/failure/README.md +0 -723
  250. package/core/.system/formation/LEGACY_SKILLS.md +0 -974
  251. package/core/.system/formation/POST_COMPLETE.md +0 -602
  252. package/core/.system/formation/README.md +0 -1094
  253. package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
  254. package/core/.system/kenaz/README.md +0 -787
  255. package/core/.system/memory/README.md +0 -719
  256. package/core/.system/pipeline/README.md +0 -712
  257. package/core/.system/rule/README.md +0 -794
  258. package/core/.system/sunny/README.md +0 -476
  259. package/core/.system/sunny/RULES.json +0 -89
  260. package/core/.system/sunny/knowledge/INDEX.md +0 -37
  261. package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
  262. package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
  263. package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
  264. package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
  265. package/core/.system/sunny/teammates/README.md +0 -107
  266. package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
  267. package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
  268. package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
  269. package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
  270. package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
  271. package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
  272. package/core/.system/sunny/tools.json +0 -101
  273. package/core/dev/scripts/cleanup-queue.js +0 -184
  274. package/core/dev/scripts/cleanup_queue.js +0 -86
  275. package/core/dev/scripts/legacy/README.md +0 -39
  276. package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
  277. package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
  278. package/core/dev/scripts/matrix/CLI_README.md +0 -214
  279. package/core/dev/scripts/matrix/README.md +0 -310
  280. package/core/dev/scripts/matrix/package-lock.json +0 -4266
  281. package/core/dev/scripts/matrix/package.json +0 -55
  282. package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
  283. package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
  284. package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
  285. package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
  286. package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
  287. package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
  288. package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
  289. package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
  290. package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
  291. package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
  292. package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
  293. package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
  294. package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
  295. package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
  296. package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
  297. package/core/dev/scripts/matrix/src/index.ts +0 -62
  298. package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
  299. package/core/dev/scripts/matrix/src/parser.ts +0 -281
  300. package/core/dev/scripts/matrix/src/serializer.ts +0 -151
  301. package/core/dev/scripts/matrix/src/validator.ts +0 -301
  302. package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
  303. package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
  304. package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
  305. package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
  306. package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
  307. package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
  308. package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
  309. package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
  310. package/core/dev/scripts/matrix/tsconfig.json +0 -20
  311. package/core/dev/scripts/matrix/types/index.d.ts +0 -111
  312. package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
  313. package/core/dev/scripts/matrix/types/index.js +0 -8
  314. package/core/dev/scripts/matrix/types/index.js.map +0 -1
  315. package/core/dev/scripts/matrix/types/index.ts +0 -124
  316. package/core/dev/scripts/memory-usage-report.js +0 -152
  317. package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
  318. package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
  319. package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
  320. package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
  321. package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
  322. package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
  323. package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
  324. package/core/dev/scripts/validate_pipeline.js +0 -197
  325. package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
  326. package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
  327. package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
  328. package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
  329. package/core/plugins/kenaz/commands/strategy.md +0 -141
@@ -1,555 +1,14 @@
1
- # .system - 系統核心文檔總索引
1
+ # .system - subsystem docs
2
2
 
3
- > **用途**: Kenaz AI 系統核心組件文檔中心
4
- > **建立日期**: 2026-02-13 | **更新**: 2026-02-19
5
- > **文檔版本**: v3.1
3
+ Reference docs for the subsystems that are still live. Rules in `.rule/INDEX.yaml`, failure patterns in `.failure/INDEX.yaml`, commands in `.claude/commands/` and skills in `.claude/skills/` are self-describing; read them directly.
6
4
 
7
- ---
5
+ | Doc | Subsystem |
6
+ |---|---|
7
+ | [collaboration/README.md](./collaboration/README.md) | Task system: `.kenaz/tasks/{status}/` YAML cards, `.collaboration/core/task-api.js` |
8
+ | [specialist/README.md](./specialist/README.md) | Specialist system (`.specialist/`: Ansuz, Amelia) |
9
+ | [assessment/README.md](./assessment/README.md) | Feature assessment reports (`.assessment/`) |
10
+ | [githooks/README.md](./githooks/README.md) | Git hooks (`.githooks/`) |
11
+ | [external-skills/README.md](./external-skills/README.md) | External skills (`.agents/skills/`) |
12
+ | [archive/README.md](./archive/README.md) | Long-term archive (`.archive/`) |
8
13
 
9
- ## 📋 系統架構總覽
10
-
11
- Kenaz AI 採用**模組化系統架構**,各子系統獨立運作且相互協作:
12
-
13
- ```
14
- ┌──────────────────────────────────────────────────────────────┐
15
- │ Kenaz AI 系統 │
16
- │ │
17
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
18
- │ │ 規則系統 │ │ Agent系統 │ │ 記憶系統 │ │
19
- │ │ .rule/ │ │ .claude/ │ │ .memory/ │ │
20
- │ └────────────┘ └────────────┘ └────────────┘ │
21
- │ │
22
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
23
- │ │ 任務系統 │ │ Formation │ │ 失敗學習 │ │
24
- │ │.collaboration/│ .formation/│ │ .failure/ │ │
25
- │ └────────────┘ └────────────┘ └────────────┘ │
26
- │ │
27
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
28
- │ │ Dashboard │ │ CLI Tools │ │ Git Hooks │ │
29
- │ │ dashboard/ │ │dev/scripts/│ │ .githooks/ │ │
30
- │ └────────────┘ └────────────┘ └────────────┘ │
31
- └──────────────────────────────────────────────────────────────┘
32
- ```
33
-
34
- ---
35
-
36
- ## 🗂️ 子系統快速導航
37
-
38
- | 子系統 | 路徑 | 說明 | 狀態 |
39
- |--------|------|------|------|
40
- | [規則系統](#rule---規則系統) | `.rule/` | 最高優先級規則庫 | ✅ Active |
41
- | [Agent 系統](#agent-skills--commands---agent-定義與指令系統) | `.claude/` | Agent 定義與斜線指令 | ✅ Active |
42
- | [Sunny 系統](#sunny---內部系統開發-agent) | `.system/sunny/` | 內部系統開發特權 Agent | ✅ Active |
43
- | [失敗學習](#failure---失敗學習系統) | `.failure/` | 失敗經驗記錄與預防 | ✅ Active |
44
- | [記憶系統](#memory---記憶系統) | `.memory/` | 智能記憶與知識管理 | ✅ Active |
45
- | [Kenaz 主記憶](#kenaz---主記憶與文檔工具) | `.kenaz/` | 跨專案共享知識庫 | ✅ Active |
46
- | [Collaboration](#collaboration---新任務系統) | `.collaboration/` | 第二代任務管理系統 | ✅ Active (v3.x) |
47
- | [Pipeline](#pipeline---舊任務系統-legacy) | `dev/pipeline/` | 第一代任務系統 | ⚠️ Legacy |
48
- | [Formation](#formation---多陣型調度系統) | `.formation/` | 多陣型 Agent 調度 | ✅ Active |
49
- | [Dashboard](#dashboard---tauri-後端架構) | `dashboard/src-tauri/` | 桌面應用後端 | ✅ Active |
50
- | [CLI Tools](#cli-tools---開發工具集) | `dev/scripts/` | 開發與維護腳本 | ✅ Active |
51
- | [Git Hooks](#git-hooks---自動化系統) | `.githooks/` | Git 生命週期自動化 | ✅ Active |
52
-
53
- ---
54
-
55
- ## Rule - 規則系統
56
-
57
- `.rule/` 是專案的**最高優先級規則庫**,定義所有 AI Agent 和人類開發者必須遵守的核心約束與標準。
58
-
59
- ### 規則優先級
60
-
61
- 當規則發生衝突時,按以下優先級順序執行:
62
-
63
- ```
64
- 1. .rule/* ← 最高優先級(所有人必須遵守)
65
- 2. CLAUDE.md ← 專案級指令與工作流程
66
- 3. .claude/skills/ ← Agent 行為定義
67
- 4. .agents/skills/ ← 外部安裝的最佳實踐
68
- ```
69
-
70
- ### 目錄結構
71
-
72
- | 分類 | 說明 |
73
- |------|------|
74
- | `general/` | 通用規則(所有 Agent 適用) |
75
- | `pipeline/` | Pipeline 專用規則(任務執行、封存、自動更新) |
76
- | `code/` | 代碼規範(命名、結構、複用性、可維護性) |
77
- | `design/` | 設計規範(UI、UX、色彩系統) |
78
- | `architecture/` | 架構決策記錄(未來擴展) |
79
- | `business/` | 業務邏輯約束(未來擴展) |
80
-
81
- ### 嚴重程度
82
-
83
- | 級別 | 說明 | 圖標 |
84
- |------|------|------|
85
- | **MUST** | 必須遵守,違反將導致拒絕合併 | 🔴 |
86
- | **SHOULD** | 應該遵守,除非有合理理由 | 🟡 |
87
- | **MAY** | 建議遵守,可依情況調整 | 🟢 |
88
-
89
- ### 重要規則速查
90
-
91
- | 規則 ID | 標題 | 嚴重程度 | 說明 |
92
- |---------|------|---------|------|
93
- | **GEN-007** | 專案自包含原則 | 🔴 | 所有操作必須在專案目錄內 |
94
- | **AGT-001** | 記憶點優先 | 🔴 | 任務開始前檢查 .memory/ |
95
- | **AGT-005** | 失敗經驗查閱 | 🔴 | 失敗時必須查閱 .failure/ |
96
- | **PPL-107** | 工作啟動前展示計劃 | 🔴 | 必須向用戶展示計劃並等待確認 |
97
- | **PPL-111** | scope_paths 衝突檢測 | 🔴 | 並行任務不可有路徑衝突 |
98
-
99
- ### 使用方式
100
-
101
- ```bash
102
- # 讀取規則索引
103
- cat .rule/INDEX.yaml
104
-
105
- # 檢查相關規則
106
- cat .rule/general/agent-workflow.yaml # 所有 Agent 必讀
107
- cat .rule/pipeline/task-execution.yaml # Pipeline 任務必讀
108
- ```
109
-
110
- **詳細文檔**:請參閱 [`rule/README.md`](./rule/README.md)
111
-
112
- ---
113
-
114
- ## Agent Skills & Commands - Agent 定義與指令系統
115
-
116
- `.claude/` 是 Kenaz AI 專案的 **Agent 定義與指令系統**,提供完整的 AI Agent 管理框架。
117
-
118
- ### 核心組件
119
-
120
- | 組件 | 說明 |
121
- |------|------|
122
- | `skills/` | Agent 角色定義(職責、能力、工作流程) |
123
- | `commands/` | 斜線指令觸發機制(如 `/Ansuz`, `/產品`) |
124
- | `hooks/` | Session 生命週期鉤子(自動初始化) |
125
- | `settings.json` | 權限管理與配置 |
126
- | `mcp.json` | MCP 整合(Cortex RAG 引擎) |
127
-
128
- ### 現有 Agent
129
-
130
- | Agent | 指令 | 職責 |
131
- |-------|------|------|
132
- | Formation Lead | `/lead` | 需求分析、陣型調度、結果追蹤 |
133
- | Product Manager | `/產品` | 需求分析、PRD 撰寫、任務規劃 |
134
- | Designer | `/設計` | UI/UX 設計、設計規範 |
135
- | Developer | - | 前端開發(React/TypeScript) |
136
- | Backend Engineer | `/後端` | 後端開發(Python/FastAPI) |
137
- | Sunny | `/sunny` | 內部系統開發(特權模式) |
138
-
139
- ### Lead vs Worker 模式
140
-
141
- - **Lead Agent(溝通者)**:理解需求、調度執行、匯報結果(不直接寫代碼)
142
- - **Worker Agent(執行者)**:接收明確任務、執行技術工作、返回結果
143
- - **混合 Agent**:既可協調也可執行(如 Dev Agent)
144
-
145
- ### 使用方式
146
-
147
- ```bash
148
- # 在 Claude Code 中輸入斜線指令觸發 Agent
149
- /產品 # 啟動 Product Manager
150
- /dev # 啟動 Dev Agent
151
-
152
- # 新增 Agent
153
- 1. 建立 .claude/skills/<agent_name>/SKILL.md
154
- 2. 建立 .claude/commands/<指令名>.md
155
- 3. 更新 CLAUDE.md 註冊 Agent
156
- ```
157
-
158
- **詳細文檔**:請參閱 [`agent-skills/README.md`](./agent-skills/README.md)
159
-
160
- ---
161
-
162
- ## Sunny - 內部系統開發 Agent
163
-
164
- Sunny 是專門處理 Kenaz AI **內部系統開發**的特權 Agent。
165
-
166
- ### 為什麼需要 Sunny?
167
-
168
- 正常開發流程(PM → Design → Dev → QA)適用於產品功能開發,但當需要修改**系統本身**(如 `.collaboration/`、`.rule/`、`.formation/`)時,流程規則會產生矛盾。Sunny 解決這個 bootstrapping 問題。
169
-
170
- ### 規則優先級
171
-
172
- ```
173
- 1. .rule/* ← 絕對遵守(GEN-007, SEC-*, DATA-*)
174
- 2. .system/sunny/* ← Sunny 專屬規則
175
- 3. CLAUDE.md ← 可選擇性忽略
176
- ```
177
-
178
- ### 能力範圍
179
-
180
- | 允許 | 禁止 |
181
- |------|------|
182
- | 直接修改系統目錄 | 違反 `.rule/` 規則 |
183
- | 使用 Task 工具(跳過 TEAM-003) | 在專案目錄外輸出(GEN-007) |
184
- | 跳過展示計劃、用戶確認 | 違反安全/資料完整性規則 |
185
- | 不遵循標準開發流程 | |
186
-
187
- ### 子系統
188
-
189
- | 路徑 | 說明 |
190
- |------|------|
191
- | `sunny/README.md` | 完整系統文檔與運作機制 |
192
- | `sunny/RULES.json` | 規則定義 |
193
- | `sunny/tools.json` | 工具註冊表 |
194
- | `sunny/knowledge/` | Claude Code 官方功能知識庫 |
195
- | `sunny/teammates/` | Agent Teams 啟動器(實驗性) |
196
-
197
- ### 使用方式
198
-
199
- 在 Claude Code 中輸入 `/sunny` 啟動,說「退出」結束。
200
-
201
- **詳細文檔**:請參閱 [`sunny/README.md`](./sunny/README.md)
202
-
203
- ---
204
-
205
- ## Failure - 失敗學習系統
206
-
207
- `.failure/` 是專案的**失敗經驗學習系統**,記錄開發過程中的失敗模式並提供預防措施。
208
-
209
- ### 核心理念
210
-
211
- **從失敗中學習,將錯誤轉化為規則**:
212
- ```
213
- 失敗 → 記錄到 .failure/ → 分析根因 → 如重複發生(>2 次)→ 提升為 .rule/
214
- ```
215
-
216
- ### 失敗分類
217
-
218
- | 分類 | 圖標 | 說明 |
219
- |------|------|------|
220
- | `agent-execution/` | 🤖 | Agent 執行失敗(空跑、無輸出、錯誤邏輯) |
221
- | `code-quality/` | 💻 | 代碼品質問題(bug、性能、可讀性) |
222
- | `architecture/` | 🏗️ | 架構決策失敗(設計缺陷、技術選型錯誤) |
223
- | `pipeline/` | ⚙️ | Pipeline 系統失敗(任務管理、佇列污染) |
224
- | `data-integrity/` | 📊 | 數據完整性問題(JSON 損壞、編碼錯誤) |
225
-
226
- ### 核心規則
227
-
228
- **AGT-005**:失敗時必須查閱失敗經驗(定義於 `.rule/general/agent-workflow.yaml`)
229
-
230
- ### 可用工具
231
-
232
- | 工具 | 用途 |
233
- |------|------|
234
- | `check_failures.ps1` | 任務開始前檢查相關失敗模式 |
235
- | `log_failure.ps1` | 任務失敗後記錄失敗經驗 |
236
- | `validate_json.js` | 驗證 JSON 文件完整性 |
237
- | `fix_json.js` | 一鍵修復 JSON(移除 BOM + 驗證 + 格式化) |
238
-
239
- ### 使用方式
240
-
241
- ```powershell
242
- # 任務開始前:檢查失敗模式
243
- .\.failure\tools\check_failures.ps1 -TaskID "TASK_XXX"
244
-
245
- # 任務執行中:驗證 JSON
246
- node .failure/tools/fix_json.js dev/pipeline/TASK_QUEUE.json
247
-
248
- # 任務失敗後:記錄經驗
249
- .\.failure\tools\log_failure.ps1 -Interactive
250
- ```
251
-
252
- **詳細文檔**:請參閱 [`failure/README.md`](./failure/README.md)
253
-
254
- ---
255
-
256
- ## Memory - 記憶系統
257
-
258
- `.memory/` 是 Kenaz AI 的**智能記憶系統**,模擬人腦記憶機制,提供持久化知識儲存與檢索。
259
-
260
- ### 核心理念
261
-
262
- **自動化記憶、語義檢索、雙層架構**:
263
- ```
264
- Agent 工作流程
265
- ↓
266
- 1. 任務開始前 → 查詢相關記憶(避免重複踩坑)
267
- 2. 任務執行中 → 實時存取知識(模式、解決方案)
268
- 3. 任務完成後 → 自動評估是否需要記憶
269
- ```
270
-
271
- ### 雙層架構
272
-
273
- | 層級 | 位置 | 性質 | 內容 |
274
- |------|------|------|------|
275
- | **主記憶** | `.kenaz/main-memory/` | 唯讀、全局 | Kenaz 系統知識、通用最佳實踐 |
276
- | **專案記憶** | `.memory/` | 讀寫、專案專屬 | 決策、失敗經驗、模式、洞察 |
277
-
278
- ### 記憶類型
279
-
280
- | 類型 | 說明 |
281
- |------|------|
282
- | **decision** | 決策記錄(架構選型、技術決策) |
283
- | **failure** | 失敗經驗(Bug、錯誤、踩坑) |
284
- | **pattern** | 可複用模式(程式碼片段、流程範本) |
285
- | **insight** | 洞察理解(對系統的新認識) |
286
- | **context** | 狀態快照(專案當前進度) |
287
- | **reference** | 外部資源(文檔連結、API 參考) |
288
-
289
- ### 使用方式
290
-
291
- ```bash
292
- # 搜尋相關記憶
293
- node .memory/tools/memory-tools.js search "團隊調用"
294
-
295
- # 新增記憶
296
- node .memory/tools/memory-tools.js add \
297
- --type decision \
298
- --title "選擇 React 框架" \
299
- --summary "因為生態系成熟、團隊熟悉度高"
300
-
301
- # 列出所有記憶
302
- node .memory/tools/memory-tools.js list
303
- ```
304
-
305
- **詳細文檔**:請參閱 [`memory/README.md`](./memory/README.md)
306
-
307
- ---
308
-
309
- ## Kenaz - 主記憶與文檔工具
310
-
311
- `.kenaz/` 是 Kenaz AI 的**系統級核心配置目錄**,提供跨專案共享的知識庫與文檔管理工具。
312
-
313
- ### 核心組件
314
-
315
- | 組件 | 說明 |
316
- |------|------|
317
- | `main-memory/` | 跨專案共享的主記憶系統(唯讀) |
318
- | `docs/` | 系統文檔與索引工具 |
319
- | `cortex.yaml` | Kenaz Cortex RAG 引擎配置 |
320
-
321
- ### 主記憶特性
322
-
323
- - **跨專案共享**:所有 Kenaz 專案共用的知識庫
324
- - **唯讀繼承**:專案可讀取但不可修改(由開發者維護)
325
- - **優先級繼承**:專案記憶 > 主記憶 > 系統預設
326
-
327
- ### 文檔工具
328
-
329
- | 工具 | 用途 |
330
- |------|------|
331
- | `docs/build-index.js` | 自動生成系統文檔索引 |
332
- | `docs/update-all.ps1` | 批量更新所有文檔 |
333
-
334
- **詳細文檔**:請參閱 [`kenaz/README.md`](./kenaz/README.md)
335
-
336
- ---
337
-
338
- ## Collaboration - 新任務系統
339
-
340
- `.collaboration/` 是 Kenaz AI 的**第二代任務管理系統**(v3.x),採用「目錄即狀態」架構。
341
-
342
- ### 核心設計
343
-
344
- **設計理念**:
345
- - **目錄即狀態**:任務狀態由檔案所在目錄決定
346
- - **YAML 格式**:人類可讀,支援多行文字
347
- - **雙層 API**:task-api.js(完整功能)+ task-api-json.js(JSON 輸出)
348
- - **向後相容**:與舊 TASK_QUEUE.json 格式相容
349
-
350
- ### 目錄結構
351
-
352
- ```
353
- .collaboration/
354
- ├── core/ # 核心 API
355
- │ ├── task-api.js # 主 API(CLI)
356
- │ └── task-api-json.js # JSON 輸出(Dashboard 用)
357
- ├── tasks/ # 任務儲存
358
- │ ├── active/ # 進行中
359
- │ ├── done/ # 已完成
360
- │ ├── blocked/ # 已阻塞
361
- │ └── archived/ # 已封存
362
- └── config/ # 配置與模板
363
- ```
364
-
365
- ### 使用方式
366
-
367
- ```bash
368
- # 建立任務
369
- node .collaboration/core/task-api.js create \
370
- --title "實作功能 X" \
371
- --priority P1 \
372
- --role developer
373
-
374
- # 查詢任務
375
- node .collaboration/core/task-api.js get TASK_XXX
376
-
377
- # 更新狀態
378
- node .collaboration/core/task-api.js update TASK_XXX --status done
379
- ```
380
-
381
- **詳細文檔**:請參閱 [`collaboration/README.md`](./collaboration/README.md)
382
-
383
- ---
384
-
385
- ## Pipeline - 舊任務系統 ⚠️ LEGACY
386
-
387
- `dev/pipeline/` 是 Kenaz AI 的**第一代任務管理系統**,採用 JSON + YAML 雙格式設計。
388
-
389
- ### ⚠️ 系統狀態
390
-
391
- | 狀態 | 說明 |
392
- |------|------|
393
- | **Legacy** | 傳統系統,保留供排程器使用 |
394
- | **相容支援** | 目前仍可使用,但功能凍結 |
395
- | **逐步淘汰** | 未來將全面遷移到 `.collaboration/` |
396
-
397
- ### 關鍵差異(vs 新系統)
398
-
399
- | 特性 | 新系統 | 舊系統 |
400
- |------|--------|--------|
401
- | **格式** | YAML + 目錄 | JSON + YAML |
402
- | **路徑鎖定** | ❌ 無 | ✅ lock_manager.py |
403
- | **依賴解析** | ⚠️ 基礎 | ✅ 完整(拓撲排序) |
404
- | **並行衝突檢測** | ❌ 無 | ✅ 自動 |
405
-
406
- ### 適用場景
407
-
408
- - Multi-Agent 並行開發(需路徑鎖定)
409
- - 排程器自動化(需依賴解析)
410
-
411
- **詳細文檔**:請參閱 [`pipeline/README.md`](./pipeline/README.md)
412
-
413
- ---
414
-
415
- ## Formation - 多陣型調度系統
416
-
417
- `.formation/` 是 Kenaz AI 的 **Agent 部署陣型系統**,根據任務規模動態選擇最佳調度策略。
418
-
419
- ### 核心理念
420
-
421
- **「合適的陣型 = 最佳的效率與成本平衡」**
422
-
423
- ### 5 種陣型
424
-
425
- | 陣型 | 說明 | 適用場景 | Agent 數量 |
426
- |------|------|----------|-----------|
427
- | **unit** | 單人執行 | 簡單任務、不需協作 | 1 |
428
- | **solo** | 分段執行(輪次制)| 中等任務、多步驟 | 1-3(輪流) |
429
- | **squad** | 輕量團隊(委派制)| 複雜任務、低耦合 | 2-5 |
430
- | **legion** | 重火力團隊(即時協作)| 高耦合、需即時溝通 | 2-10 |
431
- | **legacy** | 排程器模式(舊系統)| Pipeline 自動化 | N(排程器調度) |
432
-
433
- ### Formation Lead
434
-
435
- 透過 `/lead` 指令啟動 Formation Lead Agent:
436
- - 自動分析任務規模
437
- - 選擇最佳陣型
438
- - 調度 Agent 執行
439
- - 追蹤結果與回報
440
-
441
- **詳細文檔**:請參閱 [`formation/README.md`](./formation/README.md)
442
-
443
- ---
444
-
445
- ## Dashboard - Tauri 後端架構
446
-
447
- `dashboard/src-tauri/` 是 **Kenaz AI Desktop Application** 的核心服務層。
448
-
449
- ### 技術棧
450
-
451
- - **Rust + Tauri**:桌面應用框架
452
- - **Axum**:HTTP Server(Web 模式)
453
- - **Portable-Pty**:終端會話管理
454
- - **State Management**:Tauri State + Axum Shared State
455
-
456
- ### 核心功能
457
-
458
- | 功能 | 說明 |
459
- |------|------|
460
- | **Tauri Commands** | 桌面應用 IPC(前端呼叫 Rust) |
461
- | **HTTP Server** | Web 模式 API |
462
- | **PTY Server** | 終端會話管理 |
463
- | **Scheduler 協調** | Multi-Agent 排程器管理 |
464
- | **自動更新** | 應用版本檢查與安裝 |
465
-
466
- ### Feature Modules
467
-
468
- | 模組 | 路徑 | 職責 |
469
- |------|------|------|
470
- | **Script Manager** | `features/script/` | Tauri Commands |
471
- | **HTTP Server** | `features/http/` | Axum Web API |
472
- | **PTY Server** | `features/pty/` | 終端管理 |
473
- | **Scheduler** | `features/scheduler/` | 排程器協調 |
474
-
475
- **詳細文檔**:請參閱 [`dashboard/README.md`](./dashboard/README.md)
476
-
477
- ---
478
-
479
- ## CLI Tools - 開發工具集
480
-
481
- `dev/scripts/` 是 Kenaz AI 的**開發與維護工具集**,提供初始化、排程、維護三大類工具。
482
-
483
- ### 工具分類
484
-
485
- | 類別 | 工具 | 說明 |
486
- |------|------|------|
487
- | **初始化** | `INIT_PROJECT.bat` | 初始化新專案(清理 Pipeline) |
488
- | | `INIT_GIT.bat` | 初始化 Git 倉庫與配置 |
489
- | | `SETUP_RAG.bat` | 設置 RAG 引擎(kenaz-cortex) |
490
- | | `SETUP_MCP.bat` | 設置 MCP Server(Claude Code 整合) |
491
- | | `SETUP_GIT_HOOKS.bat` | 設置 Git Hooks |
492
- | **排程** | `START_DEV_AGENT.bat` | 單 Agent 開發(自我增強模式) |
493
- | | `START_MULTI_AGENT.bat` | 多 Agent 並行開發 |
494
- | | `RUN_ONCE.bat` | 單次執行(不含自我增強) |
495
- | **維護** | `check_queue.ps1` | 檢查任務佇列狀態 |
496
- | | `clean_logs.ps1` | 清理執行日誌 |
497
-
498
- ### 使用方式
499
-
500
- ```powershell
501
- # 初始化新專案(首次執行)
502
- .\dev\scripts\INIT_PROJECT.bat
503
-
504
- # 啟動單 Agent 開發
505
- .\dev\scripts\START_DEV_AGENT.bat
506
-
507
- # 啟動多 Agent 並行開發
508
- .\dev\scripts\START_MULTI_AGENT.bat
509
- ```
510
-
511
- **詳細文檔**:請參閱 [`cli-tools/README.md`](./cli-tools/README.md)
512
-
513
- ---
514
-
515
- ## Git Hooks - 自動化系統
516
-
517
- `.githooks/` 是 Kenaz AI 的 **Git Hooks 自動化系統**,透過 Git 生命週期鉤子自動執行任務。
518
-
519
- ### 核心功能
520
-
521
- | Hook | 觸發時機 | 功能 |
522
- |------|----------|------|
523
- | **post-commit** | commit 後 | RAG 引擎增量索引 |
524
- | **pre-commit** | commit 前 | 路徑鎖定檢查、代碼品質檢查 |
525
- | **post-merge** | merge 後 | RAG 索引重建 |
526
-
527
- ### 雙平台支援
528
-
529
- | 平台 | 語言 | 路徑 |
530
- |------|------|------|
531
- | **Windows** | PowerShell | `.githooks/hooks-ps1/*.ps1` |
532
- | **Unix/Linux** | Bash | `.githooks/hooks-sh/*.sh` |
533
-
534
- ### 使用方式
535
-
536
- ```powershell
537
- # 設置 Git Hooks(自動偵測平台)
538
- .\dev\scripts\SETUP_GIT_HOOKS.bat
539
-
540
- # 或手動設置
541
- git config core.hooksPath .githooks/hooks-ps1 # Windows
542
- git config core.hooksPath .githooks/hooks-sh # Unix/Linux
543
- ```
544
-
545
- ### RAG 引擎整合
546
-
547
- - **增量索引**:只索引變更的檔案(節省時間)
548
- - **自動重建**:merge 後自動重建索引(確保一致性)
549
- - **背景執行**:不阻塞 commit 流程
550
-
551
- **詳細文檔**:請參閱 [`githooks/README.md`](./githooks/README.md)
552
-
553
- ---
554
-
555
- *建立日期: 2026-02-13 | 更新: 2026-02-19 | 文檔版本: v3.1*
14
+ Retired and removed (2026-10): memory system (Synapse/Hippocampus/Cortex/Alaya), Formation unit/squad/legion dispatch (subagent dispatch only: `node .formation/tools/dispatch.js`), desktop Dashboard and Next.js frontend, `dev/pipeline/TASK_QUEUE.json` pipeline, Sunny.