swallowkit 1.0.0-beta.57 → 1.0.0-beta.58

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.
@@ -0,0 +1,35 @@
1
+ ---
2
+ applyTo: "shared/models/**"
3
+ ---
4
+
5
+ # Shared Models — Zod Schema Rules
6
+
7
+ The root `AGENTS.md` is the canonical contract. Files here are ai-authored
8
+ source-of-truth models, subject to the current result of
9
+ `{{runCmd}} swallowkit machine inspect boundaries`.
10
+
11
+ ## Rules
12
+
13
+ - Define Zod schemas using `zod/v4` (`import { z } from 'zod/v4'`).
14
+ - Use the Zod pattern where the schema constant and inferred TypeScript type
15
+ share the same name.
16
+ - Include `id`, `createdAt`, and `updatedAt` as optional string fields. The
17
+ backend manages their values.
18
+ - Export a `displayName` string for UI display.
19
+ - Re-export every model from `shared/index.ts`, outside managed markers where
20
+ applicable.
21
+ - For relationships, use nested schemas rather than duplicating model shapes.
22
+
23
+ After changing a model, do not manually patch generated artifacts.
24
+
25
+ Use the `swallowkit-modify-model` Agent Skill when available. Otherwise follow
26
+ `.swallowkit/workflows/modify-model.md`.
27
+
28
+ The normal agent workflow is:
29
+
30
+ ```text
31
+ inspect drift → plan scaffold → apply scaffold → verify project
32
+ ```
33
+
34
+ Prefer the equivalent `swallowkit_*` MCP tools; use the machine interface as the
35
+ fallback. Stop for any `requires-human` result.