بنقرة واحدة
quality-gates
Understanding and passing workflow quality gates (validate, dry, pytest, ruff, typecheck)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Understanding and passing workflow quality gates (validate, dry, pytest, ruff, typecheck)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | quality-gates |
| description | Understanding and passing workflow quality gates (validate, dry, pytest, ruff, typecheck) |
Use this skill to understand what each quality gate checks and how to ensure your workflow passes all gates.
What it checks:
# /// script)Common failures:
✗ Missing PEP 723 metadata block
✗ run.py must subclass BaseWorkflow
✗ Workflow class must implement run() method
✗ Tool not found: yahoo_finance (imported from tools.yahoo_finance)
How to fix:
BaseWorkflow[ParamsType]def run(self) -> int: methodWhat it checks:
Common failures:
✗ dry_run.py not found
✗ KeyError: 'api_key' (accessing env var in dry run)
✗ ConnectionError: API not available (real network call in dry run)
How to fix:
raw run workflow --dryWhat it checks:
Enable in .raw/config.yaml:
builder:
gates:
optional:
pytest:
command: "pytest test.py -v"
timeout_seconds: 60
Common failures:
✗ AssertionError: Expected 0 but got 1
✗ ModuleNotFoundError: No module named 'workflow_name'
How to fix:
What it checks:
Enable in .raw/config.yaml:
builder:
gates:
optional:
ruff:
command: "ruff check . && ruff format . --check"
timeout_seconds: 30
Common failures:
✗ F401 'sys' imported but unused
✗ E501 Line too long (92 > 88 characters)
How to fix:
ruff format . to auto-formatruff check --fix . for auto-fixesWhat it checks:
Enable in .raw/config.yaml:
builder:
gates:
optional:
typecheck:
command: "mypy run.py"
timeout_seconds: 60
When gates fail:
Read the error message carefully
.raw/builds/<build_id>/logs/<gate>.logFix one gate at a time
validate (structural issues)dry (runtime issues)Test locally before rebuilding
raw validate workflow-id # Check validation
raw run workflow-id --dry # Check dry run
pytest test.py # Check tests
Common patterns:
✗ Validation failed
Errors:
• Missing PEP 723 metadata block (# /// script)
• Tool not found: yahoo_finance (imported from tools.yahoo_finance)
Steps to fix:
Add PEP 723 block to run.py:
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["pydantic>=2.0", "rich>=13.0", "yfinance>=0.2"]
# ///
Create tools/yahoo_finance/:
mkdir -p tools/yahoo_finance
touch tools/yahoo_finance/__init__.py
# Create tools/yahoo_finance/tool.py
Validate again:
raw validate workflow-id
Design multi-service architectures with RAW workflows as components
Writing effective dry_run.py mocks for workflow testing without external dependencies
Guide for creating structured plans with numbered steps and quality gates
Test-driven development loop for workflows - write tests first, then implementation
Creating reusable tools in tools/ directory that workflows can import and use
Create Agent Skills that comply with the agentskills.io specification. Use when the user asks to create a new skill, add agent capabilities, or build reusable instructions.