# Site Content Domain Core

Audience: AI coding agents first.

- **ID:** IPZ-SITE-CONTENT-DOMAIN-CORE-2026-08-14
- **Status:** IDLE
- **Task IDs:** 69, 70, 71, 72, 73, 74
- **Source request:** Add smallest dormant Site Content identity, block segment codec, and block-template translation adapter slice from preserved WIP. Correct review blockers: PHPUnit must load fixture bootstrap; production Site Content class files must pass canonical filename checks. Follow-up: preserve the targeted codec test after cleanup of an invalid filename experiment. Harden provider translation validation to reject WordPress shortcode-shaped input in plain and rich segment formats before any block write.

## Outcome

Provide compatible, unreachable library classes for Site Content identity and block-content translation. No runtime registration or feature surface.

## Acceptance criteria

- Add only `SiteEntityIdentity`, `BlockSegmentCodec`, focused codec test, bounded identity test if needed, this plan, and index.
- Preserve safe parsing, block round-trip fidelity, malformed block failure behavior, placeholder stability, and identity validation.
- `BlockTemplateTranslationAdapter` and its test remain in preserved blocked source/v2 until catalog, repository, and context contracts land together; do not add their dependencies to this slice.
- No consumer activates Site Content code.
- Focused tests, syntax, exact scoped PHPCS, PHPStan, diff check, no runtime registration, and hooks pass with no suppression or ignored diagnostics.
- Provider translations reject WordPress shortcode tokens, closing and enclosing forms, and argument forms in both `plain` and `rich` segment formats; incomplete bracket prose remains valid.

## Preserved WIP

- Read-only source: `/home/user/Projects/Press.zone/wordpress/wp-content/.worktrees/remaining-release-orchestration`.
- Target: `/home/user/Projects/Press.zone/wordpress/wp-content/.worktrees/ipz-site-content-domain-core` from current `origin/master`.
- Reconcile behavior only. Do not import blocked v2 formatting output.

## Constraints

- Classes remain dormant and unregistered.
- Do not add handlers, repository, catalog, context, routing, API, UI, or jobs.
- No feature flag: unreachable compatible library code needs none.
- Another agent owns all other files.

## Execution

1. Copy and normalize identity and codec library classes from preserved WIP.
2. Remove adapter and its test because they require excluded catalog, repository, and context contracts.
3. Add focused codec and identity behavior coverage.
4. Prove no Site Content runtime registration.
5. Run focused quality gates and commit.

## Current receipt

Amended `c9977245180fd6ae70c99d6c0c189b517e77354e` as `c4e5c6fea`: `BlockSegmentCodec::validate_translation()` rejects WordPress shortcode-shaped provider output before any translated attribute or text write. It uses `get_shortcode_regex()` when WordPress exposes it; otherwise a conservative pattern rejects named opening, closing, and argument forms while allowing incomplete bracket prose.

Focused coverage preserves existing markup/entity/quote tests and adds shortcode token, closing, argument, and rich enclosing-form cases, plus benign incomplete bracket prose. Configured focused PHPUnit passes: `23 tests, 65 assertions`. Full configured PHPUnit passes: `51 tests, 192 assertions`. PHP syntax, exact scoped production PHPCS, PHPStan, whitespace diff checks, and installed pre-commit hook pass.

Candidate-aware PHPCS against the required test filename remains incompatible with PHPUnit discovery for immutable `BlockSegmentCodecTest`; no rename, custom discovery, or suppression was added. No runtime Site Content registration was introduced.

## Next executable action

Await integration or a new requested Site Content slice.
