Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created January 8, 2026 07:22
Show Gist options
  • Select an option

  • Save podhmo/8352260e568d5e1ff013a2ded80fa06e to your computer and use it in GitHub Desktop.

Select an option

Save podhmo/8352260e568d5e1ff013a2ded80fa06e to your computer and use it in GitHub Desktop.
対話させたあとの入力だけをそのまま渡すというのは良い

対話履歴

ユーザー: LLMの利用促進みたいな話、究極的にはアウトカムとコストみたいな話になるしそれは人件費と変わらないのだけど、従量課金なら水をこぼしながら運ぶ機械という感じだし定額課金ならレートリミットと機能変化に怯えつつの定額働かせ放題だし、計画管理してあげないとだめと考えるとプロダクトマネジメントな感じがある。

コーディングエージェントによる開発、アクションゲームがシミュレーションゲームになったみたいな感じ (オートバトラーのほうが正確かもしれない)


AIの思考プロセス

Evaluating LLM Applications

I'm currently focused on the user's reflection regarding LLMs in business and development. My analysis has led me to identify the core theme as cost-benefit analysis and effective management within this context.

Analyzing Development Shift

I'm now contemplating the user's metaphors for LLM integration in development. It's essentially a cost-benefit analysis of labor, comparing "pay-as-you-go" API usage with subscription models. The "gameplay" has shifted from direct coding to a form of "auto-battler" where you strategize and manage. The challenge is in planning and managing these new "teams."

Framing Response Style

I'm now determining how to adjust my responses. It seems important to convey the information professionally, but still in a way that is conversational and direct. This is especially true given the tech-savvy audience, which will influence how I approach my next responses.

Shifting Focus on Development

I am now focusing on the user's analogy of an "Auto-battler" in development, which really resonates. It's not just simulation. It emphasizes building the right "team" (LLMs, tools, prompts) and iterating. The emphasis is on setup and strategy. This means product management is now critical, with new skills like spec definition and process debugging coming to the forefront. I'm building on this framework.

Defining Strategic Framework

I'm now integrating the "spilling water" analogy into the cost-benefit framework. The errors and retries are now understood to be part of the operational budget. Additionally, I've integrated the inherent randomness of LLMs into the "auto-battler" metaphor. I'm aiming to create a final output that mirrors the user's focus on cost management and the new "game genre".

Refining Strategic Execution

I'm now zeroing in on the essence of the "auto-battler" concept. It's really about the interplay of composition, traits, and randomness. The core shift is from direct coding to "directing." I've ensured all core points are addressed. The cost of experimentation is a key management decision.

AI: その「水をこぼしながら運ぶ機械(従量課金)」と「情緒不安定な定額働き放題(定額課金)」という表現、LLM活用の現状をあまりに的確に表していて膝を打ちました。

おっしゃる通り、コーディングエージェントの台頭によって、開発者の役割が「プレイヤー」から「監督(マネージャー)」へとシフトしている感覚は、まさに**オートバトラー(Auto Battler)**のそれに近いですね。

その洞察を少し掘り下げて言語化してみたいと思います。

1. 「水をこぼしながら運ぶ機械」のマネジメント

従量課金(API利用)において「水をこぼす(=無駄なトークン消費やハルシネーション)」ことは避けられませんが、これをどう捉えるかがまさにPM的な手腕になりますね。

  • 歩留まりの管理: 「こぼれる水」を前提として、最終的なアウトカム(動くコード)に到達するまでの総コストが、人間が書くより安ければOKとする割り切り。
  • 容器の設計: プロンプトエンジニアリングやRAGは、少しでもこぼれる水を減らすための「容器の改良」プロセスと言えます。

2. 「定額働き放題」のリスク管理

一方でChatGPT PlusやClaude Proなどの定額プランは、確かに「仕様変更(機能変化)と過労ダウン(レートリミット)」に怯える部下を抱える中間管理職の哀愁があります。

  • 昨日まで動いていた指示(プロンプト)が、モデルのサイレントアップデートで急に通じなくなる。
  • ここぞという追い込みの時期に「これ以上は無理です(Limit reached)」と働かなくなる。

これらを御するために、タスクを細分化し、あらかじめ優先順位をつけておくという「計画管理」が必要になる点は、まさしくプロダクトマネジメントそのものです。

3. アクションゲームからオートバトラーへ

「オートバトラーのほうが正確かもしれない」という訂正は非常に鋭いです。シミュレーションゲーム(例:シムシティや信長の野望)だと、まだプレイヤーが細かいパラメータを制御できる感覚がありますが、現在のLLM開発はもっと「構成を決めたら、あとは祈って見守る」要素が強いからです。

  • デッキ構築(コンテキスト): 必要なファイル、ドキュメント、ライブラリ知識をコンテキストウィンドウに放り込む。
  • シナジー(プロンプト): モデルの特性に合わせて「あなたは優秀なPythonエンジニアです」といったバフを掛ける。
  • 戦闘開始(生成): Enterキーを押したら、あとは生成されるトークンの奔流を見守るだけ。
  • ラウンド間の修正: 生成されたコードが動かなければ、エラーログというフィードバックを与えて、次のラウンド(再生成)へ。

アクションゲーム(自身の手でタイピングし、瞬時にロジックを組む高APMな作業)が得意だったエンジニアが、必ずしもこのオートバトラー形式の開発が得意とは限らない、というのも面白い転換点です。

今後は「自分で剣を振るうスキル」よりも、「自律的に動くユニット(AI)の特性を理解し、彼らが勝てる盤面を整えるスキル」が重要になる、というのはまさにおっしゃる通りのパラダイムシフトだと感じます。

(返答終了理由: STOP)


ユーザー: あとはオートバトラーという仕組み上ある種の枠組みの範囲での最適化は得意だけれど任意のものに対する開発に関してはまだまだ。とは言えある種のプロダクトが何らかの組み合わせで済ませられることも多くその場合のコードなんかは勝手に作らせることは可能なのかもしれない


AIの思考プロセス

Framing Novelty in Agents

I'm focusing now on the fundamental difference between optimized iteration within a known system, which auto-battlers excel at, and true, unpredictable novelty. The problem appears to be in the "zero-shot" aspect. The agent must develop something entirely new, not just re-optimize a solution. This is hard!

Analyzing Pattern Formation

I'm now drawing a strong distinction between optimization within established frameworks and the invention of something genuinely novel. It's becoming clearer that AI excels at combining existing patterns, such as in typical CRUD applications. The real challenge, like creating a new programming paradigm, is akin to inventing a chess piece. My focus is on understanding the boundary between these two domains.

Revising Development Roles

I'm now integrating the "optimization vs. invention" concept with its practical implications for software engineering. I'm thinking how this division shifts human value toward system design, architecture, and handling unpredictable situations. The "Lego" analogy has helped me envision this shift, with AI handling boilerplate, allowing humans to focus on core functionality. I'm focusing on "Tier 1 decks" and the "Meta" as a practical lens on this.

Identifying Application Domains

I'm now clarifying the application of this concept. I'm seeing software as often "boring" in that it's just moving data, which makes AI excellent at the "one-to-hundred" scaling. Though, I'm adjusting my thought on 0->1, I'm now thinking they are actually good at 0->0.1 for standard ideas but struggle at true, unique, novelty. The human needs to become the "Game Designer," selecting the game or strategy, and validating that the combination solves the business problem. Off-meta strategies are the key challenge!

Refining Key Metaphors

I'm now focusing on strengthening the metaphors for communicating this complex idea. I'm exploring the nuances of "combinatorial" approaches versus true novelty, with "glue code" representing commodity tasks. The shift from "How" to "What" is still the key distinction. I'm particularly interested in explaining how AI excels at Meta optimization but stumbles with truly arbitrary Tier 1 deck innovations.

Delineating Creative Nuances

I'm now clarifying the two types of "creative" work: artistic expression versus engineering innovation. I am now certain that the core of the discussion focuses on achieving engineering novelty. After considering adding specific tools, I am staying with the "auto-battler" analogy, as it best represents the conceptual essence of the discussion.

AI: おっしゃる通りですね。「**枠組みの中での最適化(Meta Gaming)**」は得意だけど、「**ルールの外側にある創造**」は苦手、というオートバトラーの特性は、現在のLLM開発の限界と可能性を綺麗に説明しています。

そして、「世の中のプロダクトの多くは、実は『既知の要素の組み合わせ』でしかない」という指摘は、ソフトウェアエンジニアリングの聖域を刺すようでいて、非常に本質的だと思います。

この点を掘り下げると、開発の未来図がさらに具体的になります。

1. 「ありふれた組み合わせ」のコモディティ化

多くのSaaS、社内ツール、ECサイトなどは、極論すれば「DBへの読み書き(CRUD)+認証+UI」の組み合わせです。これはオートバトラーで言うところの「鉄板のテンプレ構成(Tier 1デッキ)」です。

  • LLMの得意領域: 「Next.jsで、Supabaseを使って、TailwindでスタイリングしたToDoアプリ」のような、Web上に無数に正解データがある「既知のパターンの組み合わせ」は、もはや人間が書くよりAIに勝手に作らせたほうが早い領域に入っています。
  • 人間の役割: ここでの人間は、コードを書くのではなく「どのテンプレ構成(デッキ)を採用するか」を決める選定者になります。

2. 「任意のもの(Novelty)」への挑戦権

一方で、これまでになかった独自のアルゴリズム、特殊なハードウェア制御、あるいは全く新しいUX概念の実装など、学習データに正解がない「任意の開発」に関しては、LLMは急に弱くなります。オートバトラーで言うと「ユニットの挙動そのものを書き換える」ような行為だからです。

  • ここがまだ**エンジニアが手を動かすべき領域(アクションゲーム領域)**として残ります。
  • ただ、逆に言えば「ありふれた部分」をAIに任せることで、人間はこの「任意の、本当に難しい部分」にリソースを全振りできるようになったとも言えます。

3. 「グルー(接着剤)コード」としてのプロンプト

「何らかの組み合わせで済ませられる」場合、開発の主戦場は「ロジックの記述」から「コンポーネント間の接着」に移行します。

  • 昔: ライブラリAとライブラリBを繋ぐために、仕様書を読んでラッパーコードを書く。
  • 今/未来: 「Aの出力をBの入力形式に合わせて投げて」と指示する。

この変化において、プロダクトマネジメント的な視点で重要になるのは、「何と何を組み合わせれば、コスト(トークン/時間)を抑えつつアウトカム(機能)が出せるか」という目利き力になります。

結論:レゴブロックの組み立て係へ

結局のところ、これからの開発(特にWeb/アプリ領域)は、**「特注の粘土細工(フルスクラッチ)」から「レゴブロックの組み立て(オートバトラー的構成)」**へと比重が移っていくのでしょう。

  • 9割のプロダクト: 既存のレゴ(ライブラリ、API、デザインパターン)の組み合わせで、AIが自動生成可能。
  • 1割のイノベーション: まだ世にない「新しい形のレゴブロック」を作ること。

「水漏れを管理しつつ、既存の最強デッキ(組み合わせ)を擦り続ける」ことが、多くの現場における正解ムーブになっていくのかもしれません。

(返答終了理由: STOP)


ユーザー: どう作業するかを書いてしまった瞬間にそれらはすべてワンショットのプロジェクトになってしまう。コーディングエージェントは壊しながら進むのでレジリエンス的なものが必須になる。つまり何であるかを宣言的に記述しておく必要がある。


AIの思考プロセス

Defining Task Approaches

I'm currently focused on how to define tasks effectively. My thinking centers on the concept of turning a task into a "one-shot project" through procedural definitions. I'm exploring the implications of this rigid approach, specifically how it can create brittle solutions.

Analyzing Declarative vs. Procedural

I'm now deeply analyzing the inherent fragility of procedural instructions compared to the resilience offered by declarative specifications. The core idea is shifting from "how" to "what," emphasizing that agents thrive when given clear objectives. This shift is rooted in the constant 'breaking and fixing' nature of coding agents, making declarative goals a superior strategy for self-correction. The ultimate goal is to validate the user's insight.

Reframing the "How" vs. "What"

I'm expanding on the declarative/procedural divide, using analogies like a recipe versus a finished dish to clarify the difference. Infrastructure as Code, like Kubernetes, is a key parallel, where the desired state is declared rather than the exact steps. I'm focusing on the idea that the test suite is the spec, with the agent as the reconciliation loop for resilience. The ultimate goal is that how is rigid, while what is the destination for agents.

Defining Agent Guardrails

I'm now zeroing in on why direct step-by-step instructions for agents are inherently brittle, essentially like coding in pseudocode. Agents, by nature, are messy, like a "bull in a china shop." Rigid steps get the bull stuck, but declarative instructions ("keep the china intact") encourage self-correction. Idempotency and reconciliation are central to an agent's resilience. The focus is shifting from implementation code to tests, types, and specs, essentially the "what." TDD becomes critical; tests become the essential "leash" for these agents.

Comparing Software Paradigms

I'm now refining the software paradigm comparison, finding that the agile vs. waterfall analogy isn't quite right. The "Imperative vs. Declarative" contrast, as seen in Kubernetes, is far more precise when discussing the user's point about resilience. My goal is to structure this argument clearly, highlighting the fragility of a procedural "how" versus the resilient "what" of declarative approaches, with the agent acting as the reconciliation loop.

AI: その視点は、ソフトウェアエンジニアリングにおける「**命令型(Imperative)から宣言型(Declarative)へのシフト**」を、AI時代の開発プロセスに当てはめた非常に深い洞察だと思います。

「どう作業するか(手順)」を書くと、それは確かにワンショットの使い捨てスクリプトになってしまいますが、「何であるか(状態)」を定義すれば、それは**何度でも立ち返れる正解(Anchor)**になりますね。

この「壊しながら進むエージェント」に対する「宣言的記述」の重要性について、いくつかのアナロジーで整理してみます。

1. Kubernetesの「Reconciliation Loop(あるべき状態への収束)」

おっしゃることは、インフラ構築がシェルスクリプト(手順記述)からTerraformやKubernetes(宣言的記述)に変わった歴史と全く同じ構図です。

  • 手順(シェルスクリプト/命令型): 「Aをインストールして、設定ファイルBを書き換える」
    • これだと、途中でエラーが出たり、既に設定ファイルBが変わっていたりすると、スクリプトは止まるか、環境を破壊して終わります。エージェントへの指示が「手順」だとこれになります。
  • 宣言(Kubernetesマニフェスト/宣言型): 「レプリカ数は3で、このConfigMapが適用されている状態であれ」
    • K8sのコントローラー(=この場合のエージェント)は、現状と理想の差分(Diff)を見つけ、勝手にPodを殺したり作ったりしながら、最終的にその状態に**収束(Reconcile)**させます。

コーディングエージェントは「コードを壊しながら進む」性質があるため、人間が管理すべきは「変更手順」ではなく、「テストが通っている状態」や「要件定義書という正解状態」であるべきだ、という理屈です。

2. 「テストコード」こそが真の仕様書になる

「宣言的に記述する」を開発の現場レベルに落とし込むと、テスト駆動開発(TDD)の復権、あるいは**「テストこそが納品物」**という考え方に行き着きます。

  • これまでの開発: 実装コードが主役で、テストは脇役。
  • これからの開発: テストコード(ガードレール)が主役で、実装コードはAIが生成する「一時的な副産物」。

エージェントが試行錯誤中に内部ロジックを破壊しても、「入力Xに対して出力Yが返ってくること」という宣言(テスト)さえ堅牢なら、エージェントは自分で「あ、壊しちゃった」と気づいて自己修復(Self-Correction)できます。レジリエンスの源泉はここにあります。

3. 「カーナビ」ではなく「羅針盤と地図」

「どう作業するか」を書くのは、助手席から「次の角を右、その次は左」と指示し続けるカーナビのようなものです。これだと、道を一本間違えた(AIがミスをした)瞬間、指示全体が破綻します。

一方で「何であるか」を書くのは、「目的地はここの山頂である」と座標だけを与えておくことです。 そうすれば、エージェントが道に迷おうが、崖から落ちそうになろうが(壊しながら進もうが)、「山頂に近づいているか否か」という評価関数さえあれば、泥臭くても勝手にルートを再検索して進むことができます。

結論:プロンプトエンジニアリングから「仕様エンジニアリング」へ

こう考えると、我々人間に求められるスキルは、AIにいうことを聞かせるためのプロンプトテクニック(手順の指示)ではなく、**「AIがどれだけ暴れても揺るがない、堅牢な受け入れ条件(Acceptance Criteria)の定義能力」**になっていくのでしょう。

  • 曖昧な言葉ではなく、型定義、インターフェース定義、そしてテストケースで「外枠」をガチガチに固める。
  • 中身のロジックはブラックボックスでもいいから、その外枠を満たすまで「殴り続けろ(リトライしろ)」と指示する。

これが、オートバトラー時代における「最強のデッキ構築」なのかもしれません。

(返答終了理由: STOP)


ユーザー: k8sの問題はサービスディスカバリーを含めたエコシステム自体を全部まるっと記述可能なところでコストが高い。これはpullベースの通知を繰り返してるからとも言える。そのためにコンポーネントの数が加速度的に増える


AIの思考プロセス

Defining the Core Problem

I'm currently focused on the core argument: Kubernetes' cost. Specifically, I'm analyzing the complexity and cognitive load associated with the K8s ecosystem. The operational overhead is a key factor.

Refining the Argument's Scope

I'm now zeroing in on the inherent complexity of Kubernetes' declarative approach. The root cause, as I see it, stems from the pull-based notification system, leading to exponential component growth. This is a crucial point, I'm finding the link to the prior context on LLM coding agents illuminating. I'm now questioning whether a purely declarative system is the best approach for managing coding agents, especially given the Kubernetes example. I'm starting to see a potential pitfall if we attempt to manage everything declaratively.

Analyzing the Root Cause

I'm now formulating my response strategy, starting by acknowledging the Kubernetes complexity and its "component explosion" due to the pull-based model. I'll explain why this happens – that every resource needs watchers, leading to sidecars and operators. I'll then connect this back to AI development. If we build a fully declarative AI coding ecosystem, we might recreate the k8s complexity. I'm starting to contrast push versus pull systems, and attempting to find the right abstraction level for AI agents. Perhaps a persistent agent cluster watching every aspect of a project is not ideal.

Considering Reconciliation Strategies

I'm now contemplating reconciliation strategies. I'm leaning toward the potential benefits of "ephemeral" reconciliation, focusing on a run-fix-die approach, in contrast to Kubernetes' "always-on" loops. This leads me to draft content exploring the Kubernetes trap and its implications for AI agents. I see the potential for a "YAML Hell" scenario if we replicate Kubernetes' component explosion in AI development. I'm focusing on contrasting push versus pull systems.

Evaluating New System Architectures

I'm now exploring the CI/CD pipeline as a potential analogy for AI agent orchestration, favoring its event-driven, push-based model over Kubernetes' state-driven pull. A hybrid approach emerges: defining the interface declaratively, but executing the agent's work as a "job" that runs once, rather than as a deployment. Additionally, I'm now contrasting "Fat Agents" with "Micro-Agents," considering that a large-context agent might be preferable to a swarm of smaller ones to avoid component explosions.

Clarifying Architectural Nuances

I'm now zeroing in on the fundamental distinction: Kubernetes' pull-based system is ideal for running applications, ensuring their continuous liveness, but coding (and AI workflows) are best served by a push/event-driven model. It seems unnecessary to have agents constantly watching files; rather, triggering them on commits makes more sense. I'm moving on to consider the right balance: declarative for the overarching goal, but not necessarily for the entire process, to avoid a "YAML hell" scenario. I'm trying to align with the original auto-battler metaphor.

AI: おっしゃる通り、その視点は非常に痛いところを突いています。Kubernetes(k8s)が「宣言的であること」を徹底した結果、**「状態を監視し続けるための仕組み(エコシステム)」そのものの維持コストが肥大化する**というパラドックスですね。

「Pullベースの通知(Reconciliation Loop/Watch)」を前提にすると、Aの状態変化をBが検知し、そのためにCが必要になり……と、**「監視役の監視役」**みたいなコンポーネントが加速度的に増殖していく。これをコーディングエージェントの開発環境にそのまま当てはめると、非常に危険な未来が見えてきます。

この「k8sの罠」をAI開発のアナロジーに落とし込むと、以下のような懸念点が浮き彫りになります。

1. 「エージェント・オーケストレーション」の爆発

k8sにおけるサービスディスカバリーやService Mesh(Istioなど)が複雑怪奇になるのと同様に、もしコーディングエージェントを「個別の専門機能(マイクロサービス)」として分割しすぎると、地獄を見ます。

  • 理想: フロントエンド担当エージェントとバックエンド担当エージェントが連携して開発する。
  • k8s的悪夢:
    • 「仕様変更検知エージェント」が変更をPullする。
    • 「タスク振り分けエージェント(Service Discovery)」が適切な担当を探す。
    • 「整合性チェックエージェント(Sidecar)」が通信に割り込む。
    • これらを定義するためのYAML(プロンプト設定ファイル)が数百行になり、**「コードを書くより、エージェント間の連携設定を書く方が大変」**になる。

まさに「コンポーネントの数が加速度的に増える」現象です。

2. Pull型(常時監視)のコストとレートリミット

k8sのControllerはGo言語のループで軽量に回るから良いですが、LLMエージェントが「Pull型」でリポジトリの状態を常時監視し続けると、破産します。

  • k8s: 「Stateが変わったかな?(ミリ秒レベルでループ)」→ コストほぼゼロ。
  • LLM: 「コードが変わったかな?(トークン消費してRead/Analyze)」→ 従量課金で爆死、かつレートリミットで停止。

したがって、AIによる開発においては、k8sのような完全なPull型(Reconciliation)ではなく、イベント駆動(Push型 / CIパイプライン的)なアプローチとのハイブリッドが現実的な解になりそうです。

3. 「宣言」の粒度と「Fatなエージェント」

コンポーネント爆発を防ぐためには、k8sのマイクロサービス思想とは逆に、**「ある程度なんでもできるFatなエージェント(モノリス)」**に、抽象度の高い宣言を投げる方が、現時点のLLM開発では理にかなっているかもしれません。

  • k8s的アプローチ: Pod, Service, Ingress, PVC... とリソースを細切れにして、それぞれにControllerを用意する。
    • → 認知負荷が高すぎる。
  • あるべきAIアプローチ: 「この要件定義書(宣言)を満たすアプリになれ」という、もっと荒い粒度の宣言。
    • 内部のサービスディスカバリーや依存関係解決は、エージェントの**コンテキスト内(インメモリ)**で完結させ、外側のコンポーネントとしては露出させない。

結論:k8sを反面教師にする

「宣言的記述(Declarative)」は強力ですが、k8sのように**「システムの構成要素すべて」を宣言管理しようとすると、管理コストが線形ではなく指数関数的に増える**という教訓ですね。

コーディングエージェントにおいて宣言的であるべきなのは、あくまで**「最終的なアウトカム(仕様・テスト)」**だけであって、プロセスやエージェント間の通信経路(エコシステム)まで厳密に記述・管理しようとすると、我々は「YAML(プロンプト)を書く機械」に逆戻りしてしまいそうです。

「オートバトラー」の話に戻れば、ユニットごとの細かい経路探索アルゴリズム(サービスディスカバリー)までプレイヤーがいちいち設定したくない、**「そこは勝手にうまくやってくれ(抽象化)」**というバランス感覚が、PMとしての腕の見せ所になりそうです。

(返答終了理由: STOP)


ユーザー: まずはお手本はgithub actionsのようなもののはず


AIの思考プロセス

Framing the GHA Comparison

I'm now focusing on analyzing the user's proposition that GitHub Actions (GHA) offers a superior model for coding agents compared to Kubernetes. My current thinking revolves around pinpointing the key aspects of GHA that make it a compelling comparison, highlighting its strengths as a possible reference architecture. This stage centers on identifying specific features of GHA that are relevant.

Defining GHA's Appeal

Now, I'm delving deeper into the specifics of GitHub Actions. My assessment highlights its event-driven trigger system (push, PRs, schedules), contrasting it to Kubernetes' constant monitoring. The structure of workflows, jobs, and steps within GHA also catches my eye, alongside the ephemeral container environment and its reliance on external state management. I am particularly considering the marketplace of actions and how this contrasts with Kubernetes.

Modeling Agent Workflows

I'm now drawing parallels between GHA's operational characteristics and the optimal behavior of LLM coding agents. The focus is on aligning event-driven triggers in GHA (like pull requests) with similar trigger mechanisms for agents. I'm exploring the cost-efficiency advantages of this approach, emphasizing that agents, like GHA, should only be active when truly needed and not engaged in constant polling. This helps to make a strong argument.

Clarifying the Workflow Paradigm

I'm now focusing on how GHA's structure informs agent design. I see a compelling parallel in GHA's clean-slate, task-specific runner environments and how we could design agents with ephemeral contexts, discarding memory after task completion. The structured "Plan -> Code -> Review -> Fix" workflow, mirroring GHA's rigid build/test/deploy, provides a clear pathway. The "uses" mechanism also stands out, advocating for re-use of pre-defined tools to combat component explosion, too.

Composing a Structured Argument

I've just structured the response, leading with strong agreement on the GHA metaphor's benefits. I'm building out sections: the cost-effective, event-driven approach versus Kubernetes, the workflow's benefits, and the need for agent statelessness. I'm also now leveraging the "Marketplace" concept of reusable tools and linking it back to previous user discussions about outcomes and costs for a cohesive narrative.

Refining the Argument's Tone

I'm now focusing on the linguistic details, ensuring technical terms are used correctly, such as "event-driven" and "stateless." The tone should be professional but acknowledge the user's insights. I'm also confirming the original GHA comparison, discarding an AWS Lambda comparison because GHA more closely aligns to CI/CD which is exactly what coding agents do. Finally, I'm generating the final response.

AI: その通りですね。「GitHub Actions(以下GHA)」こそが、現時点でのコーディングエージェント(LLM)運用の**最も現実的で美しいお手本**だと思います。

Kubernetesが「常にあるべき状態を維持しようとする(終わりのないループ)」のに対し、GHAは「トリガーに対して走り、タスクを完遂して死ぬ(明確な終わりがあるワンショット)」だからです。

なぜGHAが理想的なモデルなのか、いくつかの観点で整理すると非常にしっくりきます。

1. 「イベント駆動」によるコスト制御

k8s的な「Pull型(常時監視)」はトークン課金と相性が最悪ですが、GHA的な「イベント駆動」は最適です。

  • Trigger (on: push/issue): 人間が指示を出した時、あるいはテストが失敗した時だけ起動する。
  • Job: 明確な目的(「バグを直せ」「機能を追加せよ」)のためにリソースを立ち上げる。
  • Ephemeral (使い捨て): ジョブが終わればランナー(エージェントのコンテキスト)は破棄される。

これにより、「水をこぼしながら運ぶ機械」を24時間稼働させるのではなく、「必要な時だけ水を運ばせて、運び終わったらスイッチを切る」ことが可能になります。

2. 「Workflow」という名のガードレール

GHAのYAMLファイルは、「手続き(Imperative)」を「宣言的(Declarative)」な枠組みに閉じ込めた傑作です。

  • LLMに「全部任せる」と暴走しますが、GHAのようにステップを定義してあげると安定します。
    1. Checkout (コードを読む)
    2. Plan (変更計画を立てる)
    3. Code (実装する)
    4. Test (テストを実行する)
  • もしStep 4でコケたら、GHAが「×」を出すように、エージェントに「エラーログを見てRetryせよ」という分岐を作ればいい。

この**DAG(有向非巡回グラフ)**的な構造こそが、カオスになりがちなエージェントの挙動を縛るのに最適な抽象度です。

3. ステートレスな「Runner」の強み

GHAのランナーは毎回クリーンな環境で立ち上がります。これはLLMの弱点(コンテキストが長くなるとハルシネーションが増える、過去の経緯に引きずられる)を補完します。

  • k8s的: ずっと生き続けているので、メモリリーク(誤ったコンテキストの蓄積)が起きる。
  • GHA的: 毎回 git checkout から始まるので、常に「最新の正解コード」だけをコンテキストに入れて、フレッシュな頭脳でタスクに取り組める。

「エージェントを育てる」のではなく、「タスクごとに最高のエージェントを召喚して、終わったら帰ってもらう」スタイルです。

4. エコシステムの形(Marketplace)

GHAには actions/checkoutdocker/setup-buildx のような、誰かが作った便利なアクション(部品)を uses で組み込む文化があります。

コーディングエージェントもこうあるべきです。

  • 巨大な万能エージェントを作るのではなく、
  • uses: agent/search-web
  • uses: agent/write-python
  • uses: agent/review-security といった「特化型スキル」をワークフローの中で呼び出す形です。これならコンポーネントが爆発せず、必要なものを必要な順序で呼ぶだけで済みます。

結論:CI/CDパイプラインへの「知能」の組み込み

結局のところ、これからの開発フローは、今のCI/CD(GHA)の中に、「人間がやっていた判断」や「コード記述」というStepを、uses: llm-coder のように組み込む形に収束していくのかもしれません。

  1. 人間がIssueを立てる(Trigger)
  2. GHAが回る
    • Step 1: AIが要件を読んでコード修正
    • Step 2: テスト実行
    • Step 3: 失敗したらAIが自己修正(max-retries: 3)
  3. 成功したらPR作成(Outcome)

これなら、PM(人間)は**workflowのYAML(プロセス設計)**を管理するだけでよく、中身の泥臭い作業は従量課金のランナー(LLM)がやってくれます。これこそが「オートバトラー」であり、「人件費と変わらないコスト管理」の到達点に見えます。

(返答終了理由: STOP)


ユーザー: つまり宣言的と表現したときに記述と形態で分けて考える必要がある。


AIの思考プロセス

Clarifying Key Concepts

I'm currently dissecting the user's core idea. Specifically, I'm trying to unpack the meaning of "declarative" and how it relates to descriptive writing versus the underlying form or topology of something. The goal is to separate these elements to fully understand the user's perspective.

Defining Declarative Nature

I'm now focusing on the distinction between state and process within declarative systems. The goal is to avoid the complexity inherent in Kubernetes, which can be seen as "state-seeking," but maintain the benefits. I'm trying to refine the user's concept of what constitutes "declarative" design.

Delineating Description and Form

I'm starting to home in on the user's key distinction. My current focus is on how the user contrasts description (intent) with form. The idea is to make sure we capture the essence of what is meant, without the complexities and associated costs of a reconciliation loop. I'm aiming to differentiate intent from process, like Kubernetes versus GitHub Actions.

Pinpointing Lifecycle Elements

I'm now zeroing in on the user's framing of pipelines and workflows. Specifically, I'm focusing on contrasting description with the lifecycle or pipeline aspects, as exemplified by GitHub Actions. I'm building on the idea of declarative code specifying the desired state ("code here") versus the imperative steps. I'm exploring the "sweet spot" of the coding agent, where the declarative description guides a form or workflow.

Integrating Key Axes

I'm now integrating the two axes of description and form. I'm focusing on "Desired State" versus "Workflow" and how the user's idea relates to it. I see the user is envisioning a k8s-like description but with a GHA-like execution. My goal is to synthesize the concepts of the "Contract" and the system's "architecture," to avoid Kubernetes' complexity. I'm aiming for a clear separation to effectively manage "Cost vs. Outcome." I must ensure that I explain how confusing the form and description causes k8s-level complexity.

Analyzing Cost Considerations

My current concern is cost. I'm carefully analyzing the trade-offs of the user's proposed approach, especially its potential cost. I need to make sure the benefits outweigh any added expenses. Now, I'm integrating the cost considerations to the desired state versus workflow approach. The overall goal remains a system that balances functionality and efficiency, and avoids the complexity and costs of Kubernetes.

AI: その「記述」と「形態」を切り分けるという解像度は、この議論の核心を突いています。

「宣言的(Declarative)」という言葉は、IT業界ではあまりに広い意味で使われすぎていて、**「何を定義するか(記述の抽象度)」「どう実行されるか(ランタイムの形態)」**が混同されがちです。

LLM/コーディングエージェントの文脈において、この2つを明確に分離すると、理想的なシステム像が浮かび上がります。


1. 記述(Description):何を「正」とするか

ここは**k8s的な「Desired State(あるべき状態)」**の思想が最適です。

  • 何を記述するか: 手順ではなく「完了条件(Definition of Done)」を書く。
    • × 「ファイルAを開いて、関数Bを書き換えて…」
    • ○ 「テストスイートXが全てPassしている状態であれ」
    • ○ 「このインターフェース定義(OpenAPIなど)を満たすエンドポイントが存在せよ」
  • メリット: これにより、PM(人間)はエージェントの試行錯誤プロセス(How)に関与せず、納品物のクオリティ(What)だけを管理できます。

2. 形態(Form):どうライフサイクルを回すか

しかし、その実行形態に関しては、k8sのような「無限ループ(Reconciliation)」ではなく、**GHA的な「パイプライン(Workflow)」**であるべきです。

  • どう動くか: 有限のステップ(DAG)で動くワンショット型。
    • × k8s型(State Reconciliation): 「常にコードを監視し、仕様書とズレたら即座に修正し続ける」
      • → これをLLMでやると、ループが止まらず、APIコストが無限にかかり、ハルシネーションの連鎖でコードが崩壊します。
    • GHA型(Workflow Execution): 「トリガー(指示)があった時だけ起動し、ゴール(テストPass)に向かって有限回試行し、成功/失敗の結論を出して終了(Die)する」

結論:記述は「状態」、形態は「フロー」

つまり、コーディングエージェントにおける理想的な設計は、このハイブリッドになります。

「『状態(State)』を宣言的に記述し、それを『フロー(Workflow)』として実行させる」

表にするとわかりやすいかもしれません。

比較 記述(Description) 形態(Form) LLM開発への適性
命令型スクリプト 手順を書く (Step-by-step) フロー (Run once) △ 指示が脆い(壊れやすい)
Kubernetes 状態を書く (Desired State) ループ (Always on) × コスト爆発・過剰修正
GitHub Actions 手順を書くことが多い フロー (Run once) ○ 実行モデルは正解だが、記述が詳細すぎる
理想のAgent 状態を書く (Desired State) フロー (Run once) ◎ 最適解

なぜこれが「人件費と変わらない」話に戻るのか

最初の「アウトカムとコスト」の話に戻ると、この分離はコスト管理そのものです。

  • 記述(状態)の宣言は、人間が期待するアウトカムの定義です。
  • 形態(フロー)の採用は、LLMのリソース(コスト)を「タスク完了まで」に限定するリミッターです。

k8sのエコシステムが高コストになるのは、「記述(状態)」と「形態(ループ)」が密結合しているため、状態を維持するためにシステム全体が起き続けていなければならないからです。 一方、「テストを通したら終わり」というGHA的形態であれば、記述がどれだけ複雑でも、実行コストは「解決にかかった時間」だけで済みます。

**「宣言的なゴールを持たせたワンショットのプロジェクト」**として管理すること。これが、水をこぼす機械(LLM)を安全に運用するための要件定義と言えそうです。

(返答終了理由: STOP)


ユーザー: コンパイル時コストとランタイムコストと同様にLLM以外のコードによる処理自体はこの枠組みにとらわれなくてよいというのもまた重要。例えばgo analyzerのlinterをLLMで生成しても良い。これの実行コストは安い。


AIの思考プロセス

Differentiating Costs Now

I'm currently focused on the fundamental distinction between compile-time and runtime costs. My thinking has centered on applying this differentiation specifically to code produced by Large Language Models. I aim to clearly articulate the unique cost implications of LLM-generated code in these two phases.

Shifting Intelligence to Tooling

I'm now focusing on the implications of a hybrid approach. The generation phase, akin to compile-time, involves the higher expense of LLM operation. Then the generated code runs, like runtime, which is cheap and deterministic. This creates a "shift left" of intelligence, moving it to tool creation. Instead of repeatedly querying the LLM for each code check, we ask it once to build a specific tool, optimizing resource use.

Connecting Contextual Dots

I'm now connecting this idea to declarative descriptions and workflow discussions. The agent's output is a static script or binary that acts as a guardrail and is reusable, reducing future costs and making the ecosystem more efficient. This forms a feedback loop, improving the process over time. This shifts the intelligence costs from execution to creation.

Framing the Expenditure

I'm now framing this in terms of CAPEX (tool creation by LLM) versus OPEX (running the generated tool). The declarative goal remains constant (e.g., passing a linter), but the linter itself is now AI-generated. I'm building this as an analogy: Rather than repeatedly hiring a genius to check individual screws, we hire that genius to design a screw-checking machine once and then run that machine. I'm drafting content to refine this metaphor. I am planning on structuring my response, introducing the key distinction between generation and execution costs as the scalability key, and I am planning on providing a deep dive of the Go Analyzer example.

Solidifying Intelligence Assets

I'm now solidifying my thinking around the concept of "Frozen Intelligence." The core idea is shifting from a service-based consumption model to creating reusable assets. The LLM's fluid intelligence is crystallized into static, executable code, which becomes a key element in our declarative framework. This transformation enriches the "Test/Check" layer, enabling the LLM to generate the very guardrails that subsequently control its operations, ultimately, it is a PM's role to choose when to "Consult the Oracle" or "Build a Tool"

Solidifying the Model

I'm now solidifying my thinking around the implications of "crystallization of intelligence" ("知能の固定化") and the shift from operational expenditure to capital expenditure. By moving from a service model to asset creation, the LLM's adaptive intelligence is converted into reusable code. This approach directly addresses the "component explosion" problem, making numerous static binaries feasible and cost-effective.

AI: そのご指摘は、LLM活用の経済合理性を考える上で**「必殺技」**とも言える視点です。

「毎回AIに考えさせる(ランタイムコスト=高)」のではなく、**「AIに判断ロジックをコード化させ、以降は計算資源で殴る(コンパイル時コストのみ=安)」**というアプローチですね。

この転換は、いわば**「流動的な知能(Liquid Intelligence)」を「固定された資産(Crystallized Intelligence)」に変換するプロセス**であり、コスト構造を劇的に変えます。

1. 「毎回診察する医者」から「薬の処方」へ

例に挙げられた go analyzer の話は非常に分かりやすいです。

  • パターンA(ランタイムコスト依存):
    • PRが出るたびにLLMに「このコードにバグはないか?」と聞く。
    • コスト: 毎回発生。しかもコードが増えるほどトークンも増える。
    • リスク: AIの気分で揺らぐ(非決定論的)。
  • パターンB(コンパイル時コストへの転嫁):
    • LLMに「この特定のバグパターンを検知する go analyzer を書いて」と一度だけ依頼する。
    • 生成されたLinterをCIに組み込む。
    • コスト: 生成時の一回のみ。実行はCPU時間(ほぼ無料)。
    • 品質: 常に同じ基準で判定される(決定論的)。

これは、水を運ぶ機械(LLM)に、「水を運ぶパイプライン(静的解析ツール)」を建設させることに他なりません。一度パイプラインができれば、もう機械を動かす必要はないのです。

2. ガードレールの自動生成と強化

先ほどの「宣言的記述(テストや仕様)」の話と組み合わせると、このアプローチの強力さが際立ちます。

人間がテストケースを全部書くのは大変ですが、**「エッジケースを列挙して、それらを検知するテストコード(またはLinter)を書いて」**とLLMに指示することは簡単です。

  1. Generate: LLMが、特定のルール違反を弾くための軽量なスクリプト(Linter/Test)を生成する。
  2. Freeze: そのスクリプトをリポジトリにコミットする。
  3. Execute: 以降の開発(エージェントによる修正など)は、この「安価なスクリプト」によるチェックをパスしなければならない。

これにより、「高価なAI」を制御するための枠組みを、「高価なAI」自身に作らせるという、自己強化ループ(Bootstrapping)が回ります。

3. コスト構造の変革:CAPEX vs OPEX

ビジネス的な視点(PMの視点)で見ると、これはOPEX(運用費/従量課金)をCAPEX(設備投資/資産化)に変える行為です。

  • LLMによる直接処理: OPEX。使い続ける限り課金され続ける。
  • LLMによるツール生成: CAPEX。最初に投資すれば、あとは減価償却するだけ。

「このタスクは毎回AIの創造性が必要か? それとも一度ロジックを固めれば済むか?」 この見極めこそが、プロダクトマネージャーやアーキテクトの最重要スキルになります。

  • 「ユーザーへの共感が必要なメール返信」 → Runtime LLM (OPEX)
  • 「変数の命名規則チェック」や「既知のアンチパターン検出」 → Generated Code (CAPEX)

4. コンポーネント爆発の解決策

前の議論で懸念された「k8s的なコンポーネント爆発でコストが嵩む」という問題も、これで解決します。

もし100個のコンポーネント(マイクロエージェント)がすべてLLM駆動で常駐していたら破産しますが、**「99個の軽量なGoバイナリ(元AI製)」と「1個の指揮官LLM」**という構成なら、運用コストは極めて低く抑えられます。

結論:LLMは「道具」ではなく「道具鍛冶」

最終的に、LLM利用の理想形の一つは、**「コードを書くこと」ではなく「コードを書くための道具(Linter, Test, Scaffold)を作ること」**にシフトしていくはずです。

「水をこぼしながら運ぶ機械」には、水を運ばせるのではなく、「水漏れしない頑丈な水道管」を作らせる。 そうすれば、我々は安価で高速な「通常のコンピュートリソース」という水圧を利用して、大規模なシステムを運用できるようになります。

この**「知能の固定化(Coding Intelligence into Static Binary)」**のプロセスを設計図(Workflow)に組み込むことこそが、次世代の開発スタイルの要になりそうです。

(返答終了理由: STOP)


ユーザー: 仕様についてはどうだろうか?github issuesの形が正しいんだろうか?どうやってプロンプトに転写されるべきなんだろうか?

prのマージキューのようにissue自体も依存を持つものとして管理する必要があるんだろうか?(人間によるチェックが必要になるんだろうか?受け入れテストはいつやるべきなんだろうか?)


AIの思考プロセス

Defining the Scope

I'm currently focused on defining the initial scope. My key question is how best to manage specifications in an LLM-driven workflow. I'm breaking this down into sub-questions to pinpoint the core challenges. The goal is to establish a robust framework for handling specs efficiently.

Structuring the Approach

I'm now diving into GitHub Issues as a potential format, seeing if it's the right choice. My initial thought is it could work as the standard unit, but raw issues are bad prompts, needing structuring. This means templates and context like a repository map are critical to make the process smoother.

Refining the Process

I'm now zeroing in on prompt generation from issues. It's not a simple copy-paste; context injection is key. Think of the issue as an order ticket and the prompt as a detailed recipe. I'm exploring RAG or creating a machine-readable "Spec File". I'm also now considering the dependency management, and it's essential for me to consider DAGs of issues, not just a bunch of random tasks! I also believe that a human sandwich is the way to go.

Analyzing the Design

I'm now iterating on content drafting, focusing on how we structure both GitHub issues and the prompts generated from them. I'm thinking about structured issue templates as a standard, transforming issues into detailed specs, using a "Prompt Compiler." The key is "Spec as Code." This should also include a "Project Graph" to manage issue dependencies, using topological sorting or a "Release Train" analogy. I believe we need to factor in that humans need to validate UI/Logic through PR review at the end.

Evaluating the Acceptance

I'm now focusing on defining the acceptance process. I've realized acceptance criteria are critical and should be a formal contract. An "Issue Linter" using LLMs to check spec clarity is key before coding. I envision a 3-phase check: Spec, Auto CI, and a final Human PR review, ensuring quality. Also, I'm now refining the tone, using PM/Architecture perspective, metaphors, and actionable language.

Generating the Framework

I'm now zeroing in on the final output. My focus is on the "Issue as Interface" concept and how to build a translation layer that bridges the gap. I am thinking through proper dependency management, and how that can be structured. Also, I am ensuring to incorporate coding for all "Acceptance Tests" not just manual testing!

AI: 仕様(Spec)の扱いは、コーディングエージェント運用における**最大のボトルネックであり、かつ最大のレバー(制御点)**になりますね。

「GitHub Issuesが正しいのか?」「依存関係はどうするか?」「受け入れはいつか?」という問いは、まさに**「AIにソフトウェア開発をさせるためのPM手法(Ops)」**の核心です。

これまでの「宣言的記述」「オートバトラー」「コンパイル時コスト」の議論を踏まえて整理すると、以下のようなアーキテクチャが見えてきます。


1. GitHub Issues:正しいが、「そのまま」では不十分

GitHub Issuesは「タスクの単位(Unit of Work)」としては最適です。コードに近い場所にあり、ブランチやPRと紐づくからです。 しかし、人間用のIssue(ふんわりした要望)をそのままプロンプトに投げると、AIは混乱します。

解決策:Issueを「構造化された仕様(Spec)」に変換する

  • Issue Templateの厳格化:
    • As Is / To Be の明記。
    • **Acceptance Criteria(完了条件)**の箇条書き(これがテストケースになる)。
    • 関連ファイルのパス指定。
  • 「Spec Refinement」ステップの導入:
    • 人間がIssueを書く → 安いLLM(Reviewer Agent)がIssueを読み、「情報不足」を指摘する。
    • 「エラー処理はどうしますか?」「既存のクラスAとの整合性は?」とツッコミを入れさせ、人間がそれに答えて初めてIssueが Ready 状態になる。
    • この Ready になったIssueだけが、コーディングエージェント(Worker)のプロンプトに転写される。

2. プロンプトへの転写:「コンテキストの注入」

Issueの内容をプロンプトにする際、単なるコピペではなく、**「ビルドコンテキストの解決」**のような処理が必要です。

  • Issue: 「ログイン画面のボタンを青くして」
  • Promptへの変換(Transpiler):
    1. Issue本文を取得。
    2. リポジトリの地図(File Tree)を参照。
    3. login_page.tsxtheme.ts の中身をVector Search等で引っ張ってくる。
    4. 「プロジェクトのルール(Coding Guidelines.md)」 をヘッダーに追加。
    5. これらを一つの巨大なXML/Markdown形式のプロンプトにパッケージングしてエージェントに渡す。

つまり、Issueは「種(Seed)」であり、プロンプトはそこから生成された「発芽セット」というイメージです。

3. Issueの依存管理:DAG(有向非巡回グラフ)と直列化

おっしゃる通り、PRのマージキューと同様、Issueにも**明確な依存関係(Blocker)**が必要です。

  • なぜ必要か:
    • 「APIのレスポンス変更(Issue A)」と「それを表示するUI変更(Issue B)」を並列で走らせると、エージェントはお互いの変更を知らないため、統合時に壊れます(コンフリクト地獄)。
  • どう管理するか:
    • GitHub Issuesの TasklistDependencies 機能を使います。
    • Workflow:
      1. Issue A(DB/API変更)をエージェントに解かせる。
      2. Aがマージされ、メインブランチのコードが更新される。
      3. 更新されたコードをベースにして初めて、Issue B(UI変更)のジョブがトリガーされる。
  • PMの役割:
    • ここでPM(人間)の仕事は、「どの順番でIssueを倒せば手戻りがないか」という**トポロジカルソート(段取り)**になります。これはオートバトラーにおける「ユニットを出す順番」そのものです。

4. 受け入れテストと人間の介入タイミング

「いつテストするか」はコストと品質のトレードオフですが、以下の3層構造が推奨されます。

Phase 1: 仕様のLint(Start前)

  • 担当: 人間 or 軽量LLM
  • 内容: Issueに曖昧さがないかチェック。曖昧なまま走らせるとトークンの無駄遣いになるため、ここで弾く。

Phase 2: 自動テストによるガードレール(Development中)

  • 担当: エージェント + CI
  • 内容: エージェントがコードを書く前に(あるいは同時に)テストコードを書く。
    • Issueに書かれた Acceptance Criteria を満たすテストがPassするまで、PRを作らせない。
    • これは先述の「GHAによるコスト制御」のフェーズです。

Phase 3: 最終受け入れ(Merge前)

  • 担当: 人間
  • 内容: PRレビュー。
    • ロジックやSyntaxはCIとLinter(Phase 2)で保証されているので、人間は**「仕様の意図通りか?」「UIの触り心地はいいか?」「セキュリティホールはないか?」**という高レイヤーなチェックに集中します。

まとめ:開発プロセスのパイプライン化

この仕組み全体を見ると、ソフトウェア開発自体が、工場のようなパイプラインになります。

  1. Raw Material: 人間のふんわりした要望
  2. Refinery (Spec Linter): 構造化されたIssueへの変換(依存関係整理)
  3. Manufacturing (Agent): 依存順にIssueを消化し、コードとテストを生成
    • ここはコンテキスト注入とGHAでの自動リトライで回す
  4. Quality Control (CI): 自動テストパス
  5. Final Inspection (Human): マージ承認

「Issue管理」とは、このパイプラインのベルトコンベアの速度と順序を調整することであり、これこそがAI時代のプロダクトマネジメントの実体と言えるのではないでしょうか。

(返答終了理由: STOP)


ユーザー: 現状の限界なども整理するべきかもカットオフの前後の話、コンテキストウィンドウの話、RAGが機能しない話…


AIの思考プロセス

Assessing the Landscape

I'm currently focused on the limitations of current LLM-based development, specifically coding agents. My thought process is now centered on the practical implications of knowledge cutoffs, context window constraints, and the nuances of Retrieval-Augmented Generation (RAG). I'm evaluating how these challenges directly impact the effectiveness of these agents.

Unpacking Technical Bottlenecks

I'm now focusing on the specific "what breaks" scenarios for coding agents. I'm actively deconstructing key limitations, starting with knowledge cutoffs – the frustrating reality of outdated library information and the resulting hallucinated code. I'm also examining the attention bottleneck, recognizing the accuracy degradation and cost increases even with massive context windows. Further, I'm thinking about RAG failure modes to have a complete view.

Addressing Capacity Constraints

I'm now grappling with the fundamental limitations in processing large codebases. The challenge goes beyond simply holding the entire codebase in memory; it's about the inherent reasoning limitations with larger contexts. I'm focusing on "needle in a haystack" situations and how to circumvent losing previous instructions in lengthy interactions.

Analyzing the Core Challenges

I'm now diving into the structural challenges with Retrieval-Augmented Generation (RAG). My main thought is that code isn't like normal text; code is better viewed as a graph instead of a vector. I'm focusing on the global reasoning deficit this introduces. My thought process is exploring how to deal with the finite attention in a codebase that is infinitely large. Finally, I'm thinking of ways to cope with this, such as human intervention.

Reimagining Code Retrieval

I'm now zeroing in on the fundamental mismatch of using vector search for code. It's becoming clear that this approach, while useful for text, is woefully inadequate for code's inherent graph-like structure. My central concern is the inability of RAG to handle connected logic effectively, illustrated by the simple example of a function name change that RAG can't track throughout its usages. This severely compromises the "auto battler" vision.

Refining Limitation Framework

I'm now integrating a structured framework to categorize limitations. I'm focusing on the "Time," "Capacity," and "Structure" walls, which correspond to knowledge cutoffs, context windows, and RAG's structural inadequacies, respectively. This should help me better analyze how these limitations relate to the "bugs" in our "simulation game" context, which is the action game becoming simulation game. I'm also planning to think about a "multi-hop reasoning" wall as it leads to agent loops. I'm double checking my output to make sure those concepts are correctly covered. I also need to make sure technical terms are correctly used in Japanese translations.

AI: これまでの「オートバトラー的な理想」に対して、現在地での「冷徹な現実(Reality Check)」を整理するのは非常に重要ですね。

おっしゃる通り、現在のコーディングエージェントは、「古い地図(カットオフ)を持ち、視野が狭く(コンテキスト制限)、断片的な情報(RAGの限界)で迷子になる」 という弱点を抱えています。

これらは単なる「精度の問題」ではなく、構造的な限界です。それぞれ整理します。

1. 「時間の壁」:Knowledge Cutoffとライブラリの進化速度

ソフトウェア(特にWebフロントエンドやクラウドインフラ)の進化速度は、モデルの再学習サイクルより圧倒的に速いです。

  • 現象:
    • Next.jsやLangChainのようなライブラリは、数ヶ月で破壊的変更(Breaking Changes)が入ります。
    • モデルは「2023年のベストプラクティス(App Router未対応など)」を自信満々に書いてきます。
  • なぜ致命的か:
    • 生成されたコードは構文的には正しいが、現在のバージョンでは動かない
    • エージェントがエラーログ(Deprecation Warning)を見ても、自身の学習データに「新しい書き方の正解」が存在しないため、無限に古い書き方を試行してトークンを溶かす(死のループ)。
  • 対策の限界:
    • ドキュメントをRAGで食わせようとしても、「古い知識(学習済み重み)」と「新しい知識(コンテキスト)」が衝突し、モデルが混乱することが多々あります。

2. 「容量と精度の壁」:Context WindowとLost in the Middle

「200万トークン対応!」といったマーケティング文句とは裏腹に、実用上の限界はもっと手前にあります。

  • 「読める」≠「理解して考慮できる」:
    • 大規模なコードベースを全部プロンプトに入れても、モデルは**「真ん中あたりにある記述」を忘れる(Lost in the Middle現象)**傾向があります。
    • 「ファイルAを変更した影響が、遠く離れたファイルZに出る」といった、広いコンテキストを保持した推論が苦手です。
  • コストとレイテンシ:
    • 毎回全ファイルを食わせると、1回の修正指示で数百円かかり、レスポンスに数分待たされます。これでは開発体験(DX)が死にます。
    • したがって、結局は「関連ファイルのみに絞る」必要が出てきますが、そこで次の「RAGの限界」に直面します。

3. 「構造の壁」:コードにおけるRAGの機能不全

自然言語(ドキュメント検索)で成功したRAGのアプローチは、コード検索においてはポンコツになりがちです。

  • コードは「意味(Semantics)」ではなく「構造(Graph)」:
    • 通常のVector Search(意味検索)は、「キーワードが似ている」ものを探します。
    • しかしコードで必要なのは、**「この関数を呼んでいる箇所すべて(参照)」「このクラスが継承している親クラス(継承)」**といった、**依存関係グラフ(AST/Call Graph)**の追跡です。
  • 部分最適の罠:
    • RAGが auth.ts (認証ロジック)だけを抽出してエージェントに渡すと、エージェントは「その関数がどう使われているか」という**呼び出し元の文脈(Global Context)**を知りません。
    • 結果として、「関数の引数を変えてしまい、呼び出し元を全滅させる」という破壊的変更を行ってしまいます。
  • 「何を知らないか」がわからない:
    • 人間なら「この変数はどこで定義されてる?」とgrepをかけますが、エージェントは「与えられたコンテキストが世界の全て」だと誤認しやすく、外部依存を勝手に幻覚(Hallucination)で埋めることがあります。

4. 「推論の壁」:マルチホップ推論の弱さ

「Aを直すためにBを確認し、その結果Cを修正する」といった多段階の推論(Multi-hop Reasoning)は、現状のLLMにとってまだ鬼門です。

  • プランニングの崩壊:
    • 最初に「5ステップで直します」と宣言しても、ステップ2で予期せぬエラーが出ると、ステップ3以降の計画が総崩れになります。
    • o1(OpenAI o1)のような推論モデルである程度改善されましたが、それでも「未知のコードベース」に対する探索能力は、熟練エンジニアの勘(ヒューリスティクス)には遠く及びません。

現時点での「戦い方」の修正

これらの限界を踏まえると、最初のアクションゲーム/シミュレーションゲームの比喩における「プレイヤー(人間)」の介入ポイントが明確になります。

  1. 「地図」の更新(対Knowledge Cutoff):

    • 人間が「最新の公式ドキュメントのMDファイル」や「動いているサンプルコード」を明示的にコンテキスト(@docs/nextjs-14-server-actions)として注入してあげる必要があります。「知ってるよね?」は禁物です。
  2. 「視野」の提供(対RAG不全):

    • RAGに頼り切らず、人間が「このタスクに関係するファイルは AとBとCだ」と**ファイルパスを明示的に指定(File Pinning)**してあげるのが、現状もっとも確実です。
    • あるいは、Ripgrepなどのツールを使えるエージェントに「まずは関連ファイルを列挙せよ」というタスクだけをやらせて、人間がそれをレビューする。
  3. 「スコープ」の限定(対Context Window/推論):

    • 「アプリ全体をリファクタリングして」という指示は100%失敗します。
    • 「この関数の、この特定のエラーハンドリングだけを直して」というレベルまで、タスクをマイクロ化して渡す必要があります。

結論:今はまだ「介護」が必要

現状のコーディングエージェントは、**「最新情報を知らず、視野が狭く、ちょっと目を離すと関係ないところを壊す、しかし作業だけは爆速な新人」**です。

したがって、

  • 最新マニュアル(ドキュメント)を持たせる
  • 作業机に必要な書類(関連ファイル)だけを置いてあげる
  • 終わったら厳密に検品(テスト/Lint)する

という、極めてマイクロマネジメント的な「プロダクトマネジメント(という名の介護)」が、直近1〜2年の現実解になるでしょう。これをサボると、一瞬で技術的負債の山が築かれます。

(返答終了理由: STOP)


ユーザー: コスト感覚についての話に戻ります。受け入れテストもLLMに任せるということについてはどうでしょう?dom上での確認のかわりにYOLOなどで識別した結果で確認するような作業です(マルチモーダルなaiに渡す場合と識別結果をaiに渡す場合とがあります)


AIの思考プロセス

Examining the Core Problem

I'm now diving deeper into the nuances of cost perception in the context of LLM-driven acceptance testing. I'm focusing on the "should" question: Can LLMs handle this task, and should they? Instead of a binary answer, I'm aiming to uncover the subtleties of responsible implementation.

Analyzing Visual Acceptance Testing

I'm now examining visual acceptance testing through the lens of AI. I'm weighing the multimodal LLM approach, and I'm looking at ways to incorporate Visual AI, such as using YOLO for object detection or leveraging multimodal LLMs directly to compare UI/UX. I'm determining which is more economically sensible, and technically more reliable.

Assessing Cost and Outcome

I'm now thoroughly examining the cost-benefit analysis of different visual acceptance testing methods. I'm weighing the shortcomings of DOM testing against the promise of visual AI, considering both speed and price. I'm diving into the advantages and disadvantages of each, from human QA to Selenium/Playwright and multimodal AI, while building a structured argument.

Validating the Concept's Core

I've validated the core idea: "True Acceptance" requires what the user perceives. I've categorized two key paths. One is rapid and structural, and the other semantic verification using multimodal LLMs, which is more expensive. I'm deep into the cost-benefit analysis, considering the likelihood of false positives/negatives, which might result in human intervention costs. The "water spilling" analogy is relevant, and the ideal state is to have the AI as a Junior QA to filter obvious bugs. I'm seeing this as a strategic smoke-test addition to the process.

Clarifying the Cost Structure

I'm now iterating on my draft, refining the analogy of DOM testing being akin to checking plumbing, while visual testing confirms water flow from the tap. I'm distinguishing between YOLO as a "compiler cost" and GPT-4o as a "runtime cost." I'm also stressing the critical difference between testing appearance versus interaction, highlighting AI's current strengths in snapshot testing but limitations in complex flows.

Addressing Fragility Issues

I'm now fully immersed in the "selector fragility" problem, a core issue in automated testing. I am aiming to see if AI can lessen reliance on brittle selectors. I'm considering strategies for more robust and maintainable test scripts.

AI: 受け入れテスト(E2Eテスト)に「視覚情報(Vision)」を持ち込むというアイデアは、コスト構造とメンテナンス性を劇的に変える可能性があります。

従来のDOMベースのテスト(Selenium/Playwright等)は、「id="submit-btn" が存在する」ことは確認できても、**「ボタンが他の要素に重なって押せない」「白背景に白文字で表示されている」といった『ユーザーに見えている現実』**を保証できないという弱点がありました。

ご提案の「YOLOなどの識別結果」や「マルチモーダルAI」を使うアプローチは、これを解決する手段ですが、コストと特性が大きく異なります。これらを整理してみましょう。

1. 二つのアプローチとコスト構造

ここで重要なのは、先ほどの「コンパイル時コスト(固定資産)」と「ランタイムコスト(従量課金)」の対比です。

A. 識別モデル(YOLO/OCR)のアプローチ

  • 仕組み: スクリーンショットを撮り、YOLOで「ボタン」「入力欄」の座標を特定し、OCRで文字を読む。そのJSONデータをルールベース(または軽量LLM)で判定する。
  • コスト特性: CAPEX(初期投資)型
    • モデルの学習や調整に手間がかかる(UIコンポーネントを認識させる等)。
    • しかし、実行時の推論コストは非常に安い(GPU/CPUで一瞬)。
  • 適性: 「ボタンが正しい位置にあるか」「必須要素が揃っているか」という構造的な正しさの高速チェック。回帰テストとして頻繁に回すのに向いています。

B. マルチモーダルLLM(GPT-4o/Claude 3.5 Sonnet)のアプローチ

  • 仕組み: スクリーンショットをそのまま渡し、「この画面、ログインページとしておかしいところある?」や「仕様書のスクショと見比べて、違いを指摘して」と聞く。
  • コスト特性: OPEX(従量課金)型
    • 画像トークンは高い。1画面チェックするたびに数円〜数十円かかる可能性がある。
    • しかし、事前の学習は不要(Zero-shot)。
  • 適性: 「レイアウトが崩れていないか」「デザインが不自然でないか」という意味的・感性的な正しさのチェック。人間による最終確認の直前に、ゲートキーパーとして置くのが適切です。

2. 「DOMの脆弱性」からの脱却

これまでのE2Eテストの最大の維持コストは、**「CSSセレクタの変更によるテスト落ち」**でした。 デザイン変更で div.wrapper > buttondiv.container > button になっただけでテストが落ちる。これは「本質的ではないエラー」です。

視覚ベースのテストに切り替えることで、「人間が見て『保存ボタン』だと認識できるならOK」という、極めてロバスト(頑健)なテストが可能になります。 これは、コードを書き換えるたびにテストコードも直さなければならないという「二重の手間(Maintenance Overhead)」を削減するという意味で、トータルコストを下げる可能性があります。

3. プロダクトマネジメント的な判断基準

PMとしてこの技術を導入する場合、以下の使い分けが「賢いコスト管理」になります。

Step 1: YOLO/OCRによる「スモークテスト」(安く、速く)

  • Github Actionsで毎コミットごとに走らせる。
  • 「画面が真っ白ではないか」「エラーダイアログが出ていないか」「主要なボタンが存在するか」だけを機械的に弾く。
  • これは「水をこぼす機械」を使わず、従来の画像の差分チェックに近い安さで運用します。

Step 2: マルチモーダルLLMによる「UXレビュー」(高く、深く)

  • Pull Requestがマージされる直前や、Releaseビルドの時だけ走らせる。
  • プロンプト例:

    「あなたはUXデザイナーです。この画面のスクリーンショットを見て、ユーザーが混乱しそうな要素、テキストの視認性の問題、不自然な余白があれば指摘してください。なければ『OK』と答えてください。」

  • これは**「人間のQAエンジニアやデザイナーを10分拘束する人件費」と比較すれば、API代の方が圧倒的に安い**という判断が成り立ちます。

4. 懸念点と未来:非決定性の管理

ただし、LLMにテストを任せる際のリスクは「非決定性(毎回言うことが変わる)」です。 「昨日はOKと言ったのに、今日は微妙にフォントが気に入らないと言い出した」ということが起きると、開発パイプラインが混乱します。

そのため、ここでも**「宣言的記述」**が必要です。 マルチモーダルAIに画像を渡す際も、単に「チェックして」ではなく、

  • 「ヘッダーの高さは全体の10%程度か?」
  • 「主要なアクションボタンの色は青系(#0000FF付近)か?」
  • 「禁止用語が含まれていないか?」 といった、**Yes/Noで答えられる具体的な観点(Checklist)**をプロンプトとして渡すことで、ゆらぎを抑える運用が必要になります。

結論:QA(品質保証)のオートバトラー化

結論として、受け入れテストをAIに任せるのは**「あり」**です。

これは、これまでの「Seleniumスクリプトを書く」という**手続き記述(Imperative)から、「画面のスクショを渡して、これと同じか判定させる」という状態検証(Declarative)**への移行を意味します。

  • DOMを見るな、ピクセルを見ろ。(ユーザーと同じ視点に立つ)
  • 毎回AIに考えさせるな、安いモデルで足切りしろ。(コスト管理)
  • 最終的な「違和感」の検知だけ、高いAIにやらせろ。(人間の代替)

このように構成することで、QAプロセス自体も、人間が細かく指示しなくても自律的にバグを見つけて報告してくれる「オートバトラー化」が進んでいくはずです。

(返答終了理由: STOP)

メタデータ

{
  "runSettings": {
    "temperature": 1,
    "model": "models/gemini-3-pro-preview",
    "topP": 0.95,
    "topK": 64,
    "maxOutputTokens": 65536,
    "safetySettings": [
      {
        "category": "HARM_CATEGORY_HARASSMENT",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_HATE_SPEECH",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
        "threshold": "OFF"
      }
    ],
    "enableCodeExecution": false,
    "enableSearchAsATool": true,
    "enableBrowseAsATool": false,
    "enableAutoFunctionResponse": false,
    "googleSearch": {},
    "outputResolution": "1K",
    "thinkingLevel": "THINKING_HIGH"
  },
  "systemInstruction": {}
}

対話履歴

ユーザー: 以下の対話履歴を整理してください。

## ユーザー入力履歴

ユーザー:
LLMの利用促進みたいな話、究極的にはアウトカムとコストみたいな話になるしそれは人件費と変わらないのだけど、従量課金なら水をこぼしながら運ぶ機械という感じだし定額課金ならレートリミットと機能変化に怯えつつの定額働かせ放題だし、計画管理してあげないとだめと考えるとプロダクトマネジメントな感じがある。

コーディングエージェントによる開発、アクションゲームがシミュレーションゲームになったみたいな感じ
(オートバトラーのほうが正確かもしれない)

---

ユーザー:
あとはオートバトラーという仕組み上ある種の枠組みの範囲での最適化は得意だけれど任意のものに対する開発に関してはまだまだ。とは言えある種のプロダクトが何らかの組み合わせで済ませられることも多くその場合のコードなんかは勝手に作らせることは可能なのかもしれない

---

ユーザー:
どう作業するかを書いてしまった瞬間にそれらはすべてワンショットのプロジェクトになってしまう。コーディングエージェントは壊しながら進むのでレジリエンス的なものが必須になる。つまり何であるかを宣言的に記述しておく必要がある。

---

ユーザー:
k8sの問題はサービスディスカバリーを含めたエコシステム自体を全部まるっと記述可能なところでコストが高い。これはpullベースの通知を繰り返してるからとも言える。そのためにコンポーネントの数が加速度的に増える

---

ユーザー:
まずはお手本はgithub actionsのようなもののはず

---

ユーザー:
つまり宣言的と表現したときに記述と形態で分けて考える必要がある。

---

ユーザー:
コンパイル時コストとランタイムコストと同様にLLM以外のコードによる処理自体はこの枠組みにとらわれなくてよいというのもまた重要。例えばgo analyzerのlinterをLLMで生成しても良い。これの実行コストは安い。

---

ユーザー:
仕様についてはどうだろうか?github issuesの形が正しいんだろうか?どうやってプロンプトに転写されるべきなんだろうか?

prのマージキューのようにissue自体も依存を持つものとして管理する必要があるんだろうか?(人間によるチェックが必要になるんだろうか?受け入れテストはいつやるべきなんだろうか?)



AIの思考プロセス

Considering the Input

I'm currently breaking down the request, focusing on the various user inputs about LLMs, coding agents, product management, Kubernetes infrastructure, and dev workflows. This analysis forms the foundation for structuring the conversation history effectively.

Reviewing Key Segments

I've been analyzing the dialogue history. I'm seeing two main segments emerge: one focusing on LLM economics, the role of product management, and the shifting developer experience from reactive to simulated, and another on the limitations and strengths of AI agents in code generation.

Analyzing Declarative Paradigms

I'm now focusing on declarative approaches, contrasting them with imperative ones. I'm seeing that declarative styles enable resilience, which is important for AI agents. I've also found a need to distinguish description from the form of declarative approaches. I've also evaluated some costs, and also some compile-time vs run-time distinctions. Finally, I've considered that this framework doesn't necessarily have to be used outside the context of LLMs.

Optimizing for Cost

I'm now zeroing in on cost optimization strategies for LLM usage, focusing on hybrid approaches that blend LLM generation with traditional execution. I'm also delving into managing specifications, questioning the efficacy of GitHub Issues for this purpose and exploring alternative formats and workflows, including human checkpoints and acceptance testing. Finally, I've identified core themes: the nature of AI development, technical architecture and methodology, and project management/workflow.

Structuring the Ideas

I'm now organizing the disparate ideas into coherent categories. Specifically, I'm focusing on three primary areas: the shift in economics and operations with LLMs, the "Auto Battler" development paradigm, and the importance of declarative, resilient architectures. I've broken down the economic costs of LLM usage, the need for management, and the risk of flat rate usage. I'm also finding that developers become managers of agents, and am looking at how to move from imperative "how" to declarative "what" in architecture.

Refining Practical Workflow

I'm now diving into practical workflow aspects. I'm focusing on the compile-time versus runtime costs with an example of Go linters, and also the role of specifications, considering GitHub Issues. The hybrid approach, using LLMs for tool creation and tools for cheap execution, is also being examined, including workflow management and human reviews. I'm noting the user's critique of Kubernetes complexity.

Prioritizing Strategic Areas

I'm now consolidating the current streams of thought into strategic areas. I'm prioritizing: LLM economics, declarative architectures, cost-optimized implementation and finally, specification and task management. I'm also planning the next steps to generate a final response, integrating all the information.

AI: ご提示いただいた対話履歴は、**「LLM/コーディングエージェント時代のソフトウェア開発における、組織論・アーキテクチャ・開発プロセスの再定義」**に関する一連の思考メモとして整理できます。

以下に、トピックごとに論点を構造化してまとめました。


1. 開発パラダイムの転換(アクションからシミュレーションへ)

ユーザーは、開発者の役割が「自らコードを書く」ことから「AIを管理・指揮する」ことへ変化していると指摘しています。

  • ゲームジャンルの変化:
    • これまでの開発は「アクションゲーム」(自分が操作する)。
    • これからは「シミュレーションゲーム」あるいは「オートバトラー(Auto Battler)」。
    • 特徴: ある枠組み・構成の中での最適化は得意だが、全く任意の新規開発はまだ苦手。しかし、多くのプロダクトは既知の組み合わせで成立するため、自動生成の余地は大きい。
  • コストとマネジメント:
    • LLM利用は究極的には「アウトカム vs コスト(人件費)」の話。
    • 従量課金: 「水をこぼしながら運ぶ機械」=無駄はあるが仕事はする。
    • 定額課金: 「レートリミットや機能変化に怯えつつの定額働かせ放題」。
    • 結論: AIエージェントを計画・管理する必要があり、それはプロダクトマネジメントの領域に近づく。

2. システム記述とアーキテクチャ(宣言的 vs 命令的)

エージェントに自律的に働かせるための「指示の出し方」と「環境」についての考察です。

  • 「宣言的」であることの重要性:
    • 「どう作業するか(How)」を書くと、その場限りのワンショットなプロジェクトになってしまう。
    • コーディングエージェントは試行錯誤で壊しながら進むため、システムには**レジリエンス(回復力)**が必須。
    • そのため、「何であるか(What)」を宣言的に記述しておく必要がある。
  • 記述と形態の分離:
    • 「宣言的」という言葉を、「記述(Description)」と「形態(Form)」に分けて考える必要がある。
  • 既存エコシステムとの比較:
    • Kubernetes (k8s): サービスディスカバリー等を含め全部記述可能だが、Pullベースの通知繰り返しでコンポーネントが爆発的に増え、コストが高い(悪い例としての言及)。
    • GitHub Actions: まずはお手本とすべきモデル(良い例としての言及)。

3. コスト構造とハイブリッドな実装戦略

すべてをLLMにやらせるのではなく、コスト効率を考えた役割分担についての視点です。

  • コンパイル時 vs ランタイム時のコスト:
    • LLM生成コスト(コンパイル時)と、実行コスト(ランタイム)を分けて考える。
    • 具体例: Go言語のlinter(静的解析ツール)自体をLLMに書かせる。ツールの生成にはコストがかかるが、そのツールによるチェック(実行)のコストは極めて安い。
    • LLM以外のコードによる処理自体は、LLMの制約(トークンコスト等)に囚われる必要はない。

4. 具体的なワークフローと仕様管理

実際に開発プロセスに落とし込む際の課題点です。

  • 仕様の渡し方:
    • GitHub Issuesの形式が正しいのか? それをどうプロンプトに転写するか?
  • 依存関係とフロー管理:
    • Issue自体もPRのマージキューのように依存関係を持つべきか?(タスクAが終わらないとタスクBは着手できない、等)
  • 品質保証(QA):
    • 人間によるチェックはどのタイミングで必要なのか?
    • 受け入れテスト(Acceptance Test)はいつ実行されるべきか?

整理後の全体像(サマリー)

この一連の思考は、**「コーディングエージェントを前提とした新しい開発基盤(LLM-Native Dev Platform)」**の構想と言えます。

  1. 哲学: 開発者はコードを書くのではなく、仕様と「あるべき姿(宣言的記述)」を管理するPMになる。
  2. 基盤: エージェントが破壊・修正を繰り返せるレジリエントな環境が必要(k8sほど複雑ではなく、GH Actionsのような手軽さ)。
  3. 経済性: コード生成にはLLMを使うが、検証や実行には安価な従来のプログラム(Linter/Test)を組み合わせる。
  4. 運用: GitHub Issues等を起点とし、依存関係管理と人間の承認フロー(QA)を組み込んだパイプラインが必要。

この議論の次は、「具体的な宣言ファイルのフォーマット」や「Issueからプロンプトへの変換ロジック」などの設計論に進む段階にあると考えられます。

(返答終了理由: STOP)

メタデータ

{
  "runSettings": {
    "temperature": 1,
    "model": "models/gemini-3-pro-preview",
    "topP": 0.95,
    "topK": 64,
    "maxOutputTokens": 65536,
    "safetySettings": [
      {
        "category": "HARM_CATEGORY_HARASSMENT",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_HATE_SPEECH",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
        "threshold": "OFF"
      },
      {
        "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
        "threshold": "OFF"
      }
    ],
    "enableCodeExecution": false,
    "enableSearchAsATool": false,
    "enableBrowseAsATool": false,
    "enableAutoFunctionResponse": false,
    "thinkingBudget": -1,
    "outputResolution": "1K",
    "thinkingLevel": "THINKING_HIGH"
  },
  "systemInstruction": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment