Skip to main content

Module generate

Module generate 

Source
Expand description

Generate stage: project an IndexedWorkspace into LLM-facing artifacts.

The Preset::Publish set produces five artifact families:

  • llms.txt (top-level index, llmstxt.org)
  • <crate>/index.md (narrative for each crate root)
  • <crate>/<module>.md (narrative + public-item reference per module)
  • llms-full.txt (all markdown concatenated, chunk-delimited)
  • api/<crate>.json (deterministic public-API surface)

Each artifact has its own render function; render_all wires them together and returns a deterministic list of (relative_path, body) pairs the caller can write to disk (or diff against a checked-in tree in --check mode). The generate stage never touches the filesystem itself.

Structs§

Artifact
One generated artifact ready to be written to disk.
PublicModule
A public module surfaced under a crate root.

Enums§

ArtifactLocation
Which base directory an Artifact’s path is relative to.

Functions§

render_all
Render every artifact in the Preset::Publish set for a workspace.
render_api_json
Render the deterministic public-API surface JSON for a single crate.
render_context7_manifest
Render a Context7 manifest (context7.json) for a workspace.
render_crate_index
Render the per-crate index.md narrative document.
render_deepwiki_manifest
Render a DeepWiki manifest (.devin/wiki.json) for a workspace.
render_error_catalog
Append the error-catalog artifact set to artifacts in place.
render_llms_full
Render llms-full.txt: every markdown artifact concatenated, with a short header before each chunk so the reader can identify boundaries.
render_llms_txt
Render the top-level llms.txt index for a workspace.
render_module
Render the per-module narrative document.