Repository navigation
docs(prompting): activation, alwaysLoad, and project-bias template - #39
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
=======================================
Coverage 84.91% 84.91%
=======================================
Files 40 40
Lines 2294 2294
Branches 294 294
=======================================
Hits 1948 1948
Misses 261 261
Partials 85 85 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0e9c7c3 to
bd8e9c4
Compare
Code reviewRetracted. This comment was based on a hallucinated finding. The local
The CLI auto-detects the scope, so the migration command does not silently no-op. Apologies for the noise. The migration paragraph the comment referred to has also been removed from the README in the latest fixup; migration content will live in a dedicated |
899ea9c to
38abd46
Compare
Code reviewNo issues found. Re-checked the latest delta for bugs and AGENTS.md compliance. |
38abd46 to
c9b4127
Compare
bb1c635 to
d6099d6
Compare
c9b4127 to
ec74b07
Compare
d6099d6 to
43a2832
Compare
ec74b07 to
12e8fce
Compare
Earlier docs and the install widget recommended registering this
server as `libtmux`. Going forward the recommended slug is `tmux`,
matching `serverInfo.name` returned in the MCP handshake and the
`mcp__tmux__*` tool prefix that clients namespace tool calls under.
Existing `libtmux` registrations continue to work — the slug is a
per-install user choice.
- **Install widget + {ref}`clients` page**: every CLI snippet and
JSON example now shows `tmux` as the slug. AGENTS.md examples
follow.
- **New {ref}`migration` page**: root `MIGRATION` file with a
Sphinx wrapper at `docs/migration.md`, wired into the toctree.
Documents the rename and serves as the home for future migration
notes. {ref}`clients` cross-references it.
- **`mcp_swap.py` retains `libtmux` as default**: existing local-
development users keep `mcp_swap use-local` working in place.
Pass `--server tmux` to target a fresh-install registration.
Behavior is documented in `resolve_repo_meta`'s docstring and
in `test_resolve_repo_meta_strips_mcp_suffix`.
What's unchanged: PyPI package name (`libtmux-mcp`), Python module
(`libtmux_mcp`), and existing `mcp__libtmux__*` references in
template files / agent histories — all continue to work for users
who keep the `libtmux` slug.
See also: #37 (the `serverInfo.name="tmux"` change this slug
recommendation aligns with), #39 (prompting-guide companion docs).
why: the most-frequent question this server gets is "when does the
agent actually pick libtmux-mcp on bare 'pane' / 'window' / 'session'
without me saying tmux?". The existing docs/topics/prompting.md
covers server-injected instructions and prompt patterns but didn't
explicitly answer the activation/discovery question or document the
Claude Code-specific `alwaysLoad` lever.
This belongs alongside the other prompting guidance, not in the
README. The README stays focused on quickstart + setup; the agent
prompting guide is where activation mechanics, alwaysLoad opt-in,
and project-instructions templates live.
what:
- New "## Activation and discovery" section in docs/topics/prompting.md
with positive/anti-trigger prose and an "Always-on tool listing"
subsection covering the Claude Code v2.1.121+ `alwaysLoad: true`
JSON snippet and its ~3-5K token cost.
- New "### To bias activation on bare 'pane' / 'window' / 'session'"
template under the existing "## System prompt fragments" section.
Notes that AGENTS.md / CLAUDE.md / equivalent project-instructions
files compose into the system prompt at higher priority than the
MCP server's `instructions` block.
- Cross-reference to the existing concepts.md "Agent self-awareness"
section for the inside-tmux $TMUX_PANE auto-detection note —
avoids duplicating content already in the docs.
- {toolref}`...` markers used for tool references so they resolve to
rendered tool docs in Sphinx.
Adds an unreleased "Documentation" bullet for the new "Activation and discovery" section in docs/topics/prompting.md and the project-bias template under "System prompt fragments".
12e8fce to
2ea6203
Compare
why: pygments 2.21.0 makes HtmlFormatter render `"` and `'` literally instead of `"` and `'` (pygments#3185), so the recorded fragment for the uvx MCP config stopped matching. This lands as its own commit because the dev-package refresh that raised pygments does not mention it: the failure surfaced after that commit was already pushed. Comparing the two revisions line by line, every difference is exactly that one substitution - same tokens, same span classes, same whitespace, four lines. Rendered output is unchanged, since inside element text content `"` and `"` are equivalent; the escaping was only ever required inside attribute values. Verified by pinning pygments back to 2.20.0, where the old snapshot passes, and forward to 2.21.0, where only this substitution differs. what: - Re-record highlight_json-mcp-config-uvx against pygments 2.21.0 See also: pygments/pygments#3185
why: pygments 2.21.0 makes HtmlFormatter render `"` and `'` literally instead of `"` and `'` (pygments#3185), so the recorded fragment for the uvx MCP config stopped matching. This lands as its own commit because the dev-package refresh that raised pygments does not mention it: the failure surfaced after that commit was already pushed. Comparing the two revisions line by line, every difference is exactly that one substitution - same tokens, same span classes, same whitespace, four lines. Rendered output is unchanged, since inside element text content `"` and `"` are equivalent; the escaping was only ever required inside attribute values. Verified by pinning pygments back to 2.20.0, where the old snapshot passes, and forward to 2.21.0, where only this substitution differs. what: - Re-record highlight_json-mcp-config-uvx against pygments 2.21.0 See also: pygments/pygments#3185
Summary
Documents activation/discovery behavior in the existing agent prompting guide (
docs/topics/prompting.md):alwaysLoad: trueJSON snippet at the server-entry level (Claude Code v2.1.121+) for users who want all 51 schemas preloaded; ~3-5K token cost notedAGENTS.md/CLAUDE.md/ equivalent project-instructions files compose into the system prompt at higher priority than the MCP server'sinstructions=block, making this the highest-leverage user-side lever for "current window" anaphoraThe inside-tmux
$TMUX_PANEauto-detection note is not duplicated — it's already covered bydocs/topics/concepts.md"Agent self-awareness" and is cross-referenced.The server-side mechanism (
alwaysLoadmeta hint on three discovery anchors, BM25 description tuning,serverInfo.name="tmux") lives on PR #37 (pane-discoverability). This PR is the user-facing companion documentation; merge after #37 so the prose describes shipped behavior.Test plan
uv run ruff check . && uv run mypy && uv run py.test -q(428 passed)just build-docs(50 warnings — matches origin/main baseline; no new warnings from{ref}conceptsor{toolref}...cross-references)