Skip to content

Commit aeef6d0

Browse files
committed
Docs: modify guides README with snippets devs should copy n paste into their README etc to help guide the AI agents to the appropriate ebean guides
1 parent a99aef8 commit aeef6d0

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

docs/guides/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,74 @@ existing Maven project. Complete the steps in order.
2424
| Guide | Description |
2525
|-------|-------------|
2626
| [DB migration generation](add-ebean-db-migration-generation.md) | Add `GenerateDbMigration.java` to generate schema diff migrations offline; configure the migration runner; understand `.sql` and `.model.xml` output files; workflow for pending drops |
27+
28+
---
29+
30+
## Helping AI agents find these guides
31+
32+
AI coding agents can only follow these guides if they know they exist. Below are
33+
copy-paste snippets for the most common AI tooling configurations. Add whichever
34+
applies to your project.
35+
36+
37+
### Project `README.md` (universal — works with all AI tools)
38+
39+
Add a section near the top of your project README:
40+
41+
```markdown
42+
## AI Agent Instructions
43+
44+
This project uses [Ebean ORM](https://ebean.io). Step-by-step guides for common
45+
Ebean tasks (Maven setup, database configuration, test containers, DB migrations,
46+
Lombok) are at:
47+
48+
**https://github.com/ebean-orm/ebean/tree/main/docs/guides/**
49+
50+
AI agents should fetch and follow the relevant guide before performing Ebean-related
51+
tasks.
52+
```
53+
54+
### Why README is important
55+
56+
Many AI agents (Copilot, Claude, Cursor, Aider) read the project `README.md`
57+
automatically as part of understanding the codebase. A visible link in README is the
58+
most universally effective way to ensure any agent working on your project will
59+
discover the guides without requiring tool-specific configuration files.
60+
61+
------
62+
63+
### GitHub Copilot — `.github/copilot-instructions.md`
64+
65+
```markdown
66+
## Ebean ORM
67+
68+
This project uses [Ebean ORM](https://ebean.io). Step-by-step guides for common
69+
tasks are at: https://github.com/ebean-orm/ebean/tree/main/docs/guides/
70+
71+
Key guides (fetch and follow these when performing the relevant task):
72+
- Maven POM setup: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-maven-pom.md
73+
- Database configuration: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-database-config.md
74+
- Test container setup: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-test-container.md
75+
- DB migration generation: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-db-migration-generation.md
76+
- Lombok with entity beans: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/lombok-with-ebean-entity-beans.md
77+
```
78+
79+
### Claude Code — `CLAUDE.md`
80+
81+
Same content as above — Claude Code reads `CLAUDE.md` at the project root.
82+
83+
### Cursor — `.cursor/rules/ebean.mdc`
84+
85+
```markdown
86+
---
87+
description: Ebean ORM task guidance
88+
globs: ["**/*.java", "**/pom.xml"]
89+
alwaysApply: false
90+
---
91+
92+
## Ebean ORM
93+
94+
This project uses Ebean ORM. Before performing any Ebean-related task, fetch and
95+
follow the relevant step-by-step guide from:
96+
https://github.com/ebean-orm/ebean/tree/main/docs/guides/
97+
```

0 commit comments

Comments
 (0)