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.
- package/README.ja.md +1 -0
- package/README.md +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +12 -498
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/core/project/agent-instructions.d.ts +29 -0
- package/dist/core/project/agent-instructions.d.ts.map +1 -0
- package/dist/core/project/agent-instructions.js +159 -0
- package/dist/core/project/agent-instructions.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/agent-instructions.test.ts +237 -0
- package/src/__tests__/init.test.ts +2 -0
- package/src/cli/commands/init.ts +19 -525
- package/src/core/project/agent-instructions.ts +167 -0
- package/src/core/project/agent-templates/AGENTS.md +442 -0
- package/src/core/project/agent-templates/CLAUDE.md +28 -0
- package/src/core/project/agent-templates/azure-functions.instructions.md +22 -0
- package/src/core/project/agent-templates/bff-routes.instructions.md +18 -0
- package/src/core/project/agent-templates/copilot-instructions.md +24 -0
- package/src/core/project/agent-templates/shared-models.instructions.md +35 -0
|
@@ -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.
|