code-review-ai-cli 2.3.0__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/PKG-INFO +9 -18
  2. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/README.md +5 -3
  3. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/PKG-INFO +9 -18
  4. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/requires.txt +0 -14
  5. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/pyproject.toml +4 -12
  6. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/ai_review.py +187 -164
  7. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/config.py +12 -4
  8. code_review_ai_cli-2.4.0/src/context_extractor.py +1685 -0
  9. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/formatter.py +77 -135
  10. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/git_utils.py +307 -104
  11. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/llm_client.py +20 -15
  12. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/prompts/config.yaml.template +5 -2
  13. code_review_ai_cli-2.4.0/src/prompts/review_prompt.md.template +89 -0
  14. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/tfs_client.py +146 -111
  15. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_ai_review.py +60 -15
  16. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_config.py +28 -4
  17. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_context_extractor.py +221 -0
  18. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_formatter.py +36 -85
  19. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_git_utils.py +138 -14
  20. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_llm_client.py +35 -0
  21. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_tfs_client.py +46 -0
  22. code_review_ai_cli-2.3.0/src/context_extractor.py +0 -637
  23. code_review_ai_cli-2.3.0/src/prompts/review_prompt.md.template +0 -21
  24. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/SOURCES.txt +0 -0
  25. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/dependency_links.txt +0 -0
  26. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/entry_points.txt +0 -0
  27. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/code_review_ai_cli.egg-info/top_level.txt +0 -0
  28. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/setup.cfg +0 -0
  29. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/__init__.py +0 -0
  30. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/prompt_utils.py +0 -0
  31. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/src/token_estimator.py +0 -0
  32. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_prompt_utils.py +0 -0
  33. {code_review_ai_cli-2.3.0 → code_review_ai_cli-2.4.0}/tests/test_token_estimator.py +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-review-ai-cli
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests
5
- License: MIT
6
- Keywords: code-review,ai,azure-devops,tfs,pull-request,llm
5
+ License: Apache-2.0
6
+ Keywords: code-review,ai,azure-devops,tfs,pull-request,git,llm
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: Environment :: Console
9
9
  Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
@@ -23,19 +23,8 @@ Requires-Dist: tree-sitter<0.22,>=0.20
23
23
  Requires-Dist: tree-sitter-languages>=1.10.2
24
24
  Provides-Extra: bedrock
25
25
  Requires-Dist: boto3>=1.34.0; extra == "bedrock"
26
- Provides-Extra: openai
27
- Requires-Dist: openai>=1.0.0; extra == "openai"
28
- Provides-Extra: gemini
29
- Requires-Dist: google-generativeai>=0.3.0; extra == "gemini"
30
- Provides-Extra: claude
31
- Requires-Dist: anthropic>=0.18.0; extra == "claude"
32
26
  Provides-Extra: all
33
27
  Requires-Dist: boto3>=1.34.0; extra == "all"
34
- Requires-Dist: litellm>=1.40.0; extra == "all"
35
- Requires-Dist: tiktoken>=0.7.0; extra == "all"
36
- Requires-Dist: openai>=1.0.0; extra == "all"
37
- Requires-Dist: google-generativeai>=0.3.0; extra == "all"
38
- Requires-Dist: anthropic>=0.18.0; extra == "all"
39
28
  Provides-Extra: dev
40
29
  Requires-Dist: pytest>=8.3.0; extra == "dev"
41
30
  Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
@@ -49,6 +38,8 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
49
38
 
50
39
  - AI Pull Request review (`pr-review`)
51
40
  - Local Git review without a PR (`local` / `local-review` — working tree, `--staged`, `--from <branch>`, `--commit <sha>`)
41
+ - **Smart File Bundling**: groups related files (interfaces, implementations, unit tests, i18n pairs, and domain folders) into cohesive bundles (`max_files_per_bundle`) so large changesets are reviewed completely without context degradation
42
+ - **Deterministic Cross-File Symbol Resolution**: resolves compact signatures and type declarations (`<referenced_symbols>`) via Tree-sitter across PR/local changesets and relative/sibling imports (`max_referenced_symbols`)
52
43
  - Structured PR comments (inline + general summary)
53
44
  - `dry-run` mode to validate without posting
54
45
  - PR listing with filters (`list-prs`)
@@ -73,7 +64,7 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
73
64
  ## Installation
74
65
 
75
66
  Install from PyPI:
76
- s
67
+
77
68
  ```bash
78
69
  pip install code-review-ai-cli
79
70
  ```
@@ -124,8 +115,8 @@ review:
124
115
  verbosity: detailed
125
116
  scope: diff_only
126
117
  custom_prompt_file: review_prompt.md
127
- # file limit sent to the LLM
128
- max_diff_files: 50
118
+ # maximum related files grouped per LLM review bundle (Smart File Bundling)
119
+ max_files_per_bundle: 5
129
120
  # per-file limit
130
121
  max_diff_lines: 2000
131
122
  # extension allowlist (empty list = all files)
@@ -6,6 +6,8 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
6
6
 
7
7
  - AI Pull Request review (`pr-review`)
8
8
  - Local Git review without a PR (`local` / `local-review` — working tree, `--staged`, `--from <branch>`, `--commit <sha>`)
9
+ - **Smart File Bundling**: groups related files (interfaces, implementations, unit tests, i18n pairs, and domain folders) into cohesive bundles (`max_files_per_bundle`) so large changesets are reviewed completely without context degradation
10
+ - **Deterministic Cross-File Symbol Resolution**: resolves compact signatures and type declarations (`<referenced_symbols>`) via Tree-sitter across PR/local changesets and relative/sibling imports (`max_referenced_symbols`)
9
11
  - Structured PR comments (inline + general summary)
10
12
  - `dry-run` mode to validate without posting
11
13
  - PR listing with filters (`list-prs`)
@@ -30,7 +32,7 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
30
32
  ## Installation
31
33
 
32
34
  Install from PyPI:
33
- s
35
+
34
36
  ```bash
35
37
  pip install code-review-ai-cli
36
38
  ```
@@ -81,8 +83,8 @@ review:
81
83
  verbosity: detailed
82
84
  scope: diff_only
83
85
  custom_prompt_file: review_prompt.md
84
- # file limit sent to the LLM
85
- max_diff_files: 50
86
+ # maximum related files grouped per LLM review bundle (Smart File Bundling)
87
+ max_files_per_bundle: 5
86
88
  # per-file limit
87
89
  max_diff_lines: 2000
88
90
  # extension allowlist (empty list = all files)
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-review-ai-cli
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests
5
- License: MIT
6
- Keywords: code-review,ai,azure-devops,tfs,pull-request,llm
5
+ License: Apache-2.0
6
+ Keywords: code-review,ai,azure-devops,tfs,pull-request,git,llm
7
7
  Classifier: Development Status :: 4 - Beta
8
8
  Classifier: Environment :: Console
9
9
  Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
@@ -23,19 +23,8 @@ Requires-Dist: tree-sitter<0.22,>=0.20
23
23
  Requires-Dist: tree-sitter-languages>=1.10.2
24
24
  Provides-Extra: bedrock
25
25
  Requires-Dist: boto3>=1.34.0; extra == "bedrock"
26
- Provides-Extra: openai
27
- Requires-Dist: openai>=1.0.0; extra == "openai"
28
- Provides-Extra: gemini
29
- Requires-Dist: google-generativeai>=0.3.0; extra == "gemini"
30
- Provides-Extra: claude
31
- Requires-Dist: anthropic>=0.18.0; extra == "claude"
32
26
  Provides-Extra: all
33
27
  Requires-Dist: boto3>=1.34.0; extra == "all"
34
- Requires-Dist: litellm>=1.40.0; extra == "all"
35
- Requires-Dist: tiktoken>=0.7.0; extra == "all"
36
- Requires-Dist: openai>=1.0.0; extra == "all"
37
- Requires-Dist: google-generativeai>=0.3.0; extra == "all"
38
- Requires-Dist: anthropic>=0.18.0; extra == "all"
39
28
  Provides-Extra: dev
40
29
  Requires-Dist: pytest>=8.3.0; extra == "dev"
41
30
  Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
@@ -49,6 +38,8 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
49
38
 
50
39
  - AI Pull Request review (`pr-review`)
51
40
  - Local Git review without a PR (`local` / `local-review` — working tree, `--staged`, `--from <branch>`, `--commit <sha>`)
41
+ - **Smart File Bundling**: groups related files (interfaces, implementations, unit tests, i18n pairs, and domain folders) into cohesive bundles (`max_files_per_bundle`) so large changesets are reviewed completely without context degradation
42
+ - **Deterministic Cross-File Symbol Resolution**: resolves compact signatures and type declarations (`<referenced_symbols>`) via Tree-sitter across PR/local changesets and relative/sibling imports (`max_referenced_symbols`)
52
43
  - Structured PR comments (inline + general summary)
53
44
  - `dry-run` mode to validate without posting
54
45
  - PR listing with filters (`list-prs`)
@@ -73,7 +64,7 @@ AI Code Review is an automated AI-powered code review CLI, compatible with vario
73
64
  ## Installation
74
65
 
75
66
  Install from PyPI:
76
- s
67
+
77
68
  ```bash
78
69
  pip install code-review-ai-cli
79
70
  ```
@@ -124,8 +115,8 @@ review:
124
115
  verbosity: detailed
125
116
  scope: diff_only
126
117
  custom_prompt_file: review_prompt.md
127
- # file limit sent to the LLM
128
- max_diff_files: 50
118
+ # maximum related files grouped per LLM review bundle (Smart File Bundling)
119
+ max_files_per_bundle: 5
129
120
  # per-file limit
130
121
  max_diff_lines: 2000
131
122
  # extension allowlist (empty list = all files)
@@ -7,25 +7,11 @@ tree-sitter-languages>=1.10.2
7
7
 
8
8
  [all]
9
9
  boto3>=1.34.0
10
- litellm>=1.40.0
11
- tiktoken>=0.7.0
12
- openai>=1.0.0
13
- google-generativeai>=0.3.0
14
- anthropic>=0.18.0
15
10
 
16
11
  [bedrock]
17
12
  boto3>=1.34.0
18
13
 
19
- [claude]
20
- anthropic>=0.18.0
21
-
22
14
  [dev]
23
15
  pytest>=8.3.0
24
16
  pytest-cov>=5.0.0
25
17
  pytest-mock>=3.14.0
26
-
27
- [gemini]
28
- google-generativeai>=0.3.0
29
-
30
- [openai]
31
- openai>=1.0.0
@@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "code-review-ai-cli"
7
- version = "2.3.0"
7
+ version = "2.4.0"
8
8
  description = "Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
- license = { text = "MIT" }
12
- keywords = ["code-review", "ai", "azure-devops", "tfs", "pull-request", "llm"]
11
+ license = { text = "Apache-2.0" }
12
+ keywords = ["code-review", "ai", "azure-devops", "tfs", "pull-request", "git", "llm"]
13
13
  classifiers = [
14
14
  "Development Status :: 4 - Beta",
15
15
  "Environment :: Console",
16
16
  "Intended Audience :: Developers",
17
- "License :: OSI Approved :: MIT License",
17
+ "License :: OSI Approved :: Apache Software License",
18
18
  "Programming Language :: Python :: 3",
19
19
  "Programming Language :: Python :: 3.10",
20
20
  "Programming Language :: Python :: 3.11",
@@ -32,16 +32,8 @@ dependencies = [
32
32
 
33
33
  [project.optional-dependencies]
34
34
  bedrock = ["boto3>=1.34.0"]
35
- openai = ["openai>=1.0.0"]
36
- gemini = ["google-generativeai>=0.3.0"]
37
- claude = ["anthropic>=0.18.0"]
38
35
  all = [
39
36
  "boto3>=1.34.0",
40
- "litellm>=1.40.0",
41
- "tiktoken>=0.7.0",
42
- "openai>=1.0.0",
43
- "google-generativeai>=0.3.0",
44
- "anthropic>=0.18.0",
45
37
  ]
46
38
  dev = [
47
39
  "pytest>=8.3.0",