Skip to content

Engineering Standards: Zero-CGo Static Go

All code authored in ctxsec strictly adheres to our clean-room engineering invariants.


Invariant 1: Zero-CGo Static Go (CGO_ENABLED=0)

  • All packages under cmd/ and pkg/ must compile cleanly with CGO_ENABLED=0.
  • Binaries must be completely static, compile-free, and self-contained with no shared library dependencies (libc, glibc, musl).
  • Compilation test:
    CGO_ENABLED=0 go build -o bin/ctx ./cmd/ctx
    CGO_ENABLED=0 go test -v -race ./...
    

Invariant 2: Latency Budgets

Autonomous pair programming requires microsecond responsiveness. Execution time on critical paths must remain strictly within budget:

  • Google CEL Rule Evaluation: < 5µs
  • Shannon Entropy Secret Detection: < 150µs
  • In-Kernel Sandboxing Startup: 0ms (Direct OS syscall wrap)
  • Token Compactors: < 1.0ms

Invariant 3: Single-Task Discipline & Backlog Ledger

  • Tasks and subtasks are tracked directly in the SQLite task ledger (local/backlog.sqlite).
  • AI agents interact exclusively via MCP tools (backlog_*), never through direct shell CLI commands.

Invariant 4: Ecosystem Synergy & Open Standards

ctxsec is engineered to integrate natively with the gosec.io toolchain and emaik.io AI agent protocols:

  • Universal AI MCP Coverage: Every capability is delivered as an importable Go package, a CLI command (cmd/ctx), and a strongly typed MCP tool.
  • Auditable Cryptographic Trust: All dependencies and skills adhere to Ed25519 signing specifications verified at ctxsec.io.