agentic-wp

agent
Security Audit
Warn
Health Warn
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 45 GitHub stars
Code Pass
  • Code scan — Scanned 5 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Agentic Custom WordPress Theme: a bare bones, minimal theme with strong basic patterns that AI coding CLIs like Claude Code can work with easily and without errors.

README.md

Agentic WP

Agentic Custom WordPress Theme

A bare bones, minimal custom WordPress theme with strong basic patterns that AI coding CLIs like Claude Code can work with easily and without errors.

Why

AI coding agents do their best work in codebases that are small, predictable, and explicit. Agentic WP removes the things that trip them up (template engines, build pipelines, hidden magic) and replaces them with a handful of patterns that repeat everywhere.

Agentic Optimizations

Everything below exists to make an agent faster, cheaper in tokens, and less likely to be wrong.

Shared instructions

  • One guide for every agent. AGENTS.md is the single source of truth. CLAUDE.md and GEMINI.md are one-line imports of it, so Claude Code, OpenAI Codex, and Gemini CLI all read the same instructions and they cannot drift apart.
  • A short guide. AGENTS.md is about 1,000 words. It is loaded into every session, so every line has to earn its place.
  • Task recipes. Step-by-step recipes for the common jobs (add a view, a section, a post type, a form, CSS, JS, an ACF field group) so an agent follows a known path instead of exploring.
  • Gotchas written down. The non-obvious traps (rewrite rules, the shared News and Press archive, footer-printed styles) are documented where an agent reads them first, with the reason for each.
  • Explicit "do not read" list. The guide tells agents to skip minified build output and to search, not read, the one large JSON file.
  • Self-maintaining rule. The guide instructs agents to update it in the same change whenever a pattern or command changes.

One-command verification

  • bin/check lints all PHP and compile-checks all SCSS in one call.
  • Quiet on success. It prints failures only, then a single OK or FAILED, so a passing run costs a few tokens instead of a wall of output.
  • Built-in smoke test. bin/check https://site.test also requests key routes, checks status codes (including a real 404), and scans the HTML for PHP errors, warnings, and notices.
  • Meaningful exit code. 0 means everything passed, so agents can chain it.
  • bin/build is the entire build: one command, three files, no configuration.
  • Zero-warning builds. SCSS uses @use instead of the deprecated @import, so the compiler prints nothing an agent has to read past.

Nothing to compile, cache, or install

  • Plain PHP views. No template engine, no compiled templates, no template cache to clear. Edit, reload, done.
  • No PHP dependencies. No vendor/ folder, no composer install, no lock file.
  • No npm, webpack, or vite. No node_modules/ for a search to wander into.
  • JavaScript ships as written. No bundler and no transpile step.
  • No .env file. Configuration is WordPress constants in wp-config.php, the place an agent already expects.

Predictable structure

  • functions.php is the index. It only loads lib/, one commented line per file, grouped by purpose. Reading 25 lines tells an agent where everything is.
  • Thin controllers. Every WordPress template is a few lines: gather data, pass a plain array to one view.
  • One controller, one view. A table in AGENTS.md maps each template to its view file.
  • Output-only views. Queries and data shaping never live in a view, so an agent always knows which file to change.
  • Shared view data in one function. view_globals() lists every variable available to every view.
  • One file per concern. Every removal of WordPress behavior is in lib/cleanup.php and nowhere else. No duplicated or overlapping hooks to reconcile.
  • Identical post type classes. Each custom post type is one small class with the same shape. Adding one is copy, rename, register.
  • Data-driven extension points. Assets are one array row each. Forms are one array each. Flexible sections are one JSON layout plus one partial. Common changes are edits to data, not new logic.
  • Schema in git. ACF field groups are JSON files in config/, so an agent can read and change the content model without the database or the admin UI.
  • Forms without migrations. Submissions are stored as JSON, so adding or changing fields never needs a schema change.

Small and readable

  • The whole theme fits in context. About 5,000 lines including SCSS, field definitions, and these docs.
  • Small files. Most controllers are under 20 lines and most views under 50.
  • Consistent naming. AgenticWP\ namespace for view helpers, agenticwp_ prefix for hooks, Kevinlearynet_ prefix for classes, BEM for CSS. One grep finds the thing.
  • Docblocks state intent. File and function headers say what a file owns and why an unusual choice was made.
  • No dead code. Unused helpers, stale config, and broken asset references are removed rather than left to mislead.

Agent instruction files

File Read by Contents
AGENTS.md OpenAI Codex (and other tools that follow the AGENTS.md convention) The full guide: commands, architecture, recipes, gotchas
CLAUDE.md Claude Code Imports AGENTS.md
GEMINI.md Gemini CLI Imports AGENTS.md

Edit AGENTS.md only.

Getting started

  1. Clone into wp-content/themes/agentic-wp/ inside a WordPress install.
  2. Install and activate Advanced Custom Fields Pro. Field groups load from the theme's config/ folder.
  3. Activate the theme and flush rewrite rules:
wp theme activate agentic-wp
wp rewrite flush
  1. Open the theme folder in your AI coding CLI of choice and start asking for changes.

How it works

namespace AgenticWP;
get_header();
the_post();
render_view('single', ['key' => $value]);
get_footer();

A root template (single.php) is the controller. render_view() resolves views/single.php, merges shared globals (title, content, thumbnail, acf, and more) with the data passed in, and renders it inside views/layout.php.

agentic-wp/
├── *.php            Controllers (WordPress template hierarchy)
├── functions.php    Index of lib/
├── views/           Output-only PHP views
│   ├── partials/    Shared markup
│   └── sections/    One partial per flexible content layout
├── lib/             Helpers, hooks, cleanup, post types, forms
├── config/          ACF field groups as JSON
├── assets/          SCSS and JS source, CSS compiled to assets/dist/
└── bin/             check and build

Commands

bin/check                      # lint PHP, compile-check SCSS
bin/check https://site.test    # plus an HTTP smoke test
bin/build                      # compile SCSS with dart-sass

License

MIT

Reviews (0)

No results found