# Dev Handoff

This document covers the steps to hand off a completed AI build to the development team for integration into the Mailworks codebase.

***

## Prerequisites

Before initiating a handoff, all of the following must be true:

* DeepSource shows zero errors or warnings
* Dependabot shows zero open security alerts
* Lint passes clean (`pnpm run lint` with zero errors)
* Local testing is complete and the build is working as expected

Do not proceed until all four are confirmed.

***

## Step 1: Transfer Repo Ownership

Once testing is complete, transfer the repo from the `Mailworks-AI` organization to `github.com/themailworks`.

Tell Claude Code:

> "Transfer ownership of this repo to the themailworks GitHub organization."

If Claude Code cannot complete the transfer directly, do it manually:

1. Go to your repo at `github.com/Mailworks-AI/[repo-name]`
2. Click **Settings**
3. Scroll to the bottom and click **Transfer**
4. Enter `themailworks` as the destination organization
5. Follow the confirmation prompts

***

## Step 2: Alert Tim to Open a Development Ticket

Once the transfer is complete, alert Tim to open a development ticket for the repo.

Include the following in your message:

* **Repo URL:** `https://github.com/themailworks/[repo-name]`
* **Your GitHub username:** So the dev team can add you as a collaborator
* **Brief description:** What the build does and its intended use

***

## Step 3: Dev Accepts the Transfer and Adds You as a Collaborator

The Director of Engineering will accept the repo into the `themailworks` organization and add you as a collaborator so you retain access.

You will receive a GitHub notification when this is complete.

***

## Step 4: Making Changes After Transfer (Optional)

If you need to make further changes to the code after the repo has been transferred and you've been added as a collaborator:

### 1. Update Your Remote

Your local copy still points to the `Mailworks-AI` org. Tell Claude Code:

> "Update the Git remote origin to point to <https://github.com/themailworks/\\[repo-name>]"

### 2. Create a New Branch

Tell Claude Code:

> "Create a new branch for my changes and switch to it."

Claude will pick an appropriate branch name. All changes must be made on a branch. Never commit directly to main.

### 3. Fix DeepSource Errors

1. Go to your repo on GitHub at `github.com/themailworks/[repo-name]`
2. Find the **DeepSource** section under the repo's checks or integrations
3. Review any flagged errors or warnings

If there are issues, tell Claude Code:

> "There are DeepSource errors on this repo. Here's what it's flagging: \[describe or paste the errors]. Fix them."

### 4. Run the Lint Check

Tell Claude Code:

> "Run pnpm lint and fix any errors."

Both DeepSource and lint must pass clean before opening a PR.

### 5. Push and Open a PR

Tell Claude Code:

> "Commit the changes, push this branch to GitHub, and open a pull request. Tag Ray-MW as a reviewer."

### 6. Merge to Main

Once Ray-MW approves the PR, merge it to the main branch.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledge.themailworks.com/how-we-work/dev-handoff.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
