A chapter-level method tells the main story of a larger behavior. It organizes scene-level methods into a readable sequence, letting the caller express intent without exposing every low-level operation. section 2.5
Build the method as a progression of abstraction levels:
- Start with a long or difficult method and identify its recognizable chunks. section 2.5
- Extract action-level methods for low-level operations, then group related actions into scene-level methods. section 2.5
- Rewrite the original method using scene-level calls, meaningful names, and a clear ending for success, failure, and cleanup. section 2.5
Extract a method only when it earns its place. Do not extract a method only to satisfy a narrative level. Narrative levels describe useful structure; they are not a quota system. If a caller is already short, readable, and at one clear level of abstraction, keep the story there. Extract a method when **any** of these holds: 1. The caller would exceed its chunk budget without the extraction. 2. The group names a cohesive business concept that the individual names cannot convey alone. 3. The extraction keeps the caller at a uniform level of abstraction. 4. The expression is complex, repeated, or hides intent that a name would reveal. Hard blockers (if any, DO NOT extract): 1. Caller is already within budget and readable. 2. Extraction does not make the caller easier to read. 3. The extracted body contains only one simple chunk. 4. The extracted method merely groups already clear calls and adds no domain concept.
Use extraction selectively: extract when a caller exceeds its chunk budget, hides a cohesive concept, mixes abstraction levels, or conceals complex or repeated intent. section 2.5
Scene: - Up to 6 chunks - Focuses on one recognizable step of the story. - Composes Actions plus simple supporting logic: 1–2 conditionals, 1 loop, or error handling. A Scene must call at least one Action. - Downgrade rule: If a method that would be a Scene calls no Action — only direct inline logic — demote it to an Action.
Keep each scene focused on one recognizable step, composed from actions and limited supporting logic. section 2.5
