# BW Pre-Heading — Claude Development Guide

**Version:** 0.1.3 | **Last Updated:** 2026-05-01

## What this plugin does

Ships a single Gutenberg block (`bw/pre-heading`) that renders a Prompt Victoria-style hero eyebrow: a blinking terminal-prompt SVG followed by a short date · venue line. The block exposes dropdowns for prompt-icon color, text color, and alignment, and an inline RichText field for the label itself.

## Before making changes

1. Read `docs/SESSION-LOG.md` for recent context.
2. Read `docs/HANDOFF-NOTES.md` for any pending async messages.
3. Read `docs/SPEC.md` for current requirements.
4. Check `docs/KNOWN-ISSUES.md` for active bugs and workarounds.

## Versioning

- Patch (X.Y.Z): bug fix / small iteration.
- Minor (X.Y.0): new feature / task completion.
- Major (X.0.0): breaking change.

Every bump must update all four: plugin header, `BW_PRE_HEADING_VERSION` constant, `CHANGELOG.md`, this file's header.

## Architecture Quick Reference

- Main file: `bw-pre-heading.php` (plugin header + block registration, stays thin)
- Block source: `blocks/bw-pre-heading/`
  - `block.json` — manifest, attributes, enum-constrained colors/alignment
  - `index.js` — editor UI using `window.wp` globals (no build step)
  - `index.asset.php` — declares script dependencies
  - `render.php` — server-side render
  - `style.css` — frontend + editor shared visual rules
  - `editor.css` — editor-only tweaks
- Docs: `docs/`

## Conventions

- No JS build step. Editor code uses plain ES5-compatible JS against `window.wp.*` globals so the plugin is copy-deployable to any WP site without npm.
- Colors and alignment are whitelisted server-side against `enum` values from `block.json` — never trust attribute input directly when building inline `style=""`.
- Text content flows through `wp_kses( $text, array() )` to strip any HTML while preserving entities (RichText with `allowedFormats: []` already limits input, but defence-in-depth).

## Never

- Edit `vendor/` (third-party code).
- Commit secrets.
- Release with debug cruft present.
- Release with mismatched version numbers.
