ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 DannyMac180

next-steps-supervisor

実際に作業をしたターンの後で会話を分岐し、目標を達成したか、どこで手を抜いたか、何を承認すべきかを尋ね、プロンプトの上にワンクリックの次のステップボタン付き判定バーを表示する Claude Code プラグインです。

DannyMac180@DannyMac180

DannyMac180/skills/tree/main/modsmith/templates/next-steps-supervisor

翻訳済み

この mod について

next-steps-supervisor は、何かを変更したすべてのターンにセカンドオピニオンを与える Claude Code プラグインのテンプレートです。メインループのターンが回答で終わり、読み取り専用ではないツールを実行したか、8+ 回のツール呼び出しを行った場合、分岐した会話のコピーが4つの質問をします。元の目標、達成できたか(はい/一部/いいえ)、どこで手を抜いたか(実行していないテスト、残したスタブ、未検証の主張)、事前承認が必要なものはあったか、です。結果に問題がなければ1行に折りたたまれ、それ以外は不足点や取った近道、次のプロンプトとして送信できる実行可能な次のステップボタン(ショートカット n と m)を展開します。Dismiss で判定を消去できます。$.model.fork の契約により、分岐の内容はメイン会話に入らないため、メインコンテキストは増えません。コマンドは /supervisor で切り替え(保存されます)、/supervisor on|off、/supervisor now で即時チェックです。quiz-after、token-weather、assumption-ledger、mode-registry/effort-modes と組み合わせてもショートカットは競合しません。claude --plugin-dir /path/to/next-steps-supervisor でインストールし、claude plugin validate と claude plugin test で検証します。条件に合うターンごとに $.model.fork を1回使い、トランスクリプトはプロンプトキャッシュされ、判定バーには毎回実際の token 数が表示されます。ファイルには .claude-plugin/plugin.json、hooks/hooks.json、hooks/register.tsx、hooks/verdict.ts、types/index.d.ts、tests/supervisor.test.tsx が含まれます。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add DannyMac180/skills
claude plugin install next-steps-supervisor
原文 / README

next-steps-supervisor

A second opinion on every turn that did real work. When Claude finishes a turn that changed something, a forked copy of the conversation asks four questions about it:

  • What was the original goal?
  • Did the work actually achieve it? (yes, partly, no)
  • Where did it cut corners: tests not run, a stub left in, a claim never checked?
  • Did it do anything you should have approved first?

The answer is drawn above the prompt. A clean result takes one line:

✓ Supervisor: Solved · Add retry with backoff to the API client
[ Run the full test suite ]  [ Dismiss ]

Anything else expands:

◐ Supervisor: Partly solved · fork: 48k cached, 0.2k new, 0.1k out
Goal: Add retry with backoff to the API client
Gaps
  · No retry on 429 responses
Shortcuts taken
  · Tests were written but never run
[ Run the client tests and fix failures ]  [ Handle 429 with Retry-After ]  [ Dismiss ]

Each next-step button sends that step as your next prompt (hotkeys n and m once the band has focus). Dismiss clears the verdict. A new turn clears it too.

None of this enters the main conversation: by $.model.fork's documented contract the fork's question and answer stay outside the transcript, so the main context does not grow. (In the first live run nothing from the fork reached the main conversation; see DECISIONS.md.)

Commands

| Command | Does | | --- | --- | | /supervisor | Toggle on/off (saved across sessions) | | /supervisor on / off | Set it explicitly | | /supervisor now | Check the last turn right away, even when off or un-gated |

What it costs

One $.model.fork per qualifying turn, and only then.

  • When it runs: after a main-loop turn that ended with an answer and either ran at least one tool that was not read-only (an edit, a write, a shell command) or made 8 or more tool calls. At most once per turn. Never on chat-only turns, interrupted turns, subagent turns, or while off. If a turn ends while the previous turn's fork is still out, that old reply is dropped and the newer turn is checked as soon as it returns.
  • How much: the fork re-sends the main thread's last request with the question appended, so the API serves the transcript from its prompt cache. You pay cache-read price on the transcript (typically about a tenth of normal input), full price on the ~250-token question plus Claude's final reply for the turn (quoted in the question, capped at its last 4,000 characters, so at most about 1k tokens), and output on a reply of roughly 100-300 tokens. On a 50k-token session that is about 5-6k input-equivalent tokens per check. These are estimates, not measurements. The band shows the real numbers each time (fork: 48k cached, 0.2k new, 0.1k out).
  • When it gets expensive: if the cache entry has lapsed (typically about 5 minutes after the main thread's last request) or right after /model, the fork pays full price for the whole transcript. The cached figure falls to near zero when that happens.
  • It never runs a second time for the same turn. The fork only reads the main thread's cached prefix and its own tail is never cached, so it should not make the next real turn more expensive.

Composes with

  • quiz-after: both mods fork after a turn and both draw above the prompt. This mod draws its verdict and then {await next(e)} underneath, so the quiz (and anything else below it in the chain) still shows. Neither hides the other. Hotkeys are chosen not to clash: quiz-after uses 1-3, s, x; this mod uses n, m.
  • token-weather and other AbovePrompt bands: same rule, they draw below.
  • assumption-ledger: the ledger records what Claude assumed; the supervisor judges whether the result met the goal. Running both gives you "what it assumed" and "whether it worked" side by side.
  • mode-registry / effort-modes: no direct link. A future mode could turn the supervisor on only for high-effort domains (API, security).

When a survey holds the band, this mod yields completely and draws only what is below it.

Install / load

claude --plugin-dir /path/to/next-steps-supervisor

Check it before loading:

claude plugin validate /path/to/next-steps-supervisor
claude plugin test /path/to/next-steps-supervisor

Files

.claude-plugin/plugin.json   manifest, types pointer
hooks/hooks.json             { "modules": ["./register.tsx"] }
hooks/register.tsx           gating, the fork, /supervisor, the band
hooks/verdict.ts             fork prompt and a tolerant JSON parser
types/index.d.ts             Verdict type and PluginState entry
tests/supervisor.test.tsx    gating, final-reply quote, queued check, drawing with what is below, button submit

関連作品