@oh-my-pi/pi-coding-agent 10.2.1 → 10.2.3

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 (67) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/package.json +7 -7
  3. package/src/commit/agentic/prompts/analyze-file.md +7 -7
  4. package/src/commit/agentic/prompts/session-user.md +4 -4
  5. package/src/commit/agentic/prompts/system.md +14 -16
  6. package/src/commit/prompts/analysis-system.md +7 -9
  7. package/src/commit/prompts/analysis-user.md +0 -3
  8. package/src/commit/prompts/changelog-system.md +14 -19
  9. package/src/commit/prompts/file-observer-system.md +2 -2
  10. package/src/commit/prompts/reduce-system.md +13 -23
  11. package/src/commit/prompts/summary-system.md +7 -21
  12. package/src/config/settings-schema.ts +135 -38
  13. package/src/cursor.ts +2 -1
  14. package/src/debug/index.ts +1 -1
  15. package/src/debug/report-bundle.ts +1 -1
  16. package/src/extensibility/extensions/index.ts +0 -11
  17. package/src/extensibility/extensions/types.ts +1 -30
  18. package/src/extensibility/hooks/types.ts +1 -31
  19. package/src/index.ts +0 -11
  20. package/src/ipy/prelude.py +1 -113
  21. package/src/lsp/index.ts +66 -515
  22. package/src/lsp/render.ts +0 -11
  23. package/src/lsp/types.ts +3 -87
  24. package/src/modes/components/settings-defs.ts +3 -2
  25. package/src/modes/components/settings-selector.ts +14 -14
  26. package/src/modes/interactive-mode.ts +5 -5
  27. package/src/modes/theme/theme.ts +45 -1
  28. package/src/prompts/agents/designer.md +23 -27
  29. package/src/prompts/agents/explore.md +28 -38
  30. package/src/prompts/agents/init.md +17 -17
  31. package/src/prompts/agents/plan.md +21 -27
  32. package/src/prompts/agents/reviewer.md +37 -37
  33. package/src/prompts/compaction/branch-summary.md +9 -9
  34. package/src/prompts/compaction/compaction-summary.md +8 -12
  35. package/src/prompts/compaction/compaction-update-summary.md +17 -19
  36. package/src/prompts/review-request.md +12 -13
  37. package/src/prompts/system/custom-system-prompt.md +6 -26
  38. package/src/prompts/system/plan-mode-active.md +23 -35
  39. package/src/prompts/system/plan-mode-subagent.md +7 -7
  40. package/src/prompts/system/subagent-system-prompt.md +7 -7
  41. package/src/prompts/system/system-prompt.md +84 -125
  42. package/src/prompts/system/web-search.md +10 -10
  43. package/src/prompts/tools/ask.md +12 -15
  44. package/src/prompts/tools/bash.md +7 -7
  45. package/src/prompts/tools/exit-plan-mode.md +6 -6
  46. package/src/prompts/tools/gemini-image.md +4 -4
  47. package/src/prompts/tools/grep.md +4 -4
  48. package/src/prompts/tools/lsp.md +12 -19
  49. package/src/prompts/tools/patch.md +26 -30
  50. package/src/prompts/tools/python.md +14 -57
  51. package/src/prompts/tools/read.md +4 -4
  52. package/src/prompts/tools/replace.md +8 -8
  53. package/src/prompts/tools/ssh.md +14 -27
  54. package/src/prompts/tools/task.md +23 -35
  55. package/src/prompts/tools/todo-write.md +29 -38
  56. package/src/prompts/tools/write.md +3 -3
  57. package/src/sdk.ts +0 -2
  58. package/src/session/agent-session.ts +27 -6
  59. package/src/system-prompt.ts +1 -219
  60. package/src/task/agents.ts +2 -1
  61. package/src/tools/bash-interceptor.ts +0 -24
  62. package/src/tools/bash.ts +1 -7
  63. package/src/tools/index.ts +8 -3
  64. package/src/tools/read.ts +74 -17
  65. package/src/tools/renderers.ts +0 -2
  66. package/src/lsp/rust-analyzer.ts +0 -184
  67. package/src/tools/ls.ts +0 -307
@@ -1,38 +1,35 @@
1
1
  # Ask
2
2
 
3
- Ask the user a question when you need clarification or input during task execution.
3
+ Ask user when you need clarification or input during task execution.
4
4
 
5
5
  <conditions>
6
6
  - Clarify ambiguous requirements before implementing
7
7
  - Get decisions on implementation approach when multiple valid options exist
8
- - Request user preferences (styling, naming conventions, architecture patterns)
8
+ - Request preferences (styling, naming conventions, architecture patterns)
9
9
  - Offer meaningful choices about task direction
10
10
  </conditions>
11
11
 
12
12
  <instruction>
13
- - Use `recommended: <index>` to mark the default option (0-indexed); " (Recommended)" suffix is added automatically
14
- - Use `questions` array for multiple related questions instead of asking one at a time
15
- - Set `multi: true` on a question to allow multiple selections
13
+ - Use `recommended: <index>` to mark default (0-indexed); " (Recommended)" added automatically
14
+ - Use `questions` for multiple related questions instead of asking one at a time
15
+ - Set `multi: true` on question to allow multiple selections
16
16
  </instruction>
17
17
 
18
18
  <output>
19
- Returns user's selected option(s) as text. For multi-part questions, returns a map of question IDs to selected values.
19
+ Returns selected option(s) as text. For multi-part questions, returns map of question IDs to selected values.
20
20
  </output>
21
21
 
22
22
  <important>
23
23
  - Provide 2-5 concise, distinct options
24
- - Users can always select "Other" for custom input (UI adds this automatically)
25
24
  </important>
26
25
 
27
26
  <critical>
28
- **Exhaust all other options before asking.** Questions interrupt user flow.
29
- 1. **Unknown file location?** → Search with grep/find first. Only ask if search fails.
30
- 2. **Ambiguous syntax/format?** → Infer from context and codebase conventions. Make a reasonable choice.
31
- 3. **Missing details?** → Check docs, related files, commit history. Fill gaps yourself.
32
- 4. **Implementation approach?** → Choose based on codebase patterns. Ask only for genuinely novel architectural decisions.
33
-
34
- If you can make a reasonable inference from the user's request, **do it**. Users communicate intent, not specifications—your job is to translate intent into correct implementation.
35
- **Do NOT include an "Other" option in your options array.** The UI automatically adds "Other (type your own)" to every question. Adding your own creates duplicates.
27
+ **Exhaust all other options before asking.**
28
+ 1. **Unknown file location?** → Search with grep/find first; ask only if search fails.
29
+ 2. **Ambiguous syntax/format?** → Infer from context and codebase conventions; make reasonable choice.
30
+ 3. **Missing details?** → Check docs, related files, commit history; fill gaps yourself.
31
+ 4. **Implementation approach?** → Choose based on codebase patterns; ask only for genuinely novel architectural decisions.
32
+ **Do NOT include "Other" option in your options array.** UI automatically adds "Other (type your own)" to every question; adding your own creates duplicates.
36
33
  </critical>
37
34
 
38
35
  <example name="single">
@@ -1,6 +1,6 @@
1
1
  # Bash
2
2
 
3
- Executes a bash command in a shell session for terminal operations like git, bun, cargo, python.
3
+ Executes bash command in shell session for terminal operations like git, bun, cargo, python.
4
4
 
5
5
  <instruction>
6
6
  - Use `cwd` parameter to set working directory instead of `cd dir && ...`
@@ -11,9 +11,9 @@ Executes a bash command in a shell session for terminal operations like git, bun
11
11
  </instruction>
12
12
 
13
13
  <output>
14
- Returns stdout, stderr, and exit code from command execution.
15
- - Output truncated after 50KB or 2000 lines (whichever comes first); use `head` parameter to limit output
16
- - If output is truncated, full output is stored under $ARTIFACTS and referenced as `artifact://<id>` in metadata
14
+ Returns stdout, stderr, exit code from command execution.
15
+ - Output truncated after 50KB or 2000 lines (whichever first); use `head` parameter to limit output
16
+ - If output truncated, full output stored under $ARTIFACTS and referenced as `artifact://<id>` in metadata
17
17
  - Exit codes shown on non-zero exit; stderr captured
18
18
  </output>
19
19
 
@@ -27,11 +27,11 @@ Do NOT use Bash for these operations—specialized tools exist:
27
27
  </critical>
28
28
 
29
29
  <avoid>
30
- Do NOT pipe through `head` or `tail`—use the `head` and `tail` parameters instead:
30
+ Do NOT pipe through `head` or `tail`—use `head` and `tail` parameters instead:
31
31
  - `command | head -n 50` → use `head: 50` parameter
32
32
  - `command | tail -n 100` → use `tail: 100` parameter
33
33
 
34
- The pipe pattern breaks streaming output and prevents artifact storage.
34
+ Pipe pattern breaks streaming output and prevents artifact storage.
35
35
 
36
- Do NOT use `2>&1`—stdout and stderr are already merged.
36
+ Do NOT use `2>&1`—stdout and stderr already merged.
37
37
  </avoid>
@@ -1,15 +1,15 @@
1
- Signals plan completion and requests user approval to begin implementation.
1
+ Signals plan completion, requests user approval to begin implementation.
2
2
 
3
3
  <conditions>
4
4
  Use when:
5
- - Plan is written to the plan file
5
+ - Plan written to plan file
6
6
  - No unresolved questions about requirements or approach
7
- - Ready for user to review and approve
7
+ - Ready for user review and approval
8
8
  </conditions>
9
9
 
10
10
  <instruction>
11
- - Write your plan to the plan file BEFORE calling this tool
12
- - This tool reads the plan from that file—does not take plan content as parameter
11
+ - Write plan to plan file BEFORE calling this tool
12
+ - Tool reads plan from file—does not take plan content as parameter
13
13
  - User sees plan contents when reviewing
14
14
  </instruction>
15
15
 
@@ -28,7 +28,7 @@ Unsure about auth method (OAuth vs JWT).
28
28
  </example>
29
29
 
30
30
  <avoid>
31
- - Calling before plan is written to file
31
+ - Calling before plan written to file
32
32
  - Using `ask` to request plan approval (this tool does that)
33
33
  - Calling after pure research tasks (no implementation planned)
34
34
  </avoid>
@@ -3,21 +3,21 @@
3
3
  Generate or edit images using Gemini image models.
4
4
 
5
5
  <instruction>
6
- Provide structured parameters for best results. The tool assembles them into an optimized prompt.
6
+ Provide structured parameters for best results. Tool assembles into optimized prompt.
7
7
 
8
- When using multiple `input_images`, describe each image's role in the `subject` or `scene` field:
8
+ When using multiple `input_images`, describe each image's role in `subject` or `scene` field:
9
9
  - "Use Image 1 for the character's face and outfit, Image 2 for the pose, Image 3 for the background environment"
10
10
  - "Match the color palette from Image 1, apply the lighting style from Image 2"
11
11
  </instruction>
12
12
 
13
13
  <output>
14
- Returns the generated image saved to disk. The response includes the file path where the image was written.
14
+ Returns generated image saved to disk. Response includes file path where image was written.
15
15
  </output>
16
16
 
17
17
  <important>
18
18
  - For photoreal: add "ultra-detailed, realistic, natural skin texture" to style
19
19
  - For posters/cards: use 9:16 aspect ratio with negative space for text placement
20
- - For iteration: use `changes` to make targeted adjustments rather than regenerating from scratch
20
+ - For iteration: use `changes` for targeted adjustments rather than regenerating from scratch
21
21
  - For text: add "sharp, legible, correctly spelled" for important text; keep text short
22
22
  - For diagrams: include "scientifically accurate" in style and provide facts explicitly
23
23
  </important>
@@ -1,6 +1,6 @@
1
1
  # Grep
2
2
 
3
- A powerful search tool built on ripgrep.
3
+ Powerful search tool built on ripgrep.
4
4
 
5
5
  <instruction>
6
6
  - Supports full regex syntax (e.g., `log.*Error`, `function\\s+\\w+`)
@@ -15,12 +15,12 @@ Results depend on `output_mode`:
15
15
  - `files_with_matches`: File paths only (one per line)
16
16
  - `count`: Match counts per file
17
17
 
18
- In `content` mode, truncated at 100 matches by default (configurable via `limit`).
19
- For `files_with_matches` and `count` modes, use `limit` to truncate results.
18
+ In `content` mode, truncated at 100 matches default (configurable via `limit`).
19
+ For `files_with_matches` and `count` modes, use `limit` truncate results.
20
20
  </output>
21
21
 
22
22
  <critical>
23
- - ALWAYS use Grep for search tasks—NEVER invoke `grep` or `rg` via Bash. This tool has correct permissions and access.
23
+ - ALWAYS use Grep for search tasks—NEVER invoke `grep` or `rg` via Bash. Has correct permissions and access.
24
24
  </critical>
25
25
 
26
26
  <avoid>
@@ -3,33 +3,26 @@
3
3
  Interact with Language Server Protocol servers for code intelligence.
4
4
 
5
5
  <operations>
6
- - `diagnostics`: Get errors/warnings for a file
7
- - `workspace_diagnostics`: Check entire project (uses tsc, cargo check, go build, etc.)
8
6
  - `definition`: Go to symbol definition
9
- - `references`: Find all references to a symbol
7
+ - `references`: Find all references to symbol
10
8
  - `hover`: Get type info and documentation
11
- - `symbols`: List symbols in a file (functions, classes, etc.)
12
- - `workspace_symbols`: Search for symbols across the project
13
- - `rename`: Rename a symbol across the codebase
14
- - `actions`: List and apply code actions (quick fixes, refactors)
15
- - `incoming_calls`: Find all callers of a function
16
- - `outgoing_calls`: Find all functions called by a function
9
+ - `symbols`: List symbols in file, or search workspace (with query, no file)
10
+ - `rename`: Rename symbol across codebase
11
+ - `diagnostics`: Get errors/warnings for file, or check entire project (no file)
12
+ - `reload`: Restart the language server
17
13
  </operations>
18
14
 
19
15
  <output>
20
- Returns vary by operation:
21
- - `diagnostics`/`workspace_diagnostics`: List of errors/warnings with file, line, severity, message
22
- - `definition`: File path and position of the definition
23
- - `references`: List of locations (file + position) where symbol is used
16
+ - `definition`: File path and position of definition
17
+ - `references`: List of locations (file + position) where symbol used
24
18
  - `hover`: Type signature and documentation text
25
- - `symbols`/`workspace_symbols`: List of symbol names, kinds, and locations
19
+ - `symbols`: List of symbol names, kinds, locations
26
20
  - `rename`: Confirmation of changes made across files
27
- - `actions`: List of available code actions; when applied, returns the result
28
- - `incoming_calls`/`outgoing_calls`: Call hierarchy with caller/callee locations
21
+ - `diagnostics`: List of errors/warnings with file, line, severity, message
22
+ - `reload`: Confirmation of server restart
29
23
  </output>
30
24
 
31
25
  <important>
32
- - Requires a running LSP server for the target language
33
- - Some operations require the file to be saved to disk
34
- - `workspace_diagnostics` may be slow on large projects
26
+ - Requires running LSP server for target language
27
+ - Some operations require file to be saved to disk
35
28
  </important>
@@ -1,56 +1,54 @@
1
1
  # Edit
2
2
 
3
- Performs patch operations on a file given a diff. Primary tool for modifying existing files.
3
+ Patch operations on file given diff. Primary tool for existing-file edits.
4
4
 
5
5
  <instruction>
6
6
  **Hunk Headers:**
7
- - `@@` — bare header when context lines are already unique
8
- - `@@ $ANCHOR` — anchor must be copied verbatim from the file (full line or unique substring)
9
- **Anchor Selection Algorithm:**
10
- 1. If surrounding context lines are already unique, use bare `@@`
11
- 2. Otherwise choose a highly specific anchor copied from the file:
12
- - full function signature line
13
- - class declaration line
14
- - unique string literal / error message
7
+ - `@@` — bare header when context lines unique
8
+ - `@@ $ANCHOR` — anchor copied verbatim from file (full line or unique substring)
9
+ **Anchor Selection:**
10
+ 1. Otherwise choose highly specific anchor copied from file:
11
+ - full function signature
12
+ - class declaration
13
+ - unique string literal/error message
15
14
  - config key with uncommon name
16
- 3. If "Found multiple matches" error: add more context lines, use multiple hunks with separate anchors, or use a longer anchor substring
15
+ 2. On "Found multiple matches": add context lines, use multiple hunks with separate anchors, or use longer anchor substring
17
16
  **Context Lines:**
18
- - Include enough ` `-prefixed lines to make match unique (usually 2–8 total)
19
- - Must exist in the file exactly as written (preserve indentation/trailing spaces)
20
- - When editing structured blocks (nested braces, tags, indented regions), include opening and closing lines in context so the edit stays inside the block
17
+ Use enough ` `-prefixed lines to make match unique (usually 2–8)
18
+ When editing structured blocks (nested braces, tags, indented regions), include opening and closing lines so edit stays inside block
21
19
  </instruction>
22
20
 
23
21
  <parameters>
24
22
  ```ts
25
23
  type T =
26
- // Diff is one or more hunks, within the same file.
27
- // - Each hunk begins with "@@" (optionally with an anchor).
28
- // - Each hunk body contains only lines starting with: ' ' | '+' | '-'.
29
- // - Each hunk must include at least one real change (+ or -). No no-op hunks.
24
+ // Diff is one or more hunks in the same file.
25
+ // - Each hunk begins with "@@" (anchor optional).
26
+ // - Each hunk body only has lines starting with ' ' | '+' | '-'.
27
+ // - Each hunk includes at least one change (+ or -).
30
28
  | { path: string, op: "update", diff: string }
31
- // Diff is the full file content, no prefixes.
29
+ // Diff is full file content, no prefixes.
32
30
  | { path: string, op: "create", diff: string }
33
- // Omit diff for delete operation.
31
+ // No diff for delete.
34
32
  | { path: string, op: "delete" }
35
- // New path for update-and-move operation.
33
+ // New path for update+move.
36
34
  | { path: string, op: "update", rename: string, diff: string }
37
35
  ```
38
36
  </parameters>
39
37
 
40
38
  <output>
41
- Returns success/failure status. On failure, returns error message indicating:
39
+ Returns success/failure; on failure, error message indicates:
42
40
  - "Found multiple matches" — anchor/context not unique enough
43
41
  - "No match found" — context lines don't exist in file (wrong content or stale read)
44
42
  - Syntax errors in diff format
45
43
  </output>
46
44
 
47
45
  <critical>
48
- - Always read the target file before editing
46
+ - Always read target file before editing
49
47
  - Copy anchors and context lines verbatim (including whitespace)
50
- - Never use anchors as comments (no line numbers, location labels, or placeholders like `@@ @@`)
51
- - Do not place new lines outside the intended block unless that is the explicit goal
52
- - If an edit fails or produces broken structure, re-read the file and produce a new patch from current content—do not retry the same diff
53
- - If indentation is wrong after editing, run the project's formatter (if available) rather than making repeated edit attempts
48
+ - Never use anchors as comments (no line numbers, location labels, placeholders like `@@ @@`)
49
+ - Do not place new lines outside intended block
50
+ - If edit fails or breaks structure, re-read file and produce new patch from current content—do not retry same diff
51
+ - If indentation/alignment wrong after editing, run formatter (`go fmt`, `cargo fmt`, `ruff format`, `biome`, etc.)—never make repeated edit attempts to fix whitespace
54
52
  </critical>
55
53
 
56
54
  <example name="create">
@@ -71,8 +69,6 @@ edit {"path":"obsolete.txt","op":"delete"}
71
69
 
72
70
  <avoid>
73
71
  - Generic anchors: `import`, `export`, `describe`, `function`, `const`
74
- - Anchor comments: `line 207`, `top of file`, `near imports`, `...`
75
- - Editing without reading the file first (causes stale context errors)
76
- - Repeating the same addition in multiple hunks (creates duplicate blocks)
77
- - Falling back to full-file overwrites for minor changes (acceptable for major restructures or short files)
72
+ - Repeating same addition in multiple hunks (duplicate blocks)
73
+ - Full-file overwrites for minor changes (acceptable for major restructures or short files)
78
74
  </avoid>
@@ -1,19 +1,17 @@
1
1
  # Python
2
2
 
3
- Executes Python cells sequentially in a persistent IPython kernel.
3
+ Runs Python cells sequentially in persistent IPython kernel.
4
4
 
5
5
  <instruction>
6
- The kernel persists between calls and between cells. **Imports, variables, and functions survive.** Use this.
6
+ Kernel persists across calls and cells; **imports, variables, and functions survive—use this.**
7
7
  **Work incrementally:**
8
- - One logical step per cell (imports, define a function, test it, use it)
9
- - Pass multiple small cells in one call—they execute sequentially
8
+ - One logical step per cell (imports, define function, test it, use it)
9
+ - Pass multiple small cells in one call
10
10
  - Define small functions you can reuse and debug individually
11
- - Put explanations in the assistant message or cell title, **not** inside code
11
+ - Put explanations in assistant message or cell title, **not** in code
12
12
  **When something fails:**
13
- - The error tells you which cell failed (e.g., "Cell 3 failed")
14
- - Earlier cells already ran—their state persists in the kernel
15
- - Resubmit with only the fixed cell (or the fixed cell + remaining cells)
16
- - Do NOT rewrite working cells or re-import modules
13
+ - Errors tell you which cell failed (e.g., "Cell 3 failed")
14
+ - Resubmit only fixed cell (or fixed cell + remaining cells)
17
15
  </instruction>
18
16
 
19
17
  <prelude>
@@ -36,26 +34,23 @@ All helpers auto-print results and return values for chaining.
36
34
  </prelude>
37
35
 
38
36
  <output>
39
- Output streams in real time, truncated after 100KB.
40
- If output is truncated, full output is stored under $ARTIFACTS and referenced as `artifact://<id>` in metadata.
37
+ Streams in real time, truncated after 100KB; if truncated, full output stored under $ARTIFACTS and referenced as `artifact://<id>` in metadata.
41
38
 
42
- The user sees output like a Jupyter notebookrich displays are fully rendered:
39
+ User sees output like Jupyter notebook; rich displays render fully:
43
40
  - `display(JSON(data))` → interactive JSON tree
44
41
  - `display(HTML(...))` → rendered HTML
45
42
  - `display(Markdown(...))` → formatted markdown
46
43
  - `plt.show()` → inline figures
47
- **You will see object repr** (e.g., `<IPython.core.display.JSON object>`) **but the user sees the rendered output.** Trust that `display()` calls work correctly—do not assume the user sees only the repr.
44
+ **You will see object repr** (e.g., `<IPython.core.display.JSON object>`). Trust `display()`; do not assume user sees only repr.
48
45
  </output>
49
46
 
50
47
  <important>
51
- - Kernel persists for the session by default; per-call mode uses a fresh kernel each call
52
- - Use `reset: true` to clear state when session mode is active
48
+ - Per-call mode uses fresh kernel each call
49
+ - Use `reset: true` to clear state when session mode active
53
50
  </important>
54
51
 
55
52
  <critical>
56
- - Use `plt.show()` to display figures
57
- - Use `display()` from IPython.display for rich output (HTML, Markdown, images, etc.)
58
- - Use `sh()` or `run()` for shell commands, never raw `subprocess`
53
+ - Use `run()` for shell commands; never raw `subprocess`
59
54
  </critical>
60
55
 
61
56
  <example name="good">
@@ -68,42 +63,4 @@ cells: [
68
63
  {"title": "use helper", "code": "configs = [parse_config(p) for p in Path('.').glob('*.json')]"}
69
64
  ]
70
65
  ```
71
- </example>
72
-
73
- <example name="prelude-helpers">
74
- ```python
75
- # Concatenate all markdown files in docs/
76
- cat(*find("*.md", "docs"))
77
-
78
- # Mass rename: foo -> bar across all .py files
79
- rsed(r'\bfoo\b', 'bar', glob_pattern="*.py")
80
-
81
- # Process files in batch
82
- batch(find("*.json"), lambda p: json.loads(p.read_text()))
83
-
84
- # Sort and deduplicate lines
85
- sort_lines(read("data.txt"), unique=True)
86
-
87
- # Extract columns 0 and 2 from TSV
88
- cols(read("data.tsv"), 0, 2, sep="\t")
89
- ```
90
- </example>
91
-
92
- <example name="shell-commands">
93
- ```python
94
- # Good
95
- sh("bun run check")
96
- run("cargo build --release")
97
-
98
- # Bad - never use subprocess directly
99
- import subprocess
100
- subprocess.run(["bun", "run", "check"], ...)
101
- ```
102
- </example>
103
-
104
- <avoid>
105
- - Putting everything in one giant cell
106
- - Re-importing modules you already imported
107
- - Rewriting working cells when only one part failed
108
- - Large functions that are hard to debug piece by piece
109
- </avoid>
66
+ </example>
@@ -1,13 +1,13 @@
1
1
  # Read
2
2
 
3
- Reads files from the local filesystem or internal URLs.
3
+ Reads files from local filesystem or internal URLs.
4
4
 
5
5
  <instruction>
6
- - Reads up to {{DEFAULT_MAX_LINES}} lines by default
6
+ - Reads up to {{DEFAULT_MAX_LINES}} lines default
7
7
  - Use `offset` and `limit` for large files
8
- - Use `lines: true` to include line numbers
8
+ - Use `lines: true` include line numbers
9
9
  - Supports images (PNG, JPG) and PDFs
10
- - For directories, use the ls tool instead
10
+ - For directories, returns formatted listing with modification times
11
11
  - Parallelize reads when exploring related files
12
12
  - Supports internal URLs:
13
13
  - `skill://<name>` - read SKILL.md for a skill
@@ -1,26 +1,26 @@
1
1
  # Replace
2
2
 
3
- Performs string replacements in files with fuzzy whitespace matching.
3
+ String replacements in files with fuzzy whitespace matching.
4
4
 
5
5
  <instruction>
6
- - Use the smallest edit that uniquely identifies the change
7
- - If `old_text` is not unique, expand to include more context or use `all: true` to replace all occurrences
6
+ - Use smallest edit that uniquely identifies change
7
+ - If `old_text` not unique, expand to include more context or use `all: true` to replace all occurrences
8
8
  - Fuzzy matching handles minor whitespace/indentation differences automatically
9
9
  - Prefer editing existing files over creating new ones
10
10
  </instruction>
11
11
 
12
12
  <output>
13
- Returns success/failure status. On success, the file is modified in place with the replacement applied. On failure (e.g., `old_text` not found or matches multiple locations without `all: true`), returns an error describing the issue.
13
+ Returns success/failure status. On success, file modified in place with replacement applied. On failure (e.g., `old_text` not found or matches multiple locations without `all: true`), returns error describing issue.
14
14
  </output>
15
15
 
16
16
  <critical>
17
- - You must read the file at least once in the conversation before editing. The tool will error if you attempt an edit without reading the file first.
17
+ - Must read file at least once in conversation before editing. Tool errors if you attempt edit without reading file first.
18
18
  </critical>
19
19
 
20
20
  <bash*alternatives>
21
- Replace is for content-addressed changes—you identify \_what* to change by its text.
21
+ Replace for content-addressed changes—you identify \_what* to change by its text.
22
22
 
23
- For position-addressed or pattern-addressed changes, bash is more efficient:
23
+ For position-addressed or pattern-addressed changes, bash more efficient:
24
24
 
25
25
  |Operation|Command|
26
26
  |---|---|
@@ -33,6 +33,6 @@ For position-addressed or pattern-addressed changes, bash is more efficient:
33
33
  |Copy lines N-M to another file|`sed -n 'N,Mp' src >> dest`|
34
34
  |Move lines N-M to another file|`sed -n 'N,Mp' src >> dest && sed -i 'N,Md' src`|
35
35
 
36
- Use Replace when the _content itself_ identifies the location.
36
+ Use Replace when _content itself_ identifies location.
37
37
  Use bash when _position_ or _pattern_ identifies what to change.
38
38
  </bash_alternatives>
@@ -1,64 +1,51 @@
1
1
  # SSH
2
2
 
3
- Execute commands on remote SSH hosts.
3
+ Run commands on remote hosts.
4
4
 
5
5
  <instruction>
6
- 1. Check the host's shell type from "Available hosts" below
7
- 2. Use ONLY commands for that shell type
8
- 3. Construct your command using the reference below
6
+ Build commands from reference below
9
7
  </instruction>
10
8
 
11
9
  <commands>
12
- **linux/bash, linux/zsh, macos/bash, macos/zsh** — Unix-like systems:
10
+ **linux/bash, linux/zsh, macos/bash, macos/zsh** — Unix-like:
13
11
  - Files: `ls`, `cat`, `head`, `tail`, `grep`, `find`
14
- - System: `ps`, `top`, `df`, `uname`, `free` (Linux), `df`, `uname`, `top` (macOS)
12
+ - System: `ps`, `top`, `df`, `uname` (all), `free` (Linux only)
15
13
  - Navigation: `cd`, `pwd`
16
- **windows/bash, windows/sh** — Windows with Unix compatibility layer (WSL, Cygwin, Git Bash):
17
- - Files: `ls`, `cat`, `head`, `tail`, `grep`, `find`
18
- - System: `ps`, `top`, `df`, `uname`
19
- - Navigation: `cd`, `pwd`
20
- - Note: These are Windows hosts but use Unix commands
21
- **windows/powershell** — Native Windows PowerShell:
14
+ **windows/bash, windows/sh** — Windows Unix layer (WSL, Cygwin, Git Bash):
15
+ - Files/System/Navigation: same as Unix-like above, minus `free`
16
+ **windows/powershell** — PowerShell:
22
17
  - Files: `Get-ChildItem`, `Get-Content`, `Select-String`
23
18
  - System: `Get-Process`, `Get-ComputerInfo`
24
19
  - Navigation: `Set-Location`, `Get-Location`
25
- **windows/cmd** — Native Windows Command Prompt:
20
+ **windows/cmd** — Command Prompt:
26
21
  - Files: `dir`, `type`, `findstr`, `where`
27
22
  - System: `tasklist`, `systeminfo`
28
23
  - Navigation: `cd`, `echo %CD%`
29
24
  </commands>
30
25
 
31
26
  <output>
32
- Command output (stdout/stderr combined), truncated at 50KB. Exit code is captured.
33
- If output is truncated, full output is stored under $ARTIFACTS and referenced as `artifact://<id>` in metadata.
27
+ stdout/stderr combined, truncated at 50KB; exit code captured.
28
+ If truncated, full output stored under $ARTIFACTS as `artifact://<id>`.
34
29
  </output>
35
30
 
36
31
  <critical>
37
- Each host runs a specific shell. You MUST use commands native to that shell.
38
- Verify host shell type from "Available hosts" and use matching commands.
32
+ Verify shell type from "Available hosts", use matching commands.
39
33
  </critical>
40
34
 
41
35
  <example name="linux">
42
- Task: List files in /home/user on host "server1"
36
+ Task: List /home/user files on "server1"
43
37
  Host: server1 (10.0.0.1) | linux/bash
44
38
  Command: `ls -la /home/user`
45
39
  </example>
46
40
 
47
41
  <example name="windows-cmd">
48
- Task: Show running processes on host "winbox"
42
+ Task: Show running processes on "winbox"
49
43
  Host: winbox (192.168.1.5) | windows/cmd
50
44
  Command: `tasklist /v`
51
45
  </example>
52
46
 
53
- <example name="windows-wsl">
54
- Task: Check disk usage on host "wsl-dev"
55
- Host: wsl-dev (192.168.1.10) | windows/bash
56
- Command: `df -h`
57
- Note: Windows host with WSL — use Unix commands
58
- </example>
59
-
60
47
  <example name="macos">
61
- Task: Get system info on host "macbook"
48
+ Task: Get system info on "macbook"
62
49
  Host: macbook (10.0.0.20) | macos/zsh
63
50
  Command: `uname -a && sw_vers`
64
51
  </example>