Skip to content
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
be6daa4
refactor(module-federation): remove dead executors and verdaccio
cursoragent Feb 28, 2026
0da460c
fix(module-federation): restore core lint compatibility
cursoragent Feb 28, 2026
31a7ccb
chore(module-federation): upgrade eslint and align ajv overrides
cursoragent Feb 28, 2026
fe52f91
refactor(module-federation): migrate remaining builds to tsdown
cursoragent Feb 28, 2026
219a4f4
fix(module-federation): stabilize enhanced tsdown wrapper modules
cursoragent Feb 28, 2026
29285f6
refactor: migrate monorepo orchestration to turborepo
cursoragent Feb 28, 2026
ee790e2
refactor: remove remaining nx configuration surface
cursoragent Mar 1, 2026
e952699
chore: scope lint-fix to changed files and packages
cursoragent Mar 1, 2026
86d316a
chore: remove codex setup workaround script
cursoragent Mar 1, 2026
c07f3e5
refactor: simplify test and e2e task runners
cursoragent Mar 1, 2026
f8177b4
chore: remove generated turbo lint artifact
cursoragent Mar 1, 2026
877d1d0
chore: clean up e2e runner dead code
cursoragent Mar 1, 2026
61a1932
fix: finalize task-runner audit cleanup
cursoragent Mar 1, 2026
7db7f1c
fix: resolve failing PR ci checks
cursoragent Mar 1, 2026
2c6e8f3
fix: simplify ci cache flow and stabilize targeted checks
cursoragent Mar 1, 2026
8031f56
refactor: align test orchestration with turbo affected graph
cursoragent Mar 1, 2026
2bf4893
ci: run turbo workflows directly and tighten test graph
cursoragent Mar 1, 2026
de69d72
fix: publish valid typescript package dist exports
cursoragent Mar 1, 2026
d58ec56
chore(ci): make next e2e orchestration turbo-native
cursoragent Mar 1, 2026
f6fc58d
ci(modern): make modern e2e orchestration turbo-native
cursoragent Mar 1, 2026
1f206da
chore(e2e): use turbo-native runtime orchestration
cursoragent Mar 1, 2026
db1bc10
chore(ci): isolate turbo-filtered next e2e task runs
cursoragent Mar 1, 2026
d93afa0
chore(ci): route local e2e flows through turbo entrypoints
cursoragent Mar 1, 2026
0cb957c
fix(e2e): keep minimal turbo-native modern runtime config
cursoragent Mar 1, 2026
fee0a0d
ci: cache turborepo artifacts across workflows
cursoragent Mar 1, 2026
9388e06
chore: raise turbo concurrency floors
cursoragent Mar 1, 2026
1d87235
chore: simplify package scope turbo filters
cursoragent Mar 1, 2026
caf1d32
fix(ci): stabilize turbo workflows and modern checks
cursoragent Mar 1, 2026
2579937
Turborepo build system alignment (#4486)
ScriptedAlchemy Mar 2, 2026
168369f
Merge branch 'main' into cursor/nx-executor-migration-9e4b
ScriptedAlchemy Mar 2, 2026
fa36bd9
Merge branch 'cursor/nx-executor-migration-9e4b' into cursor/build-sy…
ScriptedAlchemy Mar 2, 2026
27558ec
Merge origin/main into cursor/nx-executor-migration-9e4b
ScriptedAlchemy Mar 3, 2026
f36770b
Merge origin/cursor/nx-executor-migration-9e4b into cursor/build-syst…
ScriptedAlchemy Mar 3, 2026
1676011
Merge branch 'main' into cursor/nx-executor-migration-9e4b
ScriptedAlchemy Mar 5, 2026
561d33f
Merge branch 'cursor/nx-executor-migration-9e4b' into cursor/build-sy…
ScriptedAlchemy Mar 5, 2026
12153a2
Merge branch 'main' into cursor/nx-executor-migration-9e4b
ScriptedAlchemy Mar 5, 2026
9cc1eb1
Merge branch 'cursor/nx-executor-migration-9e4b' into cursor/build-sy…
ScriptedAlchemy Mar 5, 2026
5fad98d
fix(enhanced): lazily load core wrapper plugins
ScriptedAlchemy Mar 5, 2026
e2dd66a
style(enhanced): format federation runtime wrapper
ScriptedAlchemy Mar 5, 2026
de7e5a8
fix(core): make nx build asset copy commands cross-platform
ScriptedAlchemy Mar 5, 2026
141c81f
Merge remote-tracking branch 'origin/cursor/nx-executor-migration-9e4…
ScriptedAlchemy Mar 5, 2026
58e866b
fix(ci): address review feedback for affected tests and modern e2e co…
ScriptedAlchemy Mar 5, 2026
ffdb2b0
chore(git): stop tracking nx workspace artifacts
ScriptedAlchemy Mar 5, 2026
3e8ffc4
fix(enhanced): restore emitted wrapper lib entrypoints
ScriptedAlchemy Mar 5, 2026
fa538aa
docs(agents): update turbo workflow guidance
ScriptedAlchemy Mar 5, 2026
c7dd686
Merge remote-tracking branch 'origin/main' into cursor/build-system-t…
ScriptedAlchemy Mar 6, 2026
3e3b0d0
chore(skills): add local turborepo skill
ScriptedAlchemy Mar 6, 2026
6b0cdea
fix(ci): restore turbo router and modern e2e parity
ScriptedAlchemy Mar 6, 2026
cfa367e
chore: remove generated codex environment file
ScriptedAlchemy Mar 6, 2026
bba1fed
fix(ci): install playwright browsers for devtools
ScriptedAlchemy Mar 6, 2026
5764c79
fix(ci): harden turbo devtools playwright setup
ScriptedAlchemy Mar 6, 2026
ce6d238
fix(enhanced): preserve treeshake fixture build ids
ScriptedAlchemy Mar 6, 2026
aff320c
chore(build): update turbo and esbuild app scripts
ScriptedAlchemy Mar 6, 2026
d02180d
fix(ci): preserve affected package test coverage
ScriptedAlchemy Mar 6, 2026
441fb26
fix(ci): catch extensionless package test impacts
ScriptedAlchemy Mar 6, 2026
88e0f88
fix(ci): restore modernjs ssr parity
ScriptedAlchemy Mar 6, 2026
fe12bd1
chore(turbo): align monorepo scripts with turbo conventions
ScriptedAlchemy Mar 6, 2026
dc26e39
fix(ci): restore metro e2e coverage and turbo script targets
ScriptedAlchemy Mar 6, 2026
6c656c7
fix(ci): harden format and bundle-size base builds
ScriptedAlchemy Mar 6, 2026
a60734c
fix(ci): keep bundle-size base build turbo-only
ScriptedAlchemy Mar 6, 2026
9c36c86
fix(ci): restore node e2e order and next prod build guard
ScriptedAlchemy Mar 6, 2026
1c2afc8
fix(ci): remove leftover nx orchestration refs
ScriptedAlchemy Mar 6, 2026
d6b8f3f
chore(repo): use pnpm in husky hooks
ScriptedAlchemy Mar 6, 2026
b5fe362
fix(ci): restore storybook and e2e task parity
ScriptedAlchemy Mar 6, 2026
52f56e7
fix(ci): restore affected selection coverage
ScriptedAlchemy Mar 6, 2026
005b89a
fix(ci): align local parity and bundle base builds
ScriptedAlchemy Mar 7, 2026
3b8df9f
fix(ci): scope format checks to changed files
ScriptedAlchemy Mar 7, 2026
f107faf
chore(assemble-release-plan): commit index formatting
ScriptedAlchemy Mar 7, 2026
6a8c61d
chore(assemble-release-plan): noop lint script
ScriptedAlchemy Mar 7, 2026
8e3afb3
fix(ci): handle missing rg in verify turbo conventions
ScriptedAlchemy Mar 7, 2026
4a0d0d6
style(ci): format turbo convention verifier
ScriptedAlchemy Mar 7, 2026
6ae3086
fix(ci): use merge-base affected diffs and filter lint targets
ScriptedAlchemy Mar 7, 2026
811b5c7
fix(storybook-addon): lazy-load nx helper for test runtime
ScriptedAlchemy Mar 7, 2026
444edd6
fix(reviewloop): address review findings (iter 1)
ScriptedAlchemy Mar 7, 2026
ad37803
fix(reviewloop): address review findings (iter 2)
ScriptedAlchemy Mar 7, 2026
9a15ac6
fix(reviewloop): address review findings (iter 3)
ScriptedAlchemy Mar 7, 2026
018df2d
fix(ci-local): keep nx base build package-scoped
ScriptedAlchemy Mar 7, 2026
0db7eaf
chore(turbo): normalize concurrency flags to 20
ScriptedAlchemy Mar 8, 2026
8fa4602
fix(treeshake): avoid response wait race in frontend e2e
ScriptedAlchemy Mar 8, 2026
f129780
chore(ci): keep treeshake out of affected package tests
ScriptedAlchemy Mar 8, 2026
1221fee
chore(assemble-release-plan): refresh generated formatting
ScriptedAlchemy Mar 8, 2026
0b7e073
chore(assemble-release-plan): format generated output
ScriptedAlchemy Mar 8, 2026
be2b5d3
refactor(ci): share turbo script helpers
ScriptedAlchemy Mar 8, 2026
078d335
refactor(ci): share changed file detection
ScriptedAlchemy Mar 8, 2026
5b5eb2a
refactor(ci): reuse shared git ref helpers
ScriptedAlchemy Mar 8, 2026
e1207a4
Merge remote-tracking branch 'origin/main' into cursor/build-system-t…
ScriptedAlchemy Mar 9, 2026
c1d31fd
fix(ci): stabilize turbo verifier and website preview build
ScriptedAlchemy Mar 9, 2026
282dbd8
style(repo): apply prettier formatting
ScriptedAlchemy Mar 10, 2026
21f1778
style(assemble-release-plan): apply prettier formatting
ScriptedAlchemy Mar 10, 2026
dc1550f
feat(ci-local): add uncached turbo runner support
ScriptedAlchemy Mar 10, 2026
bf3a144
fix(turbo): make tests depend on local builds
ScriptedAlchemy Mar 10, 2026
fcc27ef
fix(ci): avoid turbo cache save timeout on PR builds
ScriptedAlchemy Mar 10, 2026
a5da0cd
chore(repo): remove ai lint fix script
ScriptedAlchemy Mar 10, 2026
9e391a6
fix(ci): trigger grouped e2e jobs for all served apps
ScriptedAlchemy Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
914 changes: 914 additions & 0 deletions .codex/skills/turborepo/SKILL.md

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions .codex/skills/turborepo/command/turborepo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
description: Load Turborepo skill for creating workflows, tasks, and pipelines in monorepos. Use when users ask to "create a workflow", "make a task", "generate a pipeline", or set up build orchestration.
---

Load the Turborepo skill and help with monorepo task orchestration: creating workflows, configuring tasks, setting up pipelines, and optimizing builds.

## Workflow

### Step 1: Load turborepo skill

```
skill({ name: 'turborepo' })
```

### Step 2: Identify task type from user request

Analyze $ARGUMENTS to determine:

- **Topic**: configuration, caching, filtering, environment, CI, or CLI
- **Task type**: new setup, debugging, optimization, or implementation

Use decision trees in SKILL.md to select the relevant reference files.

### Step 3: Read relevant reference files

Based on task type, read from `references/<topic>/`:

| Task | Files to Read |
| -------------------- | ------------------------------------------------------- |
| Configure turbo.json | `configuration/RULE.md` + `configuration/tasks.md` |
| Debug cache issues | `caching/gotchas.md` |
| Set up remote cache | `caching/remote-cache.md` |
| Filter packages | `filtering/RULE.md` + `filtering/patterns.md` |
| Environment problems | `environment/gotchas.md` + `environment/modes.md` |
| Set up CI | `ci/RULE.md` + `ci/github-actions.md` or `ci/vercel.md` |
| CLI usage | `cli/commands.md` |

### Step 4: Execute task

Apply Turborepo-specific patterns from references to complete the user's request.

**CRITICAL - When creating tasks/scripts/pipelines:**

1. **DO NOT create Root Tasks** - Always create package tasks
2. Add scripts to each relevant package's `package.json` (e.g., `apps/web/package.json`, `packages/ui/package.json`)
3. Register the task in root `turbo.json`
4. Root `package.json` only contains `turbo run <task>` - never actual task logic

**Other things to verify:**

- `outputs` defined for cacheable tasks
- `dependsOn` uses correct syntax (`^task` vs `task`)
- Environment variables in `env` key
- `.env` files in `inputs` if used
- Use `turbo run` (not `turbo`) in package.json and CI

### Step 5: Summarize

```
=== Turborepo Task Complete ===
Topic: <configuration|caching|filtering|environment|ci|cli>
Files referenced: <reference files consulted>
<brief summary of what was done>
```

<user-request>
$ARGUMENTS
</user-request>
241 changes: 241 additions & 0 deletions .codex/skills/turborepo/references/best-practices/RULE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# Monorepo Best Practices

Essential patterns for structuring and maintaining a healthy Turborepo monorepo.

## Repository Structure

### Standard Layout

```
my-monorepo/
├── apps/ # Application packages (deployable)
│ ├── web/
│ ├── docs/
│ └── api/
├── packages/ # Library packages (shared code)
│ ├── ui/
│ ├── utils/
│ └── config-*/ # Shared configs (eslint, typescript, etc.)
├── package.json # Root package.json (minimal deps)
├── turbo.json # Turborepo configuration
├── pnpm-workspace.yaml # (pnpm) or workspaces in package.json
└── pnpm-lock.yaml # Lockfile (required)
```

### Key Principles

1. **`apps/` for deployables**: Next.js sites, APIs, CLIs - things that get deployed
2. **`packages/` for libraries**: Shared code consumed by apps or other packages
3. **One purpose per package**: Each package should do one thing well
4. **No nested packages**: Don't put packages inside packages

## Package Types

### Application Packages (`apps/`)

- **Deployable**: These are the "endpoints" of your package graph
- **Not installed by other packages**: Apps shouldn't be dependencies of other packages
- **No shared code**: If code needs sharing, extract to `packages/`

```json
// apps/web/package.json
{
"name": "web",
"private": true,
"dependencies": {
"@repo/ui": "workspace:*",
"next": "latest"
}
}
```

### Library Packages (`packages/`)

- **Shared code**: Utilities, components, configs
- **Namespaced names**: Use `@repo/` or `@yourorg/` prefix
- **Clear exports**: Define what the package exposes

```json
// packages/ui/package.json
{
"name": "@repo/ui",
"exports": {
"./button": "./src/button.tsx",
"./card": "./src/card.tsx"
}
}
```

## Package Compilation Strategies

### Just-in-Time (Simplest)

Export TypeScript directly; let the app's bundler compile it.

```json
{
"name": "@repo/ui",
"exports": {
"./button": "./src/button.tsx"
}
}
```

**Pros**: Zero build config, instant changes
**Cons**: Can't cache builds, requires app bundler support

### Compiled (Recommended for Libraries)

Package compiles itself with `tsc` or bundler.

```json
{
"name": "@repo/ui",
"exports": {
"./button": {
"types": "./src/button.tsx",
"default": "./dist/button.js"
}
},
"scripts": {
"build": "tsc"
}
}
```

**Pros**: Cacheable by Turborepo, works everywhere
**Cons**: More configuration

## Dependency Management

### Install Where Used

Install dependencies in the package that uses them, not the root.

```bash
# Good: Install in the package that needs it
pnpm add lodash --filter=@repo/utils

# Avoid: Installing everything at root
pnpm add lodash -w # Only for repo-level tools
```

### Root Dependencies

Only these belong in root `package.json`:

- `turbo` - The build system
- `husky`, `lint-staged` - Git hooks
- Repository-level tooling

### Internal Dependencies

Use workspace protocol for internal packages:

```json
// pnpm/bun
{ "@repo/ui": "workspace:*" }

// npm/yarn
{ "@repo/ui": "*" }
```

## Exports Best Practices

### Use `exports` Field (Not `main`)

```json
{
"exports": {
".": "./src/index.ts",
"./button": "./src/button.tsx",
"./utils": "./src/utils.ts"
}
}
```

### Avoid Barrel Files

Don't create `index.ts` files that re-export everything:

```typescript
// BAD: packages/ui/src/index.ts
export * from './button';
export * from './card';
export * from './modal';
// ... imports everything even if you need one thing

// GOOD: Direct exports in package.json
{
"exports": {
"./button": "./src/button.tsx",
"./card": "./src/card.tsx"
}
}
```

### Namespace Your Packages

```json
// Good
{ "name": "@repo/ui" }
{ "name": "@acme/utils" }

// Avoid (conflicts with npm registry)
{ "name": "ui" }
{ "name": "utils" }
```

## Common Anti-Patterns

### Accessing Files Across Package Boundaries

```typescript
// BAD: Reaching into another package
import { Button } from "../../packages/ui/src/button";

// GOOD: Install and import properly
import { Button } from "@repo/ui/button";
```

### Shared Code in Apps

```
// BAD
apps/
web/
shared/ # This should be a package!
utils.ts

// GOOD
packages/
utils/ # Proper shared package
src/utils.ts
```

### Too Many Root Dependencies

```json
// BAD: Root has app dependencies
{
"dependencies": {
"react": "^18",
"next": "^14",
"lodash": "^4"
}
}

// GOOD: Root only has repo tools
{
"devDependencies": {
"turbo": "latest",
"husky": "latest"
}
}
```

## See Also

- [structure.md](./structure.md) - Detailed repository structure patterns
- [packages.md](./packages.md) - Creating and managing internal packages
- [dependencies.md](./dependencies.md) - Dependency management strategies
Loading
Loading