From a537dadc59a881f296ffee66ad2bffbb6899d650 Mon Sep 17 00:00:00 2001 From: Gunju Kim Date: Sat, 7 Mar 2026 18:06:28 +0000 Subject: [PATCH] Add agent conventions from recent PR review feedback Add three new project-level rules based on recurring review patterns: - Stay within scope: agents must not modify files outside stated task - Use typed constants: Go tests must use typed constants not strings - Keep docs in sync: update related docs in same PR as config changes Add YAML indentation warning to kelos-config-update and kelos-self-update prompts to prevent literal block scalar breakage. Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 3 +++ self-development/agentconfig.yaml | 3 +++ self-development/kelos-config-update.yaml | 1 + self-development/kelos-self-update.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 51eea5be..b2818712 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,8 +3,11 @@ ## Rules for AI Assistants - **Use Makefile targets** instead of discovering build/test commands yourself. - **Keep changes minimal.** Do not refactor, reorganize, or 'improve' code beyond what was explicitly requested. +- **Stay within scope.** Only modify what the task explicitly asks for. Do not make changes to files or components outside the stated scope, even if they seem related. - **For CI/release workflows**, always use existing Makefile targets rather than reimplementing build logic in YAML. - **Better tests.** Always try to add or improve tests(including integration, e2e) when modifying code. +- **Use typed constants.** In Go tests, always use typed constants (e.g., `batchv1.PodFailurePolicyActionCount`) instead of string literals (e.g., `"Count"`). This ensures compile-time checking and consistency with production code. +- **Keep docs in sync.** When modifying configuration or removing/adding features, update related documentation (e.g., README files) in the same PR. - **Logging conventions.** Start log messages with capital letters and do not end with punctuation. - **Commit messages.** Do not include PR links in commit messages. diff --git a/self-development/agentconfig.yaml b/self-development/agentconfig.yaml index 82b9237e..57b1a095 100644 --- a/self-development/agentconfig.yaml +++ b/self-development/agentconfig.yaml @@ -19,6 +19,7 @@ spec: ## Standards - Do not create duplicate issues — check existing issues first with `gh issue list` - Keep changes minimal and focused + - Stay within the stated scope of the task — do not modify files or components outside what was explicitly requested ## Project Conventions - Use Makefile targets instead of discovering build/test commands yourself: @@ -28,5 +29,7 @@ spec: - `make test-integration` — run integration tests - `make build` — build binary - Always try to add or improve tests when modifying code + - In Go tests, use typed constants (e.g., `batchv1.PodFailurePolicyActionCount`) instead of string literals + - When modifying configuration or features, update related documentation (e.g., README) in the same PR - Logging conventions: start log messages with capital letters and do not end with punctuation - Commit messages: do not include PR links in commit messages diff --git a/self-development/kelos-config-update.yaml b/self-development/kelos-config-update.yaml index 44cf1cc1..eb9b9626 100644 --- a/self-development/kelos-config-update.yaml +++ b/self-development/kelos-config-update.yaml @@ -85,4 +85,5 @@ spec: - Do not create a PR if no actionable changes are found — exit cleanly instead - Do not create duplicate issues — check existing issues first with `gh issue list` - Back every change with a specific reference to the PR review that motivated it + - When editing YAML files with `promptTemplate: |` (literal block scalars), ensure all content lines maintain the correct indentation level (typically 6 spaces for content inside a 4-space-indented key). Lines with insufficient indentation will exit the block scalar and break YAML parsing pollInterval: 1m diff --git a/self-development/kelos-self-update.yaml b/self-development/kelos-self-update.yaml index 56d464fd..96d78696 100644 --- a/self-development/kelos-self-update.yaml +++ b/self-development/kelos-self-update.yaml @@ -82,5 +82,6 @@ spec: - Strategic proposals, new use cases, integrations, CRD extensions → kelos-fake-strategist - Documentation, CLI UX, error messages → kelos-fake-user - Agent configuration based on PR reviews → kelos-config-update + - When editing or proposing changes to YAML files with `promptTemplate: |` (literal block scalars), ensure all content lines maintain the correct indentation level (typically 6 spaces for content inside a 4-space-indented key). Lines with insufficient indentation will exit the block scalar and break YAML parsing - If after review you find nothing actionable to improve, exit without creating an issue or PR. Not every run needs to produce output pollInterval: 1m