code-review-ai-cli 1.1.0__tar.gz → 1.2.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.
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/PKG-INFO +23 -6
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/README.md +22 -5
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/PKG-INFO +23 -6
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/SOURCES.txt +1 -1
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/pyproject.toml +1 -1
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/ai_review.py +727 -81
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/config.py +9 -1
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/formatter.py +3 -3
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/llm_client.py +459 -65
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/prompts/config.yaml.template +9 -4
- code_review_ai_cli-1.2.0/src/prompts/review_context.example.md +59 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/tfs_client.py +262 -68
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/usage_tracker.py +10 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_ai_review.py +285 -34
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_config.py +4 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_llm_client.py +147 -12
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_tfs_client.py +204 -5
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_usage_tracker.py +9 -0
- code_review_ai_cli-1.1.0/src/prompts/review_prompt.md.template +0 -42
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/dependency_links.txt +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/entry_points.txt +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/requires.txt +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/code_review_ai_cli.egg-info/top_level.txt +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/setup.cfg +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/__init__.py +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/src/git_utils.py +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_formatter.py +0 -0
- {code_review_ai_cli-1.1.0 → code_review_ai_cli-1.2.0}/tests/test_git_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-review-ai-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: code-review,ai,azure-devops,tfs,pull-request,llm
|
|
@@ -48,7 +48,7 @@ Automated code review tool with Pull Request integration for Azure DevOps/TFS an
|
|
|
48
48
|
- **Multiple LLM Providers** — OpenAI, Azure OpenAI, Gemini, Claude, Ollama, GitHub Copilot, AWS Bedrock
|
|
49
49
|
- **Smart Filtering** — Filter by file extensions, limit diff size
|
|
50
50
|
- **Project-aware PR Context** — Sends repository and linked work item context while restricting findings to modified PR lines
|
|
51
|
-
- **
|
|
51
|
+
- **Single Reviewer Context** — One Markdown context file with local override support
|
|
52
52
|
- **Usage Tracking** — Store per-PR token usage and optional cost estimates
|
|
53
53
|
- **Interactive CLI** — Menu-driven selection and confirmation
|
|
54
54
|
|
|
@@ -89,7 +89,9 @@ ai-review init
|
|
|
89
89
|
|
|
90
90
|
Creates:
|
|
91
91
|
- `config.yaml` — LLM and review settings
|
|
92
|
-
- `
|
|
92
|
+
- `review_context.example.md` — Canonical example reviewer context
|
|
93
|
+
- `review_context.local.md` — Local reviewer context override, ignored by git
|
|
94
|
+
- `.gitignore` entry for `review_context.local.md`
|
|
93
95
|
|
|
94
96
|
### 3. Run Your First Review
|
|
95
97
|
|
|
@@ -130,6 +132,8 @@ review:
|
|
|
130
132
|
scope: diff_with_context # diff_with_context, diff_only, full_code
|
|
131
133
|
file_extensions_filter: [".cs", ".ts", ".py"]
|
|
132
134
|
max_diff_files: 50
|
|
135
|
+
max_comments_to_post: 20
|
|
136
|
+
custom_prompt_file: review_context.local.md
|
|
133
137
|
project_context:
|
|
134
138
|
enabled: true
|
|
135
139
|
mode: on_demand # on_demand, full
|
|
@@ -143,14 +147,27 @@ review:
|
|
|
143
147
|
max_items: 20
|
|
144
148
|
```
|
|
145
149
|
|
|
146
|
-
By default, repository context is loaded on demand: the prompt includes
|
|
147
|
-
|
|
148
|
-
repository manifest, then the model
|
|
150
|
+
By default, repository context is loaded on demand: the prompt includes explicit
|
|
151
|
+
source-branch change packets, full changed-file contents as read-only context,
|
|
152
|
+
linked work item documentation, and a repository manifest, then the model
|
|
153
|
+
requests any extra files it needs. Inline PR comments must still be grounded in
|
|
154
|
+
actual changed lines from the change packets. Set
|
|
149
155
|
`review.project_context.mode: full` to send the full eligible repository
|
|
150
156
|
snapshot instead. Bedrock uses a default estimated prompt budget of 180000
|
|
151
157
|
tokens; override it with `llm.max_prompt_tokens` if your model supports more or
|
|
152
158
|
less.
|
|
153
159
|
|
|
160
|
+
Reviewer context is loaded from exactly one Markdown file. By default the CLI
|
|
161
|
+
uses `review_context.local.md` when it exists, otherwise it falls back to the
|
|
162
|
+
packaged `src/prompts/review_context.example.md`. Keep local team tweaks in
|
|
163
|
+
`review_context.local.md`; it is gitignored so the canonical context cannot
|
|
164
|
+
drift across machines.
|
|
165
|
+
|
|
166
|
+
For Copilot-backed reviews, Claude Sonnet models are often strong choices for
|
|
167
|
+
large PR validation, for example `llm.provider: copilot` with a Claude Sonnet
|
|
168
|
+
model available to your organization. The tool still enforces the same
|
|
169
|
+
source-branch grounding, duplicate checks, and comment cap regardless of model.
|
|
170
|
+
|
|
154
171
|
## Development & Testing
|
|
155
172
|
|
|
156
173
|
This is a standard Python project with the following structure:
|
|
@@ -11,7 +11,7 @@ Automated code review tool with Pull Request integration for Azure DevOps/TFS an
|
|
|
11
11
|
- **Multiple LLM Providers** — OpenAI, Azure OpenAI, Gemini, Claude, Ollama, GitHub Copilot, AWS Bedrock
|
|
12
12
|
- **Smart Filtering** — Filter by file extensions, limit diff size
|
|
13
13
|
- **Project-aware PR Context** — Sends repository and linked work item context while restricting findings to modified PR lines
|
|
14
|
-
- **
|
|
14
|
+
- **Single Reviewer Context** — One Markdown context file with local override support
|
|
15
15
|
- **Usage Tracking** — Store per-PR token usage and optional cost estimates
|
|
16
16
|
- **Interactive CLI** — Menu-driven selection and confirmation
|
|
17
17
|
|
|
@@ -52,7 +52,9 @@ ai-review init
|
|
|
52
52
|
|
|
53
53
|
Creates:
|
|
54
54
|
- `config.yaml` — LLM and review settings
|
|
55
|
-
- `
|
|
55
|
+
- `review_context.example.md` — Canonical example reviewer context
|
|
56
|
+
- `review_context.local.md` — Local reviewer context override, ignored by git
|
|
57
|
+
- `.gitignore` entry for `review_context.local.md`
|
|
56
58
|
|
|
57
59
|
### 3. Run Your First Review
|
|
58
60
|
|
|
@@ -93,6 +95,8 @@ review:
|
|
|
93
95
|
scope: diff_with_context # diff_with_context, diff_only, full_code
|
|
94
96
|
file_extensions_filter: [".cs", ".ts", ".py"]
|
|
95
97
|
max_diff_files: 50
|
|
98
|
+
max_comments_to_post: 20
|
|
99
|
+
custom_prompt_file: review_context.local.md
|
|
96
100
|
project_context:
|
|
97
101
|
enabled: true
|
|
98
102
|
mode: on_demand # on_demand, full
|
|
@@ -106,14 +110,27 @@ review:
|
|
|
106
110
|
max_items: 20
|
|
107
111
|
```
|
|
108
112
|
|
|
109
|
-
By default, repository context is loaded on demand: the prompt includes
|
|
110
|
-
|
|
111
|
-
repository manifest, then the model
|
|
113
|
+
By default, repository context is loaded on demand: the prompt includes explicit
|
|
114
|
+
source-branch change packets, full changed-file contents as read-only context,
|
|
115
|
+
linked work item documentation, and a repository manifest, then the model
|
|
116
|
+
requests any extra files it needs. Inline PR comments must still be grounded in
|
|
117
|
+
actual changed lines from the change packets. Set
|
|
112
118
|
`review.project_context.mode: full` to send the full eligible repository
|
|
113
119
|
snapshot instead. Bedrock uses a default estimated prompt budget of 180000
|
|
114
120
|
tokens; override it with `llm.max_prompt_tokens` if your model supports more or
|
|
115
121
|
less.
|
|
116
122
|
|
|
123
|
+
Reviewer context is loaded from exactly one Markdown file. By default the CLI
|
|
124
|
+
uses `review_context.local.md` when it exists, otherwise it falls back to the
|
|
125
|
+
packaged `src/prompts/review_context.example.md`. Keep local team tweaks in
|
|
126
|
+
`review_context.local.md`; it is gitignored so the canonical context cannot
|
|
127
|
+
drift across machines.
|
|
128
|
+
|
|
129
|
+
For Copilot-backed reviews, Claude Sonnet models are often strong choices for
|
|
130
|
+
large PR validation, for example `llm.provider: copilot` with a Claude Sonnet
|
|
131
|
+
model available to your organization. The tool still enforces the same
|
|
132
|
+
source-branch grounding, duplicate checks, and comment cap regardless of model.
|
|
133
|
+
|
|
117
134
|
## Development & Testing
|
|
118
135
|
|
|
119
136
|
This is a standard Python project with the following structure:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-review-ai-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: code-review,ai,azure-devops,tfs,pull-request,llm
|
|
@@ -48,7 +48,7 @@ Automated code review tool with Pull Request integration for Azure DevOps/TFS an
|
|
|
48
48
|
- **Multiple LLM Providers** — OpenAI, Azure OpenAI, Gemini, Claude, Ollama, GitHub Copilot, AWS Bedrock
|
|
49
49
|
- **Smart Filtering** — Filter by file extensions, limit diff size
|
|
50
50
|
- **Project-aware PR Context** — Sends repository and linked work item context while restricting findings to modified PR lines
|
|
51
|
-
- **
|
|
51
|
+
- **Single Reviewer Context** — One Markdown context file with local override support
|
|
52
52
|
- **Usage Tracking** — Store per-PR token usage and optional cost estimates
|
|
53
53
|
- **Interactive CLI** — Menu-driven selection and confirmation
|
|
54
54
|
|
|
@@ -89,7 +89,9 @@ ai-review init
|
|
|
89
89
|
|
|
90
90
|
Creates:
|
|
91
91
|
- `config.yaml` — LLM and review settings
|
|
92
|
-
- `
|
|
92
|
+
- `review_context.example.md` — Canonical example reviewer context
|
|
93
|
+
- `review_context.local.md` — Local reviewer context override, ignored by git
|
|
94
|
+
- `.gitignore` entry for `review_context.local.md`
|
|
93
95
|
|
|
94
96
|
### 3. Run Your First Review
|
|
95
97
|
|
|
@@ -130,6 +132,8 @@ review:
|
|
|
130
132
|
scope: diff_with_context # diff_with_context, diff_only, full_code
|
|
131
133
|
file_extensions_filter: [".cs", ".ts", ".py"]
|
|
132
134
|
max_diff_files: 50
|
|
135
|
+
max_comments_to_post: 20
|
|
136
|
+
custom_prompt_file: review_context.local.md
|
|
133
137
|
project_context:
|
|
134
138
|
enabled: true
|
|
135
139
|
mode: on_demand # on_demand, full
|
|
@@ -143,14 +147,27 @@ review:
|
|
|
143
147
|
max_items: 20
|
|
144
148
|
```
|
|
145
149
|
|
|
146
|
-
By default, repository context is loaded on demand: the prompt includes
|
|
147
|
-
|
|
148
|
-
repository manifest, then the model
|
|
150
|
+
By default, repository context is loaded on demand: the prompt includes explicit
|
|
151
|
+
source-branch change packets, full changed-file contents as read-only context,
|
|
152
|
+
linked work item documentation, and a repository manifest, then the model
|
|
153
|
+
requests any extra files it needs. Inline PR comments must still be grounded in
|
|
154
|
+
actual changed lines from the change packets. Set
|
|
149
155
|
`review.project_context.mode: full` to send the full eligible repository
|
|
150
156
|
snapshot instead. Bedrock uses a default estimated prompt budget of 180000
|
|
151
157
|
tokens; override it with `llm.max_prompt_tokens` if your model supports more or
|
|
152
158
|
less.
|
|
153
159
|
|
|
160
|
+
Reviewer context is loaded from exactly one Markdown file. By default the CLI
|
|
161
|
+
uses `review_context.local.md` when it exists, otherwise it falls back to the
|
|
162
|
+
packaged `src/prompts/review_context.example.md`. Keep local team tweaks in
|
|
163
|
+
`review_context.local.md`; it is gitignored so the canonical context cannot
|
|
164
|
+
drift across machines.
|
|
165
|
+
|
|
166
|
+
For Copilot-backed reviews, Claude Sonnet models are often strong choices for
|
|
167
|
+
large PR validation, for example `llm.provider: copilot` with a Claude Sonnet
|
|
168
|
+
model available to your organization. The tool still enforces the same
|
|
169
|
+
source-branch grounding, duplicate checks, and comment cap regardless of model.
|
|
170
|
+
|
|
154
171
|
## Development & Testing
|
|
155
172
|
|
|
156
173
|
This is a standard Python project with the following structure:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "code-review-ai-cli"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.2.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"
|