Home / Market / architecture-paradigm-modular-monolith

architecture-paradigm-modular-monolith

Modular monolith with enforced internal boundaries. Use for service-level autonomy without a distributed system

skill★ 00 dlclawhubMIT-0Install in CosmosUpstream Source

Documentation & Preview

--- name: architecture-paradigm-modular-monolith description: | Modular monolith with enforced internal boundaries. Use for service-level autonomy without a distributed system version: 1.10.3 triggers:

metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/archetypes", "emoji": "\ud83c\udfd7\ufe0f"}} source: claude-night-market source_plugin: archetypes

---

> Night Market Skill: ported from claude-night-market/archetypes. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

The Modular Monolith Paradigm

When To Use

When NOT To Use

When to Employ This Paradigm

Adoption Steps

  1. Identify Modules: Define module boundaries that align with distinct business capabilities or Bounded Contexts from Domain-Driven Design.
  2. Encapsulate Internals: Use language-level visibility modifiers (e.g., public/private), separate packages, or namespaces to hide the implementation details of each module.
  3. Expose Public Contracts: Each module should expose its functionality through well-defined facades, APIs, or events. Forbid direct database table access or direct implementation calls between modules.
  4. Enforce Architectural Fitness: Implement automated tests that fail the build if forbidden dependencies or package references are introduced between modules.
  5. Plan for Evolution: Continuously track metrics such as change coupling and deployment scope to make informed decisions about if and when to split a module into a separate service.

Key Deliverables

Risks & Mitigations

Troubleshooting

Common Issues

Skill not loading Check YAML frontmatter syntax and required fields

Token limits exceeded Use progressive disclosure - move details to modules

Modules not found Verify module paths in SKILL.md are correct

Concrete Components

Vocabulary for the tools and abstractions an implementation of this paradigm tends to carry. Not dependencies, and not `tools:` frontmatter.

Exit Criteria

states the conditions under which a module would be extracted into a separate service.

database table access between modules is absent (verified by schema ownership review).

least one such violation test case is documented.

pair with > 50% coupling is flagged as a candidate for boundary review.