@clipboard-health/ai-rules 2.14.16 → 2.14.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
- "version": "2.14.16",
3
+ "version": "2.14.18",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -96,7 +96,7 @@ GET /shifts?filter[verified]=true&sort=startDate,-urgency&page[cursor]=abc&page[
96
96
  Use helpers from `@clipboard-health/contract-core` instead of raw Zod methods in contract packages:
97
97
 
98
98
  - Use `dateTimeSchema()` for date fields — not `z.coerce.date()` (too permissive), `z.string().datetime()` (gives string, not Date), or `z.date()` (won't parse JSON strings)
99
- - Use `requiredEnumWithFallback`/`optionalEnumWithFallback` for enums — not bare `z.enum()` (breaks old mobile clients when new values are added) or `z.enum().catch()` (doesn't compose with `.optional()`). These helpers automatically append `ENUM_FALLBACK` (`"UNRECOGNIZED_"`) to the output type — do not pass a fallback value
99
+ - Use `requiredEnumWithFallback`/`optionalEnumWithFallback` for enums — not bare `z.enum()` (breaks old mobile clients when new values are added) or `z.enum().catch()` (doesn't compose with `.optional()`). These helpers automatically append `ENUM_FALLBACK` (`"UNRECOGNIZED_"`) to the output type — do not pass a fallback value. Pre-declared array variables must use `as const` to preserve literal types (widened `string[]` is rejected at compile time)
100
100
  - Do not use `.default()` in contracts — client and server can drift on defaults. Set defaults in the service layer.
101
101
  - Name schemas with a `Schema` suffix: `ShiftAttributeSchema`, not `shiftAttribute`
102
102
  - Export at the DTO boundary (request/response schemas), not every intermediate schema