@pikku/skills 0.12.22 → 0.12.26
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/CHANGELOG.md +134 -0
- package/dist/skills.gen.js +1 -1
- package/package.json +1 -1
- package/skills/pikku-a11y/SKILL.md +59 -0
- package/skills/pikku-addon/SKILL.md +2 -2
- package/skills/pikku-agent/SKILL.md +67 -316
- package/skills/pikku-agent/references/agents.md +299 -0
- package/skills/{pikku-ai-vercel/SKILL.md → pikku-agent/references/runner-vercel.md} +2 -24
- package/skills/{pikku-ai-voice/SKILL.md → pikku-agent/references/voice.md} +1 -22
- package/skills/pikku-architect/SKILL.md +265 -0
- package/skills/pikku-auth/SKILL.md +89 -0
- package/skills/{pikku-better-auth/SKILL.md → pikku-auth/references/better-auth.md} +126 -34
- package/skills/{pikku-jose/SKILL.md → pikku-auth/references/jose.md} +1 -23
- package/skills/{pikku-machine-auth/SKILL.md → pikku-auth/references/machine-auth.md} +0 -23
- package/skills/pikku-auth/references/permissions.md +261 -0
- package/skills/{pikku-security/SKILL.md → pikku-auth/references/sessions.md} +0 -20
- package/skills/pikku-build/SKILL.md +88 -0
- package/skills/{pikku-build-app/SKILL.md → pikku-build/references/app.md} +76 -24
- package/skills/{pikku-feature/SKILL.md → pikku-build/references/feature.md} +1 -8
- package/skills/{pikku-build-app → pikku-build}/references/multi-app.md +56 -1
- package/skills/{pikku-build-platform/SKILL.md → pikku-build/references/platform.md} +22 -37
- package/skills/{pikku-template-clone/SKILL.md → pikku-build/references/post-clone.md} +0 -6
- package/skills/{pikku-build-quick/SKILL.md → pikku-build/references/quick.md} +4 -20
- package/skills/{pikku-build-app → pikku-build}/references/ship.md +9 -3
- package/skills/pikku-concepts/SKILL.md +72 -7
- package/skills/pikku-concepts/references/concept-mapping.md +8 -8
- package/skills/pikku-deploy/SKILL.md +158 -0
- package/skills/{pikku-deploy-azure/SKILL.md → pikku-deploy/references/azure.md} +18 -50
- package/skills/pikku-deploy/references/cloudflare.md +104 -0
- package/skills/pikku-deploy/references/express.md +92 -0
- package/skills/{pikku-deploy-fastify/SKILL.md → pikku-deploy/references/fastify.md} +8 -32
- package/skills/{pikku-deploy-lambda/SKILL.md → pikku-deploy/references/lambda.md} +6 -27
- package/skills/{pikku-deploy-nextjs/SKILL.md → pikku-deploy/references/nextjs.md} +9 -33
- package/skills/pikku-deploy/references/uws.md +72 -0
- package/skills/pikku-deploy/references/ws.md +75 -0
- package/skills/pikku-emails/SKILL.md +3 -2
- package/skills/pikku-fabric/SKILL.md +47 -20
- package/skills/{pikku-fabric-debug/SKILL.md → pikku-fabric/references/debugging.md} +0 -6
- package/skills/pikku-i18n/SKILL.md +62 -207
- package/skills/{pikku-paraglide/SKILL.md → pikku-i18n/references/enum-labels.md} +0 -6
- package/skills/pikku-i18n/references/messages.md +218 -0
- package/skills/{pikku-rtl/SKILL.md → pikku-i18n/references/rtl.md} +3 -9
- package/skills/pikku-knowledge/SKILL.md +15 -0
- package/skills/pikku-kysely/SKILL.md +13 -13
- package/skills/pikku-list-query/SKILL.md +163 -0
- package/skills/pikku-meta/SKILL.md +58 -130
- package/skills/{pikku-deps/SKILL.md → pikku-meta/references/audit.md} +1 -17
- package/skills/pikku-meta/references/meta.md +114 -0
- package/skills/{pikku-versioning/SKILL.md → pikku-meta/references/versioning.md} +0 -26
- package/skills/pikku-middleware/SKILL.md +5 -5
- package/skills/pikku-n8n-import/SKILL.md +0 -1
- package/skills/pikku-permissions/SKILL.md +75 -229
- package/skills/pikku-react/SKILL.md +50 -298
- package/skills/pikku-react/references/client.md +313 -0
- package/skills/{pikku-react-query/SKILL.md → pikku-react/references/react-query.md} +2 -22
- package/skills/{pikku-workflows-client/SKILL.md → pikku-react/references/workflows.md} +1 -22
- package/skills/pikku-realtime/SKILL.md +110 -251
- package/skills/pikku-scenario/SKILL.md +60 -45
- package/skills/pikku-scenario/references/persona-run.md +148 -0
- package/skills/pikku-seo/SKILL.md +133 -0
- package/skills/pikku-service-backends/SKILL.md +154 -0
- package/skills/pikku-service-backends/references/aws.md +106 -0
- package/skills/pikku-service-backends/references/backblaze.md +57 -0
- package/skills/pikku-service-backends/references/mongodb.md +90 -0
- package/skills/pikku-service-backends/references/redis.md +75 -0
- package/skills/pikku-service-backends/references/schema.md +63 -0
- package/skills/pikku-services/SKILL.md +68 -291
- package/skills/{pikku-audit/SKILL.md → pikku-services/references/audit.md} +0 -22
- package/skills/{pikku-config/SKILL.md → pikku-services/references/config.md} +1 -25
- package/skills/{pikku-pino/SKILL.md → pikku-services/references/pino.md} +0 -20
- package/skills/pikku-services/references/services.md +272 -0
- package/skills/pikku-software-archaeology/README.md +5 -1
- package/skills/pikku-software-archaeology/SKILL.md +16 -2
- package/skills/{pikku-product-second-opinion/example/sample-report.md → pikku-software-archaeology/example/second-opinion-sample-report.md} +1 -1
- package/skills/pikku-software-archaeology/references/blueprint.schema.json +1 -1
- package/skills/pikku-software-archaeology/references/pikku-mapping.md +3 -3
- package/skills/{pikku-product-second-opinion/SKILL.md → pikku-software-archaeology/references/second-opinion.md} +4 -9
- package/skills/pikku-webhook/SKILL.md +224 -0
- package/skills/pikku-wiring/SKILL.md +180 -0
- package/skills/{pikku-websocket/SKILL.md → pikku-wiring/references/channel.md} +2 -35
- package/skills/{pikku-cli/SKILL.md → pikku-wiring/references/cli.md} +1 -33
- package/skills/{pikku-gateway-slack/SKILL.md → pikku-wiring/references/gateway-slack.md} +0 -23
- package/skills/{pikku-http/SKILL.md → pikku-wiring/references/http.md} +3 -39
- package/skills/{pikku-mcp/SKILL.md → pikku-wiring/references/mcp.md} +0 -33
- package/skills/{pikku-queue/SKILL.md → pikku-wiring/references/queue.md} +1 -33
- package/skills/pikku-wiring/references/realtime.md +265 -0
- package/skills/{pikku-rpc/SKILL.md → pikku-wiring/references/rpc.md} +0 -32
- package/skills/{pikku-schedule/SKILL.md → pikku-wiring/references/scheduler.md} +1 -35
- package/skills/{pikku-trigger/SKILL.md → pikku-wiring/references/trigger.md} +0 -43
- package/skills/pikku-workflow/SKILL.md +39 -2
- package/skills/pikku-aws/SKILL.md +0 -161
- package/skills/pikku-backblaze/SKILL.md +0 -104
- package/skills/pikku-deploy-cloudflare/SKILL.md +0 -123
- package/skills/pikku-deploy-express/SKILL.md +0 -122
- package/skills/pikku-deploy-uws/SKILL.md +0 -144
- package/skills/pikku-mongodb/SKILL.md +0 -113
- package/skills/pikku-product-second-opinion/README.md +0 -43
- package/skills/pikku-redis/SKILL.md +0 -99
- package/skills/pikku-schema-ajv/SKILL.md +0 -83
- package/skills/pikku-schema-cfworker/SKILL.md +0 -82
- package/skills/pikku-ws/SKILL.md +0 -87
- /package/skills/{pikku-build-app → pikku-build}/references/theming.md +0 -0
- /package/skills/{pikku-product-second-opinion/references/report-template.md → pikku-software-archaeology/references/second-opinion-report-template.md} +0 -0
- /package/skills/{pikku-cli/references/complete-example.md → pikku-wiring/references/cli-complete-example.md} +0 -0
- /package/skills/{pikku-http → pikku-wiring}/references/http-options.md +0 -0
- /package/skills/{pikku-realtime/references/other-routes.md → pikku-wiring/references/realtime-other-routes.md} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-build
|
|
3
|
+
description: >-
|
|
4
|
+
Use to build on Pikku — turning a fresh scaffold into a working app (quick spike, real product,
|
|
5
|
+
or a showcase that exercises every surface), adding a feature to an app that already exists, and
|
|
6
|
+
the one-off cleanup right after a template is cloned. Covers the knowledge base, personas and
|
|
7
|
+
roles, milestone planning, the scenario that proves each one, theming, multi-app layouts and
|
|
8
|
+
deploying. TRIGGER when: the user asks for an app to be built on Pikku, a freshly scaffolded
|
|
9
|
+
project needs turning into a product, the user asks to add a feature or wire up a new endpoint
|
|
10
|
+
in a working app, or a template was just cloned or scaffolded. DO NOT TRIGGER when: the user
|
|
11
|
+
asks for a one-off edit to an existing function, asks about Pikku concepts (use pikku-concepts),
|
|
12
|
+
or wants one specific surface explained rather than built (use that surface's skill).
|
|
13
|
+
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
|
+
argument-hint: '[feature description]'
|
|
15
|
+
installGroups: [core]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Build on Pikku
|
|
19
|
+
|
|
20
|
+
## Which mode
|
|
21
|
+
|
|
22
|
+
| The situation | Read |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| A template was just cloned or scaffolded, and the tree still looks like one | `references/post-clone.md` first, then come back |
|
|
25
|
+
| A real product, meant to be picked up by someone else | `references/app.md` — the default |
|
|
26
|
+
| A spike, a throwaway demo, an idea nobody has committed to | `references/quick.md` |
|
|
27
|
+
| A showcase meant to exercise every Pikku surface | `references/platform.md`, which is a delta on top of `references/app.md` |
|
|
28
|
+
| A feature added to an app that already has its knowledge base and milestones | `references/feature.md` |
|
|
29
|
+
|
|
30
|
+
**App is the default.** A small or toy-sounding app does not make it Quick;
|
|
31
|
+
only an explicit signal of speed or throwaway-ness does. Platform is not "App
|
|
32
|
+
plus more effort" — it is App plus a deliberate surface checklist, so read the
|
|
33
|
+
base first and follow it in full rather than blending the two into one plan.
|
|
34
|
+
|
|
35
|
+
The supporting references belong to whichever mode sends you to them:
|
|
36
|
+
`references/multi-app.md` (a second frontend), `references/theming.md`
|
|
37
|
+
(authoring the theme), `references/ship.md` (deploying, and the Fabric-readiness
|
|
38
|
+
contract).
|
|
39
|
+
|
|
40
|
+
## Bootstrap before anything else
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
bunx --bun pikku bootstrap
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Once, now — not later when you start building. It wires the `#pikku` alias the
|
|
47
|
+
generated code depends on, and on a fresh scaffold **every command that touches
|
|
48
|
+
codegen fails until it has run**, including ones you would reasonably reach for
|
|
49
|
+
while still planning. Those failures look alarming and are nothing but this.
|
|
50
|
+
|
|
51
|
+
## What holds in every mode
|
|
52
|
+
|
|
53
|
+
- **The branch and the diff are the contract.** There is no plan JSON. A
|
|
54
|
+
reviewer sees real, compiled, working code: apply is a merge, reject is a
|
|
55
|
+
`git branch -D`.
|
|
56
|
+
- **Discover before editing.** `yarn pikku meta context --json` returns
|
|
57
|
+
functions, wires, middleware, permissions, workflows, `capabilities` and
|
|
58
|
+
`layout` in one call. Fall back to targeted `meta` commands only for a full
|
|
59
|
+
schema or a workflow's steps.
|
|
60
|
+
- **`metaLocale` in `pikku.config.json` is the language of authored meta** —
|
|
61
|
+
every `description`, `title` and step `template` the console renders.
|
|
62
|
+
Identifiers stay English whatever it says, and the product's own language
|
|
63
|
+
lives in `messages/*.json`.
|
|
64
|
+
- **`pikku all` is the gate.** Run it after touching functions, wirings or
|
|
65
|
+
schemas, and treat its criticals as real.
|
|
66
|
+
- **A milestone is planned by a different seat than the one that builds it.**
|
|
67
|
+
The plan — tables, functions, wires, roles, scopes, screens, scenarios, in
|
|
68
|
+
passes — is written through `pikku knowledge plan set` by `pikku-architect`,
|
|
69
|
+
and `pikku knowledge plan progress` measures the build against it from the
|
|
70
|
+
generated meta. A builder who writes its own plan is grading itself.
|
|
71
|
+
|
|
72
|
+
## What NOT to do
|
|
73
|
+
|
|
74
|
+
- **Do not skip ahead in App mode.** Knowledge, then people, then milestones,
|
|
75
|
+
then one milestone at a time — planned, built, proven by a scenario, and
|
|
76
|
+
closed against its plan before the next starts. The order is the method.
|
|
77
|
+
- **Do not close a milestone your plan says is unfinished.** Build the missing
|
|
78
|
+
item, or defer it with a reason through `pikku knowledge plan defer`. Never
|
|
79
|
+
edit the plan to match what you built, and never drop an item silently.
|
|
80
|
+
- **Do not let a Quick build be mistaken for a real one.** It skips
|
|
81
|
+
`knowledge/`, milestone planning, design direction and refusal scenarios — say
|
|
82
|
+
so out loud to the user when you finish, and point at the way out.
|
|
83
|
+
- **Do not introduce a wire of a type whose `capabilities.<type>` is `false`**
|
|
84
|
+
unless the user asked for it.
|
|
85
|
+
- **Do not hand-edit generated files** — `.pikku/`, `*.gen.*` or the SDK. Fix the
|
|
86
|
+
source and regenerate.
|
|
87
|
+
- **Do not invent a role.** An invented role becomes invented screens; build only
|
|
88
|
+
the roles the user named.
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pikku-build-app
|
|
3
|
-
description: >-
|
|
4
|
-
Build a real product on open-source Pikku using the full Fabric workflow, run locally — knowledge
|
|
5
|
-
base first, personas and roles, milestones planned then built one at a time, each proven by a
|
|
6
|
-
scenario, with a design pass. The default build mode, and the one that stays importable into
|
|
7
|
-
Fabric later. TRIGGER when: the user asked for an app to be built on Pikku and picked "App" (or
|
|
8
|
-
did not pick), a freshly scaffolded pikku project needs turning into a product, or the user says
|
|
9
|
-
"build this properly / so someone can pick it up". DO NOT TRIGGER when: the user asked for
|
|
10
|
-
something quick or throwaway (use pikku-build-quick), wants every platform surface demonstrated
|
|
11
|
-
(use pikku-build-platform), or is adding one feature to an app that already has its knowledge
|
|
12
|
-
base and milestones (use pikku-feature).
|
|
13
|
-
---
|
|
14
|
-
|
|
15
1
|
# Build a product on open-source Pikku
|
|
16
2
|
|
|
17
3
|
You have a scaffolded project with skills installed. This skill owns everything
|
|
@@ -272,14 +258,14 @@ definePersonas({
|
|
|
272
258
|
live with them.
|
|
273
259
|
- **Roles are what a permission check reads, not where it lives.** The check goes
|
|
274
260
|
in the function's `permissions` field (§6), never in the body. Read the
|
|
275
|
-
`pikku-
|
|
261
|
+
`pikku-auth` skill.
|
|
276
262
|
|
|
277
263
|
`pikku persona list` shows who is declared and `pikku roles audit` reports roles
|
|
278
264
|
the database still holds that code no longer declares — both need §0's bootstrap
|
|
279
265
|
to have run, and both are worth a look once it has.
|
|
280
266
|
|
|
281
267
|
**One warning about the scaffold's own notes:** `knowledge/index.md` may claim
|
|
282
|
-
the people live in `pikku.config.json`, put there by a
|
|
268
|
+
the people live in `pikku.config.json`, put there by a persona command.
|
|
283
269
|
That is stale. In this template they live in `personas.ts` as above, and
|
|
284
270
|
`pikku.config.json` carries no personas key at all — only `scenarios.emailDomain`.
|
|
285
271
|
Trust the file you can read over the note describing it.
|
|
@@ -365,17 +351,45 @@ Number the files (`01-…`, `02-…`) so the order is visible in the tree. Then
|
|
|
365
351
|
**Show the user the list before building.** This is the last cheap moment to
|
|
366
352
|
reorder — after §6 the migrations are numbered and the order is concrete.
|
|
367
353
|
|
|
354
|
+
## 5a. The technical plan — one milestone at a time, before you build it
|
|
355
|
+
|
|
356
|
+
The milestone note says what the app must DO. The **plan** says what has to
|
|
357
|
+
exist for it: the tables, functions, wires, roles, scopes, screens and
|
|
358
|
+
scenarios, split into passes. It is JSON, it lives beside the note, and
|
|
359
|
+
`pikku knowledge plan progress` measures the finished build against it.
|
|
360
|
+
|
|
361
|
+
**Read `pikku-architect` and follow it.** The plan is the denominator the
|
|
362
|
+
completion check divides by, so a builder who writes their own plan can build a
|
|
363
|
+
fraction, plan only that fraction, and certify itself complete. Fabric answers
|
|
364
|
+
that by giving the plan its own seat; here the defence is the ORDER, and it only
|
|
365
|
+
holds if you keep it: the plan is written against the note in its own turn,
|
|
366
|
+
before any of the code it measures exists, and is never edited afterwards to
|
|
367
|
+
match what you ended up building. An item that will not land is deferred with
|
|
368
|
+
its reason — `plan defer` — not quietly rewritten. Write it before you open a
|
|
369
|
+
migration:
|
|
370
|
+
|
|
371
|
+
```sh
|
|
372
|
+
pikku knowledge plan schema # the only spec there is
|
|
373
|
+
pikku knowledge plan set <milestone> /tmp/plan.json
|
|
374
|
+
pikku knowledge plan show <milestone> --for-build # what you then build
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Plan one milestone at a time, at the moment you are about to build it** — not
|
|
378
|
+
all of them here. A plan written against a note that later moves is worse than
|
|
379
|
+
no plan, and everything after the current milestone is still allowed to move.
|
|
380
|
+
|
|
368
381
|
---
|
|
369
382
|
|
|
370
383
|
## PHASE 4 — Build
|
|
371
384
|
|
|
372
385
|
## 6. Implement milestones, one at a time
|
|
373
386
|
|
|
374
|
-
**Per milestone** — set its note to `status: dispatched`, do the
|
|
375
|
-
set it to `built`. Do not start the next one
|
|
376
|
-
§
|
|
377
|
-
|
|
378
|
-
or not the note says
|
|
387
|
+
**Per milestone** — plan it (§5a), set its note to `status: dispatched`, do the
|
|
388
|
+
six steps, close it out (§6a), set it to `built`. Do not start the next one
|
|
389
|
+
until §6a passes, §7 is green for this one *and §7a shows its functions
|
|
390
|
+
covered*. A stack of half-milestones cannot be reviewed and cannot be handed
|
|
391
|
+
over, and an uncovered function is a half-milestone whether or not the note says
|
|
392
|
+
`built`.
|
|
379
393
|
|
|
380
394
|
1. **Migration.** SQL in `db/sqlite/` at the project root, numbered on from the
|
|
381
395
|
ones already there. Apply with `bunx --bun pikku db migrate`, which also
|
|
@@ -475,6 +489,44 @@ it is worth writing as a browser step on §7's scenario and running
|
|
|
475
489
|
`pikku scenario run local --spawn --run browser`: same clicks, same assertions,
|
|
476
490
|
in the repo, green or red on every future run.
|
|
477
491
|
|
|
492
|
+
## 6a. Close the milestone against its plan, not against your memory
|
|
493
|
+
|
|
494
|
+
```sh
|
|
495
|
+
pikku knowledge plan progress <milestone>
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
It reads §5a's plan and reconciles it against the generated meta under
|
|
499
|
+
`.pikku/` — the function exists or it does not, the route is wired or it is not,
|
|
500
|
+
the `pikkuScenario` export is there or it is not. Nothing it reports comes from
|
|
501
|
+
what anyone claimed, which is the whole reason it replaced a todo list. It exits
|
|
502
|
+
non-zero while anything in the first pass is missing.
|
|
503
|
+
|
|
504
|
+
Three things it says, and what each one asks of you:
|
|
505
|
+
|
|
506
|
+
- **MISSING** — the first pass owes it and the meta cannot see it. Either build
|
|
507
|
+
it, or, if it genuinely belongs to later work, move it out with a reason on
|
|
508
|
+
the record:
|
|
509
|
+
|
|
510
|
+
```sh
|
|
511
|
+
pikku knowledge plan defer <milestone> function:sendReminder \
|
|
512
|
+
-r "The email service it needs is the next milestone."
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**A deferral is capped at two per plan.** Past that, the plan was wrong and the
|
|
516
|
+
milestone is two milestones — say so to the user rather than deferring again.
|
|
517
|
+
What you may never do is drop the item silently: the plan is what the next
|
|
518
|
+
person reads to know what this milestone was for.
|
|
519
|
+
- **PROBLEMS** — something exists but does not do what was planned. A function
|
|
520
|
+
planned as restricted whose meta says `auth: false`; a `cascade` no migration
|
|
521
|
+
declares; a browser scenario that opens a page and asserts it is still on it.
|
|
522
|
+
These are never deferred. Fix the app.
|
|
523
|
+
- **DEFERRED to a later pass** — already accounted for. Reported so it is
|
|
524
|
+
visible, never blocking.
|
|
525
|
+
|
|
526
|
+
**Do not set the note to `built` while this exits non-zero**, and do not edit the
|
|
527
|
+
plan to match what you built — `plan set` is the architect's seat, and a builder
|
|
528
|
+
rewriting its own denominator is exactly what the split exists to stop.
|
|
529
|
+
|
|
478
530
|
## 7. Prove it — scenarios
|
|
479
531
|
|
|
480
532
|
A scenario is a user journey run as one of your personas, over the real
|
|
@@ -685,7 +737,7 @@ cheaper to honour than to retrofit:
|
|
|
685
737
|
that needs it
|
|
686
738
|
- `references/theming.md` — authoring the theme (§8a)
|
|
687
739
|
- `references/ship.md` — deploying, and the Fabric-readiness contract (§9)
|
|
688
|
-
- Sibling skills: `pikku-knowledge` (§2), `pikku-
|
|
689
|
-
`pikku-scenario` (§7, §7a), `pikku-deploy
|
|
740
|
+
- Sibling skills: `pikku-knowledge` (§2), `pikku-auth` (§3),
|
|
741
|
+
`pikku-scenario` (§7, §7a), `pikku-deploy` and `pikku-fabric` (§9)
|
|
690
742
|
- Project conventions written by the template: `AGENTS.md`
|
|
691
|
-
- Doing less than this: `
|
|
743
|
+
- Doing less than this: `references/quick.md``. Doing more: `references/platform.md``.
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pikku-feature
|
|
3
|
-
description: 'Drive create-a-feature work inside a Pikku project that already exists: discover project context, work on a feature branch, implement + verify + commit, and ask the user to review via the diff. TRIGGER when: the user asks to "create a feature", "add X to my Pikku project", "wire up a new endpoint", or anything that implies turning a natural-language request into Pikku functions/wirings/migrations within a working app. DO NOT TRIGGER when: the user asks for a one-off code edit in an existing function, asks about Pikku concepts (use pikku-concepts), or is building a whole app from a fresh scaffold rather than extending one (use pikku-build-app, or pikku-build-quick / pikku-build-platform).'
|
|
4
|
-
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 log *), Bash(git branch *), Bash(yarn pikku fabric report *), Bash(npx --no pikku fabric report *)
|
|
5
|
-
argument-hint: '<feature description>'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
1
|
# Pikku Create-a-Feature
|
|
9
2
|
|
|
10
3
|
## Agent Operating Procedure
|
|
@@ -137,7 +130,7 @@ in-app features don't.
|
|
|
137
130
|
zod schema for type-safe access. Read variables with
|
|
138
131
|
`services.variables.get('NAME')`. Secrets are **not available in functions** —
|
|
139
132
|
read them in `services.ts` with `secrets.getSecret('NAME')` and pass the value
|
|
140
|
-
into the service the function uses. See the **pikku-
|
|
133
|
+
into the service the function uses. See the **pikku-services** skill for the full
|
|
141
134
|
pattern (including OAuth2 credentials). This applies even in `config.ts`.
|
|
142
135
|
|
|
143
136
|
### Conventions to copy from neighbours
|
|
@@ -8,6 +8,61 @@ leaves `pikkufabric.config.json` pointing at an app nobody has designed yet.
|
|
|
8
8
|
If the split is "one app with paths", you never need this file — add route
|
|
9
9
|
segments under `/app` and give each audience its own entries in `useNavItems()`.
|
|
10
10
|
|
|
11
|
+
## Deciding it is two apps, not one
|
|
12
|
+
|
|
13
|
+
The split you are acting on should already be recorded, but this is the reasoning
|
|
14
|
+
behind it — and the place people get it wrong is the third case at the bottom.
|
|
15
|
+
|
|
16
|
+
**A group that comes in through its own front door gets its own app.** A role
|
|
17
|
+
*inside* an app is not that: it changes which nav items and which buttons a person
|
|
18
|
+
sees, and lives in `useNavItems()` and the `permissions` on the function, not in a
|
|
19
|
+
route subtree.
|
|
20
|
+
|
|
21
|
+
**The test is which side of the counter they are on.** Colleagues share one app and
|
|
22
|
+
differ by nav — the mechanic, the person on the counter, the bookkeeper. Someone
|
|
23
|
+
across the counter with an account of their own gets their own — the customer, the
|
|
24
|
+
tenant, the patient. One app is a real answer and often the right one.
|
|
25
|
+
|
|
26
|
+
**The asymmetry that forces a split is sign-up.** Where staff accounts are created
|
|
27
|
+
*for* people and customers create their own, the two need different sign-up, different
|
|
28
|
+
onboarding and different session shape, and bending one app around both costs more
|
|
29
|
+
than the second app does. Do not collapse two audiences into one app to save a build.
|
|
30
|
+
|
|
31
|
+
Never invent a person the notes do not name in order to reach two.
|
|
32
|
+
|
|
33
|
+
### The group that never signs in
|
|
34
|
+
|
|
35
|
+
Some people use the product with no account at all — ordering from a menu, booking a
|
|
36
|
+
table, opening an invitation. They are not a third case, and **they do not get their
|
|
37
|
+
own frontend**: an app is built around the personas who sign into it. What they get is
|
|
38
|
+
the public route space every app already has.
|
|
39
|
+
|
|
40
|
+
- **`/app/*` is the signed-in application.** One `beforeLoad` on `/app` bounces a
|
|
41
|
+
signed-out visitor to the login. There is no per-route exception.
|
|
42
|
+
- **Every other route is public** — `/`, `/menu`, `/book`, `/r/$code`. No gate, no
|
|
43
|
+
session.
|
|
44
|
+
- **`/` is a landing page and you must write it.** A starter that forwards `/` to
|
|
45
|
+
`/app` does so only because it ships no homepage. Leave the forward in and the
|
|
46
|
+
product's front door is a sign-in form: the anonymous visitor arrives at a login it
|
|
47
|
+
has no account for and never reaches the thing it came for — **while every check
|
|
48
|
+
still passes**, because everything that looks at the app signs in first. This is the
|
|
49
|
+
failure this section exists for.
|
|
50
|
+
|
|
51
|
+
So a screen whose users have no account goes at `/menu`, never `/app/menu`.
|
|
52
|
+
|
|
53
|
+
### The frontend guard is UX and proves nothing
|
|
54
|
+
|
|
55
|
+
The bundle is on the origin and the nav is a client-side decision; anyone can read
|
|
56
|
+
both. The security boundary is the `permissions` field on the function — see
|
|
57
|
+
pikku-permissions. Hiding a nav item keeps people out of screens that would confuse
|
|
58
|
+
them; it never protects data. Never let a hidden UI be the only thing between a user
|
|
59
|
+
and someone else's record: if the invoices nav item is hidden but `listAllInvoices`
|
|
60
|
+
has no `permissions`, the app is wide open and the nav is decoration.
|
|
61
|
+
|
|
62
|
+
Worth a scenario each, because they are two different claims: that a mechanic cannot
|
|
63
|
+
*see* the invoices nav item, and that their call to an invoices RPC is *refused*. The
|
|
64
|
+
second is the one that catches a `permissions` field nobody wired.
|
|
65
|
+
|
|
11
66
|
## The clone
|
|
12
67
|
|
|
13
68
|
```bash
|
|
@@ -102,7 +157,7 @@ rewritten to the pikku dev server).
|
|
|
102
157
|
the permission check exists. The refusal scenario is the evidence.
|
|
103
158
|
- **In production on two subdomains**, the session cookie needs a parent domain
|
|
104
159
|
(`.example.com`) or each app gets its own login. Decide which, set it per the
|
|
105
|
-
`pikku-
|
|
160
|
+
`pikku-auth` skill, and record it in `knowledge/decisions/security/`.
|
|
106
161
|
- **Never hardcode a host or port.** The API base resolves to same-origin `/api`.
|
|
107
162
|
|
|
108
163
|
## Building the second app's screens
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pikku-build-platform
|
|
3
|
-
description: >-
|
|
4
|
-
Build an app that exercises every Pikku surface — workflows, schedules, queues, an AI agent,
|
|
5
|
-
realtime, MCP, multiple locales, contract versioning and scenario coverage — on top of the full
|
|
6
|
-
pikku-build-app workflow. For proving what the platform does, not for shipping the smallest
|
|
7
|
-
thing that works. TRIGGER when: the user picked "Platform", asked for a showcase or reference
|
|
8
|
-
app, or asked to demonstrate what Pikku can do. DO NOT TRIGGER when: the user wants a product
|
|
9
|
-
built (use pikku-build-app), something quick (use pikku-build-quick), or one specific surface
|
|
10
|
-
wired into an existing app — a single workflow, cron job or agent (use that surface's own skill,
|
|
11
|
-
e.g. pikku-workflow, pikku-schedule, pikku-agent).
|
|
12
|
-
---
|
|
13
|
-
|
|
14
1
|
# Build a platform showcase on Pikku
|
|
15
2
|
|
|
16
|
-
**This skill is a delta. `
|
|
3
|
+
**This skill is a delta. `references/app.md` is the base — read it and follow it in
|
|
17
4
|
full.** Everything there applies: knowledge base first, personas and roles,
|
|
18
5
|
milestones planned then built one at a time, scenarios, design pass, deploy
|
|
19
6
|
gates, Fabric-readiness. This file adds the surfaces that turn an app into a
|
|
20
7
|
demonstration of the platform, and says where each one slots into that workflow.
|
|
21
8
|
|
|
22
|
-
Read `
|
|
9
|
+
Read `references/app.md` now, then come back. Do not blend the two into one plan —
|
|
23
10
|
the phases below hang off its phases by number.
|
|
24
11
|
|
|
25
12
|
## What "platform" means here
|
|
@@ -32,7 +19,7 @@ proves it.** A cron job that logs "tick" is not a schedule — it is a comment.
|
|
|
32
19
|
Budget the extra surfaces at one milestone each. They are not free, and a
|
|
33
20
|
half-wired workflow engine is worse than no workflow engine.
|
|
34
21
|
|
|
35
|
-
## Choosing surfaces — during `
|
|
22
|
+
## Choosing surfaces — during `references/app.md` §5 (planning)
|
|
36
23
|
|
|
37
24
|
When you plan milestones, each surface below becomes its own milestone note in
|
|
38
25
|
`knowledge/milestones/`, ordered after the spine it depends on.
|
|
@@ -85,11 +72,11 @@ on a human or a timer and must survive a restart.
|
|
|
85
72
|
gap in the middle? If every operation completes in one request, you do not need
|
|
86
73
|
workflows and forcing one is noise.
|
|
87
74
|
- **Prove it:** a scenario that starts the workflow, advances it as a second
|
|
88
|
-
persona, and asserts the end state. `pikku-
|
|
75
|
+
persona, and asserts the end state. `pikku-react` covers driving it
|
|
89
76
|
from the UI.
|
|
90
77
|
- Three workflows ship with the template. Read them before writing yours.
|
|
91
78
|
|
|
92
|
-
### Schedules — `pikku-
|
|
79
|
+
### Schedules — `pikku-wiring`
|
|
93
80
|
|
|
94
81
|
Recurring work: a nightly rollup, a reminder sweep, an expiry pass.
|
|
95
82
|
|
|
@@ -99,7 +86,7 @@ Recurring work: a nightly rollup, a reminder sweep, an expiry pass.
|
|
|
99
86
|
- **Prove it:** invoke the scheduled function directly in a scenario and assert
|
|
100
87
|
its effect. Do not test by waiting.
|
|
101
88
|
|
|
102
|
-
### Queues — `pikku-
|
|
89
|
+
### Queues — `pikku-wiring`
|
|
103
90
|
|
|
104
91
|
Work that must happen but not now, and may retry: email fan-out, image
|
|
105
92
|
processing, third-party calls that fail.
|
|
@@ -108,7 +95,7 @@ processing, third-party calls that fail.
|
|
|
108
95
|
fails in ways worth retrying.
|
|
109
96
|
- **Prove it:** enqueue in one scenario step, assert the effect in a `then`.
|
|
110
97
|
|
|
111
|
-
### An AI agent — `pikku-agent
|
|
98
|
+
### An AI agent — `pikku-agent`
|
|
112
99
|
|
|
113
100
|
The template ships agent wiring and `@ai-sdk/openai`. An agent that answers
|
|
114
101
|
questions over the app's own data is the showcase; a general chatbot is not.
|
|
@@ -124,7 +111,7 @@ questions over the app's own data is the showcase; a general chatbot is not.
|
|
|
124
111
|
matching `defineSecret`, never `process.env`, or deploy has nothing to
|
|
125
112
|
provision (PKU951).
|
|
126
113
|
|
|
127
|
-
### Realtime and events — `pikku-
|
|
114
|
+
### Realtime and events — `pikku-wiring`
|
|
128
115
|
|
|
129
116
|
`pikku enable events` gives a realtime channel plus an SSE stream, and the
|
|
130
117
|
generated typed client.
|
|
@@ -134,20 +121,20 @@ generated typed client.
|
|
|
134
121
|
- **Prove it:** a browser scenario is the only honest proof — assert the second
|
|
135
122
|
persona's screen changed without a reload.
|
|
136
123
|
|
|
137
|
-
### MCP — `pikku-
|
|
124
|
+
### MCP — `pikku-wiring`
|
|
138
125
|
|
|
139
126
|
Exposes functions as Model Context Protocol tools, so an outside agent can drive
|
|
140
127
|
the app. Cheap once functions exist, and a genuine differentiator to show.
|
|
141
128
|
|
|
142
|
-
### Triggers and webhooks — `pikku-
|
|
129
|
+
### Triggers and webhooks — `pikku-wiring`, `pikku enable webhook`
|
|
143
130
|
|
|
144
131
|
Inbound triggers and outgoing webhook delivery. This is where `wireHTTP` is
|
|
145
132
|
correct rather than a smell: a third-party caller needs a real REST shape.
|
|
146
133
|
|
|
147
|
-
### Locales — `pikku-i18n
|
|
134
|
+
### Locales — `pikku-i18n`
|
|
148
135
|
|
|
149
|
-
`
|
|
150
|
-
locales, and make one of them RTL** (`pikku-
|
|
136
|
+
`references/app.md` already requires every string to be a key. **Here, ship three
|
|
137
|
+
locales, and make one of them RTL** (`pikku-i18n`). Two LTR locales prove the
|
|
151
138
|
plumbing; an RTL one proves the layout, and it will find real bugs — mirrored
|
|
152
139
|
icons, hardcoded `marginLeft`, a nav that opens on the wrong side.
|
|
153
140
|
|
|
@@ -159,7 +146,7 @@ every added locale is cloned from, so three locales is `locales: ["en", …]` an
|
|
|
159
146
|
never a repointed base. Shipping locales is also not a reason for anything in
|
|
160
147
|
the code to stop being English: identifiers are English in every project, and
|
|
161
148
|
the language of `description`/`title`/`template` is `metaLocale` in
|
|
162
|
-
`pikku.config.json`. See `
|
|
149
|
+
`pikku.config.json`. See `references/app.md` §1a.
|
|
163
150
|
|
|
164
151
|
### Emails — `pikku-emails`
|
|
165
152
|
|
|
@@ -168,7 +155,7 @@ localised like every other string. The base workflow asks for one; **a showcase
|
|
|
168
155
|
sends three** — a welcome, a transactional confirmation, and one sent from a
|
|
169
156
|
schedule or queue rather than a request, because that is the interesting path.
|
|
170
157
|
|
|
171
|
-
### Contract versioning — `pikku-
|
|
158
|
+
### Contract versioning — `pikku-meta`
|
|
172
159
|
|
|
173
160
|
```sh
|
|
174
161
|
bunx --bun pikku versions init
|
|
@@ -186,7 +173,7 @@ the domain has a piece that genuinely belongs to no single app.
|
|
|
186
173
|
|
|
187
174
|
## Coverage — where the bar is higher than the base workflow
|
|
188
175
|
|
|
189
|
-
`
|
|
176
|
+
`references/app.md` §7a already has the mechanics and the per-milestone habit:
|
|
190
177
|
run the server instrumented, run the scenarios against it, read
|
|
191
178
|
`coverage/scenario-coverage.json`, and triage every gap as a missing scenario, a
|
|
192
179
|
function that should not exist, or a documented deferral. Do all of that here.
|
|
@@ -205,7 +192,7 @@ Two things change in a showcase:
|
|
|
205
192
|
|
|
206
193
|
## The full gate
|
|
207
194
|
|
|
208
|
-
Everything in `
|
|
195
|
+
Everything in `references/app.md` §9, plus the checks a showcase should be able to
|
|
209
196
|
survive:
|
|
210
197
|
|
|
211
198
|
```sh
|
|
@@ -227,7 +214,7 @@ bunx --bun pikku scenario run local --spawn --run browser
|
|
|
227
214
|
|
|
228
215
|
## Deploy
|
|
229
216
|
|
|
230
|
-
`
|
|
217
|
+
`references/app.md` §9 covers the open-source paths (`--provider standalone`,
|
|
231
218
|
`cloudflare`, `aws`). One thing specific to this mode: **the extra surfaces are
|
|
232
219
|
extra deploy units.** Workflow workers, queue workers, schedules and the events
|
|
233
220
|
channel each appear in `pikku deploy plan` as their own entries. Read the plan
|
|
@@ -236,10 +223,8 @@ built.
|
|
|
236
223
|
|
|
237
224
|
## Reference
|
|
238
225
|
|
|
239
|
-
- Base workflow: `
|
|
240
|
-
- Per-surface skills: `pikku-workflow`, `pikku-
|
|
241
|
-
`pikku-
|
|
242
|
-
`pikku-
|
|
243
|
-
`pikku-emails`, `pikku-versioning`, `pikku-addon`, `pikku-security`,
|
|
244
|
-
`pikku-audit`
|
|
226
|
+
- Base workflow: `references/app.md` — read it first, follow it in full
|
|
227
|
+
- Per-surface skills: `pikku-workflow`, `pikku-wiring`, `pikku-agent`,
|
|
228
|
+
`pikku-i18n`, `pikku-emails`,
|
|
229
|
+
`pikku-meta`, `pikku-addon`, `pikku-auth`, `pikku-services`
|
|
245
230
|
- Every feature, end to end: https://pikkufabric.com/llm-all-features.txt
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pikku-template-clone
|
|
3
|
-
description: 'Standard cleanup to run right after a Pikku template is cloned or scaffolded into a new project. TRIGGER when: a Pikku template was just cloned/scaffolded (via `npm create pikku`, `git clone <template>`, or the user says "I cloned the kanban template / starter / template"), or the working tree still looks like an untouched template (template README, placeholder `@project/*` name in package.json). DO NOT TRIGGER when: working in an established project mid-feature, or editing the template repo itself.'
|
|
4
|
-
allowed-tools: Bash(git status *), Bash(git add *), Bash(git commit *), Bash(git rm *), Bash(git mv *), Bash(git log *)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# Pikku Template Post-Clone Cleanup
|
|
8
2
|
|
|
9
3
|
## Agent Operating Procedure
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pikku-build-quick
|
|
3
|
-
description: >-
|
|
4
|
-
Build a working app on open-source Pikku fast — scaffold to running screens, skipping the
|
|
5
|
-
knowledge base and the milestone ladder. For spikes, throwaway demos, and ideas nobody has
|
|
6
|
-
committed to yet. TRIGGER when: the user asked for something quick, a prototype, a spike, a
|
|
7
|
-
demo of an idea, or "just get it running", or picked "Quick" from the build-mode question. DO
|
|
8
|
-
NOT TRIGGER when: the request is an unqualified "build me an X on Pikku" with no signal of
|
|
9
|
-
speed or throwaway-ness — App is the default and small or toy-sounding apps do not change that
|
|
10
|
-
(use pikku-build-app); the user wants a real product someone else will pick up (use
|
|
11
|
-
pikku-build-app); the user wants a demo of Pikku itself — one that shows off surfaces like
|
|
12
|
-
workflows, queues, realtime or i18n (use pikku-build-platform); or the user is adding a feature
|
|
13
|
-
to an app that already exists rather than building one from a fresh scaffold (use
|
|
14
|
-
pikku-feature).
|
|
15
|
-
---
|
|
16
|
-
|
|
17
1
|
# Build an app on Pikku, fast
|
|
18
2
|
|
|
19
3
|
You have a scaffolded project with skills installed. Get it to working, seeded,
|
|
@@ -58,7 +42,7 @@ Identifiers are English in every project, whatever the product's market;
|
|
|
58
42
|
`template`, which the Console renders) stays `en` unless the user already told
|
|
59
43
|
you otherwise. If the request says the app's UI is not English, that is the
|
|
60
44
|
message catalogue only: add the locale and set `defaultLocale`, and leave
|
|
61
|
-
`baseLocale` at `en`. `
|
|
45
|
+
`baseLocale` at `en`. `references/app.md` §1a has the three axes in full; getting
|
|
62
46
|
them confused is how a project ends up unable to add a second language.
|
|
63
47
|
|
|
64
48
|
## 2. Personas — 60 seconds, not optional
|
|
@@ -191,7 +175,7 @@ taller than the viewport. It is the most likely width your demo gets opened at.
|
|
|
191
175
|
If you have five spare minutes, `npx impeccable install` (Node 22.18+) scores
|
|
192
176
|
each screen against interaction heuristics and names what is wrong. Feed it
|
|
193
177
|
screenshots, not source. It will polish the default look; it will not give the
|
|
194
|
-
app a look — that is `
|
|
178
|
+
app a look — that is `references/app.md` §8a.
|
|
195
179
|
|
|
196
180
|
## 5. One smoke scenario
|
|
197
181
|
|
|
@@ -235,7 +219,7 @@ that this is a quick build — no knowledge base, no milestones, no design pass,
|
|
|
235
219
|
access control clicked-through rather than proven.
|
|
236
220
|
|
|
237
221
|
**Upgrading to a real build is additive, not a rewrite.** If they want it, switch
|
|
238
|
-
to `
|
|
222
|
+
to `references/app.md` and do this, in order:
|
|
239
223
|
|
|
240
224
|
1. Write `knowledge/` for what already exists — `entities/` for what you built,
|
|
241
225
|
`decisions/` for what you chose silently, `questions/` for what you guessed
|
|
@@ -244,7 +228,7 @@ to `pikku-build-app` and do this, in order:
|
|
|
244
228
|
its gherkin block.
|
|
245
229
|
3. Write the refusal scenarios — the ones proving one persona cannot reach
|
|
246
230
|
another's rows. This is the gap that matters most.
|
|
247
|
-
4. Then pick up `
|
|
231
|
+
4. Then pick up `references/app.md` at its §4 (apps) or §5 (milestones) for
|
|
248
232
|
anything new.
|
|
249
233
|
|
|
250
234
|
Nothing built here has to be thrown away to do that — which is the whole reason
|
|
@@ -16,7 +16,7 @@ bunx --bun pikku deploy apply --provider standalone --runtime bun
|
|
|
16
16
|
bundles the project into a single unit and emits either a `bundle.js` you run
|
|
17
17
|
with Node, or a self-contained executable compiled with `bun build --compile`.
|
|
18
18
|
`cloudflare` (the default) and `aws` are the other providers — read the
|
|
19
|
-
`pikku-deploy
|
|
19
|
+
`pikku-deploy` skill before using it, as it ships the handler
|
|
20
20
|
factories the deploy codegen expects, and hand-rolling an `ExportedHandler` is
|
|
21
21
|
how a worker deploy fails at runtime instead of at build.
|
|
22
22
|
|
|
@@ -74,13 +74,19 @@ Everything above is open source. This is the contract that keeps
|
|
|
74
74
|
- **`pikkufabric.config.json` describes reality.** Every app has an entry with
|
|
75
75
|
the right `cwd`, `port`, `kind` and `dev.command`; exactly one is `primary`;
|
|
76
76
|
`serves` and `personas` name real personas from the personas section. Leave `projectId` as
|
|
77
|
-
`__PROJECT_ID__` — that placeholder means "unlinked", and
|
|
78
|
-
the real one. Do not invent a value to make it look configured.
|
|
77
|
+
`__PROJECT_ID__` — that placeholder means "unlinked", and linking the project
|
|
78
|
+
writes the real one. Do not invent a value to make it look configured.
|
|
79
79
|
- **One `definePersonas` call**, every persona reachable through exactly one
|
|
80
80
|
frontend. Fabric materialises these as its virtual users; a persona nobody
|
|
81
81
|
serves imports as a person with no way in.
|
|
82
82
|
- **`knowledge/` passes `validate`, with every milestone at `built`.** This is
|
|
83
83
|
the part Fabric itself reads and continues from.
|
|
84
|
+
- **Every `built` milestone passes `pikku knowledge plan progress`.** A note that
|
|
85
|
+
says `built` is a claim; the plan reconciled against the generated meta is the
|
|
86
|
+
check. Anything the first pass still owes is either built now or deferred with
|
|
87
|
+
its reason on the record; anything the check calls a problem — something that
|
|
88
|
+
exists and does not do what was planned — is fixed, whatever pass it came from,
|
|
89
|
+
because deferring it defers a hole rather than the work.
|
|
84
90
|
- **Every milestone has a passing scenario**, including its refusals.
|
|
85
91
|
- **Permissions live in the `permissions` field**, not in function bodies and not
|
|
86
92
|
in the frontends. A check hidden in a component does not survive a new client.
|