<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
alizainx/intelligence-systems-skills/common-lisp-macro-hygiene
──Details
PublishedOctober 21, 2026 at 03:28 PM
Content Hashsha256:74196da51994659d...
Git SHA5d098c90c1e6
──Files
Files (1 file, 1.6 KB)
SKILL.md1.6 KBactive
SKILL.md · 26 lines · 1.6 KB

version: "1.0.0" name: common-lisp-macro-hygiene id: ISS-036 token_budget: 700 chain_with: [scheme-continuations-hygiene, racket-language-oriented, clojure-persistent-stm] description: "ANSI Common Lisp (SBCL) type declarations ((declare (type fixnum ...))), hygienic gensym macros, CLOS generic dispatch, and restart conditions."


common-lisp-macro-hygiene (ISS-036)

1. First-Principles Invariant

  • McCarthy/Steele Symbolic-Compilation Law: Evaluate macro arguments once into gensym bindings (with-gensyms) and add explicit SBCL type/optimize declarations in numeric kernels to eliminate boxing.

2. Fast-Pass Low-Token Protocol (Web & Coding Agents)

  • Separate error signaling (error/signal) from recovery policy using Common Lisp's Condition System (restart-case + handler-bind) so low-level frames can recover without unwinding the stack.

3. Zero-Bug & Zero-Vulnerability Guards

  1. Prevent variable capture and multiple evaluation in defmacro by binding inputs to gensym symbols.
  2. Avoid mutating literal constants ('(1 2 3) or "literal"); construct fresh heap lists via (list ...) or (copy-list ...).
  3. Specialize arrays ((make-array n :element-type '(unsigned-byte 64))) and declare (optimize (speed 3) (safety 1)) so SBCL emits unboxed SIMD assembly.
  4. Name dynamic special variables with earmuffs (*config*) and constants with +limit+.
  5. Inspect SBCL compiler notes (sb-ext:compiler-note) to eliminate all type-uncertainty and float-boxing warnings.

4. Verification Gate

  • sbcl --noinform --non-interactive --eval '(compile-file "module.lisp")'
All versions