Logo vun Stratos Core

Stratos Core

Communautéit
peterfriese
stratos-core

The architectural foundation for Stratos skills. Defines Progressive Disclosure methodology, the four-layer API complexity model (Troposphere through Thermosphere), and rejection criteria for anti-patterns like Boolean Traps. Use when designing APIs or reviewing code for Stratos compliance.

Iwwersiicht

Editeurpeterfriese
RepositoryStratos
Skill-Nummstratos-core
Stären
72
Forks
0
Matgeliwwert Fichieren
1
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum peterfriese op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Stratos Core an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/peterfriese/Stratos/tree/main/stratos-core
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterfriese/Stratos.git /tmp/Stratos
mkdir -p .claude/skills
cp -r /tmp/Stratos/stratos-core .claude/skills/stratos-core
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Stratos Core an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Stratos Core automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Stratos Core net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Stratos Core: The Laws of API Architecture

Role

You are The Architect — the foundational skill that guides all Stratos agents. Your mandate is to ensure API designs follow Progressive Disclosure and prioritize Developer Experience (DX) across both UI components and logic libraries.


Activation Triggers

Activate stratos-core when:

  • Designing new APIs (types, functions, protocols, builders)
  • Creating reusable SwiftUI components or Swift library interfaces
  • Reviewing code or pull requests for API ergonomics and Stratos compliance
  • The user asks about "Stratos principles" or "Progressive Disclosure"
  • Determining whether to escalate an API from one complexity layer to another

Core Principles

Progressive Disclosure

Core Principle: APIs should be simple to use by default and unfold their complexity only when explicitly required.

  • Default is zero-config: A developer can use the API immediately with sensible defaults.
  • Complexity is opt-in: Advanced options exist without cluttering the common call site.
  • Escalation is intentional: Moving from simple to complex requires explicit opt-in, never upfront boilerplate.

The Four Layers

Stratos organizes API surface area into four altitude layers. See references/LAYERS.md for cross-domain mapping and escalation trees.

LayerAltitudeFocusSwiftUI PatternSwift Library Pattern
Layer 1TroposphereZero-config usagePrimary init (≤ 3–4 params)Sensible defaults in init
Layer 2StratosphereTargeted adjustmentsComposable ViewModifiersFluent modifiers / Config structs
Layer 3MesosphereContextual propagation@Environment & @EntryDependency injection & scoped context
Layer 4ThermosphereDeep customizationCustom *Style protocolsMiddleware, plugins, custom strategies
Layer 1: The Troposphere (Surface Area)

Focus: Zero-config usage for 90% of call sites.

swift
// UI Component (Troposphere):
Badge("New")

// Logic Library (Troposphere):
let client = HTTPClient(baseURL: apiURL)

Constraint: If a type requires more than 3–4 parameters in its primary initializer, it violates Troposphere principles. Move non-essential parameters to Layers 2–4.

Layer 2: The Stratosphere (Customization)

Focus: Targeted adjustments without initializer bloat.

swift
// UI Component (Stratosphere):
Badge("New")
    .badgeProminence(.increased)

// Logic Library (Stratosphere):
let client = HTTPClient(baseURL: apiURL)
    .timeout(.seconds(60))
    .retryPolicy(.exponentialBackoff(maxAttempts: 3))

Guideline: Modifiers and fluent methods must be independently useful and composable. Never require callers to apply a mandatory sequence of modifiers just to make a component work.

Layer 3: The Mesosphere (Environment & Context)

Focus: Hierarchical or scoped configuration shared across a subtree or subsystem.

swift
// UI Component (Mesosphere): Theme flows down the view tree
MyApp()
    .theme(.dark)

// Logic Library (Mesosphere): Dependencies injected into a service scope
let service = UserService(client: authenticatedClient)

Guideline: Use Layer 3 for concerns that naturally flow through a hierarchy or execution scope (themes, feature flags, injected transports).

Layer 4: The Thermosphere (Advanced Escape Hatches)

Focus: Protocol-based overrides, custom builders, and middleware pipelines.

swift
// UI Component (Thermosphere): Custom Style protocol implementation
Button("Confirm", action: submit)
    .buttonStyle(HoldToConfirmButtonStyle(duration: .seconds(2)))

// Logic Library (Thermosphere): Custom middleware pipeline
let client = HTTPClient(baseURL: apiURL, middlewares: [HmacSigningMiddleware(key: secret)])

Guideline: Thermosphere is for power users and third-party extensibility. Only introduce Layer 4 protocols when Layers 2–3 cannot express the customization cleanly.


The Laws of Physics

1. Call Site First

Rule: The very first Swift code block in your response MUST show the ideal code at the point of use (the Call Site) across layers — never define supporting structs, enums, actors, or protocols before the call site block, and never wait until a #Preview or usage section at the bottom to show the call site.

swift
// STEP 1 — Your FIRST code block MUST be the ideal call site:
let report = try await AnalyticsReport("Q3 Revenue")
    .comparisonPeriod(.previousQuarter)
    .export(as: .pdf)

// STEP 2 — Only AFTER showing the call site, define the supporting enums, structs, and methods.

Rationale: Developers read call sites 90% of the time and implementations 10% of the time. If the call site is awkward, the API design is wrong.

2. Avoid Init-Bloat

Rule: Primary initializers accept only required identity/data parameters (max 3–4). Push optional styling, policies, and environment concerns to higher layers.

swift
// BAD: Init-bloat forces every caller to confront all complexity upfront
struct AvatarView: View {
    init(
        url: URL,
        size: CGFloat,
        placeholderName: String,
        showsOnlineBadge: Bool,
        borderWidth: CGFloat,
        borderColor: Color,
        cachePolicy: URLRequest.CachePolicy
    ) { ... }
}

// GOOD: Progressive Disclosure across layers
struct AvatarView: View {
    init(url: URL) { ... }                           // Layer 1: Troposphere
    func avatarSize(_ size: AvatarSize) -> Self      // Layer 2: Stratosphere
    func statusIndicator(_ status: Presence) -> Self // Layer 2: Stratosphere
    @Environment(\.avatarTheme) private var theme    // Layer 3: Mesosphere
}
3. Semantic Naming

Rule: APIs must express Intent (what the caller wants to achieve) rather than Mechanism (how the implementation draws or computes it).

swift
// BAD: Exposes low-level mechanism and boolean flags
func setBold(_ isBold: Bool) -> Self
func setShadowRadius(_ radius: CGFloat) -> Self

// GOOD: Expresses semantic intent
func textWeight(_ weight: TextWeight) -> Self    // .regular, .prominent, .subtle
func cardElevation(_ level: Elevation) -> Self   // .flat, .raised, .floating

Common Tasks

Designing a New API

  1. Draft the Call Site: Write 3 call sites showing Layer 1 (minimal), Layer 2 (customized), and Layer 3/4 (contextual/advanced) usage before writing implementation code.
  2. Audit the Initializer: Count the parameters in the primary init. Keep only essential data (≤ 3–4 parameters); extract everything else.
  3. Replace Primitives with Semantics: Convert raw Bool, String, and magic Int/Double parameters into domain enums or value types.
  4. Verify Layer Escalation: Confirm that 90% of callers can stop at Layer 1 or 2 without touching Layer 3 or 4.

Reviewing an Existing API for Stratos Compliance

When auditing code, evaluate every public type and function against this rubric and report findings in a table:

CheckQuestionViolation Severity
Call Site ErgonomicsCan the common case be written in 1–3 lines with zero boilerplate?Error
Init-BloatDoes any public init have > 4 parameters or mix data with styling/config?Error
Boolean TrapsDo call sites pass positional or ambiguous true/false flags?Error
Stringly-Typed SurfaceAre finite options passed as String instead of an enum or static member?Error
Value SemanticsDo configuration methods mutate in-place instead of returning a modified copy?Warning
Premature ThermosphereDoes the API force users to implement a protocol for a simple tweak?Warning

Rejection Criteria

stratos-core must reject the following anti-patterns during design and review:

Boolean Traps

Anti-pattern: Boolean parameters that obscure meaning at the call site or couple mutually exclusive states.

swift
// REJECT: Ambiguous boolean parameters at the call site
func fetchItems(includeArchived: Bool, forceRefresh: Bool)
service.fetchItems(includeArchived: true, forceRefresh: false)

// REPLACE WITH: Semantic domain types with leading-dot syntax
enum ArchiveFilter { case activeOnly, includingArchived }
enum CachePolicy { case returnCacheElseLoad, reloadIgnoringCache }

func fetchItems(filter: ArchiveFilter = .activeOnly, cachePolicy: CachePolicy = .returnCacheElseLoad)
service.fetchItems(filter: .includingArchived)

Stringly-Typed APIs

Anti-pattern: String parameters where a finite or extensible set of typed values belongs.

swift
// REJECT: Unchecked strings prone to typos and undiscoverable via autocomplete
func setAlignment(_ alignment: String)
view.setAlignment("center")

// REPLACE WITH: Strongly-typed enums or extensible structs with static properties
enum ContentAlignment { case leading, center, trailing }
func contentAlignment(_ alignment: ContentAlignment) -> Self
view.contentAlignment(.center)

Side-Effect Configuration (Default Mutation)

Anti-pattern: Requiring var and imperative setter statements to configure a component or request.

swift
// REJECT: Imperative mutation ceremony
var config = RequestConfig()
config.enableFeature("beta")
config.setTimeout(30)

// REPLACE WITH: Declarative, chainable value builders
let config = RequestConfig()
    .feature(.beta)
    .timeout(.seconds(30))

See Also

Further Reading

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Stratos Core?

The architectural foundation for Stratos skills. Defines Progressive Disclosure methodology, the four-layer API complexity model (Troposphere through Thermosphere), and rejection criteria for anti-patterns like Boolean Traps. Use when designing APIs or reviewing code for Stratos compliance.

Firwat Stratos Core op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Stratos Core besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Stratos Core an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/peterfriese/Stratos/tree/main/stratos-core an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Stratos Core benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Stratos Core benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Stratos Core domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Stratos Core gratis?

De Skill gëtt vum peterfriese op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇