dati
AGENTS.md78 starsChanged 35 days agoApache-2.0View on GitHub
This file guides agentic coding assistants working on the DatI repository. DatI (Data Intelligence) is a platform that provides unified data access capabilities for large language models (LLMs). - Core Features: Quickly connect to various data sources (databases, APIs, files) and automatically generate interfaces complying with the Model Context Protocol (MCP) standard. - Use Cases: Building NL2SQL applications, data analysis assistants, and rapid deployment of data query MCP services. Package structure (DDD):
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- dati-opsSkill
- e2e-testerSkill
- dati-opsSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Always verify changes by running relevant tests before submission.
- Very specific: line 64
Exception: Use DatiException with ErrorCode enum (prefixes: CM common, DS datasource, SM semantic, MS mcp, AUTH auth, PM permission).
- Very specific: line 84
API: All calls via api/http.ts, interceptor returns resp.data directly.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file guides agentic coding assistants working on the DatI repository.
Project Overview
DatI (Data Intelligence) is a platform that provides unified data access capabilities for large language models (LLMs).
- Core Features: Quickly connect to various data sources (databases, APIs, files) and automatically generate interfaces complying with the Model Context Protocol (MCP) standard.
- Use Cases: Building NL2SQL applications, data analysis assistants, and rapid deployment of data query MCP services.
General Principles
- Code should be simple and clean, never over-complicate things.
- Write a detailed test suite as you add more features. The test must be re-executed at every major change.
- Stage new files to git before running tests. Uncommitted changes make it harder to verify what was added or modified.
- English in code, Chinese in docs. Log messages, test
@DisplayName, console output, and comments use English; Chinese is reserved for user-facing text (i18n) and PRD docs. - No backward compatibility during beta. Unless explicitly required, do not support historical data, legacy APIs/fields, or old behavior; no migrations or compatibility shims. Prefer the cleanest design.
- Comments describe the code, not the change behind it. A comment states what a class, method, or field is or guarantees, in the present tense, for a reader who never saw the diff. Change notes — what broke, what was rejected, which bug it fixed — belong in the commit message, the PR, or
e2e-tests/BUGS*.yaml. Do not define code by absence ("intentionally unvalidated", "deliberately free of X") or by history ("used to be", "before the fix"), and never cite bug IDs in code: a negative or historical remark rots the moment someone legitimately changes the code, and it makes a global class look like it exists to fight one past decision. When a reason must outlive the change, promote it to a rule here or in.agents/rules/and let a test enforce it.- Good:
/** Every field is optional: omitted fields keep their stored value. */ - Bad:
/** Deliberately no @NotBlank here — it broke partial updates in BUG-20261023-008. */
- Good:
Commands
Backend (Java/Spring Boot)
cd backend
mvn test # Run all tests across modules
mvn -pl core -Dtest=ClassName#MethodName test # Run specific test in module
mvn -B -DskipTests package # Build all modules without tests
mvn -pl app spring-boot:run # Run app (port 8085)
scripts/fetch-openapi.sh # Regenerate docs/api/openapi.json + skill snapshot (backend must be running)
scripts/set-version.sh <version> # Bump version across all modules (backend POMs, frontend, SpringDoc, OpenAPI)Frontend (Vue 3 + TypeScript)
cd frontend
pnpm install # Install deps
pnpm build # Type check + Build
pnpm dev # Dev serverTesting Requirements (CRITICAL)
- Backend: New features MUST be developed using TDD. Write a failing test first, then implement the minimal code to pass it.
- Frontend: Unit tests use Vitest.
- Always verify changes by running relevant tests before submission.
Backend at a Glance
Package structure (DDD):
com.dati.<module>/
├── domain/{ model, service } # Domain entities + business logic
├── repository/{ dao, po, mapper } # Persistence + PO↔Model conversion
└── server/{ controller, pojo, assembler } # REST + Model↔VO conversion- Mapper: static methods, PO↔Model, handles encryption. Assembler:
@Component extends BaseAssembler, Model↔VO, fills user info. - Naming:
PascalCaseclasses,camelCasemethods,lowercasepackages. - Injection: Constructor injection only (
private final). - Lombok: POs use
@Getter/@Setter, optional@FieldNameConstants(PO-only),@Slf4jas needed. - Response:
IdResponsefor mutations,PageResponse<T>for paginated lists, rawList<T>for metadata queries. - Exception: Use
DatiExceptionwithErrorCodeenum (prefixes:CMcommon,DSdatasource,SMsemantic,MSmcp,AUTHauth,PMpermission). - JSON: Dev profile uses
SNAKE_CASE.
→ Full details: .agents/rules/backend.md
Frontend at a Glance
src/
├── pages/ # File-based routing (unplugin-vue-router)
├── components/ # Auto-imported, grouped by <feature>
├── api/ # http.ts (axios) + types.ts + <feature>.ts
├── composables/ # Reusable composition functions
├── stores/ # Pinia (setup syntax)
├── locales/ # i18n (zh.ts, en.ts)
└── styles/ # TailwindCSS 4 + Element Plus- SFC:
<script setup lang="ts">, components usePascalCase. - Types:
snake_casefor API JSON,camelCasefor local variables. - API: All calls via
api/http.ts, interceptor returnsresp.datadirectly. - State: Pinia with setup syntax (see
stores/system.ts). - Styling: TailwindCSS 4 + Element Plus, prefer atomic utility classes.
- I18n:
t('key')for all user-facing text, keys nested by feature.
→ Full details: .agents/rules/frontend.md
Design System
The project follows a Flat Design + Enterprise Minimal style with Element Plus as the UI framework.
Key rules (always apply):
| Rule | Standard |
| Colors | Use var(--ep-color-*) semantic variables everywhere. Never raw hex in component templates. |
| Typography | Page title 24px/650, section title 16px/650, body 14px, meta 13px, label 12px. |
| Spacing | Tailwind 4px base unit: gap-1=4px, gap-2=8px, gap-4=16px. |
| Page layout | List pages: p-5 md:p-6 → toolbar → DataTableShell → dialog. Detail pages with breadcrumb + tabs or side nav. |
| Buttons | Primary CTA: el-button type="primary". Table actions: type="primary" link. Danger: type="danger" link. |
| Icons | SVG only via Element Plus icons (@element-plus/icons-vue) or Iconify. Never emoji as structural icons. |
| Loading | Tables: v-loading="loading". Card grids: el-skeleton. Buttons: :loading="loading". |
| Empty states | Use el-empty with contextual description via i18n t('xxx.emptyList'). |
| Dark mode | useDark() from @vueuse/core. Element Plus CSS vars auto-switch. Test both modes. |
| Accessibility | Icon-only buttons need aria-label or el-tooltip. Deletions need ElMessageBox.confirm. Add cursor-pointer to all clickables. |
| Responsive | p-5 md:p-6 for page padding, flex-wrap + flex-col on mobile breakpoints (768px). |
Page templates available for copy-paste:
- List page (table) — MCP Services / Data Sources pattern
- List page (card grid) — Subjects pattern
- Detail page (tabs inside card) — Subject detail pattern
- Detail page (side nav) — MCP Service detail pattern
→ Full design system details (colors, typography scale, spacing, component patterns, anti-patterns): .agents/rules/design-system.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

