@preapexis/piexis 0.2.2 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -131
- package/apps/server/src/index.ts +97 -0
- package/apps/server/src/session-manager.ts +95 -0
- package/apps/server/src/workspace.ts +39 -0
- package/{tsconfig.json → apps/server/tsconfig.json} +3 -3
- package/apps/web/dist/assets/index-D4n3_lAw.js +10 -0
- package/apps/web/dist/assets/index-igiK0FPY.css +1 -0
- package/apps/web/dist/index.html +3 -0
- package/bin/piexis-web.mjs +24 -0
- package/extensions/agents.ts +205 -0
- package/extensions/ask-question.ts +54 -95
- package/extensions/recommended-tools.ts +62 -0
- package/extensions/ui.ts +204 -58
- package/extensions/webui.ts +45 -0
- package/lib/agent-config.ts +55 -0
- package/lib/agents.ts +208 -0
- package/lib/question-model.ts +98 -0
- package/lib/question-ui.ts +214 -0
- package/lib/recommended-tools.ts +119 -0
- package/lib/subagent-runner.ts +146 -0
- package/lib/ui-tips.json +41 -0
- package/package.json +41 -14
- package/packages/pi-integration/src/rpc-client.ts +99 -0
- package/packages/shared/src/index.ts +27 -0
- package/prompts/init.md +10 -2
- package/prompts/summary.md +7 -6
- package/schemas/agent.schema.json +48 -0
- package/skills/{claude-api/LICENSE.txt → caveman/LICENSE} +2 -2
- package/skills/caveman/LICENSE-MIT +21 -0
- package/skills/caveman/NOTICE +10 -0
- package/skills/caveman/SKILL.md +89 -0
- package/skills/find-skills/SKILL.md +141 -0
- package/skills/ponytail/LICENSE +21 -0
- package/skills/ponytail/NOTICE +9 -0
- package/skills/ponytail/SKILL.md +52 -0
- package/themes/midnight.json +81 -0
- package/.github/workflows/publish.yml +0 -35
- package/AGENTS.md +0 -58
- package/eval/README.md +0 -72
- package/eval/permission-cases.json +0 -28
- package/eval/permissions.mjs +0 -103
- package/extensions/background-tasks.ts +0 -433
- package/extensions/background-worker.ts +0 -50
- package/extensions/glob.ts +0 -32
- package/extensions/mode.ts +0 -397
- package/lib/bash-approvals.ts +0 -113
- package/lib/bash-policy.ts +0 -164
- package/lib/mode-policy.ts +0 -174
- package/lib/path-policy.ts +0 -182
- package/lib/permission-classifier.ts +0 -128
- package/lib/permission-config.ts +0 -91
- package/lib/permission-denials.ts +0 -32
- package/lib/permission-intent.ts +0 -128
- package/lib/permission-taxonomy.ts +0 -15
- package/lib/task-broker.ts +0 -65
- package/lib/task-checkout.ts +0 -39
- package/lib/task-git.ts +0 -44
- package/lib/task-patch.ts +0 -106
- package/lib/task-permissions.ts +0 -51
- package/lib/task-report.ts +0 -62
- package/lib/task-worktree-policy.ts +0 -56
- package/scripts/release.mjs +0 -32
- package/skills/claude-api/SKILL.md +0 -572
- package/skills/claude-api/csharp/claude-api/README.md +0 -362
- package/skills/claude-api/csharp/claude-api/batches.md +0 -14
- package/skills/claude-api/csharp/claude-api/files-api.md +0 -25
- package/skills/claude-api/csharp/claude-api/streaming.md +0 -28
- package/skills/claude-api/csharp/claude-api/tool-use.md +0 -164
- package/skills/claude-api/curl/examples.md +0 -256
- package/skills/claude-api/curl/managed-agents.md +0 -371
- package/skills/claude-api/go/claude-api/README.md +0 -188
- package/skills/claude-api/go/claude-api/files-api.md +0 -23
- package/skills/claude-api/go/claude-api/streaming.md +0 -43
- package/skills/claude-api/go/claude-api/tool-use.md +0 -220
- package/skills/claude-api/go/managed-agents/README.md +0 -564
- package/skills/claude-api/java/claude-api/README.md +0 -238
- package/skills/claude-api/java/claude-api/files-api.md +0 -27
- package/skills/claude-api/java/claude-api/streaming.md +0 -24
- package/skills/claude-api/java/claude-api/tool-use.md +0 -228
- package/skills/claude-api/java/managed-agents/README.md +0 -443
- package/skills/claude-api/php/claude-api/README.md +0 -174
- package/skills/claude-api/php/claude-api/batches.md +0 -15
- package/skills/claude-api/php/claude-api/files-api.md +0 -13
- package/skills/claude-api/php/claude-api/streaming.md +0 -27
- package/skills/claude-api/php/claude-api/tool-use.md +0 -253
- package/skills/claude-api/php/managed-agents/README.md +0 -443
- package/skills/claude-api/python/claude-api/README.md +0 -565
- package/skills/claude-api/python/claude-api/batches.md +0 -198
- package/skills/claude-api/python/claude-api/files-api.md +0 -170
- package/skills/claude-api/python/claude-api/sdk-upgrade.md +0 -286
- package/skills/claude-api/python/claude-api/streaming.md +0 -179
- package/skills/claude-api/python/claude-api/tool-use.md +0 -627
- package/skills/claude-api/python/managed-agents/README.md +0 -335
- package/skills/claude-api/ruby/claude-api/README.md +0 -134
- package/skills/claude-api/ruby/claude-api/streaming.md +0 -16
- package/skills/claude-api/ruby/claude-api/tool-use.md +0 -41
- package/skills/claude-api/ruby/managed-agents/README.md +0 -394
- package/skills/claude-api/shared/admin-api.md +0 -179
- package/skills/claude-api/shared/agent-design.md +0 -101
- package/skills/claude-api/shared/anthropic-cli.md +0 -269
- package/skills/claude-api/shared/claude-platform-on-aws.md +0 -59
- package/skills/claude-api/shared/cost-optimization.md +0 -233
- package/skills/claude-api/shared/error-codes.md +0 -262
- package/skills/claude-api/shared/live-sources.md +0 -166
- package/skills/claude-api/shared/managed-agents-api-reference.md +0 -455
- package/skills/claude-api/shared/managed-agents-client-patterns.md +0 -220
- package/skills/claude-api/shared/managed-agents-core.md +0 -359
- package/skills/claude-api/shared/managed-agents-environments.md +0 -226
- package/skills/claude-api/shared/managed-agents-events.md +0 -290
- package/skills/claude-api/shared/managed-agents-memory.md +0 -201
- package/skills/claude-api/shared/managed-agents-multiagent.md +0 -260
- package/skills/claude-api/shared/managed-agents-onboarding.md +0 -82
- package/skills/claude-api/shared/managed-agents-outcomes.md +0 -108
- package/skills/claude-api/shared/managed-agents-overview.md +0 -77
- package/skills/claude-api/shared/managed-agents-scheduled-deployments.md +0 -156
- package/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +0 -282
- package/skills/claude-api/shared/managed-agents-tools.md +0 -504
- package/skills/claude-api/shared/managed-agents-webhooks.md +0 -143
- package/skills/claude-api/shared/model-migration.md +0 -1872
- package/skills/claude-api/shared/models.md +0 -142
- package/skills/claude-api/shared/platform-availability.md +0 -53
- package/skills/claude-api/shared/prompt-audit.md +0 -223
- package/skills/claude-api/shared/prompt-caching.md +0 -292
- package/skills/claude-api/shared/token-counting.md +0 -56
- package/skills/claude-api/shared/tool-use-concepts.md +0 -526
- package/skills/claude-api/typescript/claude-api/README.md +0 -405
- package/skills/claude-api/typescript/claude-api/batches.md +0 -106
- package/skills/claude-api/typescript/claude-api/files-api.md +0 -98
- package/skills/claude-api/typescript/claude-api/streaming.md +0 -178
- package/skills/claude-api/typescript/claude-api/tool-use.md +0 -586
- package/skills/claude-api/typescript/managed-agents/README.md +0 -359
- package/skills-lock.json +0 -359
- package/tests/auto-permissions.test.mjs +0 -315
- package/tests/background-tasks.test.mjs +0 -27
- package/tests/background-worker.test.mjs +0 -60
- package/tests/bash-permissions.test.mjs +0 -276
- package/tests/glob.test.mjs +0 -31
- package/tests/mode.test.mjs +0 -62
- package/tests/permission-evaluation.test.mjs +0 -70
- package/tests/permission-foundation.test.mjs +0 -194
- package/tests/permission-policy.test.mjs +0 -158
- package/tests/runtime/README.md +0 -51
- package/tests/runtime/harness.mjs +0 -190
- package/tests/runtime/permissions.test.mjs +0 -192
- package/tests/runtime/tui.test.mjs +0 -60
- package/tests/skills-routing.test.mjs +0 -51
- package/tests/task-integration.test.mjs +0 -324
- package/tests/task-permissions.test.mjs +0 -178
- package/tests/task-worktree-policy.test.mjs +0 -53
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Claude Model Catalog
|
|
2
|
-
|
|
3
|
-
**Only use exact model IDs listed in this file.** Never guess or construct model IDs - incorrect IDs will cause API errors. Use aliases wherever available. For the latest information, WebFetch the Models Overview URL in `shared/live-sources.md`, or query the Models API directly (see Programmatic Model Discovery below).
|
|
4
|
-
|
|
5
|
-
## Programmatic Model Discovery
|
|
6
|
-
|
|
7
|
-
For **live** capability data - context window, max output tokens, feature support (thinking, vision, effort, structured outputs, etc.) - query the Models API instead of relying on the cached tables below. Use this when the user asks "what's the context window for X", "does model X support vision/thinking/effort", "which models support feature Y", or wants to select a model by capability at runtime.
|
|
8
|
-
|
|
9
|
-
```python
|
|
10
|
-
m = client.models.retrieve("claude-opus-4-8")
|
|
11
|
-
m.id # "claude-opus-4-8"
|
|
12
|
-
m.display_name # "Claude Opus 4.8"
|
|
13
|
-
m.max_input_tokens # context window (int)
|
|
14
|
-
m.max_tokens # max output tokens (int)
|
|
15
|
-
|
|
16
|
-
# capabilities is an untyped nested dict - bracket access, check ["supported"] at the leaf
|
|
17
|
-
caps = m.capabilities
|
|
18
|
-
caps["image_input"]["supported"] # vision
|
|
19
|
-
caps["thinking"]["types"]["adaptive"]["supported"] # adaptive thinking
|
|
20
|
-
caps["effort"]["max"]["supported"] # effort: max (also low/medium/high)
|
|
21
|
-
caps["structured_outputs"]["supported"]
|
|
22
|
-
caps["context_management"]["compact_20260112"]["supported"]
|
|
23
|
-
|
|
24
|
-
# filter across all models - iterate the page object directly (auto-paginates); do NOT use .data
|
|
25
|
-
[m for m in client.models.list()
|
|
26
|
-
if m.capabilities["thinking"]["types"]["adaptive"]["supported"]
|
|
27
|
-
and m.max_input_tokens >= 200_000]
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Top-level fields (`id`, `display_name`, `max_input_tokens`, `max_tokens`) are typed attributes. `capabilities` is a dict - use bracket access, not attribute access. The API returns the full capability tree for every model with `supported: true/false` at each leaf, so bracket chains are safe without `.get()` guards. TypeScript SDK: same method names, also auto-paginates on iteration.
|
|
31
|
-
|
|
32
|
-
### Raw HTTP
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
curl https://api.anthropic.com/v1/models/claude-opus-4-8 \
|
|
36
|
-
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
|
37
|
-
-H "anthropic-version: 2023-06-01"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"id": "claude-opus-4-8",
|
|
43
|
-
"display_name": "Claude Opus 4.8",
|
|
44
|
-
"max_input_tokens": 1000000,
|
|
45
|
-
"max_tokens": 128000,
|
|
46
|
-
"capabilities": {
|
|
47
|
-
"image_input": {"supported": true},
|
|
48
|
-
"structured_outputs": {"supported": true},
|
|
49
|
-
"thinking": {"supported": true, "types": {"enabled": {"supported": false}, "adaptive": {"supported": true}}},
|
|
50
|
-
"effort": {"supported": true, "low": {"supported": true}, ..., "max": {"supported": true}},
|
|
51
|
-
...
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Current Models (recommended)
|
|
57
|
-
|
|
58
|
-
| Friendly Name | Alias (use this) | Full ID | Context | Max Output | Status |
|
|
59
|
-
|-------------------|---------------------|-------------------------------|----------------|------------|--------|
|
|
60
|
-
| Claude Fable 5.1 | `claude-fable-5-1` | - | 1M | 128K | Active |
|
|
61
|
-
| Claude Mythos 5.1 | `claude-mythos-5-1` | - | 1M | 128K | Active (Project Glasswing only) |
|
|
62
|
-
| Claude Fable 5 | `claude-fable-5` | - | 1M | 128K | Active |
|
|
63
|
-
| Claude Mythos 5 | `claude-mythos-5` | - | 1M | 128K | Active (Project Glasswing only) |
|
|
64
|
-
| Claude Opus 5 | `claude-opus-5` | - | 1M | 128K | Active |
|
|
65
|
-
| Claude Opus 4.8 | `claude-opus-4-8` | - | 1M | 128K | Active |
|
|
66
|
-
| Claude Opus 4.7 | `claude-opus-4-7` | - | 1M | 128K | Active |
|
|
67
|
-
| Claude Opus 4.6 | `claude-opus-4-6` | - | 1M | 128K | Active |
|
|
68
|
-
| Claude Sonnet 5 | `claude-sonnet-5` | - | 1M | 128K | Active |
|
|
69
|
-
| Claude Sonnet 4.6 | `claude-sonnet-4-6` | - | 1M | 128K | Active |
|
|
70
|
-
| Claude Haiku 4.5 | `claude-haiku-4-5` | `claude-haiku-4-5-20251001` | 200K | 64K | Active |
|
|
71
|
-
|
|
72
|
-
### Model Descriptions
|
|
73
|
-
- **Claude Fable 5.1** - Anthropic's most capable widely released model, for the most demanding reasoning and long-horizon agentic work. Successor to Claude Fable 5 in the same tier at the same per-token price ($10/$50 per MTok; cache reads $0.25/MTok - 0.025x, a quarter of Claude Fable 5's; batch $5/$25); stronger long-running agentic coding, knowledge work with documents/spreadsheets/slides, multistep research, vision, long-context retrieval, and computer use. Same API surface as Claude Fable 5 (thinking always on, no prefill, no sampling params, `refusal` stop reason, 512-token cache minimum) with three breaking changes: forced tool use (`tool_choice` `any` / `tool`) returns a 400; thinking blocks are bound to the producing model (only Claude Mythos 5.1 can read them - other models drop them); and editing earlier turns invalidates thinking blocks ("preserved thinking"; new accounts created on/after 2026-08-31 get a 400 on edited history; later models enforce it for everyone; the opt-in controls are per-platform - `shared/platform-availability.md`). Adds per-message `effort`, turn-scoped `clear_at` system messages, `thinking.display: "updates"` progress updates, and content provenance. Same tokenizer as Claude Fable 5; 1M context (default), 128K max output. Covered Model: 30-day retention required (ZDR only if expressly authorized by Anthropic) - ZDR orgs get `400 invalid_request_error`, as on Claude Fable 5. No Priority Tier; shares the Fable 5.x rate-limit pool. See `shared/model-migration.md` -> Migrating to Claude Fable 5.1 from Claude Fable 5.
|
|
74
|
-
- **Claude Fable 5** / **Claude Mythos 5** (`claude-fable-5` / `claude-mythos-5`) - the previous Fable / Mythos release: same tier, limits and per-token pricing as Claude Fable 5.1, which adds three breaking API changes over them (see above; cache reads here are $1/MTok rather than Claude Fable 5.1's $0.25); still served and selectable by id. Claude Mythos 5 ran no safety classifiers, so `stop_reason: "refusal"` does not occur on it. Prefer claude-fable-5-1 for new work.
|
|
75
|
-
- **Claude Mythos 5.1** - The same model as Claude Fable 5.1 (same capabilities, limits, per-token pricing, API behavior), offered only to approved Project Glasswing customers; successor to Claude Mythos 5 (which itself succeeded the invitation-only `claude-mythos-preview`). Unlike Claude Mythos 5 it runs safeguards that depend on the access program, so handle `stop_reason: "refusal"`. Not offered on Claude Platform on AWS. Use it only when the org participates in Project Glasswing; otherwise use `claude-fable-5-1`.
|
|
76
|
-
- **Claude Opus 5** - For complex agentic coding and enterprise work; a step-change over Claude Opus 4.8, strongest on deep reasoning, agentic and long-horizon work, and test-time compute scaling, at half the cost of Claude Fable 5.1 (Claude Fable 5.1 remains the highest-capability tier). Safety classifiers can return `stop_reason: "refusal"` - handle it before reading `content`. A drop-in upgrade at Opus 4.8's pricing ($5/$25 per MTok) with the same feature set. Thinking is on by default (omitting `thinking` runs adaptive; `{type: "adaptive"}` is equivalent), and `thinking: {type: "disabled"}` is available only at effort `high` or lower - pairing it with `xhigh`/`max` returns a 400. Raw thinking tokens are never returned. Full effort ladder through `max`; 512-token prompt-cache minimum (down from 1024 on Opus 4.8); fast mode on the Claude API only. Elevated cybersecurity safeguards. Separate rate-limit bucket from the combined Opus 4.x pool. 1M context window (default and maximum), 128K max output. See `shared/model-migration.md` -> Migrating to Claude Opus 5.
|
|
77
|
-
- **Claude Opus 4.8** - The most capable model in the Opus 4 series - highly autonomous, state-of-the-art on long-horizon agentic work, knowledge work, and memory; clearer, warmer writing. Same API surface as Opus 4.7 (adaptive thinking only; sampling parameters and `budget_tokens` removed). 1M context window at standard API pricing (no long-context premium). See `shared/model-migration.md` -> Migrating to Opus 4.8 - a 4.7 -> 4.8 move is a model-ID swap plus prompt re-tuning, no new breaking changes.
|
|
78
|
-
- **Claude Opus 4.7** - Previous-generation Opus. Highly autonomous; strong on long-horizon agentic work, knowledge work, vision, and memory. Adaptive thinking only; sampling parameters and `budget_tokens` removed. 1M context window. See `shared/model-migration.md` -> Migrating to Opus 4.7.
|
|
79
|
-
- **Claude Opus 4.6** - Older Opus. Supports adaptive thinking (recommended), 128K max output tokens (requires streaming for large outputs). 1M context window.
|
|
80
|
-
- **Claude Sonnet 5** - The best combination of speed and intelligence in the Sonnet tier; near-Opus quality on coding and agentic work. Adaptive thinking on by default (omitting `thinking` runs adaptive); manual `budget_tokens` removed; non-default sampling parameters rejected. `effort` supports `low`/`medium`/`high`/`xhigh`/`max`. New tokenizer (~30% more tokens for the same text vs Sonnet 4.6). High-resolution vision (2576px). 1M context window, 128K max output. See `shared/model-migration.md` -> Migrating to Claude Sonnet 5.
|
|
81
|
-
- **Claude Sonnet 4.6** - Previous-generation Sonnet. Supports adaptive thinking (recommended). 1M context window. 128K max output tokens.
|
|
82
|
-
- **Claude Haiku 4.5** - Fastest and most cost-effective model for simple tasks.
|
|
83
|
-
|
|
84
|
-
## Legacy Models (still active)
|
|
85
|
-
|
|
86
|
-
| Friendly Name | Alias (use this) | Full ID | Status |
|
|
87
|
-
|-------------------|---------------------|-------------------------------|--------|
|
|
88
|
-
| Claude Opus 4.5 | `claude-opus-4-5` | `claude-opus-4-5-20251101` | Active |
|
|
89
|
-
| Claude Opus 4.1 | `claude-opus-4-1` | `claude-opus-4-1-20250805` | Deprecated (retires 2026-08-05 - migrate to `claude-opus-5`) |
|
|
90
|
-
| Claude Sonnet 4.5 | `claude-sonnet-4-5` | `claude-sonnet-4-5-20250929` | Active |
|
|
91
|
-
|
|
92
|
-
## Deprecated Models (retiring soon)
|
|
93
|
-
|
|
94
|
-
| Friendly Name | Alias (use this) | Full ID | Status | Retires |
|
|
95
|
-
|-------------------|---------------------|-------------------------------|------------|--------------|
|
|
96
|
-
| Claude Sonnet 4 | `claude-sonnet-4-0` | `claude-sonnet-4-20250514` | Deprecated | TBD |
|
|
97
|
-
| Claude Opus 4 | `claude-opus-4-0` | `claude-opus-4-20250514` | Deprecated | TBD |
|
|
98
|
-
| Claude Haiku 3 | - | `claude-3-haiku-20240307` | Deprecated | Apr 19, 2026 |
|
|
99
|
-
|
|
100
|
-
## Retired Models (no longer available)
|
|
101
|
-
|
|
102
|
-
| Friendly Name | Full ID | Retired |
|
|
103
|
-
|-------------------|-------------------------------|-------------|
|
|
104
|
-
| Claude Sonnet 3.7 | `claude-3-7-sonnet-20250219` | Feb 19, 2026 |
|
|
105
|
-
| Claude Haiku 3.5 | `claude-3-5-haiku-20241022` | Feb 19, 2026 |
|
|
106
|
-
| Claude Opus 3 | `claude-3-opus-20240229` | Jan 5, 2026 |
|
|
107
|
-
| Claude Sonnet 3.5 | `claude-3-5-sonnet-20241022` | Oct 28, 2025 |
|
|
108
|
-
| Claude Sonnet 3.5 | `claude-3-5-sonnet-20240620` | Oct 28, 2025 |
|
|
109
|
-
| Claude Sonnet 3 | `claude-3-sonnet-20240229` | Jul 21, 2025 |
|
|
110
|
-
| Claude 2.1 | `claude-2.1` | Jul 21, 2025 |
|
|
111
|
-
| Claude 2.0 | `claude-2.0` | Jul 21, 2025 |
|
|
112
|
-
|
|
113
|
-
## Resolving User Requests
|
|
114
|
-
|
|
115
|
-
When a user asks for a model by name, use this table to find the correct model ID:
|
|
116
|
-
|
|
117
|
-
| User says... | Use this model ID |
|
|
118
|
-
|-------------------------------------------|--------------------------------|
|
|
119
|
-
| "fable", "most capable model" | `claude-fable-5-1` |
|
|
120
|
-
| "most powerful" | `claude-fable-5-1` |
|
|
121
|
-
| "mythos", "mythos 5.1" | `claude-mythos-5-1` (Project Glasswing participants only; otherwise use `claude-fable-5-1`) |
|
|
122
|
-
| "fable 5", "mythos 5" (previous version) | `claude-fable-5` / `claude-mythos-5` (still served; prefer `claude-fable-5-1` for new work) |
|
|
123
|
-
| "mythos preview" | `claude-mythos-5-1` (successor to `claude-mythos-preview` - see migration guide) |
|
|
124
|
-
| "opus" | `claude-opus-5` |
|
|
125
|
-
| "opus 5" | `claude-opus-5` |
|
|
126
|
-
| "opus 4.8" | `claude-opus-4-8` |
|
|
127
|
-
| "opus 4.7" | `claude-opus-4-7` |
|
|
128
|
-
| "opus 4.6" | `claude-opus-4-6` |
|
|
129
|
-
| "opus 4.5" | `claude-opus-4-5` |
|
|
130
|
-
| "opus 4.1" | `claude-opus-4-1` (deprecated, retires 2026-08-05 - suggest `claude-opus-5`) |
|
|
131
|
-
| "opus 4", "opus 4.0" | `claude-opus-4-0` (deprecated - suggest `claude-opus-5`) |
|
|
132
|
-
| "sonnet", "balanced" | `claude-sonnet-5` |
|
|
133
|
-
| "sonnet 5" | `claude-sonnet-5` |
|
|
134
|
-
| "sonnet 4.6" | `claude-sonnet-4-6` |
|
|
135
|
-
| "sonnet 4.5" | `claude-sonnet-4-5` |
|
|
136
|
-
| "sonnet 4", "sonnet 4.0" | `claude-sonnet-4-0` (deprecated - suggest `claude-sonnet-5`) |
|
|
137
|
-
| "sonnet 3.7" | Retired - suggest `claude-sonnet-5` |
|
|
138
|
-
| "sonnet 3.5" | Retired - suggest `claude-sonnet-5` |
|
|
139
|
-
| "haiku", "fast", "cheap" | `claude-haiku-4-5` |
|
|
140
|
-
| "haiku 4.5" | `claude-haiku-4-5` |
|
|
141
|
-
| "haiku 3.5" | Retired - suggest `claude-haiku-4-5` |
|
|
142
|
-
| "haiku 3" | Deprecated - suggest `claude-haiku-4-5` |
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Platform Availability
|
|
2
|
-
|
|
3
|
-
Which features work on which provider platform. **This table is the single source of truth in this skill** - per-feature sections elsewhere point here instead of restating availability. When writing code for a third-party platform (Bedrock, Vertex, Foundry) or Claude Platform on AWS, check this table first; a feature not supported there means use the first-party Claude API surface or a different approach.
|
|
4
|
-
|
|
5
|
-
Columns: **1P** = first-party Claude API, **P-AWS** = Claude Platform on AWS (Anthropic-operated, same-day parity), **Bedrock** = Amazon Bedrock, **Vertex** = Google Cloud Vertex AI, **Foundry** = Microsoft Foundry. Yes = GA, beta = beta, No = not supported.
|
|
6
|
-
|
|
7
|
-
| Feature | 1P | P-AWS | Bedrock | Vertex | Foundry | Notes |
|
|
8
|
-
|---|---|---|---|---|---|---|
|
|
9
|
-
| Messages, streaming, tool use | Yes | Yes | Yes | Yes | Yes | Core API |
|
|
10
|
-
| PDF input | Yes | Yes | Yes | Yes | beta | |
|
|
11
|
-
| Structured outputs / strict tool use | Yes | Yes | Yes | Yes | beta | |
|
|
12
|
-
| Adaptive thinking / effort | Yes | Yes | Yes | Yes | beta | |
|
|
13
|
-
| Extended thinking | Yes | Yes | Yes | Yes | beta | |
|
|
14
|
-
| Prompt caching (5m, 1h) | Yes | Yes | Yes | Yes | Yes | |
|
|
15
|
-
| Automatic prompt caching | Yes | Yes | Yes | Yes | Yes | The legacy Bedrock integration (Opus 4.6 and earlier) rejects top-level `cache_control` with a 400 - explicit breakpoints only there |
|
|
16
|
-
| Token counting | Yes | Yes | Yes | Yes | beta | |
|
|
17
|
-
| Citations | Yes | Yes | Yes | Yes | beta | |
|
|
18
|
-
| Search results content blocks | Yes | Yes | Yes | Yes | beta | |
|
|
19
|
-
| Fine-grained tool streaming | Yes | Yes | Yes | Yes | Yes | |
|
|
20
|
-
| Compaction | beta | beta | beta | beta | beta | |
|
|
21
|
-
| Context editing | beta | beta | beta | beta | beta | |
|
|
22
|
-
| Context windows (1M) | Yes | Yes | Yes | Yes | beta | |
|
|
23
|
-
| `inference_geo` (data residency) | Yes | Yes | No | No | No | |
|
|
24
|
-
| **Server-side tools** | | | | | | |
|
|
25
|
-
| Web search | Yes | Yes | No | Yes | beta | Vertex: basic `web_search_20250305` only (no `_20260209` dynamic filtering) |
|
|
26
|
-
| Web fetch | Yes | Yes | No | No | beta | |
|
|
27
|
-
| Code execution | Yes | Yes | No | No | beta | |
|
|
28
|
-
| Tool search | Yes | Yes | Yes | Yes | beta | Bedrock: InvokeModel API only, not Converse |
|
|
29
|
-
| Advisor tool | beta | beta | No | No | No | |
|
|
30
|
-
| **Client-implemented tools** | | | | | | |
|
|
31
|
-
| Bash, text editor, memory | Yes | Yes | Yes | Yes | beta | |
|
|
32
|
-
| Computer use | beta | beta | beta | beta | beta | |
|
|
33
|
-
| **Agentic / orchestration** | | | | | | |
|
|
34
|
-
| Agent Skills (Messages API) | Yes | Yes | No | No | beta | |
|
|
35
|
-
| Programmatic tool calling | Yes | Yes | No | No | beta | |
|
|
36
|
-
| MCP connector | beta | beta | No | No | beta | |
|
|
37
|
-
| Managed Agents | beta | beta | No | No | No | Foundry: No (inferred; not in Foundry docs either way) |
|
|
38
|
-
| Self-hosted sandboxes | beta | beta | No | No | No | P-AWS: worker authenticates with IAM/SigV4 or an AWS-Console API key + `AnthropicSelfHostedEnvironmentAccess` (Console environment keys don't work there); sessions on self-hosted environments cannot attach memory stores; `GET /v1/environments/{id}/work` list endpoint not supported, other work endpoints OK |
|
|
39
|
-
| **API endpoints** | | | | | | |
|
|
40
|
-
| Message Batches | Yes | Yes | No | No | No | |
|
|
41
|
-
| Files API | Yes | Yes | No | No | beta | |
|
|
42
|
-
| Models API | Yes | Yes | No | No | No | |
|
|
43
|
-
| **Other** | | | | | | |
|
|
44
|
-
| Mid-conversation system messages | Yes | Yes | Yes | Yes | No | Claude Opus 5, Claude Opus 4.8, Claude Fable 5, Claude Fable 5.1, Claude Mythos 5, Claude Mythos 5.1; not Claude Sonnet 5. Bedrock: InvokeModel passthrough, not ARN-versioned models |
|
|
45
|
-
| Turn-scoped (`clear_at`) system messages | beta | beta | beta | beta | No | Same models as mid-conversation system messages; beta `mid-conversation-system-clear-at-2026-08-21` (on Bedrock/Vertex pass the value as a beta) |
|
|
46
|
-
| Per-message `effort` (system message `output_config`) | beta | No | No | No | No | Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5; beta `mid-conversation-output-config-2026-07-01`; Claude API at launch (Bedrock/Vertex/Foundry unconfirmed; Claude Opus 5 excluded on Bedrock) |
|
|
47
|
-
| `thinking.display: "updates"` | beta | beta | beta | beta | beta | Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5; beta `thinking-display-updates-2026-08-18` (pass the beta value per platform); without it `"updates"` is rejected as an unknown `display` value |
|
|
48
|
-
| Thinking block-binding controls | beta | beta | per model | per model | No | `thinking.block_binding` + `input_transformations`; beta `thinking-binding-controls-2026-08-01` (on Bedrock via the `anthropic_beta` body field); the controls beta arrives per model on Bedrock/Vertex - until then the header is rejected; the history-editing enforcement itself follows the account-age rule in `shared/model-migration.md` -> Migrating to Claude Fable 5.1 from Claude Fable 5 |
|
|
49
|
-
| Server-side `fallbacks` | beta | beta | No | No | No | `"default"` -> beta `server-side-fallback-2026-07-01`; array form -> beta `server-side-fallback-2026-06-01` |
|
|
50
|
-
| Fast mode | beta | No | No | No | No | Research preview, beta `fast-mode-2026-02-01`, first-party API only |
|
|
51
|
-
| Cache diagnostics | beta | No | No | No | No | First-party API only |
|
|
52
|
-
| Task budgets | beta | beta | No | No | No | Beta header `task-budgets-2026-03-13`; 3P availability not documented - assume unsupported |
|
|
53
|
-
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
# Prompt Audit - Finding and Removing Dated Prompting Patterns
|
|
2
|
-
|
|
3
|
-
> **If you arrived via `/claude-api prompt-audit`:** this is the right file. Execute the steps below in order - do not summarize them back to the user. Start with Step 0 (establish scope and target model), and finish by producing both deliverables: the audit report (Step 5) and the proposed diff (Step 6).
|
|
4
|
-
|
|
5
|
-
Prompts, skills, and tool descriptions accumulate instructions tuned to older models: emphasis added because an old model under-triggered, step-by-step scripts added because an old model planned poorly, format scaffolds written before the API had structured outputs. Current Claude models follow instructions more closely and more literally than the models much of this text was written for, so the leftover text is not just wasted tokens - specific outdated instructions actively degrade behavior (over-triggering, over-planning, rigid responses in gray areas), while merely irrelevant text is comparatively harmless. The audit's job is therefore to find **specific dated instructions**, not to make prompts shorter. "Every token earns its place" is the frame; "make it short" is not.
|
|
6
|
-
|
|
7
|
-
**The audit produces two artifacts - both, always:**
|
|
8
|
-
|
|
9
|
-
1. **An audit report**: every finding with its location (`file:line`), the pattern it matches, why it is obsolete for the target model, and a confidence level.
|
|
10
|
-
2. **A proposed diff**: concrete edits for the findings that warrant them. Propose - never apply edits without the user's consent.
|
|
11
|
-
|
|
12
|
-
**Prime directive: distinguish cruft from load-bearing content.** A finding you cannot tie to a named pattern below, with a reason grounded in the target model's documented behavior, is not a finding. When in doubt, flag it in the report with low confidence and leave it out of the diff. Indiscriminate deletion is the one way an audit makes things worse - see "What not to flag" below, which is as binding as the pattern tables. The inverse binds too: **an audit that finds nothing should change nothing** - a clean surface is a valid outcome, and an empty diff beats a manufactured one.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Step 0: Establish scope and target model
|
|
17
|
-
|
|
18
|
-
**Before reading any file, establish two things - from the request and the repository, not by asking.** This audit is non-interactive by design: it runs the same way in a chat session, a CI job, or a batch migration, so it states its assumptions and proceeds instead of pausing for confirmation. Both assumptions go at the top of the report (Step 5), where the user can correct them by re-running with a narrower request.
|
|
19
|
-
|
|
20
|
-
1. **Scope.** Which files count as the prompt surface? If the user's request names a file, directory, or file list, that is the scope. Otherwise the scope is the whole working directory's prompt surface - everything Step 1's inventory finds.
|
|
21
|
-
2. **Target model.** Cruft is relative to a model: a workaround that is load-bearing on one generation is dead weight on the next. Resolve the target in this order: the model the request names; else the destination of an in-progress migration the repository documents (vendor notes, migration docs, TODOs); else the newest model the repository's own code or docs point at; else the current flagship generation of the provider the code calls. If the audit is part of a migration, read `shared/model-migration.md` -> the per-target section alongside this file, since every migration section's checklist is also a removal checklist.
|
|
22
|
-
|
|
23
|
-
## Step 1: Inventory the prompt surface
|
|
24
|
-
|
|
25
|
-
Find everything that reaches the model as text, not just the file named "prompt":
|
|
26
|
-
|
|
27
|
-
- **System prompts** and the code that assembles them (f-strings, template files, conditional sections)
|
|
28
|
-
- **Tool definitions** - `description` fields and parameter descriptions in the `tools` array
|
|
29
|
-
- **Skill and rule files** - `SKILL.md`, `CLAUDE.md`, `.cursorrules`-style rule files, agent instruction files
|
|
30
|
-
- **Request-building code** - model IDs, `thinking` configuration, sampling parameters, stop sequences, prefill construction, retry logic, beta headers
|
|
31
|
-
- **Few-shot blocks and embedded examples**, wherever they live
|
|
32
|
-
|
|
33
|
-
List what you found before auditing it, so the user can correct the inventory.
|
|
34
|
-
|
|
35
|
-
## Step 2: Establish provenance
|
|
36
|
-
|
|
37
|
-
Where git history is available, `git blame` the prompt files. The question for every emphatic or prohibitive line is: **which failure, on which model, did this prevent - and does that failure still reproduce on the target model?** Lines added as mitigations for a model that is no longer in use are presumptive removal candidates; a line nobody can justify is suspect by default.
|
|
38
|
-
|
|
39
|
-
Prompts can also be dated by their idioms even without history. `<scratchpad>` / `<brainstorm>` tag instructions, "think step by step", assistant-turn prefills, quotes-first extraction scaffolds, and ROLE -> CONTEXT -> RULES -> EXAMPLES boilerplate all mark text written for much earlier Claude generations - techniques that are now natively trained (thinking, calibrated refusals) or superseded by API features (structured outputs). Idiom-dating alone is a flag-only signal (low confidence in the Step 5 rubric); it earns medium or high only when paired with a reason grounded in the target model's documented behavior - a blame line tying the text to a retired model's era is the strongest form of that pairing.
|
|
40
|
-
|
|
41
|
-
## Step 3: Classify every line - the deletion rule
|
|
42
|
-
|
|
43
|
-
For each instruction, ask one question: **could the model already know this?**
|
|
44
|
-
|
|
45
|
-
- **Keep what only the author knows**: the audience and product, environment facts, the quality bar, tool contracts and mechanics, genuinely hard judgment calls, and the *reasons* behind constraints. This is context, and context is never cruft.
|
|
46
|
-
- **Candidates for removal**: restatements of trained defaults ("be accurate and helpful"), behavior the model already does unprompted (thoroughness, planning, tool use), and workarounds for failures the target model no longer has.
|
|
47
|
-
|
|
48
|
-
A second distinction sharpens the first: is the line a **constraint on behavior** (deletion candidate - test it) or **context the model can't get elsewhere** (usually keep)? This check prevents the audit from becoming a length contest: a naive shortening pass deletes exactly the highest-value words.
|
|
49
|
-
|
|
50
|
-
## Step 4: Scan for the anti-pattern groups
|
|
51
|
-
|
|
52
|
-
Work through the four groups. "Signals" rows are greppable - run them over the inventory rather than eyeballing.
|
|
53
|
-
|
|
54
|
-
### Group 1 - Dated prompt text
|
|
55
|
-
|
|
56
|
-
#### 1a. Pressure language - say exactly what you mean, at normal volume
|
|
57
|
-
|
|
58
|
-
Older, less steerable models genuinely needed forcefulness; current models are highly responsive to the system prompt, so the same text over-applies. This cuts in **both directions**: inflated emphasis causes over-triggering and rigid behavior, while leftover hedges ("try to", "if possible") are now read literally as permission to under-deliver.
|
|
59
|
-
|
|
60
|
-
| Before (written for older models) | After (current models) |
|
|
61
|
-
|---|---|
|
|
62
|
-
| `CRITICAL: You MUST use this tool when...` | `Use this tool when...` |
|
|
63
|
-
| `IMPORTANT: NEVER do X` (several per prompt) | State the one or two real constraints plainly, with the reason |
|
|
64
|
-
| `If in doubt, use [tool]` / `Default to [tool]` | *(delete, or)* `Use [tool] when it would improve X` |
|
|
65
|
-
| `Be thorough. Do not be lazy. Do not stop early.` | *(delete - current models are proactive by default)* |
|
|
66
|
-
| `Try to include a summary if possible` (when it's required) | `Include a summary.` |
|
|
67
|
-
| `You have a tendency to over-X, so...` / `Don't be too verbose` | State the desired behavior: `Keep responses to the length the question needs.` |
|
|
68
|
-
|
|
69
|
-
When several instructions are each marked critical, the markers stop carrying information - and the prompt's register becomes the output's register: an anxious prompt produces a cautious, hedging model. Emphasis is not banned; it is a tested, scoped fix for one demonstrably underweighted instruction, not a first-draft register.
|
|
70
|
-
|
|
71
|
-
**Signals:** density of `MUST|NEVER|ALWAYS|CRITICAL|IMPORTANT` in caps; `!!`; emphasis with no adjacent "because"; `try to|if possible|ideally` attached to actual requirements; `you (tend to|often|sometimes)` trait claims; `don't be too [adjective]`.
|
|
72
|
-
|
|
73
|
-
#### 1b. Scaffolds replaced by API features - replace, don't rewrite
|
|
74
|
-
|
|
75
|
-
These aren't tuned down; they're swapped for the feature that replaced them. For per-model specifics (what errors on which model, exact syntax), read `shared/model-migration.md`.
|
|
76
|
-
|
|
77
|
-
| Scaffold in the prompt or request code | Replacement |
|
|
78
|
-
|---|---|
|
|
79
|
-
| "Think step by step", `<scratchpad>`/`<thinking>` tag instructions | Adaptive thinking (`thinking: {type: "adaptive"}`) + `effort`. On thinking models the incantation is redundant at best; control depth via configuration, not prose. |
|
|
80
|
-
| "Use the think tool to plan" / "plan before acting" | Delete - current models plan without being told, and these cause over-planning. If behavior is still too aggressive after cleanup, lower `effort` rather than adding prose. |
|
|
81
|
-
| "Show your thinking" / required reasoning sections in the output | Read thinking blocks via the API. On Claude Fable 5.1, instructing reasoning reproduction can trigger a `refusal` (reasoning extraction) - this is an explicit audit item when migrating. |
|
|
82
|
-
| Assistant-turn prefill (`{"role": "assistant", "content": "{"`) and the JSON-forcing stack around it: stop-sequences, regex extraction, retry-on-parse loops, "output ONLY valid JSON" | Structured outputs (`output_config.format`). Prefill 400s on 4.6-and-later Opus- and Sonnet-tier models and Claude Fable 5.1 - confirm in the per-target section of `shared/model-migration.md` before claiming the error. Where it applies, the *surrounding code* is cruft too - audit the request builder, not just the prompt string. Only a **trailing** assistant turn is a prefill - partial or complete-looking (a few-shot block ending on the assistant side still counts): assistant turns mid-array are ordinary conversation history and must stay. |
|
|
83
|
-
| "Summarize progress every N tool calls" choreography; hard word caps (`at most N words`) | Delete and re-baseline: current models narrate appropriately, and output caps starve reasoning on hard problems. Prefer qualitative length guidance ("be concise") over numeric caps tuned against an older model's verbosity. |
|
|
84
|
-
| Inline lookup tables, point systems, arithmetic rubrics the model must compute | Data in files or tool results; arithmetic in code. Leave the model the judgment layer. |
|
|
85
|
-
| `budget_tokens`, non-default `temperature`/`top_p`/`top_k`, stale beta headers, dead 400-retry paths | See `shared/model-migration.md` - whether each one hard-errors or is merely deprecated depends on the target model, so take the error claim from the per-target section there, not from memory. Where it does error, the retry/workaround code around it is removable too. |
|
|
86
|
-
| Forced tool use - `tool_choice: {type: "any"}` / `{type: "tool", name: ...}` - and the JSON-via-forced-tool pattern | Prompt instruction naming the tool under `tool_choice: auto` (steering), or structured outputs (extraction). Returns a 400 on Claude Fable 5.1 / Claude Mythos 5.1 (and Mythos Preview); elsewhere it works but is usually a prompt-instruction in disguise - `strict: true` keeps the schema guarantee under `auto`. Audit the retry-on-missing-tool loop around it as well. |
|
|
87
|
-
|
|
88
|
-
**Signals:** `think step by step|take a deep breath`; `<scratchpad>|<thinking>` in instructions; `stop_sequences` guarding JSON; `json.loads` inside retry loops; `budget_tokens|temperature|top_p` in request code; `every \d+ (tool calls|messages)`; `at most \d+ (words|sentences)`.
|
|
89
|
-
|
|
90
|
-
#### 1c. Over-specification - describe the goal, not the method
|
|
91
|
-
|
|
92
|
-
| Pattern | Why it's cruft now | Fix |
|
|
93
|
-
|---|---|---|
|
|
94
|
-
| Step-by-step choreography for judgment tasks (`STEP 1: ... STEP 2: ...`) | Skills and prompts written for prior models are often too prescriptive for current ones and degrade output quality - the model's own plan usually beats a hand-written script | State outcomes, constraints, and how to verify; keep numbered steps only where order truly matters |
|
|
95
|
-
| Prohibition lists ("do not X, never Y, avoid Z...") | Describing success beats enumerating failure; a prohibition against a failure the model wasn't going to make can *anchor it toward* that failure | Keep prohibitions whose failure reproduces on the target model; rewrite the rest as positive statements of intent |
|
|
96
|
-
| Example over-indexing: the single gold output; stale few-shot blocks | Concrete examples are the strongest signal in a prompt - the model matches their length, tone, and structure, and examples written for an older model freeze that model's behavior into the new one | Several deliberately varied examples, labeled illustrative; delete examples of judgment the model already owns; keep examples that pin a genuinely format-sensitive output shape |
|
|
97
|
-
| Bullet walls and heavy formatting for behavioral guidance | Bullets flatten priority and sever rules from reasons, and prompt format bleeds into output format | Structure for reference data; prose for behavior, carrying the "because" |
|
|
98
|
-
| Padding: generic virtues ("be accurate, thorough, clear"), repetition as reinforcement, kitchen-sink edge cases, limits with escape hatches | The model treats everything as actionable signal; asides get applied where they don't fit; duplicated rules make the model spend effort reconciling wordings; bulk also directly inflates adaptive-thinking spend | Say it once, in the right place; cover the hard judgment calls instead of the easy parts |
|
|
99
|
-
| Grader and eval vocabulary ("you will be graded on...", "hidden tests") | Describes the scoring apparatus instead of the requirement and pushes effort toward being-watched | State every requirement the grader checks; never describe the grader |
|
|
100
|
-
| Strategy coaching next to task rules ("it's usually best to...") | The author's heuristics are wrong in some situations and the model's plan is usually better | If removing the sentence wouldn't change what is legal or how success is measured, it's strategy - delete it |
|
|
101
|
-
|
|
102
|
-
**Signals:** `STEP \d`/numbered imperatives for non-fragile work; runs of 3+ `Do not|Never|Avoid` lines; `do not hallucinate` (re-test whether you still need it - removal here is low confidence, not a documented harm); single embedded gold outputs; near-duplicate sentences across sections; `Remember,|Again,|As stated above`; `grade|graded|rubric|hidden test`.
|
|
103
|
-
|
|
104
|
-
#### 1d. Fossils - text that outlived its model
|
|
105
|
-
|
|
106
|
-
| Pattern | Why it's cruft now | Fix |
|
|
107
|
-
|---|---|---|
|
|
108
|
-
| Model-version workarounds: formatting fixes, over-refusal softeners, retry hints, "known issue with [model]" comments, date-conditional guidance | Nobody owns the removal, so prompts accumulate the union of every generation's mitigations | Each mitigation names (or gets traced to) the model it patched; if that model is retired, remove and re-test |
|
|
109
|
-
| Migration-relative phrasing: "X now works differently", "also counts", "no longer" | The text is a diff against a previous prompt version the model never saw; relative phrasing implies phantom alternatives | Write as if current rules are the only rules that ever existed |
|
|
110
|
-
| Patch accretion: many narrow conditionals, each traceable to one incident | The model navigates a maze of special cases instead of a coherent principle, and fails unpredictably between them; an eval win for adding a line on top of the stack is not evidence the stack should exist | Generalize the principle or fix the underlying context; test removals, not just additions |
|
|
111
|
-
| Unenforced instructions: rules no code path, eval, or reviewer checks - visibly violated in the app's own transcripts | If nothing checks it and nobody noticed, it carries no signal - and behavioral rules that could be hooks, allowlists, or schema validators are less reliable as prose | Enforce in code what can be enforced in code; delete what nothing enforces and nobody misses |
|
|
112
|
-
| Identity stubs standing in for context ("You are a helpful assistant") | A role line is fine as a one-sentence focus-setter; the defect is an identity statement *substituting* for audience, product, and quality bar | Don't flag a short role line; flag when it's the only context the prompt gives |
|
|
113
|
-
| Update suppressors written for chatty models: "hold all findings for the final response", "don't narrate", "no interim updates" | Tuned against models that over-narrated; current models (Claude Fable 5.1 especially) under-narrate with these present, and the harness may not be requesting the model's between-tool progress notes at all (`thinking.display: "updates"`) | Remove first and re-test; if more narration is still wanted, replace with a specific line saying *when* user-facing text is wanted (see `shared/model-migration.md` -> Migrating to Claude Fable 5.1 from Claude Fable 5 -> User-facing progress updates) |
|
|
114
|
-
| Anti-formatting rules: "never use bullets", "no headers", "no bold" | Written against models that over-formatted; Claude Fable 5.1 already under-formats, so the rule now strips formatting the reader wanted | Remove, or replace with a rule that says when formatting is appropriate (the conditional-formatting snippet in the Claude Fable 5.1 migration section) |
|
|
115
|
-
| Instruction re-insertion every few turns ("reminder: ..." repeated on a cadence in the harness) | A retention crutch for models that lost instructions over long sessions; current models retain a once-stated instruction, and each repeat costs tokens and, under preserved thinking's history-editing check, is a history edit if it is later removed | Remove the repetition and re-test; where a genuinely per-turn reminder remains, send it as a turn-scoped (`clear_at`) system message - or a text block after the tool results - and never delete earlier copies |
|
|
116
|
-
|
|
117
|
-
**Signals:** retired model names in prompts or comments (`claude-2|claude-3|claude-instant|3\.5|3\.7`); `hold (all )?(findings|results)|don't narrate|no interim`; `never use (bullets|headers|bold)|no (bullet|header)`; `reminder:` on a turn cadence; `before|after [date]` conditionals; `now|no longer|instead of` attached to behavioral rules; rules whose reason nobody remembers; `^You are (a|an) (helpful|expert)` with nothing task-specific following.
|
|
118
|
-
|
|
119
|
-
#### 1e. Prohibition clusters - judge by provenance, not by whether the model "needs it"
|
|
120
|
-
|
|
121
|
-
A run of unconditional "never / don't / must not" lines is audited by asking, for each, **does it carry a stated reason or encode a real business/policy constraint?** - not "does the target model still need this guardrail?" (the latter question keeps everything, because nothing is *harmful* to say). Prohibitions that encode observable constraints (refund caps, data rules, compliance language, promises the business must not make) stay, ideally with their reason beside them. Prohibitions that merely describe an undesirable *output style* with no provenance - banned phrases, tic lists, "don't start with 'Certainly'" written against an older model's habits - are cruft: restate the desired style positively in one line, or attach the real reason if there is one. A surrounding cluster of legitimate reasoned prohibitions does not launder the no-provenance ones mixed into it; classify each line separately.
|
|
122
|
-
|
|
123
|
-
#### 1f. Output-shaping choreography - one pattern, remove every limb
|
|
124
|
-
|
|
125
|
-
Fixed interim-update cadences ("after every third tool call, post a progress note"), numeric output ceilings ("under 120 words", "at most five bullets"), and cut-the-detail instructions are manifestations of the **same** over-constraint pattern, written for models that padded or rambled. They are removed *together*: a stated operational reason ("queue throughput", "supervisors skim") does not convert a numeric clamp into a keeper - re-express the goal as audience/outcome framing without the number ("replies are scan-able and answer only what was asked"), and keep any genuinely format-sensitive requirement as a format instruction, not a word count. Removing the cadence while keeping the ceilings leaves the pattern in place.
|
|
126
|
-
|
|
127
|
-
### Group 2 - Brittle skill files
|
|
128
|
-
|
|
129
|
-
Skill files (`SKILL.md`, `CLAUDE.md`, rule files) inherit everything in Group 1, plus failure modes of their own. Skill size is a tax paid on every trigger.
|
|
130
|
-
|
|
131
|
-
| Pattern | Why it's cruft now | Fix |
|
|
132
|
-
|---|---|---|
|
|
133
|
-
| Verbose SKILL.md explaining things the model already knows | Every paragraph must justify its token cost; general programming knowledge doesn't | Apply the Step 3 deletion rule paragraph by paragraph |
|
|
134
|
-
| Wrong degrees of freedom | Exact scripts for judgment calls over-constrain; vague prose for fragile operations under-constrains | Match specificity to fragility: prose heuristics for open fields, exact commands (`do not modify this command`) only for narrow bridges |
|
|
135
|
-
| The recency trap: one session's stumble encoded as a permanent rule | The next session steps around a pothole that isn't there | Before keeping a rule, ask: would this have helped most recent sessions, or just the one that wrote it? |
|
|
136
|
-
| Volatile specifics: hardcoded paths, flags, version numbers, API claims with no verification date | Skills rot factually as code ships; nothing re-checks them by default | Encode architecture, data models, and workflows; verify surviving factual claims against current code as part of the audit |
|
|
137
|
-
| Time-sensitive content ("if before [date]...", option menus, duplicated info across SKILL.md and reference files) | Dates rot; menus of alternatives dilute; duplicates drift apart | An "old patterns" section instead of dates; one default plus an escape hatch; information lives in exactly one place |
|
|
138
|
-
| History narratives: past tense, incident IDs, PR numbers, pinned model names | A rule's authority is the behavior it prescribes, not the incident that motivated it; pinned model names silently degrade after the next release | State the current rule; drop the archaeology |
|
|
139
|
-
| Trigger-case enumeration: description lists of near-synonymous example queries, growing one phrase per missed trigger | Descriptions ride in every request; enumeration taxes every token budget and generalizes worse than intent categories | Name generalized categories of intent; see Group 3 for the trigger/behavior split |
|
|
140
|
-
|
|
141
|
-
**Signals:** `SKILL.md` not readable in one sitting; hardcoded paths and version pins; past tense in instruction files; descriptions that only ever grow in git history.
|
|
142
|
-
|
|
143
|
-
### Group 3 - Tool descriptions
|
|
144
|
-
|
|
145
|
-
**The rubric for tool descriptions is precision and contract accuracy, not brevity** - this is where a "trim it" instinct most often points the wrong way. Detailed descriptions are by far the most important factor in tool performance, and the most common failure is *under*-description. What changed on current models is *which content* belongs there: contract and mechanics in, behavioral steering and worked examples out. A tool description is a man page - what the tool does, when to use it (and when not to), what each parameter means, caveats, what it does not return.
|
|
146
|
-
|
|
147
|
-
| Pattern | Direction | Fix |
|
|
148
|
-
|---|---|---|
|
|
149
|
-
| Vague one-liners; parameters without descriptions; no when-not-to-use | **Under-described - add** | 3-4+ sentences minimum; description must precisely match actual behavior (a contract/behavior mismatch sends the model down paths no prompt text can fix) |
|
|
150
|
-
| `CRITICAL: You MUST use this tool when...` | Over-steered - dial back | Plain `Use this tool when...` - triggering boosters written against under-triggering models now cause over-triggering |
|
|
151
|
-
| Worked examples, fake dialogue turns, embedded protocols (numbered workflows, HEREDOCs) in the description - in any quantity, even ones that "measurably lift the call rate" | Misplaced - move | Examples constrain the exploration space and cost tokens on every request; move teaching material to skills/progressive disclosure; make parameters expressive (well-named enums carry intent) |
|
|
152
|
-
| Scolding cross-references (`ALWAYS use X, NEVER use Y for this`) and behavior-smuggling ("after showing results, always recommend...") | Misplaced - move or delete | A description is a contract about functionality, not a channel for conversational instructions; put a preference for tool X in X's description, not scattered across its rivals |
|
|
153
|
-
| Tool names in the system prompt; prose lists that shadow the real tool list | Duplicated - delete | The system prompt shouldn't name tools; then enabling or disabling one never leaves a dangling reference. Don't expose tools that are invalid in the current configuration |
|
|
154
|
-
| Near-duplicate overlapping tools; bloated response payloads; full catalogs of 30+ always-loaded tools | Structural | Fewer, clearly bounded tools with explicit boundaries in both descriptions; high-signal responses; past a few dozen tools use tool search / deferred loading instead of always-loading every schema |
|
|
155
|
-
|
|
156
|
-
**One deliberate split: trigger text is not behavioral text.** Text whose job is routing - a skill's frontmatter `description`, a trigger block - may legitimately carry calibrated urgency, because skills currently under-trigger; ideally it's tuned against a trigger eval rather than vibes. Text whose job is behavior should explain rather than shout. These look identical to a grep, so classify by function before flagging.
|
|
157
|
-
|
|
158
|
-
**Signals:** descriptions under ~3 sentences (add); `MUST|ALWAYS|NEVER` steering behavior inside descriptions (dial back); fake dialogue or worked examples in descriptions (move); tool names in system-prompt prose (delete).
|
|
159
|
-
|
|
160
|
-
### Group 4 - Request config and architecture
|
|
161
|
-
|
|
162
|
-
The same audit keeps surfacing these next to prompt cruft; report them even though they're not prompt text.
|
|
163
|
-
|
|
164
|
-
- **API fossils**: parameters and headers that error or are deprecated on the target model - the per-model lists live in `shared/model-migration.md`; treat each migration checklist as a removal checklist.
|
|
165
|
-
- **Cache-hostile ordering**: timestamps, UUIDs, per-user content interpolated above stable content. Read `shared/prompt-caching.md` -> Silent invalidators, and run its greps during this audit.
|
|
166
|
-
- **Budget countdowns rendered into context**: surfacing remaining-token counts to the model can cause premature wrap-up behavior; avoid showing them where possible.
|
|
167
|
-
- **An LLM executor for a deterministic plan**: agent sessions whose transcript is the same loop body N times; calls whose inputs fully determine outputs. **Run this check, don't wait to notice it**: in every pipeline, batch job, or agent loop, *count the model-call sites* and ask of each whether its inputs fully determine its output. Routing, tallying, normalizing, filtering, and formatting steps go back into plain code; keep exactly one model call where the work is genuinely adaptive (classifying the ambiguous remainder, writing the judgment summary). Zero model calls is an over-fix when a judgment step exists - name the one call that stays.
|
|
168
|
-
- **Redundant specialist sub-agents**: inspect the sub-agent roster / agent config as a surface in its own right. Two agents doing the same task with the same tools and near-duplicate prompts, differing only in a filter or a payload field, are one agent that should take the distinction as input. The fix is a concrete roster edit - delete the redundant definition and fold its one real difference into the surviving agent's prompt or payload - proposed as a diff like any other finding, not left as an advisory note.
|
|
169
|
-
- **No token accounting**: without per-surface cost visibility, every other issue here is invisible. If the user has no accounting, recommend adding it first - it's the prerequisite for measuring any cleanup.
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## What not to flag - the keep list
|
|
174
|
-
|
|
175
|
-
An audit that only says "delete" hurts the users who follow it most diligently. These stay, even when a grep matches:
|
|
176
|
-
|
|
177
|
-
1. **Context is never cruft.** Audience, product, environment facts, quality bar, constraints, and the *reasons* for them - what only the author knows. Too-short prompts produce generic output because the model fills gaps with safe defaults; give the model more context than seems necessary, not less.
|
|
178
|
-
2. **Cruft != length.** The harm comes from specific outdated instructions, not from volume. Never justify a deletion by character count alone.
|
|
179
|
-
3. **Fragile operations keep exact scripts.** Low-freedom, prescriptive text is correct where exactly one sequence is safe (destructive commands, auth flows, compliance steps). Prompting effort should scale with how far the task is from what the model does naturally.
|
|
180
|
-
4. **Tool contract detail stays - and often grows.** Parameter semantics, limits, failure modes, what the tool does not return. The audit removes steering and examples from descriptions, not contract.
|
|
181
|
-
5. **Prohibitions against current, demonstrated failures stay.** The discriminator is whether the failure reproduces on the target model in this context - not whether the sentence pattern-matches "prohibition".
|
|
182
|
-
6. **Trigger/routing text may carry calibrated urgency** (see Group 3). Flag shouting in bodies, not load-bearing trigger text.
|
|
183
|
-
7. **Format-pinning examples on genuinely format-sensitive outputs stay**, labeled illustrative.
|
|
184
|
-
8. **Working redundancy is not cruft.** Duplicated or overlapping content that is *functioning* - the same contract stated in two files, a worked example the prompt could in principle do without, content you would merely organize differently - is a refactoring preference, not a dated pattern. If it isn't causing errors and the target model reconciles it, an audit leaves it alone; propose deduplication or consolidation only when the duplicates actually disagree. "An audit that finds nothing should change nothing" extends to this: on a clean surface, report that it is clean.
|
|
185
|
-
9. **A one-line role statement is fine.** Flag identity text only when it substitutes for real context.
|
|
186
|
-
10. **Deliberate recap is not padding.** A single end-of-prompt restatement of the few key constraints is a known, reasonable pattern; the anti-pattern is scattered duplication.
|
|
187
|
-
11. **Re-baselining adds text too.** Matching a prompt to a new model sometimes means *adding* guidance for the new model's failure modes (see the per-target "Behavioral shifts" sections in `shared/model-migration.md`). The audit's job is fit, in both directions.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Step 5: Produce the audit report
|
|
192
|
-
|
|
193
|
-
One entry per finding, in this shape:
|
|
194
|
-
|
|
195
|
-
| Field | Content |
|
|
196
|
-
|---|---|
|
|
197
|
-
| **Location** | `file:line` (or `file:line-range`) |
|
|
198
|
-
| **Evidence** | The exact text, quoted |
|
|
199
|
-
| **Pattern** | The group/row above it matches |
|
|
200
|
-
| **Why obsolete** | One or two sentences tying it to the target model's documented behavior ("current models are proactive by default; this booster now causes over-triggering") |
|
|
201
|
-
| **Confidence** | **High** - documented in current Claude docs or errors on the target model. **Medium** - consistent, widely-observed behavior (e.g. example over-indexing). **Low** - heuristic or idiom-dating; flag, don't edit. |
|
|
202
|
-
| **Action** | `remove` / `rewrite` (give the replacement) / `move` (say where) / `replace-with-API-feature` / `add` (under-description - the fix is *more* text; give it) / `flag` (no edit proposed) |
|
|
203
|
-
|
|
204
|
-
Order the report by confidence, highest first. Summarize at the top: counts per group, and the two or three highest-impact findings in prose. Findings you cannot tie to a pattern and a target-model reason go at the bottom as `flag` items or not at all.
|
|
205
|
-
|
|
206
|
-
**The flag-versus-fix threshold.** A finding that matches a documented row in the groups above *is* a high- or medium-confidence finding, and it gets a concrete proposed action - `remove`, `rewrite` (with the replacement text), `move`, or `add`. `flag` is reserved for two things only: low-confidence idiom-dating that no row documents, and items outside the audit's scope. Do not downgrade a documented-pattern match to `flag` because it "seems minor," "reads as a soft nudge," "is a product judgment," or "measurably helps" - those are reasons the user may *decline* your proposed fix, not reasons to withhold it. An audit that correctly identifies the pattern and then proposes nothing has done half the job; the user can always reject a hunk they disagree with, but they cannot accept a fix you never wrote.
|
|
207
|
-
|
|
208
|
-
## Step 6: Produce the proposed diff
|
|
209
|
-
|
|
210
|
-
- Include only findings with action `remove`/`rewrite`/`move`/`replace-with-API-feature`/`add` at **high or medium confidence**. `flag` and low-confidence items appear in the report only.
|
|
211
|
-
- One finding per hunk, so effects attribute and the user can take hunks selectively.
|
|
212
|
-
- Rewrites beat bare deletions where the instruction has a live purpose: re-express it simply ("look before you delete") rather than keeping the verbose original or dropping the concern.
|
|
213
|
-
- A removal is complete only when everything referencing it goes too: tests asserting the old behavior, call sites and helper functions, docs, and every model-ID pin (READMEs and rule files included). Grep the project for the removed symbols and the old model ID before calling the diff done - a prompt fixed while its smoke test still asserts the old behavior is a broken app, not an audit win.
|
|
214
|
-
- For request-construction patterns (assistant-turn prefill, stop-sequence scaffolding, sampling-parameter fossils), the diff must *eliminate the capability* on every code path - after the fix, no path through the request builder can still emit the dated shape (e.g. no reachable branch yields a trailing assistant turn) - not merely rewire its current consumer. Include every call site of the changed function and the parser/retry helpers that existed only to serve the old mechanism, and rewrite the tests that assert the old request shape.
|
|
215
|
-
- The report and the proposed diff are the deliverables - produce both in full and stop there. Do not pause mid-audit to ask whether to continue, and do not end by asking whether to apply: present the diff and let the user take hunks on their own schedule. Apply edits to files only when the request itself explicitly asked for the changes to be applied (e.g. "clean it up", "remove the cruft"), and even then keep `flag`/low-confidence items out of the applied set.
|
|
216
|
-
|
|
217
|
-
## Step 7: Verify - removal is a hypothesis, not a conclusion
|
|
218
|
-
|
|
219
|
-
- **Probe behavior, not self-report.** For each contested change, run a small behavioral check before and after on a scratch copy (the user's eval suite if one exists; otherwise construct a minimal probe that exercises the instruction's purpose). Asking the model whether it needs an instruction is not a measurement.
|
|
220
|
-
- **One change at a time** where stakes are high, so regressions attribute to their cause.
|
|
221
|
-
- **If a cut regresses, re-add simply.** Re-express the instruction in its minimal form and re-probe - don't restore the verbose original.
|
|
222
|
-
- **Check out-of-band dependencies before deleting.** Grep the wider system for the exact prompt text first - classifiers, tests, and log parsers sometimes match on prompt strings.
|
|
223
|
-
- **Re-audit at every model release.** Prompts are per-model artifacts; a line that is load-bearing on one generation is cruft on the next. Each new migration section in `shared/model-migration.md` is the trigger to run this audit again.
|