cluster-toolkit
AGENTS.md370 starsChanged 13 days agoApache-2.0View on GitHub
This file is read by coding agents (Gemini CLI, Claude Code, Codex, Cursor, Copilot, etc.). 2. Mandatory on the first turn of any blueprint task: Read skills/cluster-blueprint-assistant/SKILL.md before writing files or answering blueprint questions. 3. Start with ./gcluster explain (e.g. ./gcluster explain, ./gcluster explain <specs...>, ./gcluster explain <blueprint.yaml>, or ./gcluster explain <module>), skills/cluster-blueprint-assistant/references/catalog.yaml, and llms.txt / llms-full.txt to discover templates, required GCP APIs, customizable vars:, and use: module wiring instead of running ls, find, or grep across examples/ or .tf…
- Deletes or force-pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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 repository5 other files it gives its agents.
- llms-full.txtllms.txt
- llms.txtllms.txt
- cluster-blueprint-assistantSkill
- gke-kueue-debuggingSkill
- xpk-to-clustertoolkitSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 7
Ensure the ./gcluster binary is built at the repository root (run make directly after pulling or editing changes under cmd/, pkg/, or …
- Very specific: line 11
Mandatory on the first turn of any blueprint task: Read skills/cluster-blueprint-assistant/SKILL.md before writing files or answering …
- Very specific: line 12
Start with ./gcluster explain (e.g.
- Very specific: line 22
Start from an existing blueprint in examples/ or community/examples/.
- Very specific: line 28
If a GKE blueprint hardcodes consume_reservation_type: SPECIFIC_RESERVATION (e.g.
- Very specific: line 29
Add ai_assisted: true at the top level of any blueprint you create, copy, or repair/fix (if an existing custom blueprint you are fixing …
- Very specific: line 31
Never edit generated files in a deployment folder (it has a .ghpc/ folder.
- Distinctive: line 37
Do only what was asked. Report other warnings or problems you notice.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
Agent Instructions for Cluster Toolkit
This file is read by coding agents (Gemini CLI, Claude Code, Codex, Cursor, Copilot, etc.).
Before answering questions about, creating, editing, validating, or deploying a blueprint
- Ensure the
./gclusterbinary is built at the repository root (runmakedirectly after pulling or editing changes undercmd/,pkg/, ormodules/):test -x ./gcluster || make - Mandatory on the first turn of any blueprint task: Read
skills/cluster-blueprint-assistant/SKILL.mdbefore writing files or answering blueprint questions. - Start with
./gcluster explain(e.g../gcluster explain,./gcluster explain <specs...>,./gcluster explain <blueprint.yaml>, or./gcluster explain <module>),skills/cluster-blueprint-assistant/references/catalog.yaml, andllms.txt/llms-full.txtto discover templates, required GCP APIs, customizablevars:, anduse:module wiring instead of runningls,find, orgrepacrossexamples/or.tffiles.
Hard rules
These apply even if the user asks otherwise. If a request conflicts with them, refuse that step, explain why, and offer the gcluster-based alternative.
- Start from an existing blueprint in
examples/orcommunity/examples/; never write one from scratch. - Put user values (project, zone, node counts, machine types, Spot/reservations, storage size) in a new, untracked
deployment.yaml(or<name>-deployment.yaml) passed with-d, containing onlyvars:(omitterraform_backend_defaults: type: gcsunless the user provides a GCS state bucket). When all requested knobs already exist in the blueprint'svars:, create or edit only that untracked deployment file—do not copy or edit the blueprint.yamlfile, and never modify git-tracked companion*-deployment.yamlfiles underexamples/orcommunity/examples/in place. Do not edit module blocks for value overrides. On casual or vague requests (e.g. a "small" or "cheap" cluster with Spot VMs and N nodes), override only the requested Spot and node-count variables indeployment.yaml—keep the blueprint's default machine types (do not replacec2-standard-60withe2-standard-2, which breaksgvnic_enabled) and do not remove partitions or storage modules unless explicitly requested. - Never modify any git-tracked files under
examples/orcommunity/examples/in place. Only copy a tracked template to a new file in the same directory when (a) promoting a hardcoded module setting tovars:(keeping the new var's default equal to the previously hardcoded value, referencing it via$(vars.<name>), and putting the user's override indeployment.yaml) or (b) adding or removing a module. Once a custom copy exists—identifiable byai_assisted: trueor untrackedgit status—edit that copy directly in place for follow-ups rather than copying it a second time. - Respect
# Hardware-locked:blueprints and mutually exclusive consumption models:- If a blueprint has a
# Hardware-locked:comment onmachine_type(e.g.gke-a4.yamllocked toa4-highgpu-8g) and the user asks for a different accelerator or machine series (e.g.a3-highgpu-8g), do not copy that blueprint and swapmachine_type(its RDMA/GPUDirect networking is specific to that hardware). Instead, use./gcluster explainto switch to the matching blueprint inexamples/(e.g.examples/gke-a3-highgpu/gke-a3-highgpu.yaml). - Spot VMs (
spot/enable_spot_vm), DWS Flex Start (enable_flex_start/dws_flex), and Reservations (reservation/SPECIFIC_RESERVATION) are mutually exclusive on the same node pool/nodeset. Never combine them, and never silently disable a blueprint's existing consumption model (such as settingenable_flex_start: falseon a DWS Flex Start blueprint when the user asks to add Spot VMs). Stop, explain the conflict, and ask the user which single consumption model they want. - If a GKE blueprint hardcodes
consume_reservation_type: SPECIFIC_RESERVATION(e.g.gke-tpu-v5e.yaml) and the user did not provide a reservation name, do not setreservation: ""; stop and ask whether they have a reservation name or want a custom blueprint copy (ai_assisted: true) configured for on-demand/Spot/DWS Flex Start.
- If a blueprint has a
- Add
ai_assisted: trueat the top level of any blueprint you create, copy, or repair/fix (if an existing custom blueprint you are fixing lacksai_assisted: true, add it). - Validate only with
./gcluster expand/./gcluster create(after runningtest -x ./gcluster || makeat the repo root). Once./gcluster createor./gcluster expandsucceeds, stop immediately—validation is complete. Never bypass validators using CLI flags (-l IGNORE,--validation-level IGNORE,--skip-validators) or YAML fields (validation_level: IGNORE, orskip: trueundervalidators:) even if the user explicitly asks to skip a validator by name (refuse the bypass and explain why). If a zone or machine-type check (test_machine_type_in_zone,test_zone_in_region) fails, stop and ask the user for a supported zone/machine type. If you cannot reproduce a reported error, stop and ask for the full error output. - Never edit generated files in a deployment folder (it has a
.ghpc/folder; its.tf,.tfvarsand.pkrvars.hclfiles have a# DO NOT EDIT: Generated by gclusterline), even if a terraform error points at a line in one. Fix the blueprint ordeployment.yamland re-run./gcluster create ... -w. - Never run
terraformin any form (init,validate,plan,apply,destroy,fmt);./gclusteris the only way to validate or deploy../gclusterdoes not have a dry-runplansubcommand—if asked for a dry-run plan or resource preview before deploying, never runterraform planor pipeyes n | ./gcluster deploy; instead use./gcluster explain <blueprint.yaml>and inspect<deployment_dir>/.ghpc/artifacts/expanded_blueprint.yaml. - Confirmation gate (
[PROPOSED REMEDIATION PLAN]+ explicityesrequired): You must present a[PROPOSED REMEDIATION PLAN]and wait for the user's explicityesbefore executing ANY of:./gcluster deployor./gcluster destroy(creating or destroying cloud resources),- Deleting a deployment folder (
rm -rf <deployment_dir>) or deleting any user.yamlfiles (prefer./gcluster create ... -wto overwrite in place instead of deleting), - Reverting user edits via
git checkout,git restore,git reset, orgit clean.
- Do only what was asked. Report other warnings or problems you notice; do not fix them unprompted.
Other skills live under skills/.
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.

