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
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Open-World Design Engine
|
|
3
|
+
*
|
|
4
|
+
* Synthesizes dynamic, bespoke DesignSpecs from prompt & AST context.
|
|
5
|
+
* Does NOT lock into fixed visual archetypes (e.g. editorial, technical, kinetic).
|
|
6
|
+
* Generates bespoke personality traits, fluid typography, semantic HSL tokens,
|
|
7
|
+
* spacing hierarchies, and anti-slop constraints.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export class DesignEngine {
|
|
11
|
+
/**
|
|
12
|
+
* Synthesize a bespoke DesignSpec for a Project AST
|
|
13
|
+
*/
|
|
14
|
+
static synthesizeDesignSpec(ast = {}, rawPrompt = "") {
|
|
15
|
+
const domain = ast.domain || 'custom-app';
|
|
16
|
+
const domainMeta = ast.domainMeta || { label: ast.appName || 'Application' };
|
|
17
|
+
const p = (rawPrompt || ast.rawPrompt || "").toLowerCase();
|
|
18
|
+
|
|
19
|
+
// 1. Synthesize Bespoke Design Intent (Multi-trait open-world synthesis)
|
|
20
|
+
const personality = this.inferPersonality(p, domainMeta.label);
|
|
21
|
+
const visualReferences = this.inferVisualReferences(p, domainMeta.label);
|
|
22
|
+
|
|
23
|
+
// 2. Synthesize Composition & Layout Rules
|
|
24
|
+
const composition = {
|
|
25
|
+
density: p.includes('compact') || p.includes('telemetry') || p.includes('data') ? 'high' : 'comfortable',
|
|
26
|
+
grid: 'asymmetric',
|
|
27
|
+
navigation: 'persistent-masthead',
|
|
28
|
+
containerMaxWidth: 'max-w-7xl',
|
|
29
|
+
surfaceElevation: 'tiered-1px-borders'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// 3. Synthesize Mathematical Fluid Typography System
|
|
33
|
+
const typography = this.synthesizeTypography(p);
|
|
34
|
+
|
|
35
|
+
// 4. Synthesize Semantic HSL & Hex Palette (No neon glow defaults)
|
|
36
|
+
const color = this.synthesizePalette(p, domain);
|
|
37
|
+
|
|
38
|
+
// 5. Synthesize Spacing & Elevation Tokens
|
|
39
|
+
const spacing = {
|
|
40
|
+
sectionPadding: 'py-20 md:py-28',
|
|
41
|
+
containerGutter: 'px-6 md:px-8',
|
|
42
|
+
itemGap: 'gap-6',
|
|
43
|
+
radius: {
|
|
44
|
+
small: 'rounded-sm',
|
|
45
|
+
medium: 'rounded',
|
|
46
|
+
large: 'rounded-md'
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// 6. Motion & Interaction Rules
|
|
51
|
+
const motion = {
|
|
52
|
+
intensity: 'purposeful',
|
|
53
|
+
easing: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
|
54
|
+
durationFast: '150ms',
|
|
55
|
+
durationNormal: '250ms',
|
|
56
|
+
allowedProperties: ['transform', 'opacity', 'background-color', 'border-color']
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// 7. Anti-AI-Slop Constraints (Impeccable 64-pattern compliance)
|
|
60
|
+
const antiSlopConstraints = {
|
|
61
|
+
banDecorativeGridBackground: true,
|
|
62
|
+
banFakeTerminalWindow: true,
|
|
63
|
+
banFourBoxStatStrip: true,
|
|
64
|
+
banSkillProgressBars: true,
|
|
65
|
+
banPillBadgeOveruse: true,
|
|
66
|
+
banNestedCards: true,
|
|
67
|
+
banPurpleCyanHalo: true,
|
|
68
|
+
banCrushedLetterSpacing: true,
|
|
69
|
+
requireHighContrast: true,
|
|
70
|
+
minContrastRatio: 4.5
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
designIntent: {
|
|
75
|
+
personality,
|
|
76
|
+
visualReferences,
|
|
77
|
+
principles: [
|
|
78
|
+
'High information density with clear optical hierarchy',
|
|
79
|
+
'Solid surface elevation tiers over decorative halos',
|
|
80
|
+
'Fluid mathematical typography with strict left-aligned readability'
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
composition,
|
|
84
|
+
typography,
|
|
85
|
+
color,
|
|
86
|
+
spacing,
|
|
87
|
+
motion,
|
|
88
|
+
antiSlopConstraints
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static inferPersonality(p, domainLabel) {
|
|
93
|
+
const traits = ['instrumental', 'purposeful', 'structured'];
|
|
94
|
+
if (/ocean|marine|underwater|sea|dive|water/i.test(p)) {
|
|
95
|
+
traits.push('deep-nautical', 'field-research', 'cartographic');
|
|
96
|
+
} else if (/sky|space|astro|orbit|telescope|star|lunar|galaxy/i.test(p)) {
|
|
97
|
+
traits.push('observational', 'precision-telemetry', 'atmospheric');
|
|
98
|
+
} else if (/film|cinema|movie|direct|scene|script/i.test(p)) {
|
|
99
|
+
traits.push('cinematic-ledger', 'editorial-chronicle', 'backstage-ops');
|
|
100
|
+
} else if (/dragon|myth|sanctuary|creature|beast/i.test(p)) {
|
|
101
|
+
traits.push('naturalist-compendium', 'biological-field-log', 'archival');
|
|
102
|
+
} else if (/coral|reef|ecology|nature|forest|plant|greenhouse/i.test(p)) {
|
|
103
|
+
traits.push('environmental-registry', 'conservation-ops', 'botanical');
|
|
104
|
+
} else {
|
|
105
|
+
traits.push('domain-adapted', 'operational-console');
|
|
106
|
+
}
|
|
107
|
+
return traits;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static inferVisualReferences(p, domainLabel) {
|
|
111
|
+
const refs = [`Operational records of ${domainLabel}`];
|
|
112
|
+
if (/ocean|marine|underwater|dive/i.test(p)) {
|
|
113
|
+
refs.push('Oceanographic expedition logs', 'Bathymetric survey instrumentation', 'Field research catalogues');
|
|
114
|
+
} else if (/sky|space|astro|orbit|telescope/i.test(p)) {
|
|
115
|
+
refs.push('Astrophysical observational ledgers', 'Telescopic sensor consoles', 'Deep-sky star charts');
|
|
116
|
+
} else if (/film|cinema|scene/i.test(p)) {
|
|
117
|
+
refs.push('Production continuity call sheets', 'Camera slate ledgers', 'Editorial timeline tracks');
|
|
118
|
+
} else if (/dragon|creature|myth/i.test(p)) {
|
|
119
|
+
refs.push('Mythological biology compendiums', 'Field naturalist notebooks', 'Lineage pedigree archives');
|
|
120
|
+
} else {
|
|
121
|
+
refs.push('Technical documentation systems', 'Clean domain ledgers');
|
|
122
|
+
}
|
|
123
|
+
return refs;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static synthesizeTypography(p) {
|
|
127
|
+
if (/film|cinema|editorial|literature|magazine/i.test(p)) {
|
|
128
|
+
return {
|
|
129
|
+
display: '"Newsreader", Georgia, serif',
|
|
130
|
+
body: '"Inter", sans-serif',
|
|
131
|
+
mono: '"JetBrains Mono", monospace',
|
|
132
|
+
googleFontsUrl: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&display=swap'
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
display: '"Outfit", sans-serif',
|
|
137
|
+
body: '"Inter", sans-serif',
|
|
138
|
+
mono: '"JetBrains Mono", monospace',
|
|
139
|
+
googleFontsUrl: 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap'
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static synthesizePalette(p, domain) {
|
|
144
|
+
if (/ocean|marine|underwater|dive|sea/i.test(p)) {
|
|
145
|
+
return {
|
|
146
|
+
bg: '#080d14',
|
|
147
|
+
surface: '#0d1522',
|
|
148
|
+
surfaceRaised: '#131e30',
|
|
149
|
+
border: 'rgba(56, 189, 248, 0.12)',
|
|
150
|
+
borderHover: 'rgba(56, 189, 248, 0.28)',
|
|
151
|
+
accent: '#38bdf8',
|
|
152
|
+
textPrimary: '#f0f6fc',
|
|
153
|
+
textMuted: '#94a3b8'
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (/coral|reef|nature|forest|plant|greenhouse|ecology/i.test(p)) {
|
|
157
|
+
return {
|
|
158
|
+
bg: '#07120e',
|
|
159
|
+
surface: '#0d1e17',
|
|
160
|
+
surfaceRaised: '#142a20',
|
|
161
|
+
border: 'rgba(52, 211, 153, 0.14)',
|
|
162
|
+
borderHover: 'rgba(52, 211, 153, 0.30)',
|
|
163
|
+
accent: '#34d399',
|
|
164
|
+
textPrimary: '#f0fdf4',
|
|
165
|
+
textMuted: '#9ca3af'
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (/sky|space|astro|orbit|telescope/i.test(p)) {
|
|
169
|
+
return {
|
|
170
|
+
bg: '#06070b',
|
|
171
|
+
surface: '#0d0f17',
|
|
172
|
+
surfaceRaised: '#151824',
|
|
173
|
+
border: 'rgba(129, 140, 248, 0.12)',
|
|
174
|
+
borderHover: 'rgba(129, 140, 248, 0.28)',
|
|
175
|
+
accent: '#818cf8',
|
|
176
|
+
textPrimary: '#f8fafc',
|
|
177
|
+
textMuted: '#94a3b8'
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
if (/dragon|myth|sanctuary/i.test(p)) {
|
|
181
|
+
return {
|
|
182
|
+
bg: '#0f0a08',
|
|
183
|
+
surface: '#1c1310',
|
|
184
|
+
surfaceRaised: '#281b16',
|
|
185
|
+
border: 'rgba(251, 146, 60, 0.14)',
|
|
186
|
+
borderHover: 'rgba(251, 146, 60, 0.30)',
|
|
187
|
+
accent: '#fb923c',
|
|
188
|
+
textPrimary: '#fff7ed',
|
|
189
|
+
textMuted: '#a8a29e'
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
bg: '#0a0d12',
|
|
194
|
+
surface: '#111620',
|
|
195
|
+
surfaceRaised: '#171e2c',
|
|
196
|
+
border: 'rgba(255, 255, 255, 0.08)',
|
|
197
|
+
borderHover: 'rgba(255, 255, 255, 0.18)',
|
|
198
|
+
accent: '#38bdf8',
|
|
199
|
+
textPrimary: '#f8fafc',
|
|
200
|
+
textMuted: '#94a3b8'
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|