Finish doc comment detection#7
Merged
xen0n merged 13 commits intoliyi-run:mainfrom Apr 1, 2026
Merged
Conversation
…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>
e559e6c to
fb9832d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.