Logo di Speq Code Guardrails

Speq Code Guardrails

Organizzazione
exasol-labs
speq-code-guardrails

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

Panoramica

Pubblicato daexasol-labs
Repositoryspeq-skill
Nome della skillspeq-code-guardrails
Stelle
54
Fork
6
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da exasol-labs su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Speq Code Guardrails in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-code-guardrails
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Speq Code Guardrails in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Speq Code Guardrails non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Speq Code Guardrails non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

Domande frequenti

Cosa fa la skill IA Speq Code Guardrails?

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

Perché usare Speq Code Guardrails su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Speq Code Guardrails è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Speq Code Guardrails in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-code-guardrails. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Speq Code Guardrails?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Speq Code Guardrails?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Speq Code Guardrails: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Speq Code Guardrails è gratuita?

Sì. È pubblicata su GitHub da exasol-labs con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇