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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sunnyone
September 17, 2026
Programming
37
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
120
Rustとgtk-rsで自分用GUIツールを作ろう
sunnyone
1
110
multirange 型(多重範囲型)の活用
sunnyone
0
150
開発者とのコミュニケーションのはじめかた
sunnyone
0
70
概念モデル→論理モデルで気をつけていること
sunnyone
3
570
印象に残った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
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
230
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
370
すこし踏み込む CancellationToken
htkym
2
1.6k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
340
contenteditable と日本語入力に向き合う
colorful12
0
150
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
R8 の設定見直しでアプリサイズ削減
andpad
0
180
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
160
FreeBSDでZabbixを動かす
kenkino
0
360
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
400
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
540
The Art of Programming - Codeland 2020
erikaheidi
57
14k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
770
Fantastic passwords and where to find them - at NoRuKo
philnash
52
4k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
320
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
We Have a Design System, Now What?
morganepeng
55
8.4k
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