Reference: files wgm reads and writes

August 24, 2026 · View on GitHub

wgm is careful about other people's repositories. This page is the complete inventory of what it reads, what it creates, and where — so nothing it does is a surprise.

The placement rule

wgm decides once, in Triage, whether to use your project root or a .wgm/ subdirectory, then stays consistent:

SituationWhere artifacts go
Greenfield or empty repositoryThe project root: specs/, scenarios/, IMPLEMENTATION_PLAN.md
The root already has AGENTS.md, IMPLEMENTATION_PLAN.md, or specs/Under .wgm/ instead

Caution: wgm never overwrites an existing root AGENTS.md by default. It writes .wgm/AGENTS.md instead, and touches your root file only with explicit approval that names the file and the scope of edits.

Human-facing artifacts

These are meant to be read, reviewed, and usually committed.

PathWritten whenPurpose
IMPLEMENTATION_PLAN.mdPlanThe prioritized task list. This is the shared state across iterations — the one file a fresh agent must be able to resume from.
specs/CONSTITUTION.mdPlanProject-wide principles: quality, testing, security, non-negotiables. Written once, referenced by every spec and task.
specs/CONTEXT.mdGrill or PlanThe domain glossary — one canonical name per ambiguous term. Optional; skip it for trivial builds.
specs/*.mdPlanOne spec per coherent slice, each with a magic moment, a demo path, and the smallest end-to-end slice.
scenarios/*.yamlPlanHoldout acceptance journeys, tiered 1–3. The build must not read these.
AGENTS.mdPlan, only if absentA lean "how to build and validate" guide. Never clobbered.
docs/audit/*.mdShip/HandoffThe docs-audit paper trail, with every action item labeled Agent action or Operator action.
docs/adr/*.mdAs neededArchitecture decision records for hard-to-reverse choices.

Agent-only state

Everything under .wgm/ is wgm's own working memory. It is gitignored by this repository and should be gitignored in yours.

PathWritten byPurpose
.wgm/memories.mdLoop (Record)Durable lessons: gotchas, stall causes and fixes, dead ends. Token-budgeted to roughly 2000 tokens. Read at the start of each Analyze.
.wgm/metrics.tsvloop.shPer-iteration telemetry ledger. On by default; disable with --metrics off.
.wgm/metrics/PREFIX-N.tsvswarm.shPer-lane ledgers, written into the parent worktree so they survive --cleanup.
.wgm/worktrees/swarm.shSwarm lane worktrees. Removed by --cleanup or make clean-worktrees.
.wgm/deferred-work.mdReviewCredible issues that pre-date the current diff, recorded rather than silently dropped.
.wgm/learning/MAP.mdteach-meThe cited repository map: entry points, structure, conventions, invariants. wgm's Analyze step reads it when present — it is the whole-repo model a per-task read never builds.
.wgm/learning/teach-me, quiz-meTour progress and the quiz log.
.wgm/rugged/rugged or wgm's inline fallbackEach review's Context, Bottleneck decomposition, Field-test gaps, and Verdict. Read-only companion — never writes product code or docs.
.wgm/STOPYou, or the agentStop sentinel. The loop ends after the current iteration.

Note: Agent-only files may compress aggressively — single-token keys serialized as TOON with an embedded legend. Human-facing artifacts stay readable prose. See artifacts.

Configuration files wgm reads

PathRead byPurpose
wgm.yml or .wgm/gates.ymlloop.shA gates: list of commands executed by the host after every build iteration and also shown in the prompt. Auto-detected.
.github/wgm-hive.ymlTriage, harvest-hive.shYour project's Hive Growth Loop consent decision. Written once, on the first run, whichever way you answer.
.wgm/required-trailers or .github/required-trailerscheck-trailers.shMandated commit trailer keys, one per line.
.devcontainer/devcontainer.jsondevcontainer.shThe shared local sandbox definition, scaffolded by devcontainer.sh init.
~/.copilot/skills/*/plugin.tomlHost adapter / Triage metadataPlugin metadata for the proposed/unwired host integration. The portable runner does not invoke hooks.

.github/wgm-hive.yml is the one file wgm asks about before doing anything else on a new project.

consent: false
auto_report: false
sources:
  - dogfood
  - swarm
  - issues
  - cross-pollinate
FieldEffect
consent: falseLessons are harvested and anonymized locally, and never leave your machine.
consent: true, auto_report: falseLocal anonymize and harvest still run; nothing is published.
consent: true, auto_report: trueOne anonymized lesson may be filed upstream per harvest run.

Note: Anonymization is not a listed toggle either way — it always runs. Only the upstream publish leg is governed by consent. See self-improvement.

Suggested .gitignore

If you let wgm work in your repository, add:

/.wgm/
/STOP

Keep IMPLEMENTATION_PLAN.md, specs/, and scenarios/ tracked — they are the durable record of what was decided and why, and reviewers need them.

Note: This repository gitignores IMPLEMENTATION_PLAN.md, specs/, and scenarios/ at the root, which looks like the opposite advice. The reason is narrow: wgm ships templates (assets/*.template.*) and dogfoods itself in its own checkout, so live artifacts here would be confused with shipped ones. In your project, track them.

What to do next