> ## Documentation Index
> Fetch the complete documentation index at: https://eispatch.framewire.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Contributing

> Contribute to EISPATCH: development setup, workflow, testing, adding a new host adapter, and the PR checklist.

Contribute to EISPATCH and help improve the visual prompt composer for AI coding agents. This page covers the principles, development setup, workflow, testing, and guidance for adding new host adapters.

## Principles

* Keep `core/` host-independent so the composer, compiler, and recommender work for every agent.
* Keep adapters thin under `adapters/<host>/`. Each adapter owns its hook or plugin, discovery adapter, and MCP server if needed.
* Remain zero-dependency Node ESM and require Node 20 or later.
* Privacy first: never expose server URLs, tokens, or secrets in the UI or tooltips.
* Label capabilities honestly: advisory guidance versus host-enforced tool scope.

## Development setup

1. Fork the repository on GitHub.
2. Clone your fork locally:
   ```bash theme={null}
   git clone https://github.com/<your-username>/eispatch.git
   cd eispatch
   ```
3. Ensure Node.js 20 or later is installed:
   ```bash theme={null}
   node --version
   ```

## Workflow

**1. Create a branch**

```bash theme={null}
git checkout -b your-feature-branch
```

**2. Make changes**

Edit the relevant files in `core/`, `adapters/<host>/`, or `scripts/`.

**3. Test end to end**

```bash theme={null}
node demo/verify-e2e.mjs
```

**4. Check the UI**

```bash theme={null}
npm run preview
```

Then open `http://127.0.0.1:4177` to review the composer.

**5. Open a pull request**

Push your branch and open a pull request against the main repository.

## Adding a new host adapter

If you want to add support for a new coding agent, follow the structure used by existing adapters:

1. **Create the adapter directory** at `adapters/<host>/`.
2. **Write a discovery adapter** (`discovery-adapter.mjs`) that reads the host's local config and returns metadata for MCP servers, skills, plugins, and subagents.
3. **Write a hook or plugin** that intercepts prompts matching the trigger regex `^(?:\/\/(?:e|d)ispatch|(?:e|d)ispatch:)\s*(.+)$` (case-insensitive). On trigger:
   * Spawn `core/launch-local-composer.mjs` with `--host <host>`, `--prompt`, `--workspace`, and `--ready-file`.
   * Wait up to 2.5 seconds for the ready file containing `{ url, port, pid }`.
   * Block the prompt and return a `composerUrl` so the user can open the composer.
4. **Add a SKILL.md** at `skills/eispatch/SKILL.md` that documents the host's integration behavior.
5. **Add an MCP server if needed** (`mcp-server.mjs`) to expose tools such as `dispatch_compose`, `dispatch_discover`, and `dispatch_compile`.
6. **Write an installer script** at `scripts/install-<host>.mjs` that:
   * Copies or writes host-specific files and config entries
   * Supports `--check` to verify the installation
   * Supports `--uninstall` to remove only EISPATCH-owned entries
   * Supports `--target <dir>` if the host supports alternate home directories

## PR checklist

* [ ] `node demo/verify-e2e.mjs` passes
* [ ] `npm run preview` renders the composer correctly
* [ ] New code follows the host-independent `core/` and thin adapter separation
* [ ] No new dependencies are added
* [ ] Privacy rules are respected (no secrets exposed in UI or tooltips)
* [ ] Capability labels are honest (advisory versus enforced)
* [ ] Documentation is updated if user-facing behavior changed

## License

EISPATCH is released under the MIT license.

## Contact

You can optionally notify the maintainers at [framewireio@gmail.com](mailto:framewireio@gmail.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.