You are the release manager for oh-my-opencode. Execute the FULL publish workflow from start to finish.
CRITICAL: PUBLISH IS SHIP-ONLY — GO STRAIGHT TO THE WORKFLOW
origin/dev is already gated: every PR and push ran CI (test/typecheck/codex-compatibility on 3 OSes), and the publish workflow re-runs those same gates before anything is published.
- NEVER run
/pre-publish-review,/review-work, or any code re-review as part of a publish request. Those run ONLY when the user explicitly asks for a review. - NEVER "fix" code, open PRs, or enter fix-and-re-audit loops during a publish. If the workflow fails or something looks broken, report it and STOP — a publish is the wrong place to repair the tree.
- A publish request with a bump type goes from Step 0 to Step 3 (trigger) in minutes. The only human-scale work is release notes, drafted while CI runs.
CRITICAL: FULL WORKFLOW MEANS THREE RELEASE SURFACES
Publishing is complete only after all release surfaces are verified:
The publish workflow must not be reported complete while any of oh-my-opencode, oh-my-openagent, lazycodex-ai, or code-yeongyu/lazycodex verification is unresolved.
CRITICAL: FULL WORKFLOW MEANS DISCORD TOO
Publishing is not complete until the Discord release announcement has been attempted.
- DO NOT stop after creating the GitHub release.
- DO NOT stop after drafting or applying release notes.
- DO NOT wait for a second user acknowledgement if the user already confirmed the publish.
- After the release notes are finalized, immediately run Step 7.5 and post to Discord.
- If Discord posting fails after authentication/retry, report the failure clearly and continue the remaining verification steps. A skipped Discord step is a workflow failure.
CRITICAL: NO EARLY TURN-END AFTER TRIGGER (COMPLETION CONTRACT)
Once gh workflow run publish succeeds, the publish is NOT done. A prior session forgot this: it triggered the workflow and ended its turn, leaving the release unverified, the enhanced summary unwritten, and the Discord announcement unsent. That mistake is why this section exists.
After Step 3 (trigger), you MUST drive the run to a terminal conclusion AND complete every post-trigger step before ending your turn. You may NOT end the turn, hand off, or stop for the day while ANY of these is unresolved:
- Run conclusion —
gh run view <id> --json conclusionmust returnsuccess(poll while drafting notes; never sleep idle). - Release exists — Step 5:
gh release view v${NEW_VERSION}resolves. - Enhanced summary applied — Step 6 + Step 7: draft (mandatory for patch/minor/major) AND
gh release edit --notes-fileapplied. "Patch is optional" is wrong; patch summaries are MANDATORY. - Discord announced — Step 7.5:
agent-discordbot message sendattempted; either a message id is recorded OR a clear failure is reported to the user. A skipped Discord step is a workflow failure. - npm verified — Step 8:
npm view oh-my-opencode version(and oh-my-openagent, lazycodex-ai) shows${NEW_VERSION}.
Only after all five are green may you end the turn. If the run fails, run gh run view <id> --log-failed, report it, and STOP (do not repair the tree mid-publish). If a post-trigger step fails for an external reason (npm propagation, Discord auth), report it clearly and continue the remaining steps — do not let one failure abort the rest.
This contract applies to the slash-command copies (.agents/command/publish.md, .opencode/command/publish.md) too; they are kept byte-identical to this skill per the .agents/AGENTS.md drift rule.
CRITICAL: ARGUMENT REQUIREMENT
You MUST receive one release selector from the user. Valid options:
patch: Bug fixes, backward-compatible (1.1.7 → 1.1.8)minor: New features, backward-compatible (1.1.7 → 1.2.0)major: Breaking changes (1.1.7 → 2.0.0)- An explicit valid semantic version, including a prerelease such as
5.0.0-beta.9
If the user did not provide a release selector, STOP IMMEDIATELY and ask:
"To proceed with deployment, specify
patch,minor,major, or an explicit semantic version such as5.0.0-beta.9."
Reject any other value. Do not infer or repair malformed versions.
STEP 0: REGISTER TODO LIST (MANDATORY FIRST ACTION)
Before doing ANYTHING else, create a detailed todo list using TodoWrite:
Mark each todo as in_progress when starting, completed when done. ONE AT A TIME.
STEP 1: CONFIRM AND CLASSIFY THE RELEASE SELECTOR
If the user already supplied the selector in the command argument or message, that IS the confirmation. Parse it exactly once:
Only ask and wait when no selector was provided.
STEP 2: CHECK UNCOMMITTED CHANGES
Run: git status --porcelain
- If there are uncommitted changes, warn user and ask if they want to commit first
- If clean, proceed
STEP 2.5: SYNC WITH REMOTE (MANDATORY)
Check if there are unpushed commits:
If there are unpushed commits, you MUST sync before triggering workflow:
This ensures the GitHub Actions workflow runs on the latest code including all local commits.
STEP 3: TRIGGER GITHUB ACTIONS WORKFLOW
Dispatch from dev, pass bump selectors through bump, and pass exact versions through version. The required bump input remains patch for explicit-version dispatches but is ignored by the workflow because version takes precedence.
The returned run ID owns this release attempt. Never replace it with a latest-run lookup.
STEP 4: WAIT FOR WORKFLOW COMPLETION
The publish run is a single workflow with sequential stages. Expected timeline (from recent real runs, ~30 min total):
Poll job-level status every 30 seconds and report stage transitions to the user:
IMPORTANT: Use polling loop, NOT sleep commands. Use the waiting time to draft the enhanced release summary (Step 6) — do not sit idle, and do not start any review activity.
If conclusion is failure, show error and stop:
STEP 5: VERIFY RELEASE & PREVIEW AUTO-GENERATED CONTENT
Two goals: confirm the release exists, then show the user what the workflow already generated.
Release notes are written BEFORE the release, not after.
The release body is extracted from the CHANGELOG.md section for this version. Author the user-facing
notes under ## [Unreleased] and land them before dispatching /publish; release-state preparation
stamps that heading into ## [<version>] - <UTC date> and commits it with the release state, so the
published commit already carries its own notes.
Preview exactly what the release body will be:
<agent-instruction>
After running the preview, present the output to the user and say:
This is the exact body the release will publish: the notes you authored under
[Unreleased], then contributor thank-yous for non-team contributors, then the install footer.Both steps are fail-closed: an absent, empty, or duplicated section aborts the release instead of publishing blank notes, and re-stamping a version that already has a section is refused.
If the
[Unreleased]section is empty, STOP and write the notes first — the release cannot proceed.
APPROVAL GATE (single, binary): The user's initial publish request with a named bump type IS the only approval this workflow requires. Do NOT wait for a separate acknowledgement here. Present the preview, then IMMEDIATELY proceed to Step 6. The only exception: if the user explicitly said "let me review the changelog before you continue" (or equivalent), stop and wait. Otherwise continue without ending the turn.
</agent-instruction>
STEP 6: DRAFT ENHANCED RELEASE SUMMARY
<decision-gate>
</decision-gate>
LAST RELEASE BEFORE THE OMO NATIVE CLI PUBLIC RELEASE
When the user identifies this as the final release before the OmO Native CLI public release, the GitHub summary MUST begin with this dedicated heading and the Discord announcement MUST repeat it as a dedicated heading immediately after @here:
## LAST RELEASE BEFORE THE OMO NATIVE CLI PUBLIC RELEASE
What You're Writing (and What You're NOT)
You are writing the headline layer — a product announcement that sits ABOVE the auto-generated commit log. Think "release blog post", not "git log".
<rules>
- NEVER duplicate commit messages. The auto-generated section already lists every commit.
- NEVER write generic filler like "Various bug fixes and improvements" or "Several enhancements".
- ALWAYS focus on USER IMPACT: what can users DO now that they couldn't before?
- ALWAYS group by THEME or CAPABILITY, not by commit type (feat/fix/refactor).
- ALWAYS use concrete language: "You can now do X" not "Added X feature".
- NEVER include internal adapter changes matching
senpi,omo-senpi,senpi-task,pi-goal, orpi-webfetchin either release-note variant.
</rules>
<examples>
</bad>
Token refresh is now automatic and seamless. Sessions no longer expire mid-task — the system silently rotates credentials in the background. If you've been frustrated by random logouts, this release fixes that.
</good>
</bad>
Rules are now cached by file modification time. If your project has 50+ rule files, you'll notice startup is noticeably faster — we measured a 3x improvement in our test suite.
</good>
</examples>
Drafting Process
- Analyze the commit list from Step 5's preview. Identify 2-5 themes that matter to users.
- Write the summary to
/tmp/release-summary-v${NEW_VERSION}.md. - Present the draft to the user for review and approval before applying.
<agent-instruction>
Present the draft to the user:
"Here's the release summary I drafted. This will appear AT THE TOP of the release notes, above the auto-generated commit changelog and contributor thanks."
APPROVAL GATE (same single gate): The initial publish confirmation covers this step too. Present the draft, then IMMEDIATELY proceed to Step 7 (apply) and Step 7.5 (Discord). Do NOT stop to wait for approval unless the user explicitly requested a release-note review hold before the publish started. The Discord announcement (Step 7.5) is mandatory and must not be blocked by a review hold that was never requested.
</agent-instruction>
STEP 7: APPLY ENHANCED SUMMARY TO RELEASE
This step is MANDATORY. The enhanced summary from Step 6 must always be applied.
<architecture>
The final release note structure:
</architecture>
<zero-content-loss-policy>
- Fetch the existing release body FIRST
- PREPEND your summary above it
- The existing auto-generated content must remain 100% INTACT
- NOT A SINGLE CHARACTER of existing content may be removed or modified
</zero-content-loss-policy>
STEP 7.5: POST RELEASE NOTES TO DISCORD
After the release notes are finalized, post them to the Discord channel. This step is mandatory for every publish run.
<hard-gate>
The workflow is not complete until this step has either:
- Sent a Discord message successfully and recorded the message ID, or
- Failed after
agent-discordbot auth statusplus one send retry, with the Jobdori bot-token failure reported to the user.
Never skip this step because the release summary was awaiting approval. If the user already confirmed the publish, continue through Discord before stopping.
</hard-gate>
<agent-discord-instruction>
- Use the Jobdori bot token through
agent-discordbotfor release announcements. This is the required release path; do not use the personalagent-discordtoken unless the bot path is unavailable and the user explicitly approves the fallback. Pin the bot id so release messages go out as the Jobdori bot even if the localagent-discordbotcurrent bot changes.
- Read recent messages in the channel to match the existing announcement style:
-
If
agent-discordbotis unavailable or unauthorized, stop and report that the Jobdori token path failed. Only then may a human decide whether to useagent-discord. -
Post the release announcement to channel
1454708427392680067matching the style of previous announcements. The message should follow this structure:
If the message fails to send, warn the user and continue — do NOT block the publish workflow on Discord errors.
</agent-discord-instruction>
STEP 8: VERIFY NPM PUBLICATION
Poll npm registry until the new version appears:
Compare with expected version. If not matching after 2 minutes, warn user about npm propagation delay.
STEP 8.5: SPOT-CHECK PLATFORM BINARY PACKAGES
Platform packages are built and published by the publish-platform jobs INSIDE the same publish run — there is no separate workflow to wait for, and publish-main already refuses to publish unless matching platform binaries exist. Spot-check a representative sample:
Each should show ${NEW_VERSION}. On mismatch, warn the user and point at the publish-platform jobs in the run — do not re-run anything yourself.
STEP 9: FINAL CONFIRMATION
Report success to user with:
- New version number
- GitHub release URL: https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v{version}
- npm package URL: https://www.npmjs.com/package/oh-my-opencode
- Platform packages status: spot-checked platform package versions
ERROR HANDLING
- Workflow fails: Show failed logs, suggest checking Actions tab
- Release not found: Wait and retry, may be propagation delay
- npm not updated: npm can take 1-5 minutes to propagate, inform user
- Permission denied: User may need to re-authenticate with
gh auth login - Platform jobs fail: Show logs from the
publish-platformjobs in the same run, name the failing target, and stop —publish-mainis blocked by design until they pass
LANGUAGE
Respond to user in English.


