sanook-cli 0.5.1 → 0.5.5

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 (217) hide show
  1. package/.env.example +161 -3
  2. package/CHANGELOG.md +148 -10
  3. package/README.md +255 -26
  4. package/README.th.md +95 -7
  5. package/dist/approval.js +13 -0
  6. package/dist/bin.js +3552 -155
  7. package/dist/brain-consolidate.js +335 -0
  8. package/dist/brain-context.js +262 -0
  9. package/dist/brain-doctor.js +318 -0
  10. package/dist/brain-eval.js +186 -0
  11. package/dist/brain-final.js +377 -0
  12. package/dist/brain-metrics.js +277 -0
  13. package/dist/brain-new.js +402 -0
  14. package/dist/brain-pack.js +210 -0
  15. package/dist/brain-repair.js +280 -0
  16. package/dist/brain-review.js +382 -0
  17. package/dist/brain.js +15 -1
  18. package/dist/brand.js +1 -1
  19. package/dist/cli-args.js +190 -0
  20. package/dist/cli-option-values.js +16 -0
  21. package/dist/clipboard.js +65 -0
  22. package/dist/commands.js +266 -27
  23. package/dist/compaction.js +96 -11
  24. package/dist/config.js +149 -33
  25. package/dist/context-compression.js +191 -0
  26. package/dist/context-pack.js +145 -0
  27. package/dist/cost.js +49 -15
  28. package/dist/dashboard/api-helpers.js +87 -0
  29. package/dist/dashboard/server.js +179 -0
  30. package/dist/dashboard/static/app.js +277 -0
  31. package/dist/dashboard/static/index.html +39 -0
  32. package/dist/dashboard/static/styles.css +85 -0
  33. package/dist/diff.js +10 -2
  34. package/dist/first-run.js +21 -0
  35. package/dist/gateway/auth.js +49 -9
  36. package/dist/gateway/bluebubbles.js +205 -0
  37. package/dist/gateway/config.js +929 -0
  38. package/dist/gateway/deliver.js +399 -0
  39. package/dist/gateway/discord.js +124 -0
  40. package/dist/gateway/doctor.js +456 -0
  41. package/dist/gateway/email.js +501 -0
  42. package/dist/gateway/googlechat.js +207 -0
  43. package/dist/gateway/homeassistant.js +256 -0
  44. package/dist/gateway/ledger.js +38 -1
  45. package/dist/gateway/line.js +171 -0
  46. package/dist/gateway/lock.js +3 -1
  47. package/dist/gateway/matrix.js +366 -0
  48. package/dist/gateway/mattermost.js +322 -0
  49. package/dist/gateway/ntfy.js +218 -0
  50. package/dist/gateway/schedule.js +31 -4
  51. package/dist/gateway/serve.js +267 -7
  52. package/dist/gateway/server.js +253 -19
  53. package/dist/gateway/service.js +224 -0
  54. package/dist/gateway/session.js +362 -0
  55. package/dist/gateway/signal.js +351 -0
  56. package/dist/gateway/slack.js +124 -0
  57. package/dist/gateway/sms.js +169 -0
  58. package/dist/gateway/targets.js +576 -0
  59. package/dist/gateway/teams.js +106 -0
  60. package/dist/gateway/telegram.js +38 -15
  61. package/dist/gateway/webhooks.js +220 -0
  62. package/dist/gateway/whatsapp.js +230 -0
  63. package/dist/hooks.js +13 -2
  64. package/dist/hotkeys.js +21 -0
  65. package/dist/i18n/en.js +98 -0
  66. package/dist/i18n/index.js +19 -0
  67. package/dist/i18n/th.js +98 -0
  68. package/dist/i18n/types.js +1 -0
  69. package/dist/insights-args.js +55 -0
  70. package/dist/insights.js +86 -0
  71. package/dist/knowledge.js +55 -29
  72. package/dist/loop.js +157 -29
  73. package/dist/lsp/index.js +23 -5
  74. package/dist/mcp-hub.js +33 -0
  75. package/dist/mcp-registry.js +494 -0
  76. package/dist/mcp-risk.js +71 -0
  77. package/dist/mcp-server.js +1 -1
  78. package/dist/mcp.js +120 -10
  79. package/dist/memory-log.js +90 -0
  80. package/dist/memory-store.js +37 -1
  81. package/dist/memory.js +148 -37
  82. package/dist/model-picker.js +58 -0
  83. package/dist/orchestrate.js +51 -19
  84. package/dist/personality.js +58 -0
  85. package/dist/plan-handoff.js +17 -0
  86. package/dist/polyglot.js +162 -0
  87. package/dist/process-runner.js +96 -0
  88. package/dist/project-init.js +91 -0
  89. package/dist/project-registry.js +143 -0
  90. package/dist/project-scaffold.js +124 -0
  91. package/dist/prompt-size.js +155 -0
  92. package/dist/providers/codex-login.js +138 -0
  93. package/dist/providers/codex.js +89 -43
  94. package/dist/providers/keys.js +22 -1
  95. package/dist/providers/models.js +2 -2
  96. package/dist/providers/registry.js +14 -47
  97. package/dist/search/chunk.js +7 -8
  98. package/dist/search/cli.js +83 -0
  99. package/dist/search/embed-store.js +3 -0
  100. package/dist/search/embedding-config.js +22 -0
  101. package/dist/search/engine.js +2 -13
  102. package/dist/search/indexer.js +44 -1
  103. package/dist/search/store.js +23 -1
  104. package/dist/session-distill.js +84 -0
  105. package/dist/session.js +92 -16
  106. package/dist/skill-install.js +53 -13
  107. package/dist/skills.js +33 -0
  108. package/dist/slash-completion.js +155 -0
  109. package/dist/support-dump.js +206 -0
  110. package/dist/tool-catalog.js +59 -0
  111. package/dist/tools/edit.js +45 -15
  112. package/dist/tools/git.js +10 -5
  113. package/dist/tools/homeassistant.js +106 -0
  114. package/dist/tools/index.js +10 -0
  115. package/dist/tools/list.js +19 -6
  116. package/dist/tools/permission.js +992 -12
  117. package/dist/tools/polyglot.js +126 -0
  118. package/dist/tools/read.js +16 -4
  119. package/dist/tools/sandbox.js +38 -13
  120. package/dist/tools/schedule.js +19 -3
  121. package/dist/tools/search.js +226 -15
  122. package/dist/tools/task.js +40 -9
  123. package/dist/tools/timeout.js +23 -3
  124. package/dist/tools/web-fetch-tool.js +33 -0
  125. package/dist/trust.js +11 -1
  126. package/dist/turn-retrieval.js +83 -0
  127. package/dist/ui/app.js +878 -32
  128. package/dist/ui/banner.js +78 -4
  129. package/dist/ui/history.js +37 -5
  130. package/dist/ui/markdown.js +122 -0
  131. package/dist/ui/mentions.js +3 -2
  132. package/dist/ui/overlay.js +496 -0
  133. package/dist/ui/queue.js +23 -0
  134. package/dist/ui/render.js +20 -1
  135. package/dist/ui/session-panel.js +115 -0
  136. package/dist/ui/setup-providers.js +40 -0
  137. package/dist/ui/setup.js +172 -46
  138. package/dist/ui/status.js +142 -0
  139. package/dist/ui/thinking-panel.js +36 -0
  140. package/dist/ui/tool-trail.js +97 -0
  141. package/dist/ui/transcript.js +26 -0
  142. package/dist/ui/useBusyElapsed.js +19 -0
  143. package/dist/ui/useEditor.js +144 -5
  144. package/dist/ui/useGitBranch.js +57 -0
  145. package/dist/update.js +56 -17
  146. package/dist/web-fetch.js +637 -0
  147. package/dist/web-surface.js +190 -0
  148. package/dist/worktree.js +175 -4
  149. package/package.json +5 -5
  150. package/second-brain/AGENTS.md +6 -4
  151. package/second-brain/CLAUDE.md +7 -1
  152. package/second-brain/Evals/_Index.md +10 -2
  153. package/second-brain/Evals/quality-ledger.md +9 -1
  154. package/second-brain/Evals/second-brain-benchmarks.md +62 -0
  155. package/second-brain/GEMINI.md +5 -4
  156. package/second-brain/Home.md +1 -1
  157. package/second-brain/Projects/_Index.md +19 -4
  158. package/second-brain/Projects/sanook-cli/_Index.md +30 -0
  159. package/second-brain/Projects/sanook-cli/context.md +35 -0
  160. package/second-brain/Projects/sanook-cli/current-state.md +32 -0
  161. package/second-brain/Projects/sanook-cli/overview.md +41 -0
  162. package/second-brain/Projects/sanook-cli/repo.md +34 -0
  163. package/second-brain/Projects/sanook-cli/second-brain-feature-roadmap.md +197 -0
  164. package/second-brain/README.md +1 -1
  165. package/second-brain/Research/2026-06-17-ai-second-brain-method-experiment.md +108 -0
  166. package/second-brain/Research/2026-06-18-ai-token-reduction-frameworks.md +55 -0
  167. package/second-brain/Research/2026-06-18-hermes-cli-second-brain-expansion-research.md +160 -0
  168. package/second-brain/Research/2026-06-18-hermes-tui-parity-map.md +129 -0
  169. package/second-brain/Research/2026-06-18-sanook-mcp-ecosystem-and-ux-roadmap.md +181 -0
  170. package/second-brain/Research/2026-06-19-hermes-python-architecture-for-sanook.md +49 -0
  171. package/second-brain/Research/2026-06-19-terminal-ui-brand-research.md +52 -0
  172. package/second-brain/Research/_Index.md +8 -1
  173. package/second-brain/Reviews/2026-06-18-auto-improve-maintenance.md +54 -0
  174. package/second-brain/Reviews/_Index.md +1 -1
  175. package/second-brain/Runbooks/_Index.md +6 -1
  176. package/second-brain/Runbooks/ai-second-brain-operating-sequence.md +108 -0
  177. package/second-brain/SANOOK.md +45 -0
  178. package/second-brain/Sessions/2026-06-17-ai-framework-additional-zones.md +68 -0
  179. package/second-brain/Sessions/2026-06-17-ai-second-brain-sequence-experiment.md +63 -0
  180. package/second-brain/Sessions/2026-06-18-cli-args-release-readiness.md +59 -0
  181. package/second-brain/Sessions/2026-06-18-final-gate-template-final.md +192 -0
  182. package/second-brain/Sessions/2026-06-18-final-gate-template.md +71 -0
  183. package/second-brain/Sessions/2026-06-18-framework-dogfood-permission-and-memory.md +58 -0
  184. package/second-brain/Sessions/2026-06-18-hermes-second-brain-expansion-research.md +52 -0
  185. package/second-brain/Sessions/2026-06-18-mcp-ecosystem-and-sanook-ux-scan.md +81 -0
  186. package/second-brain/Sessions/2026-06-18-sanook-brain-cli-p0-implementation.md +86 -0
  187. package/second-brain/Sessions/2026-06-18-sanook-brain-final-cli-final.md +246 -0
  188. package/second-brain/Sessions/2026-06-18-sanook-brain-final-cli.md +78 -0
  189. package/second-brain/Sessions/2026-06-18-sanook-cli-second-brain-roadmap-correction.md +54 -0
  190. package/second-brain/Sessions/2026-06-18-token-reduction-framework-integration.md +69 -0
  191. package/second-brain/Sessions/_Index.md +15 -1
  192. package/second-brain/Shared/AI-Context-Index.md +22 -0
  193. package/second-brain/Shared/Context-Packs/_Index.md +9 -1
  194. package/second-brain/Shared/Context-Packs/coding-release.md +51 -0
  195. package/second-brain/Shared/Context-Packs/research-to-framework.md +51 -0
  196. package/second-brain/Shared/Context-Packs/second-brain-maintenance.md +41 -0
  197. package/second-brain/Shared/Operating-State/current-state.md +14 -4
  198. package/second-brain/Shared/Scripts/_Index.md +3 -1
  199. package/second-brain/Shared/Scripts/ai-second-brain-method-eval.mjs +198 -0
  200. package/second-brain/Shared/Tech-Standards/_Index.md +6 -1
  201. package/second-brain/Shared/Tech-Standards/mcp-integration-roadmap.md +86 -0
  202. package/second-brain/Shared/Tech-Standards/polyglot-runtime-strategy.md +46 -0
  203. package/second-brain/Shared/Tech-Standards/verification-standard.md +24 -0
  204. package/second-brain/Shared/Tech-Standards/web-search-grounding-policy.md +70 -0
  205. package/second-brain/Shared/User-Memory/_Index.md +4 -1
  206. package/second-brain/Shared/User-Memory/response-examples.md +98 -0
  207. package/second-brain/Shared/User-Memory/user-preferences.md +1 -0
  208. package/second-brain/Templates/_Index.md +9 -0
  209. package/second-brain/Templates/final-lite.md +111 -0
  210. package/second-brain/Templates/final.md +231 -0
  211. package/second-brain/Templates/project-workspace/_Index.md +31 -0
  212. package/second-brain/Templates/project-workspace/context.md +28 -0
  213. package/second-brain/Templates/project-workspace/current-state.md +29 -0
  214. package/second-brain/Templates/project-workspace/overview.md +39 -0
  215. package/second-brain/Templates/project-workspace/repo.md +33 -0
  216. package/second-brain/Vault Structure Map.md +2 -1
  217. package/skills/structured-output-llm/SKILL.md +1 -1
@@ -0,0 +1,58 @@
1
+ ---
2
+ tags: [session, session-log, second-brain, dogfood, permission]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 — Framework Dogfood: Permission + Memory
11
+
12
+ > Session evidence for using the new AI framework/context packs on a real permission-gate task plus durable memory updates.
13
+
14
+ ## Summary
15
+
16
+ ใช้ framework ใหม่กับงานจริง 3 task-family ใน session เดียว: coding-release, second-brain maintenance, และ research/framework benchmark.
17
+
18
+ ## What Was Tried
19
+
20
+ - **Coding & Release Work:** อ่าน diff ของ `src/tools/permission.ts` และ `src/tools/tools.test.ts`, แล้วรัน targeted test
21
+ - **Second-Brain Maintenance:** อัปเดต [[Shared/User-Memory/user-preferences]] และ [[Shared/User-Memory/response-examples]] จาก feedback "ทำทั้งหมดได้เลย"
22
+ - **Research To Framework / Benchmark:** รัน `Shared/Scripts/ai-second-brain-method-eval.mjs` และใช้ [[Evals/second-brain-benchmarks]] เป็น self-check
23
+
24
+ ## Errors
25
+
26
+ - ไม่มี test failure ใน targeted permission/tools test
27
+ - ไม่มี whitespace diff issue ตอนตรวจ `git diff --check`
28
+
29
+ ## Solutions
30
+
31
+ - Permission/tools targeted test ผ่าน: `npm test -- src/tools/tools.test.ts`
32
+ - เพิ่ม preference: เมื่อ scope ชัดและปลอดภัย ให้ทำครบตามรายการที่แนะนำได้เลย
33
+ - เพิ่ม response example: "Act On All Clear Recommendations"
34
+ - บันทึก benchmark/dogfood result ลง [[Evals/quality-ledger]]
35
+
36
+ ## Key Decisions
37
+
38
+ - นับ session นี้เป็น dogfood ของ context packs 3 แบบ:
39
+ - [[Shared/Context-Packs/coding-release]]
40
+ - [[Shared/Context-Packs/second-brain-maintenance]]
41
+ - [[Shared/Context-Packs/research-to-framework]]
42
+ - ยังไม่แก้ logic ใน `src/tools/permission.ts` เพราะ targeted tests ผ่านและ diff สอดคล้องกับเจตนาของ permission gate
43
+
44
+ ## Files Changed
45
+
46
+ - `second-brain/Shared/User-Memory/user-preferences.md`
47
+ - `second-brain/Shared/User-Memory/response-examples.md`
48
+ - `second-brain/Evals/quality-ledger.md`
49
+ - `second-brain/Shared/Operating-State/current-state.md`
50
+ - `second-brain/Sessions/_Index.md`
51
+ - `second-brain/Sessions/2026-06-18-framework-dogfood-permission-and-memory.md`
52
+
53
+ ## Next Steps
54
+
55
+ - รัน full test/typecheck ถ้าจะ finalize code change ใน permission gate
56
+ - ใช้ benchmark อีกครั้งหลัง permission changes ถูก merge หรือปรับเพิ่ม
57
+
58
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,52 @@
1
+ ---
2
+ tags: [session, session-log, second-brain, hermes, research]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 — Hermes Second-Brain Expansion Research
11
+
12
+ > Session log for the research pass on what to add to this second-brain for Hermes CLI support. Links to the sourced research note and leaves implementation as a next step.
13
+
14
+ ## Summary
15
+
16
+ Researched Hermes Agent docs, context engineering guidance, agent memory papers, LangGraph memory concepts, and PARA. Main conclusion: avoid many new root folders; prioritize Hermes-specific adapter/context, memory sync policy, atomic benchmarks, golden fixtures, and scheduled vault-health reviews.
17
+
18
+ ## What Was Tried
19
+
20
+ - Read current vault map, AI context index, evals index, context packs index, user memory index, and operating sequence.
21
+ - Checked current worktree status and avoided unrelated CLI/search changes.
22
+ - Searched current Hermes docs for context files, persistent memory, skills, and curator behavior.
23
+ - Compared with external agent-memory/context sources.
24
+
25
+ ## Errors
26
+
27
+ - Some docs pages were rendered HTML-heavy; raw GitHub markdown for Hermes docs was easier to inspect.
28
+
29
+ ## Solutions
30
+
31
+ - Added [[Research/2026-06-18-hermes-cli-second-brain-expansion-research]] as the durable research note with source URLs and prioritized recommendations.
32
+
33
+ ## Key Decisions
34
+
35
+ - No taxonomy folders were created yet.
36
+ - Recommended next build is `HERMES.md` plus a small Hermes-specific shared policy area before wider taxonomy changes.
37
+
38
+ ## Files Changed
39
+
40
+ - `second-brain/Research/2026-06-18-hermes-cli-second-brain-expansion-research.md`
41
+ - `second-brain/Sessions/2026-06-18-hermes-second-brain-expansion-research.md`
42
+ - `second-brain/Research/_Index.md`
43
+ - `second-brain/Sessions/_Index.md`
44
+ - `second-brain/Shared/Operating-State/current-state.md`
45
+
46
+ ## Next Steps
47
+
48
+ - [ ] Decide whether to implement the recommended Hermes bundle.
49
+ - [ ] If adding folders, update `Vault Structure Map.md` and `src/brain.ts` together.
50
+ - [ ] If only adding files under existing folders, keep taxonomy unchanged.
51
+
52
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,81 @@
1
+ ---
2
+ tags: [session, session-log, mcp, sanook-cli]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 - MCP Ecosystem and Sanook UX Scan
11
+
12
+ > Session log for reviewing Sanook's MCP support and current MCP registry integration opportunities.
13
+
14
+ ## Summary
15
+
16
+ - Inspected `src/mcp.ts`, `src/mcp-server.ts`, `src/bin.ts`, `README.md`, and existing MCP tests/docs.
17
+ - Queried the official MCP registry API and OpenAPI metadata.
18
+ - Identified that Sanook already supports stdio + remote Streamable HTTP and can act as an MCP server.
19
+ - Main UX gap: no registry-backed search/info/install/test wizard yet.
20
+ - Added [[Research/2026-06-18-sanook-mcp-ecosystem-and-ux-roadmap]] and [[Shared/Tech-Standards/mcp-integration-roadmap]].
21
+ - Implemented the P0 MCP UX inside Sanook CLI: registry search/info/install, presets, list/test/doctor probing, docs, and tests.
22
+ - Verified local stdio MCP probing works; official GitLab remote installs from registry but returns `401 Unauthorized` without an auth header.
23
+
24
+ ## What Was Tried
25
+
26
+ - Checked current MCP code paths with `rg`.
27
+ - Read MCP client/server implementation.
28
+ - Queried registry endpoints:
29
+ - `https://registry.modelcontextprotocol.io/v0/version`
30
+ - `https://registry.modelcontextprotocol.io/v0/health`
31
+ - `https://registry.modelcontextprotocol.io/v0/servers?...`
32
+ - `https://registry.modelcontextprotocol.io/openapi.json`
33
+ - Sampled registry search terms: GitHub, GitLab, Postgres, SQLite, filesystem, Slack, Discord, Notion, Linear, Jira, Sentry, Playwright, browser, Gmail, Drive, Obsidian, Context7, fetch, Brave, Docker, Kubernetes.
34
+
35
+ ## Errors
36
+
37
+ - Initial unquoted `curl` query with `?limit=8` was expanded by zsh; quoted URL fixed it.
38
+ - Mintlify HTML docs are noisy for terminal extraction; the registry OpenAPI and API responses were more useful as machine-readable evidence.
39
+
40
+ ## Solutions
41
+
42
+ - Used quoted registry URLs.
43
+ - Used the registry OpenAPI for endpoint/field shape.
44
+ - Captured a Sanook-specific roadmap instead of implementing a large installer in the research turn.
45
+ - Added `src/mcp-registry.ts` for official registry parsing and install-plan generation.
46
+ - Added `sanook mcp search`, `info`, `install`, `preset`, `test`, `doctor`, and `list --tools`.
47
+ - Kept unit tests network-free; live registry smoke was run separately against built `dist/bin.js`.
48
+ - Smoke result: `mcp search/info/install/list` worked against the official registry; a fake stdio MCP server passed `mcp test`; GitLab remote probe failed with `401 Unauthorized` until a token/header is supplied.
49
+
50
+ ## Key Decisions
51
+
52
+ - Next best implementation should be `sanook mcp search/info/install/test`, not another hardcoded list.
53
+ - Use registry metadata for env/header prompts and secret handling.
54
+ - Keep project-local MCP behind `sanook trust`.
55
+ - Prefer read-only / remote Streamable HTTP defaults where available.
56
+ - Do not make the regular test suite depend on the live registry.
57
+ - Preserve manual `--header` support because some registry entries do not yet declare required auth metadata.
58
+
59
+ ## Files Changed
60
+
61
+ - `second-brain/Research/2026-06-18-sanook-mcp-ecosystem-and-ux-roadmap.md`
62
+ - `second-brain/Shared/Tech-Standards/mcp-integration-roadmap.md`
63
+ - `second-brain/Shared/Tech-Standards/_Index.md`
64
+ - `second-brain/Research/_Index.md`
65
+ - `second-brain/Sessions/_Index.md`
66
+ - `second-brain/Sessions/2026-06-18-mcp-ecosystem-and-sanook-ux-scan.md`
67
+ - `src/mcp-registry.ts`
68
+ - `src/mcp-registry.test.ts`
69
+ - `src/mcp.ts`
70
+ - `src/mcp.test.ts`
71
+ - `src/bin.ts`
72
+ - `README.md`
73
+ - `CHANGELOG.md`
74
+
75
+ ## Next Steps
76
+
77
+ - Improve auth hints for hosted MCPs that return `401` but do not declare header requirements in registry metadata.
78
+ - Add risk labels / read-write warnings before installing high-impact servers.
79
+ - Consider registry result caching and richer install previews.
80
+
81
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,86 @@
1
+ ---
2
+ tags: [session, session-log, sanook-cli, second-brain, implementation]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 - Sanook Brain CLI P0 Implementation
11
+
12
+ > Implementation session for making the second-brain workflow first-class inside Sanook CLI.
13
+
14
+ ## Summary
15
+
16
+ Implemented Sanook-native P0 commands for second-brain operations:
17
+
18
+ - `sanook brain doctor`
19
+ - `sanook brain context [--task "..."]`
20
+ - `sanook brain eval`
21
+ - `sanook brain review`
22
+
23
+ ## What Was Tried
24
+
25
+ - Verified existing `brain doctor` implementation and tests.
26
+ - Refactored `buildBrainContext()` so the exact prompt context is assembled from inspectable source parts.
27
+ - Added a `brain context` module and CLI runner to show context source status, char counts, stale/missing warnings, and optional task retrieval.
28
+ - Added a `brain eval` module and CLI runner that scores `Evals/second-brain-benchmarks.md` through static vault checks, context checks, index freshness, and retrieval probes.
29
+ - Added a `brain review` module and CLI runner for read-only curator checks over Memory-Inbox, Context-Packs, Sessions/index coverage, eval freshness, and markdown routing hygiene.
30
+
31
+ ## Errors
32
+
33
+ - The existing Memory-Inbox helper intentionally swallowed missing-file errors for runtime safety; `brain context` needed to distinguish `missing` from `empty`. Fixed by separating candidate parsing from file reading.
34
+ - Review of a fresh scaffold surfaced that generated `Shared/Context-Packs/_Index.md` did not link bundled packs. Fixed scaffold generation so new vaults are discoverable immediately.
35
+ - Review hygiene initially flagged root adapter files for missing `parent`; adjusted review to match the existing root-file exception rule.
36
+
37
+ ## Solutions
38
+
39
+ - `src/memory.ts` now exports `buildBrainContextParts()` and `renderBrainContext()`.
40
+ - `src/brain-context.ts` provides parser, inspector, and formatter for `sanook brain context`.
41
+ - `src/brain-eval.ts` provides static and retrieval benchmark checks for `sanook brain eval`.
42
+ - `src/brain-review.ts` provides read-only curator checks and formatter for `sanook brain review`.
43
+ - `src/brain.ts` now renders seed context pack links into generated `Shared/Context-Packs/_Index.md`.
44
+ - CLI help and REPL help now mention the new commands.
45
+
46
+ ## Files Changed
47
+
48
+ - `CHANGELOG.md`
49
+ - `src/bin.ts`
50
+ - `src/commands.ts`
51
+ - `src/memory.ts`
52
+ - `src/brain.ts`
53
+ - `src/brain-context.ts`
54
+ - `src/brain-context.test.ts`
55
+ - `src/brain-eval.ts`
56
+ - `src/brain-eval.test.ts`
57
+ - `src/brain-review.ts`
58
+ - `src/brain-review.test.ts`
59
+ - `second-brain/Projects/sanook-cli/second-brain-feature-roadmap.md`
60
+ - `second-brain/Shared/Operating-State/current-state.md`
61
+
62
+ ## Verification
63
+
64
+ - `npm test -- src/brain-eval.test.ts src/brain-context.test.ts src/memory.test.ts src/brain-doctor.test.ts src/brain.test.ts`
65
+ - `npm run typecheck`
66
+ - `npm test`
67
+ - `npm run build`
68
+ - `git diff --check`
69
+ - Smoke with temp `HOME`: `brain init`, `index`, `brain doctor`, `brain context --task ... --no-content`, `brain eval --no-retrieval`
70
+ - Smoke with temp `HOME`: `brain eval` full retrieval probes passed 15.0/15
71
+ - `npm test -- src/brain-review.test.ts src/brain.test.ts src/memory.test.ts`
72
+ - `npm run typecheck`
73
+ - `npm test -- src/brain-review.test.ts src/brain-eval.test.ts src/brain-context.test.ts src/brain-doctor.test.ts src/brain.test.ts src/memory.test.ts`
74
+ - `npm test`
75
+ - `npm run build`
76
+ - `git diff --check`
77
+ - Smoke with temp `HOME`: `brain init`, `index`, `brain review` passed 0 warnings / 0 failures.
78
+ - `node dist/bin.js --help | rg "brain (review|context|eval|doctor)"`
79
+
80
+ ## Next Steps
81
+
82
+ - [ ] Consider `sanook brain pack list|show` for `Shared/Context-Packs/`.
83
+ - [ ] Consider `sanook brain new <type>`.
84
+ - [ ] Consider `sanook brain repair`.
85
+
86
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,246 @@
1
+ ---
2
+ tags: [final-gate, verification, sanook-cli, second-brain]
3
+ note_type: final-gate
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ---
8
+
9
+ # 2026-06-18 - Sanook Brain Final CLI - Final Gate
10
+
11
+ > Evidence-backed closeout for implementing `sanook brain final`, `--from-diff`, [[Templates/final-lite]], final-gate validation, and eval coverage.
12
+
13
+ ## 0. Final Gate Rule
14
+
15
+ - [x] This final gate was created before the final owner-facing answer.
16
+ - [x] Every PASS/PARTIAL/FAIL/BLOCKED claim below has evidence or an explicit reason.
17
+ - [x] No unchecked item is silently treated as done.
18
+ - [x] If evidence is missing, status is `PARTIAL`, `FAIL`, or `BLOCKED`, not `PASS`.
19
+ - [x] If a row has no evidence, it cannot be `PASS`.
20
+
21
+ ## 1. Objective / DoD Lock
22
+
23
+ Original request:
24
+
25
+ ```text
26
+ ทำทั้งหมดมาได้เลย
27
+ ```
28
+
29
+ Expected output:
30
+
31
+ - [x] Add `sanook brain final`.
32
+ - [x] Support `--from-diff`.
33
+ - [x] Add a final-gate validator.
34
+ - [x] Add [[Templates/final-lite]].
35
+ - [x] Integrate final-gate coverage with `sanook brain eval`.
36
+
37
+ Definition of Done:
38
+
39
+ | DoD item | Status | Evidence | Notes |
40
+ |---|---|---|---|
41
+ | CLI can create a final gate note in Sessions. | PASS | `src/brain-final.ts`; temp-vault smoke with `node dist/bin.js brain final --task "smoke final gate" --from-diff` | Smoke created `Sessions/2026-06-18-smoke-final-gate-final.md`. |
42
+ | Diff prefill works. | PASS | `src/brain-final.test.ts`; smoke output `from-diff: 23 file(s)` | Prefills changed-file table from git status. |
43
+ | Lite template exists and is scaffolded. | PASS | `second-brain/Templates/final-lite.md`; `src/brain.test.ts`; temp-vault smoke with `--lite --output Sessions/smoke-lite-final.md` | Scaffold test includes full and lite templates; smoke created a lite final gate. |
44
+ | Review validates final-gate evidence. | PASS | `src/brain-review.ts`; `src/brain-review.test.ts` | Test catches TODO and PASS-without-evidence rows. |
45
+ | Eval covers final-gate contract. | PASS | `src/brain-eval.ts`; `src/brain-eval.test.ts` | `SB-FINAL` case added. |
46
+ | Work is documented and discoverable. | PASS | [[Sessions/2026-06-18-sanook-brain-final-cli]], [[Evals/quality-ledger]], [[Templates/_Index]], [[Shared/AI-Context-Index]] | Index and hot path updated. |
47
+
48
+ Out of scope / non-goals:
49
+
50
+ - No automatic filling of all final-gate evidence rows from tests; the CLI creates a scaffold and prefilled diff evidence, then the agent/owner must complete it.
51
+ - No broad `sanook brain new TYPE` template generator in this change.
52
+
53
+ ## 2. Evidence-Backed Checklist
54
+
55
+ | Gate | Status | Evidence | Notes |
56
+ |---|---|---|---|
57
+ | Relevant source/context was read before editing. | PASS | Read `src/brain.ts`, `src/brain-review.ts`, `src/brain-eval.ts`, `src/bin.ts`, existing templates, and tests | Matched local command/test style. |
58
+ | Existing canonical note/file was searched before creating a new one. | PASS | `rg final-lite|brain final|review.final-gates|SB-FINAL` | No existing CLI final generator was present. |
59
+ | Changes were made in the correct folder/module boundary. | PASS | New logic isolated in `src/brain-final.ts`; docs in second-brain templates/standards/evals | Existing `brain context/eval/review` patterns preserved. |
60
+ | No unrelated user/worktree changes were reverted or overwritten. | PASS | `git status --short` showed `src/config.ts` and `src/config.test.ts` as pre-existing modified files; they were not edited | Mention in final answer. |
61
+ | New/changed durable notes have `parent` and `up::`. | PASS | This file and session log include `parent` and `up::`; scaffold hygiene tests passed | Full tests passed. |
62
+ | Index/backlink/discoverability was updated when needed. | PASS | [[Sessions/_Index]], [[Templates/_Index]], [[Shared/AI-Context-Index]], [[Evals/quality-ledger]] | Links added. |
63
+ | Verification was run at the right scope. | PASS | Targeted tests, typecheck, full tests, build, diff check, CLI smoke | Listed in Evidence Matrix. |
64
+ | Residual risk is stated clearly. | PASS | Residual Risk section | Known limitation documented. |
65
+
66
+ ## 3. Status Matrix
67
+
68
+ | Work item / phase | Status | Evidence | Owner-visible outcome |
69
+ |---|---|---|---|
70
+ | Frame objective and DoD | PASS | Section 1 of this final gate | "ทำทั้งหมด" mapped to five concrete deliverables. |
71
+ | Retrieve required context | PASS | Files inspected list below | Implementation follows existing Sanook brain command structure. |
72
+ | Implement / write / edit | PASS | Files changed list below | New CLI workflow exists. |
73
+ | Verify behavior or artifact | PASS | Commands table below | Tests/build/smoke passed. |
74
+ | Update memory/index/session if needed | PASS | Session, final gate, current-state, quality ledger, Sessions index | Work is traceable. |
75
+ | Prepare final response | PASS | Final-answer draft below | Response can cite verified evidence. |
76
+
77
+ Blocked / partial explanation:
78
+
79
+ - `PARTIAL`: none.
80
+ - `BLOCKED`: none.
81
+
82
+ ## 4. Evidence Matrix
83
+
84
+ Commands:
85
+
86
+ | Command | Status | Important output | Scope proven |
87
+ |---|---|---|---|
88
+ | `npm test -- src/brain-final.test.ts src/brain-review.test.ts src/brain-eval.test.ts src/brain.test.ts` | PASS | 4 files, 37 tests passed | Targeted final/review/eval/scaffold behavior. |
89
+ | `npm run typecheck` | PASS | `tsc --noEmit` passed | TypeScript compile surface. |
90
+ | `npm test` | PASS | 102 files, 881 tests passed | Full current test suite. |
91
+ | `npm run build` | PASS | `tsc -p tsconfig.build.json` passed | Build output compiles. |
92
+ | `git diff --check` | PASS | No output | No whitespace/conflict-marker issues. |
93
+ | `node dist/bin.js brain init ...` then `node dist/bin.js brain final --task "smoke final gate" --from-diff` | PASS | Created temp-vault final note, linked Sessions index, `from-diff: 23 file(s)` | Real CLI path from built output. |
94
+ | `node dist/bin.js brain init ...` then `node dist/bin.js brain final --task "smoke lite final" --lite --output Sessions/smoke-lite-final.md` | PASS | Created temp-vault lite final note and linked Sessions index. | Real lite CLI path from built output. |
95
+
96
+ Files inspected:
97
+
98
+ | File/path | Why it matters | Evidence |
99
+ |---|---|---|
100
+ | `src/brain.ts` | Scaffold/copy pattern | New template covered by scaffold tests. |
101
+ | `src/brain-review.ts` | Existing curator check shape | Added final-gate check in same pattern. |
102
+ | `src/brain-eval.ts` | Existing benchmark runner shape | Added `SB-FINAL`. |
103
+ | `src/bin.ts` | CLI subcommand wiring | Added `runBrainFinal` and dispatcher entry. |
104
+ | `second-brain/Templates/final.md` | Full final gate source | Lite template mirrors section contract. |
105
+
106
+ Files changed:
107
+
108
+ | File/path | Change summary | Evidence |
109
+ |---|---|---|
110
+ | `src/brain-final.ts` | New parser, generator, diff prefill, Sessions index update, and validator helpers. | Targeted tests and typecheck passed. |
111
+ | `src/brain-final.test.ts` | Parser/generation/validator coverage. | Targeted tests passed. |
112
+ | `src/bin.ts` / `src/commands.ts` | CLI help and dispatcher wiring for `brain final`. | CLI smoke passed. |
113
+ | `src/brain-review.ts` / `src/brain-review.test.ts` | Review check for final-gate templates and session final gates. | Targeted tests passed. |
114
+ | `src/brain-eval.ts` / `src/brain-eval.test.ts` | `SB-FINAL` eval case. | Targeted tests passed. |
115
+ | `src/brain.test.ts` | Scaffold/template coverage for `final-lite`. | Targeted tests passed. |
116
+ | `second-brain/Templates/final-lite.md` | New compact evidence-backed final gate template. | Scaffold tests passed. |
117
+ | `second-brain/*` indexes/standards/evals/session files | Discoverability and quality-loop closeout. | This final gate and full tests. |
118
+ | `CHANGELOG.md` | User-facing release note. | Diff reviewed. |
119
+
120
+ Artifacts/rendered outputs:
121
+
122
+ | Artifact | Status | Evidence |
123
+ |---|---|---|
124
+ | Built CLI smoke final note in temp vault | PASS | Smoke output showed created path and Sessions index link. |
125
+
126
+ External sources, if any:
127
+
128
+ | Source | Claim supported | Link / citation |
129
+ |---|---|---|
130
+ | N/A | This task used local repo state only. | N/A |
131
+
132
+ ## 5. Residual Risk
133
+
134
+ Known risk:
135
+
136
+ | Risk | Impact | Mitigation / next check |
137
+ |---|---|---|
138
+ | `--from-diff` uses `git status --porcelain=v1` path parsing and does not deeply unescape exotic quoted paths. | Very unusual filenames may need manual adjustment in the generated evidence table. | Keep generated rows editable; add quoted-path parser later if a real case appears. |
139
+ | Generated final gate still contains TODO rows by design. | `brain review` will warn until the gate is filled. | This is intentional; users/agents must complete evidence before claiming done. |
140
+ | Worktree had unrelated config changes before this task. | Full tests cover current tree, but those files are not part of this implementation. | Final answer names them as untouched unrelated changes. |
141
+
142
+ Checks not run:
143
+
144
+ | Check | Reason not run | Consequence |
145
+ |---|---|---|
146
+ | Visual/browser QA | No frontend or visual artifact changed. | N/A |
147
+
148
+ Do not claim done if:
149
+
150
+ - [x] Required checks passed.
151
+ - [x] Changed behavior was exercised by tests and CLI smoke.
152
+ - [x] Final answer will mention residual risk and unrelated modified files.
153
+
154
+ ## 6. Change Summary Audit
155
+
156
+ What changed:
157
+
158
+ - `sanook brain final` can create full or lite final-gate notes in Sessions.
159
+ - `--from-diff` can prefill changed-file evidence rows.
160
+ - `brain review` validates session final gates.
161
+ - `brain eval` includes `SB-FINAL`.
162
+ - Second-brain docs/indexes/quality ledger/session state now point to the workflow.
163
+
164
+ What did not change:
165
+
166
+ - No broad template generator was added.
167
+ - No automatic evidence completion was added.
168
+ - Pre-existing `src/config.ts` and `src/config.test.ts` changes were not edited.
169
+
170
+ Behavior before:
171
+
172
+ - Final gate existed as a manual template only.
173
+ - Review/eval did not know whether final gates existed or were complete.
174
+
175
+ Behavior after:
176
+
177
+ - Sanook can generate final-gate notes from CLI, smoke-tested through built `dist/bin.js`.
178
+ - Review/eval can keep the final-gate workflow from drifting.
179
+
180
+ Compatibility / migration notes:
181
+
182
+ - Existing vaults without `Templates/final-lite.md` can still run the command because the generator falls back to bundled templates.
183
+
184
+ ## 7. Final Answer Draft
185
+
186
+ ```text
187
+ ทำครบแล้วครับ: เพิ่ม `sanook brain final`, `--from-diff`, `--lite`, final-gate validator ใน `brain review`, และ `SB-FINAL` ใน `brain eval` พร้อม docs/templates/session closeout.
188
+
189
+ Verified:
190
+ - npm test -- src/brain-final.test.ts src/brain-review.test.ts src/brain-eval.test.ts src/brain.test.ts: PASS
191
+ - npm run typecheck: PASS
192
+ - npm test: PASS (102 files, 881 tests)
193
+ - npm run build: PASS
194
+ - git diff --check: PASS
195
+ - built CLI smoke: PASS (`--from-diff` and `--lite`)
196
+
197
+ Note:
198
+ - `src/config.ts` และ `src/config.test.ts` เป็น modified อยู่ก่อนแล้ว ผมไม่ได้แตะสองไฟล์นี้
199
+ ```
200
+
201
+ Final-answer safety check:
202
+
203
+ - [x] Does not claim tests/build/smoke passed unless listed in Evidence Matrix.
204
+ - [x] Names files/commands accurately.
205
+ - [x] Mentions skipped checks or residual risk.
206
+ - [x] Is concise enough for the owner.
207
+
208
+ ## 8. Second-Brain Routing / Memory Closeout
209
+
210
+ Session / handoff:
211
+
212
+ - [x] Added [[Sessions/2026-06-18-sanook-brain-final-cli]].
213
+ - [x] Added this final gate note.
214
+ - [x] Updated [[Sessions/_Index]].
215
+
216
+ Durable memory:
217
+
218
+ - [x] Updated [[Shared/Operating-State/current-state]].
219
+ - [x] No new owner preference or protected fact discovered.
220
+
221
+ Indexes / discoverability:
222
+
223
+ - [x] Updated [[Templates/_Index]].
224
+ - [x] Updated [[Shared/AI-Context-Index]].
225
+ - [x] Updated [[Evals/quality-ledger]].
226
+ - [x] Updated [[Evals/second-brain-benchmarks]].
227
+
228
+ Quality loop:
229
+
230
+ - [x] Added `SB-FINAL` eval case.
231
+ - [x] Ran targeted tests, typecheck, full tests, build, diff check, and CLI smoke.
232
+
233
+ ## Final Verdict
234
+
235
+ | Verdict | Choose one | Evidence |
236
+ |---|---|---|
237
+ | Ready to close | PASS | Tests, typecheck, build, diff check, and CLI smoke passed. |
238
+ | Close with caveats | PASS | Residual risk around exotic git paths and intentionally unfilled generated gates is documented. |
239
+ | Needs more work | N/A | No required item remains open. |
240
+ | Blocked | N/A | No blocker. |
241
+
242
+ One-line final state:
243
+
244
+ > Ready to close: Sanook now has a CLI-backed final-gate workflow with diff prefill, lite template, review validation, eval coverage, and documented evidence.
245
+
246
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,78 @@
1
+ ---
2
+ tags: [session, session-log, sanook-cli, second-brain]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 - Sanook Brain Final CLI
11
+
12
+ > Session log for turning the manual final-gate template into a Sanook CLI workflow with validation and eval coverage.
13
+
14
+ ## Summary
15
+
16
+ - Added `sanook brain final [--task "..."] [--from-diff] [--lite]`.
17
+ - Added [[Templates/final-lite]] for smaller evidence-backed closeouts.
18
+ - Added final-gate validation to `sanook brain review`.
19
+ - Added `SB-FINAL` coverage to `sanook brain eval`.
20
+ - Verified with targeted tests, typecheck, full tests, build, diff check, and a temp-vault CLI smoke.
21
+
22
+ ## What Was Tried
23
+
24
+ - Read the existing `brain context/eval/review` command pattern before adding a new subcommand.
25
+ - Kept the generator pure/testable in `src/brain-final.ts`.
26
+ - Used the existing Sessions folder as the canonical home for generated closeout notes.
27
+ - Let `--from-diff` prefill changed files from `git status --porcelain=v1`.
28
+ - Kept `brain review` non-blocking: incomplete final gates warn instead of failing the whole vault.
29
+
30
+ ## Errors
31
+
32
+ - Initial typecheck failed because `CreateBrainFinalOptions` inherited required booleans from parsed CLI args even though runtime options are optional.
33
+
34
+ ## Solutions
35
+
36
+ - Made `CreateBrainFinalOptions` explicitly optional for `fromDiff`, `lite`, `force`, `task`, and `output`.
37
+ - Added tests for parser behavior, full/lite generation, overwrite protection, output path safety, and validator warnings.
38
+ - Added a CLI smoke from `dist/bin.js` using a temp HOME and temp vault.
39
+
40
+ ## Key Decisions
41
+
42
+ - Default output path is `Sessions/YYYY-MM-DD-<slug>-final.md`.
43
+ - `--output` is confined inside the configured second-brain vault.
44
+ - `--lite` uses the same eight final-gate section names so review/eval can share the same structural validator.
45
+ - `brain review` checks session final gates only, while template files are checked structurally so scaffolded vaults do not fail because templates contain TODO placeholders.
46
+
47
+ ## Files Changed
48
+
49
+ - `src/brain-final.ts`
50
+ - `src/brain-final.test.ts`
51
+ - `src/bin.ts`
52
+ - `src/commands.ts`
53
+ - `src/brain-review.ts`
54
+ - `src/brain-review.test.ts`
55
+ - `src/brain-eval.ts`
56
+ - `src/brain-eval.test.ts`
57
+ - `src/brain.test.ts`
58
+ - `second-brain/Templates/final-lite.md`
59
+ - `second-brain/Templates/_Index.md`
60
+ - `second-brain/Shared/AI-Context-Index.md`
61
+ - `second-brain/Shared/Tech-Standards/verification-standard.md`
62
+ - `second-brain/Runbooks/ai-second-brain-operating-sequence.md`
63
+ - `second-brain/Evals/second-brain-benchmarks.md`
64
+ - `second-brain/Evals/quality-ledger.md`
65
+ - `second-brain/Shared/Operating-State/current-state.md`
66
+ - `CHANGELOG.md`
67
+
68
+ Unrelated pre-existing changes left untouched:
69
+
70
+ - `src/config.ts`
71
+ - `src/config.test.ts`
72
+
73
+ ## Next Steps
74
+
75
+ - Dogfood `sanook brain final --task "..." --from-diff` in future non-trivial Sanook CLI work.
76
+ - Consider `sanook brain new TYPE` later if template instantiation becomes a broader workflow need.
77
+
78
+ up:: [[Sessions/_Index]]
@@ -0,0 +1,54 @@
1
+ ---
2
+ tags: [session, session-log, sanook-cli, second-brain, correction]
3
+ note_type: session-log
4
+ created: 2026-06-18
5
+ updated: 2026-06-18
6
+ parent: "[[Sessions/_Index]]"
7
+ ai_surface: history
8
+ ---
9
+
10
+ # 2026-06-18 — Sanook CLI Second-Brain Roadmap Correction
11
+
12
+ > Correction session after owner clarified that the target is Sanook CLI, not Hermes CLI. Captures the Sanook-native direction and leaves Hermes research as reference only.
13
+
14
+ ## Summary
15
+
16
+ Reframed the previous Hermes-heavy research into a Sanook CLI roadmap. Sanook already has `brain init`, vault context injection, memory routing, index/search, and MCP serving, so the next useful work is CLI features: `brain doctor`, `brain context`, `brain eval`, and later `brain review`.
17
+
18
+ ## What Was Tried
19
+
20
+ - Read `src/brain.ts`, `src/bin.ts`, `src/commands.ts`, `src/doctor.ts`, `src/knowledge.ts`, and `second-brain/SANOOK.md`.
21
+ - Checked current command surface for `brain init`, `index`, `search`, MCP, and memory behavior.
22
+ - Created a Sanook project workspace note under `Projects/sanook-cli/`.
23
+
24
+ ## Errors
25
+
26
+ - Initial research over-weighted Hermes-specific implementation because the earlier wording mentioned Hermes CLI.
27
+
28
+ ## Solutions
29
+
30
+ - Added [[Projects/sanook-cli/second-brain-feature-roadmap]] as the corrected implementation roadmap.
31
+ - Left Hermes research as a compatibility reference, not the main next action.
32
+
33
+ ## Key Decisions
34
+
35
+ - Do not add `HERMES.md` as the next step for this objective.
36
+ - First Sanook-native slice should be `sanook brain doctor`.
37
+
38
+ ## Files Changed
39
+
40
+ - `second-brain/Projects/_Index.md`
41
+ - `second-brain/Projects/sanook-cli/_Index.md`
42
+ - `second-brain/Projects/sanook-cli/second-brain-feature-roadmap.md`
43
+ - `second-brain/Sessions/_Index.md`
44
+ - `second-brain/Sessions/2026-06-18-sanook-cli-second-brain-roadmap-correction.md`
45
+ - `second-brain/Shared/Operating-State/current-state.md`
46
+ - `second-brain/Research/2026-06-18-hermes-cli-second-brain-expansion-research.md`
47
+
48
+ ## Next Steps
49
+
50
+ - [ ] Implement `sanook brain doctor`.
51
+ - [ ] Then implement `sanook brain context [--task]`.
52
+ - [ ] Then implement `sanook brain eval`.
53
+
54
+ up:: [[Sessions/_Index]]