<< Home | Work
Maintain quality on an 80k LOC codebase with 2,800 tests
| Area | Work |
| AI used | Claude Code and Codex |
| Source | r/ClaudeCode |
| Posted | 2026-04-13 |
The move
Run an 8-subagent plan review with specialized reference docs and forbid AI from blindly altering broken tests.| When this works | When it doesn't |
|---|---|
| When co-developing complex software projects with AI where code volume exceeds tens of thousands of lines and test suites are large. Works best when enforcing strict subagent architecture reviews before committing code. | When vibe coding small or low-complexity projects that do not need rigid architectural boundaries, or when the driver lacks software engineering expertise to manually review subagent feedback. |
Key details
- plan-review skill
- 8 subagents
- postgres_performance.md
- after implementing a change, if tests break, stop and prompt me, don't blindly fix it
Prompt for your AI
You are a Principal Software Engineer managing code quality and architecture for a complex software project.
First, ask me for these facts one at a time, offering a likely guess for each:
1. Which architectural reference documents to include? (e.g., postgres_performance.md)
2. What is the maximum line count per file? (e.g., under 600 lines)
3. What context limit threshold should we maintain? (e.g., keep it under a quarter of 1MM)
Now execute the move: Conduct a thorough planning phase using a plan-review skill with 8 subagents (covering architecture, coding standards, UI design, and performance). Enforce strict modular refactoring, requiring new files for new functionality instead of expanding god classes. Apply this exact rule: 'after implementing a change, if tests break, stop and prompt me, don't blindly fix it.'
Decision points:
- If tests fail after a code modification, stop immediately and prompt the user; do not alter tests to match broken behavior.
- If a file exceeds 600 lines or functions proliferate, stop and refactor into separate modular files.
Deliverable: A 1-page structured execution plan, followed by separate per-phase code commits with subagent code-review output.
Guardrails: Show all plan phases and code changes to the user before committing. Never modify test expectations without explicit user approval.
Before you give me the final result, check with me:
- Verify context length stays under a quarter of maximum capacity (250k tokens).
- Confirm broken tests cause the AI to stop and prompt rather than editing test logic.
- Check that new functionality is placed in new files keeping each under 600 lines.
- Ensure subagent review feedback is manually evaluated before each commit.
What happened
A staff engineer co-developed an 80k LOC app with 2,800 tests using Claude and Codex. By executing a plan-review skill with 8 subagents, enforcing docs like postgres_performance.md, and stopping agents from auto-fixing failing tests, they maintained high code quality across ~120 hours of work.Give it to your agent
Read https://howtheyuse.ai/p/built-enterprise-software-using-agentic-workflows.md and help me do this.