You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decided 2026-07-29 (supersedes brmbh/cli#8). The CLI is not retired — its relationship to the theme inverts, and it moves into this repo.
The problem being solved
Everything the CLI does today is copied or frozen at scaffold time, so improvements never reach existing sites. Retiring the CLI into theme-side tools/*.sh does not fix this — copied scripts freeze exactly like copied skills do. The fix is to make the tooling a dependency the theme consumes, rather than files it contains.
Old: CLI (npm) → clones theme (git) → theme is standalone forever after. CLI is upstream and then irrelevant.
New: theme (git, copied/forked) → depends on @brmbh/cli (npm) → stays connected, updatable via npm update.
The rule
Theme = what you own and edit. Package = what you consume and update.
Test for any file: would a client project ever edit this? If no, it belongs in the package.
The deploy scripts already read only exported shell vars (see the 2026-07-13 env-loading fix), so they move cleanly while the env files they consume stay per-project.
Target layout — one repo, two artifacts
brmbh/wordpress/
├── skills.sh.json ← npx skills add brmbh/wordpress keeps working
├── skills/wordpress/ ← pre-scaffold skill (the marketing entry point)
├── packages/cli/ ← published to npm as @brmbh/cli
│ ├── AGENTS/ ← the 10 in-project skills live HERE now
│ └── tools/ ← deploy, db, doctor, generators
└── (theme at root) ← style.css, functions.php, my-acf-blocks/, inc/ …
git clone of this repo still yields a working theme. packages/ is stripped from scaffolds by the personalization step (#4).
Why this makes skills updatable
If AGENTS/*.md ships inside the npm package instead of being copied into each site, npm update @brmbh/cli updates the skills. The .claude/.cursor/.windsurf/ wrappers become generated artifacts pointing at node_modules/@brmbh/cli/AGENTS/<name>.md — gitignored, regenerated on install.
Three tracked problems dissolve: brmbh/cli#3 (no refresh path), #3 here (committed wrappers already drifted), and the whole "which copy is canonical" question in #2 / brmbh/cli#5 / brmbh/cli#6.
Projects that need a tweaked skill get a local AGENTS/ override that wins over the package copy — so one customized skill does not cost you updates to the other nine.
Forever after: npx brmbh <cmd> hits the pinned local copy; npm update @brmbh/cli pulls new tooling and new skills
The package is used twice — transiently via npx to scaffold, then permanently as a devDependency.
Free bug fix
npx @brmbh/cli currently fails with "could not determine executable to run" because the package declares two bins (brmbh, create-brmbh). Drop the create-brmbh bin — with a single bin npx runs it regardless of name, so npx @brmbh/cli create my-site works. This also retires the npx create-brmbh 404 by deletion instead of by publishing a second package, closing Alignment Plan item 1.
Decided sub-questions
Wrapper generation:postinstallplus an explicit npx brmbh skills sync fallback (postinstall can be skipped with --ignore-scripts). The pre-scaffold skill calls the explicit command after scaffolding.
Zero-npm-install clone: no longer fully functional — deploy and db sync will require npm install first. Accepted: npm install is already required for the CSS build. Must be stated in the README rather than discovered.
Migration order
Create packages/cli/, move the CLI source in from brmbh/cli (preserve history if practical)
Move AGENTS/*.md and the generic tools/* into the package; leave tools/env/ behind
Point wrapper generation at node_modules/@brmbh/cli/AGENTS/; gitignore the wrapper dirs
Implement the local-AGENTS/-override precedence rule
Drop the create-brmbh bin; verify npx @brmbh/cli create live
Decided 2026-07-29 (supersedes brmbh/cli#8). The CLI is not retired — its relationship to the theme inverts, and it moves into this repo.
The problem being solved
Everything the CLI does today is copied or frozen at scaffold time, so improvements never reach existing sites. Retiring the CLI into theme-side
tools/*.shdoes not fix this — copied scripts freeze exactly like copied skills do. The fix is to make the tooling a dependency the theme consumes, rather than files it contains.Old: CLI (npm) → clones theme (git) → theme is standalone forever after. CLI is upstream and then irrelevant.
New: theme (git, copied/forked) → depends on
@brmbh/cli(npm) → stays connected, updatable vianpm update.The rule
Test for any file: would a client project ever edit this? If no, it belongs in the package.
my-acf-blocks/,template-parts/,inc/tools/deploy.sh,db-*.sh,uploads-*.sh,sync-plugins.sh,version-check.shstyle.css,theme.json,functions.php, SCSStools/sync-tokens.mjs,tools/sass-with-theme-flags.shtools/env/*.env— per-project, gitignoredAGENTS/*.md— the 10 in-project skill docsdoctor,init/create, block + CPT generators.claude/.cursor/.windsurf/The deploy scripts already read only exported shell vars (see the 2026-07-13 env-loading fix), so they move cleanly while the env files they consume stay per-project.
Target layout — one repo, two artifacts
git cloneof this repo still yields a working theme.packages/is stripped from scaffolds by the personalization step (#4).Why this makes skills updatable
If
AGENTS/*.mdships inside the npm package instead of being copied into each site,npm update @brmbh/cliupdates the skills. The.claude/.cursor/.windsurf/wrappers become generated artifacts pointing atnode_modules/@brmbh/cli/AGENTS/<name>.md— gitignored, regenerated on install.Three tracked problems dissolve: brmbh/cli#3 (no refresh path), #3 here (committed wrappers already drifted), and the whole "which copy is canonical" question in #2 / brmbh/cli#5 / brmbh/cli#6.
Projects that need a tweaked skill get a local
AGENTS/override that wins over the package copy — so one customized skill does not cost you updates to the other nine.The flow end to end
npx skills add brmbh/wordpress— marketing entry, unchangednpx @brmbh/cli create my-site— no global install; npx fetches latest on demandcreatecopies the theme, renames it (65 strings — Theme should declare its own scaffold contract so the CLI can personalize it #4 / create: scaffolded theme keeps the starter's identity (name, text domain, package name) cli#1), writes"@brmbh/cli": "^1.0.0"into the new theme's devDependencies, runsnpm install, generates wrappers, builds, activatesnpx brmbh <cmd>hits the pinned local copy;npm update @brmbh/clipulls new tooling and new skillsThe package is used twice — transiently via npx to scaffold, then permanently as a devDependency.
Free bug fix
npx @brmbh/clicurrently fails with "could not determine executable to run" because the package declares two bins (brmbh,create-brmbh). Drop thecreate-brmbhbin — with a single bin npx runs it regardless of name, sonpx @brmbh/cli create my-siteworks. This also retires thenpx create-brmbh404 by deletion instead of by publishing a second package, closing Alignment Plan item 1.Decided sub-questions
postinstallplus an explicitnpx brmbh skills syncfallback (postinstall can be skipped with--ignore-scripts). The pre-scaffold skill calls the explicit command after scaffolding.npm installfirst. Accepted:npm installis already required for the CSS build. Must be stated in the README rather than discovered.Migration order
packages/cli/, move the CLI source in from brmbh/cli (preserve history if practical)AGENTS/*.mdand the generictools/*into the package; leavetools/env/behindnode_modules/@brmbh/cli/AGENTS/; gitignore the wrapper dirsAGENTS/-override precedence rulecreate-brmbhbin; verifynpx @brmbh/cli createlivepackages/@brmbh/cli@1.0.0from the new locationBlocks / supersedes
Supersedes brmbh/cli#8. Dissolves brmbh/cli#3, brmbh/cli#5, brmbh/cli#6, #2, #3. Relocates brmbh/cli#1, brmbh/cli#2, brmbh/cli#7 into this repo. #4, #5, #6, #7 stay valid and unaffected.
Vault:
Automatic-Brain/Projects/brmbh-agentic-wp-suite/dashboard.md