@pikku/skills 0.12.35 → 0.12.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +9 -5
- package/dist/skills.gen.d.ts +1 -0
- package/dist/skills.gen.js +5 -3
- package/dist/snippets.d.ts +26 -0
- package/dist/snippets.js +148 -0
- package/package.json +2 -2
- package/skills/pikku-addon/SKILL.md +70 -24
- package/skills/pikku-addon/references/addon-package-manifest.md +9 -4
- package/skills/pikku-addon/references/openapi.md +130 -0
- package/skills/pikku-agent/references/agents.md +3 -1
- package/skills/pikku-auth/references/better-auth.md +33 -2
- package/skills/pikku-build/SKILL.md +94 -6
- package/skills/pikku-build/references/app.md +82 -12
- package/skills/pikku-build/references/design.md +16 -5
- package/skills/pikku-build/references/feature.md +23 -96
- package/skills/pikku-build/references/openapi.md +119 -0
- package/skills/pikku-build/references/platform.md +4 -0
- package/skills/pikku-build/references/quick.md +16 -6
- package/skills/pikku-changes/SKILL.md +172 -0
- package/skills/pikku-concepts/SKILL.md +33 -138
- package/skills/pikku-concepts/references/bootstrap.md +58 -0
- package/skills/pikku-concepts/references/concept-mapping.md +16 -0
- package/skills/pikku-concepts/references/language.md +87 -0
- package/skills/pikku-deploy/SKILL.md +1 -1
- package/skills/pikku-fabric/SKILL.md +13 -13
- package/skills/pikku-guide/SKILL.md +264 -0
- package/skills/pikku-kysely/SKILL.md +1 -1
- package/skills/pikku-n8n-import/SKILL.md +4 -3
- package/skills/pikku-react/references/client.md +12 -0
- package/skills/pikku-realtime/SKILL.md +6 -6
- package/skills/pikku-report/SKILL.md +143 -0
- package/skills/pikku-scenario/SKILL.md +71 -562
- package/skills/pikku-scenario/references/browser.md +59 -0
- package/skills/pikku-scenario/references/coverage.md +70 -0
- package/skills/pikku-scenario/references/personas.md +149 -0
- package/skills/pikku-scenario/references/steps.md +366 -0
- package/skills/pikku-service-backends/SKILL.md +1 -1
- package/skills/pikku-wiring/SKILL.md +1 -1
- package/skills/pikku-workflow/SKILL.md +7 -8
|
@@ -23,7 +23,7 @@ Use this skill as an execution checklist, not reference material.
|
|
|
23
23
|
1. Discover before editing. Run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
24
24
|
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.
|
|
25
25
|
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
26
|
-
4. Validate with the narrowest relevant command first, then run `pikku
|
|
26
|
+
4. Validate with the narrowest relevant command first, then run `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
27
27
|
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
28
28
|
|
|
29
29
|
## Before you start
|
|
@@ -16,12 +16,12 @@ installGroups: [core]
|
|
|
16
16
|
|
|
17
17
|
Use this skill as an execution checklist, not reference material.
|
|
18
18
|
|
|
19
|
-
1. Capture baseline. Run `pikku
|
|
20
|
-
2. Discover before editing. Prefer `pikku
|
|
19
|
+
1. Capture baseline. Run `pikku all` BEFORE writing code; note existing errors — only NEW errors are yours to fix.
|
|
20
|
+
2. Discover before editing. Prefer `pikku meta` / `pikku info functions --verbose` and `pikku info tags --verbose` to see functions usable as steps and project organization; inspect only the focused output you need.
|
|
21
21
|
3. Identify the source files that own the behavior. Do not start from generated output, `.pikku`, `node_modules`, vendored packages, or build artifacts.
|
|
22
22
|
4. Make the smallest source change. Keep generated files generated — never hand-edit SDKs, schema output, or typegen to paper over errors; fix the source cause.
|
|
23
|
-
5. Validate with the narrowest relevant command, then re-run `pikku
|
|
24
|
-
6.
|
|
23
|
+
5. Validate with the narrowest relevant command, then re-run `pikku all`. If only files you did not touch still error, those are pre-existing — leave them unless asked.
|
|
24
|
+
6. Only claim success when `pikku all` and `tsc` both pass (codegen AND type check green) — never after a partial pass.
|
|
25
25
|
|
|
26
26
|
See `pikku-concepts` for the core mental model.
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ The deciding question is: **does any part of this cross an external boundary tha
|
|
|
33
33
|
|
|
34
34
|
- **Checkout WITH payment → workflow.** Get cart → compute total → **(atomic: create order + order items, deduct stock, clear cart)** → **charge payment through the provider** → send confirmation email. It's a workflow because the payment leg (and the email) are external and must be **retried, not lost, and not charged twice** across a restart — and the user benefits from seeing where the run is.
|
|
35
35
|
- **Checkout with NO external payment** — e.g. it just records the order and decrements stock in one transaction, nothing leaves the process — is a **single-shot algorithm**: a plain `pikkuFunc` wrapping one `kysely.transaction`. Not a workflow. A workflow here would add durability machinery for a thing that already commits atomically in one shot.
|
|
36
|
-
- **One durable step is NOT a workflow — it's a queue worker.** A lone side-effect that must be retried / not lost (send one email, fire one webhook, one external charge) → a **queue worker** (`pikku-queue
|
|
36
|
+
- **One durable step is NOT a workflow — it's a queue worker.** A lone side-effect that must be retried / not lost (send one email, fire one webhook, one external charge) → a **queue worker** (see `pikku-wiring`'s queue reference), enqueued fire-and-forget. A workflow adds a step graph for a thing that has no steps to orchestrate. (A single non-durable step is just a direct RPC call.)
|
|
37
37
|
- Also workflows: onboarding sequences, settlements/payouts, digests and batch sends, anything that waits (`sleep`/`suspend`) or fans out with retries — the common thread is **multiple** steps or a durable wait, never a single step.
|
|
38
38
|
|
|
39
39
|
**HARD RULE — never a single-RPC (one-step) workflow.** A workflow whose body is one `workflow.do('x', 'someRpc', …)` is a mislabeled durable function, not orchestration. Route by durability, NOT into a workflow:
|
|
@@ -310,12 +310,11 @@ export const userOnboarding = pikkuWorkflowGraph({
|
|
|
310
310
|
|
|
311
311
|
## Step dispatch & HTTP wiring
|
|
312
312
|
|
|
313
|
-
For per-step inline-vs-queue dispatch (`workflowQueued: true` and the `dispatchStep` rules)
|
|
313
|
+
For per-step inline-vs-queue dispatch (`workflowQueued: true` and the `dispatchStep` rules) and a suspend/resume example, read `references/workflow-reference.md`.
|
|
314
314
|
|
|
315
315
|
## After writing
|
|
316
316
|
|
|
317
|
-
1. `pikku
|
|
317
|
+
1. `pikku all`, then `tsc --noEmit` (codegen + type check).
|
|
318
318
|
2. PKU641 → a `const`/`let` is inside a block; hoist it to the top of the function body.
|
|
319
319
|
3. Import errors → use `#pikku/workflow/pikku-workflow-types.gen.js`, not `#pikku`.
|
|
320
320
|
4. Type errors only in files you did not touch → pre-existing template errors; safe to ignore.
|
|
321
|
-
5. Both green → call `pikku-workflow-view` with the workflow name.
|