Communitygithub.com

ultragoal

複数セッションにまたがる耐久性のあるマルチゴールワークフロー。計画と台帳のアーティファクトを .omc/ultragoal に保存し、アクティブセッション向けの Claude /goal ハンドオフテキストを出力します。

ultragoal とは?

Ultragoal は、大きなタスクを複数のゴール(ストーリー)に分割し、各ストーリーの開始、チェックポイント、ブロッカー、失敗などのイベントを追跡するための耐久性のある追記専用台帳をリポジトリに保持します。Claude Code の `/goal` スラッシュコマンドと連携することで、セッションをまたいだ長期的な作業の進捗を維持し、セッション再起動時に進捗が失われるのを防ぎます。また、最終完了時には `ai-slop-cleaner`、検証、コードレビューのゲートを通過するよう強制し、品質を保証します。Ultragoal 自体はシェルから `/goal` を呼び出せないため、アクティブなモデルに対してハンドオフテキストを表示し、ユーザーが `/goal` を手動で設定するよう促す設計になっています。複数の並列セッションやワークツリーでも動作し、プランIDとセッションIDで状態を分離して管理できます。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/ultragoal

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

<Use_When>

  • ユーザーが、複数の Claude セッションやワークツリーをまたいでウルトラゴールを追跡するための、リポジトリネイティブな耐久性のある方法を必要としている場合
  • 作業が十分に大きく、試行回数とストーリーごとの証拠を伴う複数の順序付けられた「ストーリー」が必要な場合
  • 最終的な完了が ai-slop-cleaner + 検証 + $code-review のゲートを通過する必要がある場合
  • アクティブな Claude /goal ディレクティブを台帳と連携させ、セッション再起動時に進捗が失われないようにしたい場合 </Use_When>

<Do_Not_Use_When>

  • タスクが単一の小さな変更である場合 — 代わりに直接委任または ralph を使用してください
  • ユーザーがアシスタントにシェルから /goal を直接呼び出させたい場合 — それは不可能です。omc ultragoal はアーティファクトを書き込み、ハンドオフテキストを表示するだけです
  • ユーザーが実行ループなしの計画専用アーティファクトを必要としている場合 — 代わりに plan を使用してください </Do_Not_Use_When>

<Why_This_Exists> Claude Code の /goal はセッションスコープの Stop フックです。セッションが条件を満たすまで停止するのを防ぎ、成功時に自動的にクリアされます。これは優れた単一セッション実行プリミティブですが、セッションをまたいで状態を保持できず、最終レビューゲートを強制しません。omc ultragoal は耐久性のある計画、台帳、ゲーティング層を追加することで、長いマルチステップの取り組みがセッション再起動、新しいワークツリー、レビューの反復を耐え抜き、同時に Claude /goal を活用してアクティブなエージェントの集中力を維持できるようにします。 </Why_This_Exists>

<How_To_Use>

  1. ブリーフから計画を作成する:

    omc ultragoal create-goals --brief-file plan.md
    

    または明示的なストーリーを使用:

    omc ultragoal create-goals --brief "ship the migration" \
      --goal "Schema::Add new columns" \
      --goal "Backfill::Backfill rows in batches" \
      --goal "Cutover::Drop old columns and switch reads"
    

    デフォルトモードは aggregate(1つのClaude /goal が全体をカバー)です。 各ストーリーに個別の /goal が必要な場合は --claude-goal-mode per-story を渡してください。

    マルチリポジトリワークスペース / 並列セッション: 同じワークスペース内の複数のClaudeセッションが同時に /ultragoal を実行する必要がある場合、--plan-id <stable-id> または --auto-plan-id を渡して、計画が共有の単一計画パスではなく .omc/ultragoal/plans/{planId}/ に書き込まれるようにします。このフラグがないと、2つのセッションがゴールを作成するときに互いに上書きする可能性があります。--auto-plan-id はブリーフのタイトルから {epochMs}-{slug} を導出します。その後、同じセッション内のすべての後続サブコマンドに同じ --plan-id <id> をスレッド化します。必要に応じて omc ultragoal list-plans を使用して利用可能な planId を列挙できます。

  2. 次のストーリーを開始(または再開)する:

    omc ultragoal complete-goals [<goal-id>]
    

    ゴールIDなしの場合、アクティブなストーリーを再開するか、最初の保留中のストーリーを開始するデフォルトの動作を維持します。ゴールIDを指定すると、OMCはその名前の対象となるストーリー(保留中のストーリーは順序に関係なく開始可能)を正確にターゲットにします。他のアクティブなストーリー、不明なID、完了済みまたはレビューブロック中のストーリー、失敗したストーリー(--retry-failed なし)は、状態を変更せずに拒否されます。進行中の名前付きストーリーは、試行回数を変更せずに再開されます。このコマンドはモデル向けハンドオフテキストを表示します。アクティブなClaudeエージェントはそれを読み、以下のことを行う必要があります:

    • このセッションのネイティブClaude /goal を設定する — スタンドアロンのClaude Codeでは、シェルもエージェントもそれを実行できないため、ユーザーに /goal <集約目標> と入力するよう依頼し、待機します。--claude-goal-json(以下参照)は台帳のみを調整し、PreToolUse /goal ガードを満たしません。このガードはアクティブな /goal が観測されるまでツール呼び出しをブロックします。
    • ストーリーを実行する。
    • ストーリーが完了したら(最終ストーリーの場合は、完全な品質ゲートの後)、アクティブな /goal 状態のスナップショットを共有し、checkpoint を呼び出す。
  3. ストーリーをチェックポイントする:

    omc ultragoal checkpoint --goal-id G001-... --status complete \
      --evidence "tests/files/PR の証拠" \
      --claude-goal-json '{"goal":{"objective":"...","status":"active"}}'
    

    最終ストーリーの場合は、--quality-gate-json も渡し、aiSlopCleaner、verification、codeReview の証拠(すべてクリーン)を含めます。

  4. 最終レビューがクリーンでない場合、完了とマークしないでください。ブロッカーを記録します:

    omc ultragoal record-review-blockers --goal-id G00X-... \
      --title "コードレビューブロッカーを解決" \
      --objective "指摘されたレビュー結果を修正し、最終ゲートを再実行" \
      --evidence "<レビュー結果>" \
      --claude-goal-json '{"goal":{"objective":"...","status":"active"}}'
    

    これにより、新しいブロッカーストーリーが追加され、Claude /goal はアクティブのままになります。

  5. いつでも状態を確認する:

    omc ultragoal status
    

</How_To_Use>

<Important_Limitations>

  • シェルは Claude Code の /goal 状態を呼び出したり変更したりできません。omc ultragoal は耐久性のあるアーティファクトを永続化し、アクティブな Claude エージェントがセッション内で読み取り、実行するための指示を表示するだけです。
  • --claude-goal-json を介して渡されるスナップショットは、アクティブな /goal 状態のモデル提供による証明であり、OMC はそれらを計画の期待される目標と台帳イベントとテキスト的に一貫しているか検証しますが、Claude /goal の状態を独立して観測することはできません。これらは PreToolUse /goal ガードを満たしません。このガードには実際のアクティブな /goal が必要です — ホストが挿入したスナップショットや、ユーザーがセッション内で設定したネイティブの /goal が必要です。
  • Claude /goal スラッシュコマンドの名前や構造が変更された場合、ハンドオフの文言のみを変更する必要があります。調整ロジックは名前に依存しません。 </Important_Limitations>

並列セッションの注意点

  • マルチリポジトリワークスペースアンカー: 親ディレクトリに .omc-workspace マーカーを配置すると、サブリポジトリをまたがる複数のセッションが1つの .omc/ を共有できます。解決順序: OMC_STATE_DIR > .omc-workspace > git > cwd。docs/REFERENCE.md を参照してください。
  • セッションIDのソース: CLI コンテキストでは OMC_SESSION_ID 環境変数が優先され、フックコンテキストではフックペイロードの data.session_id が優先されます。
  • プランID(該当する場合): 同じワークスペース内の2つの実行は、共有の計画アーティファクトで競合します。個別のセッションIDを使用するか(フックペイロードの session_id はすでに Claude Code セッションごとに分離されています)、--plan-id を渡して並列のウルトラゴール実行を別々の台帳に保持します。
  • 並列判定: サポートされています(各セッションは独自のセッションスコープ状態を書き込みます)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

agent-doc-discipline

Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

hud

Configure HUD display options (layout, presets, display elements)

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

minimal-code-discipline

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

関連スキル