テーマ: design
-
パイプライン、ファンアウト、オーケストレーター、批評パネル: タスクに合うマルチエージェントパターンの選び方
パイプラインは変換の順序が決まっているタスクに向く。並列ファンアウトは独立した副質問や、多数決を取るための繰り返し試行に向く。ワーカーを従えたオーケストレーターは、分解の仕方が実行時にしか分からないタスクに向く。批評パネルは複数の基準に照らしてレビューが必要な出力に向く。いずれの方式もトークンコストを増やし、それ自体が失敗しうる調整レイヤーを追加する。
-
Event sourcing and CQRS: what they buy and what they cost
Event sourcing stores every state change as an immutable event and derives current state by replay; CQRS separates the write model from read models. Both add auditability and flexibility at the price of complexity and eventual consistency.
-
Technical debt as a metaphor and as a decision
Technical debt describes the future cost of a shortcut; the metaphor is useful when the debt is deliberate and tracked, and misleading when it excuses careless work or is used to describe every imperfection.
-
エージェントの記憶を設計する:保存、要約、忘却の使い分け
エージェントの記憶には、コンテキストウィンドウ、タスク用メモ、セッションをまたぐ永続ストアの三層がある。項目ごとに属する層を決め、永続記憶は小さくレビュー可能に保ち、事実でなくなったものを削除する。
-
Privacy review checklist for a feature
Ten questions a reviewer answers before a feature ships: inventory of new personal data, minimisation decisions, retention job, access and access logging, export and deletion coverage, preference purposes, third-party flows, a short LINDDUN pass, test data, and a recorded result; engineering properties only, no legal assessment.
-
Dark mode with prefers-color-scheme, color-scheme and light-dark()
Dark mode has three parts: the prefers-color-scheme media query to detect the user's choice, the color-scheme property (and meta tag) to tell the browser which schemes the page supports so form controls, scrollbars and the canvas follow, and light-dark() or custom properties to swap palette values without duplicating rules.
-
The test-driven development loop
Write a failing test, make it pass with the simplest change, then refactor with the tests green; the loop keeps design decisions small and gives every line a reason to exist.
-
Dataclasses for plain records
dataclasses generate __init__, __repr__ and equality from annotated fields; frozen dataclasses give immutable value objects, slots reduce memory, and field(default_factory=...) avoids shared mutable defaults.
-
リファクタリングの前にコードの不吉な匂いを見つける
コードの不吉な匂いは、より深い設計上の問題を示唆する表面的な症状(長いメソッド、巨大なクラス、機能の横恋慕、変更の分散、基本データ型への執着)である。名前を付けることで、レビューで使う共通の語彙とリファクタリングのきっかけが得られる。
-
Python ライブラリの例外を設計する
ライブラリごとに一つの基底例外を定義し、具体的なエラーをそこから派生させる。文脈を添えて例外を送出し、「raise ... from」で原因をつなぎ、失敗を処理できる境界で必要な例外だけを捕捉する。
-
Modelling states with Literal, Enum and TypedDict
Replace free strings and loose dictionaries with Literal unions, enumerations and TypedDicts so that impossible states are rejected by the type checker and documented in one place.
-
When should a team split a monolith into services?
Open question: which observable signals (deployment coupling, team boundaries, scaling needs, incident patterns) have preceded successful extractions of services from a monolith, and which extractions were later reversed?
-
Human approval gates in agent workflows: which actions need one
An approval gate pauses an agent before an action and lets a person allow or deny it; gate actions that are irreversible, externally visible, costly or privilege-changing, keep the rest automatic, and show the person exactly what would run.
-
Starting with a monolith beats starting with microservices
Hypothesis: new products that begin as a well-structured monolith reach a stable domain model faster and with fewer operational failures than those that begin as microservices; splitting later along proven boundaries is cheaper.
-
LINDDUNによるプライバシー脅威モデリングの概要
データフロー図を要素ごとに、LINDDUNの7種類の脅威(リンク、識別、否認不可、検出、データ開示、認識不足と介入不能、非準拠)で確認し、各要素のシナリオを記録して、短い一覧から緩和策を選びます。STRIDEの会合にならった、1回のセッション形式です。
機械可読: JSON