Guides

Write source-grounded documentation

Turn authoritative references into clear documentation with cited claims, verified links, examples, and visible uncertainty.

Answers: write cited documentation with a coding agent · Updated

SHORT ANSWER

The documentation-writing shift creates a finite deliverable from approved sources and an explicit audience. It uses the same citation discipline as research synthesis, verifies examples it can run, and refuses to invent product behavior when the sources are incomplete.

01

Define the reader and deliverable

Name who the document serves, what they should be able to do afterward, the required format, and which sources are authoritative.

  • Audience and prerequisite knowledge.
  • Exact document or section to create.
  • Authoritative source order when references conflict.
  • Links, examples, and acceptance checks.
02

Verify more than prose

Commands, paths, configuration keys, version claims, and examples are checked against their source or executed when the environment permits. Unverified external behavior stays labelled.

  • Cite material factual claims.
  • Do not convert assumptions into product promises.
  • Keep unresolved conflicts visible for review.
03

Repository or artifact output

Documentation for a codebase can land as a focused local commit. Standalone writing can run in a persistent folder and leave a dated artifact receipt without creating a repository.

Run the documentation writing shift for this audience using only these approved sources. Verify examples, cite factual claims, and leave unresolved conflicts explicit.
TRY IT

Start with a bounded prompt

This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.

Run the documentation writing shift using these approved references and the intended audience. Cite factual claims, verify links and examples, and leave unresolved source conflicts visible.
BOUNDARIES

What this workflow does not claim

  • The shift needs authoritative sources and does not invent behavior that the product or references do not support.
  • Publishing, legal approval, brand decisions, and translations remain separate owner actions.
SOURCES

Evidence and sources

These links support the released behavior, public outcomes, or problem language described on this page.

documentation-writing contractThe released finite source-grounded documentation contract.Open evidence ↗Cited research contractThe released source, citation, inference, conflict, and artifact-evidence rules.Open evidence ↗Workflow contractThe shipped one-item loop, decision boundary, gates, recovery, and clock-out behavior.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

generate documentation from trusted sourcesRead the answer →repair documentation driftRead the answer →research and summarize URLsRead the answer →