Skip to content

Commit acead52

Browse files
authored
improve: add documentation guidline for agents (#3339)
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent b0a38f2 commit acead52

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ target/
1717
.aider*
1818

1919
docs/content/en/docs/testindex/
20+
.claude/

AGENTS.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,37 @@ public class ConfigMapDependent extends CRUDKubernetesDependentResource<ConfigMa
188188
- Reference issues in commit messages when applicable
189189
- Ensure CI checks pass (format, license, tests)
190190

191+
### Documentation Update
192+
193+
When implementing features or making code changes, always evaluate whether the change affects user-facing behavior that should be documented. If so, update the documentation as part of the same change.
194+
195+
#### Documentation Location
196+
197+
Documentation is a Hugo/Docsy site at `docs/content/en/docs/`:
198+
199+
- `documentation/` — core feature docs (reconciler, eventing, error handling, caches, rate limiting, testing, features)
200+
- `documentation/dependent-resource-and-workflows/` — dependent resources and workflows
201+
- `documentation/operations/` — operational concerns (config, metrics, logging, health probes, leader election, helm)
202+
- `getting-started/` — introductory guides and best practices
203+
- `migration/` — version migration guides
204+
- `faq/` — frequently asked questions
205+
206+
#### Behavior
207+
208+
1. Skip if not relevant — internal refactors, test-only changes, and build tooling changes typically do not need doc updates.
209+
2. After implementing a code change, check if it introduces, modifies, or removes user-facing behavior.
210+
3. Search the docs for pages covering the affected functionality.
211+
4. Update existing pages or add new sections to reflect the change.
212+
213+
214+
#### Guidelines
215+
216+
- Match the tone and style of the existing documentation
217+
- Prefer adding code snippets
218+
- Keep explanations concise with code examples where helpful
219+
- If a change introduces a new feature, consider whether it belongs in an existing page or warrants a new one
220+
- For breaking changes, also update the relevant migration guide under `migration/`
221+
191222
## Common Issues and Solutions
192223

193224
### Build Issues
@@ -209,7 +240,6 @@ public class ConfigMapDependent extends CRUDKubernetesDependentResource<ConfigMa
209240
- **Discord:** https://discord.gg/DacEhAy
210241
- **Fabric8 Client:** https://github.com/fabric8io/kubernetes-client
211242

212-
213243
## Additional Notes for AI Agents
214244

215245
- The codebase makes extensive use of Java generics for type safety

docs/content/en/docs/documentation/reconciler.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ typically instructs the framework to remove the finalizer after the dependent
9898
resource are cleaned up in `cleanup` implementation.
9999

100100
```java
101-
public DeleteControl cleanup(MyCustomResource customResource,Context context){
101+
public DeleteControl cleanup(MyCustomResource customResource,Context context) {
102102
// omitted code
103103

104-
return DeleteControl.defaultDelete();
104+
return DeleteControl.defaultDelete();
105105
}
106106
```
107107

0 commit comments

Comments
 (0)