mo-architecture

Prescribe canonical folder layouts and layer boundaries for Monica modules.

13|6|Updated Feb 19, 2025
One-click install
npx skills add https://github.com/Tairitsua/Monica --skill mo-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mo-architecture
Source: https://github.com/Tairitsua/Monica/tree/main/.claude/skills/mo-architecture
Command: npx skills add https://github.com/Tairitsua/Monica --skill mo-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a single-source-of-truth architecture for Monica modules to eliminate inconsistency, unclear boundaries, and ad-hoc folder layouts that cause maintenance pain and coupling between layers.

Core Features & Use Cases

  • Standardized Layering: Defines public vs internal layers (Abstractions, Models, Facades, Services, Providers, Modules, Annotations) and the Internal/ sub-folder convention to make visibility explicit.
  • Folder & Grouping Rules: Prescribes folder depth limits, prefix-naming over subfolders, when to introduce feature folders, and localization placement exceptions.
  • Facade/Service/Provider Patterns: Clarifies Facade responsibilities, Service naming and scope, Provider separation, and Module registration conventions including ModuleBase vs WebModuleBase guidance.
  • UI & Page Patterns: Describes Mixed/Standalone/Composite UI layouts, page decomposition rules, state patterns, and red flags for refactoring.

Quick Start

Ask the skill to design or refactor a Monica module (infrastructure, UI, or mixed) and produce a folder layout, naming conventions, public/internal boundaries, Facade placement, and provider separation recommendations.

Frequently Asked Questions about mo-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the canonical folder layout for a Monica module?

The canonical Monica module architecture prescribes standard layers including Abstractions, Models, Facades, Services, Providers, and Modules, with an Internal sub-folder convention to make public and internal visibility boundaries explicit.

How do I structure feature folders and localization files in a Monica module?

Feature folders should be introduced only when grouping heuristics justify them, and localization placement follows specific exceptions to the standard folder depth limits, preferring prefix-naming over deeply nested subfolders.

When should I use a Facade versus a Service in Monica module architecture?

Facades handle public-facing module responsibilities and boundary exposure, while Services manage internal business logic with defined naming and scope conventions, keeping provider separation and module registration patterns distinct.

How do I decompose UI pages for mixed or standalone Monica modules?

Monica module UI patterns define Mixed, Standalone, and Composite layouts with specific page decomposition rules, state patterns, and refactoring red flags to guide proper separation of concerns across module runtime kinds.

What's the difference between ModuleBase and WebModuleBase when registering Monica modules?

Module registration conventions distinguish ModuleBase for non-UI infrastructure modules from WebModuleBase for modules requiring web runtime, guiding provider separation and registration order within the architecture.