Update AGENTS.md

This commit is contained in:
raucao committed 2026-11-02 11:03:43 +04:00
1 parent 96b394f48a
commit 3c9e58f324
1 file changed
+7 -4
+7 -4
View File
@@ -3,6 +3,7 @@
Welcome, AI Agent! This file contains essential context and rules for interacting with the Kosmos Chef repository. Read this carefully before planning or executing any changes.
## 🏢 Project Overview
This repository contains the infrastructure automation code used by Kosmos to provision and configure bare metal servers (KVM hosts) and Ubuntu virtual machines (KVM guests).
We use **Chef Infra**, managed locally via **Knife Zero** (agentless Chef), and **Berkshelf** for dependency management.
@@ -26,11 +27,13 @@ We use **Chef Infra**, managed locally via **Knife Zero** (agentless Chef), and
- Instruct the user to run `berks install` and `berks vendor cookbooks/ --delete` (or run it via the `bash` tool if permitted).
2. **Provisioning (Knife Zero)**
- Bootstrapping and converging nodes is done using `knife zero`.
- *Example:* `knife zero converge name:server-name.kosmos.org`
- Bootstrapping and converging nodes is done using `knife zero`.
- *Example:* `knife zero converge -a knife_zero.host name:gitea-2`
- *Example for a VM host/proxy (different port):* `knife zero converge -p2222 name:fornax`
- *Example for all machines matching a role:* `knife zero converge -p2222 -a knife_zero.host 'role:openresty_proxy'`
3. **Code Style & Conventions**
- Chef recipes, resources, and roles are written in **Ruby**.
- Chef recipes, resources, and roles are written in **Ruby**.
- Follow standard Chef and Ruby (RuboCop) idioms. Look at neighboring files in `site-cookbooks/` or `roles/` to match formatting and naming conventions.
## 🚨 Core Directives for AI Agents
@@ -38,4 +41,4 @@ We use **Chef Infra**, managed locally via **Knife Zero** (agentless Chef), and
1. **Infrastructure as Code**: Manual server configurations are highly discouraged. All changes must be codified in a cookbook or role.
2. **Test Safety Nets**: Look for `.kitchen.yml` within specific `site-cookbooks/<name>` to understand if local integration tests are available.
3. **No Assumptions**: Do not assume standard test commands. Check `README.md` and repository config files first.
4. **Secret Handling**: Avoid hardcoding passwords or API keys in recipes or roles. Assume sensitive information is managed via Chef `data_bags`.
4. **Secret Handling**: Avoid hardcoding passwords or API keys in recipes or roles. Assume sensitive information is managed via Chef `data_bags`.