Skip to content

Refactor code review prompt into modular policy and output files#142

Merged
enko merged 1 commit intomainfrom
claude/split-review-prompt-zFkNA
Mar 21, 2026
Merged

Refactor code review prompt into modular policy and output files#142
enko merged 1 commit intomainfrom
claude/split-review-prompt-zFkNA

Conversation

@enko
Copy link
Copy Markdown
Member

@enko enko commented Mar 21, 2026

Summary

Split the monolithic code-review-prompt.md into three focused, composable files that are concatenated at runtime. This improves maintainability by separating concerns: orchestration logic, review policy, and output formatting.

Changes

  • Refactored code-review-prompt.md: Removed inline policy and output sections; now serves as the orchestration layer with references to the split files
  • Created code-review-policy.md: New file containing review standards, severity definitions, multi-pass analysis methodology, confidence thresholds, and deduplication algorithm
  • Created code-review-output.md: New file containing comment formatting requirements, summary template structure, review decision logic, and final checklist
  • Updated claude-code-review.yml: Modified workflow to concatenate all three prompt files into the REVIEW_PROMPT environment variable, preserving the complete review context

Implementation Details

  • The three files are concatenated in order (prompt → policy → output) during workflow execution, maintaining the logical flow of the review process
  • No functional changes to the review logic itself—this is purely a structural refactoring for better organization
  • Each file is self-contained with its own header and section markers for clarity
  • The workflow concatenation uses heredoc syntax to preserve formatting and avoid escaping issues

https://claude.ai/code/session_01Y4tzQdiagBngNn4Ty9926c

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 21, 2026

Automated Code Review | Commit: ee14428 | 2026-03-21T22:00:00Z | Status: Approved

Findings: Critical: 0 | Important: 0 | Suggestion: 0

AGENTS.md Compliance: TypeScript strict mode: N/A | No any types: N/A | Biome: N/A | Tests: N/A | Workflow syntax: OK | Concatenation order: OK

Summary: Clean structural refactoring splitting code-review-prompt.md into three focused files (orchestration, policy, output). Workflow correctly concatenates them in order. No functional changes to review logic; no security, correctness, or maintainability issues found.

Automated review by Claude Code - View CI Run

@enko enko force-pushed the claude/split-review-prompt-zFkNA branch from c5a3a30 to 11cd714 Compare March 21, 2026 21:54
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review complete. No issues found. This is a clean structural refactoring with no security, correctness, or maintainability concerns.

@enko enko merged commit e90de36 into main Mar 21, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.68.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants