Auto-Claude : From Prompt-Driven Control to FSM + Skills for LLM-Agnostic Robustness #435
mouedarbi
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Auto-Claude Architecture Review
From Prompt-Driven Control to FSM + Skills for LLM-Agnostic Robustness
Executive Summary
Auto-Claude has evolved into a sophisticated multi-agent system capable of planning, coding, reviewing, and validating software tasks using Large Language Models (LLMs). However, its original architecture relied heavily on prompt-driven state control, where agents implicitly managed workflow phases and task states through natural language outputs.
This approach introduces structural instability and makes the system highly sensitive to the capabilities and behavior of a specific LLM. As soon as a weaker, faster, or differently aligned model is introduced (e.g. Gemini, Qwen, local models), the workflow becomes unreliable.
To address this, a refactor has been introduced based on three core principles:
This document explains the current situation, the problems observed, and why the FSM + Skills architecture is required to ensure long-term robustness and model independence.
1. The Original Problem: Prompt-Driven State Control
1.1 How Auto-Claude Originally Worked
In the initial design:
1.2 Why This Is Fundamentally Unstable
This design assumes that the LLM will always:
In practice:
Result: The workflow becomes LLM-dependent. Any change of model requires prompt rewrites, parser changes, and fragile workarounds.
2. Structural Root Cause
The core issue is responsibility leakage:
This violates a fundamental rule of reliable systems:
3. The Corrected Architecture: FSM + Skills
3.1 Finite State Machine (FSM)
The FSM is now the only authority allowed to:
The FSM is deterministic, testable, and independent of the LLM.
3.2 Skills: Deterministic Action Executors
Skills are explicit backend capabilities exposed to the LLM:
Critical rule:
Skills:
This makes execution reliable regardless of model quality.
3.3 LLM Role After Refactor
The LLM is reduced to its optimal role:
The LLM no longer:
This dramatically lowers the intelligence requirements needed for correctness.
4. Prompt Refactoring: From Control to Contract
4.1 Why Prompts Had to Be Refactored
Original prompts:
This made prompts:
4.2 New Prompt Philosophy
Refactored prompts now:
Example:
{ "result": "success", "artifacts": ["implementation_plan.json"] }The FSM interprets this output and decides the next state.
5. Why This Architecture Is LLM-Agnostic
With FSM + Skills:
Failures become:
Not catastrophic or silent.
6. Why Alternative Fixes Are Insufficient
Other approaches (parsing markers, phase protocols, frontend guards) attempt to:
These are reactive solutions.
FSM + Skills is a preventive solution:
7. Conclusion
Without FSM + Skills:
With FSM + Skills:
Final Principle
This architecture is not an optimization — it is a requirement for any serious, multi-model, agent-based system.
Beta Was this translation helpful? Give feedback.
All reactions