Skip to content

main -> build.cf#339

Merged
karishnu merged 3 commits into
release-livefrom
main
Feb 20, 2026
Merged

main -> build.cf#339
karishnu merged 3 commits into
release-livefrom
main

Conversation

@karishnu

@karishnu karishnu commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a lightweight blueprint generation mode for minimal templates, reducing output verbosity and token usage while maintaining downstream compatibility.

Changes

  • Add LitePhasicBlueprintSchema with simplified fields (shorter descriptions, single-string userFlow, max 5 pitfalls)
  • Add LITE_PHASIC_SYSTEM_PROMPT targeting ~800 words for concise blueprints
  • Add liteToPhasicBlueprint() conversion function to map lite blueprints to full PhasicBlueprint for downstream compatibility
  • Detect minimal templates via templateDetails?.name?.includes('minimal') and route to appropriate schema/prompt

Motivation

Minimal templates don't need the full verbose blueprint with extensive UI/UX descriptions, detailed user journeys, and comprehensive pitfall lists. This change reduces LLM output tokens and processing time for simpler projects while preserving the full blueprint structure for downstream consumers.

Testing

  • Test blueprint generation with a template whose name contains "minimal"
  • Verify the lite blueprint converts correctly to full PhasicBlueprint
  • Confirm non-minimal templates still use the full PHASIC_SYSTEM_PROMPT

Breaking Changes

None - the conversion function ensures downstream code receives the same PhasicBlueprint type.


Generated with Claude Code

@karishnu
karishnu merged commit 78a369b into release-live Feb 20, 2026
9 checks passed
@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Claude finished @karishnu's task in 1m 15s —— View job


Code Quality & Security Review

Recommendation: COMMENT

PR Summary

Adds a lightweight blueprint generation mode (LitePhasicBlueprintSchema) for templates containing "minimal" in their name, using a shorter prompt (~800 words) and simplified schema fields, then converting back to full PhasicBlueprint for downstream compatibility.

PR Description

  • Updated: Yes - Generated comprehensive description with summary, changes, motivation, and testing notes

Addressed Issues

  • None identified

Code Quality

Critical: None

High: None

Medium:

  1. Fragile template detection (blueprint.ts:368)

    const isLiteTemplate = !isAgentic && templateDetails?.name?.includes('minimal');

    Relies on string matching in template names. Consider adding an explicit isMinimal or blueprintMode flag to template metadata for more robust detection.

    Fix this →

  2. Redundant property assignments (blueprint.ts:287-303)

    function liteToPhasicBlueprint(lite: LitePhasicBlueprint): PhasicBlueprint {
        return {
            ...lite,
            detailedDescription: lite.detailedDescription, // Already in spread
            views: lite.views, // Already in spread
            // ...
        };
    }

    The spread operator already includes these properties. Explicit re-assignments are redundant and could cause confusion during maintenance.

Low:

  1. Empty string defaults - userFlow.uiDesign: '' and userFlow.userJourney: '' in the conversion function may cause issues if downstream code expects actual content. Consider documenting this behavior or using placeholder text.

  2. Duplicated PDF filter logic (blueprint.ts:425-431) - The PDF filtering for initialPhase.files is duplicated between lite and regular paths. Could be extracted to a helper function:

    const filterPdfFiles = (files: FileConceptType[]) => 
        files.filter(f => !f.path.endsWith('.pdf'));

Security

Critical: None

High: None

Medium: None

Low: None

No security concerns - changes are internal schema/prompt modifications with no user input handling or external data exposure.


Testing

  • Manual testing recommended:
    1. Generate blueprint with a template containing "minimal" in name
    2. Verify LitePhasicBlueprintSchema validation passes
    3. Confirm conversion produces valid PhasicBlueprint
    4. Test non-minimal templates still use full schema

Final Recommendation

COMMENT - The implementation is functional and accomplishes its goal. The medium-priority items around fragile string matching and redundant code are suggestions for future improvement but don't block this PR. The PR is already merged, so these can be addressed in follow-up work if desired.


  • Gather context and understand changes
  • Check current PR description
  • Review code quality
  • Review security
  • Post comprehensive review summary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant