|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <title>AI Agent Instructions | Ebean</title> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
| 7 | + <link rel="shortcut icon" href="/images/favicon.ico"> |
| 8 | + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro|Ubuntu&display=swap"> |
| 9 | + <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous"> |
| 10 | + <link rel="stylesheet" href="/css/reset3.css"> |
| 11 | + <link rel="stylesheet" href="/css/site3.css"> |
| 12 | + <link rel="stylesheet" href="/css/pygments3.css"> |
| 13 | +</head> |
| 14 | +<body> |
| 15 | +<div id="main"> |
| 16 | + |
| 17 | +<div id="banner"> |
| 18 | + <header> |
| 19 | + <nav id="top"> |
| 20 | + <h1 id="breadcrumb"> |
| 21 | + <a class="nav-logo" href="/"><img src="/images/logo-200.png" height="35"></a> <a href="/docs">Documentation</a><span class="sep"> / </span><span class="last">AI Agents</span> |
| 22 | + </h1> |
| 23 | + <ul> |
| 24 | + |
| 25 | + <li><a onclick="toggleTheme();" title="switch dark light theme"><i class="fas fa-adjust"></i></a></li> |
| 26 | + </ul> |
| 27 | + </nav> |
| 28 | + </header> |
| 29 | +</div> |
| 30 | +<div class="grid grid-docs"> |
| 31 | + <aside> |
| 32 | +<nav class="side"> |
| 33 | + <ul> |
| 34 | + <li class="nav0 "> |
| 35 | + <a href="/docs/getting-started">Getting started</a> |
| 36 | + </li> |
| 37 | + <li class="nav0 "> |
| 38 | + <a href="/docs/intro">Introduction</a> |
| 39 | + </li> |
| 40 | + <li class="nav0 active"> |
| 41 | + <a class="active" href="/docs">Documentation</a> |
| 42 | + <ul> |
| 43 | + <li class="nav1 active"> |
| 44 | + <a class="active" href="/docs/agents">AI Agents</a> |
| 45 | + </li> |
| 46 | + <li class="nav1 "> |
| 47 | + <a href="/docs/best-practice">Best practice</a> |
| 48 | + </li> |
| 49 | + <li class="nav1 "> |
| 50 | + <a href="/docs/query">Query</a> |
| 51 | + </li> |
| 52 | + <li class="nav1 "> |
| 53 | + <a href="/docs/persist">Persist</a> |
| 54 | + </li> |
| 55 | + <li class="nav1 "> |
| 56 | + <a href="/docs/transactions">Transactions</a> |
| 57 | + </li> |
| 58 | + <li class="nav1 "> |
| 59 | + <a href="/docs/mapping">Mapping</a> |
| 60 | + </li> |
| 61 | + <li class="nav1 "> |
| 62 | + <a href="/docs/ddl-generation">DDL & Migrations</a> |
| 63 | + </li> |
| 64 | + <li class="nav1 "> |
| 65 | + <a href="/docs/logging">Logging</a> |
| 66 | + </li> |
| 67 | + <li class="nav1 "> |
| 68 | + <a href="/docs/testing">Testing</a> |
| 69 | + </li> |
| 70 | + <li class="nav1 "> |
| 71 | + <a href="/docs/read-replicas">Read Replicas</a> |
| 72 | + </li> |
| 73 | + <li class="nav1 "> |
| 74 | + <a href="/docs/database">Database platforms</a> |
| 75 | + </li> |
| 76 | + <li class="nav1 "> |
| 77 | + <a href="/docs/multi-database">Multiple databases</a> |
| 78 | + </li> |
| 79 | + <li class="nav1 "> |
| 80 | + <a href="/docs/kotlin">Kotlin</a> |
| 81 | + </li> |
| 82 | + <li><a href="/docs/tuning">Tuning</a></li> |
| 83 | + <li class="nav1 "> |
| 84 | + <a href="/docs/features">Features</a> |
| 85 | + </li> |
| 86 | + </ul> |
| 87 | + </li> |
| 88 | + <li class="nav0 "> |
| 89 | + <a href="/support">Getting help</a> |
| 90 | + </li> |
| 91 | + <li class="nav0 "> |
| 92 | + <a target="_blank" href="/apidoc/13">API Javadoc</a> |
| 93 | + </li> |
| 94 | + <li class="nav0 "> |
| 95 | + <a href="/videos">Videos</a> |
| 96 | + </li> |
| 97 | + <li class="nav0 "> |
| 98 | + <a href="/docs/upgrading">Upgrading</a> |
| 99 | + </li> |
| 100 | + <li class="nav0 "> |
| 101 | + <a href="/docs/deprecated">Deprecated</a> |
| 102 | + </li> |
| 103 | + <li class="nav0 "> |
| 104 | + <a href="/releases">Releases</a> |
| 105 | + </li> |
| 106 | + |
| 107 | + </ul> |
| 108 | +</nav> |
| 109 | + </aside> |
| 110 | + <article> |
| 111 | +<form action="https://www.google.com/search" method="get" class="inline-form"> |
| 112 | + <input type="hidden" name="as_sitesearch" value="ebean.io"> |
| 113 | + <div id="page-search"> |
| 114 | + <div class="input-group"> |
| 115 | + <input class="frm" name="q" id="searchinput" type="text" placeholder="Search... (press 's' to focus)" data-placeholder-focus="Search... (use '↑', '↓' and '⏎' to select results)" data-placeholder-blur="Search... (press 's' to focus)" autocomplete="off"> |
| 116 | + <div class="input-group-btn"> |
| 117 | + <button class="frm" type="submit"><i class="fas fa-search"></i></button> |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + <div id="page-search-results" style="display: none;"> |
| 121 | + <ul id="search-results-container" class="search-results"><li class=" active"><a href="/docs" title="Docs"><span style="color:#777;">Docs</span> Documentation </a></li><li class=""><small style="color:#999;">And 101 more...</small></li></ul> |
| 122 | + </div> |
| 123 | + </div> |
| 124 | +</form> |
| 125 | + |
| 126 | + |
| 127 | +<h2 id="overview">AI Agent Instructions</h2> |
| 128 | +<p> |
| 129 | + This page is the entry point for AI coding agents (GitHub Copilot, Cursor, Claude Code, |
| 130 | + OpenAI Codex, etc.) working in projects that use Ebean ORM. |
| 131 | +</p> |
| 132 | +<p> |
| 133 | + The fastest way to bootstrap Ebean knowledge is to fetch <a href="/llms.txt">https://ebean.io/llms.txt</a> — |
| 134 | + it contains a concise capability reference and links to all step-by-step guides. |
| 135 | +</p> |
| 136 | + |
| 137 | +<h2 id="guides">Step-by-step guides</h2> |
| 138 | +<p> |
| 139 | + Prescriptive guides written for AI agents and developers. Fetch and follow the relevant |
| 140 | + guide before performing Ebean-related tasks. |
| 141 | +</p> |
| 142 | +<p> |
| 143 | + Full guide index: <a href="https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/">https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/</a> |
| 144 | +</p> |
| 145 | + |
| 146 | +<table class="table"> |
| 147 | + <tr> |
| 148 | + <th>Guide</th> |
| 149 | + <th>Description</th> |
| 150 | + </tr> |
| 151 | + <tr> |
| 152 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-maven-pom.md">Maven POM setup</a></td> |
| 153 | + <td>Add Ebean dependencies, the enhancement plugin, and querybean-generator to pom.xml</td> |
| 154 | + </tr> |
| 155 | + <tr> |
| 156 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-database-config.md">Database configuration</a></td> |
| 157 | + <td>Configure the Ebean Database bean using DataSourceBuilder and DatabaseBuilder with Avaje Inject</td> |
| 158 | + </tr> |
| 159 | + <tr> |
| 160 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-test-container.md">Test container setup</a></td> |
| 161 | + <td>Start a PostgreSQL or PostGIS Docker container for tests using @TestScope @Factory</td> |
| 162 | + </tr> |
| 163 | + <tr> |
| 164 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/writing-ebean-query-beans.md">Write queries with query beans</a></td> |
| 165 | + <td>Type-safe Q-bean queries — choose terminal methods, tune select/fetch, project to DTOs</td> |
| 166 | + </tr> |
| 167 | + <tr> |
| 168 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/persisting-and-transactions-with-ebean.md">Persisting and transactions</a></td> |
| 169 | + <td>Choose insert/save/update/delete, cascade rules, @Transactional, batch writes</td> |
| 170 | + </tr> |
| 171 | + <tr> |
| 172 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-db-migration-generation.md">DB migration generation</a></td> |
| 173 | + <td>Generate schema diff migrations offline with GenerateDbMigration.java</td> |
| 174 | + </tr> |
| 175 | + <tr> |
| 176 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/entity-bean-creation.md">Entity bean creation</a></td> |
| 177 | + <td>Clean, idiomatic entity beans — annotations, field patterns, relationships, anti-patterns</td> |
| 178 | + </tr> |
| 179 | + <tr> |
| 180 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/lombok-with-ebean-entity-beans.md">Lombok with entity beans</a></td> |
| 181 | + <td>Which Lombok annotations to use and avoid; why @Data is incompatible with Ebean</td> |
| 182 | + </tr> |
| 183 | + <tr> |
| 184 | + <td><a href="https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/testing-with-testentitybuilder.md">Testing with TestEntityBuilder</a></td> |
| 185 | + <td>Rapidly create test entity instances with auto-populated random values</td> |
| 186 | + </tr> |
| 187 | +</table> |
| 188 | + |
| 189 | +<h2 id="project-config">Add to your project</h2> |
| 190 | +<p> |
| 191 | + Copy the relevant snippet into your project so AI agents working in your codebase |
| 192 | + automatically discover these guides. |
| 193 | +</p> |
| 194 | + |
| 195 | +<h4 id="agents-md">agents.md — OpenAI Codex / GitHub Copilot coding agent</h4> |
| 196 | +<p>Place an <code>agents.md</code> at your repo root:</p> |
| 197 | +<pre class="code"> |
| 198 | +## Ebean ORM |
| 199 | + |
| 200 | +This project uses [Ebean ORM](https://ebean.io). Step-by-step guides for common |
| 201 | +tasks are at: https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/ |
| 202 | + |
| 203 | +Key guides (fetch and follow these when performing the relevant task): |
| 204 | +- Maven POM setup: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-maven-pom.md |
| 205 | +- Database configuration: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-database-config.md |
| 206 | +- Write queries with query beans: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/writing-ebean-query-beans.md |
| 207 | +- Persisting and transactions: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/persisting-and-transactions-with-ebean.md |
| 208 | +- Test container setup: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-test-container.md |
| 209 | +- DB migration generation: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-db-migration-generation.md |
| 210 | +- Entity bean creation: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/entity-bean-creation.md |
| 211 | +</pre> |
| 212 | + |
| 213 | +<h4 id="copilot">GitHub Copilot — <code>.github/copilot-instructions.md</code></h4> |
| 214 | +<p>Same content as <code>agents.md</code> above — add an <code>## Ebean ORM</code> section.</p> |
| 215 | + |
| 216 | +<h4 id="claude">Claude Code — <code>CLAUDE.md</code></h4> |
| 217 | +<p>Same content as <code>agents.md</code> above — Claude Code reads <code>CLAUDE.md</code> at the project root.</p> |
| 218 | + |
| 219 | +<h4 id="cursor">Cursor — <code>.cursor/rules/ebean.mdc</code></h4> |
| 220 | +<pre class="code"> |
| 221 | +--- |
| 222 | +description: Ebean ORM task guidance |
| 223 | +globs: ["**/*.java", "**/pom.xml"] |
| 224 | +alwaysApply: false |
| 225 | +--- |
| 226 | + |
| 227 | +## Ebean ORM |
| 228 | + |
| 229 | +This project uses Ebean ORM. Before performing any Ebean-related task, fetch and |
| 230 | +follow the relevant step-by-step guide from: |
| 231 | +https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/ |
| 232 | +</pre> |
| 233 | + |
| 234 | + |
| 235 | + </article> |
| 236 | +</div> |
| 237 | + |
| 238 | +</div> |
| 239 | +<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> |
| 240 | +<script src="/js/site3.js"></script> |
| 241 | +<script src="/js/search3.js"></script> |
| 242 | +<script async src="https://www.googletagmanager.com/gtag/js?id=UA-75181644-1"></script> |
| 243 | +<script> |
| 244 | + window.dataLayer = window.dataLayer || []; |
| 245 | + function gtag(){dataLayer.push(arguments);} |
| 246 | + gtag('js', new Date()); |
| 247 | + gtag('config', 'UA-75181644-1'); |
| 248 | +</script> |
| 249 | +</body> |
| 250 | +</html> |
0 commit comments