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
49 changes: 24 additions & 25 deletions .agents/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,53 +186,52 @@ packages/factory/src/

## Common commands

**Root-level development:**
**Root-level development (via `@williamthorsen/nmr`):**

- `pnpm install` - Install all dependencies
- `pnpm run check` - Run typecheck, format check, lint check, and tests
- `pnpm run check:strict` - Strict checks including coverage and audit
- `pnpm run ci` - Full CI pipeline (strict checks + build)
- `pnpm run build` - Build all packages
- `pnpm run test` - Run tests across all packages
- `pnpm run lint` - Lint all packages
- `pnpm run typecheck` - TypeScript check all packages
- `pnpm run root:test` - Run only root-level tests (in `__tests__/`)
- `pnpm run root:lint` - Lint only root-level files
- `pnpm run root:check` - Run all root-level checks
- `nmr check` - Run typecheck, format check, lint check, and tests
- `nmr check:strict` - Strict checks including coverage and audit
- `nmr ci` - Full CI pipeline (strict checks + build)
- `nmr build` - Build all packages
- `nmr test` - Run tests across all packages
- `nmr lint` - Lint all packages
- `nmr typecheck` - TypeScript check all packages
- `nmr root:test` - Run only root-level tests (in `__tests__/`)
- `nmr root:lint` - Lint only root-level files

**Workspace packages (via nmr):**

- `nmr build` - Build the package
- `nmr test` - Run tests
- `nmr test:watch` - Run tests in watch mode
- `nmr test:coverage` - Run tests with coverage
- `nmr lint` - Lint
- `nmr typecheck` - TypeScript check

**Factory package (`packages/factory/`):**

- `pnpm run dev` - Start both Express server and Vite dev server
- `pnpm run dev:server` - Start Express server only (with tsx --watch)
- `pnpm run dev:client` - Start Vite dev server only
- `pnpm run ws build` - Build the package
- `pnpm run ws test` - Run tests
- `pnpm run ws test:watch` - Run tests in watch mode
- `pnpm run ws test:coverage` - Run tests with coverage
- `pnpm run ws lint` - Lint
- `pnpm run ws typecheck` - TypeScript check

**Agents package (`packages/agents/`):**

- `pnpm run build` - Compile TypeScript + copy content to dist
- `pnpm run ws test` - Run tests
- `pnpm run ws lint` - Lint
- `pnpm run ws typecheck` - TypeScript check

## Architecture

### Root-level tests

- Located in `__tests__/` directory
- Verify Node.js and pnpm versions match `.tool-versions`
- Consistency checks (Node.js and pnpm version alignment) via `@williamthorsen/nmr/tests`
- Use Vitest with config in `vitest.root.config.ts`

### Workspace script system

- Centralized script management via `scripts/run-workspace-script.ts`
- Each package uses `pnpm run ws {command}` for consistent tooling
- Common scripts defined in `run-workspace-script.ts` with package-level overrides
- Supports integration tests with `--int-test` flag
- Centralized script management via `@williamthorsen/nmr`
- Run workspace scripts with `nmr {command}` (e.g., `nmr test`, `nmr build`)
- Default scripts (build, test, lint, typecheck, etc.) provided by nmr
- Package-specific overrides in each package's `package.json`

### Build system

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ on:

jobs:
code-quality:
uses: williamthorsen/.github/.github/workflows/code-quality-pnpm.yaml@v1
uses: williamthorsen/.github/.github/workflows/code-quality-pnpm-workflow.yaml@v4
secrets:
GH_PACKAGES_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}
with:
node-version: '24.14.0'
check-command: 'nmr ci'
node-version: '24.14.1'
pnpm-version: '10.33.0'
4 changes: 1 addition & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
awscli 2.28.1
nodejs 24.14.0
python 3.13.3
nodejs 24.14.1
6 changes: 0 additions & 6 deletions __tests__/config.ts

This file was deleted.

3 changes: 3 additions & 0 deletions __tests__/consistency.app.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { runConsistencyChecks } from '@williamthorsen/nmr/tests';

runConsistencyChecks();
24 changes: 0 additions & 24 deletions __tests__/helpers/getRuntimeVersionFromAsdf.ts

This file was deleted.

41 changes: 0 additions & 41 deletions __tests__/helpers/getValueAtPathOrThrow.ts

This file was deleted.

30 changes: 0 additions & 30 deletions __tests__/nodejs-version.app.test.ts

This file was deleted.

54 changes: 0 additions & 54 deletions __tests__/pnpm-version.app.test.ts

This file was deleted.

39 changes: 3 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,20 @@
"scripts": {
"agents:install": "tsx packages/agents/src/cli.ts install",
"agents:install-launchers": "bash packages/agents/scripts/install-launchers.sh",
"audit": "pnpm run audit:prod && pnpm run audit:dev",
"audit:dev": "pnpm dlx audit-ci@^6 --config .audit-ci/config.dev.json5",
"audit:prod": "pnpm dlx audit-ci@^6 --config .audit-ci/config.prod.json5",
"build": "pnpm --recursive run build",
"check": "pnpm run typecheck && pnpm run fmt:check && pnpm run lint:check && pnpm run test",
"check:strict": "pnpm run typecheck && pnpm run fmt:check && pnpm run lint:strict && pnpm run test:coverage && pnpm run audit",
"ci": "pnpm run check:strict && pnpm run build",
"demo:catwalk": "pnpx http-server --port=5189 demos/catwalk/",
"fmt": "sh -c 'prettier --list-different --write \"${@:-.}\"' --",
"fmt:all": "pnpm run fmt && pnpm run fmt:sh",
"fmt:check": "sh -c 'prettier --check \"${@:-.}\"' --",
"fmt:sh": "shfmt --write **/*.sh",
"preinstall": "npx only-allow pnpm",
"postinstall": "tsx scripts/report-overrides.ts",
"lint": "pnpm run root:lint && pnpm --recursive run ws lint",
"lint:check": "pnpm run root:lint:check && pnpm --recursive run ws lint:check",
"lint:strict": "pnpm --recursive run ws lint:strict",
"outdated": "pnpm outdated --compatible --recursive",
"outdated:latest": "pnpm outdated --recursive",
"prepare": "lefthook install",
"root:check": "pnpm run root:typecheck && pnpm run fmt:check && pnpm run root:lint:check && pnpm run root:test",
"root:lint": "eslint --fix --ignore-pattern 'packages/**' .",
"root:lint:check": "eslint --ignore-pattern 'packages/**' .",
"root:lint:strict": "echo \"Error: Not enabled for the workspace root until a pattern is accepted as an argument\" && exit 1",
"root:test": "vitest --config ./vitest.root.config.ts",
"root:typecheck": "tsgo --noEmit",
"test": "pnpm run root:test && pnpm --recursive run ws test",
"test:coverage": "pnpm run root:test && pnpm --recursive run ws test:coverage",
"test:watch": "vitest --watch",
"typecheck": "pnpm run typecheck:root && pnpm --recursive run ws typecheck",
"typecheck:root": "tsgo --noEmit",
"update": "pnpm update --recursive",
"update:latest": "pnpm update --latest --recursive"
"postinstall": "nmr report-overrides --quiet; nmr sync-pnpm-version",
"prepare": "lefthook install"
},
"devDependencies": {
"@testing-library/dom": "10.4.1",
"@types/eslint": "9.6.1",
"@types/js-yaml": "4.0.9",
"@types/node": "22.19.15",
"@typescript/native-preview": "7.0.0-dev.20260329.1",
"@vitejs/plugin-react": "6.0.1",
"@vitest/coverage-v8": "4.1.2",
"@vitest/eslint-plugin": "1.6.13",
"@williamthorsen/eslint-config-typescript": "5.17.3",
"@williamthorsen/nmr": "0.3.0",
"@williamthorsen/strict-lint": "6.2.2",
"@williamthorsen/toolbelt.objects": "3.2.6",
"dotenv": "17.3.1",
"esbuild": "0.27.4",
"eslint": "9.39.4",
Expand All @@ -75,7 +43,6 @@
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-testing-library": "7.16.2",
"glob": "13.0.6",
"js-yaml": "4.1.1",
"lefthook": "2.1.4",
"prettier": "3.8.1",
"tsx": "4.21.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"codeassembly-agents": "dist/esm/cli.js"
},
"scripts": {
"build": "pnpm run ws compile && tsx scripts/copy-content.ts",
"ws": "node --import tsx ../../scripts/run-workspace-script.ts"
"build": "nmr compile && tsx scripts/copy-content.ts"
},
"dependencies": {
"js-yaml": "4.1.1"
Expand Down
3 changes: 1 addition & 2 deletions packages/factory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"dev:client": "pnpm vite --host",
"dev:server": "tsx --watch src/server/index.ts",
"generate-sprites": "tsx scripts/generate-placeholder-pngs.ts",
"validate:run-index": "tsx src/scripts/validate-run-index.ts",
"ws": "node --import tsx ../../scripts/run-workspace-script.ts"
"validate:run-index": "tsx src/scripts/validate-run-index.ts"
},
"dependencies": {
"@codeassembly/run-core": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"description": "MCP server for orchestrated run management",
"type": "module",
"scripts": {
"prepare": "pnpm run ws compile",
"ws": "node --import tsx ../../scripts/run-workspace-script.ts"
"build": "nmr compile",
"prepare": "nmr compile"
},
"dependencies": {
"@codeassembly/run-core": "workspace:*",
Expand Down
5 changes: 2 additions & 3 deletions packages/run-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
"codeassembly-runs": "dist/esm/cli.js"
},
"scripts": {
"build": "pnpm run ws compile",
"prepare": "pnpm run ws compile",
"ws": "node --import tsx ../../scripts/run-workspace-script.ts"
"build": "nmr compile",
"prepare": "nmr compile"
},
"dependencies": {
"js-yaml": "4.1.1",
Expand Down
Loading