odd-studio 3.5.0 → 3.6.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.
@@ -24,6 +24,8 @@ Before starting any build session, read:
24
24
  ### Build Sequence
25
25
  - NEVER build an outcome whose dependencies are not yet verified
26
26
  - ALWAYS build shared infrastructure before individual outcomes
27
+ - ALWAYS run `npm test` after building and before verification — failing tests block verification
28
+ - ALWAYS write tests for pure-logic modules (business rules, calculations, parsing, safety-critical logic)
27
29
  - ALWAYS run the full verification walkthrough before marking an outcome complete
28
30
  - ALWAYS commit after each verified outcome with message: "Outcome [N] [name] — verified"
29
31
 
@@ -110,6 +112,21 @@ export function canAccess(user: User): boolean {
110
112
  ### Security Baseline
111
113
  - No hardcoded secrets, API keys, or credentials — use environment variables
112
114
  - Validate user input at system boundaries
115
+ - Authenticate and authorise every protected route, action, webhook, and admin surface
116
+ - Verify webhooks, uploads, and third-party callbacks before trusting payloads
117
+ - Use secure session defaults — no localStorage auth/session tokens, no JWT-by-default shortcuts
118
+ - Rate-limit auth, admin, upload, payment, and public write surfaces
119
+ - Record audit trails for admin and security-sensitive actions
120
+ - Never disable TLS, CSRF, origin, or certificate verification in production code
121
+ - Treat any security scan finding as release-blocking until fixed
122
+
123
+ ## Debugging Inside ODD
124
+ - Use `*debug` when verification fails or a build breaks
125
+ - Debugging stays inside the current outcome — it is not a free-form detour
126
+ - Choose an explicit debug strategy before touching code: `ui-behaviour`, `full-stack`, `auth-security`, `integration-contract`, `background-process`, or `performance-state`
127
+ - Reproduce first, identify the failing boundary second, fix third
128
+ - Never apply a “quick fix” without naming the failing boundary
129
+ - After a fix, return to the verification walkthrough from step one
113
130
 
114
131
  ## UI Standards (Every UI Outcome)
115
132
  - Use shadcn/ui components as the default component library
@@ -127,9 +144,19 @@ _Until then, the ODD defaults apply:_
127
144
  - Styling: Tailwind CSS v4 + shadcn/ui
128
145
  - Database: PostgreSQL via Drizzle ORM
129
146
  - Auth: NextAuth.js
147
+ - Testing: Vitest (default — chosen during Step 9)
130
148
  - Email: Resend
131
149
  - Deployment: Vercel
132
150
 
151
+ ## Build & Test
152
+ ```bash
153
+ npm run dev # Development server
154
+ npm run build # Production build
155
+ npm test # Run test suite (must pass before verification)
156
+ npm run test:watch # Watch mode during development
157
+ npm run lint # Lint
158
+ ```
159
+
133
160
  ## Design Approach (see docs/ui/design-system.md for full detail)
134
161
  _This section is populated by Rachel during Step 9b of the planning phase._
135
162