From 3c9e58f324931ec4837f4d8aed6e5b87b7009296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 2 Nov 2026 11:03:43 +0400 Subject: [PATCH] Update AGENTS.md --- AGENTS.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a9d2989..530141d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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/` 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`. \ No newline at end of file +4. **Secret Handling**: Avoid hardcoding passwords or API keys in recipes or roles. Assume sensitive information is managed via Chef `data_bags`.