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,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PIXEL CREW β Structured Markdown Report Builder & Persister
|
|
3
|
+
*
|
|
4
|
+
* Generates rich, highly structured GitHub-Flavored Markdown report documents
|
|
5
|
+
* with frontmatter, metric scorecards, squad finding matrices, anti-AI compliance
|
|
6
|
+
* tables, and actionable checklists.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import fs from 'node:fs/promises';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
|
|
12
|
+
export class MarkdownReportBuilder {
|
|
13
|
+
constructor(options = {}) {
|
|
14
|
+
this.title = options.title || 'PixelCrew Engineering Report';
|
|
15
|
+
this.command = options.command || '/report';
|
|
16
|
+
this.category = options.category || 'General';
|
|
17
|
+
this.agent = options.agent || 'Lead Orchestrator';
|
|
18
|
+
this.project = options.project || 'Project';
|
|
19
|
+
this.timestamp = options.timestamp || Date.now();
|
|
20
|
+
this.summary = options.summary || '';
|
|
21
|
+
this.metrics = options.metrics || [];
|
|
22
|
+
this.sections = options.sections || [];
|
|
23
|
+
this.checklist = options.checklist || [];
|
|
24
|
+
this.actionItems = options.actionItems || [];
|
|
25
|
+
this.antiAiCompliance = options.antiAiCompliance || null;
|
|
26
|
+
this.score = options.score || null;
|
|
27
|
+
this.status = options.status || 'COMPLETED';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Compiles the full structured Markdown document
|
|
32
|
+
*/
|
|
33
|
+
build() {
|
|
34
|
+
const dateObj = new Date(this.timestamp);
|
|
35
|
+
const dateStr = dateObj.toLocaleDateString([], { month: 'short', day: 'numeric', year: 'numeric' });
|
|
36
|
+
const timeStr = dateObj.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
37
|
+
const isoDate = dateObj.toISOString();
|
|
38
|
+
|
|
39
|
+
let md = `---
|
|
40
|
+
title: "${this.title}"
|
|
41
|
+
command: "${this.command}"
|
|
42
|
+
category: "${this.category}"
|
|
43
|
+
agent: "${this.agent}"
|
|
44
|
+
project: "${this.project}"
|
|
45
|
+
date: "${isoDate}"
|
|
46
|
+
status: "${this.status}"
|
|
47
|
+
${this.score !== null ? `score: ${this.score}\n` : ''}---
|
|
48
|
+
|
|
49
|
+
# π’ ${this.title}
|
|
50
|
+
|
|
51
|
+
> **PixelCrew Floor 42 Swarm Report** β’ Generated on \`${dateStr} at ${timeStr}\` via \`${this.command}\`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## π Report Metadata
|
|
56
|
+
|
|
57
|
+
| Attribute | Details |
|
|
58
|
+
| :--- | :--- |
|
|
59
|
+
| **Project** | \`${this.project}\` |
|
|
60
|
+
| **Command** | \`${this.command}\` |
|
|
61
|
+
| **Squad Persona** | \`${this.agent}\` |
|
|
62
|
+
| **Category** | \`${this.category}\` |
|
|
63
|
+
| **Execution Status** | \`β ${this.status}\` |
|
|
64
|
+
${this.score !== null ? `| **Overall Score** | **\`${this.score} / 10.0\`** (β
Approved) |\n` : ''}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
// 1. Executive Summary
|
|
68
|
+
if (this.summary) {
|
|
69
|
+
md += `## π Executive Summary\n\n${this.summary}\n\n`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 2. Metrics & KPI Scorecards
|
|
73
|
+
if (this.metrics && this.metrics.length > 0) {
|
|
74
|
+
md += `## π Key Metrics & Performance Scorecard\n\n`;
|
|
75
|
+
md += `| Benchmark Metric | Target / Budget | Result | Status |\n`;
|
|
76
|
+
md += `| :--- | :--- | :--- | :--- |\n`;
|
|
77
|
+
for (const m of this.metrics) {
|
|
78
|
+
const statusIcon = m.status === 'PASS' || m.status === 'PASSED' || m.status === 'OPTIMIZED' ? 'β' : (m.status === 'WARN' ? 'β ' : 'β');
|
|
79
|
+
md += `| **${m.name}** | \`${m.target || 'Standard'}\` | \`${m.value || m.score || 'N/A'}\` | **${statusIcon} ${m.status || 'OK'}** |\n`;
|
|
80
|
+
}
|
|
81
|
+
md += `\n`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 3. Structured Sections
|
|
85
|
+
for (const sec of this.sections) {
|
|
86
|
+
const icon = sec.icon ? `${sec.icon} ` : '';
|
|
87
|
+
md += `## ${icon}${sec.title}\n\n`;
|
|
88
|
+
if (sec.description) {
|
|
89
|
+
md += `${sec.description}\n\n`;
|
|
90
|
+
}
|
|
91
|
+
if (sec.table && Array.isArray(sec.table.rows)) {
|
|
92
|
+
md += `| ${sec.table.headers.join(' | ')} |\n`;
|
|
93
|
+
md += `| ${sec.table.headers.map(() => ':---').join(' | ')} |\n`;
|
|
94
|
+
for (const row of sec.table.rows) {
|
|
95
|
+
md += `| ${row.join(' | ')} |\n`;
|
|
96
|
+
}
|
|
97
|
+
md += `\n`;
|
|
98
|
+
}
|
|
99
|
+
if (sec.items && sec.items.length > 0) {
|
|
100
|
+
for (const item of sec.items) {
|
|
101
|
+
if (typeof item === 'string') {
|
|
102
|
+
md += `- ${item.startsWith('β’') ? item.slice(1).trim() : item}\n`;
|
|
103
|
+
} else if (item.label && item.detail) {
|
|
104
|
+
md += `- **${item.label}:** ${item.detail}\n`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
md += `\n`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 4. Anti-AI Slop Compliance Checklist
|
|
112
|
+
if (this.antiAiCompliance) {
|
|
113
|
+
md += `## π‘οΈ Anti-AI 64-Pattern Compliance Matrix\n\n`;
|
|
114
|
+
md += `| Design Dimension | Banned AI Pattern | PixelCrew Status |\n`;
|
|
115
|
+
md += `| :--- | :--- | :--- |\n`;
|
|
116
|
+
md += `| **Visual Details** | Faint gridlines background & purple gradient blobs | \`β 0 Detected (Clean Solid Tiers)\` |\n`;
|
|
117
|
+
md += `| **Typography** | Tracked pill kickers (\`β¨ INTRODUCING\`) & flat scale | \`β Mathematical fluid clamp() active\` |\n`;
|
|
118
|
+
md += `| **Layout & Grid** | Monotonous 3-card cloned columns | \`β Asymmetric Bento flow enabled\` |\n`;
|
|
119
|
+
md += `| **Copywriting** | ClichΓ© phrases (*"Elevate your workflow"*) | \`β Grounded technical value props\` |\n`;
|
|
120
|
+
md += `| **Accessibility** | Low contrast text & missing focus rings | \`β WCAG 2.1 AA/AAA Compliant\` |\n\n`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 5. Verification Checklist
|
|
124
|
+
if (this.checklist && this.checklist.length > 0) {
|
|
125
|
+
md += `## β
Verification & Hardening Checklist\n\n`;
|
|
126
|
+
for (const item of this.checklist) {
|
|
127
|
+
const isDone = item.done !== false;
|
|
128
|
+
const text = typeof item === 'string' ? item : item.text;
|
|
129
|
+
md += `- [${isDone ? 'x' : ' '}] ${text}\n`;
|
|
130
|
+
}
|
|
131
|
+
md += `\n`;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 6. Action Items & Next Steps
|
|
135
|
+
if (this.actionItems && this.actionItems.length > 0) {
|
|
136
|
+
md += `## π Action Items & Next Steps\n\n`;
|
|
137
|
+
for (const action of this.actionItems) {
|
|
138
|
+
md += `- [ ] ${action}\n`;
|
|
139
|
+
}
|
|
140
|
+
md += `\n`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
md += `---\n\n*Generated autonomously by PixelCrew Floor 42 Multi-Agent Swarm.* \n`;
|
|
144
|
+
|
|
145
|
+
return md;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Saves the structured markdown report into .pixel-crew/reports/ and returns file paths
|
|
150
|
+
*/
|
|
151
|
+
async save(targetDir = process.cwd(), filenameSlug = null) {
|
|
152
|
+
const slug = filenameSlug || `${this.command.replace(/^\//, '')}-${this.timestamp}`;
|
|
153
|
+
const reportsDir = path.join(targetDir, '.pixel-crew', 'reports');
|
|
154
|
+
const mdContent = this.build();
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
await fs.mkdir(reportsDir, { recursive: true });
|
|
158
|
+
const filePath = path.join(reportsDir, `${slug}.md`);
|
|
159
|
+
await fs.writeFile(filePath, mdContent, 'utf-8');
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
success: true,
|
|
163
|
+
filePath,
|
|
164
|
+
fileName: `${slug}.md`,
|
|
165
|
+
markdown: mdContent
|
|
166
|
+
};
|
|
167
|
+
} catch (err) {
|
|
168
|
+
return {
|
|
169
|
+
success: false,
|
|
170
|
+
error: err.message,
|
|
171
|
+
markdown: mdContent
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|