voly-backend
Guide for working on VOLY Python backend — pipeline, executors, AI gateway, DSPy, config, API routes. Use this skill for any backend changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide for working on VOLY Python backend — pipeline, executors, AI gateway, DSPy, config, API routes. Use this skill for any backend changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | voly-backend |
| description | Guide for working on VOLY Python backend — pipeline, executors, AI gateway, DSPy, config, API routes. Use this skill for any backend changes. |
| Меняешь | Прочитай |
|---|---|
| Executor (claude-code, wrangler, zen, ...) | docs/backend/executors.md |
| Pipeline стадии / PipelineResult | docs/backend/pipeline.md |
| AI Gateway / провайдеры / CF | docs/backend/ai-gateway.md |
| DSPy programs / runner / adapter | docs/backend/dspy.md |
| Config / env vars / voly.yaml | docs/backend/config.md |
| API routes (/api/run, /api/tasks, ...) | docs/backend/api.md |
| CF Worker (infer.ts, index.ts) | docs/backend/ai-gateway.md + cf-workers/agent/src/ |
AIGateway.chat() — единственный выход к моделям из Pipeline и DSPyvoly/ — только через --cwdbilling_error=True на ExecutorResult → AgentRunner запускает fallback chainclaude-code → wrangler → zen
Только file-writing executors. Не добавлять text-only провайдеры в цепочку.
# Новый executor
class MyExecutor(Executor):
def run(self, task, *, cwd, max_turns, timeout) -> ExecutorResult:
try:
...
return ExecutorResult(success=True, output=out)
except SomeBillingError as e:
return ExecutorResult(success=False, error=str(e), billing_error=True)
# Добавить в _build_executor() factory в agent_runner.py
# Добавить в EXECUTOR_NAMES frozenset
# Если file-capable + свой billing → добавить в BILLING_FALLBACK_CHAIN
# DSPy программа (lazy import dspy)
class MyProgram(BaseProgram):
program_id = "my-program"
agents = ("developer",)
strategy = "chain_of_thought"
def build(self):
self.ensure_dspy()
import dspy
return dspy.ChainOfThought(MySignature())
register_program(MyProgram()) # в конце модуля
# Smoke test (всегда после изменений)
python -c "import voly.pipeline, voly.inference; from voly.config import VOLYConfig; assert VOLYConfig().dspy.enabled is False"
pytest tests/test_dspy_runtime_smoke.py -q
# Весь тест-сюит
pytest tests/ -q
После любого изменения поведения обнови соответствующий файл в docs/backend/:
| Что изменил | Обнови |
|---|---|
| Executor (добавил/изменил) | docs/backend/executors.md |
| Pipeline стадия | docs/backend/pipeline.md + docs/ARCHITECTURE.md |
| Gateway / провайдер | docs/backend/ai-gateway.md |
| DSPy программа / конфиг | docs/backend/dspy.md |
| Config / env var | docs/backend/config.md |
| API endpoint | docs/backend/api.md |
После завершения задачи создай отчёт: /voly-report
Guide for working on VOLY Svelte 5 UI — components, API client, styling. Use this skill for any frontend changes in ui/.
Create an action plan for a VOLY task, classify complexity, decide which agents to spawn (zen for simple tasks, claude-code for complex), and prepare the execution with doc-update requirements.
Create a task completion report after finishing any VOLY task. Shows what changed, which files were modified, test results, doc updates, and open items.