Skip to content

feat(skills): make refine target-aware with per-model refiner prompts - #2901

Merged
namastex888 merged 2 commits into
devfrom
feat/refine-multi-llm
Sep 15, 2026
Merged

namastex888 merged 2 commits into
devfrom
feat/refine-multi-llm

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

refine now routes to a per-target refiner prompt, so the same skill can rewrite a prompt to the official guidelines of whichever model will run it. Draft on purpose: it is held out of dev until the surgical release from #2896 is cut.

  • Target registry and resolution in skills/refine/SKILL.md: refine [--for <target or alias>] @file | <text>. Resolution order is explicit --for, then the active runtime's model family, then claude-fable-5-1. An unregistered target stops and lists the available targets; it never falls back to another model's guide silently.
  • Per-target prompts live at skills/refine/prompts/<vendor>-<model>-<version>.md. The Fable 5.1 refiner moves from optimizer.md to claude-fable-5-1.md and now cites its sources. Adding a target is one prompt file plus one registry row, so parallel per-model agents never touch the same lines.
  • Shared shape for every refiner prompt is spelled out in SKILL.md (shape-first classification, patches over rewrites, a delete list, a vendor-quoted checklist with trigger/add/skip, cross-model blocks, a shape table, a self-check, three to five examples).
  • Handoff brief at skills/refine/README.md: a copy-paste brief for an agent running on another model to research its vendor's official prompting guide, write its refiner prompt from it using the Fable file as the shape example (not the content), register the target, verify, dogfood, and open its own PR.
  • Refiner fix from dogfood (second commit): "ALWAYS answer in bullet points" was being replaced by the conditional formatting rule, changing the author's intent. The delete list now separates the shouting from the rule, item 6 keeps formatting mandates, and the self-check forbids adaptations inside verbatim blocks.

Verification

  • bun run check:fast passed on push; bun run skills:lint is green on 73 files; the skills lint and inventory parity tests pass (69 tests).
  • Router dogfood, unknown target: refine --for gemini @file stopped before reading the input, dispatched nothing, wrote nothing, listed the one registered target, and pointed at the handoff brief.
  • Router dogfood, alias: refine --for fable @file resolved to claude-fable-5-1, dispatched the refiner with the input in <prompt_to_refine> tags, got a bare prompt body with zero tool calls, overwrote the file in place, and reported in the new shape. That run exposed the two refiner defects fixed in the second commit.

Not in scope

No non-Claude target ships here; each is added by an agent on that model following the README brief, as its own PR to dev.

https://claude.ai/code/session_01TQrNGJjSSiQEKCHoNX7gdJ

The refine skill now routes to a per-target refiner prompt under
prompts/<vendor>-<model>-<version>.md, chosen with --for <target or
alias>, defaulting to the active runtime's model family and then to
claude-fable-5-1. An unregistered target stops with the list of
available targets instead of falling back to another model's guide.

The Fable 5.1 refiner moves from prompts/optimizer.md to
prompts/claude-fable-5-1.md and cites its sources. SKILL.md carries the
target registry, the resolution order, and the section shape every
refiner prompt shares. skills/refine/README.md is the handoff brief for
an agent adding a target for the model it runs on: research the
vendor's official guide, write the prompt from it using the Fable file
as the shape example, add one registry row, verify, and open a PR.

Claude-Session: https://claude.ai/code/session_01TQrNGJjSSiQEKCHoNX7gdJ
Dogfood showed the refiner turning "ALWAYS answer in bullet points"
into the conditional formatting rule, which changed the author's
intent. The delete list now separates shouting from the rule: the
ALL-CAPS goes, the instruction stays. Item 6 says a rule that mandates
formatting is an author decision to keep, and the self-check says an
adaptation goes beside a verbatim block, never inside it.

Claude-Session: https://claude.ai/code/session_01TQrNGJjSSiQEKCHoNX7gdJ
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: cc49a169-bace-4151-b18c-c2621f90c85b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@namastex888
namastex888 marked this pull request as ready for review September 15, 2026 11:18
@namastex888
namastex888 merged commit e43090a into dev Sep 15, 2026
18 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-15T11:19:34.583752Z 68a5867 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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