I’ve been exploring how to work more effectively with AI coding assistants like Claude Code, and I wanted to share what I’ve learned—not as an expert, but as someone figuring this out alongside everyone else.
The Challenge: Managing Complexity as a Solo Developer
My workspace is… eclectic, to say the least. On any given week, I might jump between Laravel applications, Docker-based services, Directus headless CMS projects, Dagster data pipelines, N8N automation workflows, Shopware e-commerce builds, and various ad-hoc Python scripts. Each project has its own context, conventions, and quirks.
The problem wasn’t just managing the code—it was managing the knowledge about the code. How do I:
- Keep everything organized when project-hopping multiple times a day?
- Provide Claude with relevant context without re-explaining my entire setup each time?
- Extract and reuse patterns that make sense across different tech stacks?
- Eventually onboard contributors without creating chaos?
Workspace Architecture: A Place for Everything
I settled on a workspace structure that separates concerns while keeping everything accessible:
workspace/
├── projects/ # Active client and product work
│ └── [project-name]/
├── skills/ # Reusable automation and tooling
│ ├── governance/ # Project governance patterns
│ └── [other-skills]/
├── patterns/ # Extracted code patterns and templates
│ ├── prompts/ # AI prompts I use frequently
│ └── [frameworks]/ # Framework-specific patterns
└── docs/ # Cross-project documentation
Projects is where the actual work lives—client deliverables, SaaS products, internal tools. Each project is self-contained with its own git repository and dependencies.
Skills houses reusable automation. Think of these as “recipes” I can apply to any project. The governance-assistant skill, for example, helps me set up quality gates and project structure consistently across Laravel, Python, or Node.js projects.
Patterns is my pattern library—extracted solutions I’ve found work well. Dockerfile templates, docker-compose patterns, common Makefile targets, AI prompts for code review. Anything I find myself doing twice goes here.
Docs contains cross-cutting documentation that spans multiple projects or explains how the workspace itself functions.
Enter the Governance Assistant
The governance-assistant emerged from a simple need: I wanted consistent quality standards without heavyweight process. Some projects are quick prototypes (ship fast, iterate), while others are production systems handling real customer data (ship carefully, test thoroughly).
The system uses three tiers:
Quick Governance - For prototypes, POCs, and experiments. Code needs to work, but formal tests and security audits can wait. Think weekend projects and tech stack explorations.
Standard Governance (default) - For client deliverables and production services. Requires passing tests (60%+ coverage), security checks, and code review. This is where most projects land.
Enterprise Governance - For regulated industries (eCommerce, fintech) or compliance-heavy work. Adds 80%+ test coverage, comprehensive documentation, peer reviews, and audit trails.
Each tier includes a Makefile with appropriate commands:
make test # Run tests (complexity varies by tier)
make security-check # Security audit (required for Standard+)
make quality-check # Code quality metrics
make pre-deploy # Full readiness check
The key insight: governance isn’t a binary choice. Projects evolve. A Quick prototype that proves successful becomes a Standard production app. A Standard app handling healthcare data upgrades to Enterprise. The governance-assistant makes these transitions explicit and manageable.
The Token Burn Problem
As my usage of Claude Code increased, so did the costs. Small ad-hoc projects barely registered—a few thousand tokens here and there. But large, complex projects? The burn rate was dramatic.
A typical session might look like this:
- Claude reads multiple route files to understand routing structure: ~3,000 tokens
- Claude examines model relationships across many files: ~5,000 tokens
- Claude reviews log files to debug an issue: ~50,000 tokens
- Total for one debugging session: 58,000+ tokens
Over a week on a complex project, this compounds quickly. When working within client budgets, every token matters.
First Attempt: The Hybrid Approach
My initial solution was to use Claude for planning and architecture decisions, then hand off code generation to local LLMs (like DeepSeek Coder or Qwen). The economics made sense—Claude’s reasoning for $0.03 per million input tokens, local generation for free.
In practice, though, the context lost in the handoff was larger than I wanted. While the local models I tested performed well for code generation, the back-and-forth felt disjointed. Claude would make architectural decisions, then the local model would implement without full awareness of those decisions. I’d need to provide additional context, creating a feedback loop that ate up time.
To be fair, I didn’t test every available coding model, and the ones I tried were genuinely impressive. But the workflow wasn’t quite clicking—it felt like having two different developers who rarely talked to each other.
The Anthropic Article That Changed Everything
Then I read Anthropic’s engineering post: “Code Execution with MCP: Building More Efficient AI Agents”.
The core insight hit me immediately: Don’t force everything through Claude’s context window. Pre-process data and return summaries instead.
The article explained how traditional approaches suffer from two problems:
- Tool definition overhead - Loading thousands of tools upfront consumes tokens before actual work begins
- Intermediate result duplication - When retrieving data to pass elsewhere, results flow through the model twice
Their solution: Treat tools as code APIs within a code execution environment, not as direct tool calls. Let code handle data processing, filtering, and transformation. Only show Claude the summarized results.
Token-Efficient Scripts: The Implementation
Claude and I analyzed how this concept could apply to my daily workflow. We identified the highest token-cost operations:
- Understanding Laravel routing structure (reading multiple files)
- Analyzing Eloquent model relationships (parsing many model classes)
- Debugging issues from log files (massive text files)
- Reviewing DSPy traces (large JSON outputs)
- Auditing Docker Compose configurations
For each, we built a Node.js script that:
Processes locally - Runs analysis using project tools (like php artisan route:list)
Filters and summarizes - Extracts only relevant information
Caches results - Stores analysis for reuse during the session
Returns concise output - Gives Claude actionable insights, not raw data
The scripts live in each project’s .claude/ directory:
.claude/
├── scripts/
│ ├── laravel/ # Laravel-specific analysis
│ │ ├── analyze-routes.cjs
│ │ ├── check-models.cjs
│ │ └── filter-logs.cjs
│ ├── dspy/ # DSPy trace analysis
│ ├── docker/ # Docker security audits
│ └── common/ # Shared caching utilities
└── cache/ # Session cache for results
Each script is a .cjs (CommonJS) file for universal compatibility—works in both traditional Node projects and modern ES module setups without configuration.
Real-World Token Savings
The results were immediate and dramatic (YMMV!):
| Task | Before Scripts | With Scripts | Savings |
|---|---|---|---|
| Analyze Laravel routes | ~3,000 tokens | ~200 tokens | 93% |
| Check model relationships | ~5,000 tokens | ~300 tokens | 94% |
| Filter application logs | ~50,000 tokens | ~500 tokens | 99% |
| Summarize DSPy traces | ~50,000 tokens | ~500 tokens | 99% |
That debugging session I mentioned earlier? Instead of 58,000 tokens:
make analyze-routes: 200 tokensmake check-models: 300 tokensmake filter-logs --errors-only: 500 tokens- Total: 1,000 tokens (98% reduction)
Integration with Governance Tiers
The token-efficient scripts integrate naturally with governance levels:
Quick tier gets basic analysis scripts—just enough to understand project structure without slowing down rapid iteration.
Standard tier includes the full suite: routes, models, logs, Docker security audits, and caching.
Enterprise tier adds enhanced analysis with compliance checking and performance profiling.
When setting up a new project:
# Copy governance templates
cp ~/workspace/skills/governance/governance-assistant/templates/Makefile.standard ./Makefile
# Install token-efficient scripts
cp -r ~/workspace/skills/governance/governance-assistant/scripts/ .claude/scripts/
# Now available:
make analyze-routes # Route analysis
make check-models # Model relationships
make filter-logs # Error extraction
make analyze-compose # Docker security
What I’ve Learned
This exploration has taught me that working effectively with AI isn’t about replacing intelligence—it’s about structuring information flow.
Claude doesn’t need to read every line of every file to help me debug. It needs the right summary at the right time. By pre-processing data in code (where it’s cheap and fast), I can give Claude exactly what it needs to reason about problems without burning through tokens.
The governance-assistant isn’t finished—it’s evolving alongside my workflow. New scripts get added as patterns emerge. The tiered governance structure adapts as I learn what “standard” really means for different project types. I’ll open source it soon.
And critically, all of this stays local and portable. No external services, no lock-in. Just a directory structure, some scripts, and a Makefile. If a contributor joins a project, they inherit the same setup. If I move to a new machine, I copy my workspace and everything works.
Next Steps
I’m continuing to refine this approach:
- Building scripts for other frameworks (Django, Express, FastAPI)
- Exploring how to make patterns even more reusable across tech stacks
- Documenting what works and what doesn’t
If you’re interested in the implementation details, the governance-assistant is part of my workspace patterns. It’s an ongoing experiment in making AI-augmented development more sustainable—both economically and cognitively.
The workspace structure, governance tiers, and token-efficient scripts are all pieces of a larger puzzle: How do we work effectively with AI assistants while maintaining control, clarity, and cost-efficiency?
I’m still figuring it out. But I’m excited about where this is headed.
Have you been experimenting with AI-augmented workflows? What patterns have you found effective? I’d love to hear about your experiences.