Skip to content
Apothem
架构

架构

Apothem 架构概览——共享配置档案、环境适配器抽象,以及源代码树的组织方式。

Apothem 围绕一个核心理念构建:一份共享的治理配置档案,由每个环境对应的适配器 物化为各助手运行时的原生配置格式。本节讲解其结构组件——适配器协议、配置档案 模式、源代码树布局,以及将它们串联起来的安装工作流。

系统概览

一目了然,Apothem 就是一条流水线:一份共享配置档案输入环境注册表,注册表解析每个 环境对应的适配器;每个适配器将其环境的原生配置面物化,并由一道常驻的一致性门禁 检查每一个已物化的面。

%% 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 installupdateuninstall 如何端到端工作。
委派工作者面向在本仓库中运行的多工作者运行时的仓库范围指令。

On this page