Skip to main content
Back to Prompt Library
implementation

Define Metaflow Diagnostic Flow

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Software-Defined Control Switch Diagnostic Agent with Claude Agents SDK and Metaflow

Format
Code-aware
Lines
16
Sections
5
Linked challenge
Software-Defined Control Switch Diagnostic Agent with Claude Agents SDK and Metaflow

Prompt source

Original prompt text with formatting preserved for inspection.

16 lines
5 sections
No variables
0 checklist items
from metaflow import FlowSpec, step
from anthropic import Anthropic

class SwitchDiagnosticFlow(FlowSpec):
    @step
    def start(self):
        # Ingest telemetry and call Claude agent
        self.next(self.diagnose)

    @step
    def diagnose(self):
        # Use Claude extended thinking to trace network fault
        self.next(self.end)

    @step
    def end(self):
        print('Diagnosis complete')

if __name__ == '__main__':
    SwitchDiagnosticFlow()

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.