Permit-and-Contract Engineering: Licensure-Grade Software Building Codes, Behavioral Control-Flow Verification, and Empirical Evaluation of Coding Agents¶
Framework: jezz (v0.8.0 — JBC Edition 1.3 / Polyglot Z3 SMT / PCE Runtime v1.6 / @jezz/blueprint CAD & LVS)
Runtime Target: Python 3.14, pydantic v2.14+, pydantic-ai & pydantic-graph v2.71+, icontract, Hypothesis, z3-solver, tree-sitter (TypeScript, Rust, Go), elkjs (@jezz/blueprint)
Abstract¶
Throughout 2025–2026, commercial coding-agent frameworks—most visibly GitHub spec-kit, Fission AI OpenSpec, and AWS Kiro—promoted "Spec-Driven Development" ("SDD"): a workflow that expands short user prompts into multi-file English Markdown documents (spec.md, design.md, tasks.md) prior to code generation and equates completion with checked-off - [x] task lists. We show theoretically and empirically that unverified prose specifications sever requirements from program semantics, compound assumption drift across stochastic generation hops, and launder critical defects behind human review fatigue. In response, we present jezz, a software engineering and coding-agent framework built on four pillars: (1) an atomic agent behavior basis of Fibonacci cardinality (\(|\mathcal{B}| = F_8 = 21\)) verified via Kildall monotone dataflow analysis over a height-5 product semi-lattice; (2) the Jezz Software Building Code (JBC Edition 1.3), comprising 32 deterministic static, graph-theoretic, subpackage compartment quotient-DAG (JBC-COG-006), whole-workspace inter-procedural call-flow, runtime-breaker, and dynamic-attestation provisions across Python (.py), TypeScript (.ts/.tsx), Rust (.rs), and Go (.go), paired with bounded Z3 SMT (QF_LIA/QF_NRA/QF_SLIA) symbolic contract verification (jezz prove), deterministic BlueprintGraph netlist extraction, switchable Sheet A-1 (Floor Plan) \(\leftrightarrow\) Sheet E-1 (elkjs Manhattan Wiring Schematic) CAD projections, and coarse-grained Layout-Versus-Schematic (LVS) boundary equivalence; (3) Permit-and-Contract Engineering (PCE), a five-phase, anti-Agile methodology combining reality-probed Phase 0/I ProjectCharter 3-axis intake, pre-flight LotLineAssessment package-split shear gates, compiled contract grounding, and dual-digest SHA-256 + Z3 occupancy seals (\(\mathcal{I} \models_{\text{PCE}} \mathcal{M}\)); and (4) a self-hosted pydantic-ai and pydantic-graph Extended Finite-State Machine (EFSM) runtime enacting all 21 / 21 basis behaviors across all four languages with least-privilege sandboxing, permit-gated BHV-13 PROVISION dependency management, persistent .jezz/memory.json memory (BHV-07 CURATE_MEMORY), AST/CST-grounded topological DAG planning, 12-slot tiered specialist routing, zero-credential antigravity:<slug> and scheme-dispatched (env://, pass://, op://, keychain://) secret isolation, a hot-reloading 21-tool workspace-jailed stdio Model Context Protocol (MCP) gate server (16 read-only + 5 ActiveWorkPermit/.jezz/codes/*.toml/telemetry tools), portable ${PLUGIN_ROOT} PreToolUse (RED -> GREEN permit lease) and Stop lifecycle hooks, and a reusable CI composite GitHub Action (action.yml). Evaluated across 8.27 million lines of 40-SHA-pinned brownfield source code (20,040 units across all 12 external Python, TypeScript, Rust, and Go repositories in benchmarks/brownfield_corpus.lock.json: 896,661 LOC across 11 repos in --tier full plus 7,369,730 LOC in kirodotdev/KiroCrew in --tier monorepo), 569 live controlled A/B workspace builds (Tracks 4, 10, & 21, plus 20 5-archetype matrix & weighted-rubric A/B builds in Wave 35A certifying 10/10 GOLD on PCE vs. 4/10 DISQUALIFIED on SDD, and 10 Track 7 cache-ablation builds; Control: Prose SDD vs. Treatment: jezz PCE spanning Python, TypeScript, Rust, and Go across Google Gemini 3.8 Flash / 4 Hydrogen / 4 Neon, Anthropic Claude Sonnet 5.5 / Opus 5.5, and OpenAI GPT-OSS 120B, including 432 stochastic multi-trial Gemini 4 builds across Wave 21C (optional SDD verify), recomputed Wave 21D (--sdd-require-verify), and unconfounded Wave 21E (explicit MANDATORY Stage 4 prompt + --sdd-require-verify) graded against seeded (--seed 20261202) held-out property/fuzz oracles with 432 committed workspaces/SHA-256 transcripts plus 48 archived single-trial Wave 21B Claude 5.5 builds), a 4-mandate longitudinal financial crucible (jezz-crucible-ledger, 2,693 LOC), 4 live polyglot autonomous probes, and 3 live surgical brownfield OSS renovations (jezz renovate --ratchet on go-chi/chi, serde-rs/json, and github/spec-kit), Prose SDD achieved 100% (248/248) Markdown - [x] validation across clean completions while producing only 18.7% (53/283) JBC-occupiable builds and 2,148 unwaived violations (159 LIFE_SAFETY). Upgrading SDD's Architect to a frontier model degraded downstream JBC compliance in Python across both Gemini and Claude as well as in several non-Python slices (Gemini Python: +61.0% in Wave 4D, 3 -> 12 LIFE_SAFETY in Wave 21C, 10 -> 22 in Wave 21D, and 6 -> 12 in Wave 21E; Claude Opus 5.5 Python: +21.2% in Wave 21B and +34.3% in Track 10; Rust +66.7% in 21B, +50.0% in 21D, +12.5% in 21E; TypeScript 1 -> 4 in 21E, whereas Go in 21C/21E and TypeScript in 21D decreased slightly or held at 0). Conversely, PCE achieved 100% task closure across all four languages on tiered Gemini and Claude (0 violations across every certified build, 0.0% silent defect escape on certified tiered builds, and 144 / 144 = 100.0% ± 0.0% across ALL 4 languages and BOTH uniform and tiered suites in Waves 21D & 21E). Pairing Wave 21C (N = 144, optional Stage 4 SDD verify_workspace_draft), Wave 21D (N = 144, --sdd-require-verify recomputed with failed-run token telemetry), and Wave 21E (N = 144, explicit MANDATORY Stage 4 prompt + --sdd-require-verify) resolved both the tool-parity and cost questions simultaneously: in 21C, SDD skipped optional verification on 56.9% (41/72) of runs (PCE +52.0% pooled / +32.9% tiered billed input); when 21D and 21E required Stage 4 SDD to verify its patches, SDD's monolithic multi-turn context raised its billed input from 8.33M (21C) to 20.89M (21D) and 20.52M (21E), inverting Gemini 4 costs in favor of jezz PCE across all four axes in both 21D (-33.6% gross, -38.3% pooled / -49.0% tiered billed input, -58.1% output, -44.7% latency) and unconfounded 21E (-34.3% gross, -39.3% pooled / -49.9% tiered / -28.3% uniform / -38.1% non-Python billed input, -58.0% output, -45.5% latency, winning all 8/8 cells; on the 18/72 21E and 25/72 21D runs where SDD called verify_workspace_draft proactively on Turn 1 without ModelRetry, SDD averaged 117.4K and 118.0K billed input vs. 164.9K and 176.5K PCE)—while SDD's JBC v1.3 occupancy stayed capped at 25.0% (18/72 in 21C and 21D) and 16.7% (12/72 in 21E; 0/108 Python) vs. 98.6% (71/72), 100.0% (72/72), and 100.0% (72/72) for PCE.
1. Critique of Marketed "Spec-Driven Development" & Formal Lineage¶
1.1 Primary-Source Pathology Analysis¶
Recent vendor offerings frame multi-stage Markdown generation as a foundational "Power Inversion" in software engineering:
- GitHub
spec-kit(github/spec-kit): Inspec-driven.md,spec-kitasserts that "For decades, code has been king. Specifications served code—they were the scaffolding we built and then discarded... The Product Requirements Document (PRD) isn't a guide for implementation; it's the source that generates implementation." Under the hood,spec-kitcontains no parser, typechecker, or solver:/speckit.specify\(\to\)/speckit.plan\(\to\)/speckit.tasks\(\to\)/speckit.implementare chat slash-prompts feeding English prose to a probabilistic model, while.specify/memory/constitution.mdrelies strictly on system-prompt compliance. Running/speckit.implementtwice on identical Markdown yields structurally incompatible implementations with divergent types and edge-case faults—provingspec.mdis a stochastic writing prompt, not an executable source artifact. - Fission AI
OpenSpec(Fission-AI/OpenSpec):OpenSpecmandates RFC 2119 modals (SHALL/MUST) and Gherkin-style#### Scenario:(GIVEN / WHEN / THEN) blocks inside Markdown delta files, gated byopenspec validate --strict. Whereas Behavior-Driven Development (North, 2006; Hellesøy, 2008) bound everyGiven/When/Thenclause to executable test step definitions,openspec validateinspects only Markdown heading and checkbox syntax. An implementation containing SQL injection sinks,except Exception: passblocks, andassert Truetests passesopenspec validate --strict --archivedwith exit code0once- [ ]is toggled to- [x]. - AWS Kiro (
kiro.dev): Kiro institutionalizes Scrum persona user stories (As <persona>, I want..., so that...) paired with Rolls-Royce EARS syntax (WHEN ... THE SYSTEM SHALL ...; Mavin et al., 2009) acrossrequirements.md,design.md, andtasks.md, supplemented by event-driven Agent Hooks. At Rolls-Royce, EARS served as a constrained pre-formal intake feeding DO-178B/C verification matrices—never a self-certifying endpoint. Kiro's Agent Hooks invoke additional non-deterministic LLM prompts on file save without formal pass/fail lattices, rollback guarantees, or protection against an agent weakening tests to match defective code.
1.2 Historical Erasure & The Economic Unlock Paradox¶
Conflating informal PRDs with "specifications" omits 55+ years of formal software engineering: Floyd–Hoare axiomatic semantics \(\{P\}\ C\ \{Q\}\) (1967–1969), Parnas's tabular avionics specifications and information-hiding modules (1972–1977), Z and VDM state schemas (1977–1978), Meyer's Design by Contract (require, ensure, invariant compiled directly into Eiffel, 1986–1997), Lamport's TLA+ (1999—used in production at AWS itself to verify S3 and DynamoDB; Newcombe et al., CACM 2015), Claessen & Hughes's QuickCheck property-based falsification (\(\forall x \in D: P(f(x))\), 2000), Jackson's Alloy (2002), and SMT-backed verifiers (SPARK Ada, Dafny, Frama-C).
Historically, formal contracts and property generators saw limited mainstream adoption for a single economic reason: human authoring cost under schedule pressure. Coding agents collapse the marginal cost of authoring strict domain types, preconditions/postconditions, and property-based generators toward zero—and agents converge reliably when constrained by deterministic compiler/AST feedback. Using LLMs to mass-produce 1990s prose PRDs and Agile checklists squanders that exact economic unlock.
1.3 Multi-Hop Stochastic Drift & Specification Laundering¶
Marketed SDD interposes a four-hop unverified natural-language chain between human intent \(I_0\) and executable code \(C_{\text{code}}\):
By the Data Processing Inequality, \(I(I_0; T_{\text{prose}}) \le I(I_0; S_{\text{prose}})\): ungrounded prose-to-prose transformations cannot increase mutual information with \(I_0\); each hop either discards boundary precision or injects unverified assumptions \(\epsilon_k\) (at \(90\%\) per-hop assumption fidelity, \(0.90^4 = 65.6\%\)). Simultaneously, inflating a 40-word prompt into 400–700 lines of repetitive Markdown induces Specification Laundering: human reviewers suffer review fatigue (documented independently by Böckeler, 2025) and rubber-stamp Approve, converting LLM hallucinations into the project's nominal specification.
2. Pillar 1: The \(F_8 = 21\) Agent Behavior Basis & CFG Dominance¶
2.1 Basis Separation and State Algebra¶
jezz separates atomic agent behaviors from both low-level tools (read_file, grep, git, pytest, MCP calls—which are interchangeable sensors/actuators) and high-level workflows ("fix bug", "renovate module"—which are composite directed graphs over atomic behaviors).
Every atomic behavior \(b \in \mathcal{B}\) denotes a typed state-transition contract over the four-domain product state space (AgentExecutionState in src/jezz/behaviors/runtime.py):
where \(\mathcal{P}\) (ProblemState) holds framed objectives, ambiguities, bound code IDs, and decomposed scopes; \(\mathcal{W}\) (WorldModelState) holds grounded code/environment/external observations, causal hypotheses, active delegations, and negative knowledge (falsified_paths); \(\Omega\) (WorkspaceState) tracks checkpoints, modified artifacts, and sealed commits; and \(\mathcal{E}\) (EvidenceState) records static/dynamic gate verdicts and occupancy certification.
The basis cardinality is constrained to the eighth Fibonacci number, \(|\mathcal{B}| = F_8 = 21\), partitioned across five strata (3 + 4 + 4 + 6 + 4 = 21):
- Stratum I — Governance (3): BHV-01 FRAME, BHV-02 ELICIT, BHV-03 BIND_CODES
- Stratum II — Epistemic (4): BHV-04 INSPECT_CODE, BHV-05 INSPECT_ENV, BHV-06 CONSULT, BHV-07 CURATE_MEMORY
- Stratum III — Topology (4): BHV-08 HYPOTHESIZE, BHV-09 DECOMPOSE, BHV-10 DELEGATE, BHV-11 RECONCILE
- Stratum IV — Mutation (6): BHV-12 CHECKPOINT, BHV-13 PROVISION, BHV-14 SPECIFY, BHV-15 INSTRUMENT, BHV-16 SYNTHESIZE, BHV-17 REFACTOR
- Stratum V — Verification (4): BHV-18 VERIFY_STATIC, BHV-19 VERIFY_DYNAMIC, BHV-20 REVERT, BHV-21 CERTIFY
2.2 Why a Fibonacci Cardinality Constraint? (Anti-Accretion Quantization)¶
Constraining \(|\mathcal{B}| \in \mathcal{F}\) (enforced at import and test time via Gessel's algebraic criterion \(5n^2 \pm 4 = k^2\) in src/jezz/behaviors/fibonacci.py and validate_basis_invariants in taxonomy.py; Gessel, 1972) is not a claim that coding agents possess a metaphysical attachment to the golden ratio—nor has it anything to do with Agile story-point rituals. It is a machine-checked anti-accretion and resolution-quantization lock designed to defeat the primary failure mode of agent taxonomies: \(+1\) enum creep.
In unconstrained frameworks, every new tool integration or domain workflow tempts authors to append a 22nd, 23rd, or 24th "behavior" (run_linter, query_db, open_pr), conflating actuators and composite workflows with state-algebra primitives. A static arbitrary cap (e.g., \(\le 25\)) still permits \(+1\) drift up to the ceiling without structural pressure. Requiring \(|\mathcal{B}| \in \{8, 13, 21, 34, 55, \dots\}\) imposes discrete geometric resolution steps spaced by \(\varphi \approx 1.618\times\):
1. Blocking Ad-Hoc \(+1\) Drift: Adding a single 22nd enum member immediately breaks validate_basis_invariants. To handle a proposed capability at \(|\mathcal{B}| = 21\), an author is forced to either (a) prove composite reducibility by expressing it as a directed subgraph over existing basis behaviors, (b) merge redundant behaviors with identical \((\text{reads}, \text{writes}, \text{effect})\) signatures, or (c) justify a full resolution jump (\(21 \to 34\), \(+13\) orthogonal state transitions across \(\Sigma\)).
2. Sub-Doubling Granularity Over Powers of Two (\(2^k\)): Powers of two (\(8, 16, 32\)) double at every step—leaving a \(+16\) cliff where \(16\) is too coarse to separate governance, epistemic, topology, mutation, and verification contracts while \(32\) invites tool-modality leakage. Fibonacci's \(\varphi \approx 1.618\) recurrence provides the canonical integer sequence with sub-doubling spacing, cleanly bracketing the abstraction boundary: at \(F_7 = 13\), distinct mutation contracts (SPECIFY, INSTRUMENT, SYNTHESIZE, REFACTOR) collapse into generic file editing (making Phase III-before-Phase IV ordering unenforceable on the graph), whereas at \(F_9 = 34\), sensor/actuator mechanics leak into \(\mathcal{B}\).
2.3 Pointed Labeled Control-Flow Graphs & Co-Reachability¶
A coding-agent task topology is a pointed, vertex-labeled directed graph (BehaviorGraph in src/jezz/behaviors/graph.py):
Let \(\Delta \subseteq \mathcal{B} \times \mathcal{B}\) denote the statutory 1-hop transition relation (ALLOWED_TRANSITIONS in src/jezz/behaviors/transitions.py). Structural legality requires:
1. Unique Entry & Local Adjacency: \(\ell(v_0) = \text{FRAME}\), \((v, v) \notin E\) (no self-loops), and \(\forall (u, v) \in E: (\ell(u), \ell(v)) \in \Delta\). In particular, \(\Delta\) forbids direct transitions from any mutating behavior \(M_{\text{mut}} = \{\text{PROVISION}, \text{SPECIFY}, \text{INSTRUMENT}, \text{SYNTHESIZE}, \text{REFACTOR}\}\) to \(\{\text{CERTIFY}, \text{ELICIT}, \text{FRAME}\}\), requires \(\text{ELICIT}\) to re-enter strictly via \(\text{FRAME}\), makes \(\text{CERTIFY}\) an absorbing sink (\(\Delta(\text{CERTIFY}) = \emptyset\)), and forbids blind retry (\(\Delta(\text{REVERT}) \cap (M_{\text{mut}} \cup \{\text{CHECKPOINT}\}) = \emptyset\)).
2. Forward Reachability & Backward Co-Reachability: Let \(R \subseteq V\) be the vertices reachable from \(v_0\), and let \(S = \{v \in R \mid \deg^+(v) = 0\}\) be the reachable sinks. Every sink must satisfy \(\ell(v) \in \{\text{CERTIFY}, \text{ELICIT}\}\), and every reachable vertex must be co-reachable from \(S\) (\(R = \text{Pre}^*(S) \cap R\)). This rules out livelock trap cycles (e.g., an infinite VERIFY_STATIC -> REVERT -> HYPOTHESIZE -> SYNTHESIZE loop with no escape edge to CERTIFY or ELICIT).
2.4 Kildall Monotone Dataflow Verification on a Height-5 Lattice¶
Local 1-hop legality \((\ell(u), \ell(v)) \in \Delta\) is necessary but insufficient: a multi-hop path could enter SYNTHESIZE without ever executing BIND_CODES or CHECKPOINT, or branch around VERIFY_DYNAMIC into CERTIFY. Because valid agent workflows contain directed cycles (authority elicitation loops and bounded REVERT -> HYPOTHESIZE remediation loops), verify_behavior_graph solves a monotone dataflow system (Kildall, 1973) over the finite-height product semi-lattice (NodeFlowFacts):
Each element \(x = (c, k, d_s, d_d, u) \in L\) tracks five boolean flow facts at node entry/exit, ordered componentwise by the confluence operator \(\sqcap: L \times L \to L\):
with unvisited identity \(\top = (\text{True}, \text{True}, \text{False}, \text{False}, \text{False})\) and entry seed \(x_{\text{init}} = (\text{False}, \text{False}, \text{False}, \text{False}, \text{False})\):
- \(c\) (codes_bound, MUST): set to \(\text{True}\) by BIND_CODES; required (\(c = \text{True}\)) at entry to \(M_{\text{mut}} \cup \{\text{DELEGATE}, \text{CERTIFY}\}\).
- \(k\) (checkpoint_active, MUST): set to \(\text{True}\) by CHECKPOINT; required (\(k = \text{True}\)) at entry to \(M_{\text{mut}} \cup \{\text{REVERT}\}\).
- \(d_s\) (may_be_dirty_static, MAY): set to \(\text{True}\) by \(\{\text{SPECIFY}, \text{INSTRUMENT}, \text{SYNTHESIZE}, \text{REFACTOR}\}\); cleared to \(\text{False}\) by \(\{\text{VERIFY\_STATIC}, \text{REVERT}\}\); must be \(\text{False}\) at CERTIFY.
- \(d_d\) (may_be_dirty_dynamic, MAY): set to \(\text{True}\) by \(\{\text{PROVISION}, \text{INSTRUMENT}, \text{SYNTHESIZE}, \text{REFACTOR}\}\); cleared to \(\text{False}\) by \(\{\text{VERIFY\_DYNAMIC}, \text{REVERT}\}\); must be \(\text{False}\) at CERTIFY.
- \(u\) (unreconciled_delegation, MAY): set to \(\text{True}\) by DELEGATE; cleared to \(\text{False}\) by RECONCILE; must be \(\text{False}\) at CERTIFY.
Proposition 1 (Fixed-Point Convergence & Linear Complexity): Each per-behavior transfer function \(f_b: L \to L\) (_transfer_facts) is a constant-set, constant-clear, or identity map on each independent coordinate, and is therefore monotone (\(x \sqsubseteq y \implies f_b(x) \sqsubseteq f_b(y)\)) and distributive (\(f_b(x \sqcap y) = f_b(x) \sqcap f_b(y)\)). Because \(L\) has finite height \(h(L) = 5\), each reachable vertex \(v \in R\) can descend the lattice at most \(5\) times from \(\top\), so worklist iteration converges to the exact Meet-Over-All-Paths (MOP) solution in at most \(5|R|\) node updates and \(\mathcal{O}(|V| + |E|)\) edge evaluations.
3. Pillar 2: The Jezz Software Building Code (JBC Edition 1.3) & Blueprint LVS¶
3.1 Statutory Architecture & Severity Taxonomy¶
Civil and electrical codes (NFPA 70 / NEC, IBC) recognize that happy-path energization ("the lamp turns on") does not establish safety: an ungrounded chassis or bypassed breaker operates normally until a fault occurs. Existing software standards leave an enforcement gap: ISO/IEC 25010 and IEEE 1016/29148 define non-decidable quality nouns, MITRE CWE catalogs ~900 post-mortem weaknesses rather than affirmative construction rules, and pre-LLM standards omit agentic failure modes—tautological assertions (AGT-THEATRE-01), hollow stubs (AGT-STUB-01), hallucinated/undeclared imports (AGT-HALLUC-01), # type: ignore / # noqa gate tampering (AGT-TAMPER-01), and hardcoded machine-local paths (AGT-PATH-01).
JBC Edition 1.3 (src/jezz/codes/codebook.py) codifies 32 machine-checkable provisions across 6 Articles, each classified into three statutory severities (8 + 18 + 6 = 32):
- LIFE_SAFETY (8 provisions — strictly non-waivable): Silent fault suppression (JBC-FLT-001), dynamic SQL/shell/eval injection (JBC-SEC-001), credential leakage (JBC-SEC-002), uncontained path/URL sinks (JBC-SEC-005), tautological/assertion-free tests (JBC-VRF-001), hollow stubs (JBC-VRF-002), and failed static/dynamic gate attestations (JBC-VRF-005, JBC-VRF-006). Attempting to instantiate a CodeVariance against any LIFE_SAFETY code raises ValueError at model construction.
- STRUCTURAL (18 provisions): Preconditions/postconditions (JBC-DBC-001), 100% static annotations & Any ban (JBC-DBC-002), total explicit return paths (JBC-DBC-003), @jezz_callable Option A public runtime signature breakers (JBC-DBC-004), bounded scalars/collections (JBC-DBC-005), causal raise ... from exc chaining (JBC-FLT-002), managed handles & sync timeouts (JBC-FLT-003), LoopBudget / fuel-bounded recursion (JBC-FLT-004), TaskGroup & async deadlines (JBC-FLT-005), bounded caches & read_bounded_text (JBC-FLT-006), STRICT_FROZEN_CONFIG closed schemas (JBC-SEC-003), typed JSON ingress/egress (JBC-SEC-004), dynamic path anchoring & hardcoded host/OS path prohibition (JBC-SEC-006), acyclic module topology & _private enclosures (JBC-COG-003), subpackage quotient acyclicity, floorplate caps & workspace fire-walls (JBC-COG-006), immutable defaults (JBC-OBS-002), manifest dependency grounding (JBC-VRF-003), and suppression bans (JBC-VRF-004).
- WORKMANSHIP (6 provisions): Cognitive Complexity \(\le 15\) (JBC-COG-001, configurable via PermitProfile.STRICT_INTERNAL / --profile strict_internal to \(\le 10\) and CodeThresholdOverrides), nesting \(\le 4\) / arity \(\le 6\) / span \(\le 35\) statements (JBC-COG-002, tightened to \(\le 25\) statements under strict_internal), table-driven MappingProxyType dispatch with \(\le 1\) elif (JBC-COG-004), single-duty class cohesion (JBC-COG-005), structured telemetry & print()/debugger bans (JBC-OBS-001), and deterministic clock/PRNG injection (JBC-OBS-003).
3.2 Graph-Theoretic AST Lifts: LCOM4 Cohesion & Differential SCC Ratcheting¶
Beyond local AST visitors, BuildingInspector lifts Python syntax trees into two graph structures:
A. Undirected Method–Attribute Intersection Graph (JBC-COG-005)¶
To replace subjective "Single Responsibility Principle" prose with a decidable graph invariant (src/jezz/codes/cohesion.py), each non-schema class \(C\) with non-exempt instance methods \(M_C\) and written instance attributes \(A_C\) induces an undirected graph \(G_{\text{cls}} = (M_C, E_{\text{cls}})\). Each method \(m \in M_C\) has an accessed field footprint \(F(m) \subseteq A_C\) and intra-class call set \(\text{Calls}(m) \subseteq M_C\). An undirected edge \(\{m_i, m_j\} \in E_{\text{cls}}\) exists iff:
Following Hitz & Montazeri (1995), \(\text{LCOM4}(C) = b_0(G_{\text{cls}})\) (the number of connected components of \(G_{\text{cls}}\)). JBC-COG-005 mandates \(\text{LCOM4}(C) \le 1\), zero stateless instance methods (\(F(m) = \emptyset \land \text{Calls}(m) = \emptyset\)), \(|A_C| \le 5\), \(|M_C^{\text{pub}}| \le 7\), and weighted methods per class \(\text{WMC}(C) = \sum_{m \in M_C} (1 + \text{CC}(m)) \le 35\). Whenever \(\text{LCOM4}(C) \ge 2\), \(C\) provably bundles disconnected state machines that split cleanly along connected-component boundaries.
B. Module Dependency SCCs & Differential Subgraph Soundness (JBC-COG-003 & ratchet.py)¶
Workspace modules \(M\) and resolved intra-workspace imports \(E_{\text{imp}} \subseteq M \times M\) form a directed dependency graph \(G_{\text{mod}} = (M, E_{\text{imp}})\). JBC-COG-003 decomposes \(G_{\text{mod}}\) into Strongly Connected Components \(\text{SCC}(G_{\text{mod}})\) in \(\mathcal{O}(|M| + |E_{\text{imp}}|)\) time via an iterative, LoopBudget-guarded Tarjan algorithm (src/jezz/codes/dep_graph.py, shared across rules_cog.py, polyglot_rules.py, and ast_graph.py), flagging any \(C \in \text{SCC}(G_{\text{mod}})\) with \(|C| > 1\) or a self-edge.
For brownfield CI adoption, the Differential Occupancy Ratchet (jezz inspect --changed-since <ref> / --staged in src/jezz/codes/ratchet.py) gates only modified or untracked files \(M_\Delta \subseteq M\). Naive differential linters restrict analysis to the induced subgraph \(G_{\text{mod}}[M_\Delta]\), which is unsound for cycle detection: if a legacy module \(\alpha \in M \setminus M_\Delta\) already imports \(\zeta \in M_\Delta\), and a pull request edits \(\zeta\) to import \(\alpha\), the cycle \((\alpha \to \zeta \to \alpha)\) has \(E(G_{\text{mod}}[M_\Delta]) = \emptyset\) and goes undetected. Furthermore, anchoring the citation on the lexicographically first member \(\min(C) = \alpha\) would discard the finding under a post-hoc finding.file in M_Δ filter. check_cog_003_for_paths preserves soundness by computing \(\text{SCC}(G_{\text{mod}})\) over the entire workspace \(M\), retaining every nontrivial component \(C\) satisfying \(C \cap M_\Delta \neq \emptyset\), and anchoring the SourceSpan on the first touched member in \(C \cap M_\Delta\).
3.3 Sunset Variances (expires_on) & Content-Addressed Occupancy Seals¶
To prevent temporary brownfield waivers from calcifying into permanent # noqa debt, CodeVariance (src/jezz/codes/permits.py) supports an ISO-8601 expires_on: date | None deadline evaluated deterministically against reference_date (--as-of YYYY-MM-DD, defaulting to UTC today). While reference_date <= expires_on, matching findings record VARIANCE_WAIVED (APPROVED_WITH_VARIANCES); on reference_date > expires_on, BuildingInspector automatically flips the finding back to VIOLATION (RED_TAG) with [Expired variance '<id>' (sunset YYYY-MM-DD)].
When an InspectionReport achieves zero unwaived violations, issue_certificate binds the ruling to a deterministic workspace content digest (compute_units_digest: sorted file_path \x00 source \x00 bytes) via inspector_seal = "sha256:" + SHA256(permit_id | ruling | cited_code_ids | exercised_variance_ids | artifact_digest). Strictly, CertificateOfOccupancy is an unkeyed SHA-256 hash commitment (rendering any post-certification edit to src/, tests/, or permit_id immediately detectable as INVALID_OCCUPANCY_SEAL during audit_pce_dossier), rather than a keyed HMAC or asymmetric PKI signature; untrusted-actor non-repudiation is enforced by re-executing BuildingInspector in CI (.github/workflows/jbc-gate.yml).
4. Pillar 3 & Pillar 4: Permit-and-Contract Engineering (PCE) & Runtime Architecture¶
4.1 The Five Statutory Phases and the Occupancy Relation (\(\mathcal{I} \models_{\text{PCE}} \mathcal{M}\))¶
Permit-and-Contract Engineering (PCE) replaces Agile user stories and unverified prose specs with five gated phases (src/jezz/methodology/):
1. Phase I — MANDATE (FRAME / ELICIT): Encodes a compact (~35–48 line) EngineeringMandate rejecting persona user stories, - [ ] checkboxes, and weasel modals (should, might, ideally). Non-empty open_ambiguities force an immediate authority halt at BHV-02 ELICIT. Target files are partitioned into pairwise-disjoint ModuleWriteScopes (\(S_i \cap S_j = \emptyset\) for \(i \neq j\)).
2. Phase II — PERMIT (BIND_CODES / INSPECT_CODE / DECOMPOSE): Locks a CodePermit binding CodeTrigger.UNIVERSAL plus auto-detected hazard triggers across all 32 JBC Edition 1.3 provisions, inspects WorkspaceAstGraph, and computes topological ModuleWriteScope.depends_on execution waves (compute_scope_execution_waves).
3. Phase III — CONTRACT (CHECKPOINT / PROVISION / SPECIFY / INSTRUMENT): Optionally provisions declared multi-ecosystem dependencies (BHV-13 PROVISION via DependencyRequirement.ecosystem: uv add, npm install, cargo add, go get with atomic manifest rollback) and anchors offline polyglot consultation references (BHV-06 CONSULT via ConsultTargetStr: JBC-*, confined workspace docs, and py:/npm:/crate:/go: package signatures), then encodes executable boundary schemas (STRICT_FROZEN_CONFIG, Zod .strict(), #[serde(deny_unknown_fields)], validated Go structs), @icontract predicates, and falsification suites (pytest+Hypothesis, vitest/node --test, cargo test, go test) on disk prior to implementation, locking checkpoint_impl.
4. Phase IV — CONSTRUCTION (SYNTHESIZE / REFACTOR / DELEGATE + RECONCILE): Synthesizes greenfield modules, renovates brownfield modules (jezz renovate [--ratchet]), or dispatches parallel asyncio.TaskGroup workers confined to scoped WorkspaceSandbox views (staging candidate Python patches in \(\mathcal{O}(|\Delta|)\) via _OverlayPatchFinder across both src/ and flat package layouts).
5. Phase V — OCCUPANCY (VERIFY_STATIC / VERIFY_DYNAMIC / REVERT / CERTIFY): Evaluates Rough-In AST/CST/graph inspection and Final subprocess compiler/test watchdogs (PolyglotSubprocessGateRunner with configurable (0, 600s] --gate-timeout / [tool.jezz.gates]; scoped to authorized test/package targets and inspect_differential_final when --ratchet is active). Any RED_TAG triggers BHV-20 REVERT (restoring checkpoint_impl and recording negative knowledge in falsified_paths), mandatory BHV-08 HYPOTHESIZE causal diagnosis, and BHV-07 CURATE_MEMORY compaction. Passing both gates seals a SHA-256 CertificateOfOccupancy and audits the complete EngineeringDossier (audit_pce_dossier, supporting both full-repository and ratchet_scoped digests), verifying: (i) zero open ambiguities, (ii) Kildall BehaviorGraph validity, (iii) contract-before-synthesis ordering, (iv) write-scope confinement, (v) 100% AST/CST symbol grounding of every DomainInvariant.verification_symbol, and (vi) CertificateOfOccupancy digest integrity.
Empirical Positioning on Red-Green TDD vs. Contract + Property-First Verification¶
While early observational studies (Nagappan et al., 2008) credited Test-Driven Development with defect reductions by comparing against teams lacking automated test suites, subsequent controlled studies isolating test sequencing against Iterative Test-Last (ITL) development (Rafique & Mišić, 2013; Fucci et al., 2017) established that fine-grained slice scope and automated test density—not strict Red-before-code sequencing—drive software quality, while incremental triangulation without upfront domain representation stalls on constraint-heavy problems. For coding agents, baby-step Red-Green stub micro-cycles multiply subprocess/token latency and fail to break single-LLM correlated blind spots (where one model omits the same edge cases in both point-example unit tests and implementation, evidenced in Track 4 by Prose SDD's 17.4% held-out Hypothesis oracle escape and 39.1% broken pytest suites despite 100% [x] completion, and in Wave 21B by typescript / claude_tiered SDD shipping broken node --test self-tests). jezz (src/jezz/behaviors/archetypes.py) therefore enforces a principled bifurcation: Defect Repair (build_abductive_bugfix_graph) requires RED -> GREEN reproduction (INSTRUMENT -> VERIFY_DYNAMIC -> SYNTHESIZE) to prove fault-detector non-vacuity against unmodified HEAD, whereas Greenfield & Renovation (build_greenfield_contract_first_graph) executes Contract + Property-First synthesis (SPECIFY -> INSTRUMENT -> SYNTHESIZE) over closed schemas, @icontract predicates, and universally quantified property generators.
4.2 Macro Control-Flow Graph vs. Micro Artifact ASTs (pydantic-graph EFSM)¶
flowchart TD
Start(["Start"]) --> Frame["BHV-01 FRAME\nFrameNode"]
Frame -->|"open_ambiguities > 0"| Elicit["BHV-02 ELICIT\nElicitNode"]
Elicit -->|"clarifications supplied"| Frame
Elicit -->|"halted / budget exhausted"| EndHalt(["End: ElicitationTicket / Escalated"])
Frame -->|"0 ambiguities"| Bind["BHV-03 BIND_CODES\nBindCodesNode"]
Bind --> IEnv["BHV-05 INSPECT_ENV\nInspectEnvNode"]
IEnv --> Inspect["BHV-04 INSPECT_CODE\nInspectCodeNode"]
Inspect -->|"consultation_targets > 0"| Consult["BHV-06 CONSULT\nConsultNode"]
Inspect -->|"self-contained"| Decomp["BHV-09 DECOMPOSE\nDecomposeNode"]
Consult --> Decomp
Decomp --> CkptC["BHV-12 CHECKPOINT\nCheckpointContractNode"]
CkptC -->|"required_dependencies > 0"| Prov["BHV-13 PROVISION\nProvisionNode"]
CkptC -->|"greenfield (no deps)"| Spec["BHV-14 SPECIFY\nSpecifyNode"]
CkptC -->|"renovate (no deps)"| Inst["BHV-15 INSTRUMENT\nInstrumentNode"]
Prov -->|"greenfield"| Spec
Prov -->|"renovate"| Inst
Spec --> Inst
Inst --> CkptI["BHV-12 CHECKPOINT\nCheckpointImplNode"]
CkptI -->|"1 scope (greenfield)"| Synth["BHV-16 SYNTHESIZE\nSynthesizeNode"]
CkptI -->|"1 scope (renovate)"| Refac["BHV-17 REFACTOR\nRefactorNode"]
CkptI -->|">1 disjoint scopes"| Deleg["BHV-10 DELEGATE\nDelegateNode (TaskGroup)"]
Deleg --> Recon["BHV-11 RECONCILE\nReconcileNode"]
Synth --> VStat["BHV-18 VERIFY_STATIC\nVerifyStaticNode"]
Refac --> VStat
Recon --> VStat
VStat -->|"APPROVED"| VDyn["BHV-19 VERIFY_DYNAMIC\nVerifyDynamicNode"]
VStat -->|"RED_TAG"| Rev["BHV-20 REVERT\nRevertNode"]
VDyn -->|"APPROVED"| Cert["BHV-21 CERTIFY\nCertifyNode"]
VDyn -->|"RED_TAG"| Rev
Rev -->|"LoopBudget ok"| Hyp["BHV-08 HYPOTHESIZE\nHypothesizeNode"]
Rev -->|"LoopBudget exhausted"| Elicit
Hyp --> Curate["BHV-07 CURATE_MEMORY\nCurateMemoryNode"]
Curate -->|"impl fault"| CkptI
Curate -->|"test-only static fault"| Inst
Cert --> EndOk(["End: CertificateOfOccupancy"])
PceWorkflowOrchestrator (src/jezz/agents/orchestrator.py) implements a two-scale compiler architecture:
- Macro-Scale Agent EFSM (pydantic-graph): build_pce_workflow_graph() compiles 22 AtomicBehaviorGraphNode dataclasses (src/jezz/agents/nodes.py, spanning all 21 / 21 BehaviorKinds verified by validate_runtime_node_coverage()) via GraphBuilder.add_reachable(FrameNode). Each node's run() return annotation (e.g., VerifyStaticNode.run(...) -> VerifyDynamicNode | RevertNode) serves simultaneously as a static Python AST node checked by mypy --strict and as runtime type metadata reflected via typing.get_type_hints to synthesize directed graph edges—making unverified shortcuts (SynthesizeNode -> CertifyNode) or blind retries (RevertNode -> SynthesizeNode) unrepresentable in the type system.
- Micro-Scale Artifact ASTs/CSTs (InspectedUnit) & Trace Projection (\(\pi\)): Mutating EFSM nodes produce .py, .ts/.tsx, .rs, or .go files parsed into normalized SourceUnit | PolyglotUnit trees; verification EFSM nodes inspect those trees to select successor edges. At termination, trace_to_behavior_graph (src/jezz/behaviors/runtime.py) projects the observed EFSM walk \(\tau = (s_1, \dots, s_m)\) into its induced BehaviorGraph \(\pi(\tau) = G_\tau\) and discharges global dominance invariants via verify_behavior_graph(G_\tau).
4.3 Specialist Routing, Zero-Credential & Vault Isolation, MCP Gate, & Lifecycle Hooks¶
- 12-Slot Role-Tiered Specialist Routing & Zero-Credential
AntigravityCliModel(src/jezz/agents/routing.py,agy_model.py,providers.py): Maps[tool.jezz.models](plus[tool.jezz.models.roles]) and CLI tier overrides (--architect-modelforFRAME/DECOMPOSE/SPECIFY/HYPOTHESIZE,--builder-modelforPROVISION/INSTRUMENT/SYNTHESIZE/REFACTOR,--inspector-modelforINSPECT_CODE/INSPECT_ENV/CONSULT/CURATE_MEMORY) onto all 12SpecialistRoleSlot/PceModelSuiteslots, stamping exactmodel_idprovenance inAgentInvocationTelemetry.antigravity:<slug>targets (AntigravityCliModel, e.g.antigravity:claude-opus-5-5-medium,antigravity:claude-sonnet-5-5-medium,antigravity:gpt-oss-120b-medium) execute through the localagyCLI with stateful--conversation <id>prefix caching and zero external API keys, while direct HTTP providers are wrapped inTlsResilientModelcontexts. - Zero-
os.environScheme-Dispatched Secret Hygiene (src/jezz/secrets.py): Resolves direct-provider API credentials once per provider family through an immutableMappingProxyTypeSecretProviderRegistrysupportingenv://,pass://(Proton Pass CLI withPROTON_PASS_AGENT_REASON),op://(1Password CLI), andkeychain://(macOS Keychain / Freedesktop Secret Service) across 4-tier--secret-uri -> workspace pyproject.toml -> user config.toml -> canonical envprecedence intopydantic.SecretStr, never mutating processos.environ(JBC-SEC-002,JBC-OBS-003), exempting keylessantigravity:*specs, and blocking cross-provider--secret-urisharing. - Hot-Reloading Statutory
stdioMCP Server,PreToolUse&StopGates, & Reusable GitHub Action (src/jezz/mcp_server.py,src/jezz/mcp_charter.py,src/jezz/mcp_blueprint.py,src/jezz/mcp_reload.py,src/jezz/hooks.py,src/jezz/plugin.py,action.yml): Decouples Pillars 1–3 from the batch orchestrator so interactive external agents (Antigravity, Claude Code, Cursor, JetBrains AI) can invoke 21 structured tools (16read-only +5stateful permit/custom-code/telemetry tools)—jbc_preview_source,jbc_prove_contracts,jbc_inspect_differential,jbc_inspect_workspace,jbc_query_ast_graph,jbc_assess_lot_line,pce_start_intake,pce_seal_charter,jbc_extract_blueprint,jbc_verify_blueprint_lvs,jbc_list_codes,jbc_get_code,jbc_verify_behavior_graph,jbc_audit_dossier,pce_permit_status,pce_open_permit,pce_verify_red_test,pce_seal_permit,jbc_verify_custom_code,jbc_onboard_custom_code, andpce_record_observation—across Python (.py), TypeScript (.ts/.tsx), Rust (.rs), and Go (.go) under aContainedPathroot jail (JBC-SEC-005) and a compile-verifiedHotReloadSupervisor(mcp_reload.py).jezz initinstalls a zero-hardcoded-path.agents/plugins/jezz/bundle anchored dynamically via${PLUGIN_ROOT}(JBC-SEC-006) whosejezz hook pre-toolgate enforcesActiveWorkPermitINSTRUMENT_RED -> SYNTHESIZE_GREENphase locks and whosejezz hook stopgate blocks turn completion ("decision": "continue") whenever modified source files contain unwaivedJBCEdition1.3or.jezz/codes/*.tomlRED_TAGfindings, while rootaction.ymlpackagesjezz inspect(--final),jezz blueprint,jezz prove, andjezz auditas a drop-in composite GitHub Action.
5. Empirical Evaluation¶
5.1 Brownfield Field Trial: 7.41M LOC Across Six External Repositories (Track 2)¶
To validate BuildingInspector precision, throughput, and failure-mode coverage at zero LLM token cost, jezz inspect evaluated 17,609 Python files (7,414,726 LOC) across six repositories (docs/track-2-brownfield-field-trial.md):
| Repository | Domain | Units (Prod / Test) | Total LOC | Key True-Positive JBC v1.1 Findings |
|---|---|---|---|---|
GitHub spec-kit |
Flagship "SDD" CLI | 699 (308 / 391) |
291,626 |
4 shell=True/exec() sinks (SEC-001), 161 silent except: pass (FLT-001, incl. _download_security.py), 11 implicit None fallthroughs (DBC-003), 341 timeout-free subprocess.run (FLT-003), WMC = 395 God class (COG-005). |
kirodotdev/KiroCrew |
Kiro Python agent runtime | 13,426 (4,588 / 8,838) |
6,800,169 |
3,864 silent except: pass (FLT-001), 5,362 unstructured ensure_future/create_task spawns (FLT-005), 5,705 zero-assertion smoke tests (VRF-001), 22,921 # noqa/# type: ignore directives (VRF-004), 326 f-string SQL queries (SEC-001). |
| AWS Kiro E2E Sample | Official Kiro SDD showcase | 10 (10 / 0) |
2,751 |
0 test files, 25 untyped json.load() (SEC-004), 51 uncontained path sinks (SEC-005), silent except: pass (FLT-001), undeclared jsonschema import (VRF-003) with no manifest. |
pydantic |
Core validation library | 3,162 (67 / 3,095) |
225,134 |
Inspected in 15.85s (0 crashes on metaclass machinery); caught yaml.load without SafeLoader in docs plugin (SEC-001), timeout-free check_output/requests.get (FLT-003), unchained validator raises (FLT-002). |
pydantic-graph |
Typed EFSM library | 14 (14 / 0) |
4,715 |
0 violations across all SEC, OBS, DBC-001, and FLT-003 provisions; verified brownfield CodePermit variance onboarding (APPROVED_WITH_VARIANCES). |
pydantic-deepagents |
Multi-agent TUI harness | 298 (214 / 84) |
90,331 |
Popen(..., shell=True) (SEC-001), uncontained rmtree (SEC-005), 46 fire-and-forget tasks (FLT-005), 44 undeclared imports (VRF-003), 45-arg CC = 104 function (COG-001/002). |
Empirical stress-testing across this corpus drove 11 permanent analyzer calibrations—including replacing \(\mathcal{O}(V(V+E))\) cycle search with \(\mathcal{O}(V+E)\) iterative Tarjan SCCs for 13,426-module repositories, PEP 621 optional-extra + setup.cfg manifest parsing, ast.NodeVisitor hook exemptions, and pathlib / division disambiguation. In Track 8 (docs/track-8-polyglot-inspector.md), jezz inspect extended this field validation across 6 open-source TypeScript, Rust, and Go repositories (colinhacks/zod, honojs/hono, BurntSushi/ripgrep, serde-rs/json, go-chi/chi, and spf13/cobra — 1,110 units, 300,067 LOC, 15,936 AST/CST graph symbols) in 62.95s (4,077–5,588 LOC/s) with 0 crashes and 0 CST parse errors, surfacing 6,926 calibrated JBC v1.2 violations. Self-hosted against jezz v0.8.0 (every production Python module strictly \(\le 1,000\) LOC under JBC-COG-006 subpackage compartmentation, whole-workspace inter-procedural call-flow propagation across src/jezz/codes/call_flow*.py, polyglot Z3 contract verification across src/jezz/codes/smt/*.py, .jezz/codes/*.toml custom rule support, and 416+ unit/async/stateful/Hypothesis tests at >=92% statement coverage), jezz inspect . --final certifies APPROVED across all 32 Edition 1.3 provisions (30 static Rough-In + 2 Final GATE_ATTESTATION provisions) with 0 violations and 0 variances.
5.2 Live Occupancy Probes (Track 3)¶
Before controlled A/B benchmarking, three live probes on google:gemini-3.8-flash with UvSubprocessGateRunner (docs/track-3-live-occupancy-trial.md) verified: (1) Ambiguity Dominance (Probe 3A): an under-determined prompt ("Implement a retryable webhook delivery service") surfaced 4 concrete domain blockers and halted cleanly at FRAME -> ELICIT with 0 disk writes; (2) Adversarial Integer-Cent Synthesis (Probe 3B): 4-tier basis-point settlement synthesized MappingProxyType dispatch (0 elifs) and exact integer-cent conservation (0/30 JBC violations, sha256:739814a0...); and (3) 3-Worker Parallel TaskGroup Construction (Probe 3C): 3 disjoint ModuleWriteScopes converged concurrently via DELEGATE -> RECONCILE with zero cross-module signature mismatches (sha256:5cf5aad1...).
5.3 Controlled pydantic-evals A/B Benchmark: 46 Live Workspaces (Track 4, Waves 4A–4E)¶
Track 4 (src/jezz/evals/, docs/track-4-sdd-vs-pce-benchmark.md) evaluates Control: Steelmanned Prose "SDD" (7-article constitution.md + 4-stage spec.md -> design.md -> tasks.md -> code + [x]) against Treatment: jezz PCE across 6 adversarial domain packages:
- case_01_bps_split: Exact integer-cent basis-point allocation across IEEE-754 \(>2^{53}\) precision traps and 5-tier fee schedules.
- case_02_sql_ledger_store: Atomic SQLite double-entry transfers under SQL injection and partial-failure rollback hazards.
- case_03_artifact_loader: ContainedPath-jailed, byte-bounded JSON plugin manifest loader rejecting ../, outside symlinks, coercion, and extra keys.
- case_04_workflow_topo: Lexicographic Kahn topological planner with critical-path layering, cycle detection, and step-budget termination.
- case_05_margin_engine: Single-duty (LCOM4 <= 1) portfolio margin engine avoiding binary float threshold drift (0.95 / 0.40).
- case_06_escrow_machine: 2-scope parallel DELEGATE escrow state machine enforcing idempotent replay and terminal FROZEN/CLOSED locks.
Every completed workspace was graded independently by UvWorkspaceVerifier (PolyglotWorkspaceVerifier) using BuildingInspector.inspect_final, uv run mypy . (--strict), the arm's own pytest suite, and held-out adversarial Hypothesis oracle suites (src/jezz/evals/oracles.py) unseen by either arm during generation (extended in Track 17 to a 12-case 4-language benchmark dataset selectable via jezz benchmark --language python|typescript|rust|go|all, adding matched TypeScript node:test Mulberry32 property suites, Rust SplitMix64 integration tests, and Go testing/quick suites in src/jezz/evals/polyglot_tasks.py and polyglot_oracles.py). Five Python empirical waves totaling 46 live workspaces (23 SDD + 23 PCE) were executed:
- Waves 4A & 4B (12 + 12 = 24 workspaces): Full 6-case runs on uniform google:gemini-3.8-flash before and after greenfield tool/contract parity calibrations.
- Wave 4C (4 workspaces): Targeted verification of Pillar 4 v1.2 staged runtime-import and PEP 695 TypeAliasType gates on the two Wave 4B fail-closed escalations (case_04, case_05) on uniform google:gemini-3.8-flash, achieving 2/2 (100%) certification and closing all 6/6 benchmark tasks.
- Wave 4D (12 workspaces): Full 6-case symmetric tiered routing trial pairing frontier google:gemini-4-hydrogen (Architect: spec.md/design.md/tasks.md in SDD; FRAME/SPECIFY/HYPOTHESIZE in PCE) with google:gemini-3.8-flash (Builder: implement in SDD; INSTRUMENT/SYNTHESIZE/INSPECT_CODE in PCE).
- Wave 4E (6 workspaces under JBC Edition 1.2): Controlled hypothesis-falsification and closure probes on case_03_artifact_loader (Wave 4E-1 budget-only 28 -> 36, Wave 4E-2 role-routed instrument = gemini-4-hydrogen, and Wave 4E-3 post-calibration class-method/TypeAliasType introspection in env_introspect.py), closing 6/6 (100%) tasks on symmetric tiered routing (0/31 JBC v1.2 violations, CC = 0, 3/3 oracle pass).
Table 1: Master A/B Results Across Uniform (Wave 4B), Frontier-Tiered (Wave 4D), and Cumulative (Waves 4A–4E) Runs¶
| Evaluation Metric | SDD (Wave 4B Flash, N=6) |
PCE (Wave 4B Flash, N=6) |
SDD (Wave 4D Tiered, N=6) |
PCE (Wave 4D Tiered, N=6) |
Cumulative SDD (N=23) |
Cumulative PCE (N=23) |
|---|---|---|---|---|---|---|
OpenSpec / Kiro Markdown Valid ([x]) |
6/6 (100%) |
N/A | 6/6 (100%) |
N/A | 23/23 (100%) |
N/A |
JBC Occupiable (0 Violations) |
0/6 (0%) |
4/6 (66.7%) |
0/6 (0%) |
5/6 (83.3%; +4E: 6/6) |
0/23 (0.0%) |
15 cert. (6/6 tasks) |
Unwaived LIFE_SAFETY Violations |
5 (4/6 cases) |
3 (0 on cert.) |
19 (5/6 cases) |
1 (0 on cert.) |
36 |
11 (0 on all 15 cert.) |
Total Unwaived JBC Violations |
82 (13.7/case) |
3 (0 on cert.) |
132 (22.0/case) |
1 (0 on cert.) |
375 (16.3/case) |
11 (0 on all 15 cert.) |
| Held-Out Oracle | Certified/"Valid" Build | 6/6 (4A: 3/6) |
4/4 (100%) |
6/6 (4C: 1/2) |
5/5 (100%; +4E: 6/6) |
19/23 (17.4% silent escape!) |
12/12 (100% in 4B–4E; 0% escape) |
mypy --strict Pass Rate |
4/6 (66.7%) |
5/6 (83.3%) |
1/6 (16.7%) |
6/6 (100%) |
10/23 (43.5%) |
21/23 (91.3%; 100% cert.) |
Arm Self-Tests (pytest) Pass Rate |
3/6 (50.0%) |
4/6 (100% cert.) |
4/6 (66.7%) |
5/6 (100% cert.) |
14/23 (60.9%) |
15/15 (100% on cert.) |
Rollbacks (RED_TAG -> REVERT) on Certified |
N/A | 0 (1 each in 4C) |
N/A | 0 across all 5 |
N/A | 3 total (4C + 4E-3) |
Mean Peak Cognitive Complexity / elifs |
14.33 / 4 |
4.00 / 0 |
18.33 / 1 |
3.67 / 0 |
15.7 / 10 |
2.9 / 1 |
| Mean Human-Reviewed Spec Lines | 603.8 |
38.7 (-93.6%) |
410.2 |
38.7 (-90.6%) |
530.8 |
38.3 (13.9x smaller) |
| Mean LLM Requests (Certified) | 4.3 |
41.0 |
4.0 |
25.8 (-37.1%) |
4.2 |
32.5 (4C) \(\to\) 25.8 (4D) |
| Mean Total Tokens per Case | 58,564 |
417,418 |
49,233 |
278,978 (-33.2%) |
52,874 |
417,418 (4B) \(\to\) 278,978 (4D) |
| Mean Wall-Clock Latency per Case | 195.1s |
588.9s |
148.8s |
303.4s (-48.5%) |
176.2s |
588.9s (4B) \(\to\) 303.4s (4D) |
5.4 Principal Empirical Findings & Longitudinal Crucible (Track 5)¶
100%Markdown Checkbox Compliance Over Broken & Unsafe Code: Across all23SDD builds,23/23(100%) satisfiedOpenSpec/ Kiro Markdown validation (SHALLmodals,GIVEN/WHEN/THENscenarios, and- [x]task completion). Yet13/23(56.5%) failedmypy --strict,9/23(39.1%) failed their ownpytestsuites, and4/23(17.4%) crashed on external package import (StrEnummetaclass crash incase_01, Pydantic v1/v2Config+model_configcollision incase_06, andfrom src.<pkg>...import path drift incase_05). Constitutional prompt-begging failed on23/23(100%) of SDD runs, emitting# type: ignore/# noqasuppressions, hardcoded/tmpand/etc/passwdpath literals (JBC-SEC-006), unboundedwhileloops, uncontainedopen()sinks, dynamic SQL f-strings, andexcept ...: passblocks.- The Wave 4D Asymmetry — "Over-Specified Prose Drift" vs. "Executable Contract Leverage":
- In Prose SDD, a frontier Architect made code violations worse: Upgrading
spec.md,design.md, andtasks.mdfromgemini-3.8-flash(Wave 4B) togemini-4-hydrogen(Wave 4D) increased totalJBCviolations by+61.0%(82\(\to\)132), increasedLIFE_SAFETYviolations3.8x(5\(\to\)19), raised mean peak Cognitive Complexity from14.33to18.33(CC = 35incase_04), and collapsedmypy --strictpass rate from66.7%to16.7%(1/6). Incase_02_sql_ledger_store,gemini-4-hydrogenauthored an elaborate nested savepoint/transaction narrative indesign.md; unconstrained by AST gates,gemini-3.8-flashtranslated that prose into a27-complexity context manager containing6f-string SQL statements (conn.execute(f"SAVEPOINT {sp_name}"),JBC-SEC-001) and4silentexcept sqlite3.Error: passblocks (JBC-FLT-001). - In
jezzPCE, the same frontier Architect eliminated rollbacks and halved latency: Channelinggemini-4-hydrogeninto compiled Phase III Pydantic +@icontractcontracts certified5/6cases inWave 4Don the first construction pass with0rollbacks, cutting mean requests by-37.1%(41.0\(\to\)25.8;case_01certified in13requests), overall tokens by-33.2%, and mean wall-clock latency by-48.5%(588.9s\(\to\)303.4s). - Fail-Closed Soundness & Wave 4E Hypothesis Falsification (
0.0%Silent Defect Escape): WheneverPCEcould not prove compliance within step budgets,_rollback_aborted_sandboxrestored the clean pre-mutation baseline rather than shipping unverified code. InWave 4E, live falsification showed thatcase_03_artifact_loader'sWave 4Dhalt was driven neither by request caps (Wave 4E-1:28 -> 36still halted) nor bygemini-3.8-flashcapacity (Wave 4E-2: routinginstrument = gemini-4-hydrogenstill halted), but byinspect_installed_package_api(env_introspect.py) omitting public class methods (ContainedPath.from_parts) andTypeAliasTypedefinitions (IdentifierStr). Fixing class-method andTypeAliasTypeintrospection certifiedcase_03on the original symmetric tiered routing (0/31JBCv1.2 violations,25-lineloader.pywithCC = 0,3/3oracle pass), achieving6/6(100%) task closure across both uniform and tiered waves with0.0%silent defect escape (36/36held-out adversarialHypothesischecks across Waves 4B–4E). - Longitudinal Multi-Mandate Crucible (
Track 5—jezz-crucible-ledger): Across 4 sequential, interdependent mandates in a persistent financial repository (11units /2,693LOC:domain.pybalance algebra \(\to\) raw---promptsavepoint SQLitestore.py\(\to\) 2-scope / 2-wave topological DAGescrow.py+ SHA-256reconcile.py\(\to\) brownfieldjezz renovatecli.pyunder livejezz hook stopgates;docs/track-5-multi-mandate-crucible.md),jezzsealed all4/4EngineeringDossiers with0unwaivedJBCviolations,0reverts on certified runs, and21/21pytest+Hypothesisandmypy --strictpass.
5.5 Polyglot Runtime, Cross-Provider Reproduction (Claude & GPT-OSS), External OSS Crucible, & Live 24-Build Polyglot Benchmark (Tracks 9–11 & 21)¶
- Polyglot Autonomous
PCEConstruction (Track 9,docs/track-9-polyglot-pce-runtime.md): ExtendingPceWorkflowOrchestratorwithPolyglotSubprocessGateRunner(tsc --noEmit+node --test,cargo check+cargo test,go vet+go test) and language-routedJBCbriefs achieved4 / 4(100%) Pass-1OCCUPANCY_CERTIFIED&OCCUPANCY_SEALED(0rollbacks) across greenfield TypeScript (9A), greenfield Rust (9B), greenfield Go (9C), and brownfield Rustrenovate(9D) in11–19requests and47,675–82,461gross input tokens (~4x–5xnative-idiom compression relative to Python). - Cross-Provider Confirmation on Anthropic Claude & OpenAI
GPT-OSS 120B(Track 10,docs/track-10-cross-provider-benchmark.md): Across19live workspace builds (Waves 10A & 10B) via zero-credentialAntigravityCliModel(antigravity:*),8 / 8(100%) Control SDD runs passed Markdown- [x]validation while0 / 8(0%) achievedJBCoccupancy (192violations,17LIFE_SAFETY). Upgrading SDD's Architect fromClaude Sonnet 5.5toClaude Opus 5.5reproduced Wave 4D directly—bloating specs+80.5%(419.0\(\to\)756.5lines/case) and increasingJBCviolations+34.3%(35\(\to\)47,+124.5%latency). UnderjezzPCE, bothClaude Sonnet 5.5andClaude Opus 5.5 + Sonnet 5.5achieved2/2(100%)JBCoccupancy and6/6(100%) post-calibrationHypothesisoracle pass (49.6%–57.8%cache hit ratios), with tiered Claude finishing-34.0%faster than SDD (174.55svs.264.51s), whileGPT-OSS 120Bclosed2/2(100%)JBCoccupancy (42.2%–56.3%cache hits). - External Brownfield OSS Renovation Crucible (
Track 11,docs/track-11-brownfield-renovation-crucible.md): Usingjezz renovate --ratchet(inspect_differential_final+ratchet_scoped),jezzcertified and sealed3 / 3(100%) surgical renovations on external open-source repositories while isolating untouched legacy debt:go-chi/chi @ c64ed7d663(90Go units,middleware/{basic_auth,strip}.go:5\(\to\)0violations,APPROVED/OCCUPANCY_SEALED,79.0%cache hits),serde-rs/json @ f51fa15a70(61Rust units,build.rs+src/lexical/{bignum,algorithm}.rs:13unwaived defects eliminated incl.6.unwrap()panics +5waived underCodePermit,APPROVED_WITH_VARIANCES/OCCUPANCY_SEALED,79.8%cache hits), andgithub/spec-kit @ a55782f1f1(700Python units /291,626LOC,operators.py:16\(\to\)0violations eliminating12Any+4# type: ignore[operator],APPROVED/OCCUPANCY_SEALED,76.9%cache hits). - Matched 4-Language SDD-vs-
PCEBenchmarks (Track 21—Waves 21A, 21B, 21C, 21D, & 21E,504Live Builds,docs/track-21-polyglot-live-benchmark.md): Evaluating all12canonical tasks across Python (6cases), TypeScript (2), Rust (2), and Go (2), archivedWave 21B(48single-trial Claude 5.5 builds, open-loop Stage 4 SDD),Wave 21C(144multi-trial Gemini 4 builds, oracle--seed 20261202, optionalverify_workspace_draft), recomputedWave 21D(144multi-trial Gemini 4 builds,--sdd-require-verify), and unconfoundedWave 21E(144multi-trial Gemini 4 builds, explicitMANDATORYStage 4 prompt +--sdd-require-verify, all43221C+21D+21Egenerated workspaces +transcript.jsonSHA-256 digests committed underbenchmarks/results/) isolated both methodology and verification-loop effects: inWave 21C, ControlSDDskipped optionalverify_workspace_drafton41/72(56.9%) runs, passingsrc/typecheck72/72(100%) and held-out oracles71/72(98.6%) while incurring7Pythontests/mypyerrors on skipped runs and achieving18/72(25.0%,470violations /16LIFE_SAFETY)JBCoccupancy vs.71/72(98.6%) forPCE. WhenWave 21DandWave 21Erequired Stage 4SDDto invokeverify_workspace_draft, re-sending multi-hundred-line prose specs + full patch bundles across tool turns raised SDD's billed input from8.33M(21C) to20.89M(21Drecomputed) and20.52M(21E), inverting Gemini 4 costs in favor ofjezzPCEacross all four axes in both21D(-33.6%gross,-38.3%pooled /-49.0%tiered billed input,-58.1%output,-44.7%latency) and21E(-34.3%gross,-39.3%pooled /-49.9%tiered /-28.3%uniform /-38.1%non-Python billed input,-58.0%output,-45.5%latency, winning all8/8cells), caused11/72(15.3%,21D) and24/72(33.3%,21E) monolithic SDD retry exhaustions, and left SDDJBCoccupancy at18/72(25.0%,469violations /40LIFE_SAFETY) in21Dand12/72(16.7%,413violations /34LIFE_SAFETY) in21E—whereasjezzPCEcertified144/144(100.0% ± 0.0%) across all 4 languages and both suites inWaves 21D & 21E(0violations,144/144oracle,144/144mypy --strict).
6. Threats to Validity, Cost Trade-Offs, & Limitations¶
- Verification-Regime & Cache-Regime Input Cost Dynamics (
+52.0%vs. Unverified-SkippingSDDinWave 21C;-38.3%inWave 21Dand-39.3%Pooled /-49.9%Tiered inWave 21Evs. Mandatory-VerifySDD): Early uncached Python waves (Wave 4D) averaged higher gross input onPCEthan open-loopSDD(334,774vs.49,233) becausejezz.guardsandJBCAST rules have zero pretraining exposure. Track 7 (docs/track-7-prompt-caching-and-providers.md) demonstrated68.7%–72.5%cache_read_tokensreuse (-61.8%effective billed input); archived single-trialWave 21B(Claude 5.5,60.4%explicit breakpoint cache hit) showed-9.3%billed input onclaude_tiered(+29.5%pooled,+100.9%uniformclaude_sonnet); and the three-regimeWave 21C/21D/21EGemini 4 ablation (432builds,docs/track-21-polyglot-live-benchmark.md) pinpointed why unverified SDD appeared cheaper on Gemini inWave 21C: whenverify_workspace_draftwas optional (21C),SDDskipped verification on56.9%(41/72) of runs (PCE+52.0%pooled /+32.9%tiered billed input,-13.2%output,-29.8%latency). Once--sdd-require-verify(21Dand explicit-prompt21E) required Stage 4SDDto execute compiler + unit-test verification, re-ingestingspec.md + design.md + tasks.mdplus every file patch across tool turns raisedSDD's billed input from8.33Mto20.89M(21D) and20.52M(21E), making full-armjezzPCEcheaper and faster than verifiedSDDacross all four axes (Wave 21E:-34.3%gross input,-39.3%pooled /-49.9%tiered /-28.3%uniform /-38.1%non-Python billed input,-58.0%output tokens,-45.5%latency)—while transparently disclosing that even under explicitMANDATORYStage 4 wording (21E), monolithic context caused SDD to attempt Turn-1final_resultsubmission on54/72(75.0%) runs, and that on the18/72(21E) and25/72(21D) subset where SDD calledverify_workspace_draftproactively on Turn 1 withoutModelRetry, SDD averaged117.4Kand118.0Kbilled input vs.164.9Kand176.5Kon pairedPCEruns. - Fail-Closed Availability Sensitivity to Epistemic Tool Fidelity: Because
PCEenforces strict step caps and refuses occupancy on any unverified state, gaps in read-only introspection tools (such asenv_introspect.pyomitting class methods prior toWave 4E-3) or single-model remediation exhaustion (such as uniformclaude_sonnethalting and rolling backcase_go_02_strict_receiptto0LOC inWave 21B, or uniformgemini_hydrogenrolling back1/6TypeScript trials to0LOC inWave 21C, whereasclaude_tiered12/12,gemini_tiered36/36in21C, and bothgemini_hydrogenandgemini_tiered144/144across21D + 21Ecertified100%across all 4 languages) manifest immediately as visible fail-closed halts rather than silent production bugs—preserving the core safety invariant that0unverified lines ever receive aCertificateOfOccupancy. - Provider, Language, & Brownfield Generalizability: Track 2 audited
7.41MPython LOC across six external repositories; Track 8 (jezz.codes.adapters,docs/track-8-polyglot-inspector.md) and Track 19 (jezz.codes.call_flow) extended nativeJBCEdition1.3static inspection,WorkspaceAstGraph, whole-workspace inter-procedural taint/validator propagation, ecosystem manifest grounding (pyproject.toml,package.json,Cargo.toml,go.mod), CLI/MCP/Stop-hook Differential Occupancy Ratchets, andPCEEngineeringDossierseal verification across Python (.py), TypeScript (.ts/.tsx), Rust (.rs), and Go (.go) (pinned across all12repositories /8,266,391LOC inbenchmarks/brownfield_corpus.lock.json); Track 9 (jezz.agents.polyglot_gates,jezz.agents.polyglot_prompts,docs/track-9-polyglot-pce-runtime.md) wired full polyglot autonomous construction (jezz run&jezz renovate), ecosystem dependency provisioning (uv add,npm install,cargo add,go get), and real-compiler gate conjunction (tsc/vitest/node --test,cargo check/cargo test,go vet/go test) intoPceWorkflowOrchestrator, achieving4/4(100%) Pass-1 certified & sealed live builds across TypeScript, Rust, and Go; Track 10 (jezz.agents.agy_model,docs/track-10-cross-provider-benchmark.md) and Track 21 (docs/track-21-polyglot-live-benchmark.md) expanded offline wire compatibility to640 / 640probes across10Google, Anthropic, OpenAI, OpenRouter, and zero-credentialantigravity:<model>targets and executed523live cross-provider and 4-language A/B builds (Waves 10A, 10B, 21A, 21B, 21C, 21D, & 21E;569total A/B builds including Track 4) acrossClaude Opus 5.5,Claude Sonnet 5.5,GPT-OSS 120B, andGemini 4—confirmingjezzPCE's100%tieredJBCv1.3 occupancy (12/12claude_tiered,36/36gemini_tieredin21C, and144/144across bothgemini_hydrogenandgemini_tieredin21D + 21E) and100%certified tiered held-out oracle pass across all four languages; and Track 11 (jezz renovate --ratchet,docs/track-11-brownfield-renovation-crucible.md) demonstrated3 / 3(100%) certified andOCCUPANCY_SEALEDsurgical renovations on external brownfield OSS repositories (go-chi/chi,serde-rs/jsonunderCodePermit, and291K-LOCgithub/spec-kitwith76.9%–79.8%cache hit ratios). - The World–Machine Boundary (Jackson, 1995): Formal verification proves an implementation \(\mathcal{I}\) satisfies its formal mandate and code book (\(\mathcal{I} \models_{\text{PCE}} \mathcal{M} \wedge \text{JBC}\)), not that a human's initial informal prompt captured every real-world business nuance.
PCEnarrows—but cannot mathematically abolish—this boundary via8.8x–17.0xwave-level specification compression (39.2–41.8lines vs.356.7–550.7wave-mean /249.7–846.0cell-mean lines of SDD Markdown), mandatoryBHV-02 ELICIThalting on open ambiguities, prompt-independentJBCsafety laws, andHypothesis/ SplitMix64 /testing/quickcounterexample search. - Multi-Trial Variance, Three-Regime Tool Ablation, Complete Cost Accounting, & 12-Repo Lockfile (
Tracks 21 & 29–31): Across external reviews, all methodological caveats are committed for independent$0verification (benchmarks/verify_published_claims.pyauditing304claims +432transcript.jsonSHA-256 digests acrossWaves 21C, 21D, & 21E, andbenchmarks/reproduce_brownfield.py --strict-metricsverifying all12brownfield repos /8,266,391LOC acrosssmoke,core,full896,661LOC in~45s, andmonorepokirodotdev/KiroCrew7,369,730LOC in~382s): (i)Waves 21C, 21D, & 21E(432stochastic multi-trial Gemini 4 builds with seeded--seed 20261202property oracles) compare optionalverify_workspace_draft(21C), forced--sdd-require-verify(21Drecomputed with failed-run token telemetry and scaffold-filtered typechecks), and explicitMANDATORYStage 4 prompt +--sdd-require-verify(21E), separatesrc/-only fromsrc/ + tests/typecheck reporting, and persist all432generated workspaces and scrubbed LLM transcripts (Wave 21Bremains archived as single-trial open-loop summary telemetry pending post-quota-resetWave 21F); (ii) both favorable and unfavorable input-cost deltas are audited (Wave 21B:-9.3%tiered,+29.5%pooled,+100.9%uniformclaude_sonnet;Wave 21C:+32.9%tiered,+52.0%pooled,+68.2%uniform;Wave 21D:-49.0%tiered,-38.3%pooled,-27.1%uniform;Wave 21E:-49.9%tiered,-39.3%pooled,-28.3%uniform); (iii)JBCOccupancy is reported separately from methodology-neutral endpoints; and (iv) onjezz's own repository (jezz prove .), Z3 proves all18decidable pure callables deductively (PROVED_DEDUCTIVE,UNSAT, enforced via--require-deductivein CI alongside all4starter templates) and168schema domains non-vacuous (SAT) across306obligations (0vacuous,0counterexamples,120I/O/orchestrator/unmodeled callables markedUNPROVED_OPAQUE) over an order-preserving supplementary-plane landmark quotient ([U+20000, U+10FFFF]) and UTF-16/UTF-8 code-unit length encoding. - Reflexive Self-Applicability & Soundness Envelope Boundaries: Passing
32/32JBCprovisions and Z3 contract checks certifies absence of violations inside the modeled formal envelope—never absence of all defects outside it. Across five rounds of external adversarial review onjezzitself, independent auditors surfaced unmodeled polyglot process/shell-argv/wrapper/interpreter/VM/rebound sinks inJBC-SEC-001, unbounded subprocess waits inJBC-FLT-003, Z3 supplementary-plane (> U+2FFFF)StringSorttruncation / gap-decoding issues, and intra-/cross-module class@icontract.invariant/icontract.DBCinheritance / imported contract decorator gaps—remediated across the modeled AST/CST and VCGen layers (tests/test_audit_remediation.py,tests/test_post_v070_audit_findings.py,tests/test_third_review_remediation.py,tests/test_fourth_review_remediation.py,tests/test_fifth_review_remediation.py,tests/test_fifth_review_redteam.py). Maintaining explicitUNPROVED_OPAQUEboundaries and documented static-analysis scope rather than claiming universal perfection is a core statutory invariant of the framework.
7. Conclusion & Technical Appendix Index¶
Marketed "Spec-Driven Development" mistakes the medium of management bureaucracy (prose PRDs, Scrum user stories, and - [x] task checklists) for engineering rigor, and treats passing functional tests as proof of software safety (orthogonal axis blindness). Empirical evaluation across four languages (569 controlled A/B builds alongside 8.27M LOC of 40-SHA-pinned brownfield audits) demonstrates why both assumptions fail: across all 283 Control SDD builds (Tracks 4, 10, & 21), only 18.7% (53/283) achieved JBC occupancy (2,148 violations, 159 LIFE_SAFETY). Across 432 multi-trial Gemini 4 builds (Waves 21C, 21D, & 21E), whether Stage 4 verify_workspace_draft was optional (21C, 18/72 occupiable), validator-enforced (21D, 18/72 occupiable), or explicitly mandated in the Stage 4 system prompt (21E, 12/72 = 16.7% occupiable), 75.0%–83.3% of SDD builds failed JBC v1.3 occupancy (470, 469, and 413 violations; 16, 40, and 34 LIFE_SAFETY)—and in unconfounded Wave 21E, jezz PCE beat mandatory-verify SDD across all 8 / 8 cells on gross input (-34.3%), effective billed input (-39.3% overall, -49.9% tiered, -38.1% non-Python), output tokens (-58.0%), and latency (-45.5%) while certifying 144 / 144 (100.0% ± 0.0%, 0 violations) across all four languages and both suites in Waves 21D & 21E.
Permit-and-Contract Engineering (PCE) inverts that architecture: human review is concentrated on reality-probed project charters (jezz charter), switchable A-1/E-1 architectural blueprints (jezz blueprint + coarse-grained LVS), and compact symbol-grounded mandates (ELICIT); frontier reasoning is channeled into compiled contracts (SPECIFY); task execution is governed by a type-checked EFSM (pydantic-graph) verified via Kildall dataflow analysis over an \(F_8 = 21\) behavior basis; and every artifact is held to 32 licensure-grade Software Building Codes (JBC Edition 1.3) before a dual-digest SHA-256 CertificateOfOccupancy can be sealed.
Technical Appendices & Primary Artifacts in This Repository¶
- Pillar 1 Specification: pillar-1-behavior-basis.md (
src/jezz/behaviors/) - Pillar 2 Code Book (
JBCEdition 1.3) & BlueprintLVS: pillar-2-building-codes.md (src/jezz/codes/,packages/jezz-blueprint/,src/jezz/guards.py) - Pillar 3A Forensic SDD Teardown: pillar-3a-sdd-teardown.md
- Pillar 3B
PCEMethodology,ProjectCharter, & Dossier Auditor: pillar-3b-pce-methodology.md (src/jezz/methodology/) - Pillar 4 Runtime, Routing, Secrets, MCP Gate, & Hooks: pillar-4-pydantic-ai-runtime.md (
src/jezz/agents/,src/jezz/secrets.py,src/jezz/mcp_server.py,src/jezz/mcp_charter.py,src/jezz/mcp_blueprint.py,src/jezz/mcp_reload.py,src/jezz/hooks.py,src/jezz/plugin.py,src/jezz/cli*.py) - Track 2 Brownfield Field Trial (
7.41MLOC): track-2-brownfield-field-trial.md - Track 3 Live Occupancy Probes: track-3-live-occupancy-trial.md
- Track 4 Controlled A/B Benchmark (
Waves 4A–4E): track-4-sdd-vs-pce-benchmark.md (src/jezz/evals/) - Track 5 Multi-Mandate Longitudinal Crucible &
JBCEdition1.2: track-5-multi-mandate-crucible.md - Track 6 Full \(F_8 = 21\) Behavior Runtime Closure & Persistent Memory: track-6-full-basis-runtime.md
- Track 7 Token Cost Compression & Cross-Provider Generalizability: track-7-prompt-caching-and-providers.md
- Track 8 Polyglot
JBCInspector & Six-Repository Field Trial (300KLOC): track-8-polyglot-inspector.md - Track 9 Polyglot Autonomous
PCERuntime (jezz run&jezz renovate): track-9-polyglot-pce-runtime.md - Track 10 Zero-Credential
antigravity:<model>Adapter & Cross-Provider Benchmark (Waves 10A & 10B): track-10-cross-provider-benchmark.md - Track 11 External Brownfield OSS Renovation Crucible (
jezz renovate --ratchet): track-11-brownfield-renovation-crucible.md - Track 12 Turnkey Distribution, Reusable CI Gate (
action.yml), &v0.2.0Packaging: track-12-distribution-and-ci-gate.md - Tracks 13–20 Statutory Hardening (
v0.2.1), Polyglot Closure (v0.3.0), & Inter-Procedural / Daemon Architecture (v0.4.0): empirical-testing-roadmap.md (src/jezz/codes/dep_graph.py,PermitProfile, scoped polyglot--ratchet+--gate-timeout, \(O(|\Delta|)\)_OverlayPatchFinder,>=92%coverage ratchet + stateful/fuzzHypothesis, multi-ecosystemPROVISION/ offline polyglotCONSULT,<= 1,000LOC module ceiling, whole-workspace polyglot inter-proceduralcall_flow*.py, live MCPmcp_reload.pyhot-reload supervisor, and 4-languagejezz benchmark --language) - Track 21 Live 504-Build 4-Language SDD-vs-
PCEBenchmarks (Waves 21A, 21B, 21C, 21D, & 21E): track-21-polyglot-live-benchmark.md - Tracks 22–26 (
v0.5.0) — Compartmentation, Project Charters, Switchable CAD Blueprints, & Coarse-GrainedLVS: empirical-testing-roadmap.md (src/jezz/secrets.py,src/jezz/codes/compartment.py,src/jezz/methodology/lot_line.py,src/jezz/methodology/charter*.py,src/jezz/codes/blueprint/,src/jezz/codes/blueprint_lvs.py,src/jezz/cli_blueprint.py,packages/jezz-blueprint/) - Tracks 27–31 (
v0.6.0–v0.7.1) — Polyglot Z3 Symbolic Contract Discharge,jezz.toml, Turnkey Starter Templates, Reproducibility Suite, Ecosystem Landscape, & Audit Remediation (Waves 21B–21E): landscape-comparison.md · jbc-codebook-reference.md · references.md (src/jezz/codes/smt/,templates/,benchmarks/,examples/) - Tracks 32–35 & Round 5 Remediation (
v0.8.0) — MechanicalPreToolUsePermit Leases,.jezz/codes/*.tomlCustom Codes, 3-Tier Self-Healing Telemetry, & 5-Archetype Matrix / Weighted Rubric (Wave 35A): agent-testing-matrix.md · track-35-matrix-live-benchmark.md (src/jezz/plugin.py,src/jezz/hooks.py,src/jezz/codes/custom_codes.py,src/jezz/agents/memory.py,src/jezz/evals/matrix.py,src/jezz/evals/evaluators.py)
References¶
- Böckeler, B. (2025). Understanding Spec-Driven-Development: Kiro, spec-kit, and Tessl. MartinFowler.com. https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html
- Campbell, G. A. (2018). Cognitive Complexity: An overview and evaluation. TechDebt '18, 57–58. https://doi.org/10.1145/3194164.3194186
- Chidamber, S. R., & Kemerer, C. F. (1994). A metrics suite for object oriented design. IEEE Transactions on Software Engineering, 20(6), 476–493. https://doi.org/10.1109/32.295895
- Claessen, K., & Hughes, J. (2000). QuickCheck: A lightweight tool for random testing of Haskell programs. ACM SIGPLAN Notices (ICFP), 35(9), 268–279. https://doi.org/10.1145/351240.351266
- de Moura, L., & Bjørner, N. (2008). Z3: An efficient SMT solver. TACAS 2008, LNCS 4963, 337–340. https://doi.org/10.1007/978-3-540-78800-3_24
- Delimarsky, D. (2025). Spec-driven development with AI: Get started with a new open source toolkit (
github/spec-kit). GitHub Blog. https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/ - Fucci, D., Erdogmus, H., Turhan, B., Oivo, M., & Juristo, N. (2017). A dissection of the test-driven development process: Does it really matter to test-first or to test-last? IEEE Transactions on Software Engineering, 43(7), 597–614. https://doi.org/10.1109/TSE.2016.2616877
- Gessel, I. (1972). Problem H-187 (Fibonacci perfect-square characterization \(5n^2 \pm 4\)). The Fibonacci Quarterly, 10(4), 417–419. https://www.fq.math.ca/Scanned/10-4/advanced10-4.pdf
- Hitz, M., & Montazeri, B. (1995). Measuring coupling and cohesion in object-oriented systems. ISACC / ECOOP '96 Workshop Reader. https://doi.org/10.1007/BFb0053059
- Hoare, C. A. R. (1969). An axiomatic basis for computer programming. Communications of the ACM, 12(10), 576–580. https://doi.org/10.1145/363235.363259
- Holzmann, G. J. (2006). The power of 10: Rules for developing safety-critical code. IEEE Computer, 39(6), 95–97. https://doi.org/10.1109/MC.2006.212
- Jackson, M. (1995). Software Requirements & Specifications: A Lexicon of Practice, Principles and Prejudices. Addison-Wesley. https://dl.acm.org/doi/book/10.5555/209060
- Kildall, G. A. (1973). A unified approach to global program optimization. ACM POPL '73, 194–206. https://doi.org/10.1145/512927.512945
- Mavin, A., Wilkinson, P., Harwood, A., & Novak, M. (2009). Easy Approach to Requirements Syntax (EARS). 17th IEEE RE, 317–322. https://doi.org/10.1109/RE.2009.9
- Meyer, B. (1992 / 1997). Applying "Design by Contract" (IEEE Computer, 25(10), 40–51) & Object-Oriented Software Construction (2nd ed., Prentice Hall). https://doi.org/10.1109/2.161279
- Nagappan, N., Maximilien, E. M., Bhat, T., & Williams, L. (2008). Realizing quality improvement through test driven development. Empirical Software Engineering, 13(3), 289–302. https://doi.org/10.1007/s10664-008-9062-z
- Newcombe, C., Rath, T., Zhang, F., Munteanu, B., Brooker, M., & Deardeuff, M. (2015). How Amazon Web Services uses formal methods. Communications of the ACM, 58(4), 66–73. https://doi.org/10.1145/2699417
- Parnas, D. L. (1972). On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12), 1053–1058. https://doi.org/10.1145/361598.361623
- Rafique, Y., & Mišić, V. B. (2013). The effects of test-driven development on external quality and productivity: A meta-analysis. IEEE Transactions on Software Engineering, 39(6), 835–856. https://doi.org/10.1109/TSE.2012.28
- Tarjan, R. E. (1972). Depth-first search and linear graph algorithms. SIAM Journal on Computing, 1(2), 146–160. https://doi.org/10.1137/0201010
- Van der Aalst, W. M. P. (1998). The application of Petri nets to workflow management. Journal of Circuits, Systems, and Computers, 8(1), 21–66. https://doi.org/10.1142/S0218126698000043