Repository navigation
Adopt the shared agent docs and Claude Code guard hooks - #887
Merged
Merged
Conversation
The Claude Code hooks are standalone scripts that share a helper module. The directory is deliberately not a package, the same way the other namespace directories listed here are not. Assisted-by: LLM
`flake8-typing-as-t` already makes `typing` imported as `_t`, but only stub files used it so far, where WPS checks are off. The Claude Code hooks coming next use it in regular modules, so wemake's `allowed-domain-names` now accepts `_t` and `_c` as legitimate short module aliases, like in ansible/pylibssh. Assisted-by: LLM
AGENTS.md, CLAUDE.md and the shared .agents-ctx/ docs are copied unchanged from ansible/pylibssh as of 5ff33f5d, so the next commit shows exactly what differs here. The pylibssh-only CYTHON_AND_LIBSSH.md is left out. Assisted-by: LLM
The shared text stays as in ansible/pylibssh. Only the "Here:" paragraphs, which state this project's facts, are rewritten, along with the per-project NAMING_THE_DUCKS.md and WHERE_TO_LOOK_FIRST.md, and the operator-local context files CLAUDE.md loads. Where Cheroot differs from a shared rule -- the test suite shipped as `cheroot.test` with `test_*.py` names, the types kept in `.pyi` stubs, or tests patching internals -- the paragraph says so instead of describing pylibssh's setup. Assisted-by: LLM
The agent docs make silencing checks and changing license terms the operator's decision. These PreToolUse hooks, copied unchanged from ansible/pylibssh as of 5ff33f5d, make Claude Code ask the operator before edits or commands that look like either. Assisted-by: LLM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 75.99% 76.07% +0.08%
==========================================
Files 41 41
Lines 4932 4932
Branches 561 561
==========================================
+ Hits 3748 3752 +4
+ Misses 1045 1041 -4
Partials 139 139 |
Assisted-by: LLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
What do these changes do?
This brings over the agent context shared with ansible/pylibssh and other projects: the
AGENTS.md/CLAUDE.mdentry points, the.agents-ctx/house rules, and two Claude CodePreToolUsehooks that make the agent ask before silencing checks or changing license terms. The shared docs are imported unchanged from ansible/pylibssh@5ff33f5d first, so the next commit shows exactly what differs here.Two tool-config commits come first, so the imported files pass this repository's linters: ruff treats
.claude/hooks/as a namespace directory, and wemake accepts the_ttyping alias thatflake8-typing-as-talready enforces.Are there changes in behavior for the user?
No. Only contributors working with coding agents are affected.
Is it a substantial burden for the maintainers to support this?
The shared text is maintained in ansible/pylibssh and synced from there. Only the "Here:" paragraphs,
NAMING_THE_DUCKS.mdandWHERE_TO_LOOK_FIRST.mdare specific to Cheroot, and they need updating when the project's setup changes.Related issue number
None.
Checklist
Tip
New to open source contributions? Making a lovely PR is a great read.
and description in grammatically correct, complete sentences
docs/) and inline docstrings reflect the changes(see good commit messages)
(can be done once the PR number is known; alternatively, you can
use a related issue number if one exists)
code of conduct
🤖 Produced by a probabilistic agent with a token generator using an LLM to sound convincing.