feat: Ferrum AI — rule-based effect generation, style analysis - #12
Merged
Conversation
…ates Implements the Ferrum AI scaffolding (Research → foundation): Effect Generator (effect-generator.ts): - Rule-based prompt-to-effect matching (60+ keywords) - Weighted scoring: category (0.4) + CSS overlap (0.35) + name (0.25) - Suffix stripping for verb forms (bouncing→bounce) - Returns top 10 suggestions from 542 effects Style Analyzer (style-analyzer.ts): - WCAG 2.1 contrast checker (relative luminance formula) - Performance anti-pattern detection (blur > 50px, backdrop-filter, etc.) - Actionable improvement suggestions Prompt Templates (prompt-templates.ts): - 6 built-in templates (hero, dashboard, nav, form, loading, transitions) - Template filling and task-to-template matching Description Generator (description-generator.ts): - 20 CSS feature detectors for human-readable descriptions - Markdown documentation generation - CSS→category classification (19 weighted rules) 74 unit tests covering all modules.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Implements the Ferrum AI foundation (Research → functional core). Fully rule-based — zero API calls, no external dependencies.
Modules
effect-generatorstyle-analyzerprompt-templatesdescription-generatorKey Design
Tests
Files Added
src/lib/ferrum-ai/— 6 source files__tests__/ferrum-ai.test.ts— 74 testsCloses roadmap item: Ferrum AI Research → Alpha ✅