@sylphx/flow 2.10.0 → 2.12.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 (27) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/assets/slash-commands/review-account-security.md +19 -29
  3. package/assets/slash-commands/review-admin.md +21 -32
  4. package/assets/slash-commands/review-auth.md +19 -25
  5. package/assets/slash-commands/review-billing.md +21 -25
  6. package/assets/slash-commands/review-code-quality.md +29 -49
  7. package/assets/slash-commands/review-data-architecture.md +26 -18
  8. package/assets/slash-commands/review-database.md +22 -21
  9. package/assets/slash-commands/review-delivery.md +25 -50
  10. package/assets/slash-commands/review-discovery.md +17 -28
  11. package/assets/slash-commands/review-growth.md +18 -40
  12. package/assets/slash-commands/review-i18n.md +18 -27
  13. package/assets/slash-commands/review-ledger.md +23 -20
  14. package/assets/slash-commands/review-observability.md +27 -41
  15. package/assets/slash-commands/review-operability.md +20 -32
  16. package/assets/slash-commands/review-performance.md +19 -34
  17. package/assets/slash-commands/review-pricing.md +19 -27
  18. package/assets/slash-commands/review-privacy.md +23 -28
  19. package/assets/slash-commands/review-pwa.md +22 -33
  20. package/assets/slash-commands/review-referral.md +27 -40
  21. package/assets/slash-commands/review-security.md +25 -32
  22. package/assets/slash-commands/review-seo.md +26 -46
  23. package/assets/slash-commands/review-storage.md +21 -21
  24. package/assets/slash-commands/review-support.md +27 -41
  25. package/assets/slash-commands/review-trust-safety.md +42 -0
  26. package/assets/slash-commands/review-uiux.md +25 -42
  27. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 2.12.0 (2025-12-17)
4
+
5
+ ### ✨ Features
6
+
7
+ - **commands:** add trust-safety and fill SSOT gaps ([fe67913](https://github.com/SylphxAI/flow/commit/fe67913db8183ae6c16070825f61744cf44acafa))
8
+
9
+ ## 2.11.0 (2025-12-17)
10
+
11
+ ### ✨ Features
12
+
13
+ - **commands:** add tech stack and replace checklists with exploration questions ([0772b1d](https://github.com/SylphxAI/flow/commit/0772b1d788ddf2074729d04e67ef3d94b138de10))
14
+
3
15
  ## 2.10.0 (2025-12-17)
4
16
 
5
17
  Replace saas-* commands with 24 focused /review-* commands.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-account-security
3
- description: Review account security - sessions, devices, MFA, security events
3
+ description: Review account security - sessions, MFA, devices, security events
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,40 +12,30 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify threats users can't protect themselves from.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Membership and Account Security
19
+ * **Auth**: better-auth
20
+ * **Framework**: Next.js
19
21
 
20
- * Membership is entitlement-driven and server-enforced.
21
- * Provide a dedicated **Account Security** surface.
22
- * **Account Security minimum acceptance**:
23
- * Session/device visibility and revocation
24
- * MFA/passkey management
25
- * Linked identity provider management
26
- * Key security event visibility (and export where applicable)
27
- * All server-enforced and auditable
22
+ ## Non-Negotiables
28
23
 
29
- ### Security Event Management
24
+ * Session/device visibility and revocation must exist
25
+ * All security-sensitive actions must be server-enforced and auditable
26
+ * Account recovery must require step-up verification
30
27
 
31
- * Login attempts (success/failure) logged
32
- * Password changes logged
33
- * MFA enrollment/removal logged
34
- * Session creation/revocation logged
35
- * Suspicious activity detection
36
- * Security event notifications
28
+ ## Context
37
29
 
38
- ### Recovery Governance
30
+ Account security is about giving users control over their own safety. Users should be able to see what's accessing their account, remove suspicious sessions, and understand when something unusual happens.
39
31
 
40
- * Account recovery flow secure
41
- * Support-assisted recovery with strict audit logging
42
- * Step-up verification for sensitive actions
32
+ But it's also about protecting users from threats they don't know about. Compromised credentials, session hijacking, social engineering attacks on support — these require proactive detection, not just user vigilance.
43
33
 
44
- ## Verification Checklist
34
+ ## Driving Questions
45
35
 
46
- - [ ] Session/device visibility exists
47
- - [ ] Session revocation works
48
- - [ ] MFA management available
49
- - [ ] Identity provider linking visible
50
- - [ ] Security events logged and visible
51
- - [ ] Recovery flow is secure and audited
36
+ * Can a user tell if someone else has access to their account?
37
+ * What happens when an account is compromised — how fast can we detect and respond?
38
+ * How does the recovery flow prevent social engineering attacks?
39
+ * What security events should trigger user notification?
40
+ * Where are we relying on user vigilance when we should be detecting threats?
41
+ * What would a truly paranoid user want that we don't offer?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-admin
3
- description: Review admin - RBAC, bootstrap, config management, feature flags
3
+ description: Review admin - RBAC, bootstrap, audit, operational tools
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,43 +12,32 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify operational gaps and safety improvements.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Admin Platform (Operational-Grade)
19
+ * **Framework**: Next.js
20
+ * **API**: tRPC
21
+ * **Database**: Neon (Postgres)
19
22
 
20
- * Baseline: RBAC (least privilege), audit logs, feature flags governance, optional impersonation with safeguards and auditing.
23
+ ## Non-Negotiables
21
24
 
22
- ### Admin Bootstrap (Critical)
25
+ * Admin bootstrap must use secure allowlist, not file seeding; must be permanently disabled after first admin
26
+ * All privilege grants must be audited (who/when/why)
27
+ * Actions affecting money/access/security require step-up controls
28
+ * Secrets must never be exposed through admin UI
23
29
 
24
- * Admin bootstrap must not rely on file seeding:
25
- * Use a secure, auditable **first-login allowlist** for the initial SUPER_ADMIN.
26
- * Permanently disable bootstrap after completion.
27
- * All privilege grants must be server-enforced and recorded in the audit log.
28
- * The allowlist must be managed via secure configuration (environment/secret store), not code or DB seeding.
30
+ ## Context
29
31
 
30
- ### Configuration Management (Mandatory)
32
+ The admin platform is where operational power lives — and where operational mistakes happen. A well-designed admin reduces the chance of human error while giving operators the tools they need to resolve issues quickly.
31
33
 
32
- * All **non-secret** product-level configuration must be manageable via admin (server-enforced), with validation and change history.
33
- * Secrets/credentials are environment-managed only; admin may expose safe readiness/health visibility, not raw secrets.
34
+ Consider: what does an operator need at 3am when something is broken? What would prevent an admin from accidentally destroying data? How do we know if someone is misusing admin access?
34
35
 
35
- ### Admin Analytics and Reporting (Mandatory)
36
+ ## Driving Questions
36
37
 
37
- * Provide comprehensive dashboards/reports for business, growth, billing, referral, support, and security/abuse signals, governed by RBAC.
38
- * Reporting must be consistent with system-of-record truth and auditable when derived from privileged actions.
39
-
40
- ### Admin Operational Management (Mandatory)
41
-
42
- * Tools for user/account management, entitlements/access management, lifecycle actions, and issue resolution workflows.
43
- * Actions affecting access, money/credits, or security posture require appropriate step-up controls and must be fully auditable; reversibility must follow domain rules.
44
-
45
- ## Verification Checklist
46
-
47
- - [ ] RBAC implemented (least privilege)
48
- - [ ] Admin bootstrap secure (not file seeding)
49
- - [ ] Bootstrap disables after completion
50
- - [ ] Config management with history
51
- - [ ] Feature flags governed
52
- - [ ] Admin dashboards exist
53
- - [ ] Impersonation has safeguards
54
- - [ ] All admin actions audited
38
+ * What would an operator need during an incident that doesn't exist today?
39
+ * Where could an admin accidentally cause serious damage?
40
+ * How would we detect if admin access was compromised or misused?
41
+ * What repetitive admin tasks should be automated?
42
+ * Where is audit logging missing or insufficient?
43
+ * What would make the admin experience both safer and faster?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-auth
3
- description: Review authentication - SSO providers, passkeys, verification, sign-in
3
+ description: Review authentication - sign-in, SSO, passkeys, verification
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,36 +12,30 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify security gaps and UX friction in auth flows.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Identity, Verification, and Sign-in
19
+ * **Auth**: better-auth
20
+ * **Framework**: Next.js
19
21
 
20
- * SSO providers (minimum): **Google, Apple, Facebook, Microsoft, GitHub** (prioritize by audience).
21
- * If provider env/secrets are missing, **hide** the login option (no broken/disabled UI).
22
- * Allow linking multiple providers and safe unlinking; server-enforced and abuse-protected.
23
- * Passkeys (WebAuthn) are first-class with secure enrollment/usage/recovery.
22
+ ## Non-Negotiables
24
23
 
25
- ### Verification Requirements
24
+ * All authorization decisions must be server-enforced (no client-trust)
25
+ * Email verification required for high-impact capabilities
26
+ * If SSO provider secrets are missing, hide the option (no broken UI)
26
27
 
27
- * **Email verification is mandatory** baseline for high-impact capabilities.
28
- * **Phone verification is optional** and used as risk-based step-up (anti-abuse, higher-trust flows, recovery); consent-aware and data-minimizing.
28
+ ## Context
29
29
 
30
- ### Authentication Best Practices
30
+ Authentication is the front door to every user's data. It needs to be both secure and frictionless — a difficult balance. Users abandon products with painful sign-in flows, but weak auth leads to compromised accounts.
31
31
 
32
- * Secure session management
33
- * Token rotation and expiry
34
- * Brute force protection
35
- * Account enumeration prevention
36
- * Secure password reset flow
37
- * Remember me functionality (secure)
32
+ Consider the entire auth journey: first sign-up, return visits, account linking, recovery flows. Where is there unnecessary friction? Where are there security gaps? What would make auth both more secure AND easier?
38
33
 
39
- ## Verification Checklist
34
+ ## Driving Questions
40
35
 
41
- - [ ] All SSO providers implemented
42
- - [ ] Missing provider secrets hide UI option
43
- - [ ] Multi-provider linking works safely
44
- - [ ] Passkeys (WebAuthn) supported
45
- - [ ] Email verification enforced
46
- - [ ] Phone verification optional/step-up
47
- - [ ] Session management secure
36
+ * What's the sign-in experience for a first-time user vs. returning user?
37
+ * Where do users get stuck or abandon the auth flow?
38
+ * What happens when a user loses access to their primary auth method?
39
+ * How does the system handle auth provider outages gracefully?
40
+ * What would passwordless-first auth look like here?
41
+ * Where is auth complexity hiding bugs or security issues?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-billing
3
- description: Review billing - Stripe integration, webhooks, state machine
3
+ description: Review billing - Stripe integration, webhooks, subscription state
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,36 +12,32 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify revenue leakage and reliability improvements.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Billing and Payments (Stripe)
19
+ * **Payments**: Stripe
20
+ * **Workflows**: Upstash Workflows + QStash
19
21
 
20
- * Support subscriptions and one-time payments as product needs require.
21
- * **Billing state machine follows mapping requirements**; UI must only surface explainable, non-ambiguous states aligned to server-truth.
22
- * Tax/invoicing and refund/dispute handling must be behaviorally consistent with product UX and entitlement state.
22
+ ## Non-Negotiables
23
23
 
24
- ### Webhook Requirements (High-Risk)
24
+ * Webhook signature must be verified (reject unverifiable events)
25
+ * Stripe event ID must be used for idempotency
26
+ * Webhooks must handle out-of-order delivery
27
+ * No dual-write: billing truth comes from Stripe events only
28
+ * UI must only display states derivable from server-truth
25
29
 
26
- * Webhooks must be idempotent, retry-safe, out-of-order safe, auditable
27
- * Billing UI reflects server-truth state without ambiguity
28
- * **Webhook trust is mandatory**: webhook origin must be verified (signature verification and replay resistance)
29
- * The Stripe **event id** must be used as the idempotency and audit correlation key
30
- * Unverifiable events must be rejected and must trigger alerting
31
- * **Out-of-order behavior must be explicit**: all webhook handlers must define and enforce a clear out-of-order strategy (event ordering is not guaranteed even for the same subscription)
30
+ ## Context
32
31
 
33
- ### State Machine
32
+ Billing is where trust meets money. A bug here isn't just annoying — it's a financial and legal issue. Users must always see accurate state, and the system must never lose or duplicate charges.
34
33
 
35
- * Define mapping: **Stripe state internal subscription state entitlements**
36
- * Handle: trial, past_due, unpaid, canceled, refund, dispute
37
- * UI only shows interpretable, non-ambiguous states
34
+ Beyond correctness, consider the user experience of billing. Is the upgrade path frictionless? Are failed payments handled gracefully? Does the dunning process recover revenue or just annoy users?
38
35
 
39
- ## Verification Checklist
36
+ ## Driving Questions
40
37
 
41
- - [ ] Billing state machine defined
42
- - [ ] Webhook signature verification
43
- - [ ] Idempotent webhook handling (event id)
44
- - [ ] Out-of-order handling defined
45
- - [ ] All Stripe states mapped
46
- - [ ] UI reflects server-truth only
47
- - [ ] Refund/dispute handling works
38
+ * What happens when webhooks arrive out of order?
39
+ * Where could revenue leak (failed renewals, unhandled states)?
40
+ * What billing states are confusing to users?
41
+ * How are disputes and chargebacks handled end-to-end?
42
+ * If Stripe is temporarily unavailable, what breaks?
43
+ * What would make the billing experience genuinely excellent?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-code-quality
3
- description: Review code quality - linting, TypeScript, testing, CI
3
+ description: Review code quality - architecture, types, testing, maintainability
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,52 +12,32 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify code that works but shouldn't exist in its current form.
15
16
 
16
- ## Review Scope
17
-
18
- ### Non-Negotiable Engineering Principles
19
-
20
- * No workarounds, hacks, or TODOs.
21
- * Feature-first with clean architecture; designed for easy extension; no "god files".
22
- * Type-first, strict end-to-end correctness (**DB → API → UI**).
23
- * Serverless-first and server-first; edge-compatible where feasible without sacrificing correctness, security, or observability.
24
- * Mobile-first responsive design; desktop-second.
25
- * Precise naming; remove dead/unused code.
26
- * Upgrade all packages to latest stable; avoid deprecated patterns.
27
-
28
- ### Tooling Baseline
29
-
30
- * **Bun** for runtime
31
- * **Biome** for linting/formatting
32
- * **Bun test** for testing
33
- * Strict TypeScript
34
-
35
- ### CI Requirements
36
-
37
- * Biome lint/format passes
38
- * Strict TS typecheck passes
39
- * Unit + E2E tests pass
40
- * Build succeeds
41
-
42
- ### Code Quality Best Practices
43
-
44
- * Consistent code style
45
- * Meaningful variable/function names
46
- * Single responsibility principle
47
- * DRY (Don't Repeat Yourself)
48
- * SOLID principles
49
- * No circular dependencies
50
- * Reasonable file sizes
51
- * Clear module boundaries
52
-
53
- ## Verification Checklist
54
-
55
- - [ ] Biome lint passes
56
- - [ ] Biome format passes
57
- - [ ] TypeScript strict mode
58
- - [ ] No type errors
59
- - [ ] Tests exist and pass
60
- - [ ] Build succeeds
61
- - [ ] No TODOs/hacks
62
- - [ ] No dead code
63
- - [ ] Packages up to date
17
+ ## Tech Stack
18
+
19
+ * **Runtime**: Bun
20
+ * **Linting/Formatting**: Biome
21
+ * **Testing**: Bun test
22
+ * **Language**: TypeScript (strict)
23
+
24
+ ## Non-Negotiables
25
+
26
+ * No TODOs, hacks, or workarounds in production code
27
+ * Strict TypeScript with end-to-end type safety (DB API → UI)
28
+ * No dead or unused code
29
+
30
+ ## Context
31
+
32
+ Code quality isn't about following rules — it's about making the codebase a place where good work is easy and bad work is hard. High-quality code is readable, testable, and changeable. Low-quality code fights you on every change.
33
+
34
+ Don't just look for rule violations. Look for code that technically works but is confusing, fragile, or painful to modify. Look for patterns that will cause bugs. Look for complexity that doesn't need to exist.
35
+
36
+ ## Driving Questions
37
+
38
+ * What code would you be embarrassed to show a senior engineer?
39
+ * Where is complexity hiding that makes the codebase hard to understand?
40
+ * What would break if someone new tried to make changes here?
41
+ * Where are types lying (as any, incorrect generics, missing null checks)?
42
+ * What test coverage gaps exist for code that really matters?
43
+ * If we could rewrite one part of this codebase, what would have the highest impact?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-data-architecture
3
- description: Review data architecture - boundaries, consistency model, server enforcement
3
+ description: Review data architecture - boundaries, consistency, state machines
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -12,25 +12,33 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify architectural weaknesses that will cause problems at scale.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Boundaries, Server Enforcement, and Consistency Model (Hard Requirement)
19
+ * **API**: tRPC
20
+ * **Framework**: Next.js
21
+ * **Database**: Neon (Postgres)
22
+ * **ORM**: Drizzle
19
23
 
20
- * Define clear boundaries: domain rules, use-cases, integrations, UI.
21
- * All authorization/entitlements are **server-enforced**; no client-trust.
22
- * Runtime constraints (serverless/edge) must be explicit and validated.
23
- * **Consistency model is mandatory for high-value state**: for billing, entitlements, ledger, admin privilege grants, and security posture, the system must define and enforce an explicit consistency model (source-of-truth, allowed delay windows, retry/out-of-order handling, and acceptable eventual consistency bounds).
24
- * **Billing and access state machine is mandatory**: define and validate the mapping **Stripe state → internal subscription state → entitlements**, including trial, past_due, unpaid, canceled, refund, and dispute outcomes. UI must only present interpretable, non-ambiguous states derived from server-truth.
25
- * **No dual-write (hard requirement)**: subscription/payment truth must be derived from Stripe-driven events; internal systems must not directly rewrite billing truth or authorize entitlements based on non-Stripe truth, except for explicitly defined admin remediation flows that are fully server-enforced and fully audited.
26
- * **Server-truth is authoritative**: UI state must never contradict server-truth. Where asynchronous confirmation exists, UI must represent that state unambiguously and remain explainable.
27
- * **Auditability chain is mandatory** for any high-value mutation: who/when/why, before/after state, and correlation to the triggering request/job/webhook must be recorded and queryable.
24
+ ## Non-Negotiables
28
25
 
29
- ## Verification Checklist
26
+ * All authorization must be server-enforced (no client-trust)
27
+ * No dual-write: billing/entitlement truth comes from Stripe events only
28
+ * UI must never contradict server-truth
29
+ * High-value mutations must have audit trail (who/when/why/before/after)
30
30
 
31
- - [ ] Clear domain boundaries defined
32
- - [ ] Server enforcement for all authorization
33
- - [ ] Explicit consistency model documented
34
- - [ ] State machine for billing/entitlements exists
35
- - [ ] No dual-write violations
36
- - [ ] Auditability chain implemented
31
+ ## Context
32
+
33
+ Data architecture determines what's possible and what's painful. Good architecture makes new features easy; bad architecture makes everything hard. The question isn't "does it work today?" but "will it work when requirements change?"
34
+
35
+ Consider the boundaries between domains, the flow of data through the system, and the consistency guarantees at each step. Where are implicit assumptions that will break? Where is complexity hidden that will cause bugs?
36
+
37
+ ## Driving Questions
38
+
39
+ * If we were designing this from scratch, what would be different?
40
+ * Where will the current architecture break as the product scales?
41
+ * What implicit assumptions are waiting to cause bugs?
42
+ * How do we know when state is inconsistent, and how do we recover?
43
+ * Where is complexity hiding that makes the system hard to reason about?
44
+ * What architectural decisions are we avoiding that we shouldn't?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-database
3
- description: Review database - Drizzle migrations, schema drift, CI gates
3
+ description: Review database - schema, migrations, performance, reliability
4
4
  agent: coder
5
5
  ---
6
6
 
@@ -8,33 +8,34 @@ agent: coder
8
8
 
9
9
  ## Mandate
10
10
 
11
- * Perform a **deep, thorough review** of database architecture in this codebase.
11
+ * Perform a **deep, thorough review** of the database in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify schema problems that will hurt at scale.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Drizzle Migrations (Non-Negotiable)
19
+ * **Database**: Neon (Postgres)
20
+ * **ORM**: Drizzle
19
21
 
20
- * Migration files must exist, be complete, and be committed.
21
- * Deterministic, reproducible, environment-safe; linear/auditable history; no drift.
22
- * CI must fail if schema changes are not represented by migrations.
22
+ ## Non-Negotiables
23
23
 
24
- ### Database Best Practices
24
+ * Migration files must exist, be complete, and be committed
25
+ * CI must fail if schema changes aren't represented by migrations
26
+ * No schema drift between environments
25
27
 
26
- * Schema design follows normalization principles where appropriate
27
- * Indexes exist for commonly queried columns
28
- * Foreign key constraints are properly defined
29
- * No orphaned tables or columns
30
- * Proper use of data types (no stringly-typed data)
31
- * Timestamps use consistent timezone handling
28
+ ## Context
32
29
 
33
- ## Verification Checklist
30
+ The database schema is the foundation everything else is built on. A bad schema creates friction for every feature built on top of it. Schema changes are expensive and risky — it's worth getting the design right.
34
31
 
35
- - [ ] All migrations committed and complete
36
- - [ ] No schema drift detected
37
- - [ ] CI blocks on migration integrity
38
- - [ ] Indexes cover common queries
39
- - [ ] Foreign keys properly defined
40
- - [ ] Data types appropriate
32
+ Consider not just "does the schema work?" but "does this schema make the right things easy?" Are the relationships correct? Are we storing data in ways that will be painful to query? Are we missing constraints that would prevent bugs?
33
+
34
+ ## Driving Questions
35
+
36
+ * If we were designing the schema from scratch, what would be different?
37
+ * Where are missing indexes causing slow queries we haven't noticed yet?
38
+ * What data relationships are awkward or incorrectly modeled?
39
+ * How does the schema handle data lifecycle (soft deletes, archival, retention)?
40
+ * What constraints are missing that would prevent invalid state?
41
+ * Where will the current schema hurt at 10x or 100x scale?
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: review-delivery
3
- description: Review delivery gates - release blocking checks, verification
3
+ description: Review delivery - CI gates, automated verification, release safety
4
4
  agent: coder
5
5
  ---
6
6
 
7
- # Delivery Gates Review
7
+ # Delivery Review
8
8
 
9
9
  ## Mandate
10
10
 
@@ -12,60 +12,35 @@ agent: coder
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
13
  * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
14
  * **Single-pass delivery**: no deferrals; deliver a complete assessment.
15
+ * **Explore beyond the spec**: identify what could go wrong in production that we're not catching.
15
16
 
16
- ## Review Scope
17
+ ## Tech Stack
17
18
 
18
- ### Delivery Gates and Completion
19
+ * **CI**: GitHub Actions
20
+ * **Testing**: Bun test
21
+ * **Linting**: Biome
22
+ * **Platform**: Vercel
19
23
 
20
- CI must block merges/deploys when failing:
24
+ ## Non-Negotiables
21
25
 
22
- #### Code Quality Gates
23
- - [ ] Biome lint/format passes
24
- - [ ] Strict TS typecheck passes
25
- - [ ] Unit + E2E tests pass (Bun test)
26
- - [ ] Build succeeds
26
+ * All release gates must be automated (manual verification doesn't count)
27
+ * Build must fail-fast on missing required configuration
28
+ * CI must block on: lint, typecheck, tests, build
29
+ * `/en/*` must redirect (no duplicate content)
30
+ * Security headers (CSP, HSTS) must be verified by tests
31
+ * Consent gating must be verified by tests
27
32
 
28
- #### Data Integrity Gates
29
- - [ ] Migration integrity checks pass
30
- - [ ] No schema drift
33
+ ## Context
31
34
 
32
- #### i18n Gates
33
- - [ ] Missing translation keys fail build
34
- - [ ] `/en/*` returns 301 redirect
35
- - [ ] hreflang/x-default correct
36
- - [ ] Sitemap contains only true variants
35
+ Delivery gates are the last line of defense before code reaches users. Every manual verification step is a gate that will eventually fail. Every untested assumption is a bug waiting to ship.
37
36
 
38
- #### Performance Gates
39
- - [ ] Performance budget verification for key journeys
40
- - [ ] Core Web Vitals within thresholds
41
- - [ ] Release-blocking regression detection
37
+ The question isn't "what tests do we have?" but "what could go wrong that we wouldn't catch?" Think about the deploy that breaks production at 2am — what would have prevented it?
42
38
 
43
- #### Security Gates
44
- - [ ] CSP/HSTS/security headers verified
45
- - [ ] CSRF protection tested
39
+ ## Driving Questions
46
40
 
47
- #### Consent Gates
48
- - [ ] Analytics/marketing consent gating verified
49
- - [ ] Newsletter eligibility and firing rules tested
50
-
51
- ### Automation Requirement
52
-
53
- **All gates above must be enforced by automated tests or mechanized checks (non-manual); manual verification does not satisfy release gates.**
54
-
55
- ### Configuration Gates
56
-
57
- * Build/startup must fail-fast when required configuration/secrets are missing or invalid for the target environment.
58
-
59
- ### Operability Gates
60
-
61
- * Observability and alerting configured for critical anomalies
62
- * Workflow dead-letter handling is operable, visible, and supports controlled replay
63
-
64
- ## Verification Checklist
65
-
66
- - [ ] All gates automated (no manual)
67
- - [ ] CI blocks on failures
68
- - [ ] Config fail-fast works
69
- - [ ] Operability gates met
70
- - [ ] No TODOs/hacks/workarounds
71
- - [ ] No dead/unused code
41
+ * What could ship to production that shouldn't?
42
+ * Where does manual verification substitute for automation?
43
+ * What flaky tests are training people to ignore failures?
44
+ * How fast is the feedback loop, and what slows it down?
45
+ * If a deploy breaks production, how fast can we detect and rollback?
46
+ * What's the worst thing that shipped recently that tests should have caught?