ワンクリックで
backend-refactor
Simplifies fleet-rlm backend by rewriting/deleting modules and updating tests
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Simplifies fleet-rlm backend by rewriting/deleting modules and updating tests
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Delegate recursive work to child RLM sandboxes with budget management. Use when decomposing tasks into sub-queries, fanning out batched work, managing LLM call budgets, or building parent-child RLM hierarchies.
Diagnose fleet-rlm runtime failures, API contract drift, sandbox errors, and observability issues. Use when something is broken — Daytona connection failures, websocket mismatches, escalation not triggering, budget exhaustion, or missing traces.
Optimize fleet-rlm DSPy programs and RLM skill bundles using GEPA with MLflow tracking. Use when running optimization loops, designing feedback metrics, building training datasets, or comparing runs.
Hub skill for fleet-rlm: when to use dspy.RLM vs ReAct/CodeAct and which workflow skill to load next.
Design DSPy signatures and compose runtime modules for fleet-rlm tasks. Use when creating input/output field definitions, choosing between built-in signatures, selecting execution modes, or wiring custom modules.
Fetch and inspect JavaScript-heavy pages with Playwright in a Daytona browser-capable snapshot.
| name | backend-refactor |
| description | Simplifies fleet-rlm backend by rewriting/deleting modules and updating tests |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Any feature that involves:
src/fleet_rlm/runtime/, src/fleet_rlm/api/, src/fleet_rlm/integrations/daytona/, or src/fleet_rlm/integrations/database/None.
Read the feature description carefully. Understand exactly what files to create, modify, or delete.
Read existing code first. Before modifying any file, read it to understand current patterns, imports, and conventions. Read .factory/library/architecture.md and .factory/library/environment.md for context.
Write tests first (TDD). For new modules, write failing tests in tests/unit/runtime/ before implementation. For deletions, skip this step.
Implement the change. Write clean, minimal code following existing conventions:
dspy.Tool(func). Use @tool_fn marker from runtime/tools/_marker.py for registry discovery.For deletion features: Delete the directories/files, then grep for dangling imports and fix them. Remove corresponding test directories. Also verify no dynamic/runtime imports are broken (e.g., discover_tools() scanning runtime/tools/*.py).
For consolidation features: Before merging files, read ALL files involved. Merge into the most natural target file. Update all imports across the codebase. After merging, delete the old files and verify no dangling imports.
For Daytona 0.168.0 upgrade: Search for camelCase attribute access on Daytona objects (e.g., autoStopInterval, autoArchiveInterval, idleTimeout). Daytona 0.168.0 enforces snake_case. Fix all occurrences to snake_case. Run uv sync --all-extras after updating pyproject.toml.
Run validation:
make format
make lint
make typecheck
make test-unit
Fix all failures before completing.
Verify no dangling imports for any deleted or consolidated modules:
rg "from fleet_rlm\.(agent_host|worker)" src/fleet_rlm/
rg "import fleet_rlm\.(agent_host|worker)" src/fleet_rlm/
Also search for imports of the specific deleted module names.
{
"salientSummary": "Created simplified dspy.ReAct agent module in runtime/agent/agent.py with RLMReActChatSignature. Wrote 6 unit tests covering module construction, forward(), optimizer compat, and tool registration. All pass. make lint + make typecheck clean.",
"whatWasImplemented": "New runtime/agent/agent.py with FleetAgent(dspy.Module) wrapping dspy.ReAct. Constructor accepts tools list and max_iters. Forward passes chat_history and user_message through ReAct. Tests in tests/unit/runtime/agent/test_agent.py.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "make format", "exitCode": 0, "observation": "No changes needed" },
{ "command": "make lint", "exitCode": 0, "observation": "Clean" },
{ "command": "make typecheck", "exitCode": 0, "observation": "Clean" },
{ "command": "make test", "exitCode": 0, "observation": "142 passed, 3 skipped" },
{ "command": "rg 'from fleet_rlm.agent_host' src/fleet_rlm/", "exitCode": 1, "observation": "No matches" }
],
"interactiveChecks": []
},
"tests": {
"added": [
{
"file": "tests/unit/runtime/agent/test_agent.py",
"cases": [
{ "name": "test_agent_is_dspy_module", "verifies": "Agent subclasses dspy.Module" },
{ "name": "test_agent_forward_returns_prediction", "verifies": "forward() returns dspy.Prediction" },
{ "name": "test_agent_accepts_tools", "verifies": "Constructor accepts tools list" }
]
}
]
},
"discoveredIssues": []
}
.factory/library/environment.md