# Agent Composer Configuration and Lifecycle

Composer stores runtime policy in versioned Config Sets. Only one validated Config Set is active per WordPress site. The active set is immutable; administrators clone it to create an editable working copy. New, cloned, imported, and restored sets remain inactive until explicit validation and activation.

## Starting presets

**Universal Gutenberg** supplies a minimal theme-neutral page contract using stable core blocks. **SmartCloud Recommended** adds a portable hero, feature grid, steps, optional FAQ, and closing action. **Detected Theme Starter** creates a safe site-local starter from a suitable registered pattern in the active theme and records its source plus current theme and capability fingerprints.

Selecting any preset creates a uniquely identified inactive working Config Set. It never overwrites or activates existing configuration. Site-specific WP Suite reference blueprints are not part of these three public starting paths.

## Site Contract

The Site Contract contains rules shared by all page types. Typical fields include allowed post types, editorial language, typography and visual guidance, common template expectations, media treatment, and design constraints such as theme-preset-only styling. It must not contain secrets, executable callbacks, PHP, JavaScript, or provider credentials.

## Blueprints

A Blueprint defines one semantic `page_type`. It selects the target WordPress post type and theme template, allowed patterns and Gutenberg blocks, required pattern sequence, word and H1 constraints, optional provider requirements, excerpt policy, and SEO behavior.

The excerpt policy is independent for each Blueprint:

- `required`: 80 to 300 characters;
- `optional`: empty, or 80 to 300 characters;
- `disabled`: must remain empty.

The Yoast meta description is separate and remains required at 120 to 160 characters.

## Editing and activation

Entity edits are staged in the browser. **Apply modifications** writes the complete changeset as one optimistic-concurrency-protected transaction; **Discard** performs no WordPress write. A successful apply recalculates the Config Set hash and modified time. Concurrent changes return a conflict instead of overwriting either version.

Before activation, **Theme & providers -> Rescan site** should confirm every referenced template, pattern, block, and provider. Validation creates a short-lived receipt bound to the exact checksum, site, and administrator. Activation is allowed only with a fresh receipt.

## Portability and rollback

**Compare to active** compares the selected set to the runtime configuration. **Restore archived as active** revalidates an archived configuration and requires confirmation. Exported Config Sets and full backups use checksums, exclude secrets and the site-specific audit chain, and always restore as inactive working sets.
