pixelcrew 0.2.3 → 0.2.6
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/README.md +389 -315
- package/bin/pixel-agents.js +306 -149
- package/package.json +3 -1
- package/skill/SKILL.md +185 -0
- package/skill/references/anti-ai-rubric.md +30 -0
- package/skill/references/anti-ai-slop-encyclopedia.md +181 -0
- package/skill/references/commands-reference.md +135 -0
- package/skill/references/testing-and-qa-strategy.md +25 -0
- package/skill/references/token-efficiency.md +20 -0
- package/src/adapters/adapter.interface.js +77 -0
- package/src/adapters/antigravity.js +138 -0
- package/src/adapters/claude-code.js +149 -0
- package/src/adapters/codex.js +131 -0
- package/src/adapters/cursor.js +133 -0
- package/src/adapters/generic.js +63 -0
- package/src/adapters/index.js +15 -0
- package/src/adapters/kiro.js +134 -0
- package/src/adapters/registry.js +150 -0
- package/src/backend/analyzer/complexity-analyzer.js +104 -0
- package/src/backend/analyzer/requirement-analyzer.js +213 -0
- package/src/backend/analyzer/threat-analyzer.js +122 -0
- package/src/backend/api/api-designer.js +90 -0
- package/src/backend/api/error-contract.js +132 -0
- package/src/backend/api/route-generator.js +92 -0
- package/src/backend/api/schema-generator.js +64 -0
- package/src/backend/architecture/adr-generator.js +62 -0
- package/src/backend/architecture/architecture-reasoner.js +119 -0
- package/src/backend/architecture/architecture-selector.js +57 -0
- package/src/backend/architecture/tradeoff-analyzer.js +92 -0
- package/src/backend/data/data-modeler.js +114 -0
- package/src/backend/data/index-analyzer.js +93 -0
- package/src/backend/data/query-analyzer.js +41 -0
- package/src/backend/data/schema-generator.js +92 -0
- package/src/backend/data/transaction-analyzer.js +49 -0
- package/src/backend/index.js +67 -0
- package/src/backend/observability/logging-engine.js +80 -0
- package/src/backend/observability/metrics-engine.js +31 -0
- package/src/backend/observability/tracing-engine.js +16 -0
- package/src/backend/patterns/pattern-registry.js +74 -0
- package/src/backend/patterns/pattern-selector.js +39 -0
- package/src/backend/patterns/tradeoff-engine.js +17 -0
- package/src/backend/performance/cache-analyzer.js +31 -0
- package/src/backend/performance/concurrency-analyzer.js +34 -0
- package/src/backend/performance/performance-engine.js +98 -0
- package/src/backend/performance/query-optimizer.js +16 -0
- package/src/backend/reliability/failure-analyzer.js +22 -0
- package/src/backend/reliability/idempotency-engine.js +56 -0
- package/src/backend/reliability/resilience-engine.js +141 -0
- package/src/backend/reliability/retry-analyzer.js +15 -0
- package/src/backend/security/auth-selector.js +33 -0
- package/src/backend/security/authorization-engine.js +90 -0
- package/src/backend/security/policy-engine.js +49 -0
- package/src/backend/security/secret-analyzer.js +39 -0
- package/src/backend/security/security-engine.js +122 -0
- package/src/backend/security/threat-model.js +59 -0
- package/src/backend/synthesis/backend-synthesizer.js +98 -0
- package/src/backend/synthesis/infrastructure-synthesizer.js +108 -0
- package/src/backend/synthesis/module-synthesizer.js +262 -0
- package/src/backend/validation/architecture-validator.js +70 -0
- package/src/backend/validation/backend-quality-validator.js +71 -0
- package/src/backend/validation/dependency-validator.js +20 -0
- package/src/backend/validation/performance-validator.js +38 -0
- package/src/backend/validation/security-validator.js +73 -0
- package/src/commands/adapt.js +105 -0
- package/src/commands/add.js +78 -0
- package/src/commands/animate.js +48 -0
- package/src/commands/assemble.js +57 -0
- package/src/commands/audit.js +93 -0
- package/src/commands/backend.js +125 -0
- package/src/commands/bento.js +25 -0
- package/src/commands/blueprint.js +65 -0
- package/src/commands/bolder.js +48 -0
- package/src/commands/boss-fight.js +60 -0
- package/src/commands/build.js +39 -0
- package/src/commands/calibrate.js +25 -0
- package/src/commands/chromatic.js +25 -0
- package/src/commands/clarify.js +52 -0
- package/src/commands/colorize.js +57 -0
- package/src/commands/command.interface.js +28 -0
- package/src/commands/commands.js +84 -0
- package/src/commands/craft.js +57 -0
- package/src/commands/crew.js +66 -0
- package/src/commands/critique.js +25 -0
- package/src/commands/de-slop.js +25 -0
- package/src/commands/delight.js +46 -0
- package/src/commands/deploy.js +42 -0
- package/src/commands/distill.js +48 -0
- package/src/commands/doctor.js +89 -0
- package/src/commands/document.js +83 -0
- package/src/commands/eight-bit.js +25 -0
- package/src/commands/extract.js +75 -0
- package/src/commands/fix.js +46 -0
- package/src/commands/harden.js +85 -0
- package/src/commands/index.js +67 -0
- package/src/commands/install.js +75 -0
- package/src/commands/layout.js +48 -0
- package/src/commands/live.js +44 -0
- package/src/commands/manifest.js +25 -0
- package/src/commands/office.js +25 -0
- package/src/commands/onboard.js +46 -0
- package/src/commands/oneshot.js +60 -0
- package/src/commands/optimize.js +46 -0
- package/src/commands/overdrive.js +46 -0
- package/src/commands/parser.js +143 -0
- package/src/commands/pixelcrew.js +96 -0
- package/src/commands/plan.js +66 -0
- package/src/commands/polish.js +45 -0
- package/src/commands/quieter.js +48 -0
- package/src/commands/recap.js +358 -0
- package/src/commands/registry.js +353 -0
- package/src/commands/render.js +26 -0
- package/src/commands/retrofit.js +25 -0
- package/src/commands/review.js +118 -0
- package/src/commands/roster.js +25 -0
- package/src/commands/sentinel.js +25 -0
- package/src/commands/shape.js +66 -0
- package/src/commands/skills.js +57 -0
- package/src/commands/status.js +48 -0
- package/src/commands/stop.js +50 -0
- package/src/commands/sync.js +58 -0
- package/src/commands/typeset.js +58 -0
- package/src/commands/warp.js +25 -0
- package/src/core/agent-runtime.js +94 -0
- package/src/core/event-bus.js +98 -0
- package/src/core/index.js +9 -0
- package/src/core/orchestrator.js +234 -0
- package/src/core/scheduler.js +124 -0
- package/src/core/task-graph.js +185 -0
- package/src/dashboard/app.js +1172 -30
- package/src/dashboard/index.html +223 -23
- package/src/dashboard/styles.css +870 -0
- package/src/index.js +16 -0
- package/src/orchestrator/artifact-graph.js +104 -0
- package/src/orchestrator/ast-normalizer.js +147 -0
- package/src/orchestrator/code-generator.js +632 -780
- package/src/orchestrator/design-engine.js +203 -0
- package/src/orchestrator/engine.js +307 -38
- package/src/orchestrator/oneshot.js +367 -380
- package/src/orchestrator/ontology.js +394 -0
- package/src/orchestrator/planner.js +231 -258
- package/src/orchestrator/repair-planner.js +67 -0
- package/src/orchestrator/requirement-contract.js +177 -0
- package/src/orchestrator/requirement-validator.js +39 -0
- package/src/orchestrator/semantic-engine.js +582 -0
- package/src/orchestrator/semantic-reviewer.js +179 -0
- package/src/orchestrator/task-planner.js +111 -0
- package/src/orchestrator/telemetry.js +209 -0
- package/src/orchestrator/ui-synthesizer.js +245 -0
- package/src/orchestrator/visual-critic.js +106 -0
- package/src/policies/architecture/layering.policy.js +14 -0
- package/src/policies/performance/indexing.policy.js +13 -0
- package/src/policies/reliability/resilience.policy.js +13 -0
- package/src/policies/security/auth.policy.js +31 -0
- package/src/protocol/agent.js +124 -0
- package/src/protocol/event.js +78 -0
- package/src/protocol/index.js +8 -0
- package/src/protocol/skill.js +54 -0
- package/src/protocol/task.js +100 -0
- package/src/scaffold/claude-generator.js +60 -0
- package/src/scaffold/commands-catalog.js +321 -0
- package/src/scaffold/cursor-generator.js +74 -0
- package/src/scaffold/ide-rules.js +133 -0
- package/src/scaffold/init.js +415 -91
- package/src/scaffold/installer.js +571 -0
- package/src/scaffold/kiro-generator.js +86 -0
- package/src/scaffold/skills-bundle.js +520 -0
- package/src/scaffold/templates.js +57 -4
- package/src/scaffold/workstations.js +364 -0
- package/src/server/server.js +283 -40
- package/src/utils/fs-safe.js +168 -0
- package/src/utils/markdown-report.js +175 -0
package/bin/pixel-agents.js
CHANGED
|
@@ -7,10 +7,11 @@ import { spawn } from 'node:child_process';
|
|
|
7
7
|
import { initializeProject } from '../src/scaffold/init.js';
|
|
8
8
|
import { OrchestratorEngine } from '../src/orchestrator/engine.js';
|
|
9
9
|
import { createServer } from '../src/server/server.js';
|
|
10
|
+
import { defaultCommandRegistry } from '../src/commands/index.js';
|
|
10
11
|
|
|
11
12
|
const BANNER = `\x1b[36m
|
|
12
13
|
╔═══════════════════════════════════════════════════════════╗
|
|
13
|
-
║ PIXEL
|
|
14
|
+
║ PIXEL CREW - Multi-Agent Orchestration Framework ║
|
|
14
15
|
║ [ ◉ _ ◉ ] ║
|
|
15
16
|
╚═══════════════════════════════════════════════════════════╝\x1b[0m`;
|
|
16
17
|
|
|
@@ -18,40 +19,65 @@ function printHelp() {
|
|
|
18
19
|
console.log(BANNER);
|
|
19
20
|
console.log(`
|
|
20
21
|
\x1b[1mUSAGE:\x1b[0m
|
|
21
|
-
npx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
\x1b[
|
|
27
|
-
\x1b[
|
|
28
|
-
\x1b[
|
|
29
|
-
\x1b[
|
|
30
|
-
\x1b[
|
|
31
|
-
\x1b[
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
npx pixelcrew <command> [options]
|
|
23
|
+
npx pixelcrew /<slash-command> [args]
|
|
24
|
+
npx pixelcrew /pixelcrew <subcommand> [args]
|
|
25
|
+
|
|
26
|
+
\x1b[1m🚀 FLOOR 42 CREATION & ARCHITECTURE:\x1b[0m
|
|
27
|
+
\x1b[32massemble\x1b[0m "<prompt>" Full shape-then-build multi-agent sprint pipeline
|
|
28
|
+
\x1b[32mblueprint\x1b[0m "<prompt>" Plan UX section topologies & dynamic DAG graph
|
|
29
|
+
\x1b[32mboss-fight\x1b[0m "<issue>" Targeted swarm bug blitz to isolate and conquer errors
|
|
30
|
+
\x1b[32mmanifest\x1b[0m Generate root DESIGN.md & PRODUCT.md blueprints
|
|
31
|
+
\x1b[32mretrofit\x1b[0m Harvest UI components & tokens into design system
|
|
32
|
+
\x1b[32minit\x1b[0m Initialize .pixel-crew/ workspace in current project
|
|
33
|
+
|
|
34
|
+
\x1b[1m🎨 RETRO AESTHETIC & ANTI-AI DIRECTION:\x1b[0m
|
|
35
|
+
\x1b[32mrender\x1b[0m 6-dimension Anti-AI design & UX review (>= 8.5/10)
|
|
36
|
+
\x1b[32m8bit\x1b[0m Inject 8-bit Web Audio chimes, CRT scanlines & tactile joy
|
|
37
|
+
\x1b[32moverdrive\x1b[0m Engage GPU WebGL shaders & interactive terminal shell
|
|
38
|
+
\x1b[32mchromatic\x1b[0m [palette] Strategic HSL color token calibration & dark mode
|
|
39
|
+
\x1b[32mtypeset\x1b[0m [preset] Apply mathematical fluid clamp() typography scales
|
|
40
|
+
\x1b[32mbento\x1b[0m [section] Reorganize sections into asymmetric Bento grids
|
|
41
|
+
\x1b[32mde-slop\x1b[0m [section] Strip AI cliché copy with grounded technical specs
|
|
42
|
+
\x1b[32mbolder\x1b[0m / \x1b[32mquieter\x1b[0m Amplify visual punch or restore calm minimalist balance
|
|
43
|
+
|
|
44
|
+
\x1b[1m🛡️ PRODUCTION HARDENING & SRE:\x1b[0m
|
|
45
|
+
\x1b[32msentinel\x1b[0m Defensive security: OWASP audit, RFC 7807 envelopes
|
|
46
|
+
\x1b[32maudit\x1b[0m Run technical quality checks (a11y, CWV, Playwright)
|
|
47
|
+
\x1b[32mwarp\x1b[0m Full-stack performance tuning & AST token caching (72% savings)
|
|
48
|
+
\x1b[32mpolish\x1b[0m Final shipping readiness pass & strict type check
|
|
49
|
+
\x1b[32mcalibrate\x1b[0m [viewport] Optimize viewports from 360px mobile to 4K desktop
|
|
50
|
+
\x1b[32monboard\x1b[0m Synthesize first-run onboarding & empty states
|
|
51
|
+
|
|
52
|
+
\x1b[1m🏢 FLOOR 42 OPERATIONS:\x1b[0m
|
|
53
|
+
\x1b[32moffice\x1b[0m [--port 4747] Launch Floor 42 live startup office dashboard & preview
|
|
54
|
+
\x1b[32mroster\x1b[0m [list|spawn] Inspect active agent workstations and task telemetry
|
|
55
|
+
\x1b[32mstart\x1b[0m Start multi-agent orchestrator & live pixel dashboard
|
|
56
|
+
\x1b[32msync\x1b[0m Synchronize workspace skills across detected agent IDEs
|
|
57
|
+
\x1b[32mdoctor\x1b[0m Diagnose environment, LLM keys & provider runtimes
|
|
58
|
+
\x1b[32mhelp\x1b[0m Show this help reference
|
|
59
|
+
|
|
34
60
|
|
|
35
61
|
\x1b[1mOPTIONS:\x1b[0m
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--message <msg> Event message for emit
|
|
45
|
-
--skill <skill> Associated skill for emit
|
|
62
|
+
--dry-run Preview file creations and updates without modifying disk
|
|
63
|
+
--provider <name> Select agent provider (auto, claude-code, cursor, kiro, antigravity, generic, all)
|
|
64
|
+
--target <nextjs|vanilla> Set output target framework (default: nextjs)
|
|
65
|
+
--out <dir> Set custom output directory
|
|
66
|
+
--port <number> Set dashboard port (default: 4747)
|
|
67
|
+
--no-open Do not automatically open the browser
|
|
68
|
+
--yes, -y Skip prompts and use defaults during init
|
|
69
|
+
--name <name> Set project name during init
|
|
46
70
|
|
|
47
71
|
\x1b[1mEXAMPLES:\x1b[0m
|
|
48
|
-
npx
|
|
49
|
-
npx
|
|
50
|
-
npx
|
|
51
|
-
npx
|
|
72
|
+
npx pixelcrew craft "Build a modern SaaS analytics platform"
|
|
73
|
+
npx pixelcrew /pixelcrew bolder
|
|
74
|
+
npx pixelcrew /pixelcrew critique
|
|
75
|
+
npx pixelcrew sync --dry-run
|
|
76
|
+
npx pixelcrew start
|
|
52
77
|
`);
|
|
53
78
|
}
|
|
54
79
|
|
|
80
|
+
|
|
55
81
|
function openBrowser(url) {
|
|
56
82
|
const platform = process.platform;
|
|
57
83
|
let cmd = 'open';
|
|
@@ -66,21 +92,26 @@ function openBrowser(url) {
|
|
|
66
92
|
}
|
|
67
93
|
|
|
68
94
|
async function resolveDaemonUrl(rootDir) {
|
|
69
|
-
// 1. Check .pixel-agents/daemon.json
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
// 1. Check .pixel-crew/daemon.json or .pixel-agents/daemon.json
|
|
96
|
+
const daemonPaths = [
|
|
97
|
+
path.join(rootDir, '.pixel-crew', 'daemon.json'),
|
|
98
|
+
path.join(rootDir, '.pixel-agents', 'daemon.json')
|
|
99
|
+
];
|
|
100
|
+
for (const daemonPath of daemonPaths) {
|
|
101
|
+
try {
|
|
102
|
+
const raw = await fs.readFile(daemonPath, 'utf-8');
|
|
103
|
+
const info = JSON.parse(raw);
|
|
104
|
+
if (info?.url) {
|
|
105
|
+
const res = await fetch(`${info.url}/api/info`, { signal: AbortSignal.timeout(600) });
|
|
106
|
+
if (res.ok) {
|
|
107
|
+
const serverInfo = await res.json();
|
|
108
|
+
if (!serverInfo.rootDir || serverInfo.rootDir === rootDir) {
|
|
109
|
+
return info.url;
|
|
110
|
+
}
|
|
80
111
|
}
|
|
81
112
|
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
113
|
+
} catch {}
|
|
114
|
+
}
|
|
84
115
|
|
|
85
116
|
// 2. Scan fallback ports 4747..4755 and verify rootDir
|
|
86
117
|
for (let port = 4747; port <= 4755; port++) {
|
|
@@ -104,10 +135,8 @@ function startServerWithPortFallback(server, initialPort, maxTries = 20) {
|
|
|
104
135
|
let attempts = 0;
|
|
105
136
|
|
|
106
137
|
function tryListen() {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
server.once('error', (err) => {
|
|
138
|
+
const onError = (err) => {
|
|
139
|
+
server.removeListener('listening', onListening);
|
|
111
140
|
if (err.code === 'EADDRINUSE') {
|
|
112
141
|
attempts++;
|
|
113
142
|
if (attempts >= maxTries) {
|
|
@@ -120,11 +149,15 @@ function startServerWithPortFallback(server, initialPort, maxTries = 20) {
|
|
|
120
149
|
} else {
|
|
121
150
|
reject(err);
|
|
122
151
|
}
|
|
123
|
-
}
|
|
152
|
+
};
|
|
124
153
|
|
|
125
|
-
|
|
154
|
+
const onListening = () => {
|
|
155
|
+
server.removeListener('error', onError);
|
|
126
156
|
resolve(currentPort);
|
|
127
|
-
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
server.once('error', onError);
|
|
160
|
+
server.once('listening', onListening);
|
|
128
161
|
|
|
129
162
|
server.listen(currentPort);
|
|
130
163
|
}
|
|
@@ -141,23 +174,37 @@ async function main() {
|
|
|
141
174
|
const options = {};
|
|
142
175
|
for (let i = 1; i < args.length; i++) {
|
|
143
176
|
if (args[i] === '--yes' || args[i] === '-y') options.yes = true;
|
|
177
|
+
else if (args[i] === '--dry-run') options.dryRun = true;
|
|
144
178
|
else if (args[i] === '--no-open') options.noOpen = true;
|
|
145
179
|
else if (args[i] === '--port' && args[i + 1]) options.port = parseInt(args[++i], 10);
|
|
180
|
+
else if (args[i] === '--provider' && args[i + 1]) options.provider = args[++i];
|
|
146
181
|
else if (args[i] === '--target' && args[i + 1]) options.targetFramework = args[++i];
|
|
147
182
|
else if (args[i] === '--out' && args[i + 1]) options.outputDir = args[++i];
|
|
148
183
|
else if (args[i] === '--name' && args[i + 1]) options.name = args[++i];
|
|
149
184
|
else if (args[i] === '--agent' && args[i + 1]) options.agent = args[++i];
|
|
150
185
|
else if (args[i] === '--type' && args[i + 1]) options.type = args[++i];
|
|
151
186
|
else if (args[i] === '--message' && args[i + 1]) options.message = args[++i];
|
|
187
|
+
else if (args[i] === '--global' || args[i] === '-g') options.global = true;
|
|
188
|
+
else if (args[i] === '--scope' && args[i + 1]) options.scope = args[++i];
|
|
152
189
|
else if (args[i] === '--skill' && args[i + 1]) options.skill = args[++i];
|
|
153
190
|
else if (!args[i].startsWith('-') && !options.taskPrompt) {
|
|
154
191
|
options.taskPrompt = args[i];
|
|
155
192
|
}
|
|
156
193
|
}
|
|
157
194
|
|
|
195
|
+
|
|
158
196
|
const rootDir = process.cwd();
|
|
159
197
|
|
|
160
198
|
switch (command) {
|
|
199
|
+
case 'install':
|
|
200
|
+
case 'setup': {
|
|
201
|
+
const { InstallCommand } = await import('../src/commands/install.js');
|
|
202
|
+
const cmd = new InstallCommand();
|
|
203
|
+
const res = await cmd.execute({ targetDir: rootDir, options }, args.slice(1));
|
|
204
|
+
if (res.output) console.log(res.output);
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
|
|
161
208
|
case 'init': {
|
|
162
209
|
await initializeProject(rootDir, options);
|
|
163
210
|
break;
|
|
@@ -185,11 +232,21 @@ async function main() {
|
|
|
185
232
|
case 'dev':
|
|
186
233
|
case 'dashboard':
|
|
187
234
|
case 'demo': {
|
|
188
|
-
// Check if project is initialized
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
235
|
+
// Check if project is initialized (.pixel-crew or .pixel-agents)
|
|
236
|
+
const configPaths = [
|
|
237
|
+
path.join(rootDir, '.pixel-crew', 'config.json'),
|
|
238
|
+
path.join(rootDir, '.pixel-agents', 'config.json')
|
|
239
|
+
];
|
|
240
|
+
let initialized = false;
|
|
241
|
+
for (const cp of configPaths) {
|
|
242
|
+
try {
|
|
243
|
+
await fs.access(cp);
|
|
244
|
+
initialized = true;
|
|
245
|
+
break;
|
|
246
|
+
} catch {}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (!initialized) {
|
|
193
250
|
console.log('\x1b[33mProject not initialized yet. Running automatic init...\x1b[0m');
|
|
194
251
|
await initializeProject(rootDir, { yes: true });
|
|
195
252
|
}
|
|
@@ -204,8 +261,8 @@ async function main() {
|
|
|
204
261
|
const boundPort = await startServerWithPortFallback(server, requestedPort);
|
|
205
262
|
const url = `http://localhost:${boundPort}`;
|
|
206
263
|
|
|
207
|
-
// Persist daemon discovery file
|
|
208
|
-
const daemonPath = path.join(rootDir, '.pixel-
|
|
264
|
+
// Persist daemon discovery file in active directory (.pixel-crew)
|
|
265
|
+
const daemonPath = path.join(engine.activeDir || path.join(rootDir, '.pixel-crew'), 'daemon.json');
|
|
209
266
|
try {
|
|
210
267
|
await fs.writeFile(daemonPath, JSON.stringify({
|
|
211
268
|
port: boundPort,
|
|
@@ -264,93 +321,12 @@ async function main() {
|
|
|
264
321
|
break;
|
|
265
322
|
}
|
|
266
323
|
|
|
267
|
-
case '
|
|
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 ${result.targetFramework.toUpperCase()} project generated (${result.buildResult.fileCount} files):\x1b[0m`);
|
|
329
|
-
console.log(` \x1b[36m${outputDir}\x1b[0m`);
|
|
330
|
-
console.log(` Preview: \x1b[33m${path.join(outputDir, 'index.html')}\x1b[0m\n`);
|
|
331
|
-
|
|
332
|
-
if (result.targetFramework !== 'vanilla') {
|
|
333
|
-
console.log(`\x1b[90mTo launch the full ${result.targetFramework.toUpperCase()} development server:\x1b[0m`);
|
|
334
|
-
console.log(` \x1b[37mcd ${path.relative(process.cwd(), outputDir) || '.'}\x1b[0m`);
|
|
335
|
-
console.log(` \x1b[37mnpm install && npm run dev\x1b[0m\n`);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
if (!options.noOpen) {
|
|
339
|
-
openBrowser(path.join(outputDir, 'index.html'));
|
|
340
|
-
}
|
|
341
|
-
} catch (err) {
|
|
342
|
-
console.error('\x1b[31mOneShot Generation Failed:\x1b[0m', err.message);
|
|
343
|
-
process.exit(1);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
break;
|
|
347
|
-
}
|
|
348
|
-
|
|
324
|
+
case 'goal':
|
|
349
325
|
case 'task': {
|
|
350
326
|
const taskPrompt = options.taskPrompt || args[1];
|
|
351
327
|
if (!taskPrompt) {
|
|
352
|
-
console.error('\x1b[31mError: Please provide a task description.\x1b[0m');
|
|
353
|
-
console.log('Example: npx
|
|
328
|
+
console.error('\x1b[31mError: Please provide a goal or task description.\x1b[0m');
|
|
329
|
+
console.log('Example: npx pixelcrew task "Build modern portfolio with Next.js and E2E tests"');
|
|
354
330
|
process.exit(1);
|
|
355
331
|
}
|
|
356
332
|
|
|
@@ -361,10 +337,10 @@ async function main() {
|
|
|
361
337
|
const res = await fetch(`${daemonUrl}/api/task`, {
|
|
362
338
|
method: 'POST',
|
|
363
339
|
headers: { 'Content-Type': 'application/json' },
|
|
364
|
-
body: JSON.stringify({ prompt: taskPrompt })
|
|
340
|
+
body: JSON.stringify({ prompt: taskPrompt, ...options })
|
|
365
341
|
});
|
|
366
342
|
if (res.ok) {
|
|
367
|
-
console.log(`\x1b[32m✓
|
|
343
|
+
console.log(`\x1b[32m✓ Goal dispatched to running swarm daemon (${daemonUrl}):\x1b[0m "${taskPrompt}"`);
|
|
368
344
|
console.log(`Check live status at ${daemonUrl}`);
|
|
369
345
|
return;
|
|
370
346
|
}
|
|
@@ -372,21 +348,39 @@ async function main() {
|
|
|
372
348
|
}
|
|
373
349
|
|
|
374
350
|
console.log(BANNER);
|
|
375
|
-
console.log(`\x1b[33m[SWARM RUNNER]\x1b[0m Dispatching
|
|
351
|
+
console.log(`\x1b[33m[SWARM RUNNER]\x1b[0m Dispatching objective: "${taskPrompt}"\n`);
|
|
376
352
|
const engine = new OrchestratorEngine(rootDir);
|
|
377
353
|
await engine.initialize();
|
|
378
354
|
|
|
379
355
|
engine.on('agent_event', (event) => {
|
|
380
356
|
const time = new Date(event.timestamp).toTimeString().split(' ')[0];
|
|
381
|
-
const agentPadded = (event.agent || 'orchestrator').padEnd(
|
|
382
|
-
|
|
357
|
+
const agentPadded = (event.agent || 'orchestrator').padEnd(16);
|
|
358
|
+
let color = '\x1b[37m';
|
|
359
|
+
if (event.agent === 'orchestrator') color = '\x1b[33m';
|
|
360
|
+
else if (event.agent === 'frontend') color = '\x1b[36m';
|
|
361
|
+
else if (event.agent === 'backend') color = '\x1b[35m';
|
|
362
|
+
else if (event.agent === 'database') color = '\x1b[33m';
|
|
363
|
+
else if (event.agent === 'security') color = '\x1b[31m';
|
|
364
|
+
else if (event.agent === 'performance') color = '\x1b[32m';
|
|
365
|
+
else if (event.agent === 'qa' || event.agent === 'visualCritic') color = '\x1b[35m';
|
|
366
|
+
else if (event.agent === 'creativeDirector') color = '\x1b[38;5;208m';
|
|
367
|
+
|
|
368
|
+
console.log(`\x1b[90m${time}\x1b[0m ${color}${agentPadded}\x1b[0m → ${event.message}`);
|
|
383
369
|
});
|
|
384
370
|
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
console.log('\n\x1b[36m' +
|
|
371
|
+
const result = await engine.submitTask(taskPrompt, options);
|
|
372
|
+
if (typeof result === 'string') {
|
|
373
|
+
console.log('\n\x1b[36m' + result + '\x1b[0m\n');
|
|
374
|
+
} else if (result?.buildResult) {
|
|
375
|
+
console.log(`\n\x1b[32m\x1b[1m✓ Goal completed successfully (${result.buildResult.fileCount} files synthesized):\x1b[0m`);
|
|
376
|
+
console.log(` Target Directory: \x1b[36m${result.outputDir}\x1b[0m`);
|
|
377
|
+
if (result.targetFramework !== 'vanilla') {
|
|
378
|
+
console.log(`\n\x1b[90mTo start the local development server:\x1b[0m`);
|
|
379
|
+
console.log(` \x1b[37mcd ${path.relative(process.cwd(), result.outputDir) || result.outputDir}\x1b[0m`);
|
|
380
|
+
console.log(` \x1b[37mnpm install && npm run dev\x1b[0m\n`);
|
|
381
|
+
}
|
|
388
382
|
}
|
|
389
|
-
console.log('\x1b[32m✓ Sprint
|
|
383
|
+
console.log('\x1b[32m✓ Sprint mission completed successfully.\x1b[0m\n');
|
|
390
384
|
break;
|
|
391
385
|
}
|
|
392
386
|
|
|
@@ -417,7 +411,128 @@ async function main() {
|
|
|
417
411
|
const engine = new OrchestratorEngine(rootDir);
|
|
418
412
|
await engine.initialize();
|
|
419
413
|
await engine.emitEvent(eventData);
|
|
420
|
-
console.log(`\x1b[32m✓ Event recorded to .pixel-
|
|
414
|
+
console.log(`\x1b[32m✓ Event recorded to .pixel-crew/events.jsonl:\x1b[0m ${eventData.agent} → ${eventData.message}`);
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
case 'doctor':
|
|
419
|
+
case 'diagnose': {
|
|
420
|
+
const { DoctorCommand } = await import('../src/commands/doctor.js');
|
|
421
|
+
const { defaultProviderRegistry } = await import('../src/adapters/index.js');
|
|
422
|
+
const cmd = new DoctorCommand();
|
|
423
|
+
const res = await cmd.execute({ providerRegistry: defaultProviderRegistry }, args.slice(1));
|
|
424
|
+
console.log(BANNER);
|
|
425
|
+
console.log('\n' + res.output + '\n');
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
case 'assemble':
|
|
430
|
+
case 'craft': {
|
|
431
|
+
const prompt = options.taskPrompt || args.slice(1).join(' ');
|
|
432
|
+
if (!prompt) {
|
|
433
|
+
console.error('\x1b[31mError: Please provide a prompt for /assemble.\x1b[0m');
|
|
434
|
+
console.log('Example: npx pixelcrew assemble "Build modern portfolio with Next.js"');
|
|
435
|
+
process.exit(1);
|
|
436
|
+
}
|
|
437
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
438
|
+
await engine.initialize();
|
|
439
|
+
console.log(BANNER);
|
|
440
|
+
console.log(`\x1b[33m[SWARM SPRINT ASSEMBLY]\x1b[0m Generating project: "${prompt}"\n`);
|
|
441
|
+
const { AssembleCommand } = await import('../src/commands/assemble.js');
|
|
442
|
+
const cmd = new AssembleCommand();
|
|
443
|
+
const result = await cmd.execute({ engine, options }, [prompt]);
|
|
444
|
+
if (result.output) {
|
|
445
|
+
console.log('\n' + result.output + '\n');
|
|
446
|
+
}
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
case 'plan': {
|
|
451
|
+
const prompt = options.taskPrompt || args.slice(1).join(' ');
|
|
452
|
+
if (!prompt) {
|
|
453
|
+
console.error('\x1b[31mError: Please provide a prompt for /plan.\x1b[0m');
|
|
454
|
+
console.log('Example: npx pixelcrew plan "Saas pricing calculator"');
|
|
455
|
+
process.exit(1);
|
|
456
|
+
}
|
|
457
|
+
const { PlanCommand } = await import('../src/commands/plan.js');
|
|
458
|
+
const cmd = new PlanCommand();
|
|
459
|
+
const res = await cmd.execute({ options }, [prompt]);
|
|
460
|
+
console.log(BANNER);
|
|
461
|
+
console.log('\n' + res.output + '\n');
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
case 'build': {
|
|
466
|
+
const prompt = args.slice(1).join(' ');
|
|
467
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
468
|
+
await engine.initialize();
|
|
469
|
+
const res = await engine.executeCommand(`/build ${prompt}`, options);
|
|
470
|
+
if (res.output) console.log(res.output);
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
case 'crew':
|
|
475
|
+
case 'agents': {
|
|
476
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
477
|
+
await engine.initialize();
|
|
478
|
+
const res = await engine.executeCommand(`/crew ${args.slice(1).join(' ')}`, options);
|
|
479
|
+
console.log(BANNER);
|
|
480
|
+
console.log('\n' + res.output + '\n');
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
case 'skills': {
|
|
485
|
+
const { SkillsCommand } = await import('../src/commands/skills.js');
|
|
486
|
+
const cmd = new SkillsCommand();
|
|
487
|
+
const res = await cmd.execute({}, args.slice(1));
|
|
488
|
+
console.log(BANNER);
|
|
489
|
+
console.log('\n' + res.output + '\n');
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
case 'add':
|
|
494
|
+
case 'install': {
|
|
495
|
+
const { AddCommand } = await import('../src/commands/add.js');
|
|
496
|
+
const cmd = new AddCommand();
|
|
497
|
+
const res = await cmd.execute({ targetDir: rootDir, options }, args.slice(1));
|
|
498
|
+
console.log(BANNER);
|
|
499
|
+
console.log('\n' + res.output + '\n');
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
case 'sync': {
|
|
504
|
+
const { SyncCommand } = await import('../src/commands/sync.js');
|
|
505
|
+
const cmd = new SyncCommand();
|
|
506
|
+
const res = await cmd.execute({ targetDir: rootDir, options }, args.slice(1));
|
|
507
|
+
console.log(BANNER);
|
|
508
|
+
console.log('\n' + res.output + '\n');
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
case 'review': {
|
|
514
|
+
const { ReviewCommand } = await import('../src/commands/review.js');
|
|
515
|
+
const cmd = new ReviewCommand();
|
|
516
|
+
const res = await cmd.execute({ engine: new OrchestratorEngine(rootDir) }, args.slice(1));
|
|
517
|
+
console.log(BANNER);
|
|
518
|
+
console.log('\n' + res.output + '\n');
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
case 'fix': {
|
|
523
|
+
const issue = args.slice(1).join(' ');
|
|
524
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
525
|
+
await engine.initialize();
|
|
526
|
+
const res = await engine.executeCommand(`/fix ${issue}`, options);
|
|
527
|
+
if (res.output) console.log(res.output);
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
case 'stop': {
|
|
532
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
533
|
+
await engine.initialize();
|
|
534
|
+
engine.cancelActiveExecution();
|
|
535
|
+
console.log('\x1b[33m✓ Swarm stopped.\x1b[0m\n');
|
|
421
536
|
break;
|
|
422
537
|
}
|
|
423
538
|
|
|
@@ -442,13 +557,55 @@ async function main() {
|
|
|
442
557
|
break;
|
|
443
558
|
}
|
|
444
559
|
|
|
560
|
+
case 'commands':
|
|
561
|
+
case 'slash-commands':
|
|
562
|
+
case 'palette': {
|
|
563
|
+
const { CommandsCommand } = await import('../src/commands/commands.js');
|
|
564
|
+
const cmd = new CommandsCommand();
|
|
565
|
+
const res = await cmd.execute({ targetDir: rootDir, options }, args.slice(1));
|
|
566
|
+
if (res.output) console.log(res.output);
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
|
|
445
570
|
case 'help':
|
|
446
571
|
case '--help':
|
|
447
572
|
case '-h':
|
|
573
|
+
printHelp();
|
|
574
|
+
break;
|
|
575
|
+
|
|
448
576
|
default: {
|
|
577
|
+
const cleanCmd = command.replace(/^\//, '').toLowerCase();
|
|
578
|
+
const matched = defaultCommandRegistry.getCommand(cleanCmd);
|
|
579
|
+
|
|
580
|
+
if (matched) {
|
|
581
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
582
|
+
await engine.initialize();
|
|
583
|
+
const fullInput = command.startsWith('/') ? `${command} ${args.slice(1).join(' ')}`.trim() : `/${command} ${args.slice(1).join(' ')}`.trim();
|
|
584
|
+
const res = await defaultCommandRegistry.execute(fullInput, { targetDir: rootDir, options, engine });
|
|
585
|
+
if (res.output) {
|
|
586
|
+
console.log('\n' + res.output + '\n');
|
|
587
|
+
} else if (res.message) {
|
|
588
|
+
console.log('\n\x1b[32m' + res.message + '\x1b[0m\n');
|
|
589
|
+
}
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (command.startsWith('/')) {
|
|
594
|
+
const engine = new OrchestratorEngine(rootDir);
|
|
595
|
+
await engine.initialize();
|
|
596
|
+
const fullInput = `${command} ${args.slice(1).join(' ')}`.trim();
|
|
597
|
+
const res = await engine.executeCommand(fullInput, options);
|
|
598
|
+
if (res.output) {
|
|
599
|
+
console.log('\n' + res.output + '\n');
|
|
600
|
+
} else if (res.message) {
|
|
601
|
+
console.log('\n\x1b[32m' + res.message + '\x1b[0m\n');
|
|
602
|
+
}
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
449
605
|
printHelp();
|
|
450
606
|
break;
|
|
451
607
|
}
|
|
608
|
+
|
|
452
609
|
}
|
|
453
610
|
}
|
|
454
611
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixelcrew",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Local multi-agent orchestration framework with an interactive pixel-art tech startup office visual dashboard",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"bin/",
|
|
14
14
|
"src/",
|
|
15
|
+
"skill/",
|
|
15
16
|
"README.md",
|
|
16
17
|
"LICENSE"
|
|
17
18
|
],
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"init": "node bin/pixel-agents.js init",
|
|
21
22
|
"dashboard": "node bin/pixel-agents.js dashboard",
|
|
22
23
|
"demo": "node bin/pixel-agents.js demo",
|
|
24
|
+
"sync:providers": "node scripts/sync-providers.js",
|
|
23
25
|
"test": "node --test tests/**/*.test.js"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|