
    ɢi              $       T
   d Z ddlZddlmZ ddlmZmZ ddlmZm	Z	m
Z
mZmZ dddd	d
ddd	dddd	dddd	dddd	dddd	dZdddddddd d!d"d#d$d%d&d'd!d(d)d*d%d+d,d-d.d/d0d%d1d2d!d3d4d5d%d6d7d!d8dd5d%gd9ddd:d;d<dd=
d>d?d@ddAdBdCdDd!dEdFd/d%dGdHd-dIdJdKd%dLdMdNdOdPd4dQgdRdd:dSdTdUd=
dVdWdXddAdBdYdDd!dZdFd/d%d[d\d-d]d*d^d%d_d`dNdadPdbdQgdcdddddedfd=
dgdhdiddddjdDd!dkd4dld%dgdmd-dnd*dod%dpdqd!drd#d*d%gdsddtdudPd=
dvdwdxddddydzd-d{d|d}d%dvd~ddddddd!dddd-dddddgdgdddddddd=
dddddAdddDd!ddFdld%ddd!dd#d*d%dddddPdbddd!dddd-dddddgdgdddddd4d=
dddddAddddddPdbddd!dddd!dddd!dgdgddddddbd=
dddddddddddPdbddd-dddd!dddd!dgdgddddddd=
dddddAdddDd!dd4dld%ddd!ddFd*d%dddddfdddd!dddd!dddd!dddd!ddddNdd1dd!dddddgdgdddAdٜddd=
ddddAdAdddDd!dd4dld%ddddddNdddddddddNddPd4dQgdddddd=
ddddAdAdddDd!dd4dld%ddddddddd!dddd-dddd!dddd!dgdgddddd dFd=
ddddAdAdddDd!dd4dld%ddd!ddFd*d%dd	dd
dfdbddd!dddd!dddd-dddd!dgdgddddddd=
ddddddddddd4dddd!dddd-dgdgdddAd d!dd=
d"d#d$dAdAd%d&dDd!d'd4dld%d"d(dd)dPdbddd!dddd-ddd*d!dd+d,d!dgdgd-dd.d/d0d=
d1d2d3ddAdd4dDd!d5d4dld%d6dd!d7dFd*d%d8d9d!d:dd/d%d;d<dd=dfdd>d?d!ddd@d!dddd!dddddgdgddAdAdBdCdDd=
dEdFdGddddHdId!dJdFd/d%dKdLd-dMd)dNd%dOd2d!dPd4d5d%gdQdAdRdSdTd=
dUdVdWddddXdYd!dZdd/d%d[d\dd]ddd^d_d!dd`dadNdgdgdbddAdcddded=
gZi ddfd>dgdVdhdgdidvdjddkddlddmdÐdndܐdoddpddqddrd"dsd1dtdEdudUdvZdwdxg dydzd{d|d}g d~dd{ddg ddd{ddeD  cg c]  } | d   
 c} dd{dZeD  cg c]  } | d   
 c} ZdedefdZdee   fdZdedee   fdZdefdZddede	fdZde	de
fdZde	deeef   fdZdee   dee	   defdZ eddde      dedefd       Zyc c} w c c} w (  u   
Blueprint Engine — aura_core extraction of app/services/blueprint.py

Defines 16 site section types, 4 depth presets, validation,
prompt spec generation, and completeness scoring.

Zero imports from app/. Typed Pydantic I/O for MCP exposure.
    N)Optional)aura_moduleModuleResult)BlueprintInputBlueprintConfigBlueprintValidationSectionDefinitionFieldDefinitionzCore Sectionsz#Essential sections every site needsz#4F46E5)labeldescriptioncolor
Persuasionz#Build desire and address objectionsz#7C3AEDzTrust & Proofz"Build credibility and social proofz#10B981
ConversionzDrive visitors to take actionz#F59E0BShowcasez$Display work, products, or portfolioz#06B6D4Contentz!Educational content and resourcesz#EC4899)core
persuasiontrust
conversionshowcasecontentherozHero SectionzYAbove-the-fold section with headline, subheadline, hero body text, and primary CTA buttonTr   headlineHeadlinetextz#Powerful main headline (5-12 words)   x   )keyr   typer   
min_length
max_lengthsubheadlineSubheadlinez/Supporting subheadline that clarifies the value      	hero_bodyz	Hero Bodytextareazg3-5 sentences for the hero section that immediately communicates value and creates emotional connectiond   iX  cta_textzCTA Button Textz'Action-oriented button text (2-5 words)   (   cta_secondary_textzSecondary CTA Textz)Secondary action text (e.g. 'Learn More')zimage|gradient|videozfade-in|slide-up|none)
backgroundoverlaytrust_badge	animationa  Create a compelling above-the-fold hero section. The headline must stop scrolling. The subheadline must clarify the value proposition. The hero body must build desire and credibility. The CTA must be action-oriented and specific (never 'Submit' or 'Click Here').
r   r   r   enabledrequiredcategoryfieldsvisual_optionsai_instructionsorderproblemzProblem StatementzTCalls out the visitor's pain point clearly and empathetically to establish relevanceFr   problem_titlezSection TitlezHeading that names the problem
   problem_bodyzProblem DescriptionzT2-3 paragraphs describing frustrations the audience faces, using empathetic language   i   problem_pointszPain Pointslistz(3-5 specific pain points as bullet items   )r   r   r   r   	min_items	max_itemszdark-bg|light-bg|gradient)styleiconsr0   zArticulate the core problem the target audience faces. Be specific, empathetic, and use language the audience would use themselves. Name real frustrations, not generic ones. This builds the 'before' picture.   solutionzSolution / Value PropositionzBPresents the offer as the clear answer to the problem stated abovesolution_titlez$Heading that introduces the solutionsolution_bodyzSolution DescriptionzV3-4 paragraphs explaining how you solve the problem and why your approach is differenti  solution_pointszKey Benefitsz$3-5 specific benefits (not features)   zlight-bg|gradient|split-layout)rC   rD   imagezPresent the solution as the obvious answer. Focus on BENEFITS not features. Show the transformation - what life looks like AFTER using this. Be concrete and specific.   aboutzAbout / Our Storyz>Brand story section that builds trust and emotional connectionabout_titlezCustom about section headingP   zAbout ContentzS5-8 sentences telling the brand story - who you are, why you exist, what drives youi  mission_statementzMission StatementzOne-line mission statementzcentered|split-image|timeline)rC   rK   zTell a compelling brand story. Include the WHY behind the brand. Make it personal and authentic. Include a clear mission statement. The reader should trust and respect the people behind this brand.featureszFeatures / What We OfferzAGrid of features or services with icons, titles, and descriptionsofferzSection Introductionz.2-3 sentences introducing the features section2   i  zFeature Cards	card_listzF6 feature cards with title, description (2-3 sentences each), and icon   	   titleTitle)r   r   r   r   DescriptioniconIconicon_select)r   r   r   r   rA   rB   card_fieldszgrid-3|grid-2|alternating|listzelevated|flat|bordered|gradientzstagger-fade|slide-up|none)layout
card_stylerD   r0   zGenerate 6 detailed feature cards. Each must have a unique icon, a specific title, and a 2-3 sentence description that explains the real value. Avoid generic phrases like 'state-of-the-art' or 'cutting-edge'. Be concrete.how_it_workszHow It Worksz:Step-by-step process showing how the product/service worksr   	how_titlezHeading for the process sectionhow_subtitlezSection Subtitlez Brief explanation of the process	how_stepszProcess Stepsz&3-5 numbered steps showing the processz
Step TitlezStep Descriptionz8numbered-vertical|horizontal-timeline|alternating-zigzagzscroll-reveal|stagger|none)r^   connector_linesr0   zCreate a clear step-by-step process. Each step must be actionable and specific. Use numbered steps with clear titles. The process should feel simple and achievable, reducing friction and building confidence.statsz!Statistics / Social Proof Numbersz.Key metrics and numbers that build credibilityr   
Statisticsz#4 impressive statistics with labelsvalueValuer   LabelContextzbar|cards|inlinezcount-up|fade-in|nonezbelow-hero|standalone)r^   r0   positionzGenerate 4 realistic, impressive statistics that build credibility. Each stat needs a bold value, a clear label, and brief context. Numbers should be plausible for the niche. Use specific numbers (not round numbers) for authenticity.testimonialsTestimonialsz<Customer quotes with names and roles that build social proofzTestimonial Cardsz83-5 realistic testimonials from representative customersquoteQuotenameNamerolez
Role/Titlezgrid|carousel|featuredzminimal|photo-avatar|branded)r^   r_   starsa  Write 4 realistic testimonials. Each must sound authentic - use natural language, mention specific results or experiences, and include realistic names and roles. Avoid hyperbolic praise. Include diverse perspectives (different use cases, roles, demographics).   pricingzPricing / Plansz1Pricing tiers or packages with feature comparisonpricing_titlezHeading for pricing sectionpricing_subtitlez#Brief value statement about pricingpricing_planszPricing Plansz2-4 pricing tiersz	Plan NamepricePriceperiodPeriodfeatures_listzIncluded FeatureszCTA TexthighlightedzHighlighted/Popularbooleanzcolumns|toggle-monthly-annual)r^   highlight_popularcomparison_tablezCreate realistic pricing tiers appropriate for the niche. Include a free/starter tier, a popular mid-tier (marked as recommended), and a premium tier. Each plan should have 4-6 specific features. Prices should be market-appropriate.   
comparisonzComparison Tablez9Side-by-side comparison with competitors or plan featurescomparison_titlezHeading for comparison sectionr   zComparison Datatablez&Comparison table with headers and rowszColumn Headers)r   r   z	Data Rowslist_of_lists)headersrows)r   r   r   r   table_fieldscomparison_pointszCompetitive Advantagesz3-5 key differentiatorsztable|cards|checklist)rC   highlight_winnerzCreate a fair comparison that highlights advantages. Include real competitor categories (not named competitors). Use checkmarks and crosses. Be honest about trade-offs - credibility matters more than looking perfect.galleryzGallery / Portfolioz2Visual showcase of work, products, or case studiesr   gallery_titlezHeading for gallery sectiongallery_sectionszGallery Itemsz.4-8 gallery items with titles and descriptionsvisual_conceptzVisual Conceptr4   zCategory/Tagzmasonry|grid|carousel)r^   lightboxfilter_tabszCreate gallery items that showcase the best work or products. Each item needs a compelling title, descriptive text, and a visual concept description for image generation. Include category tags for filtering.teamzTeam / About the Peoplez1Team member profiles with photos, roles, and bios
team_titlezHeading for team sectionteam_subtitlezBrief team introductionteam_memberszTeam Membersz3-6 team member profilesbioBio	expertise	Expertisezgrid|cards-with-hover|list)r^   photossocial_linkszCreate realistic team profiles appropriate for this niche. Include diverse roles, relevant expertise, and authentic bios. Each person should feel real and credible for the industry.   faqzFAQ / Common Questionsz*Accordion-style frequently asked questions	faq_itemsz	FAQ Itemsz56-10 frequently asked questions with detailed answers   questionQuestionanswerAnswerz%accordion|expandable-cards|two-columnzslide-down|fade|none)rC   r0   searchzWrite 8 real questions a potential customer would ask. Include objection-handling questions (cost, time, trust). Answers should be 2-4 sentences, honest, and specific. Don't avoid hard questions.	resourceszResources / Blog Previewz?Preview cards for blog posts, guides, or downloadable resourcesr   resources_titlezHeading for resources sectionzResource Cardsz"3-6 resource/article preview cardsCategory	read_timez	Read Timezgrid|list|featured-plus-grid)r^   
thumbnailszCreate resource preview cards for articles or guides relevant to the niche. Each should have a compelling title, 2-sentence description, category tag, and estimated read time. Content should demonstrate expertise.   contactzContact / Get in Touchz/Contact information, form, and location detailscontact_titlezHeading for contact sectioncontact_subtitlez%Welcoming message encouraging contactcontact_emailEmailzContact email addresscontact_methodszContact Methodsz2-4 ways to get in touchmethodMethodz
Value/Linkzsplit|centered|card)formmaprC   zCreate a welcoming contact section. Include realistic contact methods appropriate for the niche (email, phone, social media, live chat). The messaging should reduce friction and encourage reaching out.   	cta_finalzFinal CTA / Call to ActionzOStrong closing section with repeated value proposition and final call to actioncta_final_titlezCTA HeadlinezStrong closing headlinecta_final_bodyzCTA Bodyz81-2 sentences reinforcing the value and creating urgencyi,  cta_final_buttonzFinal action button textzgradient-bg|dark-bg|image-bg)rC   urgency_elementzCreate a powerful closing CTA that summarizes the value and compels action. Use urgency without being pushy. Repeat the core benefit. This is the last chance to convert.   footerFooterz6Site footer with brand, links, legal, and social mediafooter_taglinezFooter Taglinez"Short brand tagline for the footerfooter_linkszFooter LinkszNavigation link groupsgroup_titlezGroup TitlelinksLinksz minimal|multi-column|mega-footer)rC   r   newsletter_signupzCreate footer content with organized link groups and social media presence. Include appropriate legal links (Privacy, Terms). Keep it professional and complete.   a  Create a hero section that would make a Fortune 500 CMO pause. The headline must be unexpected yet immediately clear - use a power structure like [Specific Outcome] + [Without Common Sacrifice] or [Provocative Question That Reframes the Problem]. Subheadline must add a concrete proof point or statistic. Hero body must follow a 5-sentence narrative arc: (1) Name the pain vividly, (2) Explain why current solutions fail, (3) Introduce the insight/approach, (4) Provide a specific proof point, (5) Make the next step feel inevitable. CTA must be benefit-driven ('Start Saving 40% Today' not 'Get Started'). Secondary CTA should reduce commitment anxiety ('See How It Works' or 'View Case Studies').a  Write a problem section that makes the reader say 'they get me.' Name 3-5 SPECIFIC daily scenarios the audience faces - not abstract concepts. Use sensory language: what does this problem FEEL like at 11pm on a Tuesday? Include at least one data point about the cost of inaction. Pain points must be concrete ('Spending 14 hours/week on manual data entry') not vague ('Inefficient processes'). End with an implicit question: 'What if there was a better way?'u  Present the solution as a revelation, not a sales pitch. Start with the core insight - the non-obvious truth that makes this approach work. Explain the MECHANISM: not just 'we solve X' but 'here's specifically how.' Each benefit must be paired with a concrete outcome: 'Automated intake forms → 73% fewer data entry errors in week one.' Include a 'before/after' narrative that makes the transformation tangible. Address the skeptic: briefly acknowledge why other solutions fail and what's fundamentally different here.a>  Tell a founder story with genuine emotional stakes. Include: (1) A specific moment of frustration that sparked the idea - date, place, what happened, (2) The insight that changed everything, (3) Early struggles and what was learned, (4) The team's genuine expertise (years of experience, specific credentials, past wins), (5) A mission statement that's actually specific ('We exist to eliminate the 23 hours/month small business owners waste on compliance paperwork' not 'We're passionate about helping businesses succeed'). Write minimum 8 sentences with narrative tension.u  Generate 6-9 feature cards that read like mini case studies. Each feature: (1) A title that names the OUTCOME not the feature ('Cut Report Time from 4 Hours to 12 Minutes' not 'Automated Reporting'), (2) A 3-sentence description following [What it does specifically] → [How it works differently than competitors] → [Measurable result users get]. No two features should use the same sentence structure. Avoid ALL generic descriptors - every adjective must be replaceable with a number or specific example.a  Create a step-by-step process that makes complexity feel simple. Each step: specific title (verb-first), 2-3 sentence description with a concrete example, and a subtle emotional payoff (what the user FEELS at this step). Include realistic timeframes ('Step 1 takes about 5 minutes'). The progression should build confidence - each step should feel easier than the last. Final step should connect to the outcome promised in the hero.a  Generate 4-6 statistics that pass the 'CEO presentation' test. Each stat must: (1) Use a specific, non-round number (not '100+' or '99%' - instead '2,847' or '94.3%'), (2) Include comparison context ('3.2x faster than the industry average' or 'vs. 23% for traditional methods'), (3) Be plausible for the niche and business stage. Include a mix: one about speed/time saved, one about money saved/earned, one about customer satisfaction, one about scale/reach. Context descriptions should explain WHY this number matters.a  Write 4-6 testimonials that sound like real humans, not marketing copy. Requirements: (1) Each must include a specific metric or timeframe ('reduced our onboarding time from 3 weeks to 4 days'), (2) At least one should mention a minor initial concern that was overcome ('I was skeptical about switching from [competitor], but...'), (3) Use natural speech patterns - contractions, run-on thoughts, enthusiasm that feels earned not scripted, (4) Diverse perspectives: different company sizes, roles, and use cases, (5) Names must feel real and culturally diverse, with specific, plausible job titles and company descriptions. NEVER write 'This product changed my life!' - that's marketing, not a testimonial.a_  Create pricing tiers that feel researched and strategically positioned. Requirements: (1) Each tier name should communicate value ('Growth' not 'Pro'), (2) Prices must be market-appropriate for the niche - research what competitors charge, (3) Feature lists should use outcome language ('Unlimited team collaboration' not 'Multi-user access'), (4) The recommended tier should feel like obvious best value (not just 'most popular'), (5) Include a clear upgrade path logic - each tier should solve a bigger problem. Add a subtle psychological anchor: the premium tier should make the mid-tier feel reasonable.a  Build a comparison that wins trust through honesty. Requirements: (1) Compare against real competitor CATEGORIES (not named competitors), (2) Be honest - show 1-2 areas where alternatives might be adequate, but frame your differentiators as decisive, (3) Use specific criteria that matter to buyers (not just feature checkboxes), (4) Include a 'Bottom Line' row that summarizes the value difference, (5) Competitive advantages should reference specific, measurable differences.a  Create gallery items that tell a visual story of capability. Each item: a compelling title, a 2-3 sentence description that implies the skill/quality behind the work, a specific visual concept for image generation, and a category tag. Items should showcase RANGE: different project types, scales, and industries if applicable. Visual concepts should be specific enough to generate impressive images.a  Create team profiles that build genuine credibility. Each member: a believable name, a specific title, a 3-sentence bio that includes (1) relevant credential or years of experience, (2) a specific past achievement or specialization, (3) a personal detail that makes them human. Include diverse backgrounds and complementary expertise. Roles should make strategic sense for the business stage.a+  Write 8-10 FAQs that actually address what real buyers worry about. MUST include: (1) A price objection question with honest answer about ROI, (2) A 'vs free alternatives' question that acknowledges free options exist but explains the difference, (3) A trust/security question with specific answer, (4) A 'is this right for me?' question with an honest 'this might NOT be for you if...' component, (5) Technical questions relevant to the niche. Answers: 3-5 sentences, specific, honest, never evasive. Show confidence by addressing hard questions head-on.u  Create resource previews that demonstrate deep expertise. Each resource: compelling title (use proven content formulas: 'How [Company] Achieved [Specific Result] in [Timeframe]'), 2-3 sentence description that creates genuine curiosity, specific category, and realistic read time. Resources should cover the customer journey: awareness → consideration → decision. Include a mix of formats: guides, case studies, comparisons, how-tos.a  Create a contact section that reduces friction to zero. Welcoming headline that promises something ('Get Your Custom Growth Plan' not 'Contact Us'). Subtitle should set expectations ('Response within 4 business hours'). Include 3-4 contact methods appropriate for the business type, each with a specific description of what to expect. The overall tone should make reaching out feel like a valuable next step, not a sales trap.a  Create a closing CTA that feels like the inevitable conclusion to everything above. Headline should restate the core transformation in fresh language. Body should create gentle urgency with specificity ('The average new client saves 12 hours in their first week - your clock starts when you do'). Button text should be the most compelling action phrase on the entire page. This section should make NOT clicking feel like a loss.a#  Create footer content that signals professionalism and completeness. Include organized link groups (Product, Company, Resources, Legal). Footer tagline should be a condensed version of the value proposition. Link structure should signal a mature, well-organized company - not a landing page.Minimalz-Quick landing page - 5 sections, concise copy)r   rQ   rl   r   r   r   gffffff?)r   r   sectionscontent_multiplierStandardz6Professional business site - 9 sections, balanced copy)
r   r9   rF   rM   rQ   re   rl   r   r   r   g      ?Comprehensivez7Complete business-in-a-box - 13 sections, detailed copy)r   r9   rF   rM   rQ   r`   re   rl   ru   r   r   r   r   g?	LEGENDARYzEnterprise-grade output - all 16 sections with elite AI instructions, banned cliches, concrete specificity, $50K agency quality.r   g?)minimalstandardcomprehensive	legendaryrawreturnc                 h   g }| j                  dg       D ]  }|j                  t        |d   |d   |d   |j                  dd      |j                  dd      |j                  d	d      |j                  d
d      |j                  dd      |j                  dg       |j                  d      
              t        | d   | d   | d   | j                  dd      | j                  dd      | j                  dd      || j                  di       | j                  dd      | j                  dd      
      S )Nr5   r   r   r   r    r    r   r!   rA   rB   r]   r   )
r   r   r   r   r    r!   rA   rB   r]   r   r2   Tr3   Fr4   r   r6   r7   r8   r1   )getappendr
   r	   )r   r5   fs      8/sites/domain-asset-master/aura_core/blueprint/engine.py_raw_to_section_defr   5  s'   FWWXr" o%G*6mR0uu\1-uu\1-eeK+eeK+mR0~.
 	 J'l&	4(U+V,ww/4 126gggq!     c                  F    t         D  cg c]  } t        |        c} S c c} w N_RAW_SECTIONSr   )rs    r   get_section_definitionsr   R  s    ,9:q":::s   c                 D    t         D ]  }|d   | k(  st        |      c S  y )Nr   r   )r   r   s     r   get_section_by_keyr   V  s,     *U8s?&q))* r   c                  4    t        j                  t              S r   )copydeepcopyCONTENT_DEPTH_PRESETS r   r   get_depth_presetsr   ]  s    ==.//r   depthc                     t         j                  | t         d         }| t         vrd} t               }|D ]  }|j                  |d   v |_         t        | |d   |d   |dddddd	d
ddddddd      S )Nr   r   r   r   professionalzbusiness-casualhighT)tone	formalitytarget_word_countinclude_cta_in_every_sectionseo_optimizedsubtleelevated	sectionedbrandFz3.x-cdn)animation_levelr_   layout_patterncolor_schemedark_mode_supportmobile_firsttailwind_version)r   depth_labelr   r   global_settingsvisual_settings)r   r   r   r   r2   r   )r   presetr   sections       r   get_default_blueprintr   a  s    "&&u.CO.TUF))&(H <!++
);;<7O!"67"*!',0!
  ($)#!&  )
 r   bpc                    g }| j                   s|j                  d       | j                   D cg c]  }|j                  s| }}|s|j                  d       ddh}|D ch c]  }|j                   }}||z
  }|r,|j                  ddj	                  t        |                    t        t        |      dk(  |      S c c}w c c}w )	Nz(Blueprint must have at least one sectionz$At least one section must be enabledr   r   zRequired sections missing: , r   )validerrors)r   r   r2   r   joinsortedr   len)r   r  sr2   required_keysenabled_keysmissings          r   validate_blueprintr    s    F;;@A++3Qq3G3<=X&M#*+aAEE+L+l*G3DIIfWo4N3OPQS[A%5fEE 4 ,s   C C!Cc                    t        | j                  D cg c]  }|j                  s| c}d       }| j                  }| j                  dk(  }g }g }|D ]p  }|j
                  }|j                  }	|j                  }
|r|t        v r	t        |   }
|j                  d|	 d| d       |j                  d|
        g }|j                  D ]  }|j
                  }|j                  }|j                  }|dk(  rOt        |j                  |z        }t        |j                  |z        }|j                  d	| d
| d| d| d	       ||dk(  rOt        |j                  |z        }t        |j                  |z        }|j                  d	| d
| d| d| d	       |dk(  rC|j                   }t        |j"                  |z        }|j                  d	| d| d| d|        |dk(  rv|j                   }t        |j"                  |z        }dj%                  |j&                  D cg c]  }d|d    d c}      }|j                  d	| d| d| d| d| 
       |dk(  r|j                  d	| d|        |dk(  s|j                  d	| d|         |j                  d| ddj%                  |      z   dz          s dj%                  |      }d dj%                  |      z   d!z   }||fS c c}w c c}w )"Nc                     | j                   S r   )r8   r  s    r   <lambda>z*blueprint_to_prompt_spec.<locals>.<lambda>  s
    agg r   )r   r   z
### z (key: "z")zInstructions: r   z    "z": "string (-z
 chars) - "r'   r?   z": ["item1", "item2", ...] (z
 items) - rT   r  r   z": [{ z
 }, ...] (r   z.": {"headers": [...], "rows": [[...], ...]} - r   z": true/false - z  "z": {
z,
z
  }
z{
  "site_copy": {
z
  }
})r  r   r2   r   r   r   r   r7   LEGENDARY_SECTION_OVERRIDESr   r5   r   r   intr    r!   rA   rB   r  r]   )r   r  r2   
multiplieris_legendary
spec_partsjson_schema_partsr   r   r   ai_instfield_specsfieldfkeyftypefdescmin_lmax_lmin_imax_icfcf_keysprompt_specjson_schemas                           r   blueprint_to_prompt_specr(    sB   KK-q199-G &&J88{*LJ &Ykk))C#>>1#6GF5'3%s;<N7)45^^ 	JE99DJJE%%EE,,z9:E,,z9:""U4&UG1UG:V[U\\]#^_*$E,,z9:E,,z9:""U4&UG1UG:V[U\\]#^_&EOOj89""U4&0LUGSTUZT[[efkel#mn+%EOOj89))@Q@Q$R"qE1%5$RS""U4&yE7RSTYSZZdejdk#lm'!""U4&0`af`g#hi)#""U4&0@#HI3	J6 	  3se7!3ejj6M!MPW!WXM&YP ))J'K)EJJ7H,IIJVK##g 	.P %Ss   K5K5$K:	site_copyc                 X   | r|sdddi dS |j                   D cg c]  }|j                  s| }}d}d}i }|D ]J  }|j                  }| j                  |i       }	t	        |	t
              s|| v r| |   r|| |   i}	ni }	d}
d}|j                  D ]  }|j                  }|
dz  }
|dz  }| j                  |      xs |	j                  |      }|s@t	        |t              r't        |j                               dkD  r|dz  }|dz  }wt	        |t              rt        |      dkD  r|dz  }|dz  }t	        |t
              st        |      dkD  s|dz  }|dz  } |j                  |
|t        |
dkD  r||
z  dz  nd      d||<   M t        |dkD  r||z  dz  nd      }||||dS c c}w )Nr   )scoretotalfilledr   rE   r(   )r   r,  r-  r+  )r   r2   r   r   
isinstancedictr5   strr  stripr?   r   round)r)  r   r  r2   total_fieldsfilled_fieldssection_scoresr   r   section_datas_totals_filledr  r  valoveralls                   r   calculate_completenessr;    s   BQ!DD++3Qq3G3LMN  
kk }}S"-,-iIcN #Ys^4!^^ 	'E99DqLGAL--%?)9)9$)?Cc3'C		,<q,@MH!Q&MT*s3x!|MH!Q&MT*s3x!|MH!Q&M	'" ]]1Hw.4!L	
s7 
D L1<L]\1C7RSTG"	 Q 4s
   F'F'	blueprintz1.0.0uu   Site blueprint engine — 16 section types, 4 depth presets, validation, prompt spec generation, completeness scoring)rp   versionr   input_modelconfigc                     | j                  dd      }t        |      }t        |      }t        |      \  }}t	        |j
                  |j                         |j                         ||d      S )Nr   r   )r<  
validationr&  r'  )okoutput)r   r   r  r(  r   r  
model_dump)r?  r   r   rA  r&  r'  s         r   generate_blueprintrE    sm     JJw0E	u	%B#B'J7;K$//1&&	
 r   )r   )__doc__r   typingr   aura_core.module_contractr   r   aura_core.typesr   r   r   r	   r
   SECTION_CATEGORIESr   r  r   DEFAULT_SECTION_KEYSr/  r   r?   r   r0  r   r   r   r  tupler(  r;  rE  r  s   0r   <module>rM     s     ?  &6[fop(9^irs&7[fop(9Xclm$5[fop"3Vajk  rTvVTy  JL  \_  `!M6  [L  \^  nq  r+z  [D  TW  gj  k):F  \E  UV  fh  i(3GQW  iT  de  uw  x
 *@Dae  uL  M d  #6mU#ov^~  OQ  ad  e"-BJ  h~  NQ  ad  e$}f  ^H  WX  gh  i

 %@$]tu m $B[U$  `F  VX  hk  l#.Dj  jB  RU  ei  j%  `F  UV  ef  g

 %Et^bc D !4WTv!OV\z  KL  \^  _oz  [p  @C  SW  X'2Ev  gC  SU  eh  i

 %DdS c $>ZTv&<j  bR  bd  tw  x+  _g  vw  FG%,wOYfq~  IS  RT  ^d  ou  L  VM  NO

 &FUv  BF  Uq  r { SU/6Z{  LN  ^`  a"-?  aC  SU  eh  i/;  `H  WX  gh%,|VT^k  wI  S]  W^  hn  y  IV  `W  XY
 &`tx  Hd  e m !DGUlKX}  MN  ]^%,wOY`kr  }C  RD  N[  fo  y  F@  AB
 &8F]  lC  D G UTw"-@+  ga  pq  @A%,w
S]cnt  E  VF  PV  am  w}  H~  @
 &>Mkvz{ a #4JU#ov^{  LM  ]_  `&1CV  eJ  Z\  lo  p#o{cv  FG  VW%+k6R\cnu  @F  UG  QY  dl  v|  I}  GT  _l  v|  }  GV  at  ~D  E  OY  dn  x~  G  IV  av  @I  AJ  KL
 &E[_uz{ F &8Re&&  bB  RS  ce  f&1BG  eM3CV)Ths  ~M  _N  OP'2JTZ  lE  TU  de  f	
 %<QUV v #8Ke#ov^{  LM  ]_  `&+  gW  fg  vw%,wOYfq~  IS  RT  ^n  yI  SY  VZ  dn  yG  QW  \X  YZ

 &=$_cd m  9Je ?F[u  FG  WY  Z#.@&az  KM  ]`  a"^[a{  KL  [\%+ffMW]ht  E  PF  PU  `e  oy  Hz  DO  Ze  ou  |v  wx
 &BTcgh S 7CTw+{  \S  bc  rt%/*fU_grz  EO  XP  QR
 %LZp  }B  C a %?Xe%`  PQ  ac  d*:K  aE  TU  de%,wOYfq~  IS  RT  ^h  s}  GM  VN  Xc  ny  CI  PJ  KL

 &DSWX s #;HU#ov^{  LM  ]_  `&1CV  eL  \^  nq  r#gvVm}~  OR  S%0A;  hB  QR  ab%-&Q[bmy  DJ  TK  Ub  mz  DJ  MK  U[  fl  vC  MD  EF	
 $(@UV g  %AhT|%_x  IK  [^  _$z:  _Y  ik  {~  &1BFc}  NO  _a  b

 %CW\] G (OTv$/?  aE  UV  fi  j"^[ay  IJ  YZ%2]TZ[elw~  IO  ^P  QR

 %GX\sxy ~mcJ
  I  \   [   N		
   O   G   W   Y   q	   r   a   W 
  y   I   |    @!"   t# , FV!	 O!	 !P f!	  Z'45!QuX5!	' 6 +88Q%8 T &7 :;&7!8 ;C H->$? 04 0 ? >F? F/B F5$ 5$U38_ 5$p1htn 1(?:S 1X\ 1h 	 H	t  i 6
 9s   -T 	T%