pull-complexity-down
/pull-complexity-down
Sprawdza, czy złożoność spada na wywołujących, czy jest wchłaniana przez implementację, i wskazuje, gdzie powinna zostać.
- Autor
- codybrom ↗
- Repozytorium
- clairvoyance ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 07.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 07.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Sprawdza, czy złożoność spada na wywołujących, czy jest wchłaniana przez implementację, i wskazuje, gdzie powinna zostać.
Argumenty
/pull-complexity-down [file or module path]
Oryginalny opis (EN)
Checks whether complexity is pushed to callers or absorbed by implementations — the direction complexity flows. Use when callers must do significant setup, handle errors the module could resolve, or configure things they don't understand. Not for module depth (use deep-modules), knowledge leakage (use information-hiding), or exception strategy once an error must surface (use error-design).
Jak działa
- When to Apply
- Core Principles
- Review Process
- References
Podgląd SKILL.md
--- name: pull-complexity-down description: "Checks whether complexity is pushed to callers or absorbed by implementations — the direction complexity flows. Use when callers must do significant setup, handle errors the module could resolve, or configure things they don't understand. Not for module depth (use deep-modules), knowledge leakage (use information-hiding), or exception strategy once an error must surface (use error-design)." argument-hint: "[file or module path]" allowed-tools: Read, Grep --- # Pull Complexity Downwards Review Lens When invoked with $ARGUMENTS, focus the analysis on the specified file or module. Read the target code first, then apply the checks below. Evaluate whether complexity is absorbed into implementations or pushed up to callers. ## When to Apply - Designing or reviewing a module's interface - When callers must do significant setup or configuration - When callers handle errors or edge cases the module could handle internally - When configuration parameters are being added to an API - When evaluating decorator or wrapper patterns ## Core Principles ### The Core Asymmetry **One implementer, many callers. Complexity in the implementation is paid once. Complexity in the interface is paid by every caller.** (The same asymmetry underlies **deep-modules**' "Depth Principle" — applied there to overall interface depth, applied here to which side of the interface should absorb a given piece of complexity.) When developers encounter a hard problem, the path of least resistance is to push it upward: throw an exception, add a configuration parameter, define an abstract policy. These moves feel like good engineering. But all you have done is distribute the decision to a larger number of people who typically have less context. ### Configuration Parameter Test - The Three AND Conditions **Configuration parameters are not a feature. They are a symptom of an incomplete module.** Every parameter exported is a decision the developer chose not to make. 1. Different callers genuinely need different values, AND 2. The correct value cannot be determined automatically, AND 3. The impact is significant enough to justify the interface cost If any condition fails: - All callers use the same value → make it a constant - The module can compute a good value → compute it dynamically - The impact is negligible → pick a sensible default Even for legitimate parameters, provide reasonable defaults so users only need to provide values under exceptional conditions. **Dynamic computation beats static configuration.** A network protocol that measures response times and computes retry intervals automatically is superior to one that exports a retry-interval parameter: better accuracy, adapts to conditions, and the parameter disappears from the interface entirely. When uncertain about a decision, making it configurable feels responsible but that is avoidance dressed as engineering. Configuration parameters and thrown exceptions share the same impulse because both inflict complexity on callers. ### Three AND Conditions: When NOT to Pull Down Pulling complexity down has a limit. Adding a `backspace(cursor)` method to a text class appears to absorb UI complexity, but the text class has nothing to do with the backspace key. That is UI knowledge forced into the wrong module, which is information leakage masquerading as good design. **All Three Must Hold:** 1. The complexity is closely related to the module's existing functionality 2. Pulling it down simplifies the rest of the application 3. Pulling it down simplifies the module's interface Failing any single one means the complexity belongs somewhere else. ### Related Techniques _Context objects_ and _decorator alternatives_ are tools for pulling complexity down. Both are detailed in **deep-modules**: context objects solve pass-through variables. Decorator alternatives prevent shallow wrapper layers. ## Review Process 1. **Inventory interface elements**: List every parameter, exception, and constraint callers must handle 2. **Apply the core asymmetry**: For each: could the module handle this internally? 3. **Test configuration parameters**: Does each pass the three AND conditions? 4. **Check for dynamic alternatives**: Could any static configuration be computed from internal measurements? 5. **Evaluate decorators**: Shallow pass-through layer, or genuine abstraction? 6. **Recommend simplification**: Propose specific interface reductions Red flag signals for complexity direction are cataloged in **red-flags** (Overexposure). ## References For deeper coverage, read the following: - [Configuration parameter audit](references/configuration-parameter-audit.md): Patterns for recognizing and eliminating unnecessary config parameters
Pliki w paczce (2)
- SKILL.md 5 KB
- references/configuration-parameter-audit.md 4 KB
Wersje
W bazie nie ma innych skilli o nazwie pull-complexity-down.
Migawka bazy z 13.11.2026 · wersja paczki 21399266bc7f (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90error-design
Przegląda obsługę błędów i wyjątków, stosując zasadę usuwania błędów przez projekt, tak by wywołujący nie musieli o nich wiedzieć. - 100software-design-complexity
Ogranicza złożoność kodu przez głębokie moduły i ukrywanie informacji, gdy API albo klasa stają się zbyt rozbudowane. - 95software-design-philosophy
Ocenia projekt oprogramowania wg Ousterhouta: głębokość modułów, interfejsy, złożoność, nazewnictwo i obsługę błędów. - 90design-deep-modules
Ocenia głębokość interfejsu, w którym głębokie moduły chowają złożoność za małym interfejsem, przy projektowaniu modułu lub API i redukcji złożoności. - 100software-design-philosophy
Ogranicza złożoność oprogramowania przez głębokie moduły, ukrywanie informacji i programowanie strategiczne, przy projektowaniu modułów, przeglądzie interfejsów i upraszczaniu przeprojektowanego kodu. - 90complexity-recognition
Diagnozuje, czy złożoność kodu istnieje i skąd się bierze, gdy trudno wskazać konkretny problem.