Prompt file imported from rhymion/app-generator (
.codex/prompts/generate-schema.md). Fill in{{arguments}}before use. Copyright stays with the author.
This is a generate-schema task. Read AGENTS.md before starting.
Minimum docs to read before starting:
docs/knowledge/prisma-schema-conventions.mddocs/knowledge/schema-yaml-configuration.mddocs/knowledge/code-generation-custom-extensions.mddocs/knowledge/troubleshooting.md
Task-specific rules
- Create Prisma schema first, then create JSON schema.
- If the user requests a model similar to a built-in model (comment, attachment, etc.), first confirm whether the built-in model can be used instead.
Common rules
npm run lintmust pass.- If a gate step fails: investigate root cause → fix → re-run until it passes.
- Always maintain compatibility between Prisma schema and JSON schema.
- Follow model and field naming conventions (e.g., no models ending with
_detail). Seedocs/knowledge/prisma-schema-conventions.md. - Follow the docs (
docs/knowledge/is the source of truth). - If you discover a new rule or useful skill, update the rule/skill documentation.
- Read the docs before acting: at minimum AGENTS.md, and relevant
docs/knowledge/files.
Completion gate
See .claude/commands/generate-schema.md §Completion gate — canonical source of truth.
Open the file directly (it is in the same repository under .claude/commands/).
Debug priority
| Failure | Investigate in this order |
|---|---|
| Code generation fails | 1. schema (check undocumented implicit rules) → 2. generator bug |
| Build fails | 1. config → 2. schema → 3. code bug (both VCS-managed and generated) |
| Test fails | 1. generated test code bug |
| Other test fails | 1. generation logic missing a case → 2. product code bug |
When running lint/typecheck in isolation, prefix with
npm run generate-code. See.codex/rules/generated-code-gates.mdfor details.
Input
{{arguments}}