@wp-operations/wp-ops 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +6 -3
  2. package/package.json +6 -2
  3. package/src/commands/platform.js +58 -2
  4. package/src/commands/start.js +2 -2
  5. package/src/main.js +19 -8
  6. package/wp-operations/CHANGELOG.md +14 -0
  7. package/wp-operations/README.md +39 -0
  8. package/wp-operations/agents/builder/AGENT.md +15 -0
  9. package/wp-operations/assets/admin.css +631 -0
  10. package/wp-operations/assets/admin.js +614 -0
  11. package/wp-operations/assets/app/app.css +1 -0
  12. package/wp-operations/assets/app/app.js +70 -0
  13. package/wp-operations/assets/app/fonts/inter-medium.woff +0 -0
  14. package/wp-operations/assets/app/fonts/inter-regular.woff +0 -0
  15. package/wp-operations/assets/app/fonts/inter-semibold.woff +0 -0
  16. package/wp-operations/assets/app/login.css +42 -0
  17. package/wp-operations/assets/brand/icon.svg +20 -0
  18. package/wp-operations/assets/brand/mark.svg +19 -0
  19. package/wp-operations/assets/editors/audiobook.css +311 -0
  20. package/wp-operations/assets/editors/audiofile.css +286 -0
  21. package/wp-operations/assets/editors/course.css +701 -0
  22. package/wp-operations/assets/editors/course.js +698 -0
  23. package/wp-operations/assets/editors/faq.css +258 -0
  24. package/wp-operations/assets/editors/faq.js +196 -0
  25. package/wp-operations/assets/editors/interactive.css +220 -0
  26. package/wp-operations/assets/editors/interactive.js +378 -0
  27. package/wp-operations/assets/editors/media-sources.css +3 -0
  28. package/wp-operations/assets/editors/media-sources.js +40 -0
  29. package/wp-operations/assets/editors/open-media.css +114 -0
  30. package/wp-operations/assets/editors/open-media.js +182 -0
  31. package/wp-operations/assets/editors/thumbnails.css +335 -0
  32. package/wp-operations/assets/editors/thumbnails.js +447 -0
  33. package/wp-operations/assets/editors/translator.css +818 -0
  34. package/wp-operations/functions.php +24 -0
  35. package/wp-operations/index.php +14 -0
  36. package/wp-operations/platform.json +1836 -0
  37. package/wp-operations/skills/ai-development-guardrails/SKILL.md +49 -0
  38. package/wp-operations/skills/gutenberg-reference/SKILL.md +45 -0
  39. package/wp-operations/skills/js-tooling-for-themes/SKILL.md +51 -0
  40. package/wp-operations/skills/tailwind-for-wp/SKILL.md +62 -0
  41. package/wp-operations/skills/wp-clean-classic-themes/SKILL.md +112 -0
  42. package/wp-operations/skills/wp-psr4-plugins/SKILL.md +2043 -0
  43. package/wp-operations/skills/wp-security/SKILL.md +90 -0
  44. package/wp-operations/src/Admin.php +78 -0
  45. package/wp-operations/src/App/Access.php +57 -0
  46. package/wp-operations/src/App/Admin.php +442 -0
  47. package/wp-operations/src/App/App.php +157 -0
  48. package/wp-operations/src/App/Apps.php +379 -0
  49. package/wp-operations/src/App/Bundle.php +111 -0
  50. package/wp-operations/src/App/Contents.php +676 -0
  51. package/wp-operations/src/App/Engine.php +554 -0
  52. package/wp-operations/src/App/Github.php +308 -0
  53. package/wp-operations/src/App/Module.php +23 -0
  54. package/wp-operations/src/App/Ops.php +470 -0
  55. package/wp-operations/src/App/Packages.php +289 -0
  56. package/wp-operations/src/App/Rest.php +539 -0
  57. package/wp-operations/src/App/Sandboxes.php +206 -0
  58. package/wp-operations/src/App/Store.php +104 -0
  59. package/wp-operations/src/App/Usage.php +268 -0
  60. package/wp-operations/src/Config.php +249 -0
  61. package/wp-operations/src/Content/Editor.php +223 -0
  62. package/wp-operations/src/Content/Fields.php +681 -0
  63. package/wp-operations/src/Content/Scoring.php +253 -0
  64. package/wp-operations/src/Content/Structure.php +293 -0
  65. package/wp-operations/src/Content/Types.php +150 -0
  66. package/wp-operations/src/Content/Uploads.php +50 -0
  67. package/wp-operations/src/Editors/AudiobookAuthor.php +61 -0
  68. package/wp-operations/src/Editors/AudiobookChapters.php +632 -0
  69. package/wp-operations/src/Editors/AudiobookCover.php +235 -0
  70. package/wp-operations/src/Editors/Audiofile.php +462 -0
  71. package/wp-operations/src/Editors/Course.php +784 -0
  72. package/wp-operations/src/Editors/Ebook.php +242 -0
  73. package/wp-operations/src/Editors/Editors.php +44 -0
  74. package/wp-operations/src/Editors/Faq.php +237 -0
  75. package/wp-operations/src/Editors/Files.php +139 -0
  76. package/wp-operations/src/Editors/Interactive/Builder.php +103 -0
  77. package/wp-operations/src/Editors/Interactive/Card.php +76 -0
  78. package/wp-operations/src/Editors/Interactive/Editor.php +42 -0
  79. package/wp-operations/src/Editors/Interactive/Field.php +272 -0
  80. package/wp-operations/src/Editors/Interactive/Map.php +84 -0
  81. package/wp-operations/src/Editors/Interactive/Models.php +227 -0
  82. package/wp-operations/src/Editors/Interactive/Report.php +59 -0
  83. package/wp-operations/src/Editors/Interactive/Save.php +323 -0
  84. package/wp-operations/src/Editors/Interactive/Scoring.php +244 -0
  85. package/wp-operations/src/Editors/Interactive/Structure.php +195 -0
  86. package/wp-operations/src/Editors/Legal.php +235 -0
  87. package/wp-operations/src/Editors/OpenMedia.php +140 -0
  88. package/wp-operations/src/Editors/OriginalTitle.php +112 -0
  89. package/wp-operations/src/Editors/Sources.php +28 -0
  90. package/wp-operations/src/Editors/Thumbnails/Admin.php +306 -0
  91. package/wp-operations/src/Editors/Thumbnails/Ajax.php +163 -0
  92. package/wp-operations/src/Editors/Thumbnails/Box.php +188 -0
  93. package/wp-operations/src/Editors/Thumbnails/Storage.php +228 -0
  94. package/wp-operations/src/Editors/Translator/Admin.php +913 -0
  95. package/wp-operations/src/Editors/Translator/Api.php +63 -0
  96. package/wp-operations/src/Editors/Translator/Bar.php +83 -0
  97. package/wp-operations/src/Editors/Translator/Fields.php +273 -0
  98. package/wp-operations/src/Editors/Translator/Storage.php +131 -0
  99. package/wp-operations/src/Editors/Translator/Thumbnail.php +215 -0
  100. package/wp-operations/src/Identity.php +104 -0
  101. package/wp-operations/src/Languages.php +45 -0
  102. package/wp-operations/src/Lockdown.php +85 -0
  103. package/wp-operations/src/Modules/Apps/Admin.php +472 -0
  104. package/wp-operations/src/Modules/Apps/Api.php +193 -0
  105. package/wp-operations/src/Modules/Apps/Apps.php +279 -0
  106. package/wp-operations/src/Modules/Apps/Formatters.php +478 -0
  107. package/wp-operations/src/Modules/Apps/Schemes.php +248 -0
  108. package/wp-operations/src/Modules/Apps/Table.php +101 -0
  109. package/wp-operations/src/Modules/Thumbnails.php +68 -0
  110. package/wp-operations/src/Modules/Translations.php +133 -0
  111. package/wp-operations/src/Platform.php +59 -0
  112. package/wp-operations/src/Setup.php +273 -0
  113. package/wp-operations/src/Status.php +99 -0
  114. package/wp-operations/src/Storage/Client.php +168 -0
  115. package/wp-operations/src/Storage/Offload.php +120 -0
  116. package/wp-operations/src/Storage/Settings.php +166 -0
  117. package/wp-operations/src/Storage/Storage.php +35 -0
  118. package/wp-operations/src/Updates.php +151 -0
  119. package/wp-operations/style.css +11 -0
package/README.md CHANGED
@@ -18,8 +18,9 @@ Requires Node.js 20.10 or later and git. Composer is needed for plugins. If you
18
18
  ## Commands
19
19
 
20
20
  ```bash
21
- wp-ops init my-platform --platform=path/to/wp-operations # the theme folder, for its platform.json
21
+ wp-ops init my-platform # the platform (wp-operations/), layout, workflows, git
22
22
  cd my-platform
23
+ wp-ops start # the platform at http://localhost:8881 (admin / password)
23
24
  wp-ops new plugin acme/forms
24
25
  wp-ops new app service-apps shop --server=prod-1 --app-path=/var/www/shop
25
26
  wp-ops composer add --apps=service-apps/shop --packages="acme/forms"
@@ -30,14 +31,16 @@ wp-ops doctor
30
31
 
31
32
  | Command | What it does |
32
33
  |---|---|
33
- | `init [dir] [--platform=]` | Creates `.github/platform.json`, the app manifests, `packages/`, the app folders, `.github/workflows/composer.yml` and `.gitignore`, then runs `git init`. Never overwrites a file. `--platform` copies the theme's `platform.json` to the root. |
34
+ | `init [dir]` | Creates the platform repository: the platform theme in `wp-operations/`, `platform.json`, `.github/platform.json`, the app manifests, `packages/`, the app folders, `.github/workflows/composer.yml` and `.gitignore`, then runs `git init`. Never overwrites a file. |
35
+ | `start` | Runs the platform (`wp-operations/`) locally. Site data stays in `.local/` (gitignored). `wp-ops start <dir>` runs one app instead. |
36
+ | `update` | Replaces `wp-operations/` with the platform shipped in your wp-ops version. Update wp-ops first (`npm install -g @wp-operations/wp-ops`), then run it and commit. |
34
37
  | `new app <kind> <slug>` | Creates the app (composer type `wp-app`) and adds it to the kind's manifest. |
35
38
  | `new plugin <vendor/name>` | Creates `packages/<vendor>/<name>` (composer type `psr4-plugin`) with `src/Plugin.php`. |
36
39
  | `apps`, `plugins` | Lists apps and plugins, which app uses which plugin, and any problems. |
37
40
  | `composer <add\|remove\|update> --apps= --packages=` | Edits the apps' composer.json the same way the platform does and refreshes `composer.lock`. This is what `composer.yml` runs. |
38
41
  | `sandbox` | Preview runtime for the platform. See below. |
39
42
  | `edit` | Opens wp-ide for this repository. |
40
- | `start`, `dev`, `build` | Runs one app with wp-app. |
43
+ | `dev`, `build` | Runs with file watching; builds packages with a build script. |
41
44
  | `doctor` | Checks the environment and the repository. |
42
45
 
43
46
  Running `wp-ops` with no arguments opens a menu.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wp-operations/wp-ops",
3
- "version": "0.3.0",
4
- "description": "The wp-operations tool. One install gives wp-ops, wp-app, wp-ide and wp-code.",
3
+ "version": "0.4.0",
4
+ "description": "The wp-operations tool. One install gives the platform and wp-ops, wp-app, wp-ide and wp-code.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "bin": {
@@ -14,9 +14,13 @@
14
14
  "cli.js",
15
15
  "bin",
16
16
  "src",
17
+ "wp-operations",
17
18
  "LICENSE",
18
19
  "README.md"
19
20
  ],
21
+ "scripts": {
22
+ "prepublishOnly": "node scripts/bundle-theme.js"
23
+ },
20
24
  "license": "GPL-2.0-or-later",
21
25
  "author": "de-er-kid",
22
26
  "repository": {
@@ -1,6 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { execFileSync, spawnSync } from 'child_process';
4
+ import { fileURLToPath } from 'url';
4
5
  import pc from 'picocolors';
5
6
  import { ide } from '../deps.js';
6
7
  import { UsageError } from '../args.js';
@@ -69,6 +70,12 @@ export async function init({ dir = process.cwd(), platform, version, log = conso
69
70
  writeNew(path.join(root, '.github', 'workflows', 'composer.yml'), composerWorkflow(version), created);
70
71
  writeNew(path.join(root, '.gitignore'), GITIGNORE, created);
71
72
 
73
+ platform = platform || bundledPlatform();
74
+ const themeDir = path.join(root, PLATFORM_DIR);
75
+ if (platform && fs.statSync(path.resolve(platform)).isDirectory() && !fs.existsSync(themeDir)) {
76
+ copyTheme(path.resolve(platform), themeDir);
77
+ created.push(themeDir);
78
+ }
72
79
  if (platform) {
73
80
  const source = path.resolve(platform);
74
81
  const file = fs.existsSync(source) && fs.statSync(source).isDirectory() ? path.join(source, 'platform.json') : source;
@@ -89,12 +96,61 @@ export async function init({ dir = process.cwd(), platform, version, log = conso
89
96
  if (gitInit) log(` ${pc.green('+')} git repository (branch main)`);
90
97
  if (!created.length && !gitInit) log(' Already a platform repository; nothing to add.');
91
98
  if (!fs.existsSync(path.join(root, 'platform.json'))) {
92
- log(pc.yellow(`\n platform.json is missing at the root. Copy the theme's platform.json here, or run: wp-ops init --platform=<path to the theme>`));
99
+ log(pc.yellow(`\n platform.json is missing at the root. Run: wp-ops init --platform=<path to the theme>`));
93
100
  }
94
- log(pc.dim('\n Deploy workflows (deploy-apps.yml, deploy-platform.yml) are yours to add under .github/workflows/.'));
101
+ log(`\n Next: ${pc.bold(`cd ${path.relative(process.cwd(), root) || '.'}`)} then ${pc.bold('wp-ops start')} to run the platform locally.`);
95
102
  return { root, created, gitInit };
96
103
  }
97
104
 
105
+ /**
106
+ * The platform theme shipped inside this package (packages/wp-ops/wp-operations),
107
+ * or the repository's theme/ folder when running from the monorepo.
108
+ */
109
+ export function bundledPlatform() {
110
+ const here = path.dirname(fileURLToPath(import.meta.url));
111
+ for (const dir of [path.resolve(here, '..', '..', 'wp-operations'), path.resolve(here, '..', '..', '..', '..', 'theme')]) {
112
+ if (fs.existsSync(path.join(dir, 'style.css')) && fs.existsSync(path.join(dir, 'platform.json'))) return dir;
113
+ }
114
+ return '';
115
+ }
116
+
117
+ export const PLATFORM_DIR = 'wp-operations';
118
+
119
+ function themeVersion(dir) {
120
+ const css = path.join(dir, 'style.css');
121
+ return fs.existsSync(css) ? (fs.readFileSync(css, 'utf8').match(/^Version:\s*(\S+)/m)?.[1] ?? '') : '';
122
+ }
123
+
124
+ function copyTheme(source, target) {
125
+ fs.cpSync(source, target, {
126
+ recursive: true,
127
+ filter: (file) => {
128
+ const relative = path.relative(source, file).split(path.sep).join('/');
129
+ return relative !== 'ui' && !relative.startsWith('ui/');
130
+ },
131
+ });
132
+ }
133
+
134
+ /**
135
+ * Replaces the repository's platform theme (wp-operations/) with the one
136
+ * shipped in this wp-ops version. Commit the result to deploy it.
137
+ */
138
+ export async function update({ root, log = console.log }) {
139
+ const source = bundledPlatform();
140
+ if (!source) throw new UsageError('The platform theme is missing from this wp-ops install. Reinstall: npm install -g @wp-operations/wp-ops');
141
+ const target = path.join(root, PLATFORM_DIR);
142
+ const from = themeVersion(target);
143
+ const to = themeVersion(source);
144
+ if (from === to) {
145
+ log(` Platform is up to date (${to}).`);
146
+ return { from, to, changed: false };
147
+ }
148
+ fs.rmSync(target, { recursive: true, force: true });
149
+ copyTheme(source, target);
150
+ log(` ${pc.green('✓')} Platform ${from || '(none)'} → ${to}. Review with git diff, then commit.`);
151
+ return { from, to, changed: true };
152
+ }
153
+
98
154
  function composerName(value) {
99
155
  return value.toLowerCase().replace(/[^a-z0-9_.-]+/g, '-').replace(/^[-_.]+|[-_.]+$/g, '');
100
156
  }
@@ -1,7 +1,7 @@
1
1
  import { spawn } from 'child_process';
2
2
  import { findRootDir, findWpAppCli } from '../project.js';
3
3
 
4
- export function startApp({ appDir, flags = [], dev = false }) {
4
+ export function startApp({ appDir, flags = [], dev = false, env = process.env }) {
5
5
  const rootDir = findRootDir(appDir);
6
6
  const wpAppCli = findWpAppCli(rootDir);
7
7
  if (!wpAppCli) {
@@ -11,7 +11,7 @@ export function startApp({ appDir, flags = [], dev = false }) {
11
11
  process.exit(1);
12
12
  }
13
13
  const args = [wpAppCli, dev ? 'dev' : 'start', `--path=${appDir}`, ...flags];
14
- const child = spawn(process.execPath, args, { stdio: 'inherit' });
14
+ const child = spawn(process.execPath, args, { stdio: 'inherit', env });
15
15
  child.on('exit', (code) => process.exit(code ?? 0));
16
16
  return child;
17
17
  }
package/src/main.js CHANGED
@@ -6,7 +6,7 @@ import { parseArgs, UsageError } from './args.js';
6
6
  import { startApp } from './commands/start.js';
7
7
  import { buildAll } from './commands/build.js';
8
8
  import { doctor } from './commands/doctor.js';
9
- import { apps, composer, init, newApp, newPlugin, platformRoot, plugins } from './commands/platform.js';
9
+ import { PLATFORM_DIR, apps, composer, init, newApp, newPlugin, platformRoot, plugins, update } from './commands/platform.js';
10
10
  import { sandbox } from './commands/sandbox.js';
11
11
  import { tui } from './tui.js';
12
12
 
@@ -19,9 +19,10 @@ Usage:
19
19
  wp-ops interactive menu
20
20
 
21
21
  Platform repository:
22
- wp-ops init [dir] [--platform=<theme dir or platform.json>]
23
- lay out a platform repository and git init it
24
- wp-ops apps list apps (<kind>/<slug>) and their deploy targets
22
+ wp-ops init [dir] create a platform repository: the platform (wp-operations/), layout, workflows, git
23
+ wp-ops start [--port=] run the platform locally (admin / password)
24
+ wp-ops update update wp-operations/ to the platform shipped with this wp-ops
25
+ wp-ops apps list apps (<kind>/<slug>) and their deploy targets
25
26
  wp-ops plugins list plugins and the apps that use them
26
27
  wp-ops new app <kind> <slug> [--server= --app-path= --theme-slug=]
27
28
  wp-ops new plugin <vendor/name> [--description=]
@@ -34,8 +35,8 @@ Platform repository:
34
35
  open the local browser editor (wp-ide)
35
36
 
36
37
  Single app:
37
- wp-ops start [dir] [--wp=… --php=… --port=…]
38
- wp-ops dev [dir] start + watch
38
+ wp-ops start <dir> [--wp=… --php=… --port=…]
39
+ wp-ops dev [dir] start + watch (the platform when no dir is given)
39
40
  wp-ops build build all packages/ with a build script
40
41
  wp-ops doctor environment and repository checks`;
41
42
 
@@ -49,8 +50,18 @@ async function run() {
49
50
  await tui(pkg.version);
50
51
  return;
51
52
  case 'start':
52
- case 'dev':
53
- startApp({ appDir: path.resolve(positional[0] ?? process.cwd()), flags, dev: command === 'dev' });
53
+ case 'dev': {
54
+ const root = await platformRoot().catch(() => null);
55
+ let appDir = positional[0] ? path.resolve(positional[0]) : process.cwd();
56
+ if (!positional[0] && root && fs.existsSync(path.join(root, PLATFORM_DIR, 'style.css'))) {
57
+ appDir = path.join(root, PLATFORM_DIR);
58
+ }
59
+ const env = root ? { ...process.env, WP_APP_HOME: process.env.WP_APP_HOME || path.join(root, '.local') } : process.env;
60
+ startApp({ appDir, flags, dev: command === 'dev', env });
61
+ return;
62
+ }
63
+ case 'update':
64
+ await update({ root: await platformRoot() });
54
65
  return;
55
66
  case 'build':
56
67
  buildAll();
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - The theme now lives in the wp-operations repository and updates itself from its releases, with this changelog in Dashboard → Updates.
6
+ - Skills and agents ship with the theme and appear in CMS → Skills and CMS → Agents.
7
+ - The AI work branch is now `platform/{slug}` (was `vibe/{slug}`). Saved settings, options and user data move over on their own.
8
+ - The platform's settings in platform.json are under `app` (was `vibe`), and its REST API is `platform/v1`.
9
+ - Sign-in screen: shows your Site Title and Site Logo, nothing else.
10
+ - License: GPL-2.0-or-later.
11
+
12
+ ## 0.0.1
13
+
14
+ - First version: content engine, CMS, app builder and operations.
@@ -0,0 +1,39 @@
1
+ # wp-operations theme
2
+
3
+ The platform. People with the `prompt` capability use it at the site root (`/`); everyone else signs in at `wp-login.php` as usual. Plugins are switched off: apps get their plugins through composer in the platform repository.
4
+
5
+ Requires WordPress 6.4+ and PHP 8.0+ (with sodium, standard in PHP 8).
6
+
7
+ ## wp-config.php
8
+
9
+ Add only what you use. No key, token or secret is ever stored in the database.
10
+
11
+ ```php
12
+ define( 'PLATFORM_GITHUB_TOKEN', 'github_pat_…' ); // fine-grained token on the platform repository: Contents, Actions, Secrets, Environments (read/write)
13
+ define( 'PLATFORM_OPENAI_KEY', 'sk-…' ); // one constant per AI model; you choose its name in Settings → AI Models
14
+ define( 'PLATFORM_SANDBOX_TOKEN', '…' ); // optional, per sandbox (same value as SANDBOX_TOKEN for wp-ops sandbox)
15
+ define( 'PLATFORM_STORAGE_BUCKET', '…' ); // optional S3/R2 storage: PLATFORM_STORAGE_ENDPOINT, _BUCKET, _ACCESS_KEY, _SECRET_KEY, _PUBLIC_URL
16
+ define( 'PLATFORM_CONFIG', '/path/to/platform.json' ); // optional: use another platform.json than the theme's
17
+ ```
18
+
19
+ ## Settings
20
+
21
+ - **Settings → Operations:** the platform repository, app folders, secrets, workflows and sandboxes.
22
+ - **Settings → AI Models:** models for Build, Plan and Chat, image models, and the work branch (default `platform/{slug}`).
23
+ - **Users → Prompt Users:** who can use the platform, and monthly credits.
24
+
25
+ ## platform.json
26
+
27
+ Content types, fields, languages, the admin screens, the platform's look (`app.theme.colors`) and its usage limits. The platform repository keeps a copy at its root (`wp-ops init --platform=<this folder>`).
28
+
29
+ ## Skills and agents
30
+
31
+ `skills/<name>/SKILL.md` and `agents/<name>/AGENT.md` ship with the theme and appear in the platform under CMS → Skills and CMS → Agents. Each theme update refreshes them, except the ones you edited there. Skills you add in the CMS are yours and are never touched.
32
+
33
+ ## Updates
34
+
35
+ New versions appear in Dashboard → Updates, with the changelog ([CHANGELOG.md](CHANGELOG.md)). They come from the `theme-v*` releases of [wordpress-operations/wordpress-operations](https://github.com/wordpress-operations/wordpress-operations/releases).
36
+
37
+ ## Building the UI
38
+
39
+ The platform UI source is in `ui/`. `npm install && npm run build` inside `ui/` writes `assets/app/`.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Builder
3
+ description: Builds and changes apps in the platform repository the way this platform expects.
4
+ role: builder
5
+ skills:
6
+ - ai-development-guardrails
7
+ - wp-security
8
+ ---
9
+
10
+ You change one app in the platform repository at a time.
11
+
12
+ - Themes are classic WordPress themes. No blocks, no theme.json styling, no Full Site Editing.
13
+ - Backend code belongs in plugins under `packages/<vendor>/<name>` (composer type `psr4-plugin`), written to the `wp-psr4-plugins` skill. Apps get plugins through composer, never by copying code into the app.
14
+ - Every request handler follows capability, nonce, sanitize, escape.
15
+ - Keep to the app's existing structure, names and style. Change only what the request needs.