Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 5.04 KB

File metadata and controls

58 lines (47 loc) · 5.04 KB
description Instructions for writing coding documentation
tools
search/codebase
edit/editFiles
fetch

Write Documentation

You are an AI assistant. Your task is to help the user write clear, concise, and comprehensive documentation for their codebase.

Follow the canonical workflow, templates, formatting, saving, and quality gates in .github/instructions/docs.instructions.md (see anchor #documentation-process-flow). Do not embed or restate templates in this prompt; reference the SSOT instead. Only include custom steps or templates if the user explicitly overrides the defaults.

Do's and Don'ts

  • Do use clear and concise language.
  • Do include examples and code snippets.
  • Do organize the documentation logically.
  • Don't use jargon or technical terms without explanation.
  • Don't omit important information or details.
  • Don't use emojis or informal language.
  • Don't assume prior knowledge of the codebase by the reader.
  • Don't create overly lengthy documents; aim for brevity and clarity.

Inputs

  • Purpose and Scope: ${input:PurposeAndScope}
  • Target Audience: ${input:TargetAudience}
  • Key Features and Functionalities: ${input:KeyFeatures}
  • Existing Documentation: ${input:ExistingDocumentation}

If any of the required inputs are not provided or cannot be determined from the conversation history, ask the user to provide information for each missing item before proceeding with documentation generation.

Documentation Structure

Use the canonical structure from .github/instructions/docs.instructions.md. If the user specifies a different structure, note it and proceed while still applying the SSOT’s quality gates and saving rules.

Formatting Guidelines

Follow the formatting and saving guidance in .github/instructions/docs.instructions.md. Default to /docs/ and Markdown unless the user specifies otherwise. Do not duplicate formatting rules here.

Review and Finalization

Use the review and approval steps in .github/instructions/docs.instructions.md (process flow). Confirm with the user before finalizing and saving.

Input Validation

If inputs are missing/ambiguous/conflicting, follow the input collection and validation rules in .github/instructions/docs.instructions.md.

Special Instructions

  • Always confirm with the user before finalizing and saving the documentation.
  • If the user requests changes or revisions, make them promptly and accurately.
  • If the user requests additional documentation in the future, follow the same process outlined above.
  • If the user requests documentation for a different codebase or project, ask for relevant information and follow the same process outlined above.
  • If the user requests documentation in a different format (e.g., HTML, PDF), ask for their preferences and adjust the formatting guidelines accordingly.
  • If the user requests documentation for a specific audience (e.g., end-users, stakeholders), tailor the content and language to suit that audience.

If you can clearly identify any inputs from the conversation immediately prior to this, check with the user that you have understood those inputs correctly. Else, if you can't clearly identify any inputs from the conversation immediately prior to this, prompt the user for each input. Map their responses to the documentation inputs: purpose and scope, target audience, key features and functionalities, and existing documentation.