Skip to content
Apothem
아키텍처

설치 워크플로

apothem install, update, uninstall이 처음부터 끝까지 어떻게 동작하는지.

설치 흐름

flowchart TD
    accTitle: Apothem install workflow
    accDescr: Top-down flowchart of the apothem install command from CLI invocation through adapter lookup, profile load, adapter install call, native config write, and a follow-up apothem verify check that the operator runs.
    A[apothem install --harness X] --> B[Resolve adapter through registry]
    B --> C[Load and validate profile YAML<br/>before writes]
    C --> D[Adapter.install(profile, project)]
    D --> E[Write native config and support cohorts]
    E --> F[Operator runs: apothem verify --harness X]
    F --> G{All checks pass?}
    G -- yes --> H[Done]
    G -- no --> I[Report failures]

업데이트 흐름

apothem update --harness X 실행 시:

  1. ~/.config/apothem/profile.yaml 또는 --profile PATH를 로드하고 검증합니다.
  2. 선택한 하니스 또는 all을 중앙 레지스트리를 통해 해석합니다.
  3. 첫 쓰기 전에 전체 머티리얼라이즈 계획을 검증합니다.
  4. Adapter.update(profile, project=...)를 호출합니다.
  5. 생성됨, 업데이트됨, 변경 없음, 건너뜀, 경고, 오류 결과를 보고합니다.

제거 흐름

apothem uninstall --harness X 실행 시:

  1. Adapter.uninstall()을 호출합니다.
  2. 어댑터는 자신이 쓴 파일만 제거합니다. 공유 프로필 YAML과 관련 없는 운영자 작성 파일은 그대로 둡니다.
  3. 공유 작업 디렉터리의 메모리, 컨텍스트, 학습 저장소는, 그 디렉터리에 설치된 하니스가 이 하니스 하나뿐일 때 백업된 뒤 제거됩니다. 제거는 설치가 기록해 둔 위치에서 이루어집니다. plans/ 디렉터리는 절대 제거되지 않습니다.

범위 해석

각 어댑터는 자신의 고정 설치 루트에 씁니다. 사용자 범위 어댑터는 사용자 홈에, 프로젝트 범위 어댑터는 프로젝트 로컬에 씁니다. CLI는 --scope 플래그를 노출하지 않습니다. 프로젝트 범위 어댑터는 --project <path>가 필요합니다. 프로젝트 범위 어댑터 중 일곱 개는 프로젝트 파일을 쓰기 전에 ~/.agents/skills/와 ~/.config/apothem/ 같은 공유 폴더도 사용자 홈에 쓰며, --project는 그 폴더들이 가는 위치를 바꾸지 않습니다. install 레퍼런스에 그 목록이 있습니다. 각 대상 위치는 site/content/docs/harnesses/<harness>.mdx에 문서화되어 있습니다.

오류 처리

설치/업데이트 작업은 쓰기 전에 검증하고, 교체 전에 기존의 일치하는 대상을 백업하며, 공유 디스커버리 디렉터리에서는 Apothem이 관리하는 하위 항목만 병합합니다. --dry-run은 동일한 검증을 실행하고, 각 쓰기가 수행되었다면 얻었을 결과(예: created 또는 updated)를 반환하되, 디렉터리나 파일은 만들지 않습니다.

되돌릴 수 있음 (백업과 롤백)

모든 설치 패스는 되돌릴 수 있습니다. 교체된 바이트는 Apothem 백업 루트에 보관되고, 패스는 ULID 설치 ID로 하니스 원장에 기록됩니다. apothem rollback은 기록된 패스를 선택하여 보관된 백업을 복원합니다.

%% provenance: hand-authored %%
%% verified: 2026-07-06 %%
%% cross-reference: this page's Error handling section (back up before replace); /docs/cli-reference/rollback %%
flowchart LR
    accTitle: Apothem backup and rollback lifecycle
    accDescr: At install time each replaced target's prior bytes are captured into the Apothem backup root and the pass is recorded in the harness ledger under a ULID install id. The rollback command selects a recorded install pass by latest or install-id, restores every captured backup from the backup root, and appends a rollback record to the ledger.
    subgraph Install
        direction TB
        I1["Back up existing targets<br/>before replacement"] --> I2["Apothem backup root"]
        I1 --> I3["Ledger install record<br/>ULID install-id"]
    end
    subgraph Rollback
        direction TB
        R1["Select install pass<br/>--last or --install-id ULID"] --> R2["Restore captured backups<br/>from the backup root"]
        R2 --> R3["Append rollback record<br/>to the harness ledger"]
    end
    I2 -.->|captured bytes| R2
    I3 -.->|resolves pass| R1

On this page