Skip to content

Commit 29c0392

Browse files
author
abacus_fixer
committed
docs(agents): add member-to-free-function refactoring pattern
Capture the incremental refactoring workflow validated in the DFTU occupancy-matrix refactor: inventory this-> reads, pass them as explicit parameters (const for config, reference for mutable state), move the function only when the body is this-free, keep a thin wrapper at the old entry point, and compile each step.
1 parent bfa9e14 commit 29c0392

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ rules. Read the complete governance document before making or reviewing changes:
8484
- Exceptions must be recorded in the PR with reason, scope, risk, and a follow-up
8585
cleanup plan.
8686

87+
## Refactoring Patterns
88+
89+
- Member -> free function: inventory `this->` reads; pass as params (const
90+
for config, ref for mutable state); move only when body is `this`-free;
91+
keep thin wrapper; compile each step.
92+
8793
## Local Commands
8894

8995
```bash

0 commit comments

Comments
 (0)