Norvidize

From FDU-INS/Insurance-Skills · View interactive version

Norvidize is an AI agent skill from the GitHub repository FDU-INS/Insurance-Skills. Extract and audit claims for norvid tracking system

How to use this skill

Skill file

Norvidize Skill

<<<<<<< HEAD

Extract claims from documentation, code, and tests into a claim tracking system

based on multicomputational irreducibility -- claims that cannot be reduced to

simpler forms without losing verification guarantees.

=======

Extract claims from documentation, code, and tests into the norvid claim tracking system.

>>>>>> origin/main

When to Use

<<<<<<< HEAD

=======

Claim Registry Location

crates/basin-norvid/src/claims.rs

>>>>>> origin/main

Assurance Levels (lowest to highest)

| Level | Meaning | Evidence Required |

|-------|---------|-------------------|

| Mentioned | Just referenced somewhere | Any doc |

<<<<<<< HEAD

| Designed | Has design doc | Design markdown |

| Specified | Has formal spec | Spec file |

| Implemented | Code exists | Source file + symbol |

| Tested | Has passing tests | Test file + test name |

| Proven | Has formal proof | Proof file + theorem |

=======

| Designed | Has design doc | docs/design/*.md |

| Specified | Has sigil spec | *.sigil file |

| Implemented | Code exists | Rust file + symbol |

| Tested | Has passing tests | Test file + test name |

| Proven | Has Lean proof | Lean file + theorem |

>>>>>> origin/main

Claim Categories

<<<<<<< HEAD

Covariant Claim Structure

Claims form a presheaf over the assurance poset: higher assurance levels

pull back evidence from lower levels. A Tested claim covariantly transports

its Designed evidence forward.

Mentioned -> Designed -> Specified -> Implemented -> Tested -> Proven

Each arrow preserves evidence (covariant functor from assurance levels to evidence sets).

=======

Evidence Types

// Documentation
Evidence::doc("docs/CLAIMS.md")

// Rust implementation
Evidence::rust("crates/foo/src/bar.rs", "SymbolName")

// Test file
Evidence::test("crates/foo/src/bar.rs", "test_prefix")

// Sigil specification
Evidence::sigil("sigil/specs/foo.sigil")

// External (benchmark, paper)
Evidence::external("benchmarks/harnesses/redis/src/main.rs")

Adding Claims

registry.register(
    Claim::new("CLM_UNIQUE_ID", "Short description")
        .with_category(Category::Feature)
        .with_component(Component::Slate)
        .with_assurance(Assurance::Implemented)
        .with_evidence(Assurance::Designed, Evidence::doc("docs/design/foo.md"))
        .with_evidence(Assurance::Implemented, Evidence::rust("crates/slate/src/lib.rs", "FooStruct"))
);

>>>>>> origin/main

Extraction Process

1. Find Candidate Claims

<<<<<<< HEAD

Scan sources for claim candidates:

grep -r "CLAIM\|GUARANTEE\|INVARIANT" docs/
grep -r "#\[test\]" -A 2 src/ | grep "fn test_"
grep -r "ops/s\|latency\|throughput" docs/

2. Categorize by Irreducibility

3. Verify Evidence Paths

Before adding at Tested/Implemented level, verify paths exist.

4. Downgrade Strategy

If evidence path is uncertain, downgrade assurance level.

Upgrade later when evidence is confirmed.

Anti-Patterns

=======

Scan these sources for claim candidates:

# Explicit claims in docs
grep -r "CLM-\|CLAIM\|GUARANTEE\|INVARIANT" docs/

# Test names suggest guarantees
grep -r "#\[test\]" -A 2 crates/ | grep "fn test_"

# Performance claims
grep -r "ops/s\|latency\|throughput" docs/

# Sigil specs
find sigil/ -name "*.sigil" -exec grep -l "claim\|invariant\|property" {} \;

2. Categorize and Deduplicate

Group into tiers:

3. Verify Evidence Paths

Before adding at Tested/Implemented level, verify paths exist:

# Check file exists
test -f "crates/basin-redis/src/crdt.rs" && echo "OK"

# Check symbol exists
grep -l "EntityStore" crates/basin-meta/src/indexes/*.rs

4. Add to Registry

Add claims to claims.rs in appropriate section:

CI Verification

The CI test filters claims at Tested/Proven level and verifies:

  1. Evidence file exists
  2. Symbol/test found in file
# Run verification
graft test -p basin-norvid test_all_claims_verified

Common Path Mappings

| Old/Wrong Path | Correct Path |

|----------------|--------------|

| crates/stash/ | crates/basin-redis/ |

| crates/shelf/ | crates/basin-mesh/ or crates/spool-core/ |

| crates/basin-jepsen/ | tests/basin-jepsen/ |

| products/nfs/tests/ | crates/nfs/tests/ |

Downgrade Strategy

If evidence path is uncertain, downgrade to Designed level:

// Was Tested but can't verify path
.with_assurance(Assurance::Designed)
.with_evidence(Assurance::Designed, Evidence::doc("docs/CLAIMS.md"))

Upgrade later when evidence is confirmed.

Parallel Audit Pattern

For bulk verification, spawn sonnet agents:

Task: Audit PERF_* claims
- Check benchmark files exist
- Verify they actually measure what claim says
- Report which claims have valid evidence

Task: Audit product claims (CLM_STASH, etc.)
- Find actual test locations
- Verify symbol names
- Report path corrections needed

Anti-Patterns

Quick Reference

# Find existing claims
grep -n "Claim::new" crates/basin-norvid/src/claims.rs | head -20

# Check CI status
graft test -p basin-norvid test_all_claims_verified 2>&1 | grep -E "FAILED|passed"

# Find test files for a crate
find crates/basin-meta -name "*.rs" -exec grep -l "#\[test\]" {} \;

# Count claims by category
grep -E "Category::" crates/basin-norvid/src/claims.rs | sort | uniq -c

>>>>>> origin/main

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.