feat(style): Add anti-OOP conventions and OOP refactoring tracker
- Add section 10 (Anti-OOP Conventions) to python.md with hard rules, class justification requirements, and Strangler Fig refactoring pattern - Create conductor/refactor_oop.md tracker with 4 phases for class elimination - Add ruff PLR rules (PLR0912, PLR6301, PLR0206) to pyproject.toml for OOP anti-patterns Addresses AI agent scope misinterpretation issues by enforcing flat function-call graphs over deep class hierarchies.
This commit is contained in:
+5
-1
@@ -53,7 +53,8 @@ exclude = [
|
||||
|
||||
[tool.ruff.lint]
|
||||
# Enable McCabe complexity check for nesting depth enforcement
|
||||
select = ["E", "F", "W", "C90", "C4"]
|
||||
# PLR = complexity rules for methods/functions
|
||||
select = ["E", "F", "W", "C90", "C4", "PLR0912", "PLR6301", "PLR0206"]
|
||||
|
||||
# Ignore style choices that conflict with project's compact style
|
||||
ignore = [
|
||||
@@ -65,6 +66,9 @@ ignore = [
|
||||
"W293", # Blank line contains whitespace
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["PLR"] # Allow init to export classes
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
max-complexity = 5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user