feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop

This commit is contained in:
2026-03-31 13:03:26 -04:00
parent 5a9129132e
commit 1712b1e4a9
114 changed files with 3652 additions and 2581 deletions

View File

@@ -0,0 +1,26 @@
def simulate_get_tiered_model(tier, mock_store):
mapping = {
"powerful": "LLM_MODEL_POWERFUL",
"fast": "LLM_MODEL_FAST",
"free": "LLM_MODEL_FREE"
}
prop_key = mapping.get(tier.lower(), "LLM_MODEL_TEXT")
return mock_store.get(prop_key, "gpt-3.5-turbo") # Default
if __name__ == "__main__":
mock_store = {
"LLM_MODEL_POWERFUL": "claude-3-opus",
"LLM_MODEL_FAST": "gpt-4o-mini"
}
print("--- Test: Tier Resolution ---")
m1 = simulate_get_tiered_model("powerful", mock_store)
m2 = simulate_get_tiered_model("fast", mock_store)
m3 = simulate_get_tiered_model("free", mock_store) # Not in store
print(f"Powerful: {m1}")
print(f"Fast: {m2}")
print(f"Free (Default): {m3}")
status = "PASS" if m1 == "claude-3-opus" and m2 == "gpt-4o-mini" and m3 == "gpt-3.5-turbo" else "FAIL"
print(f"\nFinal Status: {status}")