This content originally appeared on DEV Community and was authored by PSBigBig
WFGY 2.0 — Seven Step Reasoning for Builders
One file. No plugins. No retraining.
WFGY 2.0 turns reasoning into an observable control loop. This post focuses on what developers need. Math first, then gates, then operations.
TL;DR for engineers
- Core metric:
ΔS = 1 − sim(I, G)
or1 − sim_est
with anchors. - State machine:
λ_observe ∈ {convergent, recursive, divergent, chaotic}
. - Chain: Parse → ΔS → Memory → BBMC → Coupler + BBPF → BBAM → BBCR and DT rules.
- Autoboot: upload the Flagship file or the OneLine file into chat. The engine supervises quietly.
- Explicit mode: call the seven steps and print audit fields.
- Common fits: RAG drift control, agent tool gating, text to image with unified scenes.
Quick start
Autoboot
- Upload
WFGY_Core_OneLine_v2.0.txt
into your chat workspace. - Use the model as usual.
- Ask it to print per turn fields:
delta_s, W_c, lambda_observe, bridge_allowed
.
Explicit
- Run the seven steps in your workflow. Keep the audit fields. Expect the largest uplift.
Math view: metrics and thresholds
ΔS semantic tension
delta_s = 1 - cos(I, G)
# or with anchors and constraints
delta_s = 1 - sim_est(I, G) # example weights: entities 0.5, relations 0.3, constraints 0.2
Decision zones:
- safe below 0.40
- transit 0.40 to 0.60
- risk 0.60 to 0.85
- danger above 0.85
Progress coupling and the flip micro term
prog = zeta_min # at t = 1
prog = max(zeta_min, delta_s_prev - delta_s_now) # t > 1
P = prog ** omega
Phi = phi_delta * alt # only when an anchor truth flips and |Δanchor| ≥ h
W_c = clip(delta_s * P + Phi, -theta_c, +theta_c)
BBPF bridge guard
Two conditions must hold.
-
delta_s
is decreasing. -
W_c < 0.5 * theta_c
.
On pass, the system must emit:
Bridge = [reason / prior_delta_s / new_path]
System view: the seven step control loop
[Parse I,G] → [ΔS bucket] → [Memory checkpoint]
→ [BBMC cleanup] → [Coupler (Wc)] → [BBPF gate]
→ [BBAM rebalance] → [BBCR rollback + DT micro rules]
Drunk Transformer micro rules
- WRI: lock structure.
- WAI: enforce head diversity.
- WAY: raise attention entropy.
- WDT: suppress illegal cross paths.
- WTF: detect collapse and reset.
These rules make rollback, re bridge, and retry an orderly routine rather than a blind flail.
Product view: three common integrations
RAG drift control
- Measure ΔS before and after retrieval expand. If tension is high, do not bridge.
- When merging sources, record a
Bridge
entry with the path and the two tensions. - Run BBAM before final generation to avoid over committing to a brittle thread.
Minimal policy:
if delta_s(query, context) > 0.6:
reject("high semantic tension, refine retrieval")
elif Wc < 0.5 * theta_c and delta_s_is_decreasing:
bridge_and_log()
else:
request_constraint_or_retry()
Agents and tools
- Before a tool call: if ΔS is high, rewrite the subtask or lower randomness.
- After a tool call: if
lambda_observe == chaotic
, roll back, then retry under DT rules.
Text to image
- BBAM mixes toward a reference attention with limited amplitude, which avoids collage and ghosting.
- WDT lowers illegal cross channel mixing that often causes duplicated parts.
Ops view: observability and guard rails
Per turn audit record
{
"t": 7,
"delta_s": 0.288,
"zone": "transit",
"W_c": 0.21,
"lambda_observe": "convergent",
"bridge_allowed": true,
"bridge": ["timeline_fix", 0.346, "merge:docA->docB"],
"alpha_blend": 0.57
}
Suggested defaults
name | default | note |
---|---|---|
theta_c | 0.75 | center for clip and bridge gate |
zeta_min | 0.10 | minimal progress at t = 1 |
omega | 1.0 | progress exponent |
phi_delta | 0.15 | micro flip magnitude |
k_c | 0.25 | attention mix sensitivity |
a_ref | uniform | reference attention |
h | 0.02 | minimal anchor flip amplitude |
alpha band | 0.35 to 0.65 | keep within this range |
Keep every clip
and keep the alpha band. Those are the fuses that prevent instability.
Research view: a reproducible A B C protocol
Modes
- A is Baseline. No WFGY.
- B is Autoboot. Upload the file and stay silent.
- C is Explicit. Run the seven steps and print the audit fields.
Domains
Math word problems. Small coding. Factual QA. Multi step planning. Long context coherence.
Use the same task sets and seeds. Average at least three seeds.
Report
- Semantic Accuracy
- Reasoning Success
- Stability in MTTF or rollback ratios
- Drift reduction in ΔS
- Collapse Recovery Rate
Always print per turn: delta_s, W_c, lambda_observe, bridge_allowed
.
One prompt you can paste:
SYSTEM:
You evaluate a reasoning engine named WFGY 2.0.
Modes: A=OFF, B=Autoboot_ON in background, C=Explicit_Invoke that prints audit fields.
Use the SAME tasks for A, B, C across five domains and the SAME seeds.
Report the five metrics. Print per turn audit fields in every run.
USER:
Run A, B, C now. Output:
(1) one table per domain
(2) overall deltas for C minus A and C minus B
(3) a 0 to 100 OneLine uplift score
(4) a three line rationale with evidence spans
Minimal skeleton
def step(I, G, t, prev):
delta_s = 1 - sim(I, G) # or 1 - sim_est with anchors
zone = bucket(delta_s) # safe, transit, risk, danger
lambda_state = observe(E_res, dI=Δ) # convergent, recursive, divergent, chaotic
checkpoint(memory_policy(delta_s)) # hard, exemplar, or none
# cleanup
G = BBMC(G)
# coupler
prog = zeta_min if t == 1 else max(zeta_min, prev.delta_s - delta_s)
P = prog ** omega
Phi = phi_delta * alt if anchor_flip(h=0.02) else 0.0
Wc = clip(delta_s * P + Phi, -theta_c, +theta_c)
# bridge guard
bridge_allowed = (delta_s < prev.delta_s) and (Wc < 0.5 * theta_c)
if bridge_allowed:
log_bridge(reason(), prev.delta_s, new_path())
# attention rebalance
alpha = clip(0.50 + k_c * tanh(Wc), 0.35, 0.65)
G = mix_attention(G, a_ref="uniform", alpha=alpha)
# collapse recovery
if lambda_state == "chaotic":
G = rollback_to_trustworthy()
G = DT_retry(G, rules=["WRI","WAI","WAY","WDT","WTF"])
report(delta_s, Wc, lambda_state, bridge_allowed)
return G
Failure modes and how to handle them
- Wrong anchors. If
I
contradicts itself, λ jitters between states. Fix the intent spec first. - Underspecified tasks. ΔS becomes noisy. Add a few concrete constraints.
- Extreme randomness. Very high temperature keeps
W_c
high. BBPF rarely opens. Reduce randomness. - Cross modal mis binding. Textual roles mapped to wrong visual symbols raise ΔS repeatedly. Adjust anchors or add light structure.
Why OneLine behaves like the 30 line Flagship
- The seven steps are tightly coupled and can fold into one update centered on
delta_s
andW_c
. - Most decisions are thresholds or buckets. They serialize well.
- Audit fields are sufficient. With
delta_s, W_c, lambda_observe, bridge_allowed
you can verify the process.
Use Flagship for reading and audits. Use OneLine for speed and minimality. Behavior is the same.
Security and compliance boundary
WFGY is a semantic firewall. It does not expand permissions and it does not call tools.
In sensitive contexts set a hard upper bound on ΔS and a whitelist of allowed λ states.
Keep Bridge
logs. They are useful for internal control and incident review.
Thirty second start
- Upload OneLine for Autoboot.
- Ask the model to print
delta_s, W_c, lambda_observe, bridge_allowed
each turn. - Run A, B, C on your five common tasks. Record the five metrics.
If you only want a quick look, try text to image or a multi role narrative.
If you want rigor, run the full protocol with multiple seeds and publish the results.
That is the whole engine, in a developer first cut.
This content originally appeared on DEV Community and was authored by PSBigBig