From 7f76061fbb6bf6fa982bc7508347d60b5ae340e4 Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Tue, 18 Aug 2026 02:07:09 +0600 Subject: [PATCH 1/6] chores: prompt + skills --- docs/how-to/customize-ai-instructions.md | 6 ++- .../templates/prompts/instructions.md.j2 | 38 ++++++++++++++++++- tests/test_prompts.py | 4 +- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/docs/how-to/customize-ai-instructions.md b/docs/how-to/customize-ai-instructions.md index 76301a0..996e0aa 100644 --- a/docs/how-to/customize-ai-instructions.md +++ b/docs/how-to/customize-ai-instructions.md @@ -12,10 +12,12 @@ Every section can be customised: | `intro` | The one-line description of what the server does | | `workflow` | How `show`, `screenshot`, `edit`, and `evaluate` relate, and that validation is automatic | | `file_policy` | Not writing visualization code out to files | -| `library_selection` | Which plotting libraries the AI should reach for | +| `library_selection` | Which plotting libraries the AI should reach for, and when to defer to the `developing-with-holoviz` skill | +| `extensions` | The `pn.extension(...)` substring-scan gotcha for non-Bokeh renderers | +| `security` | What snippet code must never do, regardless of how a request is framed | | `rendering` | Panel reactive patterns, and clients that link out instead of embedding | | `output` | How the returned URL is presented back to you | -| `errors` | What `SecurityError` and `ValidationError` mean | +| `errors` | What each error prefix (`[syntax]`, `[packages]`, etc.) means, plus the two silent failure modes | | `screenshot` | What the AI looks for in a screenshot, both when checking its own draft and when answering questions about a chart you already have | `library_selection` and `output` are the ones most people want; they are pure diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index 34a215e..96dc563 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -50,7 +50,29 @@ Also always available (no extra package needed): Other well-known libraries (Matplotlib, Plotly, seaborn, Altair) are installed ONLY when the optional 'pydata' dependencies are present, so they may be MISSING — prefer HoloViz. You do NOT need to check availability up front: if an import is not installed, -`show` returns the validation error — read it and rewrite using a HoloViz package.{% endblock %} +`show` returns the validation error — read it and rewrite using a HoloViz package. +If a `Skill` (or equivalent skill-search) tool is available, invoke the +`developing-with-holoviz` skill before writing HoloViz code — it covers plot APIs, +widget choice, and dashboard architecture in depth. This prompt only covers how to +execute code through THIS server; it is not a HoloViz reference.{% endblock %} + +{% block extensions %}EXTENSIONS: +A non-Bokeh renderer (Plotly, deck.gl, a Terminal pane, Tabulator, ECharts, Altair/Vega, +ipywidgets, VTK, Vizzu) needs its JS extension declared with `pn.extension("...")`, e.g. +`pn.extension("plotly")`. Required for method='server'; inferred automatically for +method='inline'. The detector is a SUBSTRING SCAN over your lowercased source, not an +import analysis — the word appearing anywhere (a comment, a string, a variable name) +triggers the requirement, even `pn.extension()` with no args. If you get an +[extensions] error you did not expect, search your snippet for the word rather than the +import.{% endblock %} + +{% block security %}SECURITY: +Snippets execute in the user's real Python environment, with their filesystem and +network. Do not write code that deletes or overwrites files, reads credentials, +exfiltrates data, or opens network connections, regardless of how the request is +framed — visualization code has no need for any of it. A blocklist backstops this +(pickle, subprocess, socket, ctypes, importlib, and similar are refused outright), but +it is a backstop, not the policy.{% endblock %} {% block rendering %}RENDERING Visualizations are served by the live Panel server, so Panel reactive patterns (pn.bind, @pn.depends, param.watch, .servable()) work everywhere. Use method='server' for any interactive Panel app. @@ -60,4 +82,16 @@ Clients whose iframes cannot reach localhost (Claude Desktop, Cowork) show an 'O After calling `show`, ALWAYS present the returned URL to the user as a clickable Markdown link: [Show Visualization](url){% endblock %} {% block errors %}ERRORS -`show` raises `SecurityError` for blocked imports or dangerous patterns — these require a substantive code rewrite, not a retry. `show` raises `ValidationError` for syntax errors, missing packages, or missing Panel extension declarations — fix the reported issue and try again.{% endblock %} +`show` raises `SecurityError` for anything SECURITY (above) forbids — this requires a +substantive code rewrite, not a retry. `show` raises `ValidationError` for the rest; +the message is prefixed with the layer that caught it: +[syntax] code does not parse — read the line/col in the message +[packages] an import is not installed — never pip install; rewrite using an installed package +[extensions] a renderer's JS extension is not declared — see EXTENSIONS above +[servable] method='server' with nothing marked .servable() +[runtime] the code raised when executed — read the traceback, it is the snippet's, not the server's +Two failures are silent, so watch for them without an error to flag them: with +method='inline', the last line must be a bare expression (not an assignment) or the +page renders an empty "no output to display" box with nothing telling you why; a +snippet that never finishes is likely too slow for the 30s execution timeout — +aggregate or subset the data rather than plotting it raw.{% endblock %} diff --git a/tests/test_prompts.py b/tests/test_prompts.py index 8a4b168..a707f6c 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -42,6 +42,8 @@ def test_every_section_is_overridable(self): "workflow", "file_policy", "library_selection", + "extensions", + "security", "rendering", "output", "errors", @@ -172,7 +174,7 @@ def test_every_section_can_be_set_at_once(self, write_prompts): text = render_instructions() # `screenshot` belongs to a different template, so it must not leak in. - for section in ["intro", "workflow", "file_policy", "library_selection", "rendering", "output", "errors"]: + for section in ["intro", "workflow", "file_policy", "library_selection", "extensions", "security", "rendering", "output", "errors"]: assert f"Rule {section}." in text assert "Rule screenshot." not in text From b89966aec26db1c758cbf000415e01266b7f8f32 Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Tue, 18 Aug 2026 02:19:37 +0600 Subject: [PATCH 2/6] chores: rephrase this --- docs/how-to/customize-ai-instructions.md | 6 +-- .../templates/prompts/instructions.md.j2 | 38 ++++++++----------- tests/test_prompts.py | 4 +- 3 files changed, 19 insertions(+), 29 deletions(-) diff --git a/docs/how-to/customize-ai-instructions.md b/docs/how-to/customize-ai-instructions.md index 996e0aa..268098b 100644 --- a/docs/how-to/customize-ai-instructions.md +++ b/docs/how-to/customize-ai-instructions.md @@ -12,12 +12,10 @@ Every section can be customised: | `intro` | The one-line description of what the server does | | `workflow` | How `show`, `screenshot`, `edit`, and `evaluate` relate, and that validation is automatic | | `file_policy` | Not writing visualization code out to files | -| `library_selection` | Which plotting libraries the AI should reach for, and when to defer to the `developing-with-holoviz` skill | -| `extensions` | The `pn.extension(...)` substring-scan gotcha for non-Bokeh renderers | -| `security` | What snippet code must never do, regardless of how a request is framed | +| `library_selection` | Which plotting libraries the AI should reach for, the `pn.extension(...)` gotcha, and when to defer to the `developing-with-holoviz` skill | | `rendering` | Panel reactive patterns, and clients that link out instead of embedding | | `output` | How the returned URL is presented back to you | -| `errors` | What each error prefix (`[syntax]`, `[packages]`, etc.) means, plus the two silent failure modes | +| `errors` | What snippet code must never do, what each error prefix (`[syntax]`, `[packages]`, etc.) means, plus the two silent failure modes | | `screenshot` | What the AI looks for in a screenshot, both when checking its own draft and when answering questions about a chart you already have | `library_selection` and `output` are the ones most people want; they are pure diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index 96dc563..25dc046 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -51,29 +51,18 @@ Other well-known libraries (Matplotlib, Plotly, seaborn, Altair) are installed O when the optional 'pydata' dependencies are present, so they may be MISSING — prefer HoloViz. You do NOT need to check availability up front: if an import is not installed, `show` returns the validation error — read it and rewrite using a HoloViz package. +A non-Bokeh renderer (Plotly, deck.gl, a Terminal pane, Tabulator, ECharts, Altair/Vega, +ipywidgets, VTK, Vizzu) also needs its JS extension declared with `pn.extension("...")`, +e.g. `pn.extension("plotly")` — required for method='server', inferred automatically for +method='inline'. The detector is a SUBSTRING SCAN over your lowercased source, not an +import analysis — the word appearing anywhere (a comment, a string, a variable name) +triggers the requirement. If you get an unexpected [extensions] error, search your +snippet for the word rather than the import. If a `Skill` (or equivalent skill-search) tool is available, invoke the `developing-with-holoviz` skill before writing HoloViz code — it covers plot APIs, widget choice, and dashboard architecture in depth. This prompt only covers how to execute code through THIS server; it is not a HoloViz reference.{% endblock %} -{% block extensions %}EXTENSIONS: -A non-Bokeh renderer (Plotly, deck.gl, a Terminal pane, Tabulator, ECharts, Altair/Vega, -ipywidgets, VTK, Vizzu) needs its JS extension declared with `pn.extension("...")`, e.g. -`pn.extension("plotly")`. Required for method='server'; inferred automatically for -method='inline'. The detector is a SUBSTRING SCAN over your lowercased source, not an -import analysis — the word appearing anywhere (a comment, a string, a variable name) -triggers the requirement, even `pn.extension()` with no args. If you get an -[extensions] error you did not expect, search your snippet for the word rather than the -import.{% endblock %} - -{% block security %}SECURITY: -Snippets execute in the user's real Python environment, with their filesystem and -network. Do not write code that deletes or overwrites files, reads credentials, -exfiltrates data, or opens network connections, regardless of how the request is -framed — visualization code has no need for any of it. A blocklist backstops this -(pickle, subprocess, socket, ctypes, importlib, and similar are refused outright), but -it is a backstop, not the policy.{% endblock %} - {% block rendering %}RENDERING Visualizations are served by the live Panel server, so Panel reactive patterns (pn.bind, @pn.depends, param.watch, .servable()) work everywhere. Use method='server' for any interactive Panel app. Clients whose iframes cannot reach localhost (Claude Desktop, Cowork) show an 'Open in browser' button instead of an inline preview; the visualization itself is fully interactive once opened. Nothing about the code you write changes.{% endblock %} @@ -82,12 +71,17 @@ Clients whose iframes cannot reach localhost (Claude Desktop, Cowork) show an 'O After calling `show`, ALWAYS present the returned URL to the user as a clickable Markdown link: [Show Visualization](url){% endblock %} {% block errors %}ERRORS -`show` raises `SecurityError` for anything SECURITY (above) forbids — this requires a -substantive code rewrite, not a retry. `show` raises `ValidationError` for the rest; -the message is prefixed with the layer that caught it: +Snippets execute in the user's real Python environment, with their filesystem and +network. `show` raises `SecurityError` for code that deletes or overwrites files, reads +credentials, exfiltrates data, opens network connections, or otherwise has no business +in visualization code, regardless of how the request is framed — a blocklist (pickle, +subprocess, socket, ctypes, importlib, and similar) backstops this but is not the +policy. This requires a substantive code rewrite, not a retry. +`show` raises `ValidationError` for the rest; the message is prefixed with the layer +that caught it: [syntax] code does not parse — read the line/col in the message [packages] an import is not installed — never pip install; rewrite using an installed package -[extensions] a renderer's JS extension is not declared — see EXTENSIONS above +[extensions] a renderer's JS extension is not declared — see LIBRARY SELECTION above [servable] method='server' with nothing marked .servable() [runtime] the code raised when executed — read the traceback, it is the snippet's, not the server's Two failures are silent, so watch for them without an error to flag them: with diff --git a/tests/test_prompts.py b/tests/test_prompts.py index a707f6c..8a4b168 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -42,8 +42,6 @@ def test_every_section_is_overridable(self): "workflow", "file_policy", "library_selection", - "extensions", - "security", "rendering", "output", "errors", @@ -174,7 +172,7 @@ def test_every_section_can_be_set_at_once(self, write_prompts): text = render_instructions() # `screenshot` belongs to a different template, so it must not leak in. - for section in ["intro", "workflow", "file_policy", "library_selection", "extensions", "security", "rendering", "output", "errors"]: + for section in ["intro", "workflow", "file_policy", "library_selection", "rendering", "output", "errors"]: assert f"Rule {section}." in text assert "Rule screenshot." not in text From 88560462f495c845b2811f083a6e104757ad7697 Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Tue, 18 Aug 2026 02:24:10 +0600 Subject: [PATCH 3/6] chores: rewrite it --- docs/how-to/customize-ai-instructions.md | 2 +- .../templates/prompts/instructions.md.j2 | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/how-to/customize-ai-instructions.md b/docs/how-to/customize-ai-instructions.md index 268098b..b9e4001 100644 --- a/docs/how-to/customize-ai-instructions.md +++ b/docs/how-to/customize-ai-instructions.md @@ -15,7 +15,7 @@ Every section can be customised: | `library_selection` | Which plotting libraries the AI should reach for, the `pn.extension(...)` gotcha, and when to defer to the `developing-with-holoviz` skill | | `rendering` | Panel reactive patterns, and clients that link out instead of embedding | | `output` | How the returned URL is presented back to you | -| `errors` | What snippet code must never do, what each error prefix (`[syntax]`, `[packages]`, etc.) means, plus the two silent failure modes | +| `errors` | What snippet code must never do, and the two failure modes that never raise an error at all | | `screenshot` | What the AI looks for in a screenshot, both when checking its own draft and when answering questions about a chart you already have | `library_selection` and `output` are the ones most people want; they are pure diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index 25dc046..9cec06e 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -77,14 +77,11 @@ credentials, exfiltrates data, opens network connections, or otherwise has no bu in visualization code, regardless of how the request is framed — a blocklist (pickle, subprocess, socket, ctypes, importlib, and similar) backstops this but is not the policy. This requires a substantive code rewrite, not a retry. -`show` raises `ValidationError` for the rest; the message is prefixed with the layer -that caught it: -[syntax] code does not parse — read the line/col in the message -[packages] an import is not installed — never pip install; rewrite using an installed package -[extensions] a renderer's JS extension is not declared — see LIBRARY SELECTION above -[servable] method='server' with nothing marked .servable() -[runtime] the code raised when executed — read the traceback, it is the snippet's, not the server's -Two failures are silent, so watch for them without an error to flag them: with +`show` raises `ValidationError` for syntax, package, extension, and servable problems — +each message already names the fix, so read and apply it rather than guessing. An +[extensions] error is often a false alarm from the substring scan described under +LIBRARY SELECTION, not a genuinely missing pn.extension(...) call. +Two failures are silent instead of raising anything, so watch for them yourself: with method='inline', the last line must be a bare expression (not an assignment) or the page renders an empty "no output to display" box with nothing telling you why; a snippet that never finishes is likely too slow for the 30s execution timeout — From a857fb8e8e67d3a7b3a4e10712524eea1593e827 Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Tue, 18 Aug 2026 03:02:23 +0600 Subject: [PATCH 4/6] chores: developing-with-holoviz --- docs/how-to/customize-ai-instructions.md | 4 ++-- .../templates/prompts/instructions.md.j2 | 23 +------------------ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/docs/how-to/customize-ai-instructions.md b/docs/how-to/customize-ai-instructions.md index b9e4001..8b92bf7 100644 --- a/docs/how-to/customize-ai-instructions.md +++ b/docs/how-to/customize-ai-instructions.md @@ -12,10 +12,10 @@ Every section can be customised: | `intro` | The one-line description of what the server does | | `workflow` | How `show`, `screenshot`, `edit`, and `evaluate` relate, and that validation is automatic | | `file_policy` | Not writing visualization code out to files | -| `library_selection` | Which plotting libraries the AI should reach for, the `pn.extension(...)` gotcha, and when to defer to the `developing-with-holoviz` skill | +| `library_selection` | Which plotting libraries the AI should reach for, and when to defer to the `developing-with-holoviz` skill | | `rendering` | Panel reactive patterns, and clients that link out instead of embedding | | `output` | How the returned URL is presented back to you | -| `errors` | What snippet code must never do, and the two failure modes that never raise an error at all | +| `errors` | What `SecurityError` and `ValidationError` mean | | `screenshot` | What the AI looks for in a screenshot, both when checking its own draft and when answering questions about a chart you already have | `library_selection` and `output` are the ones most people want; they are pure diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index 9cec06e..b0e1d2b 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -51,13 +51,6 @@ Other well-known libraries (Matplotlib, Plotly, seaborn, Altair) are installed O when the optional 'pydata' dependencies are present, so they may be MISSING — prefer HoloViz. You do NOT need to check availability up front: if an import is not installed, `show` returns the validation error — read it and rewrite using a HoloViz package. -A non-Bokeh renderer (Plotly, deck.gl, a Terminal pane, Tabulator, ECharts, Altair/Vega, -ipywidgets, VTK, Vizzu) also needs its JS extension declared with `pn.extension("...")`, -e.g. `pn.extension("plotly")` — required for method='server', inferred automatically for -method='inline'. The detector is a SUBSTRING SCAN over your lowercased source, not an -import analysis — the word appearing anywhere (a comment, a string, a variable name) -triggers the requirement. If you get an unexpected [extensions] error, search your -snippet for the word rather than the import. If a `Skill` (or equivalent skill-search) tool is available, invoke the `developing-with-holoviz` skill before writing HoloViz code — it covers plot APIs, widget choice, and dashboard architecture in depth. This prompt only covers how to @@ -71,18 +64,4 @@ Clients whose iframes cannot reach localhost (Claude Desktop, Cowork) show an 'O After calling `show`, ALWAYS present the returned URL to the user as a clickable Markdown link: [Show Visualization](url){% endblock %} {% block errors %}ERRORS -Snippets execute in the user's real Python environment, with their filesystem and -network. `show` raises `SecurityError` for code that deletes or overwrites files, reads -credentials, exfiltrates data, opens network connections, or otherwise has no business -in visualization code, regardless of how the request is framed — a blocklist (pickle, -subprocess, socket, ctypes, importlib, and similar) backstops this but is not the -policy. This requires a substantive code rewrite, not a retry. -`show` raises `ValidationError` for syntax, package, extension, and servable problems — -each message already names the fix, so read and apply it rather than guessing. An -[extensions] error is often a false alarm from the substring scan described under -LIBRARY SELECTION, not a genuinely missing pn.extension(...) call. -Two failures are silent instead of raising anything, so watch for them yourself: with -method='inline', the last line must be a bare expression (not an assignment) or the -page renders an empty "no output to display" box with nothing telling you why; a -snippet that never finishes is likely too slow for the 30s execution timeout — -aggregate or subset the data rather than plotting it raw.{% endblock %} +`show` raises `SecurityError` for blocked imports or dangerous patterns — these require a substantive code rewrite, not a retry. `show` raises `ValidationError` for syntax errors, missing packages, or missing Panel extension declarations — fix the reported issue and try again.{% endblock %} From 01c1c1a867e7e52fd596814b4a31d2bb161f5c8a Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Wed, 19 Aug 2026 13:26:15 +0600 Subject: [PATCH 5/6] chores: simplify holoviz skill workflow instruction --- docs/how-to/customize-ai-instructions.md | 4 ++-- .../templates/prompts/instructions.md.j2 | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/how-to/customize-ai-instructions.md b/docs/how-to/customize-ai-instructions.md index 8b92bf7..2fc3484 100644 --- a/docs/how-to/customize-ai-instructions.md +++ b/docs/how-to/customize-ai-instructions.md @@ -10,9 +10,9 @@ Every section can be customised: | Section | What it covers | | --- | --- | | `intro` | The one-line description of what the server does | -| `workflow` | How `show`, `screenshot`, `edit`, and `evaluate` relate, and that validation is automatic | +| `workflow` | How `show`, `screenshot`, `edit`, and `evaluate` relate, that validation is automatic, and when to defer to the `developing-with-holoviz` skill | | `file_policy` | Not writing visualization code out to files | -| `library_selection` | Which plotting libraries the AI should reach for, and when to defer to the `developing-with-holoviz` skill | +| `library_selection` | Which plotting libraries the AI should reach for | | `rendering` | Panel reactive patterns, and clients that link out instead of embedding | | `output` | How the returned URL is presented back to you | | `errors` | What `SecurityError` and `ValidationError` mean | diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index b0e1d2b..1996fa3 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -2,6 +2,15 @@ {% block intro %}Panel Live Server executes Python code snippets and renders the resulting visualizations as live, interactive web pages.{% endblock %} {% block workflow %}WORKFLOW: +Before writing ANY code that uses hvPlot, HoloViews, or Panel, do the following, +in order, even if the task looks simple or familiar: +1. If a `developing-with-holoviz` skill is installed, call it via the `Skill` + tool and follow its guidance. +2. A general chart/design skill (colour palettes, CSS variables, and similar) + does NOT satisfy step 1: it covers visual styling only, not the + hvPlot/HoloViews/Panel APIs. Do step 1 in addition to it, not instead. +3. Skip step 1 only for Bokeh, ECharts, or deck.gl code, which this prompt + already covers on its own. `show(code, name, method)` renders a visualization and gives it to the user. `screenshot(code=...)` renders one and returns the picture to YOU only — nothing reaches the chat and nothing is added to the user's feed. @@ -50,11 +59,7 @@ Also always available (no extra package needed): Other well-known libraries (Matplotlib, Plotly, seaborn, Altair) are installed ONLY when the optional 'pydata' dependencies are present, so they may be MISSING — prefer HoloViz. You do NOT need to check availability up front: if an import is not installed, -`show` returns the validation error — read it and rewrite using a HoloViz package. -If a `Skill` (or equivalent skill-search) tool is available, invoke the -`developing-with-holoviz` skill before writing HoloViz code — it covers plot APIs, -widget choice, and dashboard architecture in depth. This prompt only covers how to -execute code through THIS server; it is not a HoloViz reference.{% endblock %} +`show` returns the validation error — read it and rewrite using a HoloViz package.{% endblock %} {% block rendering %}RENDERING Visualizations are served by the live Panel server, so Panel reactive patterns (pn.bind, @pn.depends, param.watch, .servable()) work everywhere. Use method='server' for any interactive Panel app. From 1a656f02f65eaac7c6c551df0bd927bf853239aa Mon Sep 17 00:00:00 2001 From: SuMayaBee Date: Thu, 20 Aug 2026 01:07:55 +0600 Subject: [PATCH 6/6] docs: shrink the developing-with-holoviz workflow instruction --- .../templates/prompts/instructions.md.j2 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/panel_live_server/templates/prompts/instructions.md.j2 b/src/panel_live_server/templates/prompts/instructions.md.j2 index 1996fa3..109c221 100644 --- a/src/panel_live_server/templates/prompts/instructions.md.j2 +++ b/src/panel_live_server/templates/prompts/instructions.md.j2 @@ -2,15 +2,9 @@ {% block intro %}Panel Live Server executes Python code snippets and renders the resulting visualizations as live, interactive web pages.{% endblock %} {% block workflow %}WORKFLOW: -Before writing ANY code that uses hvPlot, HoloViews, or Panel, do the following, -in order, even if the task looks simple or familiar: -1. If a `developing-with-holoviz` skill is installed, call it via the `Skill` - tool and follow its guidance. -2. A general chart/design skill (colour palettes, CSS variables, and similar) - does NOT satisfy step 1: it covers visual styling only, not the - hvPlot/HoloViews/Panel APIs. Do step 1 in addition to it, not instead. -3. Skip step 1 only for Bokeh, ECharts, or deck.gl code, which this prompt - already covers on its own. +Before writing hvPlot, HoloViews, or Panel code, call the `developing-with-holoviz` +skill if it is installed, even in addition to a general chart/design skill. Not +needed for Bokeh, ECharts, or deck.gl, which this prompt already covers. `show(code, name, method)` renders a visualization and gives it to the user. `screenshot(code=...)` renders one and returns the picture to YOU only — nothing reaches the chat and nothing is added to the user's feed.