feat(flow-coordinator): add slashCommand/slashArgs support for unified workflow

- Add buildNodeInstruction() to construct instructions from slashCommand field
- Support slashArgs with {{variable}} interpolation
- Append additional instruction as context when slashCommand is set
- Update unified-workflow-spec.md with slashCommand/slashArgs documentation

This enables frontend orchestrator JSON to be directly consumed by
flow-coordinator skill in Claude client.
This commit is contained in:
catlog22
2026-02-05 15:33:06 +08:00
parent e555355a71
commit 834951a08d
2 changed files with 43 additions and 7 deletions

View File

@@ -48,6 +48,10 @@ interface PromptTemplateNodeData {
label: string; // Display label in editor
instruction: string; // Natural language instruction
// === Slash Command (optional, overrides instruction) ===
slashCommand?: string; // Slash command name (e.g., "workflow:plan")
slashArgs?: string; // Arguments for slash command (supports {{variable}})
// === Data Flow ===
outputName?: string; // Name for output reference
contextRefs?: string[]; // References to previous outputs
@@ -63,6 +67,10 @@ interface PromptTemplateNodeData {
}
```
**Instruction Resolution Priority**:
1. If `slashCommand` is set: `/{slashCommand} {slashArgs}` + optional `instruction` as context
2. Otherwise: `instruction` directly
### FlowEdge
```typescript