@mozole/cli 1.4.2 → 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.
- package/LICENSE +16 -4
- package/README.md +85 -89
- package/dist/cli.d.ts +2 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +204 -157
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +5 -8
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +49 -812
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -7
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +69 -377
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/new.d.ts +8 -10
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +32 -149
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/phase.d.ts +11 -0
- package/dist/commands/phase.d.ts.map +1 -0
- package/dist/commands/phase.js +106 -0
- package/dist/commands/phase.js.map +1 -0
- package/dist/commands/prototype.d.ts +6 -0
- package/dist/commands/prototype.d.ts.map +1 -0
- package/dist/commands/prototype.js +28 -0
- package/dist/commands/prototype.js.map +1 -0
- package/dist/commands/repomap.d.ts +6 -0
- package/dist/commands/repomap.d.ts.map +1 -0
- package/dist/commands/repomap.js +71 -0
- package/dist/commands/repomap.js.map +1 -0
- package/dist/commands/test.d.ts +6 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +115 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/ui.d.ts +1 -37
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +75 -317
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/verify.d.ts +12 -7
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +148 -65
- package/dist/commands/verify.js.map +1 -1
- package/dist/qa/a11y.d.ts +24 -0
- package/dist/qa/a11y.d.ts.map +1 -0
- package/dist/qa/a11y.js +124 -0
- package/dist/qa/a11y.js.map +1 -0
- package/dist/qa/breakpoints.d.ts +16 -0
- package/dist/qa/breakpoints.d.ts.map +1 -0
- package/dist/qa/breakpoints.js +45 -0
- package/dist/qa/breakpoints.js.map +1 -0
- package/dist/qa/contract.d.ts +21 -0
- package/dist/qa/contract.d.ts.map +1 -0
- package/dist/qa/contract.js +116 -0
- package/dist/qa/contract.js.map +1 -0
- package/dist/qa/index.d.ts +6 -0
- package/dist/qa/index.d.ts.map +1 -0
- package/dist/qa/index.js +6 -0
- package/dist/qa/index.js.map +1 -0
- package/dist/qa/probe.d.ts +48 -0
- package/dist/qa/probe.d.ts.map +1 -0
- package/dist/qa/probe.js +206 -0
- package/dist/qa/probe.js.map +1 -0
- package/dist/qa/runner.d.ts +27 -32
- package/dist/qa/runner.d.ts.map +1 -1
- package/dist/qa/runner.js +286 -336
- package/dist/qa/runner.js.map +1 -1
- package/dist/scaffold/agents.d.ts +5 -0
- package/dist/scaffold/agents.d.ts.map +1 -0
- package/dist/scaffold/agents.js +84 -0
- package/dist/scaffold/agents.js.map +1 -0
- package/dist/scaffold/backend.d.ts +6 -8
- package/dist/scaffold/backend.d.ts.map +1 -1
- package/dist/scaffold/backend.js +318 -199
- package/dist/scaffold/backend.js.map +1 -1
- package/dist/scaffold/design.d.ts +4 -3
- package/dist/scaffold/design.d.ts.map +1 -1
- package/dist/scaffold/design.js +38 -47
- package/dist/scaffold/design.js.map +1 -1
- package/dist/scaffold/flagship.d.ts +8 -0
- package/dist/scaffold/flagship.d.ts.map +1 -0
- package/dist/scaffold/flagship.js +337 -0
- package/dist/scaffold/flagship.js.map +1 -0
- package/dist/scaffold/index.d.ts +9 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +48 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/phases.d.ts +10 -0
- package/dist/scaffold/phases.d.ts.map +1 -0
- package/dist/scaffold/phases.js +165 -0
- package/dist/scaffold/phases.js.map +1 -0
- package/dist/scaffold/repomap.d.ts +6 -0
- package/dist/scaffold/repomap.d.ts.map +1 -0
- package/dist/scaffold/repomap.js +89 -0
- package/dist/scaffold/repomap.js.map +1 -0
- package/dist/scaffold/standard.d.ts +13 -0
- package/dist/scaffold/standard.d.ts.map +1 -0
- package/dist/scaffold/standard.js +371 -0
- package/dist/scaffold/standard.js.map +1 -0
- package/dist/scaffold/tokens.d.ts +3 -0
- package/dist/scaffold/tokens.d.ts.map +1 -0
- package/dist/scaffold/tokens.js +126 -0
- package/dist/scaffold/tokens.js.map +1 -0
- package/dist/server/manager.d.ts +23 -0
- package/dist/server/manager.d.ts.map +1 -0
- package/dist/server/manager.js +96 -0
- package/dist/server/manager.js.map +1 -0
- package/dist/utils/ai-trace.d.ts +8 -0
- package/dist/utils/ai-trace.d.ts.map +1 -0
- package/dist/utils/ai-trace.js +69 -0
- package/dist/utils/ai-trace.js.map +1 -0
- package/dist/utils/browser.d.ts +10 -0
- package/dist/utils/browser.d.ts.map +1 -0
- package/dist/utils/browser.js +127 -0
- package/dist/utils/browser.js.map +1 -0
- package/dist/utils/fs.d.ts +11 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +166 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/git.d.ts +9 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +69 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/process.d.ts +21 -0
- package/dist/utils/process.d.ts.map +1 -0
- package/dist/utils/process.js +120 -0
- package/dist/utils/process.js.map +1 -0
- package/dist/version.d.ts +21 -36
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +21 -44
- package/dist/version.js.map +1 -1
- package/package.json +19 -38
- package/CHANGELOG.md +0 -30
- package/dist/commands/cce.d.ts +0 -7
- package/dist/commands/cce.d.ts.map +0 -1
- package/dist/commands/cce.js +0 -37
- package/dist/commands/cce.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -3
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -39
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/qa.d.ts +0 -12
- package/dist/commands/qa.d.ts.map +0 -1
- package/dist/commands/qa.js +0 -143
- package/dist/commands/qa.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -37
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -169
- package/dist/commands/stats.js.map +0 -1
- package/dist/config/project.d.ts +0 -51
- package/dist/config/project.d.ts.map +0 -1
- package/dist/config/project.js +0 -81
- package/dist/config/project.js.map +0 -1
- package/dist/context/cce.d.ts +0 -39
- package/dist/context/cce.d.ts.map +0 -1
- package/dist/context/cce.js +0 -455
- package/dist/context/cce.js.map +0 -1
- package/dist/governor/fingerprint.d.ts +0 -7
- package/dist/governor/fingerprint.d.ts.map +0 -1
- package/dist/governor/fingerprint.js +0 -129
- package/dist/governor/fingerprint.js.map +0 -1
- package/dist/governor/hook.d.ts +0 -13
- package/dist/governor/hook.d.ts.map +0 -1
- package/dist/governor/hook.js +0 -389
- package/dist/governor/hook.js.map +0 -1
- package/dist/governor/state.d.ts +0 -45
- package/dist/governor/state.d.ts.map +0 -1
- package/dist/governor/state.js +0 -60
- package/dist/governor/state.js.map +0 -1
- package/dist/integrations/antigravity.d.ts +0 -20
- package/dist/integrations/antigravity.d.ts.map +0 -1
- package/dist/integrations/antigravity.js +0 -153
- package/dist/integrations/antigravity.js.map +0 -1
- package/dist/output.d.ts +0 -5
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -2
- package/dist/output.js.map +0 -1
- package/dist/platform/executable.d.ts +0 -11
- package/dist/platform/executable.d.ts.map +0 -1
- package/dist/platform/executable.js +0 -69
- package/dist/platform/executable.js.map +0 -1
- package/dist/platform/process.d.ts +0 -25
- package/dist/platform/process.d.ts.map +0 -1
- package/dist/platform/process.js +0 -179
- package/dist/platform/process.js.map +0 -1
- package/dist/progress.d.ts +0 -44
- package/dist/progress.d.ts.map +0 -1
- package/dist/progress.js +0 -123
- package/dist/progress.js.map +0 -1
- package/dist/qa/diff.d.ts +0 -10
- package/dist/qa/diff.d.ts.map +0 -1
- package/dist/qa/diff.js +0 -91
- package/dist/qa/diff.js.map +0 -1
- package/dist/qa/server.d.ts +0 -10
- package/dist/qa/server.d.ts.map +0 -1
- package/dist/qa/server.js +0 -127
- package/dist/qa/server.js.map +0 -1
- package/dist/scaffold/adoption.d.ts +0 -17
- package/dist/scaffold/adoption.d.ts.map +0 -1
- package/dist/scaffold/adoption.js +0 -279
- package/dist/scaffold/adoption.js.map +0 -1
- package/dist/scaffold/legacy.d.ts +0 -4
- package/dist/scaffold/legacy.d.ts.map +0 -1
- package/dist/scaffold/legacy.js +0 -139
- package/dist/scaffold/legacy.js.map +0 -1
- package/dist/scaffold/routes.d.ts +0 -3
- package/dist/scaffold/routes.d.ts.map +0 -1
- package/dist/scaffold/routes.js +0 -37
- package/dist/scaffold/routes.js.map +0 -1
- package/dist/scaffold/standalone.d.ts +0 -7
- package/dist/scaffold/standalone.d.ts.map +0 -1
- package/dist/scaffold/standalone.js +0 -294
- package/dist/scaffold/standalone.js.map +0 -1
- package/dist/scaffold/templates.d.ts +0 -8
- package/dist/scaffold/templates.d.ts.map +0 -1
- package/dist/scaffold/templates.js +0 -312
- package/dist/scaffold/templates.js.map +0 -1
- package/dist/scaffold/write.d.ts +0 -2
- package/dist/scaffold/write.d.ts.map +0 -1
- package/dist/scaffold/write.js +0 -38
- package/dist/scaffold/write.js.map +0 -1
- package/dist/telemetry/store.d.ts +0 -33
- package/dist/telemetry/store.d.ts.map +0 -1
- package/dist/telemetry/store.js +0 -75
- package/dist/telemetry/store.js.map +0 -1
- package/dist/verify/runner.d.ts +0 -15
- package/dist/verify/runner.d.ts.map +0 -1
- package/dist/verify/runner.js +0 -112
- package/dist/verify/runner.js.map +0 -1
- package/docs/agent-audit.md +0 -24
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { designGuardrails } from "./design.js";
|
|
2
|
-
/** Standalone project tooling: no dependency on the generator at runtime. */
|
|
3
|
-
export const backendCheckScript = `import { spawnSync } from "node:child_process";
|
|
4
|
-
import { readdir } from "node:fs/promises";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
|
|
7
|
-
function php(args) {
|
|
8
|
-
const result = spawnSync("php", args, {
|
|
9
|
-
encoding: "utf8",
|
|
10
|
-
shell: false,
|
|
11
|
-
timeout: 10000,
|
|
12
|
-
});
|
|
13
|
-
if (result.error || result.status !== 0)
|
|
14
|
-
throw new Error(result.error?.message || result.stderr || result.stdout);
|
|
15
|
-
return result.stdout.trim();
|
|
16
|
-
}
|
|
17
|
-
async function lint(directory) {
|
|
18
|
-
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
19
|
-
const file = path.join(directory, entry.name);
|
|
20
|
-
if (entry.isDirectory()) await lint(file);
|
|
21
|
-
else if (entry.isFile() && entry.name.endsWith(".php")) php(["-l", file]);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const version = Number(php(["-r", "echo PHP_VERSION_ID;"]));
|
|
26
|
-
if (!Number.isInteger(version) || version < 80000)
|
|
27
|
-
throw new Error("PHP 8.0 or newer is required.");
|
|
28
|
-
await lint("api");
|
|
29
|
-
console.log("PHP PASS");
|
|
30
|
-
} catch (error) {
|
|
31
|
-
console.error(\`PHP FAIL\\n\${error.message}\`);
|
|
32
|
-
process.exitCode = 1;
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
export const deployScript = `import { cp, lstat, mkdir, rename, rm } from "node:fs/promises";
|
|
36
|
-
import path from "node:path";
|
|
37
|
-
|
|
38
|
-
const target = path.resolve("deploy");
|
|
39
|
-
const staging = \`\${target}.\${process.pid}.tmp\`;
|
|
40
|
-
const backup = \`\${target}.\${process.pid}.backup\`;
|
|
41
|
-
let backedUp = false;
|
|
42
|
-
try {
|
|
43
|
-
await mkdir(staging);
|
|
44
|
-
await cp("build/client", staging, { recursive: true, errorOnExist: true });
|
|
45
|
-
await cp("api", path.join(staging, "api"), { recursive: true });
|
|
46
|
-
await cp(".htaccess", path.join(staging, ".htaccess"));
|
|
47
|
-
try {
|
|
48
|
-
await lstat(target);
|
|
49
|
-
await rename(target, backup);
|
|
50
|
-
backedUp = true;
|
|
51
|
-
} catch (error) {
|
|
52
|
-
if (error.code !== "ENOENT") throw error;
|
|
53
|
-
}
|
|
54
|
-
try {
|
|
55
|
-
await rename(staging, target);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (backedUp) await rename(backup, target);
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
if (backedUp) await rm(backup, { recursive: true });
|
|
61
|
-
console.log("DEPLOY READY: deploy/");
|
|
62
|
-
} finally {
|
|
63
|
-
await rm(staging, { recursive: true, force: true });
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
export const qaScript = `import { spawn, spawnSync } from "node:child_process";
|
|
67
|
-
import { mkdir, readFile } from "node:fs/promises";
|
|
68
|
-
import net from "node:net";
|
|
69
|
-
import { chromium } from "playwright";
|
|
70
|
-
|
|
71
|
-
const flags = process.argv.slice(2);
|
|
72
|
-
if (
|
|
73
|
-
flags.some((flag) => !["--visual", "--interactive", "--force"].includes(flag))
|
|
74
|
-
)
|
|
75
|
-
throw new Error("Unknown QA option");
|
|
76
|
-
const config = JSON.parse(await readFile(".mozole/project.json", "utf8"));
|
|
77
|
-
const socket = net.createServer();
|
|
78
|
-
await new Promise((resolve, reject) => {
|
|
79
|
-
socket.once("error", reject);
|
|
80
|
-
socket.listen(0, "127.0.0.1", resolve);
|
|
81
|
-
});
|
|
82
|
-
const port = socket.address().port;
|
|
83
|
-
await new Promise((resolve) => socket.close(resolve));
|
|
84
|
-
const configured = config.qa.server;
|
|
85
|
-
const npmCli = process.env.npm_execpath;
|
|
86
|
-
if (configured.command === "npm" && !npmCli) {
|
|
87
|
-
throw new Error(
|
|
88
|
-
"Run QA through npm run qa so npm can be resolved without a shell.",
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
const command =
|
|
92
|
-
configured.command === "npm" ? process.execPath : configured.command;
|
|
93
|
-
const args = [
|
|
94
|
-
...(configured.command === "npm" ? [npmCli] : []),
|
|
95
|
-
...configured.args,
|
|
96
|
-
"--port",
|
|
97
|
-
String(port),
|
|
98
|
-
"--strictPort",
|
|
99
|
-
];
|
|
100
|
-
const child = spawn(command, args, {
|
|
101
|
-
shell: false,
|
|
102
|
-
detached: process.platform !== "win32",
|
|
103
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
104
|
-
});
|
|
105
|
-
let serverLog = "";
|
|
106
|
-
for (const stream of [child.stdout, child.stderr])
|
|
107
|
-
stream.on("data", (data) => {
|
|
108
|
-
serverLog = (serverLog + data).slice(-4000);
|
|
109
|
-
});
|
|
110
|
-
let serverError;
|
|
111
|
-
child.on("error", (error) => {
|
|
112
|
-
serverError = error;
|
|
113
|
-
});
|
|
114
|
-
let browser;
|
|
115
|
-
let stopping = false;
|
|
116
|
-
async function cleanup() {
|
|
117
|
-
if (stopping) return;
|
|
118
|
-
stopping = true;
|
|
119
|
-
await browser?.close().catch(() => {});
|
|
120
|
-
if (child.pid) {
|
|
121
|
-
if (process.platform === "win32")
|
|
122
|
-
spawnSync("taskkill", ["/pid", String(child.pid), "/T", "/F"], {
|
|
123
|
-
shell: false,
|
|
124
|
-
stdio: "ignore",
|
|
125
|
-
});
|
|
126
|
-
else {
|
|
127
|
-
try {
|
|
128
|
-
process.kill(-child.pid, "SIGTERM");
|
|
129
|
-
} catch {}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const interrupted = () => {
|
|
134
|
-
void cleanup().finally(() => process.exit(130));
|
|
135
|
-
};
|
|
136
|
-
process.once("SIGINT", interrupted);
|
|
137
|
-
process.once("SIGTERM", interrupted);
|
|
138
|
-
const deadline = setTimeout(() => {
|
|
139
|
-
console.error("QA timed out");
|
|
140
|
-
void cleanup().finally(() => process.exit(1));
|
|
141
|
-
}, 120000);
|
|
142
|
-
const base = \`http://127.0.0.1:\${port}\`;
|
|
143
|
-
try {
|
|
144
|
-
let ready = false;
|
|
145
|
-
for (let attempt = 0; attempt < 300; attempt++) {
|
|
146
|
-
if (serverError || child.exitCode !== null)
|
|
147
|
-
throw new Error(serverError?.message || serverLog);
|
|
148
|
-
try {
|
|
149
|
-
ready = (
|
|
150
|
-
await fetch(base + config.qa.server.readinessPath, {
|
|
151
|
-
signal: AbortSignal.timeout(1000),
|
|
152
|
-
})
|
|
153
|
-
).ok;
|
|
154
|
-
} catch {}
|
|
155
|
-
if (ready) break;
|
|
156
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
157
|
-
}
|
|
158
|
-
if (!ready)
|
|
159
|
-
throw new Error(\`Development server did not become ready.\\n\${serverLog}\`);
|
|
160
|
-
browser = await chromium.launch();
|
|
161
|
-
const failures = [];
|
|
162
|
-
for (const viewport of config.qa.viewports) {
|
|
163
|
-
const page = await browser.newPage({ viewport });
|
|
164
|
-
page.on("pageerror", (error) => failures.push(error.message));
|
|
165
|
-
page.on("console", (message) => {
|
|
166
|
-
if (message.type() === "error") failures.push(message.text());
|
|
167
|
-
});
|
|
168
|
-
page.on("requestfailed", (request) => {
|
|
169
|
-
if (request.failure()?.errorText !== "net::ERR_ABORTED")
|
|
170
|
-
failures.push(request.url());
|
|
171
|
-
});
|
|
172
|
-
page.on("response", (response) => {
|
|
173
|
-
if (response.status() >= 400)
|
|
174
|
-
failures.push(\`\${response.status()} \${response.url()}\`);
|
|
175
|
-
});
|
|
176
|
-
for (const route of config.routes) {
|
|
177
|
-
const response = await page.goto(base + route, {
|
|
178
|
-
waitUntil: "networkidle",
|
|
179
|
-
});
|
|
180
|
-
if (!response?.ok()) failures.push(\`\${route}: HTTP failure\`);
|
|
181
|
-
const issues = await page.evaluate(() => {
|
|
182
|
-
const found = [];
|
|
183
|
-
if (!document.documentElement.lang) found.push("missing lang");
|
|
184
|
-
if (!document.title.trim()) found.push("missing title");
|
|
185
|
-
if (!document.querySelector("h1")) found.push("missing h1");
|
|
186
|
-
if (document.documentElement.scrollWidth > innerWidth + 1)
|
|
187
|
-
found.push("horizontal overflow");
|
|
188
|
-
for (const element of document.querySelectorAll(
|
|
189
|
-
"a, button, input:not([type=hidden]), select, textarea",
|
|
190
|
-
)) {
|
|
191
|
-
if (!element.getClientRects().length) continue;
|
|
192
|
-
const labelled = (element.getAttribute("aria-labelledby") || "")
|
|
193
|
-
.split(/\\s+/)
|
|
194
|
-
.some((id) => document.getElementById(id)?.textContent?.trim());
|
|
195
|
-
if (
|
|
196
|
-
!element.textContent?.trim() &&
|
|
197
|
-
!element.getAttribute("aria-label") &&
|
|
198
|
-
!labelled &&
|
|
199
|
-
!element.labels?.length &&
|
|
200
|
-
!element.getAttribute("title") &&
|
|
201
|
-
!element.getAttribute("alt") &&
|
|
202
|
-
!element.querySelector("img[alt]")
|
|
203
|
-
)
|
|
204
|
-
found.push("unnamed control");
|
|
205
|
-
}
|
|
206
|
-
return found;
|
|
207
|
-
});
|
|
208
|
-
failures.push(...issues.map((issue) => \`\${route}: \${issue}\`));
|
|
209
|
-
const links = await page
|
|
210
|
-
.locator("a[href]")
|
|
211
|
-
.evaluateAll((anchors) => anchors.map((anchor) => anchor.href));
|
|
212
|
-
for (const href of new Set(links)) {
|
|
213
|
-
if (
|
|
214
|
-
new URL(href).origin === base &&
|
|
215
|
-
!(await page.request.get(href)).ok()
|
|
216
|
-
)
|
|
217
|
-
failures.push(\`broken link: \${href}\`);
|
|
218
|
-
}
|
|
219
|
-
if (flags.includes("--interactive")) {
|
|
220
|
-
await page.keyboard.press("Tab");
|
|
221
|
-
if (
|
|
222
|
-
!(await page.evaluate(() => document.activeElement !== document.body))
|
|
223
|
-
)
|
|
224
|
-
failures.push(\`\${route}: keyboard focus missing\`);
|
|
225
|
-
}
|
|
226
|
-
if (flags.includes("--visual")) {
|
|
227
|
-
await mkdir(".mozole/qa", { recursive: true });
|
|
228
|
-
const name = route.replace(/[^a-z0-9_-]/gi, "-") || "index";
|
|
229
|
-
await page.screenshot({
|
|
230
|
-
path:
|
|
231
|
-
".mozole/qa/" +
|
|
232
|
-
viewport.width +
|
|
233
|
-
"x" +
|
|
234
|
-
viewport.height +
|
|
235
|
-
"-" +
|
|
236
|
-
name +
|
|
237
|
-
".png",
|
|
238
|
-
fullPage: true,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
await page.close();
|
|
243
|
-
}
|
|
244
|
-
if (failures.length) throw new Error([...new Set(failures)].join("\\n"));
|
|
245
|
-
console.log(
|
|
246
|
-
"QA PASS: " +
|
|
247
|
-
config.routes.length +
|
|
248
|
-
" routes, " +
|
|
249
|
-
config.qa.viewports.length +
|
|
250
|
-
" viewports",
|
|
251
|
-
);
|
|
252
|
-
} catch (error) {
|
|
253
|
-
console.error(\`QA FAIL\\n\${error.message}\`);
|
|
254
|
-
process.exitCode = 1;
|
|
255
|
-
} finally {
|
|
256
|
-
clearTimeout(deadline);
|
|
257
|
-
process.removeListener("SIGINT", interrupted);
|
|
258
|
-
process.removeListener("SIGTERM", interrupted);
|
|
259
|
-
await cleanup();
|
|
260
|
-
}
|
|
261
|
-
`;
|
|
262
|
-
export function basicAgentGuide(backend) {
|
|
263
|
-
return `# Project guide\n\n## Commands\n\n- \`npm run dev\` — frontend development server\n- \`npm run verify\` — lint, typecheck, tests, production build\n- \`npm run qa\` — browser checks without screenshots\n- \`npm run qa:interactive\` — keyboard checks\n- \`npm run qa:visual\` — explicitly requested screenshots\n${backend ? "- `npm run dev:api` — PHP API in a separate terminal (PHP 8.0+)\n- `npm run check:php` — PHP version and syntax checks\n- `npm run build:deploy` — assemble deploy/ for Apache or LiteSpeed\n" : ""}\n## Architecture\n\nReact Router and Vite source is in \`app/\`; routes are declared in \`app/routes.ts\`. Production HTML and assets are in \`build/client/\`.${backend ? " PHP endpoints are in `api/`; the frontend uses relative `/api/` URLs through Vite's proxy. See `docs/backend-php.md`." : ""}\n\n## Working rules\n\nPreserve user changes. Inspect relevant code before editing. Run verification and relevant browser checks before handoff. Routine QA never captures screenshots; use visual QA only when requested. Report failed checks and remaining limitations.\n\n${designGuardrails}`;
|
|
264
|
-
}
|
|
265
|
-
export const extraVerifierScript = `import { spawnSync } from "node:child_process";
|
|
266
|
-
import { readFile } from "node:fs/promises";
|
|
267
|
-
|
|
268
|
-
const config = JSON.parse(await readFile(".mozole/project.json", "utf8"));
|
|
269
|
-
for (const check of config.verifiers ?? []) {
|
|
270
|
-
if (
|
|
271
|
-
typeof check.command !== "string" ||
|
|
272
|
-
!Array.isArray(check.args) ||
|
|
273
|
-
!check.args.every((arg) => typeof arg === "string")
|
|
274
|
-
)
|
|
275
|
-
throw new Error("Invalid extra verifier");
|
|
276
|
-
const npm = check.command === "npm";
|
|
277
|
-
if (npm && !process.env.npm_execpath)
|
|
278
|
-
throw new Error("Run verification through npm run verify");
|
|
279
|
-
const result = spawnSync(
|
|
280
|
-
npm ? process.execPath : check.command,
|
|
281
|
-
npm ? [process.env.npm_execpath, ...check.args] : check.args,
|
|
282
|
-
{ shell: false, stdio: "inherit", timeout: 600000 },
|
|
283
|
-
);
|
|
284
|
-
if (result.error || result.status !== 0) {
|
|
285
|
-
console.error(
|
|
286
|
-
"Extra verifier failed:",
|
|
287
|
-
check.name,
|
|
288
|
-
result.error?.message ?? result.status,
|
|
289
|
-
);
|
|
290
|
-
process.exit(result.status || 1);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
`;
|
|
294
|
-
//# sourceMappingURL=standalone.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../src/scaffold/standalone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BjC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B3B,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmMvB,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO,0TAA0T,OAAO,CAAC,CAAC,CAAC,+LAA+L,CAAC,CAAC,CAAC,EAAE,mKAAmK,OAAO,CAAC,CAAC,CAAC,wHAAwH,CAAC,CAAC,CAAC,EAAE,kRAAkR,gBAAgB,EAAE,CAAC;AAChmC,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { MozoleConfig } from "../config/project.js";
|
|
2
|
-
export interface ProjectTemplateOptions {
|
|
3
|
-
scaffold?: boolean | undefined;
|
|
4
|
-
backend?: boolean | undefined;
|
|
5
|
-
}
|
|
6
|
-
export declare function projectConfig(name: string, options?: ProjectTemplateOptions): MozoleConfig;
|
|
7
|
-
export declare function projectTemplates(name: string, options?: ProjectTemplateOptions): Record<string, string>;
|
|
8
|
-
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAczD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,sBAA2B,GACnC,YAAY,CAiDd;AAID,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmTxB"}
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import { cceMcpServer } from "../integrations/antigravity.js";
|
|
2
|
-
import { TOOLCHAIN } from "../version.js";
|
|
3
|
-
import { instructionBlock } from "./adoption.js";
|
|
4
|
-
import { backendTemplates } from "./backend.js";
|
|
5
|
-
import { designGuardrails, designHandoffGuide } from "./design.js";
|
|
6
|
-
import { backendCheckScript, basicAgentGuide, deployScript, extraVerifierScript, qaScript, } from "./standalone.js";
|
|
7
|
-
export function projectConfig(name, options = {}) {
|
|
8
|
-
const isScaffold = options.scaffold !== false;
|
|
9
|
-
const config = {
|
|
10
|
-
schemaVersion: 1,
|
|
11
|
-
name,
|
|
12
|
-
mode: isScaffold ? "scaffold" : "optimized",
|
|
13
|
-
framework: "react-router",
|
|
14
|
-
routes: ["/", "/about", "/contact"],
|
|
15
|
-
qa: {
|
|
16
|
-
viewports: [
|
|
17
|
-
{ width: 375, height: 812 },
|
|
18
|
-
{ width: 768, height: 1024 },
|
|
19
|
-
{ width: 1440, height: 900 },
|
|
20
|
-
],
|
|
21
|
-
visualDiffThreshold: 0.01,
|
|
22
|
-
server: {
|
|
23
|
-
command: "npm",
|
|
24
|
-
args: ["run", "dev", "--", "--host", "127.0.0.1"],
|
|
25
|
-
readinessPath: "/",
|
|
26
|
-
preferredPort: 4173,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
verifiers: [],
|
|
30
|
-
};
|
|
31
|
-
if (!isScaffold) {
|
|
32
|
-
config.cce = {
|
|
33
|
-
enabled: true,
|
|
34
|
-
initialized: false,
|
|
35
|
-
command: "cce init --agent all",
|
|
36
|
-
};
|
|
37
|
-
config.governor = {
|
|
38
|
-
enabled: true,
|
|
39
|
-
mode: "enforce",
|
|
40
|
-
hooks: { codex: true, claude: true },
|
|
41
|
-
};
|
|
42
|
-
config.telemetry = { enabled: true };
|
|
43
|
-
}
|
|
44
|
-
if (options.backend) {
|
|
45
|
-
config.backend = {
|
|
46
|
-
enabled: true,
|
|
47
|
-
runtime: "php",
|
|
48
|
-
apiPrefix: "/api",
|
|
49
|
-
port: 8000,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return config;
|
|
53
|
-
}
|
|
54
|
-
const json = (value) => `${JSON.stringify(value, null, 2)}\n`;
|
|
55
|
-
export function projectTemplates(name, options = {}) {
|
|
56
|
-
const isScaffold = options.scaffold !== false;
|
|
57
|
-
const cliSpec = process.env.MOZOLE_CLI_SPEC ?? TOOLCHAIN.mozoleCli;
|
|
58
|
-
const scripts = {
|
|
59
|
-
build: "react-router build",
|
|
60
|
-
dev: "react-router dev",
|
|
61
|
-
lint: "biome check .",
|
|
62
|
-
format: "biome format --write .",
|
|
63
|
-
typecheck: "react-router typegen && tsc --noEmit",
|
|
64
|
-
test: "vitest",
|
|
65
|
-
"test:run": "vitest run",
|
|
66
|
-
verify: "mozole verify",
|
|
67
|
-
"verify:force": "mozole verify --force",
|
|
68
|
-
qa: "mozole qa",
|
|
69
|
-
"qa:force": "mozole qa --force",
|
|
70
|
-
"qa:interactive": "mozole qa --interactive",
|
|
71
|
-
"qa:visual": "mozole qa --visual",
|
|
72
|
-
};
|
|
73
|
-
if (options.backend) {
|
|
74
|
-
scripts["dev:api"] = "php -S 127.0.0.1:8000 -t api api/index.php";
|
|
75
|
-
scripts["check:php"] = "node scripts/check-php.mjs";
|
|
76
|
-
scripts["build:deploy"] =
|
|
77
|
-
"npm run check:php && npm run build && node scripts/deploy.mjs";
|
|
78
|
-
}
|
|
79
|
-
const packageJson = {
|
|
80
|
-
engines: { node: TOOLCHAIN.node },
|
|
81
|
-
name,
|
|
82
|
-
private: true,
|
|
83
|
-
type: "module",
|
|
84
|
-
scripts,
|
|
85
|
-
dependencies: {
|
|
86
|
-
isbot: TOOLCHAIN.isbot,
|
|
87
|
-
react: TOOLCHAIN.react,
|
|
88
|
-
"react-dom": TOOLCHAIN.reactDom,
|
|
89
|
-
"react-router": TOOLCHAIN.reactRouter,
|
|
90
|
-
},
|
|
91
|
-
devDependencies: {
|
|
92
|
-
"@biomejs/biome": TOOLCHAIN.biome,
|
|
93
|
-
"@mozole/cli": cliSpec,
|
|
94
|
-
"@react-router/dev": TOOLCHAIN.reactRouter,
|
|
95
|
-
"@testing-library/jest-dom": TOOLCHAIN.testingLibraryJestDom,
|
|
96
|
-
"@testing-library/react": TOOLCHAIN.testingLibraryReact,
|
|
97
|
-
"@testing-library/user-event": TOOLCHAIN.testingLibraryUserEvent,
|
|
98
|
-
"@types/node": TOOLCHAIN.typesNode,
|
|
99
|
-
"@types/react": TOOLCHAIN.typesReact,
|
|
100
|
-
"@types/react-dom": TOOLCHAIN.typesReactDom,
|
|
101
|
-
"@vitejs/plugin-react": TOOLCHAIN.viteReact,
|
|
102
|
-
"@tailwindcss/vite": TOOLCHAIN.tailwindVite,
|
|
103
|
-
tailwindcss: TOOLCHAIN.tailwindcss,
|
|
104
|
-
jsdom: TOOLCHAIN.jsdom,
|
|
105
|
-
typescript: TOOLCHAIN.typescript,
|
|
106
|
-
vite: TOOLCHAIN.vite,
|
|
107
|
-
vitest: TOOLCHAIN.vitest,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
if (isScaffold) {
|
|
111
|
-
delete packageJson.devDependencies["@mozole/cli"];
|
|
112
|
-
packageJson.devDependencies.playwright = TOOLCHAIN.playwright;
|
|
113
|
-
scripts.verify = `${options.backend ? "npm run check:php && " : ""}npm run lint && npm run typecheck && npm run test:run && npm run build && node scripts/verify-extra.mjs`;
|
|
114
|
-
scripts["verify:force"] = scripts.verify;
|
|
115
|
-
scripts.qa = "node scripts/qa.mjs";
|
|
116
|
-
scripts["qa:force"] = "node scripts/qa.mjs --force";
|
|
117
|
-
scripts["qa:interactive"] = "node scripts/qa.mjs --interactive";
|
|
118
|
-
scripts["qa:visual"] = "node scripts/qa.mjs --visual";
|
|
119
|
-
}
|
|
120
|
-
const viteConfig = options.backend
|
|
121
|
-
? 'import { reactRouter } from "@react-router/dev/vite";\nimport { defineConfig } from "vite";\n\nexport default defineConfig({\n plugins: [reactRouter()],\n server: {\n proxy: {\n "/api": {\n target: "http://127.0.0.1:8000",\n changeOrigin: true,\n },\n },\n },\n});\n'
|
|
122
|
-
: 'import { reactRouter } from "@react-router/dev/vite";\nimport { defineConfig } from "vite";\n\nexport default defineConfig({ plugins: [reactRouter()] });\n';
|
|
123
|
-
const files = {
|
|
124
|
-
"package.json": json(packageJson),
|
|
125
|
-
".mozole/project.json": json(projectConfig(name, options)),
|
|
126
|
-
".mozole/toolchain.json": json(TOOLCHAIN),
|
|
127
|
-
".gitignore": "node_modules/\nbuild/\ndist/\ndeploy/\ndeploy.*.tmp/\ndeploy.*.backup/\n.react-router/\ncoverage/\n.mozole/logs/\n.mozole/qa/\n.mozole/state/\n.mozole/telemetry.json\n.cce/\n.DS_Store\n*.log\n",
|
|
128
|
-
".context-engine.yaml": "retrieval:\n top_k: 20\n confidence_threshold: 0.5\ncompression:\n level: standard\n output: standard\n",
|
|
129
|
-
".agents/mcp_config.json": json({
|
|
130
|
-
mcpServers: { "mozole-cce": cceMcpServer() },
|
|
131
|
-
}),
|
|
132
|
-
".agents/rules/mozole.md": "Follow the shared project contract in `AGENTS.md`. Repository reads are forbidden by default. Required order: CCE search → additional CCE search → bounded line-range read only when CCE output is insufficient → full-file read only after explicit escalation. Editing a file is NOT sufficient justification for reading it in full. If CCE is unavailable, report the blocker; do not fall back to repository reads. Routine browser validation uses screenshot-free `mozole qa`; visual QA requires an explicit request or confirmed deterministic failure. Stop after requested work, `mozole verify`, and relevant routine QA pass.\n",
|
|
133
|
-
".agents/workflows/mozole-verify.md": "Run `mozole verify`. If it passes or is current, report the concise result and stop. If it fails, use the actionable summary; retrieve a raw log with `mozole logs <name>` only when the summary is insufficient. Rerun only after a relevant change, unless fresh evidence was explicitly requested with `--force`.\n",
|
|
134
|
-
".agents/workflows/mozole-qa.md": "Run `mozole qa`. Use its deterministic evidence and do not capture or request screenshots. If QA passes or is current, report concisely and stop. If it fails and fixing is in scope, address confirmed evidence and rerun only after a relevant change.\n",
|
|
135
|
-
".agents/workflows/mozole-qa-interactive.md": "Run `mozole qa --interactive`. Use deterministic interaction evidence without screenshots. Fix confirmed in-scope failures, then rerun only after a relevant change. Stop when QA passes or is current.\n",
|
|
136
|
-
".agents/workflows/mozole-qa-visual.md": "Run `mozole qa --visual --reason=explicit-workflow`. This workflow explicitly permits the generated visual artifacts under `.mozole/qa/`. Reuse current artifacts unless the user intentionally requests fresh capture with `--force`; inspect only the routes and viewports relevant to the task.\n",
|
|
137
|
-
".codex/hooks.json": json({
|
|
138
|
-
description: "Enforced Mozole CCE-first and token-governor hooks.",
|
|
139
|
-
hooks: {
|
|
140
|
-
PreToolUse: [
|
|
141
|
-
{
|
|
142
|
-
matcher: "Bash|.*[Rr]ead.*",
|
|
143
|
-
hooks: [
|
|
144
|
-
{
|
|
145
|
-
type: "command",
|
|
146
|
-
command: "npx --no-install mozole governor hook codex",
|
|
147
|
-
commandWindows: "npx --no-install mozole governor hook codex",
|
|
148
|
-
timeout: 10,
|
|
149
|
-
additionalContextLimit: 300,
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
}),
|
|
156
|
-
".claude/settings.json": json({
|
|
157
|
-
hooks: {
|
|
158
|
-
PreToolUse: [
|
|
159
|
-
{
|
|
160
|
-
matcher: "Read|Bash",
|
|
161
|
-
hooks: [
|
|
162
|
-
{
|
|
163
|
-
type: "command",
|
|
164
|
-
command: "npx --no-install mozole governor hook claude",
|
|
165
|
-
timeout: 10,
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
},
|
|
171
|
-
}),
|
|
172
|
-
"react-router.config.ts": 'import type { Config } from "@react-router/dev/config";\n\nexport default {\n ssr: false,\n prerender: true,\n} satisfies Config;\n',
|
|
173
|
-
"vite.config.ts": viteConfig
|
|
174
|
-
.replace("import { defineConfig }", 'import tailwindcss from "@tailwindcss/vite";\nimport { defineConfig }')
|
|
175
|
-
.replace("plugins: [reactRouter()]", "plugins: [tailwindcss(), reactRouter()]"),
|
|
176
|
-
"tsconfig.json": json({
|
|
177
|
-
include: ["**/*", ".react-router/types/**/*"],
|
|
178
|
-
compilerOptions: {
|
|
179
|
-
lib: ["DOM", "DOM.Iterable", "ES2023"],
|
|
180
|
-
types: ["node", "vite/client", "vitest/globals"],
|
|
181
|
-
target: "ES2023",
|
|
182
|
-
module: "ESNext",
|
|
183
|
-
moduleResolution: "Bundler",
|
|
184
|
-
jsx: "react-jsx",
|
|
185
|
-
strict: true,
|
|
186
|
-
noUncheckedIndexedAccess: true,
|
|
187
|
-
exactOptionalPropertyTypes: true,
|
|
188
|
-
isolatedModules: true,
|
|
189
|
-
resolveJsonModule: true,
|
|
190
|
-
esModuleInterop: true,
|
|
191
|
-
skipLibCheck: true,
|
|
192
|
-
noEmit: true,
|
|
193
|
-
rootDirs: [".", "./.react-router/types"],
|
|
194
|
-
paths: { "~/*": ["./app/*"] },
|
|
195
|
-
},
|
|
196
|
-
}),
|
|
197
|
-
"biome.json": json({
|
|
198
|
-
$schema: "https://biomejs.dev/schemas/2.5.11/schema.json",
|
|
199
|
-
files: {
|
|
200
|
-
includes: [
|
|
201
|
-
"**",
|
|
202
|
-
"!build",
|
|
203
|
-
"!deploy",
|
|
204
|
-
"!dist",
|
|
205
|
-
"!.react-router",
|
|
206
|
-
"!node_modules",
|
|
207
|
-
"!coverage",
|
|
208
|
-
"!.mozole",
|
|
209
|
-
"!.cce",
|
|
210
|
-
"!public",
|
|
211
|
-
"!assets",
|
|
212
|
-
"!qa-screenshots",
|
|
213
|
-
],
|
|
214
|
-
},
|
|
215
|
-
formatter: { enabled: true, indentStyle: "space", indentWidth: 2 },
|
|
216
|
-
linter: { enabled: true, rules: { preset: "recommended" } },
|
|
217
|
-
javascript: { formatter: { quoteStyle: "double", semicolons: "always" } },
|
|
218
|
-
json: { formatter: { expand: "always" } },
|
|
219
|
-
}),
|
|
220
|
-
"vitest.config.ts": 'import react from "@vitejs/plugin-react";\nimport { defineConfig } from "vitest/config";\n\nexport default defineConfig({\n plugins: [react()],\n test: {\n environment: "jsdom",\n setupFiles: ["./tests/setup.ts"],\n exclude: ["node_modules/**", "build/**", ".react-router/**"],\n },\n});\n',
|
|
221
|
-
"app/routes.ts": 'import { index, type RouteConfig, route } from "@react-router/dev/routes";\n\nexport default [\n index("routes/home.tsx"),\n route("about", "routes/about.tsx"),\n route("contact", "routes/contact.tsx"),\n] satisfies RouteConfig;\n',
|
|
222
|
-
"app/root.tsx": 'import {\n Links,\n Meta,\n NavLink,\n Outlet,\n Scripts,\n ScrollRestoration,\n} from "react-router";\nimport type { Route } from "./+types/root";\nimport "./styles/global.css";\n\nexport const links: Route.LinksFunction = () => [];\n\nexport function Layout({ children }: { children: React.ReactNode }) {\n return (\n <html lang="en">\n <head>\n <meta charSet="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <Meta />\n <Links />\n </head>\n <body>\n <header>\n <nav aria-label="Main navigation">\n <NavLink to="/">Home</NavLink>\n <NavLink to="/about">About</NavLink>\n <NavLink to="/contact">Contact</NavLink>\n </nav>\n </header>\n {children}\n <ScrollRestoration />\n <Scripts />\n </body>\n </html>\n );\n}\n\nexport default function App() {\n return <Outlet />;\n}\n\nexport function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {\n const message = error instanceof Error ? error.message : "Unexpected error";\n return (\n <main>\n <h1>Something went wrong</h1>\n <p>{message}</p>\n </main>\n );\n}\n',
|
|
223
|
-
"app/routes/home.tsx": 'export function meta() {\n return [\n { title: "Home" },\n { name: "description", content: "A static-first web project." },\n ];\n}\n\nexport default function Home() {\n return (\n <main>\n <p className="eyebrow">Static-first</p>\n <h1>Build the site this project needs.</h1>\n <p>\n React Router Framework Mode, deterministic verification, and browser QA\n are ready.\n </p>\n </main>\n );\n}\n',
|
|
224
|
-
"app/routes/about.tsx": 'export function meta() {\n return [\n { title: "About" },\n { name: "description", content: "About this project." },\n ];\n}\n\nexport default function About() {\n return (\n <main>\n <h1>About</h1>\n <p>Replace this neutral starting point with project-specific content.</p>\n </main>\n );\n}\n',
|
|
225
|
-
"app/routes/contact.tsx": 'export function meta() {\n return [\n { title: "Contact" },\n { name: "description", content: "Contact information." },\n ];\n}\n\nexport default function Contact() {\n return (\n <main>\n <h1>Contact</h1>\n <p>Add the project contact workflow here.</p>\n </main>\n );\n}\n',
|
|
226
|
-
"app/styles/global.css": ":root {\n color-scheme: light;\n font-family: Inter, ui-sans-serif, system-ui, sans-serif;\n color: #171717;\n background: #fafafa;\n}\n* {\n box-sizing: border-box;\n}\nbody {\n margin: 0;\n min-width: 320px;\n}\na {\n color: inherit;\n text-underline-offset: 0.2em;\n}\nheader {\n border-bottom: 1px solid #ddd;\n}\nnav {\n max-width: 70rem;\n margin: auto;\n padding: 1rem 1.5rem;\n display: flex;\n gap: 1.25rem;\n}\nnav a.active {\n font-weight: 700;\n}\nmain {\n width: min(70rem, 100%);\n margin: 0 auto;\n padding: clamp(3rem, 8vw, 8rem) 1.5rem;\n}\nh1 {\n max-width: 18ch;\n font-size: clamp(2.25rem, 7vw, 5rem);\n line-height: 1.02;\n letter-spacing: -0.04em;\n margin: 0.15em 0 0.4em;\n}\np {\n max-width: 65ch;\n line-height: 1.65;\n}\n.eyebrow {\n text-transform: uppercase;\n letter-spacing: 0.12em;\n font-size: 0.75rem;\n font-weight: 700;\n}\n",
|
|
227
|
-
"tests/setup.ts": 'import "@testing-library/jest-dom/vitest";\n',
|
|
228
|
-
"tests/smoke.test.tsx": 'import { render, screen } from "@testing-library/react";\nimport { describe, expect, it } from "vitest";\nimport Home from "../app/routes/home";\n\ndescribe("Home", () => {\n it("renders the starting point", () => {\n render(<Home />);\n expect(\n screen.getByRole("heading", { name: /build the site/i }),\n ).toBeVisible();\n });\n});\n',
|
|
229
|
-
"docs/design/README.md": designHandoffGuide,
|
|
230
|
-
"AGENTS.md": "# Project guide\n\n## Commands\n\n- `npm run dev` — local app\n- `npm run verify` — lint, typecheck, tests, production build\n- `npm run qa` — deterministic browser QA (no screenshots)\n- `npm run qa:interactive` — adds safe interaction probes\n- `npm run qa:visual` — explicit screenshot review\n- `mozole cce install` — install persistent CCE and required uv runtime\n- `mozole ui` — full-screen terminal dashboard\n\n## Architecture\n\nReact Router Framework Mode lives in `app/`; routes are in `app/routes.ts`; static output is `build/client/`. Mozole settings are in `.mozole/`; Antigravity integration is in `.agents/`; deeper decisions belong in `docs/`.\n\n## Mandatory CCE contract\n\nRepository reads are forbidden by default. Allowed retrieval order:\n\n1. CCE `context_search`\n2. additional CCE search, `expand_chunk`, or `related_context`\n3. bounded line-range read only when CCE output is insufficient\n4. full-file read only after explicit escalation\n\nEditing a file is NOT sufficient justification for reading it in full. If CCE is unavailable, stop and report the blocker instead of falling back to repository reads. Prefer localized patches and inspect `git diff`. Keep narration and successful logs concise. Routine browser validation uses screenshot-free `mozole qa`; visual QA requires an explicit user request or confirmed deterministic failure. Stop after requested work, `mozole verify`, and relevant routine QA pass.\n",
|
|
231
|
-
"CLAUDE.md": "@AGENTS.md\n\n## Claude Code CCE contract\n\nRepository reads are forbidden by default. Use `context_search`, then additional CCE retrieval. Read may use a bounded line range only when CCE is insufficient; a full-file Read requires explicit escalation. Editing is not justification. If CCE is unavailable, report the blocker; do not fall back.\n",
|
|
232
|
-
"docs/architecture.md": "# Architecture\n\nThe app uses React Router Framework Mode with Vite. `ssr: false` and `prerender: true` emit real HTML for every statically declared route. Static files in `build/client/` can be served beside a future PHP backend without a production Node process. Mozole fingerprints relevant inputs under `.mozole/state/`; unchanged successful verification and QA are reused, while `--force` requests fresh evidence. Codex and Claude Code use the shared root instructions; Antigravity workspace MCP, rules, and workflows live under `.agents/` and share the same CCE index.\n",
|
|
233
|
-
"README.md": `# ${name}\n\nStatic-first React Router Framework Mode project generated by Mozole for Codex, Claude Code, and Google Antigravity.\n\n## Start\n\n\`\`\`sh\nnpm run dev\n\`\`\`\n\nDependencies and test tools are pre-installed by \`mozole new\`. Run \`npm run verify\` before handoff and \`npm run qa\` for screenshot-free browser checks. Unchanged successful checks are reused; use \`--force\` for intentionally fresh evidence. Visual QA is explicit only. Antigravity workspace integration is under \`.agents/\`. Production files are emitted to \`build/client/\`.\n`,
|
|
234
|
-
};
|
|
235
|
-
if (!isScaffold) {
|
|
236
|
-
for (const [file, agent] of [
|
|
237
|
-
[".codex/hooks.json", "codex"],
|
|
238
|
-
[".claude/settings.json", "claude"],
|
|
239
|
-
]) {
|
|
240
|
-
const hooks = JSON.parse(files[file] ?? "{}");
|
|
241
|
-
hooks.hooks.PreToolUse[0].matcher = "Bash|exec_command|.*[Rr]ead.*";
|
|
242
|
-
hooks.hooks.PostToolUse = [
|
|
243
|
-
{
|
|
244
|
-
matcher: "Bash|exec_command|.*cce.*|.*context_search.*|.*expand_chunk.*|.*related_context.*",
|
|
245
|
-
hooks: [
|
|
246
|
-
{
|
|
247
|
-
type: "command",
|
|
248
|
-
command: `npx --no-install mozole governor hook ${agent}`,
|
|
249
|
-
timeout: 10,
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
},
|
|
253
|
-
];
|
|
254
|
-
files[file] = json(hooks);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
if (options.backend) {
|
|
258
|
-
Object.assign(files, backendTemplates(name));
|
|
259
|
-
files["scripts/check-php.mjs"] = backendCheckScript;
|
|
260
|
-
files["scripts/deploy.mjs"] = deployScript;
|
|
261
|
-
if (!isScaffold)
|
|
262
|
-
files["AGENTS.md"] +=
|
|
263
|
-
"\n## Backend\n\nPHP 8.0+ is required. Run `npm run dev:api` in a separate terminal, `npm run check:php` for syntax, and `npm run build:deploy` to assemble `deploy/`. See `docs/backend-php.md`.\n";
|
|
264
|
-
}
|
|
265
|
-
if (isScaffold) {
|
|
266
|
-
for (const file of [
|
|
267
|
-
".context-engine.yaml",
|
|
268
|
-
".agents/mcp_config.json",
|
|
269
|
-
".agents/rules/mozole.md",
|
|
270
|
-
".agents/workflows/mozole-verify.md",
|
|
271
|
-
".agents/workflows/mozole-qa.md",
|
|
272
|
-
".agents/workflows/mozole-qa-interactive.md",
|
|
273
|
-
".agents/workflows/mozole-qa-visual.md",
|
|
274
|
-
".codex/hooks.json",
|
|
275
|
-
".claude/settings.json",
|
|
276
|
-
]) {
|
|
277
|
-
delete files[file];
|
|
278
|
-
}
|
|
279
|
-
files["AGENTS.md"] = basicAgentGuide(Boolean(options.backend));
|
|
280
|
-
files["CLAUDE.md"] = "@AGENTS.md\n";
|
|
281
|
-
files["scripts/qa.mjs"] = qaScript;
|
|
282
|
-
files["scripts/verify-extra.mjs"] = extraVerifierScript;
|
|
283
|
-
const { cce: _cce, antigravity: _antigravity, ...plainToolchain } = TOOLCHAIN;
|
|
284
|
-
files[".mozole/toolchain.json"] = json(plainToolchain);
|
|
285
|
-
files[".gitignore"] =
|
|
286
|
-
"node_modules/\nbuild/\ndist/\ndeploy/\ndeploy.*.tmp/\ndeploy.*.backup/\n.react-router/\ncoverage/\n.mozole/qa/\n.DS_Store\n*.log\n";
|
|
287
|
-
const biome = JSON.parse(files["biome.json"] ?? "{}");
|
|
288
|
-
biome.files.includes = biome.files.includes.filter((entry) => entry !== "!.cce");
|
|
289
|
-
files["biome.json"] = json(biome);
|
|
290
|
-
files["docs/architecture.md"] =
|
|
291
|
-
"# Architecture\n\nReact Router Framework Mode with Vite emits static HTML into `build/client/`. Source routes are in `app/routes.ts`.\n";
|
|
292
|
-
files["README.md"] =
|
|
293
|
-
`# ${name}\n\nReact + Vite project with static prerendering. Requires Node.js 22+.\n\n## Development\n\nRun \`npm run dev\`, \`npm run verify\`, and \`npm run qa\`. Browser QA uses Playwright Chromium, installed during creation; reinstall with \`npx playwright install chromium\` if needed.\n${options.backend ? "\nRequires PHP 8.0+. Start `npm run dev:api` in a separate terminal. Use `npm run build:deploy` and upload the contents of `deploy/`, including `.htaccess`. See [backend setup](docs/backend-php.md).\n" : "\nDeploy the contents of `build/client/` to your static host.\n"}`;
|
|
294
|
-
}
|
|
295
|
-
if (!isScaffold)
|
|
296
|
-
files["AGENTS.md"] += `\n${designGuardrails}`;
|
|
297
|
-
files["app/styles/global.css"] =
|
|
298
|
-
'@import "tailwindcss";\n\n@layer base {\n' +
|
|
299
|
-
(files["app/styles/global.css"] ?? "")
|
|
300
|
-
.split("\n")
|
|
301
|
-
.filter(Boolean)
|
|
302
|
-
.map((line) => ` ${line}`)
|
|
303
|
-
.join("\n") +
|
|
304
|
-
"\n}\n";
|
|
305
|
-
files["app/routes/home.tsx"] =
|
|
306
|
-
files["app/routes/home.tsx"]?.replace('<p className="eyebrow">', '<p className="eyebrow text-sm">') ?? "";
|
|
307
|
-
files["README.md"] +=
|
|
308
|
-
"\n## Styling\n\nTailwind CSS v4 is installed through `@tailwindcss/vite`. The CSS entry is `app/styles/global.css`; starter styles live in `@layer base` so utilities can override them. Use complete, static utility class names. Map project design tokens with `@theme` when needed.\n";
|
|
309
|
-
files["AGENTS.md"] = instructionBlock(files["AGENTS.md"] ?? "");
|
|
310
|
-
return files;
|
|
311
|
-
}
|
|
312
|
-
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAA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