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
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ jobs:
- run: bun run lint
- run: bun run fmt:check

structural:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-workbench
- run: bun run check:structural

# A single fast pass over every workspace's tests. DB-gated suites
# (scripts/e2e/* included) skip themselves when DATABASE_URL is unset —
# see scripts/e2e/db-gate.ts — so this job needs no Postgres service.
Expand Down
31 changes: 11 additions & 20 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ grants); the hub never seeds data on a client's behalf.

## Working conventions

- `bun run check` (typecheck, lint, test, structural checks) must pass
before every commit. `check:structural` (`scripts/checks/run.ts`)
discovers and runs every `scripts/checks/*.ts` file with an
`import.meta.main` entry point — run one on its own with `bun run
check:structural <name>` (e.g. `bun run check:structural report-error`),
forwarding flags after it.
- `bun run check` (typecheck, lint, fmt, test) must pass before every
commit. There are no custom structural check scripts; a rule lives in
the code or schema itself or it does not exist.
- Worktrees live in `.worktrees/<branch>`; branch = `cl-<issue#>-<slug>`.
- Commit sequence per change: tests first ("Add tests for X"), then
implementation ("X: what changed"), then docs ("Update docs: X"). One
Expand Down Expand Up @@ -79,24 +76,18 @@ Tests are meaningful red/green tests only — no coverage theater. An
outdated test is deleted in the same PR that breaks it, not adapted to keep
passing; rebuilding coverage for the area it covered happens under CL-8150.

## Conventions a check enforces

Each is backed by a `scripts/checks/*.ts` file that `check:structural`
discovers and runs, so a violation fails CI rather than waiting for review.
## Conventions

- Report every caught error through `reportError` from
`@corbits/error-sink` — never a bare `catch {}`. Pre-existing violations
are tracked in `scripts/checks/report-error-baseline.txt`, a shrinking
debt ledger, not an allowlist.
- A package's `browser-safe` subpath may never import a server-only
`@corbits/error-sink` — never a bare `catch {}`.
- A package's `browser-safe` subpath never imports a server-only
dependency (`postgres`, `drizzle-orm`, `hono`, any `@intx/*`).
- A tool package's `{ name, version }` pin must match its own
`package.json` version, and its `src/` changing requires a version bump.
- Every package needs a `LICENSE` file (LGPL-2.1-or-later).
- A dependency declared in the root `catalog` must be consumed as
`catalog:` everywhere, never a literal range.
- `exactOptionalPropertyTypes: true` in `tsconfig.base.json` — omit an
optional key rather than assigning it `undefined`.
- A dependency declared in the root `catalog` is consumed as `catalog:`.
- `exactOptionalPropertyTypes: true` — omit an optional key rather than
assigning it `undefined`.
- A custom table that gets deleted is hard-removed: delete the schema code,
no drop migration. Cutovers are breaking; reset the database.

## Docs map

Expand Down
2 changes: 1 addition & 1 deletion IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ recorded per-package in each vendored package's own `VENDORED-FROM` file.
| `bun run dev` | Validates `.env`, verifies the database, applies pending migrations, builds the web UI if needed, starts the hub and one sidecar |
| `bun run setup` | Applies pending database migrations (`scripts/db-setup.ts`) |
| `bun run reset` | Drops the platform database schema and clears on-disk asset directories (local `DATABASE_URL` only, unrecoverable) |
| `bun run check` | The full gate: `typecheck && lint && fmt:check && check:structural && test` — must pass before every commit |
| `bun run check` | The full gate: `typecheck && lint && fmt:check && test` — must pass before every commit |
| `bun run test` | Workspace unit/integration tests |
| `bun run test:e2e` | End-to-end smoke tests (`scripts/e2e/*.test.ts`) |
| `bun run fmt` | `oxfmt` write |
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"workflows/*"
],
"scripts": {
"check": "bun run typecheck && bun run lint && bun run fmt:check && bun run check:structural && bun run test",
"check": "bun run typecheck && bun run lint && bun run fmt:check && bun run test",
"typecheck": "bun run scripts/typecheck.ts",
"lint": "oxlint apps packages tools agents skills workflows scripts test",
"fmt": "oxfmt apps packages tools agents skills workflows scripts test",
Expand All @@ -28,7 +28,6 @@
"setup": "bun scripts/db-setup.ts",
"setup:memory": "bun run scripts/setup-memory.ts",
"reset": "bun scripts/reset.ts",
"check:structural": "bun run scripts/checks/run.ts",
"build:sidecar-image": "docker build -f apps/sidecar/Dockerfile -t corbits-sidecar:dev .",
"eval": "bun run scripts/evals-run.ts"
},
Expand Down
Loading
Loading