mcpField
P
pre-publish-review

pre-publish-review

github.com/code-yeongyuテスト・品質70.4k759 回インストール今日更新
リポジトリ

pre-publish-review について

npm 公開前の未リリース変更を評価するスキルです。変更ごとの分析、手動 QA を含む全体レビュー、リリース準備状況とバージョン判断の統合を行います。

主な機能

  1. 01未公開の変更を検出
  2. 02領域とリリース層ごとに分類
  3. 03変更単位のレビューを並列実行
  4. 04全体レビューと手動 QA
  5. 05準備状況とバージョン判断を統合

活用シーン

  1. 01npm 公開前の変更レビュー
  2. 02リリース領域ごとの破壊的変更の特定
  3. 03リリースリスクとバージョン更新の評価

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/code-yeongyu/oh-my-openagent --skill pre-publish-review

インストール後、Claude Code で/pre-publish-reviewを入力して読み込まれたか確認します。

詳細

公開前レビュー — 12 エージェントのリリースゲート

npm への公開前に、3 つのエージェント層でレビューします。各層は異なる観点を担当し、すべての結果を以下のリリース層に対応付けます。

層エージェント種類確認内容
変更ごとの詳細分析最大 10ultrabrain各論理的変更グループを個別に確認します。正確性、エッジケース、パターンへの準拠を確認します。
全体レビュー1(+オーケストレーター QA)review-workレビューオーケストレーターによる手動 QA の後、1 人のゲートレビュアーが変更セット全体を対象に、目標への適合性、コード品質、セキュリティ、見落とされたコンテキストを確認します。
リリース統合1oracleリリース全体の準備状況、バージョンの更新、破壊的変更、デプロイのリスクを確認します。

リリース層の分類

各フェーズでは、以下の範囲にわたってエビデンスとリスクを分類します。

リリース層範囲必要なバージョン判断
omo pure componentsコアパッケージ、MCP パッケージ、共有スキル、再利用可能なスクリプト、プラットフォームバイナリの入力アダプターが使用する共有ロジックへのパッチ/マイナー/メジャーの影響。
omo opencodeルートの oh-my-opencode / oh-my-openagent、src/、OpenCode プラグインのフック/ツール/CLI/設定/ドキュメント、.opencode/、.agents/OpenCode/OpenAgent の npm リリースに対する Semver の更新。
omo codexpackages/omo-codex、lazycodex-ai、Codex プラグインのメタデータ/フック、バンドルされた MCP ランタイム、code-yeongyu/lazycodex マーケットプレイスのペイロードCodex アダプターの更新、LazyCodex の npm 公開リスク、マーケットプレイス/GitHub リリースの必要性。

フェーズ 0:未公開の変更を検出する

最初に /get-unpublished-changes を実行します。これは変更内容の唯一の信頼できる情報源であり、omo pure components、omo opencode、omo codex の各層に固有のバージョン推奨を含める必要があります。

skill(name="get-unpublished-changes")

このコマンドは以下を自動的に行います。

  • 公開済みの npm バージョンとローカルバージョンを検出します
  • 前回のリリース以降のすべてのコミットを一覧表示します
  • コミットメッセージだけでなく実際の差分を読み取り、実際の変更内容を説明します
  • 変更をスコープ別に種類(feat/fix/refactor/docs)で分類します
  • 破壊的変更を特定します
  • 層ごとのバージョン更新に加えて、ワークフロー全体のバージョン更新を 1 つ推奨します

出力全体を保存してください — フェーズ 1 のグループ分けとすべてのエージェントプロンプトにそのまま使用します。

次に、エージェントプロンプトに必要な生データを取得します。

# Extract versions (already in /get-unpublished-changes output)
PUBLISHED=$(npm view oh-my-opencode version 2>/dev/null || echo "not published")
LOCAL=$(node -p "require('./package.json').version" 2>/dev/null || echo "unknown")

# Raw data for agents (diffs, file lists)
COMMITS=$(git log "v${PUBLISHED}"..HEAD --oneline 2>/dev/null || echo "no commits")
COMMIT_COUNT=$(echo "$COMMITS" | wc -l | tr -d ' ')
DIFF_STAT=$(git diff "v${PUBLISHED}"..HEAD --stat 2>/dev/null || echo "no diff")
CHANGED_FILES=$(git diff --name-only "v${PUBLISHED}"..HEAD 2>/dev/null || echo "none")
FILE_COUNT=$(echo "$CHANGED_FILES" | wc -l | tr -d ' ')

PUBLISHED が「not published」の場合は初回リリースです。代わりに git の全履歴を使用してください。

フェーズ 1:変更をグループに分類する

/get-unpublished-changes の出力を出発点として使用します。出力ではすでにスコープと種類ごとに分類されています。

グループ分けの方針:

  1. feat/fix/refactor/docs とスコープで分類済みの /get-unpublished-changes の分析を出発点にします
  2. モジュール/領域ごとにさらに分割します。同じモジュールまたは機能領域に関係する変更は、同じグループにまとめます
  3. 最大 10 グループを目安にします。コミットが 10 件未満の場合は、各コミットをそれぞれ 1 グループにします。論理的な領域が 10 より多い場合は、最小のグループを統合します。
  4. 各グループについて、以下を抽出します。
    • グループ名:短く内容がわかるラベル(例:「agent-model-resolution」、「hook-system-refactor」)
    • リリース層:omo pure components、omo opencode、omo codex
    • コミット:コミットハッシュとメッセージの一覧
    • ファイル:このグループで変更されたファイル
    • 差分:完全な差分のうち、関連する部分(git diff v${PUBLISHED}..HEAD -- {group files})

フェーズ 2:すべてのエージェントを起動する

すべてのエージェントを 1 回のターンで起動します。各エージェントには run_in_background=true を指定します。順番に起動してはいけません。

レイヤー 1:変更ごとの Ultrabrain 分析(最大 10)

変更グループごとに、ultrabrain エージェントを 1 つ起動します。各エージェントには、そのグループの差分のみを渡します。変更セット全体は渡しません。

task(
  category="ultrabrain",
  model="gpt-5.6-sol",
  run_in_background=true,
  load_skills=[],
  description="Deep analysis: {GROUP_NAME}",
  prompt="""
<review_type>PER-CHANGE DEEP ANALYSIS</review_type>
<change_group>{GROUP_NAME}</change_group>

<project>oh-my-opencode (npm package)</project>
<published_version>{PUBLISHED}</published_version>
<target_version>{LOCAL}</target_version>

<commits>
{GROUP_COMMITS — hash and message for each commit in this group}
</commits>

<changed_files>
{GROUP_FILES — files changed in this group}
</changed_files>

<diff>
{GROUP_DIFF — only the diff for this group's files}
</diff>

<file_contents>
{Read and include full content of each changed file in this group}
</file_contents>

You are reviewing a specific subset of changes heading into an npm release. Focus exclusively on THIS change group. Other groups are reviewed by parallel agents.

ANALYSIS CHECKLIST:

1. **Intent Clarity**: What is this change trying to do? Is the intent clear from the code and commit messages? If you have to guess, that's a finding.

2. **Correctness**: Trace through the logic for 3+ scenarios. Does the code actually do what it claims? Off-by-one errors, null handling, async edge cases, resource cleanup.

3. **Breaking Changes**: Does this change alter any public API, config format, CLI behavior, or hook contract? If yes, is it backward compatible? Would existing users be surprised?

4. **Pattern Adherence**: Does the new code follow the established patterns visible in the existing file contents? New patterns where old ones exist = finding.

5. **Edge Cases**: What inputs or conditions would break this? Empty arrays, undefined values, concurrent calls, very large inputs, missing config fields.

6. **Error Handling**: Are errors properly caught and propagated? No empty catch blocks? No swallowed promises?

7. **Type Safety**: Any `as any`, `@ts-ignore`, `@ts-expect-error`? Loose typing where strict is possible?

8. **Test Coverage**: Are the behavioral changes covered by tests? Are the tests meaningful or just coverage padding?

9. **Side Effects**: Could this change break something in a different module? Check imports and exports — who depends on what changed?

10. **Release Risk**: On a scale of SAFE / CAUTION / RISKY — how confident are you this change won't cause issues in production?

OUTPUT FORMAT:
<group_name>{GROUP_NAME}</group_name>
<verdict>PASS or FAIL</verdict>
<risk>SAFE / CAUTION / RISKY</risk>
<summary>2-3 sentence assessment of this change group</summary>
<has_breaking_changes>YES or NO</has_breaking_changes>
<breaking_change_details>If YES, describe what breaks and for whom</breaking_change_details>
<findings>
  For each finding:
  - [CRITICAL/MAJOR/MINOR] Category: Description
  - File: path (line range)
  - Evidence: specific code reference
  - Suggestion: how to fix
</findings>
<blocking_issues>Issues that MUST be fixed before publish. Empty if PASS.</blocking_issues>
""")
レイヤー 2:/review-work による包括的レビュー(ゲートレビュアー 1 人)

/review-work スキルを読み込むサブエージェントを起動します。review-work スキルは実際の対象で手動 QA を実施し、その後、目標への適合性、コード品質、セキュリティ、見落とされたコンテキスト、QA の証拠を監査するゲートレビュアー(オラクル)を 1 人だけ起動します。レビューに合格するのは、QA マトリックスに問題がなく、かつ APPROVE の場合のみです。

task(
  category="unspecified-high",
  model="gpt-5.6-sol",
  run_in_background=true,
  load_skills=["review-work"],
  description="Run /review-work on all unpublished changes",
  prompt="""
Run /review-work on the unpublished changes between v{PUBLISHED} and HEAD.

GOAL: Review all changes heading into npm publish of oh-my-opencode. These changes span {COMMIT_COUNT} commits across {FILE_COUNT} files.

CONSTRAINTS:
- This is a plugin published to npm — public API stability matters
- TypeScript strict mode, Bun runtime
- No `as any`, `@ts-ignore`, `@ts-expect-error`
- Factory pattern (createXXX) for tools, hooks, agents
- kebab-case files, barrel exports, no catch-all files

BACKGROUND: Pre-publish review of oh-my-opencode, an OpenCode plugin with 1268 TypeScript files, 160k LOC. Changes since v{PUBLISHED} are about to be published.

The diff base is: git diff v{PUBLISHED}..HEAD

Follow the /review-work skill flow exactly — run the manual QA phase, launch the gate reviewer, and collect its verdict. Do NOT skip the QA phase or the reviewer.
""")
レイヤー 3:オラクルによるリリース統合(エージェント 1 人)

オラクルは、すべてのコミット、差分統計の全容、変更されたファイルの一覧など、全体像を把握します。最終的なリリース準備状況の評価を行います。

task(
  subagent_type="oracle",
  model="gpt-5.6-sol",
  run_in_background=true,
  load_skills=[],
  description="Oracle: overall release synthesis and version bump recommendation",
  prompt="""
<review_type>RELEASE SYNTHESIS — OVERALL ASSESSMENT</review_type>

<project>oh-my-opencode (npm package)</project>
<published_version>{PUBLISHED}</published_version>
<local_version>{LOCAL}</local_version>

<all_commits>
{ALL COMMITS since published version — hash, message, author, date}
</all_commits>

<diff_stat>
{DIFF_STAT — files changed, insertions, deletions}
</diff_stat>

<changed_files>
{CHANGED_FILES — full list of modified file paths}
</changed_files>

<full_diff>
{FULL_DIFF — the complete git diff between published version and HEAD}
</full_diff>

<file_contents>
{Read and include full content of KEY changed files — focus on public API surfaces, config schemas, agent definitions, hook registrations, tool registrations}
</file_contents>

You are the final gate before an npm publish. 10 ultrabrain agents are reviewing individual changes and the review-work gate reviewer is doing the holistic review. Your job is the bird's-eye view that those focused reviews might miss.

SYNTHESIS CHECKLIST:

1. **Release Coherence**: Do these changes tell a coherent story? Or is this a grab-bag of unrelated changes that should be split into multiple releases?

2. **Version Bump**: Based on semver:
   - PATCH: Bug fixes only, no behavior changes
   - MINOR: New features, backward-compatible changes
   - MAJOR: Breaking changes to public API, config format, or behavior
   Recommend the correct bump for each release layer and the overall workflow with specific justification.

3. **Breaking Changes Audit**: Exhaustively list every change that could break existing users. Check:
   - Config schema changes (new required fields, removed fields, renamed fields)
   - Agent behavior changes (different prompts, different model routing)
   - Hook contract changes (new parameters, removed hooks, renamed hooks)
   - Tool interface changes (new required params, different return types)
   - CLI changes (new commands, changed flags, different output)
   - Skill format changes (SKILL.md schema changes)

4. **Migration Requirements**: If there are breaking changes, what migration steps do users need? Is there auto-migration in place?

5. **Dependency Changes**: New dependencies added? Dependencies removed? Version bumps? Any supply chain risk?

6. **Changelog Draft**: Write a draft changelog entry grouped by:
   - feat: New features
   - fix: Bug fixes
   - refactor: Internal changes (no user impact)
   - breaking: Breaking changes with migration instructions
   - docs: Documentation changes

7. **Deployment Risk Assessment**:
   - SAFE: Routine changes, well-tested, low risk
   - CAUTION: Significant changes but manageable risk
   - RISKY: Large surface area changes, insufficient testing, or breaking changes without migration
   - BLOCK: Critical issues found, do NOT publish

8. **Post-Publish Monitoring**: What should be monitored after publish? Error rates, specific features, user feedback channels.

OUTPUT FORMAT:
<verdict>SAFE / CAUTION / RISKY / BLOCK</verdict>
<recommended_version_bump>PATCH / MINOR / MAJOR</recommended_version_bump>
<layer_specific_version_bump>omo pure components: PATCH/MINOR/MAJOR; omo opencode: PATCH/MINOR/MAJOR; omo codex: PATCH/MINOR/MAJOR</layer_specific_version_bump>
<version_bump_justification>Why this bump level</version_bump_justification>
<release_coherence>Assessment of whether changes belong in one release</release_coherence>
<breaking_changes>
  Exhaustive list, or "None" if none.
  For each:
  - What changed
  - Who is affected
  - Migration steps
</breaking_changes>
<changelog_draft>
  Ready-to-use changelog entry
</changelog_draft>
<deployment_risk>
  Overall risk assessment with specific concerns
</deployment_risk>
<monitoring_recommendations>
  What to watch after publish
</monitoring_recommendations>
<blocking_issues>Issues that MUST be fixed before publish. Empty if SAFE.</blocking_issues>
""")

フェーズ 3:結果の収集

エージェントが完了したら(システム通知)、background_output(task_id="...") を使って結果を収集します。

表で完了状況を追跡します。

#エージェント種別状態判定
1-10Ultrabrain:{group_name}ultrabrainpending—
11Review-Work コーディネーターunspecified-highpending—
12リリース統合オラクルoraclepending—

すべてのエージェントが完了するまで、最終レポートを提出してはいけません。


フェーズ 4:最終判定

<verdict_logic>

BLOCK とする条件:

  • オラクルの判定が BLOCK
  • ultrabrain のいずれかが重大なブロッキング問題を発見した
  • Review-work が MAIN エージェントのいずれかで失敗した

RISKY とする条件:

  • オラクルの判定が RISKY
  • 複数の ultrabrain が CAUTION または FAIL を返した
  • Review-work は合格したが、重大な指摘事項がある

CAUTION とする条件:

  • オラクルの判定が CAUTION
  • 少数の ultrabrain が軽微な問題を指摘した
  • Review-work に問題なく合格した

SAFE とする条件:

  • オラクルの判定が SAFE
  • すべての ultrabrain が合格した
  • Review-work に合格した

</verdict_logic>

最終レポートをまとめます。

# Pre-Publish Review — oh-my-opencode

## Release: v{PUBLISHED} -> v{LOCAL}
**Commits:** {COMMIT_COUNT} | **Files Changed:** {FILE_COUNT} | **Agents:** {AGENT_COUNT}

---

## Overall Verdict: SAFE / CAUTION / RISKY / BLOCK

## Recommended Version Bump: PATCH / MINOR / MAJOR
{Justification from Oracle}

## Layer-specific Version Recommendation

| Layer | Recommendation | Reason |
|---|---|---|
| omo pure components | PATCH/MINOR/MAJOR | ... |
| omo opencode | PATCH/MINOR/MAJOR | ... |
| omo codex | PATCH/MINOR/MAJOR | ... |

---

## Per-Change Analysis (Ultrabrains)

| # | Change Group | Verdict | Risk | Breaking? | Blocking Issues |
|---|-------------|---------|------|-----------|-----------------|
| 1 | {name} | PASS/FAIL | SAFE/CAUTION/RISKY | YES/NO | {count or "none"} |
| ... | ... | ... | ... | ... | ... |

### Blocking Issues from Per-Change Analysis
{Aggregated from all ultrabrains — deduplicated}

---

## Holistic Review (Review-Work)

| # | Review Area | Verdict | Confidence |
|---|------------|---------|------------|
| 1 | Manual QA (orchestrator, real surface) | PASS/FAIL | - |
| 2 | Gate Review (goal, code quality, security, context, QA audit) | APPROVE/REJECT | HIGH/MED/LOW |

### Blocking Issues from Holistic Review
{Aggregated from review-work}

---

## Release Synthesis (Oracle)

### Breaking Changes
{From Oracle — exhaustive list or "None"}

### Changelog Draft
{From Oracle — ready to use}

### Deployment Risk
{From Oracle — specific concerns}

### Post-Publish Monitoring
{From Oracle — what to watch}

---

## All Blocking Issues (Prioritized)
{Deduplicated, merged from all three layers, ordered by severity}

## Recommendations
{If BLOCK/RISKY: exactly what to fix, in priority order}
{If CAUTION: suggestions worth considering before publish}
{If SAFE: non-blocking improvements for future}

アンチパターン

違反重大度
すべてのエージェントを待たずに公開するCRITICAL
ultrabrain を並列ではなく順次起動するCRITICAL
いずれかのエージェントで run_in_background=false を使用するCRITICAL
オラクルによる統合を省略するHIGH
オラクル用にファイルの内容を読み込まない(オラクルはファイルを読み取れません)HIGH
変更を 1~2 個の ultrabrain にまとめ、分散しないHIGH
すべてのエージェントが完了する前に判定を出すHIGH
ultrabrain のプロンプトに差分を含めないMAJOR

コメント