<?xml version="1.0" encoding="UTF-8"?>
<spec xmlns="https://vibevm.org/spec/1">
  <title id="root">What a project contains</title>
  <status stage="doc" state="work" audience="user"/>
  <p p="1">After the first install, a project holds a handful of files you wrote and a larger set that vibe wrote for you. This page names each of them and says who is allowed to change it, so nothing you edit gets overwritten and nothing vibe generates gets edited by hand.</p>
  <example id="tree" fixture="hello-vibe" p="2">
    <run>vibe tree --plain --path hello-vibe</run>
    <expect>project: &lt;TMP&gt;/work/hello-vibe
STATIC.md: (none)
packages: 1   roots: 1
columns: load  T=transitive  C=condition  S=in STATIC.md

org.vibevm.world/wal  dynamic  .  .  .</expect>
  </example>
  <section id="the-files" title="The files, one by one">
    <p p="3">Start with the two files at the root, because everything else is derived from them.</p>
    <p p="4">`vibe.toml` is the *[manifest](../glossary/index.xml#manifest)*. You write it, or `vibe init` writes the first version for you. It names the project, lists the packages it requires with a version range for each, and lists the [registries](../glossary/index.xml#registry) to fetch them from. It is the only file a teammate needs to reproduce your setup, together with the [lock file](../glossary/index.xml#lock-file) beside it.</p>
    <p p="5">`vibe.lock` is the *lock file*. vibe writes it, you commit it, and you never edit it. It records the exact version of every package that was installed, including the ones your packages pulled in, and a [fingerprint](../glossary/index.xml#fingerprint) of each package's content. With it, a fresh clone installs the same bytes on any machine.</p>
    <p p="6">Below them sits one directory, `vibevm/`, with three children. This layout is the same in every project and every package, and it is not configurable.</p>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-052#THE-LAYOUT" p="7"/>
    <p p="8">`vibevm/vibespecs/` is *your* tree: the [specifications](../glossary/index.xml#specification) and rules this project itself writes, in Markdown or in the project's XML dialect. vibe reads it and never writes into it, with one exception described below.</p>
    <p p="9">`vibevm/vibedeps/` is *vibe's* tree: one folder per installed package and version, holding that package's published files verbatim. You commit it, so a fresh clone is readable without running anything, but you never edit it. An edit there disappears at the next install.</p>
    <rule ref="spec://org.vibevm.core/vibevm/modules/vibe-workspace/PROP-009#VIBEDEPS-COMMITTED" p="10"/>
    <p p="11">`vibevm/vibepacks/` holds packages this repository develops in place: a project that also publishes packages keeps their sources here, and vibe treats the directory as a small local registry. Most projects do not have it.</p>
  </section>
  <section id="the-boot-files" title="The boot files">
    <p p="12">The exception in your tree is `vibevm/vibespecs/boot/`. Two files there are yours: `00-core` holds the project's foundations, `90-user` holds your personal overrides, and vibe never touches either. Two files there are generated: `INDEX.md`, a manifest of what the agent reads, always present, and `STATIC.md`, the text it reads first and in full, present only when some package asked to be read that way. Both carry a header saying they are generated; the header is not decoration.</p>
    <rule ref="spec://org.vibevm.core/vibevm/modules/vibe-workspace/PROP-009#ARTIFACTS-GENERATED" p="13"/>
    <p p="14">The agent finds the boot files through a short [managed block](../glossary/index.xml#managed-block) at the end of `CLAUDE.md`, `AGENTS.md` and `GEMINI.md`, between the lines `&lt;vibevm&gt;` and `&lt;/vibevm&gt;`. vibe rewrites what is between the two markers and nothing else in those files; the rest of the file is yours, and so is the position of the block once it exists.</p>
    <rule ref="spec://org.vibevm.core/vibevm/modules/vibe-workspace/PROP-012#OUTSIDE-PRESERVED" p="15"/>
  </section>
  <section id="who-writes-what" title="Who writes what">
    <table p="16">
      <tr>
        <td>File or directory</td>
        <td>Written by</td>
        <td>Committed</td>
        <td>Edited by hand</td>
      </tr>
      <tr>
        <td>`vibe.toml`</td>
        <td>you (first version by `vibe init`)</td>
        <td>yes</td>
        <td>yes</td>
      </tr>
      <tr>
        <td>`vibe.lock`</td>
        <td>vibe</td>
        <td>yes</td>
        <td>never</td>
      </tr>
      <tr>
        <td>`vibevm/vibespecs/`</td>
        <td>you</td>
        <td>yes</td>
        <td>yes</td>
      </tr>
      <tr>
        <td>`vibevm/vibespecs/boot/00-core`, `90-user`</td>
        <td>you</td>
        <td>yes</td>
        <td>yes</td>
      </tr>
      <tr>
        <td>`vibevm/vibespecs/boot/INDEX.md`, `STATIC.md`</td>
        <td>vibe</td>
        <td>yes</td>
        <td>never</td>
      </tr>
      <tr>
        <td>`vibevm/vibedeps/`</td>
        <td>vibe</td>
        <td>yes</td>
        <td>never</td>
      </tr>
      <tr>
        <td>`vibevm/vibepacks/`</td>
        <td>you, when the repository develops packages</td>
        <td>yes</td>
        <td>yes</td>
      </tr>
      <tr>
        <td>the `&lt;vibevm&gt;` block in agent instruction files</td>
        <td>vibe</td>
        <td>yes</td>
        <td>only its position</td>
      </tr>
      <tr>
        <td>`.vibe/`</td>
        <td>vibe</td>
        <td>no</td>
        <td>never</td>
      </tr>
    </table>
    <p p="17">The last row is the project's scratch space: caches and internal state, ignored by git and safe to delete. The machine-wide [store](../glossary/index.xml#store) of fetched packages is elsewhere, in your home directory, and is shared by every project on the machine.</p>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-000#VIBE-DIR-IGNORED" p="18"/>
    <p p="19">One more folder appears once a project starts keeping track of which rules of its packages it has adopted: `vibefacts/`, committed, one small TOML file per package. Installing a package copies none of the author's statuses into it; adopting them is a deliberate act, `vibe facts adopt`, and `vibe facts` is the lever for everything else, listing, setting a status by address, syncing and reporting. Removing a package asks whether to keep or clean its adoption file; `vibe facts clean` removes the files of packages that are gone, and after an upgrade `vibe facts sync` reports the [anchors](../glossary/index.xml#anchor) that disappeared or moved.</p>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-046#REGISTRY-HOME" p="20"/>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-046#LAW-SOVEREIGNTY" p="21"/>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-046#CLI-FACTS" p="22"/>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-046#LAW-LIFECYCLE" p="23"/>
  </section>
  <section id="edge-cases" title="Edge cases and rules">
    <p p="24">If you delete `vibevm/vibedeps/` or the generated boot files, `vibe reinstall` rebuilds them from the lock file and the store without touching the network.</p>
    <rule ref="spec://org.vibevm.core/vibevm/modules/vibe-workspace/PROP-009#REINSTALL-NO-FORCE" p="25"/>
    <p p="26">If a project from before the current layout carries a root `spec/` folder, vibe stops with a migration recipe rather than guessing. Old layouts are not read silently.</p>
    <rule ref="spec://org.vibevm.core/vibevm/common/PROP-052#NO-LEGACY-LAYOUT" p="27"/>
    <p p="28">If you write into `vibevm/vibedeps/` by accident, nothing breaks immediately; the next install overwrites the edit, because a package's folder there is a verbatim copy of what was published.</p>
  </section>
</spec>
