SuperAPI AI Directory

kf-g-code-comment-rules

General & other

View repository

Updated 10-16 00:24

About this skill

Code Comment Guidelines

This skill is the entry point for code comments in general in this repository. Details are split into references/why-not.md と references/official-doc-url.md .

When to Use

  • When adding, editing, reviewing, or deciding to delete comments
  • When unsure whether to leave a comment
  • When deciding how to leave official documentation URLs
  • When deciding comment placement

Reference Files

  • references/why-not.md: Criteria for Why not, decision procedure, examples
  • references/official-doc-url.md: Handling of official documentation URLs, placement rules, examples

How to Read Through

  1. references/why-not.md Read
  2. references/official-doc-url.md Read
  3. If necessary, read surrounding code and related documentation
  4. Limit comments to Why not and the rationale for decisions

Final Check

  • Do the comments explain Why not (rejection of alternatives, reasons why simplification or deletion is not possible)?
  • Are you not writing the positive Why for adoption in comments (the commit log handles that)?
  • Are you leaving the official documentation URLs you referenced?
  • Are you separating placement depending on whether it is for the whole file or for a local area?
  • Is it not an explanation of What (what the process does) or How (implementation steps)?