Skip to content

Commit fa538aa

Browse files
docs(agents): update turbo workflow guidance
1 parent 3e8ffc4 commit fa538aa

File tree

1 file changed

+64
-5
lines changed

1 file changed

+64
-5
lines changed

AGENTS.md

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,51 @@ pnpm --filter <package-name> run <script>
5959

6060
Use these as defaults unless the task explicitly requires something else.
6161

62+
### Turbo Task Primer (How to Run Tasks)
63+
64+
- List effective tasks:
65+
66+
```bash
67+
pnpm exec turbo run build --dry=json
68+
```
69+
70+
- Run a task across the workspace:
71+
72+
```bash
73+
pnpm exec turbo run <task>
74+
```
75+
76+
- Run a task for packages only:
77+
78+
```bash
79+
pnpm exec turbo run <task> --filter=./packages/**
80+
```
81+
82+
- Run a task for one package:
83+
84+
```bash
85+
pnpm exec turbo run <task> --filter=@module-federation/<pkg>
86+
```
87+
88+
- Run a package script directly (bypasses workspace fanout):
89+
90+
```bash
91+
pnpm --filter @module-federation/<pkg> run <script>
92+
```
93+
94+
- Disable cache for validation/debug runs:
95+
96+
```bash
97+
pnpm exec turbo run <task> --force
98+
```
99+
100+
- Common Turbo tasks defined in `turbo.json`:
101+
- `build`
102+
- `test` (depends on `^build`)
103+
- `lint`
104+
- `e2e` / `test:e2e` / `test:e2e:production`
105+
- `turbo:build` / `turbo:test` / `turbo:lint` (repo-standard package pipeline tasks)
106+
62107
### Formatting
63108

64109
- CI-equivalent format gate:
@@ -75,7 +120,7 @@ pnpm exec prettier --write .
75120

76121
Wrapper script also exists: `pnpm run lint-fix`.
77122

78-
### Package Pipeline Parity (`tag:type:pkg`)
123+
### Package Pipeline Parity
79124

80125
- Package build (Turbo cache handled automatically):
81126

@@ -89,7 +134,21 @@ pnpm run build:pkg
89134
pnpm run test:pkg
90135
```
91136

92-
### Metro Pipeline Parity (`tag:type:metro`)
137+
- Package lint:
138+
139+
```bash
140+
pnpm run lint
141+
```
142+
143+
- Underlying Turbo commands used by these wrappers:
144+
145+
```bash
146+
pnpm exec turbo run turbo:build --filter=./packages/**
147+
pnpm exec turbo run turbo:test --filter=./packages/**
148+
pnpm exec turbo run turbo:lint --filter=./packages/**
149+
```
150+
151+
### Metro Pipeline Parity
93152

94153
- Build pkg + metro:
95154

@@ -100,13 +159,13 @@ pnpm run build:pkg
100159
- Metro tests:
101160

102161
```bash
103-
pnpm exec turbo run test --filter=@module-federation/metro*
162+
pnpm exec turbo run test --filter=@module-federation/metro --filter=@module-federation/metro-plugin-rnef --filter=@module-federation/metro-plugin-rnc-cli
104163
```
105164

106165
- Metro lint:
107166

108167
```bash
109-
pnpm exec turbo run lint --filter=@module-federation/metro*
168+
pnpm exec turbo run lint --filter=@module-federation/metro --filter=@module-federation/metro-plugin-rnef --filter=@module-federation/metro-plugin-rnc-cli
110169
```
111170

112171
### E2E Parity via Local CI Runner
@@ -149,7 +208,7 @@ Run the smallest deterministic set that matches the change type.
149208
| --- | --- | --- |
150209
| Docs-only (no code/config behavior change) | none by default; run only checks explicitly requested by user | `pnpm exec prettier --check .` |
151210
| Package code in `packages/*` (non-metro) | `pnpm exec prettier --check .`; package build; package tests | targeted project test/build commands |
152-
| Metro package code (`tag:type:metro`) | metro parity set (build pkg+metro, affected metro tests, metro lint) | E2E metro job via `ci:local` when relevant |
211+
| Metro package code (`packages/metro-*`) | metro parity set (build pkg+metro, metro tests, metro lint) | E2E metro job via `ci:local` when relevant |
153212
| App/E2E-related changes in `apps/*` or E2E scripts/workflows | `pnpm run ci:local --only=<matching-job>` | additional related `ci:local` jobs |
154213
| Release workflow/release tooling changes | release sanity commands only, no publish | package/metro builds if impacted |
155214

0 commit comments

Comments
 (0)