Skip to content

feat(template): add community-health files and harden generated-project prek - #54

Merged
hasansezertasan merged 2 commits into
mainfrom
feat/darkened-tumble
Jul 6, 2026
Merged

feat(template): add community-health files and harden generated-project prek#54
hasansezertasan merged 2 commits into
mainfrom
feat/darkened-tumble

Conversation

@hasansezertasan

Copy link
Copy Markdown
Owner

Summary

Adds five always-on best-practice files to generated projects and fixes a pre-existing defect where a freshly scaffolded project failed prek run --all-files out of the box.

New files (feat)

  • .gitattributes — LF normalization, Linguist overrides, export-ignore
  • SUPPORT.md — community-health "where to get help" file
  • AGENTS.md + CLAUDE.md pointer — AI-agent onboarding (single source of truth)
  • scorecard.yml — OpenSSF Scorecard + README badge
  • dependency-review.yml — blocks PRs introducing high-severity CVEs

prek hardening (fix)

Root cause: auto-fixing hooks raced on a freshly-rendered dirty tree and corrupted files. Fixed by making the template emit byte-perfect output so every fixer is a no-op:

  • Jinja whitespace control in pyproject.toml, README.md, mise.toml, docs/usage.rst
  • workflow YAML blank-line/indentation/document-start fixes (ci, release-please, issue-manager)
  • markdown fixes (CONTRIBUTING, CODE_OF_CONDUCT, bug_report, enhancement)
  • scoped the prek mypy hook to src/ and mirrored all enabled component deps (pydantic-settings, faststream[<broker>], litestar, mcp)
  • ruff-formatted component sources (worker, mcp/web/worker tests)

Test plan

  • tox -e style passes (all-off example)
  • prek run --all-files green across all-off, FastAPI/Redis, Litestar/RabbitMQ, Kafka, NATS
  • pytest hook passes in every render (formatting-only changes)

🤖 Generated with Claude Code

…ct prek

Add always-on best-practice files to generated projects:
- .gitattributes (LF normalization, Linguist overrides, export-ignore)
- SUPPORT.md community-health file
- AGENTS.md + CLAUDE.md pointer for AI coding agents
- OpenSSF Scorecard workflow + README badge
- dependency-review workflow (fails PRs on high-severity CVEs)

Fix pre-existing prek failures so a freshly scaffolded project passes
`prek run --all-files` cleanly across all component/framework/broker
combinations (previously the generated hooks CI job was red out of the box).
Root cause: auto-fixing hooks raced on a freshly-rendered dirty tree and
corrupted files, so the template now emits byte-perfect output:
- Jinja whitespace control in pyproject.toml, README.md, mise.toml, and
  docs/usage.rst so disabled components leave no trailing whitespace or
  blank-line runs
- workflow YAML blank-line/indentation/document-start fixes
- markdown fixes in CONTRIBUTING, CODE_OF_CONDUCT, bug_report, enhancement
- scope the prek mypy hook to src/ and mirror all enabled component deps
- ruff-format component sources (worker, mcp/web/worker tests)

Verified with tox -e style and prek across all-off, FastAPI/Redis,
Litestar/RabbitMQ, Kafka, and NATS renders.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @hasansezertasan, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00d736841c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread template/prek.toml.jinja
Move `*.svg text` out of the "Explicit binaries" block into its own
commented section — SVG is XML and is intentionally kept as text so it
normalizes and diffs line-by-line, which contradicted the surrounding
"never diff as text" header.
@hasansezertasan
hasansezertasan merged commit 4c5c0e9 into main Jul 6, 2026
10 checks passed
@hasansezertasan
hasansezertasan deleted the feat/darkened-tumble branch July 6, 2026 12:31
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