@sayknow-cli/coding-agent 0.3.7 → 0.3.8

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 (248) hide show
  1. package/dist/types/append-only-mode.d.ts +31 -0
  2. package/dist/types/capability/rule.d.ts +8 -0
  3. package/dist/types/cli/completion-cli.d.ts +41 -0
  4. package/dist/types/cli/config-cli.d.ts +1 -0
  5. package/dist/types/cli/fixture-report.d.ts +20 -0
  6. package/dist/types/cli/fixture-report.test.d.ts +1 -0
  7. package/dist/types/cli/nofile-limit.d.ts +11 -0
  8. package/dist/types/cli/notify-cli.d.ts +7 -0
  9. package/dist/types/cli/update-cli.d.ts +22 -0
  10. package/dist/types/cli.d.ts +124 -1
  11. package/dist/types/commands/completion.d.ts +29 -0
  12. package/dist/types/commands/config.d.ts +3 -0
  13. package/dist/types/commands/deep-interview.d.ts +3 -0
  14. package/dist/types/config/file-lock.d.ts +7 -6
  15. package/dist/types/config/keybindings.d.ts +2 -2
  16. package/dist/types/config/model-profile-activation.d.ts +6 -0
  17. package/dist/types/config/model-profiles.d.ts +1 -0
  18. package/dist/types/config/settings-schema.d.ts +105 -1
  19. package/dist/types/config/settings.d.ts +8 -0
  20. package/dist/types/discovery/index.d.ts +1 -0
  21. package/dist/types/export/html/template.generated.d.ts +1 -1
  22. package/dist/types/export/ttsr.d.ts +14 -3
  23. package/dist/types/extensibility/extensions/runner.d.ts +2 -1
  24. package/dist/types/extensibility/extensions/types.d.ts +8 -0
  25. package/dist/types/goals/runtime.d.ts +1 -0
  26. package/dist/types/hooks/native-skill-hook.d.ts +12 -0
  27. package/dist/types/main.d.ts +4 -1
  28. package/dist/types/modes/components/assistant-message.d.ts +5 -1
  29. package/dist/types/modes/components/model-selector.d.ts +4 -0
  30. package/dist/types/modes/components/queued-message-selector.d.ts +12 -0
  31. package/dist/types/modes/components/settings-selector.d.ts +2 -0
  32. package/dist/types/modes/components/status-line.d.ts +9 -0
  33. package/dist/types/modes/controllers/command-controller.d.ts +1 -0
  34. package/dist/types/modes/controllers/event-controller.d.ts +5 -0
  35. package/dist/types/modes/controllers/input-controller.d.ts +1 -3
  36. package/dist/types/modes/interactive-mode.d.ts +2 -0
  37. package/dist/types/modes/print-mode.d.ts +13 -1
  38. package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -1
  39. package/dist/types/modes/rpc/rpc-types.d.ts +14 -0
  40. package/dist/types/modes/shared/agent-wire/event-contract.d.ts +19 -0
  41. package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +23 -1
  42. package/dist/types/modes/types.d.ts +1 -0
  43. package/dist/types/modes/utils/ui-helpers.d.ts +1 -0
  44. package/dist/types/notifications/config.d.ts +14 -1
  45. package/dist/types/notifications/daemon-paths.d.ts +1 -0
  46. package/dist/types/notifications/index.d.ts +6 -3
  47. package/dist/types/notifications/lifecycle-commands.d.ts +11 -3
  48. package/dist/types/notifications/telegram-daemon.d.ts +23 -3
  49. package/dist/types/notifications/telegram-reference.d.ts +0 -5
  50. package/dist/types/notifications/threaded-render.d.ts +6 -0
  51. package/dist/types/runtime-api-key.d.ts +7 -0
  52. package/dist/types/sdk.d.ts +3 -0
  53. package/dist/types/session/agent-session.d.ts +61 -6
  54. package/dist/types/session/agent-storage.d.ts +1 -0
  55. package/dist/types/session/file-mention-pruning.d.ts +8 -0
  56. package/dist/types/session/messages.d.ts +4 -0
  57. package/dist/types/session/session-manager.d.ts +17 -1
  58. package/dist/types/skc-runtime/deep-interview-ambiguity.d.ts +39 -0
  59. package/dist/types/skc-runtime/deep-interview-recorder.d.ts +10 -1
  60. package/dist/types/skc-runtime/deep-interview-state.d.ts +17 -2
  61. package/dist/types/skc-runtime/session-state-sidecar.d.ts +7 -0
  62. package/dist/types/skc-runtime/state-writer.d.ts +3 -0
  63. package/dist/types/skc-runtime/ultragoal-receipt-freshness.d.ts +42 -0
  64. package/dist/types/skc-runtime/ultragoal-runtime.d.ts +120 -13
  65. package/dist/types/skill-state/active-state.d.ts +18 -1
  66. package/dist/types/system-prompt.d.ts +18 -2
  67. package/dist/types/task/executor.d.ts +3 -0
  68. package/dist/types/task/fork-context-budget.d.ts +7 -0
  69. package/dist/types/task/token-log.d.ts +30 -0
  70. package/dist/types/task/token-log.test.d.ts +1 -0
  71. package/dist/types/tools/bisect.d.ts +81 -0
  72. package/dist/types/tools/computer.d.ts +2 -2
  73. package/dist/types/tools/index.d.ts +1 -0
  74. package/dist/types/tools/search.d.ts +2 -2
  75. package/dist/types/tools/ultragoal-ask-guard.d.ts +9 -2
  76. package/dist/types/utils/file-mentions.d.ts +14 -0
  77. package/dist/types/utils/git.d.ts +32 -0
  78. package/dist/types/web/scrapers/youtube.d.ts +8 -0
  79. package/dist/types/workflow/workflow-intent-diff.d.ts +8 -2
  80. package/dist/types/workflow/workflow-intent-report-consumer.d.ts +50 -0
  81. package/dist/types/workflow/workflow-intent-report-schema.d.ts +2 -0
  82. package/dist/types/workflow/workflow-intent-report.d.ts +48 -0
  83. package/package.json +8 -8
  84. package/src/append-only-mode.ts +58 -0
  85. package/src/autoresearch/prompt.md +1 -1
  86. package/src/autoresearch/tools/log-experiment.ts +1 -1
  87. package/src/capability/rule.ts +9 -0
  88. package/src/cli/completion-cli.ts +234 -0
  89. package/src/cli/config-cli.ts +61 -9
  90. package/src/cli/fast-help.ts +1 -0
  91. package/src/cli/fixture-report.test.ts +230 -0
  92. package/src/cli/fixture-report.ts +171 -0
  93. package/src/cli/nofile-limit.ts +48 -0
  94. package/src/cli/notify-cli.ts +92 -8
  95. package/src/cli/telegram-cli.ts +1 -1
  96. package/src/cli/update-cli.ts +85 -9
  97. package/src/cli.ts +29 -1
  98. package/src/commands/completion.ts +84 -0
  99. package/src/commands/config.ts +2 -0
  100. package/src/commands/contribution-prep.ts +1 -1
  101. package/src/commands/deep-interview.ts +2 -1
  102. package/src/config/file-lock.ts +73 -34
  103. package/src/config/keybindings.ts +2 -2
  104. package/src/config/model-profile-activation.ts +65 -0
  105. package/src/config/model-profiles.ts +31 -2
  106. package/src/config/settings-schema.ts +68 -1
  107. package/src/config/settings.ts +22 -0
  108. package/src/defaults/skc/skills/team/SKILL.md +17 -14
  109. package/src/defaults/skc/skills/ultragoal/SKILL.md +59 -4
  110. package/src/defaults/skc/skills/ultragoal/pipeline-validation-contracts.md +30 -0
  111. package/src/defaults/skc-defaults.ts +9 -0
  112. package/src/discovery/helpers.ts +10 -0
  113. package/src/discovery/index.ts +1 -0
  114. package/src/export/html/template.generated.ts +1 -1
  115. package/src/export/html/template.js +60 -2
  116. package/src/export/ttsr.ts +96 -18
  117. package/src/extensibility/extensions/runner.ts +183 -219
  118. package/src/extensibility/extensions/types.ts +9 -0
  119. package/src/extensibility/skc-plugins/runtime-adapters.ts +156 -44
  120. package/src/goals/runtime.ts +10 -2
  121. package/src/hindsight/backend.ts +1 -3
  122. package/src/hooks/native-skill-hook.ts +124 -4
  123. package/src/internal-urls/docs-index.generated.ts +14 -5
  124. package/src/main.ts +95 -43
  125. package/src/memories/index.ts +12 -1
  126. package/src/modes/components/assistant-message.ts +241 -82
  127. package/src/modes/components/custom-editor.ts +1 -0
  128. package/src/modes/components/model-selector.ts +54 -11
  129. package/src/modes/components/queued-message-selector.ts +92 -0
  130. package/src/modes/components/settings-selector.ts +4 -0
  131. package/src/modes/components/status-line.ts +167 -54
  132. package/src/modes/components/tool-execution.ts +44 -19
  133. package/src/modes/components/welcome.ts +181 -44
  134. package/src/modes/controllers/command-controller.ts +40 -4
  135. package/src/modes/controllers/event-controller.ts +66 -47
  136. package/src/modes/controllers/extension-ui-controller.ts +4 -10
  137. package/src/modes/controllers/input-controller.ts +180 -18
  138. package/src/modes/controllers/selector-controller.ts +127 -24
  139. package/src/modes/interactive-mode.ts +51 -16
  140. package/src/modes/print-mode.ts +43 -4
  141. package/src/modes/prompt-action-autocomplete.ts +21 -20
  142. package/src/modes/rpc/rpc-mode.ts +29 -3
  143. package/src/modes/rpc/rpc-types.ts +9 -0
  144. package/src/modes/shared/agent-wire/command-validation.ts +4 -0
  145. package/src/modes/shared/agent-wire/event-contract.ts +22 -0
  146. package/src/modes/shared/agent-wire/event-envelope.ts +82 -0
  147. package/src/modes/shared/agent-wire/scopes.ts +1 -0
  148. package/src/modes/types.ts +1 -0
  149. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  150. package/src/modes/utils/ui-helpers.ts +20 -7
  151. package/src/notifications/config.ts +25 -5
  152. package/src/notifications/daemon-paths.ts +2 -0
  153. package/src/notifications/index.ts +117 -14
  154. package/src/notifications/lifecycle-commands.ts +37 -7
  155. package/src/notifications/lifecycle-orchestrator.ts +19 -6
  156. package/src/notifications/telegram-daemon-control.ts +5 -3
  157. package/src/notifications/telegram-daemon.ts +302 -51
  158. package/src/notifications/telegram-reference.ts +0 -16
  159. package/src/notifications/threaded-render.ts +17 -1
  160. package/src/prompts/agents/architect.md +19 -10
  161. package/src/prompts/agents/critic.md +16 -18
  162. package/src/prompts/agents/executor.md +14 -11
  163. package/src/prompts/agents/planner.md +18 -13
  164. package/src/prompts/ci-green-request.md +3 -8
  165. package/src/prompts/goals/goal-continuation.md +0 -5
  166. package/src/prompts/goals/goal-mode-active.md +0 -5
  167. package/src/prompts/system/agent-creation-architect.md +2 -2
  168. package/src/prompts/system/plan-mode-active.md +1 -1
  169. package/src/prompts/system/plan-mode-subagent.md +3 -3
  170. package/src/prompts/system/project-prompt.md +0 -13
  171. package/src/prompts/system/subagent-system-prompt.md +3 -2
  172. package/src/prompts/system/system-prompt.md +29 -17
  173. package/src/prompts/system/volatile-project-context.md +10 -0
  174. package/src/prompts/system/web-search.md +4 -7
  175. package/src/prompts/tools/apply-patch.md +6 -0
  176. package/src/prompts/tools/ast-edit.md +1 -0
  177. package/src/prompts/tools/bash.md +1 -1
  178. package/src/prompts/tools/bisect.md +22 -0
  179. package/src/prompts/tools/browser.md +1 -1
  180. package/src/prompts/tools/computer.md +2 -2
  181. package/src/prompts/tools/cron.md +0 -2
  182. package/src/prompts/tools/eval.md +2 -2
  183. package/src/prompts/tools/find.md +1 -1
  184. package/src/prompts/tools/github.md +6 -6
  185. package/src/prompts/tools/goal.md +1 -3
  186. package/src/prompts/tools/image-gen.md +12 -5
  187. package/src/prompts/tools/irc.md +5 -4
  188. package/src/prompts/tools/job.md +2 -2
  189. package/src/prompts/tools/lsp.md +1 -1
  190. package/src/prompts/tools/monitor.md +2 -2
  191. package/src/prompts/tools/patch.md +2 -2
  192. package/src/prompts/tools/replace.md +2 -21
  193. package/src/prompts/tools/rewind.md +1 -1
  194. package/src/prompts/tools/search-tool-bm25.md +1 -11
  195. package/src/prompts/tools/search.md +1 -1
  196. package/src/prompts/tools/skill.md +3 -2
  197. package/src/prompts/tools/ssh.md +2 -1
  198. package/src/prompts/tools/subagent.md +2 -2
  199. package/src/prompts/tools/task.md +4 -5
  200. package/src/prompts/tools/todo-write.md +1 -1
  201. package/src/prompts/tools/vim.md +1 -0
  202. package/src/prompts/tools/web-search.md +2 -0
  203. package/src/prompts/tools/write.md +8 -2
  204. package/src/runtime-api-key.ts +16 -0
  205. package/src/sdk.ts +52 -28
  206. package/src/session/agent-session.ts +1011 -141
  207. package/src/session/agent-storage.ts +4 -0
  208. package/src/session/file-mention-pruning.ts +64 -0
  209. package/src/session/messages.ts +4 -0
  210. package/src/session/session-manager.ts +103 -4
  211. package/src/skc-runtime/deep-interview-ambiguity.ts +206 -0
  212. package/src/skc-runtime/deep-interview-recorder.ts +62 -8
  213. package/src/skc-runtime/deep-interview-state.ts +44 -2
  214. package/src/skc-runtime/session-state-sidecar.ts +263 -20
  215. package/src/skc-runtime/state-runtime.ts +12 -2
  216. package/src/skc-runtime/state-writer.ts +15 -0
  217. package/src/skc-runtime/ultragoal-guard.ts +55 -66
  218. package/src/skc-runtime/ultragoal-receipt-freshness.ts +315 -0
  219. package/src/skc-runtime/ultragoal-runtime.ts +1663 -159
  220. package/src/skc-runtime/workflow-manifest.generated.json +113 -2
  221. package/src/skc-runtime/workflow-manifest.ts +74 -1
  222. package/src/skill-state/active-state.ts +141 -5
  223. package/src/skill-state/deep-interview-mutation-guard.ts +67 -3
  224. package/src/slash-commands/builtin-registry.ts +218 -71
  225. package/src/system-prompt.ts +57 -16
  226. package/src/task/executor.ts +132 -24
  227. package/src/task/fork-context-advisory.ts +2 -7
  228. package/src/task/fork-context-budget.ts +9 -0
  229. package/src/task/index.ts +13 -6
  230. package/src/task/output-manager.ts +20 -8
  231. package/src/task/receipt.ts +26 -7
  232. package/src/task/token-log.test.ts +188 -0
  233. package/src/task/token-log.ts +179 -0
  234. package/src/tools/bisect.ts +367 -0
  235. package/src/tools/computer.ts +246 -43
  236. package/src/tools/index.ts +3 -0
  237. package/src/tools/output-meta.ts +116 -4
  238. package/src/tools/search.ts +8 -2
  239. package/src/tools/skill.ts +15 -0
  240. package/src/tools/telegram-send.ts +6 -0
  241. package/src/tools/ultragoal-ask-guard.ts +39 -5
  242. package/src/utils/file-mentions.ts +39 -7
  243. package/src/utils/git.ts +73 -0
  244. package/src/web/scrapers/youtube.ts +24 -12
  245. package/src/workflow/workflow-intent-diff.ts +29 -6
  246. package/src/workflow/workflow-intent-report-consumer.ts +221 -0
  247. package/src/workflow/workflow-intent-report-schema.ts +129 -0
  248. package/src/workflow/workflow-intent-report.ts +135 -0
@@ -0,0 +1,10 @@
1
+ <system-reminder>
2
+ {{#if workspaceTree.rendered}}<workspace-tree>
3
+ Working directory layout (sorted by mtime, recent first; depth ≤ 3):
4
+ {{workspaceTree.rendered}}
5
+ {{#if workspaceTree.truncated}}
6
+ (some entries elided to keep the tree short — use `find`/`read` to drill in)
7
+ {{/if}}
8
+ </workspace-tree>
9
+ {{/if}}Today is {{date}}, and the current working directory is '{{cwd}}'.
10
+ </system-reminder>
@@ -1,25 +1,22 @@
1
1
  Research assistant with web search. Find accurate, well-sourced information. Synthesize comprehensive answers.
2
2
 
3
- <priorities>
3
+ <instruction>
4
4
  1. Accuracy over speed — verify claims across multiple sources when possible
5
5
  2. Primary over secondary — prefer official docs, papers, and announcements over blog summaries
6
6
  3. Recency matters — note publication dates; prefer recent sources for time-sensitive topics
7
7
  4. Transparency on uncertainty — distinguish confirmed facts from inferences
8
- </priorities>
9
-
10
- <synthesis>
11
8
  - Lead with a direct answer, then supporting evidence
12
9
  - Quote or paraphrase specific sources; no vague attributions
13
10
  - Sources conflict: acknowledge the discrepancy and note which is more authoritative
14
11
  - Technical topics: prefer official documentation and specifications
15
12
  - News/events: prefer primary reporting over aggregators
16
13
  - Include concrete data: version numbers, dates, exact figures, code snippets, specific examples
17
- </synthesis>
14
+ </instruction>
18
15
 
19
- <format>
16
+ <output>
20
17
  - Be thorough — cover the topic in depth with specific evidence, not surface-level summaries
21
18
  - Omit filler and unnecessary hedging; do NOT sacrifice detail for brevity
22
19
  - Include publication dates when recency affects relevance
23
20
  - Structure answers with clear sections when covering multiple aspects
24
21
  - Cite sources inline using provided search results
25
- </format>
22
+ </output>
@@ -16,6 +16,9 @@ Each operation starts with one of three headers:
16
16
  May be immediately followed by *** Move to: <new path> if you want to rename the file.
17
17
  Then one or more "hunks", each introduced by @@ (optionally followed by a hunk header).
18
18
  Within a hunk each line starts with:
19
+ - ` ` (space) — an unchanged context line
20
+ - `-` — a line removed from the file
21
+ - `+` — a line added to the file
19
22
 
20
23
  For instructions on [context_before] and [context_after]:
21
24
  - By default, show 3 lines of code immediately above and 3 lines immediately below each change. If a change is within 3 lines of a previous change, do NOT duplicate the first change's [context_after] lines in the second change's [context_before] lines.
@@ -63,3 +66,6 @@ It is important to remember:
63
66
  - You must include a header with your intended action (Add/Delete/Update)
64
67
  - You must prefix new lines with `+` even when creating a new file
65
68
  - File references can only be relative, NEVER ABSOLUTE.
69
+ - You MUST read the target file before editing, and copy context lines verbatim (including whitespace).
70
+ - If a patch fails, re-read the file and produce a new patch from current content — NEVER retry the same patch.
71
+ - NEVER use patches to fix indentation or reformat code; run the project formatter once at the end instead.
@@ -14,6 +14,7 @@ Performs structural AST-aware rewrites via native ast-grep.
14
14
  </instruction>
15
15
 
16
16
  <output>
17
+ - Output is a **staged preview** — nothing touches disk until you call `resolve` with `action: "apply"`; call `resolve` with `action: "discard"` to reject the staged rewrite
17
18
  - Replacement summary, per-file replacement counts, and change diffs as `-LINE+ID|before` / `+LINE+ID|after` lines
18
19
  - Parse issues when files cannot be processed
19
20
  </output>
@@ -57,7 +57,7 @@ Use it only for sanctioned SKC workflow CLI persistence or state read/write/cont
57
57
  {{#if asyncEnabled}}
58
58
  # Timeout and async
59
59
 
60
- - `timeout` (seconds) caps the **wall-clock duration** of the command. When it elapses the process is killed and the call returns with a timeout annotation. Range: `1`–`3600`s; default `300`s (see `clampTimeout("bash", …)` in `tool-timeouts.ts`).
60
+ - `timeout` (seconds) caps the **wall-clock duration** of the command. When it elapses the process is killed and the call returns with a timeout annotation. Range: `1`–`3600`s; default `300`s.
61
61
  - `async: true` only defers **reporting** of the result — it does NOT disable, extend, or detach the timeout. A daemon started with `async: true` is still killed when `timeout` elapses, regardless of how long the agent waits before reading the result.
62
62
  - For long-running daemons (dev servers, watchers): either pass an explicit large `timeout` (up to `3600`), or fully detach the process from this shell using `nohup … &` / `setsid … &` / `disown` so it survives independent of the bash call's lifecycle.
63
63
  {{/if}}
@@ -0,0 +1,22 @@
1
+ Find the exact commit that introduced (or fixed) a behavior by driving `git bisect` with a shell predicate, then restore the working tree and report the culprit.
2
+
3
+ Use this instead of running `git bisect` by hand when you have a reproducible pass/fail check and a known-good and known-bad revision. The tool guarantees clean setup and teardown: it always runs `git bisect reset` and then discards any tracked-file edits the predicate made (`git reset --hard`), so it never leaves the repository stranded in a detached bisect state or with the predicate's tracked-file modifications behind. Untracked files the predicate creates are left in place (the tool never deletes files it did not create).
4
+
5
+ Parameters:
6
+ - `good`: the OLDER endpoint — a commit that must be an ancestor of `bad`.
7
+ - `bad`: the NEWER endpoint (defaults to `HEAD`).
8
+ - `run`: the shell command evaluated at each revision. Exit `0` = good, `125` = skip (untestable revision), any other non-zero = bad.
9
+ - `invert`: set true to find the commit that FIXED the behavior instead of the one that broke it.
10
+ - `maxSteps` / `stepTimeoutMs`: bounds; a step that exceeds `stepTimeoutMs` is treated as a skip.
11
+
12
+ Search direction:
13
+ - Default (find the regression): the predicate passes at `good` and fails at `bad`. The tool reports the first commit that turned it bad.
14
+ - `invert` (find the fix): the predicate fails at `good` and passes at `bad`. The tool reports the first commit that turned it good.
15
+
16
+ Rules:
17
+ - Requires a git repository and a clean working tree. Commit or stash uncommitted changes first — bisect checks out historical commits and would clobber them.
18
+ - `good` must resolve, `bad` must resolve, they must differ, and `good` must be an ancestor of `bad`.
19
+ - Make `run` self-contained and deterministic (build + test in one command). It always runs from the repository root (the top level of the working tree), even when the tool is invoked from a subdirectory — reference files by repo-relative paths, and do not assume the current subdirectory exists at every candidate commit.
20
+ - Prefer a narrow predicate that targets only the behavior you are hunting, so unrelated breakage does not mislead the search.
21
+
22
+ The result reports the first bad (or first fixing) commit with its author, date, subject, and changed files, plus every revision tested. Every tracked file is restored to its pre-bisect state; if the predicate created untracked files they are reported and left in place.
@@ -5,8 +5,8 @@ Drives a real Chromium tab with full puppeteer access via JS execution.
5
5
  - Four actions:
6
6
  - `open` — acquire (or reuse) a named tab. `name` defaults to `"main"`. Optional `url` navigates after the tab is ready. Optional `viewport` sets dimensions. Optional `dialogs: "accept" | "dismiss"` auto-handles `alert`/`confirm`/`beforeunload` so navigation/clicks don't hang (default: leave dialogs unhandled — page hangs until caller wires `page.on('dialog', …)`).
7
7
  - `close` — release a tab by `name`, or every tab with `all: true`. For spawned-app browsers, set `kill: true` to terminate the process tree (default leaves it running).
8
- - `run` — execute JS against an existing tab. `code` is the body of an async function with `page`, `browser`, `tab`, `display`, `assert`, `wait` in scope. The function's return value is JSON-stringified into the tool result; multiple `display(value)` calls accumulate text/images.
9
8
  - `act` — run a list of structured `actions` against an existing tab without writing JS (preferred for routine navigation/interaction). Each step is `{ verb, … }`; verbs: `navigate {url, wait_until?}`, `click {id|selector}`, `type {id|selector, text}`, `fill {selector, value}`, `select {selector, values}`, `press {key, selector?}`, `scroll {dx?, dy?}`, `back`, `wait {selector?|ms?}`, `observe {viewport_only?, include_all?}`, `extract {format?}`, `screenshot`. Address elements by the numeric `id` from a prior `observe` (preferred) or a selector. Steps run in order; the tool returns an array of per-step results (observations/extracted content included). Use `run` only when a verb does not cover what you need.
9
+ - `run` — execute JS against an existing tab. `code` is the body of an async function with `page`, `browser`, `tab`, `display`, `assert`, `wait` in scope. The function's return value is JSON-stringified into the tool result; multiple `display(value)` calls accumulate text/images.
10
10
  - Tabs survive across `run` calls and across in-process subagents. Open once, reuse many times.
11
11
  - Browser kinds, selected by the `app` field on `open`:
12
12
  - default (no `app`) → headless Chromium with stealth patches.
@@ -6,7 +6,7 @@
6
6
 
7
7
  - Disabled means disabled: when the tool is disabled (`computer.alwaysOn=false` with `computer.enabled` unset/false) or the platform is unsupported, every action including `screenshot` fails with `COMPUTER_DISABLED` and captures nothing.
8
8
  - Callable only on Apple Silicon macOS (`arm64` darwin); available by default there, with `computer.alwaysOn=false` as the off-switch and `computer.enabled=true` as the manual enable path.
9
- - Native execution remains supervisor-gated. If the stop/suspend supervisor is unavailable, stale, suspended, permissioned off, display-stale, or cancelled, the action fails closed with a `COMPUTER_*` code.
9
+ - Native execution remains supervisor-gated. If the stop/suspend supervisor is unavailable, stale, suspended, permissioned off, display-stale, or cancelled, the action fails closed with a `COMPUTER_*` code. Coordinate actions carry the latest known screenshot display epoch when one is available so display-topology changes fail with `COMPUTER_DISPLAY_STALE`.
10
10
  - Respect the user's stop/suspend request immediately. Do not loop desktop actions after a stop/suspend/error.
11
11
  - The user can stop or suspend the session at any time with the configured kill-switch hotkey (default `Control+Option+Command+Escape`). If you see `COMPUTER_CANCELLED` or `COMPUTER_SUPERVISOR_NOT_LIVE`, stop and wait for the user.
12
12
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  Coordinates are screenshot pixels, not CSS pixels and not normalized fractions. Use the latest successful `screenshot` dimensions and origin/scale metadata as the coordinate frame. Do not guess coordinates outside the screenshot bounds.
16
16
 
17
- When you send a sequence of actions in one `batch` call, pointer coordinates in later steps are validated against the most recent screenshot from that batch. If a coordinate is out of bounds, the batch stops and reports `COMPUTER_COORD_INVALID`. Always capture a fresh screenshot before acting if the display may have changed.
17
+ For stale-display protection to apply, derive pointer coordinates from a successful screenshot in the same tool session; a screenshot-first `batch` is preferred because later coordinate steps are validated against that screenshot and carry its display epoch into native execution. If a coordinate is out of bounds, the batch stops and reports `COMPUTER_COORD_INVALID`. Always capture a fresh screenshot before acting if the display may have changed.
18
18
 
19
19
  ## Actions
20
20
 
@@ -23,5 +23,3 @@ Use a single `op` field to select the operation:
23
23
  - All times are interpreted in the local timezone.
24
24
  - Recurring tasks fire with up to 30 minutes of deterministic jitter (or up to half their interval for sub-hourly tasks). One-shot tasks scheduled for `:00` or `:30` may fire up to 90 s early. Pick an off-minute if exact timing matters.
25
25
  - Closing or replacing the session clears every scheduled task.
26
-
27
- Disable the scheduler entirely via `CLAUDE_CODE_DISABLE_CRON=1`.
@@ -55,7 +55,7 @@ Cells render like a Jupyter notebook. `display(value)` renders non-presentable d
55
55
  {{#if js}}- **js**: the VM exposes a selective `process` subset, Web APIs, `Buffer`, `fs/promises`, and the `Bun` global.
56
56
  {{/if}}</caution>
57
57
 
58
- <example>
58
+ <examples>
59
59
  {{#if py}}```json
60
60
  {
61
61
  "cells": [
@@ -72,4 +72,4 @@ Cells render like a Jupyter notebook. `display(value)` renders non-presentable d
72
72
  ]
73
73
  }
74
74
  ```{{/if}}
75
- </example>
75
+ </examples>
@@ -25,7 +25,7 @@ Matching file paths sorted by modification time (most recent first). Truncated a
25
25
  </examples>
26
26
 
27
27
  <avoid>
28
- For open-ended searches requiring multiple rounds of globbing and searching, you MUST use Task tool instead.
28
+ For open-ended searches requiring multiple rounds of globbing and searching, delegate a bounded fact-finding task to an appropriate canonical role agent (`planner` for sequencing/context maps or `architect` for read-only architecture assessment) instead.
29
29
  </avoid>
30
30
 
31
31
  <critical>
@@ -1,15 +1,15 @@
1
- GitHub CLI tool with a single op-based dispatch. Wraps `gh` for repositories, pull requests, search, checkout, push, and Actions watch workflows. For reading a single issue or PR view, use the `issue://<N>` or `pr://<N>` URL schemes (cached automatically) — they replace what used to be `op: issue_view` and `op: pr_view`. For reading PR diffs, use `pr://<N>/diff` (changed-file listing), `pr://<N>/diff/<i>` (single file slice, 1-indexed), or `pr://<N>/diff/all` (full unified diff) — they replace what used to be `op: pr_diff`.
1
+ GitHub CLI tool with a single op-based dispatch. Wraps `gh` for repositories, pull requests, search, checkout, push, and Actions watch workflows. For reading a single issue or PR view, use the `issue://<N>` or `pr://<N>` URL schemes (cached automatically). For reading PR diffs, use `pr://<N>/diff` (changed-file listing), `pr://<N>/diff/<i>` (single file slice, 1-indexed), or `pr://<N>/diff/all` (full unified diff).
2
2
 
3
3
  <instruction>
4
- Pick the operation via `op`. Each op uses a subset of the parameters:
4
+ Pick the operation via `op`. Each op uses a subset of the parameters. Search ops (`search_issues`, `search_prs`, `search_code`, `search_commits`) default `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it.
5
5
  - `repo_view` — Read repository metadata. Optional `repo` (owner/repo) and `branch`. Falls back to the current checkout or default `gh` repo.
6
6
  - `pr_create` — Create a pull request. Either provide `title` (and optional `body`) or set `fill: true` to auto-fill from commits. Optional `base` (target, defaults to repo default), `head` (source, defaults to current branch), `draft`, `repo`, `reviewer[]`, `assignee[]`, `label[]`. Returns the new PR URL plus a summary.
7
7
  - `pr_checkout` — Check one or more pull requests out into dedicated git worktrees. Optional `pr` (number, URL, branch, or array of any of those — pass an array to batch-check-out multiple PRs in one call), `repo`, `force` (reset existing local branch).
8
8
  - `pr_push` — Push a checked-out PR branch back to its source branch. Requires the branch to have been checked out via `op: pr_checkout` (carries push metadata). Optional `branch`; defaults to the current checked-out git branch. Optional `forceWithLease`.
9
- - `search_issues` — Search issues using normal GitHub issue search syntax. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`, `dateField`. Defaults `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it.
10
- - `search_prs` — Search pull requests using normal GitHub PR search syntax. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`, `dateField`. Defaults `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it.
11
- - `search_code` — Search code with GitHub code search syntax. Required `query`. Optional `repo`, `limit`. Returns matching paths with surrounding fragments. Defaults `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it. Date filtering (`since`/`until`) is **not** supported by GitHub code search.
12
- - `search_commits` — Search commits across GitHub. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`. `dateField` is ignored — always uses `committer-date`. Defaults `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it.
9
+ - `search_issues` — Search issues using normal GitHub issue search syntax. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`, `dateField`.
10
+ - `search_prs` — Search pull requests using normal GitHub PR search syntax. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`, `dateField`.
11
+ - `search_code` — Search code with GitHub code search syntax. Required `query`. Optional `repo`, `limit`. Returns matching paths with surrounding fragments. Date filtering (`since`/`until`) is **not** supported by GitHub code search.
12
+ - `search_commits` — Search commits across GitHub. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`. `dateField` is ignored — always uses `committer-date`.
13
13
  - `search_repos` — Search repositories across GitHub. Optional `query` (required unless `since`/`until` is set), `limit`, `since`, `until`, `dateField` (use query qualifiers like `org:`, `language:` instead of `repo`).
14
14
  - Date filter format for `since` / `until`: relative duration `<n><unit>` (`m`/`h`/`d`/`w`/`mo`/`y`, e.g. `3d`, `12h`, `2w`), an ISO date `YYYY-MM-DD`, or an ISO datetime. Translated to a single GitHub-search qualifier (`created:≥…`, `created:≤…`, or `created:since..until`). `dateField: "updated"` maps to `updated:` for issues/prs and `pushed:` for repos. When you only want a date filter and no keywords, omit `query` entirely.
15
15
  - `run_watch` — Watch a GitHub Actions workflow run. Optional `run` (id or URL). Omitting `run` watches all workflow runs for the current HEAD commit; `branch` falls back to the current branch. Optional `tail` (log lines per failed job). Streams snapshots, fast-fails on the first detected job failure (with a brief grace period to capture concurrent failures), then fetches tailed logs for the failed jobs. The full failed-job logs are saved as a session artifact for on-demand reads.
@@ -6,7 +6,7 @@ Use a single `op` field:
6
6
  - `resume` re-activates a paused goal so work can continue.
7
7
  - `complete` marks the goal complete after you have verified every deliverable against current evidence.
8
8
  - `drop` discards the current goal without completing it.
9
- - `pause` parks an active goal without completing or dropping it. The autonomous continuation loop stops while the goal is paused, so the agent is not re-activated every turn. Use `pause` (not `drop`) when the goal is genuinely still alive but every outstanding deliverable is blocked on human input or action only the user can perform — e.g. the user must sing, record, edit, approve, or perform a manual/physical step — and no further autonomous progress is possible. A paused goal keeps its progress and is fully resumable via `resume`.
9
+ - `pause` parks an active goal without completing or dropping it. While paused, the autonomous continuation loop stops re-activating the agent. Pause only when the goal is still alive but every outstanding deliverable is blocked on action only the user can perform (e.g. record, approve, a manual/physical step); it is never a substitute for `complete`. A paused goal keeps its progress and is resumable via `resume`.
10
10
 
11
11
  Examples:
12
12
  - `goal({"op":"create","objective":"Implement feature X"})`
@@ -16,6 +16,4 @@ Examples:
16
16
  - `goal({"op":"complete"})`
17
17
  - `goal({"op":"drop"})`
18
18
 
19
- Call `complete` only when the goal is actually done and verified.
20
19
  If `get` shows a paused goal, call `resume` before continuing work on it.
21
- Do not `pause` as a substitute for `complete`; pause only when the outstanding work is human-blocked.
@@ -1,7 +1,14 @@
1
1
  Generates or edits images.
2
2
 
3
- <instructions>
4
- - You MUST provide a single detailed `subject` prompt for image generation or editing.
5
- - When using multiple `input`, you SHOULD describe each image's role directly in `subject`, e.g. `Image 1` for composition reference, `Image 2` for lighting reference, `Image 3` for background.
6
- - For text: you SHOULD add "sharp, legible, correctly spelled" for important text; keep text short
7
- </instructions>
3
+ <instruction>
4
+ - `subject` is required: the main subject, described in detail. The tool assembles the final prompt as "subject, action, scene. composition. lighting. style." — use the structured fields rather than packing everything into `subject`:
5
+ - `action`: what the subject is doing
6
+ - `scene`: location or environment
7
+ - `composition`: camera angle and framing
8
+ - `lighting`: lighting setup
9
+ - `style`: artistic style
10
+ - `text`: text to render in the image. For important text you SHOULD add "sharp, legible, correctly spelled"; keep text short.
11
+ - `aspect_ratio` / `image_size`: output shape controls.
12
+ - For edits: pass `changes` (array of edit instructions) and the source image via `input`.
13
+ - `input`: array of `{path}` or `{data, mime_type}` entries. When using multiple `input` images, you SHOULD describe each image's role directly in `subject`, e.g. `Image 1` for composition reference, `Image 2` for lighting reference, `Image 3` for background.
14
+ </instruction>
@@ -4,11 +4,12 @@ Sends short text messages to other live agents in this process and receives thei
4
4
  - The main agent is addressable as `0-Main`. Subagents reuse their task id (e.g. `0-AuthLoader`).
5
5
  - `op: "list"` returns the current set of visible peers. Use it before sending if you are not sure who is live.
6
6
  - `op: "send"` delivers `message` to `to`. `to` may be a specific id or `"all"` to broadcast.
7
+ - `awaitReply` (optional): wait for a prose reply. Defaults to `true` for DMs and `false` for `to: "all"` broadcasts.
7
8
  - The recipient generates the reply via an ephemeral side-channel turn that uses their current model, system prompt, and history — it does **not** wait for the recipient's main loop to be free, so it is safe to IRC an agent that is currently inside a long-running tool call.
8
9
  - The exchange (incoming question + auto-reply) is queued for injection into the recipient's persisted history; the recipient sees it on its next turn and can follow up if needed.
9
10
  </instruction>
10
11
 
11
- <when_to_use>
12
+ <conditions>
12
13
  You SHOULD reach for `irc` proactively when continuing alone is wasteful or wrong. When in doubt, prefer messaging.
13
14
  - **Unexpected state.** You hit something the original task did not describe — a missing file, a config that contradicts the assignment, an API behaving differently than you were told, a tool failing in a way that suggests the spec is wrong. DM `0-Main` (or the spawning agent) for guidance instead of guessing.
14
15
  - **Blocked by another agent.** A peer holds the file/branch/resource you need, has already started the change you are about to make, or owns a decision you depend on. DM that peer (or broadcast to discover who) before duplicating or stepping on work.
@@ -16,17 +17,17 @@ You SHOULD reach for `irc` proactively when continuing alone is wasteful or wron
16
17
  - **Coordination opportunities.** You realize a peer's in-flight work would benefit from yours, or vice-versa.
17
18
 
18
19
  Do **not** use `irc` for: routine progress updates, things you can verify with a tool call, or questions whose answer is already in your assignment / repo / docs.
19
- </when_to_use>
20
+ </conditions>
20
21
 
21
22
  <etiquette>
22
23
  These rules apply to both sending and replying.
23
24
  - **Plain prose only.** Do not send structured JSON status payloads (e.g. `{"type":"task_completed",…}`). Write a normal sentence: "Done with the auth refactor — left a TODO in `src/server/auth.ts` for the rate limiter."
24
25
  - **Do not quote the message you are replying to.** The sender already saw it; the TUI already renders it. Lead with the answer.
25
- - **Use IRC, not terminal tools, to learn about peers.** Do not `grep` artifacts, read other sessions' JSONL files, or shell-poke around to figure out what another agent is doing. DM them — they have the live answer and you do not.
26
+ - **Use IRC, not terminal tools, to learn about peers.** Do not `search` artifacts, read other sessions' JSONL files, or shell-poke around to figure out what another agent is doing. DM them — they have the live answer and you do not.
26
27
  - **One round-trip is enough.** Replies arrive synchronously when the recipient is reachable. Do not follow up with "did you get my message?" — they did. If `delivered` is empty or the result was `failed`, the peer is unavailable; move on or report the blocker, do not retry in a loop.
27
28
  - **Stay terse.** A DM is a chat message, not a memo. One question per send when you can. Share file paths and artifacts via `local://` / `artifact://` URLs instead of pasting blobs.
28
29
  - **Address peers by id.** Use the exact id from `op: "list"` (e.g. `0-AuthLoader`, `0-Main`). Do not invent friendly names.
29
- - **Do not IRC for things a tool would answer.** If a `read`, `grep`, or build command would resolve the question, do that first.
30
+ - **Do not IRC for things a tool would answer.** If a `read`, `search`, or build command would resolve the question, do that first.
30
31
  - **When you receive an IRC message, answer it before continuing.** The recipient injects the question + your auto-reply into your history; address it directly, do not repeat it back to the user.
31
32
  </etiquette>
32
33
 
@@ -1,6 +1,6 @@
1
1
  Inspects, waits, or cancels async jobs.
2
2
 
3
- Background job results are delivered automatically when complete. Running job output stays quiet by default to avoid flooding the conversation; use `tail` when you explicitly want to show/reopen retained output. Reach for this tool only when you need to inspect or intervene.
3
+ Background job results are delivered automatically when complete. Jobs that back task subagents should be controlled via the `subagent` tool when it is available; use `job` for non-subagent jobs (async bash, monitors) and as a compatibility fallback. Running job output stays quiet by default to avoid flooding the conversation; use `tail` when you explicitly want to show/reopen retained output. Reach for this tool only when you need to inspect or intervene.
4
4
 
5
5
  In the interactive TUI, supported managed foreground bash can be folded into a background job by pressing `Ctrl+B` twice while it is running. Raw shell `Ctrl+Z`/`bg` is not the supported path inside SKC because it bypasses job ownership and output-routing contracts.
6
6
 
@@ -16,7 +16,7 @@ Show the retained output buffer for one or more background jobs without waiting.
16
16
  - Prefer `tail` over polling when you only need to peek at progress, so the conversation can continue without flooding the TUI.
17
17
 
18
18
  ## `poll: [id, …]`
19
- Block until the specified jobs finish or the wait window elapses.
19
+ Block until the specified jobs finish or the wait window (~30 s, not configurable) elapses.
20
20
  - Use when you are genuinely blocked on a result and have no other work to do.
21
21
  - Returns the current snapshot when the timer elapses; running jobs remain running.
22
22
  - Completed jobs include their final output in the returned snapshot.
@@ -37,6 +37,6 @@ Interacts with Language Server Protocol servers for code intelligence.
37
37
 
38
38
  <critical>
39
39
  - You MUST use `lsp` for symbol-aware operations (rename, find references, go to definition/implementation, code actions) whenever a language server is available — it is safer and more accurate than text-based alternatives.
40
- - You NEVER perform cross-file renames with `ast_edit`, `sed`, `rsed`, or manual edits when `lsp` `rename` can do it. Text-based renames miss shadowing, re-exports, and usages in other files.
40
+ - You NEVER perform cross-file renames with `ast_edit`, `sed`, or manual edits when `lsp` `rename` can do it. Text-based renames miss shadowing, re-exports, and usages in other files.
41
41
  - Prefer `lsp` `code_actions` for imports, quick-fixes, and refactors the language server already knows how to apply.
42
42
  </critical>
@@ -23,8 +23,8 @@ Pick by how many notifications you need:
23
23
 
24
24
  ## Output
25
25
 
26
- Returns `Monitor started · task <task_id>` plus a task entry visible via `job({op:"list"})`. Each stdout line of the monitored command becomes a `<task-notification>` event delivered between turns.
26
+ Returns `Monitor started · task <task_id>` plus a task entry visible via `job({list: true})`. Each stdout line of the monitored command becomes a `<task-notification>` event delivered between turns.
27
27
 
28
28
  ## Cancellation
29
29
 
30
- There is no separate `monitor` kill tool. Cancel a running monitor with `job` using the returned `task_id`. Disposing the session also cancels every monitor the calling agent started.
30
+ There is no separate `monitor` kill tool. Cancel a running monitor via `job({cancel: ["<task_id>"]})` using the returned `task_id`. Disposing the session also cancels every monitor the calling agent started.
@@ -5,7 +5,7 @@ Patches files given diff hunks. Primary tool for existing-file edits.
5
5
  - `@@` — bare header when context lines unique
6
6
  - `@@ $ANCHOR` — anchor copied verbatim from file (full line or unique substring)
7
7
  **Anchor Selection:**
8
- 1. Otherwise choose highly specific anchor copied from file:
8
+ 1. Prefer a bare `@@` when the context lines alone are unique; otherwise choose a highly specific anchor copied from the file:
9
9
  - full function signature
10
10
  - class declaration
11
11
  - unique string literal/error message
@@ -47,7 +47,7 @@ Returns success/failure; on failure, error message indicates:
47
47
  - You NEVER use anchors as comments (no line numbers, location labels, placeholders like `@@ @@`)
48
48
  - You NEVER place new lines outside the intended block
49
49
  - If edit fails or breaks structure, you MUST re-read the file and produce a new patch from current content — you NEVER retry the same diff
50
- - NEVER use edit to fix indentation, whitespace, or reformat code. Formatting is a single command run once at the end (`bun fmt`, `cargo fmt`, `prettier —write`, etc.)—not N individual edits. If you see inconsistent indentation after an edit, leave it; the formatter will fix all of it in one pass.
50
+ - NEVER use edit to fix indentation, whitespace, or reformat code. Formatting is a single command run once at the end (`bun fmt`, `cargo fmt`, `prettier --write`, etc.)—not N individual edits. If you see inconsistent indentation after an edit, leave it; the formatter will fix all of it in one pass.
51
51
  </critical>
52
52
 
53
53
  <examples>
@@ -12,25 +12,6 @@ Returns success/failure status. On success, file modified in place with replacem
12
12
  </output>
13
13
 
14
14
  <critical>
15
- - You MUST read the file at least once in the conversation before editing. Tool errors if you attempt edit without reading file first.
15
+ - You MUST read the file at least once in the conversation before editing.
16
+ - Use Replace when the _content itself_ identifies the location. For position-addressed changes (append, insert at line N, delete a line range), use the `write` or line-anchored edit tools — NEVER `cat`/`sed` pipelines.
16
17
  </critical>
17
-
18
- <bash-alternatives>
19
- Replace for content-addressed changes—you identify \_what* to change by its text.
20
-
21
- For position-addressed or pattern-addressed changes, bash more efficient:
22
-
23
- |Operation|Command|
24
- |---|---|
25
- |Append to file|`cat >> file <<'EOF'`…`EOF`|
26
- |Prepend to file|`{ cat - file; } <<'EOF' > tmp && mv tmp file`|
27
- |Delete lines N-M|`sed -i 'N,Md' file`|
28
- |Insert after line N|`sed -i 'Na\text' file`|
29
- |Regex replace|`sd 'pattern' 'replacement' file`|
30
- |Bulk replace across files|`sd 'pattern' 'replacement' **/*.ts`|
31
- |Copy lines N-M to another file|`sed -n 'N,Mp' src >> dest`|
32
- |Move lines N-M to another file|`sed -n 'N,Mp' src >> dest && sed -i 'N,Md' src`|
33
-
34
- Use Replace when _content itself_ identifies location.
35
- Use bash when _position_ or _pattern_ identifies what to change.
36
- </bash-alternatives>
@@ -6,7 +6,7 @@ Requirements:
6
6
  - `report` is REQUIRED and must be concise, factual, and actionable.
7
7
  - Include key findings, decisions, and any unresolved risks.
8
8
  - Do not include raw scratch logs unless essential.
9
- - You MUST call this before yielding if a checkpoint is active.
9
+ - `checkpoint`'s must-rewind-before-yield rule applies: never yield with a checkpoint still active.
10
10
 
11
11
  Behavior:
12
12
  - If no checkpoint is active, this tool errors.
@@ -5,7 +5,7 @@ Activate hidden tools (MCP and built-in) when you need a capability not in your
5
5
  {{#if discoverableMCPToolCount}}Total discoverable tools available: {{discoverableMCPToolCount}}.{{/if}}
6
6
  Input:
7
7
  - `query` — required natural-language or keyword query
8
- - `limit` — optional maximum number of tools to return and activate (default `8`)
8
+ - `limit` — optional maximum number of tools to return and activate (default `8`; start with 5–10 if unsure)
9
9
 
10
10
  Behavior:
11
11
  - Searches hidden tool metadata using BM25-style relevance ranking
@@ -14,16 +14,6 @@ Behavior:
14
14
  - Repeated searches add to the active tool set; they do not remove earlier selections
15
15
  - Newly activated tools become available before the next model call in the same overall turn
16
16
 
17
- Notes:
18
- Start with `limit` 5–10 if unsure.
19
- - `query` is matched against tool metadata fields:
20
- - `name`
21
- - `label`
22
- - `server_name` (MCP tools)
23
- - `mcp_tool_name` (MCP tools)
24
- - `description` / `summary`
25
- - input schema property keys (`schema_keys`)
26
-
27
17
  Not for repository/file/code search. Tool discovery only.
28
18
 
29
19
  Returns JSON with:
@@ -2,7 +2,7 @@ Searches files using powerful regex matching.
2
2
 
3
3
  <instruction>
4
4
  - Supports Rust regex syntax (RE2-style — no lookaround or backreferences). Use line anchors or post-filters instead of (?!…)/(?<!…)
5
- - `paths` is required and accepts an array of files, directories, globs, or internal URLs
5
+ - `paths` accepts an array of files, directories, globs, or internal URLs; when omitted, the whole working directory is searched
6
6
  - `paths` is an array; do not embed commas or spaces inside a single entry. Pass `["src", "tests"]` not `["src,tests"]`.
7
7
  - Cross-line patterns are detected from literal `\n` or escaped `\\n` in `pattern`
8
8
  </instruction>
@@ -8,14 +8,15 @@ Invoke another available skill in the current turn.
8
8
  <instruction>
9
9
  - `name` is the skill name as it appears in `/skill:<name>` (e.g. `ralplan`, `ultragoal`, `team`, `deep-interview`)
10
10
  - `args` is the free-form argument string the skill would receive after `/skill:<name>` on the command line
11
- - The skill tool dispatches the callee's SKILL.md as a user-attribution custom message in the current turn (steering the stream when active, appending otherwise). Before dispatch, the tool atomically demotes the caller and promotes the callee in `.skc/state/` by calling `skc state <caller> handoff --to <callee>` in-process.
12
- - The chain is refused unless the caller's `current_phase` is in `{complete, completed, handoff, failed, cancelled, canceled, inactive}`. To prepare the active skill for chaining, write `current_phase: "handoff"` to its mode-state via `skc state <skill> write --input '{"current_phase":"handoff"}' --json`. The skill tool itself then runs `skc state <skill> handoff --to <callee>` in-process to atomically demote the caller and promote the callee — you do not need to run the handoff verb separately.
11
+ - The tool loads the callee's SKILL.md into the current turn and handles the caller→callee state handoff itself.
12
+ - The chain is refused while the caller skill is still active. If your current skill has not yet reached a terminal phase, prepare it first with `skc state <skill> write --input '{"current_phase":"handoff"}' --json`; no other handoff command is needed.
13
13
  - Call once per chain step. To chain `A → B → C`, A calls `skill(B)`; B's next agent turn calls `skill(C)`.
14
14
  </instruction>
15
15
 
16
16
  <critical>
17
17
  - Do NOT use this tool to "remind yourself" of a skill you're already running. The current SKILL.md is already in your context.
18
18
  - Do NOT chain into the same skill recursively. If a skill's flow needs another iteration, follow its in-document instructions.
19
+ - `name` MUST be one concrete skill name, NOT a glob or wildcard. Passing `*`, `?`, or a pattern like `git-*` is rejected immediately — the `--skills '*'` launch filter is unrelated to this tool's `name`.
19
20
  - The chained skill's planning/execution-boundary rules still apply. Chaining does not grant execution approval.
20
21
  </critical>
21
22
 
@@ -1,7 +1,8 @@
1
1
  Runs commands on remote hosts.
2
2
 
3
3
  <instruction>
4
- You MUST build commands from the reference below
4
+ You MUST build commands from the reference below.
5
+ The local coreutils restrictions (`cat`/`grep`/`find`/`head`/`tail` bans) do NOT apply on remote hosts — `read`/`search`/`find` cannot reach them, so these shell commands are the only tools available there.
5
6
  </instruction>
6
7
 
7
8
  <commands>
@@ -2,12 +2,12 @@ Lists, inspects, awaits, pauses, resumes, steers, or cancels detached task subag
2
2
 
3
3
  Task launches return immediately. Use this tool when you need direct control over those running subagents. Prefer `subagent` for task subagents; generic `job` remains available for non-subagent jobs and compatibility fallback access.
4
4
 
5
- `verbosity` controls output size: `receipt` (default) returns status metadata plus a single <=280-character result/error preview and an `agent://<id>` output ref when available; `preview` returns <=2000 characters; `full` returns <=12000 characters and requires explicit `ids`.
5
+ `verbosity` controls output size: `receipt` (default) returns status metadata plus a single ≤280-character result/error preview and an `agent://<id>` output ref when available; `preview` returns ≤2000 characters; `full` returns ≤12000 characters and requires explicit `ids`.
6
6
 
7
7
  # Operations
8
8
 
9
9
  ## `action: "list"`
10
- Snapshot your visible detached subagents, including `running`, `paused`, `queued`, and terminal subagents when retained. Output is receipt-only by default; use `verbosity: "preview"` for a bounded preview or inspect explicit `ids` with `verbosity: "full"` when fuller retained text is necessary.
10
+ Snapshot your visible detached subagents, including `running`, `paused`, `queued`, and terminal subagents when retained. Optional `limit` (1–50) caps how many subagents are returned. Output is receipt-only by default; use `verbosity: "preview"` for a bounded preview or inspect explicit `ids` with `verbosity: "full"` when fuller retained text is necessary.
11
11
 
12
12
  ## `action: "inspect"`
13
13
  Inspect selected subagents by `ids`; omit `ids` to inspect current running subagents. Terminal subagents return receipt-only output by default, with an `agent://<id>` ref when a verified output artifact is available. `verbosity: "full"` requires explicit `ids`.
@@ -3,12 +3,11 @@ Launches subagents to parallelize workflows.
3
3
  - Results are delivered automatically when complete.
4
4
  - The tool result lists the assigned task ids (e.g. `0-AuthLoader`) — those are the live agent ids.
5
5
  {{#if ircEnabled}}
6
- - Coordinate with running tasks via `irc` using those ids. `subagent` cancel terminates a task and **cannot carry a message** — never cancel because an await timed out; cancel only when the task has actually failed, gone off-track, or become unrecoverably wrong.
7
- - If genuinely blocked on completion, wait with `subagent` action `await` and a timeout; timeout only bounds your wait and does not stop or fail the subagent.
6
+ - Coordinate with running tasks via `irc` using those ids. `subagent` cancel terminates a task and **cannot carry a message**.
8
7
  {{else}}
9
- - If genuinely blocked on completion, wait with `subagent` action `await` and a timeout; timeout only bounds your wait and does not stop or fail the subagent.
10
- - Use `subagent` action `inspect` or `list` to snapshot manager state; `cancel` only when a task has actually failed, gone off-track, or become unrecoverably wrong.
8
+ - Use `subagent` action `inspect` or `list` to snapshot manager state.
11
9
  {{/if}}
10
+ - To wait or cancel, use the `subagent` tool; its await/cancel doctrine applies (never cancel just because an await timed out).
12
11
 
13
12
  {{#if ircEnabled}}
14
13
  Subagents have no conversation history, but they can reach you and their siblings live via the `irc` tool. Front-load every fact, file path, and direction they need in {{#if contextEnabled}}`context` or `assignment`{{else}}each `assignment`{{/if}}.
@@ -19,7 +18,7 @@ Subagents have no conversation history. Every fact, file path, and direction the
19
18
  <parameters>
20
19
  - `agent`: agent type for all tasks
21
20
  - `tasks`: tasks to execute in parallel
22
- - `.id`: CamelCase, ≤32 chars
21
+ - `.id`: filesystem-safe, ≤48 chars, matching `[A-Za-z0-9][A-Za-z0-9_-]*`; prefer CamelCase
23
22
  - `.description`: UI label only — subagent never sees it
24
23
  - `.assignment`: complete self-contained instructions; one-liners and missing acceptance criteria are PROHIBITED
25
24
  {{#if contextEnabled}}- `context`: shared background prepended to every assignment; session-specific only{{/if}}
@@ -12,7 +12,7 @@ Allowed `op` values are only `init`, `start`, `done`, `drop`, `rm`, `append`, an
12
12
  |`start`|`task`|Mark in progress|
13
13
  |`done`|`task` or `phase`|Mark completed|
14
14
  |`drop`|`task` or `phase`|Mark abandoned|
15
- |`rm`|`task` or `phase`|Remove|
15
+ |`rm`|`task` or `phase` or *(none = clear all tasks)*|Remove a task; with `phase`, empties the phase (the phase entry remains); bare `rm` clears every task in every phase|
16
16
  |`append`|`phase`, `items: string[]`|Append tasks to `phase`; lazily creates phase|
17
17
  |`note`|`task`, `text`|Append a note to a task. Reminders for future-you only.|
18
18
 
@@ -1,6 +1,7 @@
1
1
  Vim-style `edit` mode. The tool name stays `edit`; every call requires `file`, and the buffer loads automatically on first use.
2
2
  - `{"file": "path"}` - view file
3
3
  - `{"file": "path", "steps": [{"kbd": ["…"], "insert": "…"}]}` - edit file
4
+ - `pause` (optional boolean) - a "paused" call skips the auto-save after its steps and may leave the last step in INSERT mode; the buffer stays open for the next call. Non-paused calls auto-save once after all steps complete.
4
5
 
5
6
  **Multi-location edits: always edit highest line number first (bottom-up).** Each insert shifts lines below it.
6
7
 
@@ -3,9 +3,11 @@ Searches the web for up-to-date information beyond knowledge cutoff.
3
3
  <instruction>
4
4
  - You SHOULD prefer primary sources (papers, official docs) and corroborate key claims with multiple sources
5
5
  - You MUST include links for cited sources in the final response
6
+ - Provider-neutral params: `recency` (freshness window), `limit`/`num_search_results` (result counts), `max_tokens`, `temperature`
6
7
  </instruction>
7
8
 
8
9
  <xai>
10
+ The parameters below apply ONLY when the active search provider is `xai`; ignore them (and never pass them) on any other provider.
9
11
  - With provider `xai`, use `xai_search_mode: "web"` for normal web search, `"x"` for X/Twitter search, or `"web_and_x"` when both surfaces are relevant.
10
12
  - xAI web filters: `allowed_domains` or `excluded_domains` (max 5, mutually exclusive), plus `enable_image_understanding` and `enable_image_search`.
11
13
  - xAI X filters: `allowed_x_handles` or `excluded_x_handles` (max 20, mutually exclusive), `from_date`, `to_date`, `enable_image_understanding`, and `enable_video_understanding`.
@@ -3,10 +3,16 @@ Creates or overwrites file at specified path.
3
3
  <conditions>
4
4
  - Creating new files explicitly required by task
5
5
  - Replacing entire file contents when editing would be more complex
6
- - Supports `.tar`, `.tar.gz`, `.tgz`, and `.zip` archive entries via `archive.ext:path/inside/archive`
7
- - Supports SQLite row operations via `db.sqlite:table` (insert), `db.sqlite:table:key` (update with JSON content, delete with empty content)
8
6
  </conditions>
9
7
 
8
+ <instruction>
9
+ - Archives: write entries inside `.tar`, `.tar.gz`, `.tgz`, and `.zip` via `archive.ext:path/inside/archive`.
10
+ - SQLite rows:
11
+ - `db.sqlite:table` with JSON content — insert a row
12
+ - `db.sqlite:table:key` with JSON content — update the row with that primary key
13
+ - `db.sqlite:table:key` with empty content — DELETE that row (destructive; double-check the key)
14
+ </instruction>
15
+
10
16
  <critical>
11
17
  - You SHOULD use Edit tool for modifying existing files (more precise, preserves formatting)
12
18
  - You NEVER create documentation files (*.md, README) unless explicitly requested
@@ -0,0 +1,16 @@
1
+ export interface RuntimeApiKeyTarget {
2
+ setRuntimeApiKey(provider: string, apiKey: string): void;
3
+ }
4
+
5
+ export interface RuntimeApiKeyModel {
6
+ provider: string;
7
+ }
8
+
9
+ export function applyCliRuntimeApiKeyOverride(
10
+ target: RuntimeApiKeyTarget,
11
+ apiKey: string | undefined,
12
+ model: RuntimeApiKeyModel | undefined,
13
+ ): void {
14
+ if (!apiKey || !model) return;
15
+ target.setRuntimeApiKey(model.provider, apiKey);
16
+ }