Skip to content

Amp Orb setup - #1856

Open
marcleblanc2 wants to merge 2 commits into
mainfrom
orb-setup
Open

Amp Orb setup#1856
marcleblanc2 wants to merge 2 commits into
mainfrom
orb-setup

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

Prepares the repo for Amp orbs so fresh orbs start with the pinned toolchain and dependencies installed instead of reinstalling them every thread.

Changes

  • .agents/setup: installs mise, the Node 20.19.6 / pnpm 10.25.0 pinned in .tool-versions, and pnpm install --frozen-lockfile. Appends a marker-guarded mise env hook to ~/.bash_profile so login shells (the agent and supervised services) get the pinned toolchain from any directory. Writes short orb guidance to ~/.config/amp/AGENTS.md.
  • .agents/resume: on each wake, confirms the toolchain still resolves so a broken snapshot fails loudly.
  • .amp/services.yaml: declares pnpm dev as the docs service so amp orb services ensure gives a portal link.
  • .gitignore: ignores generated .amp/portals/.

Verification (real orb, Debian 12, project sourcegraph/standalone-docs)

  • Cold .agents/setup: exit 0, 10.0s. Warm rerun: exit 0, 1.05s; profile marker present exactly once.
  • Clean login shell (env -i ... /bin/bash -lc) from repo root and from /tmp: node v20.19.6 and pnpm 10.25.0 from mise; gh, amp, bun still on PATH.
  • .agents/resume: exit 0, 0.17s from repo root and from /tmp.
  • amp orb services ensure: docs service healthy (HTTP 200) after Contentlayer generated 521 documents; service PATH starts with the mise Node 20.19.6 bin dir.
  • Local macOS smoke test with a throwaway HOME: same results.

Notes for reviewers

  • Pre-existing, not changed here: pnpm 10 skips postinstall scripts for sharp, esbuild, contentlayer, canvas, protobufjs, unrs-resolver because package.json has no pnpm.onlyBuiltDependencies. Dev server works regardless.
  • Changing .agents/setup does not invalidate the existing project snapshot by itself; the next refresh (72h) or amp projects snapshots delete sourcegraph/standalone-docs picks it up.

.agents/setup installs mise, the Node and pnpm versions pinned in
.tool-versions, and pnpm dependencies, and exposes the toolchain to
login shells. .agents/resume confirms the toolchain on each wake.
.amp/services.yaml lets Amp run the Next.js dev server as a portal.

Amp-Thread-ID: https://ampcode.com/threads/T-01a07559-806b-70af-a96d-7281168ade61
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 6, 2026 6:27am UTC

Request Review

@marcleblanc2 marcleblanc2 changed the title Add Amp orb setup: pinned Node/pnpm via mise, deps, dev-server service Add Amp orb setup Sep 6, 2026
@marcleblanc2 marcleblanc2 changed the title Add Amp orb setup Amp Orb setup Sep 6, 2026
@marcleblanc2
marcleblanc2 enabled auto-merge (squash) September 6, 2026 06:28
@marcleblanc2
marcleblanc2 requested a review from a team September 6, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant