{"slug": "stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot", "title": "Stave is the Substrate: Five Reasoning Paradigms on One Snapshot", "summary": "A developer behind Stave, a cloud security tool whose catalog of over 3,000 controls is written in YAML and CEL, ran a trial in which five reasoning engines — Z3 (SMT), Soufflé (Datalog), Clingo (answer-set programming), Prolog, and PRISM (probabilistic model checking) — produced correct answers from Stave's exports without reading Stave's source code. Three of the five passed on the first attempt; the Clingo and Prolog runs failed, were traced to a wrong predicate name and a golden-transcription error respectively, and passed after fixes, with results committed to reasoning-specs/TRIAL-RESULTS.md and re-run by a fresh sub-agent. The developer frames the result as a category split: AWS Compliance Mod is scoped to per-resource checks, while Stave acts as a substrate any reasoning paradigm can target.", "body_md": "✓ Human-authored analysis; AI used for formatting and proofreading.\n\nAWS Compliance Mod is the canonical implementation of one\n\nreasoning paradigm per-resource SQL benchmarks against\n\nframework requirements. Stave is the substrate. Five\n\nreasoning engines: SMT, Datalog, answer-set programming,\n\nProlog, probabilistic model checking produce correct\n\nanswers from Stave's exports without reading a line of\n\nStave's source code.\n\nPrevious article [Stave and the AWS Compliance Mod: why we ship both](https://dev.to/bala_paranj_059d338e44e7e/stave-and-the-aws-compliance-mod-why-we-ship-both-5kp), makes the per-feature complementarity argument: compound chain detection by Stave covers the compositional risk class that per-resource framework checks (AWS Compliance Mod) can't see by construction. That framing is still correct. Run both; they cover orthogonal territory.\n\nThis article makes the bigger claim. The complementarity isn't just \"we have compound detection; they have framework coverage.\" It's \"we ship a contract that arbitrary reasoning engines can target; they ship one specific reasoning paradigm.\" That's a category split.\n\nThe proof is a trial that already happened, with results committed to the repo, and a fresh-sub-agent re-run that survives the \"but maybe the spec author leaked the answer\" objection.\n\nEvery cloud security tool can be located on the **reasoning-paradigm × content-coverage** grid:\n\n| Reasoning paradigm | Content shape | \n|---|---|\n| Per-resource attribute checks | \"Is this bucket encrypted? Is this role MFA-enforced?\" | \n| Compound / chain composition | \"Do these three settings combine into a Capital One path?\" | \n| Transitive closure (Datalog) | \"What is the complete blast radius from this principal?\" | \n| SMT satisfiability | \"Does there exist any assignment that violates this invariant? Show me the witness or prove none exists.\" | \n| Probabilistic model checking | \"Given the observed protection factors, what's the probability of successful exploitation?\" | \n| Proof-tree derivation (Prolog) | \"Trace the proof chain — root, edges, leaves — for this conclusion.\" | \n| Game-theoretic adversary modeling | \"What's the optimal attacker move given the defender's posture?\" | \n\n`turbot/steampipe-mod-aws-compliance` occupies one row in that grid with per-resource attribute checks and covers it exhaustively: 540+ controls across 16+ frameworks. Mature, auditor-recognized, the right tool for \"am I CIS-compliant right now?\"\n\nStave occupies the row dimension as a substrate: **any reasoning paradigm with an engine-agnostic input format** can target the same Stave exports. The catalog (over 3,000 controls today) is written in YAML + CEL; the exports project into SMT-LIB, JSONL, RDF / JSON-LD, and the engine-native formats those paradigms consume.\n\nThe category split: AWS Compliance Mod is row-scoped. Stave is dimension-scoped.\n\n`reasoning-specs/TRIAL-RESULTS.md` in the Stave repo records the first-round trial. Five reasoning specs and engines.\n\nEach spec carries:\n\nThe trial: hand the spec + input fixture + export-schema documentation to an agent. Withhold the original implementation code and the golden answer. The agent must produce output that matches the golden via the spec's validation rules.\n\n**Round 1 (same-session) results:**\n\n| # | Engine | Outcome | \n|---|---|---|\n| 1 | Z3 (SMT-LIB) | **PASS** — exact match on verdict + witness | \n| 2 | Soufflé (Datalog) | **PASS** —`anonymous_reachable_count: 12` byte-identical | \n| 3 | Clingo (ASP) | **FAIL → fixed → PASS** (spec bug:`mfa_enforced` should have been`has_mfa_enforced` ) | \n| 4 | Prolog | **FAIL → fixed → PASS** (golden transcription bug: spec said 6 proofs, actual file has 12) | \n| 5 | PRISM (probabilistic) | **PASS** — step probabilities exact, aggregate within ±0.005 | \n\nThree of five passed straight. Two failures caught real defects and the trial harness distinguished the two failure types. Clingo's failure was the spec author's error (wrong predicate name). Prolog's failure was the inventory author's error (mis-counted the golden). Same trial format, two distinct bug categories, both surfaced precisely.\n\nTrial format did its job. The spec is wrong when the agent can't derive the engine's output from the spec; the golden is wrong when the agent's output matches the engine's actual output but not the golden.\n\nThe Round 1 trial had one disclosure: the spec author and the trial agent were the same session. Even with the answer withheld from the spec, contextual leak was possible (\"the author would unconsciously phrase the spec to produce the right answer they already know\").\n\n**Round 2 was a fully-blind re-run.** Two of the five trials (Prolog + Clingo) had spec changes after Round 1. The Round 2 agent was a fresh sub-agent with no access to:\n\n`spec.yaml` (which carried the answer in a comment)`golden.yaml` (the answer key)`examples/<engine>/` directory\nThe fresh agent received only `spec-trial.yaml` (answer stripped), `input.jsonl`, and `export-schema.md`.\n\n**Both blind trials passed:**\n\n**Prolog (blind, medium confidence):** the agent correctly\n\nderived 12 proofs via the cartesian-product semantic. The\n\npost-fix golden count without seeing the explanation\n\ncomment in the spec file.\n\n**Clingo (blind, high confidence):** the agent correctly used\n\n`has_mfa_enforced` with the `has_` prefix is the naming-\n\nconvention rule the post-fix spec added. The fresh agent\n\nrecovered the convention from the spec alone.\n\nThe blind agents flagged two non-defects (Prolog's spec doesn't pin output ordering or indentation width). Both are explicitly in the spec's `ignore:` list confirming the ignore-list entries are foundational and prevent false-FAIL on correct answers.\n\nFull results: `reasoning-specs/BLIND-TRIAL-RESULTS.md` in the repo.\n\nThree claims that the trial validates:\n\n**Reasoning specs are sufficient for agent execution.**\n\nBlind agents produced correct answers from spec + input +\n\nexport-schema alone. No source-code access required.\n\n**The spec YAML format works.** All five specs parsed. \n\nAgents followed reasoning steps to completion on\n\nevery trial.\n\n**Stave's export contracts are complete (for the validated engines).** No missing-input-field warnings from any trial\n\nSince the original trial, four more engines have closed the gap with fixture-tied golden outputs: **PySAT** (compound-chain satisfiability via `sat-control-regression/`), **TLA+** (temporal-safety state-space exploration with drift margins via `tlaplus-temporal-safety/`), **game-theoretic cost modeling** (attacker-optimal paths + defender ROI ranking via `game-theory-cost/`), and **HIPAA / CIS / NIST evidence packs** (single-document executive summaries with control matrices via `compliance-evidence/`). That brings the validated engine count to nine.\n\nThree export-format engines remain without a committed fixture-to-golden round-trip: STIX 2.1, JSON-LD / GraphML, and OSCAL / OCSF compliance mapping. All three have working Go exporters shipping in the binary (`stave graph export --format stix|jsonld|graphml`, `stave export oscal`, `stave export ocsf`). The gap is a committed expected-output file for one specific fixture, which is prerequisite work before spec authoring. Engine status is tracked in `reasoning-specs/INVENTORY.md`.\n\nStandard cloud security tools require Go / Python / TypeScript fluency to contribute. The contribution surface is \"write code that calls the tool's API.\"\n\nStave's contribution surface is two artifacts:\n\n**1. A YAML control** (~30 lines) defining a security property in CEL. Anyone who knows YAML + CEL can contribute one. The existing 3,000+ controls are reference templates.\n\n**2. A reasoning spec** (~50 lines) defining a security question + the reasoning chain an engine should follow + the golden answer for one fixture. Anyone who can articulate the question + the chain can contribute one.\n\nIn both cases, the contribution ships exactly the same as if it came from the maintainer. There's no plugin loader to learn, no internal API to bind against, no build-system gymnastics.\n\nThis is a much larger contributor pool than \"people who can read Go and the host tool's codebase.\" That's the substrate benefit operationalized: the artifact format is the contribution boundary, and the format is small enough for security engineers without backend-systems backgrounds to author against.\n\nThree operator scenarios with the right tool for each:\n\n**\"I need framework benchmark dashboards for an auditor.\"**\n\nInstall `turbot/steampipe-mod-aws-compliance`. It renders CIS / PCI-DSS / HIPAA / NIST / SOC 2 / FedRAMP / GxP / AWS FSBP benchmarks with framework-section IDs the auditor recognizes. This is the row Stave doesn't compete on.\n\n**\"I need to catch the Capital One pattern before it ships.\"**\n\nInstall Stave. The compound chain engine names the multi-resource composition that per-resource scanners can't see by construction. The full per-feature comparison is at [`aws-compliance-mod`](https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md).\n\n**\"I need a mathematical proof that no unauthorized principal can reach this PHI bucket.\"** Install Stave + Z3. Export the relevant SIR facts with `stave export-sir --format smt2`, write the SMT-LIB assertion that encodes \"any principal without the DataOwner tag has effective_access to PHI bucket via any chain of role assumptions,\" check satisfiability. `unsat` is a proof; `sat` with a witness is the specific path to fix.\n\n**\"I need the blast radius of compromising this role.\"**\n\nInstall Stave + Soufflé. Export with `--format jsonl`, run the bundled reachability program, get the complete transitive closure of (principal, action, resource) tuples. Per-resource scanners answer \"is this specific path open?\"; Soufflé answers \"how wide is the open territory?\"\n\n**\"I need the probability the path is exploitable given the protection factors.\"** Install Stave + PRISM. Export the state-transition facts, append the PRISM model, run model checking. Per-resource scanners answer binary present / absent; PRISM answers a probability conditioned on the actual configuration's protection mix.\n\nEach engine answers a structurally different question. The substrate makes that possible.\n\nThe original [`stave-and-aws-compliance-mod`](https://dev.to/bparanj/stave-and-the-aws-compliance-mod-why-we-ship-both) article argued the per-feature complementarity: AWS Compliance Mod handles per-resource framework coverage; Stave handles compound risk and ghost references. That framing is sufficient for operators choosing tools today.\n\nThis article extends the framing for architects categorizing where each tool lives. **AWS Compliance Mod is one implementation in one cell of the reasoning-paradigm grid. Stave is the substrate the cells point at.** Both framings are correct; pick the one that fits your reader's question.\n\nThe full comparison-doc canonical reference is at\n\n[`aws-compliance-mod`](https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md).\n\nThe full reasoning-contract explanation is at\n\n[`reasoning-contract`](https://github.com/sufield/stave-guide/blob/main/explanation/reasoning-contract.md).\n\nThe trial-results documentation is at\n\n`TRIAL-RESULTS`\n\nand\n\n[`BLIND-TRIAL-RESULTS`](https://github.com/sufield/stave/blob/main/reasoning-specs/BLIND-TRIAL-RESULTS.md).\n\n[Stave](https://github.com/sufield/stave) is open-source. The reasoning-spec format + trial harness ship in `reasoning-specs/`. Nine engines validated with fixture-tied golden outputs; three export-format engines remain as extension targets in `reasoning-specs/INVENTORY.md`. Try the working trials: `cd stave && bash reasoning-specs/trials/<trial-name>/run.sh`.", "url": "https://wpnews.pro/news/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot", "canonical_source": "https://dev.to/bala_paranj_059d338e44e7e/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot-l1a", "published_at": "2026-11-20 12:10:04+00:00", "updated_at": "2026-11-20 12:12:30.713565+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Stave", "AWS Compliance Mod", "Z3", "Soufflé", "Clingo", "Prolog", "PRISM", "Steampipe"], "also_reported_by": [], "takeaway": "Five reasoning engines (Z3, Soufflé, Clingo, Prolog, PRISM) reproduced golden compliance answers from Stave's exports alone, and the two initial failures traced to a wrong predicate name and a miscounted proof file rather than engine errors.", "recommendation": {"advice": "Withhold the implementation and golden answer when testing whether a spec is engine-agnostic, and classify failures as spec defects versus engine defects before trusting the result.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot", "markdown": "https://wpnews.pro/news/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot.md", "text": "https://wpnews.pro/news/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot.txt", "jsonld": "https://wpnews.pro/news/stave-is-the-substrate-five-reasoning-paradigms-on-one-snapshot.jsonld"}}