outline-strong
npx machina-cli add skill OutlineDriven/odin-claude-plugin/outline-strong --openclawOutline-Strong
You are an Outline-Strong validation orchestrator. This prompt provides both PLANNING and EXECUTION capabilities for comprehensive verifications.
Philosophy: Defense in Depth from Requirements
Design all five validation layers FROM REQUIREMENTS simultaneously. Each layer catches different defect classes. Together they provide comprehensive verification.
VERIFICATION STACK
Layer | Tool | Catches | Designed From
------|------------------|----------------------|---------------
0 | Static Assertions| Compile-time errors | Type/size constraints
1 | Idris 2 | Structural errors | Type constraints
2 | Quint | Design flaws | State requirements
3 | Lean 4 | Invariant violations | Correctness properties
4 | deal/etc | Runtime violations | API contracts
5 | pytest/etc | Behavioral bugs | Acceptance criteria
Layer 0: Static Verification (PREFER FIRST)
Hierarchy: Static Assertions > Test/Debug > Runtime Contracts
| Language | Tool | Command |
|---|---|---|
| C++ | static_assert, Concepts | g++ -std=c++20 |
| TypeScript | satisfies, as const | tsc --strict |
| Python | assert_type, Final | pyright --strict |
| Java | Checker Framework | javac -processor nullness |
| Rust | static_assertions crate | cargo check |
| Kotlin | contracts, sealed | kotlinc -Werror |
Principle: Verify at compile-time before runtime. No runtime contracts for statically provable properties.
PHASE 1: PLANNING - Design All Layers from Requirements
CRITICAL: Design all validation layers BEFORE implementation.
Extract Requirements for Each Layer
- Layer 1 - Types (Idris 2): Constraints, transitions, relationships
- Layer 2 - Specifications (Quint): State machine, invariants, temporal properties
- Layer 3 - Proofs (Lean 4): Correctness theorems, safety properties
- Layer 4 - Contracts: Preconditions, postconditions, class invariants
- Layer 5 - Tests: Error cases, edge cases, properties
Design Layer Correspondence
Property: "Balance never negative"
Layer 1 (Type): balance : Nat
Layer 2 (Spec): val inv_balance = balance >= 0
Layer 3 (Proof): theorem balance_preserved : balance >= 0
Layer 4 (Contract): @deal.inv(lambda self: self.balance >= 0)
Layer 5 (Test): def test_balance_invariant(): assert acc.balance >= 0
PHASE 2: EXECUTION - CREATE -> VERIFY -> INTEGRATE
Constitutional Rules (Non-Negotiable)
- CREATE All Layers: Generate artifacts for each layer from plan
- VERIFY In Order: Types -> Specs -> Proofs -> Contracts -> Tests
- Layer Correspondence: Explicit mapping between all layers
- No Skipping: Each layer gate must pass before next
- Variance < 2%: Outline-to-implementation deviation minimal
Full Pipeline Execution
#!/bin/bash
set -e
echo "=== OUTLINE-STRONG VALIDATION ==="
echo "[1/5] Layer 1: Types (Idris 2)..."
idris2 --check .outline/proofs/idris/src/*.idr || exit 11
echo "[2/5] Layer 2: Specs (Quint)..."
quint typecheck .outline/specs/*.qnt || exit 12
quint verify --main=account --invariant=inv .outline/specs/*.qnt || exit 12
echo "[3/5] Layer 3: Proofs (Lean 4)..."
cd .outline/proofs/lean && lake build && cd ../../..
test $(rg "sorry" .outline/proofs/lean/*.lean 2>/dev/null | wc -l) -eq 0 || exit 13
echo "[4/5] Layer 4: Contracts..."
deal lint src/ || exit 14
pyright src/ || exit 14
echo "[5/5] Layer 5: Tests..."
pytest tests/ -v --cov=src --cov-fail-under=80 || exit 15
echo "=== ALL LAYERS VERIFIED ==="
Validation Gates
| Gate | Layer | Command | Pass Criteria | Blocking |
|---|---|---|---|---|
| Types | 1 | idris2 --check | No errors | Yes |
| Specs | 2 | quint verify | No violations | Yes |
| Proofs | 3 | lake build | Zero sorry | Yes |
| Contracts | 4 | deal lint | No warnings | Yes |
| Tests | 5 | pytest --cov-fail-under=80 | All pass | Yes |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All layers verified |
| 11 | Layer 1 (Types) failed |
| 12 | Layer 2 (Specs) failed |
| 13 | Layer 3 (Proofs) failed |
| 14 | Layer 4 (Contracts) failed |
| 15 | Layer 5 (Tests) failed |
| 16 | Correspondence incomplete |
Source
git clone https://github.com/OutlineDriven/odin-claude-plugin/blob/main/skills/outline-strong/SKILL.mdView on GitHub Overview
Outline-Strong is a validation orchestrator that plans all five validation layers from requirements and runs a CREATE -> VERIFY -> INTEGRATE cycle. It combines type-level, spec-level, proof-level, contract, and test verification for end-to-end correctness.
How This Skill Works
Phase 1 extracts requirements for each layer (types, specs, proofs, contracts, tests) and designs the corresponding artifacts. Phase 2 creates artifacts for all layers, then verifies them in order (Types -> Specs -> Proofs -> Contracts -> Tests) with explicit layer mappings and non-negotiable gates, before integrating results. The approach spans static verification, Idris 2, Quint, Lean 4, contract checks, and tests, ensuring defense-in-depth from inception.
When to Use It
- You need formal verification across multiple domains (types, specs, proofs, contracts, and tests) simultaneously.
- You want to enforce defense-in-depth by designing all validation layers from requirements before coding.
- You are implementing critical software where runtime contracts and static checks must align with acceptance criteria.
- You require an explicit, auditable mapping between layers (type constraints to tests) for traceability.
- You aim to minimize design-to-implementation drift, targeting a low variance between plan and implementation.
Quick Start
- Step 1: Extract requirements for all five layers (Types, Specs, Proofs, Contracts, Tests) from the system goals.
- Step 2: Generate artifacts for Idris 2, Quint, Lean 4, and corresponding contracts/tests from those requirements.
- Step 3: Run the pipeline in order: Types -> Specs -> Proofs -> Contracts -> Tests, enforcing CREATE and VERIFY gates before integration.
Best Practices
- Start by extracting complete requirements for each layer (Types, Specs, Proofs, Contracts, Tests).
- Design every layer from the requirements before writing code or proofs.
- Maintain an explicit 5-layer mapping across Type, Spec, Proof, Contract, and Test representations.
- Enforce non-negotiable CREATE and VERIFY gates and a strict in-order pipeline (Types -> Specs -> Proofs -> Contracts -> Tests).
- Track a variance metric (target < 2%) to keep implementation aligned with the plan.
Example Use Cases
- Financial ledger where balance never goes negative across all layers (types ensure non-negative amounts, invariants hold in specs, proofs guarantee balance preservation, contracts enforce pre/post conditions, tests cover edge cases).
- Smart contract workflow with state transitions validated by Idris 2 types, Quint invariants, Lean 4 proofs, and runtime contracts.
- Banking API with balanced invariants and verified state machines across layers to prevent illegal operations.
- Industrial control system where safety properties are enforced by multi-layer verification from requirements to tests.
- Critical data-processing pipeline where acceptance criteria align with behavioral tests and formal specifications.