Skip to content

Commit 139e155

Browse files
committed
docs: add AGENTS.md for AI assistants
1 parent ee32432 commit 139e155

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# AntV S2 AI Agent Instructions
2+
3+
Welcome, AI Agent! You are assisting with the [AntV S2](https://github.com/antvis/S2) repository. S2 is a high-performance data-driven multi-dimensional analysis table component.
4+
Please strictly follow the rules and conventions defined in this file when generating code, writing documentation, or creating pull requests.
5+
6+
## 1. Documentation: Dual-Language Sync is Mandatory
7+
8+
When creating or updating documentation (especially in `s2-site/docs/`), you **MUST ALWAYS** update both the Chinese (`.zh.md`) and English (`.en.md`) versions simultaneously.
9+
Never leave one language out of sync. Ensure proper technical translation that matches the project's tone.
10+
11+
## 2. Pull Request Workflow
12+
13+
When you are instructed to create a Pull Request:
14+
15+
- You **MUST** read and strictly follow the template located at `.github/PULL_REQUEST_TEMPLATE.md`.
16+
- Ensure all sections (type, description, screenshots if applicable, and self-checks) are properly filled out.
17+
- For scheduled automated tasks, use a structured summary detailing what was checked and updated.
18+
19+
## 3. Agent Skills Directory
20+
21+
We maintain specific AI agent skills and standard operating procedures (SOPs) within this repository.
22+
If an objective relates to predefined skills, you **MUST** first route to and read the instructions inside the `.agent/skills/` directory before proceeding.
23+
24+
## 4. Testing & Code Coverage: Test-After-Validation
25+
26+
Do NOT use Test-Driven Development (TDD). When writing or modifying core logic (e.g., in `packages/s2-core/`):
27+
28+
- **First**: Focus on implementing the clean, functional code logic and seek human validation. Do not generate tests immediately to save context and speed up iteration.
29+
- **Second**: ONLY after the functional code logic has been validated and approved as correct by the human user, you must then write or update corresponding unit tests.
30+
- **Hard Rule**: The final unit test coverage for your new or modified code must be **at least 80%**.
31+
32+
## 5. Playground Sync
33+
34+
If you add or modify a configuration option or API in the core engine, you **MUST** provide a corresponding implementation example in the Playgrounds (React/Vue) for developers to test and verify the behavior.

0 commit comments

Comments
 (0)