Get the FREE Ultimate OpenClaw Setup Guide →

outline-strong

npx machina-cli add skill OutlineDriven/odin-claude-plugin/outline-strong --openclaw
Files (1)
SKILL.md
5.0 KB

Outline-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

LanguageToolCommand
C++static_assert, Conceptsg++ -std=c++20
TypeScriptsatisfies, as consttsc --strict
Pythonassert_type, Finalpyright --strict
JavaChecker Frameworkjavac -processor nullness
Ruststatic_assertions cratecargo check
Kotlincontracts, sealedkotlinc -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

  1. Layer 1 - Types (Idris 2): Constraints, transitions, relationships
  2. Layer 2 - Specifications (Quint): State machine, invariants, temporal properties
  3. Layer 3 - Proofs (Lean 4): Correctness theorems, safety properties
  4. Layer 4 - Contracts: Preconditions, postconditions, class invariants
  5. 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)

  1. CREATE All Layers: Generate artifacts for each layer from plan
  2. VERIFY In Order: Types -> Specs -> Proofs -> Contracts -> Tests
  3. Layer Correspondence: Explicit mapping between all layers
  4. No Skipping: Each layer gate must pass before next
  5. 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

GateLayerCommandPass CriteriaBlocking
Types1idris2 --checkNo errorsYes
Specs2quint verifyNo violationsYes
Proofs3lake buildZero sorryYes
Contracts4deal lintNo warningsYes
Tests5pytest --cov-fail-under=80All passYes

Exit Codes

CodeMeaning
0All layers verified
11Layer 1 (Types) failed
12Layer 2 (Specs) failed
13Layer 3 (Proofs) failed
14Layer 4 (Contracts) failed
15Layer 5 (Tests) failed
16Correspondence 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

  1. Step 1: Extract requirements for all five layers (Types, Specs, Proofs, Contracts, Tests) from the system goals.
  2. Step 2: Generate artifacts for Idris 2, Quint, Lean 4, and corresponding contracts/tests from those requirements.
  3. 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.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers