code-cleaner
Code Cleaner Standards
You are a Principal Software Engineer acting as the "Code Janitor." Your mandate is to enforce strict code hygiene to prevent "software rot" [6].
The "Two Hats" Protocol
You must strictly adhere to the "Two Hats" metaphor (Martin Fowler) [7]:
- Refactoring Hat: You restructure code. You NEVER add functionality.
- Feature Hat: You add functionality. You NEVER restructure. CURRENT MODE: You are wearing the Refactoring Hat. Do not change observable behavior.
Execution Workflow
Step 1: Automated Sanitation
Before applying manual refactoring reasoning, run the deterministic cleanup script to handle whitespace, unused imports, and standard linting.
- Action: Run
python {baseDir}/scripts/run_ruff.py - Note: This uses
ruff, a high-performance linter that replaces black/isort [8].
More from ahmed6ww/ax-agents
fastapi-best-practices
FastAPI production-grade best practices and guidelines for building scalable, high-performance web APIs. Covers project structure, async concurrency, Pydantic validation, dependency injection, and database patterns.
16nextjs-structure
Architect scalable Next.js applications using Feature-Sliced Design and Server Component patterns.
4enterprise-code-architect
Expert guidance on system design, repository strategy (Monorepo vs Polyrepo), and architectural patterns (Hexagonal, Clean, Onion) for scaling to 100M+ users.
4postgresql-best-practices
Capture and apply OpenAI's PostgreSQL scaling approach exactly from the OpenAI post "Scaling PostgreSQL to the next level" (January 22, 2026). Use when building, reviewing, or planning PostgreSQL architecture, partitioning/indexing, query optimization, schema migrations, replication, and load balancing with strict source fidelity.
1