Metadata-Version: 2.5
Name: doctor-ros-mcp
Version: 1.2.4
Summary: Local ROS 1 to ROS 2 migration services and MCP wrapper
Project-URL: Repository, https://github.com/mari-muthu-k/doctor-ros
Project-URL: Documentation, https://github.com/mari-muthu-k/doctor-ros#readme
Project-URL: Issues, https://github.com/mari-muthu-k/doctor-ros/issues
Project-URL: Changelog, https://github.com/mari-muthu-k/doctor-ros/releases
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright [yyyy] [name of copyright owner]
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Requires-Dist: pyyaml>=6.0
Requires-Dist: rosbags<0.11,>=0.10
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: tree-sitter-cpp>=0.23
Requires-Dist: tree-sitter>=0.23
Description-Content-Type: text/markdown

<p align="center">
  <img src="assets/doctor-ros-mark.svg" alt="Doctor ROS logo" width="96" height="96">
</p>

# Doctor ROS

   A Kiro Power that moves ROS 1 robot fleets to ROS 2 Jazzy and Open-RMF,
   one robot at a time, while the rest of the fleet keeps working.

   **Status:** pre-alpha, under active development for the Kiroween 2026 hackathon.
   The local MCP server and the `doctor-ros` CLI expose `analyze`, `migrate`, `build`,
   `verify`, `fleet-config` and `deploy`. Migration converts what it can deterministically
   and reports every remaining change as a TODO. `deploy` writes on-site rollout files
   (bridges, DDS and QoS settings, a one-robot-at-a-time rollout plan and a simulated fleet
   demo); `deploy --target aws` is not supported yet. Every stage regenerates
   `migration/report.html`. Each stage also regenerates the patient chart,
   `migration/patient-chart.html`; `migration/report.html` is unchanged.
   `doctor-ros start` opens a local dashboard with the fleets, live status, report,
   patient chart and Kiro credits.

   The CLI runs the mechanical steps and checks anywhere. The full migration needs Kiro.

   Repository: https://github.com/mari-muthu-k/doctor-ros
   License: Apache-2.0

## Install as a Kiro Power

This repository is the Power. It follows the Agent Plugins format that Kiro Powers use:

- `plugin.json`: the manifest and activation keywords
- `mcp.json`: starts the MCP server with `uvx doctor-ros-mcp==<version>`
- `skills/`: `migrate-fleet`, `fill-fleet-profile`, `roll-out-fleet` and `open-dashboard`
- `dev.kiro/steering/doctor-ros-rules.md`: the Doctor ROS rules
- `dev.kiro/hooks/verify-self-repair.json`: the bounded verify self-repair hook
- `assets/doctor-ros-mark.svg`: the Doctor ROS logo

In Kiro, open the Powers panel, choose **Add Custom Power**, then **Import power from GitHub** with the repository URL (or **Import power from a folder** with a local clone). `uv` must be installed for `uvx`.

The Kiro docs do not yet describe how a Power ships steering files or hooks. If the Agent Hooks panel does not list "Doctor ROS verify self-repair" after you install the Power, copy `dev.kiro/hooks/verify-self-repair.json` into your workspace's `.kiro/hooks/` folder. If the rules are not applied, copy `dev.kiro/steering/doctor-ros-rules.md` into `.kiro/steering/`. The same rules are also in the `migrate-fleet` skill.

With this Power, Kiro keeps its messages short: results in one line plus a few bullets, and one precise question when it needs a decision.
The rule is in the steering file, in every skill and in the MCP server's `initialize` instructions.

## Updating the power

After you update the power to a new release, the MCP server can fail to connect for up to about 10 minutes, because `uvx` still uses its cached PyPI index, which does not list the new version. If the server shows an error after an update, run this once:

```
uvx --refresh --from doctor-ros-mcp==<version> doctor-ros --help
```

Then click **Retry** on the server in the MCP servers panel.

## Example fleets

Example ROS 1 fleets for trying the Power live in a separate repository, [mari-muthu-k/example-fleets](https://github.com/mari-muthu-k/example-fleets). It is included here as a git submodule at `examples/`. The first fleet is `hospital_fleets`: three carts in the AWS RoboMaker hospital world that share one narrow corridor, where only one robot fits at a time. It runs on plain ROS 1 with no traffic control, so the carts deadlock. A `corridor_watch` node logs deadlocks, collisions and aborted goals. It is the "before" for the Open-RMF traffic demo.

The dashboard tests read fleets from `examples/` or from the folder in `DOCTOR_ROS_EXAMPLE_FLEETS`, and skip when neither is there.

Clone with the submodule, or fetch it into an existing checkout:

```text
git clone --recurse-submodules https://github.com/mari-muthu-k/doctor-ros.git
git submodule update --init examples
```

To test the Power, open the example-fleets repository as its own workspace in Kiro and install the Power there. `examples/` is for development only and is not shipped: the wheel and source archive contain only `src/doctor_ros` (plus tests and metadata in the source archive), `.kiroignore` excludes it from the Power, and the release workflow checks out without submodules.

## Test the Power against a local checkout

To try unreleased code, point your own workspace MCP settings (not this repository's `mcp.json`) at a local checkout. The server command is `uvx --from <local doctor-ros path> doctor-ros-mcp`, which in MCP settings looks like this:

```json
{
  "mcpServers": {
    "doctor-ros": {
      "command": "uvx",
      "args": ["--from", "<local doctor-ros path>", "doctor-ros-mcp"]
    }
  }
}
```

For the CLI, run it from the checkout with `uv run doctor-ros analyze <fleet folder>` (and `migrate`, `build`, `verify`, `fleet-config`, `deploy` the same way).

The `mcp.json` shipped with the Power pins `doctor-ros-mcp==1.2.4` and is not changed by this. Installing the Power still starts the released server.

## Dashboard

The dashboard is a local web page that lists your fleets with their live status, shows each fleet's report and patient chart, and shows Kiro credits per fleet.

In Kiro, say "open the doctor ros dashboard". The `open-dashboard` skill starts it in the background and gives you the link. To start it yourself, run this in the fleet folder:

```text
uvx --from doctor-ros-mcp doctor-ros start
```

Or install it once with `uv tool install doctor-ros-mcp` and then run `doctor-ros start`.

- `-r <folder>` serves another folder. Fleets are found up to two levels down.
- `--port <port>` changes the port (default 8765).
- It listens only on `127.0.0.1` and is read-only: it changes nothing in your repository.
- It needs a release of `doctor-ros-mcp` that includes the dashboard. With an older release, `start` is an invalid choice.

What it shows:

- **Fleets:** every fleet under the folder, with its stack (ROS 2 once the migration branch has a `migrate: success` commit, otherwise ROS 1), its live status, and the robots running according to `docker compose ps` (unknown when Docker is not reachable).
- **Fleet page tabs:**
  - Report and Patient chart: read from the migration branch with git (no checkout) and shown in a sandboxed frame.
  - Kiro credits: see below.
  - Open-RMF: the live map, goals and robot edits come in the next phase.
- **Kiro credits:** kept per fleet in `.git/doctor-ros/fleets/<fleet>-<id>/credits.yaml` (`.git/doctor-ros/credits.yaml` when the fleet is the repository root). The file is outside the working tree, so it is never committed. The first time you open the fleet page, Doctor ROS creates it with a commented template. Add one entry per stage:

```yaml
entries:
  - date: "2024-01-15"
    stage: "analyze"
    credits: 12.50
    note: "initial scan"
```

## Context7 documentation lookups

Kiro reads current ROS 2, Nav2, Gazebo with `ros_gz`, and `ros2_control` documentation through the `context7` MCP server in `mcp.json`. It does this before it resolves a migration TODO marker or replaces a package. Only Kiro uses Context7. `analyze`, `migrate` and `build` never call it.

Context7 works without an account or a key. If Context7 reports a rate limit, add your own API key as described below.

To add an API key:

1. Get a key at https://context7.com.
2. Open your own MCP settings in Kiro (not this repository's `mcp.json`).
3. Add a `headers` entry to the `context7` server: `"Authorization": "Bearer <your key>"`.
4. Save the settings and reconnect the server.

The key is never stored in this repository.

## Jazzy dependency snapshot

Doctor ROS ships a Jazzy snapshot: the list of packages in the `ros/rosdistro` jazzy release file and the noble rosdep keys. It is package data in `src/doctor_ros/data/jazzy-snapshot.json`, so it works without a network. The Snapshot Date is 2026-11-30.

To refresh it, run this in a checkout (it needs a network):

```text
uv run python dev/generate_jazzy_snapshot.py
```

What uses it:

- **analyze** adds a "jazzy dependencies" table to `migration/analysis.md` and `migration/analysis.json`. Each dependency is `workspace`, `renamed`, `on jazzy`, `system key`, `vendored` or `not on jazzy`, with the Snapshot Date and a count per class.
- **migrate** renames dependencies in `package.xml` and `CMakeLists.txt` with a rename table (for example `move_base` to `nav2_bringup`). Renames that need configuration work get a TODO marker with a link to the documentation.
- **build** lists all missing rosdep keys at once, instead of stopping at the first one.

`analyze`, `migrate` and `build` stay deterministic and offline: they never call Context7, and they read the snapshot, not the network.

## Conversion

`analyze` and `migrate` report `success` only when nothing is left to resolve, and `incomplete` otherwise. `analyze` counts unresolved names and lists each one. `migrate` counts open TODO markers. TODO markers are rescanned at the start of each stage, so a resolved marker is not reported open. Topics built with `%`, `.format` or f-strings over loop variables and parameters are reported as templates such as `/{cart}/amcl_pose` and are not counted as unresolved.

`migrate` converts:

- **Python:** `rospy` to `rclpy` for time and duration, sleep (on the node clock), `Rate`, shutdown calls, `wait_for_message`, service clients, `ROSInterruptException` and `ServiceException`, and `anonymous` `init_node`. The default `queue_size` becomes depth 10, with a note. Blocking nodes spin in a `MultiThreadedExecutor` on a background thread. The `move_base` `SimpleActionClient` becomes a `NavigateToPose` `ActionClient`. `gazebo_msgs` model states map to `ros_gz` equivalents, otherwise a TODO names both. Unsupported constructs stay in place with a TODO.
- **Launch:** each `.launch` becomes a `.launch.xml` in the same package, and references to the old name are rewritten. This covers includes, `rosparam`, `use_sim_time` (`set_parameter`), `robot_state_publisher`, the `gazebo_ros` world to a `ros_gz_sim` `gz_sim` include, `spawn_model` to `ros_gz_sim create`, and `map_server`, `amcl` and `move_base` to Nav2 with a generated Nav2 params file. `move_base` keys with no Nav2 mapping are reported and omitted. A file that fails to convert stays unchanged with a TODO.
- **Gazebo Harmonic:** URDF, xacro and world files lose Gazebo Classic plugins, and one `ros_gz_bridge` YAML (`cmd_vel`, `odom`, `tf`, `scan`, `clock`) is generated per robot. A file that cannot be parsed stays unchanged and is reported.
- **Dockerfile and compose:** Jazzy base image, `ros-noetic-*` to `ros-jazzy-*`, `catkin` to `colcon`. Compose files lose `roscore` and `ROS_MASTER_URI`, and `roslaunch` becomes `ros2 launch`.

### Vendored dependencies

Some packages have no Jazzy release and are carried by Doctor ROS from a source table in `src/doctor_ros/data/vendored_sources.py`. The first entry is `aws_robomaker_hospital_world`, pinned to a commit with an overlay that removes the Gazebo Classic and pip requirements, fetches the Fuel models and sets `GZ_SIM_RESOURCE_PATH`. `migrate` writes `fleet.repos` from the table when the fleet depends on a vendored package, and `analyze` and `migrate` show those packages as `vendored`, not `not on jazzy`. An entry can also carry a ROS 1 source (`ros1_branch`, `ros1_commit`, same repository). `verify` clones it into the Noetic baseline workspace before `rosdep` and `catkin_make`, and clones and overlays the Jazzy source into the verify workspace the same way `build` does.

## Build

`build` runs `rosdep install` and `colcon build` in one Jazzy container. Before colcon it clones each vendored package at its pinned commit and applies the overlay; a failure stops the build and names the package and the step. After colcon succeeds, `build` checks the fleet in the same container: `py_compile` on its Python files, a scan for leftover `rospy`, `actionlib` and `tf` (not `tf2`) in Python, `package.xml`, `CMakeLists.txt` and launch files, a parse of every launch file, and `rosdep` for build and exec keys with vendored packages counted as workspace packages. All failures are listed with path and line. `build` reports `success` only when colcon exits 0 and all four checks pass, so success means the fleet is converted. The scan also flags ROS 1 commands (`roscore`, `rosrun`, `roslaunch`, `rosservice`, `rostopic`, `rospack`, `rosparam`) left in a Dockerfile or compose file under the fleet source. Because the container only compiles, `rosdep install` installs build-time dependencies only (`build`, `buildtool`, `build_export`, `buildtool_export` and `test`). Runtime `exec_depend` packages are not installed, and the resolve step still reports missing runtime keys.

Each step has a 1800-second limit. To change it, set `DOCTOR_ROS_BUILD_TIMEOUT` (seconds) in the environment of the MCP server or CLI, for example `DOCTOR_ROS_BUILD_TIMEOUT=3600`. A value that is not a positive number is ignored. A timeout is reported as a `process_timeout` diagnostic that names the step and the limit.

## Verify: per-robot launch and scenario

`verify` starts each robot from its compose service (`package`, launch file and `key:=value` arguments, for example `robot.launch name:=linen_bot x:=-5.00`). The launch files and arguments are recorded in `migration/baseline/<robot_id>/topics.yaml` under `launch` (`ros1`, `ros2`, `ros1_args`, `ros2_args`), and `launch.ros2` follows the launch renames in `migration/changes.json`. A robot without a compose service falls back to the first launch file by name. Edit `topics.yaml` to override.

`inputs.yaml` `scenario` takes two optional fields for a robot launch that spawns the cart and runs its own localization and navigation:

```yaml
scenario:
  world_launch:                 # launch that brings up the world and the map
    ros1: launch/hospital_sim.launch
    ros2: launch/hospital_sim.launch.xml
  robot_spawns_itself: true     # skip the harness spawn and Nav2 bringup
```

With them, the harness starts `world_launch` instead of the bare world, does not spawn the robot or start `nav2_bringup`, and waits for the robot's own `move_base` (ROS 1) or `navigate_to_pose` (ROS 2). `world_launch` replaces the `classic_world`, `harmonic_world` and `map` files, and `robot_spawns_itself` replaces `robot_model`. Without the fields nothing changes.

Gazebo Harmonic renders headless with software rendering (Xvfb and Mesa llvmpipe in the jazzy-sim image). If the lidar topic does not appear within 60 s, the scenario is UNRESOLVED with a `gazebo` reason. Rebuild the `doctor-ros-noetic` and `doctor-ros-jazzy-sim` images after updating, since their Dockerfiles changed.

## Fleets in a subfolder

A fleet can live in a subfolder of a larger Git repository, for example `example-fleets/hospital_fleets`. Doctor ROS then asks for confirmation before it changes anything:

- **MCP:** the tool returns the outcome `subfolder_confirmation_required` with the Git top level, the fleet prefix and the migration branch. Confirm with the user, then call the same tool again with `confirm_subfolder: true`.
- **CLI:** the command asks a `y/N` question on a terminal. Pass `--yes` (or `-y`) to confirm in advance. When the CLI is not interactive and `--yes` is missing, it prints the same outcome and exits with code 1 without changing anything.

Details:

- State is stored under `<git dir>/doctor-ros/`, keyed by the fleet folder, so it is never written inside the fleet folder.
- Version 0.1.0 could leave a stray `.git` folder in the fleet subfolder. You can delete it yourself. Doctor ROS never reads it for state and never deletes it.
- There is one migration branch per fleet folder, and only one branch is checked out per repository. Fleets in the same repository are migrated one after another.
- Commits include only paths under the fleet folder.
- Paths passed to `fleet_config` (`--config` on the CLI) must stay inside the fleet folder.

## Release process

The authoritative version is `src/doctor_ros/__about__.py` (`__version__`). Hatchling reads that value for both distributions. Update it before a release. `plugin.json` (`version`), the `doctor-ros-mcp==<version>` pin in `mcp.json` and the `uvx --from doctor-ros-mcp==<version>` command in `skills/open-dashboard/SKILL.md` must carry the same version, and `tests/test_power_package.py` fails if any of them differs from `__about__.py`. The `version` in each skill's front matter is not checked, so update it by hand. Run the checks below, and create a tag whose name is `v<version>`.

Run the release checks from a clean checkout:

```text
uv run pytest
uv build
uv run --with twine twine check dist/doctor_ros_mcp-<version>.tar.gz dist/doctor_ros_mcp-<version>-py3-none-any.whl
```

Inspect both artifacts before uploading them. Confirm that the metadata contains the expected version, `Requires-Python: >=3.10`, the `PyYAML`, `tree-sitter` and `tree-sitter-cpp` runtime dependencies, exactly the `doctor-ros` and `doctor-ros-mcp` console scripts, and `doctor_ros/data/jazzy.Dockerfile`. The package-data check must cover both the wheel and source archive.

A release candidate can be uploaded to TestPyPI after a TestPyPI account and upload credentials are available. The distribution name may need to be registered there first:

```text
uv publish --publish-url https://test.pypi.org/legacy/ dist/doctor_ros_mcp-<version>.tar.gz dist/doctor_ros_mcp-<version>-py3-none-any.whl
```

From a directory outside this checkout, install and exercise the candidate with the TestPyPI index and the public index as a dependency fallback:

```text
uvx --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --from doctor-ros-mcp==<version> doctor-ros-mcp
uvx --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --from doctor-ros-mcp==<version> doctor-ros verify --json
```

Send an MCP `initialize` request followed by `tools/list` to the first command and verify the six tools `analyze`, `migrate`, `build`, `verify`, `fleet_config`, and `deploy`. In the same outside-checkout environment, verify that `from doctor_ros.resources import read_jazzy_dockerfile` returns content containing `FROM ros:jazzy`, `rosdep update`, and `colcon`. These checks prove that stdio startup and installed package resources do not depend on a repository checkout.

`.github/workflows/release.yml` runs the test suite, builds both artifacts, checks them with Twine, and verifies the pushed `v<version>` tag against `__about__.py`. A separate `publish` job, which runs only on a manual `workflow_dispatch` run (a tag push runs the checks but does not publish) and is the only job allowed to request an OIDC identity token, publishes to PyPI with the trusted-publishing action; no PyPI token is stored. Configure the trusted publisher on PyPI with the workflow `release.yml` and the GitHub environment `pypi`, and create that environment in the repository settings, before starting the publish run. This repository does not claim any additional hosted deployment service.

Do not publish to real PyPI as part of ordinary development or TestPyPI validation. A real PyPI release requires explicit approval after the TestPyPI smoke checks pass. The `0.1.0` real-PyPI `uvx` check is intentionally a separate post-approval step.
