Skip to content

[Fix #31] feat(upgrade): one-shot v1->v2 upgrade via bundled skill + command - #41

Merged
diegohb merged 3 commits into
mainfrom
v2/issue-31-oneshot-upgrade
Oct 7, 2026
Merged

diegohb merged 3 commits into
mainfrom
v2/issue-31-oneshot-upgrade

Conversation

@diegohb

@diegohb diegohb commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Ships a bundled skills/opencode-v2-upgrade/SKILL.md and commands/upgrade-opencode-v2.md, loaded via new SkillLoader/CommandLoader and registered from the plugin through ctx.skill.transform and ctx.command.transform.
  • /upgrade-opencode-v2 re-submits its template through ctx.session.prompt with the skill attached, giving a one-shot v1->v2 upgrade flow.
  • Extracts a shared FrontmatterParser used by the agent, skill, and command loaders (removes duplicated parse logic); registration reads as a single Effect.gen sequence.
  • Drops the inert agent binding from the command frontmatter and makes the skill's facts-record contract self-contained.
  • Documents the flow and its safety contract in README, AGENTS.md, the CONTEXT.md glossary, architect routing/reference notes, and oneshot Example 10.

Why

Testing

  • New golden v2 fixture (tests/fixtures/v2-extension-package/) with tests proving the upgraded config/plugin/agent/skill and report validate against the pinned schema and leave no v1 remnants.
  • Harness now audits skill and command registration; loader, fact-gate, and fixture-coverage tests added (tests/bundled-content.test.ts, tests/load-hook.test.ts, tests/v2-host.test.ts).
  • Existing v1 extension package fixture retained as upgrade-source coverage.

diegohb added 3 commits October 7, 2026 00:56
…issue #31)

Bundle skills/opencode-v2-upgrade/SKILL.md and commands/upgrade-opencode-v2.md, load them via new SkillLoader/CommandLoader, and register both from the plugin through ctx.skill.transform and ctx.command.transform. The command re-submits its template through ctx.session.prompt with the skill attached. Harness now audits skill and command registration; loader, fact-gate, and fixture-coverage tests added.
…ssue #31)

README, AGENTS.md, CONTEXT.md glossary, the architect routing/reference notes, and an oneshot (Example 10) cover the one-shot upgrade flow and its safety contract.
…2 fixture, self-contained skill (issue #31)

- Extract FrontmatterParser shared by the agent, skill, and command loaders (removes duplicated parse logic).\n- Registration effect reads as one Effect.gen sequence.\n- Drop the inert agent binding from the upgrade command frontmatter.\n- Make the skill's facts-record contract self-contained (no dependence on an unshipped docs file).\n- Add a golden v2 fixture (upgraded config/plugin/agent/skill + report) with tests proving the upgrade output validates against the pinned schema and carries no v1 remnant.
@diegohb
diegohb merged commit 955f846 into main Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant