# WebinarIgnition — Claude Code

Premium WordPress plugin (`webinarignition-premium/` on staging). PHP 7.4+, legacy + modern WP.

## Rule 0 (FIRST)

> **Cursor delegiert und liefert Beweise.**  
> **Claude Pro plant, denkt, strukturiert und produziert Code und Tiefe.**  
> **Composer nur Hände, nicht Kopf.**

Idee / Analyse / Plan-Discovery: `./scripts/wi-sub-go.sh --model opus --effort high --review-only` (or `opusplan --plan`) **before** deep Cursor-only research. See [.cursor/rules/00-wi-delegate-pro-first.mdc](.cursor/rules/00-wi-delegate-pro-first.mdc).

## Rules (Cursor is canonical)

| Layer | Path | When |
|-------|------|------|
| **Master** | [`.cursor/rules/`](.cursor/rules/) | Tobias edits here only |
| **Claude bundles** | [`.claude/rules/`](.claude/rules/) | Auto-synced, 1:1 from `.mdc` |
| **On-demand skills** | [`.claude/skills/`](.claude/skills/) | `/release`, `/deploy`, `/qa`, `/smoke`, `/beirat`, `/plan`, … |

After changing `.cursor/rules/`: `./scripts/wi-claude-rules-sync.sh` (or `./scripts/sync-cursor-rules-to-claude.sh`)

**Auto-sync (Phase 2):** Cursor hook runs the same script when you save a `.cursor/rules/*.mdc` or the manifest YAML.

**Session start (typical coding):** bundles `00-tobias-core` + `10-coding-journey` (~13k tokens). Deploy rules load when you touch `webinarignition.php` or `scripts/**`. Copy/i18n when you touch `languages/**` or `readme.txt`.

## Session playbook

- **New task** → `/clear` or new `claude --ide` session (do not keep one session all day).
- **Permissions** → `acceptEdits` in `~/.claude/settings.json` (edits auto; bash still asks).
- **Heavy coding** → Claude Code terminal (`claude --ide`). **Deploy + Smart QA matrix** → Cursor Agent when available.
- **Usage** → https://claude.ai/new#settings/usage (Pro quota, separate from Cursor).

## Hard stops (always)

- Never break `[webinarignition_*]` shortcodes or template names.
- Participant-Journey > Security > Compat > Speed > Admin-UX.
- Ship-set only: `webinarignition.php`, `inc/`, `UI/`, `admin/`, `assets/`, `templates/`, `css/`, `languages/`, `images/`, `font/`.
- No `127.0.0.1:7283` / agent debug ingest in plugin code.
- No commit without Tobias `working ✓`. Freemius only on explicit `push to Freemius` / `push to wp.org`.

## WI workflow (when deploying)

1. `php -l` on touched PHP; `node --check` on touched `assets/*.js`
2. Bump `Version:` + `WEBINARIGNITION_VERSION` in `webinarignition.php` together
3. SCP to `cloudways-wi-staging:public_html/wp-content/plugins/webinarignition-premium/`
4. `ssh cloudways-wi-staging "cd public_html && wp cache flush"`
5. Screenshot proof → `.cursor-wi-screenshots/ss-….png`

Staging: https://wordpress-1301098-5039235.cloudwaysapps.com/

## On-demand skills (invoke when needed)

| Skill | Use when |
|-------|----------|
| `/deploy` | Cloudways upload, version verify, cache |
| `/qa` | Smart QA, screenshots, smoke before user test |
| `/smoke` | 5-host journey + mail matrix |
| `/release` | Freemius, wp.org, commit scope |
| `/beirat` | Risky diff, Veto A/B/C, QA-Gate |
| `/plan` | go-ready plan, `plans/plan-status.yaml` |
| `/mail-cron` | Mail queue / cron tasks |
| `/license` | Freemius tiers, 100ms gates |
| `/architect` | Neues Agentensystem entwerfen (Meta-Design, Sparring, kleinste Agentenlandschaft) |
| `/life-navigator` | `/life-startup`, `/life-shutdown`, MICRO/FOKUS/Überblick, Life-Private in iCloud |

## Cursor orchestrates Claude Code (Sub-Go)

**Pattern:** Tobias triggers in Cursor chat. **Cursor Agent** orchestrates (scope, Veto, deploy, QA). **Claude Code** implements via `claude -p` (Claude Pro tokens). No IDE model switch needed unless you work in `claude --ide` yourself.

| You say | Cursor Agent | Claude Code |
|---------|--------------|-------------|
| **`Sub-Go: <task>`** | Scope, lint, deploy, screenshot, `waiting for working ✓` | Implements the task |
| **`Claude Code Sub-Review <scope>`** | Runs review, lists findings | Read-only analysis |
| **`Sub-Fix alle`** | Deploy + QA after fixes | Implements **all** findings from the **last** Sub-Review |
| **`Sub-Fix 1,3`** | Same, partial | Implements only those finding numbers |
| **`Sub-Go + Deploy: …`** | Explicit deploy/QA chain | Implements code |
| **`Sub-Go (sonnet): …`** / **`(opus): …`** / **`(opusplan): …`** / **`(fable): …`** | Passes `--model` to `claude -p` | Uses that model |

**Default:** auto-escalation below (unless Tobias names a model). Manual override: `(sonnet)` / `(opus)` / `(opusplan)` / `(fable)`.

**Zero-prefix (2026-07-10):** Ship-set code tasks need no `Sub-Go:` prefix — Cursor Agent runs [`scripts/wi-sub-go.sh`](scripts/wi-sub-go.sh) with `--model auto`. Escape: `cursor-only: …` stays in Cursor only. Questions/architecture: Cursor Ask (Opus/Fable), not `opusplan`.

**Examples:**

```
Sub-Go: refactor wi-builder-panel linked-page helper
Claude Code Sub-Review wi-builder-panel
Sub-Fix alle
Sub-Go + Deploy: fix catalog race in wi-builder-panel.js
Sub-Go (architect): entwirf ein Sub-Agenten-Setup fuer den Mail-Cron-Diagnosepfad
```

**CLI shape (Cursor runs this — prefer the runner):**

```bash
./scripts/wi-sub-go.sh --axxx A981 --prompt "…" --model auto --dirs inc,assets
# or direct:
claude -p "<prompt>" --permission-mode dontAsk --model sonnet --effort high --add-dir inc --add-dir assets
```

Uses Claude Pro quota (https://claude.ai/new#settings/usage), not Cursor Agent tokens. **No Cursor API pool** for Fable/Opus in the chat picker; heavy work via `claude -p` only.

### Sub-Go model policy (output-first, Claude Pro only)

**Principle:** Best code logic, usability, design, and copy. Do not avoid Opus/Fable for cost. Cursor Agent stays on **Auto** for orchestration; implementation via **Claude Code Pro** (`claude -p`).

| Role | Tool | Model |
|------|------|-------|
| Scope, Veto, deploy, QA, screenshots | Cursor Agent | Auto |
| Implementation, review, complex fixes | Sub-Go `claude -p` | sonnet → opus → fable |

#### Auto-escalation (Agent runs without asking)

1. **Default:** `--model sonnet --effort high`
2. **Plan / go-ready / P0…Pn:** `--model opusplan --effort high`
3. **Risky** (Journey, mail, SQL, legacy, AJAX): start sonnet; after iteration 1 without believable progress → **opus**
4. **Blockade** (2nd failed fix→deploy→QA cycle): **opus** with `--effort xhigh`
5. **Creative/complex**, Opus fails twice: **fable** with `--effort high`
6. **Limit hit:** note blocker + learnings; inform Tobias (5h window / weekly / Fable cap); do not fall back to Cursor API models

#### Fable 5 on Pro

- Use for real blockers and creative breakthroughs, not as daily default.
- Promo through 2026-07-12 PT: up to ~50% of weekly pool on Fable; after that usage credits.
- Hitting limits is OK; upgrade path: Max 5x ($100) or usage credits.

#### Escalated CLI examples

```bash
claude -p "<prompt>" --permission-mode dontAsk --model opusplan --effort high --add-dir inc
claude -p "<prompt>" --permission-mode dontAsk --model opus --effort xhigh --add-dir inc
claude -p "<prompt>" --permission-mode dontAsk --model fable --effort high --add-dir inc
```

**Transparency:** one chat line on escalate, e.g. `Sub-Go ↑ opus (legacy routing)` or `Sub-Go ↑ fable (2× opus, no progress)`.

#### Preflight

- `ANTHROPIC_API_KEY` unset? Else PAYG instead of Pro subscription.
- Long sessions: `claude /status` and https://claude.ai/new#settings/usage
- Sonnet 5: adaptive thinking on by default; set effort at launch (`--effort`), not mid `-p` session.

## Context files

- Ideas: [`.cursor/wi-current-ideas.md`](.cursor/wi-current-ideas.md)
- Staging access (local, gitignored): `STAGING-ACCESS.local.md`, `scripts/env/staging-wp-browser.local.env`
