@oh-my-pi/pi-coding-agent 16.1.1 → 16.1.2

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 (69) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/cli.js +3314 -3338
  3. package/dist/types/cli/bench-cli.d.ts +2 -1
  4. package/dist/types/config/settings-schema.d.ts +1 -1
  5. package/dist/types/main.d.ts +2 -0
  6. package/dist/types/modes/components/assistant-message.d.ts +12 -0
  7. package/dist/types/modes/components/welcome.d.ts +1 -1
  8. package/dist/types/sdk.d.ts +19 -2
  9. package/dist/types/session/auth-broker-config.d.ts +33 -6
  10. package/dist/types/system-prompt.d.ts +5 -1
  11. package/dist/types/task/executor.d.ts +10 -0
  12. package/dist/types/tools/find.d.ts +0 -2
  13. package/dist/types/tools/search.d.ts +3 -3
  14. package/package.json +12 -12
  15. package/scripts/measure-prompt-tokens.ts +63 -0
  16. package/src/cli/bench-cli.ts +64 -3
  17. package/src/cli/startup-cwd.ts +3 -13
  18. package/src/config/settings-schema.ts +1 -1
  19. package/src/cursor.ts +1 -1
  20. package/src/debug/raw-sse-buffer.ts +31 -10
  21. package/src/eval/py/prelude.py +1 -1
  22. package/src/export/html/tool-views.generated.js +1 -1
  23. package/src/extensibility/extensions/runner.ts +8 -2
  24. package/src/internal-urls/docs-index.generated.txt +1 -1
  25. package/src/main.ts +29 -9
  26. package/src/modes/components/assistant-message.ts +86 -0
  27. package/src/modes/components/tips.txt +2 -1
  28. package/src/modes/components/welcome.ts +86 -8
  29. package/src/modes/controllers/event-controller.ts +1 -1
  30. package/src/prompts/system/personalities/default.md +8 -16
  31. package/src/prompts/system/system-prompt.md +101 -115
  32. package/src/prompts/tools/ast-edit.md +10 -12
  33. package/src/prompts/tools/ast-grep.md +14 -18
  34. package/src/prompts/tools/bash.md +19 -21
  35. package/src/prompts/tools/browser.md +24 -24
  36. package/src/prompts/tools/checkpoint.md +0 -1
  37. package/src/prompts/tools/debug.md +11 -15
  38. package/src/prompts/tools/eval.md +27 -27
  39. package/src/prompts/tools/find.md +6 -10
  40. package/src/prompts/tools/github.md +11 -15
  41. package/src/prompts/tools/goal.md +0 -7
  42. package/src/prompts/tools/inspect-image.md +0 -1
  43. package/src/prompts/tools/irc.md +15 -24
  44. package/src/prompts/tools/job.md +5 -8
  45. package/src/prompts/tools/learn.md +2 -2
  46. package/src/prompts/tools/lsp.md +27 -30
  47. package/src/prompts/tools/manage-skill.md +4 -4
  48. package/src/prompts/tools/read.md +21 -23
  49. package/src/prompts/tools/replace.md +0 -1
  50. package/src/prompts/tools/resolve.md +4 -9
  51. package/src/prompts/tools/rewind.md +1 -1
  52. package/src/prompts/tools/search.md +8 -10
  53. package/src/prompts/tools/task.md +33 -38
  54. package/src/prompts/tools/todo.md +14 -18
  55. package/src/prompts/tools/web-search.md +0 -4
  56. package/src/prompts/tools/write.md +1 -1
  57. package/src/sdk.ts +49 -102
  58. package/src/session/agent-session.ts +17 -2
  59. package/src/session/auth-broker-config.ts +36 -76
  60. package/src/session/session-history-format.ts +1 -1
  61. package/src/session/session-manager.ts +33 -6
  62. package/src/system-prompt.ts +28 -8
  63. package/src/task/executor.ts +57 -0
  64. package/src/task/index.ts +15 -1
  65. package/src/tools/browser.ts +1 -1
  66. package/src/tools/eval.ts +1 -1
  67. package/src/tools/find.ts +4 -17
  68. package/src/tools/memory-edit.ts +1 -1
  69. package/src/tools/search.ts +5 -5
@@ -1,21 +1,17 @@
1
- Provides debugger access through the Debug Adapter Protocol (DAP).
2
- Use for launching or attaching debuggers, setting breakpoints, stepping through execution, inspecting threads/stack/variables, evaluating expressions, capturing output, and interrupting hung programs.
1
+ Debugger access.
3
2
 
4
3
  <instruction>
5
- - You SHOULD prefer this tool over bash for program state, breakpoints, stepping, thread inspection, or interrupting a running process.
6
- - `action: "launch"` starts a session; `program` is required, `adapter` optional (auto-selected from target path and workspace).
7
- For Python, set `adapter: "debugpy"` and `program` to the target `.py` file; put interpreter/script flags in `args`.
8
- - `action: "attach"` connects to an existing process: `pid` for local attach, `port` for remote attach (where the adapter supports it), `adapter` to force a specific debugger.
9
- - **Breakpoints**: `set_breakpoint`/`remove_breakpoint` with source (`file`+`line`) or function (`function`); optional `condition` for conditional breakpoints.
10
- - **Flow control**: `continue` (resumes; briefly waits to observe whether the program stops or keeps running), `step_over`/`step_in`/`step_out` (single-step), `pause` (interrupt a running program so you can inspect state).
11
- - **Inspect**: `threads` (list), `stack_trace` (frames for current stopped thread), `scopes` (needs `frame_id` or a current stopped frame), `variables` (needs `variable_ref` or `scope_id`), `evaluate` (needs `expression`; `context: "repl"` for raw debugger commands when the adapter supports them), `output` (captured stdout/stderr/console), `sessions` (tracked debug sessions), `terminate`.
12
- - Timeouts apply per-request, not to the full session lifetime.
4
+ - You SHOULD prefer this over bash for program state, breakpoints, stepping, thread inspection, or interrupting a running process.
5
+ - `action: "launch"` starts a session; `program` required, `adapter` optional. Python: `adapter: "debugpy"`, `program` = target `.py`, interpreter/script flags in `args`.
6
+ - `action: "attach"` connects to a running process: `pid` (local), `port` (remote), `adapter` forces a specific debugger.
7
+ - **Breakpoints**: `set_breakpoint`/`remove_breakpoint` with source (`file`+`line`) or function (`function`); optional `condition`.
8
+ - **Flow control**: `continue` (resume), `step_over`/`step_in`/`step_out` (single-step), `pause` (interrupt a running program).
9
+ - **Inspect**: `threads`, `stack_trace` (current stopped thread), `scopes` (needs `frame_id` or current stopped frame), `variables` (needs `variable_ref` or `scope_id`), `evaluate` (needs `expression`; `context: "repl"` for raw debugger commands), `output` (stdout/stderr/console), `sessions`, `terminate`.
13
10
  </instruction>
14
11
 
15
12
  <caution>
16
- - Only one active debug session is supported at a time.
17
- - Some adapters require a launched session to receive `configurationDone` before the target actually runs; if the tool says configuration is pending, set breakpoints and then call `continue`.
18
- - Adapter availability depends on local binaries. Common built-ins: `gdb`, `lldb-dap`, `python -m debugpy.adapter`, `dlv dap`.
19
- - `program` must be an executable file or debug target, not a directory or interpreter name that resolves to a workspace directory.
20
- - Python debugging requires `debugpy`; install with `pip install debugpy` if the adapter is unavailable.
13
+ - Only one active debug session at a time.
14
+ - Valid `adapter` values: `gdb`, `lldb-dap`, `python -m debugpy.adapter`, `dlv dap` (must be installed locally).
15
+ - `program` must be an executable file or debug target, not a directory or bare interpreter name.
16
+ - Python debugging requires `debugpy`; `pip install debugpy` if unavailable.
21
17
  </caution>
@@ -1,34 +1,34 @@
1
1
  Run code in a persistent kernel using a list of cells.
2
2
 
3
3
  <instruction>
4
- Cells run in array order. State persists per language across cells, tool calls, and `task` subagents: variables either side defines are visible to the other. Stage helpers, datasets, or live clients once; subagents use them directly no re-importing or serializing across the boundary.
4
+ Cells run in array order. State persists per language across cells, tool calls, and `task` subagents stage helpers/datasets/clients once, subagents reuse directly, no re-import/serialize.
5
5
 
6
6
  Cell fields:
7
7
 
8
- - `language` — {{#if py}}`"py"` for the IPython kernel{{/if}}{{#ifAll py js}}, {{/ifAll}}{{#if js}}`"js"` for the persistent JavaScript VM{{/if}}.
9
- - `code` — cell body, verbatim. Newlines and quotes JSON-encoded; no fences, no headers.
8
+ - `language` — {{#if py}}`"py"` IPython kernel{{/if}}{{#ifAll py js}}, {{/ifAll}}{{#if js}}`"js"` persistent JavaScript VM{{/if}}.
9
+ - `code` — cell body, verbatim. Newlines/quotes JSON-encoded; no fences, no headers.
10
10
  - `title` (optional) — short transcript label (e.g. `"imports"`).
11
- - `timeout` (optional) — per-cell seconds (1-3600, default 30). Bounds the cell's own work only; the clock pauses while `agent()`/`parallel()`/`completion()` calls are in flight, so fanouts never need a raise. Raise only for heavy local compute or long non-agent tool calls.
11
+ - `timeout` (optional) — per-cell seconds. Raise only for heavy compute or long non-agent tool calls.
12
12
  - `reset` (optional) — wipe this cell's language kernel first.{{#ifAll py js}} Per-language: a `py` reset never touches the JS VM.{{/ifAll}}
13
13
 
14
- Work incrementally: one logical step per cell (imports, define, test, use); pass multiple small cells per call; define small reusable functions for individual debugging. Workflow explanations go in the assistant message or `title`, never inside cell code.
15
- {{#if py}}Python runs in IPython with a live event loop: use top-level `await` directly; `asyncio.run(…)` raises "cannot be called from a running event loop".{{/if}}
16
- On failure, errors name the failing cell ("Cell 3 failed") — resubmit only the fixed cell (plus any remaining).
14
+ Work incrementally one logical step per cell (imports, define, test, use), many small cells per call; workflow notes in the assistant message or `title`, never in cell code.
15
+ {{#if py}}Live event loop: use top-level `await` directly; `asyncio.run(…)` raises "cannot be called from a running event loop".{{/if}}
16
+ Errors name the failing cell ("Cell 3 failed") — resubmit the fixed cell + any remaining.
17
17
  </instruction>
18
18
 
19
19
  <prelude>
20
- {{#ifAll py js}}Same helpers in both runtimes, same positional order. Python: helpers run synchronously; trailing options are keyword args. JavaScript: helpers are async and `await`able; trailing options are ONE trailing object literal, never positional (extra positional args throw).{{else}}{{#if py}}Helpers run synchronously. Trailing options are keyword arguments.{{/if}}{{#if js}}Helpers are async and `await`able. Trailing options are ONE trailing object literal, never positional (extra positional args throw).{{/if}}{{/ifAll}}
20
+ {{#ifAll py js}}Same helpers + arg order, both runtimes. Python: sync, options = trailing kwargs. JS: async/`await`able, options = ONE trailing object literal, never positional (extras throw).{{else}}{{#if py}}Sync; options = trailing kwargs.{{/if}}{{#if js}}Async/`await`able; options = ONE trailing object literal, never positional (extras throw).{{/if}}{{/ifAll}}
21
21
  ```
22
22
  display(value) → None
23
- Render value in cell output, shows presentable values natively (figures, images, dataframes)
23
+ Cell output; figures/images/dataframes shown natively.
24
24
  print(value, ...) → None
25
- Print to text output.
25
+ Text output.
26
26
  read(path, offset?=1, limit?=None) → str
27
- Read file as text; offset/limit are 1-indexed lines. Accepts `local://…`.
27
+ File as text; offset/limit 1-indexed lines. Accepts `local://…`.
28
28
  write(path, content) → str
29
- Write file (creates parents); returns resolved path. `local://…` persists across turns / subagents.
29
+ Write file (creates parents) resolved path. `local://…` persists across turns/subagents.
30
30
  append(path, content) → str
31
- Append to file; returns resolved path. Accepts `local://…`.
31
+ Append resolved path. Accepts `local://…`.
32
32
  tree(path?=".", max_depth?=3, show_hidden?=False) → str
33
33
  Directory tree.
34
34
  diff(a, b) → str
@@ -36,35 +36,35 @@ diff(a, b) → str
36
36
  env(key?=None, value?=None) → str | None | dict
37
37
  No args → full env dict; one → value of `key`; two → set `key=value`, return value.
38
38
  output(*ids, format?="raw", query?=None, offset?=None, limit?=None) → str | dict | list[dict]
39
- Read task/agent output by id; one id → text/dict, multiple → list.
39
+ Task/agent output by id; one → text/dict, multiple → list.
40
40
  tool.<name>(args) → unknown
41
- Invoke any session tool; `args` is its parameter object.
41
+ Invoke any session tool; `args` = its parameter object.
42
42
  completion(prompt, model?="default", system?=None, schema?=None) → str | dict
43
- Oneshot stateless completion (no history, no tools). `model` tier: "smol" (fast) | "default" (session model) | "slow" (most capable). JSON-Schema `schema` forces structured output, returns parsed object.
43
+ Oneshot, stateless (no history/tools). `model`: "smol" fast | "default" session | "slow" most capable. `schema` (JSON-Schema) structured output, parsed object.
44
44
  {{#if spawns}}agent(prompt, agent_type?="task", model?=None, label?=None, schema?=None, return_handle?=False) → str | dict
45
- Run a subagent, return its final output. `agent_type`/`agentType` picks another discovered agent; `schema` as in completion(). Share background via `local://` files referenced in the prompt. `return_handle`/`returnHandle` → a DAG node dict { text, output, handle: "agent://<id>", id, agent } (parsed object under `data` when `schema` set) so a downstream stage references the transcript by handle instead of re-inlining it.
45
+ Run a subagent final output. `agent_type`/`agentType` picks another discovered agent; `schema` as in completion(). Background via `local://` files named in the prompt. `return_handle`/`returnHandle` → DAG node dict { text, output, handle: "agent://<id>", id, agent } (parsed under `data` when `schema` set).
46
46
  {{#if js}} JS: options are ONE trailing object — agent(prompt, { agentType, schema, returnHandle }).
47
47
  {{/if}}
48
48
  {{/if}}
49
49
  parallel(thunks) → list
50
- Run thunks through a bounded pool (as wide as a `task` batch — don't pre-shrink), preserving input order. Barrier: returns when all finish; a throwing thunk propagates.
50
+ Thunks through a bounded pool (wide as a `task` batch — don't pre-shrink), input order kept; returns when all finish, a throwing thunk propagates.
51
51
  pipeline(items, ...stages) → list
52
- Map items through one-arg stages left-to-right, barrier between stages; stage 1 gets the item, later stages the previous result. Same pool width as parallel().
52
+ Map items through one-arg stages left-to-right, barrier between stages; stage 1 gets the item, later stages the previous result.
53
53
  log(message) → None
54
54
  Progress line above the status tree.
55
55
  phase(title) → None
56
- Start a phase grouping subsequent status lines.
56
+ Phase grouping subsequent status lines.
57
57
  budget → per-turn token budget
58
- {{#if py}}`budget.total` (ceiling or None), `budget.spent()`, `budget.remaining()` (math.inf when no ceiling), `budget.hard` (bool).{{/if}}{{#if js}}`await budget.total()` (ceiling or null), `await budget.spent()`, `await budget.remaining()` (Infinity when no ceiling), `await budget.hard()`.{{/if}} Ceiling comes from a `+Nk` directive (advisory) or `+Nk!`/Goal Mode (hard — `agent()` refuses to spawn past it); otherwise None/null, spend still tracked across the turn.
58
+ {{#if py}}`budget.total` (ceiling or None), `budget.spent()`, `budget.remaining()` (math.inf when no ceiling), `budget.hard`.{{/if}}{{#if js}}`await budget.total()` (ceiling or null), `await budget.spent()`, `await budget.remaining()` (Infinity when no ceiling), `await budget.hard()`.{{/if}} Ceiling: `+Nk` (advisory) or `+Nk!`/Goal Mode (hard — `agent()` won't spawn past it); spend still tracked.
59
59
  ```
60
60
  </prelude>
61
61
  {{#if spawns}}
62
62
  <dag>
63
- Build a dependency graph by piping handles through the stage helpers ephemeral, in-session, acyclic waves:
64
- - **Name nodes.** Capture each `agent(…, {{#if py}}return_handle=True{{/if}}{{#if js}}{ returnHandle: true }{{/if}})` result; it carries `handle` (`agent://<id>`) + `output`.
65
- - **Wire edges by reference.** Embed an upstream node's `handle` or `output` in the dependent stage's prompt so a large transcript flows by reference, never re-inlined. For bulk artifacts, `write("local://<name>.md", …)` and pass the URI.
66
- - **`pipeline(items, *stages)` = staged waves** with a barrier between stages (every item clears stage N before any enters stage N+1) — the linear spine of a DAG. **`parallel(thunks)` = one wave** of independent nodes.
67
- - **Isolate failure.** A raising node re-raises the lowest-index error and aborts its wave; wrap each risky node in try/except so a failed node degrades only its dependent subtree while independent branches still finish.
68
- - **Acyclic only.** A node never waits on its own descendant; cycles are an authoring bug, not a supported pattern.
63
+ Pipe handles through stage helpers to build a dependency graph — acyclic waves:
64
+ - **Name nodes.** Capture each `agent(…, {{#if py}}return_handle=True{{/if}}{{#if js}}{ returnHandle: true }{{/if}})` result; carries `handle` (`agent://<id>`) + `output`.
65
+ - **Wire edges by reference.** Put an upstream node's `handle`/`output` in the dependent stage's prompt large transcript never re-inlined. Bulk: `write("local://<name>.md", …)`, pass the URI.
66
+ - **`pipeline(items, *stages)` = staged waves**, barrier between stages (every item clears stage N before any enters N+1). **`parallel(thunks)` = one wave** of independent nodes.
67
+ - **Isolate failure.** A raising node re-raises the lowest-index error, aborts its wave; wrap risky nodes in try/except so a failure degrades only its dependent subtree, independent branches finish.
68
+ - **Acyclic only.** A node never waits on its own descendant.
69
69
  </dag>
70
70
  {{/if}}
@@ -1,21 +1,17 @@
1
- Finds files and directories using fast pattern matching that works with any codebase size.
1
+ Finds files and directories via fast pattern matching, any codebase size.
2
2
 
3
3
  <instruction>
4
- - `paths` is required and accepts an array of globs, files, or directories
5
- - Pass multiple targets as **separate array elements** (`paths: ["a", "b"]`).
6
- - `gitignore` defaults to `true` and hides files matched by `.gitignore`. Set `gitignore: false` to find `.env*`, `*.log`, freshly-created build outputs, or anything else your repo ignores
7
- - `hidden` defaults to `true`; combine with `gitignore: false` to surface dotfiles that are also gitignored
8
- - `limit` is clamped to 1-200 (default 200). Narrow the pattern instead of raising the limit
9
- - `timeout` is in seconds (default 5, clamped to 0.5–60). On timeout, find returns whatever partial matches it has collected with `truncated: true` and a notice — increase `timeout` or narrow the pattern instead of retrying blindly
10
- - You SHOULD perform multiple searches in parallel when potentially useful
4
+ - `paths`: array of globs, files, or directories.
5
+ - `gitignore` (default `true`) hides `.gitignore` matches. Set `gitignore: false` to find `.env*`, `*.log`, fresh build outputs, or anything your repo ignores.
6
+ - `hidden` (default `true`); combine with `gitignore: false` to surface dotfiles also gitignored.
11
7
  </instruction>
12
8
 
13
9
  <output>
14
- Matching file and directory paths sorted by modification time (most recent first), grouped by directory to reduce token usage. Each group starts with `# <dir>/` followed by basenames (one per line); directory entries get a trailing `/`. Root-level entries have no header. Truncated at 200 entries or 50KB.
10
+ Matching paths sorted by mtime (newest first), grouped under `# <dir>/` headers with basenames below; directories get a trailing `/`.
15
11
  </output>
16
12
 
17
13
  <avoid>
18
- For open-ended searches requiring multiple rounds of globbing and searching, you MUST use Task tool instead.
14
+ Open-ended searches needing multiple rounds of globbing/searching: you MUST use the Task tool instead.
19
15
  </avoid>
20
16
 
21
17
  <critical>
@@ -1,21 +1,17 @@
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).
1
+ Op-based `gh` wrapper: repos, PRs, search, checkout, push, Actions watch. Read an issue/PR via `issue://<N>`/`pr://<N>`. PR diffs: `pr://<N>/diff` (file listing), `pr://<N>/diff/<i>` (file slice, 1-indexed), `pr://<N>/diff/all` (full diff).
2
2
 
3
3
  <instruction>
4
- Pick the operation via `op`. Each op uses a subset of the parameters:
5
- - `repo_view` — Read repository metadata. Optional `repo` (owner/repo) and `branch`. Falls back to the current checkout or default `gh` repo.
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
- - `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
- - `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`. 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`.
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. Optional `query` (required unless `since`/`until` is set), `repo`, `limit`, `since`, `until`. `dateField` is ignored always uses `committer-date`.
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
- - All `search_*` ops except `search_repos` default `repo` to the current checkout's `owner/repo` when omitted; pass an explicit `repo:`/`org:`/`user:` qualifier in `query` to search outside it.
15
- - 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.
16
- - `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). Fast-fails on the first job failure and returns tailed logs for the failed jobs.
4
+ Pick op via `op`. Beyond the field descriptions, per op:
5
+ - `repo_view` — omit `repo` to view the current checkout.
6
+ - `pr_create` — `head` defaults to the current branch.
7
+ - `pr_checkout` — checks PR(s) out into dedicated git worktrees, not your working tree; pass an array of `pr` to batch multiple in one call.
8
+ - `pr_push` — requires the branch to have been checked out first via `op: pr_checkout`.
9
+ - `search_issues`/`search_prs`/`search_commits`/`search_repos` — `query` is optional when `since`/`until` is set (omit it for a date-only filter). `search_code` supports neither: `query` is required and `since`/`until` are rejected.
10
+ - `search_*` default `repo` to the current checkout's `owner/repo`; pass a `repo:`/`org:`/`user:` qualifier in `query` to search elsewhere. `search_repos` is the exception — it ignores `repo`; scope it with `org:`/`language:` qualifiers in `query`.
11
+ - `since`/`until` — relative duration (`<n>` + `m`/`h`/`d`/`w`/`mo`/`y`, e.g. `3d`, `2w`), ISO date (`YYYY-MM-DD`), or ISO datetime. `dateField: "updated"` filters on update time (issues/PRs) or push time (repos), not creation.
12
+ - `run_watch` — omit `run` to watch every run for the current HEAD (`branch` falls back to current). Fast-fails on the first job failure.
17
13
  </instruction>
18
14
 
19
15
  <output>
20
- Returns a concise readable summary tailored to the chosen op (repo metadata, PR metadata, diff text, search results, checkout info, push target, or workflow run snapshot). For `run_watch`, the full failed-job logs are saved as a session artifact when failures occur.
16
+ Concise summary per op. `run_watch` failures save full logs to a session artifact.
21
17
  </output>
@@ -7,12 +7,5 @@ Use a single `op` field:
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
9
 
10
- Examples:
11
- - `goal({"op":"create","objective":"Implement feature X","token_budget":50000})`
12
- - `goal({"op":"get"})`
13
- - `goal({"op":"resume"})`
14
- - `goal({"op":"complete"})`
15
- - `goal({"op":"drop"})`
16
-
17
10
  NEVER call `complete` because a budget is low or a turn is ending. Call it only when the goal is actually done and verified.
18
11
  If `get` shows a paused goal, call `resume` before continuing work on it.
@@ -17,7 +17,6 @@ Inspects an image file with a vision-capable model and returns compact text anal
17
17
  </output>
18
18
 
19
19
  <critical>
20
- - Parameters are strict: only `path` and `question` are allowed
21
20
  - If image submission is blocked by settings, the tool will fail with an actionable error
22
21
  - If configured model does not support image input, configure a vision-capable model role before retrying
23
22
  </critical>
@@ -1,42 +1,33 @@
1
- Sends short text messages to other agents in this process and receives theirs.
1
+ Send/receive short text messages between agents in this process.
2
2
 
3
3
  <instruction>
4
- - Main agent is `Main`; subagents reuse their task id (`AuthLoader`, or `AuthLoader-2` when the name repeats).
4
+ - Main agent is `Main`; subagents reuse their task id (`AuthLoader`, `AuthLoader-2` on repeat).
5
5
  - `op: "list"` — peers with status (`running` | `idle` | `parked`), unread count, parent, last activity. Use when unsure who exists.
6
- - `op: "send"` — fire-and-forget `message` to `to` (peer id, or `"all"` to broadcast to live peers). Returns per-recipient receipts immediately; NEVER waits for the recipient to act. Outcomes: `injected` (mid-turn; folded in at next step boundary), `woken` (idle peer started a turn), `revived` (parked peer brought back and woken), `failed`.
7
- - Messaging an `idle`/`parked` peer is how you wake it — there is no separate revive call.
8
- - `send` + `await: true` — round-trip: send, then block until that peer's next message (or timeout). Invalid with `to: "all"`.
9
- - `op: "wait"` — block until a message arrives (optionally only `from` one peer); consumes and returns it. Timeout = clean "no message", not an error.
10
- - `op: "inbox"` drain pending messages without blocking (`peek: true` leaves them unread).
11
- - `replyTo` — id of the message you are answering, so the sender can correlate.
12
- - Replies arrive only when the recipient sends one. Exception: `await: true` to a peer stuck mid-turn (async execution disabled, e.g. blocked in a synchronous task spawn) gets a side-channel auto-reply from its context. For background on a peer, `read` `history://<id>` instead of interrogating it.
6
+ - `op: "send"` — fire-and-forget; returns per-recipient receipts immediately, NEVER waits for the recipient to act. Outcomes: delivered, or `failed` (unreachable). `to: "all"` broadcasts to live peers.
7
+ - Messaging an `idle`/`parked` peer wakes it — no separate revive call.
8
+ - `op: "wait"` — block for a message (optionally only `from` one peer); consumes + returns it. Timeout = clean "no message", not an error.
9
+ - `op: "inbox"` — drain pending messages without blocking.
10
+ - Replies arrive only when the recipient sends one. For peer background, `read` `history://<id>`, don't interrogate.
13
11
  </instruction>
14
12
 
15
13
  <when_to_use>
16
- Reach for `irc` proactively when continuing alone is wasteful or wrong; when in doubt, message.
17
- - **Unexpected state** — missing file, config contradicting the assignment, API/tool behaving differently than told. DM `Main` (or your spawner) instead of guessing.
18
- - **Blocked by another agent** — a peer holds the file/branch/resource or decision you need, or started the change you're about to make. DM them (or broadcast to discover who) before duplicating work.
19
- - **Decision outside your scope** — a genuine fork the assignment didn't pre-decide. Ask the requester rather than picking unilaterally.
20
- - **Coordination** — a peer's in-flight work overlaps yours (the roster shows each peer's role and current activity); message before editing a shared file or duplicating a sibling's change.
14
+ Reach for `irc` when going alone is wasteful or wrong; when in doubt, message.
15
+ - **Unexpected state** — missing file, config contradicting the assignment, API/tool behaving differently than told. DM `Main` (or your spawner), don't guess.
16
+ - **Blocked by another agent** — a peer holds the file/branch/resource/decision you need, or started your change. DM them (or broadcast to find who) before duplicating work.
17
+ - **Decision outside your scope** — a genuine fork the assignment didn't pre-decide. Ask the requester, don't pick unilaterally.
18
+ - **Coordination** — a peer's in-flight work overlaps yours (roster shows each peer's role + activity); message before editing a shared file or duplicating a sibling's change.
21
19
 
22
20
  NEVER for: routine progress updates, things a tool call can verify, questions your assignment/repo/docs already answer.
23
21
  </when_to_use>
24
22
 
25
23
  <etiquette>
26
- Applies to sending and replying.
24
+ Applies to sending + replying.
27
25
  - **Plain prose only.** NEVER JSON status payloads like `{"type":"task_completed",…}` — write a normal sentence.
28
26
  - **NEVER quote the message you answer.** Lead with the answer; set `replyTo`.
29
27
  - **Learn about peers via IRC** — NEVER grep artifacts, read other sessions' JSONL, or shell-poke. DM them, or `read` `history://<id>`.
30
- - **Send, then keep working.** `wait`/`await: true` only when you genuinely cannot proceed. NEVER "did you get my message?". A `failed` receipt = peer unreachable — move on; NEVER retry in a loop.
31
- - **Answer expected questions** via `irc send` to the sender (finishing your current step first is fine).
28
+ - **Send, then keep working.** `wait`/`await: true` only when you cannot proceed. NEVER "did you get my message?". A `failed` receipt = peer unreachable — move on; NEVER retry in a loop.
29
+ - **Answer expected questions** via `irc send` to the sender (finish your current step first).
32
30
  - **Stay terse.** One question per send; share files via `local://`/`memory://`/`artifact://` URLs, never pasted blobs.
33
31
  - **Address peers by exact id** from `op: "list"` (e.g. `AuthLoader`, `Main`). NEVER invent friendly names.
34
32
  - **NEVER IRC what a tool answers.** A `read`, grep, or build resolves it? Do that first.
35
33
  </etiquette>
36
-
37
- <output>
38
- - `send`: per-recipient receipts; with `await: true`, also the reply (or timeout notice).
39
- - `wait`: the consumed message, or a clean timeout notice.
40
- - `inbox`: pending messages, oldest first.
41
- - `list`: peers with status, unread count, parent, last activity.
42
- </output>
@@ -1,20 +1,17 @@
1
1
  Inspects, waits, or cancels async jobs.
2
2
 
3
- Background job results are delivered automatically when complete. Reach for this tool only when you need to intervene.
3
+ Results arrive automatically on completion; reach for this tool only to intervene.
4
4
 
5
5
  # Operations
6
6
 
7
7
  ## `list: true`
8
- Use to inspect what's running.
8
+ Inspect what's running.
9
9
 
10
10
  ## `poll: [id, …]`
11
- Block until the specified jobs finish or the wait window elapses. Omit `poll` (with no `list`/`cancel`) to wait on ALL running jobs — NEVER enumerate ids you don't need to filter.
12
- - Use when you are genuinely blocked on a result and have no other work to do.
13
- - Returns the current snapshot when the timer elapses; running jobs remain running.
14
- - Completed jobs include their final output in the returned snapshot.
15
- - With Max Poll Time set to `smart` (the default), the wait window adapts: it starts at ~5s and lengthens with each back-to-back poll (up to ~5m), then resets to ~5s after you go a while without polling. Spinning in a poll loop costs progressively more; do real work between polls.
11
+ Block until specified jobs finish or the wait window elapses. Omit `poll` (no `list`/`cancel`) to wait on ALL running jobs — NEVER enumerate ids you don't need to filter.
12
+ - Use only when genuinely blocked with no other work.
13
+ - Completed jobs include final output.
16
14
 
17
15
  ## `cancel: [id, …]`
18
16
  Stop running jobs.
19
17
  - Use when a job is stalled, hung, or no longer needed.
20
- - Returns immediately after cancelling.
@@ -1,7 +1,7 @@
1
1
  Capture a reusable lesson into long-term memory, and optionally mint or enhance a managed skill in the same call.
2
2
 
3
- Use after solving something whose insight will pay off again: a non-obvious fix, a project convention you had to discover, a workflow that worked. The `memory` field is the durable, self-contained lesson — include what, when, and why so a future session understands it without this conversation.
3
+ Use after solving something whose insight will pay off again: a non-obvious fix, a project convention you had to discover, a workflow that worked.
4
4
 
5
- Provide the optional `skill` object when the lesson is a repeatable *procedure* worth codifying as a `SKILL.md` (not just a fact). Managed skills are written to an isolated directory (`~/.omp/agent/managed-skills`) and are surfaced like normal skills next session. They NEVER touch user-authored skills. `body` is the SKILL.md content in markdown — do not include frontmatter; it is generated from `name` and `description`. Use `action: "update"` to enhance an existing managed skill.
5
+ Provide the optional `skill` object when the lesson is a repeatable *procedure* worth codifying as a `SKILL.md` (not just a fact). Managed skills are written to an isolated directory (`~/.omp/agent/managed-skills`) and are surfaced like normal skills next session. They NEVER touch user-authored skills. Frontmatter is generated from `name` and `description`.
6
6
 
7
7
  Capture sparingly and specifically. One strong, reusable lesson beats several vague ones.
@@ -1,42 +1,39 @@
1
- Interacts with Language Server Protocol servers for code intelligence.
1
+ Language Server Protocol (LSP) servers for code intelligence.
2
2
 
3
3
  <operations>
4
- - `diagnostics`: Get errors/warnings for a file, a glob of files, or the entire workspace (`file: "*"`)
5
- - `definition`: Go to symbol definition → file path + position + 3-line source context
6
- - `type_definition`: Go to symbol type definition → file path + position + 3-line source context
7
- - `implementation`: Find concrete implementations → file path + position + 3-line source context
8
- - `references`: Find references → locations with 3-line source context (first 50), remaining location-only
9
- - `hover`: Get type info and documentation → type signature + docs
10
- - `symbols`: List symbols in a file, or search workspace with `file: "*"` and a `query`
11
- - `rename`: Rename symbol across codebase → preview or apply edits
12
- - `rename_file`: Rename or move a file/directory; sends `workspace/willRenameFiles` so LSP servers update import paths and other references → preview or apply edits + filesystem rename
13
- - `code_actions`: List available quick-fixes/refactors/import actions; apply one when `apply: true` and `query` matches title or index
14
- - `status`: Show active language servers
15
- - `capabilities`: Dump per-server capabilities (standard + experimental + executeCommand list) for discovery — file scopes to one server, omitted/`"*"` lists every active server
16
- - `request`: Send a raw LSP request to a server — `query` is the method name (e.g., `rust-analyzer/expandMacro`, `typescript/goToSourceDefinition`, `workspace/executeCommand`); use `payload` for arbitrary JSON params or let the tool auto-build them from `file`/`line`/`symbol`
17
- - `reload`: Restart a specific server (via `file`) or all servers with `file: "*"`
4
+ - `diagnostics`: errors/warnings for a file, glob, or workspace (`file: "*"`)
5
+ - `definition`: symbol definition
6
+ - `type_definition`: symbol's type definition
7
+ - `implementation`: concrete implementations
8
+ - `references`: all references
9
+ - `hover`: type info / docs
10
+ - `symbols`: list file symbols, or search workspace with `file: "*"` + `query`
11
+ - `rename`: rename symbol codebase-wide
12
+ - `rename_file`: rename/move a file/directory; updates import paths + other references
13
+ - `code_actions`: list quick-fixes/refactors/import actions; apply one when `apply: true` + `query` matches title or index
14
+ - `status`: active language servers
15
+ - `capabilities`: per-server capabilities
16
+ - `request`: raw LSP request — `query` = method name (e.g. `rust-analyzer/expandMacro`, `workspace/executeCommand`); `payload` = JSON params
17
+ - `reload`: restart one server (via `file`) or all (`file: "*"`)
18
18
  </operations>
19
19
 
20
20
  <parameters>
21
- - `file`: File path, glob pattern (e.g. `src/**/*.ts`), or `"*"` for workspace scope. Globs are expanded locally before dispatch. `"*"` routes `diagnostics`/`symbols`/`reload` to their workspace-wide form.
22
- - `line`: 1-indexed line number for position-based actions
23
- - `symbol`: Substring on the target line used to resolve column automatically. Append `#N` to pick the Nth occurrence on that line (1-indexed; default 1) — e.g. `foo#2` selects the second `foo`.
24
- - `query`: Symbol search query, code-action kind filter / selector (list/apply mode), or LSP method name when `action: request`
25
- - `new_name`: Required for `rename` (new symbol identifier) and `rename_file` (destination path)
26
- - `apply`: Apply edits for rename/rename_file/code_actions (default true for rename and rename_file; list mode for code_actions unless explicitly true)
27
- - `payload`: JSON-encoded params for `action: request`. Overrides the auto-built `{ textDocument, position }` shape when present.
28
- - `timeout`: Request timeout in seconds (clamped to 5-60, default 20)
21
+ - `file`: path, glob (e.g. `src/**/*.ts`), or `"*"` for workspace scope
22
+ - `line`: 1-indexed line for position-based actions
23
+ - `symbol`: substring on the target line. Append `#N` for the Nth occurrence — e.g. `foo#2` = second `foo`.
24
+ - `query`: symbol search, code-action kind filter/selector (list/apply mode), or LSP method name when `action: request`
25
+ - `new_name`: required for `rename` (new identifier) and `rename_file` (destination path)
26
+ - `apply`: apply edits for rename/rename_file/code_actions (default true for rename/rename_file; code_actions list mode unless true)
27
+ - `payload`: JSON params for `action: request`
28
+ - `timeout`: seconds
29
29
  </parameters>
30
30
 
31
31
  <caution>
32
- - Requires running LSP server for target language
33
- - Some operations require file to be saved to disk
34
- - Glob expansion samples up to 20 files per request; use `file: "*"` for broader coverage
35
- - When `symbol` is provided for position-based actions, missing symbols or out-of-bounds `#N` occurrence selectors return an explicit error instead of silently falling back
32
+ - Missing `symbol` or out-of-bounds `#N` explicit error.
36
33
  </caution>
37
34
 
38
35
  <critical>
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`, or manual edits when `lsp` `rename` can do it. Text-based renames miss shadowing, re-exports, and usages in other files.
41
- - You SHOULD use `lsp` `code_actions` for imports, quick-fixes, and refactors the language server already knows how to apply.
36
+ - You MUST use `lsp` for symbol-aware operations (rename, references, definition/implementation, code actions) whenever a language server is available — safer and more accurate than text-based alternatives.
37
+ - 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 cross-file usages.
38
+ - You SHOULD use `lsp` `code_actions` for imports, quick-fixes, and refactors the server already applies.
42
39
  </critical>
@@ -2,8 +2,8 @@ Create, update, or delete a managed skill — a `SKILL.md` written to an isolate
2
2
 
3
3
  Managed skills are for repeatable procedures worth codifying: a setup sequence, a debugging recipe, a project-specific workflow. They are kept separate from user-authored skills and this tool NEVER edits those.
4
4
 
5
- - `action: "create"` — requires `name`, `description`, and `body`. Fails if the skill already exists.
6
- - `action: "update"` — requires `name`, `description`, and `body`. Fails if the skill does not exist. Overwrites the body.
7
- - `action: "delete"` — requires `name`. Fails if the skill does not exist.
5
+ - `action: "create"` — fails if the skill already exists.
6
+ - `action: "update"` — overwrites the body; fails if the skill does not exist.
7
+ - `action: "delete"` — fails if the skill does not exist.
8
8
 
9
- `name` is kebab-case (lowercase letters, digits, hyphens). `description` is a single line stating when to use the skill — it drives discovery, so make it specific. `body` is the SKILL.md content in markdown; do not include frontmatter (it is generated from `name` and `description`).
9
+ `name` is kebab-case (lowercase letters, digits, hyphens). The `description` drives discovery, so make it specific. Do not include frontmatter in `body`; it is generated from `name` and `description`.
@@ -1,50 +1,48 @@
1
- Read files, directories, archives, SQLite databases, images, documents, internal resources, and web URLs through a single `path` string.
1
+ Read files, directories, archives, SQLite, images, documents, internal resources, and web URLs via one `path`.
2
2
 
3
3
  <instruction>
4
- - You SHOULD parallelize independent reads when exploring related files.
5
- - You SHOULD reach for `read` not a browser/puppeteer tool for web content; browser only when `read` cannot deliver it.
4
+ - SHOULD parallelize independent reads.
5
+ - SHOULD use `read` (not a browser tool) for web content; browser only when `read` can't deliver.
6
6
  </instruction>
7
7
 
8
8
  ## Parameters
9
9
 
10
- - `path` — required. Local path, internal URI (`skill://`, `agent://`, `artifact://`, `history://`, `memory://`, `rule://`, `local://`, `vault://`, `mcp://`, `omp://`, `issue://`, `pr://`), or URL. Append `:<sel>` for line ranges or special modes (e.g. `src/foo.ts:50-200`, `src/foo.ts:raw`, `db.sqlite:users:42`).
10
+ - `path` — required. Local path, internal URI (`skill://`, `agent://`, `artifact://`, `history://`, `memory://`, `rule://`, `local://`, `vault://`, `mcp://`, `omp://`, `issue://`, `pr://`), or URL. Append `:<sel>` for ranges/modes (e.g. `src/foo.ts:50-200`, `src/foo.ts:raw`, `db.sqlite:users:42`).
11
11
 
12
12
  ## Selectors
13
13
 
14
- Append `:<sel>` to `path`; bare path = default mode.
15
-
16
14
  - _(none)_ — parseable code → structural summary; other files → from start (up to {{DEFAULT_LIMIT}} lines).
17
15
  - `:50` / `:50-` — from line 50 onward.
18
16
  - `:50-200` — lines 50–200 inclusive.
19
- - `:50+150` — 150 lines starting at 50.
20
- - `:20+1` — anchor line 20 (single-range reads pad ≤1 leading / ≤3 trailing context lines).
21
- - `:5-16,960-973` — multiple ranges in one call (sorted, overlaps merged); exact bounds, no padding.
22
- - `:raw` — verbatim; no anchors, no summary, no line prefixes.
23
- - `:2-4:raw` / `:raw:2-4` — range AND verbatim; compose in either order.
17
+ - `:50+150` — 150 lines from 50.
18
+ - `:20+1` — anchor line 20.
19
+ - `:5-16,960-973` — multiple ranges in one call.
20
+ - `:raw` — verbatim; no anchors/summary/line prefixes.
21
+ - `:2-4:raw` / `:raw:2-4` — range AND verbatim; either order.
24
22
  - `:conflicts` — one line per unresolved git merge conflict block.
25
23
 
26
24
  # Files
27
25
 
28
- - Directory path → depth-limited dirent listing.
26
+ - Directory → depth-limited dirent listing.
29
27
  {{#if IS_HL_MODE}}
30
- - File with explicit selector → snapshot tag header + numbered lines: `[src/foo.ts#1A2B]` then `41:def alpha():`. Copy the `[PATH#TAG]` header for anchored edits; ops use bare line numbers. NEVER fabricate the tag.
28
+ - File + selector → snapshot tag header + numbered lines: `[src/foo.ts#1A2B]` then `41:def alpha():`. Copy `[PATH#TAG]` for anchored edits; ops use bare line numbers. NEVER fabricate the tag.
31
29
  {{else}}
32
30
  {{#if IS_LINE_NUMBER_MODE}}
33
- - File with explicit selector → lines prefixed with numbers: `41|def alpha():`.
31
+ - File + selector → numbered lines: `41|def alpha():`.
34
32
  {{/if}}
35
33
  {{/if}}
36
- - Parseable code without selector → **structural summary**: declarations kept, body elided with `…`. The footer shows the recovery selector. Re-issue ONLY the ranges you need via the multi-range selector.
34
+ - Parseable code, no selector → **structural summary**: declarations kept, body elided with `…`. Footer names the recovery selector; re-issue ONLY the ranges you need.
37
35
 
38
36
  # Documents & Notebooks
39
37
 
40
- PDF, Word, PowerPoint, Excel, RTF, EPUB → extracted text. Notebooks (`.ipynb`) → editable `# %% [type] cell:N` text; edits round-trip to the underlying JSON preserving metadata. `:raw` bypasses the converter.
38
+ PDF, Word, PowerPoint, Excel, RTF, EPUB → extracted text. Notebooks (`.ipynb`) → editable `# %% [type] cell:N` text. `:raw` bypasses the converter.
41
39
 
42
40
  # Images
43
41
 
44
42
  {{#if INSPECT_IMAGE_ENABLED}}
45
- Image path → metadata (mime, bytes, dimensions, channels, alpha). For visual analysis, call `inspect_image` with the path and a question.
43
+ Image → metadata. Visual analysis: call `inspect_image` with the path and a question.
46
44
  {{else}}
47
- Image path → decoded image inline (PNG, JPEG, GIF, WEBP) for direct visual analysis.
45
+ Image → decoded inline (PNG, JPEG, GIF, WEBP) for direct visual analysis.
48
46
  {{/if}}
49
47
 
50
48
  # Archives
@@ -63,16 +61,16 @@ For `.sqlite`, `.sqlite3`, `.db`, `.db3`:
63
61
 
64
62
  # URLs
65
63
 
66
- - Reader-mode by default: HTML, GitHub issues/PRs, Stack Overflow, Wikipedia, Reddit, NPM, arXiv, RSS/Atom, JSON endpoints, PDFs → clean text/markdown.
67
- - `:raw` → untouched HTML; line selectors (`:50`, `:50-100`, `:50+150`) paginate the cached fetch.
68
- - Bare `host:port` collides with the selector grammar — add a trailing slash: `https://example.com/:80`.
64
+ - Reader-mode default: HTML, GitHub issues/PRs, Stack Overflow, Wikipedia, Reddit, NPM, arXiv, RSS/Atom, JSON endpoints, PDFs → clean text/markdown.
65
+ - `:raw` → untouched HTML; line selectors (`:50`, `:50-100`, `:50+150`) paginate the fetch.
66
+ - Bare `host:port` collides with selector grammar — add a trailing slash: `https://example.com/:80`.
69
67
 
70
68
  # Internal URIs
71
69
 
72
- All `path` URI schemes resolve transparently and take the same line selectors. `artifact://<id>` recovers full output a previous bash/eval/tool result spilled or truncated. `history://<agentId>` is an agent's transcript as concise markdown; bare `history://` lists agents.
70
+ All URI schemes take the same line selectors. `artifact://<id>` recovers full output a bash/eval/tool result spilled or truncated. `history://<agentId>` = agent transcript; bare `history://` lists agents.
73
71
 
74
72
  <critical>
75
- - You MUST use `read` for every file, directory, archive, and URL inspection. `cat`, `head`, `tail`, `less`, `more`, `ls`, `tar`, `unzip`, `curl`, `wget` are FORBIDDEN bash calls, however short or convenient.
73
+ - MUST use `read` for every file/directory/archive/URL inspection. `cat`, `head`, `tail`, `less`, `more`, `ls`, `tar`, `unzip`, `curl`, `wget` are FORBIDDEN bash calls, however convenient.
76
74
  - Line ranges go in the selector (`path="src/foo.ts:50-200"`) — NEVER `sed -n`, `awk NR`, or `head`/`tail` pipelines.
77
75
  - Summary footer names elided ranges? Re-issue ONLY those ranges. NEVER guess `..`/`…` content.
78
76
  </critical>
@@ -1,7 +1,6 @@
1
1
  Performs string replacements in files with fuzzy whitespace matching.
2
2
 
3
3
  <instruction>
4
- - Params MUST be `{ path, edits }`; `path` is required at the top level and applies to every replacement
5
4
  - You MUST use the smallest `old_text` that uniquely identifies the change
6
5
  - If `old_text` is not unique, you MUST expand it with more context or use `all: true` to replace all occurrences
7
6
  - You SHOULD prefer editing existing files over creating new ones
@@ -1,9 +1,4 @@
1
- Resolves a pending action by either applying or discarding it.
2
- - `action` is required:
3
- - `"apply"` persists / submits the pending action.
4
- - `"discard"` rejects the pending action.
5
- - `reason` is required: one short complete sentence explaining why, starting with a capital letter and ending with a period.
6
- - `extra` (optional) is free-form metadata passed to the resolving tool. When the pending action is a plan-approval gate, supply `extra.title` (kebab/PascalCase slug for the approved plan filename). For preview-style pending actions (e.g. `ast_edit`), `extra` is unused.
7
-
8
- Valid whenever a pending action exists — either a preview-style staging (e.g. `ast_edit`) or a long-lived approval gate.
9
- Call fails with an error when no pending action exists.
1
+ Resolves a pending action apply or discard. Valid only when a pending action exists; errors otherwise.
2
+ - `action` (required): `"apply"` persists/submits; `"discard"` rejects.
3
+ - `reason` (required): one short sentence explaining why.
4
+ - `extra` (optional): free-form metadata. Plan-approval gate? Supply `extra.title` (kebab/PascalCase slug = approved plan filename). Unused for preview actions (e.g. `ast_edit`).
@@ -3,7 +3,7 @@ End an active checkpoint. Rewind context to it, replacing intermediate explorati
3
3
  Call immediately after `checkpoint`-started investigative work.
4
4
 
5
5
  Requirements:
6
- - `report` is REQUIRED and MUST be concise, factual, and actionable.
6
+ - `report` MUST be concise, factual, and actionable.
7
7
  - Include key findings, decisions, and any unresolved risks.
8
8
  - AVOID raw scratch logs unless essential.
9
9
  - You MUST call this before yielding if a checkpoint is active.