Skip to content

Finish doc comment detection#7

Merged
xen0n merged 13 commits intoliyi-run:mainfrom
xen0n:feat/doc-comment-detection
Apr 1, 2026
Merged

Finish doc comment detection#7
xen0n merged 13 commits intoliyi-run:mainfrom
xen0n:feat/doc-comment-detection

Conversation

@xen0n
Copy link
Copy Markdown
Contributor

@xen0n xen0n commented Apr 1, 2026

No description provided.

xen0n added 13 commits April 1, 2026 09:58
…uage

Probed each tree-sitter grammar's comment node kinds and documented
feasibility for doc_comment_detector. 8 languages feasible (Kotlin,
Swift, C, C++, C#, PHP, ObjC, Zig), 2 not feasible (Ruby, Bash),
3 not applicable (JSON, TOML, YAML). Added per-language detection
strategy table to the scaffold design section.

Original prompt:

> the branch is also clean? if so, move to main, sync, and create
> a new one

(the feasibility analysis was re-derived from earlier probing work)

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect Kotlin doc comments via tree-sitter: KDoc block comments
(`/** ... */`) use `block_comment` kind, triple-slash line
comments (`///`) use `line_comment` kind. Skips `modifiers`
and `annotation` siblings that may appear between the doc
comment and the declaration.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect Swift doc comments via tree-sitter: triple-slash (`///`)
uses `comment` kind, doc block comments (`/** ... */`) use
`multiline_comment` kind. Skips `modifiers` siblings.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect C doc comments via tree-sitter: all comments use the uniform
`comment` kind. Distinguishes doc comments by prefix: `/**`
for block doc and `///` for line doc.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect C++ doc comments via tree-sitter: all comments use the
uniform `comment` kind. Distinguishes doc comments by prefix:
`/**` for block doc and `///` for line doc. Additionally
skips `access_specifier` siblings (public/private/protected)
that may appear between the doc comment and a class member.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect C# XML doc comments via tree-sitter: all comments use the
uniform `comment` kind. The C# convention is `///` for XML
documentation comments (also accepts `/**` for Javadoc-style).
Skips `attribute_list` and `modifier` siblings.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect PHPDoc comments via tree-sitter: all comments use the
uniform `comment` kind. The PHP convention for documentation is
`/**` (PHPDoc). Skips `attribute_list`, `modifier`, and
`visibility_modifier` siblings.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect Objective-C doc comments via tree-sitter: all comments use
the uniform `comment` kind. Checks for `/**` (HeaderDoc/Javadoc)
and `///` (Doxygen) prefixes.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Detect Zig doc comments via tree-sitter: all comments use the
uniform `comment` kind. The Zig doc comment convention is `///`
before a declaration.

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Add shared `check_doc_comment` test helper that resolves a
tree_path, finds the item-level tree-sitter node, and calls
`has_doc_comment`. Add 19 tests covering positive and negative
cases for all 8 new doc_comment_detector implementations:
Kotlin (KDoc, triple-slash, regular), Swift (triple-slash,
multiline doc, regular), C (block doc, triple-slash, regular),
C++ (block doc, triple-slash), C# (triple-slash in class,
regular), PHP (PHPDoc, regular), ObjC (block doc, triple-slash),
Zig (triple-slash, regular).

Original prompt:

> Can you see the feasibility analysis results from the last crashed session?

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: WANG Xuerui <git@xen0n.name>
15/21 languages now have doc_comment_detector. Remaining 5 are
not feasible (Bash, Ruby) or not applicable (JSON, TOML, YAML).
Updated date and removed item 1.2 from priority diagram.

Original prompt:

> pull the latest remote branch (I've updated it) and update
> the roadmap, then push

Human note: Fixed model identity (the model looked at "default model"
that said Kimi K2.5).

AI-assisted-by: Xiaomi MiMo-V2-Pro (OpenClaw)
Signed-off-by: WANG Xuerui <git@xen0n.name>
@xen0n xen0n force-pushed the feat/doc-comment-detection branch from e559e6c to fb9832d Compare April 1, 2026 02:00
@xen0n xen0n merged commit fb9832d into liyi-run:main Apr 1, 2026
5 checks passed
@xen0n xen0n deleted the feat/doc-comment-detection branch April 1, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant