Migrate from GitHub
The Get started prompt handles GitHub projects automatically. When your agent spots a GitHub remote, it runs through this checklist. Here’s what happens under the hood.
Your part
Your agent drives the migration and pauses whenever it needs a hand. Here’s what you’ll do:
- Review and approve the plan before your agent starts.
- Sign in, and create a team if you don’t have one yet.
- Give your team a heads-up about switching to Motor. Your agent drafts what to send them.
- Let your agent work through the checklist, stepping in to enter secrets or approve changes to GitHub and production.
- Retire GitHub when your agent says it’s safe. It tells you which credentials to revoke.
Want the raw checklist? Copy or download it below, or run motor learn migrate to print it.
FAQs
What comes across from GitHub?
Your Git history, branches, and tags come across, with each branch becoming an Amp channel. Pull request descriptions and review comments don’t transfer. If anything blocks the import or won’t make the trip, your agent flags it before moving on.
Does my agent ask before it changes GitHub or production?
Yes. Your agent won’t touch GitHub settings, workflows, or production deploys without getting your okay first.
What about secrets?
You enter every secret value yourself in your own terminal. The checklist explicitly forbids your agent from reading, printing, or storing secret values.
What happens to GitHub Actions?
Your agent inventories your workflows, translates the supported ones to Piston, and asks whether to keep or turn off the rest. Keep in mind that anything left on GitHub only sees code up to the freeze, not new work landing on Motor.
What about Issues, Projects, Discussions, and the Wiki?
Motor doesn’t include them. You can leave them on GitHub or move them to another tool.
What does my team need to do?
Each teammate accepts their invite and runs a quick local setup. Your agent will prompt you to send them Appendix A.
My project uses Git, but not GitHub.
Just use the Get started prompt. Your agent imports your
history using motor learn import and leaves your existing Git repo untouched.
GitHub migrations under the hood
You can skip this section unless you’re curious. Your agent handles every step and stops whenever it needs you.
The instructions below are written for your agent, so “you” means your agent and “the user” means you.
0.Rules for the agent
The guardrails your agent follows throughout: go in order, verify each step, pause when it needs you, and never touch a secret value.
Instructions for your agent
Follow these rules throughout the migration.
- R1. Run the steps in order. Don't skip a step, and don't start the next step until the current one is done.
- R2. Every step is labeled [AGENT], [USER ACTION], or [AGENT + USER].
- R3. At a [USER ACTION] step, stop and send the user the text from the "Tell the user" block with all variables filled in. Wait until the user confirms they've finished, then run the step's Verify check.
- R4. After every step, run its Verify check. If it fails, follow the If not instructions; if there aren't any, stop and tell the user.
- R5. Pass
--jsontoampandmotorcommands whenever you need to parse their output, and always check the exit code. - R6. Never ask for, read, write, print, or keep a secret value. Never put a secret value in a
command argument, file,
envvalue, or hook input. - R7. Don't modify, delete, or archive anything on GitHub unless a step explicitly tells you to.
- R8. Replace every
<VARIABLE>with its value from step 1.4 or from the command output named in the step (for example,<MERGE_ID>is.idfrommotor gauss merge create --json). Never run a command that still has a placeholder in it. - R9. If a command fails twice, stop and tell the user the command, the error, and the
request_idif one was returned. - R10. Log every finding, loss, and decision in the migration report (
<WORK_DIR>/report.md) and hand it to the user at the end (step 12.3). - R11. Don't deploy, publish, or run a production task unless a step tells you to.
- R12. As soon as a check passes, move straight to the next step. Don't add extra wait times that aren't in this checklist.
Warnings, cautions, and notes
- WARNING flags a risk of data loss or a change to production.
- CAUTION flags a risk of a failed migration or misconfiguration.
- NOTE adds helpful context.
The LAND procedure
Several steps ask you to "land a change." Follow steps L1 through L7 whenever you do.
-
L1. From the repository root, create a workspace for the task.
<TASK>should be a short name using lowercase letters, digits, and hyphens.cd <REPO_DIR> amp workspace add workspaces/<TASK> cd workspaces/<TASK> -
L2. Set your identity in the workspace using your real agent name and model ID. Don't guess the model ID—if you don't know it, ask the user.
amp workspace identity --agent <AGENT_NAME> --model <MODEL_ID> --for "<USER_NAME> <<USER_EMAIL>>" -
L3. Make your edits and record them with a message in "VERB NOUN PHRASE" form.
amp record -m "<MESSAGE>" -
L4. Pull the latest main channel and run the repository's checks, if any exist.
amp pull origin --from <MAIN> motor piston run . <CHECK_TARGET> --team <TEAM> # run for each check target -
L5. Push your workspace channel, create a merge, and wait for it to finish.
<MERGE_ID>is.idfrom themerge createoutput.amp push origin --to <TASK> motor gauss merge create <TEAM>/<REPO> --source <TASK> --target <MAIN> --title "<MESSAGE>" --json motor gauss merge wait <TEAM>/<REPO> <MERGE_ID> -
L6. If
merge waitexits non-zero, inspect the merge:motor gauss merge show <TEAM>/<REPO> <MERGE_ID> --json # check submission.rejection and generation motor gauss merge checks <TEAM>/<REPO> <MERGE_ID> --json motor gauss invocation show <TEAM>/<REPO> <INVOCATION_ID> --json motor piston logs <RUN_ID> --team <TEAM>Fix the issue:
- Failed check: fix the code, record the change, and push (
amp push origin --to <TASK>). - Conflict: run
amp pull origin --from <MAIN>in the workspace, resolve the conflict, record the resolution, and push. - Infrastructure failure: diagnose the cause; no push is needed.
Then resubmit the merge and wait again:
motor gauss merge refresh <TEAM>/<REPO> <MERGE_ID> --expected-generation <N> motor gauss merge wait <TEAM>/<REPO> <MERGE_ID>Pushing alone doesn't resubmit a rejected merge.
- Failed check: fix the code, record the change, and push (
-
L7. Once the merge lands, clean up:
cd <REPO_DIR> amp pull origin --from <MAIN> amp workspace remove workspaces/<TASK> amp channel delete <TASK> --remote origin
1.Preparation
Your agent walks you through the plan, gets your okay, installs the Motor CLI, and confirms it can read your GitHub repo.
Instructions for your agent
1.0 [AGENT + USER] Get approval to start
- Walk the user through what this migration will do:
- Read the GitHub repository, its workflows, and the names of its secrets (never secret values).
- Create a Motor team, invite teammates, and create a Gauss repository.
- Ask the team to stop pushing to GitHub and disable the GitHub Actions workflows that are moving.
- Import the Git history and move CI and deploys to Piston.
- Update the repository's agent instructions to use Motor.
- At the end, ask the user to revoke replaced GitHub credentials and archive the GitHub repo.
- Let the user know you'll ask for their okay again before touching GitHub or production.
- If the user already approved after hearing a summary like this, move on without asking again. Otherwise ask: "Ready for me to start the migration?"
- Record their approval in the report in step 1.4.
Verify: the user approved starting the migration.
If not: stop.
1.1 [AGENT] Install Amp and the Motor CLI
-
Check whether both CLIs are installed:
amp --versionandmotor version. -
Install whichever one is missing:
curl -fsSL https://gauss.motor.dev/motor/amp/artifacts/install.sh | sh curl -fsSL https://gauss.motor.dev/motor/cli/artifacts/install.sh | sh
Verify: amp --version prints amp YYYY_MM_NNNN (for example, amp 2026_11_0001).
CAUTION: another tool is also named amp (Sourcegraph's coding agent). If amp --version
prints anything else, a different amp is earlier on PATH. Tell the user and don't continue until
Motor's amp comes first on PATH.
1.2 [AGENT] Read the guides
Run these commands and read their full output:
amp learn
motor learn
motor learn gauss
motor learn piston
NOTE: this checklist (motor learn migrate) gives the step-by-step sequence; the guides cover
the full command syntax. If they ever disagree on syntax, follow the guide.
1.3 [AGENT] Confirm you can read the GitHub repository
- Run
git ls-remote <GH_URL> HEAD. - If
ghis installed, rungh auth status.
Verify: git ls-remote prints a line with a commit hash.
If not: follow the USER ACTION below.
USER ACTION — give GitHub access
Tell the user: "I can't read
<GH_URL>. Please give this machine read access by runninggh auth loginfollowed bygh auth setup-git, or by adding an SSH key with read access to the repo. Let me know when that's set."
NOTE: gh is optional. Without it, steps 2.6, 2.9, 4.2, and 11.2 will need a few extra USER
ACTIONs.
1.4 [AGENT + USER] Set the variables
- Gather these values yourself:
<GH_URL>: the clone URL of the GitHub repository.<GH_REPO>: the GitHubowner/name.<MAIN>: the default branch, fromgit ls-remote --symref <GH_URL> HEAD.
- Ask the user for the remaining values, suggesting a sensible default for each:
| Variable | Meaning | Rule or default |
|---|---|---|
<TEAM> |
Motor team handle | 3–39 characters: lowercase letters, digits, and single underscores between words, starting with a letter. Can't be the user's personal handle (users and teams share one namespace, and personal teams can't add members). |
<REPO> |
Gauss repository name | 1–100 characters: lowercase letters, digits, and single underscores between words, starting with a letter (for example, my-app becomes my_app). |
<REPO_DIR> |
New local directory for the Amp repo | Absolute path, defaulting to ../<REPO>_motor next to the Git checkout. Must not already exist. |
<WORK_DIR> |
Scratch directory for migration files, outside the repo | Absolute path, defaulting to ../<REPO>_migration. |
<USER_NAME>, <USER_EMAIL> |
Person running the migration | — |
<ADMINS> |
Emails for team admins | At least two people. Admins manage secrets and profiles. |
<MEMBERS> |
Emails for all other teammates | — |
- Run
mkdir -p <WORK_DIR>. - Record every variable at the top of
<WORK_DIR>/report.md.
Verify: every variable in the table is filled in and follows its rule, and <REPO_DIR> and
<WORK_DIR> both start with /.
2.Inventory (read-only)
Your agent audits your workflows, secrets, and integrations without changing anything, and you decide what moves, stays, or gets dropped.
Instructions for your agent
Read only in this section—don't change anything on GitHub.
2.1 [AGENT] Mirror the GitHub repository
git clone --mirror <GH_URL> <WORK_DIR>/inventory.git
Verify: git -C <WORK_DIR>/inventory.git branch --list lists every branch from GitHub.
NOTE: a mirror also pulls GitHub's refs/pull/* refs, while the import (step 5.1) only reads
branches and tags. Use --branches --tags, not --all, in the commands below.
2.2 [AGENT] Check for submodules
git -C <WORK_DIR>/inventory.git log --branches --tags --raw --ignore-submodules=none --format= | grep -c ' 160000 ' || true
Verify: the output is 0.
If not: follow the USER ACTION below.
USER ACTION — submodules in history (BLOCKER)
Tell the user: "This repo's history includes a submodule. Amp refuses a full import if any commit ever contained a submodule, even if it was removed later. Pick one: (A) Rewrite the history without the submodule (for example, with
git filter-repo) and import the rewritten copy. (B) Import a snapshot of the current files without history, leaving GitHub as the archive of the old history. (C) Stop the migration."
Record the user's choice in the report. You'll execute it in step 5.1, after the freeze, so the import captures the final commits.
2.3 [AGENT] Check for Git LFS
git -C <WORK_DIR>/inventory.git log --branches --tags -p -- '*.gitattributes' | grep -c 'filter=lfs' || true
If the output is greater than 0, the repository uses Git LFS:
- Note in the report that the repo uses Git LFS.
- Run
git lfs version. Ifgit lfsisn't installed, install it or ask the user to.
NOTE: the import brings each LFS file across with its real contents from a local mirror that has the LFS objects. Step 5.1 clones that copy and fetches the objects from GitHub after the freeze.
Verify: the output is 0, or the report notes Git LFS and git lfs version succeeds.
2.4 [AGENT] Record history size
du -sh <WORK_DIR>/inventory.git
git -C <WORK_DIR>/inventory.git rev-list --branches --tags --count
Record both numbers in the report.
2.5 [AGENT] Inventory workflows
- Read every file in
.github/workflows/on<MAIN>, plus any local actions in.github/actions/. - Add a row to a table in the report for each job: file, job name, triggers (
on:),pathsandpaths-ignorefilters,runs-on,services:, matrix,secrets.*names,vars.*names,environment:, anduses:actions. - Classify each job (if a job has multiple triggers, list every class that applies):
| Class | Trigger | Equivalent on Motor |
|---|---|---|
| CHECK | pull_request, merge_group, or push to non-<MAIN> branches |
A Piston task, a merge.candidate_updated hook, and a required check |
| POST-LAND | push to <MAIN> |
A channel.updated hook |
| RELEASE | tag push, release |
A tag.created hook |
| MANUAL | workflow_dispatch |
A hook triggered manually with motor gauss hook invoke (see step 8.4) |
| SCHEDULED | schedule |
A schedule hook (step 8.4), if the user chooses to move it in step 2.10 |
| UNSUPPORTED | runs-on macOS, or a self-hosted runner |
No equivalent. See step 2.10. |
2.6 [AGENT] Inventory secrets and variables
Collect names only—never values.
gh secret list --repo <GH_REPO>
gh variable list --repo <GH_REPO>
gh api repos/<GH_REPO>/environments --jq '.environments[].name'
For each environment, list its secret and variable names too
(gh secret list --env <ENV> --repo <GH_REPO>).
Cross-check those lists against secrets. and vars. in the workflow files. Anything referenced in
a workflow but missing from the lists is usually an organization-level secret or variable—include it.
If gh isn't available, pull the names straight from secrets. and vars. in the workflow files.
Add a table to the report with each name, its environment (if any), and the jobs that use it.
2.7 [AGENT] Find tools that depend on Git
Amp repositories don't have a .git directory, so anything calling git will fail.
- In a checkout of
<MAIN>, search for:git describe,git rev-parse,git log,git diff,git status,git ls-fileshusky,lint-staged,pre-commit,simple-git-hookssemantic-release,changesets,setuptools_scm,standard-version--changedSince,--onlyChanged,nx affected,turbofilters with[HEADdanger
- Check
package.json,Makefile,*.mk,justfile,Taskfile*, script directories, build configs, and.github/. - For each match, log the file, line, and proposed replacement in the report (using
amp status --json,amp log --json, or the Piston run's source state—see step 8.4).
2.8 [AGENT] Find agent instruction files
Search the repo for AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, .cursor/rules/*,
.github/copilot-instructions.md, CONTRIBUTING.md, and any agent command or skill files (such as
.claude/commands/*).
Inside each file, locate anything referencing Git or GitHub: git , gh , pull request, PR,
branch, commit, rebase, squash, GitHub Actions, .github/, CI, and conventional-commit
rules.
Log each file and line in the report so you can update them in section 10.
2.9 [AGENT] Inventory integrations
gh api repos/<GH_REPO>/hooks --jq '.[].config.url'
Also note any external services mentioned in workflows or the README, like Vercel, Netlify, Codecov,
Sentry, Renovate, Dependabot (.github/dependabot.yml), Linear, or Jira.
Record every integration in the report.
2.10 [USER ACTION] Review the inventory and confirm decisions
USER ACTION — approve the inventory
Tell the user: "The inventory is ready in
<WORK_DIR>/report.md." Then walk them through:
- Any blockers from 2.2 and 2.3 and how they'll be handled.
- Each SCHEDULED job and its cron schedule. Explain that it can become a
schedulehook on<MAIN>(Gauss uses UTC like GitHub; schedules must be at least 5 minutes apart, and Sunday is0, not7). For each one, ask whether to: (A) move it to aschedulehook, (B) keep it on GitHub Actions, or (C) turn it off.- Each UNSUPPORTED job: (A) keep it on GitHub Actions, or (B) turn it off.
- Each integration: (A) replace it with a Motor hook or webhook, (B) keep it on GitHub, or (C) remove it.
- Issues, Projects, Discussions, and the Wiki (Motor doesn't include them): (A) keep them on GitHub, or (B) move them to another tool.
- Ask: "Are you good with moving ahead with the changes in the next sections?"
CAUTION: after the freeze (section 4), GitHub stops receiving new code, and Motor doesn't mirror changes back. Any job or integration left on GitHub sees only the frozen code.
- Before keeping any job or integration on GitHub, check whether it reads the repository's code (building, testing, scanning, or deploying it).
- If it doesn't touch the code (for example, it only pings an external service), keeping it is fine.
- If it does use the code, warn the user: "
<JOB>will only ever see the frozen code from before the migration. It won't test or deploy anything new that lands on Motor." Only keep it if the user explicitly signs off on that exception; otherwise pick another option. - Log every kept item in the report with
uses code: yesoruses code: no, and record the user's exception approval for everyyes.
Verify: the report has a decision for every item, every kept item that uses the code has an explicit exception sign-off, and the user approved moving ahead.
3.Motor account and team
You sign in and create a Motor team if needed, then your agent invites your teammates.
Instructions for your agent
3.1 [USER ACTION] Sign up for Motor
USER ACTION — sign up
Tell the user: "Sign up at https://www.motor.dev: sign in with Google, add a passkey, pick your personal handle, and add a payment card for your personal team. Let me know when you're done (or if you already have an account)."
3.2 [AGENT + USER] Sign in on this machine
- Run
motor auth status --json. - If there's already an active credential, move on to step 3.3.
- Otherwise, tell the user: "I'm running
motor authnow—please approve the sign-in in your browser." Then runmotor auth. On a headless machine, runmotor auth --deviceand give the user the code.
Verify: motor auth status --json shows an active credential for <USER_EMAIL>, along with a
gauss credential.
NOTE: motor auth also sets up a device credential for Amp to talk to Gauss, so Amp doesn't
need a separate token.
3.3 [AGENT] Check for the team
Run motor teams list --json.
- If
<TEAM>is listed,personalisfalse, and your role isadmin, skip ahead to step 3.5. - If
<TEAM>is listed andpersonalistrue, stop and explain that personal teams can't add other members. Go back to step 1.4 and pick a different<TEAM>. - If
<TEAM>is listed and your role isn'tadmin, stop and explain that a<TEAM>admin needs to run the migration (or promote the user to admin). - If
<TEAM>isn't listed, continue to step 3.4.
3.4 [USER ACTION] Create the team
USER ACTION — create the team
Tell the user: "Create the team in the console at https://www.motor.dev/console/teams/new using the handle
<TEAM>, and add a payment card (Motor creates the team once the card is verified). Let me know when it's ready."
Verify: motor teams show <TEAM> --json succeeds and reports your role as admin.
3.5 [AGENT] Invite the team
-
Run
motor members list --team <TEAM> --json. Skip<USER_EMAIL>and anyone who's already a member. -
For each remaining email in
<ADMINS>:motor invites create --team <TEAM> --email <EMAIL> --role admin -
For each remaining email in
<MEMBERS>:motor invites create --team <TEAM> --email <EMAIL> --role member
Verify: motor invites list --team <TEAM> --json shows an open invite for everyone you invited.
NOTE: invites expire after 7 days. Sending a new invite to the same email replaces the previous one.
3.6 [USER ACTION] Have the team accept their invites
USER ACTION — team onboarding
Tell the user: "Everyone on the team should have an invite email from Motor. Send them Appendix A of this checklist (https://www.motor.dev/docs/migrate#appendix_a_setup_for_each_team_member) so they can accept the invite and set up each computer they use. They can do that in parallel while I keep going." Also hand the user the
<TEAM>,<REPO>, and<MAIN>values to include.
Don't wait for everyone to accept—move right on to section 4. You'll check team membership in step 12.1.
4.Freeze GitHub
Your team stops pushing to GitHub. With your okay, your agent disables the GitHub Actions workflows that are moving to Piston.
Instructions for your agent
4.1 [USER ACTION] Pause pushes to GitHub
WARNING: the import in step 5.1 is a one-time snapshot of GitHub. Commits pushed to GitHub after the import won't make it to Motor.
USER ACTION — freeze GitHub
Tell the user: "Ask the team to push any branches they want to keep, then stop pushing to
<GH_REPO>. Every branch on<GH_REPO>comes across as an Amp channel, though fork PRs, PR descriptions, and review comments don't transfer. Let me know once everyone has paused."
4.2 [AGENT + USER] Disable GitHub Actions workflows
WARNING: leaving GitHub Actions enabled risks having both GitHub and Motor deploy at the same time.
-
List the workflows staying on GitHub—only the SCHEDULED and UNSUPPORTED jobs the user chose to keep on GitHub Actions in step 2.10.
-
Ask the user: "I'm going to disable every workflow on
<GH_REPO>except:<LIST>. Good to go?" -
Once approved, disable all the other workflows:
gh workflow list --repo <GH_REPO> gh workflow disable "<WORKFLOW_NAME>" --repo <GH_REPO> -
If
ghisn't available, ask the user to disable those workflows in the repo's GitHub settings.
Verify: gh workflow list --repo <GH_REPO> --all shows every workflow not on the keep list as
disabled_manually.
5.Import the history
Your agent imports your Git history into Amp and flags anything that couldn't be imported.
Instructions for your agent
5.1 [AGENT] Run the import
CAUTION: imports only work into an empty repository and can't resume after an interruption. If
an import is interrupted, delete <REPO_DIR> and start this step over. If it fails with
import_lfs_missing or import_lfs_bad, nothing was imported—see If not below.
-
Refresh your local mirror so it has GitHub's final state (step 6.5 uses it):
git -C <WORK_DIR>/inventory.git remote update --prune -
Pick the import source. Normally
<SOURCE>is<GH_URL>, which brings across every branch on GitHub. If the repo uses Git LFS (step 2.3) or needs a history rewrite (step 2.2), clone a separate working mirror, fetch its LFS objects, and modify that copy instead of touchinginventory.git:git clone --mirror <GH_URL> <WORK_DIR>/source.git git -C <WORK_DIR>/source.git lfs fetch --all # Git LFS onlyIf you're rewriting history, run the user-approved command in
<WORK_DIR>/source.git, then set<SOURCE>to<WORK_DIR>/source.git. If the user chose option (B) in step 2.2, confirm with them how they want the snapshot created. -
Run the import. Initialize Amp with
<MAIN>so history lands on the right default channel:mkdir <REPO_DIR> cd <REPO_DIR> amp init --channel <MAIN> amp import git --verify <SOURCE> --json > <WORK_DIR>/import.json
Keep import.json in <WORK_DIR>, not <REPO_DIR>, so Amp doesn't track it.
Verify:
- The command exits
0. jq '.commits, .changes' <WORK_DIR>/import.jsonprints two numbers greater than0.jq '.channels | keys' <WORK_DIR>/import.jsonincludes every branch from step 2.1.amp status --jsonshows you're on channel<MAIN>.- If the repo uses Git LFS,
jq '.lfs.files' <WORK_DIR>/import.jsonis greater than0.
If not: if the error code is import_lfs_missing, some LFS objects are missing from
<WORK_DIR>/source.git. Run git -C <WORK_DIR>/source.git lfs fetch --all again and retry the
import in the same <REPO_DIR> (the failed run didn't import anything). If objects are still
missing—for instance, because nobody ever uploaded them to GitHub—tell the user which files are
affected and offer two options: re-run with --lfs=pointers (which keeps those files as small
pointer files and records them in .lost and .lfs.pointers), or stop. Log their choice in the
report. If the error code is import_lfs_bad, an LFS object doesn't match its pointer or uses an
unsupported Git LFS extension: report the error to the user and stop.
5.2 [AGENT] Log what didn't transfer
- Inspect
.lostand.tagsin<WORK_DIR>/import.json. - Record anything that couldn't be imported in the report—for example, commit or tag signatures, empty commits, or tags that don't point to a commit.
- Share that summary with the user as an FYI, then keep moving.
6.Create the Gauss repository
Your agent creates the Gauss repository, lands your history and branches, and verifies the import.
Instructions for your agent
6.1 [AGENT] Create the repo and grant team access
motor gauss repo create --team <TEAM> --name <REPO> --main-channel <MAIN> --json
motor gauss repo access set <TEAM>/<REPO> --team-scopes read,write
CAUTION: new repositories don't grant team access automatically. Without the second command, non-admin teammates will get a 404.
Verify: motor gauss repo access show <TEAM>/<REPO> --json shows team scopes read and
write.
6.2 [AGENT] Connect the local repo and initialize agent instructions
cd <REPO_DIR>
amp remote add origin https://gauss.motor.dev/<TEAM>/<REPO> --channel <MAIN>
motor init
motor init inserts a Motor section between <!-- motor:start --> and <!-- motor:end --> in
AGENTS.md (creating the file if needed), adds /workspaces/ to .ampignore, and records those
edits on <MAIN>. It works offline without signing in.
Verify:
grep -c 'motor:start' AGENTS.mdprints1.grep -c '<TEAM>/<REPO>' AGENTS.mdprints at least1.amp status --jsonshows a clean workspace.
6.3 [AGENT] Land the history
The main channel only accepts changes through a merge. Since no required checks exist yet, this initial merge lands right away.
amp push origin --channel <MAIN> --to import --tags --json > <WORK_DIR>/push_main.json
motor gauss merge create <TEAM>/<REPO> --source import --target <MAIN> --title "Import the Git history" --json
motor gauss merge wait <TEAM>/<REPO> <MERGE_ID>
amp channel delete import --remote origin
Verify: merge wait exits 0.
6.4 [AGENT] Push the remaining channels
Save each push's JSON output in <WORK_DIR>:
for ch in $(amp channel list --json | jq -r '.channels[].name' | grep -vx '<MAIN>'); do
amp push origin --channel "$ch" --to "$ch" --tags --json > "<WORK_DIR>/push_$(echo "$ch" | tr / _).json"
done
Verify: neither <WORK_DIR>/push_main.json nor any other push output contains tag_errors,
and every tag in import.json's .tags appears in .tags of one of those outputs.
If not: log any missing tags in the report and let the user know.
6.5 [AGENT] Verify the import
-
Clone the new Gauss repo into a temporary directory:
amp clone https://gauss.motor.dev/<TEAM>/<REPO> <WORK_DIR>/check_clone --channel <MAIN> -
Pick
<MAIN>and two other branches. For each branch, let<BRANCH>be its name and<NAME>be its name with/replaced by_. Grab the Git commit hash:git -C <WORK_DIR>/inventory.git rev-parse <BRANCH> # this is <GIT_SHA>If you imported from
<WORK_DIR>/source.gitin step 5.1, usesource.gitinstead ofinventory.githere and in step 3. -
For each branch, diff the imported files against Git:
cd <REPO_DIR> amp import map <GIT_SHA> --json # read .state: this is <STATE> amp export state:<STATE> <WORK_DIR>/export_<NAME> mkdir <WORK_DIR>/git_<NAME> git -C <WORK_DIR>/inventory.git archive <GIT_SHA> | tar -x -C <WORK_DIR>/git_<NAME>If the repo uses Git LFS (step 2.3), hydrate the LFS files in
git_<NAME>fromsource.git. First, write out any OIDs the user accepted as pointers in step 5.1 (this file stays empty if there were none):jq -r '.lfs.pointers[]?.oid' <WORK_DIR>/import.json > <WORK_DIR>/lfs_acceptedThen, for each branch:
tree=<WORK_DIR>/git_<NAME> store=<WORK_DIR>/source.git/lfs/objects accepted=<WORK_DIR>/lfs_accepted find "$tree" -type f -size -1024c | sort | while IFS= read -r f; do head -1 "$f" | grep -qx 'version https://git-lfs.github.com/spec/v1' || continue oid=$(sed -n 's/^oid sha256://p' "$f"); size=$(sed -n 's/^size //p' "$f") obj="$store/$(echo "$oid" | cut -c1-2)/$(echo "$oid" | cut -c3-4)/$oid" if [ ! -f "$obj" ]; then if grep -qx "$oid" "$accepted"; then echo "kept pointer: $f"; continue; fi echo "missing LFS object: $f"; exit 1 fi sum=$( (sha256sum "$obj" 2>/dev/null || shasum -a 256 "$obj") | cut -d' ' -f1) if [ "$sum" != "$oid" ] || [ "$(wc -c < "$obj" | tr -d ' ')" != "$size" ]; then echo "bad LFS object: $f"; exit 1 fi cp "$obj" "$f" doneEvery LFS file now holds the verified contents GitHub served, while any accepted pointers stay as pointers to match the import. Now diff the two trees:
diff -r <WORK_DIR>/git_<NAME> <WORK_DIR>/export_<NAME> -
Diff what's on Gauss against Git for
<MAIN>(using<NAME>from step 2):amp -C <WORK_DIR>/check_clone export channel:<MAIN> <WORK_DIR>/export_gauss diff -r <WORK_DIR>/git_<NAME> <WORK_DIR>/export_gauss
Verify:
- The clone succeeds.
- If the repo uses Git LFS, the hydration loop in step 3 exits
0for every branch. - Every
diffin step 3 comes back empty. - The
diffin step 4 shows differences only inAGENTS.mdand.ampignore.
NOTE: git archive skips files marked export-ignore in .gitattributes, so a difference in
those files is expected.
7.Move CI to Piston
Your agent converts each CI check to a Piston task, gets it passing, and makes it required on every merge.
Instructions for your agent
7.1 [AGENT] Write the check tasks
- Create a workspace for this work (LAND procedure, steps L1 and L2) with the task name
piston-checks. - Add
piston.starat the repository root with one task per CHECK job from step 2.5, using Appendix B to translate each piece of the workflow. - Update any tools from step 2.7 that those checks rely on so they no longer require Git.
Example piston.star for a Node project with Postgres:
load("@piston//debian.star", "apt")
load("@piston//postgres.star", "postgres_configure", "postgres_start")
NODE = image("node:22-bookworm")
def node_pg(v):
return layer(image("node:%s-bookworm" % v), name = "node%s_pg" % v, steps = [
apt(["postgresql"]),
postgres_configure(trust_local = True),
])
lint = task(
name = "lint",
image = NODE,
cpu = 4,
caches = {"/root/.npm": "npm"},
steps = [sh("npm ci"), sh("npm run lint")],
timeout = "15m",
)
tests = [
task(
name = "test_node%s" % v,
image = node_pg(v),
cpu = 8,
caches = {"/root/.npm": "npm_%s" % v},
env = {"DATABASE_URL": "postgres://postgres@127.0.0.1:5432/postgres"},
steps = [
postgres_start(),
sh("npm ci"),
sh("npm test -- --reporters=default --reporters=jest-junit", report = junit("junit.xml")),
],
)
for v in ["22"]
]
NOTE: a task only receives the secrets it explicitly declares. Checks can only use repository secrets (see section 8)—never give a check a production credential.
7.2 [AGENT] Get each check passing
For each check task:
motor piston check . --json
motor piston plan . <TARGET> --json
motor piston run . <TARGET> --team <TEAM>
If a task fails, inspect motor piston logs <RUN_ID> --team <TEAM>, fix the issue, and re-run.
If a check needs a secret that isn't configured yet, run step 8.3 for that secret and then come back here.
Verify: every check task passes against the current <MAIN>.
If not: if a task still fails after three tries, stop and share the task name, error, and what you've tried with the user.
7.3 [AGENT] Declare the check hooks
Create .gauss/hooks.star with one hook per check task:
hook(
name = "lint",
check = "lint",
events = ["merge.candidate_updated"],
channels = ["<MAIN>"],
action = piston(config = "piston.star", targets = ["lint"]),
)
If the original pull_request trigger used paths or paths-ignore, carry those patterns over to
paths or paths_ignore (see Appendix B). When a merge doesn't touch any matching path, Gauss
marks the required check skipped, which won't block the merge.
Validate the file:
motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event merge.candidate_updated --event-channel <MAIN>
For each hook with paths or paths_ignore, validate it with one path that should match and one
that shouldn't:
motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event merge.candidate_updated --event-channel <MAIN> --event-path <PATH>
Verify: hook validate exits 0 with no errors and matches every check hook. Path-filtered
hooks match the paths they should and skip the ones they shouldn't.
7.4 [AGENT] Land the checks
-
Land the change (LAND procedure, steps L3–L7) with the message
"Run the checks on Piston". -
List the merge's checks:
motor gauss merge checks <TEAM>/<REPO> <MERGE_ID> --json. -
Because no checks are required yet, the merge may land before they finish. Wait for every check invocation to complete:
motor gauss invocation wait <TEAM>/<REPO> <INVOCATION_ID>
Verify: the merge lands and every invocation wait exits 0.
7.5 [AGENT] Require the checks on <MAIN>
-
Fetch the current policy revision (
revisionis0if no policy exists yet):motor gauss policy show <TEAM>/<REPO> <MAIN> --json -
Set the policy, passing
--requireonce for each check (using each hook'scheckname). Everypolicy setcall replaces the entire list:motor gauss policy set <TEAM>/<REPO> <MAIN> --revision <REV> --require lint --require test_node22 --forbid-direct-pushes
Verify: motor gauss policy show <TEAM>/<REPO> <MAIN> --json lists every required check and
forbids direct pushes.
7.6 [AGENT] Confirm a failing check blocks a merge
-
Create a workspace named
check-the-queue. -
Add a test that always fails, record it, push it, and open a merge (LAND procedure, steps L3–L5).
-
Confirm that
merge waitexits non-zero and the merge status isrejected. -
Close the merge and clean up the workspace and channel:
motor gauss merge close <TEAM>/<REPO> <MERGE_ID> --reason "Test of the merge queue" cd <REPO_DIR> amp workspace remove workspaces/check-the-queue --delete-channel amp channel delete check-the-queue --remote origin
Verify: the merge was rejected and <MAIN> doesn't contain the failing test.
8.Secrets, deploys, and releases
You enter your secret values directly. Your agent writes the deploy and release tasks and turns on deploys once you approve.
Instructions for your agent
Only run the parts of this section that apply to this repo:
| What steps 2.5 and 2.6 found | Steps to run |
|---|---|
| POST-LAND, RELEASE, or MANUAL jobs, or SCHEDULED jobs moving to Motor (with or without secrets) | 8.1 through 8.6 |
| Secrets only, none of those jobs | 8.1 and 8.3. Skip 8.2, 8.4, 8.5, and 8.6. |
| Neither secrets nor those jobs | None—jump straight to section 9. |
In this section, "deploy hook" refers to any hook for a POST-LAND, RELEASE, or MANUAL job, or a
SCHEDULED job the user chose to move to a schedule hook in step 2.10.
8.1 [AGENT] Categorize secrets
Assign a destination to every secret from step 2.6 and log it in the report:
| Used by | Destination | Who can read it |
|---|---|---|
| A CHECK job (safe for tests) | Repository secret | Any writer running motor piston run, plus any hook run for a task without a profile (including checks) |
| A deploy, release, or publish job | Profile secret (for example, profile production) |
Only tasks using that profile, triggered by a hook whose piston(profile = ...) names it, for an event and channel or tag allowed by the profile's rules |
| AWS access keys for deploys | Don't migrate. Use a profile's AWS IAM role instead (step 8.2). | — |
| Multiple repositories in the team | A repository or profile secret in each repo that needs it | Same as above. Hook runs never receive team secrets (motor piston secrets). |
WARNING: anyone with write access to the repo can trigger a run that reads repository secrets.
A profile isolates its secrets from checks and motor piston run, but not from someone who can
land changes to <MAIN> (since deploys execute the landed piston.star). Only grant write access
to people you trust with production.
NOTE: a task with a profile only receives that profile's secrets. If it also needs a repository
secret, inherit it onto the profile with --inherit (step 8.3).
8.2 [AGENT + USER] Create profiles
Profiles take the place of GitHub environments:
- Create one profile for each GitHub environment used by a POST-LAND, RELEASE, or MANUAL job, or a SCHEDULED job moving to Motor.
- For a deploy or release that didn't use a GitHub environment, create a profile such as
productionorrelease. Create a profile for each MANUAL job as well. - A SCHEDULED job that doesn't deploy and doesn't need environment secrets (like a nightly test) doesn't need a profile.
The examples below use production—repeat for each profile.
-
Create the profile (pass
--aws-roleonly if the deploy talks to AWS):motor profiles set production --aws-role arn:aws:iam::<ACCOUNT_ID>:role/<ROLE> --repo <TEAM>/<REPO> -
Leave the profile without rules for now; you'll bind them in step 8.6.
-
If the profile has an AWS role, fetch the OIDC trust data and follow the USER ACTION below:
motor profiles oidc production --repo <TEAM>/<REPO> --json
USER ACTION — AWS trust
Tell the user: "In AWS IAM, do two things:
- Once per AWS account, register Gauss as an OIDC identity provider:
aws iam create-open-id-connect-provider --url <ISSUER> --client-id-list <AUDIENCE>.- Attach this trust policy to
<ROLE>:" (pastetrust_policyfrommotor profiles oidc). "Once that's in place, deploys won't need the old AWS access keys from GitHub anymore. Let me know when it's set up."
Verify: motor profiles show production --repo <TEAM>/<REPO> --json shows the profile with no
rules yet.
NOTE: until a profile has rules, any run targeting that profile is blocked before the task starts.
8.3 [USER ACTION] Enter secret values
Only a team admin can set secrets, and only a human enters the values.
USER ACTION — set secrets
Tell the user: "Run these commands in your own terminal. Each one prompts for the secret value without echoing it, so I never see it." Then list the exact commands to run, for example:
motor secrets set npm_token --repo <TEAM>/<REPO> motor secrets set vercel_token --profile production --repo <TEAM>/<REPO>
Secret names use lowercase letters, digits, and underscores, starting with a letter. To share a
repository secret with a profile, have the user run
motor secrets set <NAME> --profile production --inherit --repo <TEAM>/<REPO>.
Verify:
motor secrets list --repo <TEAM>/<REPO> --json
motor secrets list --profile production --repo <TEAM>/<REPO> --json # for each profile only
motor piston plan --credentials . --json
- Every expected secret name appears in the lists.
plan --credentialsreportsokastrue. Because the check tasks from section 7 don't use a profile, each of their secrets showssourcerepository.
If you're skipping step 8.4, move on to section 9.
8.4 [AGENT] Write the deploy and release tasks
-
Create a workspace named
deploys. -
In
piston.star, add a task for every POST-LAND, RELEASE, and MANUAL job, plus any SCHEDULED job moving to Motor. Give every task that deploys or uses environment secrets aprofile(step 8.2), and give any task that mutates a shared resource (like a deploy) aconcurrencygroup so two runs don't collide. A nightly test with no environment secrets and no shared state needs neither. Read the exact source state from Piston's context instead of Git:_ctx = context() STATE = _ctx.amp.state if _ctx.amp != None and _ctx.amp.state != None else "" deploy_production = task( name = "deploy_production", image = image("<IMAGE_WITH_DEPLOY_TOOLS>"), profile = "production", concurrency = "production/<SERVICE>", env = {"SOURCE_STATE": STATE}, secrets = {"VERCEL_TOKEN": secret("vercel_token")}, steps = [ sh('[ -n "$SOURCE_STATE" ] || { echo "Start this task from a Gauss hook."; exit 1; }'), sh("./scripts/deploy.sh"), ], timeout = "30m", ) -
For a GitHub release, define an
artifact()target (seemotor learn pistonfor syntax). -
Add a matching hook in
.gauss/hooks.starfor each task (every hook must specify an event; only add the hook types step 2.5 found):-
POST-LAND:
hook( name = "deploy_production", events = ["channel.updated"], channels = ["<MAIN>"], action = piston(config = "piston.star", targets = ["deploy_production"], profile = "production"), )If the original
pushtrigger usedpathsorpaths-ignore, carry those patterns over topathsorpaths_ignore(see Appendix B). -
RELEASE (don't set
channelson a tag hook):hook( name = "release", events = ["tag.created"], tags = ["v*"], action = piston(config = "piston.star", targets = ["release"], profile = "release"), ) -
MANUAL: triggered on demand with
motor gauss hook invoke. Because every hook still requires an event, useevents = ["tag.created"]andtags = ["manual/<HOOK>"], and never create a tag with that name. -
SCHEDULED: copy the cron expressions from
on: schedule. Use exact channel names inchannels(no wildcards), and includeprofileonly if the task uses one:hook( name = "nightly", events = ["schedule"], schedules = ["<CRON>"], channels = ["<MAIN>"], action = piston(config = "piston.star", targets = ["nightly"]), )
-
-
Validate
.gauss/hooks.staronce per hook type you added:# POST-LAND motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event channel.updated --event-channel <MAIN> # POST-LAND with paths or paths_ignore (test one path that should match and one that shouldn't) motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event channel.updated --event-channel <MAIN> --event-path <PATH> # RELEASE motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event tag.created --event-tag v1.0.0 # MANUAL motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event tag.created --event-tag manual/<HOOK> # SCHEDULED (once per cron expression) motor gauss hook validate <TEAM>/<REPO> --dir .gauss --event schedule --event-channel <MAIN> --event-schedule "<CRON>" -
Verify credentials across all tasks:
motor piston plan --credentials . --json.
Verify:
- Every
hook validatecall passes with no errors. - Every deploy hook you added shows up as matched in one of the
hook validateruns. plan --credentialsreportsok: true, andhook_only_taskslists every profiled task.- Secrets on profiled tasks show
sourceownedorinherit; secrets on unprofiled tasks (like checks) showsourcerepository.
8.5 [AGENT] Land the deploy hooks
- Land the change (LAND procedure, steps L3–L7) with the message
"Deploy from Gauss hooks". - Because the profiles have no rules yet, profiled hooks won't deploy—their invocations will fail saying the profile doesn't allow the event. That's expected.
- Any
schedulehook whose task doesn't use a profile goes live immediately after landing: Gauss registers its cron schedule and runs it at the next scheduled time. If scheduled times are ever missed (for example during an outage or repository hold), Gauss runs once for the first missed slot and then picks back up at the next future time. Let the user know.
Verify: the merge lands.
8.6 [AGENT + USER] Enable deploys
WARNING: once you bind rules in this step, deploy hooks go live. If you have a POST-LAND hook,
every merge to <MAIN> will deploy to production—including the merge in step 10.2.
-
List the hooks you're about to turn on and what each one does, then ask: "Good to turn these on?"
-
Once approved, bind the matching rules to each profile (hooks without a profile don't need rules):
Hook Rules POST-LAND --event channel.updated --pattern <MAIN>and--event request --pattern <MAIN>RELEASE --event tag.created --pattern 'v*'and--event request --pattern 'v*'MANUAL --event request --pattern <MAIN>SCHEDULED --event schedule --pattern <MAIN>and--event request --pattern <MAIN>motor profiles bind production --event channel.updated --pattern <MAIN> --repo <TEAM>/<REPO> motor profiles bind production --event request --pattern <MAIN> --repo <TEAM>/<REPO> -
Ask the user which deploy hook (if any) they'd like to trigger manually as a test (a
schedulehook works too, with or without a profile). If they want to skip a live test for now, note that in the report and move on to section 9. -
Trigger the chosen hook and wait for it (
<HOOK>is the hook name, and<INVOCATION_ID>isinvocation.idfromhook invoke). For a RELEASE hook, pass--tag <TAG>with an existing tag from the user instead of--channel <MAIN>:motor gauss hook invoke <TEAM>/<REPO> <HOOK> --channel <MAIN> --json motor gauss invocation wait <TEAM>/<REPO> <INVOCATION_ID>
Verify: motor profiles show <PROFILE> --repo <TEAM>/<REPO> --json lists the bound rules for
each profile. If you ran a test hook, invocation wait exited 0 and you asked the user to check
production.
If not: unbind the rules (motor profiles unbind … with the same flags), inspect the logs
(step L6), and report back to the user.
9.Notifications
Your agent connects Slack with your help, and you create any webhooks replacing other integrations.
Instructions for your agent
The signed-in user must be a team admin to run these commands.
9.1 [AGENT + USER] Connect Slack
Only run this step if the team uses Slack; otherwise skip to step 9.2.
- Run
motor slack install-link --team <TEAM>. - Follow the USER ACTION below.
USER ACTION — install the Slack app
Tell the user: "Send this link to someone who can install apps in your Slack workspace:
<LINK>. It's single-use and valid for 7 days. Let me know once the app is installed."
-
Once
motor slack workspaces --team <TEAM>lists the workspace, ask the user which channel to post to and subscribe it:motor slack subscribe --team <TEAM> --create-channel <SLACK_CHANNEL> --repository <TEAM>/<REPO>Without
--event, the channel gets the default Slack events: landings on<MAIN>, merges opened or rejected, releases published or deleted, and jobs started, succeeded, or failed (including errors and timeouts). Runmotor slack eventsto list all event types. Passing--repositoryscopes the subscription to that repo.
Verify: motor webhooks list --team <TEAM> --json includes a slack_app webhook.
9.2 [USER ACTION] Replace integrations with webhooks
For every integration the user chose to replace in step 2.10, draft the webhook command. Because
motor webhooks create prints the webhook's signing secret once, a human has to run it (R6).
USER ACTION — create webhooks
Tell the user: "Run these commands in your own terminal. Each one prints a signing secret once, which you'll paste into the receiving service." Then list the exact commands, for example:
motor webhooks create --team <TEAM> --to https://<RECEIVER_URL> --event gauss.merge.rejected --repository <TEAM>/<REPO>
Verify: motor webhooks list --team <TEAM> --json lists every webhook.
10.Agent instructions
Your agent updates your repo's agent instructions for Motor, and you test the workflow in a fresh session.
Instructions for your agent
10.1 [AGENT] Replace Git and GitHub instructions
-
Create a workspace named
motor-agent-instructions. -
Update every file from step 2.8 to use the Motor workflow:
- "branch" becomes "channel"; "commit" becomes "record a change" (
amp record). - "pull request" becomes "merge" (
motor gauss merge create, thenmerge wait). - "CI" or "GitHub Actions" becomes "Piston checks" (
motor piston run . <TARGET>). - Remove
gitandghcommands, along with commit-message rules that conflict with the Motor section.
- "branch" becomes "channel"; "commit" becomes "record a change" (
-
Don't edit anything between
<!-- motor:start -->and<!-- motor:end -->—motor initmanages that block. -
If
CLAUDE.mdexists, update it the same way and add this line if it isn't already there:Follow the "Performing work" section in
AGENTS.mdfor version control, checks, and landing work.Don't duplicate the Motor section in
CLAUDE.md, and don't create a newCLAUDE.md(Claude Code already readsAGENTS.md). -
Update the other instruction files from step 2.8 (
GEMINI.md,.cursor/rules/*, agent commands and skills,CONTRIBUTING.md). -
Update any remaining Git-dependent tools from step 2.7 that weren't covered by checks.
-
Delete
.github/workflows/and.github/copilot-instructions.md, keeping any workflows the user chose to leave on GitHub in step 2.10. Delete.github/dependabot.yml, and remove.github/altogether if it's now empty.
Verify:
grep -rnE 'git (commit|push|checkout|switch|rebase|merge)|gh pr|pull request|GitHub Actions' \
--include='*.md' --include='*.mdc' --include='.cursorrules' . | grep -v '^./workspaces/'
No active instructions to use Git or GitHub remain (historical mentions like "this project moved from GitHub" are fine).
10.2 [AGENT] Land the updated instructions
Land the change (LAND procedure, steps L3–L7) with the message "Use Motor in the agent instructions".
Verify: the merge lands and every required check passes.
10.3 [USER ACTION] Smoke-test the workflow in a fresh session
-
Configure your default human attribution on this machine so Amp stamps
on_behalf_ofon every change:amp config set author.for "<USER_NAME> <<USER_EMAIL>>" -
Follow the USER ACTION below.
USER ACTION — smoke test
Tell the user: "Start a fresh session of each coding agent your team uses inside
<REPO_DIR>and give it this prompt:Read the project instructions. Fix one small thing in this repository (like a typo in a comment) and land it on
<MAIN>.Let me know once each session finishes."
Verify: for each session, confirm:
amp log -n 5 --jsonshows the change withauthor.name,author.model, andon_behalf_of.motor gauss merge list <TEAM>/<REPO> --status merged --jsonshows the merge.amp workspace list --jsonshows no leftover workspace from that session.amp channel list --jsonshows no leftover local channel from that session.
If not: figure out which instruction the agent missed, tighten the instruction file, land the fix, and have the user run the smoke test again.
11.Retire GitHub
Your agent categorizes your GitHub credentials so you can revoke anything replaced or unused, then archive the GitHub repo if nothing still depends on it.
Instructions for your agent
11.1 [AGENT] Categorize GitHub credentials
WARNING: if someone copied the same credential to both GitHub and Motor (step 8.3), revoking it upstream will break Motor checks, deploys, or releases that depend on it.
- Gather every credential tied to the GitHub repo:
- Every GitHub secret from step 2.6 and its upstream source (for example, a cloud console or npm token).
- Every AWS access key replaced by a profile IAM role in step 8.2.
- Every deploy key:
gh api repos/<GH_REPO>/keys --jq '.[].title'. - Every AWS role trusting GitHub OIDC.
- Every webhook from step 2.9.
- Assign each credential a status and log it in the report:
| Status | When it applies | What the user does |
|---|---|---|
| KEEP-GITHUB | Still used by a job or integration left on GitHub (step 2.10) | Keep it active. |
| SHARED | Motor uses the exact same credential (entered in step 8.3) | Don't revoke it yet. Rotate it first (below). |
| REPLACED | Motor uses a different credential for the same work (such as a profile's AWS role instead of static keys), and that work has already passed on Motor | Revoke it. |
| UNUSED | Nothing uses it anymore | Revoke it. |
- Only mark a credential REPLACED after its Motor equivalent has actually passed (a check in step 7.4 or a deploy in step 8.6). Otherwise mark it SHARED or KEEP-GITHUB and flag it for the user.
Rotating a SHARED credential: have the user mint a fresh credential upstream and save it in
Motor (motor secrets set, step 8.3). Run the task that uses it (motor piston run for a check or
motor gauss hook invoke for a deploy) and confirm it passes, then have the user revoke the old
one.
11.2 [USER ACTION] Revoke credentials and archive GitHub
WARNING: don't archive <GH_REPO> if any workflow still runs on GitHub Actions (step 2.10)—an
archived repo stops running workflows.
USER ACTION — retire GitHub
Tell the user: "Everything is up and running on Motor. Here's the final cleanup on GitHub:
- Revoke each credential with the status REPLACED or UNUSED in the report at its source. Leave anything marked SHARED or KEEP-GITHUB alone.
- Remove GitHub OIDC trust from any AWS role that now trusts Motor (unless a job staying on GitHub still uses it).
- Remove the webhooks and GitHub apps Motor replaced.
- Add a banner at the top of the GitHub README: 'This repository moved to https://gauss.motor.dev//.'
- Archive
<GH_REPO>, unless a workflow still needs to run on GitHub.If you'd like, I can delete the webhooks (3), update the README (4), and archive the repo (5) with
gh. GitHub apps have to be removed in GitHub's web settings."
If approved, run those steps—updating the README (4) before archiving (5), since archived repos are read-only:
gh api -X DELETE repos/<GH_REPO>/hooks/<HOOK_ID>
gh repo archive <GH_REPO> --yes
12.Final verification
Your agent verifies team access, repo settings, and hooks, then hands over the final migration report.
Instructions for your agent
12.1 [AGENT] Verify team membership
motor members list --team <TEAM> --json
motor invites list --team <TEAM> --json
Verify: everyone in <ADMINS> and <MEMBERS> is a member with the right role.
If not: let the user know who hasn't accepted yet (teammates sometimes accept with a different email, so check any missing addresses with the user) and pass along Appendix A for anyone still pending. Pending invites don't block wrapping up the migration.
12.2 [AGENT] Verify the repository
Run every check and log the outcome in the report:
| Check | Command | Expected result |
|---|---|---|
| Team access | motor gauss repo access show <TEAM>/<REPO> --json |
Team scopes read, write |
| Required checks | motor gauss policy show <TEAM>/<REPO> <MAIN> --json |
Every check from 7.5 listed; direct pushes forbidden |
| Hooks | motor gauss hook list <TEAM>/<REPO> --channel <MAIN> --json |
A hook for every check, deploy, and release |
| Secrets | motor piston plan --credentials . --json |
ok is true |
| Profiles | motor profiles list --repo <TEAM>/<REPO> --json |
Every profile enabled, with rules scoped only to <MAIN> or release tags |
| Recent landings | motor gauss invocation list <TEAM>/<REPO> --json |
Latest check and deploy invocations passed |
| Instructions | The grep command from step 10.1 |
No Git or GitHub instructions |
| GitHub | gh repo view <GH_REPO> --json isArchived |
true, unless kept active by choice |
12.3 [AGENT] Deliver the final report
Hand <WORK_DIR>/report.md to the user and summarize:
- The new repository URL:
https://gauss.motor.dev/<TEAM>/<REPO>. - Anything that couldn't be imported (step 5.2).
- Required checks, plus the deploy and release hooks now active.
- Anything that stayed behind (unmigrated SCHEDULED jobs, UNSUPPORTED jobs, integrations, issues) and what was decided for each.
- Anyone who still hasn't accepted their team invite.
- A reminder that the old Git checkout is retired—everyone should clone fresh with
amp clone(Appendix A).
The migration is complete.
Appendix ASetup for each team member
Quick local setup for each teammate switching to Motor.
Instructions for your agent
Send this appendix to everyone on the team. Run these steps on every machine you work from.
-
Accept your invite from the Motor email (invites expire after 7 days). Sign in with Google, add a passkey, and pick your handle.
-
Install Amp and the Motor CLI:
curl -fsSL https://gauss.motor.dev/motor/amp/artifacts/install.sh | sh curl -fsSL https://gauss.motor.dev/motor/cli/artifacts/install.sh | sh -
Confirm
amp --versionprintsamp YYYY_MM_NNNN. If it prints something else, a different program namedampis earlier on yourPATH. -
Sign in with
motor auth(ormotor auth --deviceon a headless machine). -
Set your human attribution so Amp records your name on changes your agents make:
amp config set author.for "<YOUR_NAME> <<YOUR_EMAIL>>" -
Clone the repository:
amp clone https://gauss.motor.dev/<TEAM>/<REPO> --channel <MAIN> -
Stop using your old Git checkout for new work. If you have unmerged local work there, carry it over as a patch:
cd <OLD_GIT_CHECKOUT> git diff --binary <MAIN>...<YOUR_BRANCH> > ~/my-work.patch cd <NEW_AMP_CLONE> amp workspace add workspaces/my-work cd workspaces/my-work git apply ~/my-work.patchgit applyworks even outside a Git repo. Once it applies cleanly, ask your agent to record and land the change. -
Your coding agents pick up the Motor workflow automatically from
AGENTS.md—no extra agent setup needed.
Appendix BTranslate GitHub Actions to Piston
Reference table mapping GitHub Actions concepts to Piston.
Instructions for your agent
| GitHub Actions | Piston (piston.star) |
|---|---|
runs-on: ubuntu-latest |
image = image("<image>") (defaults to linux/amd64) |
runs-on: ubuntu-24.04-arm |
platform = "linux/arm64" |
runs-on: windows-latest |
platform = "windows/amd64". No caches, docker(), or layer(). sh() runs pwsh. |
runs-on: macos-* |
Not available |
actions/setup-node, setup-python, setup-go |
Pick an image with the toolchain installed, like image("node:22-bookworm") |
| Repeated install steps | layer(<image>, name = "...", steps = [apt([...])]) |
services: postgres |
layer(<Debian or Ubuntu image>, name = "...", steps = [apt(["postgresql"]), postgres_configure(trust_local = True)]), plus postgres_start() as the first step (@piston//postgres.star) |
Other services: containers |
docker = docker(cache = "...") and docker run in a step |
strategy.matrix |
A list comprehension of task() calls |
actions/cache |
caches = {"<absolute path>": "<key>"} (commands must still work on a cold cache) |
upload-artifact / download-artifact |
outputs = {...} and inputs = {"<path>": other.output("<name>")} |
needs: |
needs = [other_task] |
concurrency: |
concurrency = "<group>" (tasks with a profile only) |
timeout-minutes |
timeout = "30m" (12 hours max) |
secrets.X |
secrets = {"X": secret("x")} |
vars.X |
env = {"X": "<value>"} |
environment: production |
profile = "production" |
GITHUB_TOKEN |
secret("gauss_invocation_token") in hook runs only. Scoped to pushing and publishing in its own repo, and expires 10 minutes after the run ends. No equivalent for GitHub API calls. |
GITHUB_SHA |
context().amp.state (in a hook run) |
uses: some/action@v1 |
Run the underlying commands directly as sh() steps |
JUnit or go test -json reports |
report = junit("<glob>") or report = go_test_json("<file>") |
on: pull_request |
Hook on merge.candidate_updated with check = "<name>" |
on: push to the default branch |
Hook on channel.updated, channels = ["<MAIN>"] |
on: push: tags / on: release |
Hook on tag.created, tags = ["v*"] |
paths: on push or pull_request |
paths = [...] with the same patterns in the same order (! negates, just like GitHub) |
paths-ignore: on push or pull_request |
paths_ignore = [...] with the same patterns |
paths with ? or + (like *.jsx?) |
Same pattern: ? matches zero or one of the preceding character, + matches one or more |
paths with [...], {...}, or \ escapes |
Not supported—expand into separate patterns using *, **, **/, ?, and + |
Required check skipped by paths (hangs forever on GitHub) |
Marked skipped, so the merge still lands |
paths on push: tags or schedule |
Not supported (Gauss doesn't filter paths on tag.created or schedule) |
on: workflow_dispatch |
motor gauss hook invoke <TEAM>/<REPO> <HOOK> --channel <MAIN> --input name=value |
on: schedule |
Hook on schedule, schedules = ["<cron>"] (5 fields, UTC, at least 5 minutes apart, Sunday is 0), channels = ["<MAIN>"] (exact names) |
| Branch protection and required status checks | motor gauss policy set ... --require <check> --forbid-direct-pushes |
| Required reviewers, CODEOWNERS | Not available. Use motor gauss merge create --draft to hold a change for human review. |