@the-bearded-bear/claude-craft 7.35.0 → 8.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/Dev/scripts/install-php-rules.sh +1 -1
- package/Dev/scripts/validate-skills-spec.sh +121 -0
- package/README.md +13 -11
- package/cli/index.js +6 -0
- package/cli/kanban/client/index.html +17 -0
- package/cli/kanban/client/src/App.svelte +106 -0
- package/cli/kanban/client/src/app.css +175 -0
- package/cli/kanban/client/src/lib/router.svelte.js +19 -0
- package/cli/kanban/client/src/lib/store.svelte.js +132 -0
- package/cli/kanban/client/src/main.js +6 -0
- package/cli/kanban/client/src/views/BacklogView.svelte +344 -0
- package/cli/kanban/client/src/views/BurndownView.svelte +189 -0
- package/cli/kanban/client/src/views/DepsView.svelte +334 -0
- package/cli/kanban/client/src/views/DocsView.svelte +451 -0
- package/cli/kanban/client/src/views/KanbanView.svelte +227 -0
- package/cli/kanban/client/vite.config.js +21 -0
- package/cli/kanban/server/app.js +201 -0
- package/cli/kanban/server/middleware/security.js +53 -0
- package/cli/kanban/server/services/event-bus.js +33 -0
- package/cli/kanban/server/services/file-scanner.js +113 -0
- package/cli/kanban/server/services/file-watcher.js +68 -0
- package/cli/kanban/server/services/file-writer.js +107 -0
- package/cli/kanban/server/services/frontmatter.js +55 -0
- package/cli/kanban/server/services/repository.js +173 -0
- package/cli/kanban/server/services/sprint-cache.js +208 -0
- package/cli/kanban/server/services/state-machine.js +156 -0
- package/cli/kanban/shared/schemas.js +127 -0
- package/cli/lib/help.js +4 -0
- package/cli/lib/kanban.js +103 -0
- package/package.json +21 -3
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import cytoscape from 'cytoscape';
|
|
3
|
+
import dagre from 'cytoscape-dagre';
|
|
4
|
+
|
|
5
|
+
cytoscape.use(dagre);
|
|
6
|
+
|
|
7
|
+
let graphContainer = $state(null);
|
|
8
|
+
let cyInstance = $state(null);
|
|
9
|
+
let nodes = $state([]);
|
|
10
|
+
let edges = $state([]);
|
|
11
|
+
let cycles = $state([]);
|
|
12
|
+
let selectedNode = $state(null);
|
|
13
|
+
let loading = $state(true);
|
|
14
|
+
let error = $state(null);
|
|
15
|
+
|
|
16
|
+
const stats = $derived({
|
|
17
|
+
nodes: nodes.length,
|
|
18
|
+
edges: edges.length,
|
|
19
|
+
cycles: cycles.length,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
async function loadDependencies() {
|
|
23
|
+
loading = true;
|
|
24
|
+
error = null;
|
|
25
|
+
try {
|
|
26
|
+
const res = await fetch('/api/dependencies');
|
|
27
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
28
|
+
const data = await res.json();
|
|
29
|
+
nodes = data.nodes || [];
|
|
30
|
+
edges = data.edges || [];
|
|
31
|
+
cycles = data.cycles || [];
|
|
32
|
+
} catch (err) {
|
|
33
|
+
error = err.message;
|
|
34
|
+
} finally {
|
|
35
|
+
loading = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getStatusColor(status) {
|
|
40
|
+
const colors = {
|
|
41
|
+
backlog: 'var(--fg-dim)',
|
|
42
|
+
'ready-for-dev': 'var(--info)',
|
|
43
|
+
'in-progress': 'var(--warn)',
|
|
44
|
+
review: 'var(--accent)',
|
|
45
|
+
done: 'var(--ok)',
|
|
46
|
+
blocked: 'var(--danger)',
|
|
47
|
+
};
|
|
48
|
+
return colors[status] || 'var(--fg-dim)';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function isInCycle(nodeId) {
|
|
52
|
+
return cycles.some((cycle) => cycle.includes(nodeId));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$effect(() => {
|
|
56
|
+
loadDependencies();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
$effect(() => {
|
|
60
|
+
if (!graphContainer || nodes.length === 0 || !edges || cyInstance) return;
|
|
61
|
+
|
|
62
|
+
const cycleSet = new Set(cycles.flat());
|
|
63
|
+
|
|
64
|
+
const elements = [
|
|
65
|
+
...nodes.map((n) => ({
|
|
66
|
+
data: { id: n.id, label: n.id },
|
|
67
|
+
classes: cycleSet.has(n.id) ? 'in-cycle' : '',
|
|
68
|
+
})),
|
|
69
|
+
...edges.map((e) => ({
|
|
70
|
+
data: { source: e.from, target: e.to },
|
|
71
|
+
})),
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const cy = cytoscape({
|
|
75
|
+
container: graphContainer,
|
|
76
|
+
elements,
|
|
77
|
+
style: [
|
|
78
|
+
{
|
|
79
|
+
selector: 'node',
|
|
80
|
+
style: {
|
|
81
|
+
label: 'data(label)',
|
|
82
|
+
shape: 'round-rectangle',
|
|
83
|
+
'background-color': (ele) => {
|
|
84
|
+
const node = nodes.find((n) => n.id === ele.id());
|
|
85
|
+
return node ? getStatusColor(node.status) : 'var(--fg-dim)';
|
|
86
|
+
},
|
|
87
|
+
color: 'var(--bg)',
|
|
88
|
+
'text-valign': 'center',
|
|
89
|
+
'text-halign': 'center',
|
|
90
|
+
'font-size': '11px',
|
|
91
|
+
'font-weight': '600',
|
|
92
|
+
'font-family': 'var(--mono)',
|
|
93
|
+
width: 'label',
|
|
94
|
+
height: 'label',
|
|
95
|
+
'padding-left': '8px',
|
|
96
|
+
'padding-right': '8px',
|
|
97
|
+
'padding-top': '6px',
|
|
98
|
+
'padding-bottom': '6px',
|
|
99
|
+
'border-width': 1,
|
|
100
|
+
'border-color': 'var(--border)',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
selector: 'node.in-cycle',
|
|
105
|
+
style: {
|
|
106
|
+
'border-width': 3,
|
|
107
|
+
'border-color': 'var(--danger)',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
selector: 'edge',
|
|
112
|
+
style: {
|
|
113
|
+
width: 1.5,
|
|
114
|
+
'line-color': 'var(--fg-dim)',
|
|
115
|
+
'target-arrow-color': 'var(--fg-dim)',
|
|
116
|
+
'target-arrow-shape': 'triangle',
|
|
117
|
+
'curve-style': 'bezier',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
layout: {
|
|
122
|
+
name: 'dagre',
|
|
123
|
+
rankDir: 'LR',
|
|
124
|
+
spacingFactor: 1.3,
|
|
125
|
+
nodeDimensionsIncludeLabels: true,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
cy.on('tap', 'node', (evt) => {
|
|
130
|
+
const nodeId = evt.target.id();
|
|
131
|
+
const nodeData = nodes.find((n) => n.id === nodeId);
|
|
132
|
+
if (nodeData) {
|
|
133
|
+
selectedNode = nodeData;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
cyInstance = cy;
|
|
138
|
+
|
|
139
|
+
return () => {
|
|
140
|
+
if (cyInstance) {
|
|
141
|
+
cyInstance.destroy();
|
|
142
|
+
cyInstance = null;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
{#if loading}
|
|
149
|
+
<div class="empty">Loading dependencies...</div>
|
|
150
|
+
{:else if error}
|
|
151
|
+
<div class="empty" style="color: var(--danger)">Error: {error}</div>
|
|
152
|
+
{:else if nodes.length === 0}
|
|
153
|
+
<div class="empty">No dependencies found</div>
|
|
154
|
+
{:else}
|
|
155
|
+
<div class="deps-container">
|
|
156
|
+
<header class="deps-header">
|
|
157
|
+
<span class="stat">Nodes: {stats.nodes}</span>
|
|
158
|
+
<span class="stat">Edges: {stats.edges}</span>
|
|
159
|
+
<span class="stat" class:danger={stats.cycles > 0}>
|
|
160
|
+
Cycles: {stats.cycles}
|
|
161
|
+
</span>
|
|
162
|
+
</header>
|
|
163
|
+
|
|
164
|
+
<div class="deps-content">
|
|
165
|
+
<div
|
|
166
|
+
class="graph"
|
|
167
|
+
bind:this={graphContainer}
|
|
168
|
+
role="img"
|
|
169
|
+
aria-label="Dependency graph with {stats.nodes} nodes, {stats.edges} edges, and {stats.cycles} cycles"
|
|
170
|
+
></div>
|
|
171
|
+
|
|
172
|
+
{#if selectedNode}
|
|
173
|
+
<aside class="node-details">
|
|
174
|
+
<header class="details-header">
|
|
175
|
+
<strong>{selectedNode.id}</strong>
|
|
176
|
+
<button
|
|
177
|
+
class="close-btn"
|
|
178
|
+
onclick={() => (selectedNode = null)}
|
|
179
|
+
aria-label="Close details"
|
|
180
|
+
>
|
|
181
|
+
×
|
|
182
|
+
</button>
|
|
183
|
+
</header>
|
|
184
|
+
<dl>
|
|
185
|
+
<dt>Title</dt>
|
|
186
|
+
<dd>{selectedNode.title || 'N/A'}</dd>
|
|
187
|
+
<dt>Status</dt>
|
|
188
|
+
<dd>
|
|
189
|
+
<span
|
|
190
|
+
class="badge"
|
|
191
|
+
style="background-color: {getStatusColor(selectedNode.status)}"
|
|
192
|
+
>
|
|
193
|
+
{selectedNode.status}
|
|
194
|
+
</span>
|
|
195
|
+
</dd>
|
|
196
|
+
{#if selectedNode.epic_id}
|
|
197
|
+
<dt>Epic</dt>
|
|
198
|
+
<dd class="epic">{selectedNode.epic_id}</dd>
|
|
199
|
+
{/if}
|
|
200
|
+
{#if isInCycle(selectedNode.id)}
|
|
201
|
+
<dt>Warning</dt>
|
|
202
|
+
<dd style="color: var(--danger)">Part of a dependency cycle</dd>
|
|
203
|
+
{/if}
|
|
204
|
+
</dl>
|
|
205
|
+
</aside>
|
|
206
|
+
{/if}
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="sr-only">
|
|
210
|
+
<h2>Dependency edges (text fallback)</h2>
|
|
211
|
+
<ul>
|
|
212
|
+
{#each edges as edge}
|
|
213
|
+
<li>{edge.from} depends on {edge.to}</li>
|
|
214
|
+
{/each}
|
|
215
|
+
</ul>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
{/if}
|
|
219
|
+
|
|
220
|
+
<style>
|
|
221
|
+
.deps-container {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: 12px;
|
|
225
|
+
height: 100%;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.deps-header {
|
|
229
|
+
display: flex;
|
|
230
|
+
gap: 16px;
|
|
231
|
+
font-size: 13px;
|
|
232
|
+
font-weight: 600;
|
|
233
|
+
color: var(--fg-dim);
|
|
234
|
+
font-family: var(--mono);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.stat.danger {
|
|
238
|
+
color: var(--danger);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.deps-content {
|
|
242
|
+
display: flex;
|
|
243
|
+
gap: 12px;
|
|
244
|
+
flex: 1;
|
|
245
|
+
min-height: 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.graph {
|
|
249
|
+
flex: 1;
|
|
250
|
+
min-height: 600px;
|
|
251
|
+
background: var(--bg-elev);
|
|
252
|
+
border: 1px solid var(--border);
|
|
253
|
+
border-radius: var(--radius);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.node-details {
|
|
257
|
+
width: 280px;
|
|
258
|
+
background: var(--bg-elev);
|
|
259
|
+
border: 1px solid var(--border);
|
|
260
|
+
border-radius: var(--radius);
|
|
261
|
+
padding: 0;
|
|
262
|
+
overflow-y: auto;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.details-header {
|
|
266
|
+
display: flex;
|
|
267
|
+
justify-content: space-between;
|
|
268
|
+
align-items: center;
|
|
269
|
+
padding: 12px;
|
|
270
|
+
border-bottom: 1px solid var(--border);
|
|
271
|
+
font-weight: 600;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.close-btn {
|
|
275
|
+
background: none;
|
|
276
|
+
border: none;
|
|
277
|
+
font-size: 24px;
|
|
278
|
+
line-height: 1;
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
color: var(--fg-dim);
|
|
281
|
+
padding: 0;
|
|
282
|
+
width: 24px;
|
|
283
|
+
height: 24px;
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
justify-content: center;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.close-btn:hover {
|
|
290
|
+
color: var(--fg);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
dl {
|
|
294
|
+
padding: 12px;
|
|
295
|
+
margin: 0;
|
|
296
|
+
display: grid;
|
|
297
|
+
grid-template-columns: auto 1fr;
|
|
298
|
+
gap: 8px 12px;
|
|
299
|
+
font-size: 13px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
dt {
|
|
303
|
+
font-weight: 600;
|
|
304
|
+
color: var(--fg-dim);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
dd {
|
|
308
|
+
margin: 0;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.badge {
|
|
312
|
+
display: inline-block;
|
|
313
|
+
padding: 2px 8px;
|
|
314
|
+
border-radius: 4px;
|
|
315
|
+
font-size: 11px;
|
|
316
|
+
font-weight: 600;
|
|
317
|
+
color: var(--bg);
|
|
318
|
+
font-family: var(--mono);
|
|
319
|
+
text-transform: uppercase;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.epic {
|
|
323
|
+
font-family: var(--mono);
|
|
324
|
+
font-size: 12px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.sr-only {
|
|
328
|
+
position: absolute;
|
|
329
|
+
width: 1px;
|
|
330
|
+
height: 1px;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
clip: rect(0 0 0 0);
|
|
333
|
+
}
|
|
334
|
+
</style>
|