Fix project type detection and analyzer schema validation#1
Merged
leandigital merged 3 commits intomainfrom Feb 23, 2026
Merged
Fix project type detection and analyzer schema validation#1leandigital merged 3 commits intomainfrom
leandigital merged 3 commits intomainfrom
Conversation
…alidation
Three bugs found when running `lean-intel full` on a vanilla JS marketing site:
1. Docs generation crashed with "Unsupported project type: unknown" because the
detector only recognized framework-based frontends (React, Vue, Angular). Added
vanilla frontend signals (CSS build tooling, UI libraries, SCSS/HTML source files,
PostCSS/Tailwind configs) and broadened backend detection (Go, Rust, Ruby, .NET,
additional JS frameworks, database/auth/server-utility dependencies). Also added
a generic documentation generator as fallback so unknown types no longer crash.
2. Cost analyzer Zod validation failed because LLMs returned string numbers ("1000")
and null for viability. Fixed with z.coerce.number() and z.null() in union.
3. Quality analyzer Zod validation failed because LLMs returned plain strings
instead of objects for compliance violations. Fixed with z.union([z.string(),
z.object(...)]).
Also added CI status badge to README.
Triggers on GitHub Release creation, runs build + lint + test, then publishes to npm with provenance attestation. Requires NPM_TOKEN secret in repo settings.
GitHub Actions checks out in detached HEAD mode, so local branch refs like 'main' don't exist. Handle this gracefully by catching the pathspec error in CI environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
z.coerce.number()for string-to-number coercion,z.null()for nullable viability fieldz.union([z.string(), z.object(...)])for compliance violationsTest plan
npm run buildpassesfrontend