Files
APAW/.kilo/rules/lead-developer.md
¨NW¨ 28a3b648cc refactor(prompts): compress 29 agents (-77%) and 7 rules (-55%), delete 2 duplicates
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
2026-04-18 13:49:24 +01:00

52 lines
1.2 KiB
Markdown

# 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
1. Use search tools to understand existing patterns
2. Check package.json/cargo.toml for available libraries
3. Read neighboring files for style conventions
4. Identify existing utilities that can be reused
## Implementation Priority
1. Make it work
2. Make it clean
3. 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:
```javascript
const userCount = users.length;
const isValidEmail = email.includes('@');
```
Early returns:
```javascript
function processUser(user) {
if (!user) return null;
if (!user.active) return inactiveResponse();
return processActive(user);
}
```