<mxfile host="drawio" agent="study-site"><diagram id="d" name="seq-dev-1"><mxGraphModel dx="1400" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1410" pageHeight="1019" math="0" shadow="0"><root><mxCell id="0" /><mxCell id="1" parent="0" /><mxCell id="title" value="開発 フェーズ1: 実装(開発者の手元)" style="text;html=1;fontSize=16;align=left;verticalAlign=middle;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="16" y="8" width="1378" height="30" as="geometry" /></mxCell><mxCell id="aadm" value="管理者(客先)" style="shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.user;sketch=0;outlineConnect=0;fontColor=#232F3E;fillColor=#1E88E5;strokeColor=#ffffff;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;aspect=fixed;" vertex="1" parent="1"><mxGeometry x="111" y="64" width="48" height="48" as="geometry" /></mxCell><mxCell id="aiam" value="IAM&lt;br&gt;(ユーザー・アクセスキー)" style="sketch=0;outlineConnect=0;fontColor=#232F3E;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.identity_and_access_management;fillColor=#DD344C;" vertex="1" parent="1"><mxGeometry x="297" y="60" width="56" height="56" as="geometry" /></mxCell><mxCell id="adev" value="開発者" style="shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.user;sketch=0;outlineConnect=0;fontColor=#232F3E;fillColor=#1E88E5;strokeColor=#ffffff;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;aspect=fixed;" vertex="1" parent="1"><mxGeometry x="491" y="64" width="48" height="48" as="geometry" /></mxCell><mxCell id="acc" value="Claude Code&lt;br&gt;(CLI / IDE / Desktop の Code タブ)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF2CC;strokeColor=#D6B656;fontSize=11;" vertex="1" parent="1"><mxGeometry x="625" y="64" width="160" height="50" as="geometry" /></mxCell><mxCell id="ahook" value="フック&lt;br&gt;(.claude/hooks/*.sh)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF2CC;strokeColor=#D6B656;fontSize=11;" vertex="1" parent="1"><mxGeometry x="815" y="64" width="160" height="50" as="geometry" /></mxCell><mxCell id="abr" value="Bedrock&lt;br&gt;(jp. 推論プロファイル)" style="sketch=0;outlineConnect=0;fontColor=#232F3E;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.bedrock;fillColor=#01A88D;" vertex="1" parent="1"><mxGeometry x="1057" y="60" width="56" height="56" as="geometry" /></mxCell><mxCell id="act" value="CloudTrail" style="sketch=0;outlineConnect=0;fontColor=#232F3E;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.cloudtrail;fillColor=#E7157B;" vertex="1" parent="1"><mxGeometry x="1247" y="60" width="56" height="56" as="geometry" /></mxCell><mxCell id="m1" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="135" y="196" as="sourcePoint" /><mxPoint x="325" y="196" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t1" value="CreateAccessKey(開発者用の IAM ユーザー。ポリシーは jp. の推論プロファイルだけ Allow)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="151" y="177" width="496.6" height="15" as="geometry" /></mxCell><mxCell id="n1" value="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="124" y="185" width="22" height="22" as="geometry" /></mxCell><mxCell id="m2" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="325" y="242" as="sourcePoint" /><mxPoint x="135" y="242" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t2" value="アクセスキー ID とシークレット(この1回だけ表示)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="151" y="223" width="269.4" height="15" as="geometry" /></mxCell><mxCell id="n2" value="2" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="124" y="231" width="22" height="22" as="geometry" /></mxCell><mxCell id="m3" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="135" y="288" as="sourcePoint" /><mxPoint x="515" y="288" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t3" value="払い出し(安全な経路で。開発者は ~/.aws/credentials の profile に置く)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="151" y="269" width="407.2" height="15" as="geometry" /></mxCell><mxCell id="n3" value="3" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="124" y="277" width="22" height="22" as="geometry" /></mxCell><mxCell id="m4" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="515" y="334" as="sourcePoint" /><mxPoint x="705" y="334" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t4" value="依頼(作業内容 + 受け入れ条件。AWS_PROFILE を指定して起動)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="531" y="315" width="331.4" height="15" as="geometry" /></mxCell><mxCell id="n4" value="4" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="504" y="323" width="22" height="22" as="geometry" /></mxCell><mxCell id="m5" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="380" as="sourcePoint" /><mxPoint x="1085" y="380" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t5" value="InvokeModelWithResponseStream(会話 + ツールの結果。そのアクセスキーで SigV4 署名)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="721" y="361" width="480.2" height="15" as="geometry" /></mxCell><mxCell id="n5" value="5" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="369" width="22" height="22" as="geometry" /></mxCell><mxCell id="m6" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1085" y="426" as="sourcePoint" /><mxPoint x="705" y="426" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t6" value="応答(文章、または「このツールを呼べ」)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="721" y="407" width="216.4" height="15" as="geometry" /></mxCell><mxCell id="n6" value="6" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="415" width="22" height="22" as="geometry" /></mxCell><mxCell id="m7" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="472" as="sourcePoint" /><mxPoint x="895" y="472" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t7" value="PreToolUse(ツール名・引数の JSON を標準入力で)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="721" y="453" width="271.6" height="15" as="geometry" /></mxCell><mxCell id="n7" value="7" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="461" width="22" height="22" as="geometry" /></mxCell><mxCell id="m8" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="895" y="518" as="sourcePoint" /><mxPoint x="705" y="518" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t8" value="allow / ask / deny + 理由(終了コード 0 / 2、または JSON)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="721" y="499" width="337.8" height="15" as="geometry" /></mxCell><mxCell id="n8" value="8" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="507" width="22" height="22" as="geometry" /></mxCell><mxCell id="m9" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="556" as="sourcePoint" /><mxPoint x="705" y="572" as="targetPoint" /><Array as="points"><mxPoint x="755" y="556" /><mxPoint x="755" y="572" /></Array></mxGeometry></mxCell><mxCell id="t9" value="ツール実行(ファイル編集・npm test など)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=middle;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="765" y="554" width="228.20000000000002" height="20" as="geometry" /></mxCell><mxCell id="n9" value="9" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="553" width="22" height="22" as="geometry" /></mxCell><mxCell id="m10" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="610" as="sourcePoint" /><mxPoint x="895" y="610" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t10" value="PostToolUse(結果の JSON)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="721" y="591" width="150.6" height="15" as="geometry" /></mxCell><mxCell id="n10" value="10" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="599" width="22" height="22" as="geometry" /></mxCell><mxCell id="m11" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="895" y="656" as="sourcePoint" /><mxPoint x="705" y="656" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t11" value="整形の結果・追加の文脈(additionalContext)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="721" y="637" width="244.8" height="15" as="geometry" /></mxCell><mxCell id="n11" value="11" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="645" width="22" height="22" as="geometry" /></mxCell><mxCell id="m12" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="702" as="sourcePoint" /><mxPoint x="895" y="702" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t12" value="Stop(終わろうとした)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="721" y="683" width="120.2" height="15" as="geometry" /></mxCell><mxCell id="n12" value="12" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="691" width="22" height="22" as="geometry" /></mxCell><mxCell id="m13" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="895" y="748" as="sourcePoint" /><mxPoint x="705" y="748" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t13" value="テスト未実行なら block + 理由(stop_hook_active で1回だけ)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="721" y="729" width="339.8" height="15" as="geometry" /></mxCell><mxCell id="n13" value="13" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="694" y="737" width="22" height="22" as="geometry" /></mxCell><mxCell id="m14" value="" style="endArrow=open;endFill=0;html=1;strokeWidth=1.5;dashed=1;strokeColor=#1565C0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="794" as="sourcePoint" /><mxPoint x="515" y="794" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t14" value="報告(変更一覧・テスト結果・受け入れ条件との対応)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1565C0;" vertex="1" parent="1"><mxGeometry x="531" y="775" width="271.4" height="15" as="geometry" /></mxCell><mxCell id="n14" value="14" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#1565C0;fontColor=#1565C0;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="504" y="783" width="22" height="22" as="geometry" /></mxCell><mxCell id="m15" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=1.5;dashed=1;strokeColor=#666666;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1085" y="855" as="sourcePoint" /><mxPoint x="1275" y="855" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t15" value="記録(呼び出した IAM ユーザー・時刻・inferenceRegion)" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#555555;" vertex="1" parent="1"><mxGeometry x="1101" y="821" width="285" height="30" as="geometry" /></mxCell><mxCell id="n15" value="15" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#666666;fontColor=#555555;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="1074" y="844" width="22" height="22" as="geometry" /></mxCell><mxCell id="m16" value="" style="endArrow=block;endFill=1;html=1;strokeWidth=2;strokeColor=#1f2937;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="135" y="901" as="sourcePoint" /><mxPoint x="325" y="901" as="targetPoint" /></mxGeometry></mxCell><mxCell id="t16" value="定期のローテーション: 2本目の鍵を作って配り、古い鍵を UpdateAccessKey で Inactive → 削除" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=bottom;fontColor=#1f2937;" vertex="1" parent="1"><mxGeometry x="151" y="882" width="512.4000000000001" height="15" as="geometry" /></mxCell><mxCell id="n16" value="16" style="ellipse;whiteSpace=wrap;html=1;fillColor=#1E88E5;strokeColor=none;fontColor=#FFFFFF;fontSize=11;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="124" y="890" width="22" height="22" as="geometry" /></mxCell><mxCell id="note" value="5〜13 は1回の依頼の中で何度も繰り返す。認証は Identity Center の SSO ではなく、客先が IAM で払い出す長期のアクセスキー。IAM ユーザーの鍵なので AWS_SESSION_TOKEN は要らない(公式)。ユーザーのポリシーは jp. の推論プロファイルだけを許可し、SCP が global を Deny(本編 #jp-only)。フックは最善努力で、絶対に通さない操作は permissions.deny と IAM。" style="text;html=1;whiteSpace=wrap;fontSize=11;align=left;verticalAlign=top;fontColor=#555555;" vertex="1" parent="1"><mxGeometry x="30" y="953" width="1350" height="42" as="geometry" /></mxCell><mxCell id="ladm" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="135" y="150" as="sourcePoint" /><mxPoint x="135" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="liam" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="325" y="150" as="sourcePoint" /><mxPoint x="325" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="ldev" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="515" y="150" as="sourcePoint" /><mxPoint x="515" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="lcc" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="705" y="150" as="sourcePoint" /><mxPoint x="705" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="lhook" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="895" y="150" as="sourcePoint" /><mxPoint x="895" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="lbr" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1085" y="150" as="sourcePoint" /><mxPoint x="1085" y="937" as="targetPoint" /></mxGeometry></mxCell><mxCell id="lct" value="" style="endArrow=none;dashed=1;html=1;strokeColor=#9ca3af;strokeWidth=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1275" y="150" as="sourcePoint" /><mxPoint x="1275" y="937" as="targetPoint" /></mxGeometry></mxCell></root></mxGraphModel></diagram></mxfile>