<< All versions
Skill v1.0.0
currentAutomated scan100/100alizainx/intelligence-systems-skills/d-systems-metaprogramming
──Details
PublishedNovember 4, 2026 at 12:42 AM
Content Hashsha256:4b5f84777d3e1f0d...
Git SHA5d098c90c1e6
──Files
Files (1 file, 1.4 KB)
SKILL.md1.4 KBactive
SKILL.md · 27 lines · 1.4 KB
name: d-systems-metaprogramming id: ISS-010 token_budget: 700 chain_with: [cpp-modern-raii, nim-ast-systems, odin-data-oriented] description: "D (@safe / -betterC) systems programming, compile-time function execution (CTFE), design-by-contract, and scoped lifetimes." metadata: version: "1.0.0"
d-systems-metaprogramming (ISS-010)
1. First-Principles Invariant
- Bright/Alexandrescu Design-by-Contract Law: Annotate modules with
@safe pure nothrow @nogcanddip1000scoped pointer lifetimes so memory and GC constraints are compiler-enforced.
2. Fast-Pass Low-Token Protocol (Web & Coding Agents)
- Use templates (
if (isIntegral!T)) and CTFE (enum table = buildTable();) to generate optimal specialized machine code without C preprocessor macros.
3. Zero-Bug & Zero-Vulnerability Guards
- Enable
-preview=dip1000and mark borrowed referencesscopeorreturn scopeto prevent escaping stack pointers. - Use
-betterCfor freestanding kernels, C-ABI libraries, and zero-runtime targets where D runtime/GC is prohibited. - Attach
in (...)preconditions,out (result; ...)postconditions, andinvariant { ... }blocks to stateful aggregates. - Use
scope(exit),scope(failure), andscope(success)guards immediately after resource acquisition. - Verify bounds safety in
@trustedblocks with explicit slice length assertions (assert(idx < slice.length)).
4. Verification Gate
ldc2 -O2 -dip1000 -w -wi -unittest