Skip to content

fix: enforce Markdown formatting in code review summary comments#139

Merged
enko merged 2 commits intomainfrom
claude/fix-review-formatting-SoZ9G
Mar 17, 2026
Merged

fix: enforce Markdown formatting in code review summary comments#139
enko merged 2 commits intomainfrom
claude/fix-review-formatting-SoZ9G

Conversation

@enko
Copy link
Copy Markdown
Member

@enko enko commented Mar 17, 2026

The review prompt's summary template was treated as optional guidance,
causing the model to flatten reviews into single-line pipe-delimited
text. Fix by:

  • Adding a CRITICAL formatting constraint at the top of the prompt
  • Replacing vague placeholder approach with a concrete temp-file-based
    script that preserves multi-line Markdown
  • Adding a final checklist to verify formatting before finishing
  • Adding an anti-pattern entry for flattened summaries

https://claude.ai/code/session_01HpnShWs5di3uhcDhkXncGr

The review prompt's summary template was treated as optional guidance,
causing the model to flatten reviews into single-line pipe-delimited
text. Fix by:

- Adding a CRITICAL formatting constraint at the top of the prompt
- Replacing vague placeholder approach with a concrete temp-file-based
  script that preserves multi-line Markdown
- Adding a final checklist to verify formatting before finishing
- Adding an anti-pattern entry for flattened summaries

https://claude.ai/code/session_01HpnShWs5di3uhcDhkXncGr
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

Automated Code Review. Commit: 4917787. Status: Approved. Findings: 0 Critical, 0 Important, 0 Suggestion. AGENTS.md Compliance: TypeScript strict mode N/A, no any types N/A, Biome linting N/A, all tests N/A, no secrets introduced. Summary: This PR fixes the code review summary being flattened into single-line text. The CRITICAL callout block, temp-file-based script pattern, and Final Checklist address the root cause. The removal of AGENTS.md examples and unused language rows keeps the prompt focused on this project. No issues found. CI Run: https://github.com/datenknoten/freundebuch/actions/runs/23204585884

- Fix broken nested code fences in Comment Format section (``` inside ```)
  by using ~~~ for the outer fence
- Make AGENTS.md Compliance section dynamic: replace hardcoded generic
  placeholders with instruction to derive items from actual AGENTS.md
- Remove ~55 lines of hypothetical AGENTS.md examples (Security-Focused,
  Performance-Critical, API Project) that added noise without value
- Trim Language-Specific Focus table to TypeScript/JS and SQL only
  (the only languages in this project)
- Remove duplicate PR_NUMBER and CI_RUN_URL definitions from Execution
  Context (already defined in Phase 1.1)
- Make summary posting consistently file-based: use jq to build JSON
  payload from temp file for both create and update paths, avoiding
  shell escaping issues with $(cat ...) subshells

https://claude.ai/code/session_01HpnShWs5di3uhcDhkXncGr
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 passed. No issues found. This PR correctly addresses the root cause of flattened review summaries by adding an upfront CRITICAL formatting constraint, switching to a temp-file-based heredoc approach, and adding a Final Checklist. No correctness, security, or quality issues found.

@enko enko merged commit f7823fc into main Mar 17, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.67.6 🎉

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