feat: 문서 구조 변경 및 tech-visual 스킬 추가

This commit is contained in:
DongHyeonka
2026-09-04 18:20:00 +09:00
parent 43901f0abf
commit 2efb7ee1f2
683 changed files with 61180 additions and 10479 deletions
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2026-07-23T00:00:00.000Z" agent="techviz-harness" version="24.7.17" type="device">
<diagram id="strategy-journey" name="두 형제 문제는 Fetch Join에서 합류한 뒤 단계별 해법으로 최종 구조가 된다">
<mxGraphModel dx="1236" dy="421" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1236" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="n_requirements-model-baseline" value="요구사항·모델·기준선&lt;br/&gt;1 과제 요구사항&lt;br/&gt;2 도메인·데이터 모델&lt;br/&gt;3 최초 피드 조회" tooltip="전체 여정은 과제 요구사항에서 도메인·데이터 모델을 거쳐 최초 피드 조회 기준선으로 시작한다. | Evidence: L25-L25" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="70.0" y="165.5" width="150.0" height="105.0" as="geometry"/>
</mxCell>
<mxCell id="n_collection-n-plus-one" value="컬렉션 N+1 (N1)&lt;br/&gt;유형: 컬렉션 N+1&lt;br/&gt;발생: 기준선과 동시에&lt;br/&gt;관계: N2와 형제 문제&lt;br/&gt;진행: Fetch Join으로 합류" tooltip="기준선에서 N2와 동시에 나타나는 컬렉션 조회 문제다. | Evidence: L25-L25" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="383.5" y="60.0" width="167.0" height="122.0" as="geometry"/>
</mxCell>
<mxCell id="n_hidden-to-one-queries" value="User·Page 숨은 쿼리 (N2)&lt;br/&gt;유형: User·Page 숨은 쿼리&lt;br/&gt;발생: 기준선과 동시에&lt;br/&gt;관계: N1과 형제 문제&lt;br/&gt;진행: Fetch Join으로 합류" tooltip="기준선에서 N1과 동시에 나타나는 User·Page 연관의 숨은 쿼리 문제다. | Evidence: L25-L25" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="380.0" y="254.0" width="174.0" height="122.0" as="geometry"/>
</mxCell>
<mxCell id="n_fetch-join-failure" value="Fetch Join → 실패&lt;br/&gt;1 N1·N2 합류&lt;br/&gt;2 다중 컬렉션·페이징 실패" tooltip="N1과 N2가 Fetch Join 시도에서 합류한 뒤 다중 컬렉션·페이징 실패로 이어진다. | Evidence: L25-L25" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;strokeColor=#d97706;fillColor=#fffdf5;" vertex="1" parent="1">
<mxGeometry x="714.0" y="174.0" width="150.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_improvement-chain" value="후속 개선 → 최종 구조&lt;br/&gt;1 Batch Fetch&lt;br/&gt;2 DTO Projection&lt;br/&gt;3 아이템별 Top-3&lt;br/&gt;4 Keyset Pagination&lt;br/&gt;5 가시성 조건 인덱싱&lt;br/&gt;6 최종 피드 조회 구조" tooltip="실패 뒤 다섯 조회 전략 단계가 명시된 순서로 발전해 최종 피드 조회 구조를 만든다. | Evidence: L25-L25" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;strokeColor=#2563eb;strokeWidth=2;" vertex="1" parent="1">
<mxGeometry x="1024.0" y="140.0" width="167.0" height="156.0" as="geometry"/>
</mxCell>
<mxCell id="e_baseline-reveals-n1" value="기준선에서 갈라짐" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_requirements-model-baseline" target="n_collection-n-plus-one">
<mxGeometry relative="1" as="geometry">
<mxPoint x="325.8" y="165.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_baseline-reveals-n2" value="기준선에서 갈라짐" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_requirements-model-baseline" target="n_hidden-to-one-queries">
<mxGeometry relative="1" as="geometry">
<mxPoint x="324.0" y="271.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_failure-to-improvements" value="실패 뒤 단계별 개선" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_fetch-join-failure" target="n_improvement-chain">
<mxGeometry relative="1" as="geometry">
<mxPoint x="944.0" y="190.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_n1-joins-fetch-join" value="Fetch Join으로 합류" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_collection-n-plus-one" target="n_fetch-join-failure">
<mxGeometry relative="1" as="geometry">
<mxPoint x="656.2" y="165.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_n2-joins-fetch-join" value="Fetch Join으로 합류" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_hidden-to-one-queries" target="n_fetch-join-failure">
<mxGeometry relative="1" as="geometry">
<mxPoint x="658.0" y="271.0" as="offset"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1236" height="421" viewBox="0 0 1236 421" role="img" aria-labelledby="diagram-title diagram-description">
<title id="diagram-title">두 형제 문제는 Fetch Join에서 합류한 뒤 단계별 해법으로 최종 구조가 된다</title>
<desc id="diagram-description">왼쪽에서 과제 요구사항, 도메인·데이터 모델, 최초 피드 조회 기준선 순으로 시작한다. 기준선에서 컬렉션 N+1(N1)과 User·Page 연관의 숨은 쿼리(N2)가 서로 앞뒤가 아닌 형제 문제로 동시에 갈라지고, 두 경로는 Fetch Join 시도에서 합류한다. 이 시도는 다중 컬렉션·페이징 실패로 이어진다. 마지막 노드는 Batch Fetch, DTO Projection, 아이템별 Top-3, Keyset Pagination, 가시성 조건 인덱싱을 거쳐 최종 피드 조회 구조에 도달하는 순서를 담는다.</desc>
<metadata>{&quot;techviz&quot;:{&quot;spec_version&quot;:&quot;1.1&quot;,&quot;id&quot;:&quot;strategy-journey&quot;,&quot;profile&quot;:&quot;component-flow&quot;},&quot;source_context&quot;:{&quot;document&quot;:&quot;/home/donghyeon/workspace/ai-tool/topic-arrange/n+1liner/n+1liner.md&quot;,&quot;document_sha256&quot;:&quot;1bb38964ca2a849690f5355646c1aa988111b4cd4e1055c6cb05cf7e5fc35cde&quot;,&quot;anchor&quot;:{&quot;kind&quot;:&quot;marker&quot;,&quot;value&quot;:&quot;strategy-journey&quot;,&quot;line&quot;:27}},&quot;evidence_policy&quot;:&quot;Each factual element cites source lines or is marked assumption.&quot;,&quot;diagram_only&quot;:true}</metadata>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" />
</marker>
<style>
:root { color-scheme: light; }
text { font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #111827; }
.canvas { fill: #ffffff; }
.group-box { fill: #ffffff; stroke: #9ca3af; stroke-width: 1.4; stroke-dasharray: 7 5; }
.group-label-bg { fill: #ffffff; }
.group-label { font-size: 13px; font-weight: 650; fill: #374151; }
.edge { fill: none; stroke: #374151; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; marker-end: url(#arrow); }
.edge.style-dashed, .edge.semantic-dashed, .edge.assumption { stroke-dasharray: 7 5; }
.edge.style-dotted { stroke-dasharray: 2 5; }
.edge.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.edge.emphasis-muted { stroke: #9ca3af; }
.edge.emphasis-warning, .edge.kind-failure, .edge.kind-error { stroke: #dc2626; stroke-width: 2.2; }
.edge-label-bg { fill: #ffffff; }
.edge-label { font-size: 12px; font-weight: 560; text-anchor: middle; }
.node-shape { fill: #ffffff; stroke: #4b5563; stroke-width: 1.7; }
.node-shape.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.node-shape.emphasis-muted { stroke: #9ca3af; fill: #f9fafb; }
.node-shape.emphasis-warning { stroke: #d97706; stroke-width: 2; fill: #fffdf5; }
.node-shape.kind-database, .node-shape.kind-datastore, .node-shape.kind-storage { fill: #f8fafc; }
.node-shape.kind-queue, .node-shape.kind-event, .node-shape.kind-topic { fill: #fafafa; }
.node-shape.assumption { stroke-dasharray: 4 4; }
.storage-bottom, .controller-divider { fill: none; stroke: #4b5563; stroke-width: 1.4; }
.controller-led { fill: #4b5563; }
.actor-symbol { fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; }
.actor-symbol.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.node-label { font-size: 14px; font-weight: 650; text-anchor: middle; }
.node-role { font-size: 10px; letter-spacing: 0.04em; text-anchor: middle; fill: #6b7280; }
.node-detail-divider { stroke: #d1d5db; stroke-width: 1; }
.node-detail { font-size: 11px; fill: #374151; }
.assumption-badge { font-size: 9px; font-weight: 700; fill: #92400e; }
.failure-mark { stroke: #dc2626; stroke-width: 4; stroke-linecap: round; }
.lifeline { stroke: #9ca3af; stroke-width: 1.2; stroke-dasharray: 5 5; }
.timeline-axis { stroke: #374151; stroke-width: 1.8; marker-end: url(#arrow); }
.timeline-stem { stroke: #6b7280; stroke-width: 1.3; }
.timeline-marker { fill: #ffffff; stroke: #374151; stroke-width: 1.7; }
.timeline-marker.primary { fill: #2563eb; stroke: #2563eb; }
.timeline-marker.warning { fill: #dc2626; stroke: #dc2626; }
.timeline-label { font-size: 13px; font-weight: 650; text-anchor: middle; }
.timeline-detail { font-size: 11px; fill: #4b5563; text-anchor: middle; }
</style>
</defs>
<rect class="canvas" width="1236" height="421" />
<polyline class="edge kind-problem style-solid emphasis-normal" points="220.0,209.0 301.8,209.0 301.8,121.0 383.5,121.0" data-evidence="25-25" />
<rect class="edge-label-bg" x="286.6" y="151.0" width="78.3" height="22" rx="3" />
<text class="edge-label" x="325.8" y="166.0">기준선에서 갈라짐</text>
<polyline class="edge kind-problem style-solid emphasis-normal" points="220.0,227.0 300.0,227.0 300.0,315.0 380.0,315.0" data-evidence="25-25" />
<rect class="edge-label-bg" x="284.9" y="257.0" width="78.3" height="22" rx="3" />
<text class="edge-label" x="324.0" y="272.0">기준선에서 갈라짐</text>
<polyline class="edge kind-improvement style-solid emphasis-normal" points="864.0,218.0 944.0,218.0 944.0,218.0 1024.0,218.0" data-evidence="25-25" />
<rect class="edge-label-bg" x="898.1" y="176.0" width="91.7" height="22" rx="3" />
<text class="edge-label" x="944.0" y="191.0">실패 뒤 단계별 개선</text>
<polyline class="edge kind-flow style-solid emphasis-normal" points="550.5,121.0 632.2,121.0 632.2,209.0 714.0,209.0" data-evidence="25-25" />
<rect class="edge-label-bg" x="597.0" y="151.0" width="118.5" height="22" rx="3" />
<text class="edge-label" x="656.2" y="166.0">Fetch Join으로 합류</text>
<polyline class="edge kind-flow style-solid emphasis-normal" points="554.0,315.0 634.0,315.0 634.0,227.0 714.0,227.0" data-evidence="25-25" />
<rect class="edge-label-bg" x="598.8" y="257.0" width="118.5" height="22" rx="3" />
<text class="edge-label" x="658.0" y="272.0">Fetch Join으로 합류</text>
<g id="node-requirements-model-baseline">
<rect class="node-shape kind-journey-stage emphasis-normal role-source" data-evidence="25-25" x="70.0" y="165.5" width="150.0" height="105.0" rx="7" />
<text class="node-label" x="145.0" y="192.5">요구사항·모델·기준선</text>
<line class="node-detail-divider" x1="84.0" y1="213.5" x2="206.0" y2="213.5" />
<text class="node-detail" x="86.0" y="230.5">1 과제 요구사항</text>
<text class="node-detail" x="86.0" y="246.5">2 도메인·데이터 모델</text>
<text class="node-detail" x="86.0" y="262.5">3 최초 피드 조회</text>
</g>
<g id="node-collection-n-plus-one">
<rect class="node-shape kind-problem emphasis-normal role-service" data-evidence="25-25" x="383.5" y="60.0" width="167.0" height="122.0" rx="7" />
<text class="node-label" x="467.0" y="87.0">컬렉션 N+1 (N1)</text>
<line class="node-detail-divider" x1="397.5" y1="108.0" x2="536.5" y2="108.0" />
<text class="node-detail" x="399.5" y="125.0">유형: 컬렉션 N+1</text>
<text class="node-detail" x="399.5" y="141.0">발생: 기준선과 동시에</text>
<text class="node-detail" x="399.5" y="157.0">관계: N2와 형제 문제</text>
<text class="node-detail" x="399.5" y="173.0">진행: Fetch Join으로 합류</text>
</g>
<g id="node-hidden-to-one-queries">
<rect class="node-shape kind-problem emphasis-normal role-service" data-evidence="25-25" x="380.0" y="254.0" width="174.0" height="122.0" rx="7" />
<text class="node-label" x="467.0" y="281.0">User·Page 숨은 쿼리 (N2)</text>
<line class="node-detail-divider" x1="394.0" y1="302.0" x2="540.0" y2="302.0" />
<text class="node-detail" x="396.0" y="319.0">유형: User·Page 숨은 쿼리</text>
<text class="node-detail" x="396.0" y="335.0">발생: 기준선과 동시에</text>
<text class="node-detail" x="396.0" y="351.0">관계: N1과 형제 문제</text>
<text class="node-detail" x="396.0" y="367.0">진행: Fetch Join으로 합류</text>
</g>
<g id="node-fetch-join-failure">
<rect class="node-shape kind-query-strategy emphasis-warning role-service" data-evidence="25-25" x="714.0" y="174.0" width="150.0" height="88.0" rx="7" />
<text class="node-label" x="789.0" y="201.0">Fetch Join → 실패</text>
<line class="node-detail-divider" x1="728.0" y1="222.0" x2="850.0" y2="222.0" />
<text class="node-detail" x="730.0" y="239.0">1 N1·N2 합류</text>
<text class="node-detail" x="730.0" y="255.0">2 다중 컬렉션·페이징 실패</text>
</g>
<g id="node-improvement-chain">
<rect class="node-shape kind-query-strategy emphasis-primary role-sink" data-evidence="25-25" x="1024.0" y="140.0" width="167.0" height="156.0" rx="7" />
<text class="node-label" x="1107.5" y="168.0">후속 개선 → 최종 구조</text>
<line class="node-detail-divider" x1="1038.0" y1="189.0" x2="1177.0" y2="189.0" />
<text class="node-detail" x="1040.0" y="206.0">1 Batch Fetch</text>
<text class="node-detail" x="1040.0" y="222.0">2 DTO Projection</text>
<text class="node-detail" x="1040.0" y="238.0">3 아이템별 Top-3</text>
<text class="node-detail" x="1040.0" y="254.0">4 Keyset Pagination</text>
<text class="node-detail" x="1040.0" y="270.0">5 가시성 조건 인덱싱</text>
<text class="node-detail" x="1040.0" y="286.0">6 최종 피드 조회 구조</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.3 KiB