voly-backend
Skill17 starsChanged 5 months agoApache-2.0View on GitHub
Guide for working on VOLY Python backend — pipeline, executors, AI gateway, DSPy, config, API routes. Use this skill for any backend changes.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- headroom/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- headroom/llms.txtllms.txt
- software-architectureSkill
- voly-frontendSkill
- voly-planSkill
- voly-reportSkill
- software-architectureSkill
- voly-backendSkill
- voly-frontendSkill
- voly-planSkill
- voly-reportSkill
The file
Files
VOLY Backend Development Skill
Before writing any code — read
| Меняешь | Прочитай |
| 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/ |
Architecture rules
AIGateway.chat()— единственный выход к моделям из Pipeline и DSPy- Executors могут bypass gateway (они запускают субпроцессы: claude CLI, wrangler dev, opencode)
- Нет product-specific логики в
voly/— только через--cwd billing_error=Trueна ExecutorResult → AgentRunner запускает fallback chain- DSPy импортируется только lazy (не на уровне модуля)
Billing fallback chain
claude-code → wrangler → zenТолько file-writing executors. Не добавлять text-only провайдеры в цепочку.
Code patterns
# Новый 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()) # в конце модуляTesting
# 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/ -qDocumentation requirement (MANDATORY)
После любого изменения поведения обнови соответствующий файл в 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 |
Completion report
После завершения задачи создай отчёт: /voly-report
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

