chore: Add agentic coding tooling

This commit is contained in:
Flo
2026-03-30 13:39:40 +02:00
parent 2a5302388e
commit 078d55982b
40 changed files with 2131 additions and 0 deletions

53
.crosslink/rules/odin.md Normal file
View File

@@ -0,0 +1,53 @@
### Odin Best Practices
#### Code Style
- Follow Odin naming conventions
- Use `snake_case` for procedures and variables
- Use `Pascal_Case` for types
- Prefer explicit over implicit
```odin
// GOOD: Clear Odin code
User :: struct {
id: string,
name: string,
}
find_user :: proc(id: string) -> (User, bool) {
user, found := repository[id]
return user, found
}
```
#### Error Handling
- Use multiple return values for errors
- Use `or_return` for early returns
- Create explicit error types when needed
```odin
// GOOD: Explicit error handling
Config_Error :: enum {
File_Not_Found,
Parse_Error,
}
load_config :: proc(path: string) -> (Config, Config_Error) {
data, ok := os.read_entire_file(path)
if !ok {
return {}, .File_Not_Found
}
defer delete(data)
config, parse_ok := parse_config(data)
if !parse_ok {
return {}, .Parse_Error
}
return config, nil
}
```
#### Memory Management
- Use explicit allocators
- Prefer temp allocator for short-lived allocations
- Use `defer` for cleanup
- Be explicit about ownership