Repository navigation
Expand file tree
/
Copy patharchitecture.drawio
More file actions
669 lines (577 loc) · 50.5 KB
/
Copy patharchitecture.drawio
File metadata and controls
669 lines (577 loc) · 50.5 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
<mxfile host="app.diagrams.net" version="21.0.0">
<diagram name="Claude Workflow Engine - 3-Level Architecture" id="claude-workflow-arch">
<mxGraphModel dx="1422" dy="762" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3400" pageHeight="3200" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- TITLE -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="2" value="Claude Workflow Engine — 3-Level LangGraph Architecture" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=1;fontColor=#1a1a2e;" vertex="1" parent="1">
<mxGeometry x="100" y="15" width="2400" height="45" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- ENTRY POINT -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="3" value="<b>ENTRY POINT</b><br>User Message (Hook / CLI / Direct)<br><font color='#666666'>Session ID: SESSION-YYYYMMDD-HHMMSS-XXXX</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1a1a2e;strokeColor=#1a1a2e;fontColor=#ffffff;fontSize=11;arcSize=10;" vertex="1" parent="1">
<mxGeometry x="480" y="75" width="280" height="60" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- LEVEL -1: AUTO-FIX ENFORCEMENT -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="10" value="LEVEL -1 · Auto-Fix Enforcement" style="swimlane;startSize=35;fillColor=#FFF4E5;strokeColor=#E67E22;fontStyle=1;fontSize=13;fontColor=#7D3C00;swimlaneLine=1;rounded=1;arcSize=2;" vertex="1" parent="1">
<mxGeometry x="30" y="160" width="2160" height="290" as="geometry" />
</mxCell>
<mxCell id="11" value="<b>unicode_fix</b><br>Windows UTF-8<br>stdout/stderr" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="20" y="55" width="155" height="65" as="geometry" />
</mxCell>
<mxCell id="12" value="<b>encoding_check</b><br>ASCII-only validate<br>(cp1252 safe)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="210" y="55" width="155" height="65" as="geometry" />
</mxCell>
<mxCell id="13" value="<b>windows_path</b><br>Forward slash<br>no drive letters" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="400" y="55" width="155" height="65" as="geometry" />
</mxCell>
<mxCell id="14" value="<b>merge</b><br>consolidate results" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="590" y="65" width="130" height="45" as="geometry" />
</mxCell>
<mxCell id="15" value="status = OK?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#FFC300;strokeColor=#E67E22;fontSize=10;fontStyle=1;" vertex="1" parent="10">
<mxGeometry x="760" y="52" width="120" height="70" as="geometry" />
</mxCell>
<mxCell id="16" value="<b>ask_user</b><br>Show issues,<br>request decision" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="940" y="55" width="155" height="65" as="geometry" />
</mxCell>
<mxCell id="17" value="auto-fix?<br>retry < 3?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#FFC300;strokeColor=#E67E22;fontSize=10;fontStyle=1;" vertex="1" parent="10">
<mxGeometry x="1150" y="52" width="120" height="70" as="geometry" />
</mxCell>
<mxCell id="18" value="<b>fix_level_minus1</b><br>Apply auto-fixes<br>(retry loop ↺)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0B27A;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="10">
<mxGeometry x="1330" y="55" width="155" height="65" as="geometry" />
</mxCell>
<!-- Retry loop label -->
<mxCell id="19" value="↺ retry (max 3)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;fontSize=9;fontColor=#E67E22;fontStyle=2;" vertex="1" parent="10">
<mxGeometry x="1330" y="165" width="155" height="25" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- LEVEL 1: CONTEXT SYNC -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="20" value="LEVEL 1 · Context Sync + Complexity Analysis" style="swimlane;startSize=35;fillColor=#EBF5FB;strokeColor=#2980B9;fontStyle=1;fontSize=13;fontColor=#1A5276;swimlaneLine=1;rounded=1;arcSize=2;" vertex="1" parent="1">
<mxGeometry x="30" y="480" width="2160" height="220" as="geometry" />
</mxCell>
<mxCell id="21" value="<b>session_loader</b><br>Create session dir<br>Save metadata" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="20" y="55" width="155" height="65" as="geometry" />
</mxCell>
<!-- Parallel fork indicator -->
<mxCell id="20f" value="║ PARALLEL" style="text;html=1;strokeColor=#2980B9;fillColor=#D6EAF8;align=center;verticalAlign=middle;fontSize=9;fontColor=#2980B9;fontStyle=1;" vertex="1" parent="20">
<mxGeometry x="215" y="70" width="80" height="35" as="geometry" />
</mxCell>
<mxCell id="22" value="<b>complexity_calc</b><br>Score 0-10, CallGraph<br>impact analysis" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="310" y="45" width="160" height="55" as="geometry" />
</mxCell>
<mxCell id="23" value="<b>context_loader</b><br>SRS, README, CLAUDE.md<br>ContextCache + OOM guard" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="310" y="120" width="160" height="55" as="geometry" />
</mxCell>
<mxCell id="24" value="<b>toon_compression</b><br>TOON format<br>token reduction" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="510" y="70" width="160" height="55" as="geometry" />
</mxCell>
<mxCell id="25" value="<b>level1_merge</b><br>Merge parallel<br>outputs" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="710" y="70" width="130" height="55" as="geometry" />
</mxCell>
<mxCell id="26" value="<b>cleanup_l1</b><br>Release memory" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="20">
<mxGeometry x="880" y="70" width="130" height="55" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- LEVEL 2: STANDARDS -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="30" value="LEVEL 2 · Standards + Tool Optimization + MCP Discovery" style="swimlane;startSize=35;fillColor=#EAFAF1;strokeColor=#27AE60;fontStyle=1;fontSize=13;fontColor=#145A32;swimlaneLine=1;rounded=1;arcSize=2;" vertex="1" parent="1">
<mxGeometry x="30" y="730" width="2160" height="255" as="geometry" />
</mxCell>
<mxCell id="31" value="<b>emergency_archive</b><br>Archive if context<br>>95% capacity" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="20" y="55" width="150" height="65" as="geometry" />
</mxCell>
<mxCell id="32" value="<b>common_standards</b><br>Load policies/<br>Detect project type" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="205" y="55" width="150" height="65" as="geometry" />
</mxCell>
<mxCell id="33" value="Java<br>project?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ABEBC6;strokeColor=#27AE60;fontSize=10;fontStyle=1;" vertex="1" parent="30">
<mxGeometry x="400" y="52" width="105" height="70" as="geometry" />
</mxCell>
<mxCell id="34" value="<b>java_standards</b><br>SpringBoot, Maven<br>Gradle rules" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#A9DFBF;strokeColor=#27AE60;fontSize=10;dashed=1;" vertex="1" parent="30">
<mxGeometry x="390" y="160" width="150" height="55" as="geometry" />
</mxCell>
<!-- Parallel fork for tool_opt and mcp_disc -->
<mxCell id="30f" value="║ PARALLEL" style="text;html=1;strokeColor=#27AE60;fillColor=#D5F5E3;align=center;verticalAlign=middle;fontSize=9;fontColor=#27AE60;fontStyle=1;" vertex="1" parent="30">
<mxGeometry x="558" y="75" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="35" value="<b>tool_optimization</b><br>Token reduction<br>60-85% savings" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="650" y="48" width="155" height="50" as="geometry" />
</mxCell>
<mxCell id="36" value="<b>mcp_discovery</b><br>Discover MCP servers<br>Register tool hints" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="650" y="128" width="155" height="50" as="geometry" />
</mxCell>
<mxCell id="37" value="<b>level2_merge</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="855" y="70" width="120" height="45" as="geometry" />
</mxCell>
<mxCell id="38" value="<b>select_standards</b><br>Pick applicable<br>standards per task" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="1020" y="60" width="145" height="65" as="geometry" />
</mxCell>
<mxCell id="39" value="<b>optimize_context</b><br>Post-standards<br>token budget" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="30">
<mxGeometry x="1210" y="60" width="145" height="65" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- LEVEL 3: EXECUTION PIPELINE (15 Steps) -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="40" value="LEVEL 3 · Execution Pipeline · 15 Steps (Step 0 → Step 14)" style="swimlane;startSize=35;fillColor=#F5EEF8;strokeColor=#8E44AD;fontStyle=1;fontSize=13;fontColor=#4A235A;swimlaneLine=1;rounded=1;arcSize=2;" vertex="1" parent="1">
<mxGeometry x="30" y="1015" width="2160" height="1870" as="geometry" />
</mxCell>
<!-- Step 0.0 -->
<mxCell id="41" value="<b>Step 0.0</b> · project_context<br>Read README, CHANGELOG<br>Establish project baseline" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="50" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 0.1 -->
<mxCell id="42" value="<b>Step 0.1</b> · initial_callgraph<br>Snapshot CallGraph (578 classes)<br>Baseline for Step 11 diff" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="130" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 0 -->
<mxCell id="43" value="<b>Step 0</b> · task_analysis ⚡RAG<br>LLM: task_type, complexity 0-10<br>suggested_model selection" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="215" width="200" height="60" as="geometry" />
</mxCell>
<!-- Standards Hook badge -->
<mxCell id="h0" value="🔗 standards_hook_step0" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEDEC;strokeColor=#C0392B;fontSize=8;dashed=1;" vertex="1" parent="40">
<mxGeometry x="250" y="230" width="155" height="30" as="geometry" />
</mxCell>
<!-- Step 1 -->
<mxCell id="44" value="<b>Step 1</b> · plan_mode_decision ⚡RAG<br>LLM: plan_required? (boolean)<br>Route decision point" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="305" width="200" height="60" as="geometry" />
</mxCell>
<!-- Route after step 1 -->
<mxCell id="45" value="plan_required?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#D7BDE2;strokeColor=#8E44AD;fontSize=10;fontStyle=1;" vertex="1" parent="40">
<mxGeometry x="278" y="298" width="125" height="72" as="geometry" />
</mxCell>
<!-- Step 2 (conditional) -->
<mxCell id="46" value="<b>Step 2</b> · plan_execution ⚡RAG<br>LLM: multi-phase plan<br>phases, milestones, risk" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D2B4DE;strokeColor=#8E44AD;fontSize=10;dashed=1;" vertex="1" parent="40">
<mxGeometry x="460" y="300" width="200" height="60" as="geometry" />
</mxCell>
<!-- Standards Hook step 1 -->
<mxCell id="h1" value="🔗 standards_hook_step1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEDEC;strokeColor=#C0392B;fontSize=8;dashed=1;" vertex="1" parent="40">
<mxGeometry x="250" y="390" width="155" height="30" as="geometry" />
</mxCell>
<!-- Step 3 -->
<mxCell id="47" value="<b>Step 3</b> · task_breakdown<br>Granular task list<br>ENABLE_FIGMA → extract components" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="430" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 4 -->
<mxCell id="48" value="<b>Step 4</b> · toon_refinement<br>Refine TOON object<br>Consolidate all context" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="520" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 5 -->
<mxCell id="49" value="<b>Step 5</b> · skill_selection ⚡RAG<br>RAG cross-session boost (Qdrant)<br>Best skill + agent from library" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="610" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 6 -->
<mxCell id="50" value="<b>Step 6</b> · skill_validation<br>Download skill if needed<br>Validate compatibility" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="700" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 7 -->
<mxCell id="51" value="<b>Step 7</b> · final_prompt ⚡RAG<br>Generate 3 system prompt files<br>ENABLE_FIGMA → inject design tokens" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="790" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 8 -->
<mxCell id="52" value="<b>Step 8</b> · github_issue ⚡RAG<br>Create GitHub Issue<br>ENABLE_JIRA → dual-link Jira" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="880" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 9 -->
<mxCell id="53" value="<b>Step 9</b> · branch_creation<br>feature/{slug} or feature/PROJ-123<br>Git ops via git_mcp_server" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="970" width="200" height="60" as="geometry" />
</mxCell>
<!-- Hook Mode Boundary -->
<mxCell id="54" value="━━━━━━━━━━━━━━ HOOK MODE END (CLAUDE_HOOK_MODE=1 stops here → Claude Code implements) ━━━━━━━━━━━━━━" style="text;html=1;strokeColor=#E74C3C;fillColor=#FADBD8;align=center;verticalAlign=middle;fontSize=10;fontStyle=1;fontColor=#C0392B;rounded=1;" vertex="1" parent="40">
<mxGeometry x="30" y="1050" width="760" height="35" as="geometry" />
</mxCell>
<!-- Full mode label -->
<mxCell id="54b" value="↓ FULL MODE ONLY (CLAUDE_HOOK_MODE=0)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=9;fontColor=#8E44AD;fontStyle=2;" vertex="1" parent="40">
<mxGeometry x="30" y="1090" width="280" height="20" as="geometry" />
</mxCell>
<!-- Step 10 -->
<mxCell id="55" value="<b>Step 10</b> · implementation<br>LLM inference (claude_cli/anthropic)<br>ENABLE_SONARQUBE scan · ENABLE_FIGMA comment" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1115" width="200" height="65" as="geometry" />
</mxCell>
<!-- Standards Hook step 10 -->
<mxCell id="h10" value="🔗 standards_hook_step10" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEDEC;strokeColor=#C0392B;fontSize=8;dashed=1;" vertex="1" parent="40">
<mxGeometry x="250" y="1130" width="155" height="30" as="geometry" />
</mxCell>
<!-- Step 11 -->
<mxCell id="56" value="<b>Step 11</b> · pull_request ⚡RAG<br>Create PR + code review<br>CallGraph diff (Step 0.1 vs now)<br>ENABLE_JENKINS → CI validate" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1210" width="200" height="75" as="geometry" />
</mxCell>
<!-- Route after step 11 -->
<mxCell id="57" value="review_passed?<br>or retry ≥ 3?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#D7BDE2;strokeColor=#8E44AD;fontSize=10;fontStyle=1;" vertex="1" parent="40">
<mxGeometry x="278" y="1215" width="130" height="70" as="geometry" />
</mxCell>
<!-- Retry node -->
<mxCell id="58" value="<b>step11_retry</b><br>Increment retry_count<br>↺ back to Step 10" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1948A;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="462" y="1218" width="165" height="60" as="geometry" />
</mxCell>
<!-- Step 12 -->
<mxCell id="59" value="<b>Step 12</b> · issue_closure<br>Close GitHub issue<br>ENABLE_JIRA → transition Done" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1320" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 13 -->
<mxCell id="60" value="<b>Step 13</b> · docs_update<br>Update docs + circular SDLC<br>Generate 13 UML diagram types" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1410" width="200" height="60" as="geometry" />
</mxCell>
<!-- Step 14 -->
<mxCell id="61" value="<b>Step 14</b> · final_summary<br>Metrics finalized<br>Voice notification flag" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1500" width="200" height="60" as="geometry" />
</mxCell>
<!-- Level 3 merge -->
<mxCell id="62" value="<b>level3_merge</b><br>Final state consolidation" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D7BDE2;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1590" width="200" height="50" as="geometry" />
</mxCell>
<!-- Output node -->
<mxCell id="63" value="<b>output_node</b><br>Write flow-trace.json · Save workflow memory<br>Status: BLOCKED | FAILED | PARTIAL | OK" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#C39BD3;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="40">
<mxGeometry x="30" y="1665" width="200" height="65" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- END TERMINAL -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="64" value="END" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1a1a2e;strokeColor=#1a1a2e;fontColor=#ffffff;fontStyle=1;fontSize=14;" vertex="1" parent="1">
<mxGeometry x="560" y="2915" width="100" height="50" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- EXTERNAL SYSTEMS PANEL -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- Panel header -->
<mxCell id="80" value="EXTERNAL SYSTEMS & MCP SERVERS" style="text;html=1;strokeColor=#333333;fillColor=#2C3E50;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;rounded=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="160" width="300" height="40" as="geometry" />
</mxCell>
<!-- Git & GitHub Group -->
<mxCell id="81" value="<b>git_mcp_server</b> (14 tools)<br>branch · commit · push · pull<br>stash · diff · fetch<br><font color='#666'>Steps: 9, 11, 12</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="215" width="180" height="80" as="geometry" />
</mxCell>
<mxCell id="82" value="<b>github_mcp_server</b> (12 tools)<br>PR · issue · merge · label<br>build validate · full cycle<br><font color='#666'>Steps: 8, 9, 11, 12</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="305" width="180" height="80" as="geometry" />
</mxCell>
<!-- Session MCP -->
<mxCell id="83" value="<b>session_mcp_server</b> (14 tools)<br>create · chain · tag · finalize<br>work items · search" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="395" width="180" height="70" as="geometry" />
</mxCell>
<!-- Vector DB / RAG -->
<mxCell id="84" value="<b>vector_db_mcp_server</b> (11 tools)<br>Qdrant · 4 collections<br>node_decisions · sessions<br>flow_traces · tool_calls<br><font color='#666'>RAG threshold: 0.75-0.90</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAD7A0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="475" width="180" height="95" as="geometry" />
</mxCell>
<!-- LLM Providers -->
<mxCell id="85" value="<b>LLM Providers</b> (Fallback Chain)<br>━━━━━━━━━━━━━━━━━━━━━<br>Claude CLI (subprocess)<br>Anthropic API (SDK + retries)<br><font color='#666'>Fallback: claude_cli → anthropic</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AED6F1;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="580" width="180" height="120" as="geometry" />
</mxCell>
<!-- Standards Loader -->
<mxCell id="87" value="<b>standards_loader_mcp</b> (7 tools)<br>detect · framework · hot-reload<br><font color='#666'>Level 2</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="795" width="180" height="65" as="geometry" />
</mxCell>
<!-- Token Optimizer -->
<mxCell id="88" value="<b>token_optimization_mcp</b> (10)<br>AST nav · smart read · dedup<br>60-85% token savings<br><font color='#666'>Level 2 + Steps 0-7</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="870" width="180" height="75" as="geometry" />
</mxCell>
<!-- UML Diagram MCP -->
<mxCell id="89" value="<b>uml_diagram_mcp</b> (15 tools)<br>13 diagram types<br>Mermaid · PlantUML · Kroki.io<br><font color='#666'>Step 13</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="955" width="180" height="75" as="geometry" />
</mxCell>
<!-- OPTIONAL INTEGRATIONS header -->
<mxCell id="89b" value="OPTIONAL INTEGRATIONS (ENABLE_* flags)" style="text;html=1;strokeColor=#E74C3C;fillColor=#FADBD8;align=center;verticalAlign=middle;fontSize=10;fontStyle=1;fontColor=#C0392B;rounded=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="1040" width="300" height="30" as="geometry" />
</mxCell>
<!-- Jira (optional) -->
<mxCell id="90" value="<b>jira_mcp_server</b> (10 tools)<br>ENABLE_JIRA=1<br>Create · Transition · Link PR<br>S8: Create · S9: Branch<br>S10: In Progress · S11: Review<br>S12: Done" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDFEFE;strokeColor=#E74C3C;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="1080" width="180" height="110" as="geometry" />
</mxCell>
<!-- Figma (optional) -->
<mxCell id="91" value="<b>figma_mcp_server</b> (10 tools)<br>ENABLE_FIGMA=1<br>S3: Extract components<br>S7: Inject design tokens<br>S10: Started comment<br>S11: Design review<br>S12: Complete comment" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDFEFE;strokeColor=#E74C3C;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="1200" width="180" height="120" as="geometry" />
</mxCell>
<!-- Jenkins (optional) -->
<mxCell id="92" value="<b>jenkins_mcp_server</b> (10 tools)<br>ENABLE_JENKINS=1<br>S11: Validate CI build<br>blocks merge if failed" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDFEFE;strokeColor=#E74C3C;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="1330" width="180" height="80" as="geometry" />
</mxCell>
<!-- SonarQube (optional) -->
<mxCell id="93" value="<b>sonarqube_scanner</b><br>ENABLE_SONARQUBE=1<br>S10: Scan after impl<br>auto-fixer loop" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDFEFE;strokeColor=#E74C3C;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="2250" y="1420" width="180" height="75" as="geometry" />
</mxCell>
<!-- Draw.io MCP -->
<mxCell id="94" value="<b>drawio_mcp_server</b> (5 tools)<br>12 diagram types<br>.drawio files · shareable URLs" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="1505" width="180" height="70" as="geometry" />
</mxCell>
<!-- Policy Enforcement -->
<mxCell id="95" value="<b>policy_enforcement_mcp</b> (11)<br>pre_tool_gate_mcp (8)<br>post_tool_tracker_mcp (6)<br>Block Write/Edit until L1+L2 done" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5D8DC;strokeColor=#2C3E50;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="2250" y="1585" width="180" height="80" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- LEGEND -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<mxCell id="leg0" value="LEGEND" style="swimlane;startSize=30;fillColor=#F2F3F4;strokeColor=#566573;fontStyle=1;fontSize=12;" vertex="1" parent="1">
<mxGeometry x="2250" y="1680" width="490" height="290" as="geometry" />
</mxCell>
<mxCell id="leg1" value="Level -1 Node" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEBD0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="15" y="40" width="120" height="35" as="geometry" />
</mxCell>
<mxCell id="leg2" value="Level 1 Node" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="15" y="85" width="120" height="35" as="geometry" />
</mxCell>
<mxCell id="leg3" value="Level 2 Node" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D5F5E3;strokeColor=#27AE60;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="15" y="130" width="120" height="35" as="geometry" />
</mxCell>
<mxCell id="leg4" value="Level 3 Node" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8DAEF;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="15" y="175" width="120" height="35" as="geometry" />
</mxCell>
<mxCell id="leg5" value="Routing Decision" style="rhombus;whiteSpace=wrap;html=1;fillColor=#D7BDE2;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="155" y="38" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="leg6" value="⚡RAG = LLM call cached<br>via Qdrant vector search<br>threshold 0.75-0.90" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAD7A0;strokeColor=#E67E22;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="155" y="100" width="145" height="60" as="geometry" />
</mxCell>
<mxCell id="leg7" value="Optional Integration<br>(ENABLE_* flag)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDFEFE;strokeColor=#E74C3C;fontSize=10;dashed=1;" vertex="1" parent="leg0">
<mxGeometry x="155" y="175" width="145" height="45" as="geometry" />
</mxCell>
<mxCell id="leg8" value="🔗 Standards Hook<br>(9 injection points)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FDEDEC;strokeColor=#C0392B;fontSize=10;dashed=1;" vertex="1" parent="leg0">
<mxGeometry x="315" y="40" width="150" height="45" as="geometry" />
</mxCell>
<mxCell id="leg9" value="Retry Loop (↺)<br>max 3 attempts" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1948A;strokeColor=#8E44AD;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="315" y="100" width="150" height="45" as="geometry" />
</mxCell>
<mxCell id="leg10" value="Parallel Execution (║)<br>L1: complexity + context<br>L2: tool_opt + mcp_disc" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#D6EAF8;strokeColor=#2980B9;fontSize=10;" vertex="1" parent="leg0">
<mxGeometry x="315" y="160" width="150" height="60" as="geometry" />
</mxCell>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- EDGES / ARROWS -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- Entry → Level -1 -->
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="3" target="11" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level -1 internal flow -->
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="11" target="12" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="12" target="13" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="13" target="14" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="14" target="15" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- route: FAIL → ask_user -->
<mxCell id="e6" value="FAIL" style="edgeStyle=orthogonalEdgeStyle;fontColor=#E74C3C;fontStyle=1;" edge="1" source="15" target="16" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="16" target="17" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- auto-fix → fix_node -->
<mxCell id="e8" value="auto-fix" style="edgeStyle=orthogonalEdgeStyle;fontColor=#27AE60;fontStyle=1;" edge="1" source="17" target="18" parent="10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- fix_node → retry loop back to unicode_fix -->
<mxCell id="e9" value="retry ↺" style="edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;curved=1;fontColor=#E67E22;fontStyle=2;" edge="1" source="18" target="11" parent="10">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1430" y="220" /><mxPoint x="100" y="220" /></Array></mxGeometry>
</mxCell>
<!-- Level -1 OK → Level 1 -->
<mxCell id="e10" value="OK" style="edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;fontColor=#27AE60;fontStyle=1;" edge="1" source="15" target="21" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level -1 skip → Level 1 (from route_user_choice skip path) -->
<mxCell id="e11" value="skip" style="edgeStyle=orthogonalEdgeStyle;fontColor=#E67E22;fontStyle=1;dashed=1;" edge="1" source="17" target="21" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level 1 internal flow -->
<mxCell id="e12" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="21" target="22" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e13" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="21" target="23" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e14" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="22" target="24" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e15" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="23" target="24" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e16" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="24" target="25" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e17" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="25" target="26" parent="20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level 1 → Level 2 -->
<mxCell id="e18" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="26" target="31" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level 2 internal flow -->
<mxCell id="e19" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="31" target="32" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e20" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="32" target="33" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Java yes → java_standards -->
<mxCell id="e21" value="YES" style="edgeStyle=orthogonalEdgeStyle;fontColor=#27AE60;fontStyle=1;" edge="1" source="33" target="34" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- java_standards → merge -->
<mxCell id="e22" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="34" target="37" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Java no → tool_opt + mcp (via fork) -->
<mxCell id="e23" value="NO" style="edgeStyle=orthogonalEdgeStyle;fontColor=#E74C3C;fontStyle=1;" edge="1" source="33" target="35" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e24" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="33" target="36" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e25" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="35" target="37" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e26" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="36" target="37" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e27" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="37" target="38" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e28" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="38" target="39" parent="30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level 2 → Level 3 -->
<mxCell id="e29" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="39" target="41" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Level 3 internal flow: Steps 0.0 → 0.1 → 0 → 1 -->
<mxCell id="e30" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="41" target="42" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e31" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="42" target="43" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e32" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="43" target="44" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e33" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="44" target="45" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- plan_required YES → Step 2 -->
<mxCell id="e34" value="YES" style="edgeStyle=orthogonalEdgeStyle;fontColor=#27AE60;fontStyle=1;" edge="1" source="45" target="46" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 2 → Step 3 -->
<mxCell id="e35" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="46" target="47" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- plan_required NO → Step 3 directly -->
<mxCell id="e36" value="NO" style="edgeStyle=orthogonalEdgeStyle;fontColor=#E74C3C;fontStyle=1;" edge="1" source="45" target="47" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Steps 3 → 4 → 5 → 6 → 7 → 8 → 9 -->
<mxCell id="e37" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="47" target="48" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e38" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="48" target="49" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e39" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="49" target="50" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e40" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="50" target="51" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e41" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="51" target="52" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e42" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="52" target="53" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 9 → Step 10 (full mode) -->
<mxCell id="e43" value="Full Mode" style="edgeStyle=orthogonalEdgeStyle;fontColor=#8E44AD;fontStyle=1;" edge="1" source="53" target="55" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Steps 10 → 11 -->
<mxCell id="e44" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="55" target="56" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 11 → route -->
<mxCell id="e45" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="56" target="57" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- route: PASS → Step 12 -->
<mxCell id="e46" value="PASS / max retries" style="edgeStyle=orthogonalEdgeStyle;fontColor=#27AE60;fontStyle=1;" edge="1" source="57" target="59" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- route: FAIL → retry node -->
<mxCell id="e47" value="FAIL" style="edgeStyle=orthogonalEdgeStyle;fontColor=#E74C3C;fontStyle=1;" edge="1" source="57" target="58" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- retry → back to Step 10 -->
<mxCell id="e48" value="↺ retry" style="edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;curved=1;fontColor=#E74C3C;fontStyle=2;" edge="1" source="58" target="55" parent="40">
<mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="620" y="1130" /></Array></mxGeometry>
</mxCell>
<!-- Steps 12 → 13 → 14 → merge → output -->
<mxCell id="e49" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="59" target="60" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e50" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="60" target="61" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e51" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="61" target="62" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e52" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="62" target="63" parent="40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Output node → END -->
<mxCell id="e53" style="edgeStyle=orthogonalEdgeStyle;" edge="1" source="63" target="64" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Hook Mode → END (after Step 9) -->
<mxCell id="e54" value="Hook Mode END" style="edgeStyle=orthogonalEdgeStyle;dashed=1;fontColor=#C0392B;fontStyle=2;" edge="1" source="53" target="64" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- External connections (dashed from steps to systems) -->
<!-- Step 8 → GitHub -->
<mxCell id="ex1" value="create issue" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#2C3E50;fontSize=9;" edge="1" source="52" target="82" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 9 → Git -->
<mxCell id="ex2" value="create branch" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#2C3E50;fontSize=9;" edge="1" source="53" target="81" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 11 → GitHub -->
<mxCell id="ex3" value="create PR" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#2C3E50;fontSize=9;" edge="1" source="56" target="82" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 5 → Qdrant -->
<mxCell id="ex4" value="RAG lookup" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#E67E22;fontSize=9;" edge="1" source="49" target="84" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 10 → LLM -->
<mxCell id="ex5" value="LLM fallback" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#2980B9;fontSize=9;" edge="1" source="55" target="85" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 13 → UML -->
<mxCell id="ex6" value="generate 13 UML types" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#2C3E50;fontSize=9;" edge="1" source="60" target="89" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 8 → Jira (optional) -->
<mxCell id="ex8" value="ENABLE_JIRA" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#E74C3C;fontSize=9;" edge="1" source="52" target="90" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 3 → Figma (optional) -->
<mxCell id="ex9" value="ENABLE_FIGMA" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#E74C3C;fontSize=9;" edge="1" source="47" target="91" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 11 → Jenkins (optional) -->
<mxCell id="ex10" value="ENABLE_JENKINS" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#E74C3C;fontSize=9;" edge="1" source="56" target="92" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- Step 10 → SonarQube (optional) -->
<mxCell id="ex11" value="ENABLE_SONARQUBE" style="edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#E74C3C;fontSize=9;" edge="1" source="55" target="93" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>