@mozole/cli 1.4.3 → 2.0.0-b

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 (249) hide show
  1. package/LICENSE +16 -4
  2. package/README.md +85 -112
  3. package/dist/cli.d.ts +2 -2
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +204 -184
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/adopt.d.ts +5 -10
  8. package/dist/commands/adopt.d.ts.map +1 -1
  9. package/dist/commands/adopt.js +49 -849
  10. package/dist/commands/adopt.js.map +1 -1
  11. package/dist/commands/doctor.d.ts +1 -7
  12. package/dist/commands/doctor.d.ts.map +1 -1
  13. package/dist/commands/doctor.js +69 -377
  14. package/dist/commands/doctor.js.map +1 -1
  15. package/dist/commands/new.d.ts +8 -10
  16. package/dist/commands/new.d.ts.map +1 -1
  17. package/dist/commands/new.js +32 -197
  18. package/dist/commands/new.js.map +1 -1
  19. package/dist/commands/phase.d.ts +11 -0
  20. package/dist/commands/phase.d.ts.map +1 -0
  21. package/dist/commands/phase.js +106 -0
  22. package/dist/commands/phase.js.map +1 -0
  23. package/dist/commands/prototype.d.ts +6 -0
  24. package/dist/commands/prototype.d.ts.map +1 -0
  25. package/dist/commands/prototype.js +28 -0
  26. package/dist/commands/prototype.js.map +1 -0
  27. package/dist/commands/repomap.d.ts +6 -0
  28. package/dist/commands/repomap.d.ts.map +1 -0
  29. package/dist/commands/repomap.js +71 -0
  30. package/dist/commands/repomap.js.map +1 -0
  31. package/dist/commands/test.d.ts +6 -0
  32. package/dist/commands/test.d.ts.map +1 -0
  33. package/dist/commands/test.js +115 -0
  34. package/dist/commands/test.js.map +1 -0
  35. package/dist/commands/ui.d.ts +1 -42
  36. package/dist/commands/ui.d.ts.map +1 -1
  37. package/dist/commands/ui.js +74 -466
  38. package/dist/commands/ui.js.map +1 -1
  39. package/dist/commands/verify.d.ts +12 -7
  40. package/dist/commands/verify.d.ts.map +1 -1
  41. package/dist/commands/verify.js +148 -65
  42. package/dist/commands/verify.js.map +1 -1
  43. package/dist/qa/a11y.d.ts +24 -0
  44. package/dist/qa/a11y.d.ts.map +1 -0
  45. package/dist/qa/a11y.js +124 -0
  46. package/dist/qa/a11y.js.map +1 -0
  47. package/dist/qa/breakpoints.d.ts +16 -0
  48. package/dist/qa/breakpoints.d.ts.map +1 -0
  49. package/dist/qa/breakpoints.js +45 -0
  50. package/dist/qa/breakpoints.js.map +1 -0
  51. package/dist/qa/contract.d.ts +21 -0
  52. package/dist/qa/contract.d.ts.map +1 -0
  53. package/dist/qa/contract.js +116 -0
  54. package/dist/qa/contract.js.map +1 -0
  55. package/dist/qa/index.d.ts +6 -0
  56. package/dist/qa/index.d.ts.map +1 -0
  57. package/dist/qa/index.js +6 -0
  58. package/dist/qa/index.js.map +1 -0
  59. package/dist/qa/probe.d.ts +48 -0
  60. package/dist/qa/probe.d.ts.map +1 -0
  61. package/dist/qa/probe.js +206 -0
  62. package/dist/qa/probe.js.map +1 -0
  63. package/dist/qa/runner.d.ts +27 -33
  64. package/dist/qa/runner.d.ts.map +1 -1
  65. package/dist/qa/runner.js +286 -332
  66. package/dist/qa/runner.js.map +1 -1
  67. package/dist/scaffold/agents.d.ts +5 -0
  68. package/dist/scaffold/agents.d.ts.map +1 -0
  69. package/dist/scaffold/agents.js +84 -0
  70. package/dist/scaffold/agents.js.map +1 -0
  71. package/dist/scaffold/backend.d.ts +6 -8
  72. package/dist/scaffold/backend.d.ts.map +1 -1
  73. package/dist/scaffold/backend.js +318 -199
  74. package/dist/scaffold/backend.js.map +1 -1
  75. package/dist/scaffold/design.d.ts +4 -3
  76. package/dist/scaffold/design.d.ts.map +1 -1
  77. package/dist/scaffold/design.js +38 -47
  78. package/dist/scaffold/design.js.map +1 -1
  79. package/dist/scaffold/flagship.d.ts +8 -0
  80. package/dist/scaffold/flagship.d.ts.map +1 -0
  81. package/dist/scaffold/flagship.js +337 -0
  82. package/dist/scaffold/flagship.js.map +1 -0
  83. package/dist/scaffold/index.d.ts +9 -0
  84. package/dist/scaffold/index.d.ts.map +1 -0
  85. package/dist/scaffold/index.js +48 -0
  86. package/dist/scaffold/index.js.map +1 -0
  87. package/dist/scaffold/phases.d.ts +10 -0
  88. package/dist/scaffold/phases.d.ts.map +1 -0
  89. package/dist/scaffold/phases.js +165 -0
  90. package/dist/scaffold/phases.js.map +1 -0
  91. package/dist/scaffold/repomap.d.ts +6 -0
  92. package/dist/scaffold/repomap.d.ts.map +1 -0
  93. package/dist/scaffold/repomap.js +89 -0
  94. package/dist/scaffold/repomap.js.map +1 -0
  95. package/dist/scaffold/standard.d.ts +13 -0
  96. package/dist/scaffold/standard.d.ts.map +1 -0
  97. package/dist/scaffold/standard.js +371 -0
  98. package/dist/scaffold/standard.js.map +1 -0
  99. package/dist/scaffold/tokens.d.ts +3 -0
  100. package/dist/scaffold/tokens.d.ts.map +1 -0
  101. package/dist/scaffold/tokens.js +126 -0
  102. package/dist/scaffold/tokens.js.map +1 -0
  103. package/dist/server/manager.d.ts +23 -0
  104. package/dist/server/manager.d.ts.map +1 -0
  105. package/dist/server/manager.js +96 -0
  106. package/dist/server/manager.js.map +1 -0
  107. package/dist/utils/ai-trace.d.ts +8 -0
  108. package/dist/utils/ai-trace.d.ts.map +1 -0
  109. package/dist/utils/ai-trace.js +69 -0
  110. package/dist/utils/ai-trace.js.map +1 -0
  111. package/dist/utils/browser.d.ts +10 -0
  112. package/dist/utils/browser.d.ts.map +1 -0
  113. package/dist/utils/browser.js +127 -0
  114. package/dist/utils/browser.js.map +1 -0
  115. package/dist/utils/fs.d.ts +11 -0
  116. package/dist/utils/fs.d.ts.map +1 -0
  117. package/dist/utils/fs.js +166 -0
  118. package/dist/utils/fs.js.map +1 -0
  119. package/dist/utils/git.d.ts +9 -0
  120. package/dist/utils/git.d.ts.map +1 -0
  121. package/dist/utils/git.js +69 -0
  122. package/dist/utils/git.js.map +1 -0
  123. package/dist/utils/process.d.ts +21 -0
  124. package/dist/utils/process.d.ts.map +1 -0
  125. package/dist/utils/process.js +120 -0
  126. package/dist/utils/process.js.map +1 -0
  127. package/dist/version.d.ts +21 -36
  128. package/dist/version.d.ts.map +1 -1
  129. package/dist/version.js +21 -44
  130. package/dist/version.js.map +1 -1
  131. package/package.json +19 -38
  132. package/CHANGELOG.md +0 -38
  133. package/dist/commands/cce.d.ts +0 -7
  134. package/dist/commands/cce.d.ts.map +0 -1
  135. package/dist/commands/cce.js +0 -37
  136. package/dist/commands/cce.js.map +0 -1
  137. package/dist/commands/logs.d.ts +0 -3
  138. package/dist/commands/logs.d.ts.map +0 -1
  139. package/dist/commands/logs.js +0 -40
  140. package/dist/commands/logs.js.map +0 -1
  141. package/dist/commands/qa.d.ts +0 -12
  142. package/dist/commands/qa.d.ts.map +0 -1
  143. package/dist/commands/qa.js +0 -143
  144. package/dist/commands/qa.js.map +0 -1
  145. package/dist/commands/stats.d.ts +0 -37
  146. package/dist/commands/stats.d.ts.map +0 -1
  147. package/dist/commands/stats.js +0 -169
  148. package/dist/commands/stats.js.map +0 -1
  149. package/dist/commands/template.d.ts +0 -8
  150. package/dist/commands/template.d.ts.map +0 -1
  151. package/dist/commands/template.js +0 -392
  152. package/dist/commands/template.js.map +0 -1
  153. package/dist/config/project.d.ts +0 -54
  154. package/dist/config/project.d.ts.map +0 -1
  155. package/dist/config/project.js +0 -100
  156. package/dist/config/project.js.map +0 -1
  157. package/dist/context/cce.d.ts +0 -39
  158. package/dist/context/cce.d.ts.map +0 -1
  159. package/dist/context/cce.js +0 -455
  160. package/dist/context/cce.js.map +0 -1
  161. package/dist/governor/fingerprint.d.ts +0 -7
  162. package/dist/governor/fingerprint.d.ts.map +0 -1
  163. package/dist/governor/fingerprint.js +0 -120
  164. package/dist/governor/fingerprint.js.map +0 -1
  165. package/dist/governor/hook.d.ts +0 -13
  166. package/dist/governor/hook.d.ts.map +0 -1
  167. package/dist/governor/hook.js +0 -389
  168. package/dist/governor/hook.js.map +0 -1
  169. package/dist/governor/state.d.ts +0 -45
  170. package/dist/governor/state.d.ts.map +0 -1
  171. package/dist/governor/state.js +0 -60
  172. package/dist/governor/state.js.map +0 -1
  173. package/dist/integrations/antigravity.d.ts +0 -20
  174. package/dist/integrations/antigravity.d.ts.map +0 -1
  175. package/dist/integrations/antigravity.js +0 -153
  176. package/dist/integrations/antigravity.js.map +0 -1
  177. package/dist/output-safety.d.ts +0 -3
  178. package/dist/output-safety.d.ts.map +0 -1
  179. package/dist/output-safety.js +0 -44
  180. package/dist/output-safety.js.map +0 -1
  181. package/dist/output.d.ts +0 -5
  182. package/dist/output.d.ts.map +0 -1
  183. package/dist/output.js +0 -2
  184. package/dist/output.js.map +0 -1
  185. package/dist/platform/executable.d.ts +0 -11
  186. package/dist/platform/executable.d.ts.map +0 -1
  187. package/dist/platform/executable.js +0 -69
  188. package/dist/platform/executable.js.map +0 -1
  189. package/dist/platform/process.d.ts +0 -27
  190. package/dist/platform/process.d.ts.map +0 -1
  191. package/dist/platform/process.js +0 -189
  192. package/dist/platform/process.js.map +0 -1
  193. package/dist/progress.d.ts +0 -44
  194. package/dist/progress.d.ts.map +0 -1
  195. package/dist/progress.js +0 -123
  196. package/dist/progress.js.map +0 -1
  197. package/dist/qa/artifacts.d.ts +0 -3
  198. package/dist/qa/artifacts.d.ts.map +0 -1
  199. package/dist/qa/artifacts.js +0 -15
  200. package/dist/qa/artifacts.js.map +0 -1
  201. package/dist/qa/diff.d.ts +0 -10
  202. package/dist/qa/diff.d.ts.map +0 -1
  203. package/dist/qa/diff.js +0 -90
  204. package/dist/qa/diff.js.map +0 -1
  205. package/dist/qa/server.d.ts +0 -10
  206. package/dist/qa/server.d.ts.map +0 -1
  207. package/dist/qa/server.js +0 -127
  208. package/dist/qa/server.js.map +0 -1
  209. package/dist/scaffold/adoption.d.ts +0 -17
  210. package/dist/scaffold/adoption.d.ts.map +0 -1
  211. package/dist/scaffold/adoption.js +0 -279
  212. package/dist/scaffold/adoption.js.map +0 -1
  213. package/dist/scaffold/legacy.d.ts +0 -4
  214. package/dist/scaffold/legacy.d.ts.map +0 -1
  215. package/dist/scaffold/legacy.js +0 -139
  216. package/dist/scaffold/legacy.js.map +0 -1
  217. package/dist/scaffold/routes.d.ts +0 -3
  218. package/dist/scaffold/routes.d.ts.map +0 -1
  219. package/dist/scaffold/routes.js +0 -37
  220. package/dist/scaffold/routes.js.map +0 -1
  221. package/dist/scaffold/standalone.d.ts +0 -7
  222. package/dist/scaffold/standalone.d.ts.map +0 -1
  223. package/dist/scaffold/standalone.js +0 -374
  224. package/dist/scaffold/standalone.js.map +0 -1
  225. package/dist/scaffold/templates.d.ts +0 -9
  226. package/dist/scaffold/templates.d.ts.map +0 -1
  227. package/dist/scaffold/templates.js +0 -317
  228. package/dist/scaffold/templates.js.map +0 -1
  229. package/dist/scaffold/write.d.ts +0 -2
  230. package/dist/scaffold/write.d.ts.map +0 -1
  231. package/dist/scaffold/write.js +0 -38
  232. package/dist/scaffold/write.js.map +0 -1
  233. package/dist/telemetry/store.d.ts +0 -33
  234. package/dist/telemetry/store.d.ts.map +0 -1
  235. package/dist/telemetry/store.js +0 -75
  236. package/dist/telemetry/store.js.map +0 -1
  237. package/dist/template/servers.d.ts +0 -21
  238. package/dist/template/servers.d.ts.map +0 -1
  239. package/dist/template/servers.js +0 -193
  240. package/dist/template/servers.js.map +0 -1
  241. package/dist/template/workspace.d.ts +0 -23
  242. package/dist/template/workspace.d.ts.map +0 -1
  243. package/dist/template/workspace.js +0 -152
  244. package/dist/template/workspace.js.map +0 -1
  245. package/dist/verify/runner.d.ts +0 -16
  246. package/dist/verify/runner.d.ts.map +0 -1
  247. package/dist/verify/runner.js +0 -112
  248. package/dist/verify/runner.js.map +0 -1
  249. package/docs/agent-audit.md +0 -24
package/LICENSE CHANGED
@@ -1,9 +1,21 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Mozole contributors
3
+ Copyright (c) 2026 Mozole Studio
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
6
11
 
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
8
14
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,137 +1,110 @@
1
- # Mozole CLI
2
-
3
- Mozole scaffolds React + Vite projects using React Router Framework Mode. It prerenders static HTML and optionally adds a native PHP API. Node.js 22+, npm, and Windows or Linux are supported. PHP projects require PHP 8.0+.
4
-
5
- ```sh
6
- npm install --global @mozole/cli
7
- mozole new my-site
8
- mozole new my-app --backend
9
- ```
10
-
11
- Creation installs pinned dependencies and Chromium, formats the project, and moves the completed staging directory into place. Failed setup preserves available subprocess logs in a sibling `.mozole-<name>-failure-*` directory before removing staging. Existing target directories are preserved.
12
-
13
- ## Default project
14
-
15
- The default project has **no CCE, token governor, telemetry, verification cache, MCP registration, or optimization hooks**. It does not depend on `@mozole/cli`, including transitively through its generated package lock. Verification and browser QA run through standalone project scripts. `MOZOLE_INSTALL_CCE` does not enable integrations.
16
-
17
- Basic `AGENTS.md` describes actual commands, source layout, and verification policy. `CLAUDE.md` imports it using `@AGENTS.md`. Neither file imposes CCE retrieval or token policies. No `.agents/`, `.codex/hooks.json`, or `.claude/settings.json` is generated by default.
18
-
19
- ```sh
20
- cd my-site
21
- npm run dev
1
+ # Mozole CLI (`@mozole/cli`)
2
+
3
+ > **Mozole Studio** internal project generator and development cockpit tailored for autonomous agentic engineering workflows.
4
+
5
+ ---
6
+
7
+ ## Highlights
8
+
9
+ - **Vite-Powered Frontend Engines:**
10
+ - **Standard Profile:** React 19 + React Router 7 (Framework Mode Plugin) + Static Pre-rendering (SSG) + Tailwind CSS v4 + bespoke Radix UI primitives.
11
+ - **Flagship Creative Profile (`--flagship`):** React 19 + Wouter + Lenis (Smooth Scroll) + Motion + Persistent 60fps Canvas/WebGL layer.
12
+ - **Pure PHP 8.1+ Zero-Dependency Backend:**
13
+ - Engineered for budget shared hosting (cPanel 250k Inodes, 25 MB/s I/O, Imunify360).
14
+ - 5-Layer Security Architecture: Origin/Referer verification, honeypot spam protection, file-based IP rate-limiting, direct file access denial for `config.php`, input sanitization.
15
+ - **10-Step Phased Development Pipeline:**
16
+ - Sequential phases (Phase 00–10) with status tracking in `docs/phases/status.md` and automated phase advancement commits (`mozole phase next`).
17
+ - Post-launch maintenance workflow (`mozole phase reopen <id>`).
18
+ - **Architectural Fihrist (`docs/repomap/`):**
19
+ - Continuous mapping of architecture, bespoke UI primitives, application routes, and design tokens.
20
+ - **Mozole Quality Kit:**
21
+ - Static PostCSS AST contract auditor enforcing token integrity (`src/styles/tokens.css`), banning literal colors, raw font families, and `transition: all`.
22
+ - Headless in-browser DOM geometry probe detecting layout reflow defects, text clipping, and minimum touch target violations.
23
+ - Automated WCAG 2.1 AA landmark and accessibility auditor.
24
+ - **Interactive Terminal Cockpit (`mozole ui`):**
25
+ - Clean, lightweight TUI to inspect client projects, advance phases, and run deterministic verification.
26
+
27
+ ---
28
+
29
+ ## Installation & Local Development
30
+
31
+ ```bash
32
+ # Clone and install dependencies
33
+ git clone git@github.com:mozolestudio/cli.git
34
+ cd MozoleCli
35
+ npm install
36
+
37
+ # Run verification suite (Biome lint, TypeScript typecheck, Vitest, build)
22
38
  npm run verify
23
- npm run qa
24
- npm run qa:interactive
25
- npm run qa:visual
26
- ```
27
-
28
- `verify` runs lint, strict TypeScript, tests, and production build every time. PHP projects also run PHP version and recursive syntax checks first. `qa` starts a loopback development server on an available port, checks the configured routes at three viewports, and closes its browser and server. Normal QA never captures screenshots. `qa:visual` explicitly captures screenshots under `.mozole/qa/`. Optional `--diff` comparisons preserve the accepted baseline and fail when the configured threshold is exceeded. Reinstall Chromium with `npx playwright install chromium` if necessary.
29
-
30
- React Router uses `ssr: false` and `prerender: true`. The starter builds real HTML for `/`, `/about`, and `/contact` into `build/client/`, plus `__spa-fallback.html`. Production requires no Node server. See [React Router prerendering](https://reactrouter.com/how-to/pre-rendering).
31
-
32
- ## Shared template workspaces
33
-
34
- Use a template workspace when multiple generated projects should share one pinned Node.js toolkit instead of installing a separate `node_modules` tree for every project:
35
39
 
36
- ```sh
37
- mozole template init MozoleProjects
38
- cd MozoleProjects
39
- mozole new marketing-site
40
- mozole new admin-panel --backend
41
- mozole template adopt ../existing-vite-app
42
- mozole template list
43
- mozole ui
40
+ # Run local development binary
41
+ npm run dev -- --help
44
42
  ```
45
43
 
46
- The template root is an npm workspace marked by `.mozole/template.json`. Its `package.json` owns React, React Router, Vite, Tailwind, TypeScript, Biome, Vitest, Playwright, and the Mozole CLI. Child manifests retain standardized dependency declarations for framework compatibility, while npm hoists their physical installation to the root; no project-local `node_modules` is created. `mozole new` searches parent directories for the marker, so it automatically registers projects created from the template root or nested category folders such as `Architecture/`. Creation from inside an existing managed project is rejected to prevent accidental project nesting. Projects outside a template workspace retain the normal standalone installation behavior.
44
+ ---
47
45
 
48
- `mozole template adopt <path>` imports an external React/Vite project as a copy, leaving its source directory untouched. Running it for an existing direct child standardizes that project in place. Runtime, optional, peer, and development packages are merged into the root toolkit; template versions win conflicts so every managed project resolves one standardized version. The child's previous lockfile is archived under `.mozole/backups/`, and its disposable local `node_modules` is removed after a successful shared install. `--cce-install` remains available for optimized adoption.
46
+ ## Command Reference
49
47
 
50
- The TUI's **Servers** screen discovers nested Mozole projects and starts each configured npm development server on its preferred port or the next available port. Use Enter/`s` to toggle one server, `a` to start all, and `x` to stop all. Server output is retained under `.mozole/logs/servers/`. Managed servers are stopped when the TUI exits, so the UI remains the single lifecycle owner; disposable project-local Vite caches are cleaned on stop.
48
+ ### `mozole new <name> [--flagship] [--backend=php|node]`
49
+ Generates a client project with Mozole Studio governance and canonical design tokens. Install its dependencies with `npm install`, then run `mozole verify` to check the generated project in your environment.
51
50
 
52
- ## Design references and assets
51
+ ```bash
52
+ # Standard React Router 7 + SSG + Tailwind v4 project
53
+ mozole new acme-corp
53
54
 
54
- Place exported `design.md`, images, icons, fonts and reference screens under `docs/design/`. Generated `AGENTS.md` treats these as design evidence, preserves their intent, and requires checks for spacing, loaded fonts, foreground/background contrast, responsive behavior and interaction states. It permits justified corrections instead of blindly copying tokens. `docs/design/README.md` explains the handoff; no provider-specific design is generated. Existing exports remain untouched during adoption. Routine QA stays screenshot-free; visual comparison remains opt-in.
55
-
56
- ## PHP backend
57
-
58
- ```sh
59
- mozole new my-app --backend
60
- cd my-app
61
- npm run dev
62
- # In a separate terminal:
63
- npm run dev:api
64
- ```
65
-
66
- Vite proxies `/api/` calls to PHP on `127.0.0.1:8000`. The PHP front controller serves `GET` and `HEAD` for `/api/health` and `/api/info`. Unknown endpoints return JSON 404; unsupported methods on known endpoints return JSON 405 with `Allow: GET, HEAD`.
67
-
68
- ```sh
69
- npm run check:php
70
- npm run build:deploy
55
+ # Flagship creative project with smooth scroll & persistent canvas
56
+ mozole new studio-flagship --flagship
71
57
  ```
72
58
 
73
- `check:php` checks PHP 8.0+ and runs `php -l` on every PHP source file under `api/`. `build:deploy` validates PHP, builds the frontend, and assembles `deploy/` with static output, `api/`, and `.htaccess`. Existing deployment output is replaced with rollback on failed replacement. Upload the **contents** of `deploy/`, including hidden `.htaccess`, to an Apache/LiteSpeed document root with PHP and rewrite support. The supplied configuration assumes domain-root hosting. Nginx needs explicit PHP-FPM configuration; see generated `docs/backend-php.md`.
74
-
75
- Environment values come from the process environment using `getenv`; there is no implicit `.env` loader. Production and debug-off are the defaults. Database support is an optional PDO helper; configure `DB_DSN`, `DB_USER`, and `DB_PASS` through your host.
59
+ ### `mozole prototype init`
60
+ Initializes a new prototype repository workspace with a multi-project `projects/` directory and shared token bridges.
76
61
 
77
- ## Explicit integrations
62
+ ### `mozole adopt [path]`
63
+ Adopts an existing web project into Mozole Studio governance, injecting `AGENTS.md`, `CLAUDE.md`, `docs/phases/status.md`, `docs/repomap/`, and design token foundations.
78
64
 
79
- ```sh
80
- mozole cce install
81
- mozole new agent-site --cce-install
82
- # --install-cce is an alias; --backend can be combined with either flag.
83
- mozole adopt existing-site --cce-install
84
- ```
85
-
86
- Only explicit `--cce-install`/`--install-cce` enables the CCE runtime integration, Codex/Claude hooks, Antigravity workspace files, token governor, telemetry, and verification/QA evidence reuse. The project then depends on the matching CLI version. `--scaffold` on `new` overrides integration flags.
65
+ ### `mozole phase [status|next|reopen]`
66
+ Manages project progression through the 10-step atomic development lifecycle:
87
67
 
88
- CCE initialization uses the pinned release in `src/version.ts`. `mozole cce install` installs its runtime; creation reports when an unavailable runtime needs attention. Adoption with integration flags requires a runnable CCE runtime before installing managed integrations. Existing user instructions and unrelated hook/MCP entries are preserved. Managed instruction blocks and hook definitions are refreshed idempotently.
68
+ - `mozole phase status` Displays visual checklist and status for all phases.
69
+ - `mozole phase next` — Advances one phase and creates a conventional commit (`feat(phase-XX): ...`) when Git is initialized. Complete the checklist and run `mozole verify` first; checklist completion is a developer responsibility. Failed commits restore the previous phase file and Git index.
70
+ - `mozole phase reopen <id>` — Reopens a completed phase for post-launch maintenance.
89
71
 
90
- Optimized `AGENTS.md` provides the shared CCE-first contract; `CLAUDE.md` imports it and Antigravity rules reference it. Instructions are guidance, not execution proof. Codex discovers `AGENTS.md` by directory scope, with `AGENTS.override.md` taking precedence. Project hooks need host review/trust before execution. See [AGENTS.md discovery](https://learn.chatgpt.com/docs/agent-configuration/agents-md) and [Codex hooks](https://learn.chatgpt.com/docs/hooks).
72
+ ### `mozole repomap [sync|check]`
73
+ Synchronizes and audits the `docs/repomap/` architectural index, component registry, and route catalog.
91
74
 
92
- Read and command policies run on `PreToolUse`. CCE retrieval tracking runs on `PostToolUse`, including MCP tool names, and ignores explicit tool-error responses. The Antigravity visual workflow provides a reason accepted by the visual QA gate. Host-specific agent sessions are not automatically launched by the CLI test suite.
75
+ ### `mozole test [contract|a11y|probe|all]`
76
+ Executes Mozole Quality Kit verification suites:
77
+ - `mozole test contract` — PostCSS AST design token contract audit (prohibits literal colors, `transition: all`, fixed viewport dimensions).
78
+ - `mozole test a11y` — Static HTML and accessibility landmark hierarchy validation.
79
+ - `mozole test probe` — Headless live DOM geometry and trace runner. Discovers local Brave/Chromium (or auto-provisions Playwright Chromium if absent). Measures live bounding boxes, horizontal overflow on mobile viewports (320px+), text clipping, touch targets (<24px), prefers-reduced-motion violations, and 200% text-zoom reflow stress. Strictly zero raster screenshots (`screenshots: false, snapshots: true`); emits full interactive trace packages to `docs/qa/trace.zip` for inspection via [trace.playwright.dev](https://trace.playwright.dev).
80
+ - `mozole test all` (default) — Executes static contract and accessibility audits.
93
81
 
94
- Optimized verification/QA reuses matching successful evidence. Verification evidence covers all non-generated project files and is invalidated by CLI upgrades. Use `--force` for a fresh run. Routine QA is screenshot-free; visual QA uses explicit `--visual` and, after successful routine QA, `--reason` or `--force`. Enabled governors enforce read/command policies and can deny calls; they are not advisory-only. Local telemetry reports measured output compression and tool activity, not model billing savings.
82
+ ### `mozole verify [--probe]`
83
+ The authoritative, multi-stage deterministic gate required before completing agentic tasks:
84
+ 1. AI Trace Scanner (strictly prohibits synthetic watermarks and bot co-author trailers)
85
+ 2. Biome lint & code style check
86
+ 3. Project `typecheck` script (including React Router type generation), or local TypeScript compiler
87
+ 4. Production build (`npm run build`)
88
+ 5. PostCSS design token contract audit
89
+ 6. Accessibility & landmark hierarchy validation against built HTML
90
+ 7. *(Optional with `--probe`)* Live headless DOM geometry & trace probe across critical viewports
95
91
 
96
- ## Adopt an existing project
92
+ Biome and TypeScript must be installed locally; verification never downloads missing CLI tools with `npx`. Standard projects emit static pages for `/`, `/about`, and `/contact` without requiring a Node server in production. See the [React Router pre-rendering documentation](https://reactrouter.com/how-to/pre-rendering) for hosting configuration.
97
93
 
98
- New projects include pinned Tailwind CSS v4 and `@tailwindcss/vite` by default in all modes, including PHP projects. `app/styles/global.css` imports Tailwind and keeps starter styles in the base layer. Adoption preserves existing CSS and Vite configuration; it does not automatically migrate older styling pipelines or inject Preflight into an existing design.
94
+ The PHP contact backend requires an allowed Origin or a Referer with the same scheme, host and port as an allowed origin. Requests without either are rejected. Rate-limit storage errors return HTTP 503; mail transport failures return HTTP 502 with `success: false`. Configure `api/config.php` and the hosting mail transport before accepting real submissions.
99
95
 
100
- ```sh
101
- mozole adopt ../existing-app
102
- ```
96
+ ### `mozole doctor`
97
+ Diagnoses workstation prerequisites: Node.js (>= 20), Git, PHP 8.1+ status, local Chromium/Brave browser engine availability, and network port availability.
103
98
 
104
- Adoption reconciles a React/Vite or React Router project with the current project system. Without `--cce-install`, it removes Mozole-owned CCE integrations, optimization hooks and state, including from previously optimized projects, and installs standalone verification/QA. The flag explicitly selects the optimized system. User instructions, unrelated integrations, application source and design exports are preserved. Recognized unchanged legacy PHP templates are upgraded; customized backend files are retained with a review notice. Replaced files and obsolete state are archived under `.mozole/backups/adopt-*`; managed files are restored if installation fails. Tooling versions and npm dependencies are reconciled on every adoption. Custom verifier commands and configured QA servers remain in use. Repeating adoption does not duplicate managed instruction blocks.
105
-
106
- ## CLI commands
107
-
108
- ```text
109
- mozole new <name> [--backend] [--cce-install] [--verbose]
110
- mozole template init [folder]
111
- mozole template adopt <project-path> [--cce-install] [--verbose]
112
- mozole template list
113
- mozole adopt <path> [--cce-install] [--verbose]
114
- mozole doctor
115
- mozole verify [--force]
116
- mozole qa [--interactive | --visual [--diff]] [--force]
117
- mozole logs [name] [--raw]
118
- mozole cce install
119
- mozole stats
120
- mozole ui
121
- ```
99
+ ### `mozole ui` (or bare `mozole`)
100
+ Launches the interactive terminal cockpit.
122
101
 
123
- `doctor` checks runtime, project tooling, and optional PHP syntax. CCE probes are omitted for plain projects. `mozole verify` and `mozole qa` can also operate on plain project metadata without reading or writing optimization state. `stats` reports that statistics are disabled in plain projects. Standalone project QA supports normal, interactive, and visual modes; pixel diffing remains in the optional CLI QA runner.
102
+ ---
124
103
 
125
- ## Development
104
+ ## Repository Governance
126
105
 
127
- ```sh
128
- npm ci
129
- npx playwright install chromium
130
- npm run verify
131
- npm run test:smoke
132
- npm pack --dry-run
133
- ```
106
+ This project is governed by [AGENTS.md](./AGENTS.md). All automated agents and contributors must adhere to the rules therein.
134
107
 
135
- The CI matrix runs on native Windows and Ubuntu with PHP. It covers real PHP routing, method handling, syntax failures, deployment replacement and rollback, default scaffold isolation, agent-file wiring, conservative adoption, and generated frontend/PHP/optimized projects. The optimized smoke scenario skips CCE initialization; live CCE installation is covered separately with runtime fixtures.
108
+ ## License
136
109
 
137
- Subprocesses use argument arrays and `shell: false`. Persisted configuration, state, and telemetry use temporary files and atomic replacement. Dependency versions are pinned centrally in `src/version.ts`.
110
+ MIT © Mozole Studio
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- export declare function isCliEntrypoint(entryUrl: string, invokedPath: string | undefined): boolean;
3
- export declare function main(args?: string[], cwd?: string): Promise<number>;
2
+ export declare const main: import("citty").CommandDef<import("citty").ArgsDef>;
3
+ export declare function runCli(argv?: string[]): Promise<void>;
4
4
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAsBA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,OAAO,CAOT;AAuDD,wBAAsB,IAAI,CACxB,IAAI,WAAwB,EAC5B,GAAG,SAAgB,GAClB,OAAO,CAAC,MAAM,CAAC,CA2KjB"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA+LA,eAAO,MAAM,IAAI,qDAuBf,CAAC;AAEH,wBAAgB,MAAM,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE"}