@pikku/skills 0.12.52 → 0.12.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +1 -1
  2. package/dist/skills.gen.js +2 -2
  3. package/dist/snippets.js +1 -1
  4. package/package.json +1 -1
  5. package/skills/pikku-a11y/SKILL.md +22 -15
  6. package/skills/pikku-addon/SKILL.md +5 -5
  7. package/skills/pikku-addon/references/addon-package-manifest.md +7 -0
  8. package/skills/pikku-addon/references/openapi.md +11 -0
  9. package/skills/pikku-agent/SKILL.md +6 -6
  10. package/skills/pikku-agent/references/agents.md +8 -1
  11. package/skills/pikku-agent/references/runner-vercel.md +2 -2
  12. package/skills/pikku-agent/references/voice.md +7 -1
  13. package/skills/pikku-architect/SKILL.md +2 -2
  14. package/skills/pikku-architect/references/plan-defects.md +9 -7
  15. package/skills/pikku-auth/SKILL.md +15 -36
  16. package/skills/pikku-auth/references/better-auth.md +106 -133
  17. package/skills/pikku-auth/references/jose.md +6 -0
  18. package/skills/pikku-auth/references/machine-auth.md +6 -0
  19. package/skills/pikku-auth/references/sessions.md +6 -0
  20. package/skills/pikku-build/SKILL.md +37 -34
  21. package/skills/pikku-build/references/app.md +113 -99
  22. package/skills/pikku-build/references/design.md +43 -31
  23. package/skills/pikku-build/references/feature.md +17 -3
  24. package/skills/pikku-build/references/mocks.md +29 -0
  25. package/skills/pikku-build/references/multi-app.md +25 -18
  26. package/skills/pikku-build/references/native-app.md +9 -0
  27. package/skills/pikku-build/references/openapi.md +41 -34
  28. package/skills/pikku-build/references/platform.md +23 -14
  29. package/skills/pikku-build/references/post-clone.md +1 -1
  30. package/skills/pikku-build/references/quick.md +76 -39
  31. package/skills/pikku-build/references/scenarios.md +28 -16
  32. package/skills/pikku-build/references/ship.md +19 -16
  33. package/skills/pikku-build/references/theming.md +76 -127
  34. package/skills/pikku-changes/SKILL.md +7 -10
  35. package/skills/pikku-concepts/SKILL.md +34 -44
  36. package/skills/pikku-concepts/references/concept-mapping.md +18 -0
  37. package/skills/pikku-concepts/references/language.md +6 -6
  38. package/skills/pikku-convert-screen/SKILL.md +45 -0
  39. package/skills/pikku-deploy/references/cloudflare.md +8 -0
  40. package/skills/pikku-deploy/references/lambda.md +8 -0
  41. package/skills/pikku-deploy/references/nextjs.md +1 -1
  42. package/skills/pikku-deploy/references/uws.md +1 -1
  43. package/skills/pikku-deploy/references/ws.md +3 -3
  44. package/skills/pikku-emails/SKILL.md +3 -9
  45. package/skills/pikku-guide/SKILL.md +28 -27
  46. package/skills/pikku-i18n/SKILL.md +7 -7
  47. package/skills/pikku-i18n/references/enum-labels.md +9 -0
  48. package/skills/pikku-i18n/references/messages.md +21 -9
  49. package/skills/pikku-i18n/references/rtl.md +18 -38
  50. package/skills/pikku-knowledge/SKILL.md +12 -13
  51. package/skills/pikku-kysely/SKILL.md +3 -21
  52. package/skills/pikku-list-query/SKILL.md +2 -2
  53. package/skills/pikku-meta/references/audit.md +10 -1
  54. package/skills/pikku-meta/references/meta.md +6 -0
  55. package/skills/pikku-meta/references/versioning.md +10 -0
  56. package/skills/pikku-middleware/SKILL.md +7 -16
  57. package/skills/pikku-n8n-import/SKILL.md +9 -1
  58. package/skills/pikku-n8n-import/references/addon-mapping.md +6 -0
  59. package/skills/pikku-n8n-import/references/code-translation.md +7 -0
  60. package/skills/pikku-permissions/SKILL.md +41 -10
  61. package/skills/pikku-permissions/references/scopes.md +59 -0
  62. package/skills/pikku-react/SKILL.md +20 -22
  63. package/skills/pikku-react/references/client.md +2 -70
  64. package/skills/pikku-react/references/react-query.md +11 -0
  65. package/skills/pikku-react/references/workflows.md +11 -0
  66. package/skills/pikku-realtime/SKILL.md +9 -3
  67. package/skills/pikku-report/SKILL.md +17 -16
  68. package/skills/pikku-scenario/SKILL.md +72 -81
  69. package/skills/pikku-scenario/references/browser.md +5 -5
  70. package/skills/pikku-scenario/references/coverage.md +4 -4
  71. package/skills/pikku-scenario/references/steps.md +31 -30
  72. package/skills/pikku-scenario/references/{persona-run.md → virtual-user-run.md} +47 -42
  73. package/skills/pikku-scenario/references/virtual-users.md +114 -0
  74. package/skills/pikku-seo/SKILL.md +12 -16
  75. package/skills/pikku-service-backends/SKILL.md +0 -10
  76. package/skills/pikku-service-backends/references/aws.md +6 -0
  77. package/skills/pikku-service-backends/references/mongodb.md +7 -0
  78. package/skills/pikku-service-backends/references/redis.md +6 -0
  79. package/skills/pikku-services/references/audit-wire-service.md +2 -2
  80. package/skills/pikku-services/references/audit.md +10 -1
  81. package/skills/pikku-services/references/config.md +6 -0
  82. package/skills/pikku-services/references/services.md +9 -2
  83. package/skills/pikku-software-archaeology/SKILL.md +21 -27
  84. package/skills/pikku-software-archaeology/references/blueprint.schema.json +16 -16
  85. package/skills/pikku-software-archaeology/references/pikku-mapping.md +3 -3
  86. package/skills/pikku-software-archaeology/references/second-opinion.md +13 -1
  87. package/skills/pikku-tailwind/SKILL.md +111 -0
  88. package/skills/pikku-theme/SKILL.md +187 -0
  89. package/skills/pikku-theme/references/from-a-reference.md +44 -0
  90. package/skills/pikku-theme/references/presets.md +40 -0
  91. package/skills/pikku-ui/SKILL.md +41 -0
  92. package/skills/pikku-wiring/SKILL.md +13 -12
  93. package/skills/pikku-wiring/references/channel.md +7 -1
  94. package/skills/pikku-wiring/references/cli.md +7 -1
  95. package/skills/pikku-wiring/references/gateway-slack.md +6 -0
  96. package/skills/pikku-wiring/references/http.md +10 -3
  97. package/skills/pikku-wiring/references/mcp.md +8 -0
  98. package/skills/pikku-wiring/references/queue.md +6 -0
  99. package/skills/pikku-wiring/references/realtime.md +34 -4
  100. package/skills/pikku-wiring/references/rpc.md +6 -0
  101. package/skills/pikku-wiring/references/scheduler.md +6 -0
  102. package/skills/pikku-wiring/references/trigger.md +8 -0
  103. package/skills/pikku-workflow/SKILL.md +9 -7
  104. package/skills/pikku-admin-to-fabric/SKILL.md +0 -212
  105. package/skills/pikku-auth/references/permissions.md +0 -261
  106. package/skills/pikku-blueprint-to-fabric/SKILL.md +0 -377
  107. package/skills/pikku-blueprint-to-fabric/scripts/inventory.mjs +0 -367
  108. package/skills/pikku-fabric/SKILL.md +0 -619
  109. package/skills/pikku-fabric/references/debugging.md +0 -110
  110. package/skills/pikku-mantine/SKILL.md +0 -80
  111. package/skills/pikku-scenario/references/personas.md +0 -117
  112. package/skills/pikku-wiring/references/realtime-other-routes.md +0 -23
@@ -1,23 +1,45 @@
1
1
  # Build a product on open-source Pikku
2
2
 
3
+ ## Contents
4
+
5
+ - Agent Operating Procedure
6
+ - 0. Bootstrap, before anything else
7
+ - 1. One more round of questions — then stop asking
8
+ - 1a. Three languages, and you must not collapse them
9
+ - PHASE 1 — What the app is
10
+ - 2. Write the knowledge graph — before any code
11
+ - PHASE 2 — Who it is for, and what it is made of
12
+ - 3. Declare the people — virtual users and roles
13
+ - 4. Declare the apps — one API, several frontends
14
+ - PHASE 3 — The plan
15
+ - 5. File the work as changes
16
+ - 5a. The technical plan — per changeset, before you build it
17
+ - PHASE 4 — Build
18
+ - 6. Build each changeset
19
+ - 6a. Close the changeset against its plan, not against your memory
20
+ - 7. Prove it — scenarios
21
+ - 8. Make it look like someone designed it
22
+ - 9. Ship it, and stay deploy-ready
23
+ - Reference
24
+
3
25
  You have a scaffolded project with skills installed. This skill owns everything
4
- from here: no Fabric account, no card, no hosted build — while keeping the
5
- project shaped so `pikku fabric init` later adopts it with zero rework.
26
+ from here: no hosted account, no card, no hosted build — while keeping the
27
+ project shaped so a hosting platform can adopt it later with zero rework.
6
28
 
7
29
  **Four phases, and you do not skip ahead:**
8
30
 
9
31
  1. Write the knowledge graph — what the app IS, before any code
10
- 2. Declare the people and the apps — personas, roles, frontends
32
+ 2. Declare the people and the apps — virtual users, roles, frontends
11
33
  3. File the work as changes — grouped into changesets, in dependency order
12
34
  4. Build them one changeset at a time — each proven by a scenario before it merges
13
35
 
14
36
  The sections below follow those phases in order, and are meant to be worked
15
37
  through rather than searched: §0 bootstrap, §1-§1a the last questions and the
16
- three languages, §2 the knowledge graph, §3-§4 personas and apps, §5-§5a the
38
+ three languages, §2 the knowledge graph, §3-§4 virtual users and apps, §5-§5a the
17
39
  changes and each changeset's technical plan, §6-§6a building and closing one,
18
- §7-§7a proving it, §8 design, §9 ship. Four of them hand off to their own file —
19
- [scenarios.md](scenarios.md), [design.md](design.md),
20
- [multi-app.md](multi-app.md) and [ship.md](ship.md) — at the point you need it.
40
+ §7-§7a proving it, §8 design, §9 ship. Four of them have their own reference —
41
+ scenarios, design, multi-app and ship, each listed in SKILL.md — to read at the
42
+ point you need it.
21
43
 
22
44
  ## Agent Operating Procedure
23
45
 
@@ -46,7 +68,7 @@ One command, run once, now — not later when you start building. It wires the
46
68
  `#pikku` import alias the generated code depends on. On a fresh scaffold `.pikku/`
47
69
  is empty, so **every command that touches codegen fails until this has run** —
48
70
  including ones you would reasonably reach for while still planning, like
49
- `pikku persona list`. Those failures look alarming (`Cannot find module
71
+ `pikku virtual-user list`. Those failures look alarming (`Cannot find module
50
72
  '#pikku/workflow/pikku-workflow-types.gen.js'`, `Schema generation failed for 16
51
73
  schemas`) and they are nothing but this missing step.
52
74
 
@@ -59,7 +81,7 @@ Ask **three to five** questions that actually change the schema or the screens,
59
81
  in one message. Then stop; do not interview the user.
60
82
 
61
83
  - **Who uses it — who are the distinct kinds of people?** Ask this however small
62
- the app is. The answer becomes §3's personas and roles, and you build only the
84
+ the app is. The answer becomes §3's virtual users and roles, and you build only the
63
85
  roles they name.
64
86
  - **What are the two or three core objects?**
65
87
  - **What is the main thing someone does on their first visit?** This answer
@@ -74,10 +96,10 @@ in one message. Then stop; do not interview the user.
74
96
  their own design agent/prompt, whose output you take as the direction.
75
97
  - **Do they want to see the screens before you build them?** Offer it here, in
76
98
  this same round, with yes marked recommended, in the words of
77
- `references/design.md` — "a picture of the main screens so you can say 'yes,
99
+ the design reference (see SKILL.md) — "a picture of the main screens so you can say 'yes,
78
100
  like that' or 'no, move this'", never "mock" or "wireframe". Behind it is one
79
101
  HTML page mocking the main screens, a few minutes of work. On a yes, or no
80
- answer at all, `references/design.md` owns what to make and what it then binds — the
102
+ answer at all, the design reference (see SKILL.md) owns what to make and what it then binds — the
81
103
  approved page becomes source of truth for the screens, and the theme is written
82
104
  before it so what they approve is what ships. Only an explicit no skips it.
83
105
  - **May I write test records into the system it talks to?** Ask only when the
@@ -99,11 +121,11 @@ A brief saying "the entire UI is German" is about **one** of these. Getting this
99
121
  wrong has already shipped a project that can never add a second language, so
100
122
  settle all three explicitly before you write code.
101
123
 
102
- | Axis | What it covers | Where it goes |
103
- | --------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
104
- | **Identifiers** | Function, component, type, variable and file names. Database tables and columns. Commit messages. | Nowhere — **always English**, no setting, not negotiable |
105
- | **Meta** | `description` on functions and steps, `name`/`title` on features and scenarios, step `template`, role and persona descriptions | `metaLocale` in `pikku.config.json`, default `en` |
106
- | **Product UI** | Every string the app shows a user | `messages/<locale>.json`, and `defaultLocale` for what a first-time visitor opens in |
124
+ | Axis | What it covers | Where it goes |
125
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
126
+ | **Identifiers** | Function, component, type, variable and file names. Database tables and columns. Commit messages. | Nowhere — **always English**, no setting, not negotiable |
127
+ | **Meta** | `description` on functions and steps, `name`/`title` on features and scenarios, step `template`, role and virtual user descriptions | `metaLocale` in `pikku.config.json`, default `en` |
128
+ | **Product UI** | Every string the app shows a user | `messages/<locale>.json`, and `defaultLocale` for what a first-time visitor opens in |
107
129
 
108
130
  **Identifiers are English.** The product's market does not change this and
109
131
  neither does `metaLocale`. Identifiers are the surface the generated `#pikku/*`
@@ -138,7 +160,7 @@ A German medical portal, correctly:
138
160
  ```jsonc
139
161
  // project.inlang/settings.json
140
162
  { "baseLocale": "en", "locales": ["en", "de"] }
141
- // apps/app/src/i18n/active.json (or: fabric i18n --default-locale de)
163
+ // apps/app/src/i18n/active.json
142
164
  { "defaultLocale": "de" }
143
165
  // pikku.config.json
144
166
  { "metaLocale": "de" }
@@ -206,14 +228,14 @@ bunx --bun pikku knowledge validate
206
228
 
207
229
  ## PHASE 2 — Who it is for, and what it is made of
208
230
 
209
- ## 3. Declare the people — personas and roles
231
+ ## 3. Declare the people — virtual users and roles
210
232
 
211
233
  The answer to "who uses it" becomes code, in one file:
212
- `packages/functions/src/personas.ts`. It ships with a single `visitor`; add the
234
+ `packages/functions/src/virtual-users.ts`. It ships with a single `visitor`; add the
213
235
  people the user named, and the roles they imply.
214
236
 
215
237
  ```typescript
216
- import { definePersonas } from '#pikku/scopes/pikku-personas.gen.js'
238
+ import { defineVirtualUsers } from '#pikku/scopes/pikku-virtual-users.gen.js'
217
239
  import { defineSystemRole } from '#pikku/scopes'
218
240
 
219
241
  defineSystemRole({
@@ -229,7 +251,7 @@ defineSystemRole({
229
251
  },
230
252
  })
231
253
 
232
- definePersonas({
254
+ defineVirtualUsers({
233
255
  visitor: {
234
256
  name: 'Visitor',
235
257
  jobTitle: 'Synthetic health-check user',
@@ -260,18 +282,18 @@ definePersonas({
260
282
  })
261
283
  ```
262
284
 
263
- - **Keep `visitor`.** The shipped scenarios name `actors.visitor`, and PKU677
264
- requires a browser step's actor to be a literal `actors.<name>`. Removing it
265
- stops `actors.visitor` type-checking, which fails `pikku all`, and nothing you
285
+ - **Keep `visitor`.** The shipped scenarios name `virtualUsers.visitor`, and PKU677
286
+ requires a browser step's virtual user to be a literal `virtualUsers.<name>`. Removing it
287
+ stops `virtualUsers.visitor` type-checking, which fails `pikku all`, and nothing you
266
288
  write after that registers.
267
- - **One `definePersonas` call for the whole project.** Codegen builds the
268
- `PersonaId` union from it, materialises one scenario actor per person, and
289
+ - **One `defineVirtualUsers` call for the whole project.** Codegen builds the
290
+ `VirtualUserId` union from it, materialises one scenario virtual user per person, and
269
291
  seeds a user row each. A second call site is a second answer to "who uses this
270
292
  app".
271
293
  - **`roles` is typechecked against `defineSystemRole`.** An undeclared role is a
272
294
  build error rather than a runtime surprise.
273
- - **Never write an email address.** Each is derived from the persona id and
274
- `scenarios.emailDomain` in `pikku.config.json` — `visitor@actors.local`.
295
+ - **Never write an email address.** Each is derived from the virtual user id and
296
+ `scenarios.emailDomain` in `pikku.config.json` — `visitor@virtualuser.local`.
275
297
  Hand-writing one is how a run signs in as somebody who was never created.
276
298
  - **Declare a second person of the same kind** whenever the rule is ownership
277
299
  (`bilal` above). "You see yours, not theirs" is not testable with one owner,
@@ -283,14 +305,14 @@ definePersonas({
283
305
  in the function's `permissions` field (§6), never in the body. Read the
284
306
  `pikku-auth` skill.
285
307
 
286
- `pikku persona list` shows who is declared and `pikku roles audit` reports roles
308
+ `pikku virtual-user list` shows who is declared and `pikku roles audit` reports roles
287
309
  the database still holds that code no longer declares — both need §0's bootstrap
288
310
  to have run, and both are worth a look once it has.
289
311
 
290
312
  **One warning about the scaffold's own notes:** `knowledge/index.md` may claim
291
- the people live in `pikku.config.json`, put there by a persona command.
292
- That is stale. In this template they live in `personas.ts` as above, and
293
- `pikku.config.json` carries no personas key at all — only `scenarios.emailDomain`.
313
+ the people live in `pikku.config.json`, put there by a virtual user command.
314
+ That is stale. In this template they live in `virtual-users.ts` as above, and
315
+ `pikku.config.json` carries no virtual users key at all — only `scenarios.emailDomain`.
294
316
  Trust the file you can read over the note describing it.
295
317
 
296
318
  ## 4. Declare the apps — one API, several frontends
@@ -328,7 +350,7 @@ Recording the decision is Phase 2 work. **Creating the directory is not.**
328
350
  Cloning `apps/app` materialises a folder of copied screens, so it belongs to the
329
351
  changeset that first needs the second app, not to planning.
330
352
 
331
- When you get there, read `references/multi-app.md`. It carries the clone, the
353
+ When you get there, read the multi-app reference (see SKILL.md). It carries the clone, the
332
354
  `package.json` edits, the `frontends` map in `pikku.config.json`, the dev-runner
333
355
  change that otherwise silently never starts your second app, the per-frontend
334
356
  scenario environments, and how sessions behave across two origins.
@@ -352,7 +374,7 @@ What a change is:
352
374
  - **One commit's worth.** "The owner sees this month's arrears" is a change,
353
375
  or a few. "Add the database schema" is not; it is a step inside one.
354
376
  - **It ends in something a person can do**, in a browser, signed in as a named
355
- persona. If you cannot say what they see when it is done, that is a
377
+ virtual user. If you cannot say what they see when it is done, that is a
356
378
  `questions/` note, not a change.
357
379
 
358
380
  If §1's screen mock was made — approved, or drawn because nobody answered —
@@ -432,7 +454,7 @@ while the plan is short.
432
454
  configuration and belongs in a migration, not here.
433
455
  Do this generously and do it now: an empty app demos badly and critiques
434
456
  badly, and you cannot judge a screen's hierarchy, overflow, or truncation
435
- against zero rows. Seed rows each persona sees differently — with an ownership
457
+ against zero rows. Seed rows each virtual user sees differently — with an ownership
436
458
  rule that means seeding rows for the _second_ owner too.
437
459
  3. **Functions.** One `pikkuFunc` per `*.function.ts`. Mark it `expose: true` and
438
460
  Pikku generates the typed RPC client and the React Query hooks the UI calls;
@@ -449,7 +471,7 @@ while the plan is short.
449
471
  every screen is `Card` + `Stack` + `Text` composed the inventory rather than a
450
472
  design. Register the screen in `useNavItems()` — that one file feeds both the
451
473
  desktop sidebar and the phone navigation.
452
- **Read `references/design.md` before you write the first screen.** You commit
474
+ **Read the design reference (see SKILL.md) before you write the first screen.** You commit
453
475
  to a design direction there and are then accountable to it — it hands you no
454
476
  layouts, because the design is yours to make. What you build here is then
455
477
  judged at step 7, at the end of this changeset rather than once at §8, where
@@ -458,7 +480,7 @@ while the plan is short.
458
480
  7. **Look at it.** Screenshot every screen this changeset touched, at both
459
481
  widths, with the seed in place, and look at the images. This is a gate, the
460
482
  same as the scenario: a changeset whose screens nobody has seen is not built,
461
- it is unproven at the one layer scenarios cannot reach. `references/design.md`
483
+ it is unproven at the one layer scenarios cannot reach. the design reference
462
484
  carries how to take the shot when no browser tool is wired up, and what to
463
485
  look for. Then close it against its plan (§6a) — `pikku knowledge plan
464
486
  progress` has to exit zero before the last change is done — and only then
@@ -515,28 +537,26 @@ Rules that are not optional:
515
537
  tables. A domain table with one of those names — a class _session_, a drop-in
516
538
  _session_ — collides in the migration. Name it for the domain instead
517
539
  (`evening`, `class_meeting`) and keep the word in the UI copy.
518
- - The template's `/` redirects to `/app`, so the login screen — and its "Sign in
519
- as …" switcher — is what a signed-out visitor sees first. Replace `/` with a
520
- public homepage and that stops being true: mount `<DevActorSwitcher />` in the
521
- public layout as well, or a reviewer lands on a site with no way in.
540
+ - The template's `/` redirects to `/app`, so the login screen is what a
541
+ signed-out visitor sees first. Replace `/` with a public homepage and a
542
+ reviewer lands on a site with no way in: link it to the login screen.
522
543
 
523
- Before the first run, make sure `.env` at the project root holds the two
524
- secrets the local stack needs. `bun run dev` appends whichever is missing, but
525
- check anyway — a project scaffolded from an older template, or a `.env` copied
526
- in from elsewhere, can lack one, and neither failure names the variable:
544
+ Before the first run, make sure `.env` at the project root holds the secret
545
+ the local stack needs. `bun run dev` appends it if missing, but check anyway —
546
+ a project scaffolded from an older template, or a `.env` copied in from
547
+ elsewhere, can lack it, and the failure does not name the variable:
527
548
 
528
549
  - `BETTER_AUTH_SECRET` — without it the first sign-up is a 500.
529
- - `SCENARIO_ACTOR_SECRET` — without it `/api/auth/sign-in/actor` is disabled:
530
- every scenario fails at sign-in before its first step, and the "Sign in as …"
531
- switcher renders nothing.
550
+
551
+ Virtual user sign-in needs nothing in `.env`: `pikku dev` creates its own key
552
+ pair and hands the app the public half.
532
553
 
533
554
  ```sh
534
555
  grep -q '^BETTER_AUTH_SECRET=' .env 2>/dev/null || echo "BETTER_AUTH_SECRET=$(openssl rand -base64 32)" >> .env
535
- grep -q '^SCENARIO_ACTOR_SECRET=' .env 2>/dev/null || echo "SCENARIO_ACTOR_SECRET=$(openssl rand -base64 32)" >> .env
536
556
  ```
537
557
 
538
558
  `.env` is gitignored and local only — never commit it. A deployed stage gets its
539
- secrets from the platform (`pikku fabric secrets`), not from this file.
559
+ secrets from the hosting platform, not from this file.
540
560
 
541
561
  Then run it:
542
562
 
@@ -549,13 +569,10 @@ frontend running against a dead API looks exactly like an app bug, so if every
549
569
  request fails, check that both halves came up.
550
570
 
551
571
  **Start the stack through `bun run dev`, not by launching `vite` or `pikku dev`
552
- yourself.** The "Sign in as …" switcher asks the API for its personas at
553
- runtime, so the frontend needs nothing baked in — but it does need to reach
554
- _your_ API. If you start the frontend on its own (say :3000 is taken by another
555
- project), point `VITE_API_PROXY` at your API: the dev proxy defaults to
556
- `http://localhost:3000`, so beside another project's server the switcher lists
557
- _its_ personas, or none, which reads like a missing switcher rather than the
558
- wrong server.
572
+ yourself.** The frontend needs to reach _your_ API. If you start the
573
+ frontend on its own (say :3000 is taken by another project), point
574
+ `VITE_API_PROXY` at your API: the dev proxy defaults to `http://localhost:3000`,
575
+ so beside another project's server every request goes to the wrong API.
559
576
 
560
577
  The `--bun` in `bunx --bun pikku …` is load-bearing — keep it. Without it the
561
578
  CLI's `#!/usr/bin/env node` shebang hands the process to whatever Node is on
@@ -639,20 +656,20 @@ only when there is nothing to hang a check on.
639
656
 
640
657
  ## 7. Prove it — scenarios
641
658
 
642
- A scenario is a user journey run as one of your personas, over the real
643
- transport, with that persona's session. It is the only kind of test worth writing
659
+ A scenario is a user journey run as one of your virtual users, over the real
660
+ transport, with that virtual user's session. It is the only kind of test worth writing
644
661
  here, because a passing one proves the app works the way a signed-in person
645
662
  experiences it. Three ship in `packages/functions/test/scenarios/` — keep them
646
663
  green — and every scenario a changeset's plan names becomes one more.
647
664
 
648
- **Read [scenarios.md](scenarios.md) before writing the changeset's scenarios,
665
+ **Read the scenarios reference (see SKILL.md) before writing the changeset's scenarios,
649
666
  and again whenever one of these describes what you are doing.** It is the file
650
667
  where the expensive lessons live, and most of them produce a GREEN suite that
651
668
  proves nothing:
652
669
 
653
670
  - the shape of a scenario, and `do` vs `given`/`when`/`then`
654
671
  - what survives DSL extraction — a `then` in `return` position asserts nothing,
655
- and a shared setup helper credits its steps to the wrong actor
672
+ and a shared setup helper credits its steps to the wrong virtual user
656
673
  - what to assert — refusals must read the REASON, totals must be deltas, and the
657
674
  assertion nobody writes is the row count
658
675
  - living without a state reset: the suite must be green on its SECOND run
@@ -666,7 +683,7 @@ bunx --bun pikku scenario run local --spawn # server-side, the
666
683
  bunx --bun pikku scenario run local --spawn --run browser # the same journeys, driven as a human
667
684
  ```
668
685
 
669
- In a multi-app project that one run covers both frontends: each persona carries
686
+ In a multi-app project that one run covers both frontends: each virtual user carries
670
687
  its own `app` and `@pikku/playwright` resolves the base url from the
671
688
  environment's `appUrls` map, so there is no second environment to run.
672
689
 
@@ -701,13 +718,13 @@ webhook or a hand call leaves no trace in it. Read
701
718
  `coverage/scenario-coverage.json` **as each changeset closes** — per changeset it is a short list you can act on, whereas read for the
702
719
  first time after ten changesets it is a wall of red nobody triages. Every gap is
703
720
  a missing scenario, a function that should not exist, or a deferral worth
704
- writing down; [scenarios.md](scenarios.md) says how to tell them apart. Report
721
+ writing down; the scenarios reference (see SKILL.md) says how to tell them apart. Report
705
722
  the number when you hand the changeset over.
706
723
 
707
724
  ## 8. Make it look like someone designed it
708
725
 
709
726
  **This section numbers 8, but half of it has already happened.** Read
710
- `references/design.md` before the first screen is built — a design pass run on
727
+ the design reference (see SKILL.md) before the first screen is built — a design pass run on
711
728
  eight changesets of scaffolded screens is a repaint, and it shows. What is left
712
729
  here at §8 is the theme you may have deferred and the critique you cannot run
713
730
  until there are screens to critique.
@@ -716,11 +733,11 @@ Three separate jobs, and conflating them is why open-source builds come out
716
733
  looking like the template:
717
734
 
718
735
  - **Direction** — deciding what it should look like. **No open-source tool does
719
- this.** Fabric has `fabric-theme`; you have §1's answer and 8a below.
736
+ this.** A hosting platform may offer one; you have §1's answer and 8a below.
720
737
  - **Execution** — whether the screens actually realise that direction, or
721
738
  default to whatever component was nearest. No theme does this, and it is where
722
739
  "works but looks like nobody decided anything" comes from.
723
- `references/design.md` carries the process for it, and it belongs at §6, per
740
+ the design reference (see SKILL.md) carries the process for it, and it belongs at §6, per
724
741
  screen.
725
742
  - **Critique** — judging how well the built screens execute the direction.
726
743
  `impeccable` does this well, and it is free.
@@ -732,10 +749,8 @@ spacing.
732
749
 
733
750
  ### 8a. Author the theme — the step nothing does for you
734
751
 
735
- The look lives in `packages/mantine-theme`, and it is data, not code:
736
-
737
- The look lives in `packages/mantine-theme`, and it is data, not code — one JSON
738
- per theme, `active.json` naming the live one. **Read `references/theming.md`** for
752
+ The look lives in `packages/theme`, and it is data, not code — one JSON
753
+ per theme, `active.json` naming the live one. **Read the theming reference (see SKILL.md)** for
739
754
  the file layout, what each field changes, and how to turn a direction in words
740
755
  into a theme.
741
756
 
@@ -757,26 +772,25 @@ theme is; only the note records why.
757
772
 
758
773
  ### 8b. Compose real components, then critique
759
774
 
760
- **`references/design.md` is where design actually lives** — committing to a
775
+ **The design reference (see SKILL.md) is where design actually lives** — committing to a
761
776
  direction before the first screen, judging the result from screenshots rather
762
777
  than from source, the two screens that get skipped, and why you reset the dev
763
778
  database before judging anything. It prescribes no layouts on purpose: two apps
764
779
  built from this skill should not look like each other. What follows here is only
765
780
  the component inventory.
766
781
 
767
- **Compose with Mantine's rich components — not tables and text everywhere:**
782
+ **Compose with rich components — not tables and text everywhere:**
768
783
 
769
- - **`@mantine/charts`** (Recharts underneath) for overviews — `AreaChart`,
770
- `BarChart`, `LineChart`, `DonutChart`, `Sparkline`. A metric worth showing is
771
- worth a chart, not a number in a `Text`.
772
- - **`@mantine/dates`** for anything time-based — `DatePicker`, `Calendar`,
773
- `DateTimePicker`, range inputs. Never hand-roll a date field.
774
- - Composed layouts over flat lists — `Timeline` for history, `Stepper` for
775
- multi-step progress, `Card` + `SimpleGrid` for a gallery, `RingProgress` for
776
- completion, `Badge`/`ThemeIcon` for status.
784
+ - **shadcn `chart`** (Recharts underneath, coloured by `--chart-1` to `--chart-5`) for overviews — area,
785
+ bar, line and pie charts. A metric worth showing is
786
+ worth a chart, not a number in a paragraph.
787
+ - **shadcn `calendar` and `date-picker`** for anything time-based, including
788
+ range inputs. Never hand-roll a date field.
789
+ - Composed layouts over flat lists — a timeline for history, steps for
790
+ multi-step progress, `Card` + a CSS grid for a gallery, `Progress` for
791
+ completion, `Badge` for status.
777
792
 
778
- Both ship in the template's app dependencies. Look each one up in the Mantine
779
- llms.txt and use the real component.
793
+ Add each one with the shadcn CLI and use the real component.
780
794
 
781
795
  Then critique it. Free, and works across coding agents:
782
796
 
@@ -795,13 +809,13 @@ Judging your own UI from source code is guessing.
795
809
  **Screenshot at a phone width too (≈390px), not just desktop, and critique
796
810
  those.** A layout that is fine at 1440px routinely breaks at 390 — a table that
797
811
  overflows, a row of buttons that wraps into a pile, text jammed against the edge,
798
- a modal taller than the viewport. Mantine gives you the tools (responsive `Grid`,
799
- `visibleFrom` / `hiddenFrom`, `Stack` instead of `Group` at small sizes); use
812
+ a modal taller than the viewport. Tailwind gives you the tools (responsive `grid-cols-*`,
813
+ `md:hidden` / `hidden md:block`, `flex-col` instead of `flex-row` at small sizes); use
800
814
  them. The template already mounts a phone navigation per `AGENTS.md` — pick
801
815
  `MobileTabBar` or `MobileNavDrawer` deliberately per app, never both.
802
816
 
803
817
  The gate: **no P0 findings left on any screen, in any app, at either width**,
804
- and every screen honestly answers the questions in `references/design.md` —
818
+ and every screen honestly answers the questions in the design reference —
805
819
  including whether it looks like the direction you committed to or like the
806
820
  components you had. Don't silence a finding by deleting the feature it is
807
821
  about.
@@ -812,13 +826,13 @@ seven copies deep. Run `pikku db reset` and restart the dev server before you
812
826
  screenshot anything — a screen judged against that data gets designed for a
813
827
  problem it does not have.
814
828
 
815
- ## 9. Ship it, and stay Fabric-ready
829
+ ## 9. Ship it, and stay deploy-ready
816
830
 
817
831
  When the queue is empty, `pikku knowledge gaps` lists nothing and the scenarios are green, read
818
- `references/ship.md`. It carries the open-source deploy paths (`--provider
832
+ the ship reference (see SKILL.md). It carries the open-source deploy paths (`--provider
819
833
  standalone`, `cloudflare`, `aws`), how to serve several frontends behind one
820
- API, the pre-release gate to run, and the contract that keeps `pikku fabric init`
821
- a one-command import later rather than a migration.
834
+ API, the pre-release gate to run, and the contract that keeps the project
835
+ importable by a hosting platform later rather than a migration.
822
836
 
823
837
  The app is not handed over without its user guide. The scenarios you wrote are
824
838
  already its skeleton: read **pikku-guide**, write one page per audience citing
@@ -837,16 +851,16 @@ cheaper to honour than to retrofit:
837
851
 
838
852
  ## Reference
839
853
 
840
- Read these when the section that names them comes up, not up front:
854
+ Read these when the section that names them comes up, not up front. SKILL.md
855
+ says when to open each one:
841
856
 
842
- - [multi-app.md](multi-app.md) — adding a second frontend (§4), at the changeset
843
- that needs it
844
- - [scenarios.md](scenarios.md) — writing journeys that stay proven (§7, §7a)
845
- - `references/design.md` — committing to a design direction, and how to tell
846
- whether the screens realise it. Read BEFORE the first screen (§6), not at §8
847
- - `references/theming.md` — authoring the theme (§8a)
848
- - `references/ship.md` — deploying, and the Fabric-readiness contract (§9)
857
+ - multi-app — adding a second frontend (§4), at the changeset that needs it
858
+ - scenarios — writing journeys that stay proven (§7, §7a)
859
+ - design — committing to a design direction, and how to tell whether the
860
+ screens realise it. Read BEFORE the first screen (§6), not at §8
861
+ - theming — authoring the theme (§8a)
862
+ - ship — deploying, and the deploy-readiness contract (§9)
849
863
  - Sibling skills: `pikku-knowledge` (§2), `pikku-auth` (§3),
850
- `pikku-scenario` (§7, §7a), `pikku-deploy` and `pikku-fabric` (§9)
864
+ `pikku-scenario` (§7, §7a), and `pikku-deploy` (§9)
851
865
  - Project conventions written by the template: `AGENTS.md`
852
- - Doing less than this: [quick.md](quick.md). Doing more: [platform.md](platform.md).
866
+ - Doing less than this: the quick reference. Doing more: the platform reference (both in SKILL.md).