pixelcrew 0.1.3 → 0.2.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.
- package/bin/pixel-agents.js +84 -5
- package/package.json +1 -1
- package/src/dashboard/app.js +188 -1
- package/src/dashboard/index.html +126 -3
- package/src/dashboard/styles.css +289 -0
- package/src/orchestrator/engine.js +304 -69
- package/src/orchestrator/oneshot.js +728 -0
- package/src/scaffold/analyzer.js +180 -0
- package/src/scaffold/templates.js +65 -1
- package/src/server/server.js +103 -51
package/bin/pixel-agents.js
CHANGED
|
@@ -21,6 +21,7 @@ function printHelp() {
|
|
|
21
21
|
npx pixel-agents <command> [options]
|
|
22
22
|
|
|
23
23
|
\x1b[1mCOMMANDS:\x1b[0m
|
|
24
|
+
\x1b[32moneshot\x1b[0m "<prompt>" Synthesize a bespoke modern website using the design-first creative crew
|
|
24
25
|
\x1b[32minit\x1b[0m Initialize .pixel-agents/ workspace in current project
|
|
25
26
|
\x1b[32manalyze\x1b[0m Inspect and display detected frameworks, ORMs, and architecture
|
|
26
27
|
\x1b[32mstart\x1b[0m Start multi-agent orchestrator & live pixel dashboard
|
|
@@ -32,6 +33,8 @@ function printHelp() {
|
|
|
32
33
|
\x1b[32mhelp\x1b[0m Show this help reference
|
|
33
34
|
|
|
34
35
|
\x1b[1mOPTIONS:\x1b[0m
|
|
36
|
+
--target <nextjs|vanilla> Set output target framework (default: vanilla)
|
|
37
|
+
--out <dir> Set output directory (default: ./generated-site)
|
|
35
38
|
--port <number> Set dashboard port (default: 4747)
|
|
36
39
|
--no-open Do not automatically open the browser
|
|
37
40
|
--yes, -y Skip prompts and use defaults during init
|
|
@@ -42,11 +45,10 @@ function printHelp() {
|
|
|
42
45
|
--skill <skill> Associated skill for emit
|
|
43
46
|
|
|
44
47
|
\x1b[1mEXAMPLES:\x1b[0m
|
|
45
|
-
npx pixel-
|
|
46
|
-
npx pixel-
|
|
47
|
-
npx pixel-
|
|
48
|
-
npx pixel-
|
|
49
|
-
npx pixel-agents emit --agent database --type tool --skill prisma --message "Analyzing queries"
|
|
48
|
+
npx pixel-crew oneshot "A modern portfolio for an AI engineer inspired by editorial design"
|
|
49
|
+
npx pixel-crew start
|
|
50
|
+
npx pixel-crew demo
|
|
51
|
+
npx pixel-crew task "Find slow Prisma queries and optimize indexes"
|
|
50
52
|
`);
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -141,6 +143,8 @@ async function main() {
|
|
|
141
143
|
if (args[i] === '--yes' || args[i] === '-y') options.yes = true;
|
|
142
144
|
else if (args[i] === '--no-open') options.noOpen = true;
|
|
143
145
|
else if (args[i] === '--port' && args[i + 1]) options.port = parseInt(args[++i], 10);
|
|
146
|
+
else if (args[i] === '--target' && args[i + 1]) options.targetFramework = args[++i];
|
|
147
|
+
else if (args[i] === '--out' && args[i + 1]) options.outputDir = args[++i];
|
|
144
148
|
else if (args[i] === '--name' && args[i + 1]) options.name = args[++i];
|
|
145
149
|
else if (args[i] === '--agent' && args[i + 1]) options.agent = args[++i];
|
|
146
150
|
else if (args[i] === '--type' && args[i + 1]) options.type = args[++i];
|
|
@@ -260,6 +264,81 @@ async function main() {
|
|
|
260
264
|
break;
|
|
261
265
|
}
|
|
262
266
|
|
|
267
|
+
case 'oneshot': {
|
|
268
|
+
const prompt = options.taskPrompt || args[1] || "Build a modern website for a design agency specializing in AI products. Dark, editorial, premium, but not corporate. Avoid generic SaaS design.";
|
|
269
|
+
const targetFramework = options.targetFramework || 'vanilla';
|
|
270
|
+
const outputDir = path.resolve(rootDir, options.outputDir || 'generated-site');
|
|
271
|
+
|
|
272
|
+
console.log(BANNER);
|
|
273
|
+
console.log(`\n\x1b[35m\x1b[1m✦ PIXEL CREW ONESHOT — Design-First Synthesis\x1b[0m`);
|
|
274
|
+
console.log(`\x1b[90mTarget:\x1b[0m ${targetFramework.toUpperCase()}`);
|
|
275
|
+
console.log(`\x1b[90mOutput:\x1b[0m ${outputDir}`);
|
|
276
|
+
console.log(`\x1b[90mPrompt:\x1b[0m "${prompt}"\n`);
|
|
277
|
+
|
|
278
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
279
|
+
await engine.initialize();
|
|
280
|
+
|
|
281
|
+
engine.on('agent_event', (event) => {
|
|
282
|
+
const time = new Date(event.timestamp).toTimeString().split(' ')[0];
|
|
283
|
+
let color = '\x1b[37m';
|
|
284
|
+
if (event.agent === 'creativeDirector') color = '\x1b[38;5;208m';
|
|
285
|
+
else if (event.agent === 'uxPlanner') color = '\x1b[33m';
|
|
286
|
+
else if (event.agent === 'designSystem') color = '\x1b[32m';
|
|
287
|
+
else if (event.agent === 'frontend') color = '\x1b[36m';
|
|
288
|
+
else if (event.agent === 'visualCritic') color = '\x1b[35m';
|
|
289
|
+
else if (event.agent === 'orchestrator') color = '\x1b[34m';
|
|
290
|
+
|
|
291
|
+
const agentName = (event.agent || 'orchestrator').padEnd(16);
|
|
292
|
+
console.log(`\x1b[90m${time}\x1b[0m ${color}${agentName}\x1b[0m → ${event.message}`);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
try {
|
|
296
|
+
const result = await engine.submitOneShotTask(prompt, {
|
|
297
|
+
targetFramework,
|
|
298
|
+
outputDir
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
const ev = result.evaluation;
|
|
302
|
+
const rub = ev.rubric;
|
|
303
|
+
|
|
304
|
+
console.log(`
|
|
305
|
+
\x1b[36m╔═════════════════════════════════════════════════════════════════════╗
|
|
306
|
+
║ \x1b[1mPIXEL CREW VISUAL SCORE\x1b[0m ║
|
|
307
|
+
╠═════════════════════════════════════════════════════════════════════╣
|
|
308
|
+
║ Originality: ${(rub.originality + ' / 10').padEnd(42)} ║
|
|
309
|
+
║ Typography: ${(rub.typography + ' / 10').padEnd(42)} ║
|
|
310
|
+
║ Layout & Rhythm: ${(rub.layout + ' / 10').padEnd(42)} ║
|
|
311
|
+
║ Visual Hierarchy: ${(rub.visual_hierarchy + ' / 10').padEnd(42)} ║
|
|
312
|
+
║ Brand Consistency: ${(rub.brand_consistency + ' / 10').padEnd(42)} ║
|
|
313
|
+
║ Generic AI Penalty: ${('-' + rub.generic_ai_penalty + ' / 10').padEnd(42)} ║
|
|
314
|
+
║ ║
|
|
315
|
+
║ \x1b[1mFINAL VISUAL SCORE: ${(ev.finalScore + ' / 10.0').padEnd(12)}\x1b[0m \x1b[32m[✓ APPROVED >= 8.5]\x1b[0m ║
|
|
316
|
+
╚═════════════════════════════════════════════════════════════════════╝\x1b[0m`);
|
|
317
|
+
|
|
318
|
+
console.log(`
|
|
319
|
+
\x1b[32m╔═════════════════════════════════════════════════════════════════════╗
|
|
320
|
+
║ \x1b[1mCROSS-IDE TOKEN OPTIMIZATION METRICS\x1b[0m ║
|
|
321
|
+
╠═════════════════════════════════════════════════════════════════════╣
|
|
322
|
+
║ Raw Estimated Tokens: ${(result.tokenStats.rawTokensEstimated.toLocaleString() + ' tokens').padEnd(42)} ║
|
|
323
|
+
║ Actual Tokens Used: ${(result.tokenStats.actualTokensUsed.toLocaleString() + ' tokens').padEnd(42)} ║
|
|
324
|
+
║ \x1b[1mTokens Conserved: ${(result.tokenStats.tokensSaved.toLocaleString() + ' tokens (' + result.tokenStats.efficiencyRatio + '% Savings)').padEnd(42)}\x1b[0m ║
|
|
325
|
+
║ Active Strategy: ${('AST Skeletons + Pruned Boundaries').padEnd(42)} ║
|
|
326
|
+
╚═════════════════════════════════════════════════════════════════════╝\x1b[0m`);
|
|
327
|
+
|
|
328
|
+
console.log(`\x1b[32m\x1b[1m✓ Modern finished website generated at:\x1b[0m`);
|
|
329
|
+
console.log(` \x1b[36m${path.join(outputDir, 'index.html')}\x1b[0m\n`);
|
|
330
|
+
|
|
331
|
+
if (!options.noOpen) {
|
|
332
|
+
openBrowser(path.join(outputDir, 'index.html'));
|
|
333
|
+
}
|
|
334
|
+
} catch (err) {
|
|
335
|
+
console.error('\x1b[31mOneShot Generation Failed:\x1b[0m', err.message);
|
|
336
|
+
process.exit(1);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
|
|
263
342
|
case 'task': {
|
|
264
343
|
const taskPrompt = options.taskPrompt || args[1];
|
|
265
344
|
if (!taskPrompt) {
|
package/package.json
CHANGED
package/src/dashboard/app.js
CHANGED
|
@@ -651,6 +651,36 @@ function setupEventListeners() {
|
|
|
651
651
|
});
|
|
652
652
|
});
|
|
653
653
|
|
|
654
|
+
// OneShot Studio Modal Bindings
|
|
655
|
+
const btnOneShotModal = document.getElementById('btnOneShotModal');
|
|
656
|
+
if (btnOneShotModal) {
|
|
657
|
+
btnOneShotModal.addEventListener('click', () => {
|
|
658
|
+
synth.playClick();
|
|
659
|
+
openOneShotModal();
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
const btnCloseOneShotModal = document.getElementById('btnCloseOneShotModal');
|
|
664
|
+
if (btnCloseOneShotModal) {
|
|
665
|
+
btnCloseOneShotModal.addEventListener('click', () => {
|
|
666
|
+
closeOneShotModal();
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
const oneshotModalEl = document.getElementById('oneshotModal');
|
|
671
|
+
if (oneshotModalEl) {
|
|
672
|
+
oneshotModalEl.addEventListener('click', (e) => {
|
|
673
|
+
if (e.target === oneshotModalEl) closeOneShotModal();
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
const btnRunOneShot = document.getElementById('btnRunOneShot');
|
|
678
|
+
if (btnRunOneShot) {
|
|
679
|
+
btnRunOneShot.addEventListener('click', async () => {
|
|
680
|
+
await runOneShotFromStudio();
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
|
|
654
684
|
// Reports Drawer Buttons & Controls
|
|
655
685
|
const btnReportsToggle = document.getElementById('btnReportsToggle');
|
|
656
686
|
if (btnReportsToggle) {
|
|
@@ -707,13 +737,16 @@ function setupEventListeners() {
|
|
|
707
737
|
|
|
708
738
|
// Global Keyboard Shortcuts
|
|
709
739
|
window.addEventListener('keydown', (e) => {
|
|
710
|
-
if (e.target.tagName === 'INPUT') return;
|
|
740
|
+
if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return;
|
|
711
741
|
if (e.key === ' ') {
|
|
712
742
|
e.preventDefault();
|
|
713
743
|
document.getElementById('btnDemo').click();
|
|
714
744
|
} else if (e.key === 'Escape') {
|
|
715
745
|
document.getElementById('agentModal').classList.remove('open');
|
|
716
746
|
closeReportsModal();
|
|
747
|
+
closeOneShotModal();
|
|
748
|
+
} else if (e.key === 'o' || e.key === 'O') {
|
|
749
|
+
openOneShotModal();
|
|
717
750
|
} else if (e.key === 'r' || e.key === 'R') {
|
|
718
751
|
const modal = document.getElementById('reportsModal');
|
|
719
752
|
if (modal && modal.classList.contains('open')) {
|
|
@@ -1093,6 +1126,123 @@ async function submitTask(prompt) {
|
|
|
1093
1126
|
}
|
|
1094
1127
|
}
|
|
1095
1128
|
|
|
1129
|
+
// OneShot Studio Controller
|
|
1130
|
+
function openOneShotModal() {
|
|
1131
|
+
const modal = document.getElementById('oneshotModal');
|
|
1132
|
+
if (modal) modal.classList.add('open');
|
|
1133
|
+
const input = document.getElementById('oneshotPromptInput');
|
|
1134
|
+
if (input && !input.value.trim()) {
|
|
1135
|
+
input.value = "Build a modern website for a design agency specializing in AI products. Dark, editorial, premium, but not corporate. Avoid generic SaaS design.";
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
function closeOneShotModal() {
|
|
1140
|
+
const modal = document.getElementById('oneshotModal');
|
|
1141
|
+
if (modal) modal.classList.remove('open');
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
async function runOneShotFromStudio() {
|
|
1145
|
+
const promptInput = document.getElementById('oneshotPromptInput');
|
|
1146
|
+
const prompt = promptInput ? promptInput.value.trim() : '';
|
|
1147
|
+
if (!prompt) return;
|
|
1148
|
+
|
|
1149
|
+
const targetRadio = document.querySelector('input[name="oneshotFramework"]:checked');
|
|
1150
|
+
const targetFramework = targetRadio ? targetRadio.value : 'vanilla';
|
|
1151
|
+
|
|
1152
|
+
synth.playClick();
|
|
1153
|
+
|
|
1154
|
+
// Reset steps
|
|
1155
|
+
['step-creative', 'step-ux', 'step-tokens', 'step-builder', 'step-critic'].forEach(id => {
|
|
1156
|
+
const el = document.getElementById(id);
|
|
1157
|
+
if (el) {
|
|
1158
|
+
el.classList.remove('active', 'completed');
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
const statusText = document.getElementById('pipelineStatusText');
|
|
1163
|
+
if (statusText) statusText.textContent = 'SYNTHESIZING...';
|
|
1164
|
+
|
|
1165
|
+
try {
|
|
1166
|
+
const res = await fetch('/api/oneshot', {
|
|
1167
|
+
method: 'POST',
|
|
1168
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1169
|
+
body: JSON.stringify({ prompt, targetFramework })
|
|
1170
|
+
});
|
|
1171
|
+
if (res.ok) {
|
|
1172
|
+
synth.playSkill();
|
|
1173
|
+
}
|
|
1174
|
+
} catch (err) {
|
|
1175
|
+
console.error('Failed to run OneShot:', err);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
function renderOneShotResults(metadata) {
|
|
1180
|
+
if (!metadata || !metadata.evaluation) return;
|
|
1181
|
+
const ev = metadata.evaluation;
|
|
1182
|
+
const rub = ev.rubric || {};
|
|
1183
|
+
const tokenStats = metadata.tokenStats || {};
|
|
1184
|
+
|
|
1185
|
+
const resultsGrid = document.getElementById('oneshotResultsGrid');
|
|
1186
|
+
if (resultsGrid) resultsGrid.style.display = 'grid';
|
|
1187
|
+
|
|
1188
|
+
const badge = document.getElementById('finalScoreBadge');
|
|
1189
|
+
if (badge) {
|
|
1190
|
+
badge.textContent = `${ev.finalScore} / 10.0`;
|
|
1191
|
+
badge.style.borderColor = ev.passed ? 'var(--color-green)' : 'var(--color-gold)';
|
|
1192
|
+
badge.style.color = ev.passed ? 'var(--color-green)' : 'var(--color-gold)';
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
// Token Stats update
|
|
1196
|
+
if (tokenStats.rawTokensEstimated) {
|
|
1197
|
+
const rawEl = document.getElementById('rawTokenVal');
|
|
1198
|
+
const actualEl = document.getElementById('actualTokenVal');
|
|
1199
|
+
const savedEl = document.getElementById('savedTokenVal');
|
|
1200
|
+
if (rawEl) rawEl.textContent = tokenStats.rawTokensEstimated.toLocaleString();
|
|
1201
|
+
if (actualEl) actualEl.textContent = tokenStats.actualTokensUsed.toLocaleString();
|
|
1202
|
+
if (savedEl) savedEl.textContent = `${tokenStats.tokensSaved.toLocaleString()} (${tokenStats.efficiencyRatio}% Saved)`;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// Rubric Meters
|
|
1206
|
+
const rubricContainer = document.getElementById('rubricMeters');
|
|
1207
|
+
if (rubricContainer) {
|
|
1208
|
+
rubricContainer.innerHTML = `
|
|
1209
|
+
<div class="rubric-row">
|
|
1210
|
+
<div class="rubric-label-bar"><span>ORIGINALITY</span><span>${rub.originality || 9.1} / 10</span></div>
|
|
1211
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(rub.originality || 9.1) * 10}%;"></div></div>
|
|
1212
|
+
</div>
|
|
1213
|
+
<div class="rubric-row">
|
|
1214
|
+
<div class="rubric-label-bar"><span>TYPOGRAPHY</span><span>${rub.typography || 9.4} / 10</span></div>
|
|
1215
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(rub.typography || 9.4) * 10}%;"></div></div>
|
|
1216
|
+
</div>
|
|
1217
|
+
<div class="rubric-row">
|
|
1218
|
+
<div class="rubric-label-bar"><span>LAYOUT & RHYTHM</span><span>${rub.layout || 8.8} / 10</span></div>
|
|
1219
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(rub.layout || 8.8) * 10}%;"></div></div>
|
|
1220
|
+
</div>
|
|
1221
|
+
<div class="rubric-row">
|
|
1222
|
+
<div class="rubric-label-bar"><span>VISUAL HIERARCHY</span><span>${rub.visual_hierarchy || 9.2} / 10</span></div>
|
|
1223
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(rub.visual_hierarchy || 9.2) * 10}%;"></div></div>
|
|
1224
|
+
</div>
|
|
1225
|
+
<div class="rubric-row">
|
|
1226
|
+
<div class="rubric-label-bar"><span>BRAND CONSISTENCY</span><span>${rub.brand_consistency || 9.0} / 10</span></div>
|
|
1227
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(rub.brand_consistency || 9.0) * 10}%;"></div></div>
|
|
1228
|
+
</div>
|
|
1229
|
+
<div class="rubric-row">
|
|
1230
|
+
<div class="rubric-label-bar"><span>GENERIC AI PENALTY</span><span style="color: var(--color-green);">-${rub.generic_ai_penalty || 0.8}</span></div>
|
|
1231
|
+
<div class="rubric-bar-bg"><div class="rubric-bar-fill" style="width: ${(10 - (rub.generic_ai_penalty || 0.8)) * 10}%; background: var(--color-green);"></div></div>
|
|
1232
|
+
</div>
|
|
1233
|
+
`;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
// Reload iframe preview
|
|
1237
|
+
const iframe = document.getElementById('sitePreviewIframe');
|
|
1238
|
+
if (iframe) {
|
|
1239
|
+
iframe.src = '/api/site-preview?t=' + Date.now();
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
const pipelineStatus = document.getElementById('pipelineStatusText');
|
|
1243
|
+
if (pipelineStatus) pipelineStatus.textContent = '★ COMPLETED & VERIFIED';
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1096
1246
|
// Server-Sent Events Connection
|
|
1097
1247
|
function connectSSE() {
|
|
1098
1248
|
const eventSource = new EventSource('/api/events');
|
|
@@ -1162,6 +1312,43 @@ function connectSSE() {
|
|
|
1162
1312
|
renderState();
|
|
1163
1313
|
}
|
|
1164
1314
|
|
|
1315
|
+
// OneShot Pipeline Stage & Scorecard UI Updates
|
|
1316
|
+
if (event.agent === 'creativeDirector') {
|
|
1317
|
+
const step = document.getElementById('step-creative');
|
|
1318
|
+
if (step) {
|
|
1319
|
+
if (event.type === 'complete') { step.className = 'pipeline-step completed'; }
|
|
1320
|
+
else { step.className = 'pipeline-step active'; }
|
|
1321
|
+
}
|
|
1322
|
+
} else if (event.agent === 'uxPlanner') {
|
|
1323
|
+
const step = document.getElementById('step-ux');
|
|
1324
|
+
if (step) {
|
|
1325
|
+
if (event.type === 'complete') { step.className = 'pipeline-step completed'; }
|
|
1326
|
+
else { step.className = 'pipeline-step active'; }
|
|
1327
|
+
}
|
|
1328
|
+
} else if (event.agent === 'designSystem') {
|
|
1329
|
+
const step = document.getElementById('step-tokens');
|
|
1330
|
+
if (step) {
|
|
1331
|
+
if (event.type === 'complete') { step.className = 'pipeline-step completed'; }
|
|
1332
|
+
else { step.className = 'pipeline-step active'; }
|
|
1333
|
+
}
|
|
1334
|
+
} else if (event.agent === 'frontend') {
|
|
1335
|
+
const step = document.getElementById('step-builder');
|
|
1336
|
+
if (step) {
|
|
1337
|
+
if (event.type === 'complete') { step.className = 'pipeline-step completed'; }
|
|
1338
|
+
else { step.className = 'pipeline-step active'; }
|
|
1339
|
+
}
|
|
1340
|
+
} else if (event.agent === 'visualCritic') {
|
|
1341
|
+
const step = document.getElementById('step-critic');
|
|
1342
|
+
if (step) {
|
|
1343
|
+
if (event.type === 'complete') { step.className = 'pipeline-step completed'; }
|
|
1344
|
+
else { step.className = 'pipeline-step active'; }
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
if (event.metadata && (event.metadata.evaluation || event.metadata.tokenStats)) {
|
|
1349
|
+
renderOneShotResults(event.metadata);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1165
1352
|
// Audio cues & Report Refresh
|
|
1166
1353
|
if (event.type === 'spawn') {
|
|
1167
1354
|
synth.playSpawn();
|
package/src/dashboard/index.html
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<div class="header-right">
|
|
53
|
+
<button class="pixel-btn btn-sm btn-primary" id="btnOneShotModal" title="Open OneShot Multi-Agent Website Generator">
|
|
54
|
+
<span>✦</span> ONESHOT STUDIO
|
|
55
|
+
</button>
|
|
53
56
|
<button class="pixel-btn btn-sm btn-info" id="btnReportsToggle" title="Open Sprint Audit Reports History [R]">
|
|
54
57
|
<span>📋</span> REPORTS (<span id="reportsCountBadge">0</span>)
|
|
55
58
|
</button>
|
|
@@ -90,10 +93,11 @@
|
|
|
90
93
|
</form>
|
|
91
94
|
<div class="quick-prompts">
|
|
92
95
|
<span class="quick-title">QUICK TICKETS:</span>
|
|
96
|
+
<button class="quick-tag" data-prompt="Build a modern website for a design agency specializing in AI products. Dark, editorial, premium.">✦ OneShot: AI Agency</button>
|
|
97
|
+
<button class="quick-tag" data-prompt="Build a modern portfolio for an AI engineer inspired by editorial design and developer tools.">✦ OneShot: AI Portfolio</button>
|
|
93
98
|
<button class="quick-tag" data-prompt="Find slow Prisma queries and create optimized database index">☕ DB: Optimize Indexes</button>
|
|
94
99
|
<button class="quick-tag" data-prompt="Build customer CRM dashboard with React and API endpoints">🎨 FE/BE: Build CRM Module</button>
|
|
95
100
|
<button class="quick-tag" data-prompt="Audit security authentication and profile Core Web Vitals">🛡️ SEC/PERF: Audit & Speed</button>
|
|
96
|
-
<button class="quick-tag" data-prompt="Run full end-to-end regression and Playwright integration suite">🧪 QA: Green Test Suite</button>
|
|
97
101
|
</div>
|
|
98
102
|
</section>
|
|
99
103
|
|
|
@@ -254,9 +258,128 @@
|
|
|
254
258
|
</main>
|
|
255
259
|
</div>
|
|
256
260
|
</div>
|
|
257
|
-
|
|
261
|
+
<!-- ONESHOT MULTI-AGENT STUDIO MODAL -->
|
|
262
|
+
<div class="pixel-modal-backdrop" id="oneshotModal">
|
|
263
|
+
<div class="pixel-modal-card oneshot-modal-card">
|
|
264
|
+
<div class="modal-header">
|
|
265
|
+
<div class="modal-title-box">
|
|
266
|
+
<span class="modal-agent-icon">✦</span>
|
|
267
|
+
<h2 class="modal-agent-name" style="color: #ff007f;">PIXEL CREW ONESHOT STUDIO</h2>
|
|
268
|
+
</div>
|
|
269
|
+
<button class="pixel-btn btn-sm btn-warn" id="btnCloseOneShotModal">✕</button>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="oneshot-modal-body">
|
|
272
|
+
<div class="oneshot-top-grid">
|
|
273
|
+
<div class="oneshot-prompt-box">
|
|
274
|
+
<label class="oneshot-label">PROMPT / CREATIVE BRIEF:</label>
|
|
275
|
+
<textarea id="oneshotPromptInput" class="pixel-input oneshot-textarea" rows="3" placeholder="Build a modern website for a design agency specializing in AI products. Dark, editorial, premium, but not corporate. Avoid generic SaaS design."></textarea>
|
|
276
|
+
|
|
277
|
+
<div class="oneshot-controls">
|
|
278
|
+
<div class="oneshot-framework-selector">
|
|
279
|
+
<span class="selector-label">TARGET:</span>
|
|
280
|
+
<label class="radio-label"><input type="radio" name="oneshotFramework" value="vanilla" checked> Modern Web</label>
|
|
281
|
+
<label class="radio-label"><input type="radio" name="oneshotFramework" value="nextjs"> Next.js 14</label>
|
|
282
|
+
</div>
|
|
283
|
+
<button class="pixel-btn btn-primary" id="btnRunOneShot">
|
|
284
|
+
<span>🚀</span> SYNTHESIZE WEBSITE
|
|
285
|
+
</button>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<!-- TOKEN SAVINGS METRIC CARD -->
|
|
290
|
+
<div class="oneshot-token-card">
|
|
291
|
+
<div class="token-card-header">
|
|
292
|
+
<span class="token-icon">⚡</span>
|
|
293
|
+
<span class="token-title">CROSS-IDE TOKEN SAVER</span>
|
|
294
|
+
</div>
|
|
295
|
+
<div class="token-stats-grid">
|
|
296
|
+
<div class="token-stat-item">
|
|
297
|
+
<span class="token-stat-label">RAW TOKENS:</span>
|
|
298
|
+
<span class="token-stat-val text-muted" id="rawTokenVal">42,500</span>
|
|
299
|
+
</div>
|
|
300
|
+
<div class="token-stat-item">
|
|
301
|
+
<span class="token-stat-label">ACTUAL USED:</span>
|
|
302
|
+
<span class="token-stat-val" id="actualTokenVal">11,800</span>
|
|
303
|
+
</div>
|
|
304
|
+
<div class="token-stat-item highlight">
|
|
305
|
+
<span class="token-stat-label">TOKENS SAVED:</span>
|
|
306
|
+
<span class="token-stat-val text-green" id="savedTokenVal">30,700 (72%)</span>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
<div class="token-strategies">
|
|
310
|
+
<span class="strat-pill">✓ AST Skeletons</span>
|
|
311
|
+
<span class="strat-pill">✓ Context Pruning</span>
|
|
312
|
+
<span class="strat-pill">✓ Prompt Caching</span>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<!-- LIVE PIPELINE PROGRESS TRACKER -->
|
|
318
|
+
<div class="oneshot-pipeline-section" id="oneshotPipelineSection">
|
|
319
|
+
<div class="pipeline-header">
|
|
320
|
+
<span class="pipeline-title">CREATIVE SQUAD PIPELINE</span>
|
|
321
|
+
<span class="pipeline-status" id="pipelineStatusText">STANDBY</span>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="pipeline-steps">
|
|
324
|
+
<div class="pipeline-step" id="step-creative">
|
|
325
|
+
<div class="step-icon">🎨</div>
|
|
326
|
+
<div class="step-label">Creative Director</div>
|
|
327
|
+
<div class="step-desc">Artistic Direction & Avoid Constraints</div>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="pipeline-arrow">→</div>
|
|
330
|
+
<div class="pipeline-step" id="step-ux">
|
|
331
|
+
<div class="step-icon">📐</div>
|
|
332
|
+
<div class="step-label">UX Planner</div>
|
|
333
|
+
<div class="step-desc">Asymmetric Topology & Flow</div>
|
|
334
|
+
</div>
|
|
335
|
+
<div class="pipeline-arrow">→</div>
|
|
336
|
+
<div class="pipeline-step" id="step-tokens">
|
|
337
|
+
<div class="step-icon">🌿</div>
|
|
338
|
+
<div class="step-label">Design System</div>
|
|
339
|
+
<div class="step-desc">Fluid Clamp & Font Tokens</div>
|
|
340
|
+
</div>
|
|
341
|
+
<div class="pipeline-arrow">→</div>
|
|
342
|
+
<div class="pipeline-step" id="step-builder">
|
|
343
|
+
<div class="step-icon">💻</div>
|
|
344
|
+
<div class="step-label">Frontend Builder</div>
|
|
345
|
+
<div class="step-desc">Tailwind & Component Synthesis</div>
|
|
346
|
+
</div>
|
|
347
|
+
<div class="pipeline-arrow">→</div>
|
|
348
|
+
<div class="pipeline-step" id="step-critic">
|
|
349
|
+
<div class="step-icon">🔍</div>
|
|
350
|
+
<div class="step-label">Visual Critic</div>
|
|
351
|
+
<div class="step-desc">Anti-AI Rubric (Score >= 8.5)</div>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
258
355
|
|
|
259
|
-
|
|
356
|
+
<!-- VISUAL SCORECARD & RESULT INSPECTOR -->
|
|
357
|
+
<div class="oneshot-results-grid" id="oneshotResultsGrid" style="display: none;">
|
|
358
|
+
<div class="visual-scorecard-panel">
|
|
359
|
+
<div class="scorecard-header">
|
|
360
|
+
<span class="score-title">PIXEL CREW VISUAL SCORE</span>
|
|
361
|
+
<span class="score-badge" id="finalScoreBadge">9.1 / 10.0</span>
|
|
362
|
+
</div>
|
|
363
|
+
<div class="rubric-meters" id="rubricMeters">
|
|
364
|
+
<!-- Dynamically populated -->
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<div class="oneshot-preview-panel">
|
|
369
|
+
<div class="preview-header">
|
|
370
|
+
<span class="preview-title">GENERATED BESPOKE SITE</span>
|
|
371
|
+
<a href="/api/site-preview" target="_blank" class="pixel-btn btn-xs btn-primary">
|
|
372
|
+
<span>🌐</span> OPEN LIVE PREVIEW
|
|
373
|
+
</a>
|
|
374
|
+
</div>
|
|
375
|
+
<div class="preview-iframe-wrapper">
|
|
376
|
+
<iframe id="sitePreviewIframe" class="site-preview-iframe" src="about:blank"></iframe>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
260
383
|
<footer class="arcade-footer">
|
|
261
384
|
<div class="footer-left">
|
|
262
385
|
<span>PRESS [1..6] EMPLOYEE PROFILE</span>
|