Instructions for AI agents working on this repository.
See ARCHITECTURE.md for an overview of the turbo run command architecture.
When making changes to the codebase, check if the following docs need updates:
-
ARCHITECTURE.md - Update when changing core
turbo runcomponents:- Run builder, package graph, task graph/engine
- Task visitor, caching system, task hashing
- Run tracking and summary generation
- Any files in
crates/turborepo-lib/src/run/,crates/turborepo-lib/src/engine/,crates/turborepo-lib/src/task_graph/, orcrates/turborepo-cache/
-
CONTRIBUTING.md - Update when changing:
- Build process or development setup
- Testing procedures or requirements
- Project structure or tooling
-
This file (AGENTS.md) - Update when changing:
- PR requirements or CI workflows
- Repository conventions or policies
- You are not allowed to use
--no-verifywhen making a commit or push. - If you do not have dependencies available, you can download them with
pnpm install --frozen-lockfile.
- Workspace Clippy lints deny
.unwrap(),.unwrap_err(),.unwrap_none(), and.expect()in Rust targets covered bycargo lint. - Crates with existing implementation-code violations may temporarily allow
clippy::unwrap_usedandclippy::expect_usedat the crate root; remove those allows as each crate is cleaned up. - Tests are exempt from this panic-extraction policy, but still linted by
cargo lintwith panic-extraction lints allowed undercfg(test).
- Test and lint workflows do not pre-classify changed paths. PR jobs run consistently and use the Turborepo task graph and cache where applicable.
- Same-repository PRs authenticate to Remote Cache through OIDC; fork PRs remain local-only.
- Rust CI restores full Cargo target state on Ubuntu, macOS, and Windows from trusted
mainsnapshots; onlymainwrites. Repository sccache dogfooding is disabled. - Linux Rust shards include
terminal-controlblack-box TUI integration tests; known regressions remain explicitly ignored. - Example validation remains push-only because it requires Vercel credentials and project state.
PR titles must follow Conventional Commits. See .github/workflows/lint-pr-title.yml for the enforced constraints.
Format: <type>: <Description>
Key rules:
- Description must start with an uppercase letter
- Scopes are not allowed
Examples:
feat: Add new cache configuration option
fix: Resolve race condition in task scheduling
docs: Update installation instructions
- The
LSPworkflow packagespackages/turbo-vscVSIX artifacts for release. Stable and canary Turborepo versions are mapped to Marketplace-safemajor.minor.patchversions before packaging. - Canary VS Code extension packages use
--pre-release. - Non-dry-run releases publish the VS Code extension through the
LSPworkflow usingpublish=true,dry_run=false, and aVSCE_PATsecret on the protectedvscode-marketplaceenvironment. This publish path must not block release PR creation. Once npm publishing starts, preserve the staging branch and release tag so partial releases can be resumed safely. - npm publishing is resumable per package: existing versions are skipped only when registry integrity and the requested dist-tag match the local release and provenance is present, and
turbopublishes last after the native and supporting packages. - Release PRs are created by
github-actions[bot]using the ephemeral workflow token and squash-merged automatically after the required release review gate passes. The gate validates exact generated release changes from immutable SHAs and pins the merge to the validated head SHA. Turborepo release PR titles usechore: Release Turborepo <version>; the author and title are part of the trusted release-PR validation contract. - The
Releaseworkflow signs and notarizes macOSturbobinaries duringbuild-rustusing static GitHub secrets andapple-codesign/rcodesign. - The
ReleaseandLSPworkflows install Zig duringbuild-rustbecauseturboandturborepo-lsplinklibghostty-vtthroughlibghostty-vt-sys.