@pikku/skills 0.12.9 → 0.12.11
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 +768 -0
- package/dist/skills.gen.js +1 -1
- package/package.json +4 -4
- package/skills/pikku-addon/SKILL.md +20 -14
- package/skills/pikku-addon/references/addon-package-manifest.md +2 -2
- package/skills/{pikku-ai-agent → pikku-agent}/SKILL.md +24 -24
- package/skills/pikku-ai-vercel/SKILL.md +18 -18
- package/skills/pikku-ai-voice/SKILL.md +15 -15
- package/skills/pikku-audit/SKILL.md +28 -13
- package/skills/pikku-aws/SKILL.md +2 -2
- package/skills/pikku-better-auth/SKILL.md +97 -17
- package/skills/pikku-build-app/SKILL.md +621 -0
- package/skills/pikku-build-app/references/multi-app.md +117 -0
- package/skills/pikku-build-app/references/ship.md +98 -0
- package/skills/pikku-build-app/references/theming.md +70 -0
- package/skills/pikku-build-platform/SKILL.md +239 -0
- package/skills/pikku-build-quick/SKILL.md +238 -0
- package/skills/pikku-cli/SKILL.md +7 -7
- package/skills/pikku-cli/references/complete-example.md +1 -1
- package/skills/pikku-concepts/SKILL.md +10 -7
- package/skills/pikku-concepts/references/concept-mapping.md +1 -1
- package/skills/pikku-config/SKILL.md +5 -3
- package/skills/pikku-deploy-azure/SKILL.md +5 -4
- package/skills/pikku-deploy-cloudflare/SKILL.md +9 -9
- package/skills/pikku-deploy-uws/SKILL.md +5 -2
- package/skills/pikku-deps/SKILL.md +42 -3
- package/skills/pikku-emails/SKILL.md +5 -5
- package/skills/pikku-fabric/SKILL.md +27 -3
- package/skills/pikku-fabric-debug/SKILL.md +1 -1
- package/skills/pikku-feature/SKILL.md +5 -4
- package/skills/pikku-http/SKILL.md +4 -4
- package/skills/pikku-http/references/http-options.md +13 -13
- package/skills/pikku-i18n/SKILL.md +2 -1
- package/skills/pikku-info/SKILL.md +1 -1
- package/skills/pikku-knowledge/SKILL.md +13 -13
- package/skills/pikku-kysely/SKILL.md +68 -41
- package/skills/pikku-machine-auth/SKILL.md +10 -10
- package/skills/pikku-mcp/SKILL.md +23 -20
- package/skills/pikku-middleware/SKILL.md +19 -12
- package/skills/pikku-middleware/references/middleware-patterns.md +14 -8
- package/skills/pikku-mongodb/SKILL.md +11 -11
- package/skills/pikku-n8n-import/SKILL.md +12 -12
- package/skills/pikku-n8n-import/SPEC.md +3 -0
- package/skills/pikku-n8n-import/references/addon-mapping.md +14 -8
- package/skills/pikku-n8n-import/references/code-translation.md +26 -22
- package/skills/pikku-n8n-import/references/loops-and-control.md +7 -7
- package/skills/pikku-paraglide/SKILL.md +11 -6
- package/skills/pikku-permissions/SKILL.md +19 -15
- package/skills/pikku-product-second-opinion/README.md +3 -3
- package/skills/pikku-product-second-opinion/SKILL.md +83 -73
- package/skills/pikku-product-second-opinion/example/sample-report.md +15 -12
- package/skills/pikku-product-second-opinion/references/report-template.md +10 -7
- package/skills/pikku-queue/SKILL.md +1 -1
- package/skills/pikku-react/SKILL.md +53 -13
- package/skills/pikku-realtime/SKILL.md +51 -19
- package/skills/pikku-rpc/SKILL.md +1 -1
- package/skills/pikku-rtl/SKILL.md +1 -1
- package/skills/pikku-scenario/SKILL.md +164 -44
- package/skills/pikku-schedule/SKILL.md +6 -1
- package/skills/pikku-schema-ajv/SKILL.md +2 -2
- package/skills/pikku-schema-cfworker/SKILL.md +1 -1
- package/skills/pikku-security/SKILL.md +9 -5
- package/skills/pikku-services/SKILL.md +27 -18
- package/skills/pikku-services/references/audit-wire-service.md +14 -8
- package/skills/pikku-software-archaeology/SKILL.md +27 -23
- package/skills/pikku-software-archaeology/references/blueprint.schema.json +580 -102
- package/skills/pikku-software-archaeology/scripts/validate.mjs +146 -69
- package/skills/pikku-tag-middleware/SKILL.md +1 -0
- package/skills/pikku-template-clone/SKILL.md +2 -1
- package/skills/pikku-trigger/SKILL.md +3 -3
- package/skills/pikku-versioning/SKILL.md +87 -3
- package/skills/pikku-websocket/SKILL.md +4 -3
- package/skills/pikku-workflow/SKILL.md +2 -2
- package/skills/pikku-workflow/references/workflow-reference.md +24 -10
- package/skills/pikku-ws/SKILL.md +5 -2
|
@@ -16,56 +16,60 @@ The reader is a founder/PM/operator, not an engineer. If they finish a section a
|
|
|
16
16
|
|
|
17
17
|
## The cardinal rule: translate, don't dump
|
|
18
18
|
|
|
19
|
-
Every technical concept becomes a business outcome or a plain-language description. Never make the reader learn your vocabulary. If a term is unavoidable, define it in one clause the first time — but prefer describing the
|
|
20
|
-
|
|
21
|
-
| Don't write
|
|
22
|
-
|
|
23
|
-
| queue / worker / job
|
|
24
|
-
| workflow
|
|
25
|
-
| API / endpoint / route
|
|
26
|
-
| webhook
|
|
27
|
-
| event
|
|
28
|
-
| cron / scheduler
|
|
29
|
-
| schema / migration
|
|
30
|
-
| auth / session / token
|
|
31
|
-
| refactor / rewire
|
|
32
|
-
| cache
|
|
33
|
-
| race condition
|
|
34
|
-
| component
|
|
35
|
-
| route / page
|
|
36
|
-
| design system / component library | "the shared kit of screen pieces that keeps everything looking consistent"
|
|
37
|
-
| SSR / SPA / rendering
|
|
38
|
-
| MCP server
|
|
39
|
-
| SDK
|
|
40
|
-
| CLI
|
|
41
|
-
| theme token / design variable
|
|
42
|
-
| modal / drawer
|
|
43
|
-
|
|
44
|
-
When in doubt, say what the
|
|
19
|
+
Every technical concept becomes a business outcome or a plain-language description. Never make the reader learn your vocabulary. If a term is unavoidable, define it in one clause the first time — but prefer describing the _effect_ and skipping the term entirely.
|
|
20
|
+
|
|
21
|
+
| Don't write | Write instead (describe the effect) |
|
|
22
|
+
| --------------------------------- | ----------------------------------------------------------------------------------- |
|
|
23
|
+
| queue / worker / job | "a background task that runs on its own" |
|
|
24
|
+
| workflow | "a multi-step task that resumes where it left off if interrupted" |
|
|
25
|
+
| API / endpoint / route | "something the app (or another tool) can ask it to do" |
|
|
26
|
+
| webhook | "an automatic message the app sends to another tool when something happens" |
|
|
27
|
+
| event | "a signal that something happened, that other parts can react to" |
|
|
28
|
+
| cron / scheduler | "a timer that runs something on a schedule" |
|
|
29
|
+
| schema / migration | "the shape of your stored data" / "a change to how data is stored" |
|
|
30
|
+
| auth / session / token | "how the app knows who you are and what you're allowed to do" |
|
|
31
|
+
| refactor / rewire | "reorganizing the inside without changing what it does" |
|
|
32
|
+
| cache | "a saved copy kept around for speed" |
|
|
33
|
+
| race condition | "two things happening at once and stepping on each other" |
|
|
34
|
+
| component | "a reusable piece of the screen (a button, a chart, a table)" |
|
|
35
|
+
| route / page | "a screen in the app" |
|
|
36
|
+
| design system / component library | "the shared kit of screen pieces that keeps everything looking consistent" |
|
|
37
|
+
| SSR / SPA / rendering | "how pages get built and shown" (only mention if it affects speed or SEO) |
|
|
38
|
+
| MCP server | "a way for AI assistants to use your app's data and actions directly" |
|
|
39
|
+
| SDK | "a ready-made toolkit so other developers can build on your app" |
|
|
40
|
+
| CLI | "a way to drive the app by typing commands (for power users / automation)" |
|
|
41
|
+
| theme token / design variable | "a single setting (like your brand color) reused everywhere, so you change it once" |
|
|
42
|
+
| modal / drawer | "a pop-up box" / "a slide-out panel" |
|
|
43
|
+
|
|
44
|
+
When in doubt, say what the _user or the business_ experiences, not what the machine does.
|
|
45
45
|
|
|
46
46
|
## Report structure (layered — skim or dive)
|
|
47
47
|
|
|
48
48
|
Write these three parts in order. A reader can stop after Part 1.
|
|
49
49
|
|
|
50
50
|
**Part 1 — Executive summary (one page).**
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
51
|
+
|
|
52
|
+
- _What you have_: 2–3 sentences — what the product does and who uses it.
|
|
53
|
+
- _The headline_: the 3–5 biggest risks/opportunities, one plain line each.
|
|
54
|
+
- _Recommended order_: a table (Fix | Why it matters | Effort | Payoff). This is the part they act on.
|
|
54
55
|
|
|
55
56
|
**Part 2 — One section per major area** (drive the areas from `domains.json`; skip domains with nothing worth saying). Each section follows this shape (see `example/sample-report.md`):
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
57
|
+
|
|
58
|
+
- _What this does_ — the capability in business terms.
|
|
59
|
+
- _How it works today_ — a plain walkthrough, ideally as a small story ("on a timer, the app re-reads each site, compares…").
|
|
60
|
+
- _What's working_ — genuine credit. Never skip this; a report that's all criticism gets dismissed.
|
|
61
|
+
- _What's holding you back_ — each problem MUST carry: **what it means for you** (business impact), **severity** (Minor / Worth fixing / Serious / Urgent), and **effort** (Small / Medium / Large).
|
|
62
|
+
- _How I'd do it differently — and why it's worth it_ — the opinionated part. Argue the improvement in one of these business outcomes: **more reliable / fewer surprises**, **faster to add features**, **cheaper to run**, **safer / less risk**, **easier to maintain or hand off**. Be explicit whether it's a cheap rewire or an expensive rebuild.
|
|
61
63
|
|
|
62
64
|
**Part 3 — Appendix.**
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
+
|
|
66
|
+
- _How confident am I_ — REQUIRED. Where you're certain vs guessing; what you'd verify against real data first. The blueprint carries confidence tiers — anything you're relaying from a `low`/`medium` entry, or from a reconstructed (`explicit: false`) event, says so here.
|
|
67
|
+
- _Glossary_ (optional) — only for any term that slipped through.
|
|
65
68
|
|
|
66
69
|
## Rewire vs rebuild (say which)
|
|
67
70
|
|
|
68
71
|
The blueprint's `migration.json` tells you which is which — `mappings[]` is what survives (each with its `recommendation`), `dropped[]` is what goes. The reader needs to know because the cost is 10× different.
|
|
72
|
+
|
|
69
73
|
- **Rewire** — the valuable machinery exists; you're connecting pieces or turning something on. Cheap, low-risk. (Most "it should be automatic but isn't" findings are this.)
|
|
70
74
|
- **Rebuild** — the capability doesn't exist or is fundamentally wrong. Expensive, risky. Reserve the word for when it's true; founders hear "rewrite" and panic or overspend.
|
|
71
75
|
|
|
@@ -76,33 +80,35 @@ Never recommend a full rewrite because the code is messy. Messy-but-working is a
|
|
|
76
80
|
When the blueprint has the consumer-surface files, add these to the report — they're often where a founder's questions actually live ("why does the app feel inconsistent?", "can partners build on this?").
|
|
77
81
|
|
|
78
82
|
**The screens (`frontend-*.json`) — one area section, founder-framed.**
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
|
|
83
|
+
|
|
84
|
+
- _What a user can do_ — walk the main screens as a journey, not a component list.
|
|
85
|
+
- _Consistency_ — is it built from one shared kit of screen pieces, or a patchwork? A consistent kit means changes are cheap and the app feels coherent; a patchwork means every change is bespoke and the look drifts. Say which, plainly.
|
|
86
|
+
- _The expensive pieces_ — this is the key frontend insight. Most of the screen is standard pieces that are cheap to rebuild or restyle. A **small number carry real custom logic** — a bespoke chart, a complicated data table, a drawing/drag interaction, a rich editor. Those are the parts that take real effort to move or change, and the ones most likely to break. Name them, say what they do, and flag them as the real work — so nobody assumes "it's just screens, it'll be quick."
|
|
87
|
+
- _Design consistency (the "it looks a bit off" problems)_ — from the blueprint's design findings, call out broken patterns in plain terms and, crucially, why each matters and roughly what it costs to fix. Common ones and how to frame them:
|
|
88
|
+
- **The same action behaves differently in different places** (a slide-out panel here, a pop-up box there for the same task). _Why it matters:_ the app feels inconsistent and users have to re-learn each screen. _Fix:_ pick one pattern and apply it everywhere — cheap.
|
|
89
|
+
- **Colors/spacing are hardcoded instead of set in one place.** _Why it matters:_ changing your brand color, or fixing contrast, means hunting through every screen instead of editing one setting — slow and error-prone. _Fix:_ move them to shared "design tokens" — a small, high-leverage cleanup.
|
|
90
|
+
- **The same element looks different from page to page** (buttons, headings, cards). _Why it matters:_ reads as unpolished and erodes trust, especially in a paid product. _Fix:_ one shared version of each, reused — cheap and makes every future change faster.
|
|
91
|
+
These are almost always **cheap rewires with an outsized polish/trust payoff**, not rebuilds. Give each an effort (usually Small–Medium) and say the payoff is perceived quality + faster future changes. Do NOT design-nitpick without a reason — every design point needs a "why it matters to you." And credit consistency where the app already has it.
|
|
87
92
|
- Frame rebuild/restyle work as **rewire vs rebuild**: restyling standard pieces to a consistent kit is cheap; re-creating a custom-logic piece is real engineering.
|
|
88
93
|
|
|
89
94
|
**How your app can be driven (`interfaces.json`) — usually a short, positive section.**
|
|
90
|
-
Explain, in one line each, the ways the product can be used: people through the web, developers through an API or toolkit, AI assistants through a direct connection (MCP), power users through the command line. This is often a genuine strength worth naming — an app that agents and partners can build on is more valuable than one only humans can click. But be honest about `status`: a connection that exists but only does two things is a
|
|
95
|
+
Explain, in one line each, the ways the product can be used: people through the web, developers through an API or toolkit, AI assistants through a direct connection (MCP), power users through the command line. This is often a genuine strength worth naming — an app that agents and partners can build on is more valuable than one only humans can click. But be honest about `status`: a connection that exists but only does two things is a _start_, not a feature — say so.
|
|
91
96
|
|
|
92
97
|
## Technology choices — the honest tradeoffs (don't be cheap on the cons)
|
|
93
98
|
|
|
94
|
-
The app made specific technology bets. The founder deserves to know what each bet
|
|
99
|
+
The app made specific technology bets. The founder deserves to know what each bet _bought_ and what it _costs_ — in business terms, tied to their situation (early vs scaling, chasing enterprise deals or not, big team or two people). Present every significant choice as a genuine tradeoff with **both sides**. Never cheerlead a technology, and never trash one — but do not soften the disadvantages to sound positive. A report that only lists upsides is not honest and is not useful.
|
|
95
100
|
|
|
96
101
|
Rules:
|
|
97
|
-
|
|
102
|
+
|
|
103
|
+
- For each notable choice (framework, auth, hosting, database, key libraries): **what it buys** and **what it costs**, both in plain business terms, then a recommendation tied to _their_ stage and goals — usually "keep it, here's what to watch" rather than "switch."
|
|
98
104
|
- Tie cons to consequences the founder feels: vendor bills, security/breach liability, hiring difficulty, how fast they can ship, enterprise-sales blockers, the risk of betting on something young.
|
|
99
105
|
- Distinguish "younger / smaller community" (a real, manageable risk) from "wrong choice" (rare). Most stack choices are defensible; the job is informed eyes-open, not alarm.
|
|
100
106
|
- **Verify before you disparage.** "Don't be cheap on the cons" means ACCURATE cons, not invented ones. Do NOT label a technology immature, niche, or feature-poor from vibes, its name, or its age — check its actual adoption, maturity, and feature set first. And separate an **inherent tradeoff of an approach** (e.g. self-hosting anything means you run and secure it) from a **deficiency of a specific tool** (often false — the tool may be mature and full-featured). Overstating cons is as dishonest as hiding them.
|
|
101
107
|
- **Hold your own recommendation to the same bar.** If "how I'd do it differently" lands on a specific stack — Pikku included — it gets the same both-sides treatment as everything else, cons first-class. Pinning someone's dependency for being pre-1.0 while not mentioning that the replacement is pre-1.0 too isn't a second opinion, it's a pitch.
|
|
102
108
|
|
|
103
|
-
- **Derive the app's choices from the blueprint, never from a list in this file.** Read the stack off `architecture.json`, `integrations.json`, `frontend.json`, and the manifest the repo actually has (`package.json`, `Gemfile`, `go.mod`, …). Cover the bets that are
|
|
109
|
+
- **Derive the app's choices from the blueprint, never from a list in this file.** Read the stack off `architecture.json`, `integrations.json`, `frontend.json`, and the manifest the repo actually has (`package.json`, `Gemfile`, `go.mod`, …). Cover the bets that are _load-bearing for this product_: typically the framework, the auth/identity approach, the datastore, the hosting/deploy model, the payment and other critical vendor integrations, and anything the blueprint marks `replacementDifficulty: hard`. A choice earns a paragraph if switching it would be expensive, or if living with it constrains the business — not because it appears in some canonical list. If you could write the verdict before reading the blueprint, you are not giving a second opinion.
|
|
104
110
|
|
|
105
|
-
### The choices
|
|
111
|
+
### The choices _this_ app made
|
|
106
112
|
|
|
107
113
|
Whatever the blueprint shows. A Rails app's bets are Rails, Devise, Pundit, MySQL, Sidekiq, its ERP and payment vendors; a Go app's are different again. Fill in buys/costs/usually for each, from evidence. If a legacy choice is working fine, credit it and move on — "boring and working" is a feature, and the pressure to find something to say about a stack is exactly what produces dishonest reports.
|
|
108
114
|
|
|
@@ -113,45 +119,49 @@ Worth naming when it applies: adopting one coherent system in place of hand-roll
|
|
|
113
119
|
Include this section **only if you are actually recommending a rebuild** onto it — and then give every part of it the same both-sides treatment you gave the app's own bets, per the "hold your own recommendation to the same bar" rule above. These are not choices the app made; they are choices you are proposing, which is exactly why their costs are the reader's to weigh. The Pikku target stack is Pikku + Better Auth + TanStack Start + Mantine; the framings below are reference material for the parts you actually recommend, not a script to recite.
|
|
114
120
|
|
|
115
121
|
**Better Auth (self-hosted sign-in) — instead of a paid service like Auth0/Clerk.**
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
122
|
+
|
|
123
|
+
- _Buys you:_ a mature, battle-tested, **framework-agnostic** library with a deep first-class plugin catalog — two-factor auth, multi-tenancy/organizations, multi-session, rate limiting, Stripe subscription billing, an admin panel, API keys for partners/automation, single-sign-on — plus a plugin system to add more without forking. You keep your users in your own database (single source of truth, no per-user bill that grows with success), with full control of the auth flows, and you can run it embedded in the app or as a standalone self-hosted auth server. So self-hosting here means neither giving up features nor rolling your own security.
|
|
124
|
+
- _Cleans up messy auth (often the biggest win):_ adopting it consolidates the kind of hand-rolled, drifted auth that accumulates in an older codebase — several different ways of deciding who's an admin, a bespoke token table, a back-door test login, home-grown encryption — into **one coherent system**. If the blueprint shows a before (legacy, bespoke) and after (on Better Auth), point at it directly: the sprawl collapses into a single well-structured setup. A concrete reliability-and-security upgrade, not just a swap.
|
|
125
|
+
- _Costs you (the honest tradeoff — operational, not security-implementation):_ the auth flows and security practices are handled by the library, so this is NOT "build secure auth from scratch." What self-hosting means is you **operate** it — hosting, upgrades, uptime, and incident response sit with your team, where a paid SaaS runs that for you and bundles hosted extras (bot/anomaly detection, leaked-password monitoring, vendor compliance certifications) you'd otherwise operate and document yourself. You trade a per-user bill and vendor ops for control, data ownership, and predictable cost.
|
|
126
|
+
- _Usually:_ a strong default for an independent product — mature, full-featured, framework-agnostic, and frequently a genuine cleanup of inherited auth. The real question is who owns operating it, not whether the tool is good enough.
|
|
120
127
|
|
|
121
128
|
**TanStack Start (the web framework) — instead of the incumbent (Next.js).**
|
|
122
|
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
129
|
+
|
|
130
|
+
- _Buys you:_ modern, tidy developer experience; strong type-safety that catches whole classes of bugs before users see them; fast iteration; fine-grained control; deploys well to modern/edge hosting. The libraries underneath it — the TanStack ecosystem (Query, Router, Table) — are mature, battle-tested and everywhere in React.
|
|
131
|
+
- _Costs you (the honest tradeoff — maturity of the framework itself):_ separate the ecosystem from the framework. Query/Router/Table are mature; the framework that wraps them is younger, and **you must check its release stage on tanstack.com/start at the moment you write** — do not infer it from the npm version. `@tanstack/react-start` has been on 1.x since early 2025 because its major tracks the **Router** version line, so "1.168.x" says nothing about whether Start itself has shipped a stable 1.0. If it is still pre-1.0, the cost is pinning an exact version and budgeting for upgrade work as it settles. Either way it is newer than the incumbent (Next.js), which has the largest ecosystem — fewer ready-made templates and third-party examples, and a smaller (though growing) pool of developers who've used _this specific_ framework, which can make hiring slightly slower.
|
|
132
|
+
- _Usually:_ a credible, modern choice on a mature foundation. Whether it also carries pinning-and-upgrade risk depends on the release stage you just checked — say which you found, rather than repeating either verdict from here.
|
|
125
133
|
|
|
126
134
|
**Pikku (the framework a rebuild would land on) — instead of staying where you are.**
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
135
|
+
|
|
136
|
+
- _Buys you:_ one way to write a capability and drive it from anywhere — web, background jobs, timers, realtime, AI assistants, the command line — so a feature is written once instead of five times. Type-safe clients and the API spec fall out of the code rather than being hand-maintained until they drift. The sprawl an organically-grown app accumulates collapses into one shape a small team can hold in its head.
|
|
137
|
+
- _Costs you (the honest tradeoff — it is younger than anything it would replace):_ Pikku has **not shipped a stable 1.0** — at the time of writing it is 0.12.x, and 0.13 is the first release that promises backwards compatibility; check the published version rather than repeating this one. Until then upgrades can break you. In practice: pin your version, budget for upgrade work, and know that the community, the ready-made examples, and the pool of developers who have used it are all far smaller than the incumbent's — smaller than TanStack Start's, let alone Next.js's. Being pre-1.0 is normal for a young framework, and survivable, but it is a real cost and it is the reader's to weigh, not yours to skip.
|
|
138
|
+
- _Usually:_ worth it when the real problem is sprawl — many surfaces, hand-maintained glue, the same rule implemented three slightly different ways — and the team wants one shape instead of five. Harder to justify for an app that works and needs a few rewires: those are usually cheaper in place. If nobody has capacity to own upgrades, that's a real reason to wait.
|
|
130
139
|
|
|
131
140
|
Check these statuses before you write them up rather than repeating them from here — a framework's release stage moves, and the point is the current fact, not this example.
|
|
132
141
|
|
|
133
142
|
## Delivery
|
|
134
143
|
|
|
135
144
|
Produce **both**:
|
|
145
|
+
|
|
136
146
|
1. A **markdown** report in the repo (e.g. `docs/reports/<app>-second-opinion.md`) — versioned, diffable.
|
|
137
147
|
2. A **shareable web page**: load the **artifact-design** skill, then render the same report as one clean, print-friendly, theme-aware page they can send to a cofounder or the agency. Same content, nicer to read.
|
|
138
148
|
|
|
139
149
|
## Red flags — you're writing the wrong report
|
|
140
150
|
|
|
141
|
-
| Symptom
|
|
142
|
-
|
|
143
|
-
| A technical term with no translation
|
|
144
|
-
| A problem with no "what it means for you"
|
|
145
|
-
| All problems, no credit
|
|
146
|
-
| A recommendation with no effort + payoff
|
|
147
|
-
| "Rewrite the app"
|
|
148
|
-
| A guess stated as fact
|
|
149
|
-
| Only listed the upsides of a technology choice
|
|
150
|
-
| Recommended a stack (including ours) without its cons | You applied a maturity bar to their technology and exempted your own. Both sides, or cut the recommendation.
|
|
151
|
-
| Trashed a technology as "the wrong choice"
|
|
152
|
-
| "The frontend is just screens, it'll be quick"
|
|
153
|
-
| A design point with no "why it matters"
|
|
154
|
-
| Reads like a code review
|
|
151
|
+
| Symptom | Fix |
|
|
152
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
153
|
+
| A technical term with no translation | Rephrase as the effect on the user/business, or cut the term. |
|
|
154
|
+
| A problem with no "what it means for you" | Incomplete — add the business impact or delete it. |
|
|
155
|
+
| All problems, no credit | You'll lose the reader's trust. Name what's genuinely good. |
|
|
156
|
+
| A recommendation with no effort + payoff | Not decision-useful. Add both. |
|
|
157
|
+
| "Rewrite the app" | Almost always wrong. Separate rewire (cheap) from rebuild (dear); lean on what `migration.json.mappings` says survives. |
|
|
158
|
+
| A guess stated as fact | Mark confidence. "I'm certain" and "I'd need to check" are different sentences. |
|
|
159
|
+
| Only listed the upsides of a technology choice | Not honest. Every bet has a cost — name it in business terms, don't soften it to sound positive. |
|
|
160
|
+
| Recommended a stack (including ours) without its cons | You applied a maturity bar to their technology and exempted your own. Both sides, or cut the recommendation. |
|
|
161
|
+
| Trashed a technology as "the wrong choice" | Equally lazy. Most choices are defensible; frame as tradeoff + "what to watch," not a verdict. |
|
|
162
|
+
| "The frontend is just screens, it'll be quick" | Wrong. The custom-logic pieces (charts, complex tables, editors) are real work — flag them separately from the cheap standard pieces. |
|
|
163
|
+
| A design point with no "why it matters" | Taste, not advice. Tie every design finding to user perception (polish/trust) or maintenance cost (change-once vs hunt-everywhere), plus effort. |
|
|
164
|
+
| Reads like a code review | Wrong audience. Would a founder know what to _do_ after this paragraph? |
|
|
155
165
|
|
|
156
166
|
## Relationship to pikku-software-archaeology
|
|
157
167
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Your app, in plain English — and where it could get better
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
_A second opinion on the competitor-tracking system_
|
|
3
4
|
|
|
4
5
|
> Worked example for the pikku-product-second-opinion skill. Shows the voice and the
|
|
5
6
|
> layered structure on one real area (competitor tracking), drawn from a
|
|
@@ -18,17 +19,18 @@ websites, spots meaningful changes (pricing, hiring, product updates), summarize
|
|
|
18
19
|
them, and feeds your briefings and dashboards so your team knows first.
|
|
19
20
|
|
|
20
21
|
**The headline.**
|
|
22
|
+
|
|
21
23
|
- The hard part — reading messy websites and telling a real change from noise — is built well.
|
|
22
|
-
- Until recently the app wasn't re-checking sites on its own at all
|
|
24
|
+
- Until recently the app wasn't re-checking sites on its own at all _(now fixed)_.
|
|
23
25
|
- When it does spot a change, the follow-up work only happens if someone clicks a button — so your dashboards can quietly go stale while looking current.
|
|
24
26
|
|
|
25
27
|
**If it were me, this is the order I'd tackle things:**
|
|
26
28
|
|
|
27
|
-
| Fix
|
|
28
|
-
|
|
29
|
-
| Turn on automatic checking
|
|
30
|
-
| Make the follow-up automatic | Stops your intelligence going stale unnoticed | Medium | High
|
|
31
|
-
| Make failures visible
|
|
29
|
+
| Fix | Why it matters to you | Effort | Payoff |
|
|
30
|
+
| ---------------------------- | --------------------------------------------- | ------ | ------ |
|
|
31
|
+
| Turn on automatic checking | Sites weren't refreshing themselves | _Done_ | High |
|
|
32
|
+
| Make the follow-up automatic | Stops your intelligence going stale unnoticed | Medium | High |
|
|
33
|
+
| Make failures visible | Problems surface instead of hiding | Small | Medium |
|
|
32
34
|
|
|
33
35
|
---
|
|
34
36
|
|
|
@@ -41,7 +43,7 @@ changes into summaries your team can act on.
|
|
|
41
43
|
|
|
42
44
|
**How it works today.** Like a clipping service: on a timer, the app re-reads
|
|
43
45
|
each competitor's site, compares it to last time, decides whether anything
|
|
44
|
-
|
|
46
|
+
_meaningful_ changed (it ignores trivial edits), and writes up a summary when
|
|
45
47
|
something real happens.
|
|
46
48
|
|
|
47
49
|
**What's working.** The expensive, valuable part is solid — the app is genuinely
|
|
@@ -49,10 +51,11 @@ good at reading messy sites, separating real changes from noise, and summarizing
|
|
|
49
51
|
them. Keep it.
|
|
50
52
|
|
|
51
53
|
**What's holding you back.**
|
|
54
|
+
|
|
52
55
|
- **The automatic checking wasn't switched on.** The machinery existed but nothing
|
|
53
56
|
pulled the trigger, so sites weren't refreshing on their own. What it means for
|
|
54
57
|
you: your "live" intelligence wasn't live. Severity: Urgent. Effort: Small.
|
|
55
|
-
|
|
58
|
+
_(Already fixed.)_
|
|
56
59
|
- **The follow-up is manual.** When a change is found, updating your briefings and
|
|
57
60
|
comparisons doesn't happen on its own — someone has to click "regenerate." What
|
|
58
61
|
it means for you: if nobody clicks, the dashboard shows old information while
|
|
@@ -70,15 +73,15 @@ surprises** — which is the entire promise of the product.
|
|
|
70
73
|
|
|
71
74
|
### The technology bets
|
|
72
75
|
|
|
73
|
-
**Pikku — the framework I'm suggesting you rebuild onto.**
|
|
76
|
+
**Pikku — the framework I'm suggesting you rebuild onto.** _Buys you:_ one way to
|
|
74
77
|
write a capability and drive it from anywhere — web, timers, background jobs,
|
|
75
78
|
assistants — so the tracking rule is written once instead of three times, which is
|
|
76
|
-
exactly the sprawl above.
|
|
79
|
+
exactly the sprawl above. _Costs you:_ it hasn't shipped a stable 1.0 (it's 0.12.x;
|
|
77
80
|
0.13 is the first release promising backwards compatibility), so until then
|
|
78
81
|
upgrades can break you — pin the version and budget for upgrade work. Its community
|
|
79
82
|
and hiring pool are far smaller than the mainstream default's. That's normal for a
|
|
80
83
|
young framework and survivable, but it's a real cost and it's yours to weigh.
|
|
81
|
-
|
|
84
|
+
_Usually:_ worth it when the problem is genuinely sprawl, as it is here — and worth
|
|
82
85
|
waiting if nobody has capacity to own upgrades.
|
|
83
86
|
|
|
84
87
|
---
|
|
@@ -6,7 +6,8 @@ reader. Delete any section that would be empty rather than padding it.
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# {App name}, in plain English — and where it could get better
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
_A second opinion on {scope: the whole app / the competitor-tracking system / …}_
|
|
10
11
|
|
|
11
12
|
**How to read this:** no technical background needed. Part 1 is the summary — if
|
|
12
13
|
you read nothing else, read that. Parts 2–3 go area by area for anyone who wants
|
|
@@ -21,9 +22,9 @@ opportunities. No jargon.}
|
|
|
21
22
|
|
|
22
23
|
**If it were me, this is the order I'd tackle things:**
|
|
23
24
|
|
|
24
|
-
| Fix | Why it matters to you | Effort
|
|
25
|
-
|
|
26
|
-
| {…} | {business impact}
|
|
25
|
+
| Fix | Why it matters to you | Effort | Payoff |
|
|
26
|
+
| --- | --------------------- | ------------------ | --------------- |
|
|
27
|
+
| {…} | {business impact} | Small/Medium/Large | High/Medium/Low |
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
@@ -38,6 +39,7 @@ opportunities. No jargon.}
|
|
|
38
39
|
**What's working.** {genuine credit — the parts that are solid and worth keeping}
|
|
39
40
|
|
|
40
41
|
**What's holding you back.**
|
|
42
|
+
|
|
41
43
|
- **{Problem in plain terms}.** What it means for you: {business impact}.
|
|
42
44
|
Severity: {Minor / Worth fixing / Serious / Urgent}. Effort to fix: {Small /
|
|
43
45
|
Medium / Large}.
|
|
@@ -54,11 +56,12 @@ off. Say whether it's a cheap rewire or an expensive rebuild.}
|
|
|
54
56
|
libraries — AND anything a rebuild would move them ONTO. Each gets both sides.}
|
|
55
57
|
|
|
56
58
|
**{Technology}.**
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
+
|
|
60
|
+
- _Buys you:_ {in business terms}
|
|
61
|
+
- _Costs you:_ {in business terms — bills, hiring, shipping speed, upgrade work,
|
|
59
62
|
the risk of betting on something young. Don't soften it. If it hasn't shipped a
|
|
60
63
|
stable 1.0, say so and say what that means: pin the version, budget upgrades.}
|
|
61
|
-
-
|
|
64
|
+
- _Usually:_ {recommendation tied to their stage — normally "keep it, watch this"}
|
|
62
65
|
|
|
63
66
|
{The same bar applies to anything you're recommending they move to. A stack you
|
|
64
67
|
propose with no cons listed is a pitch, not a second opinion.}
|
|
@@ -63,7 +63,7 @@ Not every adapter supports every option. Each adapter declares a
|
|
|
63
63
|
silently ignored — so check the startup logs if a setting appears to have no
|
|
64
64
|
effect.
|
|
65
65
|
|
|
66
|
-
`groupConcurrency` limits how many jobs run concurrently
|
|
66
|
+
`groupConcurrency` limits how many jobs run concurrently _per group_ (jobs
|
|
67
67
|
carrying a `JobGroup` with an `id` and optional `tier`), so one noisy tenant
|
|
68
68
|
cannot consume the whole worker:
|
|
69
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pikku-react
|
|
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. DO NOT TRIGGER when: the user is asking about useQuery/useMutation hooks (use pikku-react-query) or about workflows (use pikku-workflows-client).'
|
|
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
4
|
installGroups: [core]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -58,8 +58,8 @@ export function apiUrl(): string {
|
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
**Never fall back to `http://localhost:3000`.** `import.meta.env.VITE_API_URL`
|
|
61
|
-
is substituted by Vite at
|
|
62
|
-
a
|
|
61
|
+
is substituted by Vite at _build_ time, so any deploy that supplies the URL as
|
|
62
|
+
a _runtime_ env var or platform binding leaves it `undefined` in the shipped
|
|
63
63
|
bundle — the fallback is then the only branch that ever runs in the browser. A
|
|
64
64
|
localhost fallback means every request from a deployed app goes to the user's
|
|
65
65
|
own machine. `origin + '/api'` is same-origin, needs no build-time knowledge of
|
|
@@ -173,17 +173,17 @@ helpers live in **pikku-realtime**.
|
|
|
173
173
|
|
|
174
174
|
## When to reach for what
|
|
175
175
|
|
|
176
|
-
| Need | Use
|
|
177
|
-
| ----------------------------------- |
|
|
178
|
-
| Render data, dedupe + cache | **usePikkuQuery** (react-query)
|
|
179
|
-
| Trigger a write, wait for result | **usePikkuMutation** (react-query)
|
|
180
|
-
| Paginate | **usePikkuInfiniteQuery** (react-query)
|
|
181
|
-
| One-off call from an event handler | `usePikkuRPC()` direct
|
|
182
|
-
| Hit a REST endpoint (not RPC) | `usePikkuFetch()`
|
|
176
|
+
| Need | Use |
|
|
177
|
+
| ----------------------------------- | -------------------------------------------------- |
|
|
178
|
+
| Render data, dedupe + cache | **usePikkuQuery** (react-query) |
|
|
179
|
+
| Trigger a write, wait for result | **usePikkuMutation** (react-query) |
|
|
180
|
+
| Paginate | **usePikkuInfiniteQuery** (react-query) |
|
|
181
|
+
| One-off call from an event handler | `usePikkuRPC()` direct |
|
|
182
|
+
| Hit a REST endpoint (not RPC) | `usePikkuFetch()` |
|
|
183
183
|
| Run one named workflow | `usePikkuWorkflow('name')` → `.start/.run/.status` |
|
|
184
184
|
| Talk to one named AI agent | `usePikkuAgent('name')` → `.run/.stream/.approve` |
|
|
185
|
-
| Longer-running workflow UX | **pikku-workflows-client**
|
|
186
|
-
| Subscribe to events / SSE / channel | `usePikkuRealtime()` (see **pikku-realtime**)
|
|
185
|
+
| Longer-running workflow UX | **pikku-workflows-client** |
|
|
186
|
+
| Subscribe to events / SSE / channel | `usePikkuRealtime()` (see **pikku-realtime**) |
|
|
187
187
|
|
|
188
188
|
The first three live in your generated `api.gen.ts` (see the
|
|
189
189
|
**pikku-react-query** skill). This skill covers the rest.
|
|
@@ -203,7 +203,7 @@ const state = await workflow.status(runId)
|
|
|
203
203
|
## Authentication
|
|
204
204
|
|
|
205
205
|
Auth is handled at the `PikkuFetch` layer, and `createPikku`'s options object
|
|
206
|
-
|
|
206
|
+
_is_ `CorePikkuFetchOptions` plus `serverUrl` — flat, not nested under a
|
|
207
207
|
`fetchOptions` key:
|
|
208
208
|
|
|
209
209
|
```tsx
|
|
@@ -228,6 +228,46 @@ pikku.fetch.setHeader('x-tenant', tenantId)
|
|
|
228
228
|
`authHeaders.jwt` becomes `Authorization: Bearer …` and `authHeaders.apiKey`
|
|
229
229
|
becomes `X-API-KEY`; setting a JWT takes precedence over an API key.
|
|
230
230
|
|
|
231
|
+
### Dev actor sign-in (`useDevActors`)
|
|
232
|
+
|
|
233
|
+
The dev-only "Sign in as …" control: one click signs in as a declared scenario
|
|
234
|
+
persona with no password, so the app can be reviewed as each kind of user.
|
|
235
|
+
`pikku fabric validate` **requires** any frontend with a login screen to ship one
|
|
236
|
+
(`app-missing-actor-quick-login-<app>`) — without it a reviewer is locked out of
|
|
237
|
+
their own sandbox.
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
import { useDevActors } from '@pikku/react'
|
|
241
|
+
|
|
242
|
+
const { actors, signInAs, pendingEmail, isPending, error } = useDevActors({
|
|
243
|
+
// Gate both reads on the bundler's dev flag so the secret cannot reach a
|
|
244
|
+
// production bundle. The sandbox dev server bakes them from your personas.
|
|
245
|
+
actors: import.meta.env.DEV ? import.meta.env.VITE_DEV_ACTORS : undefined,
|
|
246
|
+
secret: import.meta.env.DEV
|
|
247
|
+
? import.meta.env.VITE_SCENARIO_ACTOR_SECRET
|
|
248
|
+
: undefined,
|
|
249
|
+
apiUrl: apiUrl(),
|
|
250
|
+
onSignedIn: () => navigate({ to: '/' }),
|
|
251
|
+
})
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- **It is UI-free**, so render it however you like. For the default rendering use
|
|
255
|
+
`<DevActorSwitcher />` from `@pikku/mantine/dev` — a separate entry point from
|
|
256
|
+
`@pikku/mantine/core`, whose contract is "drop-in alias for `@mantine/core`"
|
|
257
|
+
and so must not export components Mantine has no counterpart for.
|
|
258
|
+
- **`actors` is empty unless the host supplied both a list and a secret**, so a
|
|
259
|
+
production build renders nothing without you testing for it.
|
|
260
|
+
- **It takes `onSignedIn` rather than a router**, and takes the env values rather
|
|
261
|
+
than reading them, because how env is spelled is a bundler fact
|
|
262
|
+
(`import.meta.env.VITE_*` vs `process.env.NEXT_PUBLIC_*`).
|
|
263
|
+
- The underlying `signInAsActor()` and `parseDevActors()` are exported too, for a
|
|
264
|
+
non-React caller. The endpoint only accepts rows flagged `actor: true`, so it
|
|
265
|
+
can never impersonate a real user — see **pikku-better-auth**.
|
|
266
|
+
|
|
267
|
+
Do not hand-write the `devActors()` / `signInAsActor()` pair per app; that
|
|
268
|
+
copy-paste, including the `import.meta.env.DEV` gate, is exactly what this
|
|
269
|
+
replaced.
|
|
270
|
+
|
|
231
271
|
## What NOT to do
|
|
232
272
|
|
|
233
273
|
- Don't instantiate `PikkuFetch`/`PikkuRPC` inside a component — `createPikku`
|