Перейти к содержимому

Information Collection Pattern

Это содержимое пока не доступно на вашем языке.

Collect information about agent environment, user preferences, or project configuration before workflow proceeds. This enables conditional behavior in later steps.

[start] → [collect-info] → [route-by-info] → [branch-a | branch-b]
{
"type": "agent-directive",
"id": "collect-info",
"directive": "Determine agent capabilities:\n- File system access?\n- Web fetch access?\n- Test framework?",
"inputSchema": {
"type": "object",
"properties": {
"has_file_access": { "type": "boolean" },
"has_web_access": { "type": "boolean" },
"test_framework": { "type": "string" }
},
"required": ["has_file_access", "has_web_access"]
},
"connections": { "success": "route-by-capabilities" }
}
{
"type": "condition",
"id": "route-by-capabilities",
"condition": {
"operator": "eq",
"left": { "contextPath": "has_file_access" },
"right": true
},
"connections": {
"true": "file-based-flow",
"false": "memory-based-flow"
}
}

After collection, values are in context. Use them with conditional templates:

{
"directive": "{{#if has_file_access}}Save to {{output_path}}{{else}}Store in context variable{{/if}}"
}

From development-flow.json:

{
"type": "agent-directive",
"id": "get-initial-requirements",
"directive": "Study project and collect ALL information for development.\n\n1) Find CLAUDE.md or similar agent instructions\n2) Determine test command (npm test, pytest, etc.)\n3) Check for project checklist\n4) Check for agent onboarding document\n...",
"inputSchema": {
"properties": {
"test_command": { "type": "string" },
"has_tests": { "type": "string", "enum": ["yes", "no"] },
"build_command": { "type": "string" },
"checklist_path": { "type": "string" },
"has_checklist": { "type": "string", "enum": ["yes", "no"] },
"has_browser_ui": { "type": "string", "enum": ["yes", "no"] }
},
"required": ["test_command", "has_tests", "build_command", "has_checklist"]
}
}