You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(docs[_ext]): Add {toolref} role — code-linked tool refs without badge
why: {ref} renders as plain text (Sphinx hardcodes nodes.inline in
build_reference_node). {tool} renders as code+badge. Needed a middle
ground: code-formatted linked tool names without badges for dense
contexts like tables and inline prose.
what:
- Add {toolref} role: resolves same labels as {tool}, renders as
<code> inside <a>, no safety badge
- Reuse _tool_ref_placeholder with show_badge=False
- Update prompting.md tables and heuristics to use {toolref}
Copy file name to clipboardExpand all lines: docs/topics/prompting.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,12 @@ These natural-language prompts reliably trigger the right tool sequences:
34
34
35
35
| Prompt | Agent interprets as |
36
36
|--------|-------------------|
37
-
| "Run `pytest` in my build pane and show results" | {tool}`send-keys` → {tool}`wait-for-text` → {tool}`capture-pane`|
38
-
| "Start the dev server and wait until it's ready" | {tool}`send-keys` → {tool}`wait-for-text` (for "listening on") |
39
-
| "Check if any pane has errors" | {tool}`search-panes` with pattern "error" |
40
-
| "Set up a workspace with editor, server, and tests" | {tool}`create-session` → {tool}`split-window` (x2) → {tool}`set-pane-title` (x3) |
41
-
| "What's running in my tmux sessions?" | {tool}`list-sessions` → {tool}`list-panes` → {tool}`capture-pane`|
42
-
| "Kill the old workspace session" | {tool}`kill-session` (after confirming target) |
37
+
| "Run `pytest` in my build pane and show results" | {toolref}`send-keys` → {toolref}`wait-for-text` → {toolref}`capture-pane`|
38
+
| "Start the dev server and wait until it's ready" | {toolref}`send-keys` → {toolref}`wait-for-text` (for "listening on") |
39
+
| "Check if any pane has errors" | {toolref}`search-panes` with pattern "error" |
40
+
| "Set up a workspace with editor, server, and tests" | {toolref}`create-session` → {toolref}`split-window` (x2) → {toolref}`set-pane-title` (x3) |
41
+
| "What's running in my tmux sessions?" | {toolref}`list-sessions` → {toolref}`list-panes` → {toolref}`capture-pane`|
42
+
| "Kill the old workspace session" | {toolref}`kill-session` (after confirming target) |
43
43
44
44
## Anti-patterns to avoid
45
45
@@ -85,8 +85,8 @@ that depend on it.
85
85
86
86
When an agent is unsure which tool to use, these rules help:
87
87
88
-
1.**Discovery first**: Call {tool}`list-sessions` or {tool}`list-panes` before acting on specific targets
88
+
1.**Discovery first**: Call {toolref}`list-sessions` or {toolref}`list-panes` before acting on specific targets
89
89
2.**Prefer IDs**: Once you have a `pane_id`, use it for all subsequent calls — it never changes during the pane's lifetime
90
-
3.**Wait, don't poll**: Use {tool}`wait-for-text` instead of repeatedly calling {tool}`capture-pane` in a loop
91
-
4.**Content vs. metadata**: If looking for text *in* a terminal, use {tool}`search-panes`. If looking for pane *properties* (name, PID, path), use {tool}`list-panes` or {tool}`get-pane-info`
90
+
3.**Wait, don't poll**: Use {toolref}`wait-for-text` instead of repeatedly calling {toolref}`capture-pane` in a loop
91
+
4.**Content vs. metadata**: If looking for text *in* a terminal, use {toolref}`search-panes`. If looking for pane *properties* (name, PID, path), use {toolref}`list-panes` or {toolref}`get-pane-info`
92
92
5.**Destructive tools are opt-in**: Never kill sessions, windows, or panes unless the user explicitly asks
0 commit comments