PACKAGE STRUCTURE REQUIREMENTS
==================================================

DETERMINISTIC PLAN FIELDS

project.json must preserve the compiled site-plan identity and selections:

- builder_profile.scope: simple | standard | extensive
- builder_profile.expression: clean | brand-led | creative
- site_plan_schema: admatic.site-plan.v2
- site_plan_fingerprint: the unchanged 64-character SHA-256 value
- every page: recipe_id
- every planned section: slot_id, role, component, component_version and variant
- every planned selection: source = approved-library unless an explicitly budgeted exception exists

The package may embed site-plan.json at the ZIP root. If embedded, it must match project.json and the Prompt Manager plan byte-for-semantic-byte. A mismatch is a failed package, not a warning.

The ZIP must be structured correctly for Admatic Kit Factory v2.13.1+.

Mandatory:
- project.json must be directly in the ZIP root
- project.json must include schema_version
- project.json must include project_name
- project.json must include slug_prefix
- project.json must include inline site_settings
- project.json must declare assets.css as an empty array for production-standard builds
- project.json must include all page/template/section/menu/plugin adapter references
- project.json must include strict_validation: true
- project.json must include project_standard for the Admatic Elementor Pro Production Standard
- project.json must include required Elementor and Elementor Pro dependencies
- project.json must include referenceGeometry, visualCorrectionContract and canonical frontend_screenshot_qa metadata; desktop/tablet/mobile capture or structural benchmark QA is part of the release contract
- project.json must include build_policy.clean_previous_build: true
- Screenshot QA should use the Admatic central endpoint defaults supplied by Site Installer / Kit Factory; do not require manual endpoint setup in the generated project package


- Every page must include title, slug, type and populated inline Elementor content array
- Every template must include title, slug, type and populated inline Elementor content array
- Header template must be populated
- Footer template must be populated
- Reusable section templates must be populated
- Homepage/front page must be assigned/declared with is_front: true
- Header and footer must include location and conditions for global connection / Entire Site
- Menus must be defined as first-class data where relevant
- No empty templates
- No empty containers
- No placeholder-only sections
- No broken icon data
- No malformed Elementor data
- No missing image references
- No fixed/reused design
- Mobile-friendly container-based Elementor layouts
- Imported frontend styling must not depend on opening Elementor and clicking Update
- Elementor containers must be used instead of old section/column layouts where possible
- Use "elementor_header_footer" for page_layout_default and every page. Canvas is forbidden for production-standard projects because it suppresses global Theme Builder parts.

Recommended ZIP structure:
project.json
/assets/
/images/
/css/
/fonts/ only if legally allowed, otherwise do not include font files
/pages/
forside.json
om-os.json
ydelser.json
kontakt.json
/templates/
header.json
footer.json
/sections/
hero.json
services.json
trust.json
cta.json
faq.json
contact.json
/site-settings/
site-settings.json
/plugin-adapters/
adapter-manifest.json
sticky-header-effects.json
elementor-pro-forms.json
yoast-seo.json
tracking-placeholders.json


performance-images.json
menu-header-footer.json
mobile-cta.json
README-HANDOFF.txt
QA-CHECKLIST.txt

==================================================
SCHEMA REQUIREMENTS
==================================================

project.json must include:
- schema_version: "admatic-kitfactory-2.0"
- strict_validation: true
- project_standard with id "admatic-elementor-pro-production" and revision "2026-07-16-modern-v5-1"
- dependencies with required Elementor and Elementor Pro plugin declarations
- theme_builder with required global header/footer metadata
- project_name
- slug_prefix
- site_identity
- page_layout_default
- front_page
- site_settings
- pages
- templates
- sections
- menus
- plugin_adapters
- assets/media manifest where relevant
- design_blueprint for the per-project visual ruleset
- design_traceability for observed/adapted/inferred section decisions
- build_policy with clean_previous_build: true

Important:
Use the latest schema version that is recognized by the installed Kit Factory.
For the current stable workflow, use:
"schema_version": "admatic-kitfactory-2.0"

Do not emit the older 1.x schemas for newly generated projects.


Recommended per-project visual metadata:
- design_blueprint: the structured ruleset generated from the Prompt Manager fields
- design_traceability: section-level OBSERVED / ADAPTED / INFERRED decisions

These keys are additive metadata and must remain in project.json during normalization, build,
export and repair. They do not replace Elementor content or site_settings.

Native Elementor design contract:
- Keep project.json assets.css empty and do not package a design stylesheet under /assets/css/.
- Store visual tokens in Site Settings and component treatment in native Elementor container/widget controls.
- Reject Elementor custom CSS, button CSS classes, page/section classes and class-targeted design.
- Permit only the exact semantic global/header markers required by the production standard; they must not carry visual styling.

Example clean-build metadata:
"build_policy": {
  "clean_previous_build": true
}

Example:
"design_blueprint": {
  "design_setup_mode": "automatic",
  "design_preset": "auto_reference",
  "visual_personality": "infer",
  "spacing_density": "balanced",
  "corner_style": "infer",
  "media_source_policy": "licensed_stock_local",
  "reference_coverage": "single_screenshot",
  "reference_fidelity": "strict",
  "inference_policy": "conservative",
  "layout_archetype": "split hero with service-led homepage",
  "section_order_rules": "header, hero, trust, intro, services, reviews, CTA, footer",
  "header_rules": "logo left, navigation centered, primary CTA right",
  "hero_rules": "copy left, image right, compact trust row below CTA",
  "grid_card_rules": "six services in a 3x2 desktop grid",
  "spacing_container_rules": "consistent centered container and generous section rhythm",
  "typography_rules": "large compact headings and readable short text measures",
  "color_background_rules": "alternate neutral and brand-tinted sections",
  "image_treatment_rules": "consistent crop ratios and one radius family",
  "cta_form_rules": "one primary CTA style and one secondary text-link style",
  "responsive_rules": "stack hero copy before image and reduce grids to 2 then 1 column",
  "must_keep_rules": "reference hero balance and card treatment",
  "must_avoid_rules": "generic full-width blocks and one-column desktop card stacks"
},
"design_traceability": [
  {
    "section": "homepage hero",
    "status": "OBSERVED",
    "source": "uploaded desktop screenshot",
    "notes": "split composition and CTA placement follow the reference"
  },
  {
    "section": "contact CTA",
    "status": "INFERRED",
    "source": "Site Design Blueprint and established component family",
    "notes": "not visible in the supplied reference"
  }
]

Example top-level structure:
{
  "schema_version": "admatic-kitfactory-2.0",
  "strict_validation": true,
  "project_standard": {
    "id": "admatic-elementor-pro-production",
    "revision": "2026-07-16-modern-v5-1"
  },
  "dependencies": {
    "elementor": {
      "required": true,
      "plugin_file": "elementor/elementor.php",
      "minimum_version": "3.0.0"
    },
    "elementor_pro": {
      "required": true,
      "plugin_file": "elementor-pro/elementor-pro.php",
      "minimum_version": "3.0.0",
      "features": ["theme-builder", "nav-menu"]
    }
  },
  "project_name": "[PROJECT NAME]",
  "slug_prefix": "[project-slug]",
  "page_layout_default": "elementor_header_footer",
  "build_policy": {
    "clean_previous_build": true,
    "require_change_preview": true,
    "require_recovery_snapshot": true
  },
  "front_page": {
    "slug": "forside",
    "assign_as_homepage": true
  },
  "site_settings": {},
  "pages": [],
  "templates": [],
  "sections": [],
  "menus": [],
  "plugin_adapters": [],
  "approved_component_library": {
    "schema_version": "admatic.elementor-components.v1",
    "library_version": "1.0.0",
    "project_standard": {
      "id": "admatic-elementor-pro-production",
      "revision": "2026-07-16-modern-v5-1"
    },
    "policy": "approved-only",
    "components": [
      {"id": "global-header", "version": "1.0.0", "required": true},
      {"id": "global-footer", "version": "1.0.0", "required": true}
    ]
  },
  "theme_builder": {
    "required": true,
    "condition": "include/general",
    "display_scope": "entire_site",
    "templates": {
      "header": {"type": "header", "location": "header", "component": "global-header", "component_version": "1.0.0", "required_widget": "nav-menu", "frontend_marker": "admatic-global-header"},
      "footer": {"type": "footer", "location": "footer", "component": "global-footer", "component_version": "1.0.0", "required_widget": "nav-menu", "frontend_marker": "admatic-global-footer"}
    }
  },
  "frontend_screenshot_qa": {
    "required": true,
    "captures_per_page": 3,
    "max_pages": 4,
    "expected_captures": 12,
    "viewports": [
      {"name": "desktop", "width": 1440, "height": 1200},
      {"name": "tablet", "width": 834, "height": 1200},
      {"name": "mobile", "width": 390, "height": 1100}
    ]
  },
  "assets": {}
}

When frontend_screenshot_qa is included, set max_pages to at least the real page count and expected_captures to exactly page count × 3. Kit Factory captures automatically; missing comparison infrastructure is reported without discarding the project.


Local media manifest requirement:
project.json must include a local media manifest whenever the site uses images.

Recommended structure:

"assets": {
  "images": [
    {
      "id": "hero_barber",
      "path": "assets/images/hero-barber-shop.jpg",
      "filename": "hero-barber-shop.jpg",
      "alt": "Yas Barber barbershop stemning i Rødovre",
      "source_url": "https://unsplash.com/...",
      "provider": "Unsplash",
      "credit": "Photographer name",
      "generation_method": "photography",
      "width": 1600,
      "height": 1000,
      "usage": ["homepage hero background"],
      "import_to_media_library": true,
      "rewrite_elementor_references": true,
      "expected_elementor_rewrite_target": "homepage hero background"
    }
  ]
}

Every image referenced in Elementor content must match an entry in assets.images by id,
local path, filename or source/credit URL. Remote source URLs are metadata only and must
not be used as live Elementor image sources.

Client-owned image provenance must remain truthful. For a supplied file use:

{
  "id": "owner_portrait",
  "path": "assets/images/owner-portrait.jpg",
  "filename": "owner-portrait.jpg",
  "alt": "Business owner in the salon",
  "source_url": "client-provided://owner-portrait-original.jpg",
  "provider": "[CLIENT OR BUSINESS NAME]",
  "credit": "Client-owned image supplied for this project",
  "generation_method": "client_asset",
  "import_to_media_library": true,
  "rewrite_elementor_references": true
}

- Use client-provided:// plus a stable original filename or asset identifier for client_asset files when no real public source exists.
- A real HTTPS source is also allowed when the client supplied the file from an existing public source.
- Never invent a public HTTPS URL merely to satisfy validation.
- External stock/photography source and credit URLs must use HTTPS.

Pages:
Every page must include:
- title
- slug
- type
- content
- is_front: true for the homepage only where relevant
- template: "elementor_header_footer"
- page_settings where relevant
- seo where relevant

Templates:
Every template must include:
- title
- slug
- type
- content
- location where relevant, e.g. header or footer
- conditions where relevant, e.g. entire_site or include/general

Sections:
Every reusable section must include:
- title
- slug
- type
- content

Header/footer:
- Header must include location: "header"
- Footer must include location: "footer"
- Header/footer must include conditions for Entire Site
- Header/footer must be populated with real Elementor content
- Header and footer must use the approved global-header/global-footer component definitions and preserve their component metadata.
- Header must include component: "global-header" and component_version: "1.0.0"; footer must include component: "global-footer" and component_version: "1.0.0".
- The first root Elementor container in each global template must mirror those values in settings.admatic_component_id and settings.admatic_component_version.
- Header and footer must each contain an Elementor Pro Nav Menu widget connected to the appropriate WordPress menu.
- Header root must contain admatic-global-header; footer root must contain admatic-global-footer.
- The header root must retain flex_direction_mobile: "row", flex_wrap_mobile: "nowrap", justify_content_mobile: "space-between" and align_items_mobile: "center". The brand must be a real Image/Site Logo widget or, when no logo is supplied, a native Heading wordmark; placeholder logo images are forbidden. The Nav Menu Full Width control must be Yes, and the CTA must use Elementor hide_mobile. A generic responsive stacking rule must never overwrite these header-specific settings.
- Put admatic-header-brand directly on the Image, Site Logo or Heading wordmark widget with auto mobile width. Put admatic-header-menu directly on the Elementor Pro Nav Menu widget with auto mobile width. Never put either role marker on a surrounding container.
- Mark every desktop header button admatic-header-cta and set hide_mobile: "yes". Mobile shows only the brand/logo and Nav Menu toggle in the closed row; the dropdown panel may open beneath it.

Elementor Pro Theme Builder conditions:
- Header/footer conditions must use Elementor-safe string condition format.
- Use conditions like:
  ["include/general"]
- Do not store conditions as arrays of objects such as:
  [{ "type": "include", "name": "entire_site" }]
- Do not store conditions as nested arrays.
- The condition value passed to Elementor Pro must be a string, because Elementor Pro
parses conditions with slash-separated strings.
- This prevents Elementor Pro Theme Builder fatal errors after build.

==================================================


ADMATIC THEME REQUIREMENTS
==================================================

The package must target Admatic Theme v1.14.2+.

The package should target the Admatic Theme menu locations:
- primary
- footer

The main menu must use:
location: "primary"

Footer menu, if included, should use:
location: "footer"

The package should work with the Admatic Theme ecosystem dashboard and should help
the dashboard report correct readiness status after build.

Post-build, the Admatic Theme dashboard should be able to detect:
- homepage assigned
- Elementor pages created
- header template exists
- footer template exists
- primary menu assigned
- form widgets and actions
- no page/section classes; only the exact required semantic global/header markers
- performance/image status
- SEO/tracking readiness

==================================================
WORDPRESS SITE IDENTITY - MANDATORY
==================================================

Kit Factory must set basic WordPress site identity.

Set:
- Site title = client/business name
- Tagline = short local/service description
- Site language should match the requested language where possible
- Homepage should be assigned correctly
- Permalinks should be clean where possible

Do not leave default WordPress identity values such as:
- My new WordPress installation
- Just another WordPress site

Yoast/site schema should not remain with default placeholder site name after build.


README-HANDOFF.txt must mention whether any site identity settings need manual
confirmation.

==================================================

RICH ADAPTER CONTRACT
project.json must include canonical_baseline, adapter_manifest and 17 functional plugin_adapters. Write plugin-adapters/adapter-manifest.json, plugin-adapters/adapter-data.json and one <adapter_slug>.json file per functional adapter. adapter-manifest.json and adapter-data.json are aggregate documents and must never be counted as functional adapters.
