@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.
- package/manifest.json +6 -6
- package/package.json +2 -1
- package/scripts/lib/prompt-audit.js +110 -0
- package/scripts/lib/review-ledger.js +14 -3
- package/scripts/prompt-audit.js +48 -0
- package/scripts/rsc.js +4 -2
- 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/gcp-essentials/SKILL.md +11 -8
- package/skills/gcp-essentials/references/networking-and-sql.md +4 -4
- package/skills/gdpr-privacy/references/dpa-and-transfers.md +1 -1
- package/skills/git-workflow/SKILL.md +3 -3
- package/skills/github-actions/SKILL.md +12 -12
- package/skills/github-actions/evals/cases.yaml +1 -1
- package/skills/github-actions/references/caching-and-matrix.md +5 -5
- package/skills/github-actions/references/oidc-deploys.md +4 -4
- package/skills/go/SKILL.md +3 -3
- package/skills/google-workspace/SKILL.md +15 -11
- package/skills/google-workspace/references/api-recipes.md +2 -2
- package/skills/google-workspace/references/auth-setup.md +1 -1
- 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/hetzner/SKILL.md +13 -12
- package/skills/hetzner/references/cloud-init.md +4 -2
- package/skills/hetzner/references/plans-and-locations.md +15 -14
- 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/huggingface/SKILL.md +15 -15
- package/skills/huggingface/evals/cases.yaml +1 -1
- package/skills/huggingface/references/endpoints-and-spaces.md +5 -3
- package/skills/huggingface/references/hub-and-cli.md +4 -4
- package/skills/huggingface/references/inference-providers.md +1 -1
- package/skills/huggingface/scripts/verify.sh +3 -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/instagram-api/SKILL.md +9 -9
- package/skills/instagram-api/evals/cases.yaml +1 -1
- package/skills/instagram-api/references/insights-metrics.md +1 -1
- package/skills/instagram-api/references/publish-reel.md +8 -7
- 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 +3 -3
- package/skills/linkedin-api/evals/cases.yaml +1 -1
- package/skills/linkedin-api/references/api-reference.md +3 -3
- 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 +5 -5
- 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 +67 -19
- package/skills/typescript/evals/README.md +3 -3
- package/skills/typescript/evals/cases.yaml +4 -1
- package/skills/typescript/references/build-and-monorepo.md +82 -26
- package/skills/typescript/references/type-system.md +15 -4
- package/skills/typescript/scripts/verify.sh +20 -10
- 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/asdd-gate.mjs +9 -1
- package/targets/commands.js +7 -7
|
@@ -6,11 +6,11 @@ You are analysing a batch of user prompts to identify cases where a heavier (mor
|
|
|
6
6
|
|
|
7
7
|
This skill uses three tier labels. The mapping to specific model names shifts over releases — the tiers are stable even when the names change.
|
|
8
8
|
|
|
9
|
-
| Tier | Description | Example models
|
|
9
|
+
| Tier | Description | Example models | Relative input cost (Claude 5.5 list prices) |
|
|
10
10
|
|------|-------------|----------------------|---------------|
|
|
11
|
-
| `light` | Fast, cheap, low reasoning | Haiku
|
|
12
|
-
| `balanced` | General purpose, solid reasoning | Sonnet
|
|
13
|
-
| `heavy` | Frontier reasoning, long-horizon work | Opus, Fable
|
|
11
|
+
| `light` | Fast, cheap, low reasoning | Claude Haiku 5.5 | 1× |
|
|
12
|
+
| `balanced` | General purpose, solid reasoning | Claude Sonnet 5.5 | ≈20× |
|
|
13
|
+
| `heavy` | Frontier reasoning, long-horizon work | Claude Opus 5.5, Fable | ≈40× |
|
|
14
14
|
|
|
15
15
|
Overuse = using `heavy` where `balanced` would suffice, or using `balanced`/`heavy` where `light` would suffice.
|
|
16
16
|
|
|
@@ -95,6 +95,6 @@ Return a single JSON object:
|
|
|
95
95
|
- `architectural_decision` — design/plan/migrate/strategy (usually NOT overuse)
|
|
96
96
|
- `debug_complex` — race conditions, memory leaks, performance (usually NOT overuse)
|
|
97
97
|
|
|
98
|
-
`estimated_tier_ratio`: approximate cost ratio (e.g. 10 means the heavy tier cost ~10× the recommended tier). Use rough multiples: light→balanced ≈
|
|
98
|
+
`estimated_tier_ratio`: approximate cost ratio (e.g. 10 means the heavy tier cost ~10× the recommended tier). Use rough multiples from Claude 5.5 list prices: light→balanced ≈ 20×; light→heavy ≈ 40×; balanced→heavy ≈ 2×. Other providers' ladders differ; use their own price ratio when the session ran on them.
|
|
99
99
|
|
|
100
100
|
Only return `high` and `medium` confidence cases. If you are uncertain, omit the record — false positives harm the user's trust in the report.
|
|
@@ -121,13 +121,13 @@ Based on their actual usage patterns, produce a 4–6 row personalised cheat she
|
|
|
121
121
|
|
|
122
122
|
| Task pattern | Use this tier | Reasoning level | Notes |
|
|
123
123
|
|--------------|--------------|-----------------|-------|
|
|
124
|
-
| Read/show/list a file | light | none |
|
|
124
|
+
| Read/show/list a file | light | none | ≈40× cheaper than heavy |
|
|
125
125
|
| One-word confirmation | light | none | Heavy has no work to do here |
|
|
126
126
|
| Single-file edit (clear scope) | balanced | low | Heavy adds nothing |
|
|
127
127
|
| Multi-file refactor | heavy | medium | Justified — needs context |
|
|
128
128
|
| Architecture / system design | heavy | high | Worth the premium |
|
|
129
129
|
|
|
130
|
-
Anchor cost comparisons to the tier ladder: light ≈ 1×, balanced ≈
|
|
130
|
+
Anchor cost comparisons to the tier ladder: light ≈ 1×, balanced ≈ 20×, heavy ≈ 40× (Claude 5.5 list input prices).
|
|
131
131
|
|
|
132
132
|
#### 4d. What You Got Right (Compute)
|
|
133
133
|
|
package/skills/sdd-init/SKILL.md
CHANGED
|
@@ -127,9 +127,9 @@ models:
|
|
|
127
127
|
enabled: false # opt-in master switch; false = honor session model, announce nothing
|
|
128
128
|
provider: anthropic # which provider the tiers below resolve to
|
|
129
129
|
tiers:
|
|
130
|
-
heavy: claude-opus-
|
|
131
|
-
balanced: claude-sonnet-
|
|
132
|
-
light: claude-haiku-
|
|
130
|
+
heavy: claude-opus-5-5
|
|
131
|
+
balanced: claude-sonnet-5-5
|
|
132
|
+
light: claude-haiku-5-5
|
|
133
133
|
phases:
|
|
134
134
|
constitution: heavy
|
|
135
135
|
specify: balanced
|
package/skills/ship/SKILL.md
CHANGED
|
@@ -94,9 +94,9 @@ skill. Note `.rsc/.no-ship-guard` opts out of the branch-hygiene rules above but
|
|
|
94
94
|
sello, which has its own switch. The sello binds bytes, not intent — it proves what ships is what
|
|
95
95
|
was reviewed, never that the review was any good.
|
|
96
96
|
|
|
97
|
-
## The
|
|
97
|
+
## The landing options — three, or two when main is closed
|
|
98
98
|
|
|
99
|
-
This mirrors the harness "siempre 3 opciones" pattern. Gather the one fact that changes the answer (does this repo use PRs / require review on `main`?), then present **
|
|
99
|
+
This mirrors the harness "siempre 3 opciones" pattern. Gather the one fact that changes the answer (does this repo use PRs / require review on `main`?), then present **all the legal options** (three; two when the default branch is closed, below) with an honest recommendation matched to the workflow, in the user's register.
|
|
100
100
|
|
|
101
101
|
| Option | What it does | Choose it when |
|
|
102
102
|
| --- | --- | --- |
|
|
@@ -137,7 +137,7 @@ Stacked PR / feature-track support still fits inside the three landing options:
|
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
139
|
git switch main && git pull --ff-only
|
|
140
|
-
git merge --no-ff feature/<slug> -m "feat: <what shipped> (<spec-slug>)" # no AI trailer
|
|
140
|
+
git merge --no-ff feature/<slug> -m "✨ feat: <what shipped> (<spec-slug>)" # no AI trailer
|
|
141
141
|
git push origin main
|
|
142
142
|
# the merge above already retired the worktree and its branch: post-merge does it
|
|
143
143
|
git branch -d feature/<slug> 2>/dev/null || true # no worktree involved? then the branch alone
|
|
@@ -146,9 +146,7 @@ git push origin --delete feature/<slug> 2>/dev/null || true
|
|
|
146
146
|
|
|
147
147
|
Use `--no-ff` so the feature is one legible merge commit tied to the spec. Confirm the trunk still builds after the merge if the repo has a local gate (defer the actual run to `verify`).
|
|
148
148
|
|
|
149
|
-
**You
|
|
150
|
-
|
|
151
|
-
This used to be an instruction in this paragraph, and it was skipped on both features that reached it. That is why it is a hook now: an instruction at the end of a long phase is the least reliable place to put a step that matters (P1).
|
|
149
|
+
**You do not run the cleanup; you check that it ran.** A `post-merge` hook retires the worktree and its branch the moment the work lands, on both landing paths — the local merge above and the `pull --ff-only` after a forge merge. It removes only what the reaper already classifies as safe, so anything holding unsaved work survives with its reason.
|
|
152
150
|
|
|
153
151
|
If something did survive, it survived *for a reason* — read it rather than forcing it: `npx @ericrisco/rsc worktrees` lists what is left and why. `worktrees reap <path>` still exists for the backlog and for anything the hook deliberately refused; name the path, because bare `reap` retires every worktree that qualifies and with `parallel` running two streams that is how shipping A deletes B. Naming a path selects it, it does not accept the risk: add `--confirm` only after the user has seen the reason and said yes.
|
|
154
152
|
|
|
@@ -159,7 +157,7 @@ Write the **commit(s)** clean, push, then open the PR with `gh`. The PR body lin
|
|
|
159
157
|
```bash
|
|
160
158
|
git push -u origin feature/<slug>
|
|
161
159
|
gh pr create \
|
|
162
|
-
--title "feat: <what shipped> (<spec-slug>)" \
|
|
160
|
+
--title "✨ feat: <what shipped> (<spec-slug>)" \
|
|
163
161
|
--body-file /tmp/ship-pr-body.md # body authored per the template below — NO AI footer
|
|
164
162
|
```
|
|
165
163
|
|
|
@@ -244,7 +242,7 @@ In the `orient` voice: the explainer, the checklist result in one line, the thre
|
|
|
244
242
|
| Rationalization | Reality |
|
|
245
243
|
| --- | --- |
|
|
246
244
|
| "I'll add `Co-Authored-By: Claude` / a 'Generated with Claude Code' footer to be transparent" | It forges the record. The work is the responsible person's — no AI trailer, ever. Strip it. |
|
|
247
|
-
| "Review didn't formally approve but it's obviously fine" | No verdict = not ready. Ship runs on APPROVE only. Route back to review. |
|
|
245
|
+
| "Review didn't formally approve but it's obviously fine" | No verdict = not ready. Ship runs on APPROVE or APPROVE WITH NITS only. Route back to review. |
|
|
248
246
|
| "Tier 2, but the three refuters approved — I'll self-merge" | An agent's approval never counts as a human's. Tier 2 waits for human approval. |
|
|
249
247
|
| "Tier 2, one reviewer was enough here" | The push gate wants the panel recorded (`review ledger panel … --lenses correctness,security,tests`). Run the three, record them, then push. |
|
|
250
248
|
| "The tree has a couple of stray edits, they're harmless" | A dirty tree means the merge is not the reviewed diff. Clean it or stash it first. |
|
|
@@ -286,7 +284,7 @@ End with:
|
|
|
286
284
|
"used": ["ship"],
|
|
287
285
|
"missing": [],
|
|
288
286
|
"fallback": [],
|
|
289
|
-
"compact_rules": ["
|
|
287
|
+
"compact_rules": ["Present every legal landing option: three, or two when main is closed.", "Archive the final state."]
|
|
290
288
|
},
|
|
291
289
|
"evidence": ["closing review verdict", "rsc risk tier", "verification record", "PR/merge/park/discard reference", "human approval when tier 2"]
|
|
292
290
|
}
|
package/skills/shopify/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shopify
|
|
3
|
-
description: "Use when building or customizing a Shopify store across its three code surfaces — themes (Liquid, Online Store 2.0 sections, blocks and JSON templates), apps (
|
|
3
|
+
description: "Use when building or customizing a Shopify store across its three code surfaces — themes (Liquid, Online Store 2.0 sections, blocks and JSON templates), apps (the React Router template with the versioned GraphQL Admin API and its query-cost model), and checkout (UI extensions, Functions, Web Pixels), plus the CLI flow and checkout-extensibility migration. NOT WooCommerce or PHP stores (that is `wordpress`), NOT the React layer of a headless storefront (that is `nextjs`), NOT non-Shopify payment integrations (that is `stripe`)."
|
|
4
4
|
tags: [shopify, liquid, ecommerce, themes, checkout, graphql, storefront]
|
|
5
5
|
recommends: [nextjs, stripe, wordpress, api-design, seo-geo]
|
|
6
6
|
origin: risco
|
|
@@ -23,7 +23,7 @@ Pinned stack (verify against shopify.dev before pinning in a repo):
|
|
|
23
23
|
2025-07†. Each version is supported ~12 months. Pin `apiVersion` and bump quarterly.
|
|
24
24
|
† `2025-07` is at the edge of its window — accessible only until 2026-07-16; treat it as
|
|
25
25
|
sunsetting and do not pin it in new work. Re-check the live list at shopify.dev/docs/api/usage/versioning.
|
|
26
|
-
- **
|
|
26
|
+
- **React Router app template** (`@shopify/shopify-app-react-router`, App Bridge, Polaris web components; Remix merged into React Router 7 and the Remix template is for existing apps only). GraphQL > REST —
|
|
27
27
|
REST Admin API is legacy; Shopify steers all new app work to GraphQL.
|
|
28
28
|
- **Dawn** — Shopify's source-available reference theme; OS 2.0 architecture is the baseline.
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ was a Liquid section, or editing `checkout.liquid` when the seam is now an exten
|
|
|
35
35
|
| Surface | You're working on… | Tool & entry | Reference |
|
|
36
36
|
|---|---|---|---|
|
|
37
37
|
| **Theme** | `.liquid` files, `{% schema %}`, JSON templates, storefront rendering, merchant-editable content | `shopify theme dev` on a Dawn-based theme | `references/liquid-themes.md` |
|
|
38
|
-
| **App** | embedded admin UI, reading/writing store data, webhooks, automation | `shopify app dev` on the
|
|
38
|
+
| **App** | embedded admin UI, reading/writing store data, webhooks, automation | `shopify app dev` on the React Router template + Admin GraphQL | `references/apps-graphql.md` |
|
|
39
39
|
| **Checkout** | checkout/thank-you/order-status UI or logic, discounts, shipping, tracking | Checkout UI extensions / Functions / Web Pixels | `references/checkout-extensibility.md` |
|
|
40
40
|
|
|
41
41
|
If the answer is "the React rendering layer of a headless storefront", that is `../nextjs/SKILL.md`,
|
|
@@ -125,13 +125,13 @@ shopify app deploy # release app + extensions (NOT `app config push` — remo
|
|
|
125
125
|
CLI 4.x auto-upgrades via your package manager but skips CI and project-local installs — pin the
|
|
126
126
|
version in CI so a silent bump never changes a release.
|
|
127
127
|
|
|
128
|
-
## App surface —
|
|
128
|
+
## App surface — React Router template + GraphQL Admin API
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
New apps start from the React Router template (existing Remix apps: Shopify's upgrade guide). The shape:
|
|
131
131
|
|
|
132
132
|
```text
|
|
133
133
|
app/shopify.server.js # shopifyApp({ apiVersion, sessionStorage, webhooks, ... })
|
|
134
|
-
app/routes/app.*.jsx # embedded admin pages (App Bridge + Polaris)
|
|
134
|
+
app/routes/app.*.jsx # embedded admin pages (App Bridge + Polaris web components, `<s-page>`)
|
|
135
135
|
shopify.app.toml # app config, scopes, webhook subscriptions
|
|
136
136
|
extensions/* # app extensions (theme app ext, UI ext, Functions, Flow)
|
|
137
137
|
```
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Shopify apps & the GraphQL Admin API — deep dive
|
|
2
2
|
|
|
3
|
-
Companion to the App surface section of `../SKILL.md`. The template is `@shopify/shopify-app-
|
|
3
|
+
Companion to the App surface section of `../SKILL.md`. The template is `@shopify/shopify-app-react-router`.
|
|
4
4
|
|
|
5
5
|
## Template wiring
|
|
6
6
|
|
|
7
7
|
```js
|
|
8
8
|
// app/shopify.server.js
|
|
9
|
-
import { shopifyApp, ApiVersion } from "@shopify/shopify-app-
|
|
9
|
+
import { shopifyApp, ApiVersion } from "@shopify/shopify-app-react-router/server";
|
|
10
10
|
import { PrismaSessionStorage } from "@shopify/shopify-app-session-storage-prisma";
|
|
11
11
|
|
|
12
12
|
const shopify = shopifyApp({
|
|
@@ -87,7 +87,7 @@ webhooks can be missed.
|
|
|
87
87
|
## App Bridge & Polaris
|
|
88
88
|
|
|
89
89
|
Embedded UI runs inside the Shopify admin iframe. App Bridge handles session-token auth, navigation,
|
|
90
|
-
and toasts; Polaris
|
|
90
|
+
and toasts; Polaris web components give admin-consistent UI. Keep app UI in Polaris so it matches the
|
|
91
91
|
admin chrome — do not hand-roll admin-looking CSS.
|
|
92
92
|
|
|
93
93
|
## App extensions & deploy
|
|
@@ -10,7 +10,7 @@ origin: risco
|
|
|
10
10
|
|
|
11
11
|
You are the **gap detector** for the skills catalog. Before a task starts, in the middle of one that is dragging, or right after delivering work that turned out to be a procedure — you answer exactly one question: *is there a skill that should be handling this, and is it loaded?* You do **not** do the work. You name what to load, then get out of the way.
|
|
12
12
|
|
|
13
|
-
Every run ends in one of the verdicts in the table below:
|
|
13
|
+
Every run ends in one of the seven verdicts in the decision table below. The three gap verdicts:
|
|
14
14
|
|
|
15
15
|
- **INSTALLED-elsewhere** — the skill exists in the catalog and on disk somewhere (user scope, another project, a plugin) but is not active *here*. → emit a scope-fix / install command.
|
|
16
16
|
- **MISSING** — the skill exists in the catalog but is not installed at all. → emit an install command and a one-line why.
|
package/skills/specify/SKILL.md
CHANGED
|
@@ -24,7 +24,7 @@ You are not slowing them down; you make the intent reviewable *before* code exis
|
|
|
24
24
|
|
|
25
25
|
### Your first sentence is not a verdict on the idea
|
|
26
26
|
|
|
27
|
-
Catching the intent eagerly, above, is right. What comes *after* catching it
|
|
27
|
+
Catching the intent eagerly, above, is right. What comes *after* catching it must not validate: the opening line carries no verdict. "Great idea", "makes sense", "that would be really useful" — or, since half this catalog's work happens in Spanish, "buena idea", "qué gran idea", "me encanta", "tiene todo el sentido" — is a verdict you do not have the evidence for, delivered at the cheapest possible moment to be wrong, to someone who still believes you. The ban is on the **judgement**, in any language, not on any particular wording: the list above is what it looks like, not what it is limited to. A spec built on a validated premise is coherent, plannable, testable and pointed at the wrong thing; nothing downstream can catch that, because every later gate compares artifacts to each other and they all agree.
|
|
28
28
|
|
|
29
29
|
So the first response to an intent carries exactly two things:
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ If, having looked, there is no real objection, **say so in one line and move on
|
|
|
40
40
|
**Offer autopilot once, right here.** At this boundary, propose how to run the rest of the chain:
|
|
41
41
|
> *"¿Quieres que lo lleve hasta el final yo solo — spec → plan → código → verify, parando solo si algo es ambiguo — o prefieres que pare a que apruebes en cada fase?"*
|
|
42
42
|
|
|
43
|
-
A **yes engages autopilot** (`../asdd/SKILL.md`): you still write the spec and every artifact, but you auto-advance through the phases without re-asking — that up-front yes is the approval that satisfies the hard gate above, for the whole run. A **no** (or silence) keeps the default gated flow: write the spec, hand to `clarify`/`plan`, stop for approval before code. Either way the spec gets written; autopilot only changes whether you pause *between* phases — and it still stops for genuine ambiguity, hard failures, or destructive/outward actions (ship still confirms). If `sdd.
|
|
43
|
+
A **yes engages autopilot** (`../asdd/SKILL.md`): you still write the spec and every artifact, but you auto-advance through the phases without re-asking — that up-front yes is the approval that satisfies the hard gate above, for the whole run. A **no** (or silence) keeps the default gated flow: write the spec, hand to `clarify`/`plan`, stop for approval before code. Either way the spec gets written; autopilot only changes whether you pause *between* phases — and it still stops for genuine ambiguity, hard failures, or destructive/outward actions (ship still confirms). If `sdd.execution_mode: automatic` in config, autopilot is the default — still surface it once.
|
|
44
44
|
|
|
45
45
|
## The one rule that defines this skill
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ If no profile exists, use analogies and keep questions plain. Never assume fluen
|
|
|
66
66
|
|
|
67
67
|
## FRAME before you ask anything — from `idea-refinement`
|
|
68
68
|
|
|
69
|
-
Before the frontier round, write five lines. They are the FRAME block of `../idea-refinement/SKILL.md
|
|
69
|
+
Before the frontier round, write five lines. They are the FRAME block of `../idea-refinement/SKILL.md`:
|
|
70
70
|
|
|
71
71
|
- **Actor** — who is struggling, and in what situation?
|
|
72
72
|
- **Current workaround** — what do they do today, *including doing nothing*?
|
|
@@ -85,9 +85,9 @@ Phrase by register:
|
|
|
85
85
|
> "Expired-link recovery in scope, or defer?"
|
|
86
86
|
|
|
87
87
|
Always: emit the round → wait → record each answer in its section → confirm it
|
|
88
|
-
→ recompute the frontier.
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
→ recompute the frontier. Two independent questions in one message are
|
|
89
|
+
fine; avoid questions whose answers depend on each other, which is what
|
|
90
|
+
crossing a dependency produces.
|
|
91
91
|
|
|
92
92
|
## Turning answers into testable criteria
|
|
93
93
|
|
|
@@ -74,8 +74,8 @@ data = json.loads(resp.choices[0].message.content) # now guaranteed valid + typ
|
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
On the OpenAI Responses API the same block moves under `text.format` instead of `response_format`. On
|
|
77
|
-
Anthropic, the equivalent is `output_config={"format": {"type": "json_schema", "schema": {...}}}` on
|
|
78
|
-
Opus
|
|
77
|
+
Anthropic, the equivalent is `output_config={"format": {"type": "json_schema", "schema": {...}}}` on the
|
|
78
|
+
current Claude models (Opus 5.5, Sonnet 5.5, Haiku 5.5) and earlier ones back to the 4.5 generation; Anthropic compiles your schema into a grammar and **caches it for
|
|
79
79
|
24h**, and the SDKs ship helpers (`client.messages.parse(...)` in Python, `zodOutputFormat(schema)` in TS).
|
|
80
80
|
The older deprecated `output_format` param and the deprecated `structured-outputs-2025-11-13` beta header
|
|
81
81
|
still work in a transition window — do not write new code against them. Full shapes in
|
|
@@ -181,7 +181,11 @@ When you want one Pydantic model to run across OpenAI, Anthropic, and local back
|
|
|
181
181
|
SDK, use Instructor's unified entrypoint:
|
|
182
182
|
|
|
183
183
|
```python
|
|
184
|
-
|
|
184
|
+
from instructor import Mode
|
|
185
|
+
|
|
186
|
+
# Instructor's default Anthropic mode (Mode.TOOLS) forces a tool call, and current Claude models
|
|
187
|
+
# reject a forced tool_choice with a 400. MD_JSON does not force one.
|
|
188
|
+
client = instructor.from_provider("anthropic/claude-opus-5-5", mode=Mode.MD_JSON) # or "openai/gpt-5.1", "ollama/llama3.3"
|
|
185
189
|
```
|
|
186
190
|
|
|
187
191
|
Reach for Instructor when you need **provider portability** or **value-level validation with reask**. Reach
|
|
@@ -63,8 +63,8 @@ resp = client.responses.create(
|
|
|
63
63
|
|
|
64
64
|
```python
|
|
65
65
|
resp = client.messages.create(
|
|
66
|
-
model="claude-opus-
|
|
67
|
-
max_tokens=
|
|
66
|
+
model="claude-opus-5-5",
|
|
67
|
+
max_tokens=16000, # thinking is on by default on current models and shares this budget
|
|
68
68
|
messages=[{"role": "user", "content": text}],
|
|
69
69
|
output_config={"format": {"type": "json_schema", "schema": {
|
|
70
70
|
"type": "object",
|
|
@@ -81,8 +81,9 @@ resp = client.messages.create(
|
|
|
81
81
|
|
|
82
82
|
- Anthropic compiles the schema into a grammar and **caches it for 24h**, then constrains decoding
|
|
83
83
|
token-by-token.
|
|
84
|
-
- Supported
|
|
85
|
-
|
|
84
|
+
- Supported on the current Claude models (Opus 5.5, Sonnet 5.5, Haiku 5.5) and earlier generations
|
|
85
|
+
back to 4.5; confirm a given model with the Models API (`capabilities["structured_outputs"]`).
|
|
86
|
+
Also on Bedrock, Vertex, and Foundry (beta).
|
|
86
87
|
- SDK helpers: Python `client.messages.parse(...)` returns a parsed object; TS `zodOutputFormat(schema)` /
|
|
87
88
|
`jsonSchemaOutputFormat(schema)`.
|
|
88
89
|
- **Deprecated** (transition window only — do not write new code against these): the `output_format` param
|
|
@@ -119,7 +120,9 @@ class Order(BaseModel):
|
|
|
119
120
|
total_cents: int
|
|
120
121
|
due_date: str | None
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
# Instructor's default Anthropic mode (Mode.TOOLS) forces a tool call, and current Claude models
|
|
124
|
+
# reject a forced tool_choice with a 400. MD_JSON does not force one.
|
|
125
|
+
client = instructor.from_provider("anthropic/claude-opus-5-5", mode=instructor.Mode.MD_JSON) # or "openai/gpt-5.1", "ollama/llama3.3"
|
|
123
126
|
order = client.chat.completions.create(
|
|
124
127
|
response_model=Order,
|
|
125
128
|
max_retries=2, # bound the reask loop
|
package/skills/svelte/SKILL.md
CHANGED
|
@@ -26,7 +26,7 @@ Two things break Svelte code more than anything else: treating `$effect` as the
|
|
|
26
26
|
- Next.js / React Server Components → `../nextjs/SKILL.md`. Different reactivity model and data-loading contract. Never cross runes with RSC.
|
|
27
27
|
- Pure TypeScript typing (generics, mapped/conditional types) with no Svelte dimension → `../typescript/SKILL.md`.
|
|
28
28
|
- Deploy-target specifics (env, edge, project config) → `../vercel/SKILL.md`, `../netlify/SKILL.md`, `../cloudflare/SKILL.md`. This skill *picks the adapter*; those skills own the platform.
|
|
29
|
-
- React
|
|
29
|
+
- React → `../react/SKILL.md`, Vue/Nuxt → `../vue-nuxt/SKILL.md`, Astro → `../astro/SKILL.md`, SolidJS → `../solid-js/SKILL.md`, Angular → `../angular/SKILL.md`.
|
|
30
30
|
|
|
31
31
|
Current as of June 2026: **Svelte 5.56.x**, **SvelteKit 2.61.x**. Svelte 5 (runes) shipped Oct 2024.
|
|
32
32
|
|
|
@@ -9,10 +9,10 @@ origin: risco
|
|
|
9
9
|
|
|
10
10
|
# swift-ios
|
|
11
11
|
|
|
12
|
-
**
|
|
13
|
-
app lifecycle, Xcode, iOS APIs, App Store shipping.
|
|
14
|
-
and approachable concurrency, actors and task groups, `some` vs `any`, ARC and
|
|
15
|
-
Testing, macros
|
|
12
|
+
**Scope — the platform and the language.** This skill owns the **platform**: SwiftUI/UIKit views,
|
|
13
|
+
app lifecycle, Xcode, iOS APIs, App Store shipping. It owns language-level Swift too — Swift 6
|
|
14
|
+
data-race safety and approachable concurrency, actors and task groups, `some` vs `any`, ARC and
|
|
15
|
+
performance, Swift Testing, macros. A concurrency error, a hang, a data race or a
|
|
16
16
|
retain cycle belongs here, and so do interface feel, springs and materials on iOS.
|
|
17
17
|
|
|
18
18
|
|
package/skills/tasks/SKILL.md
CHANGED
|
@@ -41,7 +41,7 @@ use analogies and ask once "technical or with analogies?"; never invent one.
|
|
|
41
41
|
|
|
42
42
|
## Inputs (refuse to start without them)
|
|
43
43
|
|
|
44
|
-
You break down a **plan**, not an intent. Before slicing, confirm
|
|
44
|
+
You break down a **plan**, not an intent. Before slicing, confirm the first three exist; read the fourth if present:
|
|
45
45
|
|
|
46
46
|
1. **The plan** — `02-DOCS/wiki/sdd/plans/<slug>.md`, written by the `plan`
|
|
47
47
|
phase. It must contain the architecture, interfaces, and testing strategy.
|
package/skills/tauri/SKILL.md
CHANGED
|
@@ -50,9 +50,10 @@ A command is a Rust function the frontend can call. Each rule below has a one-li
|
|
|
50
50
|
camelCase (JS) ⇄ snake_case (Rust).*
|
|
51
51
|
- **Fallible commands return `Result<T, E>` where `E: Serialize`.** *An `Err` becomes a
|
|
52
52
|
rejected JS promise; a panic instead crashes the command thread silently.*
|
|
53
|
-
- **Never block the
|
|
54
|
-
spawned task. *
|
|
55
|
-
|
|
53
|
+
- **Never block the main thread.** Long or I/O work goes in an `async` command (or
|
|
54
|
+
`#[tauri::command(async)]`) or a spawned task. *A command without `async` runs on the main
|
|
55
|
+
thread — a blocking call there freezes the UI; `async` commands run on a separate task via
|
|
56
|
+
`async_runtime::spawn`.*
|
|
56
57
|
- **Share state with `.manage(x)` + `State<'_, T>`.** *If a guard is held across an
|
|
57
58
|
`.await`, use `tokio::sync::Mutex`, not `std::sync::Mutex` — the std guard is not `Send`
|
|
58
59
|
and will not compile in an async command.*
|
|
@@ -121,8 +121,8 @@ Good: TO THE FULLEST EXTENT PERMITTED BY LAW, OUR TOTAL LIABILITY IS CAPPED
|
|
|
121
121
|
|
|
122
122
|
## The legal boundary (non-negotiable)
|
|
123
123
|
|
|
124
|
-
- **You draft; you do not advise.**
|
|
125
|
-
- **Emit the attorney-review line** on any full ToS draft or any clause that limits liability, forces arbitration, or crosses a jurisdiction you cannot verify: "Have a licensed attorney review this before you publish or rely on it." This is mandatory
|
|
124
|
+
- **You prepare a starting draft; you do not advise.** Unauthorized-practice-of-law (UPL) rules reserve legal advice for licensed lawyers. You produce a starting document for attorney review and explain trade-offs; you do not opine on what is "legally safe".
|
|
125
|
+
- **Emit the attorney-review line** on any full ToS draft or any clause that limits liability, forces arbitration, or crosses a jurisdiction you cannot verify: "Have a licensed attorney review this before you publish or rely on it." This line is mandatory. (ABA Formal Op. 512 sets the lawyer's own duty to review AI-generated work; it is the reviewing attorney's obligation, not a rule for this draft.)
|
|
126
126
|
- **The privacy policy is NOT in here.** Terms *link* to the privacy policy; they do not contain it. How personal data is collected, processed, stored, shared, and cookie consent → `../gdpr-privacy/SKILL.md`. Internal data-handling/retention rules → `../data-policy/SKILL.md`.
|
|
127
127
|
- **Jurisdiction limits.** Default to a single named jurisdiction. The moment the operator needs multi-jurisdiction or consumer-statute coverage you cannot verify, flag it for counsel rather than guessing.
|
|
128
128
|
- **Hand off the edges:** a negotiated two-party agreement (NDA/MSA/SOW) → `../contracts/SKILL.md`; the signing/audit-trail mechanics → `../e-signature/SKILL.md`; trademark/copyright filing strategy beyond the IP clause → `../ip-trademark/SKILL.md`; SOC 2 / regulatory posture → `../compliance/SKILL.md`.
|
|
@@ -163,7 +163,8 @@ export function generateStaticParams() {
|
|
|
163
163
|
return routing.locales.map((locale) => ({ locale }));
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
export default function RootLayout({ children, params
|
|
166
|
+
export default async function RootLayout({ children, params }) {
|
|
167
|
+
const { locale } = await params; // params is a Promise
|
|
167
168
|
const dir = locale === "ar" || locale === "he" ? "rtl" : "ltr";
|
|
168
169
|
return <html lang={locale} dir={dir}>{children}</html>;
|
|
169
170
|
}
|
|
@@ -11,17 +11,19 @@ origin: risco
|
|
|
11
11
|
Express data and contracts precisely in the TypeScript type system, and configure the
|
|
12
12
|
compiler so the types actually hold.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
Written against **TypeScript 7** (`typescript` 7.0.2 on npm, the stable line since
|
|
15
|
+
2026-07-08): the native compiler written in Go, shipped by the `typescript` package as the
|
|
16
|
+
`tsc` binary. Full builds are typically 8-12x faster than 6.0 (VS Code's repo: 125.7s ->
|
|
17
|
+
10.6s), with parallel checking (`--checkers`, default 4) and parallel project builds
|
|
18
|
+
(`--builders`). TypeScript 7 turns every option deprecated in 6.0 into a hard error and ships
|
|
19
|
+
no programmatic API yet (that is planned for 7.1). Read the project's version first
|
|
20
|
+
(`npx tsc -v`); on a 5.x project, follow "Coming from 5.x" below before changing anything else.
|
|
20
21
|
|
|
21
22
|
## Boundary: language vs runtime vs framework
|
|
22
23
|
|
|
23
24
|
Three layers, three owners. **Language + compiler config lives here** — generics, narrowing,
|
|
24
|
-
`.d.ts`, `tsconfig`, and the build toolchain (`tsc
|
|
25
|
+
`.d.ts`, `tsconfig`, and the build toolchain (`tsc`, the `tsc6` compatibility package, `tsx`,
|
|
26
|
+
resolution mode).
|
|
25
27
|
**Runtime behavior** (how a stream backpressures, how the event loop schedules) is `nodejs`.
|
|
26
28
|
**Framework idioms** (component props, route maps, server-component typing) are
|
|
27
29
|
`react`/`nextjs`/`nestjs` — those *borrow* this skill's type mechanics but own their wiring.
|
|
@@ -51,7 +53,7 @@ Apply these on every TypeScript edit:
|
|
|
51
53
|
### Generics + constraints, and `const` type parameters
|
|
52
54
|
|
|
53
55
|
Constrain type parameters so callers get errors at the call site, and use a `const` type
|
|
54
|
-
parameter
|
|
56
|
+
parameter to preserve literal inference without `as const` everywhere:
|
|
55
57
|
|
|
56
58
|
```ts
|
|
57
59
|
// Bad: unconstrained T, and the literal "a"|"b" widens to string.
|
|
@@ -140,7 +142,7 @@ function load(id: UserId) { /* a bare string is now a compile error */ }
|
|
|
140
142
|
|
|
141
143
|
`Partial<T>` `Required<T>` `Readonly<T>` `Pick<T,K>` `Omit<T,K>` `Record<K,V>`
|
|
142
144
|
`Exclude<U,M>` `Extract<U,M>` `NonNullable<T>` `ReturnType<F>` `Parameters<F>`
|
|
143
|
-
`Awaited<T>` `NoInfer<T>` (
|
|
145
|
+
`Awaited<T>` `NoInfer<T>` (blocks a type param from inferring at one site).
|
|
144
146
|
|
|
145
147
|
### Mapped / conditional / template-literal one-liners
|
|
146
148
|
|
|
@@ -156,26 +158,38 @@ overloads) live in [references/type-system.md](references/type-system.md).
|
|
|
156
158
|
|
|
157
159
|
## tsconfig: strict base
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
TypeScript 7 already defaults `strict: true`, `module: esnext`, `target` to the newest
|
|
162
|
+
finished ES edition, `noUncheckedSideEffectImports: true`, `types: []` and `rootDir` to the
|
|
163
|
+
tsconfig's folder. Write the important ones anyway: an explicit base survives `extends`
|
|
164
|
+
chains and tells the reader what the project relies on. Copy-paste base; every package
|
|
165
|
+
`extends` it and overrides only paths/references:
|
|
160
166
|
|
|
161
167
|
```jsonc
|
|
162
168
|
{
|
|
163
169
|
"compilerOptions": {
|
|
164
|
-
"strict": true, //
|
|
170
|
+
"strict": true, // default in TS 7; keep it explicit
|
|
165
171
|
"noUncheckedIndexedAccess": true, // arr[i] / rec[k] are T | undefined
|
|
166
172
|
"verbatimModuleSyntax": true, // explicit import type; safe single-file transpile
|
|
167
173
|
"isolatedModules": true, // each file transpilable alone (esbuild/swc/babel)
|
|
168
174
|
"skipLibCheck": true, // don't type-check node_modules .d.ts (speed)
|
|
169
175
|
"resolveJsonModule": true, // import data.json with types
|
|
170
176
|
"target": "esnext",
|
|
171
|
-
"module": "nodenext", // or "esnext" + "moduleResolution": "bundler"
|
|
177
|
+
"module": "nodenext", // or "preserve"/"esnext" + "moduleResolution": "bundler"
|
|
172
178
|
"moduleResolution": "nodenext",
|
|
173
179
|
"moduleDetection": "force",
|
|
180
|
+
"rootDir": "./src", // default is the tsconfig folder; name src explicitly
|
|
181
|
+
"types": ["node"], // default is []: list every @types package you use
|
|
174
182
|
"noEmit": true // a bundler/tsc -b emits; the base just checks
|
|
175
|
-
}
|
|
183
|
+
},
|
|
184
|
+
"include": ["src"]
|
|
176
185
|
}
|
|
177
186
|
```
|
|
178
187
|
|
|
188
|
+
`types` defaulting to `[]` means globals from `@types/*` (`process`, `describe`, `Buffer`)
|
|
189
|
+
are not visible until listed; the error says "Cannot find name 'process'". Under `nodenext`
|
|
190
|
+
the nearest `package.json` decides ESM vs CJS: without `"type": "module"`, `.ts` files are
|
|
191
|
+
CommonJS and `verbatimModuleSyntax` rejects their `export` statements (TS1287).
|
|
192
|
+
|
|
179
193
|
### moduleResolution: bundler vs nodenext
|
|
180
194
|
|
|
181
195
|
| Aspect | `bundler` | `nodenext` |
|
|
@@ -183,11 +197,12 @@ Copy-paste base. Every package `extends` this and overrides only paths/reference
|
|
|
183
197
|
| Use when | Vite / Next / Remix / esbuild build the code | Code runs directly in Node (no bundler) |
|
|
184
198
|
| Relative import extensions | omit (`./util`) | required (`./util.js`) |
|
|
185
199
|
| `package.json` `exports`/`imports` | resolved | resolved |
|
|
186
|
-
| `module` setting | `esnext`/`
|
|
200
|
+
| `module` setting | `preserve` (or `esnext`/`commonjs`) | `nodenext` |
|
|
187
201
|
| Emits runnable JS itself | no (the bundler does) | yes |
|
|
188
202
|
|
|
189
203
|
Pick `bundler` when a bundler owns resolution; pick `nodenext` for libraries and scripts
|
|
190
|
-
that Node executes directly.
|
|
204
|
+
that Node executes directly. These are the only two modes to use: `node10`/`node` and
|
|
205
|
+
`classic` are removed in TypeScript 7. Field-by-field reference and the full matrix are in
|
|
191
206
|
[references/build-and-monorepo.md](references/build-and-monorepo.md).
|
|
192
207
|
|
|
193
208
|
## Monorepo & build
|
|
@@ -195,14 +210,45 @@ that Node executes directly. Field-by-field reference and the full matrix are in
|
|
|
195
210
|
Use **project references** so packages type-check independently and in dependency order. A
|
|
196
211
|
shared `tsconfig.base.json` holds the strict flags; each package extends it, sets
|
|
197
212
|
`composite: true`, `outDir`/`rootDir`, and lists upstream packages under `references`. Build
|
|
198
|
-
the graph with `tsc -b
|
|
213
|
+
the graph with `tsc -b`; TypeScript 7 builds independent projects in parallel (`--builders`)
|
|
214
|
+
and checks each with several checkers (`--checkers`, default 4; lower it on memory-tight CI,
|
|
215
|
+
or use `--singleThreaded`).
|
|
199
216
|
|
|
200
217
|
For declaration emit and publishing a library, set `declaration: true`,
|
|
201
|
-
`declarationMap: true`, and an `exports` map in `package.json`.
|
|
202
|
-
|
|
203
|
-
|
|
218
|
+
`declarationMap: true`, and an `exports` map in `package.json`. Run scripts with `tsx` or
|
|
219
|
+
Node's type stripping instead of `ts-node`. Tools that import the `typescript` JS API
|
|
220
|
+
(typescript-eslint, Vue/Svelte/Astro/MDX/Angular template tooling, webpack loaders) need 6.0
|
|
221
|
+
alongside 7: install `@typescript/typescript6` (binary `tsc6`). Depth, build-order graph, path
|
|
222
|
+
aliases, and the side-by-side setup are in
|
|
204
223
|
[references/build-and-monorepo.md](references/build-and-monorepo.md).
|
|
205
224
|
|
|
225
|
+
## Coming from 5.x
|
|
226
|
+
|
|
227
|
+
TypeScript 6.0 is the bridge release: it deprecated what 7 removes. Code that compiles on 6.0
|
|
228
|
+
with no `ignoreDeprecations` and `stableTypeOrdering: true` compiles the same on 7. Migrate in
|
|
229
|
+
that order: 5.x -> 6.0 clean -> 7.
|
|
230
|
+
|
|
231
|
+
| In the old config | TypeScript 7 | Do instead |
|
|
232
|
+
| --- | --- | --- |
|
|
233
|
+
| `baseUrl` | removed (TS5102) | `paths` entries relative to the tsconfig (`"@core/*": ["./packages/core/src/*"]`) |
|
|
234
|
+
| `moduleResolution: node`/`node10`/`classic` | removed | `nodenext` (Node runs it) or `bundler` (a bundler runs it) |
|
|
235
|
+
| `module: amd`/`umd`/`system`/`none` | removed | `esnext`/`preserve`, or `nodenext` |
|
|
236
|
+
| `outFile` | removed | a bundler (esbuild, Rollup, Vite) |
|
|
237
|
+
| `target: es5`, `downlevelIteration` | removed | `target` es2015 or later; a bundler/Babel for older engines |
|
|
238
|
+
| `esModuleInterop`/`allowSyntheticDefaultImports: false` | cannot be `false` | delete the line; interop is always on |
|
|
239
|
+
| `alwaysStrict: false` | cannot be `false` | rename identifiers that strict mode reserves |
|
|
240
|
+
| `module Foo {}` namespace | error (TS1540) | `namespace Foo {}`; `declare module "pkg"` is fine |
|
|
241
|
+
| `import x from "./a.json" assert { type: "json" }` | error | `with { type: "json" }` |
|
|
242
|
+
| `tsc file.ts` beside a `tsconfig.json` | error (TS5112) | `tsc -p .`, or `--ignoreConfig` on purpose |
|
|
243
|
+
| relying on implicit `@types/*` globals | `types` defaults to `[]` | list them: `"types": ["node", "vitest/globals"]` |
|
|
244
|
+
| sources under `src/` with no `rootDir` | `rootDir` defaults to the tsconfig folder | `"rootDir": "./src"` |
|
|
245
|
+
|
|
246
|
+
`ignoreDeprecations: "6.0"` silences the deprecations on 6.0 only; TypeScript 7 still errors. The
|
|
247
|
+
experimental `ts5to6` codemod rewrites `baseUrl` and `rootDir`. In JS files checked via JSDoc,
|
|
248
|
+
TypeScript 7 drops Closure-era forms (`@enum`, `@class`, `function(string): void`, postfix
|
|
249
|
+
`!`, standalone `?`); write `typeof value` where a type is expected. Template-literal `infer`
|
|
250
|
+
splits strings by code point, so a string-length utility type built on UTF-16 halves changes.
|
|
251
|
+
|
|
206
252
|
## Anti-patterns
|
|
207
253
|
|
|
208
254
|
| Anti-pattern | Why it bites | Do instead |
|
|
@@ -217,6 +263,8 @@ For declaration emit and publishing a library, set `declaration: true`,
|
|
|
217
263
|
| One giant `tsconfig` for a monorepo | can't express per-package targets; breaks references | `tsconfig.base.json` + per-package `extends` |
|
|
218
264
|
| `// @ts-ignore` | swallows the error even after the line is fixed, masking new ones | `// @ts-expect-error` (errors if the line later type-checks) |
|
|
219
265
|
| Default-importing in a CJS-emit file under `verbatimModuleSyntax` | blocked / wrong emit | use `export =`/named, or set the right `module` |
|
|
266
|
+
| `baseUrl`, `node10`, `outFile` or `ignoreDeprecations` in a TS 7 config | hard error, or a no-op that hides the real fix | the "Coming from 5.x" replacements |
|
|
267
|
+
| Forcing a JS-API tool onto `typescript` 7 | 7.0 ships no programmatic API, so the tool fails to load it | keep `@typescript/typescript6` for that tool, `tsc` 7 for checking |
|
|
220
268
|
|
|
221
269
|
## Project grounding
|
|
222
270
|
|
|
@@ -6,10 +6,10 @@ non-obvious narrowing symptoms and Spanish/Catalan phrasings) that must select t
|
|
|
6
6
|
`react`, `drizzle-orm`, `python`, `testing-web`) instead. **Capability**: the scenario gives a
|
|
7
7
|
loosely-typed module with no tsconfig and grades the output against the `must_include` rubric
|
|
8
8
|
(any -> precise types, discriminated union with a literal discriminant, exhaustive `never`
|
|
9
|
-
guard, a strict tsconfig, `import type` usage, no error-silencing casts).
|
|
9
|
+
guard, a strict tsconfig valid on TypeScript 7, `import type` usage, no error-silencing casts).
|
|
10
10
|
|
|
11
11
|
To run, feed each prompt to the skill router and confirm the trigger/route decision, then run
|
|
12
12
|
the capability scenario through an agent loaded with this skill and score the result by hand
|
|
13
13
|
against the rubric. There is no automated runner here; the rigor is the rubric plus
|
|
14
|
-
`scripts/verify.sh`, which independently proves the toolchain
|
|
15
|
-
exhaustiveness on
|
|
14
|
+
`scripts/verify.sh`, which runs TypeScript 7 `tsc` and independently proves the toolchain
|
|
15
|
+
enforces strictness, exhaustiveness and unchecked-index safety on sample files.
|
|
@@ -13,6 +13,8 @@ should_trigger:
|
|
|
13
13
|
why: Spanish trigger — strict config plus replacing any with precise types, language/compiler scope.
|
|
14
14
|
- prompt: "Convert these magic-string statuses into a discriminated union with an exhaustiveness check."
|
|
15
15
|
why: Discriminated unions + never guard, the canonical modeling pattern here.
|
|
16
|
+
- prompt: "We upgraded to TypeScript 7 and tsc now says Option 'baseUrl' has been removed. How do I migrate the tsconfig?"
|
|
17
|
+
why: Compiler config migration to TS 7 (removed options, paths without baseUrl) — owned here.
|
|
16
18
|
- prompt: "Por que no estrecha el tipo despues del if? sigue siendo string | undefined."
|
|
17
19
|
why: Catalan/Spanish non-obvious narrowing question — type-system diagnosis.
|
|
18
20
|
|
|
@@ -36,11 +38,12 @@ should_not_trigger:
|
|
|
36
38
|
capability:
|
|
37
39
|
- scenario: >
|
|
38
40
|
Given a loosely-typed module (any-heavy, string-keyed state object, no tsconfig),
|
|
39
|
-
produce strict types plus a tsconfig that compiles under `tsc --noEmit`.
|
|
41
|
+
produce strict types plus a tsconfig that compiles under TypeScript 7 `tsc --noEmit`.
|
|
40
42
|
must_include:
|
|
41
43
|
- "Replaces every `any` with `unknown`, a generic, or a precise type."
|
|
42
44
|
- "Models the state as a discriminated union with a literal discriminant (not string)."
|
|
43
45
|
- "Adds an exhaustive `never` guard so a new union member is a compile error."
|
|
44
46
|
- "Ships a strict tsconfig: strict, noUncheckedIndexedAccess, verbatimModuleSyntax, isolatedModules."
|
|
47
|
+
- "The tsconfig is valid on TypeScript 7: no baseUrl, outFile, node10/classic resolution or esModuleInterop false; moduleResolution is nodenext or bundler; any needed @types are listed in `types`."
|
|
45
48
|
- "Uses `import type` for type-only imports where applicable."
|
|
46
49
|
- "Uses no `as` casts to silence errors (each remaining `as` is justified, e.g. `as const` or a validated boundary)."
|