cognitive-workflow-mcp 1.1.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/.workflow/bucket-builder.html +823 -0
- package/.workflow/bucket-discoverer.html +928 -0
- package/.workflow/bucket-experimenter.html +802 -0
- package/.workflow/bucket-operator.html +951 -0
- package/.workflow/bucket-strategist.html +970 -0
- package/.workflow/bucket-teacher.html +873 -0
- package/.workflow/cognitive-dashboard-enhanced.html +731 -0
- package/.workflow/cognitive-dashboard.html +296 -0
- package/LICENSE +21 -0
- package/README.md +317 -0
- package/bin/cli.js +286 -0
- package/package.json +57 -0
- package/src/analyzer.js +194 -0
- package/src/configurator.js +63 -0
- package/src/generator.js +65 -0
- package/src/index.js +233 -0
- package/src/insights.js +127 -0
- package/src/templates.js +396 -0
package/src/templates.js
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template system for generating HTML dashboards
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const IDENTITY_METADATA = {
|
|
6
|
+
builder: {
|
|
7
|
+
name: 'Builder',
|
|
8
|
+
emoji: 'ποΈ',
|
|
9
|
+
terminal: 'iTerm2',
|
|
10
|
+
color: '#3b82f6',
|
|
11
|
+
bgGradient: 'linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%)',
|
|
12
|
+
description: "The factory floor where hands meet keyboard",
|
|
13
|
+
tagline: "Ship it. Debug it. Make it work.",
|
|
14
|
+
niche: "Implementation > theory"
|
|
15
|
+
},
|
|
16
|
+
discoverer: {
|
|
17
|
+
name: 'Discoverer',
|
|
18
|
+
emoji: 'π¬',
|
|
19
|
+
terminal: 'WezTerm',
|
|
20
|
+
color: '#fbbf24',
|
|
21
|
+
bgGradient: 'linear-gradient(135deg, #1c0a00 0%, #3c1810 50%, #78350f 100%)',
|
|
22
|
+
description: "The research vault where foundational knowledge emerges",
|
|
23
|
+
tagline: "Ask why. Prove theorems. Document breakthroughs.",
|
|
24
|
+
niche: "First principles > existing patterns"
|
|
25
|
+
},
|
|
26
|
+
operator: {
|
|
27
|
+
name: 'Operator',
|
|
28
|
+
emoji: 'π©',
|
|
29
|
+
terminal: 'Kitty',
|
|
30
|
+
color: '#10b981',
|
|
31
|
+
bgGradient: 'linear-gradient(135deg, #0d3d29 0%, #1a5c3e 50%, #267852 100%)',
|
|
32
|
+
description: "The command center where relationships are managed",
|
|
33
|
+
tagline: "Execute. Coordinate. Deliver results.",
|
|
34
|
+
niche: "Execution > planning"
|
|
35
|
+
},
|
|
36
|
+
teacher: {
|
|
37
|
+
name: 'Teacher',
|
|
38
|
+
emoji: 'π£',
|
|
39
|
+
terminal: 'Terminal',
|
|
40
|
+
color: '#f97316',
|
|
41
|
+
bgGradient: 'linear-gradient(135deg, #7c2d12 0%, #9a3412 50%, #c2410c 100%)',
|
|
42
|
+
description: "The public stage where ideas are broadcast",
|
|
43
|
+
tagline: "Teach. Document. Share knowledge.",
|
|
44
|
+
niche: "Clarity > complexity"
|
|
45
|
+
},
|
|
46
|
+
strategist: {
|
|
47
|
+
name: 'Strategist',
|
|
48
|
+
emoji: 'πΊοΈ',
|
|
49
|
+
terminal: 'VS Code',
|
|
50
|
+
color: '#8b5cf6',
|
|
51
|
+
bgGradient: 'linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)',
|
|
52
|
+
description: "The war room where patterns are analyzed",
|
|
53
|
+
tagline: "Position. Analyze. Win strategically.",
|
|
54
|
+
niche: "Leverage > effort"
|
|
55
|
+
},
|
|
56
|
+
experimenter: {
|
|
57
|
+
name: 'Experimenter',
|
|
58
|
+
emoji: 'π§ͺ',
|
|
59
|
+
terminal: 'Cursor',
|
|
60
|
+
color: '#f43f5e',
|
|
61
|
+
bgGradient: 'linear-gradient(135deg, #be123c 0%, #e11d48 50%, #f43f5e 100%)',
|
|
62
|
+
description: "The lab where rapid prototypes are born",
|
|
63
|
+
tagline: "Test. Iterate. Fail fast.",
|
|
64
|
+
niche: "Speed > perfection"
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export function getDashboardTemplate(analysis) {
|
|
69
|
+
const identitiesHtml = Object.entries(analysis.identities)
|
|
70
|
+
.map(([id, data]) => {
|
|
71
|
+
const meta = IDENTITY_METADATA[id];
|
|
72
|
+
return `
|
|
73
|
+
<div class="bucket-card" onclick="window.location='bucket-${id}.html'">
|
|
74
|
+
<div class="bucket-header">
|
|
75
|
+
<span class="bucket-emoji">${meta.emoji}</span>
|
|
76
|
+
<h3>${meta.name}</h3>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="bucket-stats">
|
|
79
|
+
<div class="stat">
|
|
80
|
+
<div class="stat-number">${data.commits}</div>
|
|
81
|
+
<div class="stat-label">commits</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="stat">
|
|
84
|
+
<div class="stat-number">${data.percentage}%</div>
|
|
85
|
+
<div class="stat-label">of work</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="stat">
|
|
88
|
+
<div class="stat-number">${data.commitsPerDay}</div>
|
|
89
|
+
<div class="stat-label">per day</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="bucket-description">${meta.description}</div>
|
|
93
|
+
</div>
|
|
94
|
+
`;
|
|
95
|
+
})
|
|
96
|
+
.join('');
|
|
97
|
+
|
|
98
|
+
return `<!DOCTYPE html>
|
|
99
|
+
<html lang="en">
|
|
100
|
+
<head>
|
|
101
|
+
<meta charset="UTF-8">
|
|
102
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
103
|
+
<title>Cognitive Workflow Dashboard</title>
|
|
104
|
+
<style>
|
|
105
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
106
|
+
body {
|
|
107
|
+
font-family: 'SF Mono', 'Monaco', monospace;
|
|
108
|
+
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
|
|
109
|
+
color: #e2e8f0;
|
|
110
|
+
padding: 40px;
|
|
111
|
+
line-height: 1.6;
|
|
112
|
+
}
|
|
113
|
+
.container {
|
|
114
|
+
max-width: 1400px;
|
|
115
|
+
margin: 0 auto;
|
|
116
|
+
}
|
|
117
|
+
.header {
|
|
118
|
+
text-align: center;
|
|
119
|
+
margin-bottom: 50px;
|
|
120
|
+
}
|
|
121
|
+
h1 {
|
|
122
|
+
font-size: 3em;
|
|
123
|
+
margin-bottom: 20px;
|
|
124
|
+
color: #60a5fa;
|
|
125
|
+
}
|
|
126
|
+
.subtitle {
|
|
127
|
+
font-size: 1.2em;
|
|
128
|
+
color: #94a3b8;
|
|
129
|
+
}
|
|
130
|
+
.stats-overview {
|
|
131
|
+
display: grid;
|
|
132
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
133
|
+
gap: 20px;
|
|
134
|
+
margin-bottom: 50px;
|
|
135
|
+
}
|
|
136
|
+
.overview-card {
|
|
137
|
+
background: rgba(30, 41, 59, 0.8);
|
|
138
|
+
padding: 20px;
|
|
139
|
+
border-radius: 10px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
border: 1px solid #334155;
|
|
142
|
+
}
|
|
143
|
+
.overview-number {
|
|
144
|
+
font-size: 2.5em;
|
|
145
|
+
font-weight: bold;
|
|
146
|
+
color: #60a5fa;
|
|
147
|
+
}
|
|
148
|
+
.overview-label {
|
|
149
|
+
color: #94a3b8;
|
|
150
|
+
margin-top: 5px;
|
|
151
|
+
}
|
|
152
|
+
.bucket-grid {
|
|
153
|
+
display: grid;
|
|
154
|
+
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
|
155
|
+
gap: 30px;
|
|
156
|
+
}
|
|
157
|
+
.bucket-card {
|
|
158
|
+
background: rgba(30, 41, 59, 0.8);
|
|
159
|
+
padding: 30px;
|
|
160
|
+
border-radius: 15px;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
transition: all 0.3s ease;
|
|
163
|
+
border: 2px solid #334155;
|
|
164
|
+
}
|
|
165
|
+
.bucket-card:hover {
|
|
166
|
+
transform: translateY(-5px);
|
|
167
|
+
box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
|
|
168
|
+
border-color: #60a5fa;
|
|
169
|
+
}
|
|
170
|
+
.bucket-header {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: 15px;
|
|
174
|
+
margin-bottom: 20px;
|
|
175
|
+
}
|
|
176
|
+
.bucket-emoji {
|
|
177
|
+
font-size: 2.5em;
|
|
178
|
+
}
|
|
179
|
+
.bucket-header h3 {
|
|
180
|
+
font-size: 1.8em;
|
|
181
|
+
color: #e2e8f0;
|
|
182
|
+
}
|
|
183
|
+
.bucket-stats {
|
|
184
|
+
display: flex;
|
|
185
|
+
gap: 20px;
|
|
186
|
+
margin-bottom: 20px;
|
|
187
|
+
padding: 15px;
|
|
188
|
+
background: rgba(15, 23, 42, 0.5);
|
|
189
|
+
border-radius: 8px;
|
|
190
|
+
}
|
|
191
|
+
.stat {
|
|
192
|
+
flex: 1;
|
|
193
|
+
text-align: center;
|
|
194
|
+
}
|
|
195
|
+
.stat-number {
|
|
196
|
+
font-size: 1.8em;
|
|
197
|
+
font-weight: bold;
|
|
198
|
+
color: #60a5fa;
|
|
199
|
+
}
|
|
200
|
+
.stat-label {
|
|
201
|
+
font-size: 0.9em;
|
|
202
|
+
color: #94a3b8;
|
|
203
|
+
}
|
|
204
|
+
.bucket-description {
|
|
205
|
+
color: #cbd5e1;
|
|
206
|
+
font-style: italic;
|
|
207
|
+
}
|
|
208
|
+
.framework-section {
|
|
209
|
+
margin-top: 60px;
|
|
210
|
+
padding: 40px;
|
|
211
|
+
background: rgba(30, 41, 59, 0.6);
|
|
212
|
+
border-radius: 15px;
|
|
213
|
+
border: 1px solid #334155;
|
|
214
|
+
}
|
|
215
|
+
.framework-section h2 {
|
|
216
|
+
color: #60a5fa;
|
|
217
|
+
margin-bottom: 20px;
|
|
218
|
+
}
|
|
219
|
+
.framework-section p {
|
|
220
|
+
margin-bottom: 15px;
|
|
221
|
+
color: #cbd5e1;
|
|
222
|
+
}
|
|
223
|
+
</style>
|
|
224
|
+
</head>
|
|
225
|
+
<body>
|
|
226
|
+
<div class="container">
|
|
227
|
+
<div class="header">
|
|
228
|
+
<h1>π§ Cognitive Workflow Dashboard</h1>
|
|
229
|
+
<p class="subtitle">Tool = Identity = Mindset</p>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div class="stats-overview">
|
|
233
|
+
<div class="overview-card">
|
|
234
|
+
<div class="overview-number">${analysis.totalCommits}</div>
|
|
235
|
+
<div class="overview-label">Total Commits</div>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="overview-card">
|
|
238
|
+
<div class="overview-number">${analysis.daysAnalyzed}</div>
|
|
239
|
+
<div class="overview-label">Days Analyzed</div>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="overview-card">
|
|
242
|
+
<div class="overview-number">6</div>
|
|
243
|
+
<div class="overview-label">Cognitive Identities</div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<div class="bucket-grid">
|
|
248
|
+
${identitiesHtml}
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div class="framework-section">
|
|
252
|
+
<h2>Core Principle: Tool = Identity = Mindset</h2>
|
|
253
|
+
<p>Each terminal isn't just a toolβit's a <strong>cognitive identity you step into</strong>.
|
|
254
|
+
The muscle memory isn't "Kitty = email," it's "Kitty = I am the person who runs the business."</p>
|
|
255
|
+
|
|
256
|
+
<p style="margin-top: 20px;"><strong>The Flywheel Effect:</strong> Each identity's outputs become inputs for other identities.
|
|
257
|
+
Builder creates β Teacher documents β Strategist positions β Operator executes β Discoverer researches β Experimenter validates β repeat.</p>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</body>
|
|
261
|
+
</html>`;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function getRoomTemplate(identity, data, totalCommits) {
|
|
265
|
+
const meta = IDENTITY_METADATA[identity];
|
|
266
|
+
|
|
267
|
+
return `<!DOCTYPE html>
|
|
268
|
+
<html lang="en">
|
|
269
|
+
<head>
|
|
270
|
+
<meta charset="UTF-8">
|
|
271
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
272
|
+
<title>${meta.emoji} ${meta.name}'s Room | ${meta.terminal}</title>
|
|
273
|
+
<style>
|
|
274
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
275
|
+
body {
|
|
276
|
+
font-family: 'SF Mono', 'Monaco', monospace;
|
|
277
|
+
background: ${meta.bgGradient};
|
|
278
|
+
color: #eaeaea;
|
|
279
|
+
padding: 40px;
|
|
280
|
+
line-height: 1.6;
|
|
281
|
+
}
|
|
282
|
+
.container {
|
|
283
|
+
max-width: 1400px;
|
|
284
|
+
margin: 0 auto;
|
|
285
|
+
background: rgba(0, 0, 0, 0.6);
|
|
286
|
+
border-radius: 15px;
|
|
287
|
+
padding: 40px;
|
|
288
|
+
border: 2px solid ${meta.color};
|
|
289
|
+
}
|
|
290
|
+
.header {
|
|
291
|
+
text-align: center;
|
|
292
|
+
margin-bottom: 50px;
|
|
293
|
+
padding-bottom: 30px;
|
|
294
|
+
border-bottom: 3px solid ${meta.color};
|
|
295
|
+
}
|
|
296
|
+
.identity-declaration {
|
|
297
|
+
font-size: 3.5em;
|
|
298
|
+
font-weight: 900;
|
|
299
|
+
color: ${meta.color};
|
|
300
|
+
text-shadow: 0 0 20px ${meta.color}80;
|
|
301
|
+
margin-bottom: 15px;
|
|
302
|
+
}
|
|
303
|
+
.tagline {
|
|
304
|
+
font-size: 2em;
|
|
305
|
+
color: ${meta.color}cc;
|
|
306
|
+
margin-bottom: 15px;
|
|
307
|
+
font-style: italic;
|
|
308
|
+
}
|
|
309
|
+
.stats {
|
|
310
|
+
display: grid;
|
|
311
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
312
|
+
gap: 20px;
|
|
313
|
+
margin-bottom: 40px;
|
|
314
|
+
}
|
|
315
|
+
.stat-card {
|
|
316
|
+
background: ${meta.color}20;
|
|
317
|
+
padding: 20px;
|
|
318
|
+
border-radius: 10px;
|
|
319
|
+
border: 1px solid ${meta.color};
|
|
320
|
+
text-align: center;
|
|
321
|
+
}
|
|
322
|
+
.stat-number {
|
|
323
|
+
font-size: 2.5em;
|
|
324
|
+
font-weight: bold;
|
|
325
|
+
color: ${meta.color};
|
|
326
|
+
}
|
|
327
|
+
.stat-label {
|
|
328
|
+
color: #cbd5e1;
|
|
329
|
+
margin-top: 5px;
|
|
330
|
+
}
|
|
331
|
+
.back-link {
|
|
332
|
+
display: inline-block;
|
|
333
|
+
background: ${meta.color};
|
|
334
|
+
color: #000;
|
|
335
|
+
padding: 15px 30px;
|
|
336
|
+
border-radius: 10px;
|
|
337
|
+
text-decoration: none;
|
|
338
|
+
font-weight: bold;
|
|
339
|
+
margin-top: 40px;
|
|
340
|
+
}
|
|
341
|
+
.section {
|
|
342
|
+
margin-bottom: 40px;
|
|
343
|
+
}
|
|
344
|
+
h2 {
|
|
345
|
+
color: ${meta.color};
|
|
346
|
+
margin-bottom: 20px;
|
|
347
|
+
}
|
|
348
|
+
.insight-box {
|
|
349
|
+
background: ${meta.color}20;
|
|
350
|
+
padding: 20px;
|
|
351
|
+
border-radius: 10px;
|
|
352
|
+
margin: 15px 0;
|
|
353
|
+
border: 1px solid ${meta.color};
|
|
354
|
+
}
|
|
355
|
+
</style>
|
|
356
|
+
</head>
|
|
357
|
+
<body>
|
|
358
|
+
<div class="container">
|
|
359
|
+
<div class="header">
|
|
360
|
+
<div class="identity-declaration">${meta.emoji} I AM THE ${meta.name.toUpperCase()}</div>
|
|
361
|
+
<div class="tagline">"${meta.tagline}"</div>
|
|
362
|
+
<p style="font-size: 1.2em; color: #cbd5e1;">
|
|
363
|
+
${meta.terminal} β’ ${meta.niche}
|
|
364
|
+
</p>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div class="stats">
|
|
368
|
+
<div class="stat-card">
|
|
369
|
+
<div class="stat-number">${data.commits}</div>
|
|
370
|
+
<div class="stat-label">Total Commits</div>
|
|
371
|
+
</div>
|
|
372
|
+
<div class="stat-card">
|
|
373
|
+
<div class="stat-number">${data.percentage}%</div>
|
|
374
|
+
<div class="stat-label">Of All Work</div>
|
|
375
|
+
</div>
|
|
376
|
+
<div class="stat-card">
|
|
377
|
+
<div class="stat-number">${data.commitsPerDay}</div>
|
|
378
|
+
<div class="stat-label">Commits/Day Avg</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
|
|
382
|
+
<div class="section">
|
|
383
|
+
<h2>Recent Activity</h2>
|
|
384
|
+
${data.recentCommits.map(c => `
|
|
385
|
+
<div class="insight-box">
|
|
386
|
+
<strong>${c.hash}</strong> - ${c.message}<br>
|
|
387
|
+
<small style="color: #94a3b8;">${c.author} β’ ${new Date(c.date).toLocaleDateString()}</small>
|
|
388
|
+
</div>
|
|
389
|
+
`).join('')}
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<a href="cognitive-dashboard.html" class="back-link">β Back to Dashboard</a>
|
|
393
|
+
</div>
|
|
394
|
+
</body>
|
|
395
|
+
</html>`;
|
|
396
|
+
}
|