Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AI時代のDependency Injection
Search
sunnyone
September 17, 2026
Programming
38
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AI時代のDependency Injection
AIにも人にも優しい文書とは
sunnyone
September 17, 2026
More Decks by sunnyone
See All by sunnyone
AIコーディング時代に意識したい縦と横
sunnyone
0
130
Rustとgtk-rsで自分用GUIツールを作ろう
sunnyone
1
120
multirange 型(多重範囲型)の活用
sunnyone
0
150
開発者とのコミュニケーションのはじめかた
sunnyone
0
71
概念モデル→論理モデルで気をつけていること
sunnyone
3
580
印象に残ったLLMの使い方5選
sunnyone
0
51
シンプルじゃないテーブルの見つけ方
sunnyone
1
400
Next.js App Router登場後の話
sunnyone
0
90
はやい開発のためのJSONデータ型の活用
sunnyone
0
200
Other Decks in Programming
See All in Programming
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.1k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
110
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
220
phperだってパンチカードでコーディングしたい
o0h
PRO
0
480
R8 の設定見直しでアプリサイズ削減
andpad
0
230
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
150
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
200
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
120
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
540
4 Signs Your Business is Dying
shpigford
187
23k
The SEO Collaboration Effect
kristinabergwall1
1
600
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
The Language of Interfaces
destraynor
162
27k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
640
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
470
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
590
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The SEO identity crisis: Don't let AI make you average
varn
0
610
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Transcript
AI 時代の Dependency Injection ~AIにも人にも優しい文書とは~ Yoichi Imai PHPerKaigi mini #5
@ 2026-09-17
自己紹介 Yoichi Imai アプリケーションエンジニア フロントエンドとデータベースが主戦場 Web 2
今日話すこと のうれしさと怖さ DI / IoC の話 AI にも人にも読める文書と、その使い方 skill 3
skill 、便利ですよね メリット AI への指示をまとめておける デメリット 実行が非決定的 同じ指示でも、結果が同じとは限らない 知識と処理の境界が見えにくい skill
やモデルを変えたときの影響を追いにくい 4
この怖さ見たことないですか? 巨大フレームワークに密結合したアプリケーション ビジネスロジックが実行環境を直接知っている 必要な機能を自分で呼び出している 結果として フレームワークの変化の影響を受けやすい 交換しにくく、単体で理解・テストしにくい ※ 非決定性は違っても、依存先が見えにくいところは似ている 5
歴史は密結合にどう対処したか → Dependency Injection / Inversion of Control ビジネスロジックをフレームワークから切り離す 依存するものは注入してもらう
交換しやすく単体で理解・テストしやすくする final class OrderService { public function __construct(private PaymentGateway $gateway) {} } 6
AI にも通じるところがあるのでは? 密結合な姿 skill が「プロジェクトの知識」と「処理」をすべて持つ 書き方次第ではある 制御を反転した姿(IoC) プロジェクトの文書が知識の主体になる skill は文書を読み、作業へつなぐ
AI の非決定性は消えないが、モデルに依存する知識と処理の範囲は小 さくできる 7
アプリケーションのDIとの対比 アプリケーション を使うプロジェクト POPO/POCO/POJO プロジェクト文書 DI フレームワーク 文書と作業をつなぐskill 文書は特定のAIに依存しない→"Plain Old
Document” AI 8
文書の例1: ADR (Architecture Decision Record) 何を決めたか/なぜそう決めたか/却下した選択肢とその理由/どこに 適用するか AI に正解だけでなく判断の文脈も伝える 未来の開発者にも同じ文脈を残す
9
文書の例2:コーディング規約 だけへの命令 「◦◦記法を使って実装してください」 プロジェクトの決まりごと 「このプロジェクトでは、△△には◦◦記法を用いる」 命令ではなくプロジェクトの話として書くことで、人が読んでも使え る。 AI 10
skill の例:ADRをチェックする はskillでスパイスのように活用する。 プロジェクトの判断基準はskillに書かない skill は差分収集・文書参照・報告をつなぐ 人も同じADRを読んで判断できる skill 11
活用のためのヒント 宣言的にする 決定的に処理できる部分はそもそも通常のツール linter / formatter / AST 操作 文書をどう書くかは自由
人とAIが同じようにたどれる文書構造 構造化の選択肢:OKF(Open Knowledge Format) 12
まとめ は巨大構造に依存した処理の実装方式 プレーンな文書ならAIに依存しない プレーンな文書を活用して巨大構造への依存を減らしたい skill 13