Logo: Speq Code Guardrails

Speq Code Guardrails

Organisatioun
exasol-labs
speq-code-guardrails

TDD cycle and code quality guardrails for the implementer and reviewer agents during /speq-implement. Not for general coding.

Iwwersiicht

Editeurexasol-labs
Repositoryspeq-skill
Skill-Nummspeq-code-guardrails
Stären
54
Forks
6
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
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.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    exasol-labs huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Speq Code Guardrails an TypingMind, fir e mat all LLM ze benotzen, oder setzt 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 „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-code-guardrails
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng 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 d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/exasol-labs/speq-skill.git /tmp/speq-skill
mkdir -p .claude/skills
cp -r /tmp/speq-skill/.claude/skills/speq-code-guardrails .claude/skills/speq-code-guardrails
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Speq Code Guardrails 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 Speq Code Guardrails automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Speq Code Guardrails 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-Schlësselen.

  • 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.

Code Guardrails

TDD workflow and quality guardrails. Draws on established practice, including work by R. Martin, K. Beck, B. Meyer, and Toyota's Five Whys.

Golden Rule

No production code without a failing test first. Before changing existing code that has no test, add one that captures its current behavior first.

Evidence Rule

No claim without evidence. Run command, show output, then claim.

Dependency Rule

No new dependency without confirming the standard library or an already-installed dependency cannot do it first.

TDD Cycle (London School)

RED    → Write failing test, run it, show failure
GREEN  → Minimal code to pass, run test, show pass
REFACTOR → Clean up, run test + lint, show output

Run ONLY the test you created/changed, not the full suite.

Tests

  • Arrange, act, assert. One concept per test.
  • The test name states the condition and the expected behavior.
  • Independent and repeatable: no shared mutable state, no real clock, network, filesystem, or unseeded randomness.
  • Cover every branch and every edge case: empty, single, maximum, off-by-one, transition, and each way the operation can fail.
  • Assert observable behavior, never internal state.
  • Pure logic is tested without doubles. Orchestration is tested with doubles at its abstractions. Adapters are tested against the real thing.
  • Test code follows every rule in this document, same as production code.
  • A skipped or ignored test is a defect. Fix it or delete it.

Guiding Principles

PrincipleMeaning
KISSSimplest solution that works
YAGNIBuild for now, not hypotheticals
DRYExtract duplication on the third occurrence, not the second (Rule of Three)
Single Responsibility (SOLID)One function = one purpose
Boy ScoutLeave code cleaner than you found it
Root CauseFive Whys — fix the source, not the symptom

Design

  • Law of Demeter: talk only to immediate collaborators
  • Dependency direction, module depth, and boundary placement: see /speq-design-philosophy

Functions

  • Small and focused
  • Few arguments (≤3 ideal)
  • No hidden side effects: a function changes nothing its name and contract do not announce
  • No boolean flags: split into separate methods
  • No selector arguments of any type: an argument that picks a branch means two functions
  • One level of abstraction per function: decide or do the work, not both
  • A function either mutates something or answers a question, never both in one call (Command-Query Separation)
  • No output parameters: return the value
  • Guard clauses first. One unindented main path
  • No undocumented ordering contract between calls: if a second call requires a first, make it unreachable without it

Errors

  • Failure is signalled by the language's own error mechanism, never a sentinel value, magic number, or in-band absent value
  • Absence is explicit: an empty collection or the language's optional type, never a stand-in for a value
  • Every error states what was attempted, the input that failed, and the constraint violated
  • Translate a third-party error into this module's own error type at the boundary: callers never handle a provider's error taxonomy
  • Never discard an error, never catch broadly: handle at one level, let the rest propagate
  • Errors signal exceptional conditions, not control flow
  • The failure path is written test-first, like any other behavior

Naming

  • Descriptive, unambiguous, pronounceable
  • Named constants over magic numbers
  • No prefixes or type encodings
  • Types are nouns, functions are verbs, predicates read as questions
  • One word per concept across the codebase
  • Name length matches scope: single letters only within a few lines
  • No role-suffix names that state no responsibility (Manager, Processor, Handler, Data, Info, Util)
  • A name reflects what a thing is for, never how it is built: keep transport, vendor, or storage format out of it
  • Domain vocabulary over generic programming vocabulary

Comments

  • Public/interface methods: brief doc comment stating what the method promises — purpose, and design intent or rationale when that is not self-evident from the signature
  • Private methods: no comments
  • No inline comments: make the code self-explanatory
  • No work tracking (TODOs, FIXMEs, ticket refs)

YAGNI Checks

  • Abstraction (interface, generic type, configuration value) with one implementation/caller? Inline it — unless it is a seam over I/O, nondeterminism, or a third party, or the concrete choice is expected to change. Those seams stay.
  • Feature flag or extension point nobody uses? Remove it.

Code Smells

SmellSignal
RigiditySmall changes cascade everywhere
FragilityOne change breaks unrelated code
ImmobilityCan't reuse code elsewhere
OpacityHard to understand at a glance

Attribution

Draws on established practice, including R. Martin (Clean Code, SOLID, Boy Scout Rule), K. Beck (TDD), and B. Meyer (Command-Query Separation).

Heefeg gestallte Froen

Wat mécht de KI-Skill Speq Code Guardrails?

TDD cycle and code quality guardrails for the implementer and reviewer agents during /speq-implement. Not for general coding.

Firwat Speq Code Guardrails op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Speq Code Guardrails 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 en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Speq Code Guardrails an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-code-guardrails an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Speq Code Guardrails 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 Speq Code Guardrails benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Speq Code Guardrails domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Speq Code Guardrails gratis?

Jo. exasol-labs huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen 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 e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

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