pixelcrew 0.2.2 → 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 +846 -0
- package/src/orchestrator/design-engine.js +203 -0
- package/src/orchestrator/engine.js +318 -39
- package/src/orchestrator/oneshot.js +351 -1561
- package/src/orchestrator/ontology.js +394 -0
- package/src/orchestrator/planner.js +302 -0
- 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/skills-registry.js +194 -0
- package/src/orchestrator/task-planner.js +111 -0
- package/src/orchestrator/task-queue.js +128 -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 +292 -42
- package/src/utils/fs-safe.js +168 -0
- package/src/utils/markdown-report.js +175 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Universal Software Ontology
|
|
3
|
+
*
|
|
4
|
+
* Defines the domain-agnostic primitives, grammatical contracts, and schemas of software architecture.
|
|
5
|
+
* The orchestrator owns the software synthesis process, NOT a catalog of application domains.
|
|
6
|
+
* The domain is runtime data.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const UNIVERSAL_CAPABILITIES = [
|
|
10
|
+
'search',
|
|
11
|
+
'filter',
|
|
12
|
+
'sort',
|
|
13
|
+
'create',
|
|
14
|
+
'edit',
|
|
15
|
+
'delete',
|
|
16
|
+
'view',
|
|
17
|
+
'schedule',
|
|
18
|
+
'calculate',
|
|
19
|
+
'simulate',
|
|
20
|
+
'compare',
|
|
21
|
+
'upload',
|
|
22
|
+
'download',
|
|
23
|
+
'export',
|
|
24
|
+
'authenticate',
|
|
25
|
+
'authorize',
|
|
26
|
+
'approve',
|
|
27
|
+
'reject',
|
|
28
|
+
'assign',
|
|
29
|
+
'track',
|
|
30
|
+
'visualize',
|
|
31
|
+
'collaborate',
|
|
32
|
+
'notify',
|
|
33
|
+
'archive',
|
|
34
|
+
'restore'
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export const LAYOUT_PRIMITIVES = {
|
|
38
|
+
STACK: 'stack',
|
|
39
|
+
SPLIT: 'split',
|
|
40
|
+
GRID: 'grid',
|
|
41
|
+
OVERLAY: 'overlay',
|
|
42
|
+
WORKSPACE: 'workspace',
|
|
43
|
+
SIDEBAR: 'sidebar',
|
|
44
|
+
INSPECTOR: 'inspector',
|
|
45
|
+
CANVAS: 'canvas',
|
|
46
|
+
TIMELINE: 'timeline',
|
|
47
|
+
SEQUENCE: 'sequence',
|
|
48
|
+
NESTED: 'nested',
|
|
49
|
+
FREEFORM: 'freeform'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const UI_PRIMITIVES = {
|
|
53
|
+
COLLECTION: 'collection',
|
|
54
|
+
TABLE: 'table',
|
|
55
|
+
FORM: 'form',
|
|
56
|
+
TIMELINE: 'timeline',
|
|
57
|
+
CALENDAR: 'calendar',
|
|
58
|
+
BOARD: 'board',
|
|
59
|
+
CANVAS: 'canvas',
|
|
60
|
+
INSPECTOR: 'inspector',
|
|
61
|
+
WORKSPACE: 'workspace',
|
|
62
|
+
MODAL: 'modal',
|
|
63
|
+
DRAWER: 'drawer',
|
|
64
|
+
SEARCH: 'search',
|
|
65
|
+
FILTER: 'filter',
|
|
66
|
+
PAGINATION: 'pagination',
|
|
67
|
+
VISUALIZATION: 'visualization'
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const OPERATION_METHODS = {
|
|
71
|
+
GET: 'GET',
|
|
72
|
+
POST: 'POST',
|
|
73
|
+
PUT: 'PUT',
|
|
74
|
+
PATCH: 'PATCH',
|
|
75
|
+
DELETE: 'DELETE'
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const REQUIREMENT_CATEGORIES = {
|
|
79
|
+
WORKFLOW: 'workflow',
|
|
80
|
+
UI_COMPONENT: 'ui_component',
|
|
81
|
+
API_ENDPOINT: 'api_endpoint',
|
|
82
|
+
DATA_MODEL: 'data_model',
|
|
83
|
+
SECURITY: 'security',
|
|
84
|
+
PERFORMANCE: 'performance',
|
|
85
|
+
DESIGN_QUALITY: 'design_quality'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export class UniversalSoftwareOntology {
|
|
89
|
+
/**
|
|
90
|
+
* Validate & Normalize Project Definition
|
|
91
|
+
*/
|
|
92
|
+
static validateProject(project) {
|
|
93
|
+
if (!project || typeof project !== 'object') {
|
|
94
|
+
throw new Error('Project definition must be a valid object.');
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
name: String(project.name || 'Universal Application').trim(),
|
|
98
|
+
description: String(project.description || 'Open-world synthesized software application').trim(),
|
|
99
|
+
domain: String(project.domain || 'general-software').toLowerCase().replace(/[^a-z0-9]+/g, '-'),
|
|
100
|
+
goals: Array.isArray(project.goals) ? project.goals.map(String) : []
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Validate & Normalize Actor Definition
|
|
106
|
+
*/
|
|
107
|
+
static validateActor(actor, index = 0) {
|
|
108
|
+
if (!actor || typeof actor !== 'object') {
|
|
109
|
+
return {
|
|
110
|
+
id: `actor-${index + 1}`,
|
|
111
|
+
name: 'User',
|
|
112
|
+
role: 'Primary Operator',
|
|
113
|
+
capabilities: ['view', 'create', 'search'],
|
|
114
|
+
permissions: ['read', 'write']
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const name = String(actor.name || `Actor ${index + 1}`).trim();
|
|
118
|
+
const id = actor.id || `actor-${name.toLowerCase().replace(/[^a-z0-9]+/g, '-') || (index + 1)}`;
|
|
119
|
+
return {
|
|
120
|
+
id,
|
|
121
|
+
name,
|
|
122
|
+
role: String(actor.role || name).trim(),
|
|
123
|
+
capabilities: Array.isArray(actor.capabilities) ? actor.capabilities.map(String) : ['view', 'search'],
|
|
124
|
+
permissions: Array.isArray(actor.permissions) ? actor.permissions.map(String) : ['read']
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Validate & Normalize Entity Definition
|
|
130
|
+
*/
|
|
131
|
+
static validateEntity(entity, index = 0) {
|
|
132
|
+
if (!entity || typeof entity !== 'object' || !entity.name) {
|
|
133
|
+
throw new Error(`Entity at index ${index} must have a valid string name.`);
|
|
134
|
+
}
|
|
135
|
+
const cleanName = String(entity.name).replace(/[^a-zA-Z0-9]/g, '');
|
|
136
|
+
if (!cleanName) {
|
|
137
|
+
throw new Error(`Entity name '${entity.name}' contains no alphanumeric characters.`);
|
|
138
|
+
}
|
|
139
|
+
const id = entity.id || `entity-${cleanName.toLowerCase()}`;
|
|
140
|
+
const title = entity.title || cleanName;
|
|
141
|
+
const plural = String(entity.plural || `${cleanName}s`).trim();
|
|
142
|
+
const description = String(entity.description || `Domain entity representing ${cleanName}`).trim();
|
|
143
|
+
|
|
144
|
+
const fields = Array.isArray(entity.fields) && entity.fields.length > 0
|
|
145
|
+
? entity.fields.map((f, fi) => this.normalizeField(f, fi))
|
|
146
|
+
: [
|
|
147
|
+
{ name: 'id', type: 'string', required: true, label: 'ID', sampleValue: `${id}-001` },
|
|
148
|
+
{ name: 'name', type: 'string', required: true, label: 'Name', sampleValue: `Sample ${cleanName}` },
|
|
149
|
+
{ name: 'status', type: 'string', required: false, label: 'Status', sampleValue: 'Active' },
|
|
150
|
+
{ name: 'createdAt', type: 'datetime', required: true, label: 'Created At', sampleValue: '2026-08-31T00:00:00.000Z' }
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
const relationships = Array.isArray(entity.relationships)
|
|
154
|
+
? entity.relationships.map(r => this.normalizeRelationship(r, cleanName))
|
|
155
|
+
: [];
|
|
156
|
+
|
|
157
|
+
const constraints = Array.isArray(entity.constraints) ? entity.constraints.map(String) : [];
|
|
158
|
+
const seedData = Array.isArray(entity.seedData) ? entity.seedData : [];
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
id,
|
|
162
|
+
name: cleanName,
|
|
163
|
+
title,
|
|
164
|
+
plural,
|
|
165
|
+
description,
|
|
166
|
+
fields,
|
|
167
|
+
relationships,
|
|
168
|
+
constraints,
|
|
169
|
+
seedData
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Normalize an individual Field definition
|
|
175
|
+
*/
|
|
176
|
+
static normalizeField(field, index = 0) {
|
|
177
|
+
if (typeof field === 'string') {
|
|
178
|
+
const isNum = /(count|price|depth|size|age|rating|score|amount|total|latitude|longitude|index|duration|tokens|ms|speed)/i.test(field);
|
|
179
|
+
const isDate = /(date|time|at|created|updated|scheduled|timestamp)/i.test(field);
|
|
180
|
+
const isBool = /(is|has|enabled|active|completed|verified)/i.test(field);
|
|
181
|
+
const type = field === 'id' ? 'string' : (isNum ? 'number' : (isDate ? 'datetime' : (isBool ? 'boolean' : 'string')));
|
|
182
|
+
return {
|
|
183
|
+
name: field,
|
|
184
|
+
type,
|
|
185
|
+
required: field === 'id' || field === 'name',
|
|
186
|
+
label: field.charAt(0).toUpperCase() + field.slice(1).replace(/([A-Z])/g, ' $1'),
|
|
187
|
+
sampleValue: isNum ? 100 : (isDate ? '2026-08-31T12:00:00.000Z' : (isBool ? true : `Sample ${field}`))
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
const name = String(field.name || `field_${index + 1}`).trim();
|
|
191
|
+
const type = String(field.type || 'string').toLowerCase();
|
|
192
|
+
const required = Boolean(field.required ?? (name === 'id' || name === 'name'));
|
|
193
|
+
const label = String(field.label || name.charAt(0).toUpperCase() + name.slice(1)).trim();
|
|
194
|
+
let sampleValue = field.sampleValue;
|
|
195
|
+
if (sampleValue === undefined) {
|
|
196
|
+
if (type === 'number') sampleValue = 42;
|
|
197
|
+
else if (type === 'boolean') sampleValue = true;
|
|
198
|
+
else if (type === 'datetime') sampleValue = '2026-08-31T12:00:00.000Z';
|
|
199
|
+
else sampleValue = `Sample ${label}`;
|
|
200
|
+
}
|
|
201
|
+
return {
|
|
202
|
+
name,
|
|
203
|
+
type,
|
|
204
|
+
required,
|
|
205
|
+
label,
|
|
206
|
+
sampleValue
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Normalize an Entity Relationship
|
|
212
|
+
*/
|
|
213
|
+
static normalizeRelationship(rel, sourceEntity) {
|
|
214
|
+
if (typeof rel === 'string') {
|
|
215
|
+
return {
|
|
216
|
+
type: 'belongsTo',
|
|
217
|
+
targetEntity: rel.replace(/[^a-zA-Z0-9]/g, ''),
|
|
218
|
+
foreignKey: `${rel.toLowerCase()}Id`
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return {
|
|
222
|
+
type: rel.type || 'hasMany',
|
|
223
|
+
targetEntity: String(rel.targetEntity || rel.target || 'Entity').replace(/[^a-zA-Z0-9]/g, ''),
|
|
224
|
+
foreignKey: rel.foreignKey || (rel.type === 'belongsTo' ? `${(rel.targetEntity || 'entity').toLowerCase()}Id` : undefined),
|
|
225
|
+
cardinality: rel.cardinality || (rel.type === 'hasMany' ? '1:N' : 'N:1')
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Validate & Normalize Workflow Definition
|
|
231
|
+
*/
|
|
232
|
+
static validateWorkflow(wf, index = 0) {
|
|
233
|
+
if (!wf || typeof wf !== 'object') {
|
|
234
|
+
return {
|
|
235
|
+
id: `workflow-${index + 1}`,
|
|
236
|
+
name: `Workflow ${index + 1}`,
|
|
237
|
+
actor: 'User',
|
|
238
|
+
trigger: 'Manual Action',
|
|
239
|
+
steps: ['Initiate', 'Process', 'Complete'],
|
|
240
|
+
outcome: 'Completed'
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
const name = String(wf.name || `Workflow ${index + 1}`).trim();
|
|
244
|
+
const id = wf.id || `workflow-${name.toLowerCase().replace(/[^a-z0-9]+/g, '-') || (index + 1)}`;
|
|
245
|
+
return {
|
|
246
|
+
id,
|
|
247
|
+
name,
|
|
248
|
+
actor: String(wf.actor || 'User').trim(),
|
|
249
|
+
trigger: String(wf.trigger || 'Action Triggered').trim(),
|
|
250
|
+
steps: Array.isArray(wf.steps) ? wf.steps.map(String) : ['Execute action', 'Record state'],
|
|
251
|
+
outcome: String(wf.outcome || 'Workflow completed').trim()
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Validate & Normalize View Definition
|
|
257
|
+
*/
|
|
258
|
+
static validateView(view, entities = [], index = 0) {
|
|
259
|
+
if (!view || typeof view !== 'object') {
|
|
260
|
+
const fallbackEntity = entities[0] ? entities[0].name : 'Item';
|
|
261
|
+
return {
|
|
262
|
+
id: `view-${index + 1}`,
|
|
263
|
+
componentName: `${fallbackEntity}Overview`,
|
|
264
|
+
title: `${fallbackEntity} Overview`,
|
|
265
|
+
purpose: `Browse and manage ${fallbackEntity} records`,
|
|
266
|
+
targetEntities: [fallbackEntity],
|
|
267
|
+
layout: { type: LAYOUT_PRIMITIVES.GRID, density: 'comfortable' },
|
|
268
|
+
regions: [
|
|
269
|
+
{ role: 'navigation', components: ['search', 'filter'] },
|
|
270
|
+
{ role: 'content', components: ['collection'] }
|
|
271
|
+
],
|
|
272
|
+
capabilities: ['search', 'filter', 'view']
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
const rawTitle = String(view.title || view.name || `View ${index + 1}`).trim();
|
|
276
|
+
const cleanComp = (view.componentName || rawTitle).replace(/[^a-zA-Z0-9]/g, '');
|
|
277
|
+
const componentName = cleanComp.charAt(0).toUpperCase() + cleanComp.slice(1) || `DynamicView${index + 1}`;
|
|
278
|
+
const id = view.id || `view-${componentName.toLowerCase()}`;
|
|
279
|
+
const targetEntities = Array.isArray(view.targetEntities) && view.targetEntities.length > 0
|
|
280
|
+
? view.targetEntities.map(e => String(e).replace(/[^a-zA-Z0-9]/g, ''))
|
|
281
|
+
: (view.targetEntity ? [String(view.targetEntity).replace(/[^a-zA-Z0-9]/g, '')] : (entities[0] ? [entities[0].name] : ['System']));
|
|
282
|
+
|
|
283
|
+
const layout = typeof view.layout === 'object' && view.layout !== null
|
|
284
|
+
? view.layout
|
|
285
|
+
: { type: LAYOUT_PRIMITIVES.GRID, density: 'comfortable' };
|
|
286
|
+
|
|
287
|
+
const regions = Array.isArray(view.regions) ? view.regions : [
|
|
288
|
+
{ role: 'navigation', components: ['search', 'filter'] },
|
|
289
|
+
{ role: 'content', components: ['collection'] }
|
|
290
|
+
];
|
|
291
|
+
|
|
292
|
+
const capabilities = Array.isArray(view.capabilities) ? view.capabilities.map(String) : ['view', 'search', 'filter'];
|
|
293
|
+
|
|
294
|
+
return {
|
|
295
|
+
id,
|
|
296
|
+
componentName,
|
|
297
|
+
title: rawTitle,
|
|
298
|
+
purpose: String(view.purpose || `Interactive interface for ${rawTitle}`).trim(),
|
|
299
|
+
targetEntities,
|
|
300
|
+
layout,
|
|
301
|
+
regions,
|
|
302
|
+
capabilities
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Validate & Normalize Operation Definition
|
|
308
|
+
*/
|
|
309
|
+
static validateOperation(op, entities = [], index = 0) {
|
|
310
|
+
if (!op || typeof op !== 'object') {
|
|
311
|
+
const ent = entities[0] ? entities[0].name : 'Resource';
|
|
312
|
+
return {
|
|
313
|
+
id: `operation-${index + 1}`,
|
|
314
|
+
path: `/api/${ent.toLowerCase()}s`,
|
|
315
|
+
method: OPERATION_METHODS.GET,
|
|
316
|
+
description: `List ${ent} records`,
|
|
317
|
+
targetEntity: ent,
|
|
318
|
+
requestFields: [],
|
|
319
|
+
responseFields: [],
|
|
320
|
+
authorization: 'none'
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
const path = String(op.path || '/api/resource').startsWith('/') ? String(op.path || '/api/resource') : `/${op.path}`;
|
|
324
|
+
const method = Object.values(OPERATION_METHODS).includes(String(op.method).toUpperCase())
|
|
325
|
+
? String(op.method).toUpperCase()
|
|
326
|
+
: OPERATION_METHODS.GET;
|
|
327
|
+
const targetEntity = String(op.targetEntity || (entities[0] ? entities[0].name : 'Entity')).replace(/[^a-zA-Z0-9]/g, '');
|
|
328
|
+
const id = op.id || `op-${method.toLowerCase()}-${path.replace(/[^a-zA-Z0-9]/g, '-')}`;
|
|
329
|
+
|
|
330
|
+
return {
|
|
331
|
+
id,
|
|
332
|
+
path,
|
|
333
|
+
method,
|
|
334
|
+
description: String(op.description || `Execute ${method} on ${path}`).trim(),
|
|
335
|
+
targetEntity,
|
|
336
|
+
requestFields: Array.isArray(op.requestFields) ? op.requestFields.map(String) : [],
|
|
337
|
+
responseFields: Array.isArray(op.responseFields) ? op.responseFields.map(String) : [],
|
|
338
|
+
authorization: String(op.authorization || 'none')
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Validate & Normalize Event Definition
|
|
344
|
+
*/
|
|
345
|
+
static validateEvent(evt, index = 0) {
|
|
346
|
+
if (!evt || typeof evt !== 'object') {
|
|
347
|
+
return {
|
|
348
|
+
id: `event-${index + 1}`,
|
|
349
|
+
name: `Event${index + 1}`,
|
|
350
|
+
source: 'System',
|
|
351
|
+
payload: { timestamp: 'datetime' },
|
|
352
|
+
consumers: ['AuditLogger']
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const name = String(evt.name || `Event${index + 1}`).replace(/[^a-zA-Z0-9]/g, '');
|
|
356
|
+
return {
|
|
357
|
+
id: evt.id || `event-${name.toLowerCase()}`,
|
|
358
|
+
name,
|
|
359
|
+
source: String(evt.source || 'System').trim(),
|
|
360
|
+
payload: typeof evt.payload === 'object' && evt.payload !== null ? evt.payload : {},
|
|
361
|
+
consumers: Array.isArray(evt.consumers) ? evt.consumers.map(String) : []
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Validate & Normalize Requirement Definition
|
|
367
|
+
*/
|
|
368
|
+
static validateRequirement(req, index = 0) {
|
|
369
|
+
if (!req || typeof req !== 'object') {
|
|
370
|
+
return {
|
|
371
|
+
id: `REQ-${String(index + 1).padStart(3, '0')}`,
|
|
372
|
+
category: REQUIREMENT_CATEGORIES.WORKFLOW,
|
|
373
|
+
target: 'system',
|
|
374
|
+
description: 'System requirement',
|
|
375
|
+
acceptanceCriteria: ['Requirement fulfilled'],
|
|
376
|
+
priority: 'high'
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
const id = req.id || `REQ-${String(index + 1).padStart(3, '0')}`;
|
|
380
|
+
const category = Object.values(REQUIREMENT_CATEGORIES).includes(req.category)
|
|
381
|
+
? req.category
|
|
382
|
+
: REQUIREMENT_CATEGORIES.WORKFLOW;
|
|
383
|
+
return {
|
|
384
|
+
id,
|
|
385
|
+
category,
|
|
386
|
+
target: String(req.target || 'system').trim(),
|
|
387
|
+
description: String(req.description || `Requirement ${id}`).trim(),
|
|
388
|
+
acceptanceCriteria: Array.isArray(req.acceptanceCriteria) && req.acceptanceCriteria.length > 0
|
|
389
|
+
? req.acceptanceCriteria.map(String)
|
|
390
|
+
: ['Functionality implemented and verified'],
|
|
391
|
+
priority: ['critical', 'high', 'medium', 'low'].includes(req.priority) ? req.priority : 'high'
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Dynamic Prompt-Driven Project Planner & Task Graph Engine
|
|
3
|
+
*
|
|
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
|
|
9
|
+
*/
|
|
10
|
+
|
|
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';
|
|
16
|
+
|
|
17
|
+
export class DynamicPlanner {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.skillRegistry = new SkillRegistry();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Step 1: Semantic Requirement Analysis from User Prompt
|
|
24
|
+
*/
|
|
25
|
+
analyzeRequirements(prompt, options = {}) {
|
|
26
|
+
const rawPrompt = (prompt || '').trim();
|
|
27
|
+
const p = rawPrompt.toLowerCase();
|
|
28
|
+
|
|
29
|
+
// 1. Target Framework & Runtime Stack
|
|
30
|
+
let framework = options.targetFramework || 'nextjs';
|
|
31
|
+
if (p.includes('react') && !p.includes('next')) framework = 'react';
|
|
32
|
+
else if (p.includes('vue')) framework = 'vue';
|
|
33
|
+
else if (p.includes('vanilla')) framework = 'vanilla';
|
|
34
|
+
|
|
35
|
+
// 2. Parse into full Semantic Project AST
|
|
36
|
+
const ast = SemanticEngine.parsePromptToAST(rawPrompt);
|
|
37
|
+
|
|
38
|
+
// 3. Create verifiable Requirement Contract
|
|
39
|
+
const contract = new RequirementContract(ast);
|
|
40
|
+
|
|
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);
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
prompt: rawPrompt,
|
|
52
|
+
domain: ast.domain,
|
|
53
|
+
framework,
|
|
54
|
+
hasAnimations,
|
|
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
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Helper: Extracts requested interactive features
|
|
77
|
+
*/
|
|
78
|
+
extractRequestedFeatures(p, ast) {
|
|
79
|
+
const features = [];
|
|
80
|
+
if (p.includes('saas') || p.includes('dashboard')) {
|
|
81
|
+
features.push('saas-kpi-dashboard');
|
|
82
|
+
}
|
|
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');
|
|
100
|
+
}
|
|
101
|
+
return features;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Helper: Synthesizes dynamic metrics
|
|
106
|
+
*/
|
|
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
|
+
];
|
|
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
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Helper: Extracts dynamic user operations / actions
|
|
150
|
+
*/
|
|
151
|
+
synthesizeDynamicActions(p) {
|
|
152
|
+
return ['search-and-filter', 'execute-runtime-command', 'inspect-telemetry'];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Step 2: Create Dynamic Project Specification
|
|
157
|
+
*/
|
|
158
|
+
createProjectSpecification(analysis) {
|
|
159
|
+
const {
|
|
160
|
+
prompt,
|
|
161
|
+
domain,
|
|
162
|
+
framework,
|
|
163
|
+
projectName,
|
|
164
|
+
companyName,
|
|
165
|
+
roleOrSubtitle,
|
|
166
|
+
summary,
|
|
167
|
+
ast,
|
|
168
|
+
contract,
|
|
169
|
+
designSpec,
|
|
170
|
+
entities,
|
|
171
|
+
views,
|
|
172
|
+
operations,
|
|
173
|
+
requirements,
|
|
174
|
+
metrics,
|
|
175
|
+
actions,
|
|
176
|
+
aestheticMood,
|
|
177
|
+
palette,
|
|
178
|
+
fonts,
|
|
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,
|
|
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,
|
|
206
|
+
apiRoutes: [
|
|
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
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
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
|
+
|
|
226
|
+
if (domain === 'portfolio') {
|
|
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
|
+
);
|
|
231
|
+
} else if (domain === 'restaurant') {
|
|
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
|
+
});
|
|
252
|
+
} else {
|
|
253
|
+
sections.push({
|
|
254
|
+
id: "workspace",
|
|
255
|
+
component: "DynamicWorkspace",
|
|
256
|
+
componentName: "DynamicWorkspace",
|
|
257
|
+
role: "Primary Domain Workspace",
|
|
258
|
+
stateful: true
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return sections;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Step 3: Dynamic Task Graph (DAG) Compilation
|
|
267
|
+
*/
|
|
268
|
+
createTaskGraph(spec) {
|
|
269
|
+
const tasks = [
|
|
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' }
|
|
279
|
+
];
|
|
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
|
+
|
|
291
|
+
return {
|
|
292
|
+
spec,
|
|
293
|
+
totalTasks: tasks.length,
|
|
294
|
+
agents,
|
|
295
|
+
tasks
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
compileTaskGraph(spec) {
|
|
300
|
+
return this.createTaskGraph(spec);
|
|
301
|
+
}
|
|
302
|
+
}
|