Skip to the content.

Documentation Refresh Workflow Prompt

This prompt is only for refreshing sand generated/managed documentation after a change has Documentation Impact. It is not the general onboarding path for AI agents working on code. For normal project work, start with docs/onboarding.md, docs/developer-guide.md, the task, code, and tests.

When this prompt is applicable, refresh docs for sand: a tool that manages Sandbox VMs on a Host Mac with explicit Allowed Folders, Guest State, and generic Workload Commands. Use the domain language in issues/sand/CONTEXT.md exactly.

This workflow is manual and agent-run for v1. It must not require Bosun, network access, or a separate LLM quality gate.

Required inputs

Read these files first:

  1. docs/docs-input-manifest.txt — the Documentation Input Manifest.
  2. docs/generated-docs-manifest.txt — the registry of Generated Documentation to refresh/check.
  3. Every required existing file listed in the Documentation Input Manifest.
  4. Every optional file listed in the Documentation Input Manifest when it exists.
  5. Every generated document listed in docs/generated-docs-manifest.txt when it already exists, so preserved human-authored sections are not lost.

Compute the current docs input hash before editing:

scripts/docs-input-hash.sh docs/docs-input-manifest.txt

Use that exact hash value as the recorded freshness metadata in every registered generated document you refresh.

Source-of-truth rules

Metadata conventions

Each registered generated Markdown document must record the current docs input hash near the top of the file using one of these forms:

<!-- docs-input-hash: <64-character-sha256> -->

or, when YAML front matter is already present:

docs_input_hash: <64-character-sha256>

Prefer the HTML comment for Markdown documents without front matter. Keep the recorded hash in exactly one obvious place per document.

Recommended metadata block for generated Markdown without front matter:

<!-- generated-doc: true -->
<!-- generated-by: docs/prompts/refresh-docs.md -->
<!-- docs-input-hash: <64-character-sha256> -->

For section-managed documents, place document-level freshness metadata near the top of the file, outside any managed section.

Managed Section conventions

A Managed Section is the only region that this workflow may replace inside a section-managed document. Use explicit HTML markers:

<!-- docs:managed:start id="stable-section-id" source="brief source description" -->
Generated content goes here.
<!-- docs:managed:end -->

Rules:

README.md is section-managed. Never regenerate or overwrite the full README.

Documents to refresh

Refresh every non-comment path listed in docs/generated-docs-manifest.txt. Keep docs/onboarding.md and docs/developer-guide.md focused on teaching humans and AI agents how to work on sand: how to orient, find behavior owners, change code/tests, verify, and handle Documentation Impact only when relevant.

Expected v1 Generated Documentation set:

If a listed document does not exist yet, create it according to these conventions. If docs/generated-docs-manifest.txt has no registered documents yet, do not invent registry entries unless the current issue explicitly asks for them.

Refresh procedure

  1. Read the manifests and all relevant source, test, script, README, and existing docs files listed above.
  2. Compute the current docs input hash.
  3. Build sand if needed to obtain real help output.
  4. Refresh each registered generated document using the document-specific rules.
  5. Record the current docs input hash in every refreshed registered document.
  6. Preserve human-authored sections and Managed Section markers exactly where required.
  7. Run verification:
make docs-check
swift test
  1. In your final evidence, include:
    • the docs input hash used,
    • documents refreshed,
    • whether CLI reference content came from real help output or command definitions/tests,
    • verification commands and results,
    • any conflicts or skipped documents.

Constraints