[docs] Add AGENTS.md - AI agent coding guide#2922
[docs] Add AGENTS.md - AI agent coding guide#2922vaibhavk1992 wants to merge 3 commits intoapache:mainfrom
Conversation
This documentation extracts and documents coding conventions, patterns, and standards from the existing Apache Fluss codebase to assist AI coding agents. All rules and examples are derived from actual source code, Checkstyle configuration, and build files. - 11 comprehensive sections covering critical rules, API patterns, testing, dependencies, configuration, and build/CI - 100+ concrete code examples with DO/DON'T comparisons - Direct file references to canonical examples in the codebase - Fully compliant with Apache generative AI guidelines Also updated .gitignore to exclude CLAUDE.md (personal development notes)
|
Hi @vaibhavk1992, thanks for the initial PR! Just sharing some quick observations. I took a look and it looks quite solid with lots of useful information for coding agents. For comparison I examined Airflow's AGENTS.md (https://github.com/apache/airflow/blob/main/AGENTS.md). I noticed that in Airflow's AGENTS.md they have a section that tells the AI how to properly run git commands in addition to identifying as AI-generated: https://github.com/apache/airflow/blob/main/AGENTS.md#creating-pull-requests There's also a section of explicit boundaries for the agent that may have some overlap for Fluss: https://github.com/apache/airflow/blob/main/AGENTS.md#boundaries I noticed that the AGENTS.md files here and in Airflow both focus primarily on code contribution rather than deployment. I've read that AGENTS.md could serve a dual purpose: guiding contributors, and helping developers use AI to quickly set up and deploy a new repository from day one. However, I do believe the saying is that AGENTS.md is intended to be relatively brief (<500 lines?), and this document has already exceeded that. I am not sure how this could be best balanced. Thanks again for your work on this. Edit: A workaround for the lengthier AGENTS.md is to provide a breadcrumbs route, pointing the agent towards further documentation in other subfolders for additional information (e.g., Edit 2: I just saw here that module-level AGENTS.md would be in phase 3: https://cwiki.apache.org/confluence/display/FLUSS/FIP-34%3A+Making+Fluss+an+AI-Native+Project |
Restore trailing newline at end of .gitignore file to match apache/fluss upstream. Previous commit accidentally removed it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@qzyu999 Thanks for the reviewing it. |
|
|
||
| ### Package Structure | ||
|
|
||
| See CLAUDE.md for full module/package organization. Key modules: `fluss-common`, `fluss-rpc`, `fluss-client`, `fluss-server`. |
There was a problem hiding this comment.
I don't see a CLAUDE.md in the repo, actually if you check with Airflow they do have a CLAUDE.md, but it simply points to AGENTS.md in its contents: https://github.com/apache/airflow/blob/main/CLAUDE.md. I am thinking we could do the same.
|
|
||
| ## 10. Module Boundaries | ||
|
|
||
| **Module structure:** See CLAUDE.md for full module organization |
There was a problem hiding this comment.
Same as my previous comment above, no visible CLAUDE.md.
|
|
||
| Detailed explanation of changes and motivation. | ||
|
|
||
| Co-Authored-By: Claude <ai-assistant@anthropic.com> |
There was a problem hiding this comment.
I believe we should make this doc agent agnostic, Airflow's AGENT.md mentions <Agent Name and Version> and links to an explicit separate post about Gen-AI assissted contributions: https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions. Perhaps we need our own such Fluss-specific post?
Edit: I just saw here the the AI-assisted contribution guidelines are phase 2: https://cwiki.apache.org/confluence/display/FLUSS/FIP-34%3A+Making+Fluss+an+AI-Native+Project
|
|
||
| **Component tags:** `[client]`, `[server]`, `[rpc]`, `[flink]`, `[spark]`, `[docs]`, `[build]`, `[test]` | ||
|
|
||
| **AI-generated code identification:** ALWAYS include `Co-Authored-By: Claude <ai-assistant@anthropic.com>` in commit messages for AI-generated changes. |
There was a problem hiding this comment.
Same as above, referring to being agent-agnostic with <Agent Name and Version>.
|
Hi @vaibhavk1992, awesome job on the compression! I noted some examples where it's specifically referring to some form of "Claude", when I think we should try to be more agent agnostic. I refer to some examples in the Airflow Edit: I just saw here https://lists.apache.org/thread/xm35s36fsqt8dyhbkkvq05nwm7l48rp2 that this was mentioned explicitly: The link also mentions the same |
|
@qzyu999 I use claude.md for my local setup. Too make it agnostic I made an agents.Md. As per FIP and this task it needs just an Agents.md. I can get rid of claude.md wherever it is being referred. Please confirm. |
Hi @vaibhavk1992, actually it mentions here to keep the Edit: I also mention above that the repo should have a |
This documentation extracts and documents coding conventions, patterns, and standards from the existing Apache Fluss codebase to assist AI coding agents. All rules and examples are derived from actual source code, Checkstyle configuration, and build files.
Also updated .gitignore to exclude CLAUDE.md (personal development notes)
Purpose
Linked issue: #2921
Brief change log
Tests
API and Format
Documentation