Private
Public Access
feat(directives): add rule-statement header to 33-40 of 66 v1.md files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# State-independent logic must be moved to module-level functions (avoid god-object controllers)
|
||||
|
||||
From `conductor/product-guidelines.md` §"Code Standards & Architecture":
|
||||
- **Modular Controller Pattern:** To prevent "God Object" bloat in core controllers (like `AppController`), all state-independent or utility logic must be moved to module-level functions. Functions requiring class state should accept the instance as an explicit dependency (`def logic(controller: AppController, ...)`). Massive `if/elif` dispatch blocks must be refactored into handler maps (dictionaries) of module-level functions.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user