From 6471191b8fbafa00b1c0ec6c82aa22dd2691baf3 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:25 +0000 Subject: [PATCH 1/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/agent_tools/deps.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/codewiki/src/be/agent_tools/deps.py b/codewiki/src/be/agent_tools/deps.py index 6f2c469a..fd0bb015 100644 --- a/codewiki/src/be/agent_tools/deps.py +++ b/codewiki/src/be/agent_tools/deps.py @@ -1,3 +1,10 @@ +"""Dependency container for CodeWiki agent tools. + +Defines CodeWikiDeps, a dataclass holding the shared context and state +(paths, component registry, module tree position, configuration, etc.) +that is passed to agent tools during the CodeWiki documentation generation +pipeline. +""" from dataclasses import dataclass from codewiki.src.be.dependency_analyzer.models.core import Node from codewiki.src.config import Config @@ -14,4 +21,4 @@ class CodeWikiDeps: max_depth: int current_depth: int config: Config # LLM configuration - custom_instructions: str = None \ No newline at end of file + custom_instructions: str = None From 0a83247b0eb0957b49b407c18be7bc5972271b1d Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:27 +0000 Subject: [PATCH 2/6] fix(CODEWIKI-004): 6 review findings across 6 files --- .../be/dependency_analyzer/analyzers/javascript.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/codewiki/src/be/dependency_analyzer/analyzers/javascript.py b/codewiki/src/be/dependency_analyzer/analyzers/javascript.py index 7b94e167..ff14408b 100644 --- a/codewiki/src/be/dependency_analyzer/analyzers/javascript.py +++ b/codewiki/src/be/dependency_analyzer/analyzers/javascript.py @@ -1,3 +1,14 @@ +"""Tree-sitter based analyzer for JavaScript/TypeScript source files. + +This module implements the dependency-analysis pipeline component responsible +for parsing JavaScript and TypeScript files using tree-sitter grammars, +extracting top-level and class-member declarations (functions, classes, +methods, arrow functions, etc.) as `Node` objects, and inferring +`CallRelationship` edges between them (function calls, class inheritance, +and JSDoc-derived type dependencies). The extracted nodes and relationships +feed into the broader dependency graph built by the dependency analyzer. +""" + import logging import os import traceback From c395e2d3679a67b1109e9502b2ddcc783518c663 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:29 +0000 Subject: [PATCH 3/6] fix(CODEWIKI-004): 6 review findings across 6 files --- .../be/dependency_analyzer/analyzers/typescript.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/codewiki/src/be/dependency_analyzer/analyzers/typescript.py b/codewiki/src/be/dependency_analyzer/analyzers/typescript.py index 68abc86d..2660e244 100644 --- a/codewiki/src/be/dependency_analyzer/analyzers/typescript.py +++ b/codewiki/src/be/dependency_analyzer/analyzers/typescript.py @@ -1,3 +1,14 @@ +"""TypeScript/JavaScript dependency analyzer based on tree-sitter parsing. + +This module implements TreeSitterTSAnalyzer, which parses TypeScript and +JavaScript source files using tree-sitter to extract top-level code entities +(functions, classes, interfaces, type aliases, enums, variables, exports, +etc.) as `Node` objects and the call/inheritance/type relationships between +them as `CallRelationship` objects. It is a structurally central part of the +dependency analyzer pipeline, feeding the extracted nodes and relationships +into downstream dependency graph construction. +""" + import logging import os import traceback @@ -979,4 +990,4 @@ def analyze_typescript_file_treesitter( return analyzer.nodes, analyzer.call_relationships except Exception as e: logger.error(f"Error in tree-sitter TS analysis for {file_path}: {e}", exc_info=True) - return [], [] \ No newline at end of file + return [], [] From 21ffc5764fd22a14b6c7c29e20e7242b8f274347 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:31 +0000 Subject: [PATCH 4/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/dependency_analyzer/analyzers/cpp.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codewiki/src/be/dependency_analyzer/analyzers/cpp.py b/codewiki/src/be/dependency_analyzer/analyzers/cpp.py index dd89d1b3..72dce92f 100644 --- a/codewiki/src/be/dependency_analyzer/analyzers/cpp.py +++ b/codewiki/src/be/dependency_analyzer/analyzers/cpp.py @@ -1,3 +1,12 @@ +"""C++ dependency analyzer using tree-sitter. + +This module parses C++ source files with tree-sitter-cpp and extracts +structural nodes (classes, structs, functions, methods, namespaces, global +variables) along with call/inheritance/usage relationships between them. +The extracted `Node` and `CallRelationship` objects feed into the broader +dependency analysis pipeline via the `analyze_cpp_file` entry point. +""" + import logging from typing import List, Optional, Tuple from pathlib import Path @@ -366,3 +375,4 @@ def _class_has_method(self, class_node, method_name): def analyze_cpp_file(file_path: str, content: str, repo_path: str = None) -> Tuple[List[Node], List[CallRelationship]]: analyzer = TreeSitterCppAnalyzer(file_path, content, repo_path) return analyzer.nodes, analyzer.call_relationships + From 413d51bff4ed2ebcf0ae90a6020493423346b1b2 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:33 +0000 Subject: [PATCH 5/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/dependency_analyzer/analyzers/csharp.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codewiki/src/be/dependency_analyzer/analyzers/csharp.py b/codewiki/src/be/dependency_analyzer/analyzers/csharp.py index 50500aa4..579cd070 100644 --- a/codewiki/src/be/dependency_analyzer/analyzers/csharp.py +++ b/codewiki/src/be/dependency_analyzer/analyzers/csharp.py @@ -1,3 +1,11 @@ +"""Tree-sitter based dependency analyzer for C# source files. + +This module parses C# files using tree-sitter-c-sharp to extract top-level +components (classes, interfaces, structs, enums, records, delegates) as +Node objects and infers CallRelationship edges (e.g. class inheritance, +property/field/parameter type usage) between them. +""" + import logging from typing import List, Optional, Tuple from pathlib import Path From 07977fd1489980bd6685abe8dafe6b8b552858cc Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 05:09:35 +0000 Subject: [PATCH 6/6] fix(CODEWIKI-004): 6 review findings across 6 files --- codewiki/src/be/agent_tools/read_code_components.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codewiki/src/be/agent_tools/read_code_components.py b/codewiki/src/be/agent_tools/read_code_components.py index 0125cbb2..cecb6429 100644 --- a/codewiki/src/be/agent_tools/read_code_components.py +++ b/codewiki/src/be/agent_tools/read_code_components.py @@ -1,3 +1,5 @@ +"""Agent tool for reading the source code of specific CodeWiki components by id.""" + from pydantic_ai import RunContext, Tool from codewiki.src.be.agent_tools.deps import CodeWikiDeps @@ -19,4 +21,4 @@ async def read_code_components(ctx: RunContext[CodeWikiDeps], component_ids: lis return "\n".join(results) -read_code_components_tool = Tool(function=read_code_components, name="read_code_components", description="Read the code of a given list of component ids", takes_ctx=True) \ No newline at end of file +read_code_components_tool = Tool(function=read_code_components, name="read_code_components", description="Read the code of a given list of component ids", takes_ctx=True)