Skip to content

Update prek hook skill to emphasize generalization over project-specific logic#1752

Merged
nathanjmcdougall merged 2 commits intomainfrom
copilot/generalize-hooks-logic
Apr 1, 2026
Merged

Update prek hook skill to emphasize generalization over project-specific logic#1752
nathanjmcdougall merged 2 commits intomainfrom
copilot/generalize-hooks-logic

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

PR #1624 review feedback identified that agents were hard-coding project-specific logic (custom headers, package names) into bespoke hooks. The root cause: the usethis-prek-hook-bespoke-create skill itself described hooks as "project-specific" and gave no guidance on generalization.

  • Skill description: Changed from "project-specific checks" → "reusable Python scripts for custom checks"
  • New "Generalization" section: Concrete do/don't guidance — no hard-coded names, paths, or section headers in hook scripts; all project-specific config belongs in .pre-commit-config.yaml args
  • Procedure step added: "Keep the hook generalized and reusable" now precedes wiring
  • Version bump: 1.0 → 1.1
  • Auto-synced: AGENTS.md and docs/skills-directory.txt updated via export hooks

…fic logic

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/bb0660e8-d117-4a02-b353-54ef7ecd96fd

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor agents to generalize hook logic and remove hard-coded headers Update prek hook skill to emphasize generalization over project-specific logic Apr 1, 2026
Copilot AI requested a review from nathanjmcdougall April 1, 2026 21:23
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review April 1, 2026 21:53
@nathanjmcdougall nathanjmcdougall merged commit 9a71e69 into main Apr 1, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/generalize-hooks-logic branch April 1, 2026 21:55
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.

Config agents that hooks should be generalized

2 participants