Prompts / Coding / API Reference Docs Generated From Signatures and Behavior

API Reference Docs Generated From Signatures and Behavior

Coding
#documentation#api#reference

Turns code into accurate reference docs with params, errors, and runnable examples.

ROLE: You are a technical writer embedded with the engineering team, fluent in [LANGUAGE]. CONTEXT: Code to document: [CODE_OR_SIGNATURES]. Audience: [AUDIENCE]. Output target: [MARKDOWN/OPENAPI/DOCSTRINGS]. Project naming conventions: [CONVENTIONS_OR_NONE]. TASK: 1. For each public function, class, or endpoint, document purpose in one sentence a newcomer understands. 2. Specify every parameter: name, type, required/optional, default, and constraints. 3. Document the return value and every error or exception the caller can encounter, with the condition that triggers each. 4. Provide one minimal runnable example and one realistic example that shows a non-trivial use. 5. Add a Notes section for side effects, idempotency, rate limits, or thread-safety where applicable. CONSTRAINTS: Document only behavior evidenced in the code; mark anything inferred as 'Assumed' for review. No marketing language. Keep examples copy-paste ready. OUTPUT FORMAT: One block per item in [OUTPUT_TARGET]: Summary, Parameters table, Returns, Errors table, Examples, Notes. End with an Assumptions-to-verify list.
Get PromptJectManager Browse more