Skip to content

docs(code-style): clarify that member links are allowed#63

Merged
scardanzan merged 1 commit into
mainfrom
javier-godoy-patch-2
May 11, 2026
Merged

docs(code-style): clarify that member links are allowed#63
scardanzan merged 1 commit into
mainfrom
javier-godoy-patch-2

Conversation

@javier-godoy
Copy link
Copy Markdown
Member

@javier-godoy javier-godoy commented Apr 29, 2026

Clarifying the Boundary Between Type and Member Linking

The Problem: Algorithmic Over-Correction

Our current conventions prohibit linking to specific "restricted" types (such as argument types or the class being documented). While it is clear to a human developer that a method reference (e.g., {@link Bar#getName()}) is a distinct functional entity from a type reference, an LLM can easily fail to make this distinction.

Because LLMs often operate via literal pattern matching, they tend to flag the presence of a restricted identifier (like Bar) inside any {@link} tag as a violation. This leads the AI to aggressively replace necessary method links with {@code}.

The Solution: Explicit Logical Separation

By adding the note—“This restriction applies only to the type identifier itself”—we provide the explicit instruction needed for both humans and AI to understand that mandatory linking for members takes precedence over restricted types, when a member is being referenced.

Example of the Distinction

  • The Intent: "Don't link the class name Bar because it's already in the method signature Foo(Bar bar)."
  • The AI's Mistake: "Because I cannot link Bar, I must also not link Bar#getName()."
  • The Correction: This update clarifies that Bar#getName() is a member identifier, which remains linkable on its first occurrence regardless of its parent type's status.

@javier-godoy javier-godoy moved this from To Do to Inbox (needs triage) in Flowing Code Addons May 7, 2026
@javier-godoy javier-godoy force-pushed the javier-godoy-patch-2 branch from b315a25 to e0c85c7 Compare May 11, 2026 16:36
@scardanzan scardanzan merged commit 60ba8d0 into main May 11, 2026
@github-project-automation github-project-automation Bot moved this from Inbox (needs triage) to Pending release in Flowing Code Addons May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

2 participants