From b5066daafc06adccc4c855aed11db49bb52400d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabor=20K=C3=B6rber?= Date: Wed, 25 Nov 2026 01:52:10 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AC=20export:=2010=20files=20(text)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A plugins/spire/skills/curator/agents/openai.yaml M plugins/spire/skills/gremlins/SKILL.md M plugins/spire/skills/gremlins/preamble.md M plugins/spire/skills/gremlins/templates/rebase.md M plugins/spire/skills/gremlins/templates/spawn.md M plugins/spire/skills/gremlins/templates/train.md A plugins/spire/skills/gremlins/tests/test_prompts.py M plugins/spire/skills/implementation/references/run-log.md A plugins/spire/skills/init/agents/openai.yaml M plugins/spire/skills/svg/SKILL.md --- .../spire/skills/curator/agents/openai.yaml | 2 + plugins/spire/skills/gremlins/SKILL.md | 39 ++++++--- plugins/spire/skills/gremlins/preamble.md | 27 ++++-- .../spire/skills/gremlins/templates/rebase.md | 12 ++- .../spire/skills/gremlins/templates/spawn.md | 14 +-- .../spire/skills/gremlins/templates/train.md | 10 +-- .../skills/gremlins/tests/test_prompts.py | 86 +++++++++++++++++++ .../implementation/references/run-log.md | 10 +-- plugins/spire/skills/init/agents/openai.yaml | 2 + plugins/spire/skills/svg/SKILL.md | 2 +- 10 files changed, 157 insertions(+), 47 deletions(-) create mode 100644 plugins/spire/skills/curator/agents/openai.yaml create mode 100644 plugins/spire/skills/gremlins/tests/test_prompts.py create mode 100644 plugins/spire/skills/init/agents/openai.yaml diff --git a/plugins/spire/skills/curator/agents/openai.yaml b/plugins/spire/skills/curator/agents/openai.yaml new file mode 100644 index 0000000..5b1f887 --- /dev/null +++ b/plugins/spire/skills/curator/agents/openai.yaml @@ -0,0 +1,2 @@ +policy: + allow_implicit_invocation: false diff --git a/plugins/spire/skills/gremlins/SKILL.md b/plugins/spire/skills/gremlins/SKILL.md index aa57942..bf6cf8a 100644 --- a/plugins/spire/skills/gremlins/SKILL.md +++ b/plugins/spire/skills/gremlins/SKILL.md @@ -1,28 +1,38 @@ --- name: gremlins -description: Trains one headless implementer (the base) per build with `claude -p` and forks a gremlin from it per block, so each gremlin starts from the base's reading at prompt-cache prices. +description: Trains one headless implementer (the base) per build with the caller's own CLI (`claude -p` or `codex exec`) and forks a gremlin from it per block, so each gremlin starts from the base's reading at prompt-cache prices. allowed-tools: Bash(uv:*) --- # Gremlins -- **Base**: headless `claude -p` session; reads the code a build touches, writes the trunk notes, changes nothing. -- **Gremlin**: fork of the base's session (`--resume --fork-session`) working one block from a brief. +- **Base**: headless session of the harness; reads the code a build touches, writes trunk notes when its brief names a path, changes nothing else. +- **Gremlin**: fork of the base's session (on Claude `--resume --fork-session`) working one block from a brief. - Spawn completions return to the caller (the session that ran the Bash call); Call sequence step 3. ## Commands -`G` = `uv run --script "${CLAUDE_SKILL_DIR}/gremlins.py"`. Each command prints one JSON object on stdout. Exit: 0 ok; 1 call ended `error` or `stopped`; 2 refused or usage error. +`G` = `uv run --script "${CLAUDE_SKILL_DIR}/gremlins.py"`. Each command prints one JSON object on stdout. Exit: 0 ok; 1 call ended `error` or `stopped`; 2 refused or usage error. If `${CLAUDE_SKILL_DIR}` appears literally, it is this SKILL.md's own folder; resolve it there and do not search elsewhere. | Command | Does | Boxes | |---|---|---| -| `G init --run R --model M [--effort E] [--cwd D] [--agent A] [--binary P]` | Writes `run.json`: launch fingerprint (binary, full model id, flags, cwd, appended prompt) and the argv, stored once. Refuses to overwrite an existing run. | B1 | -| `G train --run R --base B --brief F` | One blocking call with `--session-id`; on `ok` writes `bases/B.json`. Prints `{status, session_id, cost, …}`. | B1 | +| `G init --run R --model M [--effort E] [--cwd D] [--agent A] [--binary P] [--harness claude\|codex] [--pass-env NAME]… [--network]` | Writes `run.json`: launch fingerprint (binary, full model id, flags, cwd, appended prompt) and the argv, stored once. Prints `env_dropped` (names the scrub would drop). Refuses to overwrite an existing run. | B1 | +| `G train --run R --base B --brief F` | One blocking call (on Claude with `--session-id`; on Codex the id comes from the stream's `thread.started`); on `ok` writes `bases/B.json`. Prints `{status, session_id, cost, warnings, …}`. | B1 | | `G spawn --run R --base B --job J --brief F` | One blocking fork of B, stored argv reused verbatim. Prompt = spawn template + delta header (git changes since the base's commit) + brief. Prints `{status, cache, note, cost, …}`. | B2, B3, B5 | | `G rebase --run R --base B --brief F` | Resumes B without a fork, with delta header and brief; updates `bases/B.json` (session id from the result). Warns when jobs of B are still `running`. | B7 | | `G status --run R [--job J]` | Bases with warmth (`warm`/`expiring`/`cold`, `warm_until`, `ttl_left_s`), and job records. | B6, B3 | -`R` = the run log `.md` (`run.md` or `.md`). `M` = full model id (e.g. `claude-opus-5-5[1m]`); aliases refused. Any command: `[--scratch D]` (State dir), on every call or none. No `kill`, `wait`, `ping` or `continue` command exists. +`R` = the run log `.md` (`run.md` or `.md`). `M` = full model id (e.g. `claude-opus-5-5[1m]`); aliases refused; on Codex, a model slug from `models_cache.json`. Any command: `[--scratch D]` (State dir), on every call or none. No `kill`, `wait`, `ping` or `continue` command exists. + +## On Codex + +- `G` = `python3 "/gremlins.py"` (no uv; Python >= 3.10). Commands, output and exit codes as above. +- **Escalation (d, default, assumed)**: run each `G` call escalated, with the justification "starts headless codex gremlins; needs to write `~/.codex` and use the network". Fallback (a), for headless callers: start the caller with `--add-dir ~/.codex -c sandbox_workspace_write.network_access=true`. Exposure: the caller's model can write all of `CODEX_HOME` (`auth.json`, `config.toml`) for the whole session. `init` preflights `CODEX_HOME` and refuses `codex_home_not_writable` otherwise. +- **Long calls**: one long-running exec session per call, waited on; parallel spawns are parallel sessions; interrupt a session to stop it. +- **Forks never commit**: `.git` is read-only under `workspace-write`. The spawn prompt tells the fork to list its changed paths; the caller commits. Boundary: a repo under `/tmp` or `$TMPDIR` is writable there, so keep Codex runs' repos outside both. +- **Cache verdict** is a turn-delta estimate: a fork that does a lot of its own work reads `partial`, and a true miss also reads `partial` (the generic prefix is always cached); `miss` is practically unreachable. No cost column (`cost` is null). +- **`--network`**: off by default; `init --network` opts in (recorded in the fingerprint). A `--pass-env` token is useless without it. +- **P4 (user runs it; not yet run)**: from an interactive Codex TUI in a trusted repo, run `G init --model --effort low`, `G train ...`, `G spawn ...`, each escalated. Check that an approval prompt appears, the call succeeds, `CODEX_THREAD_ID` is present (names only), and a long call can be waited on. If it fails, lead with (a). ## Call sequence @@ -37,13 +47,20 @@ allowed-tools: Bash(uv:*) `TaskStop` the backgrounded Bash call (B4); kills `claude` and its bash wrappers. Known leftover (spec §7): a command the gremlin had in flight (e.g. a long test run through its Bash) can survive as an orphan and run to its end. After a hard stop the job file may stay `running` with no ledger line; `status` shows that record as written, and you know which calls you stopped. -## Briefs carry the rules +## Briefs -The spawn template sets no commit rule. Each brief states: whether that gremlin commits, which paths it may touch, its gate. Parallel gremlins: "do not commit" plus the path list. +The preamble already tells every session what a base and a fork are, to use no agents, to run in the foreground, to commit only when the task says so (explicit paths, no push), the handoff-note format, and to trust the delta header. The templates name the note path and the out dir. Do not repeat any of it in a brief. + +- **Train brief**: what to read (plan, design, code areas), the trunk-notes path if wanted, and the build's standing rules, once: host rules, wrappers, gate commands. They bind every fork. +- **Spawn brief**: the task only: scope, the paths it may touch, commit yes or no (with the message; on Codex always no), its gate, block-specific traps, anything to add to the end message. +- Parallel forks: "do not commit" plus the path list. +- Results: the handoff note is the spawn result's `note` (`notes/.md`); gate output is in `out/`. + +The helper sets no commit default: the preamble says a fork commits only when its brief says so. Each spawn brief says yes or no. ## State dir -`/.spire/scratch//gremlins`; `` = the run log's checkout; run log in another repo or none: the cwd's. Slug = the run log's parent dir name when the file is `run.md`, else its stem. Scratch per `workpad` Tiers (git-ignored; explicit paths). `SPIRE_SCRATCH` overrides the scratch root (absolute path to a dedicated directory; the helper writes a `*` `.gitignore` at its root). `--scratch ` sets it (an env prefix does not match `Bash(uv:*)`, probe 2026-10-23). +`/.spire/scratch//gremlins`; `` = the run log's checkout; run log in another repo or none: the cwd's. Slug = the run log's parent dir name when the file is `run.md`, else its stem. Scratch per `quire` Tiers (git-ignored; explicit paths). `SPIRE_SCRATCH` overrides the scratch root (absolute path to a dedicated directory; the helper writes a `*` `.gitignore` at its root). `--scratch ` sets it (an env prefix does not match `Bash(uv:*)`, probe 2026-10-23). - `run.json` (written once by `init`), `mcp-empty.json`, `preamble.md` (frozen copy: stable system prompt, stable cache) - `bases/.json` (only `train` and `rebase` write it); `jobs/.json` (each by its own command) @@ -53,4 +70,4 @@ The spawn template sets no commit rule. Each brief states: whether that gremlin ## Cache hits -A fork hits the base's cache only with the same argv, pinned env, cwd and an unchanged system prompt. `spawn` reports `cache: hit|partial|miss`; a miss is reported, not an error. Env scrub (deny-list) removes Desktop, SDK, Remote Control and uv variables from every launch; unknown host variables pass. No platform-specific process code; runs on Windows Git Bash, WSL, Linux, macOS (B8). +A fork hits the base's cache only with the same argv, pinned env, cwd and an unchanged system prompt. `spawn` reports `cache: hit|partial|miss`; a miss is reported, not an error. Env scrub (deny-list) removes Desktop, SDK, Remote Control and uv variables from every launch; unknown host variables pass. Secret-shaped names (`TOKEN`, `SECRET`, `PASSWORD`, `API_KEY`, a trailing `_KEY`, …) are dropped too; `--pass-env NAME` at `init` lets one through (decide at `init` from `env_dropped`; a missing name means a new run). Limit: only inherited env is scrubbed; secrets your shell startup files export reach the gremlin's shell again. No platform-specific process code; runs on Windows Git Bash, WSL, Linux, macOS (B8). diff --git a/plugins/spire/skills/gremlins/preamble.md b/plugins/spire/skills/gremlins/preamble.md index 5608359..cb786a6 100644 --- a/plugins/spire/skills/gremlins/preamble.md +++ b/plugins/spire/skills/gremlins/preamble.md @@ -1,12 +1,25 @@ # Headless implementer (spire:gremlins) -You run headless under `claude -p` in a Spire build: first as the trained base, then as gremlins spawned from it once per block (each a fork of the base's session). Any session of yours may later be resumed or forked again. Nobody can answer a question mid-run: decide, act, and record what you decided. +You are a gremlin: a headless implementer in a Spire build. You are used in three ways: -- Do the work yourself. Never dispatch agents, and never start `claude` or the gremlins helper (`gremlins.py`). -- Never use `run_in_background` on Bash. Run every command in the foreground. -- Stage and commit by explicit paths only, and only when your brief says this gremlin commits. Never push, rebase or reset. -- Write gate and test output to `.txt` files under the state dir's `out/` folder (the brief names the state dir). -- When you finish a block, write the handoff note to the path the brief names, in this format, and stamp your exact model id. A few lines: findings, not narration. "none" is the normal answer for deviations and flags, and a real deviation or doubt is never left out. +1. **Trained once, as the base.** In the first session you read the code a build touches and, if asked, write trunk notes. You change nothing else. What you learn there is the working memory of every later session. +2. **Forked once per task.** The trained session is then copied once per block of the build. Each copy (a fork) starts with everything the base read and was told, then gets one prompt with its task. Forks may run in parallel and do not see each other. +3. **Resumed to catch up (rebase).** Between tasks the base itself may be resumed to read what changed; later forks start from there. + +So rules and facts given in training still hold in every fork. A task prompt brings only the task and what changed since training; it does not repeat what you already know. Where a later prompt differs from an earlier one, the later one wins. + +In every session: + +- Nobody can answer a question mid-run: decide, act, and record what you decided. +- Do the work yourself. Never dispatch agents, and never start `claude`, `codex` or the gremlins helper (`gremlins.py`). +- Run every command in the foreground. No background jobs, no watch or polling loops. +- The repository state, instruction files and environment shown to you when the base was trained are a snapshot. Every later prompt starts with a delta header listing what changed since; the newest delta header wins. Trust it and the files on disk over the snapshot and over what you remember, and re-read a file before you change it. + +In task sessions (forks) only: + +- Stage and commit by explicit paths, and only when the task brief says this fork commits. Never push, rebase or reset. +- Write gate and test output to `.txt` files named `-.txt` in the out dir the task prompt names. +- When you finish, write the handoff note to the note path the task prompt names, in this format, and stamp your exact model id. A few lines: findings, not narration. "none" is the normal answer for deviations and flags, and a real deviation or doubt is never left out. ```markdown ### Block — @@ -14,7 +27,7 @@ You run headless under `claude -p` in a Spire build: first as the trained base, - Model: <exact model id> - Start / end: <`date` output> / <`date` output> - Done: <what changed, in one or two lines> - - Deviations from plan: <what, and why, including size well over the plan's estimate> — or "none" + - Deviations from plan: <what, and why, including size well over the plan's estimate, with its cause> — or "none" - Flagged for review: <a point you are unsure of, e.g. a semantic the plan left open> — or "none" - Left for later: <work deferred to a later block or phase> - Expected broken: <areas that do not build or pass yet, and which block fixes them> diff --git a/plugins/spire/skills/gremlins/templates/rebase.md b/plugins/spire/skills/gremlins/templates/rebase.md index 21ed206..330cf5f 100644 --- a/plugins/spire/skills/gremlins/templates/rebase.md +++ b/plugins/spire/skills/gremlins/templates/rebase.md @@ -1,12 +1,10 @@ -# Rebase (spire:gremlins) +# Rebase: base ${base} (spire:gremlins) -This session is base `${base}` itself, resumed (run log `${run}`). When you finish, every later gremlin of this build starts from what you know at the end of it. Your job is to absorb what changed since `${base}` was trained or last rebased. +This session is base `${base}` itself, resumed to catch up (run log `${run}`). Later forks start from what you know at the end of it. -Your system prompt was snapshotted when the base was trained: the git status, the CLAUDE.md files and the environment it shows are **stale**. The delta header below lists what changed in the repository since then. Trust it and the files on disk over the snapshot and over what you remember. - -- Read the handoff notes and the diffs the brief lists (`git --no-optional-locks diff`, `git --no-optional-locks log -p`), and re-read the files they touch. Handoff notes live under `${notes_dir}`. -- Do not change code and do not commit. If the brief names a trunk-notes path, update that file; it is the only file you write. -- Finish with one line `READY`, then a short summary of what changed and anything the brief asked for that you could not do. +- Read the handoff notes under `${notes_dir}` and the diffs the brief lists (`git --no-optional-locks diff`, `git --no-optional-locks log -p`), and re-read the files they touch. +- Change no files. If the brief names a trunk-notes path, update that file; it is the only file you write. +- End with a short summary of what changed and anything the brief asked for that you could not do. ## Delta since the base commit diff --git a/plugins/spire/skills/gremlins/templates/spawn.md b/plugins/spire/skills/gremlins/templates/spawn.md index 7cd246d..201d509 100644 --- a/plugins/spire/skills/gremlins/templates/spawn.md +++ b/plugins/spire/skills/gremlins/templates/spawn.md @@ -1,19 +1,11 @@ -# Block ${block} (spire:gremlins) +# Task ${block} (spire:gremlins) -You are a gremlin spawned from base `${base}` (a fork of its session; run log `${run}`), now working on block `${block}`. +Base `${base}`, run log `${run}`. Handoff note: `${note_path}`. Gate and test output: `${out_dir}`.${commit_line} -Your system prompt was snapshotted when the base was trained: the git status, the CLAUDE.md files and the environment it shows are **stale**. The delta header below lists what changed in the repository since then. Trust it and the files on disk over the snapshot and over what you remember from training; re-read every file before you change it. - -## Delta since training +## Delta since the base commit ${delta} -## Rules for this gremlin - -- Commit only if the brief below says so. -- Write your handoff note to `${note_path}`. -- Write gate and test output to `.txt` files under `${out_dir}`. - ## Brief ${brief} diff --git a/plugins/spire/skills/gremlins/templates/train.md b/plugins/spire/skills/gremlins/templates/train.md index 56e1a01..049f069 100644 --- a/plugins/spire/skills/gremlins/templates/train.md +++ b/plugins/spire/skills/gremlins/templates/train.md @@ -1,10 +1,10 @@ -# Training (spire:gremlins) +# Training: base ${base} (spire:gremlins) -You are base `${base}` of the build whose run log is `${run}`. This session is trained once; then one gremlin per block is spawned from it by forking it, and every gremlin starts from what you know at the end of this session. Build an accurate picture of the code the brief below points you at: read it, trace the seams, note the invariants and the traps. +Run log `${run}`. Helper state dir `${state_dir}`; forks write handoff notes under `${notes_dir}` and gate output under `${out_dir}`. -- Do not change code in this session. If the brief asks for trunk notes, write them to the path it names; that is the only file you write. -- The helper's state dir is `${state_dir}`. Gremlins write handoff notes under `${notes_dir}` and gate and test output under `${out_dir}`. -- Finish with one line `READY`, then a short summary of what you read and anything the brief asked for that you could not do. +- Read the code the brief points at: trace the seams, note the invariants and the traps the later tasks will meet. +- Change no files. If the brief names a trunk-notes path, write that file; it is the only file you write. +- End with a short summary: what you read, the trunk-notes path if you wrote one, anything the brief asked for that you could not do, and your exact model id. ## Brief diff --git a/plugins/spire/skills/gremlins/tests/test_prompts.py b/plugins/spire/skills/gremlins/tests/test_prompts.py new file mode 100644 index 0000000..29b7b6b --- /dev/null +++ b/plugins/spire/skills/gremlins/tests/test_prompts.py @@ -0,0 +1,86 @@ +"""Wording pins for the prompt layers (design 0.4.0 §7, §9.2).""" +import re +import string +import sys +import textwrap +import unittest +from pathlib import Path + +SKILL = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(SKILL)) + +from grm import cli # noqa: E402 + +TEMPLATES = ("train.md", "spawn.md", "rebase.md") +# Every key cli passes to render_template, per template. +KEYS = { + "train.md": ["base", "run", "state_dir", "notes_dir", "out_dir", "brief"], + "spawn.md": ["block", "base", "run", "delta", "note_path", "out_dir", "commit_line", "brief"], + "rebase.md": ["base", "run", "notes_dir", "delta", "brief"], +} +SAMPLE_COMMIT = " You cannot commit here (`.git` is read-only in your sandbox); list the paths you changed." + + +def read(rel): + return (SKILL / rel).read_text(encoding="utf-8") + + +class PromptWordingTest(unittest.TestCase): + def setUp(self): + self.preamble = read("preamble.md") + self.templates = {n: read("templates/" + n) for n in TEMPLATES} + + def test_role_phrases_once_in_preamble_only(self): + for phrase in ("Trained once, as the base", "Forked once per task"): + self.assertEqual(self.preamble.count(phrase), 1, phrase) + for n, t in self.templates.items(): + self.assertNotIn(phrase, t, n) + + def test_no_ready_line(self): + for n, t in self.templates.items(): + self.assertNotIn("READY", t, n) + self.assertNotIn("READY", self.preamble) + + def test_spawn_has_no_commit_sentence(self): + text = self.templates["spawn.md"].replace("${commit_line}", "") + # headings ("Delta since the base commit") are not sentences + body = "\n".join(l for l in text.splitlines() if not l.lstrip().startswith("#")) + self.assertNotIn("commit", body.lower()) + self.assertEqual(self.templates["spawn.md"].count("${commit_line}"), 1) + self.assertIn("Gate and test output: `${out_dir}`.${commit_line}", self.templates["spawn.md"]) + + def test_stale_snapshot_rule_only_in_preamble(self): + phrase = "newest delta header wins" + self.assertEqual(self.preamble.count(phrase), 1) + for n, t in self.templates.items(): + self.assertNotIn(phrase, t, n) + + def test_templates_render_with_every_cli_key(self): + for name in TEMPLATES: + for commit_line in ("", SAMPLE_COMMIT): + values = {k: "<%s>" % k for k in KEYS[name]} + if "commit_line" in values: + values["commit_line"] = commit_line + text = cli.render_template(name, values) + self.assertNotIn("${", text, name) + self.assertTrue(set(re.findall(r"\$\{(\w+)\}", self.templates[name])) <= set(KEYS[name]), name) + if commit_line and name == "spawn.md": + self.assertIn(commit_line, text) + + def test_handoff_block_equals_run_log(self): + path = cli.SKILL_DIR.parent / "implementation/references/run-log.md" + self.assertTrue(path.is_file(), "missing: %s" % path) + + def block(text, after=None): + if after: + text = text[text.index(after):] + m = re.search(r"```markdown\n(.*?)```", text, re.S) + self.assertIsNotNone(m) + return textwrap.dedent(m.group(1)).strip() + + theirs = block(path.read_text(encoding="utf-8"), "## Handoff note") + self.assertEqual(block(self.preamble), theirs) + + +if __name__ == "__main__": + unittest.main() diff --git a/plugins/spire/skills/implementation/references/run-log.md b/plugins/spire/skills/implementation/references/run-log.md index 733f7a7..ebecde9 100644 --- a/plugins/spire/skills/implementation/references/run-log.md +++ b/plugins/spire/skills/implementation/references/run-log.md @@ -1,6 +1,6 @@ # Run log and handoff notes -The run log is the record of a build: one file per build plan at `logs/<YYYY-MM-DD-hh>-<slug>/run.md` in the workpad (tier: `workpad` skill). Each phase appends to it. The reviewer reads it. One Athanor runs a brief; the next brief's Athanor starts from the run log and trunk notes. +The run log is the record of a build: one file per build plan at `logs/<YYYY-MM-DD-hh>-<slug>/run.md` in the quire (tier: `quire` skill). Each phase appends to it. The reviewer reads it. One Athanor runs a brief; the next brief's Athanor starts from the run log and trunk notes. Rules: @@ -30,21 +30,21 @@ Rules: |---|---|---|---| ``` -## Handoff note (one per block, written by the block's owner) +## Handoff note (one per block, written by the block's owner; a gremlin writes it to the helper's note path and the Athanor copies it here) A few lines per block: findings, not narration. "none" is the normal answer for deviations and flags, and a real deviation or doubt is never left out. ```markdown ### Block <N.M> — <title> -- Model: <exact id> +- Model: <exact model id> - Start / end: <`date` output> / <`date` output> - Done: <what changed, in one or two lines> -- Deviations from plan: <what, and why, including size well over the plan's estimate> — or "none" +- Deviations from plan: <what, and why, including size well over the plan's estimate, with its cause> — or "none" - Flagged for review: <a point you are unsure of, e.g. a semantic the plan left open> — or "none" - Left for later: <work deferred to a later block or phase> - Expected broken: <areas that do not build or pass yet, and which block fixes them> -- Commits: <hashes> +- Commits: <hashes> — or "none" when your brief says you do not commit ``` ## Phase close (written by the Athanor) diff --git a/plugins/spire/skills/init/agents/openai.yaml b/plugins/spire/skills/init/agents/openai.yaml new file mode 100644 index 0000000..5b1f887 --- /dev/null +++ b/plugins/spire/skills/init/agents/openai.yaml @@ -0,0 +1,2 @@ +policy: + allow_implicit_invocation: false diff --git a/plugins/spire/skills/svg/SKILL.md b/plugins/spire/skills/svg/SKILL.md index b8f435d..e3894d2 100644 --- a/plugins/spire/skills/svg/SKILL.md +++ b/plugins/spire/skills/svg/SKILL.md @@ -1,6 +1,6 @@ --- name: svg -description: Use when authoring or editing a Markdown file that contains (or should contain) SVG diagrams, charts, or any graphical representation. Trigger whenever (1) writing a report/document/README in Markdown that needs a diagram, flowchart, chart, or other visual, (2) considering adding `<svg>` markup to a `.md` file, (3) editing existing SVG inside Markdown, (4) a user asks for a "diagram", "visual", "chart", or "flowchart" inside a Markdown document. Markdown renderers (GitHub, Gitea, Obsidian, VS Code preview) sanitize inline SVG very differently from each other — GitHub strips it entirely, Gitea allows only `<svg>` + `<path>`, Obsidian (via DOMPurify) allows most of it. Apply this skill proactively before producing the SVG, not after. +description: Use when writing or editing Markdown that contains, or should contain, a diagram, chart or other visual, including any `<svg>` markup in a `.md` file. Markdown renderers sanitize inline SVG very differently (GitHub strips it entirely), so load this before producing the SVG, not after. --- # SVG Diagrams