psychology

chevp-ai-framework

Lifecycle Gates Guidelines Commands Agents Templates
view_moduleGuideline

Modular Composition

Composable layers — each one a clearly bounded transformation logic.

Why Layers?

AI frameworks compose like layers in a matrix — not as a literal linear-algebra operation, but as an intuition for how independent layers combine to produce richer outcomes. Rather than building one monolithic framework that tries to cover everything, the architecture follows a principle of modular composition.

The Layered Stack

Layer 1 — Stable base

chevp-ai-framework

Domain-agnostic by design. Defines fundamental guardrails and the 3-step lifecycle — how AI-assisted development proceeds, not what is built.

Layer 2 — Domain (optional)

domain-ai-framework

Specialized vocabulary, constraints, patterns, quality criteria for a field (games, UI, enterprise). Composed with the base via context injection.

Layer 3 — Dynamic (optional)

External Knowledge (RAG)

Real-time or proprietary data injected at query time. Higher token cost; richer context. Does not modify static layers.

Result = Core ⊕ Domain ⊕ External Knowledge

Key Advantage: Composability

block

No monolith

Domains stay independent modules instead of forming one large inseparable system.

swap_horiz

Flexible composition

Domains can be added, replaced, or evolved in isolation without affecting the core.

groups

Parallel development

Teams work on different domain layers concurrently, all anchored to the same stable base.

filter_alt

Selective activation

Only the domains relevant to a given project are injected — context stays lean.

Stability Profile

LayerRoleStability
Core FrameworkProcess, lifecycle, guardrailsHigh — rarely changes
Domain FrameworksDomain-specific patterns & constraintsMedium — evolves with the domain
External KnowledgeReal-time / proprietary contextDynamic — changes continuously
menu_book guidelines/modular-composition.mdopen_in_new