# architectural-design-principles

Reference guide for system-level architecture rules: layering, dependency direction, ports and adapters, twelve-factor principles for cloud apps. Turns architectural constraints into executable tests, not just documents.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 36
- Author: databricks-solutions
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/databricks-solutions/consort/tree/HEAD/skills/architectural-design-principles/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/architectural-design-principles

## What it does

This skill holds a canon for architecture decisions above the level of functions and classes. Where `software-design-principles` covers how to write code inside a module, this describes how a system is shaped: its layers, how they depend on each other, where configuration and state live, how persistence attaches as a service.

The core premise is that every architectural rule must have a fitness function—a test or automated check that fails the build if the rule is violated. Stating "dependencies point inward" is not enough; the build needs a check that catches violations. The skill provides a pre-merge checklist: dependency direction, persistence layer, environment-driven config, stateless processes, backing services as resources, and mock policy.

It is imported by workflow skills (`consort`, `lakebase-scm-workflows`) and referenced when you shape system boundaries, decide what counts as a backing service, map config to the environment, or author fitness functions that keep architecture honest as it evolves.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks-solutions/consort --skill architectural-design-principles -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/architectural-design-principles/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/architectural-design-principles/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks-solutions/consort --skill architectural-design-principles -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/architectural-design-principles/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks-solutions/consort --skill architectural-design-principles -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/architectural-design-principles/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install databricks-solutions/consort architectural-design-principles
```

2. **Manually: put the files in place**
- File: `.github/skills/architectural-design-principles/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks-solutions/consort --skill architectural-design-principles -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/databricks-solutions/consort --path skills/architectural-design-principles
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/architectural-design-principles/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add databricks-solutions/consort --skill architectural-design-principles -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/databricks-solutions/consort/tree/HEAD/skills/architectural-design-principles/SKILL.md

## When to use it
- enforce layering and inward dependency direction across the codebase
- restrict database access to the repository layer with ORM only
- ensure configuration lives in environment variables, not hardcoded
- design backing services as swappable, config-addressed resources
- write fitness functions that fail the build on architectural violation

## Example prompts
- Design the layer boundaries so HTTP never imports service logic
- Enforce a rule that raw SQL appears only in the repository layer
- Author fitness functions for the pre-merge architectural checklist

## Similar
- [api-design-principles](https://affpapa.org/en/nevibecode/skills/sickn33-api-design-principles.md) — skill · 1000 installs
- [ui-design-patterns](https://affpapa.org/en/nevibecode/skills/ui-design-patterns.md) — skill · 853 installs
- [software-design-philosophy](https://affpapa.org/en/nevibecode/skills/software-design-philosophy.md) — skill · 6100 installs
- [software-patterns](https://affpapa.org/en/nevibecode/skills/software-patterns.md) — skill · 373 installs
- [architectural-analysis](https://affpapa.org/en/nevibecode/skills/architectural-analysis.md) — skill · 531 installs
- [design-principles](https://affpapa.org/en/nevibecode/skills/design-principles.md) — skill · 2100 installs

From the same set: [databricks-solutions/consort](https://affpapa.org/en/nevibecode/by/databricks-solutions/consort.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
