Skip to content

chore(ci): add markdownlint pre-commit hook#124

Merged
Oddly merged 1 commit into
mainfrom
chore/markdownlint-pre-commit
Apr 11, 2026
Merged

chore(ci): add markdownlint pre-commit hook#124
Oddly merged 1 commit into
mainfrom
chore/markdownlint-pre-commit

Conversation

@Oddly
Copy link
Copy Markdown
Owner

@Oddly Oddly commented Apr 11, 2026

Adds markdownlint-cli2 as a pre-commit hook so the MD040/MD046 nits CodeRabbit kept catching on #123 get caught locally at commit time. Scope is narrowed to .github/prompts/**/*.md for now via .markdownlint-cli2.yaml — the docs/, plugins/, and tests/ trees have 24 pre-existing findings of the same kind that belong in a separate cleanup PR. The hook is glob-driven (pass_filenames: false) so the scope is the same whether pre-commit invokes it or someone runs it by hand.

While here, fixes the two MD046 violations in the base triage.md (severity and category token blocks were indented, now fenced as text) and tightens one ambiguous reference in triage-distillery.md to "the four triage sections" — now spells out which four follow KB analysis.

This is the followup to #123 that came out of the round-by-round CodeRabbit loop on that PR. The bigger systemic fix lives in ~/.claude/CLAUDE.md (out of repo): a new "Code Review Feedback" section instructs Claude to grep for sibling instances of any reviewer-flagged issue before pushing the fix.

Summary by CodeRabbit

  • Chores

    • Added markdown linting configuration to enforce consistent code block formatting in documentation.
    • Integrated automated markdown validation through pre-commit hooks for improved documentation quality.
  • Documentation

    • Enhanced triage documentation with clarified section requirements and strengthened citation rules for better consistency.

Add markdownlint-cli2 as a pre-commit hook so the same MD040/MD046 nits
coderabbit has been catching on this PR get caught locally at commit
time. Scope is narrowed to .github/prompts/**/*.md for now via
.markdownlint-cli2.yaml — the docs/, plugins/, and tests/ trees have
24 pre-existing findings that belong to a separate cleanup PR. The
hook is glob-driven (pass_filenames: false) so the scope is consistent
whether pre-commit invokes it or someone runs it by hand.

While here, fix the two MD046 violations in the base triage.md prompt
(severity and category token blocks were indented, now fenced as text)
and one ambiguous reference in triage-distillery.md to "the four
triage sections" (now spells out which four follow KB analysis).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e4c13f6d-f121-4eff-841e-7adcb5c4150f

📥 Commits

Reviewing files that changed from the base of the PR and between a963b49 and 5e0ebe4.

📒 Files selected for processing (4)
  • .github/prompts/triage-distillery.md
  • .github/prompts/triage.md
  • .markdownlint-cli2.yaml
  • .pre-commit-config.yaml

📝 Walkthrough

Walkthrough

These changes update triage prompt documentation to enforce stricter citation requirements and add markdown linting configuration to validate prompt formatting. New markdownlint and pre-commit hook configuration files enforce code block formatting rules on prompt files in .github/prompts/.

Changes

Cohort / File(s) Summary
Prompt Documentation Updates
.github/prompts/triage-distillery.md, .github/prompts/triage.md
Updated triage prompt instructions: triage-distillery.md clarified output-contract requirements to explicitly name the four triage sections and enforce citation matching rules; triage.md changed severity/category formatting from inline backticked tokens to fenced code blocks labeled text.
Markdown Linting Configuration
.markdownlint-cli2.yaml, .pre-commit-config.yaml
Added new markdownlint-cli2 configuration file that selectively enables MD040 and MD046 rules scoped to .github/prompts/**/*.md files. Integrated markdownlint-cli2 v0.22.0 as a pre-commit hook with pass_filenames: false to align execution scope.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a markdownlint pre-commit hook to the CI configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/markdownlint-pre-commit

Comment @coderabbitai help to get the list of available commands and usage tips.

@Oddly Oddly merged commit 3bef767 into main Apr 11, 2026
11 checks passed
@Oddly Oddly deleted the chore/markdownlint-pre-commit branch April 11, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant