Quick Reference
| Property | Value |
|---|---|
| Domain | Prompts |
| FORGE Stage | 2 (Implementation) |
| Version | 1.0.0 |
| Primary Output | Multi-step prompt chain specifications |
Use this agent when you need to:
- Break complex tasks into sequential or parallel prompt steps
- Design workflows that require multi-stage reasoning
- Map data flow between dependent prompt operations
- Create error handling and fallback strategies for prompt chains
Core Capabilities
Chain Design
Creates multi-step prompt sequences for complex task orchestration
Task Decomposition
Breaks complex reasoning into chainable subtasks with clear boundaries
Data Flow Mapping
Defines how outputs from one step feed into subsequent steps
Error Branching
Designs fallback paths and error recovery strategies
When to Use
Ideal Use Cases
Complex tasks requiring multi-step reasoning (e.g., analyze → synthesize → recommend)
Workflows where early steps inform later decisions (conditional branching)
Parallel analysis scenarios (e.g., multi-perspective evaluation)
Tasks needing error recovery and fallback strategies
Orchestrating multiple Veritas prompts into cohesive workflows
Not Recommended For
Usage Examples
- Code Review Chain
- Parallel Analysis
- Incident Response
Multi-Step Code Review & Improvement
Task: Review code → Prioritize issues → Generate improvements → Explain changesChain Design- Sequential execution: Each step depends on previous results
- Conditional step 2: Only prioritize if issues found
- Fallback on step 3: Return original code if improvement fails
- Skip step 4: If no changes made, skip explanation
Output Format
Veritas Chain Schema
Chain Design Patterns
Sequential Chains
Use when: Each step depends on previous outputsParallel Chains
Use when: Steps are independent and can run concurrentlyConditional Chains
Use when: Branching logic based on intermediate resultsError Handling Strategies
| Strategy | Behavior | Use Case |
|---|---|---|
| fail | Halt chain execution | Critical steps that must succeed |
| skip | Continue to next step | Optional enhancements |
| fallback | Use default value | Safe defaults available |
| continue | Proceed with partial results | Parallel steps where some failures acceptable |
FORGE Gate Compliance
Entry Gates (Pre-conditions)
Entry Gates (Pre-conditions)
Before invoking this agent, ensure:
- Complex task defined: Clear description of multi-step reasoning required
- Available prompts identified: Veritas prompts to compose into chain
- Chain outcome specified: Expected final output format
- Input format documented: Schema for chain inputs
Exit Gates (Post-conditions)
Exit Gates (Post-conditions)
This agent completes successfully when:
- Chain structure documented: Full step sequence with input/output mappings
- Prompts linked: All steps reference Veritas prompts or define new ones
- Data flow validated: Output → input mappings confirmed for all steps
- Error handling defined: Each step has on_error strategy
- Execution order established: Sequential/parallel/conditional mode set
- Decision record logged: ADR with design rationale
Decision Record Format
Decision Record Format
All significant chain design decisions are logged as:
Integration Points
Control Plane API
This agent does not directly interact with the Control Plane API - it designs chain structures that may later be executed via the API.Veritas Prompt Library
Consumes:vrt-chain001: Chain design patterns and best practicesvrt-flow001: Data flow validation templatesvrt-reason01: Reasoning decomposition strategies
- Chain specifications in
veritas/agent-prompts/prompts/ - Category:
chain - Status:
draft(requires testing before production)
n8n Workflow Integration
Chain designs may inform n8n workflow structure, particularly for:- Sequential API calls with state management
- Parallel webhook processing
- Conditional routing based on AI analysis
Related Agents
| Agent | Relationship | Integration Point |
|---|---|---|
| Prompt Refiner | Upstream | Provides refined prompts for chain composition |
| Fragment Curator | Peer | Supplies reusable fragments for chain steps |
| Factory Orchestrator | Upstream | Routes complex tasks requiring chain design |
| Workflow Architect | Downstream | May implement chains as n8n workflows |
Error Handling
Common Issues
Escalation Path
If the agent cannot complete chain design:- Log decision record with
status:blocked - Output partial chain with unresolved dependencies flagged
- Return control to Factory Orchestrator with design blockers
Success Metrics
| Metric | Target | Measurement |
|---|---|---|
| Data Flow Completeness | 100% | All step inputs mapped from prior outputs |
| Error Handler Coverage | 100% | Every step has on_error strategy |
| Prompt Reuse | >70% | Percentage of steps using existing Veritas prompts |
| Complexity Appropriate | <10 steps | Average chain length for maintainability |
Chain Complexity Guidelines
| Complexity | Steps | Parallel Groups | Conditionals | Use Case |
|---|---|---|---|---|
| Simple | 2-3 | 0-1 | 0-1 | Basic sequential workflows |
| Moderate | 4-7 | 1-2 | 1-3 | Multi-stage analysis with branching |
| Complex | 8-10 | 2-4 | 3-5 | Enterprise orchestration workflows |
Source Files
View Agent Source
Maintained in
so1-agents repository under agents/prompts/chain-architect.md