A Solo Engineer’s Journey: Transforming a Massive Project with AI
After six months of intensive use, a senior software engineer shares his refined strategies for leveraging Claude Code as an AI co-developer, turning what seemed like an impossible solo project into a success. This isn’t gospel, but a personal account of building a highly optimized AI workflow for large-scale development.
The Challenge: A Solo Rewrite of a 300K+ LOC Application
With seven years of experience in production web apps, the author embraced AI to amplify his capabilities. This newfound leverage led to an ambitious proposal: a complete redesign and refactor of an internal web application. What started as an outdated ~100k lines of code (LOC) project was to be rebuilt solo into a 300-400k LOC modern application within a few months, featuring React 19 TypeScript, TanStack Query v5, TanStack Router, and MUI v7. This colossal undertaking demanded an AI workflow that was not just helpful, but truly transformative.
The AI Paradox: Quality, Consistency, and the Human Touch
Discussions around AI often highlight inconsistent output and context loss. The author acknowledges these valid concerns but asserts that Claude Code’s output has significantly improved with a continuously refined workflow. The key lies in active human involvement: AI models are stochastic, and sometimes human intuition and direct intervention are simply faster. Don’t be afraid to step in, fix issues yourself, and re-prompt often. Mindful, specific prompting, avoiding leading questions, and giving Claude the right context are paramount for desired results.
Revolutionizing Workflow: An Integrated Claude Code System
The core of this success story is a meticulously crafted system designed to mitigate AI’s shortcomings and amplify its strengths:
1. The “Skills Auto-Activation” Breakthrough
Anthropic’s “Skills” feature, initially underutilized by Claude, became a game-changer through a custom hook system. Two main TypeScript hooks now manage skill activation:
- UserPromptSubmit Hook: Runs *before* Claude sees a message, analyzing prompts for keywords and intent, then injecting a reminder for relevant skills into Claude’s context (e.g., “🎯 SKILL ACTIVATION CHECK – Use project-catalog-developer skill”).
- Stop Event Hook: Runs *after* Claude responds, analyzing edited files for risky patterns (e.g., database operations, async functions) and displaying gentle self-check reminders (e.g., “Did you add error handling?”).
A central skill-rules.json configuration defines triggers based on keywords, intent patterns, file paths, and content. This ensures skills like backend-dev-guidelines or frontend-dev-guidelines are always active when needed. Furthermore, skills were restructured to adhere to Anthropic’s best practices, keeping main skill files under 500 lines and utilizing progressive disclosure with resource files, improving token efficiency by 40-60%.
2. Evolving Documentation: CLAUDE.md & Project Knowledge
The previous monolithic BEST_PRACTICES.md was moved into the auto-activating skills. Now, CLAUDE.md is laser-focused on project-specific information (quick commands, service configs, task management workflow), typically under 200 lines. This separation ensures skills handle “how to write code” guidelines, while CLAUDE.md (and related PROJECT_KNOWLEDGE.md, TROUBLESHOOTING.md) details “how this specific project works,” offering clarity and efficiency.
3. The Dev Docs System: Conquering AI Amnesia
Recognizing Claude’s tendency to lose context, a “dev docs” system was implemented. For every large task or feature, a dedicated directory is created containing three key markdown files:
- `[task-name]-plan.md`: The accepted strategic plan.
- `[task-name]-context.md`: Key files and decisions.
- `[task-name]-tasks.md`: A checklist of work items.
Planning is king, initiated with a strategic-plan-architect subagent or a custom /dev-docs slash command. This structured planning, coupled with regular updates and a /update-dev-docs command before conversation compaction, ensures Claude remains on track throughout complex implementations. The author also emphasizes periodically having Claude review its own code for critical errors, missing implementations, and security flaws.
4. PM2 Process Management: Backend Debugging Game Changer
Managing seven backend microservices previously meant manually copying logs for Claude. By integrating PM2, all services run as managed processes with individual, real-time log files. This allows Claude to autonomously debug by running pm2 logs [service-name], diagnose issues, and even restart services (e.g., pm2 restart email). While hot reload is still handled separately, PM2 dramatically streamlines backend development and debugging.
5. The “No Mess Left Behind” Hooks System
A pipeline of hooks ensures code quality and consistency:
- File Edit Tracker (post-tool-use hook): Logs edited files and their repos.
- Build Checker (Stop hook): Runs builds on affected repos after Claude responds, immediately catching TypeScript errors. If few errors, they’re shown; if many, an `auto-error-resolver` agent is recommended.
- Prettier Formatter (Stop hook): Automatically formats all edited files using appropriate `.prettierrc` configs.
- Error Handling Reminder (Stop hook): Analyzes edited files for risky patterns and provides gentle, non-blocking reminders for best practices like Sentry integration.
This comprehensive system means Claude never leaves unhandled errors or inconsistent formatting, dramatically reducing review time.
6. Utility Scripts & Enhanced Tooling
Reusable utility scripts are attached to relevant skills (e.g., test-auth-route.js within backend-dev-guidelines) for common, complex tasks like testing authenticated routes. This prevents Claude from reinventing the wheel. Other tools like SuperWhisper (voice-to-text prompting), Memory MCP (for tracking project-specific decisions), and BetterTouchTool (custom hotkeys and gestures) further enhance productivity.
7. The Holy Trinity: Agents, Hooks, and Slash Commands
This integrated ecosystem is powered by:
- Agents: Specialized subagents for quality control (`code-architecture-reviewer`), testing (`auth-route-tester`), planning (`strategic-plan-architect`), and more, each with clear, specific roles.
- Hooks: The glue, ensuring skill activation, error catching, formatting, and quality checks.
- Slash Commands: Custom shortcuts like `/dev-docs` or `/code-review` that expand into detailed prompts, streamlining repeated workflows and packing complex instructions into simple commands.
Conclusion: A Blueprint for Advanced AI-Assisted Development
After six months, the core lessons are clear:
- Plan everything: Use planning mode or dedicated agents.
- Skills + Hooks: Auto-activation is crucial for reliable skill usage.
- Dev Docs System: Prevents AI context loss and guides large tasks.
- AI-driven Code Reviews: Essential for early error detection.
- PM2 for Backend: Simplifies debugging multi-service architectures.
Complementary elements like specialized agents, slash commands, detailed documentation, and utility scripts further enhance this powerful workflow. This robust system allowed a single engineer to confidently tackle a 300k+ LOC rewrite with consistent quality, demonstrating the immense potential of AI when deeply integrated into a thoughtful, human-centric development process.