Skip to content

About

Rules, skills, slash commands and a deploy kit that teach Claude Code how to build WordPress (Sage/Bedrock, Tailwind v4) and front-end projects — auto-synced to every machine.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AI Dev Standards & Playbook — rules, skills and commands that teach Claude Code how to build WordPress and front-end projects

Validate Docs site Version 1.7.1 Public, generic standards

Why · What's inside · Install · Daily use · Auto-update · What loads when · What's new · Change a rule · Docs site ↗


One repo that teaches Claude Code how I build WordPress and front-end projects, and keeps every machine in sync.

Coding standards, SEO rules, writing voice, reference docs, slash commands, a reviewer agent and a drop-in deploy kit. Install once; every merge to main updates every Claude Code session automatically.

Maintained by Matt Hummel, full-stack & WordPress developer in Gettysburg, PA.

🎯 Why this exists

Every always-on instruction costs tokens in every session, and standards that live in one project don't follow you to the next. This repo fixes both.

📍 One source of truth How work gets done — standards, security, SEO, voice — in one place, for every project.
🪶 Loads only what's needed One core rule under 1 KB is always on. Everything else loads by file path or when a skill is used.
🔁 Auto-updates A SessionStart hook pulls main and re-installs on every new Claude Code session.
🔓 Public and generic No hosts, logins, client names or product data. Project facts stay in each project's CLAUDE.md.
flowchart LR
  A[PR merged to main] --> B[SessionStart hook<br/>scripts/sync.sh] --> C[~/.claude<br/>rules · skills · commands] --> D[Claude Code session]
  style A fill:#0a66c2,color:#fff,stroke:none
  style D fill:#0f766e,color:#fff,stroke:none
Loading

📦 What's inside

Area What you get Loads
📐 Rules rules/ core.md (always on, < 1 KB) · WordPress standards, stack and review rules · Sage/Roots conventions · frontend/UX · SEO, GEO and analytics · marketing copy · business ops By file path
🧠 Skills skills/ doc-references · content-writer · growth-design · portfolio-seo · geo-blog-post · sage-architecture · sage-project · theme-baseline · token-discipline · seo-improvement · playbook-guides When the task needs them
⌨️ Commands commands/pb/ /pb:new-theme · /pb:dev · /pb:new-project · /pb:blueprint · /pb:plan · /pb:fix · /pb:review · /pb:ship When you type them
🕵️ Agent agents/ wp-reviewer — senior WordPress/Sage review of a diff before a PR On request / proactively
🪝 Hook hooks/ phpcs-on-edit.sh — runs PHPCS on every PHP file Claude edits and feeds errors back After every edit
📁 Project template templates/project/ CLAUDE.md, .claude/settings.json (permissions + WebFetch allowlist), GitHub Actions deploy over SSH with health check and auto-rollback, setup scripts Copied into each repo
📖 Guides playbook/ Automated ship workflow · Token discipline · Rules architecture Read by humans
🛠 Scripts scripts/ install.sh · sync.sh · doctor.sh · new-theme.sh · wp-local.sh · new-project.sh · cloud-install.sh · lib-wp.sh · validate.py · build-docs.py Run by you / CI
🌐 Docs site docs/ Generated from the live rules, skills, commands and agents → matthummel-pa.github.io/ai-dev-standards-playbook On every merge
🧠 Skills at a glance
Skill Use it when
doc-references Before writing code against an API you haven't verified this session. Lists the official docs for WordPress, Roots/Bedrock, Tailwind, MDN, WHATWG, W3C/ARIA, web.dev, caniuse, TypeScript, React, Next.js, Node, NestJS and SEO, with a source-precedence rule.
content-writer Writing or editing visitor-facing copy, posts and emails. Adds Editor's Notes when editing someone else's text.
growth-design Landing pages, conversion copy, visual polish or a design review (marketer, graphic designer, web designer personas).
portfolio-seo Writing or auditing portfolio, service or project pages.
geo-blog-post Drafting a blog post for Google AI Overviews and LLM search (BLUF, E-E-A-T, FAQ, Article JSON-LD).
sage-architecture Adding ACF fields in PHP, Customizer settings, dark-mode defaults, the Tailwind/theme.json token bridge, or deploy workflows.
sage-project Starting a new Sage theme, or cloning/running/branching an existing theme repo locally with WordPress Studio and Vite.
theme-baseline Setting up a theme locally, bringing one up to the shared baseline, or shipping a site you host over SSH. A theme sold as a zip keeps its release workflow.
token-discipline Starting work, planning a fix, or when you want fewer tokens or a cheaper model: one task, named files, CI for checks.
seo-improvement Auditing and fixing a WordPress site's SEO in stages, from repo and rendered-page evidence. Asks before robots, redirect, canonical or indexing changes.
playbook-guides Before a ship, a plan, a rules change, or when asked how standards load. Points at the three guides in playbook/.
⌨️ Commands at a glance
Command What it does
/pb:new-theme <slug> <url> ["Name"] Scaffolds a new Sage 11 theme repo (Vite, Tailwind v4, project template), builds it, and starts its local Studio site.
/pb:dev [up | dev | get | branch | use | clear | doctor] Runs or edits a theme repo locally: Studio site, theme link, Vite hot reload, a worktree per branch.
/pb:blueprint [what] Writes a gitignored blueprint/ (research, then sitemap and wireframe) and builds theme.json, templates, copy, and schema from it.
/pb:new-project [slug] [url] Copies the project template into the current repo without overwriting anything.
/pb:plan <what> Plans a large change before coding.
/pb:fix <what> Fixes a bug or makes a small change end to end, then ships it.
/pb:review [PR] Senior WordPress/Sage review of the current branch or a PR.
/pb:ship Runs checks, commits, pushes and opens a PR with auto-merge.
🗜 Repo layout
rules/                 Path-scoped rules → ~/.claude/rules/playbook/
  core.md                the only always-on rule (< 1 KB)
  wordpress/             WordPress standards, stack, review  (*.php, theme.json, block.json)
  frontend/              Design tokens, UX states, WCAG 2.2   (css, js, Blade)
  marketing/             Voice, funnels, proof, social, email (*.md)
  business/              Scopes, comms, launch, handoff       (docs/, proposal and scope files)
  sage/                  Sage/Roots conventions               (app/, resources/, vite.config.js)
  seo/                   AI-search / GEO, SEO and analytics   (Blade, seo*.php, *.mdx, *.md)
skills/                On-request skills → ~/.claude/skills/<name>/
commands/pb/           Slash commands → /pb:ship /pb:fix /pb:plan /pb:review /pb:blueprint /pb:new-project /pb:new-theme /pb:dev
agents/                Subagents (wp-reviewer)
hooks/                 Hook scripts (PHPCS on edit)
templates/project/     Drop-in kit: CLAUDE.md, settings, SSH deploy + rollback
playbook/              Guides: ship workflow, token discipline, rules architecture
docs/                  Docs site source (template + assets); index.html is built in CI
scripts/               install, sync, doctor, new-project, new-theme, wp-local, cloud-install, lib-wp, validate, build-docs

🚀 Install (2 minutes)

In Git Bash (Windows), WSL or macOS:

git clone https://github.com/matthummel-pa/ai-dev-standards-playbook.git ~/code/ai-dev-standards-playbook
bash ~/code/ai-dev-standards-playbook/scripts/install.sh

install.sh copies the playbook into ~/.claude and adds one SessionStart hook to ~/.claude/settings.json (backup kept at settings.json.bak-playbook). Copies, not symlinks, so it works on Windows without Developer Mode. Do not copy the rule files into each theme; project facts stay in that repo's CLAUDE.md.

🛠 Daily use

cd ~/code/my-theme

In Claude Code: /pb:new-project my-theme https://example.com, then /pb:fix … and /pb:ship.

flowchart LR
  F["/pb:fix · /pb:ship"] --> P[PR opens<br/>auto-merge on] --> C[CI green] --> M[squash-merge] --> D[deploy.yml<br/>build · swap over SSH] --> H{health check}
  H -- ok --> L[live]
  H -- fails --> R[auto-rollback<br/>to previous build]
  style F fill:#7c3aed,color:#fff,stroke:none
  style L fill:#0f766e,color:#fff,stroke:none
  style R fill:#be123c,color:#fff,stroke:none
Loading

Full loop in playbook/automated-ship-workflow.md.

🔁 How auto-update works

  1. Merge a change to main.
  2. The next Claude Code session anywhere runs scripts/sync.sh: git pull --ff-only, then re-copies rules, skills, commands, agents and hooks into ~/.claude.
  3. Nothing changed → silent. Something changed → one line: Playbook rules updated to abc1234 (…).

Rules load at session start, so a change shows up in the session after the one that pulled it. To apply now: bash ~/code/ai-dev-standards-playbook/scripts/sync.sh, then restart Claude Code. bash scripts/doctor.sh checks that the install matches the repo and reports how many bytes of rules load per file type; doctor.sh worktrees <repo> lists merged worktrees you can remove.

🪶 What loads when

flowchart LR
  subgraph always["Always on"]
    core["rules/core.md<br/>under 1 KB"]
    claude["project CLAUDE.md"]
  end
  subgraph path["By file path"]
    wp["wordpress/*.md<br/>*.php · theme.json"]
    sage["sage/sage.md<br/>app/ · resources/"]
    seo["seo/*.md<br/>Blade · seo*.php · *.md"]
    fe["frontend/frontend-ux.md<br/>css · js · Blade"]
    mk["marketing/marketing-copy.md<br/>*.md · *.mdx"]
    biz["business/business-ops.md<br/>docs/ · proposal and scope files"]
    proj["project .claude/rules/"]
  end
  subgraph demand["On demand"]
    skills["skills/*<br/>body loads on use"]
    cmds["/pb:* commands<br/>only when typed"]
    agent["wp-reviewer agent"]
  end
  always --> path --> demand
  style always fill:#0a66c2,fill-opacity:0.12,stroke:#0a66c2
  style path fill:#0f766e,fill-opacity:0.12,stroke:#0f766e
  style demand fill:#7c3aed,fill-opacity:0.12,stroke:#7c3aed
Loading
Layer Where Loads Use for
Core rule ~/.claude/rules/playbook/core.md Every session 5–10 lines true everywhere
Path rules ~/.claude/rules/playbook/** with paths: When a matching file is read or edited Coding standards per file type
Skills ~/.claude/skills/<name>/SKILL.md Description always; body on use Long playbooks
Commands ~/.claude/commands/pb/*.md When you type /pb:… Repeatable workflows
Project CLAUDE.md Repo root Every session in that repo Project facts, commands, hard no's
Project rules Repo .claude/rules/ By path in that repo Private infra and product details

Rule of thumb: true everywhere and one line → core · about a file type → path rule · a procedure → skill · triggered on purpose → command · names a host, path or client → the project repo, never here. Details in playbook/rules-architecture.md.

🆕 What's new

Full history in CHANGELOG.md.

Version Highlights
1.7.1 Blog rules aligned: one primary reader per post, grade 6–8, Power Platform keyword pillar removed.
1.7.0 Claude Code only again: Cursor plugin, generated rules and export script removed; /pb:* command names restored.
1.6.3 /pb:blueprint, seo-improvement and playbook-guides, scripts/doctor.sh, LF line endings enforced, business-ops loads on fewer files.
1.6.2 doc-references adds the Freemius Help Center; freemius.com joins the project template's WebFetch allowlist.
1.6.1 Project rules win on text domain, commands, target size, and deploy; new-project.sh leaves an existing deploy workflow alone.
1.6.0 theme-baseline and token-discipline skills; scripts/cloud-install.sh (PHP, Composer, WP-CLI for a cloud agent).
1.4.0 sage-project skill, /pb:new-theme and /pb:dev: scaffold and run Sage 11 themes locally with WordPress Studio and Vite.
1.3.0 Five topic rules absorbed into the playbook (stack, frontend/UX, SEO analytics, marketing, business ops); WCAG 2.2 AA everywhere.
1.2.1 README redesign: banner, badges, section nav, mermaid diagrams, collapsible reference tables, footer.
1.2.0 GitHub Pages docs site generated from the live rules, skills, commands and agents (scripts/build-docs.py).
1.1.0 doc-references skill (canonical docs for the whole stack + verify-before-coding rule); WebFetch allowlist in the project settings.json.
1.0.0 Core + path rules, five skills, /pb:* commands, wp-reviewer agent, PHPCS hook, project template with SSH deploy and rollback, install/sync scripts, validation CI.

✏️ Change a rule

  1. Branch. Edit. Add a CHANGELOG.md line; bump VERSION if behavior changes.
  2. Open a PR. validate.yml checks frontmatter, size budgets, private details and shell scripts.
  3. Merge. Every machine picks it up on its next session, and the docs site rebuilds from the new frontmatter.

Preview the docs site locally: python3 scripts/build-docs.py then open docs/index.html.

Public vs private

This repo is public and holds generic standards only. Hosts, paths, plugin names, logins and product catalogs live in each project's own CLAUDE.md and .claude/rules/. scripts/validate.py blocks obvious private details and secrets from landing here.


Docs site · Changelog · Guides · Issues · matthummel.com

Built for Claude Code · WordPress · Sage/Bedrock · Tailwind CSS v4 · GitHub Actions
↑ Back to top

About

Rules, skills, slash commands and a deploy kit that teach Claude Code how to build WordPress (Sage/Bedrock, Tailwind v4) and front-end projects — auto-synced to every machine.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages