# BW AI Schema Pro — Architecture

**Version:** 2.1.3 | **Last Updated:** 2026-05-06

## Overview

(Stub — pre-existing plugin imported on 2026-05-06. High-level: AI-optimized schema markup with admin UI, blocks, author/team detection, and template-based rendering. Detailed architecture write-up pending — fill in by reading the code.)

## File Layout

```
bw-ai-schema-pro/
├── bw-ai-schema-pro.php       Main plugin file, bootstrap (~1k lines incl. activation/deactivation hooks)
├── includes/                   Core classes (see "Core Classes" below)
│   ├── class-bw-schema-*.php  All class files use legacy `bw-schema-` prefix (see CLAUDE.md)
│   └── schemas/                Schema definitions
├── admin/                      Admin UI
├── assets/                     Frontend CSS/JS
├── blocks/                     Gutenberg blocks
├── vendor/plugin-update-checker  YahnisElsts plugin update checker v5.6
└── docs/                       Dev docs (not shipped in releases)
```

## Core Classes

| Class | File | Responsibility |
|---|---|---|
| `BW_AI_Schema_Pro` | `bw-ai-schema-pro.php` | Main bootstrap |
| `BW_Schema_Core` | `includes/class-bw-schema-core.php` | (TBD — read code) |
| `BW_Schema_Renderer` | `includes/class-bw-schema-renderer.php` | (TBD) |
| `BW_Schema_Cache` | `includes/class-bw-schema-cache.php` | (TBD) |
| `BW_Schema_Security` | `includes/class-bw-schema-security.php` | (TBD) |
| `BW_Schema_Blocks` | `includes/class-bw-schema-blocks.php` | (TBD) |
| `BW_Schema_Hooks` | `includes/class-bw-schema-hooks.php` | (TBD) |
| `BW_Schema_Helpers` | `includes/class-bw-schema-helpers.php` | (TBD) |
| `BW_Schema_Templates` | `includes/class-bw-schema-templates.php` | (TBD) |
| `BW_Schema_Admin` | `includes/class-bw-schema-admin.php` | (TBD) |
| `BW_Schema_Author_Box` | `includes/class-bw-schema-author-box.php` | (TBD) |
| `BW_Schema_Author_Override` | `includes/class-bw-schema-author-override.php` | (TBD) |
| `BW_Schema_Team_Detector` | `includes/class-bw-schema-team-detector.php` | (TBD) |
| `BW_Schema_Team_Member` | `includes/class-bw-schema-team-member.php` | (TBD) |

## Hooks

### Actions
(TBD — grep `do_action` in source.)

### Filters
(TBD — grep `apply_filters` in source.)

## Data Storage

(TBD — grep `get_option`, `update_option`, `get_post_meta`, `set_transient`, `$wpdb` in source. **This inventory is a prerequisite for the 3.0.0 prefix-rename data migration in ROADMAP.md.**)

## External Dependencies

- `vendor/plugin-update-checker` — YahnisElsts plugin update checker v5.6

## Security Notes

(TBD — review `class-bw-schema-security.php` and document.)
