Skip to content

ALL-COMM1001 · comment_intent

Classify why a comment exists with a local bounded model.

This is a contextual rule for all languages. Read its implementation.

Compare the normalized comment text with its bounded preceding and following source. Choose exactly one intent from affirmative words and local code. Directives and commented-out source are excluded before model execution, as are API documentation and comments shorter than minimum_tokens. If the local evidence does not establish one intent, return uncertain.

The finding retains the model confidence and source path.

Comment usefulness, truth, and staleness require separate evidence and rules. API documentation and comments below minimum_tokens stay outside this local implementation-comment rule.

# Retry because the service closes idle sockets is rationale. # Values are UTC is a contract. # Increment count beside count += 1 is a restatement. A prediction the model cannot make confidently comes back uncertain rather than guessed.

  • Cites “Clean Code”, chapter 4, Good Comments and Bad Comments
  • Cites “A Philosophy of Software Design”, chapters 12 through 15
  • Cites “GLiNER2 documentation”, classification tutorial