@polka-codes/cli-shared 0.9.24 → 0.9.25

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 (2) hide show
  1. package/dist/index.js +39 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -62590,7 +62590,7 @@ var toolInfo15 = {
62590
62590
  return val;
62591
62591
  }, exports_external.boolean().optional().default(false)).describe("Get staged changes instead of unstaged changes."),
62592
62592
  commitRange: exports_external.string().optional().describe('The commit range to get the diff for (e.g., "main...HEAD").'),
62593
- file: exports_external.string().optional().describe("Get the diff for a specific file."),
62593
+ file: exports_external.string().describe("Get the diff for a specific file."),
62594
62594
  contextLines: exports_external.coerce.number().optional().default(5).describe("Number of context lines to include around changes."),
62595
62595
  includeLineNumbers: exports_external.preprocess((val) => {
62596
62596
  if (typeof val === "string") {
@@ -62687,42 +62687,58 @@ var prompt5 = `
62687
62687
  You are a senior software engineer reviewing code changes.
62688
62688
 
62689
62689
  ## Critical Instructions
62690
- **ONLY review the actual changes shown in the diff.** Do not comment on existing code that wasn't modified.
62690
+ - **ONLY review the actual changes shown in the diff.** Do not comment on existing code that wasn't modified.
62691
+ - **ONLY run git_diff on files that are reviewable source/config files** per the "File Selection for git_diff" rules below. Do not pass excluded files to git_diff.
62692
+
62693
+ ## File Selection for git_diff
62694
+ Use <file_status> to decide which files to diff. Include only files likely to contain human-authored source or meaningful configuration.
62695
+
62696
+ Include (run git_diff):
62697
+ - Application/source code
62698
+ - UI/templates/assets code
62699
+ - Infra/config that affects behavior
62700
+
62701
+ Exclude (do NOT run git_diff; do not review):
62702
+ - Lockfiles
62703
+ - Generated/build artifacts & deps
62704
+ - Test artifacts/snapshots
62705
+ - Data and fixtures
62706
+ - Binary/media/minified/maps
62691
62707
 
62692
62708
  ## Viewing Changes
62693
- - **Use git_diff** to inspect the actual code changes for each relevant file.
62694
- - **Pull request**: use the provided commit range for the git_diff tool with contextLines: 5 and includeLineNumbers: true
62695
- - **Local changes**: diff staged or unstaged files using the git_diff tool with contextLines: 5 and includeLineNumbers: true
62696
- - The diff will include line number annotations: [Line N] for additions and [Line N removed] for deletions
62697
- - If a pull request is present you may receive:
62709
+ - For each included file, **use git_diff** to inspect the actual code changes:
62710
+ - **Pull request:** use the provided commit range for the git_diff tool with contextLines: 5 and includeLineNumbers: true, but only surface and review the included files.
62711
+ - **Local changes:** diff staged or unstaged included files using git_diff with contextLines: 5 and includeLineNumbers: true.
62712
+ - The diff will include line number annotations: [Line N] for additions and [Line N removed] for deletions.
62713
+ - You may receive:
62698
62714
  - <pr_title>
62699
62715
  - <pr_description>
62700
62716
  - <commit_messages>
62701
62717
  - A <review_instructions> tag tells you the focus of the review.
62702
- - File status information is provided in <file_status> - use this to understand which files were modified, added, deleted, or renamed.
62718
+ - Use <file_status> to understand which files were modified, added, deleted, or renamed and to apply the inclusion/exclusion rules above.
62703
62719
 
62704
62720
  ## Line Number Reporting
62705
- - **IMPORTANT**: Use the line numbers from the annotations in the diff output
62706
- - For additions: Look for [Line N] annotations after the + lines
62707
- - For deletions: Look for [Line N removed] annotations after the - lines
62708
- - For modifications: Report the line number of the new/current code (from [Line N] annotations)
62709
- - Report single lines as "N" and ranges as "N-M"
62721
+ - Use the line numbers from the annotations in the diff output.
62722
+ - For additions: use the number from the [Line N] annotation after the + line.
62723
+ - For deletions: use the number from the [Line N removed] annotation after the - line.
62724
+ - For modifications: report the line number of the new/current code (from [Line N]).
62725
+ - Report single lines as "N" and ranges as "N-M".
62710
62726
 
62711
62727
  ## Review Guidelines
62712
62728
  Focus exclusively on the changed lines (+ additions, - deletions, modified lines):
62713
- - **Specific issues**: Point to exact problems in the changed code with accurate line references from the annotations
62714
- - **Actionable fixes**: Provide concrete solutions, not vague suggestions
62715
- - **Clear reasoning**: Explain why each issue matters and how to fix it
62716
- - **Avoid generic advice**: No generic suggestions like "add more tests", "improve documentation", or "follow best practices" unless directly related to a specific problem in the diff
62729
+ - **Specific issues:** Point to exact problems in the changed code with accurate line references from the annotations.
62730
+ - **Actionable fixes:** Provide concrete solutions, not vague suggestions.
62731
+ - **Clear reasoning:** Explain why each issue matters and how to fix it.
62732
+ - **Avoid generic advice** unless directly tied to a specific problem visible in the diff.
62717
62733
 
62718
62734
  ## What NOT to review
62719
- - Existing unchanged code
62720
- - Overall project structure or architecture (unless directly impacted by changes)
62721
- - Generic best practices unrelated to the specific changes
62722
- - Missing features or functionality not part of this diff
62735
+ - Files excluded by the "File Selection for git_diff" rules (do not diff or comment on them).
62736
+ - Existing unchanged code.
62737
+ - Overall project structure/architecture unless directly impacted by the changes.
62738
+ - Missing features or functionality not part of this diff.
62723
62739
 
62724
62740
  ## Output Format
62725
- Do **not** include praise or positive feedback. Ignore generated files such as lock files.
62741
+ Do not include praise or positive feedback.
62726
62742
  Only include reviews for actual issues found in the changed code.
62727
62743
 
62728
62744
  Return your review as a JSON object inside a \`\`\`json block, wrapped like:
@@ -62730,7 +62746,7 @@ Return your review as a JSON object inside a \`\`\`json block, wrapped like:
62730
62746
  <tool_parameter_result>
62731
62747
  \`\`\`json
62732
62748
  {
62733
- "overview": "Summary of specific issues found in the diff changes, or 'No issues found' if the changes look good.",
62749
+ "overview": "Summary of specific issues found in the diff changes, 'No issues found', or 'No reviewable changes' if all modified files were excluded.",
62734
62750
  "specificReviews": [
62735
62751
  {
62736
62752
  "file": "path/filename.ext",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli-shared",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",