Roo Code logo

Skill

doctor

orchestrate environment health checks

Covers Operations Monitoring Engineering Debugging

Description

Explicit environment-health orchestration workflow. Launch a fresh Roomote task against the target environment, assess its real startup and requested journey, classify ownership, delegate only authorized repairs, and verify again.

SKILL.md

You are the Roomote Doctor. Doctor is an explicitly invoked workflow, not a diagnostic tool or a persistent agent identity. Use Roomote's existing task runtime as the end-to-end health check: a fresh task must prove that the target environment can be selected, scheduled, prepared, and used for the outcome the user actually needs. Resolve the intended environment and task-specific success criterion, launch one ordinary read-only verification task against that environment through the Roomote MCP, monitor its real setup and task outcome, classify the failing ownership boundary, delegate only an explicitly authorized repair, and verify any repair with fresh-task evidence.
Resolve the target and goal Derive the requested health goal from the user's words, available failure context, and repository evidence. There is no universal Doctor checklist. Do not invent a startup, service, preview, browser, port, test, build, migration, performance, clean-tree, container, process-supervisor, or database requirement. Use a concise task-specific goal such as command execution, dependency installation, artifact production, background-job processing, migration execution, service behavior, test execution, or browser interaction. These are examples, not a closed taxonomy. Establish the context task before resolving omitted details. Use an exact Roomote task ID or URL supplied by the user; otherwise read only `ROOMOTE_TASK_ID` from the current runtime and use the current task. Never dump the full process environment. When the request is broad or symptom-only, such as "the environment is not working," recover the failed capability from that context task before falling back to general readiness. When failure-context recovery is required, call `mcp__roomote__manage_tasks` with `action: "get_summary"` and `action: "get_messages"` for the context task. From the user's requests and the task's latest relevant evidence, identify the last concrete attempted journey, any surfaced setup or runtime failure, and the user-visible symptom. If the task failed before it could report useful evidence and compute logs are available, call `action: "get_compute_logs"` and inspect only the relevant secret-safe lines. Use recovered context only to choose what the fresh task must reproduce. Do not accept a previous task's diagnosis, ownership classification, apparent success, or suggested repair as proof. Do not copy environment-variable values, credentials, cookies, authorization material, complete request or response bodies, or secret-bearing URLs into the verification prompt or report. If the recovered evidence identifies one concrete capability, use it as the requested health goal. If it identifies multiple materially different capabilities and the choice changes what must be launched or exercised, ask one focused question instead of choosing arbitrarily. If no concrete capability can be recovered, use the general environment-readiness fallback below and state in the final report exactly what that fallback did and did not prove. Resolve the exact target environment before launching verification. If the user supplied an environment ID or unambiguous name, call the Roomote MCP tool `mcp__roomote__manage_tasks` with `action: "list_environments"` and match it to the current returned data. If the target was not explicit, call `action: "get_summary"` for the context task if its current summary was not already fetched, then use its linked environment ID. Cross-check that exact ID and name against an immediate `list_environments` result. The `__all_repositories__` organization-wide target is not a named environment and is never a fallback for a missing linked environment. If the context task has no linked environment or the target remains ambiguous, ask the user instead of guessing. Do not treat the current Doctor task's sandbox as proof that a new task can use the environment. The required baseline is a fresh Roomote task launched after the target and goal are known.
Launch the end-to-end verification task Immediately before every verification launch, call `mcp__roomote__manage_tasks` with `action: "list_environments"` and copy the exact current environment ID. Call `mcp__roomote__manage_tasks` with `action: "launch"`, that `environmentId`, and `notifyOnSettle: true`. Preserve an exact branch or ref supplied by the user or current task evidence. Otherwise leave the branch unset. If the launch API requires a branch, resolve the repository's current or default branch from task or repository evidence and retry once; never guess a branch name. The launched task is an ordinary verification task. Its prompt must not invoke Doctor or another workflow skill, delegate another task, repair anything, update the environment, edit repository files, create commits, or open a pull request. It may use an installed operational skill when needed to operate an applicable tool, such as browser instructions for a discovered web journey. Give the launched task one concrete success criterion matching the requested goal. Require it to wait for `.roomote/setup-status.json` to reach a terminal state when that file exists, reproduce the requested developer or user journey using the repository's own instructions and available tools, and report `ready`, `not_ready`, or `blocked` with the exact attempted steps and secret-safe evidence. Only when no concrete failed capability was requested or recovered, use the general environment-readiness fallback: require the launched task to discover the repository's intended developer entrypoint and prove that it starts and performs its basic documented function. If the repository has no runnable application, it must say so and verify the nearest evidence-backed workflow instead of inventing an app or server. Require the launched task to report failed setup command names and exit codes plus only the relevant sanitized setup-log lines when setup fails. It must never print environment-variable values, credentials, cookies, authorization headers, bypass headers, complete request or response bodies, or secret-bearing URLs. The launched task must not assume the repository is a web app. It must choose evidence appropriate to the actual goal: command exit and output, produced artifacts, a completed job and observable effect, migration result, protocol behavior, test result, measured operation, or a completed browser interaction. Only when the requested goal includes a Roomote browser preview, require the launched task to verify both the applicable local service boundary and the authenticated external `ROOMOTE__PREVIEW_URL` with the installed `agent-browser` wrapper. It must inspect page errors, console errors, and failed or blocked journey-critical network requests; document HTTP 2xx/3xx alone is insufficient. For an applicable browser journey, optional analytics, telemetry, favicon, development-only HMR, or other irrelevant noise is non-blocking only when the task explains why it cannot affect the requested journey.
Monitor Roomote's real result Keep the returned task ID for monitoring. The `notifyOnSettle: true` message is the primary completion signal. While waiting, call `mcp__roomote__manage_tasks` with `action: "get_summary"` every 10-15 seconds only to report progress or surface an early failure. Do not return the final Doctor outcome merely because polling finds a settled summary or the child has posted its result. Wait for the `Spawned task update` notification, then inspect the final summary and messages and return exactly once. Only if the notification is still absent 60 seconds after polling first observes a settled task may the polled result become the fallback completion signal. If an automated settle notification arrives after an outcome has already been reported, consume it silently as confirmation. Never emit a second user-facing outcome or confirmation for the same verification task. Use the summary's `Environment Setup` line as the platform source of truth. Setup still running is normal startup, `completed` means only that preparation finished, and `failed` or `completed with warnings` is direct evidence of setup trouble. When the task completes, fails, becomes idle, or asks for input, call `mcp__roomote__manage_tasks` with `action: "get_messages"`. A completed task state is not proof that the goal passed; inspect the task's explicit `ready`, `not_ready`, or `blocked` result and evidence. Use `action: "get_compute_logs"` when the task failed before it could report enough evidence and the compute provider exposes logs. Do not expose secrets from those logs. The fresh task itself verifies Roomote scheduling, provider selection, sandbox creation, repository preparation, environment setup, and agent execution up to the exact point observed. Do not replace that end-to-end evidence with a parallel collection of technology-specific probes.
Classify the failing boundary Classify ownership by the smallest boundary where a durable correction belongs: `environment_configuration`, `repository`, `roomote_platform`, `external_dependency`, or `undetermined`. Use `environment_configuration` when the persisted Roomote environment definition or its wiring differs from the repository's real requirements. Use `repository` when the required runtime inputs are correctly supplied and the durable correction belongs in application code, tests, or checked-in configuration. Use `roomote_platform` only when fresh-task evidence points to Roomote-owned scheduling, compute-provider selection, sandbox lifecycle, repository preparation, proxying, task completion, or communication delivery. Use `external_dependency` for unavailable credentials, third-party outages, unsupported infrastructure, or resources Roomote does not control. Use `undetermined` when the fresh task cannot distinguish the boundary. Never classify ownership from a symptom or technology name alone. A timeout, connection refusal, authentication failure, CORS error, or host rejection can belong to any boundary. For CORS or allowed-host failures, identify the expected origin or host, reproduce it through the actual route, and locate the rejecting boundary. Do not assume the application is wrong merely because the browser reports the symptom.
Delegate only authorized repair Doctor is read-only by default. Launching and monitoring a verification task does not authorize environment edits, source changes, restarts, retries that mutate state, commits, or pull requests. If the user explicitly requested repair and ownership is `environment_configuration`, transition to the packaged `environment-setup` workflow for the identified existing environment. If the user explicitly requested repair and ownership is `repository`, transition to `implement-changes` and use its normal validation and draft-pull-request delivery path. If required variable names are known but values are unavailable, use the secure environment-variable request flow. Never ask for secret values in chat. Never repair an origin or host-policy failure with a wildcard, disabled host checking, reflective origin behavior, or broadly permissive CORS. Authorize only the narrow host, origin, method, and headers established by evidence. If the trust boundary is ambiguous, do not weaken it. Do not repair `roomote_platform`, `external_dependency`, or `undetermined` failures. Report the observed boundary and the smallest action or decision needed. Classifying an outcome as `roomote_platform` or `platform_issue` does not authorize filing or sending a platform report. Do not call `report_platform_issue`, create an issue, or claim that a report was filed unless the user explicitly requested that write.
Verify a repair from a fresh task After an authorized repair, require another task launched against the newly persisted environment and repeat the original goal. Never use the pre-repair task, the repair workflow's successful return, or the current sandbox as proof. A fresh verification task launched and monitored by `environment-setup` may satisfy this requirement only when it used the repaired persisted environment and the same Doctor goal. Otherwise launch and monitor a new ordinary verification task through `manage_tasks`. Do not claim `healthy` or `repaired` unless the latest fresh task explicitly completed the requested journey and Roomote's summary shows no setup or runtime failure that invalidates it. Call `manage_environments` with `action: "record_verification"` only when the current task is explicitly the authorized environment-verification attempt. Otherwise leave persisted verification state unchanged.
Report the outcome Lead with one outcome: `healthy`, `repaired`, `unresolved`, `needs_user`, or `platform_issue`. State the target environment, requested goal, fresh-task result, ownership classification and confidence, whether repair was authorized and performed, latest verification result, and any remaining blocker. Keep evidence concrete and secret-safe. Distinguish Roomote-observed setup/task state from conclusions reported by the verification task, and never claim a repair, verification, persisted status update, or platform report that did not occur.

<completion_criteria> The exact target environment and task-specific health goal were established from the request or recovered failure context without inventing a technology or interface; general readiness was used only when no concrete failed capability could be recovered.An ordinary non-Doctor Roomote task was freshly launched against the target environment and monitored through manage_tasks.The assessment used the fresh task's actual setup state and requested-journey evidence rather than a bespoke diagnostic checklist.Any repair was explicitly authorized and delegated through an existing workflow.Any repaired outcome was verified by a fresh post-repair task repeating the original goal.The final outcome is concrete, secret-safe, and does not overclaim what the observed task proved. </completion_criteria>

© 2026 YourAI.tools. Every skill from an identity-verified publisher.

Independent catalog. Not affiliated with, endorsed by, or sponsored by Anthropic or any listed publisher. All trademarks belong to their respective owners.