| name | architecture-skills |
| description | Master system design, architecture patterns, algorithms, data structures, and computer science fundamentals for building scalable systems. |
| sasmp_version | 1.3.0 |
| skill_type | atomic |
| version | 2.0.0 |
| parameters | {"scope":{"type":"string","enum":["component","service","system","enterprise"],"default":"system"},"style":{"type":"string","enum":["monolith","microservices","serverless","event-driven"],"default":"microservices"}} |
| validation_rules | [{"pattern":"^ADR-[0-9]{3}$","target":"adr_ids","message":"ADR IDs must be ADR-NNN format"},{"pattern":".*Diagram$","target":"diagram_files","message":"Diagram files should end with 'Diagram'"}] |
| retry_config | {"max_attempts":2,"backoff":"linear","initial_delay_ms":1000} |
| logging | {"on_entry":"[Architecture] Analyzing: {task}","on_success":"[Architecture] Decision recorded: {task}","on_error":"[Architecture] Analysis failed: {task}"} |
| dependencies | {"agents":["system-architect"]} |
System Architecture & Design Skills
Big O Complexity Analysis
| Complexity | Name | Example |
|---|
| O(1) | Constant | Hash lookup |
| O(log n) | Logarithmic | Binary search |
| O(n) | Linear | Array scan |
| O(n log n) | Linearithmic | Merge sort |
| O(n²) | Quadratic | Nested loops |
| O(2ⁿ) | Exponential | Power set |
Common Data Structures
class DataStructureGuide:
"""
Array: O(1) access, O(n) insert/delete
LinkedList: O(n) access, O(1) insert/delete
HashTable: O(1) average, O(n) worst
BST: O(log n) balanced, O(n) worst
Heap: O(log n) insert/delete, O(1) min/max
"""
@staticmethod
def choose_structure(requirements: dict) -> str:
if requirements.get("fast_lookup"):
return "HashTable"
if requirements.get("ordered"):
return "BST or SortedArray"
if requirements.get("priority"):
return "Heap"
return "Array"
Design Patterns
from threading import Lock
class Singleton:
_instance =
_lock = Lock()
():
cls._instance :
cls._lock:
cls._instance :
cls._instance = ().__new__(cls)
cls._instance
:
_services = {}
():
cls._services[name] = service_class
():
service_class = cls._services.get(name)
service_class:
ValueError()
service_class(**kwargs)
abc ABC, abstractmethod
():
() -> :
():
() -> :
():
() -> :