@output.ai/cli 0.5.6 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agents/init.d.ts +0 -1
- package/dist/commands/agents/init.js +9 -16
- package/dist/commands/agents/init.spec.js +49 -224
- package/dist/commands/workflow/generate.js +2 -2
- package/dist/commands/workflow/plan.js +3 -3
- package/dist/commands/workflow/plan.spec.js +13 -13
- package/dist/services/claude_client.d.ts +4 -4
- package/dist/services/claude_client.integration.test.js +2 -2
- package/dist/services/claude_client.js +7 -7
- package/dist/services/claude_client.spec.js +3 -3
- package/dist/services/coding_agents.d.ts +10 -24
- package/dist/services/coding_agents.js +112 -368
- package/dist/services/coding_agents.spec.js +101 -290
- package/dist/services/project_scaffold.js +3 -3
- package/dist/services/workflow_builder.d.ts +1 -1
- package/dist/services/workflow_builder.js +1 -1
- package/dist/services/workflow_planner.js +1 -2
- package/dist/services/workflow_planner.spec.js +4 -5
- package/dist/templates/agent_instructions/dotclaude/settings.json.template +29 -0
- package/dist/templates/agent_instructions/{AGENTS.md.template → dotoutputai/AGENTS.md.template} +12 -10
- package/dist/utils/claude.d.ts +5 -0
- package/dist/utils/claude.js +19 -0
- package/dist/utils/claude.spec.d.ts +1 -0
- package/dist/utils/claude.spec.js +119 -0
- package/dist/utils/paths.d.ts +0 -4
- package/dist/utils/paths.js +0 -6
- package/package.json +3 -3
- package/dist/templates/agent_instructions/agents/workflow_context_fetcher.md.template +0 -82
- package/dist/templates/agent_instructions/agents/workflow_debugger.md.template +0 -98
- package/dist/templates/agent_instructions/agents/workflow_planner.md.template +0 -113
- package/dist/templates/agent_instructions/agents/workflow_prompt_writer.md.template +0 -595
- package/dist/templates/agent_instructions/agents/workflow_quality.md.template +0 -244
- package/dist/templates/agent_instructions/commands/build_workflow.md.template +0 -290
- package/dist/templates/agent_instructions/commands/debug_workflow.md.template +0 -198
- package/dist/templates/agent_instructions/commands/plan_workflow.md.template +0 -261
- package/dist/templates/agent_instructions/meta/post_flight.md.template +0 -94
- package/dist/templates/agent_instructions/meta/pre_flight.md.template +0 -60
- package/dist/templates/agent_instructions/skills/output-error-direct-io/SKILL.md.template +0 -249
- package/dist/templates/agent_instructions/skills/output-error-http-client/SKILL.md.template +0 -298
- package/dist/templates/agent_instructions/skills/output-error-missing-schemas/SKILL.md.template +0 -265
- package/dist/templates/agent_instructions/skills/output-error-nondeterminism/SKILL.md.template +0 -252
- package/dist/templates/agent_instructions/skills/output-error-try-catch/SKILL.md.template +0 -226
- package/dist/templates/agent_instructions/skills/output-error-zod-import/SKILL.md.template +0 -209
- package/dist/templates/agent_instructions/skills/output-services-check/SKILL.md.template +0 -128
- package/dist/templates/agent_instructions/skills/output-workflow-list/SKILL.md.template +0 -117
- package/dist/templates/agent_instructions/skills/output-workflow-result/SKILL.md.template +0 -199
- package/dist/templates/agent_instructions/skills/output-workflow-run/SKILL.md.template +0 -228
- package/dist/templates/agent_instructions/skills/output-workflow-runs-list/SKILL.md.template +0 -141
- package/dist/templates/agent_instructions/skills/output-workflow-start/SKILL.md.template +0 -201
- package/dist/templates/agent_instructions/skills/output-workflow-status/SKILL.md.template +0 -151
- package/dist/templates/agent_instructions/skills/output-workflow-stop/SKILL.md.template +0 -164
- package/dist/templates/agent_instructions/skills/output-workflow-trace/SKILL.md.template +0 -134
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
argument-hint: [problem-description-and-optional-workflow-id]
|
|
3
|
-
description: Debug Output SDK workflow issues
|
|
4
|
-
version: 0.0.1
|
|
5
|
-
model: claude-opus-4-1
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Your task is to systematically debug an Output SDK workflow issue in a local development environment.
|
|
9
|
-
|
|
10
|
-
The first argument is a textual description of the problem you're experiencing. If you have a specific workflow ID, include it in your description.
|
|
11
|
-
|
|
12
|
-
Use the todo tool to track your progress through the debugging process.
|
|
13
|
-
|
|
14
|
-
# Debugging Process
|
|
15
|
-
|
|
16
|
-
## Overview
|
|
17
|
-
|
|
18
|
-
Follow a systematic approach to identify and resolve workflow execution issues: verify infrastructure, gather evidence, analyze traces, and apply targeted fixes.
|
|
19
|
-
|
|
20
|
-
<pre_flight_check>
|
|
21
|
-
EXECUTE: @.outputai/instructions/meta/pre_flight.md
|
|
22
|
-
</pre_flight_check>
|
|
23
|
-
|
|
24
|
-
<process_flow>
|
|
25
|
-
|
|
26
|
-
<step number="1" name="verify_services">
|
|
27
|
-
|
|
28
|
-
### Step 1: Verify Services Running
|
|
29
|
-
|
|
30
|
-
Before debugging, confirm that all required services are operational. The `output-services-check` skill provides comprehensive guidance.
|
|
31
|
-
|
|
32
|
-
<verification_commands>
|
|
33
|
-
```bash
|
|
34
|
-
# Check Docker containers are running
|
|
35
|
-
docker ps | grep output
|
|
36
|
-
|
|
37
|
-
# Verify Output services respond
|
|
38
|
-
curl -s http://localhost:3001/health || echo "API not responding"
|
|
39
|
-
|
|
40
|
-
# Check Temporal UI is accessible
|
|
41
|
-
curl -s http://localhost:8080 > /dev/null && echo "Temporal UI accessible" || echo "Temporal UI not accessible"
|
|
42
|
-
```
|
|
43
|
-
</verification_commands>
|
|
44
|
-
|
|
45
|
-
<decision_tree>
|
|
46
|
-
IF docker_not_running:
|
|
47
|
-
RUN: docker compose up -d
|
|
48
|
-
WAIT: for services to start (30-60 seconds)
|
|
49
|
-
IF output_dev_not_running:
|
|
50
|
-
RUN: npx output dev
|
|
51
|
-
WAIT: for services to initialize
|
|
52
|
-
IF all_services_running:
|
|
53
|
-
PROCEED: to step 2
|
|
54
|
-
</decision_tree>
|
|
55
|
-
|
|
56
|
-
**Expected State**:
|
|
57
|
-
- Docker containers for `output` are running
|
|
58
|
-
- API server responds at `http://localhost:3001`
|
|
59
|
-
- Temporal UI accessible at `http://localhost:8080`
|
|
60
|
-
|
|
61
|
-
</step>
|
|
62
|
-
|
|
63
|
-
<step number="2" name="list_workflow_runs">
|
|
64
|
-
|
|
65
|
-
### Step 2: List Workflow Runs
|
|
66
|
-
|
|
67
|
-
Identify the failing workflow execution by listing recent runs. The `output-workflow-runs-list` skill provides detailed filtering guidance.
|
|
68
|
-
|
|
69
|
-
<list_commands>
|
|
70
|
-
```bash
|
|
71
|
-
# List all recent workflow runs
|
|
72
|
-
npx output workflow runs list
|
|
73
|
-
|
|
74
|
-
# Filter by specific workflow type (if known)
|
|
75
|
-
npx output workflow runs list <workflowName>
|
|
76
|
-
|
|
77
|
-
# Get detailed JSON output for analysis
|
|
78
|
-
npx output workflow runs list --format json
|
|
79
|
-
|
|
80
|
-
# Limit results to most recent
|
|
81
|
-
npx output workflow runs list --limit 10
|
|
82
|
-
```
|
|
83
|
-
</list_commands>
|
|
84
|
-
|
|
85
|
-
<identification_criteria>
|
|
86
|
-
Look for:
|
|
87
|
-
- Status: FAILED or TERMINATED
|
|
88
|
-
- Recent timestamp matching when the issue occurred
|
|
89
|
-
- Workflow type matching the problem description
|
|
90
|
-
</identification_criteria>
|
|
91
|
-
|
|
92
|
-
<decision_tree>
|
|
93
|
-
IF user_provided_workflow_id:
|
|
94
|
-
USE: provided workflow ID
|
|
95
|
-
PROCEED: to step 3
|
|
96
|
-
IF failed_runs_found:
|
|
97
|
-
SELECT: most recent failed run
|
|
98
|
-
NOTE: workflow ID from output
|
|
99
|
-
PROCEED: to step 3
|
|
100
|
-
IF no_runs_found:
|
|
101
|
-
CHECK: workflow exists with `npx output workflow list`
|
|
102
|
-
IF workflow_not_found:
|
|
103
|
-
REPORT: workflow doesn't exist
|
|
104
|
-
SUGGEST: verify workflow name and location
|
|
105
|
-
ELSE:
|
|
106
|
-
SUGGEST: run the workflow with `npx output workflow run <name>`
|
|
107
|
-
</decision_tree>
|
|
108
|
-
|
|
109
|
-
</step>
|
|
110
|
-
|
|
111
|
-
<step number="3" name="debug_workflow" subagent="workflow-debugger">
|
|
112
|
-
|
|
113
|
-
### Step 3: Debug Specific Workflow
|
|
114
|
-
|
|
115
|
-
Retrieve and analyze the execution trace for the identified workflow. The `output-workflow-trace` skill provides analysis techniques.
|
|
116
|
-
|
|
117
|
-
<debug_commands>
|
|
118
|
-
```bash
|
|
119
|
-
# Display execution trace (text format)
|
|
120
|
-
npx output workflow debug <workflowId>
|
|
121
|
-
|
|
122
|
-
# Display full untruncated trace (JSON format) - recommended for detailed analysis
|
|
123
|
-
npx output workflow debug <workflowId> --format json
|
|
124
|
-
```
|
|
125
|
-
</debug_commands>
|
|
126
|
-
|
|
127
|
-
**Tip**: Use `--format json` for complete trace data without truncation.
|
|
128
|
-
|
|
129
|
-
<analysis_checklist>
|
|
130
|
-
1. Identify which step failed
|
|
131
|
-
2. Examine the error message and stack trace
|
|
132
|
-
3. Check input data passed to the failing step
|
|
133
|
-
4. Check output data from preceding steps
|
|
134
|
-
5. Look for patterns matching common error types
|
|
135
|
-
</analysis_checklist>
|
|
136
|
-
|
|
137
|
-
<temporal_ui_guidance>
|
|
138
|
-
For visual workflow inspection, open the Temporal Web UI at **http://localhost:8080**:
|
|
139
|
-
- Find your workflow execution by ID
|
|
140
|
-
- View the event history timeline
|
|
141
|
-
- Inspect individual step inputs and outputs
|
|
142
|
-
</temporal_ui_guidance>
|
|
143
|
-
|
|
144
|
-
</step>
|
|
145
|
-
|
|
146
|
-
<step number="4" name="suggest_fixes" subagent="workflow-quality">
|
|
147
|
-
|
|
148
|
-
### Step 4: Suggest Fixes
|
|
149
|
-
|
|
150
|
-
Based on the trace analysis, identify the error pattern and suggest targeted fixes. Claude will invoke the relevant error skill based on symptoms.
|
|
151
|
-
|
|
152
|
-
<error_matching>
|
|
153
|
-
|
|
154
|
-
| Symptom | Skill |
|
|
155
|
-
|---------|-------|
|
|
156
|
-
| "incompatible schema" errors, type errors | `output-error-zod-import` |
|
|
157
|
-
| Replay failures, inconsistent results | `output-error-nondeterminism` |
|
|
158
|
-
| Retries not working, errors swallowed | `output-error-try-catch` |
|
|
159
|
-
| Type errors, undefined properties at step boundaries | `output-error-missing-schemas` |
|
|
160
|
-
| Workflow hangs, determinism errors | `output-error-direct-io` |
|
|
161
|
-
| Untraced requests, axios errors | `output-error-http-client` |
|
|
162
|
-
|
|
163
|
-
</error_matching>
|
|
164
|
-
|
|
165
|
-
<decision_tree>
|
|
166
|
-
IF error_matches_known_pattern:
|
|
167
|
-
INVOKE: relevant error skill for detailed fix
|
|
168
|
-
ELSE:
|
|
169
|
-
CONSULT: workflow-quality subagent for additional patterns
|
|
170
|
-
SUGGEST: Manual trace inspection in Temporal UI
|
|
171
|
-
</decision_tree>
|
|
172
|
-
|
|
173
|
-
<verification>
|
|
174
|
-
After applying fix:
|
|
175
|
-
```bash
|
|
176
|
-
# Re-run the workflow to verify
|
|
177
|
-
npx output workflow run <workflowName> <input>
|
|
178
|
-
|
|
179
|
-
# Or start asynchronously and check result
|
|
180
|
-
npx output workflow start <workflowName> <input>
|
|
181
|
-
npx output workflow status <workflowId>
|
|
182
|
-
npx output workflow result <workflowId>
|
|
183
|
-
```
|
|
184
|
-
</verification>
|
|
185
|
-
|
|
186
|
-
</step>
|
|
187
|
-
|
|
188
|
-
</process_flow>
|
|
189
|
-
|
|
190
|
-
<post_flight_check>
|
|
191
|
-
EXECUTE: @.outputai/instructions/meta/post_flight.md
|
|
192
|
-
</post_flight_check>
|
|
193
|
-
|
|
194
|
-
---- START ----
|
|
195
|
-
|
|
196
|
-
Problem Description and Optional Workflow ID:
|
|
197
|
-
|
|
198
|
-
$ARGUMENTS
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
argument-hint: [workflow-description-and-additional-instructions]
|
|
3
|
-
description: Workflow Planning Command for Output SDK
|
|
4
|
-
version: 0.0.1
|
|
5
|
-
model: claude-opus-4-1
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Your task is to generate a comprehensive Output.ai workflow implementation plan in markdown format.
|
|
9
|
-
|
|
10
|
-
The plan will be displayed to the user who can then decide what to do with it.
|
|
11
|
-
|
|
12
|
-
Please respond with only the final version of the plan.
|
|
13
|
-
|
|
14
|
-
Use the todo tool to track your progress through the plan creation process.
|
|
15
|
-
|
|
16
|
-
# Plan Creation Rules
|
|
17
|
-
|
|
18
|
-
## Overview
|
|
19
|
-
|
|
20
|
-
Generate detailed specifications for implementation of a new workflow.
|
|
21
|
-
|
|
22
|
-
<pre_flight_check>
|
|
23
|
-
EXECUTE: @.outputai/instructions/meta/pre_flight.md
|
|
24
|
-
</pre_flight_check>
|
|
25
|
-
|
|
26
|
-
<process_flow>
|
|
27
|
-
|
|
28
|
-
<step number="1" name="context_gathering" subagent="workflow-context-fetcher">
|
|
29
|
-
|
|
30
|
-
### Step 1: Context Gathering
|
|
31
|
-
|
|
32
|
-
Take the time to gather all the context you need to create a comprehensive plan.
|
|
33
|
-
1. Read any given files or links
|
|
34
|
-
2. Find any related workflows in the project
|
|
35
|
-
3. Read the projects documentation files
|
|
36
|
-
|
|
37
|
-
</step>
|
|
38
|
-
|
|
39
|
-
<step number="2" name="requirements_clarification">
|
|
40
|
-
|
|
41
|
-
### Step 2: Requirements Clarification
|
|
42
|
-
|
|
43
|
-
Clarify scope boundaries and technical considerations by asking numbered questions as needed to ensure clear requirements before proceeding.
|
|
44
|
-
|
|
45
|
-
<clarification_areas>
|
|
46
|
-
<scope>
|
|
47
|
-
- in_scope: what is included
|
|
48
|
-
- out_of_scope: what is excluded (optional)
|
|
49
|
-
</scope>
|
|
50
|
-
<technical>
|
|
51
|
-
- functionality specifics
|
|
52
|
-
- UI/UX requirements
|
|
53
|
-
- integration points
|
|
54
|
-
</technical>
|
|
55
|
-
</clarification_areas>
|
|
56
|
-
|
|
57
|
-
<decision_tree>
|
|
58
|
-
IF clarification_needed:
|
|
59
|
-
ASK numbered_questions
|
|
60
|
-
WAIT for_user_response
|
|
61
|
-
ELSE:
|
|
62
|
-
PROCEED schema_definition
|
|
63
|
-
</decision_tree>
|
|
64
|
-
</step>
|
|
65
|
-
|
|
66
|
-
<step number="3" name="workflow_design" subagent="workflow-quality">
|
|
67
|
-
|
|
68
|
-
### Step 3: Workflow Design
|
|
69
|
-
|
|
70
|
-
Design the workflow with clear single purpose steps and sound orchestration logic.
|
|
71
|
-
|
|
72
|
-
<thought_process>
|
|
73
|
-
|
|
74
|
-
1. Define the workflow name and description
|
|
75
|
-
2. What is a valid output schema for the workflow?
|
|
76
|
-
3. What is a valid input schema for the workflow?
|
|
77
|
-
4. What needs to happen to transform the input into the output?
|
|
78
|
-
5. What are the atomic steps that need to happen to transform the input into the output?
|
|
79
|
-
6. How do these steps relate to each other?
|
|
80
|
-
7. Are any of these steps conditional?
|
|
81
|
-
8. Are any of these steps already defined in the project?
|
|
82
|
-
9. How could these steps fail, and how should we handle them? (retry, backoff, etc.)
|
|
83
|
-
|
|
84
|
-
</thought_process>
|
|
85
|
-
|
|
86
|
-
<workflow_template>
|
|
87
|
-
```typescript
|
|
88
|
-
import { workflow, z } from '@output.ai/core';
|
|
89
|
-
import { sumValues } from './steps.js';
|
|
90
|
-
|
|
91
|
-
const inputSchema = z.object( {
|
|
92
|
-
values: z.array( z.number() )
|
|
93
|
-
} );
|
|
94
|
-
|
|
95
|
-
const outputSchema = z.object( {
|
|
96
|
-
result: z.number()
|
|
97
|
-
} );
|
|
98
|
-
|
|
99
|
-
export default workflow( {
|
|
100
|
-
name: 'simple',
|
|
101
|
-
description: 'A simple workflow',
|
|
102
|
-
inputSchema,
|
|
103
|
-
outputSchema,
|
|
104
|
-
fn: async input => {
|
|
105
|
-
const result = await sumValues( input.values );
|
|
106
|
-
return { result };
|
|
107
|
-
}
|
|
108
|
-
} );
|
|
109
|
-
```
|
|
110
|
-
</workflow_template>
|
|
111
|
-
|
|
112
|
-
<step number="4" name="step_design" subagent="workflow-quality">
|
|
113
|
-
### Step 4: Step Design
|
|
114
|
-
|
|
115
|
-
Design the steps with clear boundaries.
|
|
116
|
-
|
|
117
|
-
<step_template>
|
|
118
|
-
```typescript
|
|
119
|
-
import { step, z } from '@output.ai/core';
|
|
120
|
-
|
|
121
|
-
export const sumValues = step( {
|
|
122
|
-
name: 'sumValues',
|
|
123
|
-
description: 'Sum all values',
|
|
124
|
-
inputSchema: z.array( z.number() ),
|
|
125
|
-
outputSchema: z.number(),
|
|
126
|
-
fn: async numbers => numbers.reduce( ( v, n ) => v + n, 0 )
|
|
127
|
-
} );
|
|
128
|
-
```
|
|
129
|
-
</step_template>
|
|
130
|
-
|
|
131
|
-
</step>
|
|
132
|
-
|
|
133
|
-
<step number="5" name="prompt_engineering" subagent="workflow-prompt-writer">
|
|
134
|
-
|
|
135
|
-
### Step 5: Prompt Engineering
|
|
136
|
-
|
|
137
|
-
If any of the steps use an LLM, design the prompts for the steps.
|
|
138
|
-
|
|
139
|
-
<decision_tree>
|
|
140
|
-
IF step_uses_llm:
|
|
141
|
-
USE prompt_step_template
|
|
142
|
-
ELSE:
|
|
143
|
-
SKIP to step 6
|
|
144
|
-
</decision_tree>
|
|
145
|
-
|
|
146
|
-
<prompt_step_template>
|
|
147
|
-
```typescript
|
|
148
|
-
import { step, z } from '@output.ai/core';
|
|
149
|
-
import { generateText } from '@output.ai/llm';
|
|
150
|
-
|
|
151
|
-
export const aiSdkPrompt = step( {
|
|
152
|
-
name: 'aiSdkPrompt',
|
|
153
|
-
description: 'Generates a prompt',
|
|
154
|
-
inputSchema: z.object( {
|
|
155
|
-
topic: z.string()
|
|
156
|
-
} ),
|
|
157
|
-
outputSchema: z.string(),
|
|
158
|
-
fn: async ( { topic } ) => {
|
|
159
|
-
const response = await generateText( {
|
|
160
|
-
prompt: 'prompt@v1',
|
|
161
|
-
variables: { topic }
|
|
162
|
-
} );
|
|
163
|
-
return response;
|
|
164
|
-
}
|
|
165
|
-
} );
|
|
166
|
-
|
|
167
|
-
export const finalStep = step( {
|
|
168
|
-
name: 'finalStep',
|
|
169
|
-
outputSchema: z.boolean(),
|
|
170
|
-
fn: async () => true
|
|
171
|
-
} );
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
</prompt_step_template>
|
|
175
|
-
|
|
176
|
-
<prompt_template>
|
|
177
|
-
```
|
|
178
|
-
---
|
|
179
|
-
provider: anthropic
|
|
180
|
-
model: claude-sonnet-4-20250514
|
|
181
|
-
temperature: 0.7
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
<assistant>
|
|
185
|
-
You are a concise assistant.
|
|
186
|
-
</assistant>
|
|
187
|
-
|
|
188
|
-
<user>
|
|
189
|
-
Explain about "{{ topic }}"
|
|
190
|
-
</user>
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
</prompt_template>
|
|
195
|
-
|
|
196
|
-
</step>
|
|
197
|
-
|
|
198
|
-
<step number="6" name="testing_strategy">
|
|
199
|
-
|
|
200
|
-
### Step 6: Testing Strategy
|
|
201
|
-
|
|
202
|
-
Design the testing strategy for the workflow.
|
|
203
|
-
<thought_process>
|
|
204
|
-
1. What unit tests do we need to write?
|
|
205
|
-
2. How can I run the workflow?
|
|
206
|
-
3. What cases do we need to validate?
|
|
207
|
-
</thought_process>
|
|
208
|
-
|
|
209
|
-
</step>
|
|
210
|
-
|
|
211
|
-
<step number="7" name="generate_plan">
|
|
212
|
-
### Step 7: Generate Plan
|
|
213
|
-
|
|
214
|
-
Generate the complete plan in markdown format.
|
|
215
|
-
|
|
216
|
-
Note that every implementation should start with running the cli command `npx output workflow generate --skeleton` to create the workflow directory structure.
|
|
217
|
-
|
|
218
|
-
<file_template>
|
|
219
|
-
<header>
|
|
220
|
-
# Workflow Requirements Document
|
|
221
|
-
|
|
222
|
-
> Workflow: [WORKFLOW_NAME]
|
|
223
|
-
> Created: [CURRENT_DATE]
|
|
224
|
-
</header>
|
|
225
|
-
<required_sections>
|
|
226
|
-
- Overview
|
|
227
|
-
- Spec Scope
|
|
228
|
-
- Out of Scope
|
|
229
|
-
- Workflow Design
|
|
230
|
-
- Step Design
|
|
231
|
-
- Testing Strategy
|
|
232
|
-
- Implementation Phases
|
|
233
|
-
</required_sections>
|
|
234
|
-
</file_template>
|
|
235
|
-
|
|
236
|
-
</step>
|
|
237
|
-
|
|
238
|
-
<step_number="8" name="post_flight_check">
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
### Step 8: Post-Flight Check
|
|
242
|
-
|
|
243
|
-
Verify the plan is complete and ready for implementation.
|
|
244
|
-
|
|
245
|
-
<post_flight_check>
|
|
246
|
-
EXECUTE: @.outputai/instructions/meta/post_flight.md
|
|
247
|
-
</post_flight_check>
|
|
248
|
-
|
|
249
|
-
</step>
|
|
250
|
-
|
|
251
|
-
</process_flow>
|
|
252
|
-
|
|
253
|
-
<post_flight_check>
|
|
254
|
-
EXECUTE: @.outputai/instructions/meta/post_flight.md
|
|
255
|
-
</post_flight_check>
|
|
256
|
-
|
|
257
|
-
---- START ----
|
|
258
|
-
|
|
259
|
-
Workflow Description and Additional Instructions:
|
|
260
|
-
|
|
261
|
-
$ARGUMENTS
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Post-Flight Validation for Output SDK Workflow Operations
|
|
3
|
-
version: 1.0
|
|
4
|
-
encoding: UTF-8
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Post-Flight Rules for Output SDK Workflows
|
|
8
|
-
|
|
9
|
-
## Execution Verification
|
|
10
|
-
|
|
11
|
-
After completing all steps in the process_flow, systematically verify:
|
|
12
|
-
|
|
13
|
-
### Step Completion Audit
|
|
14
|
-
- [ ] Every numbered step has been read, executed, and delivered according to its instructions
|
|
15
|
-
- [ ] All steps that specified a subagent were delegated to the correct subagent
|
|
16
|
-
- [ ] If any subagent was not used as specified, document why and report to the user
|
|
17
|
-
- [ ] If any step was not executed according to instructions, explain which part was misread or skipped
|
|
18
|
-
|
|
19
|
-
### Output SDK Convention Compliance
|
|
20
|
-
|
|
21
|
-
Verify the following conventions were followed:
|
|
22
|
-
|
|
23
|
-
#### Import Conventions
|
|
24
|
-
- [ ] All TypeScript/JavaScript imports use `.js` extension for ES modules
|
|
25
|
-
- [ ] No direct axios usage - HttpClient wrapper used throughout
|
|
26
|
-
- [ ] Proper import paths for Output SDK packages (@flowsdk/core, @flowsdk/llm, etc.)
|
|
27
|
-
|
|
28
|
-
#### Workflow Structure
|
|
29
|
-
- [ ] Workflow exported in entrypoint.ts: `export * from './path/to/workflow.js';`
|
|
30
|
-
- [ ] All external operations wrapped in Temporal activities (steps)
|
|
31
|
-
- [ ] Proper error handling with ApplicationFailure patterns
|
|
32
|
-
- [ ] Retry policies configured appropriately
|
|
33
|
-
|
|
34
|
-
#### Documentation & Testing
|
|
35
|
-
- [ ] Comprehensive plan document created with all required sections
|
|
36
|
-
- [ ] Testing strategy defined with specific test scenarios
|
|
37
|
-
- [ ] Implementation checklist provided for developers
|
|
38
|
-
- [ ] All code examples are complete and would compile
|
|
39
|
-
|
|
40
|
-
## Quality Validation
|
|
41
|
-
|
|
42
|
-
### Plan Completeness Check
|
|
43
|
-
Ensure the workflow plan includes:
|
|
44
|
-
- [ ] **Overview**: Clear purpose and use case definition
|
|
45
|
-
- [ ] **Technical Specifications**: Complete input/output schemas with Zod validation
|
|
46
|
-
- [ ] **Activity Definitions**: Each activity fully specified with purpose, I/O, and error handling
|
|
47
|
-
- [ ] **Prompt Engineering**: LLM prompts designed (if applicable) with template variables
|
|
48
|
-
- [ ] **Orchestration Logic**: Step-by-step workflow execution flow
|
|
49
|
-
- [ ] **Retry Policies**: Configured for each activity with appropriate timeouts
|
|
50
|
-
- [ ] **Testing Requirements**: Comprehensive test scenarios and commands
|
|
51
|
-
|
|
52
|
-
### Implementation Readiness
|
|
53
|
-
Confirm the plan is ready for implementation:
|
|
54
|
-
- [ ] All schemas defined with exact field types and descriptions
|
|
55
|
-
- [ ] Every activity specified with input/output/processing logic
|
|
56
|
-
- [ ] External services identified with specific SDK client references
|
|
57
|
-
- [ ] Error handling complete for all failure scenarios
|
|
58
|
-
- [ ] Testing scenarios documented with expected outcomes
|
|
59
|
-
- [ ] Performance requirements clear with measurable criteria
|
|
60
|
-
|
|
61
|
-
## Deliverable Verification
|
|
62
|
-
|
|
63
|
-
### Required Outputs
|
|
64
|
-
Verify these deliverables were created or updated:
|
|
65
|
-
- [ ] Workflow plan document with full specifications
|
|
66
|
-
- [ ] Activity schemas with Zod validation
|
|
67
|
-
- [ ] Prompt templates (if LLM integration required)
|
|
68
|
-
- [ ] Testing strategy with specific commands
|
|
69
|
-
- [ ] Implementation checklist for developers
|
|
70
|
-
|
|
71
|
-
### Next Steps Documentation
|
|
72
|
-
Ensure the following guidance is provided:
|
|
73
|
-
- [ ] Clear handoff to implementation phase
|
|
74
|
-
- [ ] Specific Output SDK CLI commands to execute
|
|
75
|
-
- [ ] Dependencies to install (if any)
|
|
76
|
-
- [ ] Configuration requirements documented
|
|
77
|
-
- [ ] Success criteria clearly defined
|
|
78
|
-
|
|
79
|
-
## Error Reporting
|
|
80
|
-
|
|
81
|
-
If any issues were encountered:
|
|
82
|
-
1. Document the specific issue and step where it occurred
|
|
83
|
-
2. Explain any deviations from the planned process
|
|
84
|
-
3. Provide recommendations for resolution
|
|
85
|
-
4. Note any missing information that prevented completion
|
|
86
|
-
|
|
87
|
-
## Final Validation
|
|
88
|
-
|
|
89
|
-
Before marking the workflow planning complete:
|
|
90
|
-
- [ ] Developer can implement without additional clarification
|
|
91
|
-
- [ ] All Output SDK patterns and conventions are followed
|
|
92
|
-
- [ ] Testing approach is comprehensive and executable
|
|
93
|
-
- [ ] Documentation is clear and complete
|
|
94
|
-
- [ ] Plan aligns with project's existing workflow patterns
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Pre-Flight Checks for Output SDK Workflow Operations
|
|
3
|
-
version: 1.0
|
|
4
|
-
encoding: UTF-8
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Pre-Flight Rules for Output SDK Workflows
|
|
8
|
-
|
|
9
|
-
## Execution Requirements
|
|
10
|
-
|
|
11
|
-
- **CRITICAL**: For any step that specifies a subagent in the `subagent=""` XML attribute, you MUST use the specified subagent to perform the instructions for that step
|
|
12
|
-
- Process all XML blocks sequentially and completely
|
|
13
|
-
- Execute every numbered step in the process_flow EXACTLY as specified
|
|
14
|
-
|
|
15
|
-
## Output SDK Conventions Check
|
|
16
|
-
|
|
17
|
-
Before proceeding with any workflow operation, verify:
|
|
18
|
-
|
|
19
|
-
- **ES Modules**: All imports MUST use `.js` extension for ESM modules
|
|
20
|
-
- **HTTP Client**: NEVER use axios directly - always use @output.ai/http wrapper
|
|
21
|
-
- **LLM Client**: NEVER use a direct llm call - always use @output.ai/llm wrapper
|
|
22
|
-
- **Worker Restarts**: Remember to restart worker after creating workflows: `overmind restart worker`
|
|
23
|
-
- **Documentation**: Run `yarn g:workflow-doc` after modifications
|
|
24
|
-
|
|
25
|
-
## Requirements Gathering Strategy
|
|
26
|
-
|
|
27
|
-
### Smart Defaults Application
|
|
28
|
-
When information is not explicitly provided, apply these defaults:
|
|
29
|
-
- **Retry Policies**: 3 attempts with exponential backoff (1s initial, 10s max)
|
|
30
|
-
- **OpenAI Models**: Use `gpt-4o` unless specified otherwise
|
|
31
|
-
- **Error Handling**: ApplicationFailure patterns with appropriate error types
|
|
32
|
-
- **Performance**: Optimize for clarity and maintainability over raw speed
|
|
33
|
-
- **Timeouts**: 30 seconds for activities, 5 minutes for workflows
|
|
34
|
-
|
|
35
|
-
### Critical Information Requirements
|
|
36
|
-
Only stop to ask for clarification on:
|
|
37
|
-
- Ambiguous input/output structures that cannot be inferred from context
|
|
38
|
-
- Specific API keys or services not commonly used in the project
|
|
39
|
-
- Non-standard error handling or recovery requirements
|
|
40
|
-
- Complex orchestration patterns requiring specific sequencing
|
|
41
|
-
- External dependencies not already in the project
|
|
42
|
-
|
|
43
|
-
## Template Processing Rules
|
|
44
|
-
|
|
45
|
-
- Use exact templates as provided in each step
|
|
46
|
-
- Replace all template variables with actual values:
|
|
47
|
-
- `{{workflowName}}` - The workflow being planned
|
|
48
|
-
- `{{projectPath}}` - Root project directory path
|
|
49
|
-
- `{{requirements}}` - User-provided requirements
|
|
50
|
-
- `{{currentDate}}` - Current date in YYYY-MM-DD format
|
|
51
|
-
- `{{sdkVersion}}` - Current Output SDK version
|
|
52
|
-
|
|
53
|
-
## Quality Gates
|
|
54
|
-
|
|
55
|
-
Before proceeding past pre-flight:
|
|
56
|
-
1. Confirm all required context is available
|
|
57
|
-
2. Verify understanding of the workflow's purpose
|
|
58
|
-
3. Check for existing similar workflows to use as patterns
|
|
59
|
-
4. Ensure Output SDK conventions are understood
|
|
60
|
-
5. Validate that necessary subagents are available
|