@hongmaple0820/scale-engine 0.12.2 → 0.13.0
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 +30 -2
- package/dist/adapters/ClaudeCodeAdapter.d.ts +1 -0
- package/dist/adapters/ClaudeCodeAdapter.js.map +1 -1
- package/dist/adapters/KiroAdapter.d.ts +14 -0
- package/dist/adapters/KiroAdapter.js +180 -0
- package/dist/adapters/KiroAdapter.js.map +1 -0
- package/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/index.js +3 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/api/cli.js +396 -5
- package/dist/api/cli.js.map +1 -1
- package/dist/api/doctor.d.ts +12 -0
- package/dist/api/doctor.js +232 -5
- package/dist/api/doctor.js.map +1 -1
- package/dist/api/quickstart.d.ts +19 -1
- package/dist/api/quickstart.js +103 -2
- package/dist/api/quickstart.js.map +1 -1
- package/dist/artifact/types.d.ts +16 -2
- package/dist/artifact/types.js.map +1 -1
- package/dist/cli/phaseCommands.d.ts +61 -0
- package/dist/cli/phaseCommands.js +559 -39
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/cli/vibeCommands.d.ts +44 -0
- package/dist/cli/vibeCommands.js +244 -0
- package/dist/cli/vibeCommands.js.map +1 -0
- package/dist/guardrails/detectors.d.ts +9 -0
- package/dist/guardrails/detectors.js +102 -0
- package/dist/guardrails/detectors.js.map +1 -1
- package/dist/hooks/HookGeneratorEnhanced.js +29 -0
- package/dist/hooks/HookGeneratorEnhanced.js.map +1 -1
- package/dist/hooks/WorkflowHooksManager.js +20 -1
- package/dist/hooks/WorkflowHooksManager.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/output/BrandThemeLoader.d.ts +54 -0
- package/dist/output/BrandThemeLoader.js +340 -0
- package/dist/output/BrandThemeLoader.js.map +1 -0
- package/dist/output/HTMLDocumentRenderer.d.ts +83 -0
- package/dist/output/HTMLDocumentRenderer.js +717 -0
- package/dist/output/HTMLDocumentRenderer.js.map +1 -0
- package/dist/output/UIPrototypeRenderer.d.ts +61 -0
- package/dist/output/UIPrototypeRenderer.js +500 -0
- package/dist/output/UIPrototypeRenderer.js.map +1 -0
- package/dist/output/index.d.ts +6 -0
- package/dist/output/index.js +6 -0
- package/dist/output/index.js.map +1 -0
- package/dist/prompts/PhasePromptRegistry.d.ts +53 -0
- package/dist/prompts/PhasePromptRegistry.js +517 -0
- package/dist/prompts/PhasePromptRegistry.js.map +1 -0
- package/dist/skills/SkillDiscovery.js +2 -1
- package/dist/skills/SkillDiscovery.js.map +1 -1
- package/dist/skills/index.d.ts +1 -0
- package/dist/skills/index.js +1 -0
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/routing/SkillGate.d.ts +11 -0
- package/dist/skills/routing/SkillGate.js +76 -0
- package/dist/skills/routing/SkillGate.js.map +1 -0
- package/dist/skills/routing/SkillPlanner.d.ts +8 -0
- package/dist/skills/routing/SkillPlanner.js +91 -0
- package/dist/skills/routing/SkillPlanner.js.map +1 -0
- package/dist/skills/routing/SkillPolicy.d.ts +6 -0
- package/dist/skills/routing/SkillPolicy.js +146 -0
- package/dist/skills/routing/SkillPolicy.js.map +1 -0
- package/dist/skills/routing/SkillRoutingTypes.d.ts +72 -0
- package/dist/skills/routing/SkillRoutingTypes.js +2 -0
- package/dist/skills/routing/SkillRoutingTypes.js.map +1 -0
- package/dist/skills/routing/TaskIntentClassifier.d.ts +6 -0
- package/dist/skills/routing/TaskIntentClassifier.js +79 -0
- package/dist/skills/routing/TaskIntentClassifier.js.map +1 -0
- package/dist/skills/routing/index.d.ts +5 -0
- package/dist/skills/routing/index.js +6 -0
- package/dist/skills/routing/index.js.map +1 -0
- package/dist/workflow/GovernanceTemplates.d.ts +12 -0
- package/dist/workflow/GovernanceTemplates.js +515 -0
- package/dist/workflow/GovernanceTemplates.js.map +1 -0
- package/dist/workflow/PhaseMarkerTracker.d.ts +63 -0
- package/dist/workflow/PhaseMarkerTracker.js +291 -0
- package/dist/workflow/PhaseMarkerTracker.js.map +1 -0
- package/dist/workflow/SessionStateTracker.d.ts +74 -0
- package/dist/workflow/SessionStateTracker.js +270 -0
- package/dist/workflow/SessionStateTracker.js.map +1 -0
- package/dist/workflow/TaskArtifactScaffolder.d.ts +47 -0
- package/dist/workflow/TaskArtifactScaffolder.js +237 -0
- package/dist/workflow/TaskArtifactScaffolder.js.map +1 -0
- package/dist/workflow/TaskMetricsStore.d.ts +49 -0
- package/dist/workflow/TaskMetricsStore.js +149 -0
- package/dist/workflow/TaskMetricsStore.js.map +1 -0
- package/dist/workflow/VerificationCommands.d.ts +2 -0
- package/dist/workflow/VerificationCommands.js +7 -4
- package/dist/workflow/VerificationCommands.js.map +1 -1
- package/dist/workflow/VerificationProfile.d.ts +55 -0
- package/dist/workflow/VerificationProfile.js +133 -0
- package/dist/workflow/VerificationProfile.js.map +1 -0
- package/dist/workflow/WorkflowArtifactWriter.d.ts +113 -0
- package/dist/workflow/WorkflowArtifactWriter.js +241 -0
- package/dist/workflow/WorkflowArtifactWriter.js.map +1 -0
- package/dist/workflow/WorkflowEngine.d.ts +20 -2
- package/dist/workflow/WorkflowEngine.js +37 -8
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/dist/workflow/autonomous/AutonomousDevLoop.d.ts +88 -0
- package/dist/workflow/autonomous/AutonomousDevLoop.js +381 -0
- package/dist/workflow/autonomous/AutonomousDevLoop.js.map +1 -0
- package/dist/workflow/autonomous/WorklogManager.d.ts +50 -0
- package/dist/workflow/autonomous/WorklogManager.js +264 -0
- package/dist/workflow/autonomous/WorklogManager.js.map +1 -0
- package/dist/workflow/autonomous/index.d.ts +2 -0
- package/dist/workflow/autonomous/index.js +4 -0
- package/dist/workflow/autonomous/index.js.map +1 -0
- package/dist/workflow/gates/GateSystem.d.ts +12 -3
- package/dist/workflow/gates/GateSystem.js +185 -41
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.js +7 -0
- package/dist/workflow/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
// SCALE Engine — Brand Theme Loader
|
|
2
|
+
// Loads brand design specs from awesome-design-md and generates CSS variables
|
|
3
|
+
// Integrates with npx getdesign for brand asset fetching
|
|
4
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// 2. Built-in brand presets
|
|
8
|
+
// ============================================================================
|
|
9
|
+
const BUILTIN_BRANDS = {
|
|
10
|
+
vercel: {
|
|
11
|
+
name: 'vercel',
|
|
12
|
+
displayName: 'Vercel',
|
|
13
|
+
colors: {
|
|
14
|
+
primary: '#000000',
|
|
15
|
+
primaryHover: '#333333',
|
|
16
|
+
secondary: '#666666',
|
|
17
|
+
accent: '#0070f3',
|
|
18
|
+
bg: '#000000',
|
|
19
|
+
bgSurface: '#111111',
|
|
20
|
+
bgElevated: '#222222',
|
|
21
|
+
fg: '#ededed',
|
|
22
|
+
fgMuted: '#888888',
|
|
23
|
+
border: '#333333',
|
|
24
|
+
success: '#0070f3',
|
|
25
|
+
warning: '#f5a623',
|
|
26
|
+
danger: '#ee0000',
|
|
27
|
+
},
|
|
28
|
+
typography: {
|
|
29
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
30
|
+
fontFamilyMono: "'SF Mono', 'Fira Code', monospace",
|
|
31
|
+
baseFontSize: '16px',
|
|
32
|
+
headingWeight: '700',
|
|
33
|
+
},
|
|
34
|
+
spacing: { unit: '8px', sectionGap: '2rem', cardPadding: '1.25rem' },
|
|
35
|
+
radius: '8px',
|
|
36
|
+
shadows: {
|
|
37
|
+
card: '0 2px 8px rgba(255,255,255,0.05)',
|
|
38
|
+
elevated: '0 8px 30px rgba(255,255,255,0.08)',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
stripe: {
|
|
42
|
+
name: 'stripe',
|
|
43
|
+
displayName: 'Stripe',
|
|
44
|
+
colors: {
|
|
45
|
+
primary: '#635bff',
|
|
46
|
+
primaryHover: '#7a73ff',
|
|
47
|
+
secondary: '#0a2540',
|
|
48
|
+
accent: '#00d4aa',
|
|
49
|
+
bg: '#0a2540',
|
|
50
|
+
bgSurface: '#1a3a5c',
|
|
51
|
+
bgElevated: '#244b73',
|
|
52
|
+
fg: '#ffffff',
|
|
53
|
+
fgMuted: '#8898aa',
|
|
54
|
+
border: '#2e4a62',
|
|
55
|
+
success: '#00d4aa',
|
|
56
|
+
warning: '#ffbb00',
|
|
57
|
+
danger: '#ff5c5c',
|
|
58
|
+
},
|
|
59
|
+
typography: {
|
|
60
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
61
|
+
fontFamilyMono: "'SF Mono', 'Fira Code', monospace",
|
|
62
|
+
baseFontSize: '16px',
|
|
63
|
+
headingWeight: '600',
|
|
64
|
+
},
|
|
65
|
+
spacing: { unit: '8px', sectionGap: '2rem', cardPadding: '1.5rem' },
|
|
66
|
+
radius: '6px',
|
|
67
|
+
shadows: {
|
|
68
|
+
card: '0 2px 4px rgba(0,0,0,0.2)',
|
|
69
|
+
elevated: '0 8px 24px rgba(0,0,0,0.3)',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
notion: {
|
|
73
|
+
name: 'notion',
|
|
74
|
+
displayName: 'Notion',
|
|
75
|
+
colors: {
|
|
76
|
+
primary: '#2382e2',
|
|
77
|
+
primaryHover: '#1a6bc4',
|
|
78
|
+
secondary: '#37352f',
|
|
79
|
+
accent: '#eb5757',
|
|
80
|
+
bg: '#ffffff',
|
|
81
|
+
bgSurface: '#f7f6f3',
|
|
82
|
+
bgElevated: '#eeeeee',
|
|
83
|
+
fg: '#37352f',
|
|
84
|
+
fgMuted: '#787774',
|
|
85
|
+
border: '#e3e2de',
|
|
86
|
+
success: '#0f7b6c',
|
|
87
|
+
warning: '#d9730d',
|
|
88
|
+
danger: '#e03e3e',
|
|
89
|
+
},
|
|
90
|
+
typography: {
|
|
91
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
92
|
+
fontFamilyMono: "'SF Mono', 'Consolas', monospace",
|
|
93
|
+
baseFontSize: '16px',
|
|
94
|
+
headingWeight: '600',
|
|
95
|
+
},
|
|
96
|
+
spacing: { unit: '8px', sectionGap: '1.5rem', cardPadding: '1rem' },
|
|
97
|
+
radius: '3px',
|
|
98
|
+
shadows: {
|
|
99
|
+
card: '0 1px 3px rgba(0,0,0,0.08)',
|
|
100
|
+
elevated: '0 4px 12px rgba(0,0,0,0.1)',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
linear: {
|
|
104
|
+
name: 'linear',
|
|
105
|
+
displayName: 'Linear',
|
|
106
|
+
colors: {
|
|
107
|
+
primary: '#5e6ad2',
|
|
108
|
+
primaryHover: '#7b84e0',
|
|
109
|
+
secondary: '#171923',
|
|
110
|
+
accent: '#26b5ce',
|
|
111
|
+
bg: '#0d0f14',
|
|
112
|
+
bgSurface: '#161a24',
|
|
113
|
+
bgElevated: '#1e2330',
|
|
114
|
+
fg: '#e8eaed',
|
|
115
|
+
fgMuted: '#6b7280',
|
|
116
|
+
border: '#2a2f3e',
|
|
117
|
+
success: '#4ade80',
|
|
118
|
+
warning: '#fbbf24',
|
|
119
|
+
danger: '#f87171',
|
|
120
|
+
},
|
|
121
|
+
typography: {
|
|
122
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
123
|
+
fontFamilyMono: "'JetBrains Mono', 'Fira Code', monospace",
|
|
124
|
+
baseFontSize: '14px',
|
|
125
|
+
headingWeight: '600',
|
|
126
|
+
},
|
|
127
|
+
spacing: { unit: '8px', sectionGap: '2rem', cardPadding: '1.25rem' },
|
|
128
|
+
radius: '6px',
|
|
129
|
+
shadows: {
|
|
130
|
+
card: '0 1px 2px rgba(0,0,0,0.2)',
|
|
131
|
+
elevated: '0 4px 16px rgba(0,0,0,0.3)',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
github: {
|
|
135
|
+
name: 'github',
|
|
136
|
+
displayName: 'GitHub',
|
|
137
|
+
colors: {
|
|
138
|
+
primary: '#0969da',
|
|
139
|
+
primaryHover: '#0550ae',
|
|
140
|
+
secondary: '#24292f',
|
|
141
|
+
accent: '#8250df',
|
|
142
|
+
bg: '#0d1117',
|
|
143
|
+
bgSurface: '#161b22',
|
|
144
|
+
bgElevated: '#21262d',
|
|
145
|
+
fg: '#c9d1d9',
|
|
146
|
+
fgMuted: '#8b949e',
|
|
147
|
+
border: '#30363d',
|
|
148
|
+
success: '#3fb950',
|
|
149
|
+
warning: '#d29922',
|
|
150
|
+
danger: '#f85149',
|
|
151
|
+
},
|
|
152
|
+
typography: {
|
|
153
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
154
|
+
fontFamilyMono: "'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace",
|
|
155
|
+
baseFontSize: '14px',
|
|
156
|
+
headingWeight: '600',
|
|
157
|
+
},
|
|
158
|
+
spacing: { unit: '8px', sectionGap: '1.5rem', cardPadding: '1rem' },
|
|
159
|
+
radius: '6px',
|
|
160
|
+
shadows: {
|
|
161
|
+
card: '0 1px 3px rgba(0,0,0,0.12)',
|
|
162
|
+
elevated: '0 8px 24px rgba(0,0,0,0.2)',
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
// ============================================================================
|
|
167
|
+
// 3. BrandThemeLoader
|
|
168
|
+
// ============================================================================
|
|
169
|
+
export class BrandThemeLoader {
|
|
170
|
+
constructor(options) {
|
|
171
|
+
this.customBrandsDir = options?.brandsDir;
|
|
172
|
+
}
|
|
173
|
+
// Load a brand theme by name
|
|
174
|
+
loadBrand(brand) {
|
|
175
|
+
const normalized = brand.toLowerCase().trim();
|
|
176
|
+
// Check built-in brands first
|
|
177
|
+
if (BUILTIN_BRANDS[normalized]) {
|
|
178
|
+
return BUILTIN_BRANDS[normalized];
|
|
179
|
+
}
|
|
180
|
+
// Check custom brands directory
|
|
181
|
+
if (this.customBrandsDir) {
|
|
182
|
+
const brandPath = join(this.customBrandsDir, normalized, 'DESIGN.md');
|
|
183
|
+
if (existsSync(brandPath)) {
|
|
184
|
+
return this.parseBrandDesignMD(brandPath, normalized);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// Check awesome-design-md skill directory
|
|
188
|
+
const awesomeDir = this.getAwesomeDesignDir();
|
|
189
|
+
if (awesomeDir) {
|
|
190
|
+
const brandPath = join(awesomeDir, normalized, 'DESIGN.md');
|
|
191
|
+
if (existsSync(brandPath)) {
|
|
192
|
+
return this.parseBrandDesignMD(brandPath, normalized);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
// Generate CSS variables from a brand theme
|
|
198
|
+
getCSSVariables(theme) {
|
|
199
|
+
return `
|
|
200
|
+
:root {
|
|
201
|
+
--brand-primary: ${theme.colors.primary};
|
|
202
|
+
--brand-primary-hover: ${theme.colors.primaryHover ?? theme.colors.primary};
|
|
203
|
+
--brand-secondary: ${theme.colors.secondary ?? theme.colors.fg};
|
|
204
|
+
--brand-accent: ${theme.colors.accent ?? theme.colors.primary};
|
|
205
|
+
--brand-bg: ${theme.colors.bg};
|
|
206
|
+
--brand-bg-surface: ${theme.colors.bgSurface};
|
|
207
|
+
--brand-bg-elevated: ${theme.colors.bgElevated};
|
|
208
|
+
--brand-fg: ${theme.colors.fg};
|
|
209
|
+
--brand-fg-muted: ${theme.colors.fgMuted};
|
|
210
|
+
--brand-border: ${theme.colors.border};
|
|
211
|
+
--brand-success: ${theme.colors.success ?? '#00ff88'};
|
|
212
|
+
--brand-warning: ${theme.colors.warning ?? '#ffaa00'};
|
|
213
|
+
--brand-danger: ${theme.colors.danger ?? '#ff4444'};
|
|
214
|
+
--brand-font: ${theme.typography.fontFamily};
|
|
215
|
+
--brand-font-mono: ${theme.typography.fontFamilyMono};
|
|
216
|
+
--brand-font-size: ${theme.typography.baseFontSize};
|
|
217
|
+
--brand-heading-weight: ${theme.typography.headingWeight};
|
|
218
|
+
--brand-radius: ${theme.radius};
|
|
219
|
+
--brand-shadow-card: ${theme.shadows.card};
|
|
220
|
+
--brand-shadow-elevated: ${theme.shadows.elevated};
|
|
221
|
+
}
|
|
222
|
+
`;
|
|
223
|
+
}
|
|
224
|
+
// Generate override CSS that replaces default variables with brand values
|
|
225
|
+
getOverrideCSS(theme) {
|
|
226
|
+
return `
|
|
227
|
+
:root {
|
|
228
|
+
--bg: ${theme.colors.bg};
|
|
229
|
+
--bg-surface: ${theme.colors.bgSurface};
|
|
230
|
+
--bg-elevated: ${theme.colors.bgElevated};
|
|
231
|
+
--fg: ${theme.colors.fg};
|
|
232
|
+
--fg-muted: ${theme.colors.fgMuted};
|
|
233
|
+
--border: ${theme.colors.border};
|
|
234
|
+
--accent: ${theme.colors.primary};
|
|
235
|
+
--accent-dim: ${theme.colors.primaryHover ?? theme.colors.primary};
|
|
236
|
+
--radius: ${theme.radius};
|
|
237
|
+
}
|
|
238
|
+
body { font-family: ${theme.typography.fontFamily}; font-size: ${theme.typography.baseFontSize}; }
|
|
239
|
+
h1, h2, h3 { font-weight: ${theme.typography.headingWeight}; }
|
|
240
|
+
`;
|
|
241
|
+
}
|
|
242
|
+
// List all available brand names
|
|
243
|
+
listAvailableBrands() {
|
|
244
|
+
const builtin = Object.keys(BUILTIN_BRANDS);
|
|
245
|
+
// Add custom brands from awesome-design-md
|
|
246
|
+
const awesomeDir = this.getAwesomeDesignDir();
|
|
247
|
+
if (awesomeDir && existsSync(awesomeDir)) {
|
|
248
|
+
try {
|
|
249
|
+
const dirs = readdirSync(awesomeDir, { withFileTypes: true })
|
|
250
|
+
.filter(d => d.isDirectory())
|
|
251
|
+
.map(d => d.name);
|
|
252
|
+
for (const d of dirs) {
|
|
253
|
+
if (!builtin.includes(d))
|
|
254
|
+
builtin.push(d);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
// ignore read errors
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return builtin.sort();
|
|
262
|
+
}
|
|
263
|
+
// Check if a brand exists
|
|
264
|
+
hasBrand(brand) {
|
|
265
|
+
return this.loadBrand(brand) !== null;
|
|
266
|
+
}
|
|
267
|
+
// === Internal: Parse DESIGN.md from awesome-design-md ===
|
|
268
|
+
parseBrandDesignMD(filePath, name) {
|
|
269
|
+
try {
|
|
270
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
271
|
+
// Basic parsing — extract colors from markdown table or code blocks
|
|
272
|
+
const colors = this.extractColors(content);
|
|
273
|
+
if (!colors)
|
|
274
|
+
return null;
|
|
275
|
+
return {
|
|
276
|
+
name,
|
|
277
|
+
displayName: this.extractTitle(content) ?? name,
|
|
278
|
+
colors: {
|
|
279
|
+
primary: colors.primary ?? '#0070f3',
|
|
280
|
+
primaryHover: colors.primaryHover,
|
|
281
|
+
secondary: colors.secondary,
|
|
282
|
+
accent: colors.accent,
|
|
283
|
+
bg: colors.bg ?? '#0f0f0f',
|
|
284
|
+
bgSurface: colors.bgSurface ?? '#1a1a1a',
|
|
285
|
+
bgElevated: colors.bgElevated ?? '#242424',
|
|
286
|
+
fg: colors.fg ?? '#e0e0e0',
|
|
287
|
+
fgMuted: colors.fgMuted ?? '#808080',
|
|
288
|
+
border: colors.border ?? '#333',
|
|
289
|
+
success: colors.success,
|
|
290
|
+
warning: colors.warning,
|
|
291
|
+
danger: colors.danger,
|
|
292
|
+
},
|
|
293
|
+
typography: {
|
|
294
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
295
|
+
fontFamilyMono: "'SF Mono', 'Fira Code', monospace",
|
|
296
|
+
baseFontSize: '16px',
|
|
297
|
+
headingWeight: '600',
|
|
298
|
+
},
|
|
299
|
+
spacing: { unit: '8px', sectionGap: '2rem', cardPadding: '1.25rem' },
|
|
300
|
+
radius: '6px',
|
|
301
|
+
shadows: {
|
|
302
|
+
card: '0 2px 8px rgba(0,0,0,0.2)',
|
|
303
|
+
elevated: '0 8px 24px rgba(0,0,0,0.3)',
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
extractColors(content) {
|
|
312
|
+
const colors = {};
|
|
313
|
+
// Match hex colors in various formats
|
|
314
|
+
const hexPattern = /#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})/g;
|
|
315
|
+
const matches = content.match(hexPattern);
|
|
316
|
+
if (!matches || matches.length === 0)
|
|
317
|
+
return null;
|
|
318
|
+
// First hex is often primary
|
|
319
|
+
colors.primary = matches[0];
|
|
320
|
+
if (matches.length > 1)
|
|
321
|
+
colors.bg = matches[1];
|
|
322
|
+
if (matches.length > 2)
|
|
323
|
+
colors.fg = matches[2];
|
|
324
|
+
return colors;
|
|
325
|
+
}
|
|
326
|
+
extractTitle(content) {
|
|
327
|
+
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
328
|
+
return titleMatch ? titleMatch[1].trim() : null;
|
|
329
|
+
}
|
|
330
|
+
getAwesomeDesignDir() {
|
|
331
|
+
// Check standard paths for awesome-design-md
|
|
332
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? '';
|
|
333
|
+
const candidates = [
|
|
334
|
+
join(home, '.claude', 'skills', 'awesome-design-md'),
|
|
335
|
+
join(home, '.agents', 'skills', 'awesome-design-md'),
|
|
336
|
+
];
|
|
337
|
+
return candidates.find(p => existsSync(p));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=BrandThemeLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandThemeLoader.js","sourceRoot":"","sources":["../../src/output/BrandTh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,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type OutputFormat = 'html' | 'md';
|
|
2
|
+
export type ThemeMode = 'dark' | 'light' | 'auto';
|
|
3
|
+
export type DocLang = 'zh' | 'en';
|
|
4
|
+
export interface HTMLRenderOptions {
|
|
5
|
+
theme: ThemeMode;
|
|
6
|
+
brand?: string;
|
|
7
|
+
printFriendly: boolean;
|
|
8
|
+
interactive: boolean;
|
|
9
|
+
title: string;
|
|
10
|
+
lang: DocLang;
|
|
11
|
+
author?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SpecData {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
what: string;
|
|
19
|
+
successCriteria: string[];
|
|
20
|
+
outOfScope: string[];
|
|
21
|
+
edgeCases: string[];
|
|
22
|
+
northStar: string;
|
|
23
|
+
ambiguityScore?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PlanData {
|
|
26
|
+
id: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
specId: string;
|
|
29
|
+
approach: string;
|
|
30
|
+
techChoices: Array<{
|
|
31
|
+
decision: string;
|
|
32
|
+
rationale: string;
|
|
33
|
+
alternatives?: string[];
|
|
34
|
+
}>;
|
|
35
|
+
modules: Array<{
|
|
36
|
+
path: string;
|
|
37
|
+
action: 'create' | 'modify' | 'delete';
|
|
38
|
+
reason: string;
|
|
39
|
+
}>;
|
|
40
|
+
rollbackStrategy: string;
|
|
41
|
+
estimatedComplexity?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ReviewData {
|
|
44
|
+
id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
timestamp: string;
|
|
47
|
+
findings: Array<{
|
|
48
|
+
severity: string;
|
|
49
|
+
file: string;
|
|
50
|
+
line?: number;
|
|
51
|
+
message: string;
|
|
52
|
+
}>;
|
|
53
|
+
passed: boolean;
|
|
54
|
+
specCoverage?: number;
|
|
55
|
+
specFindings?: string[];
|
|
56
|
+
}
|
|
57
|
+
export interface ReportData {
|
|
58
|
+
type: string;
|
|
59
|
+
title: string;
|
|
60
|
+
timestamp: string;
|
|
61
|
+
sections: Array<{
|
|
62
|
+
heading: string;
|
|
63
|
+
content: string;
|
|
64
|
+
}>;
|
|
65
|
+
metrics?: Record<string, number | string>;
|
|
66
|
+
}
|
|
67
|
+
export declare class HTMLDocumentRenderer {
|
|
68
|
+
private options;
|
|
69
|
+
constructor(options?: Partial<HTMLRenderOptions>);
|
|
70
|
+
renderSpec(data: SpecData): string;
|
|
71
|
+
renderPlan(data: PlanData): string;
|
|
72
|
+
renderReview(data: ReviewData): string;
|
|
73
|
+
renderReport(data: ReportData): string;
|
|
74
|
+
renderContent(title: string, bodyHtml: string, phase?: string): string;
|
|
75
|
+
writeToFile(html: string, filePath: string): string;
|
|
76
|
+
private wrapInLayout;
|
|
77
|
+
private renderSection;
|
|
78
|
+
private buildMetaTags;
|
|
79
|
+
private extractTOC;
|
|
80
|
+
private escapeHtml;
|
|
81
|
+
private slugify;
|
|
82
|
+
private groupBySeverity;
|
|
83
|
+
}
|