Skip to content

Commit eaf55cb

Browse files
committed
Add schema planning rule to plain-models rules
1 parent e3ef7a6 commit eaf55cb

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.claude/rules/plain-models.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Database & Models
22

3+
## Schema Changes
4+
5+
When creating new models or modifying existing model fields/relationships, always enter plan mode first. Database schema is hard to change after the fact, so get the design right before writing code.
6+
7+
In your plan, present:
8+
9+
- Proposed schema as a table (model, field, type, constraints)
10+
- Relationship cardinality (1:1, 1:N, M:N)
11+
- Key decisions: nullable vs default, indexing, cascade behavior
12+
- Whether the data could live on an existing model instead of a new one
13+
14+
Get approval before writing any model code or generating migrations.
15+
316
## Creating Migrations
417

518
```

plain-models/plain/models/agents/.claude/rules/plain-models.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Database & Models
22

3+
## Schema Changes
4+
5+
When creating new models or modifying existing model fields/relationships, always enter plan mode first. Database schema is hard to change after the fact, so get the design right before writing code.
6+
7+
In your plan, present:
8+
9+
- Proposed schema as a table (model, field, type, constraints)
10+
- Relationship cardinality (1:1, 1:N, M:N)
11+
- Key decisions: nullable vs default, indexing, cascade behavior
12+
- Whether the data could live on an existing model instead of a new one
13+
14+
Get approval before writing any model code or generating migrations.
15+
316
## Creating Migrations
417

518
```

0 commit comments

Comments
 (0)