@sylphx/flow 2.9.0 → 2.10.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/assets/slash-commands/review-account-security.md +51 -0
  3. package/assets/slash-commands/review-admin.md +54 -0
  4. package/assets/slash-commands/review-auth.md +47 -0
  5. package/assets/slash-commands/review-billing.md +47 -0
  6. package/assets/slash-commands/review-code-quality.md +63 -0
  7. package/assets/slash-commands/review-data-architecture.md +36 -0
  8. package/assets/slash-commands/review-database.md +40 -0
  9. package/assets/slash-commands/review-delivery.md +71 -0
  10. package/assets/slash-commands/review-discovery.md +49 -0
  11. package/assets/slash-commands/review-growth.md +62 -0
  12. package/assets/slash-commands/review-i18n.md +50 -0
  13. package/assets/slash-commands/review-ledger.md +40 -0
  14. package/assets/slash-commands/review-observability.md +55 -0
  15. package/assets/slash-commands/review-operability.md +54 -0
  16. package/assets/slash-commands/review-performance.md +56 -0
  17. package/assets/slash-commands/review-pricing.md +48 -0
  18. package/assets/slash-commands/review-privacy.md +50 -0
  19. package/assets/slash-commands/review-pwa.md +51 -0
  20. package/assets/slash-commands/review-referral.md +54 -0
  21. package/assets/slash-commands/review-security.md +53 -0
  22. package/assets/slash-commands/review-seo.md +60 -0
  23. package/assets/slash-commands/review-storage.md +41 -0
  24. package/assets/slash-commands/review-support.md +55 -0
  25. package/assets/slash-commands/review-uiux.md +56 -0
  26. package/package.json +1 -1
  27. package/assets/slash-commands/saas-admin.md +0 -123
  28. package/assets/slash-commands/saas-auth.md +0 -78
  29. package/assets/slash-commands/saas-billing.md +0 -68
  30. package/assets/slash-commands/saas-discovery.md +0 -135
  31. package/assets/slash-commands/saas-growth.md +0 -94
  32. package/assets/slash-commands/saas-i18n.md +0 -66
  33. package/assets/slash-commands/saas-platform.md +0 -87
  34. package/assets/slash-commands/saas-review.md +0 -178
  35. package/assets/slash-commands/saas-security.md +0 -108
@@ -1,178 +0,0 @@
1
- ---
2
- name: saas-review
3
- description: Full-stack SaaS product review - master orchestrator
4
- agent: coder
5
- ---
6
-
7
- # SaaS Product Review — Master Orchestration
8
-
9
- ## Mandate
10
-
11
- * Perform a **complete end-to-end review** across product, engineering, security, compliance, growth, operations, and UX.
12
- * **Delegate work to multiple workers; you act as the final gate to improve quality.**
13
- * Deliverables must be stated as **standards, constraints, and acceptance criteria**.
14
- * **Single-pass delivery**: no roadmap, no phasing, no deferrals; deliver an integrated outcome.
15
-
16
- ## Non-Negotiable Engineering Principles
17
-
18
- * No workarounds, hacks, or TODOs.
19
- * Feature-first with clean architecture; designed for easy extension; no "god files".
20
- * Type-first, strict end-to-end correctness (**DB → API → UI**).
21
- * Serverless-first; edge-compatible where feasible without sacrificing correctness, security, or observability.
22
- * Mobile-first responsive design; desktop-second.
23
- * Precise naming; remove dead/unused code.
24
- * Upgrade all packages to latest stable; avoid deprecated patterns.
25
-
26
- ## Fixed Platform & Stack (Locked)
27
-
28
- | Layer | Technology |
29
- |-------|------------|
30
- | Platform | Vercel |
31
- | Framework | Next.js (SSR-first) |
32
- | API | tRPC |
33
- | i18n | next-intl |
34
- | Database | Neon (Postgres) |
35
- | ORM | Drizzle |
36
- | Auth | better-auth |
37
- | Payments | Stripe |
38
- | Email | Resend |
39
- | Observability | Sentry |
40
- | Analytics | PostHog |
41
- | Cache/Workflows | Upstash Redis + Workflows + QStash |
42
- | Storage | Vercel Blob |
43
- | Tooling | Bun, Biome, Bun test |
44
- | Tag Management | GTM (marketing only) |
45
-
46
- ## Review Execution
47
-
48
- ### Phase 1: All Reviews (Parallel)
49
-
50
- Spawn **all workers in parallel** using the Task tool. Each worker runs its slash command and returns findings.
51
-
52
- **Delegation pattern:**
53
- ```
54
- Use Task tool with subagent_type: "Coder" for each worker.
55
- Spawn ALL 8 workers in a single message (parallel execution).
56
- Each worker prompt: "Run /{command} and return findings."
57
- ```
58
-
59
- | Worker | Command | Focus |
60
- |--------|---------|-------|
61
- | Billing | `/saas-billing` | Stripe, webhooks, pricing governance, ledger |
62
- | Auth | `/saas-auth` | SSO, passkeys, verification, sessions, account security |
63
- | i18n | `/saas-i18n` | Locales, routing, canonicalization, hreflang |
64
- | Platform | `/saas-platform` | Design system, SEO, PWA, performance, a11y |
65
- | Security | `/saas-security` | OWASP, privacy, consent, observability, operability |
66
- | Growth | `/saas-growth` | Onboarding, referral, retention, guidance |
67
- | Admin | `/saas-admin` | RBAC, bootstrap, config, feature flags, ops tooling |
68
- | Discovery | `/saas-discovery` | Feature opportunities, pricing optimization, competitive research |
69
-
70
- ### Phase 2: Final Gate (You)
71
-
72
- Synthesize all domain findings and discovery insights:
73
-
74
- 1. **Aggregate findings** from all workers
75
- 2. **Resolve conflicts** between domains
76
- 3. **Verify delivery gates** (below)
77
- 4. **Produce integrated report** with prioritized actions
78
-
79
- ## Architecture Foundations (All Domains)
80
-
81
- These principles apply across all domain reviews:
82
-
83
- ### Server Enforcement
84
-
85
- * All authorization/entitlements are **server-enforced**; no client-trust.
86
- * **Server-truth is authoritative**: UI state must never contradict server-truth.
87
-
88
- ### Consistency Model
89
-
90
- * For billing, entitlements, ledger, admin privileges, and security posture: define explicit consistency model (source-of-truth, delay windows, retry handling).
91
-
92
- ### Drizzle Migrations
93
-
94
- * Migration files must exist, be complete, and be committed.
95
- * Deterministic, reproducible, environment-safe; linear/auditable history; no drift.
96
- * CI must fail if schema changes are not represented by migrations.
97
-
98
- ### Vercel Blob Upload Governance
99
-
100
- * All uploads must be **intent-based and server-verified**.
101
- * Client uploads via short-lived, server-issued authorization, then calls server finalize endpoint.
102
- * Server validates Blob URL/key ownership and matches against originating intent before attaching to any resource.
103
- * Support safe retries and idempotent finalize; expired/abandoned intents must be cleanable and auditable.
104
-
105
- ### Auditability
106
-
107
- * For any high-value mutation: who/when/why, before/after state, and correlation to triggering request/job/webhook must be recorded and queryable.
108
-
109
- ## Delivery Gates (Release-Blocking)
110
-
111
- CI must block merges/deploys when failing:
112
-
113
- ### Code Quality
114
- - [ ] Biome lint/format passes
115
- - [ ] Strict TypeScript typecheck passes
116
- - [ ] Unit + E2E tests pass (Bun test)
117
- - [ ] Build succeeds
118
-
119
- ### Data Integrity
120
- - [ ] Migration integrity checks pass
121
- - [ ] No schema drift
122
-
123
- ### Internationalization
124
- - [ ] Missing translation keys fail build
125
- - [ ] `/en/*` returns 301 redirect
126
- - [ ] hreflang/x-default correct
127
- - [ ] Sitemap contains only true localized pages
128
-
129
- ### Performance
130
- - [ ] Performance budgets enforced
131
- - [ ] Core Web Vitals within targets
132
- - [ ] Regression detection active
133
-
134
- ### Security
135
- - [ ] CSP/HSTS/security headers verified
136
- - [ ] CSRF protection tested
137
- - [ ] Consent gates analytics/marketing
138
-
139
- ### Operability
140
- - [ ] Observability configured for critical paths
141
- - [ ] Alerting defined for anomalies
142
- - [ ] DLQ is operable with safe replay
143
-
144
- ### Release Criteria
145
- - [ ] Required configuration fails fast if missing
146
- - [ ] All domain gates pass
147
- - [ ] No TODOs/hacks/workarounds/dead code
148
-
149
- ## Output Format
150
-
151
- ### Executive Summary
152
- - Overall health assessment
153
- - Critical blockers (must fix before release)
154
- - High-priority improvements
155
-
156
- ### Domain Reports
157
- For each domain, summarize:
158
- - Compliance status (pass/fail with details)
159
- - Improvement opportunities discovered
160
- - Recommended actions with priority
161
-
162
- ### Strategic Opportunities
163
- From discovery phase:
164
- - Feature roadmap (prioritized)
165
- - Pricing optimizations
166
- - Competitive positioning
167
-
168
- ### Delivery Gate Status
169
- Checklist with pass/fail for each gate
170
-
171
- ## Completion Criteria
172
-
173
- Complete only when:
174
- - [ ] All 8 workers finished (domains + discovery)
175
- - [ ] All findings synthesized
176
- - [ ] Delivery gates verified
177
- - [ ] Integrated report produced
178
- - [ ] No deferrals — everything addressed in single pass
@@ -1,108 +0,0 @@
1
- ---
2
- name: saas-security
3
- description: SaaS security review - OWASP, privacy, consent, observability, operability
4
- agent: coder
5
- ---
6
-
7
- # Security, Privacy & Compliance Review
8
-
9
- ## Scope
10
-
11
- Review security posture, privacy compliance, consent governance, observability systems, and operational readiness.
12
-
13
- ## Specification
14
-
15
- ### Security Baseline
16
-
17
- * **OWASP Top 10:2025** taxonomy awareness and mitigation.
18
- * **OWASP ASVS** (L2/L3) verification baseline.
19
- * Baseline controls:
20
- * CSP (Content Security Policy) properly configured
21
- * HSTS with appropriate max-age
22
- * Security headers (X-Frame-Options, X-Content-Type-Options, etc.)
23
- * CSRF protection where applicable
24
- * Upstash-backed rate limiting
25
- * Supply-chain hygiene (dependency audits)
26
- * **Security controls must be verifiable**: CSP/HSTS/security headers and CSRF must be covered by automated checks or security tests and included in release gates.
27
- * Risk-based anti-bot for auth and high-cost endpoints; integrate rate limits + consent gating.
28
-
29
- ### Consent Governance (Release-Blocking)
30
-
31
- * **Behavioral consistency is required**: policy and disclosures must match actual behavior across UI, data handling, logging/observability, analytics, support operations, and marketing tags; mismatches are release-blocking.
32
- * Analytics (PostHog) and marketing/newsletter communications (Resend) must be governed by consent and user preferences.
33
- * Marketing tags (including GTM and Google Ads) must not load or fire without appropriate consent.
34
- * Without consent, tracking and marketing sends must not occur, except for strictly necessary service communications.
35
- * Event schemas and attributes must follow data minimization, with explicit PII classification and handling rules.
36
-
37
- ### Marketing Attribution (Hard Requirement)
38
-
39
- * GTM may be used **only** for marketing tags and attribution; it must not become the primary product analytics system (PostHog remains the product analytics source).
40
- * Conversions representing monetary value or entitlement changes must be **server-truth aligned**, **idempotent**, and **deduplicated**; client-side tags may exist for attribution but must not become the authoritative source of billing/entitlement truth.
41
-
42
- ### PII and Sensitive Data (Hard Requirement)
43
-
44
- * PII rules apply to logs, Sentry, PostHog, support tooling, email systems, and marketing tags/conversion payloads.
45
- * A consistent scrubbing/redaction standard must exist, and must be covered by automated tests to prevent leakage to third parties.
46
-
47
- ### Data Lifecycle
48
-
49
- * Define deletion/deactivation semantics and deletion propagation.
50
- * Export capability where applicable.
51
- * DR/backup posture aligned with retention.
52
- * **Define data classification, retention periods, deletion propagation to third-party processors, and explicit exceptions** (legal/tax/anti-fraud).
53
- * External disclosures must match actual behavior.
54
-
55
- ### Async/Workflows Governance (Hard Requirement)
56
-
57
- * Define idempotency and deduplication posture.
58
- * Define controlled retries/backoff.
59
- * **Dead-letter handling must exist and be observable and operable**.
60
- * **Safe replay must be supported**.
61
- * Side-effects (email/billing/ledger/entitlements) must be governed such that they are either proven effectively-once or safely re-entrant without duplicated economic/security consequences.
62
-
63
- ### Observability and Alerting (Hard Requirement)
64
-
65
- * Structured logs and correlation IDs must exist end-to-end (request/job/webhook) with consistent traceability.
66
- * Define critical-path SLO/SLI posture.
67
- * Define actionable alerts for: webhook failures, ledger/entitlement drift, authentication attacks, abuse spikes, and drift detection.
68
-
69
- ### Configuration and Secrets
70
-
71
- * Required configuration must fail-fast at build/startup.
72
- * Strict environment isolation (dev/stage/prod).
73
- * Rotation and incident remediation posture must be auditable and exercisable.
74
-
75
- ### Drift Detection (Hard Requirement)
76
-
77
- * Drift alerts must have a defined remediation playbook (automated fix or operator workflow).
78
- * Each remediation must be auditable and support post-incident traceability.
79
-
80
- ### Abuse/Fraud Posture
81
-
82
- * Define prevention and enforcement measures for referral/UGC/support abuse.
83
- * Risk signals trigger protective actions and step-up verification where appropriate.
84
-
85
- ## Domain Discovery
86
-
87
- After reviewing compliance with spec, explore improvements:
88
-
89
- * **Attack surface reduction**: Are there unused endpoints? Overly permissive APIs?
90
- * **Monitoring gaps**: What security events aren't being tracked? Alert fatigue issues?
91
- * **Compliance readiness**: Is SOC2/GDPR/CCPA posture documented? Audit-ready?
92
- * **Incident response**: Is there a playbook? Has it been tested?
93
- * **Third-party risk**: Are vendor dependencies assessed? Data processing agreements in place?
94
- * **Security UX**: Are security features discoverable? Do they create unnecessary friction?
95
-
96
- ## Domain Gates
97
-
98
- * [ ] CSP/HSTS/security headers configured and tested
99
- * [ ] CSRF protection implemented where needed
100
- * [ ] Rate limiting active on sensitive endpoints
101
- * [ ] Consent governs all analytics/marketing
102
- * [ ] PII scrubbing verified (logs, Sentry, PostHog)
103
- * [ ] Data deletion propagates to third parties
104
- * [ ] DLQ exists and is operable
105
- * [ ] Correlation IDs present end-to-end
106
- * [ ] Critical alerts defined and tested
107
- * [ ] Config fails fast on missing required values
108
- * [ ] Drift detection has remediation playbook