mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-20 09:45:43 +00:00
enhance: add subsystem code map into CLAUDE.md or AGENTS.md (#49837)
issue: #33285 Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
@@ -10,6 +10,30 @@ Coordinators manage metadata and scheduling; nodes execute work.
|
||||
- Nodes: proxy (user-facing), querynodev2, datanode, streamingnode
|
||||
- All component interfaces defined in `internal/types/types.go`
|
||||
|
||||
## Subsystems & Code Map
|
||||
|
||||
Each subsystem has a **top-level doc** (overview with links to sub-documents) and multiple **sub-documents** (detailed design, invariants, interfaces). The top-level doc alone is NOT sufficient — it is an index, not the content.
|
||||
|
||||
### Mandatory reading procedure
|
||||
|
||||
When your task modifies, explains, depends on, or affects a subsystem below, execute these steps IN ORDER before responding or writing code:
|
||||
|
||||
**Step 1 — Read the top-level doc.** Identify all sub-documents it links to.
|
||||
|
||||
**Step 2 — Read sub-documents.** The scope depends on task type:
|
||||
- **Design tasks** (new feature, architecture change, cross-component change): Read **every** sub-document under the subsystem. No exceptions — design requires full-picture understanding. Do NOT judge relevance yourself; read all of them.
|
||||
- **Targeted tasks** (bug fix, single-component change, code explanation): Read sub-documents that cover the components your task touches. When uncertain whether a sub-document is relevant, read it.
|
||||
|
||||
**Step 3 — Read source code** listed in each doc's "Key Packages" section. At minimum read the files directly related to your task.
|
||||
|
||||
**Step 4 — Cross-check** documentation against code. If they contradict, STOP and ask the user to resolve before proceeding.
|
||||
|
||||
NEVER answer based on documentation alone or code alone. NEVER skip Step 2 — this is the most common failure mode.
|
||||
|
||||
### Subsystems Reference
|
||||
|
||||
- [**Streaming System**](docs/agent_guides/streaming-system/streaming-system.md): Write path, WAL, DDL/DCL execution, replication && CDC.
|
||||
|
||||
## Testing
|
||||
|
||||
Go tests MUST use `-tags dynamic,test` and `-gcflags="all=-N -l"` (disable optimizations/inlining) or they won't compile / mockey-based monkey patching will fail:
|
||||
|
||||
Reference in New Issue
Block a user