@cryptotaxi247 / netdata-1 / commits / 632658a7d

chore: bootstrap repo for cross-tool AI agent compatibility (#22295)

Establishes AGENTS.md as the cross-tool canonical instruction file at the repo root, with CLAUDE.md and GEMINI.md as relative symlinks for agents that don't read AGENTS.md natively. - AGENTS.md (renamed from CLAUDE.md): adds tool-agnostic intro - CLAUDE.md: regular file -> relative symlink to AGENTS.md - GEMINI.md: new relative symlink to AGENTS.md - .agents/skills/: new directory for cross-tool project skills (with .gitkeep) - .claude/skills: relative symlink to ../.agents/skills - .gitignore: ignore /.env and **/AGENTS.local.md (private overrides) Existing src/go/ and src/go/plugin/ibm.d/ subdirs were already in target state and are unchanged.

Costa Tsaousis committed Apr 27, 2026 at 17:44 UTC 632658a7d8bf2c8d8ad9078d1f676506a55765a5
7 files changed +56 -49
.agents/skills/.gitkeep
.claude/skills new
+1
@@ -0,0 +1 @@
1 +../.agents/skills
\ No newline at end of file
.gitignore
+4
@@ -1,5 +1,9 @@
1 # Secrets
2 gcs-credentials.json
3 +/.env
4 +
5 +# Cross-tool AI agent private overrides (per-user, not for sharing)
6 +**/AGENTS.local.md
7
8 .deps
9 .libs
AGENTS.md new
+49
@@ -0,0 +1,49 @@
1 +# AGENTS.md
2 +
3 +This file provides guidance to AI coding agents (Claude Code, Codex CLI, Gemini CLI, Opencode, Qwen-code, Crush, and others) working with code in this repository. The repo-root `CLAUDE.md` and `GEMINI.md` are relative symlinks to this file so every tool reads the same instructions.
4 +
5 +THE MOST IMPORTANT RULES ARE:
6 +
7 +1. You MUST ALWAYS find the root cause of a problem, before giving a solution.
8 +2. Patching without understanding the problem IS NOT ALLOWED.
9 +3. Before patching code, we MUST understand the code base and the potential implications of our changes.
10 +4. We do not duplicate code. We first check if similar code already exists and to reuse it.
11 +
12 +## Collector Consistency Requirements
13 +
14 +When working on collectors (especially Go collectors), ALL of the following files MUST be kept in sync before creating a PR:
15 +
16 +1. **The code** - All .go files implementing the collector
17 +2. **metadata.yaml** - Proper information for the Netdata integrations page, including:
18 + - Metric descriptions with correct units
19 + - Alert definitions
20 + - Setup instructions
21 + - Configuration examples
22 +3. **config_schema.json** - Schema for dynamic configuration in the dashboard
23 +4. **Stock config file** (.conf file) - Example configuration users edit manually
24 +5. **Health alerts** (health.d/*.conf) - Alert definitions for the collector metrics
25 +6. **README.md** - Comprehensive documentation describing:
26 + - What the collector monitors
27 + - How it works
28 + - Configuration options
29 + - Troubleshooting
30 +
31 +These files MUST be consistent with each other. For example:
32 +- If units change in code, they MUST be updated in metadata.yaml
33 +- If new metrics are added, they MUST be documented in metadata.yaml and README.md
34 +- If configuration options change, they MUST be updated in config_schema.json, stock config, and documentation
35 +
36 +## C code
37 +- gcc, clang, glibc and muslc
38 +- libnetdata.h includes everything in libnetdata (just a couple of exceptions) so there is no need to include individual libnetdata headers
39 +- Functions with 'z' suffix (mallocz, reallocz, callocz, strdupz, etc.) handle allocation failures automatically by calling fatal() to exit Netdata
40 +- The freez() function accepts NULL pointers without crashing
41 +- Resuable, generic, module agnostic code, goes to libnetdata
42 +- Double linked lists are managed with DOUBLE_LINKED_LIST_* macros
43 +- json-c for json parsing
44 +- buffer_json_* for manual json generation
45 +
46 +## Naming Conventions
47 +- "Netdata Agent" (capitalized) when referring to the product
48 +- "`netdata`" (lowercase, code-formatted) when referring to the process
49 +- See DICTIONARY.md for precise terminology
CLAUDE.md deleted
-49
@@ -1,49 +0,0 @@
1 -# CLAUDE.md
2 -
3 -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4 -
5 -THE MOST IMPORTANT RULES ARE:
6 -
7 -1. You MUST ALWAYS find the root cause of a problem, before giving a solution.
8 -2. Patching without understanding the problem IS NOT ALLOWED.
9 -3. Before patching code, we MUST understand the code base and the potential implications of our changes.
10 -4. We do not duplicate code. We first check if similar code already exists and to reuse it.
11 -
12 -## Collector Consistency Requirements
13 -
14 -When working on collectors (especially Go collectors), ALL of the following files MUST be kept in sync before creating a PR:
15 -
16 -1. **The code** - All .go files implementing the collector
17 -2. **metadata.yaml** - Proper information for the Netdata integrations page, including:
18 - - Metric descriptions with correct units
19 - - Alert definitions
20 - - Setup instructions
21 - - Configuration examples
22 -3. **config_schema.json** - Schema for dynamic configuration in the dashboard
23 -4. **Stock config file** (.conf file) - Example configuration users edit manually
24 -5. **Health alerts** (health.d/*.conf) - Alert definitions for the collector metrics
25 -6. **README.md** - Comprehensive documentation describing:
26 - - What the collector monitors
27 - - How it works
28 - - Configuration options
29 - - Troubleshooting
30 -
31 -These files MUST be consistent with each other. For example:
32 -- If units change in code, they MUST be updated in metadata.yaml
33 -- If new metrics are added, they MUST be documented in metadata.yaml and README.md
34 -- If configuration options change, they MUST be updated in config_schema.json, stock config, and documentation
35 -
36 -## C code
37 -- gcc, clang, glibc and muslc
38 -- libnetdata.h includes everything in libnetdata (just a couple of exceptions) so there is no need to include individual libnetdata headers
39 -- Functions with 'z' suffix (mallocz, reallocz, callocz, strdupz, etc.) handle allocation failures automatically by calling fatal() to exit Netdata
40 -- The freez() function accepts NULL pointers without crashing
41 -- Resuable, generic, module agnostic code, goes to libnetdata
42 -- Double linked lists are managed with DOUBLE_LINKED_LIST_* macros
43 -- json-c for json parsing
44 -- buffer_json_* for manual json generation
45 -
46 -## Naming Conventions
47 -- "Netdata Agent" (capitalized) when referring to the product
48 -- "`netdata`" (lowercase, code-formatted) when referring to the process
49 -- See DICTIONARY.md for precise terminology
CLAUDE.md new
+1
@@ -0,0 +1 @@
1 +AGENTS.md
\ No newline at end of file
GEMINI.md new
+1
@@ -0,0 +1 @@
1 +AGENTS.md
\ No newline at end of file