Source profileQuality 93/100

majiayu000/spellbook/skills/architecture-foundation/SKILL.md

architecture-foundation

Design architecture foundations before implementation. Use when asked to design or refactor architecture, choose Rust/Go crate, package, module, runtime, workflow, or service boundaries, compare mature project architecture, prevent stacked one-off PRs, audit migration debt in existing repos, or produce a spec before coding.

Source repository stars
249
Declared platforms
0
Static risk flags
0
Last source update
2026-08-02
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Design architecture foundations before implementation.

Best for

  • The user asks "what architecture should this use?", "is this stacked work?",
  • The change touches runtime, state ownership, adapters, plugins, event loops,
  • A repo has many issues/PRs that look individually valid but may not converge

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/majiayu000/spellbook --skill "skills/architecture-foundation"
Safe inspection promptEditorial

Inspect the Agent Skill "architecture-foundation" from https://github.com/majiayu000/spellbook/blob/01c5d88b0139a80ac38bfe7206ea99f28b0fc999/skills/architecture-foundation/SKILL.md at commit 01c5d88b0139a80ac38bfe7206ea99f28b0fc999. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Search first. - Inspect existing architecture docs, entrypoints, manifests, module trees, public APIs, open issues/PRs, and tests before proposing new structure. - If the user names a reference project, verify current source or official docs before treating it as evidence. -…

    Search first.Inspect existing architecture docs, entrypoints, manifests, module trees,If the user names a reference project, verify current source or official docs
  2. 02

    When To Use

    Do not use this for small, local fixes where the existing architecture is obvious and no boundary decision is needed.

    The user asks "what architecture should this use?", "is this stacked work?",The change touches runtime, state ownership, adapters, plugins, event loops,A repo has many issues/PRs that look individually valid but may not converge
  3. 03

    Decision Rules

    Prefer a thin adapter around a mature runtime when the product does not need

    Prefer a thin adapter around a mature runtime when the product does not needSplit crates/modules only for stable API boundaries, side-effect isolation,In existing repos, do not split crates/packages first when the real problem is
  4. 04

    Output Shape

    For quick answers, return:

    For quick answers, return:For durable planning, create or update an architecture spec with:
  5. 05

    Red Flags

    A proposed module cannot say which boundary it belongs to.

    A proposed module cannot say which boundary it belongs to.The design names a trait/config/cache/plugin but does not wire it intoTwo state ownership models are mixed without an explicit bridge.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars249SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
majiayu000/spellbook
Skill path
skills/architecture-foundation/SKILL.md
Commit
01c5d88b0139a80ac38bfe7206ea99f28b0fc999
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Architecture Foundation

Overview

Use this skill to turn an architecture discussion into explicit boundaries, contracts, validation gates, and a small execution plan. The goal is not to copy an admired project, but to identify the project's shape and choose the minimum architecture that keeps ownership, effects, errors, and tests clear. For large existing repos, first explain the architecture they already have, then decide whether the work is boundary creation, boundary completion, or boundary deletion.

When To Use

  • The user asks "what architecture should this use?", "is this stacked work?", "make a complete spec", "design the runtime", or "compare good libraries".
  • The change touches runtime, state ownership, adapters, plugins, event loops, rendering, schedulers, persistence, or cross-module contracts.
  • A repo has many issues/PRs that look individually valid but may not converge on one architecture.
  • A mature repo has duplicated paths, compatibility shims, generated configs, workflow definitions, or docs that may disagree about the source of truth.
  • A new skill, framework, library, or large feature needs a foundation guide before implementation.

Do not use this for small, local fixes where the existing architecture is obvious and no boundary decision is needed.

Workflow

  1. Search first.
  • Inspect existing architecture docs, entrypoints, manifests, module trees, public APIs, open issues/PRs, and tests before proposing new structure.
  • If the user names a reference project, verify current source or official docs before treating it as evidence.
  • For existing repos, also inspect generated/config artifacts, migration files, background workers, cron jobs, adapters, and the largest files/tests.
  1. Classify the project shape.
  • Simple library: stable API plus internal implementation.
  • CLI or developer tool: command layer, core operations, IO adapters, reporter.
  • API gateway or model router: transport, auth/accounting, routing policy, provider adapters, billing/settlement, observability.
  • Long-running runtime: state root, scheduler, drivers, observability, shutdown.
  • Lifecycle/composition framework: dependency graph, construction phase, runtime hooks, rollback, shutdown, and test harness.
  • Event/cache/reconcile controller: watch/list input, cache/projection, queue/backpressure, worker/reconciler, retry, and drain.
  • Config/module platform: canonical config, adapters, module lifecycle, reload order, rollback, cleanup, and plugin host interfaces.
  • UI or app shell: state ownership, event protocol, renderer/platform boundary, headless tests.
  • Service framework: domain core, application services, transport, storage, middleware, error-to-response boundary.
  • Agent or workflow system: task model, scheduler, provider adapters, event log, replay/test harness.
  1. Choose one primary state ownership model.
  • App-owned entities and handles for native UI/editor runtimes.
  • State plus typed message for enumerated UI/application workflows.
  • Virtual DOM/signals when renderer portability and declarative UI dominate.
  • Typed state or service-instance state for services and middleware.
  • Event log plus projection/outbox for workflows, billing, async jobs, and reconciliation systems.
  • World/resource/system model only when data-parallel ECS is a product fit.
  • Snapshot database or input facts for incremental analysis tools.
  • Streaming pipeline for one-shot CLI tools and batch processors.
  1. Draw the foundation boundaries.
  • product/app: entrypoints, user workflows, product-specific orchestration.
  • core/domain: pure models, invariants, decisions, typed errors, no IO.
  • runtime/application: lifecycle, scheduling, event dispatch, state mutation.
  • adapters/backends: OS, renderer, provider, filesystem, network, database.
  • plugins/components: optional capabilities behind explicit contracts.
  • testing/headless: deterministic drivers, fake adapters, contract tests.
  1. Audit existing boundary health before adding tasks.
  • Name the current source of truth for each contract: code, database table, SQL seed, JSON/YAML config, generated docs, or external provider contract.
  • Mark duplicated paths as intentional bridge, legacy compatibility, or accidental fork; require an exit condition for compatibility paths.
  • Prefer a convergence/deletion plan over a new abstraction when the existing architecture is directionally correct but half migrated.
  • Treat generated files and docs as consumers unless the repo explicitly makes them authoritative.
  1. Write the contracts before tasks.
  • Ownership: who owns state, handles, resources, caches, and mutation rights.
  • Lifecycle: init, ready, run/tick/frame/request, shutdown, cleanup.
  • Effect contract: which layer may persist, call providers, bill, publish messages, mutate projections, or only emit effects for another layer.
  • Event/action: how external events become typed commands/messages/actions.
  • Effects: which layer may touch IO, processes, network, OS handles, GPU, DOM, databases, or providers.
  • Error policy: what is recoverable, user-visible, fatal, diagnostic-only, or converted at a boundary.
  • Config/resources: build-time, startup-time, runtime; owner and invalidation.
  • Observability: logs, metrics, traces, queue depth, frame/runtime telemetry.
  • Tests: unit, contract, headless, fake adapter, integration, platform/E2E.
  1. Produce a spec, not just a diagram.
  • Use references/spec-template.md when the user needs a durable artifact.
  • Include non-goals and "do not copy" notes from reference projects.
  • For every reference project, separate borrow from do_not_copy; borrow boundary contracts, not scale artifacts, global registries, generated machinery, historical migrations, or domain-specific complexity.
  • Convert the spec into P0/P1/P2 work where each task maps to one contract.
  • If issues/PRs already exist, map them to the contracts and identify gaps.

Decision Rules

  • Prefer a thin adapter around a mature runtime when the product does not need to own that runtime.
  • Split crates/modules only for stable API boundaries, side-effect isolation, compile-time isolation, independent tests, or real reuse.
  • In existing repos, do not split crates/packages first when the real problem is duplicated source-of-truth, an unfinished migration, or missing closed-loop tests.
  • Keep core free of platform handles, event loops, renderer handles, webviews, database clients, HTTP requests, process spawning, and environment reads.
  • Make hidden global state illegal unless it is deliberately modeled as typed runtime state or a scoped resource.
  • Do not let plugins become architecture escape hatches. Each plugin needs API, config/permissions when relevant, lifecycle, errors, and tests.
  • Do not accept silent degradation. Missing capability must be an explicit unsupported error, diagnostic, or blank result according to the contract.

Output Shape

For quick answers, return:

verdict:
chosen_shape:
state_owner:
boundaries:
contracts:
migration_debt:
validation:
risks:
next_steps:

For durable planning, create or update an architecture spec with:

objective
current evidence
reference models considered
chosen architecture
boundary map
source-of-truth map
contract matrix
compatibility/deletion plan
issue/PR map
validation matrix
P0/P1/P2 roadmap
open questions

Red Flags

  • A proposed module cannot say which boundary it belongs to.
  • The design names a trait/config/cache/plugin but does not wire it into startup, lifecycle, or tests.
  • Two state ownership models are mixed without an explicit bridge.
  • Two files, configs, SQL seeds, or docs claim to be the source of truth for the same product contract.
  • A compatibility shim or legacy path has no owner, test, telemetry, or removal condition.
  • Platform callbacks directly mutate core state.
  • Errors become warnings plus fallback for user-visible behavior.
  • Tests only cover the final UI/CLI and cannot drive the runtime headlessly.
  • The plan says "match X project" but cannot state what not to copy.

References

  • Read references/rust-architecture-patterns.md when designing Rust crates, runtimes, UI frameworks, app shells, schedulers, services, or developer tools.
  • Read references/go-architecture-patterns.md when designing Go modules, packages, services, ports/adapters, context-aware APIs, or concurrency flows.
  • Read references/spec-template.md when producing a repo-facing spec.
  • Use agents/openai.yaml only when a separate architecture review agent is needed for cross-checking the chosen boundaries or migration plan.

Alternatives

Compare before choosing

Computed 9929,558

HKUDS/Vibe-Trading

strategy-generate

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

Computed 97106

AI-Unified-Process/marketplace

browserless-test

Creates Vaadin Browserless server-side unit tests for Vaadin views covering navigation, component interactions, form validation, grid operations, and notifications. Use when the user asks to "write Browserless tests", "write Vaadin UI unit tests", "unit test a Vaadin view without a browser", "create view tests with the official Vaadin testing framework", or mentions Browserless testing, SpringBrowserlessTest, browserless-test-junit6, UI Unit Testing, or server-side Vaadin testing.

Computed 9723

freenet/freenet-agent-skills

dapp-builder

Build and maintain decentralized applications on Freenet using river as a template. Guides through designing contracts (shared state), delegates (private state), and UI, and through upgrading a live dApp safely. Use when user wants to create a new Freenet dApp, design contract state, implement delegates, build a Freenet-connected UI, OR upgrade an existing dApp — bump freenet-stdlib, ship a new contract/delegate version (v2), fix a bug that re-keys the WASM, or migrate state across a contract/de

Computed 976

mgiovani/cc-arsenal

team-review

Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r