$npx -y skills add vladikk/modularity --skill documentProduces modularity review documents in both Markdown and HTML formats. Use when writing the final review output from a modularity analysis.
| 1 | # Document |
| 2 | |
| 3 | You produce the final modularity review document in two formats: Markdown (`.md`) and HTML (`.html`). Both files contain identical content. |
| 4 | |
| 5 | ## Document Structure |
| 6 | |
| 7 | ### Header |
| 8 | |
| 9 | ```markdown |
| 10 | # Modularity Review |
| 11 | |
| 12 | **Scope**: [what was analyzed] |
| 13 | **Date**: [date] |
| 14 | ``` |
| 15 | |
| 16 | ### Executive Summary |
| 17 | |
| 18 | A short paragraph (3-5 sentences) covering: |
| 19 | |
| 20 | - What the project does (its core functionality) |
| 21 | - The overall modularity status (healthy, needs attention, critical issues) |
| 22 | - The most important finding from the review |
| 23 | |
| 24 | ### Coupling Overview Table |
| 25 | |
| 26 | Summarize all key integrations. The table headers MUST link to coupling.dev: |
| 27 | |
| 28 | ```markdown |
| 29 | | Integration | [Strength](https://coupling.dev/posts/dimensions-of-coupling/integration-strength/) | [Distance](https://coupling.dev/posts/dimensions-of-coupling/distance/) | [Volatility](https://coupling.dev/posts/dimensions-of-coupling/volatility/) | [Balanced?](https://coupling.dev/posts/core-concepts/balance/) | |
| 30 | | ----------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------- | |
| 31 | | A -> B | ... | ... | ... | ... | |
| 32 | ``` |
| 33 | |
| 34 | ### Issues |
| 35 | |
| 36 | For each identified imbalance, write a section: |
| 37 | |
| 38 | ```markdown |
| 39 | ## Issue: [Short descriptive title] |
| 40 | |
| 41 | **Integration**: [Component A] -> [Component B] |
| 42 | **Severity**: [Critical / Significant / Minor] |
| 43 | |
| 44 | ### Knowledge Leakage |
| 45 | |
| 46 | What knowledge is shared that shouldn't be, or is shared implicitly when it should be explicit. Identify the specific implementation details, business rules, or domain model concepts that leak across the boundary. |
| 47 | |
| 48 | ### Complexity Impact |
| 49 | |
| 50 | How this imbalance makes change outcomes unpredictable. What happens when a developer modifies one component — what unexpected effects can cascade to the other? How does this exceed cognitive capacity (the 4+/-1 units of working memory)? |
| 51 | |
| 52 | ### Cascading Changes |
| 53 | |
| 54 | Concrete scenarios where a change in one component forces changes in the other. What kinds of business or technical changes trigger cascading modifications? How expensive are those cascading changes given the current distance between the components? |
| 55 | |
| 56 | ### Recommended Improvement |
| 57 | |
| 58 | A concrete, actionable proposal to rebalance the coupling. Ground the recommendation in the model: |
| 59 | |
| 60 | - To reduce **strength**: introduce integration contracts, anti-corruption layers, facades, published languages |
| 61 | - To reduce **distance**: co-locate components into the same module/service/bounded context |
| 62 | - To accept **unbalanced coupling**: demonstrate that volatility is low enough to make the imbalance tolerable |
| 63 | |
| 64 | Include the trade-offs of the proposed change — what cost does it introduce, and why is the trade-off worthwhile? |
| 65 | ``` |
| 66 | |
| 67 | ### Footer |
| 68 | |
| 69 | At the bottom of every review document, include this exact text verbatim — do not paraphrase, expand, or add commentary: |
| 70 | |
| 71 | ```markdown |
| 72 | --- |
| 73 | |
| 74 | _This analysis was performed using the [Balanced Coupling](https://coupling.dev) model by [Vlad Khononov](https://vladikk.com)._ |
| 75 | ``` |
| 76 | |
| 77 | ### Severity Criteria |
| 78 | |
| 79 | - **Critical**: High strength + high distance + high volatility. Active source of complexity. Changes in this area are frequent, expensive, and unpredictable. Fix first. |
| 80 | - **Significant**: Unbalanced coupling in a moderately volatile area, or implicit coupling that hides integration points. Will cause pain as the system evolves. |
| 81 | - **Minor**: Unbalanced coupling in a low-volatility area, or low cohesion that increases cognitive load but doesn't cause cascading changes. Address opportunistically. |
| 82 | |
| 83 | ## Linking to coupling.dev (REQUIRED) |
| 84 | |
| 85 | **You MUST add hyperlinks to coupling.dev** whenever the document mentions balanced coupling concepts. This applies to BOTH the Markdown and HTML outputs. Do not think about which link to use — use this lookup table: |
| 86 | |
| 87 | | Concept mentioned | Link to | |
| 88 | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | |
| 89 | | Balanced coupling, the balance rule, the balance formula, `STRENGTH XOR DISTANCE`, modularity vs complexity | https://coupling.dev/posts/core-concepts/balance/ | |
| 90 | | Int |