@ericrisco/rsc 0.1.44 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/manifest.json +110 -86
- package/package.json +1 -1
- package/scripts/lib/domains.js +1 -1
- package/scripts/skill-migration-brief.md +192 -0
- package/skills/ab-testing/SKILL.md +9 -41
- package/skills/accessibility/SKILL.md +5 -7
- package/skills/ads/SKILL.md +9 -24
- package/skills/agent-eval/SKILL.md +7 -33
- package/skills/agent-safety/SKILL.md +7 -14
- package/skills/ai-media/SKILL.md +4 -20
- package/skills/analytics/SKILL.md +8 -30
- package/skills/analyze/SKILL.md +24 -59
- package/skills/angular/SKILL.md +12 -25
- package/skills/api-connector-builder/SKILL.md +10 -27
- package/skills/api-design/SKILL.md +7 -14
- package/skills/article-writing/SKILL.md +1 -18
- package/skills/astro/SKILL.md +36 -54
- package/skills/author-skill/SKILL.md +41 -74
- package/skills/author-skill/evals/README.md +5 -5
- package/skills/author-skill/evals/cases.yaml +8 -8
- package/skills/author-skill/references/description-recipe.md +25 -26
- package/skills/author-skill/references/eval-authoring.md +1 -1
- package/skills/author-skill/references/rsc-conventions.md +1 -1
- package/skills/automation-flows/SKILL.md +6 -16
- package/skills/automation-strategy/SKILL.md +1 -9
- package/skills/aws-essentials/SKILL.md +6 -23
- package/skills/backups/SKILL.md +1 -7
- package/skills/bash-scripting/SKILL.md +5 -9
- package/skills/bookkeeping/SKILL.md +2 -10
- package/skills/brand-identity/SKILL.md +18 -44
- package/skills/brand-voice/SKILL.md +4 -31
- package/skills/building-agents/SKILL.md +20 -103
- package/skills/business-intelligence/SKILL.md +9 -23
- package/skills/calendar-scheduling/SKILL.md +11 -27
- package/skills/case-studies/SKILL.md +3 -8
- package/skills/chatbot/SKILL.md +6 -23
- package/skills/chrome-extension/SKILL.md +2 -2
- package/skills/clarify/SKILL.md +31 -72
- package/skills/clickhouse-analytics/SKILL.md +2 -8
- package/skills/client-onboarding/SKILL.md +17 -19
- package/skills/cloudflare/SKILL.md +3 -8
- package/skills/code-review/SKILL.md +10 -23
- package/skills/codebase-onboarding/SKILL.md +2 -7
- package/skills/cold-outreach/SKILL.md +9 -30
- package/skills/community/SKILL.md +4 -31
- package/skills/competitor-watch/SKILL.md +20 -35
- package/skills/compliance/SKILL.md +10 -37
- package/skills/compose-multiplatform/SKILL.md +1 -1
- package/skills/constitution/SKILL.md +8 -35
- package/skills/content-engine/SKILL.md +4 -16
- package/skills/context-budget/SKILL.md +3 -21
- package/skills/continuous-learning/SKILL.md +10 -40
- package/skills/contracts/SKILL.md +6 -17
- package/skills/coolify/SKILL.md +8 -14
- package/skills/cost-tracking/SKILL.md +3 -11
- package/skills/course-builder/SKILL.md +17 -45
- package/skills/course-storytelling/SKILL.md +26 -94
- package/skills/cpp/SKILL.md +26 -71
- package/skills/csharp-dotnet/SKILL.md +19 -38
- package/skills/customer-support/SKILL.md +14 -37
- package/skills/dashboard/SKILL.md +6 -26
- package/skills/data-cleaning/SKILL.md +37 -63
- package/skills/data-policy/SKILL.md +8 -21
- package/skills/data-scraper/SKILL.md +1 -7
- package/skills/debug/SKILL.md +10 -49
- package/skills/deployment/SKILL.md +38 -101
- package/skills/design/SKILL.md +34 -116
- package/skills/fable-operator/SKILL.md +1 -4
- package/skills/fastapi/SKILL.md +50 -82
- package/skills/flutter/SKILL.md +41 -89
- package/skills/go/SKILL.md +57 -105
- package/skills/harness/SKILL.md +52 -68
- package/skills/implement/SKILL.md +1 -1
- package/skills/init/SKILL.md +152 -168
- package/skills/marketing/SKILL.md +30 -80
- package/skills/nextjs/SKILL.md +42 -116
- package/skills/orient/SKILL.md +25 -20
- package/skills/parallel/SKILL.md +9 -75
- package/skills/plan/SKILL.md +92 -165
- package/skills/postgresdb/SKILL.md +52 -72
- package/skills/presentations/SKILL.md +49 -87
- package/skills/python/SKILL.md +23 -72
- package/skills/react/SKILL.md +19 -67
- package/skills/review/SKILL.md +22 -52
- package/skills/rust/SKILL.md +40 -115
- package/skills/sdd-init/SKILL.md +9 -14
- package/skills/secure-coding/SKILL.md +80 -109
- package/skills/ship/SKILL.md +25 -55
- package/skills/tasks/SKILL.md +37 -61
- package/skills/typescript/SKILL.md +22 -55
- package/skills/verify/SKILL.md +8 -32
- package/skills/viral-score/SKILL.md +122 -0
- package/skills/viral-score/evals/README.md +16 -0
- package/skills/viral-score/evals/cases.yaml +50 -0
- package/skills/vue-nuxt/SKILL.md +45 -106
- package/skills/worktrees/SKILL.md +24 -69
package/skills/vue-nuxt/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vue-nuxt
|
|
3
|
-
description: "Use when building
|
|
3
|
+
description: "Use when building or reviewing a Vue 3 + Nuxt 4 app — `<script setup>` reactivity, SSR/SSG/hybrid `routeRules`, the `app/`+`server/` layout, SSR-safe fetching (`useFetch`/`useAsyncData`) and state (`useState`/Pinia), Nitro routes, hydration mismatches, Nuxt 3→4 migration. NOT React/RSC (that is nextjs), NOT a static islands site (that is astro)."
|
|
4
4
|
tags: [vue, nuxt, frontend, web, ssr]
|
|
5
5
|
recommends: [design, deployment, secure-coding]
|
|
6
6
|
origin: risco
|
|
@@ -11,35 +11,19 @@ origin: risco
|
|
|
11
11
|
Build and review Vue 3 (`<script setup>` + Composition API) on the Nuxt 4 meta-framework:
|
|
12
12
|
SSR/SSG/hybrid rendering, the `app/` + `server/` layout, SSR-safe fetching and state, Nitro
|
|
13
13
|
server routes, and the reactivity discipline that keeps hydration correct. Nuxt's render model
|
|
14
|
-
is **whole-component render-then-hydrate** — there is no React-style "server component" boundary
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## When NOT to use
|
|
29
|
-
|
|
30
|
-
- React / Next.js, App Router, RSC, server actions → `../nextjs/SKILL.md` or `../react/SKILL.md`.
|
|
31
|
-
Do not import RSC mental models here — Vue has no server-component boundary.
|
|
32
|
-
- Content-first static site mixing frameworks/islands → `../astro/SKILL.md`. Fine-grained signals
|
|
33
|
-
framework → `../solid-js/SKILL.md`. Compiler-first no-VDOM peer → `../svelte/SKILL.md`.
|
|
34
|
-
Angular → `../angular/SKILL.md`.
|
|
35
|
-
- Backend not in Nitro/JS (Python/Go/PHP) → `../fastapi/SKILL.md`, `../go/SKILL.md`,
|
|
36
|
-
`../laravel/SKILL.md`.
|
|
37
|
-
- E2E or component-test *strategy* depth → `../e2e-testing/SKILL.md` / `../testing-web/SKILL.md`
|
|
38
|
-
(this skill states the Vitest + `@vue/test-utils` + `@nuxt/test-utils` setup, defers strategy).
|
|
39
|
-
- Deploy-platform specifics (the Vercel/Netlify/Cloudflare adapters) → `../deployment/SKILL.md`,
|
|
40
|
-
`../vercel/SKILL.md`, `../netlify/SKILL.md`, `../cloudflare/SKILL.md`. This skill picks the
|
|
41
|
-
Nitro preset; those own the platform.
|
|
42
|
-
- Generic security review → `../secure-coding/SKILL.md`; SEO/content strategy → `../marketing/SKILL.md`.
|
|
14
|
+
is **whole-component render-then-hydrate** — there is no React-style "server component" boundary,
|
|
15
|
+
so never import RSC mental models here.
|
|
16
|
+
|
|
17
|
+
Not this skill: React / Next App Router / server actions → [`nextjs`](../nextjs/SKILL.md) or
|
|
18
|
+
[`react`](../react/SKILL.md). Content-first site mixing frameworks/islands →
|
|
19
|
+
[`astro`](../astro/SKILL.md); fine-grained signals → [`solid-js`](../solid-js/SKILL.md);
|
|
20
|
+
compiler-first no-VDOM peer → [`svelte`](../svelte/SKILL.md); [`angular`](../angular/SKILL.md).
|
|
21
|
+
Backend not in Nitro/JS → [`fastapi`](../fastapi/SKILL.md), [`go`](../go/SKILL.md),
|
|
22
|
+
[`laravel`](../laravel/SKILL.md). Test *strategy* beyond the Vitest + `@vue/test-utils` +
|
|
23
|
+
`@nuxt/test-utils` setup named here → [`e2e-testing`](../e2e-testing/SKILL.md) /
|
|
24
|
+
[`testing-web`](../testing-web/SKILL.md). Generic security review →
|
|
25
|
+
[`secure-coding`](../secure-coding/SKILL.md); SEO/content strategy →
|
|
26
|
+
[`marketing`](../marketing/SKILL.md); component visual language → [`design`](../design/SKILL.md).
|
|
43
27
|
|
|
44
28
|
## First: detect Nuxt vs plain Vue, and the version
|
|
45
29
|
|
|
@@ -49,7 +33,7 @@ before you write a line.
|
|
|
49
33
|
| Signal in the repo | Verdict | What is available |
|
|
50
34
|
|---|---|---|
|
|
51
35
|
| `nuxt.config.{ts,js,mjs}` + `app/` dir holding `pages/`,`components/` | **Nuxt 4** (current) | full auto-imports, `useFetch`/`useState`, `server/`, `routeRules` |
|
|
52
|
-
| `nuxt.config.*` + root `pages/`,`components/` (no `app/`) | **Nuxt 3 layout** | same APIs; flag the migration (see `references/migration-nuxt4.md`) |
|
|
36
|
+
| `nuxt.config.*` + root `pages/`,`components/` (no `app/`) | **Nuxt 3 layout** | same APIs; flag the migration (see [`references/migration-nuxt4.md`](references/migration-nuxt4.md)) |
|
|
53
37
|
| `vite.config.*` + `createApp(...).mount(...)`, no `nuxt.config` | **plain Vue 3 SPA** | Vue reactivity only — NO `useFetch`/`useState`/Nitro/auto-imports |
|
|
54
38
|
|
|
55
39
|
Rule: in a plain-Vue SPA, fetch with the browser `fetch`/a client library inside `onMounted` or a
|
|
@@ -121,7 +105,7 @@ const { name: nameRef } = toRefs(state) // nameRef.value stays linked
|
|
|
121
105
|
```
|
|
122
106
|
|
|
123
107
|
Deep reactivity, effect scope, advanced `provide/inject`, and render-function/JSX notes live in
|
|
124
|
-
`references/reactivity.md
|
|
108
|
+
[`references/reactivity.md`](references/reactivity.md).
|
|
125
109
|
|
|
126
110
|
## Components & composables
|
|
127
111
|
|
|
@@ -172,13 +156,14 @@ const { data: product, status, error, refresh } = await useAsyncData(
|
|
|
172
156
|
Key options: `key` (shared/deduped result — same key returns the same `data`/`error`/`status` ref,
|
|
173
157
|
auto-cleaned on last unmount), `lazy: true` (don't block navigation), `server: false` (client-only
|
|
174
158
|
fetch), `transform` (reshape before storing), `pick` (keep only listed fields — shrinks payload),
|
|
175
|
-
`watch`/reactive keys (a `ref`/`computed`/getter key refetches when it changes).
|
|
176
|
-
|
|
177
|
-
updates. Nuxt 4.2 adds `AbortController`
|
|
178
|
-
returned `refresh()`, or invalidate
|
|
159
|
+
`watch`/reactive keys (a `ref`/`computed`/getter key refetches when it changes). Type the result
|
|
160
|
+
with `useFetch<T>()` / `useAsyncData<T>()`. In **Nuxt 4 the returned `data` is a `shallowRef`** —
|
|
161
|
+
replace the whole value, don't deep-mutate, to trigger updates. Nuxt 4.2 adds `AbortController`
|
|
162
|
+
signal support for request cancellation. Re-run with the returned `refresh()`, or invalidate
|
|
163
|
+
broadly with `refreshNuxtData(key)`.
|
|
179
164
|
|
|
180
165
|
Full option matrix, custom `$api` factory, optimistic UI, and error/pending patterns are in
|
|
181
|
-
`references/data-and-state.md
|
|
166
|
+
[`references/data-and-state.md`](references/data-and-state.md).
|
|
182
167
|
|
|
183
168
|
## SSR-safe state
|
|
184
169
|
|
|
@@ -259,7 +244,8 @@ export default defineEventHandler(async (event) => {
|
|
|
259
244
|
the browser bundle. Rule: a secret in `runtimeConfig.public` (or any `NUXT_PUBLIC_*` env) ships to
|
|
260
245
|
every client — keep API keys, DB URLs, and tokens at the top level, never under `public`. Type
|
|
261
246
|
calls to your own API with `$fetch<ProductDto>('/api/...')`. Handlers, route-rule recipes,
|
|
262
|
-
middleware, and `defineCachedEventHandler` caching live in
|
|
247
|
+
middleware, and `defineCachedEventHandler` caching live in
|
|
248
|
+
[`references/nitro-and-rendering.md`](references/nitro-and-rendering.md).
|
|
263
249
|
|
|
264
250
|
## Rendering strategy
|
|
265
251
|
|
|
@@ -281,8 +267,9 @@ export default defineNuxtConfig({
|
|
|
281
267
|
|
|
282
268
|
`nuxt build` produces an SSR server; `nuxt generate` prerenders a fully static site. The **Nitro
|
|
283
269
|
preset** chooses the deploy target (node-server, vercel, netlify, cloudflare-pages, …) — pick the
|
|
284
|
-
preset here, then hand platform specifics to
|
|
285
|
-
|
|
270
|
+
preset here, then hand platform specifics to [`deployment`](../deployment/SKILL.md),
|
|
271
|
+
[`vercel`](../vercel/SKILL.md), [`netlify`](../netlify/SKILL.md), or
|
|
272
|
+
[`cloudflare`](../cloudflare/SKILL.md).
|
|
286
273
|
|
|
287
274
|
## Performance
|
|
288
275
|
|
|
@@ -296,12 +283,6 @@ preset here, then hand platform specifics to `../deployment/SKILL.md` / `../verc
|
|
|
296
283
|
a 2026 preview targeting mid-2026 stable — treat as opt-in, not the default.
|
|
297
284
|
- Targets: LCP < 2.5s, CLS < 0.1, INP < 200ms.
|
|
298
285
|
|
|
299
|
-
## TypeScript discipline
|
|
300
|
-
|
|
301
|
-
Generic `defineProps<{...}>()` / `defineEmits<{...}>()`; typed `useFetch<T>()` /
|
|
302
|
-
`useAsyncData<T>()`; typed `$fetch<T>()` to your own API; `strict: true`. Gate with
|
|
303
|
-
`nuxi typecheck` (Nuxt) or `vue-tsc --noEmit` (plain Vue) — see Verify.
|
|
304
|
-
|
|
305
286
|
## Anti-patterns → STOP
|
|
306
287
|
|
|
307
288
|
| Smell | Why it is wrong | Do instead |
|
|
@@ -317,68 +298,26 @@ Generic `defineProps<{...}>()` / `defineEmits<{...}>()`; typed `useFetch<T>()` /
|
|
|
317
298
|
| Same fetch in two components without a shared `key` | duplicate requests, divergent refs | one stable `key` → shared deduped result |
|
|
318
299
|
| `ref(hugeArray)` / deep `reactive` on big lists | per-element proxy overhead | `shallowRef`/`shallowReactive`, replace whole value |
|
|
319
300
|
|
|
320
|
-
## Quick reference
|
|
321
|
-
|
|
322
|
-
| Task | API / file |
|
|
323
|
-
|---|---|
|
|
324
|
-
| Page data, once on SSR | `useFetch(url, { key })` / `useAsyncData(key, fn)` |
|
|
325
|
-
| Request in a handler / after mount | `$fetch(url)` |
|
|
326
|
-
| Shared SSR-safe value | `useState(key, init)` |
|
|
327
|
-
| Structured store | Pinia setup store in `app/stores/` |
|
|
328
|
-
| Two-way binding | `defineModel<T>()` |
|
|
329
|
-
| Template DOM ref | `useTemplateRef('name')` |
|
|
330
|
-
| Server endpoint | `server/api/x.get.ts` + `defineEventHandler` |
|
|
331
|
-
| HTTP error | `throw createError({ statusCode })` |
|
|
332
|
-
| Private vs public config | `useRuntimeConfig()` vs `config.public` |
|
|
333
|
-
| Per-route rendering | `routeRules` in `nuxt.config.ts` |
|
|
334
|
-
| Static build | `nuxt generate`; SSR build `nuxt build` |
|
|
335
|
-
| Typecheck | `nuxi typecheck` / `vue-tsc --noEmit` |
|
|
336
|
-
|
|
337
301
|
## Verify
|
|
338
302
|
|
|
339
|
-
`scripts/verify.sh` runs from the project root.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
`
|
|
343
|
-
failure; everything is read-only except the final build, which writes
|
|
344
|
-
`dist/`). No installs, no network mutations, safe to re-run, exits 0 on a
|
|
303
|
+
`scripts/verify.sh` runs from the project root. With a `nuxt.config.{ts,js,mjs}` it runs `nuxi
|
|
304
|
+
typecheck` (fallback `vue-tsc --noEmit`), the package `lint` script if present, `vitest run` if
|
|
305
|
+
Vitest is present, then `nuxi build`; with no Nuxt config, `vue-tsc --noEmit`, lint, vitest, then
|
|
306
|
+
`vite build`. Keep `strict: true` in tsconfig so the typecheck is worth running. Every missing tool
|
|
307
|
+
is a yellow SKIP, never a failure; everything is read-only except the final build, which writes
|
|
308
|
+
`.nuxt/`/`.output/` (or `dist/`). No installs, no network mutations, safe to re-run, exits 0 on a
|
|
309
|
+
clean/empty target.
|
|
345
310
|
|
|
346
311
|
## Project grounding (02-DOCS + CLAUDE.md)
|
|
347
312
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
article (bump its `Updated` date) in the same change.
|
|
360
|
-
|
|
361
|
-
No `02-DOCS/` layer? Skip silently (optionally suggest `harness`). Technical conventions are
|
|
362
|
-
*recorded, not gated* — never block the task on this.
|
|
363
|
-
|
|
364
|
-
## References
|
|
365
|
-
|
|
366
|
-
- `references/reactivity.md` — reactivity caveats, effect scope, watcher cleanup, composable
|
|
367
|
-
patterns, typed `provide/inject`, advanced `defineModel`, render-fn/JSX.
|
|
368
|
-
- `references/data-and-state.md` — full `useFetch`/`useAsyncData` option matrix, custom `$api`,
|
|
369
|
-
Pinia setup stores + SSR hydration + Pinia Colada, `useState` patterns, optimistic UI.
|
|
370
|
-
- `references/nitro-and-rendering.md` — Nitro handlers, route-rule recipes (ISR/SWR/SPA/prerender),
|
|
371
|
-
server middleware, runtime config, `defineCachedEventHandler`, preset selection.
|
|
372
|
-
- `references/migration-nuxt4.md` — Nuxt 3 → 4 (`app/` move, `compatibilityVersion`, shared-key
|
|
373
|
-
data, shallowRef payload, renamed APIs) and Vue 3.4 → 3.5 deltas.
|
|
374
|
-
|
|
375
|
-
## See Also
|
|
376
|
-
|
|
377
|
-
- `../nextjs/SKILL.md` — the React/Next analogue; cross over only when the project is React.
|
|
378
|
-
- `../design/SKILL.md` — design system and component visual language this skill consumes.
|
|
379
|
-
- `../deployment/SKILL.md`, `../vercel/SKILL.md`, `../netlify/SKILL.md`, `../cloudflare/SKILL.md`
|
|
380
|
-
— platform deploy once the Nitro preset is chosen.
|
|
381
|
-
- `../secure-coding/SKILL.md` — generic security; complements the runtime-config secret rules here.
|
|
382
|
-
- `../e2e-testing/SKILL.md` / `../testing-web/SKILL.md` — test strategy beyond the setup stated here.
|
|
383
|
-
- `../marketing/SKILL.md` — SEO/GEO content strategy this skill renders but does not decide.
|
|
384
|
-
- `../harness/SKILL.md` — workspace conventions (`02-DOCS/`).
|
|
313
|
+
In a project with a `02-DOCS/` layer (the [`harness`](../harness/SKILL.md) Karpathy wiki), read
|
|
314
|
+
`02-DOCS/wiki/stack/vue-nuxt.md` first and stay consistent with it. If it is missing or stale,
|
|
315
|
+
create/update it with this app's real choices — rendering mode per route (`routeRules`), the
|
|
316
|
+
`useFetch`/`useAsyncData` conventions, `useState` vs Pinia, the Nitro preset/deploy target, the
|
|
317
|
+
design-system hookup — bump its `Updated` date, and link it from a `## Knowledge map` section in
|
|
318
|
+
the root `CLAUDE.md` (creating that section, and `CLAUDE.md` itself, if absent). No `02-DOCS/`
|
|
319
|
+
layer? Skip silently. Technical conventions are *recorded, not gated* — never block the task.
|
|
320
|
+
|
|
321
|
+
Nuxt 3 → 4 deltas (`app/` move, `compatibilityVersion`, shared-key data, shallowRef payload,
|
|
322
|
+
renamed APIs) and Vue 3.4 → 3.5 changes are in
|
|
323
|
+
[`references/migration-nuxt4.md`](references/migration-nuxt4.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: worktrees
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when work is about to become commits and needs isolation first — check the tree state, then branch or cut a git worktree off a clean base (native EnterWorktree first, git fallback) so implement never runs on main. NOT what may run concurrently inside those workspaces (that is `parallel`), NOT the merge/cleanup after (that is `ship`)."
|
|
4
4
|
tags: [git, worktree, isolation]
|
|
5
5
|
recommends: []
|
|
6
6
|
profiles: [core, full]
|
|
@@ -53,11 +53,10 @@ extra directory. The rest of this skill assumes a worktree; the branch path is t
|
|
|
53
53
|
|
|
54
54
|
Run this in order. Each check prevents a class of "lost work" you can't easily undo.
|
|
55
55
|
|
|
56
|
-
1. **Read the accompaniment dial
|
|
57
|
-
accompaniment level (L0..L3)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
repo with no rsc harness present) → skip the dial, assume non-technical, and proceed.
|
|
56
|
+
1. **Read the accompaniment dial** — `02-DOCS/wiki/harness/user-profile.md` gives the technical +
|
|
57
|
+
accompaniment level (L0..L3); set your volume from the table below. No profile yet → assume
|
|
58
|
+
non-technical, explain what a worktree is in one plain sentence before making one. No `02-DOCS/` at all (a worktree can be created in any git repo
|
|
59
|
+
with no rsc harness present) → skip the dial, assume non-technical, and proceed.
|
|
61
60
|
2. **Confirm you're in a git repo.** `git rev-parse --is-inside-work-tree`. If not, there's nothing
|
|
62
61
|
to isolate with git — tell the user; don't fabricate a worktree.
|
|
63
62
|
3. **Check the current branch.** `git rev-parse --abbrev-ref HEAD`. On `main`/`master` with work
|
|
@@ -70,6 +69,8 @@ Run this in order. Each check prevents a class of "lost work" you can't easily u
|
|
|
70
69
|
carry them over. Never silently leave a user's WIP behind.
|
|
71
70
|
- Unrelated WIP → that's the textbook reason to use a worktree (isolate the new work, leave the
|
|
72
71
|
WIP exactly where it sits).
|
|
72
|
+
- A dirty tree you don't understand is a hard stop: surface every modified path and ask before
|
|
73
|
+
branching or stashing. Lost WIP is the one unrecoverable failure in this step.
|
|
73
74
|
5. **Pick the base ref.** Branch from an up-to-date default branch unless the user wants to build on
|
|
74
75
|
local HEAD. Stale base = predictable merge pain later. Default: fresh from `origin/<default>`.
|
|
75
76
|
6. **Choose a name** tied to the feature slug — the same `<slug>` the spec and plan use
|
|
@@ -83,15 +84,17 @@ Only once the tree state is understood and the user's WIP is accounted for do yo
|
|
|
83
84
|
**Prefer the native worktree tool when it's available in your environment.** An `EnterWorktree`-style
|
|
84
85
|
tool typically creates an isolated worktree (often under something like `.claude/worktrees/`, though
|
|
85
86
|
the exact location is tool-dependent), switches the session into it, and tracks it for clean exit —
|
|
86
|
-
which is exactly the lifecycle this skill wants, with no manual path management.
|
|
87
|
+
which is exactly the lifecycle this skill wants, with no manual path management. The git path is the
|
|
88
|
+
universal fallback and is exactly what the native tool does under the hood.
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
unmerged work must be an explicit, confirmed choice — never a silent cleanup.
|
|
90
|
+
| You have… | Create | Leave intact | Discard |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| A native worktree tool (`EnterWorktree`-style) | enter, named for the feature slug; the session's working directory moves into the isolated checkout | exit with `keep` — worktree and branch stay on disk for later | exit with `remove` — deletes both when the work is done or abandoned |
|
|
93
|
+
| Plain git only | `git worktree add -b feat/<slug> …` | leave the dir; it persists | `git worktree remove` + `git branch -d` |
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
Removing a worktree that holds uncommitted or unmerged work must be an explicit, confirmed choice,
|
|
96
|
+
never a silent cleanup: refuse the silent path and confirm the discard with the user, quoting what
|
|
97
|
+
would be lost.
|
|
95
98
|
|
|
96
99
|
```bash
|
|
97
100
|
# from the repo root, default branch up to date
|
|
@@ -140,24 +143,13 @@ git worktree prune # self-heal stale administrati
|
|
|
140
143
|
- **`git worktree prune`** after a remove clears stale metadata when a directory vanished out from
|
|
141
144
|
under git — cheap self-healing, safe to run.
|
|
142
145
|
|
|
143
|
-
## Native vs. git fallback — which you're using
|
|
144
|
-
|
|
145
|
-
| You have… | Create | Leave intact | Discard |
|
|
146
|
-
| --- | --- | --- | --- |
|
|
147
|
-
| A native worktree tool (`EnterWorktree`-style) | enter, named for the slug | exit with `keep` | exit with `remove` (confirm if dirty/unmerged) |
|
|
148
|
-
| Plain git only | `git worktree add -b feat/<slug> …` | leave the dir; it persists | `git worktree remove` + `git branch -d` |
|
|
149
|
-
|
|
150
|
-
The native tool is preferred because it owns the session-switch and the exit lifecycle for you. The
|
|
151
|
-
git path is the universal fallback and is exactly what the native tool does under the hood.
|
|
152
|
-
|
|
153
146
|
## Model tier — `light` (opt-in routing)
|
|
154
147
|
|
|
155
148
|
This phase's default model tier is **`light`** — isolating the workspace is mechanical git work. Routing is **off** unless `models.enabled: true` in `02-DOCS/wiki/sdd/config.yaml`. When on: resolve this phase's tier (`models.overrides` wins over `models.phases`), map it to a model via `models.tiers`, and apply per `../sdd/references/model-routing.md` — announce the switch per the accompaniment dial when it differs from the session model, and dispatch any `Task`/`parallel` subagents on that model. Routing off or no profile → honor the session model silently. Never fake a switch a tool can't make; skip routing on a one-line change.
|
|
156
149
|
|
|
157
150
|
## Adapting to the dial
|
|
158
151
|
|
|
159
|
-
|
|
160
|
-
every level; only the talking changes.
|
|
152
|
+
The isolation is identical at every level; only the talking changes.
|
|
161
153
|
|
|
162
154
|
| Level | How `worktrees` behaves |
|
|
163
155
|
| --- | --- |
|
|
@@ -182,47 +174,10 @@ the dial controls verbosity, never whether you check before risking someone's WI
|
|
|
182
174
|
| "Already on a feature branch, I'll make a worktree anyway" | Redundant isolation is just clutter. If the current branch is already isolated and clean, say so and proceed. |
|
|
183
175
|
| "I'll record the worktree path into 02-DOCS so it's tracked" | Isolation is plumbing, not knowledge. No artifact; the branch name traces it. Don't pollute the wiki. |
|
|
184
176
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- **Asked to actually write the feature code** → that's `../implement/SKILL.md`. Create the workspace,
|
|
193
|
-
then hand off; don't start coding in this step.
|
|
194
|
-
- **A native `remove`/`git worktree remove` would drop uncommitted or unmerged work** → refuse the
|
|
195
|
-
silent path. Confirm the discard explicitly with the user, quoting what would be lost.
|
|
196
|
-
|
|
197
|
-
## Checklist (copy when isolating)
|
|
198
|
-
|
|
199
|
-
```text
|
|
200
|
-
- [ ] Read the accompaniment dial (user-profile.md); set verbosity
|
|
201
|
-
- [ ] Confirmed inside a git repo
|
|
202
|
-
- [ ] Checked current branch; on main/master if implement is next
|
|
203
|
-
- [ ] Checked `git status --short`; accounted for any uncommitted WIP (asked, didn't bulldoze)
|
|
204
|
-
- [ ] Picked base ref (fresh origin/<default> unless user chose HEAD)
|
|
205
|
-
- [ ] Named the workspace feat/<slug> to match the spec/plan artifacts
|
|
206
|
-
- [ ] Created isolation: native worktree tool if available, else git worktree (branch = degenerate case)
|
|
207
|
-
- [ ] Confirmed: cwd is the isolated branch; the main checkout is untouched
|
|
208
|
-
- [ ] Wrote NO runtime code and NO 02-DOCS artifact here
|
|
209
|
-
- [ ] Handed off to implement
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## What this skill is NOT
|
|
213
|
-
|
|
214
|
-
- **Not the task breakdown.** Slicing the plan into ordered, verifiable tasks is `../tasks/SKILL.md`.
|
|
215
|
-
- **Not the coding.** Writing the feature test-first, task by task, is `../implement/SKILL.md`.
|
|
216
|
-
- **Not branch cleanup / merge / PR.** Closing the branch — merge, PR, or discard, with Eric-only
|
|
217
|
-
git authorship — is `../ship/SKILL.md`. This skill only *opens* the isolation.
|
|
218
|
-
- **Not a place for runtime or wiki artifacts.** It touches git state only; nothing under `02-DOCS`.
|
|
219
|
-
|
|
220
|
-
## Where you are in the chain
|
|
221
|
-
|
|
222
|
-
`constitution` → `specify` → `clarify` → `plan` → `tasks` → `analyze` → **worktrees** (on-demand) →
|
|
223
|
-
`implement` → `verify` → `review` → `ship`. The **parallel** pattern leans on this skill too: each
|
|
224
|
-
independent stream gets its own worktree so the streams never fight over files.
|
|
225
|
-
|
|
226
|
-
**Next:** with a clean isolated workspace in hand, hand to **`../implement/SKILL.md`** — walk the
|
|
227
|
-
task list test-first, one commit per task, on this branch. When the feature is built and verified,
|
|
228
|
-
**`../ship/SKILL.md`** closes the branch.
|
|
177
|
+
**Next:** with a clean isolated workspace in hand, hand to `../implement/SKILL.md` — walk the task
|
|
178
|
+
list test-first, one commit per task, on this branch. Neighbours: `../tasks/SKILL.md` slices the plan
|
|
179
|
+
before you get here; `../parallel/SKILL.md` decides *what may run concurrently* inside these
|
|
180
|
+
workspaces — it leans on this skill (each independent stream gets its own worktree, so the streams
|
|
181
|
+
never fight over files) but the partition-then-gather call is its own; `../ship/SKILL.md` closes the
|
|
182
|
+
branch afterwards — merge, PR, or discard, with Eric-only git authorship. This skill only *opens* the
|
|
183
|
+
isolation, and it touches git state only: no runtime code, nothing under `02-DOCS`.
|