Skip to content
Back to skills

Software Architecture

ASecurity

Architecture practice for CANdb Studio - layered dependency rules, ports and adapters, quality-attribute scenarios, C4/Mermaid diagrams, ADR writing, fitness functions, evolution toward worker-thread/out-of-process designs. Use when designing features that cross layers or when writing/reviewing ADRs and architecture docs.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
developmentgodatabasesecurityperformance

Works with

  • vscode

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add afri-bit/candb-studio --skill software-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Software Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Software Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/afri-bit-software-architecture/badge)](https://www.skillsdirectory.com/skills/afri-bit-software-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: software-architecture
description: Architecture practice for CANdb Studio - layered dependency rules, ports and adapters, quality-attribute scenarios, C4/Mermaid diagrams, ADR writing, fitness functions, evolution toward worker-thread/out-of-process designs. Use when designing features that cross layers or when writing/reviewing ADRs and architecture docs.
---

# Software architecture practice

## Dependency rule
`presentation -> application -> core`, `infrastructure -> core` (implements ports). Core knows nothing outward. `shared/` is leaf utilities. Enforce with a fitness test: a unit test that scans `src/core` and `src/infrastructure/parsers` for `from 'vscode'` and for imports pointing outward.

## Ports and adapters
Define a port in `core` or `application` (`ICanBusAdapter`, `ILogSource`, `IDatabaseRepository`), implement in `infrastructure`, wire in `extension.ts`. Fakes in tests implement the same port. One **frame pipeline** for all sources.

## Quality-attribute scenarios (write these first)
`<Source> does <stimulus> under <condition>; the system <response> measured by <metric>.` Example: "A user opens a 1 GB BLF on a laptop; first frames appear < 2 s and extension-host memory stays < 300 MB."
Key attributes: correctness, determinism, performance on large data, responsiveness (never block the extension host), security, testability, evolvability.

## Concurrency
Extension host is single-threaded: CPU-heavy parsing or decode of large data goes to a worker thread or out-of-process helper with a typed message protocol, versioned and validated. Document ownership of mutable state.

## Diagrams
Use C4 levels in Mermaid in `docs/architecture/`: Context, Containers (extension host, webview, helper), Components (services), and sequence diagrams for flows (load -> change -> save; frame -> decode -> UI). Keep them next to the code they describe and update with the change.

## ADRs
Write when a decision is costly to reverse: formats, protocols, adapter strategy, threading, persistence, dependencies. Template `docs/adr/0000-template.md`. Include >= 2 options with honest cons, decision, consequences, and the issue link. Supersede, never rewrite history.

## Smells to push back on
Parallel global singletons beside `EventBus`; webview holding the source of truth; presentation code containing domain rules; adapters leaking vendor types; unbounded buffers; time read from `Date.now()` inside domain logic.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.