Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permissions:
jobs:
verify:
runs-on: ubuntu-latest
env:
TURBO_TELEMETRY_DISABLED: 1
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -39,5 +41,5 @@ jobs:
# CLI argument tests resolve the configured harness but fail before invoking it.
AGENT_CLI_PATH: bun

- name: Build
- name: Build workspace graph
run: bun run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
.turbo/
.DS_Store
*.log
.env
Expand Down
6 changes: 5 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ Bun-based monorepo with workspace packages under `packages/*`. The marketing sit
## Developer Commands

```bash
# Root: run across all packages
# Root: Turborepo runs tasks across all packages
bun install
bun run build
bun run dev
bun run typecheck
bun run test
bun run format
bun run lint

# Bypass a cached result while troubleshooting
bun run turbo run test --force

# Single package
bun run --filter @getdevintern/code test
bun run --filter @getdevintern/pm build
Expand Down
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ Bun-based monorepo with workspace packages under `packages/*`. The marketing sit
## Developer Commands

```bash
# Root: run across all packages
# Root: Turborepo runs tasks across all packages
bun install
bun run build
bun run dev
bun run typecheck
bun run test
bun run format
bun run lint

# Bypass a cached result while troubleshooting
bun run turbo run test --force

# Single package
bun run --filter @getdevintern/code test
bun run --filter @getdevintern/pm build
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repository is the canonical home for DevIntern's product and tool source. C

## Ground rules

- `bun install`, then `bun run format`, `bun run lint`, `bun run typecheck`, `bun run test` must pass. The lefthook pre-commit hook runs the first three automatically.
- `bun install`, then `bun run format`, `bun run lint`, `bun run typecheck`, `bun run test` must pass. These root commands use Turborepo; the lefthook pre-commit hook runs the first three automatically.
- Tests use isolated temp directories; do not share temp dirs across tests.
- Keep changes scoped to the product packages and documentation in this repo. Website and docs-site implementation changes happen elsewhere.
- Update the relevant guide under `docs/{code,pm}` when a change alters user-facing CLI behavior, flags, or environment variables.
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,24 @@ The FSL grants no trademark rights: the DevIntern name and logo are trademarks o

Website and control plane live elsewhere; this repo is the tool packages.

## Development workflows

Install dependencies with `bun install`, then use the root commands below. Turborepo runs package tasks in parallel where it is safe and orders workspace builds according to their package dependencies.

| Command | Purpose |
| ---------------------- | ---------------------------------------------------------------------------- |
| `bun run build` | Build every workspace and its dependencies |
| `bun run test` | Run all package test suites |
| `bun run lint` | Lint all packages |
| `bun run typecheck` | Type-check all packages |
| `bun run format:check` | Check formatting without changing files |
| `bun run format` | Format all packages; this write task is intentionally not cached |
| `bun run dev` | Start the dashboard and desktop watch tasks; stop them with <kbd>Ctrl+C</kbd> |

Package-level commands remain available, for example `bun run --filter @getdevintern/pm test`. To run a selected task and its dependency graph through Turborepo, use `bun run turbo run build --filter @getdevintern/code`.

Turborepo uses the local `.turbo` directory for its cache; remote caching is not configured. Add `--force` to a Turbo command to ignore cached results, or remove `.turbo` to clear the local cache completely. If a result looks stale, first rerun it with `--force`; changes to the lockfile, package sources, shared lint configuration, or declared build environment variables automatically invalidate affected entries.

## Contributing

PRs welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Monorepo layout and Bun-only tooling: [AGENTS.md](AGENTS.md).
Expand Down
21 changes: 19 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@
"version": "0.0.0",
"description": "Monorepo for @devintern/code and @devintern/pm.",
"type": "module",
"packageManager": "bun@1.2.16",
"workspaces": [
"packages/*"
],
"scripts": {
"build": "bun run --filter '*' build",
"format": "bun run --filter '*' format",
"format:check": "bun run --filter '*' format:check",
"lint": "bun run --filter '*' lint",
"build": "turbo run build",
"dev": "turbo run dev --filter=!@getdevintern/code",
"format": "turbo run format",
"format:check": "turbo run format:check",
"lint": "turbo run lint",
"prepare": "lefthook install",
"typecheck": "bun run --filter '*' typecheck",
"test": "bun run --filter '*' test"
"typecheck": "turbo run typecheck",
"test": "turbo run test"
},
"devDependencies": {
"@types/bun": "latest",
"lefthook": "^2.1.5",
"oxfmt": "^0.44.0",
"oxlint": "^1.59.0",
"turbo": "^2.10.11",
"typescript": "^5.3.0"
},
"dependencies": {
Expand Down
15 changes: 12 additions & 3 deletions packages/code/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ writeFileSync(distPath, content);
// the published npm artifact without the monorepo.
const uiPackageDir = join(import.meta.dir, "..", "dashboard-ui");
const uiDist = join(uiPackageDir, "dist");
const uiBuild = Bun.spawnSync(["bun", "run", "build"], { cwd: uiPackageDir });
if (uiBuild.exitCode !== 0 || !existsSync(join(uiDist, "index.html"))) {
console.error(uiBuild.stderr.toString());

// Turbo builds workspace dependencies first. Keep the package-level command
// self-contained for contributors who run `bun run build` from this directory.
if (!process.env.TURBO_HASH) {
const uiBuild = Bun.spawnSync(["bun", "run", "build"], { cwd: uiPackageDir });
if (uiBuild.exitCode !== 0) {
console.error(uiBuild.stderr.toString());
process.exit(1);
}
}

if (!existsSync(join(uiDist, "index.html"))) {
console.error("dashboard-ui build failed; refusing to package without the dashboard UI.");
process.exit(1);
}
Expand Down
1 change: 1 addition & 0 deletions packages/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"devDependencies": {
"@devintern/agent-harness": "workspace:*",
"@devintern/auth": "workspace:*",
"@devintern/dashboard-ui": "workspace:*",
"@devintern/license-check": "workspace:*",
"@devintern/task-trackers": "workspace:*",
"@devintern/utils": "workspace:*",
Expand Down
52 changes: 52 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [".oxlintrc.json"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"env": ["GITHUB_OAUTH_CLIENT_ID", "POSTHOG_API_KEY", "POSTHOG_HOST"],
"outputs": ["dist/**", "out/**"]
},
"@devintern/agent-harness#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@devintern/auth#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@devintern/license-check#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@devintern/task-trackers#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@devintern/text-formatter#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@devintern/utils#build": {
"dependsOn": ["^build"],
"outputs": []
},
"@getdevintern/license-policy#build": {
"dependsOn": ["^build"],
"outputs": []
},
"dev": {
"cache": false,
"persistent": true
},
"format": {
"cache": false
},
"format:check": {},
"lint": {},
"test": {
"env": ["AGENT_CLI_PATH"]
},
"typecheck": {}
}
}
Loading