docs: infer and codify development conventions from codebase#40
Closed
Copilot wants to merge 1 commit intorewrite-v2from
Closed
docs: infer and codify development conventions from codebase#40Copilot wants to merge 1 commit intorewrite-v2from
Copilot wants to merge 1 commit intorewrite-v2from
Conversation
Copilot
AI
changed the title
[WIP] Rewrite entire Telegram bot codebase from scratch
docs: infer and codify development conventions from codebase
Feb 22, 2026
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.
@MattiaFailla requested a structured, enforceable rule set inferred from the current branch to guide automated code generation and human contributors alike.
Conventions documented (as a PR comment)
ruff ≥ 0.8, Python 3.14+,T | Noneunion syntax, double quotes, mandatory module docstrings, standard import groupingUPPER_CASEstring constants,create_<feature>_handlersfactories,_handle_<action>private handlers,PascalCaseclasses,_-prefixed private helpershandlers→services→db),AsyncRepositoryabstract base withInMemory/Postgresimplementations, closure-based handler injection, all user-facing strings centralized instrings.py, services wired throughbot_data(no global singletons)pytest ≥ 8.0,InMemoryRepositoryfor all unit tests (no live DB), per-test instance isolation,@pytest.mark.asynciofor coroutinesOptional[T]/Union[A, B]old-style syntax, no module-level mutable state, no bareexcept:outside Telegram API call sitesNo source files were modified; the rule set was delivered as a reply to the review comment.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.