Skip to content

Commit cf070a5

Browse files
authored
Update AI content. (#93) (#104)
1 parent b40504c commit cf070a5

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

docs/ai.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ For each selected tool, Storm installs two types of AI context:
6565
| storm-query-java | Java QueryBuilder queries |
6666
| storm-sql-kotlin | Kotlin SQL Templates |
6767
| storm-sql-java | Java SQL Templates |
68+
| storm-json-kotlin / storm-json-java | JSON columns and JSON aggregation |
69+
| storm-serialization-kotlin / storm-serialization-java | Entity serialization for REST APIs (Ref handling) |
6870
| storm-migration | Write Flyway/Liquibase migration SQL |
6971

7072
### 3. Database connection (optional)
@@ -352,4 +354,4 @@ The verify-then-trust pattern closes that gap:
352354
3. **The AI runs the test.** If it passes, the code is correct by construction, verified by the same validation logic that Storm uses internally. If it fails, the error messages tell the AI exactly what to fix.
353355
4. **The test stays or goes.** Keep it as a regression test, or let the AI remove it once verified. Either way, the verification happened.
354356

355-
No other ORM framework offers this combination: an AI-friendly data model that produces stable code, a schema-aware MCP server that gives the AI structural knowledge without exposing data, and built-in test tooling that lets the AI verify its own work through the framework rather than around it.
357+
This is the combination that makes it work: an AI-friendly data model that produces stable code, a schema-aware MCP server that gives the AI structural knowledge without exposing data, and built-in test tooling that lets the AI verify its own work through the framework rather than around it.

website/static/skills/index-java.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"storm-repository-java",
77
"storm-query-java",
88
"storm-sql-java",
9+
"storm-json-java",
10+
"storm-serialization-java",
911
"storm-migration"
1012
],
1113
"schemaSkills": [

website/static/skills/index-kotlin.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"storm-repository-kotlin",
77
"storm-query-kotlin",
88
"storm-sql-kotlin",
9+
"storm-json-kotlin",
10+
"storm-serialization-kotlin",
911
"storm-migration"
1012
],
1113
"schemaSkills": [

website/static/skills/storm-entity-from-schema.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Generation/update rules:
3131
SQL type mapping (Kotlin): INTEGER->Int, BIGINT->Long, VARCHAR/TEXT->String, BOOLEAN->Boolean, DECIMAL->BigDecimal, DATE->LocalDate, TIMESTAMP->Instant, UUID->UUID
3232
SQL type mapping (Java): INTEGER->Integer(PK)/int, BIGINT->Long(PK)/long, VARCHAR/TEXT->String, BOOLEAN->Boolean/boolean, DECIMAL->BigDecimal, DATE->LocalDate, TIMESTAMP->Instant, UUID->UUID
3333

34+
JSON column recognition: columns typed as JSONB (PostgreSQL), JSON (MySQL, MariaDB, Oracle), NVARCHAR(MAX) with JSON content (MS SQL Server), or CLOB with JSON content (H2) should be mapped with `@Json`. Ask the user what the JSON structure represents so you can choose the correct field type (e.g., `Map<String, String>`, a custom data class, or `List<T>`).
35+
3436
After changes: review types, rebuild for metamodel regeneration.
3537

3638
When appropriate, suggest a Flyway/Liquibase migration if the schema change originated from the code side rather than the database side.

website/static/skills/storm-migration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,24 @@ PK generation mapping:
1818
| SEQUENCE | CREATE SEQUENCE | N/A | CREATE SEQUENCE |
1919
| NONE | No generation | No generation | No generation |
2020

21+
JSON column types per dialect:
22+
| Database | Column Type |
23+
|----------|-------------|
24+
| PostgreSQL | `JSONB` |
25+
| MySQL | `JSON` |
26+
| MariaDB | `JSON` |
27+
| Oracle | `JSON` |
28+
| MS SQL Server | `NVARCHAR(MAX)` |
29+
| H2 | `CLOB` |
30+
2131
Tips:
2232
- FK constraints matching @FK annotations
2333
- UNIQUE constraints for @UK fields
2434
- Indexes on FK columns and frequent queries
2535
- NOT NULL matching entity nullability
2636
- Enums as strings: VARCHAR. Ordinal: INTEGER.
2737
- @Version: INTEGER or TIMESTAMP
38+
- `@Json` fields: use the correct JSON column type for the target database (see table above)
2839

2940
After writing a migration, rebuild the project for metamodel regeneration.
3041

website/static/skills/storm-rules.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Available Storm skills:
1616
- /storm-repository-kotlin or /storm-repository-java - Write repositories
1717
- /storm-query-kotlin or /storm-query-java - Write queries with the QueryBuilder
1818
- /storm-sql-kotlin or /storm-sql-java - Write SQL Templates
19+
- /storm-json-kotlin or /storm-json-java - JSON columns and JSON aggregation
20+
- /storm-serialization-kotlin or /storm-serialization-java - Entity serialization for REST APIs
1921
- /storm-migration - Write Flyway/Liquibase migration SQL
2022

2123
When the user asks about Storm topics, suggest the relevant skill if they need detailed guidance.

0 commit comments

Comments
 (0)