Skip to content

[Build] Add AGENTS.md for AI agent coding conventions#4372

Open
shangeyao wants to merge 2 commits into
apache:devfrom
shangeyao:feature/add-agents-md-clean
Open

[Build] Add AGENTS.md for AI agent coding conventions#4372
shangeyao wants to merge 2 commits into
apache:devfrom
shangeyao:feature/add-agents-md-clean

Conversation

@shangeyao

@shangeyao shangeyao commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Add an AGENTS.md file to the project root, following the same pattern as Apache Iceberg's AGENTS.md. This file serves as agent instructions, documenting:

  • Module Boundaries: Clear responsibility boundaries for streampark-common, streampark-flink, streampark-spark, streampark-console
  • High-Sensitivity Areas: FlinkShimsProxy, FlinkStreaming lifecycle, ConfigKeys, K8s integration, SQL dialect conversion, auth
  • Design Patterns: Lifecycle trait pattern, Shims/Proxy pattern, Service layer separation, implicit enrichment, MyBatis-Plus entity pattern
  • Coding Conventions: Java (Spotless/Checkstyle/JUnit 5), Scala (Scalafmt/ScalaTest), TypeScript/Vue (ESLint/Prettier)
  • Commands: Build, test, format, lint commands for all layers
  • PR & Commit Conventions: [Module] prefix format, dual database upgrade requirements
  • Boundaries: "Never" and "Ask first" rules for contributors and AI agents

Why

As AI-assisted development becomes more common in open-source projects, having a canonical AGENTS.md helps both human contributors and AI tools understand the project's unique conventions, sensitive areas, and boundaries. This reduces review burden and improves contribution quality.

Related Issue

Closes #4370

shangeyao and others added 2 commits June 23, 2026 22:14
Add AGENTS.md file documenting project architecture, module boundaries,
high-sensitivity areas, design patterns, coding conventions (Java/Scala/TypeScript),
build commands, PR conventions, AI-generated PR disclosure template, and
boundaries for contributors and AI agents.
Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] Add AGENTS.md for AI agent coding conventions

1 participant