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
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PIXEL CREW — Dynamic Project Planner & Task Graph Engine
|
|
2
|
+
* PIXEL CREW — Dynamic Prompt-Driven Project Planner & Task Graph Engine
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* 1.
|
|
6
|
-
* 2.
|
|
4
|
+
* Decomposes arbitrary user prompts from first principles into:
|
|
5
|
+
* 1. Semantic AST (Domain, Actors, Entities, Views, Operations, Interactive Workflows)
|
|
6
|
+
* 2. Requirement Contract (REQ-001..N with verifiable acceptance criteria)
|
|
7
|
+
* 3. Bespoke Design Specification (DesignEngine)
|
|
8
|
+
* 4. Dynamic Task Graph (DAG) with specialized agent role allocation
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
11
|
import { SkillRegistry } from './skills-registry.js';
|
|
12
|
+
import { SemanticEngine } from './semantic-engine.js';
|
|
13
|
+
import { RequirementContract } from './requirement-contract.js';
|
|
14
|
+
import { DesignEngine } from './design-engine.js';
|
|
15
|
+
import { TaskPlanner } from './task-planner.js';
|
|
10
16
|
|
|
11
17
|
export class DynamicPlanner {
|
|
12
18
|
constructor() {
|
|
@@ -14,316 +20,283 @@ export class DynamicPlanner {
|
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
|
-
* Step 1:
|
|
23
|
+
* Step 1: Semantic Requirement Analysis from User Prompt
|
|
18
24
|
*/
|
|
19
25
|
analyzeRequirements(prompt, options = {}) {
|
|
20
|
-
const
|
|
26
|
+
const rawPrompt = (prompt || '').trim();
|
|
27
|
+
const p = rawPrompt.toLowerCase();
|
|
21
28
|
|
|
22
|
-
// 1. Target Framework & Stack
|
|
29
|
+
// 1. Target Framework & Runtime Stack
|
|
23
30
|
let framework = options.targetFramework || 'nextjs';
|
|
24
31
|
if (p.includes('react') && !p.includes('next')) framework = 'react';
|
|
25
32
|
else if (p.includes('vue')) framework = 'vue';
|
|
26
33
|
else if (p.includes('vanilla')) framework = 'vanilla';
|
|
27
34
|
|
|
28
|
-
// 2.
|
|
29
|
-
|
|
30
|
-
if (p.includes('portfolio') || p.includes('resume') || p.includes('showcase my project') || p.includes('developer portfolio') || p.includes('personal site')) {
|
|
31
|
-
domain = 'portfolio';
|
|
32
|
-
} else if (p.includes('restaurant') || p.includes('culinary') || p.includes('dining') || p.includes('cafe') || p.includes('bistro') || p.includes('menu')) {
|
|
33
|
-
domain = 'restaurant';
|
|
34
|
-
} else if (p.includes('ecommerce') || p.includes('shop') || p.includes('store') || p.includes('product store') || p.includes('clothing')) {
|
|
35
|
-
domain = 'ecommerce';
|
|
36
|
-
} else if (p.includes('saas') || p.includes('platform') || p.includes('subscription') || p.includes('analytics') || p.includes('pricing calculator')) {
|
|
37
|
-
domain = 'saas';
|
|
38
|
-
} else if (p.includes('agency') || p.includes('studio') || p.includes('creative lab') || p.includes('design agency')) {
|
|
39
|
-
domain = 'agency';
|
|
40
|
-
} else if (p.includes('database') || p.includes('infra') || p.includes('developer tool') || p.includes('query') || p.includes('api engine')) {
|
|
41
|
-
domain = 'devtool';
|
|
42
|
-
}
|
|
35
|
+
// 2. Parse into full Semantic Project AST
|
|
36
|
+
const ast = SemanticEngine.parsePromptToAST(rawPrompt);
|
|
43
37
|
|
|
44
|
-
// 3.
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
// 4. Extract Entity / Project Name
|
|
48
|
-
let projectName = "Bespoke System";
|
|
49
|
-
let companyName = "Studio Artisan";
|
|
50
|
-
let roleOrSubtitle = "Modern Digital Platform";
|
|
51
|
-
let summary = "Engineered with intentional restraint and zero generic AI slop.";
|
|
38
|
+
// 3. Create verifiable Requirement Contract
|
|
39
|
+
const contract = new RequirementContract(ast);
|
|
52
40
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
roleOrSubtitle = "Modern Botanical Gastronomy & Tasting Lab";
|
|
62
|
-
summary = "Hyper-seasonal tasting menus driven by foraging, fermentation, and architectural plating.";
|
|
63
|
-
} else if (domain === 'ecommerce') {
|
|
64
|
-
projectName = "Minimalist Object Store";
|
|
65
|
-
companyName = "MONOLITH GOODS";
|
|
66
|
-
roleOrSubtitle = "Precision-Crafted Hardware & Studio Tools";
|
|
67
|
-
summary = "Industrial-grade design artifacts engineered for creators, architects, and minimalists.";
|
|
68
|
-
} else if (domain === 'saas' || domain === 'devtool') {
|
|
69
|
-
projectName = "High-Performance Data Infrastructure";
|
|
70
|
-
companyName = "VectorScale";
|
|
71
|
-
roleOrSubtitle = "Real-Time Telemetry & Vector Query Engine";
|
|
72
|
-
summary = "Sub-millisecond latency query routing and deterministic state coordination for autonomous AI swarms.";
|
|
73
|
-
} else if (domain === 'agency') {
|
|
74
|
-
projectName = "Kinetic Creative Studio";
|
|
75
|
-
companyName = "KITE CREATIVE";
|
|
76
|
-
roleOrSubtitle = "Design Engineering & Spatial Digital Systems";
|
|
77
|
-
summary = "We partner with visionary founders to build category-defining digital flagships and interactive products.";
|
|
78
|
-
}
|
|
41
|
+
// 4. Synthesize bespoke DesignSpec
|
|
42
|
+
const designSpec = DesignEngine.synthesizeDesignSpec(ast, rawPrompt);
|
|
43
|
+
|
|
44
|
+
// 5. Motion & Animation Intent
|
|
45
|
+
const hasAnimations = true;
|
|
46
|
+
|
|
47
|
+
// 6. Requested Interactive Features
|
|
48
|
+
const requestedFeatures = this.extractRequestedFeatures(p, ast);
|
|
79
49
|
|
|
80
50
|
return {
|
|
81
|
-
prompt,
|
|
82
|
-
domain,
|
|
51
|
+
prompt: rawPrompt,
|
|
52
|
+
domain: ast.domain,
|
|
83
53
|
framework,
|
|
84
54
|
hasAnimations,
|
|
85
|
-
projectName,
|
|
86
|
-
companyName,
|
|
87
|
-
roleOrSubtitle,
|
|
88
|
-
summary,
|
|
89
|
-
|
|
55
|
+
projectName: ast.appName,
|
|
56
|
+
companyName: ast.appName,
|
|
57
|
+
roleOrSubtitle: ast.headline,
|
|
58
|
+
summary: ast.summary,
|
|
59
|
+
ast,
|
|
60
|
+
contract,
|
|
61
|
+
designSpec,
|
|
62
|
+
entities: ast.entities,
|
|
63
|
+
views: ast.views,
|
|
64
|
+
operations: ast.operations,
|
|
65
|
+
requirements: ast.requirements,
|
|
66
|
+
metrics: this.synthesizeDynamicMetrics(ast.appName, p),
|
|
67
|
+
actions: this.synthesizeDynamicActions(p),
|
|
68
|
+
aestheticMood: 'bespoke',
|
|
69
|
+
palette: designSpec.color || ast.palette,
|
|
70
|
+
fonts: designSpec.typography || ast.fonts,
|
|
71
|
+
requestedFeatures
|
|
90
72
|
};
|
|
91
73
|
}
|
|
92
74
|
|
|
93
75
|
/**
|
|
94
|
-
* Helper: Extracts requested interactive
|
|
76
|
+
* Helper: Extracts requested interactive features
|
|
95
77
|
*/
|
|
96
|
-
extractRequestedFeatures(
|
|
78
|
+
extractRequestedFeatures(p, ast) {
|
|
97
79
|
const features = [];
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
features.push('project-filter-matrix', 'interactive-terminal-shell', 'career-timeline', 'contact-modal');
|
|
101
|
-
} else if (domain === 'restaurant') {
|
|
102
|
-
features.push('interactive-tasting-menu', 'table-reservation-modal', 'chef-curation-slider', 'hours-location-card');
|
|
103
|
-
} else if (domain === 'ecommerce') {
|
|
104
|
-
features.push('product-bento-grid', 'interactive-cart-drawer', 'currency-toggle', 'live-spec-sheet');
|
|
105
|
-
} else if (domain === 'saas' || domain === 'devtool') {
|
|
106
|
-
features.push('interactive-latency-calculator', 'code-sandbox-tabs', 'benchmark-comparison-matrix', 'pricing-tier-switcher');
|
|
107
|
-
} else {
|
|
108
|
-
features.push('asymmetric-showcase', 'interactive-feature-tabs', 'dynamic-contact-drawer');
|
|
80
|
+
if (p.includes('saas') || p.includes('dashboard')) {
|
|
81
|
+
features.push('saas-kpi-dashboard');
|
|
109
82
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
if (p.includes('portfolio') || p.includes('developer') || p.includes('showcase')) {
|
|
84
|
+
features.push('project-filter-matrix', 'interactive-terminal-shell');
|
|
85
|
+
}
|
|
86
|
+
if (p.includes('restaurant') || p.includes('tasting') || p.includes('dining') || p.includes('reservation')) {
|
|
87
|
+
features.push('interactive-tasting-menu', 'table-reservation-modal');
|
|
88
|
+
}
|
|
89
|
+
if (p.includes('login') || p.includes('auth') || p.includes('sign in') || p.includes('account')) {
|
|
90
|
+
features.push('auth-login-modal', 'jwt-session-management');
|
|
91
|
+
}
|
|
92
|
+
if (p.includes('pricing') || p.includes('tier') || p.includes('plan')) {
|
|
93
|
+
features.push('pricing-tier-switcher');
|
|
94
|
+
}
|
|
95
|
+
if (p.includes('search') || p.includes('filter') || p.includes('sort')) {
|
|
96
|
+
features.push('realtime-filter-search');
|
|
97
|
+
}
|
|
98
|
+
if (features.length === 0) {
|
|
99
|
+
features.push('domain-workspace', 'realtime-filter-search');
|
|
113
100
|
}
|
|
114
|
-
|
|
115
101
|
return features;
|
|
116
102
|
}
|
|
117
103
|
|
|
118
104
|
/**
|
|
119
|
-
*
|
|
105
|
+
* Helper: Synthesizes dynamic metrics
|
|
120
106
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
palette = {
|
|
146
|
-
bg: "#0c0b0a",
|
|
147
|
-
surface: "#141311",
|
|
148
|
-
surfaceRaised: "#1c1b18",
|
|
149
|
-
border: "rgba(217, 196, 163, 0.12)",
|
|
150
|
-
borderHover: "rgba(217, 196, 163, 0.35)",
|
|
151
|
-
textPrimary: "#f5f2eb",
|
|
152
|
-
textSecondary: "#a8a29e",
|
|
153
|
-
accent: "#d4af37",
|
|
154
|
-
accentGlow: "rgba(212, 175, 55, 0.15)"
|
|
155
|
-
};
|
|
156
|
-
fonts = {
|
|
157
|
-
display: "'Cormorant Garamond', Georgia, serif",
|
|
158
|
-
body: "'Plus Jakarta Sans', sans-serif",
|
|
159
|
-
mono: "'JetBrains Mono', monospace",
|
|
160
|
-
googleFontsUrl: "https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap"
|
|
161
|
-
};
|
|
162
|
-
} else if (domain === 'agency' || domain === 'portfolio') {
|
|
163
|
-
palette = {
|
|
164
|
-
bg: "#08090c",
|
|
165
|
-
surface: "#0f1117",
|
|
166
|
-
surfaceRaised: "#161922",
|
|
167
|
-
border: "rgba(255, 255, 255, 0.08)",
|
|
168
|
-
borderHover: "rgba(255, 255, 255, 0.3)",
|
|
169
|
-
textPrimary: "#ffffff",
|
|
170
|
-
textSecondary: "#9ca3af",
|
|
171
|
-
accent: "#10b981",
|
|
172
|
-
accentGlow: "rgba(16, 185, 129, 0.15)"
|
|
173
|
-
};
|
|
174
|
-
fonts = {
|
|
175
|
-
display: "'Instrument Serif', Georgia, serif",
|
|
176
|
-
body: "'Inter', -apple-system, sans-serif",
|
|
177
|
-
mono: "'JetBrains Mono', monospace",
|
|
178
|
-
googleFontsUrl: "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
|
|
179
|
-
};
|
|
107
|
+
synthesizeDynamicMetrics(subject, p) {
|
|
108
|
+
if (p.includes('orbit') || p.includes('rocket') || p.includes('space') || p.includes('mission')) {
|
|
109
|
+
return [
|
|
110
|
+
{ label: "Delta-V Budget", value: "3,840 m/s", change: "Optimal Margin", status: "optimal" },
|
|
111
|
+
{ label: "Altitude & Apogee", value: "542.8 km", change: "LEO Synchronous", status: "optimal" },
|
|
112
|
+
{ label: "Inclination Vector", value: "51.64°", change: "Nominal", status: "nominal" },
|
|
113
|
+
{ label: "Telemetry Link", value: "99.98%", change: "Ground Lock", status: "nominal" }
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
if (p.includes('legal') || p.includes('contract') || p.includes('clause') || p.includes('compliance')) {
|
|
117
|
+
return [
|
|
118
|
+
{ label: "Risk Index", value: "94.2 / 100", change: "Sub-10ms Inference", status: "optimal" },
|
|
119
|
+
{ label: "Compliance Score", value: "99.94%", change: "Strict Benchmark", status: "optimal" },
|
|
120
|
+
{ label: "Clauses Extracted", value: "1,480 / sec", change: "Zero Hallucination", status: "optimal" },
|
|
121
|
+
{ label: "Active Agreements", value: "482 Files", change: "Multi-Jurisdiction", status: "nominal" }
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
if (p.includes('audio') || p.includes('synth') || p.includes('midi') || p.includes('sound')) {
|
|
125
|
+
return [
|
|
126
|
+
{ label: "DSP Latency", value: "0.18 ms", change: "Zero Buffer Drop", status: "optimal" },
|
|
127
|
+
{ label: "Sample Processing", value: "192 kHz", change: "32-bit Float", status: "optimal" },
|
|
128
|
+
{ label: "Polyphony Voices", value: "64 Active", change: "Real-Time Parallel", status: "optimal" },
|
|
129
|
+
{ label: "Filter Headroom", value: "+18.4 dB", change: "Analog Modeled", status: "nominal" }
|
|
130
|
+
];
|
|
180
131
|
}
|
|
132
|
+
if (p.includes('real estate') || p.includes('property') || p.includes('mortgage') || p.includes('valuation')) {
|
|
133
|
+
return [
|
|
134
|
+
{ label: "Valuation Comps", value: "12,400 Comps", change: "Real-Time Index", status: "optimal" },
|
|
135
|
+
{ label: "Portfolio AUM", value: "$42.8M", change: "+12.4% Annualized", status: "optimal" },
|
|
136
|
+
{ label: "Average Cap Rate", value: "6.85%", change: "+45 bps vs Index", status: "optimal" },
|
|
137
|
+
{ label: "Confidence Score", value: "99.2%", change: "Hedonic Model", status: "optimal" }
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
return [
|
|
141
|
+
{ label: `${subject} Throughput`, value: "4.2M ops/s", change: "+18.4% p99", status: "optimal" },
|
|
142
|
+
{ label: "Query Latency", value: "0.48 ms", change: "Sub-millisecond", status: "optimal" },
|
|
143
|
+
{ label: "Active Nodes", value: "1,248 Nodes", change: "Multi-Region", status: "nominal" },
|
|
144
|
+
{ label: "Availability SLA", value: "99.999%", change: "Zero Downtime", status: "nominal" }
|
|
145
|
+
];
|
|
146
|
+
}
|
|
181
147
|
|
|
182
|
-
|
|
183
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Helper: Extracts dynamic user operations / actions
|
|
150
|
+
*/
|
|
151
|
+
synthesizeDynamicActions(p) {
|
|
152
|
+
return ['search-and-filter', 'execute-runtime-command', 'inspect-telemetry'];
|
|
153
|
+
}
|
|
184
154
|
|
|
185
|
-
|
|
186
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Step 2: Create Dynamic Project Specification
|
|
157
|
+
*/
|
|
158
|
+
createProjectSpecification(analysis) {
|
|
159
|
+
const {
|
|
160
|
+
prompt,
|
|
187
161
|
domain,
|
|
188
162
|
framework,
|
|
163
|
+
projectName,
|
|
189
164
|
companyName,
|
|
190
|
-
|
|
165
|
+
roleOrSubtitle,
|
|
191
166
|
summary,
|
|
192
|
-
|
|
167
|
+
ast,
|
|
168
|
+
contract,
|
|
169
|
+
designSpec,
|
|
170
|
+
entities,
|
|
171
|
+
views,
|
|
172
|
+
operations,
|
|
173
|
+
requirements,
|
|
174
|
+
metrics,
|
|
175
|
+
actions,
|
|
176
|
+
aestheticMood,
|
|
193
177
|
palette,
|
|
194
178
|
fonts,
|
|
195
|
-
requestedFeatures
|
|
179
|
+
requestedFeatures
|
|
180
|
+
} = analysis;
|
|
181
|
+
|
|
182
|
+
const sections = this.buildDynamicSectionTopology(ast, requestedFeatures, companyName, projectName, roleOrSubtitle, summary, domain);
|
|
183
|
+
|
|
184
|
+
return {
|
|
185
|
+
appName: companyName || projectName || 'Application',
|
|
186
|
+
companyName: companyName || projectName || 'Application',
|
|
187
|
+
projectName: projectName || 'Application',
|
|
188
|
+
domain: domain || 'software-system',
|
|
189
|
+
headline: roleOrSubtitle || `Unified Platform for ${projectName}`,
|
|
190
|
+
summary: summary || 'Engineered with open-world synthesis.',
|
|
191
|
+
targetFramework: framework,
|
|
196
192
|
sections,
|
|
193
|
+
palette,
|
|
194
|
+
fonts,
|
|
195
|
+
ast,
|
|
196
|
+
contract,
|
|
197
|
+
designSpec,
|
|
198
|
+
entities,
|
|
199
|
+
views,
|
|
200
|
+
operations,
|
|
201
|
+
requirements,
|
|
202
|
+
metrics,
|
|
203
|
+
actions,
|
|
204
|
+
aestheticMood,
|
|
205
|
+
requestedFeatures,
|
|
197
206
|
apiRoutes: [
|
|
198
|
-
{ path: 'src/app/api/
|
|
199
|
-
{ path: 'src/app/api/
|
|
200
|
-
|
|
207
|
+
{ path: 'src/app/api/auth/login/route.ts' },
|
|
208
|
+
{ path: 'src/app/api/dashboard/stats/route.ts' },
|
|
209
|
+
{ path: 'src/app/api/contact/route.ts' },
|
|
210
|
+
{ path: 'src/app/api/data/route.ts' }
|
|
211
|
+
],
|
|
212
|
+
rawPrompt: prompt
|
|
201
213
|
};
|
|
202
214
|
}
|
|
203
215
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
216
|
+
buildDynamicSectionTopology(ast, requestedFeatures, companyName, projectName, roleOrSubtitle, summary, domain) {
|
|
217
|
+
const sections = [
|
|
218
|
+
{
|
|
219
|
+
id: "header",
|
|
220
|
+
componentName: "PortalHeader",
|
|
221
|
+
role: "Persistent Navigation & Workspace Header",
|
|
222
|
+
stateful: false
|
|
223
|
+
}
|
|
224
|
+
];
|
|
225
|
+
|
|
208
226
|
if (domain === 'portfolio') {
|
|
209
|
-
|
|
210
|
-
{ id:
|
|
211
|
-
{ id:
|
|
212
|
-
|
|
213
|
-
{ id: 'terminal', component: 'TerminalBio', title: "Interactive Developer Shell", subtitle: "Type `skills`, `architecture`, `experience`, or `contact`" },
|
|
214
|
-
{ id: 'experience', component: 'ExperienceTimeline', title: "Career & Technical Milestones" },
|
|
215
|
-
{ id: 'contact', component: 'ContactSection', title: "Let's build something exceptional together.", email: "alex@example.com" }
|
|
216
|
-
];
|
|
227
|
+
sections.push(
|
|
228
|
+
{ id: "hero", component: "Hero", componentName: "Hero", role: "Masthead", stateful: false },
|
|
229
|
+
{ id: "projects", component: "ProjectsGrid", componentName: "ProjectsGrid", role: "Projects Showcase", stateful: true }
|
|
230
|
+
);
|
|
217
231
|
} else if (domain === 'restaurant') {
|
|
218
|
-
|
|
219
|
-
{ id:
|
|
220
|
-
{ id:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
232
|
+
sections.push(
|
|
233
|
+
{ id: "tasting", component: "TastingMenu", componentName: "TastingMenu", role: "Tasting Menu", stateful: true },
|
|
234
|
+
{ id: "reservation", component: "ReservationSection", componentName: "ReservationSection", role: "Reservation", stateful: true }
|
|
235
|
+
);
|
|
236
|
+
} else if (domain === 'saas' || requestedFeatures.includes('saas-kpi-dashboard')) {
|
|
237
|
+
sections.push(
|
|
238
|
+
{ id: "metrics", component: "DashboardMetrics", componentName: "DashboardMetrics", role: "Metrics & KPIs", stateful: true },
|
|
239
|
+
{ id: "auth", component: "AuthLoginModal", componentName: "AuthLoginModal", role: "Authentication Modal", stateful: true },
|
|
240
|
+
{ id: "pricing", component: "PricingMatrix", componentName: "PricingMatrix", role: "Pricing Matrix", stateful: true }
|
|
241
|
+
);
|
|
242
|
+
} else if (ast && Array.isArray(ast.views) && ast.views.length > 0) {
|
|
243
|
+
ast.views.forEach(v => {
|
|
244
|
+
sections.push({
|
|
245
|
+
id: v.id || v.componentName.toLowerCase(),
|
|
246
|
+
component: v.componentName,
|
|
247
|
+
componentName: v.componentName,
|
|
248
|
+
role: v.purpose || v.title,
|
|
249
|
+
stateful: true
|
|
250
|
+
});
|
|
251
|
+
});
|
|
225
252
|
} else {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
253
|
+
sections.push({
|
|
254
|
+
id: "workspace",
|
|
255
|
+
component: "DynamicWorkspace",
|
|
256
|
+
componentName: "DynamicWorkspace",
|
|
257
|
+
role: "Primary Domain Workspace",
|
|
258
|
+
stateful: true
|
|
259
|
+
});
|
|
233
260
|
}
|
|
261
|
+
|
|
262
|
+
return sections;
|
|
234
263
|
}
|
|
235
264
|
|
|
236
265
|
/**
|
|
237
|
-
* Step 3:
|
|
266
|
+
* Step 3: Dynamic Task Graph (DAG) Compilation
|
|
238
267
|
*/
|
|
239
268
|
createTaskGraph(spec) {
|
|
240
269
|
const tasks = [
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
{
|
|
251
|
-
id: 'task-design-director',
|
|
252
|
-
agentId: 'creativeDirector',
|
|
253
|
-
name: 'Visual Direction & Anti-AI Guardian Strategy',
|
|
254
|
-
task: `Formulate authentic visual personality, fluid clamp typography, and ban purple gradients & repetitive cards`,
|
|
255
|
-
skills: ['design/ui-design', 'design/typography', 'anti-ai/slop-guardian'],
|
|
256
|
-
dependsOn: ['task-plan'],
|
|
257
|
-
status: 'queued'
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
id: 'task-content-strategist',
|
|
261
|
-
agentId: 'contentStrategist',
|
|
262
|
-
name: 'Grounded Technical Copywriting & Domain Data',
|
|
263
|
-
task: `Author bespoke domain fixtures and technical value props with zero placeholder cliché copy`,
|
|
264
|
-
skills: ['content/copywriting', 'backend/data-models'],
|
|
265
|
-
dependsOn: ['task-plan'],
|
|
266
|
-
status: 'queued'
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
id: 'task-frontend-scaffold',
|
|
270
|
-
agentId: 'frontend',
|
|
271
|
-
name: 'Next.js 14/15 App Router Scaffolding & Root Layout',
|
|
272
|
-
task: `Synthesize package.json, tsconfig.json, tailwind.config.ts, src/app/layout.tsx, and globals.css`,
|
|
273
|
-
skills: ['frontend/nextjs', 'frontend/react', 'frontend/tailwind'],
|
|
274
|
-
dependsOn: ['task-design-director'],
|
|
275
|
-
status: 'queued'
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
id: 'task-frontend-components',
|
|
279
|
-
agentId: 'frontend',
|
|
280
|
-
name: 'Bespoke Asymmetric Section Components & Pages',
|
|
281
|
-
task: `Build src/app/page.tsx and all section components (${spec.sections.map(s => s.component).join(', ')})`,
|
|
282
|
-
skills: ['frontend/nextjs', 'frontend/react', 'design/ui-design'],
|
|
283
|
-
dependsOn: ['task-frontend-scaffold', 'task-content-strategist'],
|
|
284
|
-
status: 'queued'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
id: 'task-backend-routes',
|
|
288
|
-
agentId: 'backend',
|
|
289
|
-
name: 'TypeScript API Route Handlers & Data Contract',
|
|
290
|
-
task: `Synthesize src/app/api/contact/route.ts and src/app/api/data/route.ts with RFC 7807 validation`,
|
|
291
|
-
skills: ['backend/route-handlers', 'backend/data-models'],
|
|
292
|
-
dependsOn: ['task-frontend-scaffold'],
|
|
293
|
-
status: 'queued'
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
id: 'task-animation-motion',
|
|
297
|
-
agentId: 'animationSpecialist',
|
|
298
|
-
name: 'Framer Motion Transitions & Interactive Micro-Interactions',
|
|
299
|
-
task: `Add smooth reveal choreography, interactive category filtering, and terminal emulator logic`,
|
|
300
|
-
skills: ['motion/framer-motion', 'motion/micro-interactions'],
|
|
301
|
-
dependsOn: ['task-frontend-components'],
|
|
302
|
-
status: 'queued'
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
id: 'task-responsive-specialist',
|
|
306
|
-
agentId: 'responsiveSpecialist',
|
|
307
|
-
name: 'Responsive Viewport Optimization & Layout Integrity',
|
|
308
|
-
task: `Ensure zero horizontal scroll, fluid clamp() font scaling, and touch target sizing`,
|
|
309
|
-
skills: ['quality/responsive-design', 'frontend/accessibility'],
|
|
310
|
-
dependsOn: ['task-frontend-components'],
|
|
311
|
-
status: 'queued'
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
id: 'task-qa-visual-critic',
|
|
315
|
-
agentId: 'visualCritic',
|
|
316
|
-
name: 'Anti-AI Rubric Review & Build Verification',
|
|
317
|
-
task: `Audit generated codebase against 6-dimension Anti-AI rubric and verify final threshold >= 8.5/10`,
|
|
318
|
-
skills: ['quality/visual-review', 'quality/browser-testing'],
|
|
319
|
-
dependsOn: ['task-animation-motion', 'task-responsive-specialist', 'task-backend-routes'],
|
|
320
|
-
status: 'queued'
|
|
321
|
-
}
|
|
270
|
+
{ id: 'task-plan', name: 'Synthesize AST & Requirements', agentId: 'orchestrator', dependsOn: [], skills: ['open-world-synthesis'], status: 'queued' },
|
|
271
|
+
{ id: 'task-design-director', name: 'Artistic Direction & Negative Constraints', agentId: 'creativeDirector', dependsOn: ['task-plan'], skills: ['design-director'], status: 'queued' },
|
|
272
|
+
{ id: 'task-content-strategist', name: 'Copywriting & Content Topology', agentId: 'uxPlanner', dependsOn: ['task-plan'], skills: ['ux-architecture'], status: 'queued' },
|
|
273
|
+
{ id: 'task-frontend-scaffold', name: 'Design Tokens & Global CSS Layout', agentId: 'designSystem', dependsOn: ['task-design-director'], skills: ['design-tokens'], status: 'queued' },
|
|
274
|
+
{ id: 'task-backend-routes', name: 'API Routes & RFC 7807 Handlers', agentId: 'backend', dependsOn: ['task-frontend-scaffold'], skills: ['typescript-routes'], status: 'queued' },
|
|
275
|
+
{ id: 'task-frontend-components', name: 'Dynamic View Components Synthesis', agentId: 'frontend', dependsOn: ['task-content-strategist', 'task-frontend-scaffold'], skills: ['react-19'], status: 'queued' },
|
|
276
|
+
{ id: 'task-animation-motion', name: 'Fluid Motion & Micro-Interactions', agentId: 'frontend', dependsOn: ['task-frontend-components'], skills: ['framer-motion'], status: 'queued' },
|
|
277
|
+
{ id: 'task-responsive-specialist', name: 'Responsive Viewport Calibration', agentId: 'frontend', dependsOn: ['task-frontend-components'], skills: ['tailwind'], status: 'queued' },
|
|
278
|
+
{ id: 'task-qa-visual-critic', name: 'Impeccable Visual Quality Gate', agentId: 'qa', dependsOn: ['task-animation-motion', 'task-backend-routes', 'task-responsive-specialist'], skills: ['visual-critic'], status: 'queued' }
|
|
322
279
|
];
|
|
323
280
|
|
|
281
|
+
const agents = {
|
|
282
|
+
creativeDirector: { role: 'Creative Director', skills: ['design-director', 'anti-ai-patterns'] },
|
|
283
|
+
uxPlanner: { role: 'UX Planner', skills: ['ux-architecture', 'bento-layout'] },
|
|
284
|
+
designSystem: { role: 'Design System Architect', skills: ['design-tokens', 'fluid-typography'] },
|
|
285
|
+
frontend: { role: 'Frontend Engineer', skills: ['react-19', 'nextjs-app-router', 'tailwind'] },
|
|
286
|
+
backend: { role: 'Backend & API Engineer', skills: ['typescript-routes', 'rfc7807-errors'] },
|
|
287
|
+
database: { role: 'Database & Data Modeler', skills: ['data-fixtures', 'typescript-interfaces'] },
|
|
288
|
+
qa: { role: 'QA & Compliance Auditor', skills: ['requirement-validation', 'visual-critic'] }
|
|
289
|
+
};
|
|
290
|
+
|
|
324
291
|
return {
|
|
325
292
|
spec,
|
|
293
|
+
totalTasks: tasks.length,
|
|
294
|
+
agents,
|
|
326
295
|
tasks
|
|
327
296
|
};
|
|
328
297
|
}
|
|
298
|
+
|
|
299
|
+
compileTaskGraph(spec) {
|
|
300
|
+
return this.createTaskGraph(spec);
|
|
301
|
+
}
|
|
329
302
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Targeted Repair Planner
|
|
3
|
+
*
|
|
4
|
+
* Compiles precision repair tasks for failed requirements or visual critic defects
|
|
5
|
+
* without regenerating the entire repository. Enforces maximum repair limits.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const MAX_REPAIR_ITERATIONS = 3;
|
|
9
|
+
|
|
10
|
+
export class RepairPlanner {
|
|
11
|
+
/**
|
|
12
|
+
* Plan targeted repair tasks from validation and visual critic reports.
|
|
13
|
+
*/
|
|
14
|
+
static planRepairs({ validationResult, visualCriticResult, iteration = 1, files = {}, artifactGraph = null }) {
|
|
15
|
+
if (iteration > MAX_REPAIR_ITERATIONS) {
|
|
16
|
+
return {
|
|
17
|
+
canRepair: false,
|
|
18
|
+
status: 'needs-review',
|
|
19
|
+
iteration,
|
|
20
|
+
message: `Maximum repair iterations (${MAX_REPAIR_ITERATIONS}) reached. Manual review required.`,
|
|
21
|
+
repairTasks: []
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const repairTasks = [];
|
|
26
|
+
|
|
27
|
+
// 1. Requirement Failure Repairs
|
|
28
|
+
if (validationResult && Array.isArray(validationResult.auditReport)) {
|
|
29
|
+
const failedReqs = validationResult.auditReport.filter(r => r.status === 'FAIL' || r.status === 'PARTIAL');
|
|
30
|
+
failedReqs.forEach(req => {
|
|
31
|
+
repairTasks.push({
|
|
32
|
+
taskId: `REPAIR-${req.id}-iter${iteration}`,
|
|
33
|
+
role: req.category === 'api_endpoint' ? 'backend' : (req.category === 'data_model' ? 'database' : 'frontend'),
|
|
34
|
+
goal: `Repair and satisfy requirement ${req.id} (${req.target})`,
|
|
35
|
+
target: req.target,
|
|
36
|
+
reason: req.reason,
|
|
37
|
+
iteration
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 2. Visual Critic Defect Repairs
|
|
43
|
+
if (visualCriticResult && Array.isArray(visualCriticResult.findings)) {
|
|
44
|
+
const slopFindings = visualCriticResult.findings.filter(f => f.severity === 'high');
|
|
45
|
+
slopFindings.forEach((finding, idx) => {
|
|
46
|
+
repairTasks.push({
|
|
47
|
+
taskId: `REPAIR-SLOP-${idx + 1}-iter${iteration}`,
|
|
48
|
+
role: 'frontend',
|
|
49
|
+
goal: `Eliminate ${finding.rule} in ${finding.file}`,
|
|
50
|
+
target: finding.file,
|
|
51
|
+
reason: finding.evidence,
|
|
52
|
+
iteration
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const canRepair = repairTasks.length > 0;
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
canRepair,
|
|
61
|
+
status: canRepair ? 'in-progress' : 'complete',
|
|
62
|
+
iteration,
|
|
63
|
+
totalTasks: repairTasks.length,
|
|
64
|
+
repairTasks
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|