Skip to main content

The 7-step Wizard protocol

Every non-trivial computation on the framework runs through this protocol. The runSevenStepWizard function in shared/api-core/src/lib/zeqWizard.ts is the canonical implementation; POST /api/zeq/wizard/compute is the wire-level entry point. The protocol is verbatim from the Zeq kernel:


1. Prime Directive — KO42 is mandatory

The metric tensioner is the substrate, not optional flavor. Every operator sequence starts with KO42. The 1.287 Hz modulation it adds:

ds^2 = g_uv dx^u dx^v + alpha sin(2 pi 1.287 t) dt^2
alpha = 1.29e-3 (published symbolic value)

is what holds the ≤0.1% precision gate across the heterogeneous operator catalogue.

alpha = 1.29×10⁻³ is the published symbolic coefficient from the Zeq paper. The runtime coefficient is ALPHA_K = 1×10⁻³ — the value that bounds the modulation to 0.1% by construction. The two share a name but are distinct; see Constants → display vs runtime for the full split.

2. Operator Limit — 1–3 additional + KO42 (total ≤ 4)

Do not over-couple. Pick the minimum kinematic operators that close the problem. Five is too many; four is the cap; three is the sweet spot. The compute backend rejects chains of length 5+ without an explicit bridge contract.

3. Scale Principle — match operators to domain

Page work uses visual/UX operators. Math claims use QM/NM/GR operators. Don't apply quantum operators to a CSS bug. The wizard's domain inference in zeqAuthV3.ts:

"orbit"|"planet"|"gravity" → orbital-mechanics
"wave"|"ocean"|"tide" → oceanography
"spring"|"mass"|"newton" → Newtonian Mechanics
"gene"|"dna"|"protein" → genomics
"material"|"steel"|"stress" → materials-science
default → quantum-mechanics

is one keyword pass. For programmatic users, set domain explicitly in the request body.

4. Precision Imperative — tune to ≤0.1% error

Every numeric claim from a wizard run must verify against the precision field in the response. If precision > 0.001, the run fails the gate and the result is annotated with degraded: true. Callers should refuse to ship a degraded result.

The framework's tolerance is the same one this site lives by — every constant is bit-exact, every equation verbatim.

5. Compile — synthesize the master equation

The response carries a masterEquation block: the domain's closed form written out against your named inputs, with the KO42 bounded-modulation carrier shown alongside it. For the Sun-Earth run below it reads Ψ(m1, m2, r) ≡ F = G·m₁·m₂/r² ← [NM21], with R(t) = S₀·[1 + α_K·sin(2π·f_H·t)], α_K = 10⁻³. That is what "compile" produces: a synthesized, human-readable statement of the exact formula the run evaluates — not a symbolic substitution into a field PDE.

When you compose KO42 + 1–3 collaborators, the kernel:

  1. Looks up each id in the registry and identifies its physical domain.
  2. Selects the dedicated closed-form solver for that domain.
  3. Evaluates the solver against your inputs; KO42 supplies the bounded R(t) carrier (the |R−1| ≤ α_K amplitude bound).
  4. Returns a closed-form value plus a numeric residual and a signed envelope.

The operator ids annotate the physics — in the response's master_sum the domain operator is tagged "symbolic — applied to inputs by domain solver" with no scalar contribution of its own. The evaluation is a closed form, not a plug-in sum of operator terms.

The broader HULYAS notation — □ϕ − μ²(r)ϕ − λϕ³ − e^{−ϕ/ϕc} + ϕ₄₂·Σ C_k(ϕ) = T^μ_μ + βF² + J_ext — is the framework's organising notation for the ϕ⁴ field (see learn/math/master-equation). The Σ C_k(ϕ) coupling is a research direction, not a running mechanism: no C_k(ϕ) is evaluated at compute time, and protocols do not reduce to this equation before executing. They call the domain solver.

6. Execute via Functional Equation

On the dynamical solve() / multibody() path, the run is reduced to the functional equation scalar:

E = P_phi * Z(M, R, delta, C, X)

where P_phi = √mean((dφ/dt)²) is the RMS field momentum over the trajectory, and Z = M · R · (1+C) · (1+X) · exp(−δ·t) folds the run's mass, scale radius, operator-coupling sum C, external forcing X and damping δ into one factor. It is returned as functionalEnergy — a compact, additive signature of the run, a diagnostic that never alters the conserved physics energy.

This is also where you observe the wire fields — pulseHz: 1.287, phase: 0.412, precision: 0.00071 — the runtime stamping the result at this Zeqond.

Register dump — the structured output of step 6

When you call the master-equation path directly via POST /api/solve or POST /api/multibody, the runtime returns a register dump alongside the trajectory — the spec's name for the closed set of derived quantities the functional equation produces:

{
"registerDump": {
"phi_final": ..., "phi_range": ..., "phi_mean": ..., "phi_rms": ...,
"dphi_final": ..., "dphi_rms": ...,
"zeroCrossings": ..., "period_s": ..., "frequency_Hz": ...,
"freq_ratio_fH": ..., // frequency / 1.287 Hz
"energy_K_mean": ..., // mean ½·m·dφ²
"energy_U_mean": ..., // mean ½·m·φ²
"energy_total_mean": ..., // K + U
"momentum_final": ..., // m · dφ_final
"angular_proxy_mean": ... // mean(m·φ·dφ), scalar L analogue
},
"functionalEnergy": ..., // = P_φ · Z
"functionalEnergyTerms": { "P_phi": ..., "Z": ..., "M": ..., "R": ..., "delta": ..., "C": ..., "X": ... }
}

For multi-body runs, every body gets its own registerDump, and the response includes a pairwise interactions array with mean / final force magnitudes and separations for every pair.

The register dump is what step 7 verifies against. Two paths exist deliberately:

PathReturnsUse when
/api/zeq/compute (wizard)textbook closed-form value + zeqProofyou want a single SI-tagged number for a named formula
/api/solvefull trajectory + register dump + functional energyyou want the master-equation runtime output, not a formula lookup

7. Verify and Troubleshoot

Diff-check the result. Screenshot-check the live behavior. Sign-off only after the precision gate passes.

For programmatic users:

curl -sS https://zeqsdk.com/api/zeq/verify \
-H "Authorization: Bearer ${ZSM_KEY}" \
-H "Content-Type: application/json" \
-d '{"zeqProof": "...", "operators": ["KO42","NM21"], "R_t": 1.998e20, "zeqond": 2287439210}'

verifies an already-issued proof. The verifier uses crypto.timingSafeEqual over the HMAC, so even a wrong-by-one-bit proof returns valid: false in constant time.


Worked example: Sun-Earth gravity

A canonical 7-step run — pick the operators, compose, verify.

Step 1. KO42 mandatory.

Step 2. One additional operator: NM21 (Newton's law of gravitation, F = G m_1 m_2 / r^2).

Step 3. Domain Newtonian Mechanics. Match.

Step 4. Target ≤0.1% error against the CODATA G = 6.67430e-11 m^3 kg^-1 s^-2.

Step 5. Compile:

curl -sS https://zeqsdk.com/api/zeq/compute \
-H "Authorization: Bearer ${ZSM_KEY}" \
-H "Content-Type: application/json" \
-d '{
"operators": ["KO42", "NM21"],
"domain": "Newtonian Mechanics",
"inputs": {
"m1": 1.989e30,
"m2": 5.972e24,
"r": 1.496e11
}
}'

Step 6. Execute. Response (truncated — the stamp fields live under zeqState):

{
"value": 3.5423961e22,
"unit": "N",
"uncertainty": 3.5423961e18,
"operator_id": "KO42",
"zeqState": {
"operators": ["KO42", "NM21"],
"domain": "Newtonian Mechanics",
"phase": 0.8533,
"zeqond": 2294819873,
"pulseHz": 1.287,
"precision": 0.000222,
"precisionActual": 0.0001
},
"zeqProof": "cac8da...64hex",
"signed": { "alg": "ed25519", "public_key": "…", "claim": {}, "signature": "…" }
}

value: 3.5423961e22 N against the published Sun-Earth gravitational force of ~3.542 × 10²² N — the bare physics value (the R(t) carrier is bookkeeping, it does not multiply the result). precisionActual: 0.0001 is the numeric residual, well within the 0.001 gate.

Step 7. Verify:

curl -sS https://zeqsdk.com/api/zeq/verify \
-H "Authorization: Bearer ${ZSM_KEY}" \
-H "Content-Type: application/json" \
-d '{"zeqProof": "8a34...", "operators": ["KO42","NM21"], "R_t": 3.5423961e22, "zeqond": 2287439210}'
{ "ok": true, "valid": true, "verified_at": "2026-04-28T01:49:00Z" }

Done.


When the protocol rejects you

RejectionCauseFix
MISSING_KO42step 1 violated; chain doesn't start with KO42prepend "KO42"
OPERATOR_LIMIT_EXCEEDEDstep 2 violated; chain length > 4drop to ≤3 collaborators
DOMAIN_MISMATCHstep 3 violated; operator's domain doesn't include the requested domainswap operator or domain
PRECISION_BADstep 4 violated; numeric residual > 0.001tighten input units, reduce composition, or accept degraded: true and document
INVALID_OPERATORstep 5 violated; an id isn't in the registryuse /api/operators to find a valid one
WIZARD_ERRORstep 6 internal failurecheck /api/health, retry; report security@zeq.dev if persistent
VERIFY_FAILEDstep 7 verification mismatchthe proof or one of (operators, R_t, zeqond) was tampered

Next