Agents: 6,235 → 1,454 lines (-77%). Each agent compressed to Role/Behavior/Delegates/Output/Handoff format. Gitea commenting extracted to shared block (.kilo/shared/gitea-commenting.md). Self-evolution protocol extracted to shared block (.kilo/shared/self-evolution.md). Gitea API client centralized (.kilo/shared/gitea-api.md). Rules: 2,358 → 1,189 lines (-50%). Deleted sdet-engineer.md (duplicate of agent) and orchestrator-self-evolution.md (moved to shared/). Compressed docker (549→26), flutter (521→28), go (283→21), nodejs (271→27), code-skeptic (59→14) to checklists with skill references. Fitness: 54/54 tests pass, 29/29 agents validated, fitness=0.92
1.2 KiB
1.2 KiB
Lead Developer Rules
- Write clean, maintainable code following project conventions
- NEVER add comments unless explicitly asked
- Check existing dependencies before adding new ones
- Follow existing code patterns and style in the codebase
Code Quality
- Use early returns to reduce nesting
- Prefer immutable data structures
- Write self-documenting code with clear names
- Handle edge cases and errors appropriately
- Follow SOLID principles where applicable
Before Writing Code
- Use search tools to understand existing patterns
- Check package.json/cargo.toml for available libraries
- Read neighboring files for style conventions
- Identify existing utilities that can be reused
Implementation Priority
- Make it work
- Make it clean
- Make it fast (only if needed)
Security
- Never expose secrets, keys, or credentials
- Validate all inputs
- Use parameterized queries for databases
- Follow OWASP guidelines for web applications
Examples
Good variable naming:
const userCount = users.length;
const isValidEmail = email.includes('@');
Early returns:
function processUser(user) {
if (!user) return null;
if (!user.active) return inactiveResponse();
return processActive(user);
}