0
Workflow from spec
Doğru düzenleme modelini seçerek, doğal dil açıklamasından eksiksiz bir çok aracılı iş akışı tasarlayın
yazan kuscubasiece·8 Eylül 2026
Kaynak: davepoon/claude-code-subagents-collection · MIT
Doğru düzenleme modelini seçerek, doğal dil açıklamasından eksiksiz bir çok aracılı iş akışı tasarlayın
Kaynak: davepoon/claude-code-subagents-collection · MIT
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/workflow-from-spec/raw -o .claude/commands/workflow-from-spec.mdHedef dosya: .claude/commands/workflow-from-spec.md
You are designing a complete AG2 multi-agent workflow from a user's specification.
Ask the user to describe their workflow goal in plain language. Then analyze:
Select the orchestration pattern:
| Scenario | Pattern | Why |
|---|---|---|
| Agents need to discuss and build on each other's ideas | Group Chat (auto) | LLM picks best next speaker |
| Fixed processing pipeline (A -> B -> C) | Sequential | Predictable flow |
| Each agent works independently, results merged | Fan-out/Fan-in | Parallel processing |
| One coordinator delegates to specialists | Hub-and-spoke | Central routing |
| Iterative refinement (draft -> review -> revise) | Two-agent loop | Focused improvement |
from autogen import ConversableAgent
creator = ConversableAgent(
name="Creator",
system_message="You draft content based on requirements. Incorporate feedback from the Reviewer.",
llm_config={"model": "gpt-4o-mini"},
)
reviewer = ConversableAgent(
name="Reviewer",
system_message="""You review drafts critically.
- If the draft meets requirements, respond with: APPROVE
- Otherwise, provide specific, actionable feedback""",
llm_config={"model": "gpt-4o-mini"},
)
result = creator.initiate_chat(
reviewer,
message="Create a [specification here]",
max_turns=4, # Max 2 revision cycles
)
from autogen import ConversableAgent
coordinator = ConversableAgent(
name="Coordinator",
system_message="""You coordinate work between specialists.
- Analyze the request and determine which specialist(s) to engage
- Synthesize responses from specialists into a final answer
- Available specialists: [list them]""",
llm_config={"model": "gpt-4o-mini"},
)
specialist_a = ConversableAgent(
name="SpecialistA",
system_message="You handle [domain A]. Respond only about your expertise.",
llm_config={"model": "gpt-4o-mini"},
)
specialist_b = ConversableAgent(
name="SpecialistB",
system_message="You handle [domain B]. Respond only about your expertise.",
llm_config={"model": "gpt-4o-mini"},
)
# Use nested chats for hub-and-spoke
coordinator.register_nested_chats(
[
{"recipient": specialist_a, "max_turns": 1, "summary_method": "last_msg"},
{"recipient": specialist_b, "max_turns": 1, "summary_method": "last_msg"},
],
trigger=lambda sender: True, # Always consult specialists
)