Your task is to implement an Output.ai workflow based on a provided plan document.
Implements Output.ai workflows from plan documents using SDK patterns and best practices.
/plugin marketplace add growthxai/output-claude-plugins/plugin install growthxai-outputai-plugins-outputai@growthxai/output-claude-pluginsYour task is to implement an Output.ai workflow based on a provided plan document.
The workflow skeleton has already been created at: $3 (if not it should be)
Please read the plan file and implement the workflow according to its specifications.
Use the todo tool to track your progress through the implementation process.
Implement the workflow described in the plan document, following Output SDK patterns and best practices.
<pre_flight_check>
EXECUTE: Claude Skill: output-meta-pre-flight
</pre_flight_check>
<process_flow>
<step number="1" name="plan_analysis" subagent="workflow-context-fetcher">Read and understand the plan document.
$1Update $3/workflow.ts with the workflow definition.
<implementation_checklist>
<workflow_template>
import { workflow, z } from '@output.ai/core';
import { stepName } from './steps.js';
const inputSchema = z.object( {
// Define based on plan
} );
const outputSchema = z.object( {
// Define based on plan
} );
export default workflow( {
name: '$2',
description: 'Description from plan',
inputSchema,
outputSchema,
fn: async input => {
// Implement orchestration logic from plan
const result = await stepName( input );
return { result };
}
} );
</workflow_template>
</step> <step number="3" name="steps_implementation" subagent="workflow-quality">Update $3/steps.ts with all step definitions from the plan.
<implementation_checklist>
<step_template>
import { step, z } from '@output.ai/core';
export const stepName = step( {
name: 'stepName',
description: 'Description from plan',
inputSchema: z.object( {
// Define based on plan
} ),
outputSchema: z.object( {
// Define based on plan
} ),
fn: async input => {
// Implement step logic from plan
return output;
}
} );
</step_template>
</step> <step number="4" name="prompt_templates" subagent="workflow-prompt-writer">If the plan includes LLM-based steps, create prompt templates in $3/prompts/.
<decision_tree> IF plan_includes_llm_steps: CREATE prompt_templates UPDATE steps.ts to use loadPrompt and generateText ELSE: SKIP to step 6 </decision_tree>
<llm_step_template>
import { step, z } from '@output.ai/core';
import { generateText } from '@output.ai/llm';
export const llmStep = step( {
name: 'llmStep',
description: 'LLM-based step',
inputSchema: z.object( {
param: z.string()
} ),
outputSchema: z.string(),
fn: async ( { param } ) => {
const response = await generateText( {
prompt: 'prompt_name@v1',
variables: { param }
} );
return response;
}
} );
</llm_step_template>
<prompt_file_template>
---
provider: anthropic
model: claude-sonnet
temperature: 0.7
---
<assistant>
You are a helpful assistant.
</assistant>
<user>
</user>
</prompt_file_template>
</step> <step number="5" name="readme_update">Update $3/README.md with workflow-specific documentation.
<documentation_requirements>
Create at least one scenario file in $3/scenarios/ for testing the workflow.
<scenario_requirements>
scenarios/ directory if it doesn't existtest_input.json with valid example input matching the inputSchema<scenario_template>
{
// Populate with example values matching inputSchema
// Use realistic test data that demonstrates the workflow
}
</scenario_template>
<example> For a workflow with inputSchema: ```typescript z.object({ topic: z.string(), maxLength: z.number().optional() }) ```Create scenarios/test_input.json:
{
"topic": "The history of artificial intelligence",
"maxLength": 500
}
</example>
</step>
<step number="7" name="validation" subagent="workflow-quality">
Verify the implementation is complete and correct.
<validation_checklist>
Verify the implementation is ready for use.
<post_flight_check>
EXECUTE: Claude Skill: output-meta-post-flight
</post_flight_check>
</process_flow>
<post_flight_check>
EXECUTE: Claude Skill: output-meta-post-flight
</post_flight_check>
---- START ----
Workflow Name: $2
Workflow Directory: $3
Plan File Path: $1
Additional Instructions:
$ARGUMENTS