nacos
AGENTS.md33k starsChanged 10 months agoApache-2.0View on GitHub
For human contributors, see CONTRIBUTING.md. - Do NOT post AI-generated comments on issues or PRs. Discussions are for humans only. - Discuss before implementing: Ensure the implementation direction is agreed upon with maintainers in the issue comments before starting work. - Spec-first coding is mandatory: Before changing behavior, APIs, SDKs, plugins, storage, runtime flow, or domain semantics, AI agents MUST read the relevant specs under specs/ and treat them as the rule source for the implementation. - Discuss spec-impacting changes…
Trending
More talk lately.about the whole repository
Who's talking about alibaba/nacos
- alibaba/fastjson2“:wrench: use Maven Central Portal”GitHub · May 19, 2025 · 2 reactions
- A Hacker News story“Nacos: Dynamic Naming and Configuration Service”Hacker News · Apr 8, 2024 · 2 points
- alibaba/spring-cloud-alibaba“[notify-error]动态刷新错误”GitHub · Nov 3, 2025 · 1 reactions
- nacos-group/nacos-spring-boot-project“需要发个新版以支持springboot3和snakeyaml2 (附临时解决方案,仅供参考)”GitHub · May 21, 2025 · 1 reactions
- nacos-group/nacos-docker“nacos2.3.0的mysql镜像初始化失败”GitHub · Jan 22, 2025 · 1 reactions
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub and Hacker News (51 times).
On GitHub · 50
- May 19, 2025:wrench: use Maven Central Portal — alibaba/fastjson22 reactions
- Nov 3, 2025[notify-error]动态刷新错误 — alibaba/spring-cloud-alibaba1 reaction · 4 comments
- May 21, 2025需要发个新版以支持springboot3和snakeyaml2 (附临时解决方案,仅供参考) — nacos-group/nacos-spring-boot-project1 reaction · 1 comment
- Jan 22, 2025nacos2.3.0的mysql镜像初始化失败 — nacos-group/nacos-docker1 reaction · 2 comments
- Nov 4, 2023增加nacos2集群之间,cosul、eureka、zookeeper与nacos2.x集群之间的同步功能 — nacos-group/nacos-sync1 reaction · 5 comments
45 more on GitHub
- Jun 1, 2023fix security issue of the base image for slim. — nacos-group/nacos-docker1 reaction
- Aug 10, 2021[Summer 2021] Adapt to the new version of gRPC interface for Nacos Python SDK — nacos-group/nacos-sdk-python1 reaction
- Jan 19, 2021After the configuration is released, the next release cannot take effect — alibaba/spring-cloud-alibaba1 reaction · 3 comments
- Nov 9, 2026Bump com.alibaba.nacos:nacos-client from 2.4.2 to 2.5.5 — sg-scale/dubbo--dubbo-3.2.190 reactions
- Nov 7, 2026Update existing library: tools.jackson.core:jackson-core:3.1.2 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.springframework:spring-tx:7.0.7 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.springframework.security:spring-security-crypto:7.0.5 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.springframework.boot:spring-boot-webmvc:4.0.6 — oracle/graalvm-reachability-metadata0 reactions
- Nov 7, 2026Update existing library: org.springframework.boot:spring-boot-web-server:4.0.6 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.springframework.boot:spring-boot-jdbc:4.0.6 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.springframework.boot:spring-boot-actuator-autoconfigure:4.0.6 — oracle/graalvm-reachability-metadata0 reactions
- Nov 7, 2026Update existing library: org.slf4j:slf4j-api:2.0.13 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.jspecify:jspecify:1.0.0 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.jetbrains.kotlin:kotlin-stdlib:2.2.21 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: org.apache.tomcat.embed:tomcat-embed-core:11.0.21 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: jakarta.annotation:jakarta.annotation-api:3.0.0 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: io.micrometer:micrometer-observation:1.16.5 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: io.grpc:grpc-core:1.81.0 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.2 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Update existing library: com.fasterxml.jackson.core:jackson-core:2.21.2 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Support for org.springframework:spring-beans:7.0.7 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Support for org.springframework:spring-aop:7.0.7 — oracle/graalvm-reachability-metadata0 reactions · 2 comments
- Nov 7, 2026Support for org.springframework.security:spring-security-core:7.0.5 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Support for org.springframework.boot:spring-boot-security:4.0.6 — oracle/graalvm-reachability-metadata0 reactions · 2 comments
- Nov 7, 2026Support for org.springframework.boot:spring-boot-http-converter:4.0.6 — oracle/graalvm-reachability-metadata0 reactions · 1 comment
- Nov 7, 2026Support for org.apache.httpcomponents.client5:httpclient5:5.5.2 — oracle/graalvm-reachability-metadata0 reactions · 2 comments
- Nov 7, 2026Support for com.alipay.sofa:rpc-grpc-impl:1.4.1 — oracle/graalvm-reachability-metadata0 reactions · 2 comments
- Nov 7, 2026Support for org.springframework:spring-core:7.0.7 — oracle/graalvm-reachability-metadata0 reactions · 2 comments
- Nov 6, 2026Bump com.alibaba.nacos:nacos-client from 2.3.0 to 3.3.0 — huaweicloud/spring-cloud-huawei0 reactions
- Nov 1, 2026Bump the maven group across 1 directory with 4 updates — geedge/schema-updater-tool0 reactions
- Nov 1, 2026Bump the maven group across 1 directory with 7 updates — geedge/dos-detection-job0 reactions
- Nov 1, 2026Bump the maven group across 1 directory with 4 updates — geedge/app-protocol-stat-traffic-agent0 reactions
- Oct 27, 2026build(deps): bump com.alibaba.nacos:nacos-client from 3.1.1 to 3.2.4 — Ken-coding-afk/micro-service0 reactions
- Oct 26, 2026chore(deps-dev): bump com.alibaba.nacos:nacos-client from 2.5.2 to 2.5.4 — AlanSmithDev/dubbo-learning-lab0 reactions
- Oct 16, 2026Bump nacos-client.version from 3.2.1-2026.03.30 to 3.2.4 — kush-coder/autopilot-agentscope-java0 reactions
- Oct 7, 2026build(deps): bump com.alibaba.nacos:nacos-client from 1.4.2 to 3.2.4 in /hoj-springboot — whysblog/hoj-why0 reactions
- Sep 29, 2026chore(deps): bump the spring-stack group across 1 directory with 5 updates — lifuchun522/springaialibabapractice0 reactions
- Sep 14, 2026Bump nacos-client.version from 3.2.1-2026.03.30 to 3.2.4 — agentscope-ai-java/agentscope-java0 reactions
- Sep 4, 2026[docs] Add Request/Result pattern API and 304 cache documentation for Java SDK — nacos-group/nacos-group.github.io0 reactions · 1 comment
- Aug 28, 2026Bump nacos-client.version from 3.2.1-2026.03.30 to 3.2.3 — constanji/agentscope-java0 reactions
- Aug 14, 2026build(deps): bump com.alibaba.nacos:nacos-client from 3.0.2 to 3.2.3 — liulangjietou/customer_work0 reactions
- Aug 12, 2026chore(deps): bump com.alibaba.nacos:nacos-client from 3.1.1 to 3.2.3 in /services/portal-bff — tianqiongenze/education-platform0 reactions · 1 comment
- Aug 12, 2026chore(deps): bump com.alibaba.nacos:nacos-client from 3.1.1 to 3.2.3 in /services/payment-platform/payment-platform-service — tianqiongenze/education-platform0 reactions · 1 comment
- Jul 20, 2026deps(deps): bump com.alibaba.nacos:nacos-client from 3.2.1-2026.04.03 to 3.2.3 — liweinan/tcprest0 reactions · 1 comment
- Jul 19, 2026build(deps): bump com.alibaba.nacos:nacos-client from 2.4.3 to 3.2.3 — Zferrys/flashflow0 reactions · 1 comment
On Hacker News · 1
- Apr 8, 2024Nacos: Dynamic Naming and Configuration Service2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- nacos-skill-registrySkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 12 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Discuss before implementing: Ensure the implementation direction is agreed upon with maintainers in the issue comments before starting work.
- Very specific: line 9
Spec-first coding is mandatory: Before changing behavior, APIs, SDKs, plugins, storage, runtime flow, or domain semantics, AI agents MUST …
- Distinctive: line 13
Discuss spec-impacting changes before coding: If a change touches behavior covered by an existing spec, or exposes a gap between the code …
- Very specific: line 21
API IT impact comes first: Before adding, changing, deleting, or deprecating any HTTP API, AI agents MUST analyze the affected …
- Very specific: line 27
Java SDK IT impact comes first: Before adding, changing, deleting, or deprecating any public Java SDK interface, factory, model, listener …
- Distinctive: line 33
Disclose AI usage: When a significant part of a commit is AI-generated, add a trailer to your commit message:
- Distinctive: line 90
Before committing Java code or tests, AI agents MUST run Spotless for the affected module or nearest aggregator:
- Very specific: line 94
Run mvn spotless:check for the same scope.
- Distinctive: line 96
Commit only after Spotless and the relevant validation pass.
- Very specific: line 98
Do not rely on checkstyle:check, spotbugs:check, or git diff --check as a substitute for Spotless.
- Very specific: line 125
Every new source file must include the Apache License 2.0 header.
- Distinctive: line 151
Before coding any API, SDK, plugin, storage, runtime, or domain change, AI agents MUST consult the relevant specs below.
- Very specific: line 371
Always: add @Secured annotation (com.alibaba.nacos.auth.annotation.Secured):
- Distinctive: line 384
Read the affected controller, form/request model, validators, service path, response model, exception handling, and matching specs.
- Distinctive: line 388
Add, update, or remove API IT cases for the changed contract.
- Very specific: line 390
Update test/openapi-test/API_TEST_COVERAGE.md and the matching *_API_TEST_SCENARIOS.md document.
- Distinctive: line 392
If the functional success path is hard to exercise in standalone IT, at least cover boundary and error scenarios and document the uncovered …
- Distinctive: line 400
Read the public interface, implementation, request/response model, listener path, lifecycle code, exception mapping, and matching …
- Distinctive: line 405
Add, update, or remove Java SDK IT cases for the changed SDK contract.
- Very specific: line 408
Keep SDK ITs as external-client tests against a standalone Nacos server.
- Very specific: line 449
All PRs must target the develop branch.
- Distinctive: line 462
Do NOT report security vulnerabilities via GitHub Issues.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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 provides guidance to AI coding agents (Claude Code, Cursor, GitHub Copilot, etc.) when working with the Nacos repository. For human contributors, see CONTRIBUTING.md.
AI Contribution Guidelines
- Do NOT post AI-generated comments on issues or PRs. Discussions are for humans only.
- Discuss before implementing: Ensure the implementation direction is agreed upon with maintainers in the issue comments before starting work.
- Spec-first coding is mandatory: Before changing behavior, APIs, SDKs,
plugins, storage, runtime flow, or domain semantics, AI agents MUST read the
relevant specs under
specs/and treat them as the rule source for the implementation. - Discuss spec-impacting changes before coding: If a change touches behavior covered by an existing spec, or exposes a gap between the code and the spec, AI agents MUST discuss the implementation direction and the required spec update with maintainers before starting the code change.
- Update specs with the design: Any design proposal that changes or clarifies spec-covered behavior MUST include the corresponding spec updates in the same change set. When the design is large or controversial, prefer a spec/design-only PR first, then follow with implementation PRs.
- API IT impact comes first: Before adding, changing, deleting, or
deprecating any HTTP API, AI agents MUST analyze the affected
test/openapi-testcoverage and update the API IT scenario matrix, test cases, and coverage registry in the same change set. If the functional path cannot be exercised in standalone IT, cover boundary/error scenarios and document the reason. - Java SDK IT impact comes first: Before adding, changing, deleting, or
deprecating any public Java SDK interface, factory, model, listener behavior,
lifecycle behavior, or exception mapping, AI agents MUST analyze and update
test/java-sdk-testcoverage, including scenario documentation. If the end-to-end success path is impractical, cover SDK parameter validation, boundary behavior, and controlled exceptions. - Disclose AI usage: When a significant part of a commit is AI-generated, add a trailer to your commit message:
Assisted-by: Claude Code - Follow CONTRIBUTING.md for all contribution processes.
Repository Overview
Nacos (Dynamic Naming and Configuration Service) is an easy-to-use platform designed for dynamic service discovery, configuration management, and AI agent management. It helps you build cloud-native applications and AI Agent applications easily. Key capabilities: service discovery, dynamic configuration, dynamic DNS service, service/metadata management, and AI registry (Prompt, MCP, A2A).
Current Version: 3.2.1-SNAPSHOT | Main Branch: develop | Java: JDK 17+ (client modules: JDK 8+) | Build: Maven 3.2.5+
Core Architecture
Key modules and their roles:
- api / client / client-basic: Client-facing APIs, gRPC definitions, SDK (Java 8 compatible)
- common: Shared utilities, HTTP client, notify center, executor
- config: Configuration management server
- naming: Service discovery and registration server
- core: Core server infrastructure (cluster, distributed consensus)
- consistency: JRaft-based CP protocol + custom Distro AP protocol
- auth: Authentication and authorization
- plugin / plugin-default-impl: Extensible plugin system (Java SPI). Types: auth, visibility, datasource dialect, config change, encryption, trace, environment, control, AI pipeline, AI storage
- console / console-ui: Web UI backend (Spring Boot) and frontend (React)
- ai / copilot / ai-registry-adaptor: AI Agent support, Copilot integration, and AI registry adaptor
- sys: System environment utilities and JVM parameter management
- bootstrap / server: Server startup and aggregation
- persistence: Data persistence with multi-database support (Derby, MySQL, PostgreSQL)
- maintainer-client: Internal maintenance client
- lock: Distributed lock support
Communication: gRPC (primary) + HTTP/REST (legacy compatibility). Protobuf definitions in api/src/main/proto/.
Build & Test Commands
# Full build (skip tests)
mvn '-Prelease-nacos,!dev' -Dmaven.test.skip=true clean install -U
# Run all unit tests
mvn test
# Run standalone-server integration tests
mvn -pl test/openapi-test -Pintegration-test -DskipTests=false verify
mvn -pl test/java-sdk-test -Pjava-sdk-integration-test -DskipTests=false verify
mvn -pl test/maintainer-sdk-test -Pmaintainer-sdk-integration-test -DskipTests=false verify
# Format code (run before commit)
mvn spotless:apply
# Pre-submission checks (MUST pass before PR)
mvn -B clean compile apache-rat:check checkstyle:check spotbugs:check spotless:check -DskipTestsMandatory Formatting Before Commit
Before committing Java code or tests, AI agents MUST run Spotless for the affected module or nearest aggregator:
- Run
mvn spotless:applyfirst. - Run
mvn spotless:checkfor the same scope. - Then run the relevant compile/check/test command.
- Commit only after Spotless and the relevant validation pass.
Do not rely on checkstyle:check, spotbugs:check, or git diff --check as a
substitute for Spotless. Spotless uses the project formatter and may accept
formatting that generic whitespace checks report differently.
Code Style
Follows Alibaba Java Coding Guidelines.
- Checkstyle config:
style/NacosCheckStyle.xml - IDEA code style:
style/nacos-code-style-for-idea.xml
Key Rules for AI Agents
| Rule | Value |
| Indentation | 4 spaces (basic offset), 4 spaces (case indent) |
| Line length | 100 characters max (enforced by Spotless + Checkstyle) |
| Star imports | Forbidden — always use explicit imports |
| Unused imports | Forbidden |
| Javadoc | Required for API methods (exemptions: @Override, @Test, @Before, @After, @BeforeClass, @AfterClass, @Parameterized, @Parameters, @Bean) |
| Braces | Required for all if/else/for/while/do-while blocks, even single-line |
| Switch | Must have default case; fall-through must be commented |
| Naming | camelCase for methods/variables, PascalCase for classes, UPPER_SNAKE_CASE for constants |
| Abbreviations | Max 1 consecutive capital letter in names (exception: VO) |
License Header
Every new source file must include the Apache License 2.0 header. CI enforces this via apache-rat:check.
/*
* Copyright 1999-${year} Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/API Standards
Nacos v3 APIs follow strict conventions. AI agents must comply with these standards when generating controller code.
Authoritative API and SDK specs live under specs/.
Before coding any API, SDK, plugin, storage, runtime, or domain change, AI
agents MUST consult the relevant specs below. If the intended behavior
differs from the existing spec, do not silently implement the code first:
discuss the change with maintainers and update the affected specs as part of
the design. For broad or uncertain changes, submit a spec/design PR first so
the contract is reviewed before implementation.
English:
- Design foundation: Nacos Design Spec, Resource Model Spec, Compatibility And Deprecation Spec, Foundation Capabilities Spec, Server Lifecycle And Environment Configuration Spec, Cluster Membership Spec, Remote Connection Lifecycle Spec, Request Filtering And Runtime Context Spec, Internal RPC And Cluster Request Spec, AP Consistency Spec, CP Consistency Spec, Persistence And Dump Spec, Task Execution Spec, Event Dispatch And NotifyCenter Spec, Observability Hooks Spec, Core Capabilities Spec
- Interface model: HTTP API Spec, Authorization Spec, Response And Error Spec, V3 API Surface, gRPC API Spec, SDK Spec, Java SDK Implementation Spec, Client Runtime Spec, Client Connection And Failover Spec, Client Ability Negotiation Spec, Client Local Cache And Redo Spec, Runtime Push And Reconnect Spec
- Domain model: Config Spec, Config Resource Spec, Config Publish And Query Spec, Config Listener And Watch Spec, Config Gray Release Spec, Config Persistence And History Spec, Config Consistency, Dump, And Visibility Spec, Config Capacity And Ops Spec, Naming Spec, Naming Resource Spec, Naming Instance Lifecycle Spec, Naming Discovery And Subscription Spec, Naming Health And Protection Spec, Naming Metadata And Selector Spec, Naming Consistency And Client State Spec, Naming Ephemeral Distro Consistency Spec, Naming Persistent CP Consistency Spec, Naming Ops Spec, AI Registry Spec, AI Resource Model Spec, AI Resource Lifecycle Spec, AI Registry Adaptor Spec, Agent Management Spec, Remote Agent Discovery Protocol Spec, Agent API Spec, Agent Storage Spec, MCP Server Spec, A2A Agent Spec, Prompt Spec, Skill Spec, AgentSpec Spec, Core Operations Spec, Console Spec, Distributed Lock Spec
- Extension model: Integration And Adapter Spec, Plugin Specs
- Security model: Auth And Permission Spec, Auth Plugin Spec, RAM Auth Plugin Spec, OIDC Auth Plugin Spec, Visibility Plugin Spec, Default Auth Plugin Implementation Spec
- Testing model: API Integration Test Spec, Java SDK Integration Test Spec
- Shared schemas: JSON Schema Index
Simplified Chinese:
- 设计基础: Nacos 设计规范, 资源模型规范, 兼容与废弃策略规范, 基础能力规范, 服务端生命周期与环境配置规范, 集群成员规范, 远程连接生命周期规范, 请求过滤与运行时上下文规范, 内部 RPC 与集群请求规范, AP 一致性规范, CP 一致性规范, 持久化与 Dump 规范, 任务执行规范, 事件分发与 NotifyCenter 规范, 可观测钩子规范, 核心功能规范
- 接口模型: HTTP API 规范, 鉴权规范, 响应与错误规范, V3 API 范围, gRPC API 规范, SDK 规范, Java SDK 实现规范, 客户端运行时规范, 客户端连接与故障切换规范, 客户端能力协商规范, 客户端本地缓存与 Redo 规范, 运行时推送与重连规范
- 领域模型: Config 规范, Config 资源规范, Config 发布与查询规范, Config 监听与 Watch 规范, Config 灰度发布规范, Config 持久化与历史规范, Config 一致性、Dump 与可见性规范, Config 容量与运维规范, Naming 规范, Naming 资源规范, Naming 实例生命周期规范, Naming 发现与订阅规范, Naming 健康检查与保护规范, Naming 元数据与 Selector 规范, Naming 一致性与客户端状态规范, Naming 临时服务 Distro 一致性规范, Naming 持久服务 CP 一致性规范, Naming 运维规范, AI Registry 规范, AI 资源模型规范, AI 资源生命周期规范, AI Registry 适配器规范, Agent 管理规范, Remote Agent Discovery 协议规范, Agent API 规范, Agent 存储规范, MCP Server 规范, A2A Agent 规范, Prompt 规范, Skill 规范, AgentSpec 规范, Core 运维规范, Console 规范, 分布式锁规范
- 扩展模型: 集成与适配器规范, 插件规范
- 安全模型: 鉴权与权限规范, 鉴权插件规范, RAM 鉴权插件规范, OIDC 鉴权插件规范, 可见性插件规范, 默认鉴权插件实现规范
- 测试模型: API 集成测试规范, Java SDK 集成测试规范
- 共享 Schema: JSON Schema 索引
This section is a quick implementation checklist for agents. If it conflicts with the specs, follow the specs and update this checklist.
URL Path Patterns
| API Type | Base Path | Purpose | Example |
| Open API | /v3/client/{module}/... | Client-facing operations | /v3/client/ns/instance |
| Admin API | /v3/admin/{module}/... | Administrative operations | /v3/admin/ns/service |
| Console API | /v3/console/{module}/... | Web console operations | /v3/console/cs/config |
| Auth API | /v3/auth/{resource}/... | Plugin-provided auth operations | /v3/auth/user |
Module Names
| Module | Abbreviation | Scope |
| Config Service | cs | Configuration management |
| Naming Service | ns | Service discovery |
| Core | core | Cluster, namespace management |
| AI | ai | AI resource management |
| Plugin | plugin | Plugin management |
Note: Auth APIs (
/v3/auth/user,/v3/auth/role,/v3/auth/permission) are defined inplugin-default-implmodule, not in core.
HTTP Method Semantics
| Method | Usage | Idempotent |
GET | Query / Retrieve | Yes |
POST | Create / Register | No |
PUT | Update / Modify | Yes |
DELETE | Remove / Deregister | Yes |
Response Format
Always wrap responses in com.alibaba.nacos.api.model.v2.Result<T>:
{
"code": 0,
"message": "success",
"data": { }
}Authentication
Always add @Secured annotation (com.alibaba.nacos.auth.annotation.Secured):
@Secured(action = ActionTypes.READ, // READ or WRITE
signType = SignType.CONFIG, // CONFIG, NAMING, or CONSOLE
apiType = ApiType.ADMIN_API) // OPEN_API, ADMIN_API, or CONSOLE_APIAPI Integration Tests
For every HTTP API addition, modification, deletion, or deprecation, handle
test/openapi-test before the API change is considered complete:
- Read the affected controller, form/request model, validators, service path, response model, exception handling, and matching specs.
- Build or update the scenario matrix for expected capability, boundary/validation behavior, and exception/error handling.
- Add, update, or remove API IT cases for the changed contract. The goal is API scenario coverage, not line or branch coverage.
- Update
test/openapi-test/API_TEST_COVERAGE.mdand the matching*_API_TEST_SCENARIOS.mddocument. - If the functional success path is hard to exercise in standalone IT, at least cover boundary and error scenarios and document the uncovered path.
Java SDK Integration Tests
For every Java SDK public contract change, handle test/java-sdk-test before
the SDK change is considered complete:
- Read the public interface, implementation, request/response model, listener path, lifecycle code, exception mapping, and matching SDK/client specs.
- Build or update the scenario matrix for factory/lifecycle behavior, expected capability, boundary/validation behavior, listener/subscription behavior, and exception handling.
- Add, update, or remove Java SDK IT cases for the changed SDK contract. Assert SDK return values, callbacks, remote side effects, and typed exceptions.
- Update
test/java-sdk-test/JAVA_SDK_IT_COVERAGE.md. - Keep SDK ITs as external-client tests against a standalone Nacos server; do not start Spring or Nacos inside the test class.
Controller Example
import com.alibaba.nacos.api.model.v2.Result;
import com.alibaba.nacos.auth.annotation.Secured;
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
import com.alibaba.nacos.plugin.auth.constant.SignType;
import com.alibaba.nacos.api.common.ApiType;
@RestController
@RequestMapping("/v3/admin/ns/service")
public class ServiceControllerV3 {
@PostMapping
@Secured(action = ActionTypes.WRITE, apiType = ApiType.ADMIN_API)
public Result<String> create(ServiceForm serviceForm) throws Exception {
serviceForm.validate();
// business logic ...
return Result.success("ok");
}
@GetMapping("/list")
@Secured(action = ActionTypes.READ, apiType = ApiType.ADMIN_API)
public Result<Page<ServiceDetailInfo>> list(ServiceListForm serviceListForm) throws NacosException {
serviceListForm.validate();
// business logic ...
return Result.success(result);
}
}Java Version Targeting
- Server modules (config, naming, core, console, etc.): Java 17+
- Client/API/Plugin modules (api, client, plugin): Java 8+ — ensure backwards compatibility when modifying
PR Convention
All PRs must target the develop branch. Follow the PR template.
Title format: [ISSUE #14122] Add JVM --add-opens options for JDK 17+ compatibility
Pre-submission checklist:
mvn -B clean compile apache-rat:check checkstyle:check spotbugs:check spotless:check -DskipTests
mvn clean install
mvn clean test-compile failsafe:integration-testSecurity Vulnerabilities
Do NOT report security vulnerabilities via GitHub Issues. Use ASRC (Alibaba Security Response Center) instead.
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.

