airfleet-nexus-ai-server
Release 0.4.0
Adds page-spec v2 vocabulary and a section archetype catalog with auto-discovery, admin endpoints and SPA pages, upgrades the comparison spec, and fixes entrypoint detection for paths with spaces.
View full changelog
Added
- Page-spec v2 vocabulary on
pageTypeSpecSchema:audience,voice,expectedCta,requiredProofTypes,formFriction,defaultSections,forbidsArchetypes,validationRubric,guidance. All optional or defaulted — v1-shape literals still parse. - Section archetype catalog with auto-discovery:
Hero,ValueProps,SocialProof,FeatureDeepDive,Pricing,Faq,FinalCta, plusComparisonTable,AwardBadgeRow,IconFeatureGrid,InlineLeadForm,IntegrationGridsynthesized from the swipe-file corpus. Filesystem-driven — drop a.tsunderarchetypes/and restart. - Best-practice page specs (
product,content,service,demo) authored from 89 per-page analyses across 5 categories of a 110-page landing-page swipe file. - Page-spec auto-discovery: drop a spec file under
page-specs/specs/and it's picked up at boot viareaddirSync+ dynamic import + top-level await. SpecRepositoryinterface +InMemorySpecRepositoryas migration insurance for an eventual code → DB swap.- Admin browse endpoints under
/admin/api/{page-specs,section-archetypes,block-specs}with cross-reference counts and rendered-prompt previews (Zone 2 for blocks, Zone 3 for specs), gated byrequireSession. - Admin SPA catalog pages (Page Specs / Section Archetypes / Block Specs + detail views) with cross-linking, debounced search, and source filters. Sidebar nav extended.
- New CSS patterns for detail pages:
.card,.kv,.breadcrumb,.prose-block,.block-id-list,.chip,.badge-custom/.badge-native,.empty-state,.id-cell,.num-cell. - Page-type research pipeline tooling under
page-type-data/:extract-from-coda.js(DevTools snippet),fetch-images.mjs(parallel image fetcher with native-resolution URL cleanup),analyze-screenshot.md(per-screenshot analysis prompt),synthesize-best-practice.md(per-category synthesis prompt), README documenting the 5-step pipeline. - Prompt-rendering snapshot tests (
prompts.snapshot.test.ts) covering all shipped specs. pnpm dump-promptCLI: dump the full assembled system prompt for a(spec, stage)pair to stdout, with optional fixture file for Zone 4. Useful for offline iteration without burning API credits.- Inline archetype definitions in Zone 3 of the system prompt for LLM grounding.
- Universal page rules + canonical
propose_planexample baked intoBASE_PROMPT. purchaseandstart-trialCtaActionenum values.
Changed
- Existing
comparisonspec upgraded based on best-practice synthesis (13-sample corpus):ComparisonTableadded as required default section,Faqmoved from required toforbidsArchetypes,Pricingadded toforbidsArchetypes,SocialProofsplit into trust-logo-belt + switcher-testimonial slots, FeatureDeepDive ×1 required + 1 optional added,requiredProofTypesexpanded withlogosandmetric, validation rubric expanded from 5 to 9 testable assertions. book-demo,comparison,resourcesspecs re-authored with full v2 vocabulary content.data-index.jsrenamed todata-index.jsonto reflect its actual content (pure JSON) and avoid ESLint parsing it as code.
Fixed
- Entrypoint detection (
isEntrypoint) now usespathToFileURLso the boot block runs correctly on paths containing spaces (e.g./Users/.../Local Sites/...); previously the check silently failed off-Railway. pnpm dump-promptscript imports updated for the post-restructure monorepo layout (../plugins/page-ai/src/...for runtime modules,@airfleet/nexus-ai-server-wp-contractsfor types).