𝗖𝗹𝗮𝘂𝗱𝗲 𝗗𝘆𝗻𝗮𝗺𝗶𝗰 𝗪𝗼𝗿𝗸𝗳𝗹𝗼𝘄𝘀 𝗮𝘀 𝗖𝗵𝗼𝗿𝗲𝗼𝗴𝗿𝗮𝗽𝗵𝗲𝗱 𝗦𝗲𝗺𝗮𝗻𝘁𝗶𝗰 𝗕𝗲𝗵𝗮𝘃𝗶𝗼𝗿𝘀

Traditional workflows use a central controller to manage every step. The controller knows the sequence: classify, call tool, wait, branch, and finish. This works for predictability, but it is rigid.

I use a different approach. My system uses choreographed semantic behaviors. Instead of one controller, agents publish and subscribe to events. One agent does not need to know the whole system. It only needs to know the semantic contract.

This creates a hybrid model:

  • IntentGraph defines the macro intention.
  • QuarkBehavior defines the smallest semantic unit.
  • SubAgents react to events.
  • ProofAgents verify correctness.
  • HealingAgents repair invalid states.
  • BenchmarkAgents measure cost and latency.
  • Governor decides if a result is acceptable.

In this model, orchestration handles high-level intent. Choreography handles local adaptation. The orchestrator says what to achieve. The agents discover how to react to events.

I call this semantic routing. When a message arrives, the system classifies the intent. It does not just call a function. It selects a behavior, validates the data, and emits success or error events.

This architecture enables several advanced patterns:

  1. Adversarial Verification After an agent produces an output, another agent tries to prove it is wrong. The adversary acts as an attacker, a compiler, or a malicious user. It does not try to be helpful. It tries to break the candidate.

  2. Generate-and-Filter The system generates multiple solutions. It then runs them through deterministic gates. These gates check schema, types, unit tests, and security policies. Generation is cheap. Acceptance must be strict.

  3. Tournament If no single solution is best, I run a tournament. I generate several competing solutions and score them against a rubric. We compare them on CPU cost, memory use, and safety. A tournament produces a scorecard, not just a winner.

  4. Intent-based Healing Most systems return an error and stop. My system treats an error as a new event. A healing agent subscribes to the error, receives the trace, and attempts to repair the payload. This is a loop of convergence.

목표는 오류를 피하는 것이 아닙니다. 목표는 모든 오류를 새로운 시맨틱 동작(semantic behavior)으로 전환하는 것입니다. 실패가 발생했다면, 이는 우리가 지식이 부족하다는 것을 의미합니다. 우리는 그 실패를 이용해 새로운 규칙을 만들어, 해당 오류가 다시는 발생하지 않도록 합니다.

이를 통해 코딩은 추측 게임에서 엔지니어링으로 변모합니다.

출처: https://dev.to/fullagenticstack/claude-dynamic-workflows-como-comportamentos-semanticos-coreografados-3enl

학습 커뮤니티(선택 사항): https://t.me/GyaanSetuAi