@ericrisco/rsc 4.1.11 → 4.2.0
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/manifest.json +6 -6
- package/package.json +2 -1
- package/scripts/lib/prompt-audit.js +110 -0
- package/scripts/prompt-audit.js +48 -0
- package/skills/ads/SKILL.md +7 -7
- package/skills/agent-safety/SKILL.md +1 -1
- package/skills/asdd/SKILL.md +2 -2
- package/skills/asdd/references/model-routing.md +5 -5
- package/skills/astro/SKILL.md +1 -1
- package/skills/astro/scripts/verify.sh +1 -1
- package/skills/author-skill/SKILL.md +5 -5
- package/skills/author-skill/references/eval-authoring.md +6 -7
- package/skills/automation-flows/SKILL.md +1 -1
- package/skills/building-agents/SKILL.md +17 -12
- package/skills/building-agents/references/agent-loops-and-harness.md +3 -2
- package/skills/building-agents/references/evals-and-observability.md +7 -5
- package/skills/building-agents/references/provider-abstraction.md +31 -30
- package/skills/chrome-extension/SKILL.md +1 -1
- package/skills/cold-outreach/SKILL.md +1 -1
- package/skills/cold-outreach/references/templates.md +7 -3
- package/skills/compliance/SKILL.md +8 -8
- package/skills/compliance/evals/README.md +1 -1
- package/skills/compliance/evals/cases.yaml +2 -2
- package/skills/compliance/references/frameworks.md +7 -7
- package/skills/content-engine/SKILL.md +1 -1
- package/skills/cost-tracking/SKILL.md +29 -21
- package/skills/cost-tracking/references/pricing-tables.md +6 -5
- package/skills/course-builder/SKILL.md +4 -3
- package/skills/course-builder/references/outcomes-and-blooms.md +1 -1
- package/skills/course-storytelling/SKILL.md +1 -1
- package/skills/course-storytelling/references/concept-landing-recipe.md +1 -1
- package/skills/csharp-dotnet/SKILL.md +2 -2
- package/skills/data-policy/SKILL.md +1 -1
- package/skills/db-migrations/SKILL.md +6 -5
- package/skills/deep-learning/SKILL.md +2 -2
- package/skills/deployment/SKILL.md +1 -1
- package/skills/deployment/references/dockerfiles-by-stack.md +1 -1
- package/skills/design/engine/RUN.md +1 -1
- package/skills/django/SKILL.md +1 -1
- package/skills/docker/SKILL.md +1 -1
- package/skills/document-processing/SKILL.md +2 -1
- package/skills/electron/SKILL.md +2 -1
- package/skills/email-connector/SKILL.md +2 -1
- package/skills/email-deliverability/SKILL.md +2 -2
- package/skills/embeddings-search/SKILL.md +3 -3
- package/skills/error-handling/SKILL.md +4 -2
- package/skills/expo/SKILL.md +1 -1
- package/skills/fable-operator/SKILL.md +2 -2
- package/skills/fal/SKILL.md +1 -1
- package/skills/fastapi/SKILL.md +18 -9
- package/skills/fastapi/references/database.md +19 -10
- package/skills/finance-ops/SKILL.md +1 -1
- package/skills/firebase/SKILL.md +1 -1
- package/skills/flutter/SKILL.md +1 -1
- package/skills/forecasting/SKILL.md +1 -1
- package/skills/forecasting/references/accuracy-and-backtesting.md +1 -1
- package/skills/forecasting/references/methods-cheatsheet.md +3 -3
- package/skills/ftd/SKILL.md +2 -3
- package/skills/fundraising/references/funnel-math.md +1 -1
- package/skills/gamedev-multiplayer/SKILL.md +2 -2
- package/skills/gamedev-multiplayer/references/unity-and-unreal-netcode.md +4 -4
- package/skills/gamedev-pathing/SKILL.md +1 -1
- package/skills/gamedev-physics/SKILL.md +3 -2
- package/skills/gamedev-physics/references/character-controllers.md +1 -1
- package/skills/gamedev-shaders/SKILL.md +2 -4
- package/skills/gamedev-shipping/SKILL.md +8 -5
- package/skills/gamedev-shipping/references/mobile-and-desktop.md +7 -3
- package/skills/gdpr-privacy/references/dpa-and-transfers.md +1 -1
- package/skills/git-workflow/SKILL.md +3 -3
- package/skills/go/SKILL.md +3 -3
- package/skills/harness/SKILL.md +4 -3
- package/skills/harness/references/daily-curation-automation.md +1 -1
- package/skills/harness/references/providers.yaml +4 -4
- package/skills/harness/references/wiki-protocol.md +2 -1
- package/skills/hiring/SKILL.md +3 -3
- package/skills/htmx/SKILL.md +4 -4
- package/skills/htmx/references/server-contract.md +2 -2
- package/skills/implement/SKILL.md +3 -3
- package/skills/init/SKILL.md +2 -3
- package/skills/init/references/accompaniment-and-profile.md +1 -1
- package/skills/init/references/recommend-skills.md +9 -9
- package/skills/invoicing/SKILL.md +8 -7
- package/skills/java/SKILL.md +3 -2
- package/skills/knowledge-ops/SKILL.md +3 -4
- package/skills/knowledge-ops/references/gardening-playbook.md +3 -3
- package/skills/kotlin-android/SKILL.md +10 -3
- package/skills/kotlin-android/references/gradle-setup.md +1 -4
- package/skills/landing-copy/SKILL.md +1 -1
- package/skills/laravel/SKILL.md +11 -11
- package/skills/lead-gen/SKILL.md +3 -3
- package/skills/linkedin-api/SKILL.md +1 -1
- package/skills/linkedin-api/references/api-reference.md +1 -1
- package/skills/linkedin-content/SKILL.md +1 -1
- package/skills/linkedin-outreach/SKILL.md +4 -4
- package/skills/linkedin-strategy/SKILL.md +2 -2
- package/skills/llm-pipeline/SKILL.md +2 -2
- package/skills/llm-pipeline/references/litellm-router.md +3 -3
- package/skills/logistics-ops/SKILL.md +6 -1
- package/skills/marketing/SKILL.md +1 -1
- package/skills/marketing/references/seo-geo.md +2 -2
- package/skills/mongodb/SKILL.md +3 -2
- package/skills/mongodb/references/aggregation.md +3 -2
- package/skills/mysql/SKILL.md +1 -1
- package/skills/mysql/references/mysql-vs-mariadb.md +1 -1
- package/skills/n8n/SKILL.md +1 -1
- package/skills/nextjs/SKILL.md +1 -1
- package/skills/observability/SKILL.md +1 -1
- package/skills/observability/references/instrumentation-recipes.md +1 -1
- package/skills/ollama/SKILL.md +1 -1
- package/skills/open-weights/SKILL.md +3 -4
- package/skills/orient/SKILL.md +4 -3
- package/skills/parallel/SKILL.md +1 -1
- package/skills/planetscale/SKILL.md +3 -3
- package/skills/planetscale/references/no-foreign-keys.md +3 -3
- package/skills/postgresdb/SKILL.md +4 -4
- package/skills/presentations/SKILL.md +1 -1
- package/skills/prompt-engineering/SKILL.md +6 -6
- package/skills/prompt-engineering/evals/cases.yaml +2 -2
- package/skills/prompt-engineering/references/output-contracts.md +18 -23
- package/skills/rag/references/pipeline.md +7 -5
- package/skills/review/SKILL.md +4 -4
- package/skills/roast-me/prompts/compute.md +5 -5
- package/skills/roast-me/prompts/roast.md +2 -2
- package/skills/sdd-init/SKILL.md +3 -3
- package/skills/ship/SKILL.md +7 -9
- package/skills/shopify/SKILL.md +6 -6
- package/skills/shopify/references/apps-graphql.md +3 -3
- package/skills/skill-scout/SKILL.md +1 -1
- package/skills/specify/SKILL.md +3 -3
- package/skills/specify/references/eliciting-requirements.md +3 -3
- package/skills/structured-extraction/SKILL.md +7 -3
- package/skills/structured-extraction/references/providers.md +8 -5
- package/skills/svelte/SKILL.md +1 -1
- package/skills/swift-ios/SKILL.md +4 -4
- package/skills/tasks/SKILL.md +1 -1
- package/skills/tauri/SKILL.md +4 -3
- package/skills/terms-conditions/SKILL.md +2 -2
- package/skills/translation-l10n/SKILL.md +2 -1
- package/skills/typescript/SKILL.md +5 -4
- package/skills/typescript/references/build-and-monorepo.md +2 -2
- package/skills/unslop/SKILL.md +1 -1
- package/skills/ux/SKILL.md +1 -1
- package/skills/vercel/SKILL.md +3 -2
- package/skills/vercel/references/vercel-json.md +8 -5
- package/skills/verify/SKILL.md +3 -3
- package/skills/vllm/SKILL.md +4 -2
- package/skills/vue-nuxt/SKILL.md +5 -5
- package/skills/webhooks/SKILL.md +10 -1
- package/skills/worktrees/SKILL.md +10 -8
- package/skills/youtube-ideation/SKILL.md +1 -1
- package/targets/agents.js +26 -17
- package/targets/commands.js +7 -7
|
@@ -20,6 +20,9 @@ class Message(BaseModel):
|
|
|
20
20
|
content: str
|
|
21
21
|
tool_call_id: str | None = None # set when role == "tool"
|
|
22
22
|
name: str | None = None # tool name for tool-result turns
|
|
23
|
+
# Provider-native content of an assistant turn, replayed unchanged. On current Claude models
|
|
24
|
+
# thinking is on and its blocks must go back exactly as received: set it from resp.raw["content"].
|
|
25
|
+
blocks: list[dict] | None = None
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
class ToolSpec(BaseModel):
|
|
@@ -46,9 +49,9 @@ class CompletionRequest(BaseModel):
|
|
|
46
49
|
messages: list[Message]
|
|
47
50
|
tools: list[ToolSpec] = Field(default_factory=list)
|
|
48
51
|
response_schema: dict | None = None
|
|
49
|
-
temperature: float =
|
|
52
|
+
temperature: float | None = None # None = provider default; current Claude models reject sampling params
|
|
50
53
|
top_p: float | None = None
|
|
51
|
-
max_tokens: int =
|
|
54
|
+
max_tokens: int = 8192 # thinking is on by default on current Claude models and shares this budget
|
|
52
55
|
stop: list[str] | None = None
|
|
53
56
|
cache_system: bool = True # opt-in prompt caching for the system block
|
|
54
57
|
|
|
@@ -94,9 +97,10 @@ class OpenAIAdapter:
|
|
|
94
97
|
kwargs: dict = {
|
|
95
98
|
"model": self.model,
|
|
96
99
|
"input": [{"role": m.role, "content": m.content} for m in req.messages],
|
|
97
|
-
"temperature": req.temperature,
|
|
98
100
|
"max_output_tokens": req.max_tokens,
|
|
99
101
|
}
|
|
102
|
+
if req.temperature is not None:
|
|
103
|
+
kwargs["temperature"] = req.temperature
|
|
100
104
|
if req.tools:
|
|
101
105
|
kwargs["tools"] = [
|
|
102
106
|
{"type": "function", "name": t.name, "description": t.description, "parameters": t.parameters}
|
|
@@ -138,27 +142,23 @@ class AnthropicAdapter:
|
|
|
138
142
|
|
|
139
143
|
async def complete(self, req: CompletionRequest) -> CompletionResponse:
|
|
140
144
|
sys_text = "\n".join(m.content for m in req.messages if m.role == "system")
|
|
141
|
-
|
|
145
|
+
turns = [_anthropic_turn(m) for m in req.messages if m.role != "system"]
|
|
146
|
+
# Current Claude models reject sampling params (temperature/top_p) and forced tool_choice:
|
|
147
|
+
# req.temperature is not sent, and structured output uses output_config.format.
|
|
148
|
+
kwargs: dict = {"model": self.model, "messages": turns, "max_tokens": req.max_tokens}
|
|
142
149
|
if sys_text: # cache the (large, stable) system block when asked
|
|
143
150
|
block = {"type": "text", "text": sys_text}
|
|
144
151
|
if req.cache_system:
|
|
145
152
|
block["cache_control"] = {"type": "ephemeral"}
|
|
146
|
-
system = [block]
|
|
147
|
-
turns = [_anthropic_turn(m) for m in req.messages if m.role != "system"]
|
|
148
|
-
kwargs: dict = {"model": self.model, "system": system, "messages": turns,
|
|
149
|
-
"max_tokens": req.max_tokens, "temperature": req.temperature}
|
|
153
|
+
kwargs["system"] = [block]
|
|
150
154
|
if req.tools:
|
|
151
155
|
kwargs["tools"] = [{"name": t.name, "description": t.description, "input_schema": t.parameters}
|
|
152
156
|
for t in req.tools]
|
|
153
|
-
if req.response_schema: # structured output
|
|
154
|
-
kwargs["
|
|
155
|
-
kwargs["tool_choice"] = {"type": "tool", "name": "out"}
|
|
157
|
+
if req.response_schema: # structured output: the first text block is valid JSON
|
|
158
|
+
kwargs["output_config"] = {"format": {"type": "json_schema", "schema": req.response_schema}}
|
|
156
159
|
r = await self.client.messages.create(**kwargs)
|
|
157
160
|
text = "".join(b.text for b in r.content if b.type == "text")
|
|
158
161
|
calls = [ToolCall(id=b.id, name=b.name, arguments=b.input) for b in r.content if b.type == "tool_use"]
|
|
159
|
-
if req.response_schema and calls: # tool-forced JSON -> surface as text
|
|
160
|
-
text = _dumps(calls[0].arguments)
|
|
161
|
-
calls = []
|
|
162
162
|
return CompletionResponse(
|
|
163
163
|
text=text, tool_calls=calls,
|
|
164
164
|
finish_reason="tool_calls" if calls else "stop",
|
|
@@ -268,13 +268,11 @@ def _loads(s: str | dict) -> dict:
|
|
|
268
268
|
return s if isinstance(s, dict) else json.loads(s or "{}")
|
|
269
269
|
|
|
270
270
|
|
|
271
|
-
def _dumps(d: dict) -> str:
|
|
272
|
-
return json.dumps(d, ensure_ascii=False)
|
|
273
|
-
|
|
274
|
-
|
|
275
271
|
def _anthropic_turn(m: Message) -> dict:
|
|
276
272
|
if m.role == "tool": # tool result -> a user turn carrying tool_result content
|
|
277
273
|
return {"role": "user", "content": [{"type": "tool_result", "tool_use_id": m.tool_call_id, "content": m.content}]}
|
|
274
|
+
if m.role == "assistant" and m.blocks: # thinking + tool_use blocks, exactly as the API returned them
|
|
275
|
+
return {"role": "assistant", "content": m.blocks}
|
|
278
276
|
return {"role": m.role, "content": m.content}
|
|
279
277
|
```
|
|
280
278
|
|
|
@@ -283,12 +281,12 @@ def _anthropic_turn(m: Message) -> dict:
|
|
|
283
281
|
| Aspect | OpenAI | Anthropic | Gemini | OSS / litellm |
|
|
284
282
|
|---|---|---|---|---|
|
|
285
283
|
| Tool schema | `tools[].function.parameters` (JSON Schema) | `tools[].input_schema` | `FunctionDeclaration.parameters_json_schema` | OpenAI shape |
|
|
286
|
-
| Structured output | strict JSON Schema (`text.format`) |
|
|
284
|
+
| Structured output | strict JSON Schema (`text.format`) | `output_config.format` (JSON Schema) | `response_json_schema` + `response_mime_type` | strict JSON Schema if backend supports |
|
|
287
285
|
| System prompt | `system` role message | top-level `system=` param | `system_instruction` in config | `system` role message |
|
|
288
286
|
| Streaming event | `response.output_text.delta` | `content_block_delta` | chunk stream (`.text` per chunk) | OpenAI delta |
|
|
289
287
|
| Prompt caching | automatic cached input (−90% cached) | explicit `cache_control` (−90% read) | implicit/explicit cached content | backend-dependent |
|
|
290
|
-
| Max context | model-dependent; >272K billed 2×/1.5× | 1M
|
|
291
|
-
| JSON-mode strictness | strict (validated) |
|
|
288
|
+
| Max context | model-dependent; >272K billed 2×/1.5× | 1M on current Opus/Sonnet/Haiku (Haiku 5.5 bills prompts >100K at a higher rate) | 1M on Flash | backend-dependent |
|
|
289
|
+
| JSON-mode strictness | strict (validated) | constrained to the schema | enforced by `responseSchema` | backend-dependent |
|
|
292
290
|
|
|
293
291
|
## Structured / JSON output
|
|
294
292
|
|
|
@@ -301,7 +299,7 @@ from pydantic import BaseModel, ValidationError
|
|
|
301
299
|
|
|
302
300
|
async def complete_structured(provider: LLMProvider, req: CompletionRequest,
|
|
303
301
|
schema: type[BaseModel], max_retries: int = 2) -> BaseModel:
|
|
304
|
-
req = req.model_copy(update={"response_schema": schema.model_json_schema()
|
|
302
|
+
req = req.model_copy(update={"response_schema": schema.model_json_schema()})
|
|
305
303
|
last_err: str = ""
|
|
306
304
|
for attempt in range(max_retries + 1):
|
|
307
305
|
if attempt: # feed the prior validation error back as a correction turn
|
|
@@ -416,7 +414,9 @@ def preflight(messages: list[Message], provider: str, model: str, ctx_limit: int
|
|
|
416
414
|
|
|
417
415
|
```python
|
|
418
416
|
def normalize_sampling(req: CompletionRequest) -> dict:
|
|
419
|
-
out: dict = {"
|
|
417
|
+
out: dict = {"max_tokens": req.max_tokens}
|
|
418
|
+
if req.temperature is not None:
|
|
419
|
+
out["temperature"] = req.temperature
|
|
420
420
|
if req.top_p is not None:
|
|
421
421
|
out["top_p"] = req.top_p
|
|
422
422
|
if req.stop:
|
|
@@ -428,10 +428,11 @@ def normalize_sampling(req: CompletionRequest) -> dict:
|
|
|
428
428
|
|---|---|---|---|
|
|
429
429
|
| `max_tokens` | `max_output_tokens` (Responses) | `max_tokens` (required) | `max_output_tokens` |
|
|
430
430
|
| `stop` | `stop` | `stop_sequences` | `stop_sequences` |
|
|
431
|
-
| `temperature` | 0–2 |
|
|
431
|
+
| `temperature` | 0–2 | rejected by current models — omit | 0–2 |
|
|
432
432
|
|
|
433
|
-
Note (as of 2026-06; verify before quoting):
|
|
434
|
-
`temperature`/`top_p
|
|
433
|
+
Note (as of 2026-06; verify before quoting): current Claude models reject
|
|
434
|
+
`temperature`/`top_p`/`top_k` with a 400, and some reasoning models elsewhere ignore them. Leave
|
|
435
|
+
them unset unless the model documents support; treat sampling as advisory, not guaranteed.
|
|
435
436
|
|
|
436
437
|
## Config-driven selection
|
|
437
438
|
|
|
@@ -441,9 +442,9 @@ from functools import lru_cache
|
|
|
441
442
|
|
|
442
443
|
# Roles, not raw ids. App code says route("cheap"); ids live here and rot here only.
|
|
443
444
|
MODEL_REGISTRY: dict[str, str] = {
|
|
444
|
-
"default": "anthropic:claude-sonnet-
|
|
445
|
-
"cheap": "anthropic:claude-haiku-
|
|
446
|
-
"smart": "anthropic:claude-opus-
|
|
445
|
+
"default": "anthropic:claude-sonnet-5-5",
|
|
446
|
+
"cheap": "anthropic:claude-haiku-5-5",
|
|
447
|
+
"smart": "anthropic:claude-opus-5-5", # ids rot — re-verify against the provider's model list
|
|
447
448
|
}
|
|
448
449
|
|
|
449
450
|
|
|
@@ -473,7 +474,7 @@ from litellm import Router
|
|
|
473
474
|
router = Router(
|
|
474
475
|
model_list=[
|
|
475
476
|
{"model_name": "default",
|
|
476
|
-
"litellm_params": {"model": "anthropic/claude-sonnet-
|
|
477
|
+
"litellm_params": {"model": "anthropic/claude-sonnet-5-5"}},
|
|
477
478
|
{"model_name": "default", # same alias = automatic fallback target
|
|
478
479
|
"litellm_params": {"model": "openai/gpt-5.4"}},
|
|
479
480
|
],
|
|
@@ -16,7 +16,7 @@ An MV3 extension is **three isolated JavaScript contexts that never share memory
|
|
|
16
16
|
|
|
17
17
|
Internalize that picture first. Most extension bugs are someone treating one of these as if it shared state with another. They do not. The wire between them is `chrome.runtime` messaging and `chrome.storage`.
|
|
18
18
|
|
|
19
|
-
Manifest V3 is the only version the Chrome Web Store accepts; MV2
|
|
19
|
+
Manifest V3 is the only version the Chrome Web Store accepts; MV2 extensions are disabled in Chrome stable (from Chrome 138) and stop running from Chrome 139, when the enterprise exception ends. Build MV3 from the start.
|
|
20
20
|
|
|
21
21
|
## Pick a skeleton
|
|
22
22
|
|
|
@@ -133,7 +133,7 @@ Rules that make the table work:
|
|
|
133
133
|
|
|
134
134
|
On LinkedIn the connection note must **not** pitch — earn the connection on a real signal, then make the ask in the first DM after they accept.
|
|
135
135
|
|
|
136
|
-
Reusable skeletons for both channels —
|
|
136
|
+
Reusable skeletons for both channels — the 5-step email sequence, with every variable slot (`{{signal}}`, `{{outcome}}`, `{{proof}}`) marked — live in `references/templates.md`. Start from a skeleton, then fill every slot with a *real* value before sending. An unfilled slot is a defect, not a placeholder to ship.
|
|
137
137
|
|
|
138
138
|
## Sending cadence & deliverability guardrails
|
|
139
139
|
|
|
@@ -24,7 +24,7 @@ We {{outcome}} for {{a comparable team}}.
|
|
|
24
24
|
{{compliant footer: see references/compliance-footer.md}}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
## Email —
|
|
27
|
+
## Email — 5-step sequence (same thread, reply to your own send)
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
30
|
STEP 1 — Day 0 (the first touch above)
|
|
@@ -37,12 +37,16 @@ STEP 3 — Day +7 (angle: different pain, lower-friction ask)
|
|
|
37
37
|
One more angle: teams like {{company}} also hit {{second pain}}. I wrote a
|
|
38
38
|
2-page teardown on it — want me to send it? (no call required)
|
|
39
39
|
|
|
40
|
-
STEP 4 — Day +12
|
|
40
|
+
STEP 4 — Day +12 (angle: social proof)
|
|
41
|
+
{{peer company}} cut {{metric}} after {{change}} — similar setup to yours.
|
|
42
|
+
{{ask}} — yes or no?
|
|
43
|
+
|
|
44
|
+
STEP 5 — Day +18 (the breakup)
|
|
41
45
|
Hi {{name}} — I'll stop here so I'm not cluttering your inbox. Should I
|
|
42
46
|
close the file, or is {{the value}} worth 15 minutes later this quarter?
|
|
43
47
|
```
|
|
44
48
|
|
|
45
|
-
The breakup is the highest-converting follow-up after step 1 — never skip it. Extend to step
|
|
49
|
+
The breakup is the highest-converting follow-up after step 1 — never skip it. Extend to step 6-7 only if a genuinely new `{{signal}}` appears.
|
|
46
50
|
|
|
47
51
|
## LinkedIn — connection note (≤ ~300 chars, NO pitch)
|
|
48
52
|
|
|
@@ -43,7 +43,7 @@ obligations. Ask the operator the attribute questions, then apply this table.
|
|
|
43
43
|
| Stores / processes / transmits cardholder data | PCI DSS v4.0.1 | **Fully mandatory since 31 Mar 2025** — ~50 former "best practice" items (MFA on all CDE accounts, automated log review, internal vuln scans, periodic account reviews, asset inventory) are now hard requirements |
|
|
44
44
|
| Touches US protected health information (PHI/ePHI) | HIPAA Security Rule | In force today. A **2024 NPRM is NOT yet finalized** (mid-2026) — flag forthcoming, but note OCR is already citing the proposed standard in enforcement |
|
|
45
45
|
| Handles personal data of EU/EEA users | GDPR (as a control source) | In force; feeds controls (access, breach notice, vendor DPAs). Document *text* → `../gdpr-privacy/SKILL.md` |
|
|
46
|
-
| Builds or deploys an AI system, esp. high-risk use | EU AI Act | Phased — see below;
|
|
46
|
+
| Builds or deploys an AI system, esp. high-risk use | EU AI Act | Phased — see below; Annex III high-risk applies from **2 Dec 2027** (Digital Omnibus) |
|
|
47
47
|
| Is an EU financial entity (or critical ICT vendor to one) | DORA | **In force since Jan 2025** — ICT risk mgmt, incident reporting, resilience testing, third-party risk |
|
|
48
48
|
| Operates essential/important services in the EU | NIS2 | Transposed in 21/27 member states by Mar 2026; many set a first audit deadline of **30 Jun 2026** |
|
|
49
49
|
|
|
@@ -51,13 +51,13 @@ obligations. Ask the operator the attribute questions, then apply this table.
|
|
|
51
51
|
|
|
52
52
|
- Prohibited practices + AI-literacy: **2 Feb 2025**.
|
|
53
53
|
- GPAI-model obligations + governance + penalties: **2 Aug 2025**.
|
|
54
|
-
- Annex III (use-based) high-risk obligations: **2
|
|
55
|
-
- Annex I (product-regulated, incl. medical devices): **2 Aug
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
- Annex III (use-based) high-risk obligations: **2 Dec 2027**.
|
|
55
|
+
- Annex I (product-regulated, incl. medical devices): **2 Aug 2028**.
|
|
56
|
+
- Both high-risk dates come from the **Digital Omnibus on AI**, Regulation (EU)
|
|
57
|
+
2026/1744 (Official Journal 24 Jul 2026, in force 27 Jul 2026), which moved
|
|
58
|
+
Annex III from 2 Aug 2026 and Annex I from 2 Aug 2027. The deferral covers the
|
|
59
|
+
Chapter III high-risk obligations only; other obligations (e.g. transparency)
|
|
60
|
+
keep their own dates — check the consolidated text before scoping.
|
|
61
61
|
- Fines: up to **EUR 35M or 7%** of global turnover (prohibited use), up to
|
|
62
62
|
**EUR 15M or 3%** (high-risk non-compliance).
|
|
63
63
|
|
|
@@ -6,7 +6,7 @@ the routing matches: triggers should land on `compliance`, and each
|
|
|
6
6
|
`should_not_trigger` prompt should route to the named sibling (`route_to`). For
|
|
7
7
|
the `capability` case, run the scenario through the skill and check the response
|
|
8
8
|
covers every item in `must_include` — especially the date-sensitive ones (EU AI
|
|
9
|
-
Act
|
|
9
|
+
Act Annex III at 2 Dec 2027 under the Digital Omnibus, not the superseded 2 Aug 2026; HIPAA NPRM as
|
|
10
10
|
forthcoming-not-law) and the structural ones (a register with owner/evidence/
|
|
11
11
|
cadence columns, the 60-70% overlap, a weekly control-health review). The
|
|
12
12
|
separate `scripts/verify.sh` mechanically lints a finished control register; run
|
|
@@ -12,7 +12,7 @@ should_trigger:
|
|
|
12
12
|
- prompt: "Set up a continuous-compliance calendar so we stop scrambling the week before every audit."
|
|
13
13
|
why: Non-obvious operating-rhythm trigger — the weekly control-health review and cadence calendar.
|
|
14
14
|
- prompt: "Does the EU AI Act apply to our recommender system, and what's the deadline we have to hit?"
|
|
15
|
-
why: Scoping to a dated framework — must surface
|
|
15
|
+
why: Scoping to a dated framework — must surface the Annex III date set by the Digital Omnibus (2 Dec 2027), not the superseded 2 Aug 2026.
|
|
16
16
|
- prompt: "¿Qué compliance necesitamos para una app de salud con datos médicos de usuarios europeos?"
|
|
17
17
|
why: Spanish + multi-framework sector scoping (HIPAA-style PHI, GDPR-as-source, SOC 2), not a single document.
|
|
18
18
|
|
|
@@ -39,7 +39,7 @@ capability:
|
|
|
39
39
|
- Scopes to HIPAA for the PHI, flagging the 2024 NPRM as forthcoming/not-yet-finalized while noting OCR is already enforcing toward it
|
|
40
40
|
- Treats GDPR as a control source for the EU users (and routes the privacy-document drafting to gdpr-privacy, not drafting it here)
|
|
41
41
|
- Includes SOC 2 (Security TSC) for the enterprise-readiness angle and notes Type II tests operating effectiveness over a 3-12 month window
|
|
42
|
-
- Scopes the EU AI Act high-risk obligations to
|
|
42
|
+
- Scopes the EU AI Act Annex III high-risk obligations to 2 Dec 2027 (Digital Omnibus, Regulation (EU) 2026/1744, in force 27 Jul 2026), not the superseded 2 Aug 2026
|
|
43
43
|
- Produces a control register with owner / evidence / cadence columns, one row per control
|
|
44
44
|
- Notes the SOC 2 / ISO 27001 ~60-70% overlap to keep a single multi-tagged register instead of duplicates
|
|
45
45
|
- Stands up an operating rhythm with a weekly control-health review and a cadence calendar
|
|
@@ -41,17 +41,17 @@ Phased application:
|
|
|
41
41
|
| --- | --- |
|
|
42
42
|
| Prohibited practices + AI-literacy | 2 Feb 2025 |
|
|
43
43
|
| GPAI-model obligations + governance + penalties | 2 Aug 2025 |
|
|
44
|
-
| Annex III (use-based) high-risk obligations | **2
|
|
45
|
-
| Annex I (product-regulated, incl. medical devices) | 2 Aug
|
|
44
|
+
| Annex III (use-based) high-risk obligations | **2 Dec 2027** |
|
|
45
|
+
| Annex I (product-regulated, incl. medical devices) | 2 Aug 2028 |
|
|
46
46
|
|
|
47
47
|
High-risk obligations include conformity assessment, registration, risk
|
|
48
48
|
management, data governance, logging, and human oversight.
|
|
49
49
|
|
|
50
|
-
**Digital Omnibus on AI** —
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
**Digital Omnibus on AI** — Regulation (EU) 2026/1744 (Official Journal
|
|
51
|
+
**24 Jul 2026**, in force **27 Jul 2026**) set the high-risk dates above, moving
|
|
52
|
+
Annex III from 2 Aug 2026 and Annex I from 2 Aug 2027. The deferral covers the
|
|
53
|
+
Chapter III high-risk obligations only; other obligations (e.g. transparency)
|
|
54
|
+
keep their own dates — check the consolidated text before scoping.
|
|
55
55
|
|
|
56
56
|
Fines: up to **EUR 35M or 7%** of global turnover (prohibited use), up to
|
|
57
57
|
**EUR 15M or 3%** (high-risk non-compliance).
|
|
@@ -154,7 +154,7 @@ its derivatives). In Claude Code a Stop hook runs the same check on your final a
|
|
|
154
154
|
| 100%-planned, zero slack | can't react to anything timely | leave 20–30% of slots open |
|
|
155
155
|
| Net-new only, never updating | discards highest-ROI winners | budget 15–25% capacity for updates |
|
|
156
156
|
| Copy-paste cross-posting | each channel punishes non-native content | reformat per channel (`references/atomization.md`) |
|
|
157
|
-
| >
|
|
157
|
+
| >6 pillars | effort scatters, no theme compounds | hold to 4–6 |
|
|
158
158
|
|
|
159
159
|
## Verify
|
|
160
160
|
|
|
@@ -57,26 +57,34 @@ Wrap the SDK call **once** so capture cannot be skipped. A meter you have to rem
|
|
|
57
57
|
Rates drift fast and silently mis-bill when stale. Keep prices in a **versioned table** — one row per model, each with `effective_date` and `source` — loaded as data. Never write a rate as a literal in business logic. Look up by model and **fail loud on an unknown model; never default to $0**, or a new model silently bills as free and the leak is invisible.
|
|
58
58
|
|
|
59
59
|
```yaml
|
|
60
|
-
# pricing.yaml — perishable. Verify against source before trusting.
|
|
60
|
+
# pricing.yaml — perishable. Verify against source before trusting.
|
|
61
61
|
models:
|
|
62
|
-
- model: claude-haiku-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
- model: claude-haiku-5-5 # rate depends on prompt size: one row per tier
|
|
63
|
+
max_prompt_tokens: 100000
|
|
64
|
+
effective_date: 2026-11-24
|
|
65
|
+
source: platform.claude.com/docs/en/about-claude/pricing
|
|
66
|
+
input_per_mtok: 0.10
|
|
67
|
+
output_per_mtok: 0.50
|
|
68
|
+
cache_read_per_mtok: 0.01
|
|
69
|
+
- model: claude-haiku-5-5
|
|
70
|
+
min_prompt_tokens: 100001
|
|
71
|
+
effective_date: 2026-11-24
|
|
72
|
+
source: platform.claude.com/docs/en/about-claude/pricing
|
|
73
|
+
input_per_mtok: 0.50
|
|
74
|
+
output_per_mtok: 2.50
|
|
75
|
+
cache_read_per_mtok: 0.05
|
|
76
|
+
- model: claude-sonnet-5-5
|
|
77
|
+
effective_date: 2026-11-24
|
|
78
|
+
source: platform.claude.com/docs/en/about-claude/pricing
|
|
79
|
+
input_per_mtok: 2.00
|
|
80
|
+
output_per_mtok: 10.00
|
|
67
81
|
cache_read_per_mtok: 0.10
|
|
68
|
-
- model: claude-
|
|
69
|
-
effective_date: 2026-
|
|
70
|
-
source:
|
|
71
|
-
input_per_mtok:
|
|
72
|
-
output_per_mtok:
|
|
73
|
-
cache_read_per_mtok: 0.
|
|
74
|
-
- model: claude-opus-4.7
|
|
75
|
-
effective_date: 2026-06-02
|
|
76
|
-
source: cloudzero.com/blog/claude-api-pricing
|
|
77
|
-
input_per_mtok: 5.00
|
|
78
|
-
output_per_mtok: 25.00
|
|
79
|
-
cache_read_per_mtok: 0.50
|
|
82
|
+
- model: claude-opus-5-5
|
|
83
|
+
effective_date: 2026-11-24
|
|
84
|
+
source: platform.claude.com/docs/en/about-claude/pricing
|
|
85
|
+
input_per_mtok: 4.00
|
|
86
|
+
output_per_mtok: 20.00
|
|
87
|
+
cache_read_per_mtok: 0.20
|
|
80
88
|
- model: gpt-5.5
|
|
81
89
|
effective_date: 2026-06-02
|
|
82
90
|
source: openai.com/api/pricing
|
|
@@ -85,7 +93,7 @@ models:
|
|
|
85
93
|
cache_read_per_mtok: 0.50 # OpenAI cached input = 90% off standard input
|
|
86
94
|
```
|
|
87
95
|
|
|
88
|
-
These numbers are a **snapshot, not a constant** — model names and rates move month to month.
|
|
96
|
+
These numbers are a **snapshot, not a constant** — model names and rates move month to month. Each row carries its own `effective_date` and `source`. A price that depends on prompt size (Haiku 5.5 above 100K tokens) gets one row per tier, as above: `price()` picks the row whose prompt-size bounds contain the request's input tokens, and fails loud when none does. The dated per-provider snapshots, the `usage`-field map per provider, and refresh instructions live in `references/pricing-tables.md`; read it before you trust a rate.
|
|
89
97
|
|
|
90
98
|
## Ledger: append-only, idempotent, attributed
|
|
91
99
|
|
|
@@ -131,9 +139,9 @@ Two distinct checks, do not conflate them:
|
|
|
131
139
|
|
|
132
140
|
Don't assert savings — show the break-even. Pricing per fact-checked sources accessed 2026-06-02 (platform.claude.com prompt-caching; finout.io anthropic-api-pricing).
|
|
133
141
|
|
|
134
|
-
- **Prompt caching.** Cache *reads* cost 0.
|
|
142
|
+
- **Prompt caching.** Cache *reads* cost 0.05x base input on Opus 5.5 and Sonnet 5.5, 0.1x on Haiku 5.5 (`references/pricing-tables.md`). The 5-min write costs 1.25x, the 1-hour write 2x. So a 5-min entry pays for itself after **one** cache hit: `1.25 + r·h` (cached, `r` = read ratio) beats `1·(1+h)` (uncached) once `h ≥ 0.25/(1−r)`, which is `h ≥ 1` at either ratio. Caching a stable system prompt across a session is almost always net cheaper.
|
|
135
143
|
- **Batch API.** 50% off on both OpenAI and Anthropic, async within 24h, and it **stacks with caching** — combined up to ~95% off. Use it for anything not user-facing-realtime: evals, backfills, nightly summaries.
|
|
136
|
-
- **Model downshift.** The largest lever. Route easy requests to Haiku/cheap models and reserve Opus/GPT-5.5 for hard ones —
|
|
144
|
+
- **Model downshift.** The largest lever. Route easy requests to Haiku/cheap models and reserve Opus/GPT-5.5 for hard ones — Opus 5.5 input costs 40x Haiku 5.5 ($4 vs $0.10 per MTok) and 2x Sonnet 5.5, downshifting the routable half of traffic dwarfs a few percent of caching.
|
|
137
145
|
|
|
138
146
|
"We'll add caching later" without measuring the hit rate is a guess, not a lever. Instrument `cache_read_tokens` in the ledger first, then you know.
|
|
139
147
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Pricing tables — PERISHABLE snapshot (
|
|
1
|
+
# Pricing tables — PERISHABLE snapshot (each section carries its check date)
|
|
2
2
|
|
|
3
3
|
These rates move month to month. **Treat this file as data with an expiry, not a constant.** Every number below carries a source; re-fetch before trusting. The whole point of the skill is that prices live in a dated table, never as literals in logic.
|
|
4
4
|
|
|
@@ -6,11 +6,12 @@ These rates move month to month. **Treat this file as data with an expiry, not a
|
|
|
6
6
|
|
|
7
7
|
| Model | Input | Output | Cache read | Source |
|
|
8
8
|
|---|---|---|---|---|
|
|
9
|
-
| Haiku
|
|
10
|
-
|
|
|
11
|
-
|
|
|
9
|
+
| Haiku 5.5 (prompt ≤100K tokens) | $0.10 | $0.50 | $0.01 | platform.claude.com/docs/en/about-claude/pricing |
|
|
10
|
+
| Haiku 5.5 (prompt >100K tokens) | $0.50 | $2.50 | $0.05 | platform.claude.com/docs/en/about-claude/pricing |
|
|
11
|
+
| Sonnet 5.5 | $2.00 | $10.00 | $0.10 | platform.claude.com/docs/en/about-claude/pricing |
|
|
12
|
+
| Opus 5.5 | $4.00 | $20.00 | $0.20 | platform.claude.com/docs/en/about-claude/pricing |
|
|
12
13
|
|
|
13
|
-
Cache writes: 5-minute = 1.25x base input; 1-hour = 2x base input. Cache reads = 0.
|
|
14
|
+
Anthropic rows checked 2026-11-24. Cache writes: 5-minute = 1.25x base input; 1-hour = 2x base input. Cache reads = 0.05x base input on Opus 5.5 and Sonnet 5.5, 0.1x on most other models; check the pricing page per model. Break-even on a 5-min cache entry: after ~1 hit (platform.claude.com prompt-caching; finout.io anthropic-api-pricing, accessed 2026-06-02).
|
|
14
15
|
|
|
15
16
|
## OpenAI — per 1M tokens
|
|
16
17
|
|
|
@@ -14,7 +14,7 @@ This skill owns the **skeleton**: the measurable outcomes, the assessment that c
|
|
|
14
14
|
|
|
15
15
|
**The litmus.** If the question is *"what must the learner be able to DO, how do we prove it, and in what order do we build it?"* → here. If it's *"how do I make THIS concept click and stick?"* → `../course-storytelling/SKILL.md`.
|
|
16
16
|
|
|
17
|
-
Route elsewhere when: auditing a *finished* course for gaps, redundancy, anachronisms with a written report →
|
|
17
|
+
Route elsewhere when: auditing a *finished* course for gaps, redundancy, anachronisms with a written report → a content-audit/review-content pass (it audits, this skill designs); turning a designed module into slides/decks → `../presentations/SKILL.md` (+ `../design/SKILL.md` for the visual system); sales/landing copy and launch emails → `../marketing/SKILL.md` (you design the learning contract, never the pitch); fact-checking or sourcing the subject matter → `../research-ops/SKILL.md` (you structure what the user already knows); a repeatable internal procedure with steps but no outcomes/assessment → `../sop-builder/SKILL.md` (an SOP tells someone the steps; a course changes what they can DO and proves it).
|
|
18
18
|
|
|
19
19
|
## The grounding gate (read first — STOP if unmet)
|
|
20
20
|
|
|
@@ -32,8 +32,9 @@ Run it in order. Do not jump to modules. UbD has exactly three stages in order
|
|
|
32
32
|
|
|
33
33
|
```text
|
|
34
34
|
Stage 0 Grounding gate WHO + WHAT transformation + FORMAT. Incomplete → STOP.
|
|
35
|
-
Stage 1 Outcomes
|
|
36
|
-
Verb banlist enforced. Right-sized to format
|
|
35
|
+
Stage 1 Outcomes 1–8 course-level outcomes. Measurable Bloom verb + ABCD.
|
|
36
|
+
Verb banlist enforced. Right-sized to format (workshop
|
|
37
|
+
1–2, full course 5–8; see the decision table).
|
|
37
38
|
Stage 2 Assessment For EACH outcome, the evidence that proves it.
|
|
38
39
|
Verb-match the outcome. Place formative + summative.
|
|
39
40
|
Check content validity (covers the breadth of outcomes).
|
|
@@ -72,7 +72,7 @@ Good: Given a 200-line module, the learner critiques its layering against 4 name
|
|
|
72
72
|
|
|
73
73
|
## Course-level vs module-level outcomes
|
|
74
74
|
|
|
75
|
-
- **Course-level outcomes** (
|
|
75
|
+
- **Course-level outcomes** (1–8, sized to the format: 1–2 for a workshop, 5–8 for a full course) are the contract: what the learner can DO when the whole course
|
|
76
76
|
ends. They tend to sit at Apply→Create and are proven by the *summative* assessment.
|
|
77
77
|
- **Module-level outcomes** are the steps that build toward a course outcome. They can sit lower
|
|
78
78
|
(Remember/Understand/Apply) and are proven by *formative* checks. Each module-level outcome should
|
|
@@ -91,7 +91,7 @@ LANDING RECIPE — <concept>
|
|
|
91
91
|
```text
|
|
92
92
|
Bad (lecture) — "Idempotency means an operation can be applied multiple times without
|
|
93
93
|
changing the result beyond the initial application."
|
|
94
|
-
Good (landed)
|
|
94
|
+
Good (landed; story illustrative — use the user's true one) — HOOK: "Ever double-clicked 'Pay' and panicked you'd be charged twice?"
|
|
95
95
|
STORY: the night a retry double-charged 4,000 customers...
|
|
96
96
|
MODEL: 'The Elevator Button' — pressing it five times still calls one elevator.
|
|
97
97
|
ANALOGY: the button's already lit; more presses change nothing.
|
|
@@ -64,7 +64,7 @@ Why it fails: `no-story`, `unnamed`, `no-analogy`, `jargon-dense` (idempotency,
|
|
|
64
64
|
"Have you ever double-clicked a 'Pay' button, then sat there sweating, wondering if you just
|
|
65
65
|
paid twice? Hold that feeling — because your users feel it about YOUR system every day."
|
|
66
66
|
|
|
67
|
-
2. EPIPHANY STORY (six beats, true)
|
|
67
|
+
2. EPIPHANY STORY (six beats; illustrative, fictional — a real lesson uses the user's true story)
|
|
68
68
|
- Backstory: "Two years in, I owned payments. 4am, on call."
|
|
69
69
|
- Desire: "I just wanted failed charges to retry on their own so I could sleep."
|
|
70
70
|
- Wall: "My retry fired before the first response came back. We charged 4,000 people twice.
|
|
@@ -14,8 +14,8 @@ and the .NET-specific quality/security gates. You delegate everything language-
|
|
|
14
14
|
agnostic to the right sibling.
|
|
15
15
|
|
|
16
16
|
**Target: .NET 10 (LTS, released 2025-11-11, supported 3 years) with C# 14, EF Core
|
|
17
|
-
10, ASP.NET Core 10.** .NET 9 / C# 13
|
|
18
|
-
|
|
17
|
+
10, ASP.NET Core 10.** .NET 9 / C# 13 (STS) reached end of support on 2026-11-10,
|
|
18
|
+
together with .NET 8; move such projects to .NET 10. Features gate on the target framework moniker (TFM): a
|
|
19
19
|
`net10.0` project gets C# 14 by default; a `net9.0` project caps at C# 13. When you
|
|
20
20
|
use a C# 14 feature (`field`, extension members, null-conditional assignment), say
|
|
21
21
|
which TFM it requires.
|
|
@@ -28,7 +28,7 @@ If they want the public privacy notice, DPA clauses, or SOC 2 readiness instead,
|
|
|
28
28
|
|
|
29
29
|
## Build the retention schedule
|
|
30
30
|
|
|
31
|
-
This is the core artifact. For every category of personal data, walk
|
|
31
|
+
This is the core artifact. For every category of personal data, walk six columns in order: **data category -> purpose -> lawful basis -> retention period -> expiry action -> system of record**. GDPR's storage-limitation principle (Art. 5(1)(e)) requires data be held in identifiable form *no longer than necessary for the purpose it was collected for*; GDPR sets no fixed periods — duration is driven by purpose plus sector law (gdpr-info.eu Art. 5; Usercentrics, 2026).
|
|
32
32
|
|
|
33
33
|
The expiry action is one of three, and you must pick one explicitly:
|
|
34
34
|
|
|
@@ -48,7 +48,7 @@ If the row says **No**, you are doing expand-contract. Go to Step 2.
|
|
|
48
48
|
|
|
49
49
|
## Step 2 — The expand-contract loop
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Four phases — expand, backfill, switch reads, contract — spread over **distinct deploys**. Worked example: rename `users.email` → `users.email_address`.
|
|
52
52
|
|
|
53
53
|
**Expand** — add the new structure, start dual-writing, leave the old one fully working.
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@ ALTER TABLE users ADD COLUMN email_address text; -- nullable, no default → me
|
|
|
62
62
|
App deploy A: write BOTH columns on every insert/update; keep READING email.
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
**Backfill** — copy historical data in small background batches (Step
|
|
65
|
+
**Backfill** — copy historical data in small background batches (Step 5), then verify counts/checksums.
|
|
66
66
|
|
|
67
67
|
**Switch reads** — once backfilled and verified, deploy the app that reads `email_address`.
|
|
68
68
|
|
|
@@ -130,12 +130,13 @@ CREATE INDEX CONCURRENTLY idx_orders_region ON orders (region);
|
|
|
130
130
|
> A failed `CONCURRENTLY` build leaves an INVALID index behind. Drop it (`DROP INDEX CONCURRENTLY`) before
|
|
131
131
|
> retrying. For PG-specific lock-level detail, see `../postgresdb/SKILL.md`.
|
|
132
132
|
|
|
133
|
-
**Add NOT NULL in
|
|
133
|
+
**Add NOT NULL in five steps, never in one.** A single `ALTER ... SET NOT NULL` (or `ADD COLUMN ... NOT
|
|
134
134
|
NULL DEFAULT <volatile>`) scans/rewrites the whole table under lock.
|
|
135
135
|
|
|
136
136
|
```sql
|
|
137
137
|
-- Bad: full-table validation/rewrite under an exclusive lock
|
|
138
|
-
ALTER TABLE users
|
|
138
|
+
ALTER TABLE users ALTER COLUMN status SET NOT NULL; -- 40M rows: full scan under lock = outage
|
|
139
|
+
ALTER TABLE users ADD COLUMN token uuid NOT NULL DEFAULT gen_random_uuid(); -- volatile default: full rewrite
|
|
139
140
|
|
|
140
141
|
-- Good: add nullable, backfill in batches (Step 5), then add a constraint without a blocking scan
|
|
141
142
|
SET lock_timeout = '1s';
|
|
@@ -145,7 +146,7 @@ ALTER TABLE users ADD CONSTRAINT users_status_nn
|
|
|
145
146
|
CHECK (status IS NOT NULL) NOT VALID; -- 3. instant, no scan
|
|
146
147
|
ALTER TABLE users VALIDATE CONSTRAINT users_status_nn; -- 4. scans WITHOUT blocking writes
|
|
147
148
|
-- PG 12+: a validated CHECK (col IS NOT NULL) lets SET NOT NULL skip its own scan
|
|
148
|
-
ALTER TABLE users ALTER COLUMN status SET NOT NULL;
|
|
149
|
+
ALTER TABLE users ALTER COLUMN status SET NOT NULL; -- 5. no scan
|
|
149
150
|
```
|
|
150
151
|
|
|
151
152
|
Same `NOT VALID` → `VALIDATE` pattern for adding a foreign key. The full per-change checklists live in
|
|
@@ -108,7 +108,7 @@ scaler = torch.amp.GradScaler("cuda") # current namespace (not torch.
|
|
|
108
108
|
for x, y in train_loader:
|
|
109
109
|
x, y = x.to(device), y.to(device)
|
|
110
110
|
optimizer.zero_grad(set_to_none=True)
|
|
111
|
-
with torch.autocast(device_type="cuda", dtype=torch.
|
|
111
|
+
with torch.autocast(device_type="cuda", dtype=torch.float16): # fp16 needs the scaler; bf16 drops it
|
|
112
112
|
out = model(x) # forward + loss ONLY under autocast
|
|
113
113
|
loss = loss_fn(out, y)
|
|
114
114
|
scaler.scale(loss).backward() # backward OUTSIDE autocast, on scaled loss
|
|
@@ -185,7 +185,7 @@ your code layout and breaks on refactor.
|
|
|
185
185
|
|
|
186
186
|
```python
|
|
187
187
|
torch.save({"epoch": epoch,
|
|
188
|
-
"model": model.state_dict(), # DDP
|
|
188
|
+
"model": model.state_dict(), # DDP: model.module.state_dict(), rank 0 only; FSDP2: torch.distributed.checkpoint
|
|
189
189
|
"optimizer": opt.state_dict(),
|
|
190
190
|
"scheduler": scheduler.state_dict(),
|
|
191
191
|
"scaler": scaler.state_dict()}, # AMP scale must survive a resume
|
|
@@ -154,7 +154,7 @@ services:
|
|
|
154
154
|
POSTGRES_PASSWORD: postgres
|
|
155
155
|
POSTGRES_DB: app_dev
|
|
156
156
|
volumes:
|
|
157
|
-
- pgdata:/var/lib/postgresql/
|
|
157
|
+
- pgdata:/var/lib/postgresql # postgres 18+ volume root; PGDATA is /var/lib/postgresql/18/docker
|
|
158
158
|
healthcheck:
|
|
159
159
|
test: ["CMD-SHELL", "pg_isready -U postgres -d app_dev"]
|
|
160
160
|
interval: 5s
|
|
@@ -247,7 +247,7 @@ services:
|
|
|
247
247
|
POSTGRES_DB: app
|
|
248
248
|
command: ["postgres", "-c", "shared_buffers=256MB", "-c", "max_connections=100"]
|
|
249
249
|
volumes:
|
|
250
|
-
- pgdata:/var/lib/postgresql/
|
|
250
|
+
- pgdata:/var/lib/postgresql # postgres 18+ volume root; PGDATA is /var/lib/postgresql/18/docker
|
|
251
251
|
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
252
252
|
healthcheck:
|
|
253
253
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
@@ -340,7 +340,7 @@ every screenshot for content that failed to appear.
|
|
|
340
340
|
|
|
341
341
|
### 10. Report
|
|
342
342
|
|
|
343
|
-
Do not report until all of these are true;
|
|
343
|
+
Do not report until all of these are true; skipping any one of them produces a bad page:
|
|
344
344
|
|
|
345
345
|
- `inspect.mjs` shows **0 FAIL** at 1440, 768 and 390, on the final version of the page.
|
|
346
346
|
- You opened every screenshot it listed after the last change, not only the first screen.
|
package/skills/django/SKILL.md
CHANGED
|
@@ -98,7 +98,7 @@ class Article(models.Model):
|
|
|
98
98
|
constraints = [
|
|
99
99
|
models.UniqueConstraint(fields=["tenant", "slug"], name="uniq_tenant_slug"),
|
|
100
100
|
models.CheckConstraint(
|
|
101
|
-
|
|
101
|
+
condition=models.Q(status="draft") | models.Q(published_at__isnull=False),
|
|
102
102
|
name="published_needs_date",
|
|
103
103
|
),
|
|
104
104
|
]
|
package/skills/docker/SKILL.md
CHANGED
|
@@ -79,7 +79,7 @@ CMD ["dist/server.js"]
|
|
|
79
79
|
```dockerfile
|
|
80
80
|
# syntax=docker/dockerfile:1
|
|
81
81
|
FROM python:3.13-slim-bookworm AS build
|
|
82
|
-
COPY --from=ghcr.io/astral-sh/uv:
|
|
82
|
+
COPY --from=ghcr.io/astral-sh/uv:0.13.10 /uv /usr/local/bin/uv
|
|
83
83
|
WORKDIR /app
|
|
84
84
|
ENV UV_PROJECT_ENVIRONMENT=/opt/venv
|
|
85
85
|
COPY pyproject.toml uv.lock ./
|
|
@@ -119,9 +119,10 @@ for page in writer.pages:
|
|
|
119
119
|
page,
|
|
120
120
|
{"applicant_name": "Eric Risco", "agree": "/Yes"}, # checkbox = its on-state
|
|
121
121
|
auto_regenerate=False, # else a spurious "save changes?" prompt fires on open
|
|
122
|
+
flatten=True, # not editable: bakes the values into the page content
|
|
122
123
|
)
|
|
123
124
|
|
|
124
|
-
# flatten=True
|
|
125
|
+
writer.remove_annotations(subtypes="/Widget") # with flatten=True: drop the widgets flatten leaves behind
|
|
125
126
|
with open("filled.pdf", "wb") as f:
|
|
126
127
|
writer.write(f)
|
|
127
128
|
```
|