fix(loop): improve validation for greenfield builds #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes loop failures when building new projects from scratch (e.g., "build a React todo app"). Three root causes addressed:
npm. Now auto-detects pnpm/yarn/bun from lockfiles andpackageManagerfield--validation-warmup)Changes
src/loop/executor.ts— Circuit breaker reset on task advancement + validation warm-up guardsrc/loop/validation.ts— Use detected package manager in fallback pathsrc/commands/init.ts— Use detected PM in project detection + AGENTS.md generationsrc/commands/run.ts— Use detected PM for dev commands + auto-detect greenfield warm-upsrc/wizard/spec-generator.ts— Use detected PM for generated validation commandssrc/cli.ts— Add--validation-warmupCLI flagsrc/utils/package-manager.ts— NEW package manager detection utilitysrc/utils/__tests__/package-manager.test.ts— NEW 13 tests for PM detectionTest plan
pnpm buildpassespnpm test:runpasses (156 tests, 13 new)--validateon a greenfield project🤖 Generated with Claude Code