Skip to content
Apothem
Reference

Directory-Hierarchy Tree

Visual map of the Apothem source tree structure showing ecosystem-config artifacts, runtime tiers, and the location of rules, commands, skills, delegated workers, hooks, and supporting files.

The canonical structural map of the Apothem source tree rendered as a Mermaid graph. Each per-harness adapter under src/apothem/harnesses/<harness>/ projects this tree into the harness's native configuration directory (e.g. ~/.claude/ for Claude Code). Every artifact class declared in CLAUDE.md Section 7 has its home here. Runtime-state directories (machine-local, gitignored) are included for orientation but never contain ecosystem-config artifacts.

Layout

%%{ init: { "theme": "neutral" } }%%
%% verified: 2026-06-22 %%
%% provenance: README.md (Quick Start · Location) %%
%% cross-reference: site/content/docs/architecture/source-layout.mdx (Directory Layout summary) %%
graph TD
    accTitle: Apothem repository layout tree
    accDescr: Top-down tree showing every top-level directory of the apothem repository with its purpose and key contents as a comprehensive navigation reference for contributors.
    ROOT["apothem source tree<br/>(materializes into the harness config<br/>directory — e.g. ~/.claude/ for Claude Code)"]
    ROOT --> CONFIG_FILES["Config files<br/>CLAUDE.md · README.md · CHANGELOG.md<br/>settings.json<br/>pyproject.toml · .gitignore · .markdownlint.json"]
    ROOT --> RULES["src/apothem/rules/<br/>(.md files)"]
    ROOT --> COMMANDS["commands/<br/>(slash-command bodies)"]
    ROOT --> SKILLS["src/apothem/skills/<br/>{skill}/SKILL.md"]
    ROOT --> AGENTS["src/apothem/agents/<br/>(flat *.md entry points)"]
    ROOT --> HOOKS["src/apothem/hooks/"]
    HOOKS --> HOOKS_LIB["lib/<br/>bootstrap.{ps1,sh}<br/>find-python.{ps1,sh}<br/>resolve_root.py"]
    HOOKS --> HOOKS_MSGS["messages/<br/>(static context per event)"]
    HOOKS --> HOOKS_PY["dispatch.py<br/>session_start_bootstrap.py<br/>emit_hook_context.py"]
    ROOT --> TOOLS["scripts/dev/<br/>validate_hooks.py · validate_ecosystem.py<br/>chaos_pass.py · audit_all.py<br/>src/apothem/benchmarks/ · lib/"]
    ROOT --> TESTS["tests/<br/>unit/ · integration/ · conformity/<br/>commands/ · packaging/ · property/ · hooks/"]
    ROOT --> DOCS["site/content/docs/<br/>reference/ · architecture/<br/>governance/ · harnesses/<br/>runbooks/ · developer-guide.mdx"]
    ROOT --> MEMORY["memory/<br/>MEMORY.md (index)<br/>promotion-ledger.md<br/>expertise-gap-log.md<br/>{topic}.md files"]
    ROOT --> PLANS["plans/<br/>(per-suite folders<br/>PREAMBLE · MASTER-PLAN<br/>per-phase directories<br/>_spec/ · _inputs/ scratch tiers)"]
    ROOT --> PROJECTS["projects/<br/>{hash}/<br/>memory/ · sessions/<br/>(per-project runtime state)"]
    ROOT --> RUNTIME["runtime-data/<br/>history.jsonl · backups/<br/>(machine-local · gitignored)"]
    classDef cfg fill:#fff5d6,stroke:#aa8800
    classDef runtime fill:#e8f0ff,stroke:#3366aa,stroke-dasharray: 4 2
    class CONFIG_FILES,RULES,COMMANDS,SKILLS,AGENTS,HOOKS,HOOKS_LIB,HOOKS_MSGS,HOOKS_PY,TOOLS,TESTS,DOCS,MEMORY cfg
    class PLANS,PROJECTS,RUNTIME runtime

Reading the diagram

  • Solid yellow nodes are ecosystem-config — version-controlled, validated, authored intentionally.
  • Dashed blue nodes are runtime tiers — machine-local state and per-suite / per-project artifacts that follow the structural conventions but are not part of the shipped configuration.
  • The arrow direction shows containment, not data flow. Every child is a direct subdirectory of its parent.

Authoritative cross-references

  • CLAUDE.md Section 3 — full artifact-directory table.
  • CLAUDE.md Section 7 — registries (commands, rules, delegated workers, skills, hooks).
  • site/content/docs/architecture/source-layout.mdx — narrative directory summary.
  • README.md Quick Start — operator-facing overview.

On this page