Evaluate whether a project's current tech stack is appropriate for its goals, and recommend alternatives when maintainability, performance, or feature expansion is blocked.
debug-issue insteaddraft-feature-planBefore recommending a stack change, understand what the user is actually solving for. Ask (or infer from context):
ConcernSignalTypical FixPerformance"slow on large datasets", "takes forever to load"Optimize data layer (Polars, DuckDB, caching), not necessarily frontend frameworkMaintainability"hard to extend", "everything is coupled", "adding a feature touches 4 files"Structural refactor (split monoliths, consolidate APIs, add type safety)Feature expansion"need real-time updates", "need multi-user", "need mobile app"Add capabilities (WebSocket, DB persistence, React Native)Team growth"onboarding new developers", "need documentation"Add types, tests, component library, not necessarily new frameworkDeployment/hosting"Railway is expensive", "need to scale"Evaluate hosting alternatives, containerization, serverlessModernization"this feels old", "want to use current best practices"Incremental upgrades (TypeScript, testing, CI) rather than rewrite
Critical insight: Most "tech stack" questions are actually maintainability or structural questions. A React rewrite won't fix a 1,400-line monolithic processor. A type system won't help if the API has 51 endpoints where 15 would suffice.
Use the codebase-survey skill's maintainability audit to produce evidence:
bash
# File size audit
find . -type f \( -name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/venv/*" | xargs wc -l | sort -rn | head -20
# Method/function count audit
grep -c "def " app/core/allocation.py # Python methods
grep -c "@router." app/api/routes.py # FastAPI endpoints
grep -c "function " app/static/js/charts.js # JS functions
Produce a maintainability grade (A-F) with specific targets.
LayerCurrentWhat it does wellWhat it blocksBackend frameworkData processingFrontendState managementStylingCharts/visualizationHostingPersistence
Present 2-3 options ordered by effort vs. payoff:
OptionEffortPayoffWhen to chooseMinimal (structural refactor)LowMediumMaintainability is the only concern, stack is otherwise fineIncremental (modernize frontend)MediumHighFrontend is the pain point, backend is solidFull (new stack)HighMaximumMultiple blockers, team growth, or multi-platform needs
For each option, specify:
Every recommendation must reference the evidence:
AllocationProcessor (1,402 lines, 36 methods) into 5 focused processors" — not "use a better framework"This is a common pattern for data-heavy internal tools. The typical evolution:
StageStackPain PointNext Step1FastAPI + Pandas + Vanilla JSWorks for 1-2 users, 5-10 chartsNone needed2Same stack, files growAdding charts requires 4-file changesSplit processors, consolidate API3Same stack, 30+ charts, multi-userNo persistence, no sharing, frontend is spaghettiAdd React + TypeScript, consider DB4Growth continuesPerformance issues with large datasetsPolars/DuckDB, caching, materialized views
Keep FastAPI when:
Add React when:
Add persistence when: