Commit 2 (final scope) of the in-plugin editorial image pipeline
(ARCHITECTURE.md #21). A deterministic local composer now runs between
provider bytes and sideload: Image A yields a corner-marked featured
(1200x632) + branded OG (1200x630, teal band, logo, baked caption in
Poppins SemiBold) + square card (1080x1080, cream panel, Poppins Bold,
teal footer with the reverse lockup); Image B gets the corner mark only.
- Capability ladder: imagick (full compositing) -> wp_get_image_editor
resize-only (unbranded, WARNING once) -> pass-through (WARNING once);
probe cached in prautoblogger_image_compose_capability, fingerprinted
by PHP version + imagick/gd presence so host flips auto-invalidate.
compose() never throws; composition can never fail a publish.
- Variants sideloaded with a role filename suffix; attachment meta
_prautoblogger_image_role + _prautoblogger_base_attachment_id; post
meta _prautoblogger_og_image_id (frozen for the rebuilt SEO stage) +
_prautoblogger_square_image_id. No cost-tracker rows ($0 local stage;
duration logged on the image_composer channel).
- New Images settings: compose_enabled ('1'), compose_variants
('og,square'), featured_mark_enabled ('1') — read at point of use.
Geometry ships as Layout defaults behind the
prautoblogger_image_compose_layout filter.
- Vendored brand rasters (assets/brand) + bundled OFL Poppins faces
(assets/fonts) for per-environment byte-stable output (stripImage +
PNG date/time chunks excluded). Validated on Hostinger PHP 8.3.30 /
ImageMagick 7.1.1-43: php -l clean on all touched files, double
render byte-identical (sha256), exact variant geometry.
- Fix: featured/Image B alt text is the editorial caption (was the
model name); model still persists in _prautoblogger_image_model.
- Image_Attacher extracted from Image_Pipeline (300-line compliance);
sideloader gains an optional filename suffix param (back-compat '').
- Version 0.16.0 -> 0.17.0 + CHANGELOG + ARCHITECTURE.md #21 +
CONVENTIONS.md composer guide in this commit. Unit tests: layout
clamp boundaries, capability ladder, cache invalidation, attacher
meta-linking, pipeline integration, imagick determinism (gated).
Agent-Session: engineer-prautoblogger-image-composer-20260611
Implements image-provider interface + Cloudflare Workers AI adapter with pricing and validator. Independent QA verdict: APPROVE on 52fd11e (qa-reviews/prautoblogger/2026-04-15-52fd11e2ce97dd9e659df5cc87ec1382a668bec1.md). All 4 CTO blockers resolved (PHPUnit retry mocks, XSS hardening on error strings, PHPCS on new files, 300-line cap via support-class extraction). PHPCS backlog (586 errors across 38 pre-existing files) remains on continue-on-error; Workstream C material.
* ci: add main-push audit tripwire
Flags direct pushes to main that did not come from a merged PR.
Free-plan workaround since branch protection requires GitHub Pro.
* docs: add Git Workflow section to CONVENTIONS.md
Documents the PR-gated review process enforced at the agent layer.
Free-plan workaround since branch protection requires GitHub Pro.
* ci: add Claude-powered CTO PR review workflow
Auto-reviews every PR with Claude Haiku 4.5 and posts a structured
review (APPROVE / REQUEST_CHANGES / COMMENT). Does NOT auto-merge — a
human still clicks Merge. Requires ANTHROPIC_API_KEY secret on the repo.
* ci: switch CTO reviewer from Anthropic direct to OpenRouter
Reuses the OPENROUTER_API_KEY secret that already backs the other AI
plugins. Consolidates AI spend on one bill. Model: anthropic/claude-haiku-4.5.
WordPress plugin that auto-researches topics from Reddit, generates
SEO-optimized articles via OpenRouter LLMs, runs them through a chief
editor agent, and publishes on a daily schedule.
Includes:
- Full generation pipeline (collect → analyze → score → generate → review → publish)
- Cost tracking and budget enforcement
- Admin UI: settings, review queue, metrics, activity log
- CI/CD pipeline (GitHub Actions → WordPress REST deploy)
- Unit test suite (PHPUnit + Brain Monkey)
- Structured logging with configurable verbosity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>