بنقرة واحدة
reasoning-sandwich
Template for pre-reasoning → action → post-verification model allocation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Template for pre-reasoning → action → post-verification model allocation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Full R017 verification (5+3 rounds) before commit
Load a skill profile to switch active plugin set. Use when user wants to focus on a specific workflow (web-app/data-eng/harness-dev/minimal) and reduce skill enumeration block size per
6-stage structured development cycle with stage-based tool restrictions
Deploy applications to Vercel with auto-detection and preview URLs
Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile
Monitor Claude Code releases and auto-generate GitHub issues for each new version
| name | reasoning-sandwich |
| description | Template for pre-reasoning → action → post-verification model allocation |
| scope | core |
| user-invocable | false |
A model allocation pattern that wraps implementation actions with stronger-model reasoning phases. The "sandwich" structure ensures complex tasks get proper analysis before and verification after the core action.
[Pre-reasoning] → stronger model (opus)
├── Analyze requirements
├── Identify edge cases
└── Define success criteria
[Action] → balanced model (sonnet)
├── Implement solution
├── Generate code/content
└── Execute plan
[Post-verification] → balanced or lighter model (sonnet/haiku)
├── Verify against criteria
├── Check for regressions
└── Validate completeness
| Phase | Recommended Model | Rationale |
|---|---|---|
| Pre-reasoning (analyze/plan) | opus | Complex architectural reasoning, edge case detection |
| Pre-reasoning (Opus 4.8) | opus48 | Opus 4.8 makes fewer tool calls and reasons more deeply; pre-reasoning phase should include explicit tool batch planning |
| Action (implement/generate) | sonnet | Optimized for code generation, balanced cost |
| Post-verification (review/test) | sonnet or haiku | Structural verification, checklist validation |
| Scenario | Apply Sandwich? | Reason |
|---|---|---|
| New feature implementation | Yes | Needs analysis → code → verification |
| Bug fix with clear root cause | No | Direct action sufficient |
| Architecture decision | Yes | Heavy pre-reasoning, lighter action |
| Batch file edits | No | Mechanical action, no reasoning needed |
| Security-sensitive changes | Yes | Extra verification phase critical |
This pattern is used by:
structured-dev-cycle — stages map to sandwich phasesevaluator-optimizer — generator/evaluator model selection guidancedeep-plan — research (pre) → plan (action) → verify (post)| Anti-pattern | Problem | Fix |
|---|---|---|
| Opus for everything | Wasteful, slow | Reserve opus for reasoning-heavy phases |
| Haiku for planning | Insufficient depth | Use opus for complex analysis |
| Skipping verification | False completion risk | Always include post-verification phase |
| Forcing frequent tool calls on Opus 4.8 | Fights model's natural reasoning-first tendency | Let Opus 4.8 reason; batch tool calls in pre-reasoning |
Opus 4.8 exhibits a distinct behavioral pattern: fewer tool calls with deeper reasoning per call. This affects how the sandwich pattern is applied:
| Aspect | Opus 4.6 | Opus 4.8 |
|---|---|---|
| Tool call frequency | Moderate | Lower |
| Reasoning depth per call | Standard | Deeper |
| Pre-reasoning benefit | Plan what to check | Plan explicit tool batch — model will under-call if not guided |
When using Opus 4.8 in the pre-reasoning phase:
Reference: Best practices for using Claude Opus 4.8 with Claude Code