pixelcrew 0.2.3 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +389 -315
- package/bin/pixel-agents.js +306 -149
- package/package.json +3 -1
- package/skill/SKILL.md +185 -0
- package/skill/references/anti-ai-rubric.md +30 -0
- package/skill/references/anti-ai-slop-encyclopedia.md +181 -0
- package/skill/references/commands-reference.md +135 -0
- package/skill/references/testing-and-qa-strategy.md +25 -0
- package/skill/references/token-efficiency.md +20 -0
- package/src/adapters/adapter.interface.js +77 -0
- package/src/adapters/antigravity.js +138 -0
- package/src/adapters/claude-code.js +149 -0
- package/src/adapters/codex.js +131 -0
- package/src/adapters/cursor.js +133 -0
- package/src/adapters/generic.js +63 -0
- package/src/adapters/index.js +15 -0
- package/src/adapters/kiro.js +134 -0
- package/src/adapters/registry.js +150 -0
- package/src/backend/analyzer/complexity-analyzer.js +104 -0
- package/src/backend/analyzer/requirement-analyzer.js +213 -0
- package/src/backend/analyzer/threat-analyzer.js +122 -0
- package/src/backend/api/api-designer.js +90 -0
- package/src/backend/api/error-contract.js +132 -0
- package/src/backend/api/route-generator.js +92 -0
- package/src/backend/api/schema-generator.js +64 -0
- package/src/backend/architecture/adr-generator.js +62 -0
- package/src/backend/architecture/architecture-reasoner.js +119 -0
- package/src/backend/architecture/architecture-selector.js +57 -0
- package/src/backend/architecture/tradeoff-analyzer.js +92 -0
- package/src/backend/data/data-modeler.js +114 -0
- package/src/backend/data/index-analyzer.js +93 -0
- package/src/backend/data/query-analyzer.js +41 -0
- package/src/backend/data/schema-generator.js +92 -0
- package/src/backend/data/transaction-analyzer.js +49 -0
- package/src/backend/index.js +67 -0
- package/src/backend/observability/logging-engine.js +80 -0
- package/src/backend/observability/metrics-engine.js +31 -0
- package/src/backend/observability/tracing-engine.js +16 -0
- package/src/backend/patterns/pattern-registry.js +74 -0
- package/src/backend/patterns/pattern-selector.js +39 -0
- package/src/backend/patterns/tradeoff-engine.js +17 -0
- package/src/backend/performance/cache-analyzer.js +31 -0
- package/src/backend/performance/concurrency-analyzer.js +34 -0
- package/src/backend/performance/performance-engine.js +98 -0
- package/src/backend/performance/query-optimizer.js +16 -0
- package/src/backend/reliability/failure-analyzer.js +22 -0
- package/src/backend/reliability/idempotency-engine.js +56 -0
- package/src/backend/reliability/resilience-engine.js +141 -0
- package/src/backend/reliability/retry-analyzer.js +15 -0
- package/src/backend/security/auth-selector.js +33 -0
- package/src/backend/security/authorization-engine.js +90 -0
- package/src/backend/security/policy-engine.js +49 -0
- package/src/backend/security/secret-analyzer.js +39 -0
- package/src/backend/security/security-engine.js +122 -0
- package/src/backend/security/threat-model.js +59 -0
- package/src/backend/synthesis/backend-synthesizer.js +98 -0
- package/src/backend/synthesis/infrastructure-synthesizer.js +108 -0
- package/src/backend/synthesis/module-synthesizer.js +262 -0
- package/src/backend/validation/architecture-validator.js +70 -0
- package/src/backend/validation/backend-quality-validator.js +71 -0
- package/src/backend/validation/dependency-validator.js +20 -0
- package/src/backend/validation/performance-validator.js +38 -0
- package/src/backend/validation/security-validator.js +73 -0
- package/src/commands/adapt.js +105 -0
- package/src/commands/add.js +78 -0
- package/src/commands/animate.js +48 -0
- package/src/commands/assemble.js +57 -0
- package/src/commands/audit.js +93 -0
- package/src/commands/backend.js +125 -0
- package/src/commands/bento.js +25 -0
- package/src/commands/blueprint.js +65 -0
- package/src/commands/bolder.js +48 -0
- package/src/commands/boss-fight.js +60 -0
- package/src/commands/build.js +39 -0
- package/src/commands/calibrate.js +25 -0
- package/src/commands/chromatic.js +25 -0
- package/src/commands/clarify.js +52 -0
- package/src/commands/colorize.js +57 -0
- package/src/commands/command.interface.js +28 -0
- package/src/commands/commands.js +84 -0
- package/src/commands/craft.js +57 -0
- package/src/commands/crew.js +66 -0
- package/src/commands/critique.js +25 -0
- package/src/commands/de-slop.js +25 -0
- package/src/commands/delight.js +46 -0
- package/src/commands/deploy.js +42 -0
- package/src/commands/distill.js +48 -0
- package/src/commands/doctor.js +89 -0
- package/src/commands/document.js +83 -0
- package/src/commands/eight-bit.js +25 -0
- package/src/commands/extract.js +75 -0
- package/src/commands/fix.js +46 -0
- package/src/commands/harden.js +85 -0
- package/src/commands/index.js +67 -0
- package/src/commands/install.js +75 -0
- package/src/commands/layout.js +48 -0
- package/src/commands/live.js +44 -0
- package/src/commands/manifest.js +25 -0
- package/src/commands/office.js +25 -0
- package/src/commands/onboard.js +46 -0
- package/src/commands/oneshot.js +60 -0
- package/src/commands/optimize.js +46 -0
- package/src/commands/overdrive.js +46 -0
- package/src/commands/parser.js +143 -0
- package/src/commands/pixelcrew.js +96 -0
- package/src/commands/plan.js +66 -0
- package/src/commands/polish.js +45 -0
- package/src/commands/quieter.js +48 -0
- package/src/commands/recap.js +358 -0
- package/src/commands/registry.js +353 -0
- package/src/commands/render.js +26 -0
- package/src/commands/retrofit.js +25 -0
- package/src/commands/review.js +118 -0
- package/src/commands/roster.js +25 -0
- package/src/commands/sentinel.js +25 -0
- package/src/commands/shape.js +66 -0
- package/src/commands/skills.js +57 -0
- package/src/commands/status.js +48 -0
- package/src/commands/stop.js +50 -0
- package/src/commands/sync.js +58 -0
- package/src/commands/typeset.js +58 -0
- package/src/commands/warp.js +25 -0
- package/src/core/agent-runtime.js +94 -0
- package/src/core/event-bus.js +98 -0
- package/src/core/index.js +9 -0
- package/src/core/orchestrator.js +234 -0
- package/src/core/scheduler.js +124 -0
- package/src/core/task-graph.js +185 -0
- package/src/dashboard/app.js +1172 -30
- package/src/dashboard/index.html +223 -23
- package/src/dashboard/styles.css +870 -0
- package/src/index.js +16 -0
- package/src/orchestrator/artifact-graph.js +104 -0
- package/src/orchestrator/ast-normalizer.js +147 -0
- package/src/orchestrator/code-generator.js +632 -780
- package/src/orchestrator/design-engine.js +203 -0
- package/src/orchestrator/engine.js +307 -38
- package/src/orchestrator/oneshot.js +367 -380
- package/src/orchestrator/ontology.js +394 -0
- package/src/orchestrator/planner.js +231 -258
- package/src/orchestrator/repair-planner.js +67 -0
- package/src/orchestrator/requirement-contract.js +177 -0
- package/src/orchestrator/requirement-validator.js +39 -0
- package/src/orchestrator/semantic-engine.js +582 -0
- package/src/orchestrator/semantic-reviewer.js +179 -0
- package/src/orchestrator/task-planner.js +111 -0
- package/src/orchestrator/telemetry.js +209 -0
- package/src/orchestrator/ui-synthesizer.js +245 -0
- package/src/orchestrator/visual-critic.js +106 -0
- package/src/policies/architecture/layering.policy.js +14 -0
- package/src/policies/performance/indexing.policy.js +13 -0
- package/src/policies/reliability/resilience.policy.js +13 -0
- package/src/policies/security/auth.policy.js +31 -0
- package/src/protocol/agent.js +124 -0
- package/src/protocol/event.js +78 -0
- package/src/protocol/index.js +8 -0
- package/src/protocol/skill.js +54 -0
- package/src/protocol/task.js +100 -0
- package/src/scaffold/claude-generator.js +60 -0
- package/src/scaffold/commands-catalog.js +321 -0
- package/src/scaffold/cursor-generator.js +74 -0
- package/src/scaffold/ide-rules.js +133 -0
- package/src/scaffold/init.js +415 -91
- package/src/scaffold/installer.js +571 -0
- package/src/scaffold/kiro-generator.js +86 -0
- package/src/scaffold/skills-bundle.js +520 -0
- package/src/scaffold/templates.js +57 -4
- package/src/scaffold/workstations.js +364 -0
- package/src/server/server.js +283 -40
- package/src/utils/fs-safe.js +168 -0
- package/src/utils/markdown-report.js +175 -0
package/src/index.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Universal Multi-Provider Multi-Agent Orchestration Platform
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
export { initializeProject } from './scaffold/init.js';
|
|
2
6
|
export { OrchestratorEngine, AGENT_STATES, AGENT_EXPRESSIONS, ORCHESTRATOR_EXPRESSIONS } from './orchestrator/engine.js';
|
|
3
7
|
export { createServer } from './server/server.js';
|
|
8
|
+
|
|
9
|
+
// Protocol
|
|
10
|
+
export * from './protocol/index.js';
|
|
11
|
+
|
|
12
|
+
// Core
|
|
13
|
+
export * from './core/index.js';
|
|
14
|
+
|
|
15
|
+
// Adapters & Providers
|
|
16
|
+
export * from './adapters/index.js';
|
|
17
|
+
|
|
18
|
+
// Commands & Parser
|
|
19
|
+
export * from './commands/index.js';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — Artifact Graph & Dependency Matrix
|
|
3
|
+
*
|
|
4
|
+
* Tracks generated software artifacts, version histories, producer tasks,
|
|
5
|
+
* dependency trees, consumer linkages, and requirement traceability.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export class ArtifactGraph {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.nodes = new Map(); // path -> ArtifactNode
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Register or update an artifact node
|
|
15
|
+
*/
|
|
16
|
+
registerArtifact({ path, producerTask, requirements = [], dependencies = [], content = "", version = 1, repairReason = null }) {
|
|
17
|
+
const existing = this.nodes.get(path);
|
|
18
|
+
const currentVersion = existing ? existing.version + 1 : version;
|
|
19
|
+
const history = existing ? [...existing.history] : [];
|
|
20
|
+
|
|
21
|
+
if (existing) {
|
|
22
|
+
history.push({
|
|
23
|
+
version: existing.version,
|
|
24
|
+
producerTask: existing.producerTask,
|
|
25
|
+
requirements: existing.requirements,
|
|
26
|
+
repairReason: existing.repairReason,
|
|
27
|
+
timestamp: existing.timestamp
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const node = {
|
|
32
|
+
path,
|
|
33
|
+
producerTask: producerTask || 'generator',
|
|
34
|
+
requirements: Array.isArray(requirements) ? requirements : [requirements],
|
|
35
|
+
dependencies: Array.isArray(dependencies) ? dependencies : [],
|
|
36
|
+
consumers: [],
|
|
37
|
+
version: currentVersion,
|
|
38
|
+
repairReason,
|
|
39
|
+
timestamp: new Date().toISOString(),
|
|
40
|
+
sizeBytes: typeof content === 'string' ? content.length : 0,
|
|
41
|
+
status: 'active',
|
|
42
|
+
history
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
this.nodes.set(path, node);
|
|
46
|
+
this.rebuildConsumers();
|
|
47
|
+
return node;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Get an artifact by path
|
|
52
|
+
*/
|
|
53
|
+
getArtifact(path) {
|
|
54
|
+
return this.nodes.get(path) || null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* List all registered artifacts
|
|
59
|
+
*/
|
|
60
|
+
listArtifacts() {
|
|
61
|
+
return Array.from(this.nodes.values());
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Find artifacts addressing a specific requirement ID
|
|
66
|
+
*/
|
|
67
|
+
findByRequirement(reqId) {
|
|
68
|
+
return Array.from(this.nodes.values()).filter(node => node.requirements.includes(reqId));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Find artifacts produced by a specific task
|
|
73
|
+
*/
|
|
74
|
+
findByTask(taskId) {
|
|
75
|
+
return Array.from(this.nodes.values()).filter(node => node.producerTask === taskId);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Rebuild consumer references across graph
|
|
80
|
+
*/
|
|
81
|
+
rebuildConsumers() {
|
|
82
|
+
for (const node of this.nodes.values()) {
|
|
83
|
+
node.consumers = [];
|
|
84
|
+
}
|
|
85
|
+
for (const [consumerPath, node] of this.nodes.entries()) {
|
|
86
|
+
for (const depPath of node.dependencies) {
|
|
87
|
+
const depNode = this.nodes.get(depPath);
|
|
88
|
+
if (depNode && !depNode.consumers.includes(consumerPath)) {
|
|
89
|
+
depNode.consumers.push(consumerPath);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Serialize graph for diagnostics & reports
|
|
97
|
+
*/
|
|
98
|
+
toJSON() {
|
|
99
|
+
return {
|
|
100
|
+
totalArtifacts: this.nodes.size,
|
|
101
|
+
artifacts: Array.from(this.nodes.values())
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW — AST Normalizer
|
|
3
|
+
*
|
|
4
|
+
* Responsibilities:
|
|
5
|
+
* 1. Normalize casing, naming conventions, and identifiers.
|
|
6
|
+
* 2. Create deterministic, stable IDs for all software constructs.
|
|
7
|
+
* 3. Validate entity references across relationships, views, and operations.
|
|
8
|
+
* 4. Ensure requirement IDs are strictly unique and traceable.
|
|
9
|
+
* 5. Reject malformed ASTs without introducing any domain-specific heuristics.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { UniversalSoftwareOntology } from './ontology.js';
|
|
13
|
+
|
|
14
|
+
export class ASTNormalizer {
|
|
15
|
+
/**
|
|
16
|
+
* Normalize an arbitrary Project AST.
|
|
17
|
+
*/
|
|
18
|
+
static normalize(rawAST) {
|
|
19
|
+
if (!rawAST || typeof rawAST !== 'object') {
|
|
20
|
+
throw new Error('ASTNormalizer: input AST must be a non-null object.');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 1. Normalize Project Metadata
|
|
24
|
+
const project = UniversalSoftwareOntology.validateProject(rawAST.project || {
|
|
25
|
+
name: rawAST.appName || rawAST.projectName || 'Synthesized Application',
|
|
26
|
+
description: rawAST.summary || rawAST.description || 'Open-World Synthesized Software Application',
|
|
27
|
+
domain: rawAST.domain || (rawAST.domainMeta ? rawAST.domainMeta.id : 'software-system'),
|
|
28
|
+
goals: Array.isArray(rawAST.goals) ? rawAST.goals : []
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// 2. Normalize Entities & build reference set
|
|
32
|
+
const rawEntities = Array.isArray(rawAST.entities) ? rawAST.entities : [];
|
|
33
|
+
if (rawEntities.length === 0) {
|
|
34
|
+
throw new Error('ASTNormalizer: AST must contain at least one valid Entity.');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const seenEntityNames = new Set();
|
|
38
|
+
const entities = rawEntities.map((e, idx) => {
|
|
39
|
+
const validated = UniversalSoftwareOntology.validateEntity(e, idx);
|
|
40
|
+
if (seenEntityNames.has(validated.name)) {
|
|
41
|
+
// Disambiguate duplicate name
|
|
42
|
+
validated.name = `${validated.name}_${idx + 1}`;
|
|
43
|
+
validated.id = `entity-${validated.name.toLowerCase()}`;
|
|
44
|
+
}
|
|
45
|
+
seenEntityNames.add(validated.name);
|
|
46
|
+
return validated;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const entityNameMap = new Set(entities.map(e => e.name));
|
|
50
|
+
|
|
51
|
+
// Fix relationships target references
|
|
52
|
+
entities.forEach(ent => {
|
|
53
|
+
ent.relationships = ent.relationships.map(rel => {
|
|
54
|
+
if (!entityNameMap.has(rel.targetEntity)) {
|
|
55
|
+
// If referencing unknown entity, point to first available or keep clean
|
|
56
|
+
const match = Array.from(entityNameMap).find(n => n.toLowerCase() === rel.targetEntity.toLowerCase());
|
|
57
|
+
return {
|
|
58
|
+
...rel,
|
|
59
|
+
targetEntity: match || Array.from(entityNameMap)[0]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return rel;
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// 3. Normalize Actors
|
|
67
|
+
const rawActors = Array.isArray(rawAST.actors) && rawAST.actors.length > 0
|
|
68
|
+
? rawAST.actors
|
|
69
|
+
: [{ name: 'User', role: 'Operator' }];
|
|
70
|
+
const actors = rawActors.map((a, idx) => UniversalSoftwareOntology.validateActor(a, idx));
|
|
71
|
+
|
|
72
|
+
// 4. Normalize Capabilities
|
|
73
|
+
const capabilities = Array.isArray(rawAST.capabilities) && rawAST.capabilities.length > 0
|
|
74
|
+
? Array.from(new Set(rawAST.capabilities.map(String)))
|
|
75
|
+
: ['search', 'filter', 'view', 'create', 'edit'];
|
|
76
|
+
|
|
77
|
+
// 5. Normalize Workflows
|
|
78
|
+
const rawWorkflows = Array.isArray(rawAST.workflows) ? rawAST.workflows : [];
|
|
79
|
+
const workflows = rawWorkflows.map((w, idx) => UniversalSoftwareOntology.validateWorkflow(w, idx));
|
|
80
|
+
|
|
81
|
+
// 6. Normalize Views & target entities
|
|
82
|
+
const rawViews = Array.isArray(rawAST.views) ? rawAST.views : [];
|
|
83
|
+
const views = rawViews.map((v, idx) => {
|
|
84
|
+
const validated = UniversalSoftwareOntology.validateView(v, entities, idx);
|
|
85
|
+
// Ensure target entities exist
|
|
86
|
+
validated.targetEntities = validated.targetEntities.map(t => {
|
|
87
|
+
if (entityNameMap.has(t)) return t;
|
|
88
|
+
const match = Array.from(entityNameMap).find(n => n.toLowerCase() === t.toLowerCase());
|
|
89
|
+
return match || entities[0].name;
|
|
90
|
+
});
|
|
91
|
+
return validated;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// 7. Normalize Operations
|
|
95
|
+
const rawOps = Array.isArray(rawAST.operations) ? rawAST.operations : [];
|
|
96
|
+
const operations = rawOps.map((op, idx) => {
|
|
97
|
+
const validated = UniversalSoftwareOntology.validateOperation(op, entities, idx);
|
|
98
|
+
if (!entityNameMap.has(validated.targetEntity)) {
|
|
99
|
+
const match = Array.from(entityNameMap).find(n => n.toLowerCase() === validated.targetEntity.toLowerCase());
|
|
100
|
+
validated.targetEntity = match || entities[0].name;
|
|
101
|
+
}
|
|
102
|
+
return validated;
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// 8. Normalize Requirements (Ensure unique REQ-001..N)
|
|
106
|
+
const rawReqs = Array.isArray(rawAST.requirements) ? rawAST.requirements : [];
|
|
107
|
+
const seenReqIds = new Set();
|
|
108
|
+
const requirements = rawReqs.map((req, idx) => {
|
|
109
|
+
const validated = UniversalSoftwareOntology.validateRequirement(req, idx);
|
|
110
|
+
let uniqueId = validated.id;
|
|
111
|
+
let counter = idx + 1;
|
|
112
|
+
while (seenReqIds.has(uniqueId)) {
|
|
113
|
+
uniqueId = `REQ-${String(counter++).padStart(3, '0')}`;
|
|
114
|
+
}
|
|
115
|
+
seenReqIds.add(uniqueId);
|
|
116
|
+
validated.id = uniqueId;
|
|
117
|
+
return validated;
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// 9. Normalize Events
|
|
121
|
+
const rawEvents = Array.isArray(rawAST.events) ? rawAST.events : [];
|
|
122
|
+
const events = rawEvents.map((evt, idx) => UniversalSoftwareOntology.validateEvent(evt, idx));
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
project,
|
|
126
|
+
appName: project.name,
|
|
127
|
+
projectName: project.name,
|
|
128
|
+
companyName: rawAST.companyName || project.name,
|
|
129
|
+
headline: rawAST.headline || `Engineered for ${project.name}`,
|
|
130
|
+
summary: rawAST.summary || project.description,
|
|
131
|
+
domain: project.domain,
|
|
132
|
+
domainMeta: rawAST.domainMeta || { id: project.domain, label: project.name, confidence: 0.95 },
|
|
133
|
+
appType: rawAST.appType || { id: project.domain, name: project.name, category: project.domain, confidence: 0.95 },
|
|
134
|
+
actors,
|
|
135
|
+
entities,
|
|
136
|
+
capabilities,
|
|
137
|
+
workflows,
|
|
138
|
+
views,
|
|
139
|
+
operations,
|
|
140
|
+
events,
|
|
141
|
+
requirements,
|
|
142
|
+
palette: rawAST.palette,
|
|
143
|
+
fonts: rawAST.fonts,
|
|
144
|
+
rawPrompt: rawAST.rawPrompt || ''
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|