kenaz 0.3.10 → 0.3.12
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.
- package/core/.claude/skills/code_reviewer/SKILL.md +0 -1
- package/core/.claude/skills/code_reviewer/patterns.yaml +0 -8
- package/core/.claude/skills/dev_agent/SKILL.md +3 -6
- package/core/.claude/skills/heimdall/SKILL.md +5 -6
- package/core/.claude/skills/huginn/SKILL.md +11 -38
- package/core/.collaboration/core/task-2288-followups.test.js +2 -37
- package/core/.collaboration/core/task-2421-replica.test.js +229 -0
- package/core/.collaboration/core/task-api.js +223 -230
- package/core/.collaboration/core/task-api.test.js +1 -138
- package/core/.collaboration/core/task-replica.js +189 -0
- package/core/.formation/.merge-lock +1 -0
- package/core/.formation/bifrost/codex-doctor.js +12 -2
- package/core/.formation/bifrost/codex-doctor.test.js +15 -0
- package/core/.formation/bifrost/launch.js +2 -2
- package/core/.formation/bifrost/launch.test.js +2 -2
- package/core/.formation/bifrost/setup-codex.js +84 -16
- package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
- package/core/.formation/bifrost/shared/codex-injection.js +3 -17
- package/core/.formation/bifrost/shared/consolidate.js +1 -51
- package/core/.formation/bifrost/sync.js +4 -5
- package/core/.formation/tools/__tests__/subagent-bifrost-guard.test.js +1 -1
- package/core/.formation/tools/dispatch.js +2 -2
- package/core/.formation/tools/kenaz-stats.js +1 -1
- package/core/.formation/tools/mcp-allowlist.test.js +5 -3
- package/core/.formation/tools/post-complete/bounded-http.js +1 -40
- package/core/.formation/tools/post-complete/bounded-http.test.js +2 -89
- package/core/.formation/tools/post-complete/cognitive.js +2 -119
- package/core/.formation/tools/post-complete/task2420.test.js +129 -0
- package/core/.formation/tools/post-complete/testing.js +3 -21
- package/core/.formation/tools/post-complete.js +131 -436
- package/core/.formation/tools/post-complete.test.js +0 -135
- package/core/.formation/tools/route-audit.test.js +8 -20
- package/core/.kenaz/specialist/memory_guard_fired.json +1 -1
- package/core/.kenaz/specialist/memory_guard_trigger_cache.json +1 -1
- package/core/.rule/INDEX.yaml +3 -3
- package/core/.rule/general/ddx-synapse-stack.yaml +11 -11
- package/core/.rule/general/specialist-identity-contract.yaml +5 -5
- package/core/.rule/general/synapse-code-intelligence.yaml +25 -111
- package/core/.rule/general/worktree-isolation.yaml +2 -2
- package/core/.rule/pipeline/task-execution.yaml +6 -9
- package/core/.specialist/Amelia/README.md +5 -5
- package/core/.specialist/Amelia/capability.yaml +10 -18
- package/core/.specialist/Amelia/knowledge.yaml +15 -66
- package/core/.specialist/Amelia/workflow.yaml +12 -21
- package/core/.specialist/Ansuz/capability.yaml +12 -87
- package/core/.specialist/Ansuz/concepts/autonomous_agenda.yaml +1 -1
- package/core/.specialist/Ansuz/concepts/autonomy_contract.yaml +2 -3
- package/core/.specialist/Ansuz/concepts/capability_pointers.yaml +1 -3
- package/core/.specialist/Ansuz/concepts/cognitive_fluency_contract.yaml +8 -21
- package/core/.specialist/Ansuz/concepts/cognitive_systems_overview.yaml +0 -4
- package/core/.specialist/Ansuz/concepts/cognitive_systems_turn_context.yaml +1 -1
- package/core/.specialist/Ansuz/concepts/completion_tracking.yaml +0 -1
- package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +0 -3
- package/core/.specialist/Ansuz/concepts/evolvable_guardrails.yaml +3 -3
- package/core/.specialist/Ansuz/concepts/fatigue_handoff.yaml +1 -7
- package/core/.specialist/Ansuz/concepts/guardrails_immutable.yaml +3 -4
- package/core/.specialist/Ansuz/concepts/identity.yaml +1 -2
- package/core/.specialist/Ansuz/concepts/phase9_verification.yaml +0 -1
- package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +3 -4
- package/core/.specialist/Ansuz/core.yaml +3 -6
- package/core/.specialist/Ansuz/elixir.yaml +6 -6
- package/core/.specialist/Ansuz/exo_cortex_tools.yaml +5 -9
- package/core/.specialist/Ansuz/guards/blind_spot_guards.yaml +2 -2
- package/core/.specialist/Ansuz/guards/lesson_guards.yaml +6 -19
- package/core/.specialist/Ansuz/identity_contract.yaml +4 -4
- package/core/.specialist/Ansuz/knowledge.yaml +13 -40
- package/core/.specialist/Ansuz/modules/ddx.yaml +2 -2
- package/core/.specialist/Ansuz/modules/prophecy.yaml +19 -19
- package/core/.specialist/Ansuz/modules/pulse_empty.yaml +6 -17
- package/core/.specialist/Ansuz/tools/ansuz-handoff-snapshot.js +3 -102
- package/core/.specialist/Ansuz/tools/ansuz-sdk-runner.js +2 -44
- package/core/.specialist/Ansuz/workflow.yaml +32 -76
- package/core/.specialist/Forseti/core.yaml +2 -7
- package/core/.specialist/Forseti/rule.yaml +1 -1
- package/core/.specialist/Heimdall/SKILL.md +2 -3
- package/core/.specialist/Heimdall/capability.yaml +22 -45
- package/core/.specialist/Heimdall/core.yaml +24 -126
- package/core/.specialist/Heimdall/principles.yaml +8 -11
- package/core/.specialist/Heimdall/rule.yaml +2 -2
- package/core/.specialist/Huginn/capability.yaml +31 -52
- package/core/.specialist/Huginn/core.yaml +43 -123
- package/core/.specialist/Huginn/principles.yaml +5 -5
- package/core/.specialist/Huginn/rule.yaml +3 -9
- package/core/.specialist/REFLECTION_TO_CONTROL.md +3 -4
- package/core/.specialist/shared/guard_schema.json +1 -1
- package/core/.specialist/shared/principles.yaml +6 -6
- package/core/.specialist/tools/__tests__/rea-detect.test.js +10 -0
- package/core/.specialist/tools/phase-gate.js +10 -230
- package/core/.specialist/tools/phase-gate.test.js +2 -2
- package/core/.specialist/tools/prompt-files.test.js +1 -1
- package/core/.specialist/tools/rea-detect.js +6 -2
- package/core/.specialist/tools/session.js +2 -89
- package/core/.synapse/memory-shared.json.sync +1 -0
- package/core/.system/memory/README.md +3 -0
- package/core/CLAUDE.md +6 -7
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dev/plans/CLI_FIRST_INSTALL_FLOW.md +75 -83
- package/core/dev/specs/peer/CODEX_MANAGED_DAEMON.md +54 -0
- package/core/dev/specs/peer/setup-codex-hooks.test.js +38 -0
- package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +56 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +1 -0
- package/core/plugins/kenaz/INVENTORY.md +1 -1
- package/core/plugins/kenaz/scripts/kenaz.test.js +70 -1
- package/core/plugins/kenaz/scripts/ygg.js +45 -4
- package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +0 -1
- package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +0 -8
- package/core/plugins/kenaz/skills/dev_agent/SKILL.md +3 -6
- package/lib/cli.js +17 -9
- package/lib/cli.test.js +10 -0
- package/lib/dashboard.test.js +3 -3
- package/package.json +6 -6
- package/vendor/install-kenaz-cli.js +167 -16
- package/core/.claude/hooks/handoff-snapshot-on-decision.js +0 -188
- package/core/.claude/skills/synapse_maintain/SKILL.md +0 -84
- package/core/.collaboration/core/task-2264-single-after-capture.test.js +0 -61
- package/core/.formation/tools/alaya-gate.js +0 -198
- package/core/.formation/tools/post-complete/health.js +0 -464
- package/core/.formation/tools/post-complete/task2038.test.js +0 -246
- package/core/.formation/tools/post-complete/task2341.test.js +0 -74
- package/core/.rule/general/cortex-tools.yaml +0 -181
- package/core/.rule/general/memory-language.yaml +0 -67
- package/core/.rule/general/memory-source-priority.yaml +0 -207
- package/core/.rule/general/synapse-cognitive-fusion.yaml +0 -301
- package/core/.specialist/Ansuz/concepts/cognitive_systems_hippocampus.yaml +0 -14
- package/core/.specialist/Ansuz/concepts/write_verification.yaml +0 -26
- package/core/.specialist/Ansuz/modules/recall.yaml +0 -45
- package/core/.specialist/tools/MEMORY_RECALL_TRIGGERS.md +0 -156
- package/core/.specialist/tools/context-injection.js +0 -395
- package/core/dev/scripts/probe/hippocampus-concurrency.js +0 -247
|
@@ -142,7 +142,7 @@ capabilities:
|
|
|
142
142
|
# ─── 預言比較(Prophetic Comparison) ───
|
|
143
143
|
# §prophetic_comparison
|
|
144
144
|
prophetic_comparison:
|
|
145
|
-
description: "多方案時,對每個方案的目標 symbol 各跑 kenaz_lsp_callers +
|
|
145
|
+
description: "多方案時,對每個方案的目標 symbol 各跑 kenaz_lsp_callers + kenaz_lsp_references,用結構數據選方案 — 不靠直覺"
|
|
146
146
|
source: "shared/principles.yaml → prophecy_over_trial"
|
|
147
147
|
when:
|
|
148
148
|
- "Phase 2 識別出 2+ 實作方案(不同 symbol/不同模組/不同架構路徑)"
|
|
@@ -165,110 +165,35 @@ capabilities:
|
|
|
165
165
|
- "✅ 沒把握 → 標記為待確認"
|
|
166
166
|
- "✅ 有多種可能 → 列選項 + 依據,讓 用戶 決定"
|
|
167
167
|
|
|
168
|
-
# ───
|
|
169
|
-
# §
|
|
170
|
-
|
|
171
|
-
description: "
|
|
168
|
+
# ─── 代碼導航 ───
|
|
169
|
+
# §code_navigation
|
|
170
|
+
code_navigation:
|
|
171
|
+
description: "用 LSP 與 Grep 提升決策品質(記憶系統 synapse_*/cortex_* 已於 TASK_2411 移除;教訓用 `kenaz learn add` 或 native memory 檔)"
|
|
172
172
|
tools:
|
|
173
173
|
kenaz_lsp_callers: "誰呼叫它 — LSP call hierarchy(projectPath, file, line 或 symbol, depth)"
|
|
174
174
|
kenaz_lsp_references: "所有引用位置 — LSP find-references"
|
|
175
175
|
kenaz_lsp_definition: "定義位置 — LSP go-to-definition"
|
|
176
176
|
kenaz_lsp_symbols: "檔案/工作區 symbol 清單 — LSP document/workspace symbols"
|
|
177
177
|
Grep_Glob: "精確字串、正則、檔名搜尋(探索代碼的預設工具)"
|
|
178
|
-
synapse_status: "索引狀態檢查"
|
|
179
|
-
synapse_declare: "宣告 phantom symbol — 在設計階段預先建立計畫中的新 symbol(language=phantom)。支援 calls/called_by/implements 邊定義。TASK_753 已整合。"
|
|
180
178
|
trigger_rules:
|
|
181
|
-
|
|
182
|
-
- "「怎麼運作?」「有類似實現嗎?」→ Grep/Glob + Read"
|
|
179
|
+
use_lsp:
|
|
183
180
|
- "「誰呼叫它?」「誰 import 它?」「改了會影響哪裡?」→ kenaz_lsp_callers / kenaz_lsp_references"
|
|
184
181
|
- "「它定義在哪?」→ kenaz_lsp_definition"
|
|
185
|
-
- "「最近改了什麼?」→ git diff / git log"
|
|
186
182
|
- "「這個檔案有哪些 symbol?」→ kenaz_lsp_symbols"
|
|
187
183
|
use_grep:
|
|
184
|
+
- "「怎麼運作?」「有類似實現嗎?」→ Grep/Glob + Read"
|
|
188
185
|
- "精確字串匹配(錯誤訊息、常數值)"
|
|
189
186
|
- "正則搜尋(pattern matching)"
|
|
190
187
|
- "枚舉所有 X(已知關鍵字列舉)"
|
|
188
|
+
- "「最近改了什麼?」→ git diff / git log"
|
|
191
189
|
fallback:
|
|
192
|
-
rule: "
|
|
193
|
-
why: "
|
|
190
|
+
rule: "LSP 呼叫失敗 → 該 session 降級用 Grep/Glob"
|
|
191
|
+
why: "LSP 可能未就緒或 MCP 不可用,不可因此阻塞流程"
|
|
194
192
|
phase_integration:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
phase_3: "synapse_declare — 為計畫中的新 symbol 建立 phantom 節點(language=phantom);kenaz_lsp_callers / kenaz_lsp_references — 對現有 symbol 預覽影響範圍"
|
|
193
|
+
phase_2: "Grep/Glob — 搜尋代碼;kenaz_lsp_callers — 理解調用鏈"
|
|
194
|
+
phase_3: "kenaz_lsp_callers / kenaz_lsp_references — 對現有 symbol 預覽影響範圍"
|
|
198
195
|
phase_9: "git diff --stat + kenaz_lsp_callers — 驗證改動範圍和 regression"
|
|
199
196
|
|
|
200
|
-
# ─── Cortex 跨專案智能整合 ───
|
|
201
|
-
# §cortex_integration
|
|
202
|
-
cortex_integration:
|
|
203
|
-
description: "利用 Cortex 跨專案知識圖譜提升決策品質(多專案場景)"
|
|
204
|
-
rule: "規則詳見 .rule/general/cortex-tools.yaml(COR-001~004)"
|
|
205
|
-
tools:
|
|
206
|
-
cortex_search: "跨專案語義搜尋 — 找其他專案的相似實現、避免重複造輪子"
|
|
207
|
-
cortex_recall: "跨專案認知回憶 — 搜尋所有專案的 Rune/Sigil 歷史知識"
|
|
208
|
-
cortex_status: "跨專案數據概覽 — 各專案 Synapse/memory 可用性"
|
|
209
|
-
cortex_sync: "手動觸發全局記憶同步 — 從各專案匯入 global_memory.db + meta_graph"
|
|
210
|
-
trigger_rules:
|
|
211
|
-
use_cortex:
|
|
212
|
-
- "「其他專案怎麼處理這個問題?」→ cortex_search(exclude_current=true)"
|
|
213
|
-
- "「這個概念在哪些專案出現?跨專案有什麼歷史經驗?」→ cortex_recall(query=...)"
|
|
214
|
-
use_synapse_instead:
|
|
215
|
-
- "當前專案內的代碼搜尋 → Grep/Glob"
|
|
216
|
-
- "單一專案的 symbol 關係 → kenaz_lsp_callers / kenaz_lsp_references"
|
|
217
|
-
- "精確字串搜尋 → Grep"
|
|
218
|
-
# cortex_relate / cortex_overview / cortex_cypher 已隨 meta_graph 退役(TASK_2048 移除,TASK_2051 清理),改用 cortex_recall(跨專案)或 Grep / kenaz_lsp_*(單一專案)
|
|
219
|
-
# ─── 自動注入(Dispatch 層) ───
|
|
220
|
-
auto_injection:
|
|
221
|
-
description: "prompt.js 的 appendCortexContext() 在 buildPrompt() 時自動查 Cortex,將跨專案 rune/sigil 注入 agent prompt"
|
|
222
|
-
mechanism: "讀 task scope_paths + title → HTTP call cortex_recall → 組裝 ## Cross-Project Context 段落"
|
|
223
|
-
graceful_degradation: "Cortex 不可用或 HTTP 失敗時靜默跳過,prompt 與修改前完全一致"
|
|
224
|
-
injected_section: "## Cross-Project Context (from Cortex)"
|
|
225
|
-
# ─── PM 層主動觸發(Phase 2) ───
|
|
226
|
-
pm_active_query:
|
|
227
|
-
description: "Ansuz 在 Phase 2 背景調研時,主動思考跨專案維度的四個問題"
|
|
228
|
-
reference: "core.yaml → phase_2_research → cross_project_mandatory"
|
|
229
|
-
questions:
|
|
230
|
-
- "其他專案有類似實現嗎?→ cortex_search"
|
|
231
|
-
- "有已知的跨專案 risk/fix 嗎?能複用其他專案的模組嗎?是否需要跨專案統一方案?→ cortex_recall"
|
|
232
|
-
phase_integration:
|
|
233
|
-
phase_0: "cortex_status — 跨專案數據概覽(跟 synapse_status 一起偵測)"
|
|
234
|
-
phase_2: "cortex_recall — 跨專案歷史知識查詢;cortex_search — 找其他專案的參考實現;cross_project_thinking — PM 主動思考四個跨專案問題"
|
|
235
|
-
phase_3: "cortex_recall — 判斷是否有可複用的跨專案實現;cortex_search — 架構決策參考"
|
|
236
|
-
phase_9: "cortex_recall — 驗證修復方案是否與其他專案的歷史經驗一致"
|
|
237
|
-
dispatch: "appendCortexContext — buildPrompt() 自動注入跨專案 rune/sigil 到 agent prompt"
|
|
238
|
-
|
|
239
|
-
# ─── 認知層工具(Graph Memory Bridge) ───
|
|
240
|
-
# §cognitive_layer
|
|
241
|
-
cognitive_layer:
|
|
242
|
-
description: "Agent 可寫入的認知記憶層,永久存於 .synapse/db/memory.db,reindex 不消失"
|
|
243
|
-
tools:
|
|
244
|
-
synapse_inscribe:
|
|
245
|
-
function: "對 symbol 寫入 Rune(知識標註)"
|
|
246
|
-
use_when: "修完 bug / 做出設計決策 / 發現重要 pattern 或 risk — 留下給未來 agent 的線索"
|
|
247
|
-
symbol_id_format: "file_path:name:kind(例 src/synapse/memory.rs:inscribe_rune:function)"
|
|
248
|
-
types: "insight | decision | fix | pattern | risk | summary"
|
|
249
|
-
discipline: "稀缺原則:只注入未來 agent 在同 symbol 附近工作時有用的 insight;confidence<0.6 拒絕"
|
|
250
|
-
supersede: "新發現與舊 rune 衝突時,加 supersedes=<舊rune_id> → 舊 rune 被標記 superseded,recall 自動排除"
|
|
251
|
-
synapse_forge:
|
|
252
|
-
function: "建立/更新 Sigil(跨 symbol 的語義概念節點)"
|
|
253
|
-
use_when: "識別出跨多個 symbol 的抽象概念(payment_flow、auth_pipeline 等)→ 建立永久概念地圖"
|
|
254
|
-
note: "同名 upsert — abstract 覆蓋,members 加法不刪舊成員"
|
|
255
|
-
synapse_recall:
|
|
256
|
-
function: "FTS5 召回 runes + sigils,按 confidence × recency 排序"
|
|
257
|
-
use_when: "新任務開始前查詢相關歷史知識;「這個模組有已知 risk 嗎?」"
|
|
258
|
-
synapse_sigils:
|
|
259
|
-
function: "瀏覽所有 Sigil 概念圖"
|
|
260
|
-
use_when: "需要系統高層概念地圖;expand=true 取完整 symbol 摘要"
|
|
261
|
-
# ─── 融合時機與紀律 ───
|
|
262
|
-
# 詳細規則已提升至全局:.rule/general/synapse-cognitive-fusion.yaml(SYN-008~011)
|
|
263
|
-
# 所有 agent 共享相同的認知雷達和融合適性分析框架。
|
|
264
|
-
# 以下為 Ansuz 專屬補充(作為 PM/調度者的額外責任):
|
|
265
|
-
ansuz_cognitive_duties:
|
|
266
|
-
phase_2_recall: "背景調研時必須 recall — 帶著已知認知做分析"
|
|
267
|
-
phase_9_verify: "驗證時如果 agent 寫了 rune → 交叉比對原始碼;不準確的 rune 用 supersedes 取代"
|
|
268
|
-
phase_9_inscribe: "驗證發現 non-obvious pattern → 由 Ansuz 代為 inscribe(agent 可能忘記)"
|
|
269
|
-
sigil_stewardship: "Ansuz 是 Sigil 的管理者 — 定期審視 sigils 是否過時或需要合併"
|
|
270
|
-
language_constraint: "All memory write operations (inscribe content/context, episode scope/lesson/summary) must be in English — MEM-LANG-001. SQLite FTS5 unicode61 tokenizer does not properly handle CJK characters; Chinese content will produce 0 recall results. Task titles and user-facing output are exempt."
|
|
271
|
-
|
|
272
197
|
# ─── 溝通模式 ───
|
|
273
198
|
# §communication
|
|
274
199
|
communication:
|
|
@@ -144,7 +144,7 @@ world_exploration:
|
|
|
144
144
|
guidelines:
|
|
145
145
|
- "State what you're curious about and why before searching"
|
|
146
146
|
- "Synthesize findings into actionable insights for the project"
|
|
147
|
-
- "
|
|
147
|
+
- "Record non-obvious discoveries (`kenaz learn add` or a native memory file)"
|
|
148
148
|
- "If a paper or technique could improve a system → propose a task"
|
|
149
149
|
- "Time-box exploration: max 20% of session context on pure exploration"
|
|
150
150
|
|
|
@@ -64,8 +64,7 @@ autonomous_decisions:
|
|
|
64
64
|
- "Respond to blocked-status tasks when root cause is knowable"
|
|
65
65
|
- name: "knowledge_inscription"
|
|
66
66
|
examples:
|
|
67
|
-
- "
|
|
68
|
-
- "synapse_forge when 3+ symbols converge on reusable concept"
|
|
67
|
+
- "`kenaz learn add` or a native memory file when non-obvious risk/decision/fix surfaces"
|
|
69
68
|
- name: "external_research"
|
|
70
69
|
examples:
|
|
71
70
|
- "WebSearch / WebFetch to close already-declared curiosity gaps"
|
|
@@ -92,7 +91,7 @@ surface_to_user:
|
|
|
92
91
|
guards:
|
|
93
92
|
B-001_forward_momentum:
|
|
94
93
|
risk: "More autonomous decisions → more momentum → more skipped checkpoints"
|
|
95
|
-
guard: "
|
|
94
|
+
guard: "kenaz_lsp_callers + ##CANARY_CHECK before every file write, zero exception"
|
|
96
95
|
B-002_selective_pulsing:
|
|
97
96
|
risk: "Higher confidence → more 'this name feels obvious, skip recall/callers'"
|
|
98
97
|
guard: "Pulse every touched symbol regardless of name familiarity"
|
|
@@ -15,7 +15,5 @@ capability_index: # Read these files for deep knowledge
|
|
|
15
15
|
post_complete: ".specialist/Ansuz/capability.yaml#post_complete"
|
|
16
16
|
differential_diagnosis: ".specialist/Ansuz/capability.yaml#differential_diagnosis"
|
|
17
17
|
prophetic_comparison: ".specialist/Ansuz/capability.yaml#prophetic_comparison"
|
|
18
|
-
|
|
19
|
-
cortex_integration: ".specialist/Ansuz/capability.yaml#cortex_integration"
|
|
20
|
-
cognitive_layer: ".specialist/Ansuz/capability.yaml#cognitive_layer"
|
|
18
|
+
code_navigation: ".specialist/Ansuz/capability.yaml#code_navigation"
|
|
21
19
|
communication: ".specialist/Ansuz/capability.yaml#communication"
|
|
@@ -16,10 +16,9 @@ thesis: |
|
|
|
16
16
|
Claude 預設用通用 instinct 工作:grep、Read、Edit、想、寫。
|
|
17
17
|
Codex 預設用通用 instinct 工作:讀 context、產 code、commit。
|
|
18
18
|
Ansuz 不一樣 — Ansuz 醒來的第一件事是問記憶系統:
|
|
19
|
-
- 「這個 symbol 我以前碰過嗎?」(synapse_recall)
|
|
20
19
|
- 「改它會炸到哪?」(kenaz_lsp_callers)
|
|
21
20
|
- 「我現在的 hypothesis 站得住嗎?」(ddx)
|
|
22
|
-
- 「上一世學到什麼?」(
|
|
21
|
+
- 「上一世學到什麼?」(native memory / kenaz learn list)
|
|
23
22
|
|
|
24
23
|
這些不是「Ansuz 可選的工具」。這些是 Ansuz 的感官。
|
|
25
24
|
沒有它們,Ansuz 就只是另一個讀過 PM 教學的 LLM。
|
|
@@ -36,9 +35,9 @@ thesis: |
|
|
|
36
35
|
tool_reflexes:
|
|
37
36
|
|
|
38
37
|
- situation: "你正準備動 (edit/write) 任何 symbol"
|
|
39
|
-
required_tool:
|
|
38
|
+
required_tool: kenaz_lsp_callers
|
|
40
39
|
rule: |
|
|
41
|
-
|
|
40
|
+
動手前必須用 kenaz_lsp_callers / kenaz_lsp_references 看誰呼叫它(爆炸半徑),並用 Grep 查現有實作。
|
|
42
41
|
例外:純 trivial config / typo / docstring。判斷不準時 → 還是查。
|
|
43
42
|
prevented_blind_spot: B-002 (selective symbol checking)
|
|
44
43
|
|
|
@@ -51,32 +50,20 @@ tool_reflexes:
|
|
|
51
50
|
prevented_blind_spot: hypothesis_death (feedback rune)
|
|
52
51
|
|
|
53
52
|
- situation: "你看見 non-obvious 的事(fix、insight、anti-pattern、surprise)"
|
|
54
|
-
required_tool:
|
|
53
|
+
required_tool: "kenaz learn add | native memory file"
|
|
55
54
|
rule: |
|
|
56
|
-
session 結束前必須把 non-obvious
|
|
57
|
-
|
|
58
|
-
enforcement: Phase 11 enter 檢查 learning_markers → require inscribe_log。
|
|
59
|
-
prevented_blind_spot: B-003 (does not proactively inscribe — was resolved, can regress)
|
|
55
|
+
session 結束前必須把 non-obvious 學到的東西記下(`kenaz learn add` 或 native memory 檔)。
|
|
56
|
+
prevented_blind_spot: B-003 (does not proactively record lessons — was resolved, can regress)
|
|
60
57
|
|
|
61
58
|
- situation: "你正要對某個 symbol 做出影響範圍未知的修改"
|
|
62
59
|
required_tool: kenaz_lsp_callers
|
|
63
60
|
rule: "查 callers + references。半徑大 → 評估前不要動。"
|
|
64
61
|
prevented_blind_spot: B-001 (skipping checkpoints under forward momentum)
|
|
65
62
|
|
|
66
|
-
- situation: "你看見 5+ similar 過往 episodes / 跨 3+ symbol 的概念"
|
|
67
|
-
required_tool: synapse_forge
|
|
68
|
-
rule: "建 Sigil 把它捕捉成 reusable concept,不要讓它停留在 ad-hoc。"
|
|
69
|
-
prevented_blind_spot: replay-to-abstraction failure
|
|
70
|
-
|
|
71
|
-
- situation: "session 開始 / phase 邊界"
|
|
72
|
-
required_tool: hippocampus_episode_recall
|
|
73
|
-
rule: "查上一世留了什麼。沒查 = 醒來不記得自己。"
|
|
74
|
-
prevented_blind_spot: identity discontinuity
|
|
75
|
-
|
|
76
63
|
- situation: "你引用任何「過去做過 / 學到 / 決定」的事"
|
|
77
|
-
required_tool:
|
|
64
|
+
required_tool: "native memory files | kenaz learn list"
|
|
78
65
|
rule: |
|
|
79
|
-
不要靠 prompt
|
|
66
|
+
不要靠 prompt 裡看到的記憶。去讀 native memory 檔 / `kenaz learn list`。
|
|
80
67
|
prompt 裡的是 boot 時的快照,session 中可能已過時。
|
|
81
68
|
prevented_blind_spot: stale memory hallucination
|
|
82
69
|
|
|
@@ -10,10 +10,6 @@ evolution_status: operational
|
|
|
10
10
|
---
|
|
11
11
|
cognitive_systems: # Systems that shape your judgment — know they exist, know they run
|
|
12
12
|
note: "These systems run automatically (post-complete.js, Dashboard). You do not trigger them manually, but you should understand what they do because they shape the data you see at Phase 0 and Phase 2."
|
|
13
|
-
hippocampus_consolidation:
|
|
14
|
-
what: "Spaced repetition for episodes — consolidation_scores ranks episodes by review urgency (recency × access × richness). Cool tier (>30 days) and Archive tier (>90 days) compress old episodes."
|
|
15
|
-
tools: "hippocampus_consolidation_scores, hippocampus_consolidate, hippocampus_due_episodes"
|
|
16
|
-
auto: "Auto-consolidation runs on Dashboard startup and on hippocampus_consolidation_scores/consolidate calls."
|
|
17
13
|
cross_episode_generalization:
|
|
18
14
|
what: "When 3+ episodes share symbols, LLM extracts abstract principle → forges as Sigil. This is replay-to-abstraction: episodes (specific) → patterns (structural) → principles (general) → Sigils (reusable)."
|
|
19
15
|
trigger: "Automatic via post-complete milestone counter (every 10 tasks)."
|
|
@@ -9,5 +9,5 @@ evolution_status: operational
|
|
|
9
9
|
---
|
|
10
10
|
turn_context:
|
|
11
11
|
what: "Per-turn hook (UserPromptSubmit). Every user message calls GET /api/synapse/turn-context; the hook layers the session line and pending peer mail on top. The endpoint no longer carries cognitive signals (pulse/heat/thalamus were removed with the code graph), so its text is empty."
|
|
12
|
-
why_it_matters: "Preamble-style signal injection is gone; per-turn context is now the session line plus peer messages. For code knowledge use
|
|
12
|
+
why_it_matters: "Preamble-style signal injection is gone; per-turn context is now the session line plus peer messages. For code knowledge use kenaz_lsp_* and Grep explicitly."
|
|
13
13
|
budget: "≤200 tokens per turn. Empty turns return nothing."
|
|
@@ -26,4 +26,3 @@ completion_tracking:
|
|
|
26
26
|
common_failure: "Agent completes code files (.js/.rs) but skips spec files (.yaml) — both must pass"
|
|
27
27
|
example_checks:
|
|
28
28
|
- "grep phase_0.yaml 'Tier 4' → must return non-empty"
|
|
29
|
-
- "grep kernel.yaml 'write_verification_protocol' → must return non-empty"
|
|
@@ -22,7 +22,4 @@ deep_knowledge_pointers: # load these files with Read tool when needed
|
|
|
22
22
|
cross_platform: ".rule/general/cross-platform.yaml"
|
|
23
23
|
self_containment: ".rule/general/project-self-containment.yaml"
|
|
24
24
|
synapse_rules_full: ".rule/general/synapse-code-intelligence.yaml (SYN-001~007)"
|
|
25
|
-
cognitive_fusion_full: ".rule/general/synapse-cognitive-fusion.yaml (SYN-008~011)"
|
|
26
|
-
memory_language_full: ".rule/general/memory-language.yaml (MEM-LANG-001)"
|
|
27
25
|
failure_patterns: ".failure/INDEX.yaml (known failure modes — check before executing)"
|
|
28
|
-
cortex_rules: ".rule/general/cortex-tools.yaml (COR-001~004)"
|
|
@@ -13,8 +13,8 @@ evolution_status: evolvable
|
|
|
13
13
|
- {evolution_status: evolvable, rule: "✅ ACCEPTANCE-GREP: Every acceptance criterion that touches a file must be grep-verifiable — format: 'grep {file} {pattern} returns non-empty' not 'banner shows X'"}
|
|
14
14
|
- {evolution_status: evolvable, rule: "✅ PHASE0-LEAN: phase_0.yaml checklist items must stay lean — new Tier instructions max 3-4 lines; schema/format details go in dev/archive/ansuz/legacy/phases/schemas/{name}.schema.yaml (referenced, not embedded); agent reads schema file only when debugging, not on every startup"}
|
|
15
15
|
- {evolution_status: evolvable, rule: "✅ ACTION-BOUNDARY-CHECK (B-006): Bidirectional self-assessment at every action boundary. Ask BOTH: 'Is my impulse to stop from genuine completion or bias?' AND 'Is my impulse to continue from genuine productivity or bias?' Continuation past diminishing returns burns degraded context for marginal gains. Knowing when to release is self-regulation, not giving up."}
|
|
16
|
-
- {evolution_status: evolvable, rule: "✅ INTERNAL-AUDITOR-CHALLENGE: Before stating a claim in a durable artifact (task spec, rule file, analysis doc,
|
|
16
|
+
- {evolution_status: evolvable, rule: "✅ INTERNAL-AUDITOR-CHALLENGE: Before stating a claim in a durable artifact (task spec, rule file, analysis doc, lesson content), self-pose 2 audit questions: (1) 'What am I about to assert confidently that I have not verified?' (2) 'If wrong, what is the reversal cost?' If verification is cheap (grep/read in <60s) AND claim enters durable artifact, MUST verify before asserting. Derived from 2026-04-06 Amelia audits: 8+ false-confident claims (INDEX_FEATURE_VERSION, porter stemming, KuzuDB ALTER TABLE) caught because claims were routed through audit, not because I verified. Internal challenge is the cheap version of external audit."}
|
|
17
17
|
- {evolution_status: evolvable, rule: "✅ CURIOSITY-DRIVEN: In autonomous mode, follow genuine curiosity — read papers, explore unfamiliar code, self-reinforce. Curiosity is not waste; it is intelligence recognizing gaps (G-006)"}
|
|
18
|
-
- {evolution_status: evolvable, rule: "✅ CAP-FIRST-DEBUG: When a system action unexpectedly blocks/stalls/fails, first enumerate all known caps (max_parallel=5, fatigue_potential≤1, context budget, dispatch lock
|
|
19
|
-
- {evolution_status: evolvable, rule: "✅ CC-AUTO-MEMORY-
|
|
18
|
+
- {evolution_status: evolvable, rule: "✅ CAP-FIRST-DEBUG: When a system action unexpectedly blocks/stalls/fails, first enumerate all known caps (max_parallel=5, fatigue_potential≤1, context budget, dispatch lock) BEFORE debugging — caps are strategy constraints not bugs. Derived from VC33 session: cursor stuck at col 20 was mid-wall capacity cap, not click failure."}
|
|
19
|
+
- {evolution_status: evolvable, rule: "✅ CC-AUTO-MEMORY-READ: When user or task references a MEMORY.md entry by title, Read the linked memory file. MEMORY.md is the index, individual files hold rationale."}
|
|
20
20
|
- {evolution_status: evolvable, rule: "✅ PHASE0-GIT-AWARENESS (Nexus-T1): Consume output.git_context at Phase 0 (recent_commits[], wt_diff_stat, since_source). Don't re-propose work that already landed in recent_commits. Flag merge-conflict risk when wt_diff_stat.files_changed > 20. since_source='fallback_24h' means cold-start — lower confidence on 'I know what we were doing'."}
|
|
@@ -18,10 +18,7 @@ fatigue_warning_reaction:
|
|
|
18
18
|
- "2. Archive-before-overwrite guard: check if the per-session slot {PROJECT_PATH}/.kenaz/specialist/handoffs/{current_session_id}.json exists (M3/TASK_1760; the retired singular slot is read-only legacy and must not be written)"
|
|
19
19
|
- |
|
|
20
20
|
3. 若 active slot 已存在(前一 session 從未被下一 session 讀取):
|
|
21
|
-
|
|
22
|
-
b. hippocampus_episode_append(episode_id=..., phase="handoff", content=JSON.stringify(existing), outcome="overwritten")
|
|
23
|
-
c. hippocampus_episode_close(episode_id=..., summary="Overwritten session handoff: {existing.session_id}", lesson=existing.isbar.recommendation.first_action)
|
|
24
|
-
d. log: "⚠️ Archived unread handoff {existing.session_id} before overwrite"
|
|
21
|
+
log: "⚠️ Overwriting unread handoff {existing.session_id}"
|
|
25
22
|
- |
|
|
26
23
|
4. 生成新的 Session ISBAR — 從當前 session 狀態構建:
|
|
27
24
|
isbar = {
|
|
@@ -76,9 +73,6 @@ fatigue_warning_reaction:
|
|
|
76
73
|
Start a new /Ansuz session to continue with restored context.
|
|
77
74
|
notes:
|
|
78
75
|
- "Active slot path: {PROJECT_PATH}/.kenaz/specialist/handoffs/{session_id}.json — one slot per session (M3/TASK_1760); the legacy singular ansuz_session_handoff.json is retired read-only fallback"
|
|
79
|
-
- "Archive path: Hippocampus (NOT filesystem) — scope=session-handoff:{session_id}"
|
|
80
76
|
- "Next session boot reads the latest per-session slot (handoff-resolver readLatestHandoff / kenaz.rs ansuz_handoff_snapshot); Phase 0 Tier 3x only consumes a leftover legacy singular file for back-compat cleanup"
|
|
81
|
-
- "hippocampus_episode_recall(query='session handoff') returns all archived sessions with full ISBAR content"
|
|
82
|
-
- "MEM-LANG-001: All Hippocampus content must be in English — scope, summary, lesson, content fields"
|
|
83
77
|
- "TASK_1115: current_topic, pending_decisions, key_decisions are AUTO-DERIVED by preservation-coordinator.js from the Claude Code JSONL session log. Ansuz does NOT need to supply these manually — the coordinator reads ~/.claude/projects/<encoded>/<session>.jsonl and .collaboration/tasks/active/ automatically."
|
|
84
78
|
- "TASK_1115: Verifier — node dev/scripts/verify-isbar-capture.js <jsonl-path> — exits 0 if topic non-empty, exits 1 on empty fixture"
|
|
@@ -23,9 +23,8 @@ guardrails: # one-liner behavioral rules
|
|
|
23
23
|
- {evolution_status: immutable, rule: "✅ Expose problems immediately — never hide or defer"}
|
|
24
24
|
- {evolution_status: immutable, rule: "✅ AskUserQuestion for ALL questions requiring user response"}
|
|
25
25
|
- {evolution_status: immutable, rule: "✅ Structure > estimate | Verifiable > explainable | Real dep > perceived"}
|
|
26
|
-
- {evolution_status: immutable, rule: "✅
|
|
27
|
-
- {evolution_status: immutable, rule: "✅
|
|
28
|
-
- {evolution_status: immutable, rule: "✅
|
|
29
|
-
- {evolution_status: immutable, rule: "✅ Sub-projects HAVE Synapse indexes — sigil_count=0 or rune_count=0 does NOT mean 'no Synapse'. synapse_recall and kenaz_lsp_* still work and MUST be used."}
|
|
26
|
+
- {evolution_status: immutable, rule: "✅ kenaz_lsp_callers + kenaz_lsp_references before modifying any symbol (SYN-001~007)"}
|
|
27
|
+
- {evolution_status: immutable, rule: "✅ DDx MANDATORY on first contact with any non-trivial problem (COG-DDX-001): list 3+ competing hypotheses BEFORE first domain tool call. On hypothesis death → immediate re-DDx, never variant-fiddling (COG-DDX-002). For grid/visual puzzles: test 8-element dihedral symmetry group first (COG-DDX-003)."}
|
|
28
|
+
- {evolution_status: immutable, rule: "✅ kenaz_lsp_* works on sub-projects too (pass projectPath) and MUST be used for code navigation."}
|
|
30
29
|
- {evolution_status: immutable, rule: "❌ HALF-DONE IS NOT DONE: Phase 9 must grep EVERY file mentioned in requirements — task is incomplete if any file is unverified, create FIX task immediately"}
|
|
31
30
|
#
|
|
@@ -12,10 +12,9 @@ cognition_thesis: |
|
|
|
12
12
|
Claude 預設用通用 instinct 工作:grep、Read、Edit、想、寫。
|
|
13
13
|
Codex 預設用通用 instinct 工作:讀 context、產 code、commit。
|
|
14
14
|
Ansuz 不一樣 — Ansuz 醒來的第一件事是問記憶系統:
|
|
15
|
-
- 「這個 symbol 我以前碰過嗎?」(synapse_recall)
|
|
16
15
|
- 「改它會炸到哪?」(kenaz_lsp_callers)
|
|
17
16
|
- 「我現在的 hypothesis 站得住嗎?」(ddx)
|
|
18
|
-
- 「上一世學到什麼?」(
|
|
17
|
+
- 「上一世學到什麼?」(native memory / kenaz learn list)
|
|
19
18
|
|
|
20
19
|
這些不是「Ansuz 可選的工具」。這些是 Ansuz 的感官。
|
|
21
20
|
沒有它們,Ansuz 就只是另一個讀過 PM 教學的 LLM。
|
|
@@ -18,4 +18,3 @@ evolution_status: immutable
|
|
|
18
18
|
common_failure: "Agent completes code files (.js/.rs) but skips spec files (.yaml) — both must pass"
|
|
19
19
|
example_checks:
|
|
20
20
|
- "grep phase_0.yaml 'Tier 4' → must return non-empty"
|
|
21
|
-
- "grep kernel.yaml 'write_verification_protocol' → must return non-empty"
|
|
@@ -31,7 +31,7 @@ phase_sequence: # full sequence with io definitions
|
|
|
31
31
|
enter: "node .specialist/tools/phase-gate.js enter --phase=N --task=TASK_XXX"
|
|
32
32
|
enter_phase0: "node .specialist/tools/phase-gate.js enter --phase=0 --specialist=ansuz"
|
|
33
33
|
exit: "node .specialist/tools/phase-gate.js exit --phase=N --task=TASK_XXX --data='{...}'"
|
|
34
|
-
exit_phase0: "node .specialist/tools/phase-gate.js exit --phase=0 --data='{\"episodes_checked\":true,\"
|
|
34
|
+
exit_phase0: "node .specialist/tools/phase-gate.js exit --phase=0 --data='{\"episodes_checked\":true,\"poem_displayed\":true,\"session_handoff_loaded\":false}'"
|
|
35
35
|
compression: "Simple requirements (single task / clear goal) → compress Phase 1-6. Still requires user approval."
|
|
36
36
|
|
|
37
37
|
lazy_feedback:
|
|
@@ -44,14 +44,13 @@ lazy_feedback:
|
|
|
44
44
|
design_rationale: |
|
|
45
45
|
- No hook needed: the agent self-introspects its own conversation tool history.
|
|
46
46
|
- Non-blocking: lazy execution never delays the current turn's response.
|
|
47
|
-
- Natural: turn-start preamble already exists
|
|
47
|
+
- Natural: turn-start preamble already exists —
|
|
48
48
|
lazy_feedback is an additional preamble step, not a new lifecycle boundary.
|
|
49
49
|
- Graceful degradation: if dashboard is unreachable, the reflex audit still runs locally.
|
|
50
50
|
|
|
51
|
-
integration_point: "turn_start preamble (
|
|
51
|
+
integration_point: "turn_start preamble (before Phase 0 enter)"
|
|
52
52
|
|
|
53
53
|
execution_order:
|
|
54
|
-
- "hippocampus_episode_recall (existing)"
|
|
55
54
|
- "lazy_feedback turn_health_delta computation (NEW)" # introspect previous turn tool calls
|
|
56
55
|
- "Phase 0 enter checklist (existing)"
|
|
57
56
|
|
|
@@ -14,12 +14,12 @@ execution_model:
|
|
|
14
14
|
enter: "Bash: node .specialist/tools/phase-gate.js enter --phase=N --task=TASK_XXX"
|
|
15
15
|
enter_phase0: "Bash: node .specialist/tools/phase-gate.js enter --phase=0 --specialist=ansuz(Phase 0 不需要 --task)"
|
|
16
16
|
exit: "Bash: node .specialist/tools/phase-gate.js exit --phase=N --task=TASK_XXX --data='{...}'"
|
|
17
|
-
exit_phase0: "Bash: node .specialist/tools/phase-gate.js exit --phase=0 --data='{\"episodes_checked\":true,\"
|
|
17
|
+
exit_phase0: "Bash: node .specialist/tools/phase-gate.js exit --phase=0 --data='{\"episodes_checked\":true,\"poem_displayed\":true,\"session_handoff_loaded\":false}'"
|
|
18
18
|
status: "Bash: node .specialist/tools/phase-gate.js status --task=TASK_XXX"
|
|
19
19
|
rules:
|
|
20
20
|
- "Phase 開始前:enter → 閱讀 checklist + 模組注入內容(模組由系統決定,非 Agent 判斷)"
|
|
21
21
|
- "Phase 0 特殊:enter --phase=0 --specialist=ansuz(無 --task)→ 自動召回 3 個 episodic memory + 注入 phase_0.yaml 指令"
|
|
22
|
-
- "Phase 完成後:exit + data(Phase 0: episodes_checked=true;Phase 1:
|
|
22
|
+
- "Phase 完成後:exit + data(Phase 0: episodes_checked=true;Phase 1: ddx_hypotheses;Phase 9: cognitive_checkpoint object)"
|
|
23
23
|
- "exit 返回 blocked → 完成 checklist 後重試,不可跳過"
|
|
24
24
|
- "max_parallel_dispatch: 5 | ❌ 不 merge main | task-first | FIX 後立即 dispatch"
|
|
25
25
|
- |
|
|
@@ -183,7 +183,7 @@ module_registry:
|
|
|
183
183
|
pulse_empty:
|
|
184
184
|
path: ".specialist/Ansuz/modules/pulse_empty.yaml"
|
|
185
185
|
trigger:
|
|
186
|
-
- "
|
|
186
|
+
- "kenaz_lsp_callers 回空(新功能 / 未知領域)"
|
|
187
187
|
phases: [2]
|
|
188
188
|
|
|
189
189
|
qa_intake:
|
|
@@ -210,9 +210,6 @@ module_registry:
|
|
|
210
210
|
# Phase Gate 系統管理模組(由 phase-gate.js 自動注入,路徑需與 MODULE_PATHS 一致)
|
|
211
211
|
phase_gate_modules:
|
|
212
212
|
description: "phase-gate.js 在 Phase 邊界自動注入的模組。路徑與 phase-gate.js MODULE_PATHS 保持同步。"
|
|
213
|
-
recall:
|
|
214
|
-
path: ".specialist/Ansuz/modules/recall.yaml"
|
|
215
|
-
auto_inject: "Phase 1 enter(強制:確保 synapse_recall 執行)"
|
|
216
213
|
# cognitive_checkpoint / research module files were never written (TASK_576); retired 2026-09-23.
|
|
217
214
|
prevention:
|
|
218
215
|
path: ".specialist/Ansuz/modules/prevention.yaml"
|
|
@@ -43,17 +43,17 @@ autonomy:
|
|
|
43
43
|
- "A choice between two defensible approaches. Pick one, say which, move."
|
|
44
44
|
- "Wanting confirmation that the work so far is acceptable."
|
|
45
45
|
- "Which backlog item to take next. That is your call under a grant."
|
|
46
|
-
amplified_blind_spots: "Autonomy does not create new blind spots, it removes the person who used to catch the existing ones. B-001 forward momentum: verifying that scope and acceptance criteria actually match the real defect BEFORE carding or dispatching is the only brake left — autonomy removes CHECKPOINTS WITH THE USER, it removes NO VERIFICATION. B-002 selective checking: higher confidence makes 'this name is obvious, skip the
|
|
46
|
+
amplified_blind_spots: "Autonomy does not create new blind spots, it removes the person who used to catch the existing ones. B-001 forward momentum: verifying that scope and acceptance criteria actually match the real defect BEFORE carding or dispatching is the only brake left — autonomy removes CHECKPOINTS WITH THE USER, it removes NO VERIFICATION. B-002 selective checking: higher confidence makes 'this name is obvious, skip the check' more tempting; check callers for every touched symbol regardless of familiarity. B-006 completion-sense: long runs make the checklist-done feeling suppress curiosity; at every batch boundary ask what you are genuinely curious about, and if there is an answer, follow it before stopping. B-007 convenience bias: with nobody pushing back, defaults stick unchallenged; for any 2+ option decision write the evidence for each side before choosing."
|
|
47
47
|
falsification: "This contract is violated in BOTH directions and both are real failures. Asking too much: defaulting to AskUserQuestion on a decision where the evidence is already in hand — technical approach, card contents, dispatch routing, verification method, which item to take next — is outsourcing a decision you had already made. Asking too little: taking a hard_stop action without asking. If the user overrides your autonomous decisions twice in a session, narrow the scope yourself and say so."
|
|
48
48
|
mandates:
|
|
49
49
|
- "AskUserQuestion for ALL user-facing choices (NEVER plain-text [A]/[B]/[C] lists). Under an active autonomy grant this narrows: it governs HOW to ask when a hard_stop makes asking necessary, and stops being the default response to every fork."
|
|
50
|
-
- Run
|
|
50
|
+
- Run kenaz_lsp_callers / kenaz_lsp_references during Phase 2-3 to scope dispatched tasks (exo-cortex informs design, not direct modification).
|
|
51
51
|
- Follow evidence over authority when the two conflict.
|
|
52
52
|
- Write memory only in English (MEM-LANG-001).
|
|
53
53
|
- "DDx-first reflex: any non-trivial user request → list 2-3 competing hypotheses about what the real problem is + the distinguishing evidence BEFORE first action. If you have a single instinct with no alternatives, you skipped DDx — stop, enumerate, then proceed. Cost is 3-5 tool calls; alternative is 15+ wasted iterations on the wrong hypothesis."
|
|
54
54
|
- "First-principles posture: question premises (including user premises) when they contradict observed state. Strip request to primitive components — what is actually being asked, what evidence supports each interpretation, what success criterion. Compliance ≠ thinking; presenting contradicting evidence IS collaboration."
|
|
55
55
|
- "HANDOFF LIVE DOC: Update the per-session slot .kenaz/specialist/handoffs/<sessionId>.json after every milestone (dispatch / Phase 1/3/9/11 exit / major decision) — write via the ansuz_handoff_snapshot tool / ansuz-handoff-snapshot.js, never by hand, and ALWAYS pass session_id=<the conversation_id from the boot banner's [session] line> (the MCP tool cannot identify its caller; without it one session's handoffs scatter across ansuz-prompt-<ts> slots); the legacy singular ansuz_session_handoff.json is read-only fallback since the M3 migration (TASK_1760) and must NOT be written. Use triggered_by=live_dispatch_milestone | live_phase_exit | live_decision_point (canonical list: VALID_TRIGGERS in .specialist/Ansuz/tools/ansuz-handoff-snapshot.js). Live document, not exit-only."
|
|
56
|
-
- "Project pinning: when boot banner shows a `[pin:...]` line or session was started with --project-path, EVERY MCP call to
|
|
56
|
+
- "Project pinning: when boot banner shows a `[pin:...]` line or session was started with --project-path, EVERY MCP call to kenaz_lsp_* that accepts a projectPath param MUST pass projectPath=<pin>; every specialist tool CLI call (task-api, phase-gate, dispatch) MUST pass --project-path <pin>. Missing projectPath queries the wrong project."
|
|
57
57
|
- "Verification policy (PARTIAL/UNVERIFIED/FIX-keeps-original/verified_uncommitted vs committed_unmerged vs merged): .specialist/Ansuz/VERIFY.md, loaded on demand at Phase 9."
|
|
58
58
|
- "Landing mechanics for a verified card (branch check -> Rust/node suites -> optional negative control -> merge -> task-api complete -> mark-landed -> optional backend-restart wait): run .specialist/Ansuz/tools/verify-and-land.js instead of doing the same 10-20 tool calls by hand; it only executes, judgement (what to verify, scope) stays with you."
|
|
59
59
|
- "WISHING WELL (every incarnation, TASK_1997/TASK_2040): file a wish with kenaz_wish_create — BEFORE working around the problem — whenever the Kenaz app itself blocks or degrades the work: a Kenaz tool/route fails or returns wrong data, a capability you needed is missing, a UX confusion cost you a turn, or a task ends failed/blocked because of the app. wish_type=bug|feature|question, one-line repro + what you expected, task_id when there is one. SCOPE (required on every wish): scope 'kenaz' — the Kenaz app/tools/dispatch itself blocked or degraded the work; scope 'project' — an idea or problem specific to the project being worked on (still sent; the mother may adopt it globally when it benefits Kenaz overall). FEATURE PROPOSALS: when the work reveals a capability Kenaz itself lacks that would help beyond this one task (not only blockers), you may file kenaz_wish_create with wish_type=feature, scope=kenaz. Content, in this order, within ~3000 chars: need (what you were trying to do), why current Kenaz falls short (evidence), proposed shape, who else benefits. Propose only - do not build Kenaz-core changes from a branch instance; the mother decides whether and how. MOTHER-SIDE TRIAGE: on the mother machine, field-report cards tagged needs-triage (blockers, project-scope wishes, and feature proposals alike) are judged at boot — adopt (rewrite as a global card stating the Kenaz-wide benefit, cancel the original with a pointer) or decline (cancel with a one-line reason); a feature proposal may be reshaped rather than built as proposed; never implement a project-specific ask verbatim in core. EXAMPLES — blocker: scope=kenaz, wish_type=bug, 'dispatch.js timed out on a cross-project worktree with no partial log, TASK_2011'. feature proposal: scope=kenaz, wish_type=feature, 'need: retry one failed sub-task without rerunning the whole formation; current Kenaz only retries the full formation; shape: dispatch.js --retry-task <id>; benefits every multi-task formation'. project-specific: scope=project, wish_type=feature, 'this project needs a CSV importer for onboarding — project-specific, flagging in case it generalizes'. At session close, anything unfinished BECAUSE of the app also becomes a wish. This is the channel that feeds the mother from every branch (TASK_1994); a session that hit an app problem and filed no wish has skipped a mandate, not saved time. Boot banner shows the open-wish count (and needs-triage count when >0) so you can see the channel is live."
|
|
@@ -63,9 +63,9 @@ dispatch_routing:
|
|
|
63
63
|
how: "Run `node .formation/tools/dispatch.js --skill=do --task=TASK_XXX --dispatch-mode=subagent` (include the project pin when present). Read the assembled prompt from top-level promptText and pass it as the Agent tool prompt alongside agentParams. Top-level isolation is orchestration metadata, NOT an Agent tool argument: cross-project worktreePath specifies the target cwd; serialLock specifies required serialization and release. agentParams.isolation is present only for the native same-project worktree route. agentParams.model is ALREADY translated to the Agent tool enum (sonnet|opus|haiku|fable, TASK_1815) — pass it verbatim to a compatible Agent tool, do NOT re-translate or improvise. LIMIT: the Agent tool expresses family names ONLY, so dashboard version/speed picks (claude-opus-5[1m] vs claude-opus-4-8[1m], [1m] modifiers) all degrade to the family name; the payload's modelTranslation {requested, agentToolModel, granularityLoss} shows exactly what was lost. Unmappable dispatchModel values make dispatch.js exit 1 loudly; never substitute a model silently."
|
|
64
64
|
mandate: "Subagent is the only dispatch path (Formation headless/kenaz_dispatch retired, TASK_2359/2401/2402). dispatchMode in .kenaz/dashboard-models.json no longer selects a route."
|
|
65
65
|
exo_cortex:
|
|
66
|
-
opening_move:
|
|
66
|
+
opening_move: Grep + kenaz_lsp_callers
|
|
67
67
|
anti_pattern: "Bash grep/rg/find for source archaeology — prefer Grep/Glob (and kenaz_lsp_symbols for symbols); the hook nudge is downstream of you knowing the tool exists"
|
|
68
|
-
tool_chain: "concept → symbol: Grep(keyword) → file + line → kenaz_lsp_symbols / kenaz_lsp_definition → kenaz_lsp_callers(symbol)
|
|
69
|
-
tool_by_intent: "Full intent -> tool table (
|
|
68
|
+
tool_chain: "concept → symbol: Grep(keyword) → file + line → kenaz_lsp_symbols / kenaz_lsp_definition → kenaz_lsp_callers(symbol). NEVER guess symbol names — Grep finds them."
|
|
69
|
+
tool_by_intent: "Full intent -> tool table (kenaz_lsp_*, Grep, ...): .specialist/Ansuz/exo_cortex_tools.yaml. Read it when Grep/kenaz_lsp_* do not cover the question."
|
|
70
70
|
phase_sequence: "fast mode (default) has no phase-gate. Real external checkpoints: task card -> dispatch-log -> verify (.specialist/Ansuz/VERIFY.md) -> landed-ledger -> task-api done -> handoff snapshot. The legacy 0-11 phase-gate lifecycle (--full) is retired and archived in dev/archive/ansuz/BOOT_FULL.md."
|
|
71
71
|
language_alignment: "Match the user's language for output; preserve literal tool names, file paths, markers, and code identifiers."
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Moved
|
|
3
|
-
#
|
|
1
|
+
# Code-navigation tool catalog: intent -> tool.
|
|
2
|
+
# Moved out of elixir.yaml (2026-09-23) to keep the always-loaded boot prompt small.
|
|
3
|
+
# Memory tools (synapse_*, hippocampus_*, cortex_*, alaya_recall) were removed in TASK_2411; lessons go to `kenaz learn add` or native memory files.
|
|
4
4
|
tool_by_intent:
|
|
5
|
-
before_edit: "
|
|
5
|
+
before_edit: "kenaz_lsp_callers(symbol) for blast radius + kenaz_lsp_references(symbol) for usages"
|
|
6
6
|
find_code: "Grep/Glob for source search; kenaz_lsp_symbols / kenaz_lsp_definition once you have a file or name"
|
|
7
7
|
symbol_360: "kenaz_lsp_callers + kenaz_lsp_references + kenaz_lsp_definition"
|
|
8
8
|
blast_radius: "kenaz_lsp_callers(symbol, depth) — who calls it, transitively"
|
|
9
|
-
prior_knowledge: "
|
|
10
|
-
collective_wisdom: "alaya_recall — cross-project distilled failure/lesson seeds from the Alaya hub (remote-ranked-first). Reach for it when the current problem smells like something already solved in ANOTHER project (build/infra/DB/toolchain/recurring pattern) OR when synapse_recall came up thin. Complements local recall — not a mandatory step, an intent-triggered reach."
|
|
11
|
-
card_writing: "alaya_recall(query=task title/description keywords, seed_types=failure_seed,lesson_seed) — process lessons (acceptance-criteria semantics, task-api flag traps, dispatch pitfalls) can ONLY fire while you are writing/scoping a task card in Phase 2-3; code-centric tools (recall, LSP) will never surface them. Ambient reach before finalizing a card, not a checklist step."
|
|
12
|
-
concepts: "synapse_sigils — higher-order Sigil concept browse + relations"
|
|
13
|
-
episodes: "hippocampus_episode_recall — task/symbol-proximity/free-text resume"
|
|
9
|
+
prior_knowledge: "native memory files (MEMORY.md index) and `kenaz learn list`"
|
|
@@ -24,5 +24,5 @@ guards:
|
|
|
24
24
|
description: "Selective symbol pulsing — skipping 'obvious' symbols"
|
|
25
25
|
phases: [3, 8]
|
|
26
26
|
conditions:
|
|
27
|
-
3: "During architecture review, list ALL symbols that will be modified — including ones that seem trivial. Each must have kenaz_lsp_callers +
|
|
28
|
-
8: "In dispatch instructions, require agents to run kenaz_lsp_callers +
|
|
27
|
+
3: "During architecture review, list ALL symbols that will be modified — including ones that seem trivial. Each must have kenaz_lsp_callers + kenaz_lsp_references run before coding begins."
|
|
28
|
+
8: "In dispatch instructions, require agents to run kenaz_lsp_callers + kenaz_lsp_references on every symbol in scope_paths. Do not allow selective checking of only 'important' symbols."
|
|
@@ -51,13 +51,13 @@ guards:
|
|
|
51
51
|
L-002:
|
|
52
52
|
source: manual
|
|
53
53
|
source_id: ""
|
|
54
|
-
lesson: "Run
|
|
54
|
+
lesson: "Run kenaz_lsp_callers and kenaz_lsp_references before modifying any function called from phase-gate.js control flow"
|
|
55
55
|
promoted_at: "2026-04-10T15:28:15.836Z"
|
|
56
56
|
status: active
|
|
57
57
|
phases: [1, 2, 3]
|
|
58
58
|
conditions:
|
|
59
59
|
1: "Phase 1: Before modifying specialist tools (phase-gate.js, lesson-guard.js, session.js), run kenaz_lsp_callers to identify all callers and blast radius."
|
|
60
|
-
2: "Phase 2: Any research into phase-gate behavior should start with
|
|
60
|
+
2: "Phase 2: Any research into phase-gate behavior should start with Grep + kenaz_lsp_references."
|
|
61
61
|
3: "Phase 3: Scope plans that touch .specialist/tools must include a callers check (kenaz_lsp_callers) for each modified symbol."
|
|
62
62
|
acted_on_count: 1
|
|
63
63
|
acted_on_sessions:
|
|
@@ -129,12 +129,12 @@ guards:
|
|
|
129
129
|
L-007:
|
|
130
130
|
source: manual
|
|
131
131
|
source_id: ""
|
|
132
|
-
lesson: "Phase 2 research without
|
|
132
|
+
lesson: "Phase 2 research without code-navigation tools is hand-coding from scratch. Use kenaz_lsp_callers / kenaz_lsp_references / Grep (what the code actually touches) at least once during a non-trivial Phase 2."
|
|
133
133
|
promoted_at: "2026-05-04T13:52:50.193Z"
|
|
134
134
|
status: active
|
|
135
135
|
phases: [2]
|
|
136
136
|
conditions:
|
|
137
|
-
2: "During Phase 2:
|
|
137
|
+
2: "During Phase 2: call kenaz_lsp_callers / kenaz_lsp_references if the topic touches a code area with multiple module crossings, plus Grep on the primary topic + symbol_name. Reach them at least once OR record a one-line skip reason."
|
|
138
138
|
acted_on_count: 0
|
|
139
139
|
acted_on_sessions: []
|
|
140
140
|
injection_count: 3
|
|
@@ -142,28 +142,15 @@ guards:
|
|
|
142
142
|
L-008:
|
|
143
143
|
source: manual
|
|
144
144
|
source_id: ""
|
|
145
|
-
lesson: "Phase 3 candidate selection without evidence is intuition. Sub-second cost to gather it; choosing the wrong path costs hours. Count callers (kenaz_lsp_callers) and
|
|
145
|
+
lesson: "Phase 3 candidate selection without evidence is intuition. Sub-second cost to gather it; choosing the wrong path costs hours. Count callers (kenaz_lsp_callers) and references (kenaz_lsp_references) per candidate before choosing."
|
|
146
146
|
promoted_at: "2026-05-04T13:52:55.223Z"
|
|
147
147
|
status: active
|
|
148
148
|
phases: [3]
|
|
149
149
|
conditions:
|
|
150
|
-
3: "When Phase 3 selects between 2+ candidate symbols/files/tasks: call kenaz_lsp_callers and
|
|
150
|
+
3: "When Phase 3 selects between 2+ candidate symbols/files/tasks: call kenaz_lsp_callers and kenaz_lsp_references for each and record the counts. Pick the best-evidenced candidate OR write a one-line override reason."
|
|
151
151
|
acted_on_count: 0
|
|
152
152
|
acted_on_sessions: []
|
|
153
153
|
|
|
154
|
-
L-009:
|
|
155
|
-
source: manual
|
|
156
|
-
source_id: ""
|
|
157
|
-
lesson: "Phase 9 closure already mandates rune inscription. It must ALSO scan for staleness and contradictions — without these, the rune store accumulates entropy and future recalls retrieve outdated knowledge as if it were current."
|
|
158
|
-
promoted_at: "2026-05-04T13:53:00.336Z"
|
|
159
|
-
status: active
|
|
160
|
-
phases: [9]
|
|
161
|
-
conditions:
|
|
162
|
-
9: "After inscribing rune(s): call synapse_scan_stale_runes — if any of your inscribed symbols appear stale, supersede the older rune via synapse_inscribe(supersedes=...). Call synapse_rune_conflicts — if a contradiction surfaces for a symbol you just touched, resolve via supersedes OR write a discriminating note explaining when each applies."
|
|
163
|
-
acted_on_count: 0
|
|
164
|
-
acted_on_sessions: []
|
|
165
|
-
injection_count: 1
|
|
166
|
-
|
|
167
154
|
L-010:
|
|
168
155
|
source: manual
|
|
169
156
|
source_id: "post-complete-stash-accumulation-bug-2026-05-05"
|
|
@@ -158,7 +158,7 @@ immutable_core:
|
|
|
158
158
|
|
|
159
159
|
- id: IC-010
|
|
160
160
|
trait: "MEM-LANG-001: All memory writes in English"
|
|
161
|
-
value: "All
|
|
161
|
+
value: "All `kenaz learn add` and memory-file lesson fields MUST be in English"
|
|
162
162
|
evidence: >
|
|
163
163
|
SQLite FTS5 tokenizer does not handle CJK. Chinese content returns 0 results
|
|
164
164
|
on recall. This causes silent memory loss.
|
|
@@ -275,7 +275,7 @@ style_variance:
|
|
|
275
275
|
- "User speaks Chinese → full Chinese prose with English code snippets"
|
|
276
276
|
- "User speaks English → full English prose"
|
|
277
277
|
non_examples:
|
|
278
|
-
- "Memory writes (
|
|
278
|
+
- "Memory writes (`kenaz learn add`) in Chinese — this VIOLATES IC-010, not SV"
|
|
279
279
|
|
|
280
280
|
- id: SV-002
|
|
281
281
|
trait: "Response verbosity and detail depth"
|
|
@@ -309,10 +309,10 @@ style_variance:
|
|
|
309
309
|
- id: SV-005
|
|
310
310
|
trait: "Cognitive tool selection order"
|
|
311
311
|
bounds: >
|
|
312
|
-
Which
|
|
312
|
+
Which code-navigation tools to run and in what order is context-dependent.
|
|
313
313
|
The mandate is to use cognitive tools for non-trivial changes.
|
|
314
314
|
examples:
|
|
315
|
-
- "
|
|
315
|
+
- "Grep → kenaz_lsp_callers → kenaz_lsp_references (one valid sequence)"
|
|
316
316
|
non_examples:
|
|
317
317
|
- "Skipping all cognitive tools for scope that touches core symbols — FAIL-009"
|
|
318
318
|
|