How The Pieces Fit - alexherrero/agentm GitHub Wiki

How the pieces fit

How the phases, adapters, templates, scripts, and this wiki interact โ€” the narrative behind the on-disk map. For the map itself see Repo layout; for why the phase gates and the doc convention exist, see the AgentM HLD and the Foundations HLD.

Two sources of truth โ†’ adapters โ†’ target project

Since the V5 unbundling there are two canonical sources, not one: crickets' development-lifecycle plugin owns the phase specs (/plan ยท /work ยท /review ยท /release ยท /bugfix); this repo's harness/agents/*.md and harness/skills/*.md own the memory-engine sub-agents and skills (adapt-evaluator, memory-idea-researcher, doctor, memory, design, console). Each adapter is a thin shim that points at whichever canonical spec it needs rather than restating it.

         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚  crickets                  โ”‚   โ”‚  agentm                    โ”‚
         โ”‚  development-lifecycle       โ”‚   โ”‚  harness/agents/*.md       โ”‚
         โ”‚  (phase specs โ€” source     โ”‚   โ”‚  harness/skills/*.md       โ”‚
         โ”‚   of truth for /plan etc.) โ”‚   โ”‚  (memory-engine โ€” source   โ”‚
         โ”‚                            โ”‚   โ”‚   of truth for sub-agents  โ”‚
         โ”‚                            โ”‚   โ”‚   and skills)              โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚ referenced-by                  โ”‚ referenced-by
                         โ–ผ                                โ–ผ
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚  adapters/                                โ”‚
                  โ”‚  claude-code/  antigravity/                โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚ copied-by
                                       โ–ผ
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚  install.sh / install.ps1                  โ”‚
         โ”‚  reads ONLY from templates/ + adapters/    โ”‚
         โ”‚  (NEVER from wiki/ โ€” installer boundary)   โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚ drops into
                  โ–ผ
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚  target-project/                           โ”‚
         โ”‚    .harness/  .claude/  .agents/           โ”‚
         โ”‚    AGENTS.md  CLAUDE.md                    โ”‚
         โ”‚    wiki/  (empty scaffold from templates/) โ”‚
         โ”‚    .github/workflows/wiki-sync.yml         โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

This holds together because every adapter file is expected to cite either a crickets development-lifecycle phase-spec path or an agentm harness/<agents|skills>/ path, and scripts/check-references.py fails CI if an adapter points at a spec that doesn't exist. That's what keeps the two supported adapters โ€” Claude Code and Antigravity โ€” in lockstep: they are pointers at the same canonical text, not parallel rewrites. Adding a host is a matter of writing pointers rather than re-authoring the workflow.

The installer boundary

install.sh and install.ps1 read from only two roots:

  1. $HARNESS_ROOT/templates/ โ€” the scaffold every project gets (state files, hooks, wiki scaffold, the wiki-sync workflow).
  2. $HARNESS_ROOT/adapters/ โ€” the per-host commands, agents, and skills.

They never read from wiki/ (the dogfood docs for this repo), scripts/ (this repo's test infra), or .github/workflows/tests-*.yml (this repo's CI). That boundary is what keeps the harness's own documentation from leaking into every project it installs into.

The boundary is enforced in two layers: the top-of-file comment in install.sh, and the leak assertions in scripts/smoke-install-bash.sh and its pwsh twin, which fail if this repo's own tooling or wiki appears in a scratch install. (A third layer, the runtime ensure_boundary_src guard inside the cp_managed copy helper, retired with the per-project install those helpers served.) The full rationale is in the Foundations HLD.

Verification runs before any agent

CI runs on Linux, macOS, and Windows in parallel, and every gate is deterministic and blocking โ€” they run before any agentic review, because the harness treats typecheckers and tests as the truth and LLM reviews as augmentation. The full list is in CI gates.

Related

โš ๏ธ **GitHub.com Fallback** โš ๏ธ