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
49
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AI時代のDependency Injection
AIにも人にも優しい文書とは
sunnyone
September 17, 2026
Transcript
13 slides
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
More Decks by sunnyone
See All by sunnyone
AIコーディング時代に意識したい縦と横
sunnyone
0
150
Rustとgtk-rsで自分用GUIツールを作ろう
sunnyone
1
130
multirange 型(多重範囲型)の活用
sunnyone
0
160
開発者とのコミュニケーションのはじめかた
sunnyone
0
74
概念モデル→論理モデルで気をつけていること
sunnyone
3
590
印象に残ったLLMの使い方5選
sunnyone
0
54
シンプルじゃないテーブルの見つけ方
sunnyone
1
410
Next.js App Router登場後の話
sunnyone
0
92
はやい開発のためのJSONデータ型の活用
sunnyone
0
210
Other Decks in Programming
See All in Programming
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
190
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
640
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
450
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
400
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
320
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
220
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
640
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Everyday Curiosity
cassininazir
0
410
Designing Powerful Visuals for Engaging Learning
tmiket
1
660
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Un-Boring Meetings
codingconduct
0
500
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
Rails Girls Zürich Keynote
gr2m
96
14k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
Product Roadmaps are Hard
iamctodd
55
13k