Skip to content

Conversation

@copyleftdev
Copy link

Summary

Adds kai-verification-system — a verification-first engineering pack with deterministic simulation testing, time compression, and exhaustive fault injection.

What's Included

Skills & Workflows (5 files)

  • SKILL.md — Routing and tier selection
  • tier-1-universal.md — All code: assertions, bounds, exhaustive input
  • tier-2-stateful.md — + Time simulation, state transitions
  • tier-3-distributed.md — + Network faults, crash recovery
  • tier-4-storage.md — + Disk faults, linearizability (VOPR-style)

Context Files (4 files)

  • verification-principles.md — Core philosophy (Safety > Performance > DX)
  • assertion-patterns.md — Language-specific assertion templates
  • simulation-patterns.md — DST implementation patterns
  • checklist-templates.md — Design review, code review, pre-commit

Tools (3 files)

  • assertion-density.ts — Analyze assertion count per function
  • bounds-checker.ts — Find unbounded loops/queues/recursion
  • simulation-harness.ts — Time-compressed simulation runner

Library (1 file)

  • deterministic-random.ts — Seeded PRNG + SimulatedClock

Key Features

  • Tiered verification — Apply appropriate rigor based on system complexity
  • Deterministic seeds — Every random value reproducible
  • Time compression — Simulate years in seconds
  • Assertion density — Minimum 2 assertions per function
  • Zero technical debt — Problems solved when discovered

Inspiration

  • FoundationDB deterministic simulation testing
  • NASA Power of Ten rules
  • Safety-critical engineering practices

Validation

bun run Tools/validate-pack.ts kai-verification-system
→ ✅ kai-verification-system 🎯 (skill) - All checks passed

All tools execute correctly with Bun.

Verification-first engineering with deterministic simulation testing,
time compression, and exhaustive fault injection.

Features:
- Four-tier verification system (universal → stateful → distributed → storage)
- Deterministic seeds for reproducible testing
- Time compression for simulating years in seconds
- Assertion density tooling (min 2 per function)
- Bounds checker for unbounded loops/queues
- Simulation harness for fault injection

Inspired by FoundationDB DST, NASA Power of Ten, and safety-critical engineering.
@danielmiessler
Copy link
Owner

Thank you @copyleftdev for the verification system concept! 🙏

PAI v2.1 now includes VERIFY.md files in every pack with mandatory completion checklists. Your ideas around verification helped inform this direction.

With the restructure (kai-*pai-*), feel free to revisit this against the new structure!

See the release: https://github.com/danielmiessler/PAI/releases/tag/v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants