@pikku/skills 0.12.52 → 0.12.54
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/dist/skills.gen.js +2 -2
- package/package.json +1 -1
- package/skills/pikku-a11y/SKILL.md +22 -15
- package/skills/pikku-addon/SKILL.md +5 -5
- package/skills/pikku-addon/references/addon-package-manifest.md +7 -0
- package/skills/pikku-addon/references/openapi.md +11 -0
- package/skills/pikku-admin-to-fabric/SKILL.md +7 -21
- package/skills/pikku-agent/SKILL.md +6 -6
- package/skills/pikku-agent/references/agents.md +8 -1
- package/skills/pikku-agent/references/runner-vercel.md +2 -2
- package/skills/pikku-agent/references/voice.md +7 -1
- package/skills/pikku-architect/SKILL.md +1 -1
- package/skills/pikku-architect/references/plan-defects.md +2 -0
- package/skills/pikku-auth/SKILL.md +15 -36
- package/skills/pikku-auth/references/better-auth.md +22 -45
- package/skills/pikku-auth/references/jose.md +6 -0
- package/skills/pikku-auth/references/machine-auth.md +6 -0
- package/skills/pikku-auth/references/sessions.md +6 -0
- package/skills/pikku-blueprint-to-fabric/SKILL.md +6 -21
- package/skills/pikku-blueprint-to-fabric/scripts/inventory.mjs +1 -1
- package/skills/pikku-build/SKILL.md +29 -26
- package/skills/pikku-build/references/app.md +60 -41
- package/skills/pikku-build/references/design.md +31 -19
- package/skills/pikku-build/references/feature.md +14 -0
- package/skills/pikku-build/references/mocks.md +23 -0
- package/skills/pikku-build/references/multi-app.md +9 -2
- package/skills/pikku-build/references/native-app.md +9 -0
- package/skills/pikku-build/references/openapi.md +7 -0
- package/skills/pikku-build/references/platform.md +20 -10
- package/skills/pikku-build/references/quick.md +14 -4
- package/skills/pikku-build/references/scenarios.md +12 -1
- package/skills/pikku-build/references/ship.md +6 -1
- package/skills/pikku-build/references/theming.md +74 -125
- package/skills/pikku-changes/SKILL.md +6 -6
- package/skills/pikku-concepts/SKILL.md +8 -17
- package/skills/pikku-concepts/references/concept-mapping.md +18 -0
- package/skills/pikku-convert-screen/SKILL.md +45 -0
- package/skills/pikku-deploy/references/cloudflare.md +8 -0
- package/skills/pikku-deploy/references/lambda.md +8 -0
- package/skills/pikku-deploy/references/uws.md +1 -1
- package/skills/pikku-deploy/references/ws.md +3 -3
- package/skills/pikku-emails/SKILL.md +3 -9
- package/skills/pikku-fabric/SKILL.md +7 -295
- package/skills/pikku-fabric/references/database.md +128 -0
- package/skills/pikku-fabric/references/debugging.md +9 -5
- package/skills/pikku-fabric/references/deploy.md +179 -0
- package/skills/pikku-guide/SKILL.md +10 -10
- package/skills/pikku-i18n/SKILL.md +7 -7
- package/skills/pikku-i18n/references/enum-labels.md +9 -0
- package/skills/pikku-i18n/references/messages.md +16 -3
- package/skills/pikku-i18n/references/rtl.md +18 -38
- package/skills/pikku-knowledge/SKILL.md +9 -10
- package/skills/pikku-kysely/SKILL.md +3 -21
- package/skills/pikku-list-query/SKILL.md +2 -2
- package/skills/pikku-meta/references/audit.md +9 -0
- package/skills/pikku-meta/references/meta.md +6 -0
- package/skills/pikku-meta/references/versioning.md +10 -0
- package/skills/pikku-middleware/SKILL.md +7 -16
- package/skills/pikku-n8n-import/SKILL.md +9 -1
- package/skills/pikku-n8n-import/references/addon-mapping.md +6 -0
- package/skills/pikku-n8n-import/references/code-translation.md +7 -0
- package/skills/pikku-permissions/SKILL.md +41 -10
- package/skills/pikku-permissions/references/scopes.md +59 -0
- package/skills/pikku-react/SKILL.md +2 -2
- package/skills/pikku-react/references/client.md +1 -34
- package/skills/pikku-react/references/react-query.md +11 -0
- package/skills/pikku-react/references/workflows.md +11 -0
- package/skills/pikku-realtime/SKILL.md +9 -3
- package/skills/pikku-report/SKILL.md +10 -9
- package/skills/pikku-scenario/SKILL.md +11 -17
- package/skills/pikku-scenario/references/persona-run.md +11 -1
- package/skills/pikku-scenario/references/personas.md +7 -1
- package/skills/pikku-seo/SKILL.md +12 -16
- package/skills/pikku-service-backends/SKILL.md +0 -10
- package/skills/pikku-service-backends/references/aws.md +6 -0
- package/skills/pikku-service-backends/references/mongodb.md +7 -0
- package/skills/pikku-service-backends/references/redis.md +6 -0
- package/skills/pikku-services/references/audit.md +10 -0
- package/skills/pikku-services/references/config.md +6 -0
- package/skills/pikku-services/references/services.md +8 -1
- package/skills/pikku-software-archaeology/SKILL.md +9 -15
- package/skills/pikku-software-archaeology/references/blueprint.schema.json +7 -7
- package/skills/pikku-software-archaeology/references/pikku-mapping.md +3 -3
- package/skills/pikku-software-archaeology/references/second-opinion.md +13 -1
- package/skills/pikku-tailwind/SKILL.md +111 -0
- package/skills/pikku-theme/SKILL.md +187 -0
- package/skills/pikku-theme/references/from-a-reference.md +44 -0
- package/skills/pikku-theme/references/presets.md +40 -0
- package/skills/pikku-ui/SKILL.md +41 -0
- package/skills/pikku-wiring/SKILL.md +13 -12
- package/skills/pikku-wiring/references/channel.md +7 -1
- package/skills/pikku-wiring/references/cli.md +7 -1
- package/skills/pikku-wiring/references/gateway-slack.md +6 -0
- package/skills/pikku-wiring/references/http.md +10 -3
- package/skills/pikku-wiring/references/mcp.md +8 -0
- package/skills/pikku-wiring/references/queue.md +6 -0
- package/skills/pikku-wiring/references/realtime.md +34 -4
- package/skills/pikku-wiring/references/rpc.md +6 -0
- package/skills/pikku-wiring/references/scheduler.md +6 -0
- package/skills/pikku-wiring/references/trigger.md +8 -0
- package/skills/pikku-workflow/SKILL.md +8 -6
- package/skills/pikku-auth/references/permissions.md +0 -261
- package/skills/pikku-mantine/SKILL.md +0 -80
- package/skills/pikku-wiring/references/realtime-other-routes.md +0 -23
|
@@ -4,12 +4,14 @@ description: >-
|
|
|
4
4
|
Use to build on Pikku — turning a fresh scaffold into a working app (quick spike, real product,
|
|
5
5
|
or a showcase that exercises every surface), adding a feature to an app that already exists, and
|
|
6
6
|
the one-off cleanup right after a template is cloned. Covers the knowledge base, personas and
|
|
7
|
-
roles, filing the work as changes
|
|
8
|
-
deploying. TRIGGER when: the user asks for an app to be built on
|
|
9
|
-
project needs turning into a product, the user asks to add a feature
|
|
10
|
-
in a working app, or a template was just cloned or scaffolded. DO NOT
|
|
11
|
-
asks for a one-off edit to an existing function, asks about Pikku concepts
|
|
12
|
-
|
|
7
|
+
roles, filing the work as changes, the scenario that proves each one, theming, multi-app
|
|
8
|
+
layouts and deploying. TRIGGER when: the user asks for an app to be built on
|
|
9
|
+
Pikku, a freshly scaffolded project needs turning into a product, the user asks to add a feature
|
|
10
|
+
or wire up a new endpoint in a working app, or a template was just cloned or scaffolded. DO NOT
|
|
11
|
+
TRIGGER when: the user asks for a one-off edit to an existing function, asks about Pikku concepts
|
|
12
|
+
(use pikku-concepts), wants one specific surface explained rather than built (use that surface's
|
|
13
|
+
skill), only needs the technical plan for one claimed changeset (use pikku-architect), or is
|
|
14
|
+
working items off a deployed stage's changes queue (use pikku-changes).
|
|
13
15
|
allowed-tools: Bash(yarn pikku meta *), Bash(yarn pikku all *), Bash(yarn tsc), Bash(git status *), Bash(git diff *), Bash(git switch *), Bash(git checkout *), Bash(git checkout -b *), Bash(git add *), Bash(git commit *), Bash(git rm *), Bash(git mv *), Bash(git log *), Bash(git branch *), Bash(yarn pikku fabric report *), Bash(npx --no pikku fabric report *)
|
|
14
16
|
argument-hint: '[feature description]'
|
|
15
17
|
installGroups: [core]
|
|
@@ -30,29 +32,30 @@ agent:
|
|
|
30
32
|
|
|
31
33
|
## Which mode
|
|
32
34
|
|
|
33
|
-
| The situation
|
|
34
|
-
|
|
|
35
|
-
| A template was just cloned or scaffolded, and the tree still looks like one
|
|
36
|
-
| A real product, meant to be picked up by someone else
|
|
37
|
-
| A spike, a throwaway demo, an idea nobody has committed to
|
|
38
|
-
| A showcase meant to exercise every Pikku surface
|
|
39
|
-
| A feature added to an app that already has its knowledge base
|
|
35
|
+
| The situation | Read |
|
|
36
|
+
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
37
|
+
| A template was just cloned or scaffolded, and the tree still looks like one | `references/post-clone.md` first, then come back |
|
|
38
|
+
| A real product, meant to be picked up by someone else | `references/app.md` — the default |
|
|
39
|
+
| A spike, a throwaway demo, an idea nobody has committed to | `references/quick.md` |
|
|
40
|
+
| A showcase meant to exercise every Pikku surface | `references/platform.md`, read together with `references/app.md` |
|
|
41
|
+
| A feature added to an app that already has its knowledge base | `references/feature.md` |
|
|
42
|
+
| Writing or fixing the scenarios that prove a changeset (app §7, §7a) | `references/scenarios.md` |
|
|
43
|
+
| Before the first screen is built: a picture of the screens, a design direction | `references/design.md` |
|
|
44
|
+
| Authoring or changing the theme (app §8a) | `references/theming.md` |
|
|
45
|
+
| A screen needs data no function returns yet | `references/mocks.md` |
|
|
46
|
+
| Adding a second frontend (app §4), at the changeset that needs it | `references/multi-app.md` |
|
|
47
|
+
| Shipping an app as a desktop or Android app | `references/native-app.md` |
|
|
48
|
+
| Deploying, and the Fabric-readiness contract (app §9) | `references/ship.md` |
|
|
49
|
+
| The request is built on an OpenAPI spec (auth mode, sign-in or connect screen) | `references/openapi.md` |
|
|
40
50
|
|
|
41
51
|
**App is the default.** A small or toy-sounding app does not make it Quick;
|
|
42
52
|
only an explicit signal of speed or throwaway-ness does. Platform is not "App
|
|
43
|
-
plus more effort" — it is App plus a deliberate surface checklist
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
a picture of the screens first, committing to a design direction, and judging
|
|
50
|
-
whether the screens realise it — read before the first screen is built, not
|
|
51
|
-
after the last), `references/theming.md`
|
|
52
|
-
(authoring the theme),
|
|
53
|
-
`references/ship.md` (deploying, and the Fabric-readiness contract),
|
|
54
|
-
`references/openapi.md` (an app on an OpenAPI spec: the auth mode, the
|
|
55
|
-
auth-config format, and the sign-in or connect screen it implies).
|
|
53
|
+
plus more effort" — it is App plus a deliberate surface checklist: read both
|
|
54
|
+
files, follow the base in full, and do not blend the two into one plan.
|
|
55
|
+
|
|
56
|
+
Each reference names the topics it leans on but never tells you to open
|
|
57
|
+
another file; this table is the only routing. Open a reference when its row
|
|
58
|
+
matches, not up front.
|
|
56
59
|
|
|
57
60
|
## Bootstrap before anything else
|
|
58
61
|
|
|
@@ -1,5 +1,27 @@
|
|
|
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 — personas 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 Fabric-ready
|
|
23
|
+
- Reference
|
|
24
|
+
|
|
3
25
|
You have a scaffolded project with skills installed. This skill owns everything
|
|
4
26
|
from here: no Fabric account, no card, no hosted build — while keeping the
|
|
5
27
|
project shaped so `pikku fabric init` later adopts it with zero rework.
|
|
@@ -15,9 +37,9 @@ 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
38
|
three languages, §2 the knowledge graph, §3-§4 personas 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
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
|
@@ -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
|
-
|
|
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,
|
|
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
|
|
@@ -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
|
|
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.
|
|
@@ -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
|
|
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.
|
|
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
|
|
@@ -645,7 +667,7 @@ here, because a passing one proves the app works the way a signed-in person
|
|
|
645
667
|
experiences it. Three ship in `packages/functions/test/scenarios/` — keep them
|
|
646
668
|
green — and every scenario a changeset's plan names becomes one more.
|
|
647
669
|
|
|
648
|
-
**Read
|
|
670
|
+
**Read the scenarios reference (see SKILL.md) before writing the changeset's scenarios,
|
|
649
671
|
and again whenever one of these describes what you are doing.** It is the file
|
|
650
672
|
where the expensive lessons live, and most of them produce a GREEN suite that
|
|
651
673
|
proves nothing:
|
|
@@ -701,13 +723,13 @@ webhook or a hand call leaves no trace in it. Read
|
|
|
701
723
|
`coverage/scenario-coverage.json` **as each changeset closes** — per changeset it is a short list you can act on, whereas read for the
|
|
702
724
|
first time after ten changesets it is a wall of red nobody triages. Every gap is
|
|
703
725
|
a missing scenario, a function that should not exist, or a deferral worth
|
|
704
|
-
writing down;
|
|
726
|
+
writing down; the scenarios reference (see SKILL.md) says how to tell them apart. Report
|
|
705
727
|
the number when you hand the changeset over.
|
|
706
728
|
|
|
707
729
|
## 8. Make it look like someone designed it
|
|
708
730
|
|
|
709
731
|
**This section numbers 8, but half of it has already happened.** Read
|
|
710
|
-
|
|
732
|
+
the design reference (see SKILL.md) before the first screen is built — a design pass run on
|
|
711
733
|
eight changesets of scaffolded screens is a repaint, and it shows. What is left
|
|
712
734
|
here at §8 is the theme you may have deferred and the critique you cannot run
|
|
713
735
|
until there are screens to critique.
|
|
@@ -720,7 +742,7 @@ looking like the template:
|
|
|
720
742
|
- **Execution** — whether the screens actually realise that direction, or
|
|
721
743
|
default to whatever component was nearest. No theme does this, and it is where
|
|
722
744
|
"works but looks like nobody decided anything" comes from.
|
|
723
|
-
|
|
745
|
+
the design reference (see SKILL.md) carries the process for it, and it belongs at §6, per
|
|
724
746
|
screen.
|
|
725
747
|
- **Critique** — judging how well the built screens execute the direction.
|
|
726
748
|
`impeccable` does this well, and it is free.
|
|
@@ -732,10 +754,8 @@ spacing.
|
|
|
732
754
|
|
|
733
755
|
### 8a. Author the theme — the step nothing does for you
|
|
734
756
|
|
|
735
|
-
The look lives in `packages/
|
|
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
|
|
757
|
+
The look lives in `packages/theme`, and it is data, not code — one JSON
|
|
758
|
+
per theme, `active.json` naming the live one. **Read the theming reference (see SKILL.md)** for
|
|
739
759
|
the file layout, what each field changes, and how to turn a direction in words
|
|
740
760
|
into a theme.
|
|
741
761
|
|
|
@@ -757,26 +777,25 @@ theme is; only the note records why.
|
|
|
757
777
|
|
|
758
778
|
### 8b. Compose real components, then critique
|
|
759
779
|
|
|
760
|
-
|
|
780
|
+
**The design reference (see SKILL.md) is where design actually lives** — committing to a
|
|
761
781
|
direction before the first screen, judging the result from screenshots rather
|
|
762
782
|
than from source, the two screens that get skipped, and why you reset the dev
|
|
763
783
|
database before judging anything. It prescribes no layouts on purpose: two apps
|
|
764
784
|
built from this skill should not look like each other. What follows here is only
|
|
765
785
|
the component inventory.
|
|
766
786
|
|
|
767
|
-
**Compose with
|
|
787
|
+
**Compose with rich components — not tables and text everywhere:**
|
|
768
788
|
|
|
769
|
-
-
|
|
770
|
-
|
|
771
|
-
worth a chart, not a number in a
|
|
772
|
-
-
|
|
773
|
-
|
|
774
|
-
- Composed layouts over flat lists —
|
|
775
|
-
multi-step progress, `Card` +
|
|
776
|
-
completion, `Badge
|
|
789
|
+
- **shadcn `chart`** (Recharts underneath, coloured by `--chart-1` to `--chart-5`) for overviews — area,
|
|
790
|
+
bar, line and pie charts. A metric worth showing is
|
|
791
|
+
worth a chart, not a number in a paragraph.
|
|
792
|
+
- **shadcn `calendar` and `date-picker`** for anything time-based, including
|
|
793
|
+
range inputs. Never hand-roll a date field.
|
|
794
|
+
- Composed layouts over flat lists — a timeline for history, steps for
|
|
795
|
+
multi-step progress, `Card` + a CSS grid for a gallery, `Progress` for
|
|
796
|
+
completion, `Badge` for status.
|
|
777
797
|
|
|
778
|
-
|
|
779
|
-
llms.txt and use the real component.
|
|
798
|
+
Add each one with the shadcn CLI and use the real component.
|
|
780
799
|
|
|
781
800
|
Then critique it. Free, and works across coding agents:
|
|
782
801
|
|
|
@@ -795,13 +814,13 @@ Judging your own UI from source code is guessing.
|
|
|
795
814
|
**Screenshot at a phone width too (≈390px), not just desktop, and critique
|
|
796
815
|
those.** A layout that is fine at 1440px routinely breaks at 390 — a table that
|
|
797
816
|
overflows, a row of buttons that wraps into a pile, text jammed against the edge,
|
|
798
|
-
a modal taller than the viewport.
|
|
799
|
-
`
|
|
817
|
+
a modal taller than the viewport. Tailwind gives you the tools (responsive `grid-cols-*`,
|
|
818
|
+
`md:hidden` / `hidden md:block`, `flex-col` instead of `flex-row` at small sizes); use
|
|
800
819
|
them. The template already mounts a phone navigation per `AGENTS.md` — pick
|
|
801
820
|
`MobileTabBar` or `MobileNavDrawer` deliberately per app, never both.
|
|
802
821
|
|
|
803
822
|
The gate: **no P0 findings left on any screen, in any app, at either width**,
|
|
804
|
-
and every screen honestly answers the questions in
|
|
823
|
+
and every screen honestly answers the questions in the design reference —
|
|
805
824
|
including whether it looks like the direction you committed to or like the
|
|
806
825
|
components you had. Don't silence a finding by deleting the feature it is
|
|
807
826
|
about.
|
|
@@ -815,7 +834,7 @@ problem it does not have.
|
|
|
815
834
|
## 9. Ship it, and stay Fabric-ready
|
|
816
835
|
|
|
817
836
|
When the queue is empty, `pikku knowledge gaps` lists nothing and the scenarios are green, read
|
|
818
|
-
|
|
837
|
+
the ship reference (see SKILL.md). It carries the open-source deploy paths (`--provider
|
|
819
838
|
standalone`, `cloudflare`, `aws`), how to serve several frontends behind one
|
|
820
839
|
API, the pre-release gate to run, and the contract that keeps `pikku fabric init`
|
|
821
840
|
a one-command import later rather than a migration.
|
|
@@ -837,16 +856,16 @@ cheaper to honour than to retrofit:
|
|
|
837
856
|
|
|
838
857
|
## Reference
|
|
839
858
|
|
|
840
|
-
Read these when the section that names them comes up, not up front
|
|
859
|
+
Read these when the section that names them comes up, not up front. SKILL.md
|
|
860
|
+
says when to open each one:
|
|
841
861
|
|
|
842
|
-
-
|
|
843
|
-
|
|
844
|
-
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
-
|
|
848
|
-
- `references/ship.md` — deploying, and the Fabric-readiness contract (§9)
|
|
862
|
+
- multi-app — adding a second frontend (§4), at the changeset that needs it
|
|
863
|
+
- scenarios — writing journeys that stay proven (§7, §7a)
|
|
864
|
+
- design — committing to a design direction, and how to tell whether the
|
|
865
|
+
screens realise it. Read BEFORE the first screen (§6), not at §8
|
|
866
|
+
- theming — authoring the theme (§8a)
|
|
867
|
+
- ship — deploying, and the Fabric-readiness contract (§9)
|
|
849
868
|
- Sibling skills: `pikku-knowledge` (§2), `pikku-auth` (§3),
|
|
850
869
|
`pikku-scenario` (§7, §7a), `pikku-deploy` and `pikku-fabric` (§9)
|
|
851
870
|
- Project conventions written by the template: `AGENTS.md`
|
|
852
|
-
- Doing less than this:
|
|
871
|
+
- Doing less than this: the quick reference. Doing more: the platform reference (both in SKILL.md).
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Design
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Commit to a direction before the first screen
|
|
6
|
+
- Offer to draw the screens before you build them
|
|
7
|
+
- One screen, designed properly, before the rest exist
|
|
8
|
+
- Judge it — and don't grade your own homework
|
|
9
|
+
- The kit is a floor, not a ceiling
|
|
10
|
+
- Design is a gate on the changeset, not a phase at the end
|
|
11
|
+
- Facts, not taste
|
|
12
|
+
- Two screens that get skipped
|
|
13
|
+
- Symptoms of a screen nobody designed
|
|
14
|
+
|
|
3
15
|
Your job here is to design something worth the product — not to apply a house
|
|
4
16
|
style. **There is no house style, and this file is not one.** Two apps built from
|
|
5
17
|
this skill should not look like each other; if they do, something has gone wrong
|
|
@@ -23,7 +35,7 @@ never clinical" is a direction. "Clean and modern" is not — it rules nothing o
|
|
|
23
35
|
so it cannot be departed from.
|
|
24
36
|
|
|
25
37
|
Write it to `knowledge/decisions/design/`, then build the theme from it
|
|
26
|
-
(
|
|
38
|
+
(the theming reference, see SKILL.md). **From that point you are accountable to your own
|
|
27
39
|
direction, not to this file.** That is the whole mechanism: the freedom is real,
|
|
28
40
|
and so is the commitment.
|
|
29
41
|
|
|
@@ -36,9 +48,9 @@ Being ambitious is easier against a list of specific things to not be. Generated
|
|
|
36
48
|
interfaces cluster hard, and these are the attractors — not because any is ugly,
|
|
37
49
|
but because arriving at one *by default* means no choice was made:
|
|
38
50
|
|
|
39
|
-
- **Stock
|
|
51
|
+
- **Stock component-library defaults.** The strongest pull, and the hardest to see: a component
|
|
40
52
|
library's untouched defaults do not look broken, they look finished. Blue
|
|
41
|
-
accent,
|
|
53
|
+
accent, grey borders, one radius on everything, `Card` + stacked text
|
|
42
54
|
down every page. An app can be entirely this and never trip a critique, because
|
|
43
55
|
nothing on any screen is *wrong*.
|
|
44
56
|
- Warm cream ground with a serif display face and a terracotta accent.
|
|
@@ -71,29 +83,29 @@ screens costs a fraction of eight built screens, and it is the only point where
|
|
|
71
83
|
"that is not what I meant" is free.
|
|
72
84
|
|
|
73
85
|
**Author the theme first, then draw the mock from it.** This order is the whole
|
|
74
|
-
point. A beautiful page in hand-rolled CSS sets a bar
|
|
86
|
+
point. A beautiful page in hand-rolled CSS sets a bar the real components then miss, and
|
|
75
87
|
what the user approved is not what ships — they signed off on a picture and
|
|
76
88
|
received an approximation of it. So write `themes/<name>.json` first
|
|
77
|
-
(
|
|
89
|
+
(the theming reference, see SKILL.md), and let the mock take its every value from that file:
|
|
78
90
|
the palette, `structure.radius`, the spacing scale, the fonts, the component
|
|
79
91
|
`defaultProps`. Approving the mock then approves the theme, and the built screens
|
|
80
92
|
inherit it rather than chase it.
|
|
81
93
|
|
|
82
|
-
**The mock has two halves, and only one of them is
|
|
94
|
+
**The mock has two halves, and only one of them is the component library's.** This is the same
|
|
83
95
|
split the built screen lives under, applied a step earlier so the two agree by
|
|
84
96
|
construction. The PAGE — the shell, the regions, the columns, the rhythm, the
|
|
85
97
|
material behind the content, what overlaps what — is plain HTML and your own
|
|
86
98
|
CSS, arranged however the layout decision demands; that half is free, and it is
|
|
87
99
|
where the design actually happens. The COMPONENTS — anything a person would
|
|
88
100
|
point at and call a control, and that the app will adopt as itself: buttons,
|
|
89
|
-
inputs, selects, tables, badges, menus, modals — are drawn as *
|
|
90
|
-
metrics
|
|
101
|
+
inputs, selects, tables, badges, menus, modals — are drawn as *shadcn's*, at the
|
|
102
|
+
metrics shadcn actually uses: its control heights, its input shapes, its table
|
|
91
103
|
and menu behaviour. The test is the one the build will apply too: is this thing
|
|
92
104
|
the SHAPE OF THE PAGE, or a COMPONENT someone would point at?
|
|
93
105
|
|
|
94
106
|
Getting that second half wrong is what makes a mock a lie. A control the mock
|
|
95
107
|
invents is a promise the app cannot keep, and a beautiful hand-rolled input sets
|
|
96
|
-
a bar the real one misses on screen one. If the mock wants something
|
|
108
|
+
a bar the real one misses on screen one. If the mock wants something shadcn
|
|
97
109
|
does not do, that is a real finding, and finding it here is the point: change the
|
|
98
110
|
theme so it does, or change the mock, and say which.
|
|
99
111
|
|
|
@@ -102,7 +114,7 @@ needs — not a prototype, not a click-through. Static markup, real content from
|
|
|
102
114
|
their domain (never lorem), the empty and error states beside the happy path,
|
|
103
115
|
laid out so the whole app is legible by scrolling. Its CSS is custom properties
|
|
104
116
|
on `:root` carrying the theme JSON's values, so a change to either is a change
|
|
105
|
-
to one number in both.
|
|
117
|
+
to one number in both. The components themselves will not load here — they are React
|
|
106
118
|
and a page like this has no bundler, and on hosts that sandbox the page (a Claude
|
|
107
119
|
Artifact) external stylesheets are blocked outright — so do not try; the mock
|
|
108
120
|
reproduces the theme's values by hand, which is why they have to be written down
|
|
@@ -130,25 +142,25 @@ stating:
|
|
|
130
142
|
wins; when they disagree about a *layout*, the mock wins.
|
|
131
143
|
|
|
132
144
|
**Building it is then a transcription, not a translation.** Because the theme
|
|
133
|
-
already exists and the mock was drawn from it, the screen is
|
|
145
|
+
already exists and the mock was drawn from it, the screen is shadcn components
|
|
134
146
|
arranged the way the mock arranges them — the look arrives with the theme. Two
|
|
135
147
|
rules keep it that way:
|
|
136
148
|
|
|
137
|
-
- **Layout is yours to write; components are
|
|
149
|
+
- **Layout is yours to write; components are shadcn's.** The page shape — the
|
|
138
150
|
regions, the columns, the rhythm, what sits beside what — is ordinary markup
|
|
139
151
|
and your own CSS. Anything a person would point at and call a control comes
|
|
140
|
-
from
|
|
152
|
+
from shadcn: buttons, inputs, selects, tables, badges, menus. Those carry
|
|
141
153
|
focus rings, keyboard behaviour and i18n, and hand-rolling one throws all of
|
|
142
154
|
it away.
|
|
143
155
|
- **A gap goes back to the theme, never into a component override.** If a screen
|
|
144
156
|
does not match the mock, the fix is a value in `themes/<name>.json`. A stack of
|
|
145
|
-
one-off `className`s and `!important` fighting
|
|
157
|
+
one-off `className`s and `!important` fighting the component defaults looks like
|
|
146
158
|
progress on screen one and is unmaintainable by screen five, and the screens
|
|
147
159
|
drift apart because nothing central holds them together.
|
|
148
160
|
|
|
149
161
|
**Checking the built screen against the mock** is a structural comparison, not a
|
|
150
162
|
pixel one: the same regions in the same order, the same hierarchy, the same
|
|
151
|
-
states present, the same tokens used. Do not chase pixel equality —
|
|
163
|
+
states present, the same tokens used. Do not chase pixel equality — shadcn's
|
|
152
164
|
components have their own metrics and the mock was drawn without them. A built
|
|
153
165
|
screen that reads as the same screen has passed.
|
|
154
166
|
|
|
@@ -308,8 +320,8 @@ These are not design opinions and are not open to a different answer.
|
|
|
308
320
|
- **Empty, loading and error are states that exist.** The empty state is what a
|
|
309
321
|
new user meets first and the one most often skipped entirely.
|
|
310
322
|
- **Contrast and tap targets are measured, not judged.** `pikku-a11y` covers it.
|
|
311
|
-
One trap worth knowing: a
|
|
312
|
-
|
|
323
|
+
One trap worth knowing: a tinted badge paints its label in the
|
|
324
|
+
accent, which lands just under AA on its own tint — name the
|
|
313
325
|
darker ink once and reuse it.
|
|
314
326
|
|
|
315
327
|
## Two screens that get skipped
|
|
@@ -351,7 +363,7 @@ first one.
|
|
|
351
363
|
and a display font applied to a default layout is a well-dressed default.
|
|
352
364
|
- Every border, divider and disabled control is a cool blue-grey while the
|
|
353
365
|
accent is not — the surest sign the neutrals were inherited rather than
|
|
354
|
-
chosen.
|
|
366
|
+
chosen. The theming reference (see SKILL.md) covers it.
|
|
355
367
|
- It looks like the last app you built.
|
|
356
|
-
- It looks like
|
|
368
|
+
- It looks like stock shadcn. Not *built with* shadcn, which it is and should be —
|
|
357
369
|
but indistinguishable from a component gallery with the brand hue swapped in.
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Pikku Create-a-Feature
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Agent Operating Procedure
|
|
6
|
+
- Stage 1 — Discover
|
|
7
|
+
- Stage 2 — State intent in plain English (BEFORE writing code)
|
|
8
|
+
- Stage 3 — Branch off
|
|
9
|
+
- Stage 4 — Implement
|
|
10
|
+
- Stage 5 — Verify
|
|
11
|
+
- Stage 6 — Commit
|
|
12
|
+
- Stage 7 — Hand off
|
|
13
|
+
- Report what fought you
|
|
14
|
+
- Hard constraints
|
|
15
|
+
- Output discipline
|
|
16
|
+
|
|
3
17
|
The stages, in order:
|
|
4
18
|
|
|
5
19
|
- [Agent Operating Procedure](#agent-operating-procedure)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Data the backend does not have yet
|
|
2
|
+
|
|
3
|
+
Read this when a screen needs data no function returns yet, or returns in a different shape. Real functions come first; mock only what is missing.
|
|
4
|
+
|
|
5
|
+
## Three ways to get data
|
|
6
|
+
|
|
7
|
+
- `usePikkuQuery('rpc:name')` and `usePikkuMutation('rpc:name')` take only RPCs that exist, with the function's own types. `api.gen.ts` lists them. Use these whenever a function fits.
|
|
8
|
+
- Mocks are files, not code: `.mocks/<rpc.name>/<scenario>.json` is exactly what the RPC answers, and `<scenario>.meta.json` beside it holds `label`, `description`, `state` (healthy, empty, error or slow), `default`, `delayMs` and `status`. Exactly one scenario per RPC has `default: true`. Add an empty and an error scenario for every list and every mutation.
|
|
9
|
+
- `usePikkuQueryStub('rpc:name')` and `usePikkuMutationStub('rpc:name')` always answer from the mock, and their output type is inferred from the mock files. Use a stub only when the function's types are not enough: no function exists, or the shape the screen needs differs from the function's output. If the mock already fits the function, use `usePikkuQuery`.
|
|
10
|
+
|
|
11
|
+
With `VITE_MOCK` set the plain hooks answer from the default mock too, so every state of every screen can be looked at without a backend.
|
|
12
|
+
|
|
13
|
+
## Publishing
|
|
14
|
+
|
|
15
|
+
A stub with no `{ featureFlag }` works in development and cannot be published. `usePikkuQueryStub('rpc:name', { featureFlag: 'flag' })` can, as long as the flag is declared in the project. Production never ships mock data; a stub there is a plain call that gets a 404.
|
|
16
|
+
|
|
17
|
+
## Making a screen real
|
|
18
|
+
|
|
19
|
+
`pikku mocks check` lists every stub and blocks the unflagged ones. For each stub: implement the function so its output matches the mock, replace the stub with `usePikkuQuery`, delete the flag if nothing else uses it. `pikku mocks diff` shows what changed, what is unused and what is dead; delete a mock directory it reports as removed.
|
|
20
|
+
|
|
21
|
+
## Screens built on mocks
|
|
22
|
+
|
|
23
|
+
The screens are the real app's: real components, `m.*()` for every string, the theme tokens. Only the data is sample. Make it look lived in: at least six realistic records where a page lists things, real copy, tinted and textured placeholder images instead of flat grey boxes. A button that leads nowhere real stays inert.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Adding a second frontend
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Deciding it is two apps, not one
|
|
6
|
+
- The second app
|
|
7
|
+
- Sessions across two origins
|
|
8
|
+
- Building the second app's screens
|
|
9
|
+
|
|
3
10
|
Read this when the split you recorded in Phase 2 is "separate apps" and you have
|
|
4
11
|
reached the changeset that needs the second one. **Not before.** Cloning
|
|
5
12
|
`apps/app` materialises a directory of copied screens; doing it during planning
|
|
@@ -121,8 +128,8 @@ supervisor, a dev runner, a deploy target — belongs to whatever is hosting it.
|
|
|
121
128
|
On a plain checkout, `bun --filter @project/<slug> dev` is enough.
|
|
122
129
|
|
|
123
130
|
Packaging it as a desktop or Android app is a separate step, on the same
|
|
124
|
-
`frontends` entry: `pikku app native init <slug>`.
|
|
125
|
-
|
|
131
|
+
`frontends` entry: `pikku app native init <slug>`. The native-app reference
|
|
132
|
+
(see SKILL.md) covers it.
|
|
126
133
|
|
|
127
134
|
### Scenarios across the two apps
|
|
128
135
|
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Shipping an app as a desktop or Android app
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- The commands
|
|
6
|
+
- Pick the mode first
|
|
7
|
+
- What pikku owns and what you own
|
|
8
|
+
- Plugins
|
|
9
|
+
- The identifier
|
|
10
|
+
- Building
|
|
11
|
+
|
|
3
12
|
Read this when an app in `frontends` has to be installed rather than visited: a
|
|
4
13
|
desktop app, an Android APK, later an iPhone app. The app is still the same
|
|
5
14
|
frontend. A native app is that frontend packaged in a Tauri shell, configured on
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# An app on top of an OpenAPI spec
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Pick the auth mode
|
|
6
|
+
- The auth-config file
|
|
7
|
+
- The screens
|
|
8
|
+
- Scenarios
|
|
9
|
+
|
|
3
10
|
The spec becomes an addon first — the `pikku-addon` skill's
|
|
4
11
|
`references/openapi.md` covers generating, verifying and checking it against
|
|
5
12
|
the real API. This reference is the decision that shapes the app around it:
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# Build a platform showcase on Pikku
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- What "platform" means here
|
|
6
|
+
- Choosing surfaces — during app workflow §5 (planning)
|
|
7
|
+
- The surfaces
|
|
8
|
+
- Coverage — where the bar is higher than the base workflow
|
|
9
|
+
- The full gate
|
|
10
|
+
- Deploy
|
|
11
|
+
- Reference
|
|
12
|
+
|
|
13
|
+
**This file is a delta: it adds to the app workflow, which stays the base and is
|
|
14
|
+
followed in full.** Everything there applies: knowledge base first, personas and roles,
|
|
5
15
|
changes grouped into changesets, planned then built one at a time, scenarios, design pass, deploy
|
|
6
16
|
gates, Fabric-readiness. This file adds the surfaces that turn an app into a
|
|
7
17
|
demonstration of the platform, and says where each one slots into that workflow.
|
|
8
18
|
|
|
9
|
-
|
|
19
|
+
Do not blend the two into one plan —
|
|
10
20
|
the phases below hang off its phases by number.
|
|
11
21
|
|
|
12
22
|
## What "platform" means here
|
|
@@ -23,7 +33,7 @@ or agent page, never the queue, scheduler or wire pages behind it.
|
|
|
23
33
|
Budget the extra surfaces at one changeset each. They are not free, and a
|
|
24
34
|
half-wired workflow engine is worse than no workflow engine.
|
|
25
35
|
|
|
26
|
-
## Choosing surfaces — during
|
|
36
|
+
## Choosing surfaces — during app workflow §5 (planning)
|
|
27
37
|
|
|
28
38
|
When you file the work, each surface below becomes its own changeset, ordered
|
|
29
39
|
after the spine it depends on.
|
|
@@ -137,7 +147,7 @@ correct rather than a smell: a third-party caller needs a real REST shape.
|
|
|
137
147
|
|
|
138
148
|
### Locales — `pikku-i18n`
|
|
139
149
|
|
|
140
|
-
|
|
150
|
+
The app workflow already requires every string to be a key. **Here, ship three
|
|
141
151
|
locales, and make one of them RTL** (`pikku-i18n`). Two LTR locales prove the
|
|
142
152
|
plumbing; an RTL one proves the layout, and it will find real bugs — mirrored
|
|
143
153
|
icons, hardcoded `marginLeft`, a nav that opens on the wrong side.
|
|
@@ -150,7 +160,7 @@ every added locale is cloned from, so three locales is `locales: ["en", …]` an
|
|
|
150
160
|
never a repointed base. Shipping locales is also not a reason for anything in
|
|
151
161
|
the code to stop being English: identifiers are English in every project, and
|
|
152
162
|
the language of `description`/`title`/`template` is `metaLocale` in
|
|
153
|
-
`pikku.config.json`.
|
|
163
|
+
`pikku.config.json`. The app workflow's §1a covers it.
|
|
154
164
|
|
|
155
165
|
### Emails — `pikku-emails`
|
|
156
166
|
|
|
@@ -177,7 +187,7 @@ the domain has a piece that genuinely belongs to no single app.
|
|
|
177
187
|
|
|
178
188
|
## Coverage — where the bar is higher than the base workflow
|
|
179
189
|
|
|
180
|
-
|
|
190
|
+
The app workflow's §7a already has the mechanics and the per-changeset habit:
|
|
181
191
|
run the server instrumented, run the scenarios against it, read
|
|
182
192
|
`coverage/scenario-coverage.json`, and triage every gap as a missing scenario, a
|
|
183
193
|
function that should not exist, or a documented deferral. Do all of that here.
|
|
@@ -196,7 +206,7 @@ Two things change in a showcase:
|
|
|
196
206
|
|
|
197
207
|
## The full gate
|
|
198
208
|
|
|
199
|
-
Everything in
|
|
209
|
+
Everything in the app workflow's §9, plus the checks a showcase should be able to
|
|
200
210
|
survive:
|
|
201
211
|
|
|
202
212
|
```sh
|
|
@@ -218,7 +228,7 @@ bunx --bun pikku scenario run local --spawn --run browser
|
|
|
218
228
|
|
|
219
229
|
## Deploy
|
|
220
230
|
|
|
221
|
-
|
|
231
|
+
The app workflow's §9 covers the open-source paths (`--provider standalone`,
|
|
222
232
|
`cloudflare`, `aws`). One thing specific to this mode: **the extra surfaces are
|
|
223
233
|
extra deploy units.** Workflow workers, queue workers, schedules and the events
|
|
224
234
|
channel each appear in `pikku deploy plan` as their own entries. Read the plan
|
|
@@ -227,7 +237,7 @@ built.
|
|
|
227
237
|
|
|
228
238
|
## Reference
|
|
229
239
|
|
|
230
|
-
- Base workflow:
|
|
240
|
+
- Base workflow: the app workflow, which this file adds to
|
|
231
241
|
- Per-surface skills: `pikku-workflow`, `pikku-wiring`, `pikku-agent`,
|
|
232
242
|
`pikku-i18n`, `pikku-emails`,
|
|
233
243
|
`pikku-meta`, `pikku-addon`, `pikku-auth`, `pikku-services`
|