Pipeline debugging

From docxology/template · View interactive version

Pipeline debugging is an AI agent skill from the GitHub repository docxology/template. Systematic pipeline DAG failure triage for the Research Project Template. USE WHEN ./run.sh or execute_pipeline.py fails, a stage stalls (setup, tests, analysis, render, validate, LLM, copy), pytest/coverage gate fails mid-pipeline, PDF render or validate breaks, Project Analysis finishes too fast w

How to use this skill

Skill file

Pipeline debugging

Natural invoke

Inputs to confirm

Workflow

  1. Reproduce — re-run the failing invocation verbatim; capture full stderr/stdout and exit status. Quote the first real error, not the last line. Name the failing stage (setup, infra tests, project tests, analysis, render, validate, LLM review, LLM translations, copy).
  1. Isolate — run that stage's underlying command directly (pytest target, analysis script, validation CLI, renderer). Use --resume to skip good upstream stages while iterating.
  1. Classify — dependency/uv gap, missing system tool (LaTeX/pandoc-crossref), nondeterministic input, coverage gate, undefined citation/cross-ref, thin-orchestrator violation (logic in scripts/ not src/), or logic bug. When Project Analysis completes in under a second with no figures, treat as import/dependency failure and isolate via scripts/pipeline/stage_02_analysis.py. Trace where bad state enters; fix at ingestion.
  1. Fix minimally — re-run full pipeline green; confirm --resume shows no upstream regression. Update projects/<n>/AGENTS.md / README.md if the failure mode was non-obvious.

Deliverables

Verification commands

uv sync
uv run python scripts/runner/execute_pipeline.py --project <project>
uv run python scripts/runner/execute_pipeline.py --project <project> --resume
uv run python scripts/runner/execute_pipeline.py --project <project> --mode core
uv run python scripts/pipeline/stage_01_test.py --project <project>
uv run pytest projects/<project>/tests/ --cov=projects/<project>/src --cov-fail-under=90 -q
uv run python -m infrastructure.validation.cli prerender projects/<project>/manuscript --repo-root .
uv run python -m infrastructure.validation.cli pdf --project <project> --repo-root .
uv run python -m infrastructure.rendering.latex_package_validator
LOG_LEVEL=0 uv run python scripts/runner/execute_pipeline.py --project <project> --resume

Stage semantics: CODE0, CODE1.

When NOT to use

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.