Skip to main content

Module scaffold

Module scaffold 

Source
Expand description

Volume directory scaffolding.

Creates the v2 .omne/ directory structure — lib/ for static config + docs, var/ for runtime state, wt/ for per-run worktrees — writes the CLAUDE.md bootloader with its single-hop @.omne/dist/AGENTS.md import, seeds the docs baseline, and appends .gitignore entries for the runtime paths.

Idempotency contract:

  • create_volume_dirs uses create_dir_all (idempotent).
  • write_docs_baseline skips index.md and any existing .gitkeep.
  • write_gitignore appends only missing entries under an # omne marker.
  • write_omne_readme and write_bootloader overwrite unconditionally: re-running init always re-stamps these files. Volume metadata in omne.md (versions, sources) is re-derived from the freshly-extracted tarballs, so the prior content is by definition stale.

Functions§

create_volume_dirs
Create the v2 .omne/ directory skeleton under root.
write_bootloader
Write the CLAUDE.md bootloader to the volume root.
write_docs_baseline
Seed the docs baseline: index.md + .gitkeep files in each bucket. Idempotent — a pre-existing index.md is preserved and existing .gitkeep files are left alone.
write_gitignore
Ensure the volume’s .gitignore carries the runtime entries.
write_omne_readme
Write stamped README content to .omne/omne.md.