アーキテクチャ
アーキテクチャ
Apothem のアーキテクチャ概要——共有プロファイル、環境アダプター抽象、そしてソースツリーの構成方法。
Apothem は 1 つの考え方を中心に構築されています。すなわち、単一の共有ガバナンス プロファイルを、環境ごとのアダプターによって各環境ランタイムの ネイティブな設定形式へ物化する、という考え方です。本セクションでは 構造的な構成要素——アダプタープロトコル、プロファイルスキーマ、ソースツリー レイアウト、そしてそれらを結びつけるインストールワークフロー——を解説します。
システム概要
ひと目で言えば、Apothem は 1 つのパイプラインです。単一の共有プロファイルが 環境レジストリに渡され、レジストリが環境ごとのアダプターをすべて解決します。 各アダプターはその環境のネイティブな設定面を物化し、常時稼働する適合性ゲートが 物化されたすべての面を検査します。
%% provenance: hand-authored %%
%% verified: 2026-06-23 %%
%% cross-reference: src/apothem/lib/harness_registry.py (runtime registry) + src/apothem/harnesses/ (adapter sub-packages) + src/apothem/conformity/ (conformity gate) %%
flowchart TD
accTitle: Apothem end-to-end materialization flow
accDescr: One shared profile feeds the harness registry, which resolves seventeen per-harness adapters; each adapter runs its install, uninstall, update, and verify lifecycle, with four single-file-config adapters also rendering a native config file through a materializer, and writes the harness's own native configuration surface. A standing conformity gate checks every materialized surface.
P["Shared profile<br/>~/.config/apothem/profile.yaml<br/>rules, skills, hooks, slash-commands, MCP servers"]
R["Harness registry<br/>authoritative at runtime<br/>(resolves every adapter)"]
A["17 per-harness adapters<br/>each: install / uninstall / update / verify<br/>+ materializer on 4 single-file-config adapters"]
N["Each harness's native config surface<br/>Claude Code settings.json, Cursor .mdc,<br/>Gemini GEMINI.md, Copilot instructions.md, …"]
G["Conformity gate<br/>pre-emission validators"]
P --> R
R --> A
A --> N
G -.->|standing check over every materialized surface| Nページ
| ページ | 説明 |
|---|---|
| 環境アダプター抽象 | HarnessAdapter プロトコル——アダプターが共有プロファイルをプラットフォーム固有の設定へどのように変換するか。 |
| 共有プロファイルスキーマ | ~/.config/apothem/profile.yaml または --profile PATH にあるスキーマで裏付けられた YAML プロファイル。 |
| ソースレイアウト | Apothem が src/ レイアウトを使う理由と、ツリーの構成方法。 |
| インストールワークフロー | apothem install、update、uninstall がエンドツーエンドでどのように動作するか。 |
| 委譲ワーカー | 本リポジトリ内で動作するマルチワーカーランタイム向けのリポジトリスコープの指示。 |