@pikku/skills 0.12.13 → 0.12.15
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 +58 -0
- package/dist/skills.gen.js +1 -1
- package/package.json +1 -1
- package/skills/pikku-ai-vercel/SKILL.md +1 -1
- package/skills/pikku-ai-voice/SKILL.md +1 -0
- package/skills/pikku-audit/SKILL.md +0 -1
- package/skills/pikku-better-auth/SKILL.md +1 -1
- package/skills/pikku-build-app/SKILL.md +0 -1
- package/skills/pikku-build-platform/SKILL.md +3 -4
- package/skills/pikku-build-quick/SKILL.md +0 -1
- package/skills/pikku-cli/SKILL.md +1 -1
- package/skills/pikku-concepts/SKILL.md +58 -16
- package/skills/pikku-concepts/references/concept-mapping.md +1 -1
- package/skills/pikku-deploy-cloudflare/SKILL.md +0 -1
- package/skills/pikku-deps/SKILL.md +0 -1
- package/skills/pikku-emails/SKILL.md +1 -1
- package/skills/pikku-fabric/SKILL.md +55 -4
- package/skills/pikku-feature/SKILL.md +0 -1
- package/skills/pikku-gateway-slack/SKILL.md +1 -0
- package/skills/pikku-i18n/SKILL.md +1 -1
- package/skills/pikku-jose/SKILL.md +1 -0
- package/skills/pikku-knowledge/SKILL.md +0 -1
- package/skills/pikku-kysely/SKILL.md +1 -1
- package/skills/pikku-machine-auth/SKILL.md +1 -0
- package/skills/pikku-meta/SKILL.md +139 -0
- package/skills/pikku-n8n-import/SKILL.md +1 -0
- package/skills/pikku-paraglide/SKILL.md +1 -1
- package/skills/pikku-product-second-opinion/SKILL.md +0 -1
- package/skills/pikku-queue/SKILL.md +1 -1
- package/skills/pikku-react/SKILL.md +1 -1
- package/skills/pikku-react-query/SKILL.md +1 -1
- package/skills/pikku-realtime/SKILL.md +0 -1
- package/skills/pikku-rpc/SKILL.md +1 -1
- package/skills/pikku-rtl/SKILL.md +1 -1
- package/skills/pikku-scenario/SKILL.md +29 -2
- package/skills/pikku-schedule/SKILL.md +178 -50
- package/skills/pikku-schema-ajv/SKILL.md +0 -1
- package/skills/pikku-schema-cfworker/SKILL.md +0 -1
- package/skills/pikku-security/SKILL.md +2 -2
- package/skills/pikku-software-archaeology/SKILL.md +0 -1
- package/skills/pikku-template-clone/SKILL.md +0 -1
- package/skills/pikku-trigger/SKILL.md +1 -1
- package/skills/pikku-versioning/SKILL.md +0 -1
- package/skills/pikku-workflow/SKILL.md +1 -1
- package/skills/pikku-workflows-client/SKILL.md +1 -1
- package/skills/pikku-ws/SKILL.md +1 -0
- package/skills/pikku-cron/SKILL.md +0 -221
- package/skills/pikku-info/SKILL.md +0 -110
- package/skills/pikku-tag-middleware/SKILL.md +0 -14
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
VercelAgentRunner, user asks about Vercel AI SDK integration, AI agent runners, or
|
|
7
7
|
@pikku/ai-vercel. DO NOT TRIGGER when: user asks about AI agent wiring (use pikku-agent) or
|
|
8
8
|
voice I/O (use pikku-ai-voice).
|
|
9
|
-
installGroups: [
|
|
9
|
+
installGroups: [fabric]
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Pikku AI Vercel (Agent Runner)
|
|
@@ -7,6 +7,7 @@ description: >-
|
|
|
7
7
|
agents, speech-to-text, text-to-speech, transcription, or @pikku/ai-voice. DO NOT TRIGGER when:
|
|
8
8
|
user asks about AI agent wiring generally (use pikku-agent) or the runner itself (use
|
|
9
9
|
pikku-ai-vercel).
|
|
10
|
+
installGroups: [fabric]
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
# Pikku AI Voice (Speech I/O)
|
|
@@ -10,7 +10,6 @@ description: >-
|
|
|
10
10
|
uses auditLog, createInvocationAudit, createAuditedKysely, or AuditService. DO NOT TRIGGER when:
|
|
11
11
|
user wants app logging/telemetry (use the logger) or DB migrations in general (use
|
|
12
12
|
pikku-kysely).
|
|
13
|
-
installGroups: [core]
|
|
14
13
|
---
|
|
15
14
|
|
|
16
15
|
# Pikku Audit
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
user asks about ANY form of authentication, login, logout, sessions, or user identity — always
|
|
11
11
|
answer with this skill. DO NOT TRIGGER when: user asks about JWT middleware (use pikku-security)
|
|
12
12
|
or custom session services (use pikku-services).
|
|
13
|
-
installGroups: [
|
|
13
|
+
installGroups: [fabric]
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# Pikku Better Auth Integration
|
|
@@ -10,7 +10,6 @@ description: >-
|
|
|
10
10
|
something quick or throwaway (use pikku-build-quick), wants every platform surface demonstrated
|
|
11
11
|
(use pikku-build-platform), or is adding one feature to an app that already has its knowledge
|
|
12
12
|
base and milestones (use pikku-feature).
|
|
13
|
-
installGroups: [core]
|
|
14
13
|
---
|
|
15
14
|
|
|
16
15
|
# Build a product on open-source Pikku
|
|
@@ -8,8 +8,7 @@ description: >-
|
|
|
8
8
|
app, or asked to demonstrate what Pikku can do. DO NOT TRIGGER when: the user wants a product
|
|
9
9
|
built (use pikku-build-app), something quick (use pikku-build-quick), or one specific surface
|
|
10
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-
|
|
12
|
-
installGroups: [core]
|
|
11
|
+
e.g. pikku-workflow, pikku-schedule, pikku-agent).
|
|
13
12
|
---
|
|
14
13
|
|
|
15
14
|
# Build a platform showcase on Pikku
|
|
@@ -90,7 +89,7 @@ on a human or a timer and must survive a restart.
|
|
|
90
89
|
from the UI.
|
|
91
90
|
- Three workflows ship with the template. Read them before writing yours.
|
|
92
91
|
|
|
93
|
-
### Schedules — `pikku-schedule`
|
|
92
|
+
### Schedules — `pikku-schedule`
|
|
94
93
|
|
|
95
94
|
Recurring work: a nightly rollup, a reminder sweep, an expiry pass.
|
|
96
95
|
|
|
@@ -231,7 +230,7 @@ built.
|
|
|
231
230
|
## Reference
|
|
232
231
|
|
|
233
232
|
- Base workflow: `pikku-build-app` — read it first, follow it in full
|
|
234
|
-
- Per-surface skills: `pikku-workflow`, `pikku-schedule`,
|
|
233
|
+
- Per-surface skills: `pikku-workflow`, `pikku-schedule`,
|
|
235
234
|
`pikku-queue`, `pikku-agent`, `pikku-ai-vercel`, `pikku-realtime`,
|
|
236
235
|
`pikku-websocket`, `pikku-mcp`, `pikku-trigger`, `pikku-i18n`, `pikku-rtl`,
|
|
237
236
|
`pikku-emails`, `pikku-versioning`, `pikku-addon`, `pikku-security`,
|
|
@@ -12,7 +12,6 @@ description: >-
|
|
|
12
12
|
workflows, queues, realtime or i18n (use pikku-build-platform); or the user is adding a feature
|
|
13
13
|
to an app that already exists rather than building one from a fresh scaffold (use
|
|
14
14
|
pikku-feature).
|
|
15
|
-
installGroups: [core]
|
|
16
15
|
---
|
|
17
16
|
|
|
18
17
|
# Build an app on Pikku, fast
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
options, parameters, custom renderers, and nested command groups. TRIGGER when: code uses
|
|
6
6
|
wireCLI/pikkuCLICommand, user asks about CLI commands, terminal tools, command-line interface,
|
|
7
7
|
or adding subcommands. DO NOT TRIGGER when: user asks about the pikku CLI tool itself (use
|
|
8
|
-
pikku-
|
|
8
|
+
pikku-meta) or HTTP endpoints (use pikku-http).
|
|
9
9
|
installGroups: [core]
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-concepts
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
Use FIRST in any Pikku codebase, before writing an import or reaching for another pikku skill.
|
|
5
|
+
Covers the core mental model, function types, project structure, code generation and testing,
|
|
6
|
+
and how to read `pikku doc` — the API surface of the pikku actually installed here, which also
|
|
7
|
+
indexes which skill teaches each door. TRIGGER when: starting any Pikku task, about to import
|
|
8
|
+
from `#pikku/*`, unsure whether an export exists or what its options are called, choosing which
|
|
9
|
+
pikku skill to load, a build failed on an unknown import or option, or migrating an existing
|
|
10
|
+
backend to Pikku. DO NOT TRIGGER when: the task is not a Pikku project.
|
|
11
11
|
installGroups: [core]
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ installGroups: [core]
|
|
|
17
17
|
|
|
18
18
|
Use this skill as an execution checklist, not reference material.
|
|
19
19
|
|
|
20
|
-
1. Discover before editing. Run the relevant `pikku meta ... --json`
|
|
20
|
+
1. Discover before editing. Run `pikku doc --ai` for the installed API surface, and the relevant `pikku meta ... --json` for what this project has wired.
|
|
21
21
|
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
22
22
|
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
23
23
|
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
@@ -25,12 +25,54 @@ Use this skill as an execution checklist, not reference material.
|
|
|
25
25
|
|
|
26
26
|
Pikku is a TypeScript framework that separates business logic from transport mechanisms. You define a function once, then wire it to HTTP, WebSocket, queues, schedulers, MCP, CLI, or RPC — without the function knowing how it's being called.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
## Ask The Installed Pikku, Don't Guess
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
Pikku generates `#pikku/*` imports per project and changes between versions. Anything you
|
|
31
|
+
remember about its API may be from a different version than the one in this directory.
|
|
32
|
+
Everything below is the mental model; `pikku doc` is the API surface, computed when the
|
|
33
|
+
installed CLI was built. It needs no config and works outside a project.
|
|
34
|
+
|
|
35
|
+
**Do not write an import, an export name, or an option key you have not seen in `pikku doc`.**
|
|
36
|
+
A name that looks right and is not costs a full build cycle to discover. If the doc does not
|
|
37
|
+
list it, it does not exist here — do not reach into `node_modules` or `.pikku` for something
|
|
38
|
+
that will work anyway.
|
|
39
|
+
|
|
40
|
+
### Start here, every time
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
pikku doc --ai
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
≈480 tokens, giving the 20 `#pikku/*` doors grouped by the job they do, and beside each the
|
|
47
|
+
skill that teaches it. Read that routing table as the index to every other pikku skill — it is
|
|
48
|
+
generated from the installed version, so it never names a skill for a door that no longer exists.
|
|
49
|
+
|
|
50
|
+
Then go one of two ways. For **what exists** — the exact export name, its options, its
|
|
51
|
+
signature — stay in the doc:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
pikku doc http one door: its exports, each with a signature or a key count
|
|
55
|
+
pikku doc wireHTTP one export: signature, every key with what it is for
|
|
56
|
+
pikku doc wireHTTP pikkuFunc several topics in one call, rather than one call each
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
For **how it fits together** — composition, lifecycle, the generated client — load the skill
|
|
60
|
+
the routing table named. The doc lists keys; it does not teach patterns.
|
|
61
|
+
|
|
62
|
+
On a door screen, `N keys — pikku doc X` means a second call buys you something; an inlined
|
|
63
|
+
signature means it does not. Error classes carry the HTTP status they are registered with,
|
|
64
|
+
which is what decides whether a thrown error becomes a 409 or a 500.
|
|
65
|
+
|
|
66
|
+
### Two things the doc will not give you
|
|
67
|
+
|
|
68
|
+
- **Worked examples are sparse.** Most exports show a signature and keys, not usage.
|
|
69
|
+
- **`pikkuFunc` lists keys that belong elsewhere.** `before`, `after`, `skip`, `surfaces` and
|
|
70
|
+
`requiresActor` apply only to scenarios; `workflowQueued`, `workflowRetries` and
|
|
71
|
+
`workflowTimeout` only to a workflow step. One shared config type offers all of them to
|
|
72
|
+
every function — each key says which it belongs to.
|
|
73
|
+
|
|
74
|
+
`pikku doc` needs `@pikku/cli` 0.12.115 or newer. On an older pin, fall back to the door's
|
|
75
|
+
skill and `pikku meta --json`, and do not guess at names the doc would have given you.
|
|
34
76
|
|
|
35
77
|
## Core Mental Model
|
|
36
78
|
|
|
@@ -59,7 +101,7 @@ The function never imports Express, never reads `req.body`, never touches `ws.se
|
|
|
59
101
|
|
|
60
102
|
## Concept Mapping: Generic Backend → Pikku
|
|
61
103
|
|
|
62
|
-
Controllers/routes → `pikkuFunc`; auth/sessions → `pikku-security
|
|
104
|
+
Controllers/routes → `pikkuFunc`; auth/sessions → `pikku-security`, a separate install; authorization checks → `pikku-permissions`; request interception → `pikku-middleware`; DI → `pikku-services`; transports (HTTP/WS/queue/cron) → their `wire*` + skill. For the full Generic Backend → Pikku mapping table (with side-by-side code examples), read `references/concept-mapping.md`.
|
|
63
105
|
|
|
64
106
|
## Functions
|
|
65
107
|
|
|
@@ -270,8 +312,8 @@ src/
|
|
|
270
312
|
├── schemas.ts # Zod/Valibot schemas
|
|
271
313
|
├── services.ts # Service factories (see pikku-services)
|
|
272
314
|
├── lifecycle.ts # Server lifecycle hooks (pikku dev/serve only)
|
|
273
|
-
├── middleware.ts # Middleware definitions (see pikku-
|
|
274
|
-
├── permissions.ts # Permission definitions (see pikku-
|
|
315
|
+
├── middleware.ts # Middleware definitions (see pikku-middleware)
|
|
316
|
+
├── permissions.ts # Permission definitions (see pikku-permissions)
|
|
275
317
|
└── .pikku/ # Generated (gitignored)
|
|
276
318
|
├── function/ # #pikku/function
|
|
277
319
|
├── http/ # #pikku/http
|
|
@@ -15,7 +15,7 @@ Authoritative mapping table plus side-by-side code examples showing how common b
|
|
|
15
15
|
| **Dependency Injection** | `pikkuServices` (singleton) + `pikkuWireServices` (per-request) | `pikku-services` |
|
|
16
16
|
| **WebSocket handlers** | `wireChannel` | `pikku-websocket` |
|
|
17
17
|
| **Job Queue workers** | `wireQueueWorker` | `pikku-queue` |
|
|
18
|
-
| **Cron / Scheduled tasks** | `wireScheduler` | `pikku-
|
|
18
|
+
| **Cron / Scheduled tasks** | `wireScheduler` | `pikku-schedule` |
|
|
19
19
|
| **Module / Feature grouping** | Tags + wiring files | `pikku-concepts` |
|
|
20
20
|
| **Error handling** | Throw typed errors (`NotFoundError`, `ForbiddenError`) | `pikku-concepts` |
|
|
21
21
|
| **Type-safe API client** | `npx pikku all` generates clients | `pikku-concepts` |
|
|
@@ -5,7 +5,6 @@ description: >-
|
|
|
5
5
|
tasks, and WebSocket via Durable Objects. TRIGGER when: code imports @pikku/cloudflare, user
|
|
6
6
|
mentions Cloudflare Workers deployment, or worker entry uses ExportedHandler/wrangler.toml. DO
|
|
7
7
|
NOT TRIGGER when: just defining functions/wirings without Cloudflare-specific code.
|
|
8
|
-
installGroups: [fabric]
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Pikku Cloudflare Workers Deployment
|
|
@@ -12,7 +12,6 @@ description: >-
|
|
|
12
12
|
reading/rendering audit.json. DO NOT TRIGGER when: user asks about authentication/sessions/JWT
|
|
13
13
|
(use pikku-security), permissions (use pikku-permissions), or secrets/env vars (use
|
|
14
14
|
pikku-config).
|
|
15
|
-
installGroups: [core]
|
|
16
15
|
---
|
|
17
16
|
|
|
18
17
|
# Pikku Dependency Audit
|
|
@@ -10,7 +10,7 @@ description: >-
|
|
|
10
10
|
email (verification, password reset, invitation, receipt), wire email sending, or translate an
|
|
11
11
|
email. DO NOT TRIGGER when: user asks about i18n for the app UI (use pikku-i18n) or auth flows
|
|
12
12
|
in general (use pikku-better-auth).
|
|
13
|
-
installGroups: [
|
|
13
|
+
installGroups: [fabric]
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
# Pikku Emails
|
|
@@ -273,13 +273,64 @@ reload).
|
|
|
273
273
|
pikku fabric login # opens a browser; needs a human, wait for it
|
|
274
274
|
pikku fabric init https://github.com/<owner>/<repo>
|
|
275
275
|
pikku fabric validate # must pass clean
|
|
276
|
-
pikku fabric deploy
|
|
277
|
-
pikku fabric deploy apply --production --auto-apply
|
|
276
|
+
pikku fabric deploy apply --production --sync --auto-approve
|
|
278
277
|
```
|
|
279
278
|
|
|
279
|
+
There is no `deploy plan` subcommand — `apply` runs the same auth, git-safety
|
|
280
|
+
and ref resolution itself, and fabric produces the real plan server-side.
|
|
281
|
+
|
|
280
282
|
`apply` confirms before deploying, and with no TTY to ask — CI, an agent shell —
|
|
281
|
-
it refuses rather than hangs. `--auto-
|
|
282
|
-
only when a human is at a real terminal.
|
|
283
|
+
it refuses rather than hangs. `--auto-approve` supplies that confirmation; drop
|
|
284
|
+
it only when a human is at a real terminal.
|
|
285
|
+
|
|
286
|
+
By default `apply` queues the deploy, prints the deployment id and returns. That
|
|
287
|
+
tells you nothing about whether it worked. `--sync` waits for a terminal state
|
|
288
|
+
and exits non-zero unless the deployment went live, which is the only form worth
|
|
289
|
+
running in CI:
|
|
290
|
+
|
|
291
|
+
| exit | meaning |
|
|
292
|
+
| ---- | ------- |
|
|
293
|
+
| 0 | live (or queued, without `--sync`) |
|
|
294
|
+
| 1 | the command could not run — not logged in, unsafe git state, bad flags |
|
|
295
|
+
| 2 | the deployment failed, errored, timed out server-side, or was cancelled |
|
|
296
|
+
| 3 | the deployment is blocked and nothing the CLI can do will unblock it |
|
|
297
|
+
| 4 | the wait hit `--timeout` with the deployment still in flight |
|
|
298
|
+
|
|
299
|
+
Fabric parks every deploy at a gate after the plan phase (`status: suspended`).
|
|
300
|
+
Why it parked is the whole story, and it is `statusReason`, not `status`:
|
|
301
|
+
|
|
302
|
+
- `awaiting_approval` — the plan is fine, a human has to publish it.
|
|
303
|
+
`--auto-approve` does that; without it you get exit 3 and the command to run.
|
|
304
|
+
One exception: if fabric marked any pending migration **destructive** — a
|
|
305
|
+
drop, a truncate, a rewrite — `--auto-approve` alone declines and exits 3,
|
|
306
|
+
because a standing yes was given before anyone knew the plan dropped a table.
|
|
307
|
+
The CLI lists the migrations and fabric's reasons; `--allow-destructive`
|
|
308
|
+
accepts them for that deploy.
|
|
309
|
+
- `needs_config` — a declared secret or variable has no value covering the
|
|
310
|
+
stage. The CLI names them. `--auto-approve` will **not** force this through;
|
|
311
|
+
set the values (`pikku fabric secrets set <name>`) and re-attach.
|
|
312
|
+
- `needs_attention` — the plan is red. Nothing to approve.
|
|
313
|
+
|
|
314
|
+
`--sync` defaults to a 900s ceiling; `--timeout <seconds>` moves it. On timeout
|
|
315
|
+
it prints the deployment id and the re-attach command rather than lying about
|
|
316
|
+
the outcome.
|
|
317
|
+
|
|
318
|
+
Splitting kick-off from waiting across two CI jobs is the reason
|
|
319
|
+
`--deployment-id` exists:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
id=$(pikku fabric deploy apply --production --auto-approve --json | jq -r 'select(.event=="result").deploymentId')
|
|
323
|
+
# …later, in another job…
|
|
324
|
+
pikku fabric deploy apply --deployment-id "$id" --sync --auto-approve
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
`--deployment-id` skips the git safety check entirely (the deployment already
|
|
328
|
+
pins a sha, and the checkout is allowed to have moved on) and refuses to be
|
|
329
|
+
combined with `--branch`/`--production`, which would let the two disagree.
|
|
330
|
+
|
|
331
|
+
Under `--json`, `--sync` emits one NDJSON event per line — `created`/`attached`,
|
|
332
|
+
`status` on each transition, `blocked`, `approved` — and the last line is the
|
|
333
|
+
terminal result object, tagged `"event": "result"`.
|
|
283
334
|
|
|
284
335
|
`init` adopts a **GitHub** repo, and adoption goes through the Pikku Fabric
|
|
285
336
|
GitHub App — the app has to be installed on the account or org that owns the
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-feature
|
|
3
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
|
-
installGroups: [core]
|
|
5
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 *)
|
|
6
5
|
argument-hint: '<feature description>'
|
|
7
6
|
---
|
|
@@ -6,6 +6,7 @@ description: >-
|
|
|
6
6
|
parseSlashCommand, buildSlackInstallUrl, or user asks about Slack integration, Slack bots, or
|
|
7
7
|
@pikku/gateway-slack. DO NOT TRIGGER when: user asks about general gateway/webhook patterns (use
|
|
8
8
|
pikku-trigger).
|
|
9
|
+
installGroups: [core]
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Pikku Gateway Slack
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-i18n
|
|
3
3
|
description: 'Wire i18n into a Pikku frontend with Paraglide JS (inlang). English by default, every user-facing string is a typed message function (`m.some__key()`) compiled from `messages/<locale>.json`, and additional languages are served under `/fr` `/de` URL prefixes. TRIGGER when: scaffolding or editing a frontend and writing user-facing text, adding a second language, or asked to "make this translatable / use tokens / add i18n". DO NOT TRIGGER for backend functions, error messages thrown from functions, or log output.'
|
|
4
|
-
installGroups: [
|
|
4
|
+
installGroups: [client, fabric]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pikku i18n (Paraglide JS)
|
|
@@ -6,6 +6,7 @@ description: >-
|
|
|
6
6
|
code uses JoseJWTService, user asks about JWT setup, token signing, token verification, or
|
|
7
7
|
@pikku/jose. DO NOT TRIGGER when: user asks about session middleware (use pikku-security) or
|
|
8
8
|
general service setup (use pikku-services).
|
|
9
|
+
installGroups: [fabric]
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Pikku Jose (JWT Service)
|
|
@@ -13,7 +13,6 @@ description: >-
|
|
|
13
13
|
brief to record. DO NOT TRIGGER when: user asks what
|
|
14
14
|
functions, routes, tables or permissions exist (that is `pikku meta` / `pikku info`, never a
|
|
15
15
|
note), or to write a scenario test (use pikku-scenario).
|
|
16
|
-
installGroups: [core]
|
|
17
16
|
---
|
|
18
17
|
|
|
19
18
|
# Pikku Knowledge
|
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
PikkuKysely, KyselyChannelStore, KyselyWorkflowService, KyselySecretService, or the user asks
|
|
12
12
|
about SQL setup with Pikku. DO NOT TRIGGER when: user asks about MongoDB (use pikku-mongodb) or
|
|
13
13
|
Redis (use pikku-redis).
|
|
14
|
-
installGroups: [
|
|
14
|
+
installGroups: [fabric]
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
# Pikku Kysely (SQL Database Services)
|
|
@@ -9,6 +9,7 @@ description: >-
|
|
|
9
9
|
credentials, sandbox/worker tokens, or resolving a better-auth session in a Pikku function. DO
|
|
10
10
|
NOT TRIGGER when: user asks about end-user HTTP session/cookie auth only (use pikku-http + the
|
|
11
11
|
app betterAuth config) or about WebSocket channel mechanics (use pikku-websocket).
|
|
12
|
+
installGroups: [fabric]
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
# Pikku Machine Auth
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-meta
|
|
3
|
+
description: >-
|
|
4
|
+
Read and change a Pikku project's declarations without grepping or hand-editing — functions
|
|
5
|
+
(with their transport, middleware and permissions), schemas, workflows, wires, tags, middleware
|
|
6
|
+
and permission definitions, plus `pikku meta apply` to set config on them. TRIGGER when: user
|
|
7
|
+
asks "what functions exist?", "show me the project structure", "list routes/middleware/
|
|
8
|
+
permissions", needs a function's input/output shape, or wants to add a permission, retag a
|
|
9
|
+
function, or change a declaration's config. DO NOT TRIGGER when: user is writing a NEW function
|
|
10
|
+
or wiring (use the specific wiring skill) or asking about Pikku concepts (use pikku-concepts).
|
|
11
|
+
installGroups: [core]
|
|
12
|
+
allowed-tools: Bash(yarn pikku meta *), Bash(yarn pikku info *)
|
|
13
|
+
argument-hint: '[context|functions|schemas|workflows|middleware|permissions|wires|apply]'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Pikku Project Metadata
|
|
17
|
+
|
|
18
|
+
`pikku meta` is the machine-readable view of the project and the write path to it.
|
|
19
|
+
`pikku info` is the same ground as human-readable tables. Prefer `meta` when you are
|
|
20
|
+
going to act on the output; prefer `info` when a person is going to read it.
|
|
21
|
+
|
|
22
|
+
## Agent Operating Procedure
|
|
23
|
+
|
|
24
|
+
Use this skill as an execution checklist, not reference material.
|
|
25
|
+
|
|
26
|
+
1. Discover before editing. Run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
27
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
28
|
+
3. Change a declaration's config with `pikku meta apply`, not by hand-editing the file.
|
|
29
|
+
4. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
30
|
+
5. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
31
|
+
6. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
32
|
+
|
|
33
|
+
## Reading
|
|
34
|
+
|
|
35
|
+
| Command | What it answers |
|
|
36
|
+
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
+
| `pikku meta context` | Everything a planner needs in one call — functions, wires, middleware, permissions, workflows, capabilities, layout. Start here. |
|
|
38
|
+
| `pikku meta functions get <id>` | One function's input/output schema names, source file, tags, expose/readonly |
|
|
39
|
+
| `pikku meta schemas get <name>` | One generated JSON schema |
|
|
40
|
+
| `pikku meta workflows get <id>` | One workflow's steps |
|
|
41
|
+
| `pikku meta permissions list` | What permissions exist and where they are defined |
|
|
42
|
+
| `pikku meta middleware list` | What middleware exists |
|
|
43
|
+
| `pikku meta wires list` | Wires by transport (http, channel, scheduler, queue, trigger) |
|
|
44
|
+
| `pikku meta clients` | Exposed RPCs/workflows/channels with their type names — what a frontend can call |
|
|
45
|
+
|
|
46
|
+
`list` is the default for each group, so `pikku meta functions` and `pikku meta functions list`
|
|
47
|
+
are the same call.
|
|
48
|
+
|
|
49
|
+
A function's input/output shape comes from here. Do not infer it by reading the
|
|
50
|
+
function body, and do not cast a call site to make it compile — the schema is the type.
|
|
51
|
+
|
|
52
|
+
## Changing
|
|
53
|
+
|
|
54
|
+
`pikku meta apply` applies a batch of edits to your own source. Pass JSON as a file
|
|
55
|
+
or on stdin:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pikku meta apply ops.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"operations": [
|
|
64
|
+
{
|
|
65
|
+
"kind": "functionConfig",
|
|
66
|
+
"sourceFile": "src/functions/todos.functions.ts",
|
|
67
|
+
"exportedName": "listTodos",
|
|
68
|
+
"changes": { "title": "List Todos", "tags": ["todos", "read"] }
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
"kind": "functionConfig",
|
|
73
|
+
"sourceFile": "src/functions/todos.functions.ts",
|
|
74
|
+
"exportedName": "listTodos",
|
|
75
|
+
"changes": {
|
|
76
|
+
"permissions": {
|
|
77
|
+
"functionLevel": {
|
|
78
|
+
"name": "isTodoOwner",
|
|
79
|
+
"from": "../permissions.js"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Three kinds: `functionConfig`, `agentConfig`, `functionBody`. Every operation names
|
|
89
|
+
a `sourceFile` and the `exportedName` declared in it.
|
|
90
|
+
|
|
91
|
+
`functionConfig` changes: `title`, `description`, `summary`, `tags`, `errors`,
|
|
92
|
+
`expose`, `remote`, `mcp`, `readonly`, `approvalRequired`, `permissions`.
|
|
93
|
+
`agentConfig` changes: `name`, `description`, `instructions`, `role`, `personality`,
|
|
94
|
+
`goal`, `model`, `maxSteps`, `temperature`, `toolChoice`, `tools`, `tags`.
|
|
95
|
+
|
|
96
|
+
`null` removes a property. Edits are spliced into the original text, so formatting,
|
|
97
|
+
comments and JSDoc survive.
|
|
98
|
+
|
|
99
|
+
`permissions` and `tools` are written as identifiers rather than literals, so each
|
|
100
|
+
one carries the module it comes from (`{"name": "isTodoOwner", "from": "../permissions.js"}`)
|
|
101
|
+
and the missing import is added for you — widening an existing import from that
|
|
102
|
+
module rather than adding a second one.
|
|
103
|
+
|
|
104
|
+
### Why batch
|
|
105
|
+
|
|
106
|
+
The whole batch either lands or it does not: every operation is resolved before
|
|
107
|
+
anything is written, so a failure leaves every file untouched and names the
|
|
108
|
+
operation that caused it. Batching is also what makes one codegen pass correct —
|
|
109
|
+
**run `pikku all` once after the batch**, not once per property. The response tells
|
|
110
|
+
you whether it is needed:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"schemaVersion": "meta-apply.v1",
|
|
115
|
+
"applied": 2,
|
|
116
|
+
"files": ["src/functions/todos.functions.ts"],
|
|
117
|
+
"generatedMetaIsStale": true
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Human-readable tables (`pikku info`)
|
|
122
|
+
|
|
123
|
+
Four subcommands only — `functions`, `tags`, `middleware`, `permissions`. Routes,
|
|
124
|
+
channels, schedulers and queues are not subcommands; they are the _transport_ column
|
|
125
|
+
of `info functions --verbose`.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
yarn pikku info functions --verbose --silent
|
|
129
|
+
yarn pikku info tags --silent
|
|
130
|
+
yarn pikku info middleware --verbose --silent
|
|
131
|
+
yarn pikku info permissions --verbose --silent
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`--silent` suppresses the banner and inspector diagnostics. It works, but it is not
|
|
135
|
+
declared as an option, so every run also prints `Warning: Unknown option: --silent
|
|
136
|
+
(ignored)` — the warning is wrong. Ignore that one line.
|
|
137
|
+
|
|
138
|
+
`--limit N` caps rows (default 50); the footer says how many were withheld.
|
|
139
|
+
On `tags`, `--verbose` swaps counts for names; elsewhere it adds columns.
|
|
@@ -3,6 +3,7 @@ name: pikku-n8n-import
|
|
|
3
3
|
description: 'Use to import an n8n workflow JSON export into a runnable Pikku workflow. Triggers when the user says "import this n8n workflow", "convert this n8n export to pikku", points at an n8n `.json` export or a directory of them, or picks up after `pikku import n8n` left throwing stub functions (`STUB — generated from n8n …`, `— implement me`) or a `<workflow>.integrations.json` manifest. Owns the whole flow: run the importer, triage what it could not map, fill each stub, report any missing `@pikku/addon-*` integrations, and verify the result compiles and runs with no surviving stubs. DO NOT TRIGGER for hand-written addon wiring unrelated to an n8n import (use pikku-addon), or for authoring workflows from scratch (use pikku-workflow).'
|
|
4
4
|
metadata:
|
|
5
5
|
version: 1.0.0
|
|
6
|
+
installGroups: [fabric]
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# n8n → Pikku Import
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-paraglide
|
|
3
3
|
description: 'Generate typed, static enum-label maps for a Paraglide i18n frontend with `@pikku/paraglide`, and reconcile them against the database enum columns so a label can never silently drift from a DB value. Enum-valued labels live under a reserved `enum__<group>__<member>` message namespace; the generator emits `i18n-enum.gen.ts` typed `satisfies EnumLabel<DbEnum>`. TRIGGER when: labelling an enum/status/kind/role value in a Paraglide app, replacing a dynamic `mKey(...)`/`m[...]` lookup with a static map, wiring `@pikku/paraglide` into Vite, or reconciling i18n against `CHECK (col IN (...))` / Postgres enum columns. DO NOT TRIGGER for plain free-text UI copy (that is a normal `m.some_key()` message), backend errors, or logs.'
|
|
4
|
-
installGroups: [
|
|
4
|
+
installGroups: [client]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pikku Paraglide enum labels
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-product-second-opinion
|
|
3
3
|
description: 'Use when a non-technical owner (founder, PM, operator) wants a plain-language report on an app they hold but did not build — explaining how it works and how it could be better. Reads the .knowledge/ blueprint from pikku-software-archaeology and produces a layered, jargon-free report that credits what works, names what does not (with business impact + effort), and argues an opinionated better design. TRIGGER: "explain how my app works", "what would you do differently", "review my app for a non-technical audience", "I inherited/am stuck with an agency-built app", "is this built well?". DO NOT TRIGGER for: extracting the machine-readable blueprint itself (use pikku-software-archaeology), or an engineer-facing technical code review.'
|
|
4
|
-
installGroups: [fabric]
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Product Second Opinion
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
app. Covers wireQueueWorker, job enqueuing, progress tracking, retries, BullMQ and PgBoss
|
|
6
6
|
adapters. TRIGGER when: code uses wireQueueWorker, user asks about background jobs, task queues,
|
|
7
7
|
async processing, BullMQ, PgBoss, or job retries. DO NOT TRIGGER when: user asks about scheduled
|
|
8
|
-
cron tasks (use pikku-
|
|
8
|
+
cron tasks (use pikku-schedule) or event-driven triggers (use pikku-trigger).
|
|
9
9
|
installGroups: [core]
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-react
|
|
3
3
|
description: 'Set up @pikku/react in a React app: PikkuProvider context, createPikku factory, and the usePikkuRPC / usePikkuFetch hooks for direct (non-React-Query) calls. TRIGGER when: the user is bootstrapping a React frontend that talks to a Pikku backend, asks how to wire `PikkuProvider`, or needs to make one-off RPC calls outside of useQuery/useMutation. TRIGGER when: user asks about the dev actor switcher, "sign in as" / quick-login UI, useDevActors, VITE_DEV_ACTORS, or the app-missing-actor-quick-login validate finding. DO NOT TRIGGER when: the user is asking about useQuery/useMutation hooks (use pikku-react-query) or about workflows (use pikku-workflows-client).'
|
|
4
|
-
installGroups: [
|
|
4
|
+
installGroups: [client]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pikku React
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-react-query
|
|
3
3
|
description: 'Use the Pikku auto-generated React Query hooks (`usePikkuQuery`, `usePikkuMutation`, `usePikkuInfiniteQuery`) to call backend RPC functions from a React frontend with full type safety. TRIGGER when: writing React components that need to call a Pikku function, fetch data, mutate data, or paginate; user mentions React Query, useQuery, useMutation, or building a frontend that talks to a Pikku backend. DO NOT TRIGGER when: working on the backend (use pikku-rpc / pikku-feature) or wiring a non-React frontend.'
|
|
4
|
-
installGroups: [
|
|
4
|
+
installGroups: [client, fabric]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pikku React Query Hooks
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-realtime
|
|
3
3
|
description: 'Use Pikku''s realtime feature — typed pub/sub events over WebSocket (multi-topic) or SSE (single-topic, auto-cleanup). Covers declaring EventHubTopics, scaffolding the /events channel, the auto-generated `PikkuRealtime` client, and publishing events from a function. TRIGGER when: the user asks for realtime updates, pub/sub, push notifications, server-sent events, websocket events, eventhub, or "live" data on the frontend. DO NOT TRIGGER when: the user wants RPC-style request/response (use pikku-rpc / pikku-react-query) or a custom one-off WebSocket channel (use pikku-websocket).'
|
|
4
|
-
installGroups: [core]
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Pikku Realtime
|
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
TRIGGER when: code uses wire.rpc or expose: true, user asks about calling one Pikku function
|
|
7
7
|
from another, function composition, or RPC endpoints. DO NOT TRIGGER when: user asks about HTTP
|
|
8
8
|
routes (use pikku-http) or addon cross-package calls (use pikku-addon).
|
|
9
|
-
installGroups: [
|
|
9
|
+
installGroups: [fabric]
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Pikku RPC Wiring
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-rtl
|
|
3
3
|
description: 'Make a Pikku frontend work in both English (LTR) and Arabic / right-to-left languages. Direction is derived from the active locale, applied once at the document root, and the layout mirrors itself — but only if styling is written flow-relative (margin-inline-start, text-align: start, Mantine ms/me) instead of left/right. TRIGGER when: adding Arabic (or Hebrew/Farsi/Urdu), asked to "support RTL / right-to-left / bidi / mirror the layout", or writing layout styles in an app that may run RTL. Builds on pikku-i18n (an RTL language is just another locale file). DO NOT TRIGGER for backend functions or for LTR-only copy changes.'
|
|
4
|
-
installGroups: [
|
|
4
|
+
installGroups: [client]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pikku RTL (Arabic + English)
|