architecture-foundation

Clarify architecture boundaries and ownership before coding.

258|26|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/majiayu000/spellbook --skill architecture-foundation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-foundation
Source: https://github.com/majiayu000/spellbook/tree/main/skills/architecture-foundation
Command: npx skills add https://github.com/majiayu000/spellbook --skill architecture-foundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design foundation before implementation to prevent architecture drift, duplicated work, and migration debt.

Core Features & Use Cases

  • Boundary discovery: identify primary state ownership models (runtime, adapters, or domain).
  • Contract-first design: define ownership, lifecycle, events, effects, and tests before coding.
  • Spec guidance: reuse templates (spec-template.md) to formalize decisions and ensure consistency.

Quick Start

Begin by outlining a contract-first architecture spec before you code.

Frequently Asked Questions about architecture-foundation

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

FAQPage Schema
How do I define architecture boundaries and state ownership before coding?

Defining architecture boundaries requires identifying primary state ownership models across runtimes, adapters, or domains. You establish a contract-first architecture spec to clarify ownership, lifecycle, events, effects, and tests before implementation begins.

What is contract-first architecture spec design and when do I need it?

Contract-first architecture spec design formalizes decisions for state ownership, lifecycle, events, and observability before coding. You need it for large software projects involving multiple crates, packages, runtimes, and cross-cutting concerns to prevent architecture drift.

How do I prevent architecture drift and migration debt in large software projects?

Preventing architecture drift involves setting clear architecture foundations and specifying contracts for state ownership and effects before coding. Applying a contract-first architecture spec to large projects with multiple runtimes ensures consistency and prevents duplicated work and migration debt.

Can I use a contract-first architecture spec for systems with multiple crates and runtimes?

Yes, contract-first architecture specs are designed for large software projects that involve multiple crates, packages, runtimes, and cross-cutting concerns. The spec template guides generation of a repo-facing architecture document to formalize boundaries and ownership.

How do I generate a repo-facing architecture spec template?

Generating a repo-facing architecture spec template involves applying boundary discovery to identify state ownership models. You then use spec guidance templates to formalize contracts for lifecycle, events, effects, observability, and tests, ensuring consistency across the repository.

Why does duplicated work happen when I skip architecture foundation design?

Duplicated work happens because unclear architecture boundaries lead to overlapping state ownership and unmanaged cross-cutting concerns. Designing a contract-first architecture foundation before coding specifies lifecycle and event contracts, eliminating duplicated implementation efforts and migration debt.