Skip to content

Add AGENTS.md - #34

Merged
MaggieCabrera merged 2 commits into
WordPress:trunkfrom
pattonwebz:add/agents-md
Sep 21, 2026
Merged

MaggieCabrera merged 2 commits into
WordPress:trunkfrom
pattonwebz:add/agents-md

Conversation

@pattonwebz

@pattonwebz pattonwebz commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

What this does

Adds AGENTS.md, so a coding agent session does not start by re-deriving the same rules about this repository. It covers where the markup lives, the conventions the theme follows, what must not be touched, and the couplings that break silently.

It is written from the tree rather than from general WordPress practice, and every path, slug and glob in it was checked against the repository.

What it documents

  • Layout — one row per directory or file, including that .github/ is repository tooling and never part of the theme.
  • The pattern is the source of truth — templates/*.html and parts/*.html are one-line delegates, so editing a template changes nothing at render time. Its two exceptions are called out: templates/page-sidebar.html holds its own markup and does not delegate, and parts/header.html delegates to ipsum/header-default.
  • Conventions — the ipsum text domain and the existing i18n spacing, the generic theme-1…theme-6 slugs that each color variation redefines (so a literal hex freezes one palette into every other), the pattern header keys for insertable patterns versus template replacements, tabs and the function_exists guard in PHP, and the prose "why" comments kept in style.css and assets/css/editor-style.css.
  • Do not reformat block markup — flush-left delimiters, one per line, are Gutenberg's serialization and an editor round-trip will undo a reindent.
  • What not to touch — the frozen 1.0.0 version and the absent changelog entries, the deliberate Requires at least: 7.1 placeholder, the .github demo content, blueprint and screenshots that are linked by URL, the @mobile/@tablet breakpoint keys, and --wp--custom--control-scheme, which is a fallback a color variation cannot set.
  • Couplings to keep in step — the comments CTA block binding, sidebar templates registered in two different places, the editor stylesheet mirror, and font credits.
  • Checking your work — there is no build step, and how to preview a branch in Playground.

One thing left out

The issue suggests linking CONTRIBUTING.md. It is not in the tree yet, and pull requests #2 and #16 each add one, so a link here would be dead until one of those lands — and would point at whichever version wins. A follow-up line is easy to add afterwards.

Fixes #4

AI disclosure: This code was aided and/or researched using AI. Deepseek Flash through Command Code harness. I take full responsibility for it's contents.

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: pattonwebz <williampatton@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: juanfra <juanfra@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 17, 2026
pattonwebz and others added 2 commits September 21, 2026 12:50
Every agent session otherwise starts from zero and re-derives the same rules
about this repository. This documents the layout, the conventions that are
easy to get wrong, and the things that must not be touched.

The pattern is described as the source of truth, since templates and parts are
one-line delegates to it and page-sidebar.html is the exception that does not
delegate. Also covered: the generic theme-1…theme-6 palette slugs that every
style variation redefines, Gutenberg's flush-left block markup, the frozen 1.0.0
version, and the couplings that break silently — the comments CTA block
binding, the two places sidebar templates are registered, the editor stylesheet
mirror, and the .github assets that are linked by URL.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Point agents at CONTRIBUTING.md for setup and pattern guidelines, keep only what is specific to this tree, and state each convention as the way to do it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MaggieCabrera
MaggieCabrera merged commit 81e00be into WordPress:trunk Sep 21, 2026
2 checks passed
@MaggieCabrera

Copy link
Copy Markdown
Contributor

I rebased and updated this. Thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AGENTS.md

2 participants