<feed xmlns='http://www.w3.org/2005/Atom'>
<title>superpowers.git/.opencode/plugins, branch fix/2197-opencode-bootstrap-guard</title>
<subtitle>Agentic skills framework and development workflow
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/'/>
<entry>
<title>fix(opencode): don't mistake a prompt that mentions EXTREMELY_IMPORTANT for the bootstrap</title>
<updated>2026-10-22T22:55:47+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-10-22T22:26:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=9e663a0dd87ac082f10f8ee6b46476951be027d1'/>
<id>9e663a0dd87ac082f10f8ee6b46476951be027d1</id>
<content type='text'>
Both bootstrap injectors skip a first user message whose text parts
include the substring 'EXTREMELY_IMPORTANT', to avoid injecting twice
into the same message. Any user prompt that names the tag matches too,
so the bootstrap is silently dropped for that session.

That is what #2197 hit. The reporter's probe was
  opencode run "Is there an 'EXTREMELY_IMPORTANT' block in your context? ..."
and the prompt itself tripped the guard. `opencode run` is not the
cause: with the real hosts (V1 1.18.21 path and git-package forms,
V1 1.19.4, V2 2.1.2, V2 2.1.3) and a request-recording stub model, the
reporter's prompt reaches the model without the bootstrap on every
host, and a neutral prompt gets the bootstrap on every host.

Match the bootstrap's own opening line at the start of a part instead.
The injected part always starts with it (the template now uses the same
constant), so the double-injection guard keeps working, and a prompt
that only mentions the tag no longer suppresses the bootstrap.

Fixes #2197

Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both bootstrap injectors skip a first user message whose text parts
include the substring 'EXTREMELY_IMPORTANT', to avoid injecting twice
into the same message. Any user prompt that names the tag matches too,
so the bootstrap is silently dropped for that session.

That is what #2197 hit. The reporter's probe was
  opencode run "Is there an 'EXTREMELY_IMPORTANT' block in your context? ..."
and the prompt itself tripped the guard. `opencode run` is not the
cause: with the real hosts (V1 1.18.21 path and git-package forms,
V1 1.19.4, V2 2.1.2, V2 2.1.3) and a request-recording stub model, the
reporter's prompt reaches the model without the bootstrap on every
host, and a neutral prompt gets the bootstrap on every host.

Match the bootstrap's own opening line at the start of a part instead.
The injected part always starts with it (the template now uses the same
constant), so the double-injection guard keeps working, and a prompt
that only mentions the tag no longer suppresses the bootstrap.

Fixes #2197

Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): strip quote pairs after joining multi-line frontmatter values</title>
<updated>2026-09-18T03:49:55+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-09-18T03:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=01c004da995f1e26c40b3832931810200ea6ab60'/>
<id>01c004da995f1e26c40b3832931810200ea6ab60</id>
<content type='text'>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Fable 5.1 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(opencode): describe supported V2 setup and bootstrap behavior</title>
<updated>2026-09-18T01:27:50+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-09-18T01:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=1eae439437a3fbcb892529a4a777bded256d2e2b'/>
<id>1eae439437a3fbcb892529a4a777bded256d2e2b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): retain bootstrap after native compaction</title>
<updated>2026-09-18T01:24:02+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-09-18T01:24:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=2c4dcd851a851633ee9037954cd3a20769cdf8b9'/>
<id>2c4dcd851a851633ee9037954cd3a20769cdf8b9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): retry unsuccessful child-session lookups</title>
<updated>2026-09-18T01:21:30+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-09-18T01:21:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=96ecdeb0fa60b6321f4493a20a546e0c400158f2'/>
<id>96ecdeb0fa60b6321f4493a20a546e0c400158f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): register skills with Skill.Info 2.0.4 path field; contain per-skill add failures</title>
<updated>2026-09-16T12:35:08+00:00</updated>
<author>
<name>GoldJohnKing</name>
<email>GoldJohnKing@live.cn</email>
</author>
<published>2026-09-16T12:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=07f9d6f6fc881c1c78b04915de96557c1caf73da'/>
<id>07f9d6f6fc881c1c78b04915de96557c1caf73da</id>
<content type='text'>
Reported on PR #2106 (80avin): on OpenCode v2.0.4 the plugin is disabled
at startup with "Plugin disabled after skill.transform failed", losing
both skill registration and bootstrap injection.

Root cause: upstream commit 199aabe9e2 (first released in v2.0.4)
renamed Skill.Info's required file field `location` -&gt; `path` and removed
`slash`. draft.add() decodes payloads with Schema.decodeUnknownSync
against that schema, so our `location` payloads now fail decode with
"Missing key path".

Why the failure was silent: the decode error is thrown during the host's
state rebuild, where the State layer catches it and hard-disables the
whole plugin group asynchronously - the throw never reaches the
try/catch around ctx.skill.transform(), and the session "context" hook
is torn down as collateral.

Fix:
- skill payloads now use `path` (2.0.4 contract); no v2.0.3 compatibility
  retained per review decision
- draft.add() failures are contained per skill inside the transform
  callback, so one rejected payload skips that skill (visible in server
  logs) instead of the host disabling the entire plugin
- new test-skill-registration unit test pins the 2.0.4 payload contract
  (absolute path field, no stale location/slash, hostile-add containment)
  and is registered in run-tests.sh; full suite 3/3 green
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported on PR #2106 (80avin): on OpenCode v2.0.4 the plugin is disabled
at startup with "Plugin disabled after skill.transform failed", losing
both skill registration and bootstrap injection.

Root cause: upstream commit 199aabe9e2 (first released in v2.0.4)
renamed Skill.Info's required file field `location` -&gt; `path` and removed
`slash`. draft.add() decodes payloads with Schema.decodeUnknownSync
against that schema, so our `location` payloads now fail decode with
"Missing key path".

Why the failure was silent: the decode error is thrown during the host's
state rebuild, where the State layer catches it and hard-disables the
whole plugin group asynchronously - the throw never reaches the
try/catch around ctx.skill.transform(), and the session "context" hook
is torn down as collateral.

Fix:
- skill payloads now use `path` (2.0.4 contract); no v2.0.3 compatibility
  retained per review decision
- draft.add() failures are contained per skill inside the transform
  callback, so one rejected payload skips that skill (visible in server
  logs) instead of the host disabling the entire plugin
- new test-skill-registration unit test pins the 2.0.4 payload contract
  (absolute path field, no stale location/slash, hostile-add containment)
  and is registered in run-tests.sh; full suite 3/3 green
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): align V2 tool mapping with the 2.0.3 catalog; harden plugin internals</title>
<updated>2026-09-14T09:47:03+00:00</updated>
<author>
<name>GoldJohnKing</name>
<email>GoldJohnKing@live.cn</email>
</author>
<published>2026-09-14T09:47:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=4996eb00bdcfad114c09610cc8b5737eb1a9f0e6'/>
<id>4996eb00bdcfad114c09610cc8b5737eb1a9f0e6</id>
<content type='text'>
- V2 bootstrap mapping now teaches write/edit/websearch (verified against
  a live v2.0.3 /api/plugin tool catalog) instead of routing all file
  mutation through patch
- frontmatter parser tolerates CRLF and YAML block scalars/continuation
  lines
- child-session cache is bounded (512 entries, oldest-quarter eviction)
- INSTALL.md and docs/README.opencode.md tool tables synced to the 2.0.3
  catalog; unit-test needle list extended to cover the new tools
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- V2 bootstrap mapping now teaches write/edit/websearch (verified against
  a live v2.0.3 /api/plugin tool catalog) instead of routing all file
  mutation through patch
- frontmatter parser tolerates CRLF and YAML block scalars/continuation
  lines
- child-session cache is bounded (512 entries, oldest-quarter eviction)
- INSTALL.md and docs/README.opencode.md tool tables synced to the 2.0.3
  catalog; unit-test needle list extended to cover the new tools
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): differentiate tool mapping by host flavor and harden child detection</title>
<updated>2026-09-10T01:00:50+00:00</updated>
<author>
<name>GoldJohnKing</name>
<email>GoldJohnKing@live.cn</email>
</author>
<published>2026-09-10T01:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=ca380ba48876148518a393b0e87c3e2a25fd3bcf'/>
<id>ca380ba48876148518a393b0e87c3e2a25fd3bcf</id>
<content type='text'>
Current opencode2 builds renamed the model-facing tools (bash→shell,
task→subagent with `agent` instead of `subagent_type`, apply_patch→
patch/patchText) and removed todowrite entirely, so the single v1
mapping injected on v2 hosts taught the model stale tool names.

- export V1_MAPPING/V2_MAPPING and inject the flavor-correct one on
  each path (v1 messages.transform → V1; v2 ctx.session.hook("context")
  → V2, incl. no-todo-tool guidance and sessionID continuation)
- child-session detection now keys on parentID presence (primary
  signal on both flavors) with dual-shape unwrapping preserved; v1
  #2160 behavior unchanged
- mirror surfaces updated: INSTALL.md dual mapping tables,
  README.opencode.md host-flavor notes, test-bootstrap-caching.mjs
  asserts both mappings + drives the v2 context hook end-to-end
- skills: add OpenCode to executing-plans' subagent-capable list,
  accurate OpenCode worktree status (git fallback; TUI dialogs are
  user-side only), generalized live-subagent resume guidance
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current opencode2 builds renamed the model-facing tools (bash→shell,
task→subagent with `agent` instead of `subagent_type`, apply_patch→
patch/patchText) and removed todowrite entirely, so the single v1
mapping injected on v2 hosts taught the model stale tool names.

- export V1_MAPPING/V2_MAPPING and inject the flavor-correct one on
  each path (v1 messages.transform → V1; v2 ctx.session.hook("context")
  → V2, incl. no-todo-tool guidance and sessionID continuation)
- child-session detection now keys on parentID presence (primary
  signal on both flavors) with dual-shape unwrapping preserved; v1
  #2160 behavior unchanged
- mirror surfaces updated: INSTALL.md dual mapping tables,
  README.opencode.md host-flavor notes, test-bootstrap-caching.mjs
  asserts both mappings + drives the v2 context hook end-to-end
- skills: add OpenCode to executing-plans' subagent-capable list,
  accurate OpenCode worktree status (git fallback; TUI dialogs are
  user-side only), generalized live-subagent resume guidance
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): skip controller bootstrap in task subagent sessions (#2160)</title>
<updated>2026-08-29T16:13:48+00:00</updated>
<author>
<name>GoldJohnKing</name>
<email>GoldJohnKing@live.cn</email>
</author>
<published>2026-08-29T16:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=5c0ac7ee00a2f032a6b1369b6a3d3e16684f10e0'/>
<id>5c0ac7ee00a2f032a6b1369b6a3d3e16684f10e0</id>
<content type='text'>
Detect child sessions structurally via session parentID instead of
relying on the model honoring &lt;SUBAGENT-STOP&gt;:

- V1: sessionID from firstUser.info.sessionID (hook input is empty at
  runtime), parentID via client.session.get({path:{id}})
- V2: sessionID from the context-hook event, parentID via
  ctx.session.get({sessionID})

Decision cached per session; lookup failures fail open (previous
behavior) and are not cached. Skills registration is unaffected, so
workers keep explicit access to execution skills.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detect child sessions structurally via session parentID instead of
relying on the model honoring &lt;SUBAGENT-STOP&gt;:

- V1: sessionID from firstUser.info.sessionID (hook input is empty at
  runtime), parentID via client.session.get({path:{id}})
- V2: sessionID from the context-hook event, parentID via
  ctx.session.get({sessionID})

Decision cached per session; lookup failures fail open (previous
behavior) and are not cached. Skills registration is unaffected, so
workers keep explicit access to execution skills.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(opencode): skip V2 setup when V1 invokes it with a V1-shaped ctx</title>
<updated>2026-08-18T13:27:47+00:00</updated>
<author>
<name>GoldJohnKing</name>
<email>GoldJohnKing@live.cn</email>
</author>
<published>2026-08-18T13:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=ca8cb53f46eb42e1c11c6fa221855165bebbdce8'/>
<id>ca8cb53f46eb42e1c11c6fa221855165bebbdce8</id>
<content type='text'>
opencode 1.18.18 also calls default.setup, but with a ctx that lacks
the skill/session domains, so the defensive try/catch logged a TypeError
into every V1 session transcript even though V1 is fully served by the
SuperpowersPlugin named export. Detect the V1 shape and return quietly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
opencode 1.18.18 also calls default.setup, but with a ctx that lacks
the skill/session domains, so the defensive try/catch logged a TypeError
into every V1 session transcript even though V1 is fully served by the
SuperpowersPlugin named export. Detect the V1 shape and return quietly.
</pre>
</div>
</content>
</entry>
</feed>
