Skip to content

Commit 759c816

Browse files
committed
docs: Add system-prompt fragment styling
Distinguish copyable instruction prose from regular code blocks. Uses {code-block} with :class: system-prompt — no custom directive. - Internal uppercase "SYSTEM PROMPT" whisper label - Softer dark panel (#1f2329) with translucent purple border - 3px left accent + 6px radius - pre-wrap for prose wrapping - Copy button background matches panel - 13px font for readability over code density
1 parent 42ce892 commit 759c816

2 files changed

Lines changed: 59 additions & 3 deletions

File tree

docs/_static/css/custom.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,56 @@ div.admonition.agent-thought > p:last-child {
246246
margin-bottom: 0;
247247
}
248248

249+
/* ── System prompt fragments ─────────────────────────────
250+
* Copyable instruction prose for AGENTS.md / CLAUDE.md.
251+
* Internal label row, softer dark panel, prose wrapping.
252+
* Keeps sphinx-copybutton via .highlight > pre selector.
253+
* ────────────────────────────────────────────────────────── */
254+
div.system-prompt {
255+
margin: 1.25rem 0;
256+
position: relative;
257+
}
258+
259+
div.system-prompt > div.highlight {
260+
background: #1f2329 !important;
261+
border: 1px solid color-mix(in srgb, var(--color-link) 20%, transparent);
262+
border-left: 3px solid var(--color-link);
263+
border-radius: 6px;
264+
position: relative;
265+
padding-top: 1.3rem;
266+
}
267+
268+
div.system-prompt > div.highlight > pre {
269+
background: transparent;
270+
font-size: 13px;
271+
line-height: 1.6;
272+
white-space: pre-wrap;
273+
word-break: break-word;
274+
}
275+
276+
/* Internal label — sits inside the block, not floating above */
277+
div.system-prompt > div.highlight::before {
278+
content: "System prompt";
279+
position: absolute;
280+
top: 0.45rem;
281+
left: 0.85rem;
282+
font-family: var(--font-stack);
283+
font-size: 0.55rem;
284+
font-weight: 500;
285+
letter-spacing: 0.05em;
286+
text-transform: uppercase;
287+
color: #9590b8;
288+
background: transparent;
289+
padding: 0;
290+
line-height: 1;
291+
opacity: 0.8;
292+
}
293+
294+
/* Fix copy button background to match panel */
295+
div.system-prompt .copybtn {
296+
background: #1f2329 !important;
297+
}
298+
249299
/* ── Image layout shift prevention ────────────────────────
250300
* Reserve space for images before they load. Furo already
251301
* sets max-width: 100%; height: auto on img. We add

docs/topics/prompting.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ Copy these into your agent's system instructions (`AGENTS.md`, `CLAUDE.md`, `.cu
5656

5757
### For general tmux workflows
5858

59-
```text
59+
```{code-block} text
60+
:class: system-prompt
61+
6062
When executing long-running commands (servers, builds, test suites),
6163
use tmux via the libtmux MCP server rather than running them directly.
6264
This keeps output accessible for later inspection. Use the pattern:
@@ -65,7 +67,9 @@ send_keys → wait_for_text (for completion signal) → capture_pane.
6567

6668
### For safe agent behavior
6769

68-
```text
70+
```{code-block} text
71+
:class: system-prompt
72+
6973
Before creating tmux sessions, check list_sessions to avoid duplicates.
7074
Always use pane_id for targeting — it is globally unique. Never run
7175
destructive operations (kill_session, kill_server) without confirming
@@ -74,7 +78,9 @@ the target with the user first.
7478

7579
### For development workflows
7680

77-
```text
81+
```{code-block} text
82+
:class: system-prompt
83+
7884
When the user asks you to run tests or start servers, use dedicated
7985
tmux panes. Split windows to run related processes side-by-side.
8086
Use wait_for_text to know when a server is ready before running tests

0 commit comments

Comments
 (0)