ワンクリックで
debugging-pipelines
Use when pipelines fail, produce unexpected output, or need systematic troubleshooting
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when pipelines fail, produce unexpected output, or need systematic troubleshooting
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when you have PR review comments to address and want to evaluate each comment's validity before deciding to fix, reply, or skip
Use when creating new pipeline templates (YAML + seed files) for DataGenFlow. Guides through block selection, YAML authoring, seed file creation, and validation. Use for any task involving lib/templates/ directory, adding new template use cases, or creating seed files that match pipeline variables.
Use when creating new blocks for DataGenFlow pipeline system or modifying existing blocks to ensure consistency with established patterns
Use when testing pipelines end-to-end - running single-seed dry runs, batch generation, result analysis, and iterating on prompt quality. Use after creating a pipeline template, when validating output quality, or when improving generation results. Not for debugging crashes (use debugging-pipelines instead).
Use when creating data generation pipelines with DataGenFlow's extensibility system — user_templates, user_blocks, docker-compose setup, and dgf CLI. Use for any task involving generating synthetic data, building custom pipelines, or extending DataGenFlow from an external project without modifying its source.
Use when writing Playwright end-to-end tests for DataGenFlow UI. Covers test file creation, database cleanup, navigation, file uploads, confirmation modals, and job monitoring. Use for new UI features, extending existing test suites (pipelines, generator, review, settings), or verifying UI flows after frontend changes.
| name | debugging-pipelines |
| description | Use when pipelines fail, produce unexpected output, or need systematic troubleshooting |
Systematic debugging workflow for any DataGenFlow pipeline failure or unexpected output. This skill provides a structured four-phase process to identify and fix root causes rather than guessing at solutions.
Core Principle: Find the root cause before attempting fixes. Random fixes waste time and create new bugs.
Use this skill when:
Skip this skill for:
Goal: Understand what's wrong and collect data
Steps:
Run the pipeline and capture full output
pytest tests/integration/test_X.py -v -sIdentify what makes output "bad"
price but not in output)samples, target_count)Check recent changes
git diff to see what changedReview error messages completely
Red Flags to Stop:
Goal: Understand how data transforms through the pipeline
Steps:
Identify which blocks touch the problematic data
Read block implementations
lib/blocks/builtin/[block_name].pyexecute() methodTrace data transformation between blocks
lib/workflow.py:_process_single_seed() for multiplier pipelinesaccumulated_state merges block outputsCheck workflow execution flow
lib/workflow.py:85-224lib/workflow.py:305-449Key Files to Check:
lib/workflow.py - Pipeline execution enginelib/blocks/builtin/ - All block implementationslib/entities/block_execution_context.py - Context passed between blocksGoal: Form a specific, testable hypothesis
Steps:
Form specific hypothesis
Don't assume - verify with evidence
Use logs, traces, and execution results
Red Flags:
Goal: Implement minimal fix targeting the root cause
Steps:
Make minimal fix
Run tests to verify fix
Check for side effects
If fix doesn't work
Success Criteria:
| Issue Pattern | Where to Look | Typical Root Causes | Fix Pattern |
|---|---|---|---|
| Output has unexpected fields | lib/workflow.py data merging | Input metadata leaking to output | Filter initial_data_keys before returning results |
| Block returns wrong data type | Block's execute() method | Incorrect return type (dict vs list) | Fix block to return declared type |
| LLM generates poor quality | Block's prompt building | Unclear instructions, low temperature, copying examples | Improve prompt, add diversity instructions |
| LLM copying examples verbatim | SemanticInfiller prompt | Prompt doesn't emphasize creating NEW content | Add "do NOT copy" instruction to prompt |
| Pipeline crashes on specific input | Block's validation logic | Missing input validation or type checking | Add validation in block's execute() |
| Results missing fields | Block's output filtering or merging | Overly aggressive filtering or incorrect merge | Check field filtering logic |
| All duplicates flagged | DuplicateRemover threshold | Threshold too low or embedding model issues | Check similarity_threshold config |
| Metadata pollution | Workflow seed processing | Initial seed data not filtered from output | Use _filter_output_data() helper |
Pipeline Execution:
lib/workflow.py:85-224 - Normal pipeline execution flowlib/workflow.py:305-449 - Multiplier pipeline (1→N expansion) with seed processinglib/workflow.py:275-284 - _filter_output_data() helper (filters metadata from results)Built-in Blocks:
lib/blocks/builtin/structure_sampler.py - Statistical sampling (multiplier block)lib/blocks/builtin/semantic_infiller.py:59-109 - LLM prompt buildinglib/blocks/builtin/semantic_infiller.py:146-165 - Metadata filtering in SemanticInfillerlib/blocks/builtin/duplicate_remover.py - Embedding-based similarity detectionCore Infrastructure:
lib/entities/block_execution_context.py - Context passed between blockslib/blocks/base.py - BaseBlock interface all blocks inherit fromlib/entities/pipeline.py - ExecutionResult, Usage modelslib/template_renderer.py - Jinja2 template renderingTests:
tests/integration/ - Integration tests for end-to-end verificationtests/blocks/ - Unit tests for individual blocksUse this checklist to ensure systematic debugging:
Phase 1: Observe & Gather Evidence
□ Run pipeline and capture full output
□ Identify specific problem (what's wrong?)
□ Read error messages completely (full stack trace)
□ Check recent git changes (git diff, git log)
Phase 2: Trace Data Flow
□ Check which blocks are in the pipeline
□ Read those block implementations (execute methods)
□ Trace data flow through blocks (accumulated_state)
□ Understand workflow execution (normal vs multiplier)
Phase 3: Root Cause Analysis
□ Form specific hypothesis ("X causes Y because Z")
□ Verify hypothesis with evidence (code, logs, traces)
□ Don't assume - read actual code
□ Check for similar patterns elsewhere
Phase 4: Fix & Verify
□ Make minimal fix targeting root cause
□ Run tests to verify fix works
□ Check for unintended side effects
□ Follow project guidelines (KISS, simplicity)
Problem Observed:
Pipeline output contained input configuration fields (samples, target_count, categorical_fields) mixed with generated data.
Phase 1 - Evidence:
// Expected output:
{"category": "electronics", "price": 449, "description": "...", "is_duplicate": false}
// Actual output:
{"category": "electronics", "price": 449, "description": "...",
"samples": [...], "target_count": 10, "categorical_fields": [...]} // ❌ Bad!
Phase 2 - Trace:
merged_state = {**initial_data, **seed_data} at line 323Phase 3 - Root Cause: Hypothesis: "Input metadata leaks to output because workflow.py merges all initial_data into accumulated_state without filtering configuration fields before returning results"
Phase 4 - Fix:
_filter_output_data() helper methodinitial_data_keys at merge timeExecutionResultLessons:
Start with the simplest explanation
Use the scientific method
Trust but verify
Leverage existing patterns
Document as you go
implementing-datagenflow-blocks - For understanding block structure and creationaddress-pr-review - For evaluating whether debugging revealed design issues