@sylphx/flow 2.28.10 → 2.29.0
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 +15 -0
- package/assets/skills/account-security/SKILL.md +7 -30
- package/assets/skills/admin/SKILL.md +6 -44
- package/assets/skills/appsec/SKILL.md +6 -8
- package/assets/skills/auth/SKILL.md +4 -18
- package/assets/skills/billing/SKILL.md +7 -35
- package/assets/skills/data-modeling/SKILL.md +6 -21
- package/assets/skills/database/SKILL.md +4 -20
- package/assets/skills/delivery/SKILL.md +3 -4
- package/assets/skills/deployments/SKILL.md +3 -3
- package/assets/skills/growth/SKILL.md +1 -1
- package/assets/skills/i18n/SKILL.md +3 -20
- package/assets/skills/ledger/SKILL.md +3 -19
- package/assets/skills/observability/SKILL.md +1 -2
- package/assets/skills/performance/SKILL.md +2 -1
- package/assets/skills/pricing/SKILL.md +6 -34
- package/assets/skills/pwa/SKILL.md +3 -42
- package/assets/skills/referral/SKILL.md +10 -12
- package/assets/skills/seo/SKILL.md +21 -12
- package/assets/skills/storage/SKILL.md +11 -25
- package/assets/skills/support/SKILL.md +11 -12
- package/assets/skills/uiux/SKILL.md +15 -35
- package/assets/slash-commands/continue.md +11 -84
- package/assets/slash-commands/continue2.md +88 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 2.29.0 (2026-01-07)
|
|
4
|
+
|
|
5
|
+
Add /continue2 slash command; clarify skill boundaries; remove hardcoded Radix list
|
|
6
|
+
|
|
7
|
+
### ✨ Features
|
|
8
|
+
|
|
9
|
+
- add /continue2 slash command for iterative guideline review ([3974493](https://github.com/SylphxAI/flow/commit/3974493257b74b8e603634d827af911314162562))
|
|
10
|
+
|
|
11
|
+
### 📚 Documentation
|
|
12
|
+
|
|
13
|
+
- remove hardcoded Radix primitives list from uiux ([a27b148](https://github.com/SylphxAI/flow/commit/a27b1480cb7286e3935c92ed4cd6c597093e06b9))
|
|
14
|
+
- clarify skill boundaries and remove duplicates ([962114e](https://github.com/SylphxAI/flow/commit/962114e5ae8394abe483863d1390e1ea64ec2205))
|
|
15
|
+
- refactor all skills to be requirement-focused ([06d222b](https://github.com/SylphxAI/flow/commit/06d222beed6ec16906778a3b5d77852b60fc84a4))
|
|
16
|
+
- add comprehensive web standards (HTML5 head, manifest, required files) ([0cb6d7f](https://github.com/SylphxAI/flow/commit/0cb6d7fe88d7d27c0b0039849d4d77d505177b5d))
|
|
17
|
+
|
|
3
18
|
## 2.28.10 (2026-01-05)
|
|
4
19
|
|
|
5
20
|
Make Radix UI mandatory - if Radix has it, you MUST use it
|
|
@@ -8,46 +8,23 @@ description: Account security - MFA, sessions, recovery. Use when protecting use
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **Auth**: Better Auth
|
|
11
|
-
* **Framework**: Next.js
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
12
12
|
* **Database**: Neon (Postgres)
|
|
13
13
|
|
|
14
|
-
## Re-authentication Flow
|
|
15
|
-
|
|
16
|
-
All sensitive operations require explicit re-authentication:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
Sensitive action triggered
|
|
20
|
-
↓
|
|
21
|
-
Check verified session
|
|
22
|
-
↓
|
|
23
|
-
Does the user have a password?
|
|
24
|
-
├─ Yes → Verify password
|
|
25
|
-
└─ No → Send email OTP (6 digits, 10-minute expiry)
|
|
26
|
-
↓
|
|
27
|
-
Verification succeeds
|
|
28
|
-
↓
|
|
29
|
-
Mark session as verified
|
|
30
|
-
↓
|
|
31
|
-
Allow scoped, time-bound sensitive actions
|
|
32
|
-
(2FA setup, email change, account deletion, etc.)
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The verified state must:
|
|
36
|
-
- Have explicit scope
|
|
37
|
-
- Have explicit expiration
|
|
38
|
-
- Never be implicitly reused
|
|
39
|
-
- Never be shared across sessions or contexts
|
|
40
|
-
|
|
41
14
|
## Non-Negotiables
|
|
42
15
|
|
|
16
|
+
* MFA required for admin/super_admin roles
|
|
17
|
+
* Sensitive actions require step-up re-authentication (password or email OTP)
|
|
18
|
+
* Verified session state must be scoped, time-bound, never implicitly reused
|
|
43
19
|
* Session/device visibility and revocation must exist
|
|
44
20
|
* All security-sensitive actions must be server-enforced and auditable
|
|
45
21
|
* Account recovery must require step-up verification
|
|
46
|
-
* MFA via Better Auth (no custom implementation)
|
|
47
22
|
|
|
48
23
|
## Context
|
|
49
24
|
|
|
50
|
-
Account security
|
|
25
|
+
Account security handles how users manage sessions — visibility, revocation, step-up verification, MFA. Sign-in and SSO live in `auth`.
|
|
26
|
+
|
|
27
|
+
This is the SSOT for MFA policy. Admin and other privileged roles reference this.
|
|
51
28
|
|
|
52
29
|
## Driving Questions
|
|
53
30
|
|
|
@@ -7,65 +7,27 @@ description: Admin panel - RBAC, config, admin tools. Use when building admin UI
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
* **Framework**: Next.js
|
|
10
|
+
* **Framework**: Next.js (with Turbopack)
|
|
11
11
|
* **API**: tRPC
|
|
12
12
|
* **Database**: Neon (Postgres)
|
|
13
13
|
* **ORM**: Drizzle
|
|
14
14
|
* **Components**: Radix UI
|
|
15
|
-
* **Styling**:
|
|
16
|
-
|
|
17
|
-
## Bootstrap: Super Admin
|
|
18
|
-
|
|
19
|
-
Simplest possible approach:
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
INITIAL_SUPERADMIN_EMAIL=your@email.com
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Flow:
|
|
26
|
-
1. Set env variable
|
|
27
|
-
2. Register with that email
|
|
28
|
-
3. Automatically elevated to super_admin
|
|
29
|
-
4. Done
|
|
30
|
-
|
|
31
|
-
Why singular:
|
|
32
|
-
- Only one initial super_admin needed
|
|
33
|
-
- They promote others via admin UI
|
|
34
|
-
- Simple = fewer bugs
|
|
35
|
-
|
|
36
|
-
The bootstrap must:
|
|
37
|
-
- Execute exactly once
|
|
38
|
-
- Be non-reentrant
|
|
39
|
-
- Not be bypassable
|
|
40
|
-
- Not become permanent logic dependency
|
|
15
|
+
* **Styling**: Tailwind CSS
|
|
41
16
|
|
|
42
17
|
## Non-Negotiables
|
|
43
18
|
|
|
44
|
-
* Admin bootstrap via INITIAL_SUPERADMIN_EMAIL only
|
|
19
|
+
* Admin bootstrap via INITIAL_SUPERADMIN_EMAIL only (one-time, non-reentrant)
|
|
45
20
|
* All privilege grants must be audited (who/when/why)
|
|
46
21
|
* Actions affecting money/access/security require step-up verification
|
|
47
22
|
* Secrets must never be exposed through admin UI
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
## Role Hierarchy
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
super_admin
|
|
54
|
-
↓ (can promote to)
|
|
55
|
-
admin
|
|
56
|
-
↓ (can manage)
|
|
57
|
-
users
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Only super_admin can:
|
|
61
|
-
- Promote users to admin
|
|
62
|
-
- Access system configuration
|
|
63
|
-
- View audit logs
|
|
23
|
+
* Only super_admin can promote to admin or access system config
|
|
64
24
|
|
|
65
25
|
## Context
|
|
66
26
|
|
|
67
27
|
The admin platform is where operational power lives — and where operational mistakes happen. A well-designed admin reduces human error while giving operators tools to resolve issues quickly.
|
|
68
28
|
|
|
29
|
+
MFA requirements for admin roles are enforced via `account-security`.
|
|
30
|
+
|
|
69
31
|
## Driving Questions
|
|
70
32
|
|
|
71
33
|
* Is bootstrap using INITIAL_SUPERADMIN_EMAIL correctly?
|
|
@@ -8,30 +8,28 @@ description: Application security - OWASP, validation, secrets. Use when securin
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **Rate Limiting**: Upstash Redis
|
|
11
|
-
* **Framework**: Next.js
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
12
12
|
* **Platform**: Vercel
|
|
13
13
|
|
|
14
14
|
## Non-Negotiables
|
|
15
15
|
|
|
16
16
|
* OWASP Top 10:2025 vulnerabilities must be addressed
|
|
17
|
-
* CSP, HSTS, X-Frame-Options, X-Content-Type-Options
|
|
17
|
+
* Security headers present (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
|
|
18
18
|
* CSRF protection on state-changing requests
|
|
19
|
-
* No plaintext
|
|
20
|
-
* MFA required for Admin/SUPER_ADMIN roles
|
|
19
|
+
* No plaintext secrets in logs, returns, storage, or telemetry
|
|
21
20
|
* Required configuration must fail-fast at build/startup if missing
|
|
22
21
|
* Secrets must not be hardcoded or committed
|
|
23
22
|
|
|
24
23
|
## Context
|
|
25
24
|
|
|
26
|
-
Security isn't a feature — it's a foundational property. A single vulnerability can compromise everything else.
|
|
25
|
+
Security isn't a feature — it's a foundational property. A single vulnerability can compromise everything else. Think like an attacker: where are the weak points?
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
MFA and session security live in `account-security`. This skill focuses on application-level attack surface.
|
|
29
28
|
|
|
30
29
|
## Driving Questions
|
|
31
30
|
|
|
32
31
|
* What would an attacker target first?
|
|
33
32
|
* Where is rate limiting missing or insufficient?
|
|
34
|
-
* What attack vectors exist in authentication flows?
|
|
35
33
|
* How are secrets managed and what's the rotation strategy?
|
|
36
|
-
* What happens when a secret is compromised
|
|
34
|
+
* What happens when a secret is compromised?
|
|
37
35
|
* Where does "security by obscurity" substitute for real controls?
|
|
@@ -8,34 +8,21 @@ description: Authentication patterns - sign-in, SSO, passkeys, sessions. Use whe
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **Auth**: Better Auth
|
|
11
|
-
* **Framework**: Next.js
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
12
12
|
* **Database**: Neon (Postgres)
|
|
13
13
|
* **ORM**: Drizzle
|
|
14
14
|
|
|
15
15
|
## Non-Negotiables
|
|
16
16
|
|
|
17
|
+
* All authentication via Better Auth (no custom implementation)
|
|
17
18
|
* All authorization decisions must be server-enforced (no client-trust)
|
|
18
19
|
* Email verification required for high-impact capabilities
|
|
20
|
+
* Session token in httpOnly cookie only
|
|
19
21
|
* If SSO provider secrets are missing, hide the option (no broken UI)
|
|
20
|
-
* Session management via Better Auth (no custom implementation)
|
|
21
|
-
|
|
22
|
-
## Auth Flow
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
User initiates sign-in
|
|
26
|
-
↓
|
|
27
|
-
Better Auth handles provider/credentials
|
|
28
|
-
↓
|
|
29
|
-
Session created server-side
|
|
30
|
-
↓
|
|
31
|
-
Session token in httpOnly cookie
|
|
32
|
-
↓
|
|
33
|
-
All requests validated server-side
|
|
34
|
-
```
|
|
35
22
|
|
|
36
23
|
## Context
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
Auth handles how users get sessions — sign-in, SSO, token issuance. Session management (visibility, revocation, step-up) lives in `account-security`.
|
|
39
26
|
|
|
40
27
|
Better Auth is the SSOT for authentication. No custom auth implementations.
|
|
41
28
|
|
|
@@ -45,4 +32,3 @@ Better Auth is the SSOT for authentication. No custom auth implementations.
|
|
|
45
32
|
* Are we building custom auth logic that Better Auth already provides?
|
|
46
33
|
* What's the sign-in experience for first-time vs returning users?
|
|
47
34
|
* What happens when a user loses access to their primary auth method?
|
|
48
|
-
* Where is auth complexity hiding bugs or security issues?
|
|
@@ -12,52 +12,24 @@ description: Billing - Stripe, webhooks, subscriptions. Use when implementing pa
|
|
|
12
12
|
* **Database**: Neon (Postgres)
|
|
13
13
|
* **ORM**: Drizzle
|
|
14
14
|
|
|
15
|
-
## Platform-Led Billing
|
|
16
|
-
|
|
17
|
-
Platform is the source of truth. Stripe syncs FROM platform, not TO it.
|
|
18
|
-
|
|
19
|
-
- Platform defines products, prices, features, entitlements
|
|
20
|
-
- Stripe is synced to match platform state
|
|
21
|
-
- No manual Stripe dashboard configuration
|
|
22
|
-
- Platform state → Stripe sync (never reverse)
|
|
23
|
-
- Stripe webhooks confirm sync success, not drive state
|
|
24
|
-
|
|
25
15
|
## Non-Negotiables
|
|
26
16
|
|
|
27
17
|
* Webhook signature must be verified (reject unverifiable events)
|
|
28
18
|
* Stripe event ID must be used for idempotency
|
|
29
19
|
* Webhooks must handle out-of-order delivery
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
## Subscription Lifecycle
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Platform defines plan
|
|
37
|
-
↓
|
|
38
|
-
Sync to Stripe (create Product + Price)
|
|
39
|
-
↓
|
|
40
|
-
User selects plan in UI
|
|
41
|
-
↓
|
|
42
|
-
Create Stripe Checkout Session
|
|
43
|
-
↓
|
|
44
|
-
User completes payment
|
|
45
|
-
↓
|
|
46
|
-
Webhook confirms → Update platform state
|
|
47
|
-
↓
|
|
48
|
-
Entitlements derived from platform state
|
|
49
|
-
```
|
|
20
|
+
* Subscription state changes must be audit-logged
|
|
21
|
+
* Payment failures must trigger appropriate user communication
|
|
50
22
|
|
|
51
23
|
## Context
|
|
52
24
|
|
|
53
|
-
Billing
|
|
25
|
+
Billing handles the payment processing mechanics — webhooks, subscription lifecycle, payment methods. It's the plumbing that moves money. Pricing strategy and entitlements live in `pricing`.
|
|
54
26
|
|
|
55
|
-
The platform owns billing logic. Stripe is a payment processor, not
|
|
27
|
+
The platform owns billing logic. Stripe is a payment processor. All billing configuration must be in code, not Stripe dashboard.
|
|
56
28
|
|
|
57
29
|
## Driving Questions
|
|
58
30
|
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* What happens when webhooks arrive out of order?
|
|
31
|
+
* Are webhooks handling all subscription lifecycle events?
|
|
32
|
+
* What happens when payment fails mid-cycle?
|
|
62
33
|
* How are disputes and chargebacks handled end-to-end?
|
|
34
|
+
* Can failed webhooks be safely replayed?
|
|
63
35
|
* Where could revenue leak (failed renewals, unhandled states)?
|
|
@@ -8,42 +8,27 @@ description: Data modeling - entities, relationships, schemas. Use when designin
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **API**: tRPC
|
|
11
|
-
* **Framework**: Next.js
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
12
12
|
* **Database**: Neon (Postgres)
|
|
13
13
|
* **ORM**: Drizzle
|
|
14
14
|
|
|
15
15
|
## Non-Negotiables
|
|
16
16
|
|
|
17
17
|
* All authorization must be server-enforced (no client-trust)
|
|
18
|
-
* Platform is source of truth
|
|
18
|
+
* Platform is source of truth — third-party services sync FROM platform
|
|
19
19
|
* UI must never contradict server-truth
|
|
20
20
|
* High-value mutations must have audit trail (who/when/why/before/after)
|
|
21
21
|
|
|
22
|
-
## Platform-Led Data Flow
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
Platform State (SSOT)
|
|
26
|
-
↓
|
|
27
|
-
Third-party services sync FROM platform
|
|
28
|
-
↓
|
|
29
|
-
Webhooks confirm sync success
|
|
30
|
-
↓
|
|
31
|
-
Never reverse the flow
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Platform defines products, prices, entitlements. External services reflect platform state.
|
|
35
|
-
|
|
36
22
|
## Context
|
|
37
23
|
|
|
38
|
-
Data
|
|
24
|
+
Data modeling is conceptual — entities, relationships, domain boundaries. Physical implementation (indexes, migrations, query performance) lives in `database`.
|
|
39
25
|
|
|
40
|
-
Consider
|
|
26
|
+
Consider: what are the real-world entities? How do they relate? What invariants must hold? What will break when requirements change?
|
|
41
27
|
|
|
42
28
|
## Driving Questions
|
|
43
29
|
|
|
44
30
|
* If we were designing this from scratch, what would be different?
|
|
45
|
-
* Where will the current
|
|
31
|
+
* Where will the current model break as the product scales?
|
|
46
32
|
* What implicit assumptions are waiting to cause bugs?
|
|
47
|
-
* How do we know when state is inconsistent, and how do we recover?
|
|
48
33
|
* Where is complexity hiding that makes the system hard to reason about?
|
|
49
|
-
* What
|
|
34
|
+
* What domain boundaries are we violating?
|
|
@@ -13,31 +13,15 @@ description: Database - schema, indexes, migrations. Use when working with datab
|
|
|
13
13
|
|
|
14
14
|
## Non-Negotiables
|
|
15
15
|
|
|
16
|
+
* All database access through Drizzle (no raw SQL unless necessary)
|
|
16
17
|
* Migration files must exist, be complete, and be committed
|
|
17
18
|
* CI must fail if schema changes aren't represented by migrations
|
|
18
19
|
* No schema drift between environments
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
## Schema Design
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
// Drizzle schema is SSOT
|
|
25
|
-
export const users = pgTable('users', {
|
|
26
|
-
id: text('id').primaryKey(),
|
|
27
|
-
email: text('email').notNull().unique(),
|
|
28
|
-
role: text('role').notNull().default('user'),
|
|
29
|
-
createdAt: timestamp('created_at').defaultNow(),
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
// Relations explicit
|
|
33
|
-
export const usersRelations = relations(users, ({ many }) => ({
|
|
34
|
-
sessions: many(sessions),
|
|
35
|
-
}))
|
|
36
|
-
```
|
|
20
|
+
* Drizzle schema is SSOT for database structure
|
|
37
21
|
|
|
38
22
|
## Context
|
|
39
23
|
|
|
40
|
-
|
|
24
|
+
Database handles physical implementation — schema, indexes, migrations, query performance. Conceptual modeling (entities, relationships) lives in `data-modeling`.
|
|
41
25
|
|
|
42
26
|
Drizzle is the SSOT for database access. Type-safe, end-to-end.
|
|
43
27
|
|
|
@@ -47,4 +31,4 @@ Drizzle is the SSOT for database access. Type-safe, end-to-end.
|
|
|
47
31
|
* Are migrations complete and committed?
|
|
48
32
|
* What constraints are missing that would prevent invalid state?
|
|
49
33
|
* Where are missing indexes causing slow queries?
|
|
50
|
-
*
|
|
34
|
+
* What queries are N+1 or unbounded?
|
|
@@ -18,14 +18,14 @@ description: Delivery - CI/CD, testing, releases. Use when improving pipelines.
|
|
|
18
18
|
* Build must fail-fast on missing required configuration
|
|
19
19
|
* CI must block on: lint, typecheck, tests, build
|
|
20
20
|
* `/en/*` must redirect (no duplicate content)
|
|
21
|
-
* Security headers
|
|
21
|
+
* Security headers must be verified by tests
|
|
22
22
|
* Consent gating must be verified by tests
|
|
23
23
|
|
|
24
24
|
## Context
|
|
25
25
|
|
|
26
|
-
Delivery
|
|
26
|
+
Delivery handles pre-production — CI/CD pipeline, release gates, quality checks. Post-deployment operations (rollback, feature flags, runbooks) live in `deployments`.
|
|
27
27
|
|
|
28
|
-
The question isn't "what tests do we have?" but "what could go wrong that we wouldn't catch?"
|
|
28
|
+
The question isn't "what tests do we have?" but "what could go wrong that we wouldn't catch?"
|
|
29
29
|
|
|
30
30
|
## Driving Questions
|
|
31
31
|
|
|
@@ -33,5 +33,4 @@ The question isn't "what tests do we have?" but "what could go wrong that we wou
|
|
|
33
33
|
* Where does manual verification substitute for automation?
|
|
34
34
|
* What flaky tests are training people to ignore failures?
|
|
35
35
|
* How fast is the feedback loop, and what slows it down?
|
|
36
|
-
* If a deploy breaks production, how fast can we detect and rollback?
|
|
37
36
|
* What's the worst thing that shipped recently that tests should have caught?
|
|
@@ -13,21 +13,21 @@ description: Deployments - rollback, feature flags, ops tooling. Use when shippi
|
|
|
13
13
|
|
|
14
14
|
## Non-Negotiables
|
|
15
15
|
|
|
16
|
+
* Rollback plan must exist and be exercisable
|
|
16
17
|
* Dead-letter handling must exist and be operable (visible, replayable)
|
|
17
18
|
* Side-effects (email, billing, ledger) must be idempotent or safely re-entrant
|
|
18
19
|
* Drift alerts must have remediation playbooks
|
|
19
20
|
|
|
20
21
|
## Context
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Deployments handles post-deployment operations — rollback, feature flags, runbooks, incident response. Pre-production CI/CD lives in `delivery`.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
When something goes wrong, can an operator fix it without deploying code?
|
|
25
26
|
|
|
26
27
|
## Driving Questions
|
|
27
28
|
|
|
28
29
|
* What happens when a job fails permanently?
|
|
29
30
|
* How would an operator know something is stuck?
|
|
30
31
|
* Can failed workflows be safely replayed without duplicating side-effects?
|
|
31
|
-
* What drift can occur between systems, and how would we detect it?
|
|
32
32
|
* What's the rollback plan if a deploy breaks something critical?
|
|
33
33
|
* What runbooks exist, and what runbooks should exist but don't?
|
|
@@ -8,34 +8,17 @@ description: Internationalization - localization, translations. Use when adding
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **i18n**: next-intl
|
|
11
|
-
* **Framework**: Next.js
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
12
12
|
|
|
13
13
|
## Non-Negotiables
|
|
14
14
|
|
|
15
|
+
* All i18n via next-intl (no custom implementation)
|
|
15
16
|
* `/en/*` must not exist (permanently redirect to non-prefixed)
|
|
16
17
|
* Missing translation keys must fail build
|
|
17
18
|
* No hardcoded user-facing strings outside localization
|
|
18
19
|
* Translation bundles must be split by namespace (no monolithic files)
|
|
19
20
|
* Server Components for translations wherever possible
|
|
20
|
-
|
|
21
|
-
## Bundle Strategy
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
messages/
|
|
25
|
-
├── en/
|
|
26
|
-
│ ├── common.json # Shared strings
|
|
27
|
-
│ ├── auth.json # Auth flow
|
|
28
|
-
│ ├── dashboard.json # Dashboard
|
|
29
|
-
│ └── settings.json # Settings
|
|
30
|
-
└── zh/
|
|
31
|
-
├── common.json
|
|
32
|
-
├── auth.json
|
|
33
|
-
├── dashboard.json
|
|
34
|
-
└── settings.json
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Each route loads only its required namespaces.
|
|
38
|
-
Client bundles must not include server-only translations.
|
|
21
|
+
* Client bundles must not include server-only translations
|
|
39
22
|
|
|
40
23
|
## Context
|
|
41
24
|
|
|
@@ -7,7 +7,6 @@ description: Financial ledger - transactions, audit trails. Use when tracking mo
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
* **Payments**: Stripe
|
|
11
10
|
* **Database**: Neon (Postgres)
|
|
12
11
|
* **ORM**: Drizzle
|
|
13
12
|
|
|
@@ -16,27 +15,13 @@ description: Financial ledger - transactions, audit trails. Use when tracking mo
|
|
|
16
15
|
* Balances must be immutable ledger (append-only), not mutable fields
|
|
17
16
|
* No floating-point for money (use deterministic precision)
|
|
18
17
|
* All financial mutations must be idempotent
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
## Platform-Led Financial State
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
Platform Ledger (SSOT)
|
|
25
|
-
↓
|
|
26
|
-
Stripe syncs from platform
|
|
27
|
-
↓
|
|
28
|
-
Webhooks confirm sync success
|
|
29
|
-
↓
|
|
30
|
-
Reconciliation verifies alignment
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Platform defines credits, balances, transactions. Stripe reflects platform state, not the reverse.
|
|
18
|
+
* Every balance must be provable by replaying the ledger
|
|
34
19
|
|
|
35
20
|
## Context
|
|
36
21
|
|
|
37
|
-
|
|
22
|
+
Ledger handles financial integrity — transaction history, balance correctness, audit trail. Payment processing lives in `billing`, pricing strategy lives in `pricing`.
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
A bug that creates or destroys money is a serious incident. This must be bulletproof.
|
|
40
25
|
|
|
41
26
|
## Driving Questions
|
|
42
27
|
|
|
@@ -45,4 +30,3 @@ If balance/credits/wallet exists, it must be bulletproof. If it doesn't exist ye
|
|
|
45
30
|
* What happens during concurrent transactions?
|
|
46
31
|
* How would we detect if balances drifted from reality?
|
|
47
32
|
* Can we prove every balance by replaying the ledger?
|
|
48
|
-
* What financial edge cases (refunds, disputes, chargebacks) aren't handled?
|
|
@@ -15,14 +15,13 @@ description: Observability - logging, metrics, tracing. Use when adding monitori
|
|
|
15
15
|
|
|
16
16
|
* Correlation IDs must exist end-to-end (request → job → webhook)
|
|
17
17
|
* Alerts must exist for critical failures
|
|
18
|
-
* No PII in logs or error tracking
|
|
19
18
|
* Errors must be actionable, not noise
|
|
20
19
|
|
|
21
20
|
## Context
|
|
22
21
|
|
|
23
22
|
Observability is about answering questions when things go wrong. It's 3am, something is broken — can you figure out what happened? How fast?
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
PII protection in logs is enforced via `privacy`. This skill focuses on making debugging effective.
|
|
26
25
|
|
|
27
26
|
## Driving Questions
|
|
28
27
|
|
|
@@ -7,7 +7,7 @@ description: Performance - Core Web Vitals, bundle size. Use when optimizing spe
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
* **Framework**: Next.js (
|
|
10
|
+
* **Framework**: Next.js (with Turbopack)
|
|
11
11
|
* **Platform**: Vercel
|
|
12
12
|
* **Tooling**: Bun
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ description: Performance - Core Web Vitals, bundle size. Use when optimizing spe
|
|
|
15
15
|
|
|
16
16
|
* Core Web Vitals must meet thresholds (LCP < 2.5s, CLS < 0.1, INP < 200ms)
|
|
17
17
|
* Performance regressions must be detectable
|
|
18
|
+
* JavaScript bundle size must be monitored and optimized
|
|
18
19
|
|
|
19
20
|
## Context
|
|
20
21
|
|
|
@@ -11,50 +11,22 @@ description: Pricing strategy - tiers, feature gating. Use when designing pricin
|
|
|
11
11
|
* **Database**: Neon (Postgres)
|
|
12
12
|
* **ORM**: Drizzle
|
|
13
13
|
|
|
14
|
-
## Platform-Led Pricing
|
|
15
|
-
|
|
16
|
-
Platform is the source of truth for all pricing.
|
|
17
|
-
|
|
18
|
-
- Products, prices, tiers, features defined in platform code
|
|
19
|
-
- Stripe Products/Prices created via sync, not manually
|
|
20
|
-
- No Stripe dashboard configuration
|
|
21
|
-
- Pricing changes → code change → sync to Stripe
|
|
22
|
-
- Historical prices remain in Stripe (immutable)
|
|
23
|
-
|
|
24
14
|
## Non-Negotiables
|
|
25
15
|
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* Pricing drift must be detectable and auto-correctable
|
|
16
|
+
* Platform is source of truth — Stripe syncs FROM platform, never reverse
|
|
17
|
+
* All pricing/product configuration must be in code
|
|
29
18
|
* Feature entitlements derived from platform state, not Stripe metadata
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// Platform defines pricing (code is SSOT)
|
|
35
|
-
const plans = {
|
|
36
|
-
free: { price: 0, features: ['basic'] },
|
|
37
|
-
pro: { price: 29, features: ['basic', 'advanced', 'priority'] },
|
|
38
|
-
enterprise: { price: 299, features: ['basic', 'advanced', 'priority', 'sla'] }
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Sync to Stripe on deploy/startup
|
|
42
|
-
await syncPricingToStripe(plans)
|
|
43
|
-
```
|
|
19
|
+
* Pricing drift must be detectable and auto-correctable
|
|
20
|
+
* No manual Stripe dashboard configuration
|
|
44
21
|
|
|
45
22
|
## Context
|
|
46
23
|
|
|
47
|
-
Pricing
|
|
48
|
-
|
|
49
|
-
Platform owns pricing. Stripe is the payment processor. This separation allows:
|
|
50
|
-
- A/B testing pricing without Stripe changes
|
|
51
|
-
- Switching processors without repricing
|
|
52
|
-
- Complex entitlement logic beyond Stripe's model
|
|
24
|
+
Pricing owns strategy — what tiers exist, what features each tier gets, how upgrades work. Billing handles the payment mechanics. This separation allows switching payment processors without repricing.
|
|
53
25
|
|
|
54
26
|
## Driving Questions
|
|
55
27
|
|
|
56
28
|
* Is all pricing defined in code?
|
|
57
|
-
* Can we change pricing without touching Stripe dashboard?
|
|
58
29
|
* How do we test pricing changes before going live?
|
|
59
30
|
* What would make upgrading feel like an obvious decision?
|
|
60
31
|
* How do we communicate value at each tier?
|
|
32
|
+
* Can we A/B test pricing without Stripe changes?
|
|
@@ -7,7 +7,7 @@ description: PWA - native app parity, offline-first, engagement. Use when buildi
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
* **Framework**: Next.js
|
|
10
|
+
* **Framework**: Next.js (with Turbopack)
|
|
11
11
|
* **Service Worker**: Serwist (Next.js integration)
|
|
12
12
|
* **Platform**: Vercel
|
|
13
13
|
|
|
@@ -17,47 +17,8 @@ description: PWA - native app parity, offline-first, engagement. Use when buildi
|
|
|
17
17
|
* Cache invalidation on deploy must be correct (no stale content)
|
|
18
18
|
* Offline experience must be functional, not just a fallback page
|
|
19
19
|
* Installation prompt must be contextual (after value demonstrated)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| Capability | API |
|
|
24
|
-
|------------|-----|
|
|
25
|
-
| True offline | Cache API + localStorage/IndexedDB |
|
|
26
|
-
| Background sync | Background Sync API |
|
|
27
|
-
| App icon badge | Badging API |
|
|
28
|
-
| Local notifications | Notifications API |
|
|
29
|
-
| Push notifications | Web Push API |
|
|
30
|
-
| App shortcuts | manifest.json `shortcuts` |
|
|
31
|
-
| File handling | File Handling API |
|
|
32
|
-
| Protocol handling | registerProtocolHandler |
|
|
33
|
-
| Pull-to-refresh | Touch events + CSS |
|
|
34
|
-
| View transitions | View Transitions API |
|
|
35
|
-
| Bottom sheets | CSS + touch gestures |
|
|
36
|
-
| Skeleton loading | CSS + React Suspense |
|
|
37
|
-
| Swipe gestures | Touch/Pointer events |
|
|
38
|
-
| Haptic feedback | Vibration API |
|
|
39
|
-
| Sound effects | Web Audio API |
|
|
40
|
-
| Media controls | Media Session API |
|
|
41
|
-
| Wake lock | Screen Wake Lock API |
|
|
42
|
-
| Orientation lock | Screen Orientation API |
|
|
43
|
-
| Fullscreen | Fullscreen API |
|
|
44
|
-
| Picture-in-Picture | PiP API |
|
|
45
|
-
| Share | Web Share API |
|
|
46
|
-
| Receive share | Share Target API |
|
|
47
|
-
| Clipboard | Clipboard API |
|
|
48
|
-
| Camera/Mic | MediaDevices API |
|
|
49
|
-
| Geolocation | Geolocation API |
|
|
50
|
-
| Motion sensors | DeviceMotion/Orientation |
|
|
51
|
-
| Bluetooth | Web Bluetooth API |
|
|
52
|
-
| NFC | Web NFC API |
|
|
53
|
-
| Barcode scan | Barcode Detection API |
|
|
54
|
-
| Speech | Web Speech API |
|
|
55
|
-
| Payments | Payment Request API |
|
|
56
|
-
| Credentials | Credential Management API |
|
|
57
|
-
| Idle detection | Idle Detection API |
|
|
58
|
-
| Network status | Network Information API |
|
|
59
|
-
| Reduced motion | `prefers-reduced-motion` |
|
|
60
|
-
| Window controls | Window Controls Overlay |
|
|
20
|
+
* Complete manifest.webmanifest with all required fields
|
|
21
|
+
* All required icons present (favicon, apple-touch-icon, PWA icons, maskable)
|
|
61
22
|
|
|
62
23
|
## Context
|
|
63
24
|
|
|
@@ -9,24 +9,22 @@ description: Referral systems - referral programs, viral loops. Use for referral
|
|
|
9
9
|
|
|
10
10
|
* **Analytics**: PostHog
|
|
11
11
|
* **Database**: Neon (Postgres)
|
|
12
|
+
* **ORM**: Drizzle
|
|
12
13
|
|
|
13
14
|
## Non-Negotiables
|
|
14
15
|
|
|
15
|
-
* Referral
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Referral attribution must be accurate and auditable
|
|
17
|
+
* Rewards must be fraud-resistant (no self-referral, duplicate abuse)
|
|
18
|
+
* Terms must be clear and enforced consistently
|
|
18
19
|
|
|
19
20
|
## Context
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Consider both sides: what makes users want to share? And what prevents bad actors from gaming the system? A referral program that's easy to abuse is worse than no referral program.
|
|
22
|
+
Referrals turn happy users into growth engines. But poorly designed referral programs create fraud opportunities and erode trust. The best referral programs feel generous, not gameable.
|
|
24
23
|
|
|
25
24
|
## Driving Questions
|
|
26
25
|
|
|
27
|
-
*
|
|
28
|
-
* How
|
|
29
|
-
*
|
|
30
|
-
* What
|
|
31
|
-
*
|
|
32
|
-
* If we redesigned referrals from scratch, what would be different?
|
|
26
|
+
* What would make users genuinely want to refer others?
|
|
27
|
+
* How do we prevent referral fraud without punishing legitimate users?
|
|
28
|
+
* Is referral attribution working correctly across all channels?
|
|
29
|
+
* What's the referral conversion rate and what affects it?
|
|
30
|
+
* Are referral rewards actually motivating behavior?
|
|
@@ -7,25 +7,34 @@ description: SEO - meta tags, structured data. Use when optimizing for search.
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
* **Framework**: Next.js (SSR-first
|
|
10
|
+
* **Framework**: Next.js (with Turbopack, SSR-first)
|
|
11
11
|
|
|
12
12
|
## Non-Negotiables
|
|
13
13
|
|
|
14
|
-
*
|
|
14
|
+
* Every page must have complete metadata (title, description, canonical, OG, Twitter Cards)
|
|
15
15
|
* Canonical URLs must be correct (no duplicate content)
|
|
16
|
-
*
|
|
16
|
+
* Complete favicon set (ico, svg, apple-touch-icon, PWA icons)
|
|
17
|
+
* Structured data (JSON-LD) for rich results where applicable
|
|
18
|
+
* Security headers configured (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
|
|
17
19
|
|
|
18
|
-
##
|
|
20
|
+
## Required Files
|
|
21
|
+
|
|
22
|
+
* `robots.txt` — search engine crawling rules
|
|
23
|
+
* `sitemap.xml` — page discovery for search engines
|
|
24
|
+
* `llms.txt` — LLM/AI crawler guidance
|
|
25
|
+
* `security.txt` — security vulnerability reporting (at `/.well-known/security.txt`)
|
|
26
|
+
* `ads.txt` — if ads exist
|
|
27
|
+
* `app-ads.txt` — if mobile ads exist
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
## Context
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
SEO is about being found when people are looking for what you offer. Good SEO isn't tricks — it's making content genuinely useful and technically accessible to search engines and AI crawlers.
|
|
23
32
|
|
|
24
33
|
## Driving Questions
|
|
25
34
|
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
35
|
+
* Is every page's head complete with all required meta tags?
|
|
36
|
+
* Are Open Graph and Twitter Cards generating correct previews?
|
|
37
|
+
* Is structured data present and validated?
|
|
38
|
+
* Do all required files exist and pass validation?
|
|
39
|
+
* Is the site accessible to both search engines and LLM crawlers?
|
|
40
|
+
* Are security headers properly configured?
|
|
@@ -8,40 +8,26 @@ description: File storage - uploads, CDN, blobs. Use when handling files.
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **Storage**: Vercel Blob
|
|
11
|
+
* **Framework**: Next.js (with Turbopack)
|
|
11
12
|
* **Platform**: Vercel
|
|
12
|
-
* **Framework**: Next.js
|
|
13
13
|
|
|
14
14
|
## Non-Negotiables
|
|
15
15
|
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
## Upload Flow
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
Client requests upload URL
|
|
25
|
-
↓
|
|
26
|
-
Server creates signed upload token
|
|
27
|
-
↓
|
|
28
|
-
Client uploads to Vercel Blob
|
|
29
|
-
↓
|
|
30
|
-
Server validates and attaches to resource
|
|
31
|
-
↓
|
|
32
|
-
Orphaned blobs cleaned periodically
|
|
33
|
-
```
|
|
16
|
+
* All file uploads must be validated (type, size, content)
|
|
17
|
+
* Signed URLs for private content access
|
|
18
|
+
* No user-uploaded content served from main domain (XSS prevention)
|
|
19
|
+
* File deletion must cascade with parent entity deletion
|
|
34
20
|
|
|
35
21
|
## Context
|
|
36
22
|
|
|
37
|
-
File uploads
|
|
23
|
+
File storage is deceptively complex. Users expect uploads to just work, but there are many ways for it to fail — large files, slow connections, wrong formats, malicious content.
|
|
38
24
|
|
|
39
25
|
Vercel Blob is the SSOT for file storage. No custom implementations.
|
|
40
26
|
|
|
41
27
|
## Driving Questions
|
|
42
28
|
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* What
|
|
46
|
-
*
|
|
47
|
-
*
|
|
29
|
+
* What happens when an upload fails halfway?
|
|
30
|
+
* How are large files handled without blocking?
|
|
31
|
+
* What file types are allowed and how is it enforced?
|
|
32
|
+
* How long are files retained after entity deletion?
|
|
33
|
+
* What's the storage cost and is it sustainable?
|
|
@@ -7,26 +7,25 @@ description: Support - help center, tickets, docs. Use when building support.
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
+
* **Framework**: Next.js (with Turbopack)
|
|
10
11
|
* **Email**: Resend
|
|
11
|
-
* **Framework**: Next.js
|
|
12
12
|
|
|
13
13
|
## Non-Negotiables
|
|
14
14
|
|
|
15
|
-
*
|
|
16
|
-
* Support
|
|
17
|
-
*
|
|
15
|
+
* Self-service must be prioritized over contact forms
|
|
16
|
+
* Support context must include user state (plan, usage, recent actions)
|
|
17
|
+
* Response time expectations must be set and met
|
|
18
18
|
|
|
19
19
|
## Context
|
|
20
20
|
|
|
21
|
-
Support is where
|
|
21
|
+
Support is where trust is won or lost. Users who need help are often frustrated — the support experience either deepens their trust or confirms their fears.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Great support isn't just fast responses — it's making users not need support in the first place. Every support ticket is a signal that something in the product could be clearer.
|
|
24
24
|
|
|
25
25
|
## Driving Questions
|
|
26
26
|
|
|
27
|
-
*
|
|
28
|
-
* What
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* What would make the support experience genuinely delightful?
|
|
27
|
+
* What are the most common support requests and can they be self-served?
|
|
28
|
+
* What context does support need that they don't have?
|
|
29
|
+
* Where does the product create confusion that leads to support tickets?
|
|
30
|
+
* How would we handle a surge in support volume?
|
|
31
|
+
* What would make users feel supported before they ask for help?
|
|
@@ -8,53 +8,33 @@ description: UI/UX - design system, accessibility. Use when building interfaces.
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
10
|
* **Framework**: Next.js (with Turbopack)
|
|
11
|
-
* **Components**: Radix UI
|
|
11
|
+
* **Components**: Radix UI (mandatory)
|
|
12
12
|
* **Styling**: Tailwind CSS
|
|
13
13
|
* **Icons**: @iconify-icon/react
|
|
14
14
|
|
|
15
|
-
## Radix UI
|
|
16
|
-
|
|
17
|
-
Radix UI is mandatory. If Radix has a primitive for it, you MUST use it.
|
|
18
|
-
No exceptions. No custom implementations. No alternative libraries.
|
|
19
|
-
|
|
20
|
-
Before building any interactive component, check Radix first.
|
|
21
|
-
If Radix provides it, use Radix. Period.
|
|
22
|
-
|
|
23
|
-
Radix primitives are the SSOT for:
|
|
24
|
-
- Dialogs, modals, sheets, drawers
|
|
25
|
-
- Dropdowns, menus, context menus
|
|
26
|
-
- Popovers, tooltips, hover cards
|
|
27
|
-
- Tabs, accordions, collapsibles
|
|
28
|
-
- Select, combobox, radio, checkbox, switch, toggle
|
|
29
|
-
- Sliders, progress, scroll areas
|
|
30
|
-
- Navigation menus, breadcrumbs
|
|
31
|
-
- Toasts, alerts, alert dialogs
|
|
32
|
-
- Avatar, aspect ratio, separator
|
|
33
|
-
- Forms, labels, toolbar
|
|
34
|
-
- Toggle groups, toggle buttons
|
|
15
|
+
## Radix UI (Mandatory)
|
|
35
16
|
|
|
17
|
+
If Radix has a primitive for it, you MUST use it. No exceptions. No custom implementations.
|
|
36
18
|
Any custom implementation of something Radix already provides is a bug.
|
|
37
|
-
When similar UI problems arise, solve once with Radix, reuse everywhere.
|
|
38
19
|
|
|
39
20
|
## Non-Negotiables
|
|
40
21
|
|
|
41
|
-
* WCAG AA
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
22
|
+
* WCAG 2.1 AA compliance (keyboard navigation, screen readers, contrast)
|
|
23
|
+
* Touch targets minimum 44x44px on mobile
|
|
24
|
+
* Responsive design (mobile-first)
|
|
25
|
+
* Loading states for all async operations
|
|
26
|
+
* Error states must be actionable
|
|
27
|
+
* No layout shift on content load
|
|
46
28
|
|
|
47
29
|
## Context
|
|
48
30
|
|
|
49
|
-
UI/UX
|
|
50
|
-
|
|
51
|
-
Radix provides accessible, unstyled primitives. Tailwind provides utility-first styling. @iconify-icon/react provides unified icon access. Together they enable consistent, accessible UI without reinventing components.
|
|
31
|
+
UI/UX is about removing friction between users and value. Bad UX doesn't just feel bad — it costs conversion, retention, and trust.
|
|
52
32
|
|
|
53
33
|
## Driving Questions
|
|
54
34
|
|
|
55
|
-
* Is every interactive component using Radix?
|
|
56
|
-
* Are we building custom components Radix already provides?
|
|
57
|
-
* Is the design consistent across the product?
|
|
58
35
|
* Where do users get confused or frustrated?
|
|
59
|
-
* What would
|
|
60
|
-
*
|
|
36
|
+
* What would a first-time user struggle with?
|
|
37
|
+
* Where are loading states missing or unhelpful?
|
|
38
|
+
* What accessibility issues exist?
|
|
39
|
+
* Where does the UI feel inconsistent?
|
|
40
|
+
* What would make the product feel more polished?
|
|
@@ -52,74 +52,28 @@ The system must remain:
|
|
|
52
52
|
- Testable
|
|
53
53
|
- Observable
|
|
54
54
|
|
|
55
|
-
##
|
|
56
|
-
|
|
57
|
-
Radix UI is mandatory. If Radix has a primitive for it, you MUST use it.
|
|
58
|
-
No exceptions. No custom implementations. No alternative libraries.
|
|
59
|
-
|
|
60
|
-
Before building any interactive component, check Radix first.
|
|
61
|
-
If Radix provides it, use Radix. Period.
|
|
62
|
-
|
|
63
|
-
Radix primitives are the SSOT for:
|
|
64
|
-
- Dialogs, modals, sheets, drawers
|
|
65
|
-
- Dropdowns, menus, context menus
|
|
66
|
-
- Popovers, tooltips, hover cards
|
|
67
|
-
- Tabs, accordions, collapsibles
|
|
68
|
-
- Select, combobox, radio, checkbox, switch, toggle
|
|
69
|
-
- Sliders, progress, scroll areas
|
|
70
|
-
- Navigation menus, breadcrumbs
|
|
71
|
-
- Toasts, alerts, alert dialogs
|
|
72
|
-
- Avatar, aspect ratio, separator
|
|
73
|
-
- Forms, labels, toolbar
|
|
74
|
-
- Toggle groups, toggle buttons
|
|
55
|
+
## Radix UI (Mandatory)
|
|
75
56
|
|
|
57
|
+
If Radix has a primitive for it, you MUST use it. No exceptions. No custom implementations.
|
|
76
58
|
Any custom implementation of something Radix already provides is a bug.
|
|
77
|
-
When similar UI problems arise, solve once with Radix, reuse everywhere.
|
|
78
59
|
|
|
79
|
-
## Bootstrap
|
|
60
|
+
## Bootstrap
|
|
80
61
|
|
|
81
|
-
|
|
62
|
+
Admin bootstrap via INITIAL_SUPERADMIN_EMAIL only. One-time, non-reentrant, non-bypassable.
|
|
82
63
|
|
|
83
|
-
|
|
84
|
-
INITIAL_SUPERADMIN_EMAIL=your@email.com
|
|
85
|
-
```
|
|
64
|
+
## Platform-Led Integrations
|
|
86
65
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
3. Automatically elevated to super_admin
|
|
91
|
-
4. Done
|
|
66
|
+
Platform is source of truth. Third-party services sync FROM platform, never reverse.
|
|
67
|
+
All configuration in code. No manual third-party dashboard configuration.
|
|
68
|
+
Platform can switch providers without architectural change.
|
|
92
69
|
|
|
93
|
-
|
|
94
|
-
- Only one initial super_admin needed
|
|
95
|
-
- They promote others via admin UI
|
|
96
|
-
- Simple = fewer bugs
|
|
70
|
+
## Re-authentication
|
|
97
71
|
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- Be non-reentrant
|
|
101
|
-
- Not be bypassable
|
|
102
|
-
- Not become permanent logic dependency
|
|
103
|
-
|
|
104
|
-
## Third-Party Integrations: Platform-Led
|
|
105
|
-
|
|
106
|
-
The platform is the source of truth. Third-party services sync FROM the platform, not TO it.
|
|
107
|
-
|
|
108
|
-
**Stripe:**
|
|
109
|
-
- Platform defines products, prices, features
|
|
110
|
-
- Stripe is synced to match platform state
|
|
111
|
-
- No manual Stripe dashboard configuration
|
|
112
|
-
- Platform state → Stripe sync (never reverse)
|
|
113
|
-
|
|
114
|
-
**All integrations:**
|
|
115
|
-
- Design in platform first
|
|
116
|
-
- Third-party services are implementation details
|
|
117
|
-
- No dependency on third-party UI/configuration
|
|
118
|
-
- Platform can switch providers without architectural change
|
|
72
|
+
Sensitive actions require step-up re-authentication (password or email OTP).
|
|
73
|
+
Verified session state must be scoped, time-bound, never implicitly reused.
|
|
119
74
|
|
|
120
75
|
## Technologies
|
|
121
76
|
|
|
122
|
-
All must be used correctly, consistently, and idiomatically:
|
|
123
77
|
tRPC, Next.js (with Turbopack), Radix UI, next-intl, Drizzle,
|
|
124
78
|
Better Auth, Stripe, Upstash, Neon, Vercel,
|
|
125
79
|
Resend (email), Vercel Blob (storage),
|
|
@@ -128,33 +82,6 @@ Tailwind CSS (styling), @iconify-icon/react (icons),
|
|
|
128
82
|
Bun, Biome, Bun test,
|
|
129
83
|
Responsive Web Design.
|
|
130
84
|
|
|
131
|
-
## Re-authentication Flow
|
|
132
|
-
|
|
133
|
-
All sensitive operations require explicit re-authentication:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
Sensitive action triggered
|
|
137
|
-
↓
|
|
138
|
-
Check verified session
|
|
139
|
-
↓
|
|
140
|
-
Does the user have a password?
|
|
141
|
-
├─ Yes → Verify password
|
|
142
|
-
└─ No → Send email OTP (6 digits, 10-minute expiry)
|
|
143
|
-
↓
|
|
144
|
-
Verification succeeds
|
|
145
|
-
↓
|
|
146
|
-
Mark session as verified
|
|
147
|
-
↓
|
|
148
|
-
Allow scoped, time-bound sensitive actions
|
|
149
|
-
(2FA setup, email change, account deletion, etc.)
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
The verified state must:
|
|
153
|
-
- Have explicit scope
|
|
154
|
-
- Have explicit expiration
|
|
155
|
-
- Never be implicitly reused
|
|
156
|
-
- Never be shared across sessions or contexts
|
|
157
|
-
|
|
158
85
|
---
|
|
159
86
|
|
|
160
87
|
Any ambiguity, inconsistency, incompleteness, or undefined behavior
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: continue2
|
|
3
|
+
description: Iterative guideline review - review each, delegate critique, repeat until perfect
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Continue2: Iterative Guideline Review
|
|
7
|
+
|
|
8
|
+
Review all skill guidelines until perfection.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
### Phase 1: Sequential Review
|
|
13
|
+
|
|
14
|
+
Review each skill guideline one by one:
|
|
15
|
+
|
|
16
|
+
1. Read the skill file
|
|
17
|
+
2. Evaluate against criteria (below)
|
|
18
|
+
3. Fix any issues found
|
|
19
|
+
4. Move to next skill
|
|
20
|
+
|
|
21
|
+
Skills to review (in order):
|
|
22
|
+
- auth, account-security
|
|
23
|
+
- billing, pricing, ledger
|
|
24
|
+
- admin, appsec
|
|
25
|
+
- database, data-modeling
|
|
26
|
+
- delivery, deployments
|
|
27
|
+
- observability, privacy
|
|
28
|
+
- seo, performance, pwa
|
|
29
|
+
- uiux, i18n, growth
|
|
30
|
+
- storage, support, referral
|
|
31
|
+
- abuse-prevention, competitive-analysis, code-quality
|
|
32
|
+
|
|
33
|
+
### Phase 2: Delegate to Reviewer
|
|
34
|
+
|
|
35
|
+
After completing Phase 1, delegate a full review to a worker agent:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Task: Review all 25 skill guidelines for issues.
|
|
39
|
+
|
|
40
|
+
Check for:
|
|
41
|
+
- Overlapping responsibilities between skills
|
|
42
|
+
- Missing cross-references where skills relate
|
|
43
|
+
- Inconsistent formatting or structure
|
|
44
|
+
- Missing SSOT designations where needed
|
|
45
|
+
- Tutorial-style content (HOW) instead of requirements (WHAT)
|
|
46
|
+
- Vague or unverifiable non-negotiables
|
|
47
|
+
|
|
48
|
+
Return: List of specific issues found, or "No issues found."
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Phase 3: Fix and Repeat
|
|
52
|
+
|
|
53
|
+
If reviewer found issues:
|
|
54
|
+
1. Fix all reported issues
|
|
55
|
+
2. Return to Phase 2
|
|
56
|
+
|
|
57
|
+
If reviewer found no issues:
|
|
58
|
+
- Done. Commit and release.
|
|
59
|
+
|
|
60
|
+
## Evaluation Criteria
|
|
61
|
+
|
|
62
|
+
Each skill must have:
|
|
63
|
+
|
|
64
|
+
**Structure**:
|
|
65
|
+
- YAML frontmatter (name, description)
|
|
66
|
+
- Tech Stack section (if applicable)
|
|
67
|
+
- Non-Negotiables section
|
|
68
|
+
- Context section (with cross-references to related skills)
|
|
69
|
+
- Driving Questions section
|
|
70
|
+
|
|
71
|
+
**Content Quality**:
|
|
72
|
+
- Requirements state WHAT, not HOW
|
|
73
|
+
- Non-negotiables are verifiable (can be checked)
|
|
74
|
+
- Context clarifies boundaries with related skills
|
|
75
|
+
- No code examples or templates
|
|
76
|
+
- No tutorial-style explanations
|
|
77
|
+
|
|
78
|
+
**Consistency**:
|
|
79
|
+
- Tech stack entries follow pattern: `* **Component**: Technology`
|
|
80
|
+
- Next.js always includes `(with Turbopack)`
|
|
81
|
+
- Cross-references use backtick format: `lives in \`skill-name\``
|
|
82
|
+
- SSOT is designated where concepts overlap
|
|
83
|
+
|
|
84
|
+
## Exit Condition
|
|
85
|
+
|
|
86
|
+
The loop terminates when:
|
|
87
|
+
- A reviewer agent returns "No issues found"
|
|
88
|
+
- Or explicitly: no overlaps, no missing cross-refs, no formatting issues, no HOW content
|
package/package.json
CHANGED