diff --git a/skills/conditional-request-routing-workflow/SKILL.md b/skills/conditional-request-routing-workflow/SKILL.md new file mode 100644 index 0000000..9262f47 --- /dev/null +++ b/skills/conditional-request-routing-workflow/SKILL.md @@ -0,0 +1,81 @@ +--- +name: conditional-request-routing-workflow +version: 1.0.0 +description: Collect a request, classify it via branching logic, and route to an approval + or rejection handler to produce a final result +inputs: +- name: request + type: string + description: The input text or request to be evaluated and routed +steps: +- node: Start + agent_type: input + description: Prompt user and capture the request into state field 'request' + next: Classify +- node: Classify + agent_type: branching + description: Evaluate the request and set 'decision' field, routing to Approve on + success or Reject on failure + input_fields: + - request + output_field: decision + next_node: Approve + on_failure: Reject +- node: Approve + agent_type: default + description: Format and output an approval message containing the request + input_fields: + - request + output_field: result + prompt: 'Request approved: {request}' +- node: Reject + agent_type: default + description: Format and output a rejection message containing the request + input_fields: + - request + output_field: result + prompt: 'Request rejected: {request}' +outputs: +- name: result + type: string + description: Final formatted message indicating the outcome (approved or rejected) +- name: decision + type: string + description: Routing decision produced by the branching node +tags: [] +metadata: + source_repo: https://github.com/jwwelbor/AgentMap.git + extracted_at: '' + confidence: 0.92 +--- + +# conditional-request-routing-workflow + +Collect a request, classify it via branching logic, and route to an approval or rejection handler to produce a final result + +## Steps + +1. {'node': 'Start', 'agent_type': 'input', 'description': "Prompt user and capture the request into state field 'request'", 'next': 'Classify'} +2. {'node': 'Classify', 'agent_type': 'branching', 'description': "Evaluate the request and set 'decision' field, routing to Approve on success or Reject on failure", 'input_fields': ['request'], 'output_field': 'decision', 'next_node': 'Approve', 'on_failure': 'Reject'} +3. {'node': 'Approve', 'agent_type': 'default', 'description': 'Format and output an approval message containing the request', 'input_fields': ['request'], 'output_field': 'result', 'prompt': 'Request approved: {request}'} +4. {'node': 'Reject', 'agent_type': 'default', 'description': 'Format and output a rejection message containing the request', 'input_fields': ['request'], 'output_field': 'result', 'prompt': 'Request rejected: {request}'} + +## Inputs + +- {'name': 'request', 'type': 'string', 'description': 'The input text or request to be evaluated and routed'} + +## Outputs + +- {'name': 'result', 'type': 'string', 'description': 'Final formatted message indicating the outcome (approved or rejected)'} +- {'name': 'decision', 'type': 'string', 'description': 'Routing decision produced by the branching node'} + +## Failure Modes + +- Empty or missing request input prevents meaningful classification +- Branching node fails to resolve a valid route and defaults to rejection path +- Prompt template variable missing causes malformed output + +## Source + +Extracted from: [https://github.com/jwwelbor/AgentMap.git](https://github.com/jwwelbor/AgentMap.git) +Confidence: 0.92 diff --git a/skills/conditional-request-routing-workflow/commands.md b/skills/conditional-request-routing-workflow/commands.md new file mode 100644 index 0000000..f70495c --- /dev/null +++ b/skills/conditional-request-routing-workflow/commands.md @@ -0,0 +1,6 @@ +# Commands: conditional-request-routing-workflow + +## Available Commands + +- `/skill conditional-request-routing-workflow` — Load this skill +- `/run conditional-request-routing-workflow` — Execute workflow diff --git a/skills/conditional-request-routing-workflow/examples.md b/skills/conditional-request-routing-workflow/examples.md new file mode 100644 index 0000000..83ab7f0 --- /dev/null +++ b/skills/conditional-request-routing-workflow/examples.md @@ -0,0 +1,10 @@ +# Examples: conditional-request-routing-workflow + +## Usage Example + +```python +# How to use this skill +# Inputs: {'name': 'request', 'type': 'string', 'description': 'The input text or request to be evaluated and routed'} +# Process: {'node': 'Start', 'agent_type': 'input', 'description': "Prompt user and capture the request into state field 'request'", 'next': 'Classify'} → {'node': 'Classify', 'agent_type': 'branching', 'description': "Evaluate the request and set 'decision' field, routing to Approve on success or Reject on failure", 'input_fields': ['request'], 'output_field': 'decision', 'next_node': 'Approve', 'on_failure': 'Reject'} → {'node': 'Approve', 'agent_type': 'default', 'description': 'Format and output an approval message containing the request', 'input_fields': ['request'], 'output_field': 'result', 'prompt': 'Request approved: {request}'} +# Outputs: {'name': 'result', 'type': 'string', 'description': 'Final formatted message indicating the outcome (approved or rejected)'}, {'name': 'decision', 'type': 'string', 'description': 'Routing decision produced by the branching node'} +``` diff --git a/skills/conditional-request-routing-workflow/metadata.json b/skills/conditional-request-routing-workflow/metadata.json new file mode 100644 index 0000000..7deb698 --- /dev/null +++ b/skills/conditional-request-routing-workflow/metadata.json @@ -0,0 +1,72 @@ +{ + "name": "conditional-request-routing-workflow", + "version": "1.0.0", + "goal": "Collect a request, classify it via branching logic, and route to an approval or rejection handler to produce a final result", + "inputs": [ + { + "name": "request", + "type": "string", + "description": "The input text or request to be evaluated and routed" + } + ], + "steps": [ + { + "node": "Start", + "agent_type": "input", + "description": "Prompt user and capture the request into state field 'request'", + "next": "Classify" + }, + { + "node": "Classify", + "agent_type": "branching", + "description": "Evaluate the request and set 'decision' field, routing to Approve on success or Reject on failure", + "input_fields": [ + "request" + ], + "output_field": "decision", + "next_node": "Approve", + "on_failure": "Reject" + }, + { + "node": "Approve", + "agent_type": "default", + "description": "Format and output an approval message containing the request", + "input_fields": [ + "request" + ], + "output_field": "result", + "prompt": "Request approved: {request}" + }, + { + "node": "Reject", + "agent_type": "default", + "description": "Format and output a rejection message containing the request", + "input_fields": [ + "request" + ], + "output_field": "result", + "prompt": "Request rejected: {request}" + } + ], + "outputs": [ + { + "name": "result", + "type": "string", + "description": "Final formatted message indicating the outcome (approved or rejected)" + }, + { + "name": "decision", + "type": "string", + "description": "Routing decision produced by the branching node" + } + ], + "failure_modes": [ + "Empty or missing request input prevents meaningful classification", + "Branching node fails to resolve a valid route and defaults to rejection path", + "Prompt template variable missing causes malformed output" + ], + "confidence": 0.92, + "explanation": "Extracted from the ReviewFlow CSV example in the AgentMap README. This is a declarative, CSV-defined LangGraph workflow demonstrating the reusable pattern of input -> branching classification -> conditional handling paths. It can be generalized for ticket triage, content moderation, or any route-by-condition use case.", + "source_repo": "https://github.com/jwwelbor/AgentMap.git", + "score": 1.0 +} \ No newline at end of file diff --git a/skills/conditional-request-routing-workflow/tests.md b/skills/conditional-request-routing-workflow/tests.md new file mode 100644 index 0000000..fb4b29b --- /dev/null +++ b/skills/conditional-request-routing-workflow/tests.md @@ -0,0 +1,9 @@ +# Tests: conditional-request-routing-workflow + +## Test Checklist + +- [ ] Workflow has at least 3 steps +- [ ] All inputs are defined +- [ ] All outputs are defined +- [ ] Failure modes are documented +- [ ] Skill can be loaded without errors