-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworkflow-explorer.html
More file actions
5436 lines (5210 loc) · 382 KB
/
workflow-explorer.html
File metadata and controls
5436 lines (5210 loc) · 382 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
WORKFLOW EXPLORER — Single-file interactive explorer for the 6-phase technical workflow system.
Architecture:
Inline CSS + JS. dagre.js CDN for auto-layout. marked.js CDN for markdown rendering.
SVG canvas rendering. No build step, no framework — open directly in a browser.
Data structures:
FLOWCHARTS — node/connection definitions per phase/skill/command (dagre-compatible: w/h, no x/y)
OVERVIEW_NODES — hand-positioned nodes for the top-level pipeline view
OVERVIEW_CONNECTIONS — connections between overview nodes
phases — metadata per phase (color, cmd, label, complexity, etc.)
FLOWCHART_DESCS — rich descriptions shown in the info bar
SKILL_NEXT_PHASE — maps skill flowchart keys to their next workflow phase (label, target, color)
SOURCE_MAP — maps flowchart keys to repo-relative source file paths for markdown viewer
Navigation model:
Sidebar-driven. Two view functions + markdown viewer + info panel:
showOverview() — pipeline view (OVERVIEW_NODES)
selectPhase(phase) — flowchart view (FLOWCHARTS[phase])
openInfoPanel() — open info slide-over for current flowchart
openMdViewer(key) — open markdown viewer for a flowchart's source file
Markdown viewer:
Slide-over panel (65% width, 100% on mobile, z-index 30). Fetches .md files from GitHub raw URL,
strips YAML frontmatter, renders via marked.parse(). Relative .md links are intercepted and
navigated within the viewer. Breadcrumb trail with scroll position memory for back navigation.
In-memory _mdCache for fetched content. Opened via "Source" button in info bar or </> in tooltip.
Layout:
CSS grid: 300px sidebar + flexible canvas area. Info panel slides over canvas (fixed positioned).
Canvas takes full height. Sidebar fixed overlay with margin push.
Rendering:
renderSVG() draws all views into <svg id="svg-canvas">.
computeFlowchartLayout(key) runs dagre and caches results in _layoutCache.
Symmetric viewBox calculation: computes minX/minY/maxX/maxY from all nodes, applies equal padding.
Zoom/pan via viewBox manipulation (wheel + drag + touch).
Flowchart data:
Manual JS objects — not generated. dagre handles positioning only.
To modify a flowchart, update FLOWCHARTS[key].nodes and .connections.
Node shapes: pill = start/end, diamond = decision, stop = hard-cornered terminal (STOP/BLOCK), rect = action step.
Connection types map to colors + arrow markers (yes=green, no=red, transition=orange dashed, backloop=gray dashed).
Diamond edge routing (IMPORTANT):
Dagre calculates waypoints to route edges around obstacles. However, adding a `port` hint (e.g., port: 'lower-left')
causes the rendering code to DISCARD dagre's waypoints and draw a straight line instead (see hasPortHint check in renderSVG).
This is intentional for simple direct edges but breaks edges that need to route around intermediate nodes.
Rules:
- Do NOT add `port` hints to edges that need to route around obstacles (e.g., "no" paths that skip multiple nodes)
- The automatic port assignment in computeDiamondPorts() distributes edges based on target node x-positions (left-to-right)
- `type: 'backloop'` edges are exempt — they always keep dagre's waypoints regardless of port hints
- Use `weight: 2` on the main flow path to influence dagre's node placement (heavier = more direct routing)
Node color system (type-based, not phase-based — CSS vars in :root):
- var(--action) sky blue — primary work steps (validate, extract, etc.)
- var(--agent) cyan — agent invocation nodes (with optional skillLink to agent flowchart)
- var(--text-dim) gray — utility/support steps (read existing, load format, etc.)
- var(--ask) purple — user interaction nodes
- var(--routing) amber — non-blocking decision diamonds
- var(--gate) red — STOP/BLOCK nodes (hard-cornered rects), refresh-cache
- var(--discovery) green — discovery script execution
- var(--skill) orange — skill invocation nodes (rect, with skillLink)
- var(--next) blue — next-phase navigation nodes (rect, command color, same shape as agent nodes)
- var(--accent) blue — entry points, migrations, git commits
- var(--{phase}) phase color — output artifact pills only (keeps phase identity)
Conventions:
- Clicking flowchart nodes with `desc` shows a tooltip; nodes with `skillLink` show tooltip first with a navigation link.
- Overview nodes with `phase` are clickable and route to selectPhase().
- The info panel (ⓘ button) shows contextual info for the current flowchart.
- Skill flowcharts (except skill-review) have a `next` rect node at the end, command blue (var(--next)),
connected from `end` via `type: 'transition'`, using `skillLink` for navigation. Badges (AGT/SKL/CMD) auto-render.
- SOURCE_MAP must be updated when source files are renamed or added.
Key sections (search terms):
CSS: "/* Info panel */" "/* Markdown viewer */"
Data: "const FLOWCHARTS" "const SOURCE_MAP" "const SKILL_NEXT_PHASE" "const FLOWCHART_DESCS"
Rendering: "function renderSVG" "function computeFlowchartLayout"
Interaction: "function showFcTooltip" "function openInfoPanel" "function openMdViewer"
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Agentic Workflows Explorer</title>
<style>
:root {
--bg: #0f1117;
--surface: #1a1d27;
--surface2: #242836;
--border: #2e3345;
--text: #e1e4ed;
--text-dim: #8b90a0;
--accent: #6c8aff;
/* Phase colors */
--research: #a78bfa;
--discussion: #60a5fa;
--specification: #34d399;
--planning: #fbbf24;
--implementation: #f97316;
--review: #f472b6;
--investigation: #fb923c;
/* Softer fills */
--research-bg: rgba(167,139,250,0.12);
--discussion-bg: rgba(96,165,250,0.12);
--specification-bg: rgba(52,211,153,0.12);
--planning-bg: rgba(251,191,36,0.12);
--implementation-bg: rgba(249,115,22,0.12);
--review-bg: rgba(244,114,182,0.12);
--investigation-bg: rgba(251,146,60,0.12);
/* Node type colors */
--action: #38bdf8;
--action-bg: rgba(56,189,248,0.12);
--ask: #a78bfa;
--ask-bg: rgba(167,139,250,0.15);
--routing: #fbbf24;
--routing-bg: rgba(251,191,36,0.15);
--gate: #f43f5e;
--gate-bg: rgba(244,63,94,0.15);
--discovery: #34d399;
--discovery-bg: rgba(52,211,153,0.15);
--skill: #f97316;
--skill-bg: rgba(249,115,22,0.15);
--next: #6c8aff;
--next-bg: rgba(108,138,255,0.15);
--agent: #22d3ee;
--agent-bg: rgba(34,211,238,0.15);
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
height: 100vh;
overflow: hidden;
}
.layout {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
height: 100vh;
}
/* Sidebar — fixed overlay, pushes content via margin */
.sidebar {
position: fixed;
top: 0; left: 0; bottom: 0;
width: 300px;
z-index: 40;
background: var(--surface);
border-right: 1px solid var(--border);
overflow-y: auto;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
padding: 16px;
transform: translateX(0);
transition: transform 0.2s ease;
}
.sidebar h1 {
font-size: 15px;
font-weight: 700;
margin-bottom: 4px;
color: var(--text);
}
.sidebar .subtitle {
font-size: 11px;
color: var(--text-dim);
margin-bottom: 16px;
}
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
.section-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 1.2px;
color: var(--text-dim);
margin: 16px 0 8px;
font-weight: 600;
display: flex;
align-items: center;
gap: 6px;
}
.section-label.collapsible { cursor: pointer; user-select: none; }
.section-label.collapsible:hover { color: var(--text); }
.section-label .chevron { font-size: 8px; transition: transform 0.15s; display: inline-block; }
.section-label.collapsed .chevron { transform: rotate(-90deg); }
.collapsible-content { overflow: hidden; }
.collapsible-content.collapsed { display: none; }
/* Timeline pipeline */
.tl-wrapper { position: relative; padding-left: 24px; }
.tl-group { position: relative; margin-bottom: 2px; }
.tl-group:not(:last-child)::after {
content: ''; position: absolute; left: -16px; top: 14px; bottom: -3px;
width: 2px; background: var(--border); z-index: 0;
}
.tl-group:not(:first-child)::before {
content: ''; position: absolute; left: -16px; top: -1px; height: 17px;
width: 2px; background: var(--border); z-index: 0;
}
.tl-dot {
position: absolute; left: -21px; top: 9px;
width: 12px; height: 12px; border-radius: 50%;
border: 2px solid var(--surface); z-index: 1;
}
.tl-cmd {
display: flex; align-items: center; gap: 10px; width: 100%;
padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
background: var(--surface2); color: var(--text); cursor: pointer;
font-size: 13px; transition: all 0.15s; text-align: left; margin-bottom: 2px;
}
.tl-cmd:hover { border-color: var(--accent); }
.tl-cmd.active { border-color: var(--accent); background: rgba(108,138,255,0.1); }
.tl-cmd .name { font-weight: 600; font-size: 12px; flex: 1; }
.tl-skill {
display: flex; align-items: center; gap: 6px;
width: calc(100% - 16px); margin-left: 16px;
padding: 5px 8px; border: 1px solid var(--border); border-radius: 5px;
background: transparent; color: var(--text-dim); cursor: pointer;
font-size: 11px; font-family: monospace; margin-bottom: 4px; margin-top: 1px;
transition: all 0.15s; text-align: left; position: relative;
}
.tl-skill:hover { border-color: var(--accent); color: var(--text); background: var(--surface2); }
.tl-skill.active { border-color: var(--accent); color: var(--text); background: rgba(108,138,255,0.1); }
.tl-skill::before {
content: ''; position: absolute; left: -10px; top: 50%;
width: 7px; height: 1px; background: var(--border);
}
.tl-skill::after {
content: ''; position: absolute; left: -10px; top: -3px;
width: 1px; height: calc(50% + 3px); background: var(--border);
}
.tl-skill .skill-label { flex: 1; }
/* Badges */
.badge {
font-size: 8px; font-weight: 700; text-transform: uppercase;
letter-spacing: 0.5px; padding: 2px 5px; border-radius: 3px; flex-shrink: 0;
font-family: -apple-system, system-ui, sans-serif;
}
.badge-cmd { background: rgba(108,138,255,0.15); color: var(--accent); }
.badge-skl { background: rgba(249,115,22,0.15); color: #f97316; }
.badge-agt { background: rgba(34,211,238,0.15); color: #22d3ee; }
/* Dropdown items */
.dropdown-btn {
display: flex; align-items: center; gap: 8px; width: 100%;
padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
background: var(--surface2); color: var(--text); cursor: pointer;
font-size: 12px; margin-bottom: 4px; text-align: left;
transition: all 0.15s; font-family: monospace;
}
.dropdown-btn:hover { border-color: var(--accent); }
.dropdown-btn.active { border-color: var(--accent); background: rgba(108,138,255,0.1); }
.dropdown-btn .btn-label { flex: 1; }
.dropdown-subheading {
font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
color: var(--text-dim); margin: 10px 0 6px; font-weight: 600; opacity: 0.7;
}
.dropdown-subheading:first-child { margin-top: 4px; }
/* Sidebar footer */
.sidebar-footer {
position: sticky; bottom: -16px;
margin: 20px -16px -16px; padding: 10px 16px 14px;
border-top: 1px solid var(--border); background: var(--surface);
text-align: center; font-size: 11px; color: var(--text-dim);
line-height: 1.6; z-index: 2;
}
.sidebar-footer a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.sidebar-footer a:hover { color: var(--accent); }
.sidebar-footer .repo-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; margin-bottom: 4px; }
.sidebar-footer .credit { font-size: 10px; opacity: 0.7; }
/* Legend */
.legend { margin-top: 16px; }
.legend-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 11px;
color: var(--text-dim);
margin-bottom: 4px;
}
.legend-icon {
width: 28px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.legend-line {
width: 28px; height: 3px; border-radius: 2px;
}
.legend-line.dashed { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); }
.legend-shape {
width: 14px; height: 14px; border-radius: 3px; border: 1px solid;
}
.legend-shape-diamond {
width: 12px; height: 12px; border: 1px solid;
transform: rotate(45deg);
}
.legend-shape-pill {
width: 24px; height: 12px; border-radius: 6px; border: 1px solid;
}
.nav-btn.dimmed {
opacity: 0.35;
pointer-events: none;
}
/* Sidebar toggle */
.sidebar-toggle {
position: absolute;
top: 12px; left: 12px;
z-index: 15;
width: 28px; height: 28px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
transition: border-color 0.15s;
}
.sidebar-toggle:hover { border-color: var(--accent); }
/* Sidebar collapse — fixed sidebar + margin push on content */
.layout .canvas-area {
margin-left: 300px;
transition: margin-left 0.2s ease;
}
.layout.sidebar-collapsed .sidebar {
transform: translateX(-300px);
}
.layout.sidebar-collapsed .canvas-area {
margin-left: 0;
}
/* Sidebar backdrop (mobile overlay) */
.sidebar-backdrop {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
z-index: 38;
}
.sidebar-backdrop.visible {
display: block;
}
/* Mobile — pure overlay, no margin push */
@media (max-width: 768px) {
.layout .canvas-area {
margin-left: 0;
}
}
/* Main canvas */
.canvas-area {
position: relative;
overflow: hidden;
background: var(--bg);
touch-action: none;
}
.canvas-area svg {
width: 100%;
height: 100%;
}
/* Zoom controls */
.zoom-controls {
position: absolute;
bottom: 12px; left: 12px;
display: flex;
gap: 4px;
z-index: 5;
}
.zoom-btn {
width: 32px; height: 32px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.zoom-btn:hover { border-color: var(--accent); }
.zoom-btn-context { margin-left: 4px; }
.zoom-btn-context.disabled { opacity: 0.3; pointer-events: none; }
@media (max-width: 768px) {
.zoom-btn { width: 44px; height: 44px; font-size: 20px; }
.zoom-controls { gap: 6px; }
.sidebar-toggle { width: 44px; height: 44px; }
}
/* Overview nav button */
.nav-overview {
display: block;
width: 100%;
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface2);
color: var(--text);
cursor: pointer;
font-size: 12px;
margin-bottom: 16px;
transition: all 0.15s;
text-align: left;
}
.nav-overview:hover { border-color: var(--accent); }
.nav-overview.active { border-color: var(--accent); background: rgba(108,138,255,0.1); }
/* Tooltip */
.tooltip {
position: absolute;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 6px;
padding: 8px 12px;
font-size: 12px;
color: var(--text);
pointer-events: none;
z-index: 20;
max-width: 260px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
opacity: 0;
transition: opacity 0.15s;
}
.tooltip.show { opacity: 1; }
/* Flowchart node tooltip (click-to-describe) */
#fc-tooltip {
position: absolute;
display: none;
background: var(--surface);
border: 2px solid var(--border);
border-radius: 8px;
padding: 12px 16px;
max-width: 320px;
z-index: 25;
box-shadow: 0 6px 20px rgba(0,0,0,0.4);
pointer-events: auto;
}
#fc-tooltip-title {
font-size: 13px;
font-weight: 700;
margin-bottom: 6px;
color: var(--text);
}
#fc-tooltip-desc {
font-size: 12px;
line-height: 1.5;
color: var(--text-dim);
}
/* Info panel slide-over */
.info-panel-backdrop {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.2);
z-index: 29;
}
.info-panel-backdrop.visible { display: block; }
.info-panel {
position: fixed;
top: 0; right: 0;
width: 420px;
height: 100vh;
background: var(--surface);
border-left: 1px solid var(--border);
transform: translateX(100%);
transition: transform 0.2s ease;
z-index: 30;
display: flex;
flex-direction: column;
touch-action: pan-y;
overscroll-behavior: contain;
}
.info-panel.open { transform: translateX(0); }
.info-panel-header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.info-panel-title {
flex: 1;
font-size: 14px;
font-weight: 700;
color: var(--text);
}
.info-panel-close {
background: none; border: none;
color: var(--text-dim);
cursor: pointer;
font-size: 18px;
padding: 4px 8px;
flex-shrink: 0;
}
.info-panel-close:hover { color: var(--text); }
.info-panel-body {
flex: 1;
overflow-y: auto;
padding: 20px 24px 40px;
}
.info-panel-body .info-subtitle {
font-size: 11px;
color: var(--text-dim);
font-family: 'SF Mono', 'Fira Code', monospace;
margin-bottom: 14px;
}
.info-panel-body .info-summary {
font-size: 13px;
font-weight: 600;
color: var(--text);
line-height: 1.6;
margin-bottom: 12px;
}
.info-panel-body .info-desc {
font-size: 12.5px;
color: var(--text-dim);
line-height: 1.6;
}
.info-panel-body .info-desc p {
margin-bottom: 8px;
}
.info-panel-body .info-desc strong {
color: var(--text);
font-weight: 600;
}
.info-panel-body .info-desc code {
font-family: 'SF Mono', 'Fira Code', monospace;
font-size: 11px;
background: var(--surface2);
padding: 1px 5px;
border-radius: 3px;
color: var(--accent);
}
.info-panel-body .info-meta {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid var(--border);
font-size: 11px;
color: var(--text-dim);
}
.info-panel-body .info-meta span {
white-space: nowrap;
}
.info-panel-body .info-meta strong {
color: var(--text);
font-weight: 600;
}
.info-panel-source-btn {
display: inline-flex;
align-items: center;
gap: 6px;
margin-top: 16px;
padding: 6px 12px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface2);
color: var(--text-dim);
cursor: pointer;
font-size: 12px;
font-family: 'SF Mono', 'Fira Code', monospace;
transition: all 0.15s;
}
.info-panel-source-btn:hover { border-color: var(--accent); color: var(--text); }
@media (max-width: 768px) {
.info-panel { width: 100%; }
}
/* Markdown viewer slide-over */
.md-viewer-backdrop {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.3);
z-index: 34;
}
.md-viewer-backdrop.visible { display: block; }
.md-viewer {
position: fixed;
top: 0; right: 0;
width: 65%;
height: 100vh;
background: var(--surface);
border-left: 1px solid var(--border);
transform: translateX(100%);
transition: transform 0.2s ease;
z-index: 35;
display: flex;
flex-direction: column;
touch-action: pan-y;
overscroll-behavior: contain;
}
.md-viewer.open { transform: translateX(0); }
.md-viewer-header {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.md-viewer-back {
background: none; border: none;
color: var(--text-dim);
cursor: pointer;
font-size: 16px;
padding: 4px 8px;
border-radius: 4px;
}
.md-viewer-back:hover { color: var(--text); background: var(--surface2); }
.md-viewer-back:disabled { opacity: 0.3; pointer-events: none; }
.md-viewer-breadcrumb {
flex: 1;
font-size: 12px;
color: var(--text-dim);
font-family: 'SF Mono', 'Fira Code', monospace;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.md-viewer-breadcrumb span {
cursor: pointer;
color: var(--accent);
}
.md-viewer-breadcrumb span:hover { text-decoration: underline; }
.md-viewer-breadcrumb span.current {
color: var(--text);
cursor: default;
}
.md-viewer-breadcrumb span.current:hover { text-decoration: none; }
.md-viewer-github {
flex-shrink: 0;
background: none;
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-dim);
cursor: pointer;
font-size: 11px;
padding: 3px 8px;
text-decoration: none;
display: flex;
align-items: center;
gap: 4px;
transition: color 0.15s, border-color 0.15s;
}
.md-viewer-github:hover { color: var(--text); border-color: var(--text-dim); }
.md-viewer-close {
background: none; border: none;
color: var(--text-dim);
cursor: pointer;
font-size: 18px;
padding: 4px 8px;
flex-shrink: 0;
}
.md-viewer-close:hover { color: var(--text); }
.md-viewer-body {
flex: 1;
overflow-y: auto;
padding: 20px 24px 40px;
}
.md-viewer-body > :first-child { margin-top: 0; }
.md-viewer-body h1 { font-size: 20px; font-weight: 700; color: var(--text); margin: 24px 0 12px; }
.md-viewer-body h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 20px 0 10px; }
.md-viewer-body h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 16px 0 8px; }
.md-viewer-body h4 { font-size: 13px; font-weight: 600; color: var(--text-dim); margin: 12px 0 6px; }
.md-viewer-body p { font-size: 13px; line-height: 1.7; color: var(--text-dim); margin-bottom: 10px; }
.md-viewer-body ul, .md-viewer-body ol { font-size: 13px; line-height: 1.7; color: var(--text-dim); padding-left: 20px; margin-bottom: 10px; }
.md-viewer-body li { margin-bottom: 4px; }
.md-viewer-body code {
font-family: 'SF Mono', 'Fira Code', monospace;
font-size: 12px;
background: var(--surface2);
padding: 1px 5px;
border-radius: 3px;
color: var(--accent);
}
.md-viewer-body pre {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 12px 16px;
overflow-x: auto;
margin-bottom: 12px;
}
.md-viewer-body pre code { background: none; padding: 0; color: var(--text); }
.md-viewer-body blockquote {
border-left: 3px solid var(--accent);
padding-left: 12px;
margin: 10px 0;
color: var(--text-dim);
font-style: italic;
}
.md-viewer-body a { color: var(--accent); text-decoration: none; }
.md-viewer-body a:hover { text-decoration: underline; }
.md-viewer-body table { border-collapse: collapse; width: 100%; margin-bottom: 12px; font-size: 12px; }
.md-viewer-body th { text-align: left; padding: 6px 8px; background: var(--surface2); color: var(--text-dim); border-bottom: 1px solid var(--border); }
.md-viewer-body td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text); }
.md-viewer-body hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.md-viewer-body strong { color: var(--text); }
.md-viewer-loading { text-align: center; padding: 40px; color: var(--text-dim); font-size: 13px; }
.md-viewer-error { text-align: center; padding: 40px; color: #f43f5e; font-size: 13px; }
@media (max-width: 768px) {
.md-viewer { width: 100%; }
}
/* Source button in tooltip */
.fc-tooltip-source {
position: absolute;
top: 8px; right: 8px;
background: none; border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-dim);
cursor: pointer;
font-size: 10px;
font-family: 'SF Mono', 'Fira Code', monospace;
padding: 2px 6px;
display: none;
}
.fc-tooltip-source:hover { border-color: var(--accent); color: var(--text); }
.fc-tooltip-link {
display: none;
margin-top: 8px;
font-size: 11px;
font-weight: 600;
color: var(--accent);
cursor: pointer;
text-decoration: none;
opacity: 0.85;
}
.fc-tooltip-link:hover { opacity: 1; text-decoration: underline; }
/* ── Overview page (HTML, replaces SVG overview) ── */
.overview-page { display: none; }
.canvas-area.overview-active { overflow-y: auto; touch-action: auto; }
.canvas-area.overview-active #svg-canvas { display: none; }
.canvas-area.overview-active .zoom-controls { display: none; }
.canvas-area.overview-active .overview-page { display: flex; }
.overview-page {
flex-direction: column;
align-items: center;
padding: 72px 20px 80px;
line-height: 1.6;
min-height: 100%;
}
.overview-page .ov-hero {
max-width: 660px;
text-align: center;
margin-bottom: 56px;
}
.overview-page .ov-hero h1 {
font-size: 2.4rem;
font-weight: 700;
letter-spacing: -0.03em;
margin-bottom: 18px;
color: var(--text);
}
.overview-page .ov-hero .ov-overview {
font-size: 1rem;
color: var(--text-dim);
line-height: 1.75;
margin-bottom: 24px;
}
.overview-page .ov-hint {
display: inline-block;
font-size: 0.84rem;
color: var(--text-dim);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 20px;
}
.overview-page .ov-hint code {
color: var(--accent);
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
font-size: 0.82rem;
}
.ov-grid { position: relative; }
.ov-row {
display: flex;
align-items: stretch;
gap: 0;
}
.ov-arrow-h {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
flex-shrink: 0;
}
.ov-arrow-h svg { overflow: visible; }
/* Phase cards */
.ov-card {
position: relative;
width: 240px;
background: var(--surface);
border: 1px solid var(--border);
border-top-width: 3px;
border-radius: 10px;
padding: 20px 18px 16px;
cursor: pointer;
overflow: hidden;
transition: border-color 0.25s, box-shadow 0.25s, transform 0.18s;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.ov-card[data-phase="research"] { border-top-color: var(--research); }
.ov-card[data-phase="discussion"] { border-top-color: var(--discussion); }
.ov-card[data-phase="specification"] { border-top-color: var(--specification); }
.ov-card[data-phase="planning"] { border-top-color: var(--planning); }
.ov-card[data-phase="implementation"] { border-top-color: var(--implementation); }
.ov-card[data-phase="review"] { border-top-color: var(--review); }
.ov-card[data-phase="research"]:hover { border-color: var(--research); box-shadow: 0 0 24px -4px rgba(167,139,250,0.25); transform: translateY(-2px); }
.ov-card[data-phase="discussion"]:hover { border-color: var(--discussion); box-shadow: 0 0 24px -4px rgba(96,165,250,0.25); transform: translateY(-2px); }
.ov-card[data-phase="specification"]:hover { border-color: var(--specification); box-shadow: 0 0 24px -4px rgba(52,211,153,0.25); transform: translateY(-2px); }
.ov-card[data-phase="planning"]:hover { border-color: var(--planning); box-shadow: 0 0 24px -4px rgba(251,191,36,0.25); transform: translateY(-2px); }
.ov-card[data-phase="implementation"]:hover { border-color: var(--implementation); box-shadow: 0 0 24px -4px rgba(249,115,22,0.25); transform: translateY(-2px); }
.ov-card[data-phase="review"]:hover { border-color: var(--review); box-shadow: 0 0 24px -4px rgba(244,114,182,0.25); transform: translateY(-2px); }
.ov-card .ov-watermark {
position: absolute;
top: 6px; right: 12px;
font-size: 64px; font-weight: 800;
color: var(--surface2);
line-height: 1;
pointer-events: none; user-select: none;
}
.ov-card .ov-phase-name {
font-size: 15px; font-weight: 650;
color: var(--text);
margin-bottom: 8px;
position: relative; z-index: 1;
}
.ov-card .ov-phase-desc {
font-size: 11.5px; line-height: 1.55;
color: var(--text-dim);
position: relative; z-index: 1;
flex: 1;
}
/* Badges */
.ov-badges {
display: flex; flex-wrap: wrap; gap: 6px;
margin-top: 12px;
position: relative; z-index: 1;
}
.ov-badge {
display: inline-flex; align-items: center;
font-size: 10px;
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
padding: 3px 8px;
border-radius: 5px;
white-space: nowrap;
line-height: 1.3;
border: 1px solid transparent;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ov-badge-label {
color: var(--text-dim);
margin-right: 4px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.04em;
opacity: 0.7;
}
.ov-badge-command {
color: var(--accent);
background: rgba(108, 138, 255, 0.1);
}
.ov-badge-command.ov-badge-link {
cursor: pointer;
}
.ov-badge-command.ov-badge-link:hover {
background: rgba(108, 138, 255, 0.2);
border-color: rgba(108, 138, 255, 0.3);
}
.ov-badge-skill {
color: var(--implementation);
background: rgba(249, 115, 22, 0.1);
}
.ov-badge-skill.ov-badge-link {
cursor: pointer;
}
.ov-badge-skill.ov-badge-link:hover {
background: rgba(249, 115, 22, 0.2);
border-color: rgba(249, 115, 22, 0.3);
}
.ov-badge-output {
color: var(--specification);
background: rgba(52, 211, 153, 0.1);
}
/* Wrap connector (legacy, kept for compatibility) */
.ov-connector-row {
width: 100%; height: 56px;
display: flex; align-items: center; justify-content: center;
position: relative;
}
.ov-connector-row svg {
position: absolute; top: 0;
left: 50%; transform: translateX(-50%);
}
/* Layer labels */
.ov-layer-label {
font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
color: var(--accent); opacity: 0.5;
margin: 28px 0 12px; padding-left: 4px;
border-left: 2px solid rgba(108,138,255,0.3);
padding-left: 10px;
}
/* Vertical flow arrow between sections (pure CSS) */
.ov-flow-down {
display: flex; flex-direction: column; align-items: center; padding: 4px 0;
}
.ov-flow-down-line {
width: 2px; height: 27px;
background: repeating-linear-gradient(to bottom, rgba(139,144,160,0.4) 0 5px, transparent 5px 9px);
}
.ov-flow-down-head {
width: 0; height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 8px solid rgba(139,144,160,0.4);
}
/* Centered row */
.ov-row-center { justify-content: center; }
/* Entry cards (Layer 1-2) */
.ov-card-entry {
width: auto; min-width: 140px; max-width: 200px;
padding: 10px 16px;
border-top-width: 2px;
border-top-color: var(--accent);
}
.ov-card-entry .ov-phase-name { font-size: 13px; margin-bottom: 2px; font-family: 'SF Mono', 'Fira Code', monospace; }
.ov-card-entry .ov-phase-desc { font-size: 10px; }
.ov-card-entry:hover { border-color: var(--accent); box-shadow: 0 0 16px -4px rgba(108,138,255,0.25); transform: translateY(-2px); }
/* Small entry card (continue skills) */
.ov-card-sm {
padding: 4px 12px;
border-top-width: 1px;
}
.ov-card-sm .ov-phase-name { font-size: 10px; margin-bottom: 0; }
/* Pipeline grid (3 columns) */
.ov-pipeline-grid {
display: flex; gap: 32px; justify-content: center;
margin: 8px 0 16px;
}
.ov-pipeline-col {
display: flex; flex-direction: column; align-items: center; gap: 8px;
min-width: 160px;
}
.ov-pipeline-heading {
font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
margin-bottom: 4px;
}
.ov-pipeline-arrow {
width: 1.5px; height: 16px;
background: repeating-linear-gradient(to bottom, rgba(139,144,160,0.4) 0 4px, transparent 4px 7px);
}
/* Phase card in pipeline */
.ov-card-phase {
width: 150px; padding: 10px 14px;
border-top-width: 2px;