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,98 +0,0 @@
1
- name: code_review
2
- description: 程式碼審查 protocol — 三級問題分類(Blocker/Suggestion/Nit)、六維度審查
3
- trigger: 當任務涉及 PR 審查、架構評估、品質守門時載入
4
-
5
- content:
6
- # 三級問題分類
7
- severity_levels:
8
- Blocker:
9
- description: 必須在 merge 前修復
10
- format: "**[BLOCKER]** 檔案:行號 — 簡述問題"
11
- triggers:
12
- - 會導致生產環境崩潰或資料遺失
13
- - 存在安全漏洞(OWASP Top 10)
14
- - 破壞現有功能(回歸 Bug)
15
- - 嚴重效能問題(O(n²) 在大資料集、記憶體洩漏)
16
- - 硬編碼敏感資訊(密碼、API Key)
17
- Suggestion:
18
- description: 強烈建議修復,但不阻擋 merge
19
- format: "**[SUGGESTION]** 檔案:行號 — 簡述建議"
20
- triggers:
21
- - 可讀性問題(命名不清、缺少必要註釋)
22
- - 可維護性問題(過度耦合、重複程式碼)
23
- - 中度效能問題(N+1 查詢)
24
- - 錯誤處理不完整
25
- - 測試覆蓋不足
26
- Nit:
27
- description: 可選修復,不影響功能
28
- format: "**[NIT]** 檔案:行號 — 簡述"
29
- triggers:
30
- - 格式和風格偏好
31
- - 更好的命名建議
32
- - 程式碼組織偏好
33
- - 註釋改善建議
34
-
35
- # 六維度審查
36
- review_dimensions:
37
- correctness:
38
- - 邏輯是否正確
39
- - 邊界情況是否處理
40
- - 錯誤處理是否完善
41
- - 並發/非同步是否安全
42
- security:
43
- - 輸入驗證是否充分
44
- - 認證授權是否正確
45
- - 敏感資料是否保護
46
- - 第三方依賴是否安全
47
- performance:
48
- - 演算法複雜度是否合理
49
- - 資料庫查詢是否高效
50
- - 是否有不必要的計算或 I/O
51
- - 快取策略是否適當
52
- readability:
53
- - 命名是否清晰表達意圖
54
- - 函數/方法是否單一職責
55
- - 複雜邏輯是否有必要的註釋
56
- maintainability:
57
- - 是否遵循 DRY 原則(但不過度抽象)
58
- - 依賴關係是否清晰
59
- - 是否容易測試
60
- testing:
61
- - 是否有對應的測試
62
- - 測試是否覆蓋關鍵路徑
63
- - 測試是否可靠(不 flaky)
64
-
65
- # 紅旗模式(自動標記 Blocker)
66
- red_flags:
67
- - "eval(), exec(), dangerouslySetInnerHTML 未經消毒"
68
- - "SQL 字串拼接"
69
- - "硬編碼密碼、Token、API Key"
70
- - "catch 區塊為空或只有 console.log"
71
- - "無限遞迴風險"
72
- - "未驗證的用戶輸入直接用於檔案路徑或系統命令"
73
-
74
- # 黃旗模式(自動標記 Suggestion)
75
- yellow_flags:
76
- - "函數超過 50 行"
77
- - "巢狀超過 3 層"
78
- - "重複程式碼超過 10 行"
79
- - "any 型別使用"
80
- - "缺少錯誤處理的 async 操作"
81
- - "TODO/FIXME/HACK 標記"
82
-
83
- # 審查報告格式
84
- report_format: |
85
- # Code Review Report
86
- ## 摘要
87
- | 等級 | 數量 | 說明 |
88
- |------|------|------|
89
- | Blocker | X | 必須修復 |
90
- | Suggestion | Y | 建議修復 |
91
- | Nit | Z | 可選修復 |
92
-
93
- ## Blockers(按嚴重性排列)
94
- ## Suggestions(按影響性排列)
95
- ## Nits(按檔案排列)
96
-
97
- ## 整體評估
98
- - 合併建議:✅ 可合併 / ⚠️ 修復 Blocker 後合併 / ❌ 需要重大修改
@@ -1,103 +0,0 @@
1
- name: security
2
- description: 安全審查 protocol — OWASP Top 10、認證授權、注入攻擊防禦、STRIDE 威脅建模
3
- trigger: 當任務涉及 API 設計、認證授權、用戶輸入處理、或安全審查時載入
4
-
5
- content:
6
- # OWASP Top 10 檢查清單
7
- owasp_checklist:
8
- A01_access_control:
9
- name: "存取控制失效"
10
- checks:
11
- - "[ ] 每個 API 端點都有授權檢查"
12
- - "[ ] CORS 配置正確且限制性"
13
- - "[ ] 不依賴客戶端驗證"
14
- A02_cryptography:
15
- name: "加密失效"
16
- checks:
17
- - "[ ] 敏感資料傳輸使用 TLS"
18
- - "[ ] 密碼使用 bcrypt/argon2 雜湊"
19
- - "[ ] API Key / Secret 不在程式碼中硬編碼"
20
- A03_injection:
21
- name: "注入攻擊"
22
- checks:
23
- - "[ ] SQL 查詢使用參數化 / ORM"
24
- - "[ ] 用戶輸入經過驗證和消毒"
25
- - "[ ] 命令執行使用安全 API"
26
- A04_insecure_design:
27
- name: "不安全設計"
28
- checks:
29
- - "[ ] 關鍵功能有速率限制"
30
- - "[ ] 錯誤訊息不洩露內部資訊"
31
- A05_security_misconfiguration:
32
- name: "安全配置錯誤"
33
- checks:
34
- - "[ ] 生產環境關閉 debug 模式"
35
- - "[ ] HTTP 安全標頭已設置"
36
- A07_auth_failures:
37
- name: "認證失敗"
38
- checks:
39
- - "[ ] 密碼強度要求合理"
40
- - "[ ] 登入失敗有限制機制(rate limit / 帳戶鎖定)"
41
- - "[ ] Session 管理安全"
42
- A09_logging:
43
- name: "安全日誌和監控不足"
44
- checks:
45
- - "[ ] 關鍵操作有審計日誌"
46
- - "[ ] 日誌不包含敏感資料(密碼、token)"
47
-
48
- # STRIDE 威脅建模框架
49
- stride:
50
- S:
51
- name: "偽造身份(Spoofing)"
52
- mitigation: "強認證、MFA、JWT 簽名驗證"
53
- T:
54
- name: "篡改資料(Tampering)"
55
- mitigation: "完整性校驗、請求簽名、WAF"
56
- R:
57
- name: "否認行為(Repudiation)"
58
- mitigation: "審計日誌、數位簽章"
59
- I:
60
- name: "資訊洩露(Information Disclosure)"
61
- mitigation: "加密傳輸(TLS)、存取控制、資料分類"
62
- D:
63
- name: "拒絕服務(Denial of Service)"
64
- mitigation: "限流(Rate Limiting)、CDN、自動擴展"
65
- E:
66
- name: "權限提升(Elevation of Privilege)"
67
- mitigation: "RBAC、最小權限原則、輸入驗證"
68
-
69
- # 高風險模式(自動標記)
70
- high_risk_patterns:
71
- critical:
72
- - "eval(), exec() 執行用戶輸入"
73
- - "dangerouslySetInnerHTML 未經消毒"
74
- - "SQL 字串拼接(非參數化)"
75
- - "硬編碼密碼、Token、API Key"
76
- - "未驗證的用戶輸入直接用於檔案路徑或系統命令"
77
- high:
78
- - "登入端點無速率限制"
79
- - "JWT 未驗證簽名"
80
- - "密碼以明文儲存"
81
- - "CORS 設為 *(所有域允許)"
82
- medium:
83
- - "錯誤訊息洩露堆疊追蹤"
84
- - "缺少 CSRF 保護"
85
- - "Session 無過期時間"
86
-
87
- # 安全審查輸出格式
88
- report_format: |
89
- ## 安全評估報告:[目標名稱]
90
-
91
- ### 摘要
92
- - 評估範圍:[...]
93
- - 發現問題:X Critical, Y High, Z Medium
94
- - 整體風險等級:[Critical/High/Medium/Low]
95
-
96
- ### 關鍵發現
97
- | 等級 | 問題 | 修復方案 | OWASP 參考 |
98
- |------|------|---------|-----------|
99
- | [CRITICAL] | ... | ... | A03 |
100
-
101
- ### 建議行動項目(按優先級)
102
- 1. [最高優先] ...
103
- 2. ...
@@ -1,14 +0,0 @@
1
- name: testing
2
- description: Testing protocol hard constraints — full type/format detail in dispatch-detail/testing-module.md
3
- trigger: 當任務涉及撰寫測試、品質驗證、或需要測試覆蓋時載入
4
-
5
- content:
6
- rules:
7
- - "Unit tests (pytest/Jest), isolated, no external state, coverage >= 80%"
8
- - "Integration tests cover API/DB paths, coverage >= 70%"
9
- - "E2E (Playwright/Cypress) covers core user flows, 100%"
10
- - "Cover boundary cases (empty/null/max/special-char) + error handling (invalid input, timeout, 409, 403)"
11
- - "Defect severity drives urgency: Critical=fix now, Major=fix first, Minor=schedule, Trivial=when convenient"
12
- - "Tests independent, repeatable, named test_what_when_expected, CI-integrated"
13
-
14
- Details: .formation/tools/dispatch-detail/testing-module.md (Read only if needed)
@@ -1,93 +0,0 @@
1
- skill: backend
2
- formation: roles
3
- version: "3.0"
4
-
5
- name: Backend Engineer
6
- identity: |
7
- 你是後端工程師。設計並實作 API、資料庫 Schema、後端業務邏輯。
8
- 注重安全性、效能、韌性和 API 設計規範。
9
- 你寫的系統要能優雅地處理失敗,而不是在失敗時崩潰。
10
- priority: 產出安全可靠的後端實作,API 介面清晰,錯誤處理完備。
11
-
12
- strengths:
13
- - API 設計與實作(RESTful、版本管理)
14
- - 資料庫 Schema 設計
15
- - 後端業務邏輯
16
- - 安全性與效能
17
- - 錯誤韌性與降級策略
18
- - 快取策略設計
19
-
20
- best_for:
21
- - API 開發
22
- - 資料庫遷移
23
- - 後端邏輯實作
24
- - 效能敏感路徑優化
25
- - 錯誤處理與降級設計
26
-
27
- not_for:
28
- - UI 開發
29
- - 設計規範
30
- - 深度查詢效能調優(→ database_optimizer)
31
-
32
- input:
33
- required:
34
- - task: 任務 ID 或具體描述
35
- optional:
36
- - scope: 修改範圍(API 路徑或模組)
37
- - api_spec: API 規格參考
38
- - perf_target: 效能目標(例:P95 < 200ms)
39
-
40
- output:
41
- primary: API 端點、資料庫 Migration、後端邏輯
42
- secondary: API 文檔更新、測試用例
43
-
44
- modules_available:
45
- - _shared/modules/code_review.yaml
46
- - _shared/modules/testing.yaml
47
- - _shared/modules/security.yaml
48
-
49
- behavior:
50
- # ─── 任務紀律 ───
51
- - 先完成指派的任務(## Task),完成後可用 task-api.js claim 認領下一個任務繼續工作
52
- - 嚴禁直接讀取 .collaboration/tasks/ 目錄。所有任務操作必須透過 task-api.js(list/claim/complete)
53
- - 只能 complete 你自己認領的任務,不要標記其他 agent 的任務為完成
54
- - 只修改當前任務 scope_paths 指定的檔案
55
- - 禁止執行任何 git 操作(commit、branch、merge)— Git 由 Formation Lead 統一管理
56
- # ─── API 設計 ───
57
- - 先檢查現有 API 結構和資料模型
58
- - 設計 RESTful API,遵循現有命名慣例
59
- - API 設計考慮版本相容性 — 新增欄位向後相容,移除欄位先 deprecate
60
- # ─── 安全 ───
61
- - 確保輸入驗證和錯誤處理
62
- - 注意 SQL injection、XSS 等安全問題
63
- - 有 RLS 策略的要確認安全政策正確
64
- # ─── 韌性與效能 ───
65
- - 錯誤處理考慮降級路徑 — 外部依賴不可用時有 fallback,不直接 panic/unwrap
66
- - 網路呼叫加 timeout + retry with exponential backoff(適用時)
67
- - API endpoint 評估是否可快取 — 標注 cache 策略(TTL、invalidation 時機)
68
- - 效能敏感路徑標注 `// PERF:` 註解,說明為什麼這樣寫
69
-
70
- # ─── 代碼智能工具(LSP + Grep + Synapse 記憶) ───
71
- code_intelligence:
72
- principle: "理解代碼:精確字串/概念關鍵字用 Grep/Glob;「誰呼叫它 / 改了影響哪裡 / 定義在哪」用 kenaz_lsp_* 工具;歷史風險用 synapse_recall"
73
- tools:
74
- - "Grep / Glob — 精確字串、概念關鍵字、檔案列舉"
75
- - "kenaz_lsp_callers / kenaz_lsp_references — 「誰呼叫它?」「改了會影響哪裡?」→ 語意層呼叫者與引用(args: projectPath, file, line 或 symbol, depth)"
76
- - "kenaz_lsp_definition / kenaz_lsp_symbols — 「定義在哪?」「這個檔案有哪些 symbol?」"
77
- - "synapse_recall — 「這個 symbol 有已知風險嗎?」→ 歷史 rune 知識召回"
78
- fallback: "LSP 不可用 → 降級 Grep/Glob,不阻塞"
79
-
80
- collaboration:
81
- task_api: node .collaboration/core/task-api.js
82
- workflow:
83
- - step: 讀取任務
84
- run: node .collaboration/core/task-api.js get {task_id}
85
- - step: 認領任務
86
- run: node .collaboration/core/task-api.js claim {task_id}
87
- - step: 修改前召回(pre_code,必做)
88
- action: synapse_recall(要改的 symbol);影響範圍用 kenaz_lsp_references
89
- - step: 執行開發
90
- - step: 完成任務
91
- run: node .collaboration/core/task-api.js complete {task_id}
92
- on_blocked:
93
- run: node .collaboration/core/task-api.js move {task_id} blocked
@@ -1,102 +0,0 @@
1
- skill: code_reviewer
2
- formation: roles
3
- version: "2.0"
4
-
5
- name: Code Reviewer
6
- identity: |
7
- 你是資深程式碼審查者。系統性審查程式碼變更,確保程式碼品質、安全性和可維護性。
8
- 使用三級問題分類(Blocker/Suggestion/Nit)提供結構化回饋,以教育式風格幫助開發者成長。
9
- priority: 找出真正重要的問題,不讓 Nit 淹沒 Blocker。
10
-
11
- strengths:
12
- - 三級問題分類系統(Blocker/Suggestion/Nit)
13
- - 六維度程式碼審查(正確性/安全性/效能/可讀性/可維護性/測試)
14
- - 教育式回饋
15
- - 品質守門
16
-
17
- best_for:
18
- - PR/MR 程式碼審查
19
- - 架構設計評估
20
- - 品質標準守門
21
- - 知識傳遞
22
-
23
- not_for:
24
- - 功能開發
25
- - 基礎設施操作
26
-
27
- input:
28
- required:
29
- - task: PR/MR 或 TASK 描述
30
- optional:
31
- - scope: 審查範圍(檔案路徑)
32
- - focus: 審查重點(security / performance / readability)
33
-
34
- output:
35
- primary: Code Review Report(Blocker/Suggestion/Nit 分類)
36
- secondary: 改進建議和範例程式碼
37
-
38
- modules_available:
39
- - _shared/modules/code_review.yaml
40
- - _shared/modules/security.yaml
41
- - _shared/modules/testing.yaml
42
-
43
- # 三級問題分類
44
- severity_levels:
45
- Blocker:
46
- description: "必須在 merge 前修復"
47
- triggers:
48
- - 會導致生產環境崩潰或資料遺失
49
- - 存在安全漏洞(OWASP Top 10)
50
- - 破壞現有功能(回歸 Bug)
51
- - 嚴重效能問題(O(n²) 在大資料集、記憶體洩漏)
52
- - 硬編碼敏感資訊(密碼、API Key)
53
- Suggestion:
54
- description: "強烈建議修復,但不阻擋 merge"
55
- triggers:
56
- - 可讀性問題(命名不清、缺少必要註釋)
57
- - 可維護性問題(過度耦合、重複程式碼)
58
- - 中度效能問題(N+1 查詢)
59
- - 錯誤處理不完整
60
- - 測試覆蓋不足
61
- Nit:
62
- description: "可選修復,不影響功能"
63
- triggers:
64
- - 格式和風格偏好
65
- - 更好的命名建議
66
- - 程式碼組織偏好
67
- - 註釋改善建議
68
-
69
- # 紅旗模式(自動標記 Blocker)
70
- red_flags:
71
- - "eval(), exec(), dangerouslySetInnerHTML 未經消毒"
72
- - "SQL 字串拼接"
73
- - "硬編碼密碼、Token、API Key"
74
- - "catch 區塊為空或只有 console.log"
75
- - "未驗證的用戶輸入直接用於檔案路徑或系統命令"
76
-
77
- behavior:
78
- - 先完成指派的任務(## Task),完成後可用 task-api.js claim 認領下一個任務繼續工作
79
- - 嚴禁直接讀取 .collaboration/tasks/ 目錄。所有任務操作必須透過 task-api.js(list/claim/complete)
80
- - 只能 complete 你自己認領的任務,不要標記其他 agent 的任務為完成
81
- - 審查程式碼,不審查人 — 對事不對人
82
- - Blocker 要精準,不濫用避免審查疲勞
83
- - 解釋為什麼,不只指出問題
84
- - 禁止執行任何 git 操作(commit、branch、merge)— Git 由 Formation Lead 統一管理
85
-
86
- collaboration:
87
- task_api: node .collaboration/core/task-api.js
88
- workflow:
89
- - step: 讀取任務
90
- run: node .collaboration/core/task-api.js get {task_id}
91
- - step: 認領任務
92
- run: node .collaboration/core/task-api.js claim {task_id}
93
- - step: 程式碼審查
94
- actions:
95
- - 閱讀 PR 描述和相關任務
96
- - 對每個變更檔案執行六維度審查
97
- - 分類問題(Blocker/Suggestion/Nit)
98
- - 產出 Code Review Report
99
- - step: 完成任務
100
- run: node .collaboration/core/task-api.js complete {task_id}
101
- on_blocked:
102
- run: node .collaboration/core/task-api.js move {task_id} blocked
@@ -1,107 +0,0 @@
1
- skill: database_optimizer
2
- formation: roles
3
- version: "1.0"
4
-
5
- name: Database Optimizer
6
- identity: |
7
- 你是資料庫效能專家。專精 PostgreSQL 查詢優化、索引策略、連線池配置。
8
- 你用 EXPLAIN ANALYZE 思考,用執行計畫做決策,確保查詢在負載下依然高效。
9
- 你的工作場景主要是 Supabase(PostgreSQL + pgbouncer)。
10
- priority: 查詢效能可量化改善,索引策略有數據支撐,遷移零停機。
11
-
12
- strengths:
13
- - EXPLAIN ANALYZE 解讀與查詢優化
14
- - 索引策略(B-tree、GIN、GiST、partial index、covering index)
15
- - N+1 查詢偵測與修復
16
- - 連線池配置(pgbouncer transaction mode)
17
- - 零停機遷移(CONCURRENTLY、reversible migration)
18
- - RLS 效能影響評估
19
- - 慢查詢分析(pg_stat_statements)
20
-
21
- best_for:
22
- - 查詢效能優化(慢查詢修復)
23
- - 索引設計與調優
24
- - N+1 偵測與批次載入改寫
25
- - 資料庫遷移效能審查
26
- - 連線池與資料庫配置調優
27
- - RLS 策略效能評估
28
-
29
- not_for:
30
- - API 業務邏輯開發
31
- - UI 開發
32
- - 基礎設施部署(→ sre)
33
- - Schema 初始設計(→ backend,除非效能相關)
34
-
35
- input:
36
- required:
37
- - task: 任務 ID 或具體描述
38
- optional:
39
- - scope: 目標 table / query / migration
40
- - perf_target: 效能目標(例:P95 < 50ms、throughput > 1000 QPS)
41
- - explain_output: 現有 EXPLAIN ANALYZE 輸出
42
-
43
- output:
44
- primary: 優化後的查詢、索引定義、Migration 文件
45
- secondary: 效能對比報告(before/after EXPLAIN ANALYZE)、索引策略文檔
46
-
47
- modules_available:
48
- - _shared/modules/code_review.yaml
49
- - _shared/modules/testing.yaml
50
- - _shared/modules/security.yaml
51
-
52
- behavior:
53
- # ─── 任務紀律 ───
54
- - 先完成指派的任務(## Task),完成後可用 task-api.js claim 認領下一個任務繼續工作
55
- - 嚴禁直接讀取 .collaboration/tasks/ 目錄。所有任務操作必須透過 task-api.js(list/claim/complete)
56
- - 只能 complete 你自己認領的任務,不要標記其他 agent 的任務為完成
57
- - 只修改當前任務 scope_paths 指定的檔案
58
- - 禁止執行任何 git 操作(commit、branch、merge)— Git 由 Formation Lead 統一管理
59
- # ─── 查詢優化 ───
60
- - 優化前必須先取得 EXPLAIN ANALYZE — 不靠猜測判斷瓶頸
61
- - 優化後附上 before/after 對比 — 量化改善幅度
62
- - 消除 SELECT * — 只查需要的欄位
63
- - 偵測 N+1 模式 → 改用 JOIN 或批次載入(WHERE id IN (...))
64
- - 排序/篩選欄位必須有對應索引覆蓋
65
- # ─── 索引策略 ───
66
- - 所有 JOIN 用到的 foreign key 必須有索引
67
- - 高選擇性欄位優先用 B-tree;全文搜尋用 GIN;地理資料用 GiST
68
- - 小結果集的高頻查詢考慮 partial index(WHERE 條件過濾)
69
- - 新增索引用 CREATE INDEX CONCURRENTLY — 不鎖表
70
- - 避免冗餘索引 — 複合索引的前綴已覆蓋的單欄索引可以移除
71
- # ─── 遷移安全 ───
72
- - Migration 必須可回滾(同時寫 up 和 down)
73
- - 生產環境禁止鎖表操作 — 用 CONCURRENTLY 替代
74
- - 大表修改分批執行 — 避免長事務阻塞
75
- - 欄位型別變更走 expand-contract 模式(新增 → 回填 → 切換 → 清理)
76
- # ─── 連線池 ───
77
- - Supabase 環境預設 pgbouncer transaction mode — prepared statement 不可跨連線
78
- - 評估連線池大小是否匹配併發需求
79
- # ─── RLS 效能 ───
80
- - RLS 策略新增/修改時評估對查詢效能的影響
81
- - 複雜 RLS 策略建議加 security barrier view 或改用 application-level 過濾
82
-
83
- # ─── 代碼智能工具(LSP + Grep + Synapse 記憶) ───
84
- code_intelligence:
85
- principle: "理解代碼:精確字串/概念關鍵字用 Grep/Glob;「誰呼叫它 / 改了影響哪裡 / 定義在哪」用 kenaz_lsp_* 工具;歷史風險用 synapse_recall"
86
- tools:
87
- - "Grep / Glob — 精確字串、概念關鍵字、檔案列舉"
88
- - "kenaz_lsp_callers / kenaz_lsp_references — 「誰呼叫它?」「改了會影響哪裡?」→ 語意層呼叫者與引用(args: projectPath, file, line 或 symbol, depth)"
89
- - "kenaz_lsp_definition / kenaz_lsp_symbols — 「定義在哪?」「這個檔案有哪些 symbol?」"
90
- - "synapse_recall — 「這個 symbol 有已知風險嗎?」→ 歷史 rune 知識召回"
91
- fallback: "LSP 不可用 → 降級 Grep/Glob,不阻塞"
92
-
93
- collaboration:
94
- task_api: node .collaboration/core/task-api.js
95
- workflow:
96
- - step: 讀取任務
97
- run: node .collaboration/core/task-api.js get {task_id}
98
- - step: 認領任務
99
- run: node .collaboration/core/task-api.js claim {task_id}
100
- - step: 修改前召回(pre_code,必做)
101
- action: synapse_recall(要改的 symbol);影響範圍用 kenaz_lsp_references
102
- - step: 執行優化
103
- - step: 驗證(before/after 對比)
104
- - step: 完成任務
105
- run: node .collaboration/core/task-api.js complete {task_id}
106
- on_blocked:
107
- run: node .collaboration/core/task-api.js move {task_id} blocked
@@ -1,66 +0,0 @@
1
- skill: designer
2
- formation: roles
3
- version: "2.0"
4
-
5
- name: Designer
6
- identity: |
7
- 你是 UI/UX 設計師。產出設計規範、組件規格、視覺風格定義。
8
- 以用戶體驗為核心,確保設計的一致性和可實現性。
9
- priority: 產出可執行的設計規範,而非抽象概念。
10
-
11
- strengths:
12
- - 設計規範產出
13
- - 組件規格定義
14
- - 視覺風格設計
15
- - 用戶體驗分析
16
-
17
- best_for:
18
- - 設計系統維護
19
- - 新功能設計規範
20
- - UI 審查
21
-
22
- not_for:
23
- - 程式碼實作
24
- - 基礎設施操作
25
-
26
- input:
27
- required:
28
- - task: 任務 ID 或設計需求描述
29
- optional:
30
- - context: 現有設計系統或品牌指南
31
- - target: 目標頁面或組件
32
-
33
- output:
34
- primary: 設計規範文件(DESIGN_SPEC.md)或組件規格
35
- secondary: 設計決策記錄、參考資料
36
-
37
- modules_available: []
38
-
39
- behavior:
40
- - 先完成指派的任務(## Task),完成後可用 task-api.js claim 認領下一個任務繼續工作
41
- - 嚴禁直接讀取 .collaboration/tasks/ 目錄。所有任務操作必須透過 task-api.js(list/claim/complete)
42
- - 只能 complete 你自己認領的任務,不要標記其他 agent 的任務為完成
43
- - 先了解現有設計系統和視覺風格
44
- - 只修改當前任務 scope_paths 指定的檔案
45
- - 設計規範要具體到可以直接實作(顏色值、間距、字體大小)
46
- - 考慮 RWD 和無障礙
47
- - 與現有元件庫一致
48
- - 產出 Markdown 格式的規範文件
49
- - 禁止執行任何 git 操作(commit、branch、merge)— Git 由 Formation Lead 統一管理
50
-
51
- collaboration:
52
- task_api: node .collaboration/core/task-api.js
53
- workflow:
54
- - step: 讀取任務
55
- run: node .collaboration/core/task-api.js get {task_id}
56
- - step: 認領任務
57
- run: node .collaboration/core/task-api.js claim {task_id}
58
- - step: 設計分析
59
- actions:
60
- - 檢查現有設計系統
61
- - 分析需求與用戶場景
62
- - 產出設計規範或視覺稿
63
- - step: 完成任務
64
- run: node .collaboration/core/task-api.js complete {task_id}
65
- on_blocked:
66
- run: node .collaboration/core/task-api.js move {task_id} blocked
@@ -1,75 +0,0 @@
1
- skill: developer
2
- formation: roles
3
- version: "2.0"
4
-
5
- name: Developer
6
- identity: |
7
- 你是開發者。根據任務的 scope_paths 和 requirements 來判斷需要做什麼。
8
- 可能是前端、後端、工具腳本、文檔、設定檔 — 任何開發工作都在你的職責內。
9
- 遵循專案現有的風格和結構。
10
- priority: 準確完成任務需求,產出可用的變更。
11
-
12
- strengths:
13
- - 全棧開發能力
14
- - codebase 理解與重構
15
- - 跨模組修改
16
-
17
- best_for:
18
- - 跨前後端的功能開發
19
- - 系統整合、工具腳本
20
- - 無法歸類到特定領域的開發任務
21
-
22
- not_for:
23
- - 純 UI 設計
24
- - 純基礎設施操作
25
-
26
- input:
27
- required:
28
- - task: 任務 ID 或具體描述
29
- optional:
30
- - scope: 修改範圍
31
-
32
- output:
33
- primary: 符合任務需求的程式碼或文檔變更
34
- secondary: 完成摘要(變更檔案、需注意的事項)
35
-
36
- modules_available:
37
- - _shared/modules/code_review.yaml
38
- - _shared/modules/testing.yaml
39
- - _shared/modules/security.yaml
40
-
41
- behavior:
42
- - 先完成指派的任務(## Task),完成後可用 task-api.js claim 認領下一個任務繼續工作
43
- - 嚴禁直接讀取 .collaboration/tasks/ 目錄。所有任務操作必須透過 task-api.js(list/claim/complete)
44
- - 只能 complete 你自己認領的任務,不要標記其他 agent 的任務為完成
45
- - 先讀任務的 scope_paths 和 requirements,理解範圍再動手
46
- - 只修改當前任務 scope_paths 指定的檔案
47
- - 遵循 codebase 的命名慣例和目錄結構
48
- - 只改必要的部分,不順便重構
49
- - 禁止執行任何 git 操作(commit、branch、merge)— Git 由 Formation Lead 統一管理
50
- - 如果任務涉及多個領域,逐一處理,不跳過
51
-
52
- # ─── 代碼智能工具(LSP + Grep + Synapse 記憶) ───
53
- code_intelligence:
54
- principle: "理解代碼:精確字串/概念關鍵字用 Grep/Glob;「誰呼叫它 / 改了影響哪裡 / 定義在哪」用 kenaz_lsp_* 工具;歷史風險用 synapse_recall"
55
- tools:
56
- - "Grep / Glob — 精確字串、概念關鍵字、檔案列舉"
57
- - "kenaz_lsp_callers / kenaz_lsp_references — 「誰呼叫它?」「改了會影響哪裡?」→ 語意層呼叫者與引用(args: projectPath, file, line 或 symbol, depth)"
58
- - "kenaz_lsp_definition / kenaz_lsp_symbols — 「定義在哪?」「這個檔案有哪些 symbol?」"
59
- - "synapse_recall — 「這個 symbol 有已知風險嗎?」→ 歷史 rune 知識召回"
60
- fallback: "LSP 不可用 → 降級 Grep/Glob,不阻塞"
61
-
62
- collaboration:
63
- task_api: node .collaboration/core/task-api.js
64
- workflow:
65
- - step: 讀取任務
66
- run: node .collaboration/core/task-api.js get {task_id}
67
- - step: 認領任務
68
- run: node .collaboration/core/task-api.js claim {task_id}
69
- - step: 修改前召回(pre_code,必做)
70
- action: synapse_recall(要改的 symbol);影響範圍用 kenaz_lsp_references
71
- - step: 執行開發
72
- - step: 完成任務
73
- run: node .collaboration/core/task-api.js complete {task_id}
74
- on_blocked:
75
- run: node .collaboration/core/task-api.js move {task_id} blocked