Skip to content
Draft
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
23 changes: 16 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,25 @@ it binds you regardless of which mechanism is within reach.
```bash
bun install
bun run typecheck # bun x tsc --noEmit (strict)
bun run test # full tests/ suite
bun run test:changed # import-graph tests against the resolved `dev` merge base
bun run test # full tests/ suite (PR-ready / explicit ask only)
bun run lint:gui # GUI eslint
bun run privacy:scan # credential/privacy scan used by CI
bun run build:gui # Vite GUI build
```

During implementation, use the smallest focused checks that directly cover the
changed subsystem. Do not run repository-wide `bun run typecheck` or
`bun run test` for a scoped change unless the change affects shared runtime,
routing, config, server behavior, a focused result is failed or ambiguous, or
the user explicitly asks for full validation.
changed subsystem. Prefer `bun test tests/<name>.test.ts` for a known file, or
`bun run test:changed` when the touch set is broader than one file. Do **not**
run repository-wide `bun run test` or a bare `bun test` with no file arguments
for a scoped change by default. `bun run test:changed` follows Bun's parsed module graph: it
selects test files that import changed modules, but it cannot see dependencies
expressed through subprocesses, source files read as data, or golden/derived
files. Run the relevant focused tests explicitly for those paths; if no reliable
focused set covers them, the full suite is required even for a scoped change.
That indirect-dependency case is the explicit exception to the scoped-change
default. The full suite is ~850 files, so otherwise reserve it for a failed or
ambiguous focused result, an explicit user request, or the PR-ready gate below.

Before creating or updating a non-trivial PR as review-ready, or before
approving such a PR, run `bun run typecheck` and `bun run test`. CI runs these
Expand Down Expand Up @@ -274,8 +282,9 @@ reviewers (Codex, CodeRabbit).
assumptions about a compile step, or code paths that break `bun run
typecheck` / `bun run test`.
- **Tests:** behavior changes in `src/` need a focused regression test near
the existing tests for that subsystem. Shared routing, adapter, config, or
server changes need the full suite green.
the existing tests for that subsystem. During implementation, run the relevant
focused files and use `bun run test:changed` for import-connected coverage as
described above; the full suite is the PR-ready gate.
- **Docs sync:** user-facing behavior changes should update `docs-site/` (and
keep translated locales from contradicting the English source).
- **Privacy:** `bun run privacy:scan` must stay green; never introduce logging
Expand Down
11 changes: 9 additions & 2 deletions docs-site/src/content/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ bun install
bun run dev:proxy # proxy API in dev mode
bun run dev:gui # dashboard dev server (another terminal)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` remains an alias for `bun run dev:proxy`. The dashboard dev server is `bun run dev:gui`;
Expand All @@ -28,13 +30,18 @@ scripts so local commands match CI:

```bash
bun run typecheck # strict TypeScript check
bun run test # complete tests/ suite
bun run test:changed # import-graph tests against the resolved dev merge base
bun run test # complete tests/ suite (PR-ready / explicit ask)
bun test tests/router.test.ts # focused test file
bun run build:gui # Vite GUI build + package preparation
bun run privacy:scan # credential/privacy scan used by CI
bun run prepare:package # refresh package launchers/assets
```

`test:changed` selects the first comparison ref that exists, in order: `upstream/dev`,
`origin/dev`, then local `dev`. It reports that ref and the exact `git merge-base HEAD <ref>`
commit, then passes the merge-base SHA to Bun.

Most tests are flat `tests/*.test.ts` Bun tests. `tests/helpers/` contains shared fixtures and
`tests/e2e-style/` contains broader native-parity scenarios. Keep a focused regression near the
existing tests for the subsystem you change; run the full suite for shared routing, adapters, config,
Expand Down
7 changes: 5 additions & 2 deletions docs-site/src/content/docs/fr/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ bun install
bun run dev:proxy # proxy API in dev mode
bun run dev:gui # dashboard dev server (another terminal)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` reste un alias pour `bun run dev:proxy`. Le serveur de développement du tableau de bord est `bun run dev:gui` ;
Expand All @@ -28,7 +30,8 @@ distincte. Utilisez les scripts enregistrés afin que les commandes locales corr

```bash
bun run typecheck # strict TypeScript check
bun run test # complete tests/ suite
bun run test:changed # import-graph tests against the resolved dev merge base
bun run test # complete tests/ suite (PR-ready / explicit ask)
bun test tests/router.test.ts # focused test file
bun run build:gui # Vite GUI build + package preparation
bun run privacy:scan # credential/privacy scan used by CI
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/ja/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ bun install
bun run dev:proxy # 開発モードのプロキシ API
bun run dev:gui # ダッシュボード dev サーバー(別ターミナル)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` は引き続き `bun run dev:proxy` のエイリアスとして動作します。ダッシュボード dev サーバーは
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/ko/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ bun install
bun run dev:proxy # 개발 모드 프록시 API
bun run dev:gui # 대시보드 dev 서버(다른 터미널)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev`는 계속 `bun run dev:proxy`의 별칭으로 동작합니다. 대시보드 dev 서버는
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/ru/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ bun install
bun run dev:proxy # прокси-API в режиме разработки
bun run dev:gui # dev-сервер дашборда (другой терминал)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` остаётся псевдонимом для `bun run dev:proxy`. Dev-сервер дашборда — `bun run dev:gui`;
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/tr/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ bun install
bun run dev:proxy # geliştirme modunda proxy API
bun run dev:gui # kontrol paneli geliştirme sunucusu (başka bir terminalde)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev`, `bun run dev:proxy` komutunun bir takma adıdır. Kontrol paneli
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/zh-cn/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ bun install
bun run dev:proxy # 开发模式代理 API
bun run dev:gui # 仪表盘 dev 服务器(另一个终端)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` 继续作为 `bun run dev:proxy` 的别名。仪表盘 dev 服务器使用 `bun run dev:gui`;
Expand Down
4 changes: 3 additions & 1 deletion docs-site/src/content/docs/zh-tw/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ bun install
bun run dev:proxy # 開發模式代理 API
bun run dev:gui # 儀表板 dev 伺服器(另一個終端)
bun run typecheck # bun x tsc --noEmit
bun run test # bun test ./tests/
bun run test:changed # routine import-graph test selection
bun test tests/router.test.ts # routine focused test
bun run test # complete suite (PR-ready / explicit ask)
```

`bun run dev` 繼續作為 `bun run dev:proxy` 的別名。儀表板 dev 伺服器使用 `bun run dev:gui`;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"dev:gui": "cd gui && bun run dev",
"start": "bun run src/cli/index.ts start",
"test": "bun scripts/test.ts",
"test:changed": "bun scripts/test.ts --changed=dev",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"typecheck": "bun x tsc --noEmit",
"audit:high": "bun audit --audit-level=high && cd gui && bun audit --audit-level=high",
"privacy:scan": "bun scripts/privacy-scan.ts",
Expand Down
Loading
Loading