@ericrisco/rsc 4.1.11 → 4.2.1

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.
Files changed (182) hide show
  1. package/manifest.json +6 -6
  2. package/package.json +2 -1
  3. package/scripts/lib/prompt-audit.js +110 -0
  4. package/scripts/lib/review-ledger.js +14 -3
  5. package/scripts/prompt-audit.js +48 -0
  6. package/scripts/rsc.js +4 -2
  7. package/skills/ads/SKILL.md +7 -7
  8. package/skills/agent-safety/SKILL.md +1 -1
  9. package/skills/asdd/SKILL.md +2 -2
  10. package/skills/asdd/references/model-routing.md +5 -5
  11. package/skills/astro/SKILL.md +1 -1
  12. package/skills/astro/scripts/verify.sh +1 -1
  13. package/skills/author-skill/SKILL.md +5 -5
  14. package/skills/author-skill/references/eval-authoring.md +6 -7
  15. package/skills/automation-flows/SKILL.md +1 -1
  16. package/skills/building-agents/SKILL.md +17 -12
  17. package/skills/building-agents/references/agent-loops-and-harness.md +3 -2
  18. package/skills/building-agents/references/evals-and-observability.md +7 -5
  19. package/skills/building-agents/references/provider-abstraction.md +31 -30
  20. package/skills/chrome-extension/SKILL.md +1 -1
  21. package/skills/cold-outreach/SKILL.md +1 -1
  22. package/skills/cold-outreach/references/templates.md +7 -3
  23. package/skills/compliance/SKILL.md +8 -8
  24. package/skills/compliance/evals/README.md +1 -1
  25. package/skills/compliance/evals/cases.yaml +2 -2
  26. package/skills/compliance/references/frameworks.md +7 -7
  27. package/skills/content-engine/SKILL.md +1 -1
  28. package/skills/cost-tracking/SKILL.md +29 -21
  29. package/skills/cost-tracking/references/pricing-tables.md +6 -5
  30. package/skills/course-builder/SKILL.md +4 -3
  31. package/skills/course-builder/references/outcomes-and-blooms.md +1 -1
  32. package/skills/course-storytelling/SKILL.md +1 -1
  33. package/skills/course-storytelling/references/concept-landing-recipe.md +1 -1
  34. package/skills/csharp-dotnet/SKILL.md +2 -2
  35. package/skills/data-policy/SKILL.md +1 -1
  36. package/skills/db-migrations/SKILL.md +6 -5
  37. package/skills/deep-learning/SKILL.md +2 -2
  38. package/skills/deployment/SKILL.md +1 -1
  39. package/skills/deployment/references/dockerfiles-by-stack.md +1 -1
  40. package/skills/design/engine/RUN.md +1 -1
  41. package/skills/django/SKILL.md +1 -1
  42. package/skills/docker/SKILL.md +1 -1
  43. package/skills/document-processing/SKILL.md +2 -1
  44. package/skills/electron/SKILL.md +2 -1
  45. package/skills/email-connector/SKILL.md +2 -1
  46. package/skills/email-deliverability/SKILL.md +2 -2
  47. package/skills/embeddings-search/SKILL.md +3 -3
  48. package/skills/error-handling/SKILL.md +4 -2
  49. package/skills/expo/SKILL.md +1 -1
  50. package/skills/fable-operator/SKILL.md +2 -2
  51. package/skills/fal/SKILL.md +1 -1
  52. package/skills/fastapi/SKILL.md +18 -9
  53. package/skills/fastapi/references/database.md +19 -10
  54. package/skills/finance-ops/SKILL.md +1 -1
  55. package/skills/firebase/SKILL.md +1 -1
  56. package/skills/flutter/SKILL.md +1 -1
  57. package/skills/forecasting/SKILL.md +1 -1
  58. package/skills/forecasting/references/accuracy-and-backtesting.md +1 -1
  59. package/skills/forecasting/references/methods-cheatsheet.md +3 -3
  60. package/skills/ftd/SKILL.md +2 -3
  61. package/skills/fundraising/references/funnel-math.md +1 -1
  62. package/skills/gamedev-multiplayer/SKILL.md +2 -2
  63. package/skills/gamedev-multiplayer/references/unity-and-unreal-netcode.md +4 -4
  64. package/skills/gamedev-pathing/SKILL.md +1 -1
  65. package/skills/gamedev-physics/SKILL.md +3 -2
  66. package/skills/gamedev-physics/references/character-controllers.md +1 -1
  67. package/skills/gamedev-shaders/SKILL.md +2 -4
  68. package/skills/gamedev-shipping/SKILL.md +8 -5
  69. package/skills/gamedev-shipping/references/mobile-and-desktop.md +7 -3
  70. package/skills/gcp-essentials/SKILL.md +11 -8
  71. package/skills/gcp-essentials/references/networking-and-sql.md +4 -4
  72. package/skills/gdpr-privacy/references/dpa-and-transfers.md +1 -1
  73. package/skills/git-workflow/SKILL.md +3 -3
  74. package/skills/github-actions/SKILL.md +12 -12
  75. package/skills/github-actions/evals/cases.yaml +1 -1
  76. package/skills/github-actions/references/caching-and-matrix.md +5 -5
  77. package/skills/github-actions/references/oidc-deploys.md +4 -4
  78. package/skills/go/SKILL.md +3 -3
  79. package/skills/google-workspace/SKILL.md +15 -11
  80. package/skills/google-workspace/references/api-recipes.md +2 -2
  81. package/skills/google-workspace/references/auth-setup.md +1 -1
  82. package/skills/harness/SKILL.md +4 -3
  83. package/skills/harness/references/daily-curation-automation.md +1 -1
  84. package/skills/harness/references/providers.yaml +4 -4
  85. package/skills/harness/references/wiki-protocol.md +2 -1
  86. package/skills/hetzner/SKILL.md +13 -12
  87. package/skills/hetzner/references/cloud-init.md +4 -2
  88. package/skills/hetzner/references/plans-and-locations.md +15 -14
  89. package/skills/hiring/SKILL.md +3 -3
  90. package/skills/htmx/SKILL.md +4 -4
  91. package/skills/htmx/references/server-contract.md +2 -2
  92. package/skills/huggingface/SKILL.md +15 -15
  93. package/skills/huggingface/evals/cases.yaml +1 -1
  94. package/skills/huggingface/references/endpoints-and-spaces.md +5 -3
  95. package/skills/huggingface/references/hub-and-cli.md +4 -4
  96. package/skills/huggingface/references/inference-providers.md +1 -1
  97. package/skills/huggingface/scripts/verify.sh +3 -2
  98. package/skills/implement/SKILL.md +3 -3
  99. package/skills/init/SKILL.md +2 -3
  100. package/skills/init/references/accompaniment-and-profile.md +1 -1
  101. package/skills/init/references/recommend-skills.md +9 -9
  102. package/skills/instagram-api/SKILL.md +9 -9
  103. package/skills/instagram-api/evals/cases.yaml +1 -1
  104. package/skills/instagram-api/references/insights-metrics.md +1 -1
  105. package/skills/instagram-api/references/publish-reel.md +8 -7
  106. package/skills/invoicing/SKILL.md +8 -7
  107. package/skills/java/SKILL.md +3 -2
  108. package/skills/knowledge-ops/SKILL.md +3 -4
  109. package/skills/knowledge-ops/references/gardening-playbook.md +3 -3
  110. package/skills/kotlin-android/SKILL.md +10 -3
  111. package/skills/kotlin-android/references/gradle-setup.md +1 -4
  112. package/skills/landing-copy/SKILL.md +1 -1
  113. package/skills/laravel/SKILL.md +11 -11
  114. package/skills/lead-gen/SKILL.md +3 -3
  115. package/skills/linkedin-api/SKILL.md +3 -3
  116. package/skills/linkedin-api/evals/cases.yaml +1 -1
  117. package/skills/linkedin-api/references/api-reference.md +3 -3
  118. package/skills/linkedin-content/SKILL.md +1 -1
  119. package/skills/linkedin-outreach/SKILL.md +4 -4
  120. package/skills/linkedin-strategy/SKILL.md +2 -2
  121. package/skills/llm-pipeline/SKILL.md +2 -2
  122. package/skills/llm-pipeline/references/litellm-router.md +3 -3
  123. package/skills/logistics-ops/SKILL.md +6 -1
  124. package/skills/marketing/SKILL.md +1 -1
  125. package/skills/marketing/references/seo-geo.md +2 -2
  126. package/skills/mongodb/SKILL.md +3 -2
  127. package/skills/mongodb/references/aggregation.md +3 -2
  128. package/skills/mysql/SKILL.md +1 -1
  129. package/skills/mysql/references/mysql-vs-mariadb.md +1 -1
  130. package/skills/n8n/SKILL.md +1 -1
  131. package/skills/nextjs/SKILL.md +1 -1
  132. package/skills/observability/SKILL.md +1 -1
  133. package/skills/observability/references/instrumentation-recipes.md +1 -1
  134. package/skills/ollama/SKILL.md +1 -1
  135. package/skills/open-weights/SKILL.md +3 -4
  136. package/skills/orient/SKILL.md +4 -3
  137. package/skills/parallel/SKILL.md +1 -1
  138. package/skills/planetscale/SKILL.md +3 -3
  139. package/skills/planetscale/references/no-foreign-keys.md +3 -3
  140. package/skills/postgresdb/SKILL.md +4 -4
  141. package/skills/presentations/SKILL.md +1 -1
  142. package/skills/prompt-engineering/SKILL.md +6 -6
  143. package/skills/prompt-engineering/evals/cases.yaml +2 -2
  144. package/skills/prompt-engineering/references/output-contracts.md +18 -23
  145. package/skills/rag/references/pipeline.md +7 -5
  146. package/skills/review/SKILL.md +5 -5
  147. package/skills/roast-me/prompts/compute.md +5 -5
  148. package/skills/roast-me/prompts/roast.md +2 -2
  149. package/skills/sdd-init/SKILL.md +3 -3
  150. package/skills/ship/SKILL.md +7 -9
  151. package/skills/shopify/SKILL.md +6 -6
  152. package/skills/shopify/references/apps-graphql.md +3 -3
  153. package/skills/skill-scout/SKILL.md +1 -1
  154. package/skills/specify/SKILL.md +3 -3
  155. package/skills/specify/references/eliciting-requirements.md +3 -3
  156. package/skills/structured-extraction/SKILL.md +7 -3
  157. package/skills/structured-extraction/references/providers.md +8 -5
  158. package/skills/svelte/SKILL.md +1 -1
  159. package/skills/swift-ios/SKILL.md +4 -4
  160. package/skills/tasks/SKILL.md +1 -1
  161. package/skills/tauri/SKILL.md +4 -3
  162. package/skills/terms-conditions/SKILL.md +2 -2
  163. package/skills/translation-l10n/SKILL.md +2 -1
  164. package/skills/typescript/SKILL.md +67 -19
  165. package/skills/typescript/evals/README.md +3 -3
  166. package/skills/typescript/evals/cases.yaml +4 -1
  167. package/skills/typescript/references/build-and-monorepo.md +82 -26
  168. package/skills/typescript/references/type-system.md +15 -4
  169. package/skills/typescript/scripts/verify.sh +20 -10
  170. package/skills/unslop/SKILL.md +1 -1
  171. package/skills/ux/SKILL.md +1 -1
  172. package/skills/vercel/SKILL.md +3 -2
  173. package/skills/vercel/references/vercel-json.md +8 -5
  174. package/skills/verify/SKILL.md +3 -3
  175. package/skills/vllm/SKILL.md +4 -2
  176. package/skills/vue-nuxt/SKILL.md +5 -5
  177. package/skills/webhooks/SKILL.md +10 -1
  178. package/skills/worktrees/SKILL.md +10 -8
  179. package/skills/youtube-ideation/SKILL.md +1 -1
  180. package/targets/agents.js +26 -17
  181. package/targets/asdd-gate.mjs +9 -1
  182. package/targets/commands.js +7 -7
@@ -61,7 +61,7 @@ Rules, each with its why:
61
61
  | "Some thoughts on remote work and productivity." | "We went fully remote and our output dropped 30%. The fix wasn't more meetings." |
62
62
  | "Happy to announce our new feature is live!" | "It took 4 rewrites and a near-mutiny to ship one button. Worth it." |
63
63
 
64
- For the full 8–10 pattern library (number-lead, false-start, contrarian, open-loop, named-stakes), see `references/hooks-and-formats.md`.
64
+ For the full 10-pattern library (number-lead, false-start, contrarian, open-loop, named-stakes), see `references/hooks-and-formats.md`.
65
65
 
66
66
  ## The story arc and the character budget
67
67
 
@@ -67,7 +67,7 @@ When you do send a note, you do **not** write it here — hand the brief (the ho
67
67
 
68
68
  | Account | Realistic weekly cap | Daily target | Health rule |
69
69
  | --- | --- | --- | --- |
70
- | Free | ~100/wk | ~20/weekday, stay under ~80/wk | Pause and warm more if acceptance drops below ~30%. |
70
+ | Free | ~100/wk | ~16/weekday, stay under ~80/wk | Pause and warm more if acceptance drops below ~30%. |
71
71
  | Premium / Sales Nav | up to ~200/wk | up to ~40/day | Only with strong SSI and acceptance >40%; otherwise treat as free. |
72
72
 
73
73
  Over the cap, requests get throttled or the account flagged. Below ~30% acceptance you are spraying — go back to phase 2 instead of pushing volume, and withdraw stale pending requests before they pile up.
@@ -123,9 +123,9 @@ Full column spec, the outcome enum, a filled 5-row example, and the weekly-revie
123
123
 
124
124
  **Weekly review ritual** (15 min, same day each week). Compute from the ledger:
125
125
 
126
- - **Acceptance %** = accepted ÷ requested.
127
- - **Post-accept reply %** = replied ÷ accepted.
128
- - **Conversations → calls %** = call_booked ÷ conversation.
126
+ - **Acceptance %** = accepted-or-better ÷ all requests sent.
127
+ - **Post-accept reply %** = replied-or-better ÷ accepted-or-better.
128
+ - **Conversations → calls %** = call_booked ÷ (conversation + call_booked).
129
129
  - **Touches/week** = rows added this week (is the loop actually running?).
130
130
 
131
131
  If acceptance < ~30%, warm harder (phase 2). If reply < ~10%, your hooks are weak (better brief to cold-outreach). If touches/week is near zero, the loop stopped — that's the real failure.
@@ -37,7 +37,7 @@ Extract, in this order:
37
37
  5. **SSI trend** — the 0-100 score's direction over the trailing window.
38
38
  6. **Killed pillars / dead experiments** — so you do not re-propose what already failed.
39
39
 
40
- If the directory is empty or absent, **bootstrap it** — create `02-DOCS/wiki/linkedin/` with `positioning.md`, `decisions/`, and `what-worked.md`. Do not skip the read because the dir is missing; an empty wiki is a starting state, not a license to free-associate. When you decide, **cite what you grounded in** ("based on the two carousels that earned top dwell time…").
40
+ If the directory is empty or absent, **bootstrap it** — create `02-DOCS/wiki/linkedin/` with `positioning.md`, `pillars.md`, `decisions/`, and `what-worked.md`. Do not skip the read because the dir is missing; an empty wiki is a starting state, not a license to free-associate. When you decide, **cite what you grounded in** ("based on the two carousels that earned top dwell time…").
41
41
 
42
42
  Full file layout and templates: `references/wiki-records.md`.
43
43
 
@@ -96,7 +96,7 @@ If any answer is NO, lower the cadence. A held 3/week beats an aspirational 5/we
96
96
 
97
97
  ## 5. The social-selling rhythm — engage-vs-create and SSI
98
98
 
99
- **Engagement outweighs raw posting frequency for inbound.** Accounts posting 3x/week *with* active inbound engagement beat daily-posting-no-engagement accounts by ~4.2x in lead gen. The split that works: roughly **~80% of LinkedIn time engaging** (commenting on others' posts, replying in your own threads), **~20% creating**. "20 min creating + 40 min engaging" beats "60 min creating + 0 engaging." Set this as the rhythm; the individual threads belong to `../linkedin-outreach/SKILL.md`.
99
+ **Engagement outweighs raw posting frequency for inbound.** Accounts posting 3x/week *with* active inbound engagement beat daily-posting-no-engagement accounts by ~4.2x in lead gen. The split that works: roughly **~80% of LinkedIn time engaging** (commenting on others' posts, replying in your own threads), **~20% creating**. "12 min creating + 48 min engaging" beats "60 min creating + 0 engaging." Set this as the rhythm; the individual threads belong to `../linkedin-outreach/SKILL.md`.
100
100
 
101
101
  **SSI as a habit system, not a vanity number.** The Social Selling Index is a 0-100 score over four 25-point dimensions, refreshed daily on a trailing 90-day window, free at `linkedin.com/sales/ssi`:
102
102
 
@@ -70,7 +70,7 @@ from litellm import Router
70
70
  router = Router(
71
71
  model_list=[
72
72
  {"model_name": "smart",
73
- "litellm_params": {"model": "anthropic/claude-sonnet-4-6", "timeout": 30}},
73
+ "litellm_params": {"model": "anthropic/claude-sonnet-5-5", "timeout": 30}},
74
74
  {"model_name": "smart-backup",
75
75
  "litellm_params": {"model": "openai/gpt-4o", "timeout": 30}},
76
76
  ],
@@ -122,7 +122,7 @@ The cheapest, fastest, most reliable call is the one you never made — so cache
122
122
 
123
123
  ## Cost & latency control
124
124
 
125
- - **Model-tier routing, cheap-first.** Run the cheap tier, escalate only on low confidence or detected complexity. Anchor prices (Anthropic, 2026): Haiku 4.5 $1/$5 per M in/out, Sonnet 4.6 $3/$15, Opus 4.7 $5/$25 — flagship-for-everything is 5× the cost for zero quality gain on easy calls.
125
+ - **Model-tier routing, cheap-first.** Run the cheap tier, escalate only on low confidence or detected complexity. Anchor prices (Anthropic, checked 2026-11): Haiku 5.5 $0.10/$0.50 per M in/out (prompts up to 100K tokens), Sonnet 5.5 $2/$10, Opus 5.5 $4/$20 — flagship-for-everything is up to 40× the cost for zero quality gain on easy calls.
126
126
  - **Budget caps that ABORT, not just log.** Per-request and per-tenant caps that kill a runaway loop. A logged-but-uncapped budget still lets a bug spend $10k overnight.
127
127
  - **Token and latency budgets per step**, and stream output for perceived latency on user-facing calls.
128
128
 
@@ -10,7 +10,7 @@ from litellm import Router
10
10
  router = Router(
11
11
  model_list=[
12
12
  {"model_name": "smart",
13
- "litellm_params": {"model": "anthropic/claude-sonnet-4-6",
13
+ "litellm_params": {"model": "anthropic/claude-sonnet-5-5",
14
14
  "api_key": "os.environ/ANTHROPIC_API_KEY",
15
15
  "timeout": 30, "order": 1}},
16
16
  {"model_name": "smart", # same group, order 2 = first internal fallback
@@ -18,7 +18,7 @@ router = Router(
18
18
  "api_key": "os.environ/OPENAI_API_KEY",
19
19
  "timeout": 30, "order": 2}},
20
20
  {"model_name": "cheap",
21
- "litellm_params": {"model": "anthropic/claude-haiku-4-5",
21
+ "litellm_params": {"model": "anthropic/claude-haiku-5-5",
22
22
  "api_key": "os.environ/ANTHROPIC_API_KEY",
23
23
  "timeout": 20}},
24
24
  {"model_name": "long-ctx",
@@ -48,7 +48,7 @@ Use `os.environ/VAR` indirection (proxy YAML) or read `os.environ[...]` in SDK.
48
48
  model_list:
49
49
  - model_name: smart
50
50
  litellm_params:
51
- model: anthropic/claude-sonnet-4-6
51
+ model: anthropic/claude-sonnet-5-5
52
52
  api_key: os.environ/ANTHROPIC_API_KEY
53
53
  timeout: 30
54
54
  - model_name: smart-backup
@@ -78,7 +78,12 @@ shipment = client.shipment.create(
78
78
  parcel={"length": 9, "width": 6, "height": 3, "weight": 12}, # drives DIM
79
79
  )
80
80
  # Filter to services that hit the promised delivery date, THEN take the cheapest.
81
- rate = shipment.lowest_rate(carriers=["USPS", "UPS", "FedEx"])
81
+ on_time = [
82
+ r for r in shipment.rates
83
+ if r.carrier in {"USPS", "UPS", "FedEx"}
84
+ and r.delivery_days is not None and r.delivery_days <= 2 # the 2-day promise
85
+ ]
86
+ rate = min(on_time, key=lambda r: float(r.rate))
82
87
  bought = client.shipment.buy(shipment.id, rate=rate)
83
88
  # `bought.tracker` is now live (pre_transit → ... → delivered).
84
89
  ```
@@ -153,7 +153,7 @@ The project's forbidden phrases are enforced, not suggested. Before handing over
153
153
  published, write it to a scratch file and run `npx @ericrisco/rsc copy check <file>`. On
154
154
  `RSC_COPY_VIOLATION`, rewrite and check again. A negation still counts ("this is not X" uses X), so
155
155
  say what it is instead. When the person states a new ban, record it in
156
- `02-DOCS/wiki/brand/voice-guide.md` under `## Never use`, one phrase per bullet (`word*` also covers
156
+ `02-DOCS/wiki/brand/voice.md` under `## Never use`, one phrase per bullet (`word*` also covers
157
157
  its derivatives). In Claude Code a Stop hook runs the same check on your final answer.
158
158
 
159
159
  ## Anti-patterns
@@ -240,7 +240,7 @@ Metadata API or a `<Script>` tag). Validate every block before shipping.
240
240
 
241
241
  **Pick by page type:** `Organization` (homepage/about) · `WebPage` (any page) · `Article`
242
242
  (blog/news, with author + `datePublished`/`dateModified`) · `FAQPage` (any Q&A — highest GEO value)
243
- · `Product` (e-commerce) · `SoftwareApplication` (tools/apps) · `HowTo` (tutorials) ·
243
+ · `Product` (e-commerce) · `SoftwareApplication` (tools/apps) · `HowTo` (tutorials; Google retired HowTo rich results in 2023) ·
244
244
  `BreadcrumbList` (navigation) · `LocalBusiness` (physical location). Combine several on one page with
245
245
  `@graph`.
246
246
 
@@ -306,7 +306,7 @@ Metadata API or a `<Script>` tag). Validate every block before shipping.
306
306
 
307
307
  For Product, SoftwareApplication, HowTo, BreadcrumbList, LocalBusiness, SpeakableSpecification, and
308
308
  a combined `@graph` example, the full template set lives in the upstream skill credited above; the
309
- five types here cover the overwhelming majority of marketing sites.
309
+ three types here cover the overwhelming majority of marketing sites.
310
310
 
311
311
  **Validate before shipping (no fabricated ratings or reviews in schema — same proof rule):**
312
312
 
@@ -191,7 +191,7 @@ db.orders.aggregate([
191
191
  pipeline: [ { $project: { name: 1 } } ] // project inside $lookup: pull only what you need
192
192
  }},
193
193
  { $group: { _id: "$customerId", total: { $sum: "$amount" } } }
194
- ], { allowDiskUse: true }) // $group/$sort spill past 100 MB/stage; this lets large groups complete,
194
+ ], { allowDiskUse: true }) // spill past 100 MB/stage even where allowDiskUseByDefault=false (6.0+ default: true);
195
195
  // it is NOT a substitute for a missing $match index — see anti-patterns.
196
196
  ```
197
197
 
@@ -291,7 +291,8 @@ Serverless / M2 / M5 were auto-migrated to Flex.
291
291
  ### Aggregation memory
292
292
 
293
293
  Each blocking stage (`$group`, `$sort` without an index, `$bucket`) is capped at **100 MB**. Past it
294
- the stage errors unless `allowDiskUse:true` lets it spill. Spilling is a correctness fallback for
294
+ the stage spills to disk (6.0+, `allowDiskUseByDefault` is `true` on `mongod`); it errors only when
295
+ the server sets that parameter to `false` or the query passes `allowDiskUse:false`. Spilling is a correctness fallback for
295
296
  genuinely large groups, not a performance fix for a missing index.
296
297
 
297
298
  ## Verify
@@ -88,8 +88,9 @@ transactions-and-ops.)
88
88
  ## Memory limit and `allowDiskUse`
89
89
 
90
90
  Each blocking stage (`$group`, `$sort` without a supporting index, `$bucket`,
91
- `$setWindowFields`) is capped at **100 MB**. Past it the stage errors unless you pass
92
- `allowDiskUse: true`, which lets it spill to temporary files on disk.
91
+ `$setWindowFields`) is capped at **100 MB**. Past it the stage spills to temporary files on disk:
92
+ since 6.0 the `mongod` parameter `allowDiskUseByDefault` is `true`. The stage errors instead when that
93
+ parameter is `false` (then pass `allowDiskUse: true` to spill) or the query passes `allowDiskUse: false`.
93
94
 
94
95
  Spilling is the right tool for a genuinely large aggregation (an analytics rollup over the whole
95
96
  collection). It is the **wrong** tool to "fix" a slow pipeline whose real problem is a `$match` that
@@ -207,7 +207,7 @@ They share a heritage and diverge in ways that break copy-pasted SQL. Do not ass
207
207
  |---|---|---|
208
208
  | Default auth | `caching_sha2_password` | `mysql_native_password` / `ed25519` |
209
209
  | `VECTOR` | MySQL 9.0+ only; `STRING_TO_VECTOR()` | Native in 11.8; `VEC_DISTANCE_COSINE()` — different syntax |
210
- | `RETURNING` | `INSERT ... RETURNING` only (8.0+) | `INSERT`/`UPDATE`/`DELETE ... RETURNING` |
210
+ | `RETURNING` | Not supported (use `LAST_INSERT_ID()` / `ROW_COUNT()`) | `INSERT`/`UPDATE`/`DELETE ... RETURNING` |
211
211
  | Sequences | No `CREATE SEQUENCE` | `CREATE SEQUENCE` supported |
212
212
  | System-versioned (temporal) tables | Not supported | `WITH SYSTEM VERSIONING` supported |
213
213
  | Snapshot isolation | RR snapshot, no write-conflict detection | `innodb_snapshot_isolation` defaults **ON** |
@@ -56,7 +56,7 @@ on MariaDB.
56
56
 
57
57
  | Feature | MySQL | MariaDB |
58
58
  |---|---|---|
59
- | `RETURNING` | `INSERT ... RETURNING` only (8.0+) | `INSERT` / `UPDATE` / `DELETE ... RETURNING` |
59
+ | `RETURNING` | Not supported (use `LAST_INSERT_ID()` / `ROW_COUNT()`) | `INSERT` / `UPDATE` / `DELETE ... RETURNING` |
60
60
  | Sequences | No `CREATE SEQUENCE` (use `AUTO_INCREMENT`) | `CREATE SEQUENCE` supported |
61
61
  | System-versioned (temporal) tables | Not supported | `WITH SYSTEM VERSIONING` + `FOR SYSTEM_TIME` queries |
62
62
  | `JSON` type | Native binary `JSON` | Historically a `LONGTEXT` alias with JSON functions; check the version — behaviour and storage differ |
@@ -172,6 +172,6 @@ Details in `references/n8n-mcp-tools.md`.
172
172
  |---|---|
173
173
  | Designing the flow (trigger/steps/error path, dedup) and producing the importable JSON | `automation-flows` — start there if the logic isn't settled |
174
174
  | Whether n8n is the right platform at all — cost model, self-host vs cloud | `automation-strategy` |
175
- | Operating a different platform | `make`, `zapier`, `power-automate` (neither Zapier nor Power Automate can create flows via API — n8n's edge) |
175
+ | Operating a different platform | `make`, `zapier`, `power-automate` (Zapier has no flow-creation API on a normal account; Power Automate creates only solution-aware flows, via the Dataverse Web API) |
176
176
  | A generic typed HTTP client with auth/pagination/backoff — real code, not a workflow | `api-connector-builder` |
177
177
  | The inbound webhook receiver in your own app (here webhooks are only n8n triggers) | `webhooks` |
@@ -106,7 +106,7 @@ export async function renameProject(_prev: RenameResult | null, formData: FormDa
106
106
  if (!owned) return { status: "error", message: "Forbidden" };
107
107
 
108
108
  const updated = await db.project.update({ where: { id: parsed.data.id }, data: { name: parsed.data.name } });
109
- revalidateTag(`project:${updated.id}`);
109
+ revalidateTag(`project:${updated.id}`); // v15. On v16: updateTag(`project:${updated.id}`) (read-your-writes)
110
110
  return { status: "ok", data: { id: updated.id, name: updated.name } };
111
111
  }
112
112
  ```
@@ -114,7 +114,7 @@ Per-stack init (Node SDK 2.0 manual setup, Go SDK, context propagation across HT
114
114
  ```javascript
115
115
  // LLM call as a span: model + token attrs. These attributes feed ../cost-tracking/SKILL.md.
116
116
  await tracer.startActiveSpan('chat gpt-4o', async (span) => {
117
- span.setAttribute('gen_ai.system', 'openai');
117
+ span.setAttribute('gen_ai.provider.name', 'openai');
118
118
  span.setAttribute('gen_ai.request.model', 'gpt-4o');
119
119
  const res = await openai.chat.completions.create({ /* ... */ });
120
120
  span.setAttribute('gen_ai.usage.input_tokens', res.usage.prompt_tokens);
@@ -102,7 +102,7 @@ Use `gen_ai.*` semantic conventions (client spans exited experimental, early 202
102
102
 
103
103
  ```python
104
104
  with tracer.start_as_current_span("chat gpt-4o") as span:
105
- span.set_attribute("gen_ai.system", "openai")
105
+ span.set_attribute("gen_ai.provider.name", "openai")
106
106
  span.set_attribute("gen_ai.operation.name", "chat")
107
107
  span.set_attribute("gen_ai.request.model", "gpt-4o")
108
108
  span.set_attribute("gen_ai.request.temperature", 0.2)
@@ -71,7 +71,7 @@ in the table below are derived from this formula, not vendor-published numbers
71
71
  | --- | --- | --- |
72
72
  | 8 GB | 7–8B Q4_K_M (~5–6 GB) | leave headroom for KV cache + the OS |
73
73
  | 12 GB | up to ~14B Q4_K_M (~9–10 GB) | 7–8B at Q8_0 also fits |
74
- | 16 GB | 14B Q4_K_M comfortably; 32B is tight | 32B Q4_K_M ≈ 20 GB — won't fit |
74
+ | 16 GB | 14B Q4_K_M comfortably | 32B Q4_K_M ≈ 20 GB — won't fit |
75
75
  | 24 GB | 32B Q4_K_M (~20 GB) | 70B does **not** fit at any usable quant |
76
76
  | 48 GB+ / 2×24 GB | 70B Q4_K_M (~40–48 GB) | needs the full budget; long context pushes over |
77
77
  | Mac unified (e.g. 64 GB) | weights share RAM with everything else | budget against total unified memory |
@@ -15,8 +15,8 @@ serve, or fine-tune anything — it feeds the skills that do (see [Related skill
15
15
  ## The one rule (read before you name a model)
16
16
 
17
17
  **Model names and their licenses change monthly. Never state a license from memory — open the
18
- model card and confirm it, every time.** This file was authored against cards live in mid-2026;
19
- by the time you read it, versions have shipped and terms have moved. So:
18
+ model card and confirm it, every time.** Versions ship and terms move between one read and the
19
+ next. So:
20
20
 
21
21
  - Treat every specific version/license line below as **[verify the card]**, not as settled fact.
22
22
  - State the license **class** (OSI-open vs custom-community vs restricted), then send the reader to
@@ -24,8 +24,7 @@ by the time you read it, versions have shipped and terms have moved. So:
24
24
  - The *decision framework* and the *class taxonomy* are the durable parts. The version list is the
25
25
  perishable part. Weight your trust accordingly.
26
26
 
27
- Real, verified-mid-2026 examples of *why* this rule exists — all confirmed against the source, and
28
- all things that were different at my Jan-2026 cutoff:
27
+ Examples of *why* this rule exists, each confirmed against its source in mid-2026:
29
28
 
30
29
  - **Gemma 4** moved to **Apache-2.0**, while Gemma 1–3 stay on the custom Gemma Terms of Use
31
30
  (confirmed on [ai.google.dev/gemma/terms](https://ai.google.dev/gemma/terms), accessed
@@ -61,7 +61,7 @@ guessing their mood reads as condescending.
61
61
 
62
62
  | Step | What | Detail |
63
63
  |---|---|---|
64
- | 1 | Text, in the three rules | always |
64
+ | 1 | Text, in the four rules | always |
65
65
  | 2 | One diagram in the chat | the smallest form that carries the point |
66
66
  | 3 | One self-contained HTML page | big pictures, few words; open it |
67
67
  | 4 | Animated video | only offered, never made unasked |
@@ -80,13 +80,14 @@ No turn ends in seco. One block, at the end, never mid-work.
80
80
  ➡️ Siguiente — 1-3 concrete options, ending in a question
81
81
  ```
82
82
 
83
+ The labels are shown in Spanish; write them in the person's language (rule 1).
83
84
  📍 and ➡️ always. ✅ and 🧭 only when they carry something. Situate from what is **actually** built;
84
85
  an invented state is worse than a shorter block. At a real fork, ask: the fork is where the person's
85
86
  judgment is worth more than yours.
86
87
 
87
88
  **Emoji off.** If `.rsc/.no-emoji` exists, the block has no glyph: the same four lines open with
88
- `Dónde estás:`, `Hecho:`, `Decidido:` and `Siguiente:`. The session-start hook says so; the rule also
89
- holds for every reply, commit, pull request and document, whatever a skill or a template shows.
89
+ `Dónde estás:`, `Hecho:`, `Decidido:` and `Siguiente:`, in the person's language. The session-start
90
+ hook says so; the rule also holds for every reply, commit, pull request and document, whatever a skill or a template shows.
90
91
 
91
92
  ## Where this ends
92
93
 
@@ -73,7 +73,7 @@ SUBAGENT BRIEF (one per unit)
73
73
 
74
74
  Each subagent still owns its own discipline inside its scope — TDD via `implement`, the stack skill's test mechanics, decision logging. This skill does not relax any of that; it just runs several of them at once.
75
75
 
76
- **Per-unit model tier (when routing is enabled).** `parallel` has *no fixed tier* — this is the most concrete place per-phase model routing pays off. When `models.enabled: true` in `02-DOCS/wiki/sdd/config.yaml`, give each unit the tier of the *kind of work it does*, not one tier for the whole fan-out: an implement-type unit → `balanced`, a scan/research/boilerplate unit → `light`, a unit doing genuine design or root-cause reasoning → `heavy`. Resolve the tier to a concrete model via `models.tiers` and **dispatch that subagent on that model** (e.g. Claude Code's `model` field on the Task/subagent) — real routing, independent of the session model. If routing is off or no profile exists, dispatch on the session model and say nothing. Full protocol: `../asdd/references/model-routing.md`.
76
+ **Per-unit model tier (when routing is enabled).** `parallel` has *no fixed tier* — this is the most concrete place per-phase model routing pays off. When `models.enabled: true` in `02-DOCS/wiki/sdd/config.yaml`, give each unit the tier of the *kind of work it does*, not one tier for the whole fan-out: an implement-type unit → `balanced`, a scan/research/boilerplate unit → `light`, a unit doing genuine design or root-cause reasoning → `heavy`. Resolve the tier to a concrete model via `models.tiers` and **dispatch that subagent on that model** (e.g. Claude Code's `model` field on the Task/subagent) — real routing, independent of the session model. If routing is off or no profile exists, say nothing about models and dispatch each unit on the balanced tier (the `developer` agent, below). Full protocol: `../asdd/references/model-routing.md`.
77
77
 
78
78
  **Set the model on every dispatch — an omitted model silently inherits the session's, usually the most expensive one, and that is how a fan-out's cost quietly explodes.** rsc installs a `developer` subagent pinned to the **balanced** tier (Sonnet by default; the user's onboarding choice in `.rsc/developer.json`, never `light`). For implement-type units, **dispatch to the `developer` agent** (e.g. Claude Code `subagent_type: developer`) — that's the deliberate cost cap the user asked for. Only escalate a genuinely heavy unit (real design / root-cause) to a heavy model, and only when routing is enabled; otherwise balanced is the floor and the ceiling. If you dispatch a raw subagent instead, name its tier explicitly.
79
79
 
@@ -118,13 +118,13 @@ CREATE TABLE orders (
118
118
  );
119
119
  ```
120
120
 
121
- With Prisma, declare `relationMode = "prisma"` so the client emulates relations and adds the implicit
122
- indexes instead of emitting DB-level FKs:
121
+ With Prisma, declare `relationMode = "prisma"` so the client emulates relations instead of emitting
122
+ DB-level FKs. Prisma does not create the FK indexes: add `@@index` on each relation scalar yourself.
123
+ The connection URL lives in `prisma.config.ts`, not the datasource block (see `../prisma-orm/SKILL.md`):
123
124
 
124
125
  ```prisma
125
126
  datasource db {
126
127
  provider = "mysql"
127
- url = env("DATABASE_URL")
128
128
  relationMode = "prisma"
129
129
  }
130
130
  ```
@@ -39,13 +39,13 @@ For large fan-out, prefer a batched background job over one giant transaction so
39
39
  ## Prisma: relationMode = "prisma"
40
40
 
41
41
  Setting `relationMode = "prisma"` tells Prisma to emulate relations in the client instead of emitting
42
- DB-level foreign keys. Prisma then also creates the **implicit indexes** on relation scalar fields that
43
- a real FK would have given you for free.
42
+ DB-level foreign keys. Prisma does **not** create the index a real FK would have given you for free:
43
+ declare `@@index` on every relation scalar field yourself (schema validation warns when one is missing).
44
+ The connection URL lives in `prisma.config.ts`, not the datasource block.
44
45
 
45
46
  ```prisma
46
47
  datasource db {
47
48
  provider = "mysql"
48
- url = env("DATABASE_URL")
49
49
  relationMode = "prisma"
50
50
  }
51
51
 
@@ -250,8 +250,8 @@ Full sequences (zero-downtime expand-contract, batched backfills, per-ORM runner
250
250
  [migrations](references/migrations.md). These four are absolute because each one is a lock you cannot
251
251
  take back once traffic is on the table:
252
252
 
253
- 1. Index creation on a live table is **always** `CONCURRENTLY` — plain `CREATE INDEX` holds ACCESS
254
- EXCLUSIVE for the entire build and blocks every writer. It therefore cannot run inside a txn.
253
+ 1. Index creation on a live table is **always** `CONCURRENTLY` — plain `CREATE INDEX` holds SHARE
254
+ for the entire build and blocks every writer. `CONCURRENTLY` cannot run inside a txn.
255
255
  2. Never `ADD COLUMN ... NOT NULL` without a default/backfill plan, and never add a **volatile**
256
256
  default (`now()`, `gen_random_uuid()`) on a large table without a batched backfill — a volatile
257
257
  default rewrites the whole table under ACCESS EXCLUSIVE. A non-volatile constant is instant (PG11+).
@@ -261,8 +261,8 @@ take back once traffic is on the table:
261
261
  somewhere, so the next environment replays a history that no longer matches the one in production.
262
262
 
263
263
  Lock modes: `CREATE INDEX CONCURRENTLY` takes SHARE UPDATE EXCLUSIVE (allows writes); plain
264
- `CREATE INDEX`, `ALTER TABLE ... TYPE`, `ADD COLUMN` with a volatile default, and `VACUUM FULL` take
265
- ACCESS EXCLUSIVE (blocks everything). Full table in
264
+ `CREATE INDEX` takes SHARE (allows reads, blocks writes); `ALTER TABLE ... TYPE`, `ADD COLUMN` with a
265
+ volatile default, and `VACUUM FULL` take ACCESS EXCLUSIVE (blocks everything). Full table in
266
266
  [migrations](references/migrations.md#lock-impact-reference).
267
267
 
268
268
  ## Anti-patterns
@@ -148,7 +148,7 @@ If the client will *edit* the slides, this is the wrong pipeline — rebuild wit
148
148
 
149
149
  ## Tooling & current versions (verified 2026-06)
150
150
 
151
- - **Marp** — `@marp-team/marp-cli`. Run pinned: `npx @marp-team/marp-cli@latest deck.md --pdf`. Exports HTML / PDF / PPTX / PNG / JPEG. Needs a Chromium-family browser (Chrome/Edge) or Firefox for PDF/PPTX/image export (v4 added Firefox via WebDriver BiDi as a fallback; Chrome/Edge are preferred and give the most faithful PDF). `--pptx` is image-per-slide; `--pptx-editable` is **experimental** and needs LibreOffice (`soffice`). `--notes` / a `.txt` output exports speaker notes. Node 18+. (→ `references/markdown-decks.md`)
151
+ - **Marp** — `@marp-team/marp-cli`. Run pinned: `npx @marp-team/marp-cli@4.5.1 deck.md --pdf`. Exports HTML / PDF / PPTX / PNG / JPEG. Needs a Chromium-family browser (Chrome/Edge) or Firefox for PDF/PPTX/image export (v4 added Firefox via WebDriver BiDi as a fallback; Chrome/Edge are preferred and give the most faithful PDF). `--pptx` is image-per-slide; `--pptx-editable` is **experimental** and needs LibreOffice (`soffice`). `--notes` / a `.txt` output exports speaker notes. Node 18+. (→ `references/markdown-decks.md`)
152
152
  - **Slidev** — `@slidev/cli` (Vue-based). Scaffold `npm init slidev@latest`; dev `slidev`; export `slidev export` (PDF default; `--format pptx|png`). Export needs `playwright-chromium` installed in the project (`npx playwright install chromium` or `npm i -D playwright-chromium`). PPTX is image-per-slide; notes carry over per slide. Best for code-heavy / developer talks (live code, Monaco, Mermaid, Vue components). (→ `references/markdown-decks.md`)
153
153
  - **python-pptx** — `pip install python-pptx` (current major `1.x`, e.g. `1.0.x`). Pure Python, **no** Office/LibreOffice needed to write `.pptx`. Creates masters/layouts, text, tables, **native editable charts**, images, speaker notes. Cannot render to PDF itself — convert via LibreOffice `soffice --headless --convert-to pdf` or open in Office. (→ `references/pptx-python.md`)
154
154
  - **decktape / Playwright** — fallback HTML→PDF for any web deck (reveal.js, custom HTML) when Marp/Slidev export isn't available. (→ `references/markdown-decks.md`)
@@ -43,13 +43,13 @@ JSON requested means a contract is mandatory. Choose by reliability, not habit:
43
43
  | Mechanism | Use when | Reliability |
44
44
  | --- | --- | --- |
45
45
  | OpenAI strict `json_schema` via `response_format` | Provider supports it and you control the schema | Highest — provider compiles schema to a token-masking FSM; **<0.1% schema-failure rate** (figure from OpenAI's 2024 Structured Outputs launch; accessed 2026-06-02) |
46
- | Anthropic strict tool use | On Claude; output arrives as one block | Close second; reliable schema adherence |
46
+ | Anthropic `output_config.format` | On Claude | Constrained decoding against the schema; values still need validation |
47
47
  | JSON *mode* | Nothing stronger is available | Guarantees valid JSON **only** — NOT your schema. Validate after |
48
48
  | Freeform + regex/parse | Output is a token or a short fixed shape | You own the parser and the retry; brittle for nested data |
49
49
 
50
- - **Anthropic assistant-prefill structured output is dead in latest models.** Anthropic's own migration guide states prefilling assistant messages returns a `400` error on Sonnet 4.6, Opus 4.6, and Opus 4.7, and points you to structured outputs / `output_config.format` instead (Anthropic, Migration guide, platform.claude.com/docs/en/about-claude/models/migration-guide, accessed 2026-06-02). Do not reach for prefill to force a shape — use strict tool use or native structured output.
51
- - **Anthropic strict tool-use output arrives as one block at end of stream** — you cannot parse fields progressively. OpenAI/Gemini stream field-by-field. If you parse-as-you-stream, design for the provider you actually use.
52
- - Per-provider code (OpenAI `response_format`, Anthropic strict tool use, Gemini `responseSchema`, pydantic/zod surface, retry-on-parse-fail): `references/output-contracts.md`.
50
+ - **On current Claude models, assistant prefill and forced tool use both return a `400`.** Anthropic's migration guide routes structured output to `output_config.format` (platform.claude.com/docs/en/about-claude/models/migration-guide). Do not reach for prefill or `tool_choice` to force a shape.
51
+ - **Validate the complete object, never a streamed prefix.** Structured answers stream as text deltas and tool inputs as partial JSON; neither is your contract until it is whole.
52
+ - Per-provider code (OpenAI `response_format`, Anthropic `output_config.format`, Gemini `responseSchema`, pydantic/zod surface, retry-on-parse-fail): `references/output-contracts.md`.
53
53
 
54
54
  ## Few-shot: how many, which ones
55
55
 
@@ -118,9 +118,9 @@ Assert on the contract: schema-valid, exact token, contains/not-contains. Keep t
118
118
 
119
119
  | Anti-pattern | Why it bites | Do instead |
120
120
  | --- | --- | --- |
121
- | "Please try to output JSON" | No contract, no enforcement — parses until it doesn't | Strict `json_schema` / strict tool use; see table above |
121
+ | "Please try to output JSON" | No contract, no enforcement — parses until it doesn't | Strict `json_schema` / `output_config.format`; see table above |
122
122
  | Trusting JSON *mode* for your schema | Valid JSON ≠ your fields/types | JSON mode then validate, or use a strict mechanism |
123
- | Anthropic assistant-prefill to force a shape | Returns a 400 on Sonnet 4.6 / Opus 4.6 / Opus 4.7 (Anthropic migration guide) | Strict tool use or native structured output |
123
+ | Anthropic assistant-prefill or forced `tool_choice` to force a shape | Returns a 400 on current Claude models (Anthropic migration guide) | `output_config.format` |
124
124
  | Wall-of-text prompt | No block order; instructions buried | Use the skeleton; hard rules last |
125
125
  | 3 near-identical few-shot examples | Teaches one shape, wastes tokens | 3 deliberately different: normal / awkward / edge |
126
126
  | Negative-only constraints ("don't…") | Invites negotiation, ignored on long input | Phrase positively; re-state task after long input |
@@ -8,7 +8,7 @@ should_trigger:
8
8
  - prompt: "El prompt a veces da respuestas distintas con la misma entrada, ¿cómo lo hago determinista?"
9
9
  why: "Spanish; outputs drift between reruns for identical input — the determinism / contract problem this skill exists to fix."
10
10
  - prompt: "Make this prompt enforce a fixed schema reliably instead of sometimes returning prose."
11
- why: "Forcing a fixed schema out of a model — the output-contract decision table (strict json_schema / strict tool use vs JSON mode)."
11
+ why: "Forcing a fixed schema out of a model — the output-contract decision table (strict json_schema / Anthropic output_config.format vs JSON mode)."
12
12
  - prompt: "Write me a small eval set to check this prompt before I change it."
13
13
  why: "Inline eval set authored before tuning — the discipline the 'Inline evals — write these first' section exists to enforce; the small set, not a standing harness."
14
14
  - prompt: "Users can paste 'ignore your instructions' into my input field and the model obeys it."
@@ -37,7 +37,7 @@ capability:
37
37
  - scenario: "A 'classify this support ticket' prompt is flaky: it sometimes returns prose explanations instead of exactly one of {bug, billing, other}, and it obeys instructions users paste into the ticket text. Harden it."
38
38
  must_include:
39
39
  - "Ordered skeleton: role -> task -> context -> constraints -> output contract -> examples, with the real input last."
40
- - "An explicit output contract recommending strict json_schema (OpenAI) or strict tool use (Anthropic), noting JSON mode guarantees valid JSON but NOT the schema."
40
+ - "An explicit output contract recommending strict json_schema (OpenAI) or output_config.format (Anthropic), noting JSON mode guarantees valid JSON but NOT the schema."
41
41
  - "Three deliberately different few-shot examples (normal / awkward / edge), not near-identical clones."
42
42
  - "At least 5 inline eval cases including one adversarial injection case, written before tuning."
43
43
  - "Delimit untrusted ticket text as data and re-state the task after long input; phrase constraints positively; add a refusal anchor."
@@ -45,40 +45,35 @@ Raw form (no SDK helper):
45
45
  }
46
46
  ```
47
47
 
48
- ## Anthropic — strict tool use
48
+ ## Anthropic — `output_config.format`
49
49
 
50
- Reliable schema adherence, close behind OpenAI strict. Define a single tool whose
51
- `input_schema` is your contract and force it. **Assistant-prefill structured output is
52
- dead in the latest models** — Anthropic's migration guide states prefill returns a `400`
53
- on Sonnet 4.6 / Opus 4.6 / Opus 4.7 and routes you to structured outputs / `output_config.format`
54
- (platform.claude.com/docs/en/about-claude/models/migration-guide). Do not use prefill to
55
- coerce a shape.
50
+ Constrained decoding against a JSON Schema: the first text block of the answer is valid JSON in
51
+ your shape. Two older routes now fail on current Claude models: **assistant prefill** and **forced
52
+ tool use** (`tool_choice` of `tool` or `any`) both return a `400`. Do not use either to coerce
53
+ a shape. Strict tool use (`"strict": true` on a tool) remains the right tool when you want the
54
+ model to *call your code*, not to shape its final answer.
56
55
 
57
56
  ```python
57
+ import json
58
58
  import anthropic
59
59
  client = anthropic.Anthropic()
60
60
  msg = client.messages.create(
61
61
  model="claude-…", # from config
62
- max_tokens=256,
63
- tools=[{
64
- "name": "emit_triage",
65
- "description": "Return the ticket category.",
66
- "input_schema": {
67
- "type": "object",
68
- "properties": {"category": {"type": "string", "enum": ["bug", "billing", "other"]}},
69
- "required": ["category"],
70
- },
71
- }],
72
- tool_choice={"type": "tool", "name": "emit_triage"},
62
+ max_tokens=4096, # thinking is on by default on current models and shares this budget
63
+ output_config={"format": {"type": "json_schema", "schema": {
64
+ "type": "object",
65
+ "properties": {"category": {"type": "string", "enum": ["bug", "billing", "other"]}},
66
+ "required": ["category"],
67
+ "additionalProperties": False,
68
+ }}},
73
69
  messages=[{"role": "user", "content": prompt}],
74
70
  )
75
- block = next(b for b in msg.content if b.type == "tool_use")
76
- result = block.input # {"category": "..."}
71
+ text = next(b.text for b in msg.content if b.type == "text")
72
+ result = json.loads(text) # {"category": "..."}
77
73
  ```
78
74
 
79
- **Streaming caveat:** Anthropic tool-use output arrives as ONE block at end of stream —
80
- you cannot read fields progressively. OpenAI/Gemini stream field-by-field. If your UI
81
- parses-as-it-streams, that path does not exist on Claude tool use.
75
+ **Streaming caveat:** a structured answer streams as ordinary text deltas, and tool inputs stream
76
+ as partial JSON deltas. Either way, validate only the complete object, never a prefix.
82
77
 
83
78
  ## Google Gemini — `responseSchema`
84
79
 
@@ -32,8 +32,9 @@ nothing else.
32
32
  # Generate context per chunk, then index context + chunk for BOTH dense and BM25.
33
33
  def contextualize(client, doc_text, chunk_text):
34
34
  msg = client.messages.create(
35
- model="claude-sonnet-4-5",
35
+ model="claude-haiku-5-5", # cheap tier: one call per chunk
36
36
  max_tokens=120,
37
+ thinking={"type": "disabled"}, # a 1-2 sentence context needs no reasoning budget
37
38
  system=[{"type": "text",
38
39
  "text": f"<document>\n{doc_text}\n</document>",
39
40
  "cache_control": {"type": "ephemeral"}}], # cache the doc
@@ -41,7 +42,7 @@ def contextualize(client, doc_text, chunk_text):
41
42
  f"Here is the chunk:\n<chunk>{chunk_text}</chunk>\n"
42
43
  "Give a 1-2 sentence standalone context for retrieval. Context only."}],
43
44
  )
44
- return msg.content[0].text.strip()
45
+ return "".join(b.text for b in msg.content if b.type == "text").strip()
45
46
 
46
47
  def indexable(doc_text, chunk):
47
48
  ctx = contextualize(client, doc_text, chunk["text"])
@@ -138,13 +139,14 @@ def answer(query):
138
139
 
139
140
  context = "\n".join(f"[{c['chunk_id']}] {c['text']}" for c in top)
140
141
  resp = llm.messages.create(
141
- model="claude-sonnet-4-5",
142
- max_tokens=1024,
142
+ model="claude-sonnet-5-5",
143
+ max_tokens=4096, # thinking is on by default and shares this budget
143
144
  system=GROUNDING_PROMPT, # section 4, refusal clause included
144
145
  messages=[{"role": "user",
145
146
  "content": f"<context>\n{context}\n</context>\n\nQuestion: {query}"}],
146
147
  )
147
- return resp.content[0].text # contains [chunk_id] citations or the refusal line
148
+ # text blocks only: the response can also carry thinking blocks
149
+ return "".join(b.text for b in resp.content if b.type == "text") # [chunk_id] citations or the refusal line
148
150
  ```
149
151
 
150
152
  Keep `chunk_id` + `source` on every object from chunking through this function so the cited ids
@@ -11,7 +11,7 @@ origin: risco
11
11
 
12
12
  Tests prove the code works, not that it does what was asked. Review answers that other question: **is the diff correct, well-scoped and faithful to the spec — or did it pass for the wrong reasons?** In ASDD (`../asdd/SKILL.md`) it runs in two modes:
13
13
 
14
- - **Per task** — called from `implement`'s loop after each task's self-check. Depth comes from `npx @ericrisco/rsc risk [--base <ref>] [paths…]` (same path table as the sello, works with the sello off): **tier 0** → no review; **tier 1** → one fresh-context reviewer (a subagent that never saw the implementation conversation); **tier 2** → the three-refuter panel below, recorded after it runs with `npx @ericrisco/rsc review ledger panel <slug>/<task> --lenses correctness,security,tests` (the ship guard refuses to push a tier-2 branch without it — one reviewer is not a panel), and the branch will wait for human approval at ship. The tier reads the diff's content too: auth code in a generic file is tier 2.
14
+ - **Per task** — called from `implement`'s loop after each task's self-check. Depth comes from `npx @ericrisco/rsc risk [--base <ref>] [paths…]` (same path table as the sello, works with the sello off): **tier 0** → no review; **tier 1** → one fresh-context reviewer (a subagent that never saw the implementation conversation); **tier 2** → the three-refuter panel below, recorded after it runs with `npx @ericrisco/rsc review ledger panel <slug>/<task> --lenses correctness,security,tests` (the ship guard refuses to push a tier-2 branch without it — one reviewer is not a panel; when the code lives in a child repo or its worktree and the specs in the workspace, run it from the workspace root with `--repo <path to the reviewed checkout>`, so the panel binds that checkout's commit), and the branch will wait for human approval at ship. The tier reads the diff's content too: auth code in a generic file is tier 2.
15
15
  - **Closing review** — once, before `ship`: the whole branch against the spec. Forty individually-correct tasks can still fail to be the feature together: a criterion nobody owned, two tasks that each assumed the other handled an edge, scope that crept in a slice at a time. Read the spec's acceptance criteria and "must respect" list against `git diff <base>...HEAD`, not the task reviews. Its record — tier, counts, verdict, each finding with its outcome — goes to `02-DOCS/wiki/sdd/reviews/<slug>.md`.
16
16
 
17
17
  This skill owns **two roles that share one discipline**:
@@ -102,9 +102,9 @@ The reviewer is held to the same evidence bar as the author, because a reviewer
102
102
 
103
103
  End every review you give with one of three, and nothing mushy in between:
104
104
 
105
- - **`APPROVE`** — no blockers, no unresolved should-fix. Say it plainly and **point to ship**.
106
- - **`APPROVE WITH NITS`** — mergeable; the nits are the author's call.
107
- - **`CHANGES REQUESTED`** — one or more blockers/should-fix. List exactly what unblocks it.
105
+ - **`APPROVE`** — no confirmed blocker, nothing else worth noting. Say it plainly and **point to ship**.
106
+ - **`APPROVE WITH NITS`** — no confirmed blocker; should-fix and nits are noted (`--note`) and are the author's call.
107
+ - **`CHANGES REQUESTED`** — one or more blockers that survived the three filters below. List exactly what unblocks it.
108
108
 
109
109
  ### The sello — when this project opted in
110
110
 
@@ -233,7 +233,7 @@ fix-and-re-review is one round of the loop below.
233
233
 
234
234
  ### Convergence — the fix loop ends
235
235
 
236
- A review loop that never converges is worse than none: Anthropic saw a single PR take 50 rounds.
236
+ A review loop that never converges is worse than none: without a cap, fix and re-review can run indefinitely.
237
237
  Five rules, enforced by `npx @ericrisco/rsc review ledger` (`.rsc/review-ledger.jsonl`) rather
238
238
  than by memory:
239
239