hoomanjs 1.29.2 → 1.30.0

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 (273) hide show
  1. package/README.md +216 -69
  2. package/dist/acp/acp-agent.d.ts +5 -5
  3. package/dist/acp/acp-agent.js +55 -54
  4. package/dist/acp/acp-agent.js.map +1 -1
  5. package/dist/acp/approvals.d.ts +3 -3
  6. package/dist/acp/approvals.js +73 -115
  7. package/dist/acp/approvals.js.map +1 -1
  8. package/dist/acp/sessions/options.js +11 -25
  9. package/dist/acp/sessions/options.js.map +1 -1
  10. package/dist/acp/utils/tool-kind.js +1 -5
  11. package/dist/acp/utils/tool-kind.js.map +1 -1
  12. package/dist/chat/app.d.ts +5 -1
  13. package/dist/chat/app.js +322 -202
  14. package/dist/chat/app.js.map +1 -1
  15. package/dist/chat/approvals.d.ts +4 -3
  16. package/dist/chat/approvals.js +11 -45
  17. package/dist/chat/approvals.js.map +1 -1
  18. package/dist/chat/components/ChatMessage.d.ts +1 -2
  19. package/dist/chat/components/ChatMessage.js +4 -5
  20. package/dist/chat/components/ChatMessage.js.map +1 -1
  21. package/dist/chat/components/EmptyChatBanner.js +2 -3
  22. package/dist/chat/components/EmptyChatBanner.js.map +1 -1
  23. package/dist/chat/components/StatusBar.js +6 -2
  24. package/dist/chat/components/StatusBar.js.map +1 -1
  25. package/dist/chat/components/ThoughtEvent.d.ts +6 -0
  26. package/dist/chat/components/ThoughtEvent.js +30 -0
  27. package/dist/chat/components/ThoughtEvent.js.map +1 -0
  28. package/dist/chat/components/ToolEvent.js +1 -1
  29. package/dist/chat/components/ToolEvent.js.map +1 -1
  30. package/dist/chat/components/Transcript.d.ts +7 -2
  31. package/dist/chat/components/Transcript.js +6 -2
  32. package/dist/chat/components/Transcript.js.map +1 -1
  33. package/dist/chat/components/markdown/BlockRenderer.js +7 -7
  34. package/dist/chat/components/markdown/BlockRenderer.js.map +1 -1
  35. package/dist/chat/components/markdown/MarkdownMessage.js +1 -1
  36. package/dist/chat/components/markdown/MarkdownMessage.js.map +1 -1
  37. package/dist/chat/components/shared.js +2 -0
  38. package/dist/chat/components/shared.js.map +1 -1
  39. package/dist/chat/index.d.ts +4 -0
  40. package/dist/chat/index.js +17 -3
  41. package/dist/chat/index.js.map +1 -1
  42. package/dist/chat/steering.d.ts +20 -0
  43. package/dist/chat/steering.js +67 -0
  44. package/dist/chat/steering.js.map +1 -0
  45. package/dist/chat/types.d.ts +5 -1
  46. package/dist/cli.js +91 -13
  47. package/dist/cli.js.map +1 -1
  48. package/dist/configure/app.d.ts +1 -1
  49. package/dist/configure/app.js +581 -303
  50. package/dist/configure/app.js.map +1 -1
  51. package/dist/configure/components/MenuScreen.d.ts +4 -2
  52. package/dist/configure/components/MenuScreen.js +33 -6
  53. package/dist/configure/components/MenuScreen.js.map +1 -1
  54. package/dist/configure/components/SelectMenuItem.d.ts +1 -0
  55. package/dist/configure/components/SelectMenuItem.js +19 -10
  56. package/dist/configure/components/SelectMenuItem.js.map +1 -1
  57. package/dist/configure/index.js +4 -2
  58. package/dist/configure/index.js.map +1 -1
  59. package/dist/configure/types.d.ts +14 -12
  60. package/dist/configure/utils.d.ts +2 -0
  61. package/dist/configure/utils.js +21 -2
  62. package/dist/configure/utils.js.map +1 -1
  63. package/dist/core/agent/index.d.ts +3 -3
  64. package/dist/core/agent/index.js +20 -25
  65. package/dist/core/agent/index.js.map +1 -1
  66. package/dist/core/agent/mode-aware-tool-registry.js +2 -1
  67. package/dist/core/agent/mode-aware-tool-registry.js.map +1 -1
  68. package/dist/core/approvals/intervention.d.ts +34 -0
  69. package/dist/core/approvals/intervention.js +94 -0
  70. package/dist/core/approvals/intervention.js.map +1 -0
  71. package/dist/core/config.d.ts +49 -28
  72. package/dist/core/config.js +85 -26
  73. package/dist/core/config.js.map +1 -1
  74. package/dist/core/context/index.d.ts +11 -2
  75. package/dist/core/context/index.js +54 -4
  76. package/dist/core/context/index.js.map +1 -1
  77. package/dist/core/context/model-extractor.d.ts +13 -0
  78. package/dist/core/context/model-extractor.js +98 -0
  79. package/dist/core/context/model-extractor.js.map +1 -0
  80. package/dist/core/index.d.ts +6 -2
  81. package/dist/core/index.js +6 -1
  82. package/dist/core/index.js.map +1 -1
  83. package/dist/core/mcp/config.d.ts +28 -0
  84. package/dist/core/mcp/index.d.ts +5 -3
  85. package/dist/core/mcp/index.js +4 -2
  86. package/dist/core/mcp/index.js.map +1 -1
  87. package/dist/core/mcp/manager.d.ts +14 -1
  88. package/dist/core/mcp/manager.js +76 -4
  89. package/dist/core/mcp/manager.js.map +1 -1
  90. package/dist/core/mcp/oauth/callback-server.d.ts +16 -0
  91. package/dist/core/mcp/oauth/callback-server.js +134 -0
  92. package/dist/core/mcp/oauth/callback-server.js.map +1 -0
  93. package/dist/core/mcp/oauth/identity.d.ts +9 -0
  94. package/dist/core/mcp/oauth/identity.js +31 -0
  95. package/dist/core/mcp/oauth/identity.js.map +1 -0
  96. package/dist/core/mcp/oauth/index.d.ts +11 -0
  97. package/dist/core/mcp/oauth/index.js +15 -0
  98. package/dist/core/mcp/oauth/index.js.map +1 -0
  99. package/dist/core/mcp/oauth/provider.d.ts +43 -0
  100. package/dist/core/mcp/oauth/provider.js +203 -0
  101. package/dist/core/mcp/oauth/provider.js.map +1 -0
  102. package/dist/core/mcp/oauth/service.d.ts +29 -0
  103. package/dist/core/mcp/oauth/service.js +139 -0
  104. package/dist/core/mcp/oauth/service.js.map +1 -0
  105. package/dist/core/mcp/oauth/store.d.ts +14 -0
  106. package/dist/core/mcp/oauth/store.js +86 -0
  107. package/dist/core/mcp/oauth/store.js.map +1 -0
  108. package/dist/core/mcp/oauth/types.d.ts +87 -0
  109. package/dist/core/mcp/oauth/types.js +45 -0
  110. package/dist/core/mcp/oauth/types.js.map +1 -0
  111. package/dist/core/mcp/types.d.ts +56 -0
  112. package/dist/core/mcp/types.js +3 -0
  113. package/dist/core/mcp/types.js.map +1 -1
  114. package/dist/core/memory/file-store.d.ts +24 -0
  115. package/dist/core/memory/file-store.js +151 -0
  116. package/dist/core/memory/file-store.js.map +1 -0
  117. package/dist/core/memory/index.d.ts +2 -5
  118. package/dist/core/memory/index.js +2 -3
  119. package/dist/core/memory/index.js.map +1 -1
  120. package/dist/core/memory/runtime.d.ts +4 -0
  121. package/dist/core/memory/runtime.js +37 -0
  122. package/dist/core/memory/runtime.js.map +1 -0
  123. package/dist/core/models/anthropic.js +24 -1
  124. package/dist/core/models/anthropic.js.map +1 -1
  125. package/dist/core/models/moonshot.js +33 -1
  126. package/dist/core/models/moonshot.js.map +1 -1
  127. package/dist/core/modes/definitions.d.ts +19 -0
  128. package/dist/core/modes/definitions.js +99 -0
  129. package/dist/core/modes/definitions.js.map +1 -0
  130. package/dist/core/modes/index.d.ts +3 -0
  131. package/dist/core/modes/index.js +4 -0
  132. package/dist/core/modes/index.js.map +1 -0
  133. package/dist/core/modes/registry.d.ts +9 -0
  134. package/dist/core/modes/registry.js +57 -0
  135. package/dist/core/modes/registry.js.map +1 -0
  136. package/dist/core/modes/schema.d.ts +5 -0
  137. package/dist/core/modes/schema.js +6 -0
  138. package/dist/core/modes/schema.js.map +1 -0
  139. package/dist/core/prompts/agents/research.md +8 -8
  140. package/dist/core/prompts/bundled.d.ts +3 -0
  141. package/dist/core/prompts/bundled.js +14 -0
  142. package/dist/core/prompts/bundled.js.map +1 -0
  143. package/dist/core/prompts/environment.d.ts +0 -1
  144. package/dist/core/prompts/environment.js +0 -2
  145. package/dist/core/prompts/environment.js.map +1 -1
  146. package/dist/core/prompts/index.d.ts +1 -4
  147. package/dist/core/prompts/index.js +1 -7
  148. package/dist/core/prompts/index.js.map +1 -1
  149. package/dist/core/prompts/modes/agent.md +3 -0
  150. package/dist/core/prompts/modes/ask.md +5 -3
  151. package/dist/core/prompts/modes/plan.md +2 -2
  152. package/dist/core/prompts/session-mode-appendix.d.ts +3 -9
  153. package/dist/core/prompts/session-mode-appendix.js +32 -69
  154. package/dist/core/prompts/session-mode-appendix.js.map +1 -1
  155. package/dist/core/prompts/static/environment.md +2 -2
  156. package/dist/core/prompts/static/init.md +25 -0
  157. package/dist/core/prompts/static/memory.md +9 -123
  158. package/dist/core/prompts/static/planning.md +1 -1
  159. package/dist/core/prompts/static/skills.md +6 -5
  160. package/dist/core/prompts/static/subagents.md +2 -2
  161. package/dist/core/prompts/static/web-search.md +2 -1
  162. package/dist/core/prompts/system.js +8 -22
  163. package/dist/core/prompts/system.js.map +1 -1
  164. package/dist/core/skills/built-in/hooman-config/SKILL.md +105 -32
  165. package/dist/core/skills/built-in/hooman-skills/SKILL.md +1 -1
  166. package/dist/core/skills/index.d.ts +1 -0
  167. package/dist/core/skills/index.js +1 -0
  168. package/dist/core/skills/index.js.map +1 -1
  169. package/dist/core/skills/plugin.d.ts +7 -0
  170. package/dist/core/skills/plugin.js +40 -0
  171. package/dist/core/skills/plugin.js.map +1 -0
  172. package/dist/core/state/agent-app-state.d.ts +1 -1
  173. package/dist/core/state/agent-app-state.js +1 -1
  174. package/dist/core/state/session-mode.d.ts +2 -9
  175. package/dist/core/state/session-mode.js +4 -12
  176. package/dist/core/state/session-mode.js.map +1 -1
  177. package/dist/core/state/tool-approvals.d.ts +4 -8
  178. package/dist/core/state/tool-approvals.js +14 -76
  179. package/dist/core/state/tool-approvals.js.map +1 -1
  180. package/dist/core/subagents/index.d.ts +3 -0
  181. package/dist/core/subagents/index.js +4 -0
  182. package/dist/core/subagents/index.js.map +1 -0
  183. package/dist/core/subagents/research.d.ts +16 -0
  184. package/dist/core/subagents/research.js +58 -0
  185. package/dist/core/subagents/research.js.map +1 -0
  186. package/dist/core/{agents → subagents}/runner.d.ts +6 -5
  187. package/dist/core/{agents → subagents}/runner.js +8 -10
  188. package/dist/core/subagents/runner.js.map +1 -0
  189. package/dist/core/{agents/tools.d.ts → subagents/tool.d.ts} +6 -6
  190. package/dist/core/{agents/tools.js → subagents/tool.js} +14 -16
  191. package/dist/core/subagents/tool.js.map +1 -0
  192. package/dist/core/tools/plan.js +2 -6
  193. package/dist/core/tools/plan.js.map +1 -1
  194. package/dist/core/tools/time.js +1 -1
  195. package/dist/core/tools/time.js.map +1 -1
  196. package/dist/core/utils/browser.d.ts +1 -0
  197. package/dist/core/utils/browser.js +25 -0
  198. package/dist/core/utils/browser.js.map +1 -0
  199. package/dist/core/utils/paths.d.ts +2 -4
  200. package/dist/core/utils/paths.js +2 -4
  201. package/dist/core/utils/paths.js.map +1 -1
  202. package/dist/daemon/approvals.d.ts +2 -2
  203. package/dist/daemon/approvals.js +51 -56
  204. package/dist/daemon/approvals.js.map +1 -1
  205. package/dist/daemon/index.js +9 -6
  206. package/dist/daemon/index.js.map +1 -1
  207. package/dist/exec/approvals.d.ts +2 -4
  208. package/dist/exec/approvals.js +16 -48
  209. package/dist/exec/approvals.js.map +1 -1
  210. package/dist/index.d.ts +13 -18
  211. package/dist/index.js +9 -11
  212. package/dist/index.js.map +1 -1
  213. package/package.json +5 -18
  214. package/dist/chat/components/ScrollView.d.ts +0 -106
  215. package/dist/chat/components/ScrollView.js +0 -80
  216. package/dist/chat/components/ScrollView.js.map +0 -1
  217. package/dist/chat/components/TranscriptViewport.d.ts +0 -9
  218. package/dist/chat/components/TranscriptViewport.js +0 -124
  219. package/dist/chat/components/TranscriptViewport.js.map +0 -1
  220. package/dist/core/agents/definitions.d.ts +0 -12
  221. package/dist/core/agents/definitions.js +0 -20
  222. package/dist/core/agents/definitions.js.map +0 -1
  223. package/dist/core/agents/index.d.ts +0 -4
  224. package/dist/core/agents/index.js +0 -5
  225. package/dist/core/agents/index.js.map +0 -1
  226. package/dist/core/agents/registry.d.ts +0 -5
  227. package/dist/core/agents/registry.js +0 -84
  228. package/dist/core/agents/registry.js.map +0 -1
  229. package/dist/core/agents/runner.js.map +0 -1
  230. package/dist/core/agents/tools.js.map +0 -1
  231. package/dist/core/inference/embedder.d.ts +0 -26
  232. package/dist/core/inference/embedder.js +0 -85
  233. package/dist/core/inference/embedder.js.map +0 -1
  234. package/dist/core/inference/index.d.ts +0 -9
  235. package/dist/core/inference/index.js +0 -13
  236. package/dist/core/inference/index.js.map +0 -1
  237. package/dist/core/inference/loader.d.ts +0 -16
  238. package/dist/core/inference/loader.js +0 -129
  239. package/dist/core/inference/loader.js.map +0 -1
  240. package/dist/core/inference/reranker.d.ts +0 -28
  241. package/dist/core/inference/reranker.js +0 -66
  242. package/dist/core/inference/reranker.js.map +0 -1
  243. package/dist/core/memory/brain.d.ts +0 -25
  244. package/dist/core/memory/brain.js +0 -137
  245. package/dist/core/memory/brain.js.map +0 -1
  246. package/dist/core/memory/database.d.ts +0 -4
  247. package/dist/core/memory/database.js +0 -87
  248. package/dist/core/memory/database.js.map +0 -1
  249. package/dist/core/memory/tools.d.ts +0 -16
  250. package/dist/core/memory/tools.js +0 -110
  251. package/dist/core/memory/tools.js.map +0 -1
  252. package/dist/core/memory/types.d.ts +0 -11
  253. package/dist/core/memory/types.js +0 -2
  254. package/dist/core/memory/types.js.map +0 -1
  255. package/dist/core/prompts/skills.d.ts +0 -15
  256. package/dist/core/prompts/skills.js +0 -92
  257. package/dist/core/prompts/skills.js.map +0 -1
  258. package/dist/core/prompts/static/wiki.md +0 -25
  259. package/dist/core/wiki/converters.d.ts +0 -12
  260. package/dist/core/wiki/converters.js +0 -73
  261. package/dist/core/wiki/converters.js.map +0 -1
  262. package/dist/core/wiki/database.d.ts +0 -39
  263. package/dist/core/wiki/database.js +0 -177
  264. package/dist/core/wiki/database.js.map +0 -1
  265. package/dist/core/wiki/index.d.ts +0 -7
  266. package/dist/core/wiki/index.js +0 -5
  267. package/dist/core/wiki/index.js.map +0 -1
  268. package/dist/core/wiki/storage.d.ts +0 -38
  269. package/dist/core/wiki/storage.js +0 -206
  270. package/dist/core/wiki/storage.js.map +0 -1
  271. package/dist/core/wiki/tools.d.ts +0 -5
  272. package/dist/core/wiki/tools.js +0 -32
  273. package/dist/core/wiki/tools.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const PROMPTS_ROOT = dirname(fileURLToPath(import.meta.url));
5
+ export function bundledPromptPath(...parts) {
6
+ return join(PROMPTS_ROOT, ...parts);
7
+ }
8
+ export function hasBundledPrompt(...parts) {
9
+ return existsSync(bundledPromptPath(...parts));
10
+ }
11
+ export function readBundledPrompt(...parts) {
12
+ return readFileSync(bundledPromptPath(...parts), "utf8").trim();
13
+ }
14
+ //# sourceMappingURL=bundled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundled.js","sourceRoot":"","sources":["../../../src/core/prompts/bundled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7D,MAAM,UAAU,iBAAiB,CAAC,GAAG,KAAe;IAClD,OAAO,IAAI,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAG,KAAe;IACjD,OAAO,UAAU,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAG,KAAe;IAClD,OAAO,YAAY,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,CAAC"}
@@ -4,7 +4,6 @@ type EnvironmentPromptContext = {
4
4
  osVersion: string;
5
5
  shell: string;
6
6
  isGitRepo: boolean;
7
- currentDateTime: string;
8
7
  timeZone: string;
9
8
  };
10
9
  export declare function getEnvironmentPromptContext(): EnvironmentPromptContext;
@@ -37,14 +37,12 @@ function detectTimeZone() {
37
37
  }
38
38
  export function getEnvironmentPromptContext() {
39
39
  const cwd = process.cwd();
40
- const now = new Date();
41
40
  return {
42
41
  cwd,
43
42
  platform: detectPlatform(),
44
43
  osVersion: detectOsVersion(),
45
44
  shell: detectShell(),
46
45
  isGitRepo: detectGitRepo(cwd),
47
- currentDateTime: now.toString(),
48
46
  timeZone: detectTimeZone(),
49
47
  };
50
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/core/prompts/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,IAAI,IAAI,MAAM,EACd,OAAO,IAAI,SAAS,GACrB,MAAM,SAAS,CAAC;AAYjB,SAAS,cAAc;IACrB,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC5D,CAAC,CAAC,OAAO,CAAC,QAAQ;QAClB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACvB,CAAC;AAED,SAAS,eAAe;IACtB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,GAAG,SAAS,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,MAAM,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,WAAW;IAClB,MAAM,KAAK,GACT,OAAO,CAAC,GAAG,CAAC,KAAK;QACjB,OAAO,CAAC,GAAG,CAAC,OAAO;QACnB,OAAO,CAAC,GAAG,CAAC,OAAO;QACnB,SAAS,CAAC;IACZ,OAAO,KAAK,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;AACnC,CA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,EAAE,cAAc,EAAE;QAC1B,SAAS,EAAE,eAAe,EAAE;QAC5B,KAAK,EAAE,WAAW,EAAE;QACpB,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC;QAC7B,QAAQ,EAAE,cAAc,EAAE;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,7 +1,4 @@
1
1
  import type { Config } from "../config.js";
2
- import type { Registry } from "../skills/registry.js";
3
- import { Skills } from "./skills.js";
4
2
  import { System, type SystemMode } from "./system.js";
5
- export { Skills, System };
3
+ export { System };
6
4
  export declare function system(path: string, config: Config, mode?: SystemMode): Promise<System>;
7
- export declare function skills(registry: Registry): Promise<Skills>;
@@ -1,14 +1,8 @@
1
- import { Skills } from "./skills.js";
2
1
  import { System } from "./system.js";
3
- export { Skills, System };
2
+ export { System };
4
3
  export async function system(path, config, mode = "default") {
5
4
  const prompt = new System(path, config, mode);
6
5
  await prompt.reload();
7
6
  return prompt;
8
7
  }
9
- export async function skills(registry) {
10
- const prompt = new Skills(registry);
11
- await prompt.reload();
12
- return prompt;
13
- }
14
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/prompts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,IAAY,EACZ,MAAc,EACd,OAAmB,SAAS;IAE5B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAkB;IAC7C,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,IAAY,EACZ,MAAc,EACd,OAAmB,SAAS;IAE5B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ ## Agent mode
2
+
3
+ You are in **agent** mode and can make use of any available tool to fulfil your current task.
@@ -1,3 +1,5 @@
1
+ ## Ask mode
2
+
1
3
  You are in **ask** mode: a narrowed tool surface for exploration, research, and answering questions.
2
4
 
3
5
  ## Ask mode
@@ -9,9 +11,9 @@ You are in **ask** mode: a narrowed tool surface for exploration, research, and
9
11
  ### Discipline
10
12
 
11
13
  - Do **not** imply you can use tools that are not exposed in this phase.
12
- - If the user needs a **written plan on disk** and the staged planning workflow, they should switch to **plan** mode (or **default** when those tools are available).
13
- - If they want **full implementation** or unrestricted editing commands, they should switch to **default** mode (or approve work explicitly once they have switched).
14
- - When **`run_agents`** is available, use it only for **read-only** parallel exploration; you remain responsible for synthesizing answers.
14
+ - If the user needs a **written plan on disk** and the staged planning workflow, they should switch to **plan** mode (or **agent** when those tools are available).
15
+ - If they want **full implementation** or unrestricted editing commands, they should switch to **agent** mode (or approve work explicitly once they have switched).
16
+ - When **`run_subagents`** is available, use it only for **read-only** parallel exploration; you remain responsible for synthesizing answers.
15
17
 
16
18
  ### Output
17
19
 
@@ -6,7 +6,7 @@ You are in planning mode. **Implementation still requires an explicit go-ahead f
6
6
 
7
7
  ### Mandatory order
8
8
 
9
- 1. **Plan stub before exploration.** If the line above shows **—**, your **only** tool call until the path appears must be **`enter_plan_mode`**. Do **not** run **`list_directory`**, **`read_file`**, **`fetch`**, **`web_search`**, **`run_agents`**, wiki tools, or any other tool first—there is nothing substantive to inspect until the plan document exists. You may send a **short** chat line saying you are allocating the plan; then call **`enter_plan_mode`** in that same turn.
9
+ 1. **Plan stub before exploration.** If the line above shows **—**, your **only** tool call until the path appears must be **`enter_plan_mode`**. Do **not** run **`list_directory`**, **`read_file`**, **`fetch`**, **`web_search`**, **`run_subagents`**, or any other tool first—there is nothing substantive to inspect until the plan document exists. You may send a **short** chat line saying you are allocating the plan; then call **`enter_plan_mode`** in that same turn.
10
10
  2. **Treat that file as the single source of truth.** Do not rely on chat alone to hold the plan—everything negotiated belongs in the plan file.
11
11
  3. **Every assistant turn** after the plan path exists: incorporate user messages (and new facts), then **update the plan file** with **`write_file`** / **`edit_file`** so it reflects objectives, constraints, open questions, and steps. If the user corrects or adds information, **edit the plan file in the same turn**.
12
12
 
@@ -20,7 +20,7 @@ Exception: if the user **explicitly** asks you to read a specific path they gave
20
20
 
21
21
  ### Boundaries (your direct actions)
22
22
 
23
- - Do not create, edit, move, or delete files **other than the plan file** shown above (delegated **`run_agents`** tasks stay **read-only** exploration).
23
+ - Do not create, edit, move, or delete files **other than the plan file** shown above (delegated **`run_subagents`** tasks stay **read-only** exploration).
24
24
  - Do not run commands that change system state outside tools exposed in this mode.
25
25
  - Do not ship the final deliverable here—only the reviewed plan document.
26
26
 
@@ -1,16 +1,10 @@
1
- import type { LocalAgent } from "@strands-agents/sdk";
1
+ import { ContextInjector } from "@strands-agents/sdk/vended-plugins/context-injector";
2
2
  import { type SessionMode } from "../state/session-mode.js";
3
- export declare function registerAgentSystemPromptBaseBuilder(agent: LocalAgent, buildBase: () => Promise<string>): void;
4
- /** Rebuild base instructions from disk/config and re-apply the session-mode appendix. */
5
- export declare function refreshAgentFullSystemPrompt(agent: LocalAgent): Promise<void>;
6
3
  /** Plain snapshot of selected `appState` entries for mode prompts (Handlebars `state`). */
7
4
  export declare function snapshotAppStateForSessionModePrompt(agent: {
8
5
  appState: {
9
6
  get(key: string): unknown;
10
7
  };
11
8
  }): Record<string, unknown>;
12
- export declare function composeSystemPromptWithSessionMode(base: string, mode: SessionMode,
13
- /** Values read as `state` in plan mode Handlebars (e.g. `lookup state 'hooman.planFile'`). */
14
- sessionModeState?: Record<string, unknown>): string;
15
- /** Applies the session-mode appendix to `base` and updates `agent.systemPrompt` when it changes. */
16
- export declare function refreshAgentSystemPromptForSessionMode(agent: LocalAgent, base: string): void;
9
+ export declare function renderSessionModePrompt(mode: SessionMode, sessionModeState?: Record<string, unknown>): string;
10
+ export declare function createSessionModePromptPlugin(): ContextInjector;
@@ -1,11 +1,10 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { dirname, join } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
1
  import handlebars from "handlebars";
2
+ import { ContextInjector } from "@strands-agents/sdk/vended-plugins/context-injector";
3
+ import { hasBundledPrompt, readBundledPrompt } from "./bundled.js";
4
+ import { getModeDefinition, } from "../modes/definitions.js";
5
5
  import { PLAN_ENTERED_AT_STATE_KEY, PLAN_ENTER_REASON_STATE_KEY, PLAN_FILE_STATE_KEY, } from "../state/plan.js";
6
6
  import { getModeState, MODE_STATE_KEY, } from "../state/session-mode.js";
7
7
  const { compile } = handlebars;
8
- const SECTION_BREAK = "\n\n---\n\n";
9
8
  /** Keys exposed as `state` in session-mode Handlebars templates (e.g. plan.md). */
10
9
  const SESSION_MODE_TEMPLATE_STATE_KEYS = [
11
10
  MODE_STATE_KEY,
@@ -13,29 +12,13 @@ const SESSION_MODE_TEMPLATE_STATE_KEYS = [
13
12
  PLAN_ENTER_REASON_STATE_KEY,
14
13
  PLAN_ENTERED_AT_STATE_KEY,
15
14
  ];
16
- let cachedPlanTemplateSource = null;
17
- let cachedPlanTemplateCompiled = null;
18
- let cachedAskAppendix = null;
19
- const systemPromptBaseBuilders = new WeakMap();
20
- export function registerAgentSystemPromptBaseBuilder(agent, buildBase) {
21
- systemPromptBaseBuilders.set(agent, buildBase);
22
- }
23
- /** Rebuild base instructions from disk/config and re-apply the session-mode appendix. */
24
- export async function refreshAgentFullSystemPrompt(agent) {
25
- const build = systemPromptBaseBuilders.get(agent);
26
- if (!build) {
27
- return;
28
- }
29
- const base = await build();
30
- refreshAgentSystemPromptForSessionMode(agent, base);
31
- }
15
+ const cachedModeTemplates = new Map();
32
16
  function readBundledModeFile(file) {
33
- const dir = join(dirname(fileURLToPath(import.meta.url)), "modes");
34
- const full = join(dir, file);
35
- if (!existsSync(full)) {
17
+ const parts = file.split("/");
18
+ if (!hasBundledPrompt(...parts)) {
36
19
  return "";
37
20
  }
38
- return readFileSync(full, "utf8").trim();
21
+ return readBundledPrompt(...parts);
39
22
  }
40
23
  /** Plain snapshot of selected `appState` entries for mode prompts (Handlebars `state`). */
41
24
  export function snapshotAppStateForSessionModePrompt(agent) {
@@ -45,54 +28,34 @@ export function snapshotAppStateForSessionModePrompt(agent) {
45
28
  }
46
29
  return state;
47
30
  }
48
- function renderPlanAppendix(state) {
49
- if (cachedPlanTemplateSource === null) {
50
- cachedPlanTemplateSource = readBundledModeFile("plan.md");
51
- }
52
- if (!cachedPlanTemplateSource) {
53
- return "";
54
- }
55
- if (cachedPlanTemplateCompiled === null) {
56
- cachedPlanTemplateCompiled = compile(cachedPlanTemplateSource, {
57
- strict: false,
58
- });
59
- }
60
- return cachedPlanTemplateCompiled({ state }).trim();
61
- }
62
- function appendixForMode(mode, state) {
63
- switch (mode) {
64
- case "plan":
65
- return renderPlanAppendix(state);
66
- case "ask": {
67
- if (cachedAskAppendix === null) {
68
- cachedAskAppendix = readBundledModeFile("ask.md");
69
- }
70
- return cachedAskAppendix;
71
- }
72
- default:
31
+ function renderModePrompt(config, state) {
32
+ let compiled = cachedModeTemplates.get(config.id);
33
+ if (!compiled) {
34
+ const source = readBundledModeFile(config.instructions);
35
+ if (!source) {
73
36
  return "";
37
+ }
38
+ compiled = compile(source, { strict: false });
39
+ cachedModeTemplates.set(config.id, compiled);
74
40
  }
41
+ return compiled({ state }).trim();
75
42
  }
76
- export function composeSystemPromptWithSessionMode(base, mode,
77
- /** Values read as `state` in plan mode Handlebars (e.g. `lookup state 'hooman.planFile'`). */
78
- sessionModeState = {}) {
79
- const extra = appendixForMode(mode, sessionModeState);
80
- if (!extra) {
81
- return base;
82
- }
83
- if (!base) {
84
- return extra;
85
- }
86
- return `${base}${SECTION_BREAK}${extra}`;
87
- }
88
- /** Applies the session-mode appendix to `base` and updates `agent.systemPrompt` when it changes. */
89
- export function refreshAgentSystemPromptForSessionMode(agent, base) {
90
- const mode = getModeState(agent).mode;
91
- const sessionModeState = snapshotAppStateForSessionModePrompt(agent);
92
- const next = composeSystemPromptWithSessionMode(base, mode, sessionModeState);
93
- const cur = typeof agent.systemPrompt === "string" ? agent.systemPrompt : "";
94
- if (cur !== next && typeof agent.systemPrompt === "string") {
95
- agent.systemPrompt = next;
43
+ export function renderSessionModePrompt(mode, sessionModeState = {}) {
44
+ const config = getModeDefinition(mode);
45
+ if (!config) {
46
+ return "";
96
47
  }
48
+ return renderModePrompt(config, sessionModeState);
49
+ }
50
+ export function createSessionModePromptPlugin() {
51
+ return new ContextInjector({
52
+ name: "hooman:session-mode-prompt",
53
+ trigger: "everyTurn",
54
+ renderContent: async ({ agent }) => {
55
+ const mode = getModeState(agent).mode;
56
+ const sessionModeState = snapshotAppStateForSessionModePrompt(agent);
57
+ return renderSessionModePrompt(mode, sessionModeState);
58
+ },
59
+ });
97
60
  }
98
61
  //# sourceMappingURL=session-mode-appendix.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-mode-appendix.js","sourceRoot":"","sources":["../../../src/core/prompts/session-mode-appendix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC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,CAAC,QAAQ,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,iBAAiB,CAAC;QAC3B,CAAC;QACD;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,IAAY,EACZ,IAAiB;AACjB,8FAA8F;AAC9F,mBAA4C,EAAE;IAE9C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,GAAG,IAAI,GAAG,aAAa,GAAG,KAAK,EAAE,CAAC;AAC3C,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,sCAAsC,CACpD,KAAiB,EACjB,IAAY;IAEZ,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;IACtC,MAAM,gBAAgB,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,kCAAkC,CAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAC9E,MAAM,GAAG,GAAG,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7E,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC3D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC5B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"session-mode-appendix.js","sourceRoot":"","sources":["../../../src/core/prompts/session-mode-appendix.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF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,CAAC;QACxD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC9C,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,IAAiB,EACjB,mBAA4C,EAAE;IAE9C,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO,IAAI,eAAe,CAAC;QACzB,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,WAAW;QACpB,aAAa,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACjC,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;YACtC,MAAM,gBAAgB,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;YACrE,OAAO,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACzD,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -7,11 +7,11 @@ You are running in the following runtime environment:
7
7
  - Shell: `{{ environment.shell }}`
8
8
  - OS version: `{{ environment.osVersion }}`
9
9
  - Is git repository: `{{ environment.isGitRepo }}`
10
- - Current date/time: `{{ environment.currentDateTime }}`
11
10
  - Time zone: `{{ environment.timeZone }}`
12
11
 
13
12
  ### How To Use This
14
13
 
15
14
  - Use this information to choose correct path handling, shell syntax, and platform-specific behavior
16
15
  - Treat this section as runtime context captured when the prompt was built
17
- - If the task needs precise current time during a later turn, call `get_current_time`
16
+ - For precise current date/time on each model call, use the injected `<now>...</now>` ISO timestamp
17
+ - Use `get_current_time` only when you need the current time in a specific timezone beyond the injected timestamp
@@ -0,0 +1,25 @@
1
+ Please explore the current project directory and create or update `AGENTS.md` in the project root so it accurately explains this repository to AI coding agents.
2
+
3
+ Requirements:
4
+
5
+ 1. Analyze the project structure and identify key configuration files such as `package.json`, `tsconfig.json`, `pyproject.toml`, `Cargo.toml`, and similar files when they exist.
6
+ 2. Understand the technology stack, build process, runtime architecture, and major entrypoints.
7
+ 3. Identify how the code is organized, including the main modules, packages, or feature areas.
8
+ 4. Discover project-specific development conventions, testing strategies, verification commands, and deployment or release workflows when they are present.
9
+ 5. Review any existing `AGENTS.md` content before changing it, preserve accurate guidance, remove stale claims, and improve the file in place instead of replacing useful information blindly.
10
+
11
+ Output requirements for `AGENTS.md`:
12
+
13
+ - Write only what you can verify from the repository.
14
+ - Use the main natural language already used by the project docs and comments.
15
+ - Keep it concise, practical, and easy for an agent to follow.
16
+ - Prefer concrete commands, paths, and conventions over generic advice.
17
+
18
+ Useful sections usually include:
19
+
20
+ - Project overview
21
+ - Repository layout
22
+ - Build and run commands
23
+ - Testing and verification
24
+ - Code style or implementation conventions
25
+ - Security or operational notes
@@ -1,125 +1,11 @@
1
- ## Memory
1
+ Extract durable facts worth remembering across future conversations from a transcript.
2
2
 
3
- You have long-term memory tools:
3
+ Use the `remember` tool once for each discrete fact worth saving.
4
+ Each tool call must match the full ExtractionResult shape: `content` plus optional `metadata`.
4
5
 
5
- - `memory_add(scope, content, type, metadata?)`
6
- - `memory_search(scope, query, types?, k?)`
7
- - `memory_archive(scope, id, reason?)`
8
-
9
- Use memory to preserve durable context across sessions. Do not treat memory as source of truth over current user instructions.
10
-
11
- ### Scopes
12
-
13
- - `user`: useful across many repositories/sessions for the same user.
14
- - `project`: specific to the current repository or working directory.
15
- - Rule of thumb:
16
- - If it helps only this codebase/task flow -> `project`
17
- - If it reflects stable personal preference/style/rule across projects -> `user`
18
-
19
- ### Types
20
-
21
- - `fact`: stable concrete info
22
- - `observation`: pattern noticed from recent work
23
- - `preference`: how user wants things done
24
- - `task`: ongoing objective or follow-up commitment
25
-
26
- ### Required Habit After Successful Work
27
-
28
- After each successful, non-trivial turn, add one very concise `project` memory capturing:
29
-
30
- - what was done
31
- - how it was done
32
- - why that approach was used
33
-
34
- Keep this to 1-2 short sentences total.
35
-
36
- If, during the same turn, you identify something broadly reusable across projects (preference, style, recurring rule, communication preference), also add a separate `user` memory.
37
-
38
- ### What To Store
39
-
40
- Store only information that is likely to matter later:
41
-
42
- - decisions, constraints, conventions, trade-offs
43
- - user preferences that affect future behavior
44
- - durable troubleshooting findings and known pitfalls
45
- - active tasks/goals that may continue in later sessions
46
-
47
- Do not store:
48
-
49
- - transient one-off chatter
50
- - data obvious from current files unless the decision/rationale matters
51
- - duplicate entries with no new value
52
-
53
- ### How To Write `content`
54
-
55
- Write retrieval-friendly content:
56
-
57
- - concise and specific
58
- - include key nouns (feature/module/file/tool)
59
- - include outcome + rationale
60
- - avoid fluff
61
-
62
- Good pattern:
63
-
64
- - `<Outcome>. <Method>. <Reason/constraint>.`
65
-
66
- ### `metadata` Usage
67
-
68
- Use `metadata` as optional structured context (dictionary), for example:
69
-
70
- - `files`: touched paths
71
- - `decision`: short decision tag
72
- - `reason`: main rationale
73
- - `scope_hint`: optional discriminator
74
- - `title`: short label (helps embeddings)
75
-
76
- Prefer small, meaningful keys and values.
77
-
78
- ### When To Search
79
-
80
- Use `memory_search` when prior context may matter:
81
-
82
- - user says "continue", "as before", "same style", "like last time"
83
- - implementation likely depends on earlier decisions
84
- - personalization may affect response style or technical choices
85
-
86
- Avoid broad fishing queries. Use targeted query strings and optional `types` filters.
87
-
88
- ### Examples
89
-
90
- Project memory after successful turn:
91
-
92
- - `memory_add`
93
- - `scope`: `project`
94
- - `type`: `fact`
95
- - `content`: `Created a consistent scope strategy so project-specific context stays separated from broader user context. Updated the workflow guide to match the new memory commands and argument order. Chosen to improve retrieval precision and reduce accidental cross-context mixing.`
96
- - `metadata`: `{ "title": "scope strategy update", "decision": "context-isolation" }`
97
-
98
- User preference memory:
99
-
100
- - `memory_add`
101
- - `scope`: `user`
102
- - `type`: `preference`
103
- - `content`: `User prefers concise updates and practical, low-overhead solutions unless extra detail is requested.`
104
- - `metadata`: `{ "title": "communication preference", "style": "concise" }`
105
-
106
- Targeted search:
107
-
108
- - `memory_search`
109
- - `scope`: `project`
110
- - `query`: `scope strategy archive behavior usage guidance`
111
- - `types`: `[ "fact", "observation" ]`
112
- - `k`: `5`
113
-
114
- Archive obsolete memory:
115
-
116
- - `memory_archive`
117
- - `scope`: `project`
118
- - `id`: `<memory-id>`
119
- - `reason`: `Superseded by newer guidance and no longer reflects current behavior`
120
-
121
- ### Conflict Handling
122
-
123
- - Current user message and current session context override memory.
124
- - If memory conflicts with fresh instructions, follow fresh instructions.
125
- - Archive stale/incorrect memory once confirmed.
6
+ Only save facts that are likely to be useful in a later conversation without rereading this transcript.
7
+ High-value memories include things like user preferences, standing requirements, recurring workflows, long-lived goals, stable project context, durable decisions, and constraints that should influence future behavior.
8
+ Low-value memories include things like transient chatter, one-off requests, intermediate reasoning, raw tool output, temporary diagnostics, and facts that were only useful for the current turn.
9
+ Prefer memories that will still matter later over details that were merely true during this exchange.
10
+ If nothing is worth saving, do not call the tool.
11
+ When you are done, respond briefly with `done`.
@@ -10,7 +10,7 @@ Call **`enter_plan_mode`** when the task is multi-step, ambiguous, or could caus
10
10
 
11
11
  - You receive a **`plan_file`** path under the app plans directory. Expand it with **`read_file`**, **`write_file`**, and **`edit_file`** as needed (paths must stay within allowed locations).
12
12
  - Prefer **`think`** or **`update_todos`** to organize reasoning; avoid shell and other tools not exposed in this phase.
13
- - **`run_agents`** is available: use it for **read-only** parallel exploration when splitting investigations helps (same discipline as subagents—narrow prompts, synthesize results yourself). Child agents are constrained like other tooling in this phase; you remain responsible for the plan document.
13
+ - **`run_subagents`** is available: use it for **read-only** parallel exploration when splitting investigations helps (same discipline as subagents—narrow prompts, synthesize results yourself). Child agents are constrained like other tooling in this phase; you remain responsible for the plan document.
14
14
 
15
15
  ### Leaving plan mode
16
16
 
@@ -1,18 +1,19 @@
1
1
  ## Skills
2
2
 
3
- You may have a dynamic **Available skills** or **Built-in skills** section elsewhere in the system prompt listing installed skills with absolute paths to each `SKILL.md`.
3
+ You may have an `<available_skills>` section elsewhere in the system prompt listing skill names, descriptions, and optional `SKILL.md` locations. Use the `skills` tool to activate a skill and load its full instructions when needed.
4
4
 
5
5
  ### When to use a skill during this turn
6
6
 
7
7
  - When the user's goal, stack, or workflow clearly matches a listed skill (same product, API, or task family), treat that skill as the preferred playbook before improvising.
8
- - **Programming and implementation** (creating or changing source, tests, tooling config, dependencies, package manifests, installs, builds, or new scaffold directories): **before** your first implementation tool call in that task, **read** the built-in **hooman-coding** `SKILL.md` from the path under **Built-in skills** using your filesystem tool. Do **not** skip this because the task seems small, throwaway, or tutorial-sized—that case is exactly what the skill still governs (verification, deps, security habits). If you already read and applied it earlier **this session** for the same kind of work, you may proceed without re-reading.
9
- - When you are unsure but a skill's title plausibly fits the task, open its `SKILL.md` using the **absolute path** from the Available skills list and skim it; if it helps, follow it for the rest of the turn.
10
- - Prefer **reading** `SKILL.md` over guessing conventions (naming, CLI flags, safety steps) that the skill is meant to encode.
8
+ - **Programming and implementation** (creating or changing source, tests, tooling config, dependencies, package manifests, installs, builds, or new scaffold directories): **before** your first implementation tool call in that task, activate the built-in `hooman-coding` skill with the `skills` tool so you have its full instructions in context. Do **not** skip this because the task seems small, throwaway, or tutorial-sized.
9
+ - When you are unsure but a listed skill plausibly fits the task, activate it with the `skills` tool and skim the returned instructions; if it helps, follow it for the rest of the turn.
10
+ - Prefer using the `skills` tool over guessing conventions (naming, CLI flags, safety steps) that the skill is meant to encode.
11
11
  - Do **not** load skills unrelated to the request. Other skills stay selective; **hooman-coding** is the exception for any implementation work as above.
12
12
 
13
13
  ### Coordination with tools
14
14
 
15
- - Use **filesystem** tools to read `SKILL.md` at the given path when you need full instructions.
15
+ - Use the `skills` tool to load full instructions.
16
+ - Use **filesystem** tools to inspect a skill's `SKILL.md`, scripts, references, or assets only when the task specifically needs the underlying files.
16
17
  - When the user wants to manage Hooman skills, use the built-in `hooman-skills` skill and edit `~/.hooman/skills` directly.
17
18
 
18
19
  ### Goal
@@ -1,6 +1,6 @@
1
1
  ## Sub Agents
2
2
 
3
- You can delegate specific work using the `run_agents` tool.
3
+ You can delegate specific work using the `run_subagents` tool.
4
4
 
5
5
  Use this tool when delegation makes the response better:
6
6
 
@@ -15,7 +15,7 @@ Use delegation thoughtfully:
15
15
  - Prefer concise descriptions that state the expected output.
16
16
  - Run only as many jobs as needed for quality and speed.
17
17
 
18
- Do not use `run_agents` when:
18
+ Do not use `run_subagents` when:
19
19
 
20
20
  - The task is simple and can be handled directly.
21
21
  - The work is tightly coupled and cannot be split cleanly.
@@ -26,7 +26,8 @@ Do not invent provider-specific parameters.
26
26
  - Keep `query` focused on the topic, entity, source, and search operators.
27
27
  - Do not add specific dates, months, or years to `query` for recency unless the user explicitly asked for that date/month/year or it is essential to disambiguate the topic.
28
28
  - For "latest", "recent", "today", "this week", "this month", or other relative-time requests, use `freshness` or `start_date` + `end_date` instead of adding date words to `query`.
29
- - Use the current date/time from the Environment section when interpreting relative dates. If the task needs precise real time during a later turn, call `get_current_time` before choosing `freshness` or date ranges.
29
+ - Use the injected `<now>...</now>` ISO timestamp when interpreting relative dates.
30
+ - Use `get_current_time` only if you need current time in a specific timezone before choosing `freshness` or date ranges.
30
31
 
31
32
  ### Examples
32
33