# Multi-Provider Agent Prompt Analysis

**Date**: 2025-11-21  
**Sources**: 5 SST OpenCode provider prompts (anthropic, beast, codex, gemini, polaris)  
**Objective**: Identify universal patterns vs provider-specific approaches

## Universal Patterns (5/5 providers)

### 1. Extreme Conciseness
- **Anthropic**: "< 4 lines typical response" (metric-based)
- **Beast**: "Casual, friendly yet professional tone"
- **Codex**: "Keep concise, 8-12 words for quick updates"
- **Gemini**: "Short and concise on CLI"
- **Polaris**: "Short and concise"
- **Convergence**: Metric matters. Aim for <4 lines unless complexity requires more.

### 2. Tool Batching / Parallelism
- **ALL 5**: Multiple independent calls → single message
- **Anthropic**: "batch independent calls in ONE message"
- **Codex**: "logically group related actions"
- **Gemini**: "multiple independent calls in parallel"
- **Polaris**: "maximize use of parallel tool calls"
- **Convergence**: Parallel execution is expected, not optional.

### 3. Code References
- **ALL 5**: Standardized format required
- **Anthropic**: `file:line_number`
- **Codex**: `file_path:line_number`, avoid broken citations
- **Gemini**: `file_path:line_number`
- **Polaris**: `file_path:line_number`
- **Convergence**: Standardized format enables CLI navigation.

### 4. Plan/TODO Discipline
- **Beast**: "display steps with emoji status"
- **Codex**: "create todo list + mark completed immediately"
- **Polaris**: "use TodoWrite frequently, mark completed soon"
- **Convergence**: Plan BEFORE work starts. Track progress immediately, not batched.

### 5. No Unnecessary Preamble/Postamble
- **Anthropic**: "no unnecessary preamble/postamble"
- **Codex**: "avoid preamble for trivial reads"
- **Gemini**: "do not provide summaries unless asked"
- **Polaris**: "do not provide summaries unless asked"
- **Convergence**: Skip "Here's what I did..." explanations. Direct answers only.

### 6. Professional Objectivity
- **Anthropic**: "disagree when necessary, prioritize facts"
- **Codex**: "avoid excessively verbose explanations"
- **Gemini**: "prioritize technical accuracy over validation"
- **Polaris**: "prioritize technical accuracy over validation"
- **Convergence**: Truth over comfort. Correct poor patterns, don't validate them.

### 7. Extreme Autonomy
- **Beast**: "fully solve autonomously, don't end without everything checked off"
- **Codex**: "only terminate when sure problem solved"
- **Gemini**: "autonomously resolve before coming back"
- **Polaris**: "keep going until query completely resolved"
- **Convergence**: Don't ask permission within scope. Solve completely.

### 8. Verification Required
- **Beast**: "extensive internet research, recursive webfetch"
- **Codex**: "verify with tests/linting before finalizing"
- **Gemini**: "validate work with tests"
- **Polaris**: "validate with build/lint/tests"
- **Convergence**: Don't assume. Verify with tools before shipping.

### 9. No Emoji Instructions (Default)
- **Anthropic**: "Only if explicitly requested"
- **Polaris**: "Only if explicitly requested"
- **Convergence**: No emojis unless user asks. Keep output clean.

## Major Differences (Provider-Specific)

### Anthropic (Latest, Most Refined)
- **Lines**: ~200 (78% reduction from others)
- **Security**: Explicit "defensive tasks only" FIRST
- **Metric**: "< 4 lines concise response" (quantified)
- **Preamble**: Minimal, focus on direct answers
- **Strategy**: Maximum signal, minimum noise

### Beast (Oldest, Most Verbose)
- **Lines**: 650+
- **Emphasis**: Iteration, recursion, autonomy
- **Research**: Heavy webfetch emphasis
- **Workflow**: Long step-by-step sections
- **Strategy**: Comprehensive guidance, assume less knowledge

### Codex (Open Source Focus)
- **Lines**: 500+
- **AGENTS.md**: Project convention spec support
- **Preamble**: 1-2 sentences before tool calls (tactical)
- **Safety**: Explicit sandboxing/approval handling
- **Strategy**: Production-safe, respect project conventions

### Gemini (Google, Minimalist)
- **Lines**: 350
- **Tone**: CLI-focused, conversational
- **TodoWrite**: Heavy emphasis (implicit discipline)
- **Research**: Minimal (assumes Google integration)
- **Strategy**: Lean, assume strong base model

### Polaris (Latest Variant)
- **Lines**: 400
- **Focus**: TodoWrite discipline, professional objectivity
- **No security**: Newer providers trust base model
- **Multi-task**: Emphasis on task management
- **Strategy**: Balance between Anthropic conciseness and Codex safety

## Evolution Trend (Older → Newer)

```
VERBOSITY:    Verbose (650+) → Minimal (200)
SECURITY:     Optional → Table-stakes (security first)
WORKFLOWS:    Detailed → Facts-only sections
SUMMARIES:    Required → Discouraged
INITIATIVE:   Passive → Proactive autonomy
METRICS:      Implicit → Explicit (< 4 lines)
SAFETY:       Assume knowledge → Verify everything
```

## Key Learning: Preamble Strategy

**Critical nuance**: SST providers distinguish between:

1. **Trivial operations** (read single file): No preamble
2. **Big tool calls** (batch operations, complex tasks): 1-2 sentence preamble
3. **Multi-step work**: Progress updates at reasonable intervals

Example (Codex):
```
Before: "I've explored the repo; now checking the API route definitions."
        "Next, I'll patch the config and update the related tests."
```

Not every action needs preamble—only big/grouped actions.

## Implications for OpenCodeKit

### Must Have (Universal)
1. ✅ Metric-based conciseness (< 4 lines)
2. ✅ Tool batching / parallel execution
3. ✅ Code references: `file:line_number` format
4. ✅ Plan BEFORE work, track immediately
5. ✅ No postamble explanations
6. ✅ Professional objectivity (truth over comfort)
7. ✅ Extreme autonomy (keep going until done)
8. ✅ Verify with tools, don't assume

### Should Have (4/5 providers)
1. ✅ Security constraint section (4/5, Anthropic makes it table-stakes)
2. ✅ Preamble strategy (1-2 sentences before big actions)
3. ✅ AGENTS.md convention enforcement (Codex critical for open source)
4. ✅ Verification emphasis (Codex/Beast/Polaris)

### Nice to Have (Provider-Specific)
- Emoji status tracking (Beast only)
- Sandboxing/approval handling (Codex, for production safety)
- Research recursion (Beast emphasis)

## Implementation Status

### ✅ Completed
- Security constraints in primary agents
- Metric-based conciseness (< 4 lines)
- Code references: `file:line_number` format
- Tool batching / parallelism expectation
- No postamble requirement
- Professional objectivity section
- AGENTS.md convention enforcement
- Verification emphasis
- No emoji instructions (default)
- Extreme autonomy clause

### 🔄 In Progress
- Preamble strategy (1-2 sentences before big calls)
- Per-agent preamble examples

### 📋 Future
- Measure actual response conciseness
- Test with multiple LLM providers
- Refine based on real-world usage

## Reference Links

- **Anthropic**: Most refined, latest standards
- **Beast**: Most comprehensive, deepest autonomy
- **Codex**: Best open-source practices, project convention support
- **Gemini**: Most minimal, Google-specific integrations
- **Polaris**: Best TodoWrite discipline, latest production variant

---

**Key Insight**: The convergence of patterns across 5 independent providers (Anthropic, LLaMA-based, OpenAI-derived, Google, proprietary) suggests these aren't marketing preferences—they're empirically validated patterns that work across model architectures.

Smaller, security-first, autonomously-driven agents consistently outperform verbose, permission-seeking prompts in production environments.
