docs: add session git branching and no-build directive to AGENTS.md
This commit is contained in:
@@ -4,7 +4,9 @@ This document serves as the primary technical specification, architecture refere
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 0. Mandatory Agent Rule: All Values Must Be Configurable via YAML
|
## 0. Mandatory Agent Rules
|
||||||
|
|
||||||
|
### 0.1 All Values Must Be Configurable via YAML
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> **Strict Agent Directive:** All gameplay values, numeric parameters, costs, multipliers, initial statistics, thresholds, ratios, yields, and game limits mentioned by the user MUST be implemented as configurable parameters loaded from YAML files (in the `config/` directory) rather than being hardcoded in C++ code.
|
> **Strict Agent Directive:** All gameplay values, numeric parameters, costs, multipliers, initial statistics, thresholds, ratios, yields, and game limits mentioned by the user MUST be implemented as configurable parameters loaded from YAML files (in the `config/` directory) rather than being hardcoded in C++ code.
|
||||||
@@ -12,6 +14,25 @@ This document serves as the primary technical specification, architecture refere
|
|||||||
> - Default values in C++ must only serve as fallbacks if the YAML key is absent.
|
> - Default values in C++ must only serve as fallbacks if the YAML key is absent.
|
||||||
> - Keep configurations modular (e.g. `config/city.yaml`, `config/terrain_yields.yaml`, `config/game.yaml`, `config/units/*.yaml`).
|
> - Keep configurations modular (e.g. `config/city.yaml`, `config/terrain_yields.yaml`, `config/game.yaml`, `config/units/*.yaml`).
|
||||||
|
|
||||||
|
### 0.2 English Language & Externalized UI Text (Localization)
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Strict Agent Directive:** Everything in the application must be in English.
|
||||||
|
> - **Language Requirement:** All source code, identifiers, variable and class names, comments, documentation, and user-facing text MUST be written in English.
|
||||||
|
> - **External UI String Catalog:** Any text, label, prompt, message, tooltip, menu item, dialog, or UI notification displayed on the screen MUST NOT be hardcoded in C++ source files.
|
||||||
|
> - **File-based Translations:** Screen texts must be loaded dynamically from a designated external string/localization file (e.g. `config/strings_en.yaml` or `config/localization/en.yaml`) containing the English translations/texts.
|
||||||
|
> - **Key-Based Lookup:** Code must reference screen texts exclusively by localization keys (e.g. `localization.get("ui.button.found_city")` or equivalent lookup) resolving to the external file.
|
||||||
|
> - Whenever new on-screen text is introduced, add its English translation entry to the external string file first before referencing its key in code.
|
||||||
|
|
||||||
|
### 0.3 Session Git Branching & No-Build Directive
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Strict Agent Directive:** Every session must adhere to an isolated Git workflow and never build the project.
|
||||||
|
> - **Dedicated Session Branch:** Every session MUST work on its own git branch.
|
||||||
|
> - **Automatic Branch Creation:** If a session does not have its own branch yet upon starting, the agent MUST generate an appropriate branch name (e.g. `session/<topic-or-task>`) and check it out immediately (`git checkout -b <branch-name>`).
|
||||||
|
> - **Do NOT Build the Application:** The agent MUST NOT compile or build the application (never run `make`, `qmake`, `cmake`, `ninja`, compiler invocations, or build scripts). Compiling and running the application is strictly left to the user.
|
||||||
|
> - **Immediate Commits:** After making any change/edit to the project, the agent MUST immediately commit the changes to its current session branch with a clear and concise commit message (`git add <files>` and `git commit -m "..."`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Project Vision & Core Concept
|
## 1. Project Vision & Core Concept
|
||||||
@@ -243,3 +264,4 @@ AI opponents must operate through a hierarchical decision architecture:
|
|||||||
- With 37,500 hexes, avoid iterating all hexes every frame. Use spatial partitioning or chunking for unit queries.
|
- With 37,500 hexes, avoid iterating all hexes every frame. Use spatial partitioning or chunking for unit queries.
|
||||||
- Batch unit rendering using instanced OpenGL draw calls (`glDrawArraysInstanced` or `glDrawElementsInstanced`).
|
- Batch unit rendering using instanced OpenGL draw calls (`glDrawArraysInstanced` or `glDrawElementsInstanced`).
|
||||||
- **Math Consistency:** Always use `terrain.h` helper functions (`getHexNeighbor`, `getHexEdgeMidpoint`, `LOD_0_SIZE_Y`) to maintain consistent geometry and alignment with the terrain mesh.
|
- **Math Consistency:** Always use `terrain.h` helper functions (`getHexNeighbor`, `getHexEdgeMidpoint`, `LOD_0_SIZE_Y`) to maintain consistent geometry and alignment with the terrain mesh.
|
||||||
|
- **Language & Localization:** English only across the entire codebase and UI. Never hardcode screen display text in C++; always retrieve English strings from the external localization file (`config/strings_en.yaml`).
|
||||||
|
|||||||
Reference in New Issue
Block a user