add no-ai-marks to the git framework preset - #51
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the Git framework preset by adding the experimental no-ai-marks hooks for commit messages and staged changes, while also applying the requested autoupdate revisions to three existing hooks. Flow diagram for no-ai-marks Git checksflowchart LR
CommitMsg["Commit message"] --> CommitHook["no-ai-marks-commit-msg"]
StagedChanges["Staged changes"] --> StagedHook["no-ai-marks-staged"]
CommitHook --> Decision{Allowed content?}
StagedHook --> Decision
Decision -->|yes| Proceed["Allow commit"]
Decision -->|no| Reject["Reject commit"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
PR Summary by QodoAdd no-ai-marks hooks to the Git framework preset
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: Customizable Safeguards
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
LlamaPReview — No blocking issues found
A data-only commit adds the opt-in mishan/no-ai-marks preset entry (both hooks category: experimental, both described) to framework/git/preset.yaml, so default users' generated configs only pick up the standard revision bumps from this repo's autoupdate.
Review details and evidence
Material unknowns
- Upstream existence of
mishan/no-ai-marks@v0.1.1and of the two hook idsno-ai-marks-commit-msgandno-ai-marks-stagedat that tag. If either were wrong, only users who pass--profile experimentalwould be affected, and their generated config would fail when pre-commit clones or instantiates the repo. Deep stated this does not decide the objective, so it stays nonblocking.- Check: Confirm the upstream
.pre-commit-hooks.yamlatv0.1.1declares the two hook ids used by this preset entry.
- Check: Confirm the upstream
- Whether any repository test pins the old preset revisions (
v2.15.0,v4.17.0,v1.29.0) in generated-output assertions. Would change confidence in the bundled revision bumps, not the objective or the merge posture.- Check: Skim
tests/integration/test_cli_generation.pyandtests/unit/test_generator.pyfor hardcoded preset revisions.
- Check: Skim
LlamaPReview checks
- Inspected matching PR-head repository snippets in
CONTEXT.md,CONTRIBUTING.md,gpc_init/merger.pyand 2 more path(s). - Inspected bounded directory inventory under
tests/conftest.py,tests/fixtures,tests/fixtures/frameworkand 9 more path(s). - Read the complete PR-head file
.github/workflows/validate-presets.yml. - Read bounded PR-head context from
gpc_init/loader.py. - Inspected matching PR-head repository snippets in
CONTEXT.md,README.md,CONTRIBUTING.mdand 2 more path(s). - Read bounded PR-head context from
tests/unit/test_catalog.py.
LlamaPReview is an open-source pull request reviewer. Tell the maintainers where this review got it wrong.
Description
Adds no-ai-marks to
framework/git/preset.yaml, next to gitlint and commitizen. It has two hooks:no-ai-marks-commit-msg(commit-msg stage) rejects AI attribution (Co-authored-by/Assisted-by trailers crediting AI tools, "Generated with ..." footers) and hidden Unicode (zero-width, bidi, tag characters) in commit messages, andno-ai-marks-stagedchecks the lines being committed for the same. It's for projects whose contribution policy doesn't allow AI attribution.language: python, standard library only, MIT.Both hooks are
category: experimentalsince the project is new.Running
autoupdateas the checklist asks also bumped three existing hooks in this preset: commit-check v2.15.0 -> v2.17.0, commitizen v4.17.0 -> v4.18.0, and zizmor-pre-commit v1.29.0 -> v1.30.1. I left those in; happy to drop them if you'd rather keep this PR to the one addition.Disclosure: I'm the author.
Pre-submission checklist
Preset contributions
Run the following commands against the preset file and confirm each passes.
pre-commit validate-config <preset-file>passes without errorsprek validate-config <preset-file>passes without errorspre-commit autoupdate -c <preset-file>was run and hook revisions are up to dateprek autoupdate -c <preset-file>was run and hook revisions are up to datedescriptionfieldCode contributions
Not applicable, no changes to
gpc_init/ortests/.Summary by Sourcery
Add experimental checks for AI attribution and hidden characters while refreshing the Git preset’s existing hook versions.
New Features:
Enhancements: