kenaz 0.3.22 → 0.3.23

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 (465) hide show
  1. package/core/.claude/hooks/_user-scope.js +1 -1
  2. package/core/.claude/hooks/core-resolve.js +1 -1
  3. package/core/.claude/hooks/worktree-create.js +6 -6
  4. package/core/.claude/hooks/worktree-remove.js +4 -4
  5. package/core/.collaboration/core/reconcile.js +16 -1
  6. package/core/.collaboration/core/task-2467-lifecycle.test.js +63 -0
  7. package/core/.collaboration/core/task-api.js +37 -7
  8. package/core/.formation/bifrost/launch.js +1 -1
  9. package/core/.formation/tools/kenaz-stats.js +1 -1
  10. package/core/.formation/tools/post-complete/git-merge.js +1 -1
  11. package/core/.formation/tools/prompt.js +1 -1
  12. package/core/.kenaz/specialist/ansuz_rules.yaml +7 -51
  13. package/core/.kenaz/specialist/ansuz_session_handoff.schema.json +2 -6
  14. package/core/.rule/general/project-self-containment.yaml +2 -2
  15. package/core/.specialist/Amelia/README.md +1 -1
  16. package/core/.specialist/Amelia/rule.yaml +1 -1
  17. package/core/.specialist/Ansuz/RULES.md +1 -1
  18. package/core/.specialist/Ansuz/concepts/commitment_layer.yaml +1 -1
  19. package/core/.specialist/Ansuz/concepts/evolvable_guardrails.yaml +1 -1
  20. package/core/.specialist/Ansuz/knowledge.yaml +1 -3
  21. package/core/.specialist/tools/__tests__/task-2409-lessons.test.js +10 -0
  22. package/core/.specialist/tools/__tests__/task-2427-harvest.test.js +25 -0
  23. package/core/.specialist/tools/ansuz-boot-fast.js +1 -1
  24. package/core/.specialist/tools/failure-detector.js +4 -4
  25. package/core/.specialist/tools/handoff-doc.js +1 -1
  26. package/core/.specialist/tools/lessons.js +2 -2
  27. package/core/CLAUDE.md +5 -5
  28. package/core/KENAZ_CORE_VERSION +1 -1
  29. package/core/dashboard/scripts/install-kenaz-cli.js +21 -6
  30. package/core/dev/scripts/check-file-size.js +1 -1
  31. package/core/dev/scripts/ci-feedback.js +1 -1
  32. package/core/dev/scripts/gc-agent-worktrees.js +11 -11
  33. package/core/dev/scripts/kenaz-session.js +3 -3
  34. package/core/dev/scripts/peer-identity-e2e.js +3 -3
  35. package/core/dev/scripts/run-rust-tests.js +2 -2
  36. package/core/dev/scripts/skill-routing-replay.js +3 -3
  37. package/core/dev/scripts/task1961/selftest.js +2 -2
  38. package/core/dev/scripts/windows-hide-guard.test.js +97 -0
  39. package/core/plugins/kenaz/guidance.md +1 -0
  40. package/core/plugins/kenaz/hooks/core-resolve.js +1 -1
  41. package/core/plugins/kenaz/hooks/kenaz-hook.js +52 -4
  42. package/core/plugins/kenaz/scripts/kenaz.test.js +72 -5
  43. package/lib/cli.js +9 -5
  44. package/package.json +6 -6
  45. package/vendor/install-kenaz-cli.js +21 -6
  46. package/core/.kenaz/designs/METAPLASTICITY_CONFIDENCE_DESIGN.md +0 -537
  47. package/core/.kenaz/designs/REFLEX_INITIATOR_DESIGN.md +0 -501
  48. package/core/.kenaz/designs/TASK_1385_handoff_mcp_design.md +0 -426
  49. package/core/.kenaz/designs/TASK_932_hippocampus_consolidation.md +0 -103
  50. package/core/.kenaz/designs/TASK_934_efe_signal_engine.md +0 -97
  51. package/core/.kenaz/designs/TASK_935_self_evolution_framework.md +0 -154
  52. package/core/.kenaz/designs/VISION_cognitive_architecture_roadmap.md +0 -159
  53. package/core/.kenaz/designs/metaplasticity_simulation_results.json +0 -696
  54. package/core/.kenaz/main-memory/README.md +0 -230
  55. package/core/.kenaz/main-memory/kenaz/cortex/001_cortex_overview.md +0 -168
  56. package/core/.kenaz/main-memory/kenaz/cortex/001_rag_engine_overview.md +0 -30
  57. package/core/.kenaz/main-memory/kenaz/memory-system/001_three_tier_architecture.md +0 -361
  58. package/core/.kenaz/main-memory/kenaz/pipeline/001_task_execution_flow.md +0 -117
  59. package/core/.kenaz/main-memory/kenaz/pipeline/001_task_granularity.md +0 -154
  60. package/core/.kenaz/main-memory/kenaz/pipeline/002_team_priority.md +0 -51
  61. package/core/.kenaz/main-memory/kenaz/pipeline/003_feature_id_system.md +0 -46
  62. package/core/.kenaz/main-memory/kenaz/rules/001_gen_007_self_containment.md +0 -108
  63. package/core/.kenaz/main-memory/kenaz/rules/001_rule_priority_system.md +0 -121
  64. package/core/.kenaz/main-memory/kenaz/rules/002_agt_006_pre_check.md +0 -0
  65. package/core/.kenaz/main-memory/kenaz/rules/003_ppl_002_task_archival.md +0 -48
  66. package/core/.kenaz/main-memory/kenaz/system/001_dual_track_task_system.md +0 -197
  67. package/core/.kenaz/main-memory/knowledge/patterns/001_json_bom_issue.md +0 -78
  68. package/core/.kenaz/main-memory/knowledge/patterns/001_leader_worker_pattern.md +0 -0
  69. package/core/.kenaz/main-memory/knowledge/patterns/002_scope_path_conflict.md +0 -115
  70. package/core/.kenaz/main-memory/knowledge/patterns/002_task_dependency_resolution.md +0 -223
  71. package/core/.kenaz/main-memory/knowledge/patterns/003_question_protocol.md +0 -242
  72. package/core/.kenaz/main-memory/knowledge/patterns/004_user_insight_value.md +0 -111
  73. package/core/.kenaz/main-memory/knowledge/patterns/005_file_lock_pattern.md +0 -274
  74. package/core/.kenaz/main-memory/knowledge/references/001_ppl_rules.md +0 -28
  75. package/core/.kenaz/main-memory/knowledge/solutions/001_json_bom_issue.md +0 -137
  76. package/core/.kenaz/main-memory/knowledge/solutions/001_team_invocation.md +0 -0
  77. package/core/.kenaz/main-memory/knowledge/solutions/002_passive_monitoring.md +0 -0
  78. package/core/.kenaz/main-memory/knowledge/solutions/003_windows_file_race_condition.md +0 -239
  79. package/core/.kenaz/main-memory/registry.json +0 -326
  80. package/core/.kenaz/main-memory/version.yaml +0 -58
  81. package/core/.kenaz/specialist/memory_guard_fired.json +0 -1
  82. package/core/.kenaz/specialist/memory_guard_trigger_cache.json +0 -1
  83. package/core/.kenaz/specialist/memory_source_priority.yaml +0 -260
  84. package/core/.kenaz/specialist/prompt_1775.txt +0 -317
  85. package/core/.kenaz/specialist/prompt_1776.txt +0 -326
  86. package/core/.kenaz/specialist/prompt_1791.txt +0 -320
  87. package/core/.kenaz/specialist/prompt_1792.txt +0 -320
  88. package/core/.kenaz/specialist/prompt_1795.txt +0 -281
  89. package/core/.kenaz/specialist/prompt_1813.txt +0 -332
  90. package/core/.kenaz/specialist/prompt_1814.txt +0 -401
  91. package/core/.kenaz/specialist/prompt_1815.txt +0 -394
  92. package/core/.kenaz/specialist/prompt_1816.txt +0 -437
  93. package/core/.kenaz/specialist/prompt_1818.txt +0 -361
  94. package/core/.kenaz/specialist/prompt_1819.txt +0 -421
  95. package/core/.kenaz/specialist/prompt_1821.txt +0 -345
  96. package/core/.kenaz/specialist/prompt_1822.txt +0 -313
  97. package/core/.kenaz/specialist/prompt_1824.txt +0 -348
  98. package/core/.kenaz/specialist/prompt_1826.txt +0 -388
  99. package/core/.kenaz/specialist/rune_efe_salience_gap.md +0 -21
  100. package/core/.kenaz/specialist/task1825_update.json +0 -43
  101. package/core/.kenaz/specialist/taskgen/consolidation_i.json +0 -38
  102. package/core/.kenaz/specialist/taskgen/csharp_a.json +0 -44
  103. package/core/.kenaz/specialist/taskgen/csharp_b.json +0 -40
  104. package/core/.kenaz/specialist/taskgen/embedding_e.json +0 -34
  105. package/core/.kenaz/specialist/taskgen/hygiene_fg.json +0 -39
  106. package/core/.kenaz/specialist/taskgen/pathology_h.json +0 -36
  107. package/core/.kenaz/specialist/taskgen/unity_noise_d.json +0 -38
  108. package/core/.kenaz/specialist/taskgen/visibility_c.json +0 -38
  109. package/core/.specialist/Ansuz/decisions/ADR-requirement-graph-layer.md +0 -390
  110. package/core/.specialist/Ansuz/self_model_seed.backup.json +0 -100
  111. package/core/.specialist/ansuz_session_handoff.json +0 -96
  112. package/core/dev/ALAYA_FIELD_FEEDBACK_DESIGN.md +0 -126
  113. package/core/dev/ANSUZ_SCAFFOLD_DIET_2026-09-20.md +0 -231
  114. package/core/dev/ANSUZ_STARTUP_INJECTION_REVIEW.md +0 -355
  115. package/core/dev/ANSUZ_WORKFLOW_MODERNIZATION.md +0 -143
  116. package/core/dev/CORTEX_META_GRAPH_ASSESSMENT.md +0 -99
  117. package/core/dev/FREYA_DOWNSTREAM_BUGS_2026-09-19.md +0 -44
  118. package/core/dev/GLOBAL_MEMORY_IDENTITY_CONSOLIDATION.md +0 -263
  119. package/core/dev/GUARD_EFFECTIVENESS_DESIGN.md +0 -180
  120. package/core/dev/HEALTH_GATE_VARIANCE_ASSESSMENT.md +0 -271
  121. package/core/dev/HOOK_DIET_2026-09-21.md +0 -126
  122. package/core/dev/JEV_INTEGRATION_PLAN.md +0 -189
  123. package/core/dev/KENAZ_AGENT_CONNECT_v1_SPEC.md +0 -139
  124. package/core/dev/MOBILE_DESIGN_SPEC.md +0 -569
  125. package/core/dev/MULTI_ANSUZ_SPEC.md +0 -136
  126. package/core/dev/MUNINN_RETIREMENT.md +0 -115
  127. package/core/dev/PHASE3_ATTRIBUTION_POPULATION_DIAGNOSIS.md +0 -211
  128. package/core/dev/PHASE3_P3-2B_TASKLEVEL_PROBE.md +0 -83
  129. package/core/dev/PHASE3_P3-2_POPULATION_DISJOINTNESS.md +0 -83
  130. package/core/dev/PHASE3_P3-2_REMEASURE_REPORT.md +0 -231
  131. package/core/dev/PREDICTION_GROUNDING_DESIGN.md +0 -376
  132. package/core/dev/PRODUCT_SPEC.md +0 -317
  133. package/core/dev/PROJECT_REGISTRY_DUPLICATE_ASSESSMENT.md +0 -86
  134. package/core/dev/STARTUP_TIMELINE_TASK_1995.md +0 -181
  135. package/core/dev/SYNAPSE_WORKER_PER_PROJECT.md +0 -881
  136. package/core/dev/TASK_1680_P3-3_DISPATCH_SPEC.md +0 -96
  137. package/core/dev/TASK_1684_CALIBRATION_IMPACT_ANALYSIS.md +0 -170
  138. package/core/dev/TASK_1684_FORK_A_GOODHART_DESIGN.md +0 -171
  139. package/core/dev/TASK_1684_P3_2_REMEASURE_VALIDATION.md +0 -262
  140. package/core/dev/TASK_1903_SIGNAL_AUC_MEASUREMENT.md +0 -207
  141. package/core/dev/TASK_1904_BRANCH_INTEGRITY_AUDIT.md +0 -146
  142. package/core/dev/ansuz-eval/README.md +0 -38
  143. package/core/dev/ansuz-eval/build-fixtures.js +0 -87
  144. package/core/dev/ansuz-eval/grade.js +0 -96
  145. package/core/dev/ansuz-eval/grader.test.js +0 -117
  146. package/core/dev/ansuz-eval/tasks.md +0 -32
  147. package/core/dev/archive/ansuz/BOOT_FULL.md +0 -141
  148. package/core/dev/archive/ansuz/agents/ansuz-boot.md +0 -176
  149. package/core/dev/archive/ansuz/designs/alaya-passive-surfacing.md +0 -84
  150. package/core/dev/archive/ansuz/designs/cc_memory_indexing.md +0 -307
  151. package/core/dev/archive/ansuz/designs/check_guard.md +0 -322
  152. package/core/dev/archive/ansuz/designs/consequence_loop.md +0 -227
  153. package/core/dev/archive/ansuz/designs/mcp_kuzudb_lock_architecture.md +0 -312
  154. package/core/dev/archive/ansuz/designs/phase0_git_enrichment.md +0 -278
  155. package/core/dev/archive/ansuz/designs/refactor_mcp_tools_synapse.md +0 -490
  156. package/core/dev/archive/ansuz/designs/semantic_markdown_extraction.md +0 -167
  157. package/core/dev/archive/ansuz/designs/task_1372_prompt_injects_into.md +0 -193
  158. package/core/dev/archive/ansuz/designs/thought_stack.md +0 -286
  159. package/core/dev/archive/ansuz/investigations/reachability_unified_api_2026-04-11.md +0 -330
  160. package/core/dev/archive/ansuz/investigations/synapse_orphans_indexing_bug_2026-04-11.md +0 -352
  161. package/core/dev/archive/ansuz/investigations/synapse_orphans_reindex_verification_2026-04-11.md +0 -48
  162. package/core/dev/archive/ansuz/investigations/synapse_orphans_verification_2026-04-11.md +0 -170
  163. package/core/dev/archive/ansuz/legacy/kernel.yaml +0 -399
  164. package/core/dev/archive/ansuz/legacy/phases/phase_0.yaml +0 -418
  165. package/core/dev/archive/ansuz/legacy/phases/phase_1.yaml +0 -376
  166. package/core/dev/archive/ansuz/legacy/phases/phase_10.yaml +0 -35
  167. package/core/dev/archive/ansuz/legacy/phases/phase_11.yaml +0 -582
  168. package/core/dev/archive/ansuz/legacy/phases/phase_2.yaml +0 -94
  169. package/core/dev/archive/ansuz/legacy/phases/phase_3.yaml +0 -274
  170. package/core/dev/archive/ansuz/legacy/phases/phase_4.yaml +0 -67
  171. package/core/dev/archive/ansuz/legacy/phases/phase_5.yaml +0 -32
  172. package/core/dev/archive/ansuz/legacy/phases/phase_6.yaml +0 -91
  173. package/core/dev/archive/ansuz/legacy/phases/phase_7.yaml +0 -58
  174. package/core/dev/archive/ansuz/legacy/phases/phase_8.yaml +0 -146
  175. package/core/dev/archive/ansuz/legacy/phases/phase_9.yaml +0 -424
  176. package/core/dev/archive/ansuz/specs/INDEX_bifrost_hook_parity.yaml +0 -92
  177. package/core/dev/archive/ansuz/specs/active-inference-formation.yaml +0 -453
  178. package/core/dev/archive/ansuz/specs/brief_TASK_1228_userpromptsubmit.yaml +0 -191
  179. package/core/dev/archive/ansuz/specs/brief_TASK_1229_pretooluse_posttooluse.yaml +0 -250
  180. package/core/dev/archive/ansuz/specs/brief_TASK_1230_sessionstart_stop.yaml +0 -301
  181. package/core/dev/archive/ansuz/specs/brief_TASK_1231_verification.yaml +0 -272
  182. package/core/dev/archive/skills/feature_agent/SKILL.md +0 -289
  183. package/core/dev/design/PHASE4_DESIGN.md +0 -559
  184. package/core/dev/design/dashboard_docs_integration_PLAN.md +0 -388
  185. package/core/dev/design/matrix_format_ABBREVIATIONS.md +0 -655
  186. package/core/dev/design/matrix_format_DESIGN_SPEC.md +0 -601
  187. package/core/dev/design/matrix_format_DISCUSSION_SUMMARY.md +0 -484
  188. package/core/dev/design/matrix_format_EXAMPLE_memory.matrix +0 -13
  189. package/core/dev/design/matrix_format_EXAMPLE_project_status.matrix +0 -9
  190. package/core/dev/design/matrix_format_EXAMPLE_tasks.matrix +0 -14
  191. package/core/dev/design/matrix_format_SYNTAX_BNF.md +0 -754
  192. package/core/dev/design/matrix_format_TOKEN_COMPARISON.md +0 -484
  193. package/core/dev/design/matrix_v2_COGNITIVE_DESIGN.md +0 -503
  194. package/core/dev/design/matrix_v2_DISCUSSION_SUMMARY.md +0 -414
  195. package/core/dev/design/matrix_v2_EXAMPLE.matrix +0 -67
  196. package/core/dev/designs/EXPANDABLE_CARD_DESIGN_SPEC.md +0 -509
  197. package/core/dev/jev-eval/ACTIVE_CORRECTION.md +0 -52
  198. package/core/dev/jev-eval/ANNOTATION_GUIDE.md +0 -68
  199. package/core/dev/jev-eval/BASELINE_COMPARISON.md +0 -45
  200. package/core/dev/jev-eval/CONTEXT_REVIEW.md +0 -31
  201. package/core/dev/jev-eval/EVALUATION_STATUS.md +0 -39
  202. package/core/dev/jev-eval/HISTORICAL_CORPUS.md +0 -33
  203. package/core/dev/jev-eval/PACKAGING_VERIFICATION.md +0 -42
  204. package/core/dev/jev-eval/README.md +0 -101
  205. package/core/dev/jev-eval/THALAMUS_RANKING.md +0 -58
  206. package/core/dev/jev-eval/VALIDATION_PROGRESS.md +0 -54
  207. package/core/dev/jev-eval/cli.mjs +0 -50
  208. package/core/dev/jev-eval/context.mjs +0 -183
  209. package/core/dev/jev-eval/corpus.mjs +0 -186
  210. package/core/dev/jev-eval/fixtures/conversation-review.seed.jsonl +0 -6
  211. package/core/dev/jev-eval/fixtures/synthetic.jsonl +0 -11
  212. package/core/dev/jev-eval/metrics.mjs +0 -67
  213. package/core/dev/jev-eval/muninn-baseline.mjs +0 -119
  214. package/core/dev/jev-eval/providers.mjs +0 -95
  215. package/core/dev/jev-eval/reports/annotation-pilot-2026-09-20.json +0 -32
  216. package/core/dev/jev-eval/reports/context-review-2026-09-20.json +0 -48
  217. package/core/dev/jev-eval/reports/conversation-review.pending.json +0 -151
  218. package/core/dev/jev-eval/reports/history-corpus-2026-09-20.json +0 -52
  219. package/core/dev/jev-eval/reports/length-probe-2026-09-20.json +0 -133
  220. package/core/dev/jev-eval/reports/live-smoke-2026-09-20.json +0 -616
  221. package/core/dev/jev-eval/reports/muninn-baseline-2026-09-20.json +0 -52
  222. package/core/dev/jev-eval/reports/resilience-2026-09-20.json +0 -520
  223. package/core/dev/jev-eval/reports/rules-baseline.json +0 -197
  224. package/core/dev/jev-eval/reports/synthetic-review.pending.json +0 -357
  225. package/core/dev/jev-eval/resilience.mjs +0 -71
  226. package/core/dev/jev-eval/review.mjs +0 -78
  227. package/core/dev/jev-eval/schema.mjs +0 -87
  228. package/core/dev/jev-eval/test/context.test.mjs +0 -95
  229. package/core/dev/jev-eval/test/corpus.test.mjs +0 -102
  230. package/core/dev/jev-eval/test/eval.test.mjs +0 -146
  231. package/core/dev/jev-eval/test/muninn-baseline.test.mjs +0 -71
  232. package/core/dev/jev-eval/test/resilience.test.mjs +0 -72
  233. package/core/dev/jev-eval/test/review.test.mjs +0 -61
  234. package/core/dev/pipeline/PHASE3_PLANNING_SUMMARY.md +0 -338
  235. package/core/dev/pipeline/PROGRESS.md +0 -113
  236. package/core/dev/pipeline/PROGRESS_template.md +0 -860
  237. package/core/dev/pipeline/QA_REPORT_F008.md +0 -431
  238. package/core/dev/pipeline/QA_REPORT_LOCAL_CLAUDE_DIAGNOSIS.md +0 -583
  239. package/core/dev/pipeline/README.md +0 -210
  240. package/core/dev/pipeline/WORKFLOW_GUIDE.md +0 -824
  241. package/core/dev/pipeline/archived/TASK_015_tauri_init.yaml +0 -53
  242. package/core/dev/pipeline/archived/TASK_016_tauri_commands.yaml +0 -54
  243. package/core/dev/pipeline/archived/TASK_017_rust_pty.yaml +0 -54
  244. package/core/dev/pipeline/archived/TASK_018_tauri_bundle.yaml +0 -53
  245. package/core/dev/pipeline/archived/TASK_019_release_workflow.yaml +0 -56
  246. package/core/dev/pipeline/archived/TASK_020_update_ui.yaml +0 -54
  247. package/core/dev/pipeline/archived/TASK_021_update_notification_ui.yaml +0 -55
  248. package/core/dev/pipeline/archived/TASK_022_remove_node_pty.yaml +0 -65
  249. package/core/dev/pipeline/archived/TASK_023_api_routes_migration.yaml +0 -86
  250. package/core/dev/pipeline/archived/TASK_024_feature_id_system.yaml +0 -51
  251. package/core/dev/pipeline/archived/TASK_025_executable_acceptance.yaml +0 -66
  252. package/core/dev/pipeline/archived/TASK_026_spec_versioning.yaml +0 -56
  253. package/core/dev/pipeline/archived/TASK_027_drift_detection.yaml +0 -60
  254. package/core/dev/pipeline/archived/TASK_028_tauri_pty_manager.yaml +0 -60
  255. package/core/dev/pipeline/archived/TASK_029_tauri_pty_commands.yaml +0 -62
  256. package/core/dev/pipeline/archived/TASK_030_frontend_session_adapter.yaml +0 -54
  257. package/core/dev/pipeline/archived/TASK_031_terminal_tauri_events.yaml +0 -56
  258. package/core/dev/pipeline/archived/TASK_041_scheduler_data_models.yaml +0 -54
  259. package/core/dev/pipeline/archived/TASK_042_path_lock_manager.yaml +0 -53
  260. package/core/dev/pipeline/archived/TASK_043_process_manager.yaml +0 -57
  261. package/core/dev/pipeline/archived/TASK_044_git_integration.yaml +0 -85
  262. package/core/dev/pipeline/archived/TASK_045_task_queue_manager.yaml +0 -54
  263. package/core/dev/pipeline/archived/TASK_046_scheduler_dispatcher.yaml +0 -60
  264. package/core/dev/pipeline/archived/TASK_047_tauri_scheduler_commands.yaml +0 -55
  265. package/core/dev/pipeline/archived/TASK_048_realtime_status_push.yaml +0 -92
  266. package/core/dev/pipeline/archived/TASK_049_frontend_scheduler_integration.yaml +0 -58
  267. package/core/dev/pipeline/archived/TASK_050_error_recovery.yaml +0 -56
  268. package/core/dev/pipeline/archived/TASK_051_optimization_proposals_backend.yaml +0 -53
  269. package/core/dev/pipeline/archived/TASK_052_optimization_proposals_ui.yaml +0 -58
  270. package/core/dev/pipeline/archived/TASK_053_optimization_proposals_diff_view.yaml +0 -54
  271. package/core/dev/pipeline/archived/TASK_054_multi_project_scheduler_state.yaml +0 -76
  272. package/core/dev/pipeline/archived/TASK_055_scheduler_api_project_scope.yaml +0 -64
  273. package/core/dev/pipeline/archived/TASK_056_frontend_scheduler_project_scope.yaml +0 -62
  274. package/core/dev/pipeline/archived/TASK_057_scheduler_module_structure.yaml +0 -54
  275. package/core/dev/pipeline/archived/TASK_058_scheduler_models_extract.yaml +0 -51
  276. package/core/dev/pipeline/archived/TASK_059_scheduler_core_extract.yaml +0 -51
  277. package/core/dev/pipeline/archived/TASK_060_scheduler_commands_extract.yaml +0 -51
  278. package/core/dev/pipeline/archived/TASK_061_scheduler_specialized_commands.yaml +0 -53
  279. package/core/dev/pipeline/archived/TASK_062_process_manager_module_structure.yaml +0 -56
  280. package/core/dev/pipeline/archived/TASK_063_process_manager_core_extract.yaml +0 -56
  281. package/core/dev/pipeline/archived/TASK_064_recovery_module_structure.yaml +0 -57
  282. package/core/dev/pipeline/archived/TASK_065_recovery_core_extract.yaml +0 -56
  283. package/core/dev/pipeline/archived/TASK_066_self_enhancement_scheduler_models.yaml +0 -60
  284. package/core/dev/pipeline/archived/TASK_067_agents_section_quick_actions.yaml +0 -53
  285. package/core/dev/pipeline/archived/TASK_067_self_enhancement_scheduler_core.yaml +0 -65
  286. package/core/dev/pipeline/archived/TASK_068_agent_workflow_rule_enhancement.yaml +0 -46
  287. package/core/dev/pipeline/archived/TASK_068_self_enhancement_tauri_commands.yaml +0 -61
  288. package/core/dev/pipeline/archived/TASK_069_agent_wizard_responsive.yaml +0 -46
  289. package/core/dev/pipeline/archived/TASK_069_self_enhancement_ui.yaml +0 -62
  290. package/core/dev/pipeline/archived/TASK_070_preview_panel_redesign.yaml +0 -62
  291. package/core/dev/pipeline/archived/TASK_070_self_enhancement_integration.yaml +0 -57
  292. package/core/dev/pipeline/archived/TASK_071_preview_panel_qa.yaml +0 -98
  293. package/core/dev/pipeline/archived/TASK_071_single_agent_config.yaml +0 -57
  294. package/core/dev/pipeline/archived/TASK_072_preview_modal_esc_fix.yaml +0 -71
  295. package/core/dev/pipeline/archived/TASK_072_product_review_module.yaml +0 -57
  296. package/core/dev/pipeline/archived/TASK_073_agents_page_component_refactor.yaml +0 -68
  297. package/core/dev/pipeline/archived/TASK_073_rename_single_agent.yaml +0 -64
  298. package/core/dev/pipeline/archived/TASK_074_preview_mode_ui_diagnosis.yaml +0 -71
  299. package/core/dev/pipeline/archived/TASK_074_single_agent_ui_toggle.yaml +0 -56
  300. package/core/dev/pipeline/archived/TASK_075_agents_page_component_refactor.yaml +0 -69
  301. package/core/dev/pipeline/archived/TASK_075_single_agent_integration_test.yaml +0 -75
  302. package/core/dev/pipeline/archived/TASK_076_preview_mode_ui_diagnosis.yaml +0 -70
  303. package/core/dev/pipeline/archived/TASK_076_single_agent_continuous_mode.yaml +0 -65
  304. package/core/dev/pipeline/archived/TASK_077_failure_directory_structure.yaml +0 -51
  305. package/core/dev/pipeline/archived/TASK_077_single_agent_typescript_types.yaml +0 -59
  306. package/core/dev/pipeline/archived/TASK_078_fail_001_agent_no_output.yaml +0 -53
  307. package/core/dev/pipeline/archived/TASK_078_single_agent_ui_simplify.yaml +0 -74
  308. package/core/dev/pipeline/archived/TASK_079_dashboard_rwd_responsive.yaml +0 -63
  309. package/core/dev/pipeline/archived/TASK_079_fail_002_json_bom.yaml +0 -56
  310. package/core/dev/pipeline/archived/TASK_080_fail_003_queue_pollution.yaml +0 -56
  311. package/core/dev/pipeline/archived/TASK_080_http_server_module.yaml +0 -55
  312. package/core/dev/pipeline/archived/TASK_081_failure_logging_tools.yaml +0 -57
  313. package/core/dev/pipeline/archived/TASK_081_http_api_routes.yaml +0 -62
  314. package/core/dev/pipeline/archived/TASK_082_frontend_api_adapter.yaml +0 -51
  315. package/core/dev/pipeline/archived/TASK_082_integrate_failure_to_workflow.yaml +0 -60
  316. package/core/dev/pipeline/archived/TASK_083_cleanup_nextjs_api.yaml +0 -48
  317. package/core/dev/pipeline/archived/TASK_083_task_queue_cleanup.yaml +0 -67
  318. package/core/dev/pipeline/archived/TASK_084_rust_dead_code_cleanup.yaml +0 -66
  319. package/core/dev/pipeline/archived/TASK_084_scheduler_sync_logic_fix.yaml +0 -68
  320. package/core/dev/pipeline/archived/TASK_085_http_api_web_mode_fixes.yaml +0 -46
  321. package/core/dev/pipeline/archived/TASK_085_memory_consolidation_0204_0205.yaml +0 -98
  322. package/core/dev/pipeline/archived/TASK_086_collapsible_preview_panel.yaml +0 -161
  323. package/core/dev/pipeline/archived/TASK_086_web_mode_feature_parity.yaml +0 -62
  324. package/core/dev/pipeline/archived/TASK_087_manual_memory_archival.yaml +0 -163
  325. package/core/dev/pipeline/archived/TASK_087_mobile_http_control.yaml +0 -68
  326. package/core/dev/pipeline/archived/TASK_088_fail_003_to_ppl_002_rule.yaml +0 -63
  327. package/core/dev/pipeline/archived/TASK_088_mobile_http_qa.yaml +0 -121
  328. package/core/dev/pipeline/archived/TASK_089_agent_collaboration_topic.yaml +0 -60
  329. package/core/dev/pipeline/archived/TASK_089_web_mode_monitor_fix.yaml +0 -58
  330. package/core/dev/pipeline/archived/TASK_090_cli_detection_fix.yaml +0 -61
  331. package/core/dev/pipeline/archived/TASK_090_ui_ux_lessons_topic.yaml +0 -63
  332. package/core/dev/pipeline/archived/TASK_091_expandable_card_design.yaml +0 -56
  333. package/core/dev/pipeline/archived/TASK_091_move_agent_section_components.yaml +0 -65
  334. package/core/dev/pipeline/archived/TASK_092_expandable_card_component.yaml +0 -60
  335. package/core/dev/pipeline/archived/TASK_092_refactor_agent_create_wizard.yaml +0 -84
  336. package/core/dev/pipeline/archived/TASK_093_taskcard_detail_integration.yaml +0 -57
  337. package/core/dev/pipeline/archived/TASK_093_update_barrel_exports_test.yaml +0 -84
  338. package/core/dev/pipeline/archived/TASK_094_ai_agent_generation_enhancement.yaml +0 -115
  339. package/core/dev/pipeline/archived/TASK_094_proposalcard_detail_integration.yaml +0 -55
  340. package/core/dev/pipeline/archived/TASK_095_preview_fixes.yaml +0 -129
  341. package/core/dev/pipeline/archived/TASK_095_single_agent_task_selector.yaml +0 -60
  342. package/core/dev/pipeline/archived/TASK_096_agents_page_ux_improvements.yaml +0 -163
  343. package/core/dev/pipeline/archived/TASK_096_single_agent_status_sync.yaml +0 -60
  344. package/core/dev/pipeline/archived/TASK_097_local_claude_error_logging.yaml +0 -59
  345. package/core/dev/pipeline/archived/TASK_097_single_agent_monitor_events.yaml +0 -59
  346. package/core/dev/pipeline/archived/TASK_098_product_manager_team_phase2.yaml +0 -60
  347. package/core/dev/pipeline/archived/TASK_098_single_agent_refactor_test.yaml +0 -58
  348. package/core/dev/pipeline/archived/TASK_099_backend_team_creation.yaml +0 -258
  349. package/core/dev/pipeline/archived/TASK_100_frontend_team_creation.yaml +0 -61
  350. package/core/dev/pipeline/archived/TASK_101_orchestrator_system.yaml +0 -403
  351. package/core/dev/pipeline/archived/TASK_102_designer_sre_teams.yaml +0 -90
  352. package/core/dev/pipeline/archived/TASK_103_integration_testing.yaml +0 -86
  353. package/core/dev/pipeline/archived/TASK_128_integration_testing.yaml +0 -83
  354. package/core/dev/pipeline/archived/TASK_134_cortex_v2_phase3_file_watcher.yaml +0 -65
  355. package/core/dev/pipeline/archived/TASK_134_team_http_api.yaml +0 -96
  356. package/core/dev/pipeline/archived/TASK_135_cortex_v2_phase3_git_monitor.yaml +0 -63
  357. package/core/dev/pipeline/archived/TASK_136_cortex_v2_phase3_change_analyzer.yaml +0 -69
  358. package/core/dev/pipeline/archived/TASK_137_cortex_v2_phase3_cache_invalidator.yaml +0 -67
  359. package/core/dev/pipeline/archived/TASK_137_team_orchestrator_integration.yaml +0 -93
  360. package/core/dev/pipeline/archived/TASK_138_cortex_v2_phase3_distributed_cache.yaml +0 -68
  361. package/core/dev/pipeline/archived/TASK_138_matrix_folder_structure.yaml +0 -61
  362. package/core/dev/pipeline/archived/TASK_139_cortex_v2_phase3_cache_prewarming.yaml +0 -65
  363. package/core/dev/pipeline/archived/TASK_146_unified_documentation.yaml +0 -141
  364. package/core/dev/pipeline/archived/TASK_147_pipeline_execution_rules.yaml +0 -76
  365. package/core/dev/pipeline/archived/TASK_148_update_claude_md.yaml +0 -77
  366. package/core/dev/pipeline/archived/TASK_149_fix_nextjs_mdx_serialization.yaml +0 -63
  367. package/core/dev/pipeline/archived/TASK_149_update_team_docs.yaml +0 -77
  368. package/core/dev/pipeline/archived/TASK_150_pipeline_workflow_guide.yaml +0 -82
  369. package/core/dev/pipeline/archived/TASK_164_fix_smart_context_switch.yaml +0 -49
  370. package/core/dev/pipeline/archived/TASK_165_ctags_symbol_index.yaml +0 -53
  371. package/core/dev/pipeline/archived/TASK_166_symbol_search_mcp_tool.yaml +0 -48
  372. package/core/dev/pipeline/archived/TASK_167_llm_module_summary.yaml +0 -55
  373. package/core/dev/pipeline/archived/TASK_168_map_reduce_context.yaml +0 -51
  374. package/core/dev/pipeline/archived/TASK_169_v2_integration_testing.yaml +0 -52
  375. package/core/dev/pipeline/backups/archive_2026-02-04T22-07-22/TASK_QUEUE_backup.json +0 -95
  376. package/core/dev/pipeline/docs/multi-agent-coordination.md +0 -446
  377. package/core/dev/pipeline/docs/overview.md +0 -406
  378. package/core/dev/pipeline/docs/task-management.md +0 -412
  379. package/core/dev/pipeline/docs/workflows.md +0 -32
  380. package/core/dev/pipeline/orchestrator/schemas/task_queue_schema.json +0 -58
  381. package/core/dev/pipeline/orchestrator/schemas/task_schema.json +0 -139
  382. package/core/dev/pipeline/plans/PLAN_task_cli_refactor.md +0 -281
  383. package/core/dev/pipeline/test_results/TASK_TEST_PARALLEL_002_result.txt +0 -27
  384. package/core/dev/plans/ANSUZ_SLIM_PLAN.md +0 -68
  385. package/core/dev/plans/CLI_FIRST_INSTALL_FLOW.md +0 -120
  386. package/core/dev/plans/FORMATION_RETIREMENT_PLAN.md +0 -313
  387. package/core/dev/plans/KUZU_REPLACEMENT_PLAN.md +0 -126
  388. package/core/dev/scripts/CRASH_DIAGNOSIS.md +0 -47
  389. package/core/dev/scripts/README.md +0 -142
  390. package/core/dev/scripts/RUN_ONCE.bat +0 -40
  391. package/core/dev/scripts/START_DEV_AGENT.bat +0 -63
  392. package/core/dev/scripts/START_MULTI_AGENT.bat +0 -80
  393. package/core/dev/scripts/dev_agent_scheduler.ps1 +0 -536
  394. package/core/dev/scripts/init_git.ps1 +0 -396
  395. package/core/dev/scripts/init_git.sh +0 -337
  396. package/core/dev/scripts/init_project.ps1 +0 -851
  397. package/core/dev/scripts/init_project.sh +0 -477
  398. package/core/dev/scripts/multi_agent_scheduler.ps1 +0 -2021
  399. package/core/dev/scripts/multi_agent_scheduler.sh +0 -1344
  400. package/core/dev/scripts/run_once.sh +0 -47
  401. package/core/dev/scripts/setup_rag.ps1 +0 -304
  402. package/core/dev/scripts/setup_rag.sh +0 -230
  403. package/core/dev/scripts/start_dev_agent.sh +0 -137
  404. package/core/dev/scripts/start_multi_agent.sh +0 -41
  405. package/core/dev/scripts/sync_task_queue.ps1 +0 -505
  406. package/core/dev/scripts/sync_task_queue.sh +0 -392
  407. package/core/dev/specs/agent-connect/PROTOCOL.md +0 -177
  408. package/core/dev/specs/agent-connect/SDK_GUIDE.md +0 -915
  409. package/core/dev/specs/agent-connect/examples/minimal-site/README.md +0 -137
  410. package/core/dev/specs/agent-connect/examples/minimal-site/package.json +0 -12
  411. package/core/dev/specs/agent-connect/examples/minimal-site/public/index.html +0 -116
  412. package/core/dev/specs/agent-connect/examples/minimal-site/public/install-redirect.js +0 -73
  413. package/core/dev/specs/agent-connect/examples/minimal-site/server.js +0 -516
  414. package/core/dev/specs/agent-connect/examples/minimal-site/test/smoke.test.mjs +0 -263
  415. package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-empty-prompt-no-first-turn.md +0 -77
  416. package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-prompt-mojibake.md +0 -90
  417. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-07.md +0 -61
  418. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-08_relay-v1-conformance.md +0 -76
  419. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-09_v0.4-session-channel.md +0 -87
  420. package/core/dev/specs/agent-connect/history/FLOWPIX_REPLY_agent-hub_2026-09-08_relay-v1-answers.md +0 -68
  421. package/core/dev/specs/agent-connect/history/FLOWPIX_bridge_CONTRACT.md +0 -642
  422. package/core/dev/specs/agent-connect/history/FLOWPIX_spikes_relay_spike_relay.mjs +0 -244
  423. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-07.md +0 -77
  424. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_direction-change-v0.3.md +0 -44
  425. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-answers-ack.md +0 -37
  426. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-conformance.md +0 -56
  427. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_annotations-install-coldstart.md +0 -44
  428. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_empty-prompt-first-turn.md +0 -56
  429. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_prompt-mojibake-fixed.md +0 -48
  430. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_session-channel.md +0 -57
  431. package/core/dev/specs/agent-connect/history/PROTOCOL_v0.3_snapshot.md +0 -379
  432. package/core/dev/specs/agent-connect/history/README.md +0 -47
  433. package/core/dev/specs/peer/CODEX_INTERACTIVE_PUSH.md +0 -65
  434. package/core/dev/specs/peer/CODEX_MANAGED_DAEMON.md +0 -54
  435. package/core/dev/specs/peer/CODEX_PEER_PULL_SPIKE.md +0 -54
  436. package/core/dev/specs/peer/MODS_SPIKE.md +0 -133
  437. package/core/dev/specs/peer/PER_PROJECT_ADDRESSING.md +0 -143
  438. package/core/dev/specs/peer/SWARM_PROTOCOLS.md +0 -256
  439. package/core/dev/specs/peer/codex-hook-shim-peer.test.js +0 -113
  440. package/core/dev/specs/peer/codex-push-launcher.test.js +0 -142
  441. package/core/dev/specs/peer/setup-codex-hooks.test.js +0 -60
  442. package/core/dev/specs/peer-ansuz/DELIVERY_SPIKE.md +0 -397
  443. package/core/dev/specs/peer-ansuz/DESIGN.md +0 -109
  444. package/core/dev/specs/peer-ansuz/spike/claude_poke.js +0 -129
  445. package/core/dev/specs/peer-ansuz/spike/claude_session_start_hook.js +0 -37
  446. package/core/dev/specs/peer-ansuz/spike/claude_settings_hook.json +0 -14
  447. package/core/dev/specs/peer-ansuz/spike/codex_appserver_client.js +0 -105
  448. package/core/dev/specs/peer-ansuz/spike/codex_appserver_query.js +0 -29
  449. package/core/dev/specs/peer-ansuz/spike/extract_timeline.js +0 -26
  450. package/core/dev/specs/synapse/SYMBOL_IDENTITY.md +0 -305
  451. package/core/dev/spikes/A4-cypher-varlen.md +0 -176
  452. package/core/dev/spikes/bloat-rounds.sh +0 -25
  453. package/core/dev/spikes/mods/clean-claude.js +0 -9
  454. package/core/dev/spikes/mods/drive-probe.js +0 -29
  455. package/core/dev/spikes/mods/e2e-peer.js +0 -71
  456. package/core/dev/spikes/mods/evidence/e2e-peer-control.json +0 -17
  457. package/core/dev/spikes/mods/evidence/e2e-peer-mod.json +0 -17
  458. package/core/dev/spikes/mods/evidence/probe-006a6e65-d807-4bc1-b648-fd7d1edfe0b4.jsonl +0 -4
  459. package/core/dev/spikes/mods/evidence/probe-cebdf1f7-f9c4-47a8-83cd-7c0786177404.jsonl +0 -12
  460. package/core/dev/spikes/mods/evidence/probe-eb21147d-10ce-4c32-93ed-37ca37d88d5a.jsonl +0 -11
  461. package/core/dev/spikes/mods/evidence/stream-cebdf1f7.jsonl +0 -18
  462. package/core/dev/spikes/mods/kenaz-mod-probe/.claude-plugin/plugin.json +0 -1
  463. package/core/dev/spikes/mods/kenaz-mod-probe/hooks/hooks.json +0 -1
  464. package/core/dev/spikes/mods/kenaz-mod-probe/hooks/register.ts +0 -65
  465. package/core/dev/spikes/mods/kenaz-mod-probe/tsconfig.json +0 -3
@@ -1,34 +0,0 @@
1
- {
2
- "title": "非當前專案的 embedding backfill 從未觸發:Ashfall 有 433 個符號但 embedding_entries=0",
3
- "description": "原始報告懷疑「嵌入管線是否曾經成功執行過」。Ansuz 已實測推翻該假設:KenazAI 自身 embedding_entries=10188(symbol_entries 24218),管線本身健康。真正的問題較窄 —— Ashfall(D:\\Projects\\Ashfall)有 433 個符號(markdown 248 / rust 133 / js 39 / yaml 11 / python 2)卻是 embedding_entries: 0。所以嵌入不是壞掉,而是對「非當前開啟的專案」從未被觸發。synapse_search 文件宣稱是 FTS5 + embedding 向量 + 圖譜熱度的混合檢索,對這類專案等於只有三分之二在運作,且同樣沒有任何訊號告知使用者。附帶一個小的內部不一致待釐清:synapse_status 回報 Ashfall symbol_entries=387,但按語言加總 Symbol 表為 433,差 46。",
4
- "priority": "P3",
5
- "role": "developer",
6
- "rigor": "low",
7
- "complexity": "medium",
8
- "tags": ["fix", "code"],
9
- "scope_paths": [
10
- "dashboard/src-tauri/src/features/synapse/"
11
- ],
12
- "estimated_hours": 2,
13
- "requirements": [
14
- "查清 embedding 產生的觸發條件:它是索引流程的一部分、還是獨立的 backfill 步驟(注意已存在 synapse_backfill_trigger_embeddings 這個 MCP 工具,它的存在本身就暗示 backfill 是手動/獨立觸發的)。把實際的觸發鏈寫清楚。",
15
- "判定「非當前專案索引時不產生 embedding」是刻意設計(例如成本考量、ONNX 模型只對 current project 載入)還是缺陷。這個判定要有程式碼證據,不要用猜的。",
16
- "若是缺陷 —— 提出最小修法並實作。若是刻意設計 —— 不要改行為,改成讓它可見:synapse_status 應能表達「此專案的向量檢索未就緒」,而不是只回一個沒有上下文的 0。",
17
- "釐清 symbol_entries(status 回報值)與 Symbol 節點實際總數的差異來源。可能的方向:兩者查的不是同一張表(status 可能查 FTS symbol 表、Cypher 查的是圖節點)、Concept 這類虛擬節點的計入與否、或去重。查清楚後在 status.rs 對該欄位補一行註解說明它精確代表什麼。",
18
- "本卡的產出可以是「診斷報告 + 小修」而非大改。若查清後認為正確修法是架構級的,寫成建議並開後續卡,不要在本卡硬幹。"
19
- ],
20
- "acceptance_criteria": [
21
- "完成報告中明確回答三個問題:(1) embedding 的觸發鏈是什麼(附程式碼路徑與行號);(2) 非當前專案為何沒有 embedding —— 設計還是缺陷,證據為何;(3) symbol_entries 387 vs 433 的差異來源是什麼。",
22
- "若判定為缺陷並實作了修法:`CARGO_TARGET_DIR=$(node <worktree>/dev/scripts/verify-target-dir.js) cargo check --lib -p kenaz-dashboard` 乾淨通過(exit 0),且新增至少一條單元測試涵蓋修改的邏輯。",
23
- "若判定為刻意設計:status.rs 的 embedding_entries 欄位旁補上說明註解,且提出(不必實作)如何讓使用者看見「向量檢索未就緒」的具體方案。",
24
- "無論哪條路徑,都不得為了讓數字好看而修改統計口徑 —— 若 387 與 433 的差異是真實的資料不一致,如實回報,不要用 COALESCE 之類手法把它抹平。"
25
- ],
26
- "technical_notes": [
27
- "已知事實(Ansuz 實測,不需重驗但可複驗):KenazAI 專案 synapse_status 回傳 embedding_entries=10188、symbol_entries=24218、fts_entries=4774、relationships=22204。Ashfall 回傳 embedding_entries=0、symbol_entries=387、fts_entries=46391。注意 KenazAI 的 fts_entries 遠小於 symbol_entries,而 Ashfall 相反 —— 這個反轉本身可能是線索(Ashfall 的 FTS 幾乎全是檔案層級條目,因為幾乎沒有符號)。",
28
- "相關工具:synapse_backfill_trigger_embeddings(MCP)。先讀它的實作,很可能直接回答「觸發鏈是什麼」。",
29
- "本卡與 TASK_1798 都可能碰 status.rs。**必須在 TASK_1798 合併後才開工**,且 worktree 從合併後的 main 開出來。若你需要動 status.rs 的範圍超過「加註解」,先回報再動。",
30
- "驗證環境:正典共用 CARGO_TARGET_DIR(來源 dev/scripts/verify-target-dir.js,Windows 為 C:/t/kenaz-verify)避開 vendor/kuzu 的 Windows MAX_PATH,不要自創新目錄(TASK_1879);並行驗證被 cargo 檔案鎖串行化,'Blocking waiting for file lock' + CPU 近 0 是正常等待不是 hang;不可共用主工作樹 target/(被 live tauri dev 佔用);不要用 cargo test --lib(STATUS_ENTRYPOINT_NOT_FOUND,TASK_1619),用 dev/scripts/run-rust-tests.js。",
31
- "不要對 D:\\Projects\\Ashfall 執行重新索引 —— 使用者明確要求本輪不動該專案。所有推論以程式碼閱讀 + KenazAI 自身為對照組。",
32
- "來源報告:C:\\Users\\user\\Desktop\\SYNAPSE_CSHARP_INDEXING_REPORT.md(缺陷 4,但報告的『管線可能從未執行』假設已被推翻,範圍已收窄)。"
33
- ]
34
- }
@@ -1,39 +0,0 @@
1
- {
2
- "title": "出貨衛生:.claude/settings.json 洩漏舊機器路徑與他人專案名 + build-static.js 兩處註解與實際行為不符",
3
- "description": "TASK_1795 把 stageKenazCore 改成 git 白名單後,未追蹤的垃圾不會再出貨,但兩個「被追蹤所以合法通過白名單」的問題留了下來。(1) .claude/settings.json 在 INCLUDE_DIRS 內(build-static.js:198 '.claude')隨產品出貨,其 permissions.allow 有 121 條,其中 21 條含舊機器絕對路徑 d:/Projects/KenazAI 與前一位使用者家目錄 C:/Users/Wei/,且洩漏了兩個無關的第三方專案名(Firstrade_m…、deardearly_…)。這與 TASK_1795 修的是同一類洩漏(那張是 P1)。同時 allow 已含 Bash(*)/Read(*)/Write(*)/Edit(*)/Grep(*)/Glob(*)/Search(*),所以那 100 多條逐條列舉的 Bash 授權完全是死條目,刪掉不影響任何權限。(2) build-static.js:287 的註解宣稱 'main-memory are NO LONGER shipped',但 .kenaz/main-memory/ 有 27 個 git 追蹤檔(160K)且 EXCLUDE_PATTERNS 裡沒有任何對應條目 —— 它一直在出貨。經內容檢視,該目錄是人工維護的 Kenaz 架構/知識文件(README 明載「唯讀設計,僅開發者手動更新」),不是 session 衍生的私密記憶,出貨是正確行為;錯的是註解。",
4
- "priority": "P1",
5
- "role": "developer",
6
- "rigor": "medium",
7
- "complexity": "low",
8
- "tags": ["fix", "code"],
9
- "scope_paths": [
10
- ".claude/settings.json",
11
- "dashboard/scripts/build-static.js"
12
- ],
13
- "estimated_hours": 1.5,
14
- "requirements": [
15
- "清理 .claude/settings.json permissions.allow:刪除全部含舊機器絕對路徑的條目(比對 /d/Projects、d:/Projects、C:/Users/Wei、以及任何指向本 repo 以外專案的路徑)。",
16
- "同時刪除被 Bash(*) 完全涵蓋的逐條 Bash 授權死條目(allow 已含 Bash(*),逐條列舉沒有任何額外效果,只是歷史沉積)。保留 Bash(*) 本身。",
17
- "permissions.deny 完全不動 —— 那是實際生效的安全護欄(rm -rf、git push --force、git reset --hard、DROP TABLE 等 27 條)。",
18
- "hooks 區塊完全不動 —— WorktreeCreate/WorktreeRemove/SessionStart/SessionEnd/Stop 都是活的執行路徑,改壞會讓 session 生命週期靜默失效。",
19
- "worktree.baseRef 不動(目前為 'head',是 TASK_1794 正在調查的對象,本卡不涉入)。",
20
- "build-static.js:287 的註解改成與實際行為一致:main-memory 是被追蹤的人工知識文件、確實隨產品出貨且這是刻意的;EFE snapshots 因為未被 git 追蹤而自然不出貨(白名單模式的結果,不是靠 EXCLUDE)。不要為了讓註解成真而去加 EXCLUDE 條目 —— 那會拔掉真正該出貨的內容。",
21
- "build-static.js:319 的 'Twin rule: sync-kenaz-core.js .synapse fileFilter + NEWLY_EXCLUDED — keep both in sync' 註解目前已是假話(TASK_1796 記錄了兩者的白名單/黑名單分歧)。本卡只需在該註解加上指向 TASK_1796 的 STALE 標註,不要動 sync-kenaz-core.js —— 那是 TASK_1796 的範圍。"
22
- ],
23
- "acceptance_criteria": [
24
- "`node -e \"const a=require('./.claude/settings.json').permissions.allow; const bad=a.filter(x=>/d:\\/Projects|\\/d\\/Projects|C:\\/Users\\/Wei|Firstrade|deardearly/i.test(x)); if(bad.length){console.error(bad); process.exit(1)} console.log('clean, entries:', a.length)\"` 回傳 exit 0,且條目數顯著低於原本的 121。",
25
- "settings.json 仍是合法 JSON,且 permissions.deny 條目數與內容與修改前逐字相同(用 diff 證明),hooks 區塊 byte-identical。",
26
- "grep 確認 .claude/settings.json 全檔不再含任何本 repo 以外的絕對路徑(搜 'd:/Projects'、'/d/Projects'、'C:/Users/Wei'、'C:\\\\Users\\\\Wei')。",
27
- "build-static.js:287 與 :319 兩處註解已更新且與實際程式行為一致;EXCLUDE_PATTERNS 陣列本身不得有任何新增或刪除(純註解修改,用 diff 證明)。",
28
- "`cd dashboard && node -e \"const {stageKenazCore}=require('./scripts/build-static.js'); console.log(typeof stageKenazCore)\"` 仍印出 'function'(模組沒被改壞)。",
29
- "不得修改 sync-kenaz-core.js(TASK_1796 範圍)、不得修改 dashboard/scripts/build-static.js 的 INCLUDE_DIRS / EXCLUDE_PATTERNS / RUNTIME_DIRS 任何資料條目。"
30
- ],
31
- "technical_notes": [
32
- "為什麼刪 Bash 逐條授權是安全的:allow 陣列裡已經有 'Bash(*)',Claude Code 的 permission 比對是 OR 語意,任何 Bash 呼叫都會先被 Bash(*) 命中。逐條的 'Bash(node .collaboration/core/task-api.js list)' 之類條目永遠不會是決定性的那一條。刪除前請自行在檔案裡確認 Bash(*) 確實存在(目前存在),若不存在則停手並回報。",
33
- "'Edit(*)' 的語意陷阱(reference_claude_code_edit_permission_glob):Edit(*) 只匹配單層路徑,不是萬用授權。所以不要以 'Edit(*) 已涵蓋' 為理由刪除任何 Edit 相關條目 —— 本卡只刪 Bash 死條目與含外部絕對路徑的條目。",
34
- "這個檔案是本 repo 開發時實際生效的設定,不只是出貨樣板。修改後若造成開發時權限提示變多,那是錯的 —— 判準是「刪掉的條目都被更寬的萬用條目涵蓋」。",
35
- ".kenaz/main-memory 的判定依據(已查證,不要重查也不要推翻而不說明理由):27 個 git 追蹤檔、160K、目錄結構為 kenaz/{cortex,memory-system,pipeline,rules,system} 與 knowledge/{patterns,references,solutions},README 第 15 行明載「唯讀設計 - 僅開發者手動更新,避免知識污染」。這是策展過的產品知識,不是 TASK_1738 所針對的 session 衍生私密記憶(那指的是 .synapse/db/memory.db,1.8GB,已正確 EXCLUDE)。",
36
- "commit 後不要合併到 main —— 由 Ansuz 主幹以 scope 檔案為單位合併(本 session 有多個平行 agent,整支合併會覆蓋其他 session 的工作)。",
37
- "相關 rune:rune_332794da6e944a7595a6e6595ad80b1a(TASK_1795 完成報告,明確列出這兩個遺留缺口)。"
38
- ]
39
- }
@@ -1,36 +0,0 @@
1
- {
2
- "title": "驗證 sigil 記載的五個高流量病理是否仍存在於程式碼(isTauri 可偽造 / listener 洩漏 / 二次方 LRU / 三個路徑解析器)",
3
- "description": "Huginn 兩則 advisory(2026-07-24)指出:sigil 'High-Traffic Symbol Architectural Pathologies'(sigil_1fce39be07584c228e306734b6f05c74)記載了 isTauri 邊界可偽造、AgentCoordinationClient.on 監聽器洩漏、scanner TreeCache/ScanProgress::new 二次方 LRU 三個病理;sigil 'Sub-Project Boot Boundary Resolution'(sigil_d3b8f855b72f4f969bca5984213d1758)記載 get_db_dir / get_synapse_dir / resolve_project_root 這組路徑解析面曾造成三個同時發生的終端使用者事故(TASK_1380-1382)並留下六條不變量。六個 symbol 全部在 synapse_knowledge_gaps 顯示 rune_count=0,danger 分數分別為 900 / 295 / 792 / 2360 / 520 / 364。**本卡的重點不是為了把 rune_count 從 0 補到 1** —— 為了滿足指標而製造 rune 是儀式,不是知識。重點是 advisory 自己承認的那句話:『whether the pathologies were ever fixed is unverified』。先查真相,rune 是查證的副產物。",
4
- "priority": "P2",
5
- "role": "developer",
6
- "rigor": "medium",
7
- "complexity": "medium",
8
- "tags": ["review", "fix", "code"],
9
- "estimated_hours": 3,
10
- "requirements": [
11
- "對六個 symbol 逐一查證當前程式碼的真實狀態:isTauri、AgentCoordinationClient.on、scanner 的 TreeCache 與 ScanProgress::new、get_db_dir、get_synapse_dir、resolve_project_root。用 synapse_search 定位 symbol_id 後用 synapse_pulse / synapse_context 取得 360 度關係,再實際讀原始碼確認。",
12
- "每個 symbol 給出三選一的明確結論:(a) 病理仍存在(附行號與重現路徑);(b) 已被修復(附修復的 commit 或程式碼證據);(c) 描述已不適用(symbol 被重構、改名或刪除)。不接受「看起來還好」這種模糊結論。",
13
- "對結論為 (a) 的項目:評估嚴重度並提出最小修法。若修法在 30 行以內且低風險,直接實作;若更大,寫成後續任務建議(含 scope_paths 與 acceptance criteria 草稿),不要在本卡硬幹。",
14
- "對結論為 (b) 的項目:用 synapse_inscribe 寫入 type=fix 的 rune,內容記錄「病理曾存在 → 如何被修掉 → 現在的不變量是什麼」。這才是有價值的 rune。",
15
- "對結論為 (c) 的項目:不要寫 rune。改為回報該 sigil 已 stale,並在報告中列出建議的 sigil 更新內容(成員汰換)。",
16
- "sigil_d3b8f855b72f4f969bca5984213d1758 記載的六條不變量要逐條對照當前程式碼檢查是否仍被遵守 —— 這組路徑解析器的 danger 分數是全場最高(get_db_dir 2360),且歷史上造成過真實終端使用者事故。",
17
- "所有 synapse_inscribe 呼叫必須帶 projectPath=\"C:\\\\Users\\\\user\\\\Documents\\\\GitHub\\\\KenazAI\",且 rune 內容一律用英文(MEM-LANG-001:中文 FTS5 查詢會回傳 0 結果)。",
18
- "synapse_inscribe 時必須把本次 recall/pulse 過的相關 rune_id 傳入 related_rune_ids 參數(SYN-012),否則 recall→acted_on 的學習迴路斷鏈。"
19
- ],
20
- "acceptance_criteria": [
21
- "六個 symbol 每一個都有 (a)/(b)/(c) 的明確結論 + 具體證據(檔名:行號 或 commit hash),沒有任何一個停在「不確定」。若真的無法判定,明說為什麼無法判定、需要什麼才能判定。",
22
- "sigil_d3b8f855b72f4f969bca5984213d1758 的六條不變量逐條有「仍遵守 / 已違反 / 已不適用」的判定。",
23
- "結論為 (b) 的項目已寫入 fix rune,報告中附上 rune_id 清單。結論為 (c) 的項目沒有被寫入任何 rune(避免製造噪音)。",
24
- "若有直接實作的修法:附上 diff 摘要,且該檔案的既有測試通過(Rust 檔用 `node <worktree>/dev/scripts/run-rust-tests.js <filter>`,腳本自動套用正典 CARGO_TARGET_DIR(來源 dev/scripts/verify-target-dir.js);TS 檔用專案既有的測試指令)。",
25
- "報告開頭用三行以內講清楚:六個之中幾個仍是真問題、幾個已修、幾個描述過期。這是使用者唯一必讀的一段。"
26
- ],
27
- "technical_notes": [
28
- "為什麼這張卡刻意不叫「補上缺失的 rune」:rune_count=0 是 synapse_knowledge_gaps 的指標,指標存在的目的是指向真相,不是本身成為目標。已知的認知陷阱是「標籤儀式取代感知」—— 為了讓指標好看而寫 rune,會產生一批內容空洞、confidence 虛高的 rune,反而污染日後的 recall。若查證後發現某個病理其實不存在,正確的產出是零個 rune 加一句誠實的說明。",
29
- "同一類的前車之鑑:TASK_1717(prefrontal_review MCP 工具)被開卡後才發現 2026-05-20 就已實作過(commit 025ec00e),原因正是沒有先驗證 baseline 就把認知系統的提示轉成任務(rune_35096708ea104fefb492db5987eb506c)。Huginn advisory 的既定紀律就是「advisory→task 需要 live baseline 驗證」。",
30
- "查證順序建議:先做 get_db_dir / get_synapse_dir / resolve_project_root 那組(danger 分數最高、有真實事故歷史、且路徑解析在跨平台與子專案情境下最容易悄悄壞掉)。isTauri 那組次之。",
31
- "isTauri 的「可偽造」要放在正確的威脅模型下評估:如果它只是用來決定 UI 分支(桌面 vs 瀏覽器),可偽造是無害的;如果有任何授權或檔案存取決策依賴它,那才是真問題。先查它的呼叫者(synapse_context)再下結論,不要看到 'spoofable' 就當成漏洞。",
32
- "TreeCache / ScanProgress::new 的「二次方 LRU」要用實際的資料規模檢驗:若快取上限是幾十筆,二次方在實務上無感;若會長到數千筆,才是真問題。給出上限的實際值再下結論。",
33
- "本卡不修改 scope 外的檔案。若查證指向某個檔案需要大改,開後續卡。",
34
- "來源:.kenaz/specialist/huginn_advisory.jsonl 的三則 2026-07-24 advisory 中的前兩則(第三則「認知記憶維護積壓」由 Ansuz 主幹自行處理,不在本卡範圍)。"
35
- ]
36
- }
@@ -1,38 +0,0 @@
1
- {
2
- "title": "索引噪音:scanner 對每個走到的檔案無條件建 File 節點,Unity 專案 85% 的索引是二進位資產",
3
- "description": "Ashfall(Unity)索引了 45,907 個檔案,其中 .meta 23,160(50.4%)、.png 13,352(29.1%)、.fbx 2,734(6.0%),合計 39,246 檔 = 85.5% 全是 Unity 中繼檔與二進位資產,沒有任何可抽取的語意;真正的程式碼(.cs 836 檔)只佔 1.8%。根因在 scanner.rs 第 1533 行:CREATE (f:File …) 對每個走到的檔案無條件執行,沒有任何二進位/資產過濾。同時 gitignore.rs 的 ALWAYS_IGNORED 只有 17 個目錄,沒有 Unity 的 Library/ Temp/ obj/ Logs/。後果不只是噪音:File 節點數膨脹會拖慢索引、稀釋 total_files 這個健康指標、並讓「未支援語言」的統計難以計算。",
4
- "priority": "P2",
5
- "role": "developer",
6
- "rigor": "medium",
7
- "complexity": "medium",
8
- "tags": ["fix", "code", "test"],
9
- "scope_paths": [
10
- "dashboard/src-tauri/src/features/synapse/scanner.rs",
11
- "dashboard/src-tauri/src/features/synapse/gitignore.rs"
12
- ],
13
- "estimated_hours": 3,
14
- "requirements": [
15
- "新增二進位/資產副檔名黑名單,命中者不建立 File 節點也不進 FTS。至少涵蓋:影像(png jpg jpeg gif bmp tga psd tiff webp ico)、3D(fbx obj blend dae 3ds max ma mb)、音訊(wav mp3 ogg aiff flac)、影片(mp4 mov avi webm)、二進位(dll so dylib exe pdb lib a o bin dat)、壓縮(zip 7z rar gz tar)、字型(ttf otf woff woff2)、Unity 專屬(meta prefab anim mat asset controller unity asmdef uasset physicMaterial cubemap renderTexture)。",
16
- "gitignore.rs ALWAYS_IGNORED 新增 Unity 感知目錄:Library、Temp、Obj、obj、Logs、Build、Builds、UserSettings、MemoryCaptures、.vs、.idea。注意既有比對是「目錄名」而非路徑,且需考慮大小寫(Windows 不分大小寫但 Linux 分,GEN-009 要求三平台一致)。",
17
- "ALWAYS_IGNORED 新增 worktree 目錄:`.formation/worktrees` 與 `.kenaz-worktrees` 是路徑片段而非單層目錄名,需確認既有 is_ignored 的比對邏輯能處理;若不能,實作路徑片段比對而不是硬塞單層名稱。",
18
- "黑名單必須可覆寫:若專案 .synapse/ 下存在設定檔(比照既有 durability.json 的載入模式),允許使用者加回特定副檔名。預設值走內建常數。",
19
- "重要 —— 不要一併排除 .json / .xml / .csv / .txt / .toml / .lock 這類文字資料檔。它們目前進 FTS 是有價值的(全文檢索得到),本卡只針對「無法抽取任何語意的二進位」。",
20
- "在索引結束的統計中回報被跳過的檔數(例如 tracing::info! 一行 skipped_binary=N),讓行為可觀測,不是靜默丟棄。"
21
- ],
22
- "acceptance_criteria": [
23
- "新增 Rust 單元測試驗證副檔名判定:(1) 上列各類二進位副檔名各抽樣至少一個,判定為跳過;(2) 原始碼副檔名(rs ts py go cs java cpp)判定為不跳過;(3) 文字資料副檔名(json xml csv txt toml yaml md)判定為不跳過。",
24
- "新增測試驗證 gitignore ALWAYS_IGNORED 的新條目:Library / Temp / Logs / obj 被忽略;名稱相近但不同的目錄(例如 LibraryManager、Template)不被誤傷。",
25
- "新增測試驗證 worktree 路徑片段(.formation/worktrees/xxx、.kenaz-worktrees/xxx)被忽略。",
26
- "測試以 `node <worktree>/dev/scripts/run-rust-tests.js <filter>` 執行並全數通過(腳本自動套用正典 CARGO_TARGET_DIR,來源 dev/scripts/verify-target-dir.js),log 貼進報告。",
27
- "`CARGO_TARGET_DIR=$(node <worktree>/dev/scripts/verify-target-dir.js) cargo check --lib -p kenaz-dashboard` 乾淨通過(exit 0)。",
28
- "既有 gitignore 測試(mod.rs 內的 node_modules 過濾測試等)全數通過,證明沒有回歸。"
29
- ],
30
- "technical_notes": [
31
- "Ansuz 對原始報告的一處修正(已查證,請以此為準):報告懷疑索引器走進 22 個 git worktree 副本重複索引同一份程式碼。這個懷疑**很可能不成立** —— Unity 的 .gitignore 會排除 Library/,而 Synapse 尊重 .gitignore;45,907 這個數字與「被 git 追蹤的 .meta/.png 全數進索引」吻合,而非 22 份副本(那會是數十萬)。所以 worktree 排除是防禦性加固(值得做,成本低),不是當前噪音的成因。不要在報告中宣稱修好了 worktree 重複索引,除非你實測證明它存在。",
32
- "本卡與 TASK_1797(C# 符號抽取)同樣修改 scanner.rs,但區域不同:TASK_1797 動的是第 1082 行的 detect_symbol_language(),本卡動的是第 1533 行附近的 File 節點建立與檔案走訪。**本卡必須在 TASK_1797 合併後才開工**,且 worktree 要從合併後的 main 開出來,避免同檔衝突。",
33
- "驗證環境:正典共用 CARGO_TARGET_DIR(來源 dev/scripts/verify-target-dir.js,Windows 為 C:/t/kenaz-verify)避開 vendor/kuzu 的 Windows MAX_PATH,不要自創新目錄(TASK_1879);並行驗證被 cargo 檔案鎖串行化,'Blocking waiting for file lock' + CPU 近 0 是正常等待不是 hang;不可共用主工作樹 target/(被 live tauri dev 佔用);不要用 cargo test --lib(STATUS_ENTRYPOINT_NOT_FOUND,TASK_1619),用 dev/scripts/run-rust-tests.js。",
34
- "跨平台(GEN-009):副檔名比對一律先轉小寫再比。Unity 在 Windows 上產生的副檔名大小寫不一致很常見(.PNG / .png)。",
35
- "行為變更的影響面:這會讓既有專案重新索引後 total_files 明顯下降。這是預期且正確的,但請在完成報告中明說,避免下游把它誤判為索引壞掉。",
36
- "來源報告:C:\\Users\\user\\Desktop\\SYNAPSE_CSHARP_INDEXING_REPORT.md(缺陷 3)。"
37
- ]
38
- }
@@ -1,38 +0,0 @@
1
- {
2
- "title": "Synapse 對未支援語言靜默失敗:status/search 假裝索引成功,把使用者推向已知無效路徑",
3
- "description": "對 C# 專案,synapse_status 回傳完整 last_indexed + 45,907 files + 46,391 FTS,synapse_search 回傳 indexing_status:\"fresh\" 且 result_count:0 —— 沒有任何訊號顯示該語言根本沒有 symbol parser。使用者與 Agent 收到的訊息是「這個專案沒有符合的程式碼」而不是「這個語言不支援」,兩者導致完全不同的行動。更糟的是 synapse-first hook 仍在每次 grep 時勸阻使用 Grep,系統主動把使用者推向一條已知無效的路徑。本卡讓未支援語言變成可見事實。與 C# parser 本身無關 —— 對 C++/Java/Swift/Kotlin/PHP/Ruby 等所有未支援語言同樣有效。",
4
- "priority": "P1",
5
- "role": "developer",
6
- "rigor": "medium",
7
- "complexity": "medium",
8
- "tags": ["code", "fix", "test"],
9
- "scope_paths": [
10
- "dashboard/src-tauri/src/features/synapse/status.rs",
11
- "dashboard/src-tauri/src/infrastructure/http_server/routes/mcp_tools/synapse/search.rs"
12
- ],
13
- "estimated_hours": 3,
14
- "requirements": [
15
- "synapse_status 回傳新增 indexed_languages: string[] —— 從 Symbol 表實際 GROUP BY s.language 取得(不要寫死清單)。",
16
- "synapse_status 回傳新增 unsupported_languages: [{extension, files_skipped, reason}] —— 從 File 表 GROUP BY f.extension,扣掉 scanner::detect_symbol_language 認得的副檔名,且只列出「看起來是原始碼」的副檔名(見技術註記的判定策略),reason 固定為 \"no symbol parser\"。",
17
- "門檻:unsupported_languages 只列出 files_skipped 達到有意義規模的項目(建議 >= 10 檔或佔專案原始碼檔 >= 5%,實作者可自訂但必須把門檻寫進註解並可測),避免單一 .lua 腳本就洗版。",
18
- "synapse_search:當 result_count == 0 且該專案的 unsupported_languages 非空時,next_steps 必須改成建議使用 Grep/Glob 並明確點名未支援的副檔名,而不是目前無意義的 synapse_detect_changes 建議。",
19
- "synapse_search 回傳新增一個明確欄位(例如 unsupported_languages_present: [{extension, files_skipped}]),讓程式化消費者不必解析 next_steps 的自然語言。",
20
- "indexing_status 語意不要改(\"fresh\" 仍指索引時間新鮮)—— 新欄位負責表達覆蓋率,兩者是不同維度,混在一起會製造新的誤導。"
21
- ],
22
- "acceptance_criteria": [
23
- "新增 Rust 單元測試驗證未支援語言判定邏輯:(1) 純二進位/資產副檔名(png/fbx/meta/dll)不得出現在 unsupported_languages;(2) 常見未支援原始碼副檔名(cs/java/cpp/swift/kt)在檔數超過門檻時必須出現;(3) 已支援副檔名(rs/ts/py/go)永遠不得出現在 unsupported_languages。",
24
- "新增測試驗證 search 的 0 筆分支:有未支援語言時 next_steps 含 Grep 建議且不含 detect_changes 建議;無未支援語言時維持既有行為不變。",
25
- "測試以 `node <worktree>/dev/scripts/run-rust-tests.js <filter>` 執行並全數通過(腳本自動套用正典 CARGO_TARGET_DIR,來源 dev/scripts/verify-target-dir.js),log 貼進完成報告。",
26
- "`CARGO_TARGET_DIR=$(node <worktree>/dev/scripts/verify-target-dir.js) cargo check --lib -p kenaz-dashboard` 乾淨通過(exit 0)。",
27
- "既有 synapse_status 欄位(project_name/last_indexed/total_files/total_folders/fts_entries/symbol_entries/relationships/embedding_entries/rune_count/sigil_count)全部保留、型別不變 —— 純新增欄位,不得改動既有欄位語意或名稱。",
28
- "不得修改 symbols.rs / scanner.rs —— 那是平行進行中的 C# parser 卡的範圍,越界會衝突。若需要取得已支援副檔名清單,透過呼叫既有的 scanner::detect_symbol_language 而不是複製一份清單。"
29
- ],
30
- "technical_notes": [
31
- "「看起來是原始碼」的判定策略建議:在 status.rs 內維護一份 KNOWN_SOURCE_EXTENSIONS 常數(cs, java, cpp, cc, cxx, h, hpp, swift, kt, kts, rb, php, lua, scala, dart, ex, exs, zig, m, mm, vb, fs, clj, hs, ml, pl, r, jl, sh, ps1 …),只有落在這份清單且不在 detect_symbol_language 支援範圍內的才計入。反向的黑名單(排除二進位)在 Unity 專案上不可靠,因為資產副檔名多到列不完。",
32
- "另一個可考慮的策略是「檔案內容可解為 UTF-8 文字且非空」,但那需要重讀檔案,成本高;白名單方案先做,若之後要更泛用再議。",
33
- "已知的內部不一致(不在本卡範圍但實作時會看到):synapse_status 回報 symbol_entries: 387,但按語言加總 Symbol 表為 433,差 46。這由另一張診斷卡處理,本卡不要順手改,但若在 status.rs 裡發現明確原因請寫進完成報告。",
34
- "驗證環境:Rust 驗證一律用正典共用 CARGO_TARGET_DIR(來源 dev/scripts/verify-target-dir.js,Windows 為 C:/t/kenaz-verify)避開 vendor/kuzu 的 MAX_PATH,不要自創新目錄(TASK_1879:51 個一次性目錄 693.9 GB 從未被回收)。並行驗證會被 cargo 檔案鎖串行化:卡在 'Blocking waiting for file lock'、CPU 近 0 是正常等待不是 hang(持鎖行程 0% CPU 且無 rustc 子行程才是孤兒 build)。cargo test --lib 會 STATUS_ENTRYPOINT_NOT_FOUND,必須改用 dev/scripts/run-rust-tests.js。主工作樹 target/ 被 live tauri dev 佔用,不可共用。",
35
- "MCP 線路投影陷阱(rune_4920686de6484cb68b5ead49943ea44d):search.rs 的 json!{} 投影層曾靜默漏掉 symbol_id 這類欄位。新增欄位時務必確認它在所有回傳分支(grouped 與 flat)都有被投影出去,並確認 response_compression.rs 的白名單不會把新欄位濾掉。",
36
- "來源報告:C:\\Users\\user\\Desktop\\SYNAPSE_CSHARP_INDEXING_REPORT.md(缺陷 2,報告作者列為 P0)。"
37
- ]
38
- }
@@ -1,390 +0,0 @@
1
- # ADR: Requirement-Graph (RG) Layer Above Sigils
2
-
3
- **Status**: YELLOW — Proceed with reduced scope
4
- **Date**: 2026-05-17
5
- **Task**: TASK_1427
6
- **References**: arXiv:2504.10046 (GraphCodeAgent), arXiv:2601.20810 (PKG), arXiv:2505.16901 (CodeFuse-CGM)
7
-
8
- ---
9
-
10
- ## 1. Context & Problem Statement
11
-
12
- KenazAI has a mature Structural-Semantic Code Graph (SCG) in KuzuDB — 23 schema versions,
13
- symbols, CALLS/IMPLEMENTS/DATA_FLOWS/EXTENDS edges, community detection, and Sigils.
14
- What is **missing** is the *intent layer* — a machine-readable graph answering:
15
-
16
- - "What symbols realize TASK_xxxx's intent?"
17
- - "Given a new requirement description, which files/Sigils are most relevant?"
18
- - "Which past tasks are semantically similar, and what did they touch?"
19
-
20
- Today scope_paths are set manually by a human or Huginn proposal. No structural path from
21
- "task description" → "predicted scope" exists. This ADR evaluates whether a Requirement
22
- Graph (RG) layer — inspired by GraphCodeAgent's dual-graph approach — is worth building.
23
-
24
- ---
25
-
26
- ## 2. GraphCodeAgent Analysis (arXiv:2504.10046)
27
-
28
- ### RG Schema (paper original)
29
-
30
- **Node types** (per-symbol requirement nodes):
31
- - FunctionRequirement — functional description of a function; attributes: name, source_code, file_path
32
- - ClassRequirement — same for classes
33
- - MethodRequirement — same for methods
34
-
35
- **Edge types**:
36
-
37
- | Edge | Direction | Semantics |
38
- |------|-----------|-----------|
39
- | Parent-Child | Directed | Parent invokes child; structural dependency expressed as requirement dependency |
40
- | SemanticSimilarity | Undirected | Two requirements have similar functionality |
41
-
42
- **Construction pipeline**:
43
- 1. tree-sitter extracts all functions/classes/methods from the repository
44
- 2. LLM (DeepSeek-V2.5) generates functional requirement descriptions for each symbol
45
- 3. LLM annotates Parent-Child and SemanticSimilarity relations between nodes
46
- 4. PhD candidates verify/correct (for the DevEval benchmark)
47
-
48
- **Bridge to SCG** (DualGraphMapping tool):
49
- - Node identity key: file_path::symbol_name — same format as Synapse stable symbol IDs
50
- - Enables precise RG -> SCG mapping; then multi-hop traversal via SSCGTraverse
51
-
52
- **Multi-hop retrieval steps**:
53
- 1. RGRetrieval: find subrequirement nodes (Parent-Child) + semantically similar nodes
54
- 2. DualGraphMapping: map RG nodes to SCG code nodes via file_path::name indexing
55
- 3. SSCGTraverse: multi-hop BFS/DFS from mapped nodes (configurable direction + hops)
56
- 4. Optional WebSearch for domain knowledge
57
- 5. Code generation + CodeTesting validation loop
58
-
59
- **Results on DevEval**:
60
- - GPT-4o: 58.14% Pass@1 vs 40.43% (Dense RACG baseline) = **+43.81% relative improvement**
61
- - Gemini-1.5-Pro: 54.74% vs 39.34% = **+39.15%**
62
-
63
- ### Key Insight from GraphCodeAgent
64
-
65
- GraphCodeAgent's RG nodes represent *what each existing symbol does* (functional descriptions
66
- extracted from source). Retrieval is the "pull side": given a target requirement, find
67
- structurally and semantically related existing symbols.
68
-
69
- ### Complementary Insight from PKG (arXiv:2601.20810)
70
-
71
- Context-Augmented Code Generation using Programming Knowledge Graphs:
72
- - Fine-grained node decomposition (sub-function granularity)
73
- - Tree pruning: removes irrelevant call-graph branches, keeping only paths relevant to query
74
- - Re-ranking retrieved candidates by relevance to query
75
- - Results: +20% HumanEval, +34% MBPP over baseline RAG
76
-
77
- **Implication for KenazAI**: Multi-hop SCG expansion should use pruning (relevance threshold)
78
- rather than full BFS expansion. You don't need all neighbors — only the pruned subtree.
79
-
80
- ---
81
-
82
- ## 3. KenazAI Existing Artifacts
83
-
84
- ### Mapping to RG concepts
85
-
86
- | RG Concept | KenazAI Equivalent | Gap |
87
- |-----------|-------------------|-----|
88
- | Requirement node (per-symbol) | Symbol node in KuzuDB | Exists structurally; no LLM functional descriptions |
89
- | Parent-Child edge | CALLS/IMPLEMENTS in SCG | Fully present |
90
- | SemanticSimilarity (symbol level) | Sigil membership (community detection) | Partial — community level, not pairwise |
91
- | Target requirement (what to build) | Task.description + Task.requirements[] | Structured YAML — exists |
92
- | Retrieval result (scope files) | Task.scope_paths | Historical ground truth — exists |
93
- | Task-to-symbol mapping | **MISSING** — humans set scope_paths manually | Critical gap |
94
- | Task-to-task similarity | **MISSING** — no task embedding stored | Gap |
95
- | Task dependencies | Task.dependencies[] (TASK_XXX ids) | Structural only |
96
-
97
- ### Task corpus analysis
98
-
99
- - Total tasks: 1,286 (11 done + 1,275 archived)
100
- - Early tasks (TASK_015-200): mostly directory-level paths (dashboard/, dashboard/src-tauri/)
101
- - Recent tasks (TASK_800+): file-level paths (dashboard/src-tauri/src/features/synapse/context.rs)
102
- - Estimated 300-500 tasks have file-level scope_paths usable as retrieval benchmark ground truth
103
-
104
- ### Decision runes as implicit REQUIRES_SYMBOL
105
-
106
- Decision runes (type=decision) carry symbol_id = the symbol they describe. These are
107
- REQUIRES_SYMBOL edges in disguise — a task decided to implement something in a symbol.
108
- This existing RG substrate is exploitable immediately without schema changes.
109
-
110
- ---
111
-
112
- ## 4. KenazAI-Specific RG Design
113
-
114
- ### Use case difference
115
-
116
- GraphCodeAgent RG: "Given a target function to implement, find related existing code" (pull)
117
- KenazAI RG: "Given a new task description, predict which files to modify" (push)
118
-
119
- Same graph mechanism, different query direction. KenazAI primary use case is scope
120
- prediction (file-level), not code generation from scratch.
121
-
122
- ### Proposed Minimal Viable Schema
123
-
124
- **RG Node Types (2 for MVP)**:
125
-
126
- ```
127
- TaskIntent {
128
- id: STRING PRIMARY KEY, -- TASK_XXX
129
- title: STRING,
130
- description: STRING,
131
- requirements_text: STRING, -- concatenated requirements[]
132
- tags: STRING[],
133
- priority: STRING,
134
- complexity: STRING,
135
- role: STRING,
136
- status: STRING
137
- }
138
-
139
- Requirement {
140
- id: STRING PRIMARY KEY, -- TASK_XXX_req_N
141
- task_id: STRING,
142
- text: STRING,
143
- idx: INT64
144
- }
145
-
146
- -- DesignDecision: use existing rune system (type=decision), not a new node type.
147
- -- Runes with symbol_id already encode TaskIntent -> Symbol implicitly.
148
- ```
149
-
150
- **RG Edge Types (3 for MVP, 5 total with future extensions)**:
151
-
152
- ```
153
- REALIZED_BY (TaskIntent -> File)
154
- confidence DOUBLE -- 1.0 from scope_paths, 0.5 inferred from dependencies
155
-
156
- TASK_DEPENDS_ON (TaskIntent -> TaskIntent)
157
- (no extra properties)
158
-
159
- SIMILAR_INTENT (TaskIntent -> TaskIntent)
160
- similarity DOUBLE -- cosine similarity
161
- method STRING -- "tfidf" | "embedding"
162
-
163
- -- Future P3:
164
- -- HAS_REQUIREMENT (TaskIntent -> Requirement)
165
- -- TARGETS_SYMBOL (Requirement -> Symbol) -- LLM-extracted, expensive
166
- -- REQUIRES_SIGIL (TaskIntent -> Sigil) -- derived from REALIZED_BY + BELONGS_TO
167
- ```
168
-
169
- ### Storage Decision: SQLite, NOT KuzuDB
170
-
171
- Key constraint: KuzuDB schema version bump = full destructive reindex of ~40K symbols
172
- (multi-minute operation). Adding TaskIntent to KuzuDB would trigger this every schema change.
173
-
174
- Recommendation: Store RG in separate SQLite database (task_graph.db). Decouples:
175
- - RG updates: frequent, per task-complete, milliseconds
176
- - SCG reindexing: expensive, per file change, minutes
177
-
178
- Bridge queries cross both DBs via file_path key.
179
-
180
- ### Retrieval Algorithm (3 phases)
181
-
182
- ```
183
- Phase 1 — Anchor Task Retrieval
184
- Input: new task text Q = title + description + requirements_text
185
- Method: TF-IDF cosine similarity over TaskIntent corpus
186
- Output: K=10 most similar historical tasks (anchor_tasks)
187
-
188
- Phase 2 — File Aggregation (RG traversal)
189
- For each anchor_task T_i with similarity score s_i:
190
- files = REALIZED_BY(T_i)
191
- score[file] += s_i * (1 / rank_in_scope_paths)
192
- Optional: follow TASK_DEPENDS_ON edges at 0.5 weight discount
193
- Output: ranked file list by aggregated score
194
-
195
- Phase 3 — SCG Expansion (pruned, optional)
196
- For each top-5 file from Phase 2:
197
- neighbors = synapse_context(file, direction=both, depth=1)
198
- For each neighbor_file appearing in >=2 anchor_task scope_paths:
199
- score[neighbor_file] += 0.2 * (count / K)
200
- Output: final ranked file list with SCG-expanded candidates
201
- ```
202
-
203
- ### Comparison to GraphCodeAgent
204
-
205
- | Dimension | GraphCodeAgent | KenazAI RG (YELLOW) |
206
- |-----------|---------------|---------------------|
207
- | RG node granularity | Per-symbol | Per-task |
208
- | RG construction | LLM per symbol (expensive offline) | Load from task YAML (free, online) |
209
- | Bridge to SCG | file::name string match | file_path -> DEFINES -> Symbol |
210
- | Multi-hop traversal | SSCGTraverse configurable depth | Phase 3 depth=1 pruned |
211
- | Intent side | Target function description | Task.description + requirements[] |
212
- | Evaluation metric | Code generation Pass@1 | Scope prediction Recall@K |
213
-
214
- ---
215
-
216
- ## 5. Prototype Benchmark
217
-
218
- **Script**: .specialist/experiments/rg_benchmark.js
219
- **Run**: node .specialist/experiments/rg_benchmark.js
220
-
221
- ### Dataset
222
-
223
- - Total tasks: 1,286 (11 done + 1,275 archived)
224
- - Filter: tasks with >= 1 file-level scope_path (has extension, not just directory)
225
- - Expected filtered count: ~380 tasks
226
- - Evaluation: leave-one-out cross-validation on filtered subset
227
-
228
- ### Methods compared
229
-
230
- 1. RG TF-IDF k-NN (k=10): TF-IDF over task text, cosine k-NN, aggregate scope_paths
231
- 2. Frequency baseline: globally most-common files across all tasks
232
- 3. Dependency baseline: scope_paths of direct task dependencies only
233
-
234
- ### Actual results (run 2026-05-17, N=941 tasks)
235
-
236
- | Method | Recall@5 | Recall@10 | MRR@10 | nDCG@10 |
237
- |--------|----------|-----------|--------|---------|
238
- | Frequency baseline | 0.1644 | 0.2695 | 0.1614 | 0.1635 |
239
- | Dependency baseline | 0.1174 | 0.1196 | 0.1468 | 0.1188 |
240
- | RG TF-IDF k-NN (k=10) | 0.2955 | 0.3735 | 0.3301 | 0.2943 |
241
-
242
- RG vs Frequency Recall@10 ratio: **1.39x** (threshold was 2.0x)
243
-
244
- ### Analysis of actual results
245
-
246
- Three findings are non-obvious from the benchmark data:
247
-
248
- 1. **Frequency baseline is much higher than expected (26.95% Recall@10)**: KenazAI has a
249
- heavy-tailed file distribution — context.rs, schema.rs, scanner.rs appear in a large
250
- fraction of tasks. The frequency prior is a strong baseline that any method must beat.
251
-
252
- 2. **RG TF-IDF shows real improvement (+10pp absolute at Recall@10, MRR +17pp)**: The 1.39x
253
- ratio misses the 2x threshold, but the absolute improvement is genuine. At MRR@10 (0.33
254
- vs 0.16), RG ranks the first correct file 2x higher in the list — practically useful.
255
-
256
- 3. **TF-IDF is the weakest possible similarity method**: It requires token overlap between
257
- task descriptions. With SFR-Embedding-Code-400M (TASK_1425, already planned), semantic
258
- similarity between tasks with different vocabulary (e.g., "fix embedding latency" vs
259
- "optimize vector search throughput") would significantly improve Phase 1 anchor retrieval.
260
- We estimate embedding-based similarity would push Recall@10 to 0.45-0.55, giving ~1.7-2.0x.
261
-
262
- ### Threshold revision
263
-
264
- The 2x threshold was a design-time estimate based on IR literature. With actual data showing
265
- 1.39x TF-IDF, the revised threshold analysis is:
266
-
267
- - TF-IDF k-NN alone: 1.39x (BELOW threshold, but provides real signal)
268
- - With SFR embedding: estimated 1.7-2.0x (near or above threshold)
269
- - With Phase 3 SCG expansion: additional +5-10pp expected (above threshold)
270
-
271
- The YELLOW recommendation stands: the underlying signal is real; the limiting factor is
272
- the TF-IDF similarity method, not the RG concept itself. Implement TASK_RG_1 with
273
- embedding-based similarity (not TF-IDF) as Phase 1 retrieval method.
274
-
275
- ---
276
-
277
- ## 6. Recommendation: YELLOW
278
-
279
- **Proceed with reduced scope: file-level RG, SQLite storage, no LLM-per-symbol step.**
280
-
281
- ### Why YELLOW, not GREEN
282
-
283
- GREEN = full GraphCodeAgent reproduction:
284
- - LLM requirement extraction per symbol (~40K symbols, costly offline pipeline)
285
- - Symbol-level TARGETS_SYMBOL edges needing LLM judgment per requirement x symbol pair
286
- - Full multi-hop SSCGTraverse replication with quality validation
287
-
288
- KenazAI scope prediction does NOT require symbol-level RG. File-level prediction from
289
- task-to-task similarity is sufficient. Full symbol-level would be justified only if
290
- KenazAI were doing autonomous code generation from scratch.
291
-
292
- ### Why YELLOW, not RED
293
-
294
- Sigils alone are insufficient:
295
- - Sigils group symbols by co-change/semantic similarity (structural cohesion)
296
- - Sigils do NOT encode "what should change for THIS SPECIFIC intent" (no task-side signal)
297
- - A "fix embedding model" task and "fix embedding latency" task both touch the same Sigil
298
- but need very different files. Task text provides the discriminating signal.
299
-
300
- ### Follow-up Tasks (3 bounded tasks, 3-4 weeks total)
301
-
302
- TASK_RG_1 [1-2 weeks]: SQLite task_graph.db + ingestor
303
- - Schema: TaskIntent + REALIZED_BY tables in SQLite
304
- - Ingestor: reads done/ + archived/ task YAMLs, populates DB
305
- - Hook: post-complete trigger updates task_graph.db on each task completion
306
- - Scope: .specialist/task_graph/ (new module, NOT in Synapse Rust)
307
-
308
- TASK_RG_2 [1 week]: synapse_predict_scope MCP tool
309
- - Input: task description text or live task_id
310
- - Output: ranked file predictions with confidence scores
311
- - Algorithm: Phase 1+2 retrieval from section 4
312
- - Scope: new HTTP handler + JS MCP tool definition
313
-
314
- TASK_RG_3 [1 week]: Huginn integration
315
- - Huginn proposal creation calls synapse_predict_scope
316
- - Formation Lead uses predicted scope as default scope_paths
317
- - Feedback loop: compare predicted vs actual scope_paths post-completion
318
-
319
- ---
320
-
321
- ## 7. Out-of-Scope (explicit, to prevent scope creep)
322
-
323
- The following are NOT part of this YELLOW implementation:
324
-
325
- 1. LLM per-symbol requirement extraction — expensive offline pipeline, P3 if justified by data
326
- 2. TARGETS_SYMBOL edges at sub-file granularity — needs LLM judgment per pair, P3
327
- 3. Full GraphCodeAgent reproduction — multi-week effort, separate initiative
328
- 4. REQUIRES_SIGIL edges — derivable from REALIZED_BY + BELONGS_TO, auto-compute in follow-up
329
- 5. Real-time SCG Phase 3 expansion beyond depth=1 — latency concern, P3 optimization
330
- 6. Task-specific embedding model training — TF-IDF + existing ONNX is sufficient for MVP
331
- 7. Cross-project RG — Cortex handles cross-project; single-project RG only in scope
332
-
333
- ---
334
-
335
- ## 8. TASK_1372 Alignment (PROMPT_INJECTS_INTO)
336
-
337
- TASK_1372 implements PROMPT_INJECTS_INTO edges: File -> Symbol (substrate file injects
338
- content into a prompt-builder symbol at inference time). This is a structural data-flow edge.
339
-
340
- Relationship to RG:
341
- - PROMPT_INJECTS_INTO = runtime data flow: how substrate files are consumed at inference time
342
- - REALIZED_BY in RG = historical evidence: what files were touched to implement a task
343
-
344
- These are complementary and non-redundant:
345
- - PROMPT_INJECTS_INTO answers: "which substrate shapes this symbol at runtime?"
346
- - REALIZED_BY answers: "which files were historically changed for tasks like this?"
347
-
348
- Naming convention: Both use UPPER_SNAKE_CASE directional verbs. No conflict.
349
- No blocking dependency: TASK_1372 proceeds independently.
350
- Harmonize edge naming conventions for future TARGETS_SYMBOL/REQUIRES_SIGIL at that point.
351
-
352
- ---
353
-
354
- ## 9. Alternatives Considered
355
-
356
- **Alternative A (RED — Sigils alone)**: Rejected. Sigils capture structural cohesion, not
357
- task intent. Task text provides a stronger discriminating signal for scope prediction.
358
-
359
- **Alternative B (GREEN — full symbol-level GraphCodeAgent)**: Deferred to P3. High LLM
360
- cost, marginal gain for KenazAI primary use case (scope prediction vs code generation).
361
-
362
- **Alternative C (no graph, pure embedding)**: Inferior. Graph structure captures temporal
363
- evidence (what actually changed) that embeddings alone cannot. Also enables SCG expansion.
364
-
365
- ---
366
-
367
- ## 10. Schema.rs Note (v24, NOT recommended)
368
-
369
- The sigil.rs file referenced in TASK_1427 scope_paths does not currently exist. If sigil-level
370
- RG integration is implemented, sigil.rs would be the natural home for REQUIRES_SIGIL query logic.
371
-
372
- If TaskIntent nodes are ever moved from SQLite to KuzuDB (not recommended), schema version
373
- would bump to v24, triggering full reindex. SQLite-first approach deliberately avoids this.
374
-
375
- KuzuDB schema (documented for future reference, NOT implemented in this task):
376
-
377
- ```sql
378
- -- v24 = Requirement Graph TaskIntent nodes
379
- -- NOTE: Triggers full destructive reindex. Use SQLite task_graph.db instead.
380
- CREATE NODE TABLE TaskIntent(
381
- id STRING, title STRING, description STRING,
382
- requirements_text STRING, tags STRING[],
383
- priority STRING, complexity STRING, role STRING,
384
- status STRING, PRIMARY KEY(id)
385
- )
386
- CREATE REL TABLE REALIZED_BY(FROM TaskIntent TO File, confidence DOUBLE, MANY_MANY)
387
- CREATE REL TABLE TASK_DEPENDS_ON(FROM TaskIntent TO TaskIntent, MANY_MANY)
388
- CREATE REL TABLE SIMILAR_INTENT(FROM TaskIntent TO TaskIntent,
389
- similarity DOUBLE, method STRING, MANY_MANY)
390
- ```