Skip to content

Adopt the shared agent docs and Claude Code guard hooks - #887

Merged
webknjaz merged 6 commits into
cherrypy:mainfrom
webknjaz:maintenance/agents-ctx
Nov 14, 2026
Merged

webknjaz merged 6 commits into
cherrypy:mainfrom
webknjaz:maintenance/agents-ctx

Conversation

@webknjaz

@webknjaz webknjaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • 📋 docs update
  • 📋 tests/coverage improvement
  • 📋 refactoring
  • 💥 other

What do these changes do?

This brings over the agent context shared with ansible/pylibssh and other projects: the AGENTS.md/CLAUDE.md entry points, the .agents-ctx/ house rules, and two Claude Code PreToolUse hooks 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 _t typing alias that flake8-typing-as-t already 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.md and WHERE_TO_LOOK_FIRST.md are 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.

  • I wrote descriptive pull request text above
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences
  • I think the code is well written
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Project documentation (in docs/) and inline docstrings reflect the changes
  • My commits each have a descriptive title and a body explaining the why
    (see good commit messages)
  • I have added a change log entry
    (can be done once the PR number is known; alternatively, you can
    use a related issue number if one exists)
  • I'm planning to squash related commits together before final merge
  • I have read the contribution guide and the
    code of conduct

🤖 Produced by a probabilistic agent with a token generator using an LLM to sound convincing.

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
@read-the-docs-community

read-the-docs-community Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cheroot | 🛠️ Build #35896210 | 📁 Comparing 680a34e against latest (47a373f)

  🔍 Preview build  

2 files changed
± history/index.html
± pkg/cheroot.server/index.html

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.07%. Comparing base (47a373f) to head (680a34e).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

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              

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided A mark meaning that a new change log entry is present within the patch. label Nov 14, 2026
@webknjaz
webknjaz merged commit 83d4219 into cherrypy:main Nov 14, 2026
76 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided A mark meaning that a new change log entry is present within the patch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant