Repository navigation
chore(hooks): leave repo-wide checks to CI #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,8 +4,9 @@ | |||||
|
|
||||||
| - Use `pnpm` only; the repo pins `pnpm@11.7.0` and requires Node `>=22`. | ||||||
| - Install with `pnpm install --frozen-lockfile` when matching CI. | ||||||
| - Full local gate and pre-push hook: `pnpm verify` (`format:check -> lint -> code-mode:check-api -> schema:check -> docs:check -> typecheck -> test -> benchmark:check -> build`). | ||||||
| - Fast focused checks: `pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, `pnpm build`. | ||||||
| - Agents share this machine: run targeted checks only. Never run `pnpm verify`, the whole suite, or repo-wide `pnpm lint`/`typecheck`/`build` locally, and start no background checks unless the user asks. | ||||||
| - Targeted checks: one test file per run (below), the typecheck of the one package you changed (`pnpm --filter <pkg> typecheck`), and `oxfmt --check <files>` / `oxlint <files>` on the files you changed. | ||||||
| - CI runs `pnpm verify` (`format:check -> lint -> code-mode:check-api -> schema:check -> docs:check -> typecheck -> test -> benchmark:check -> build`); leave full gates to it. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. List every The CI pipeline list in Suggested fix
Committable suggestion
|
||||||
| - Run one package: `pnpm --filter @caplets/core test`, `pnpm --filter @caplets/sdk test`, `pnpm --filter caplets build`, or replace the filter with `@caplets/opencode`, `@caplets/pi`, or `@caplets/benchmarks`. | ||||||
| - Run one Vitest file by passing it after the package script, e.g. `pnpm --filter @caplets/core test -- test/config.test.ts`. | ||||||
| - Dev server: `pnpm dev` builds/watches `@caplets/core` and restarts `packages/cli/dist/index.js`; run `pnpm build` first if CLI dist output is missing. | ||||||
|
|
@@ -62,5 +63,5 @@ This is a single-context repo: start with root `CONTEXT.md` and relevant ADRs in | |||||
|
|
||||||
| - CI runs `pnpm verify` plus `pnpm changeset status --since=origin/main` on PRs unless the PR has the `no changeset` label. | ||||||
| - User-facing package changes usually need a changeset; current versioning is handled by Changesets and `pnpm version-packages`/`pnpm release`. | ||||||
| - Pre-commit only runs `pnpm lint-staged` (`oxfmt --check` and `oxlint` on staged JS/TS/config/docs files); pre-push runs the full `pnpm verify`. | ||||||
| - Pre-commit only runs `pnpm run lint:staged` (`oxfmt --check` and `oxlint` on staged JS/TS/config/docs files); there is no pre-push hook; CI runs the full `pnpm verify`. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Limit the The hook runs Scope Suggested fix
Committable suggestion
|
||||||
| - Alchemy deploy workflows are in `.github/workflows/deploy.yml` and `.github/workflows/pr-preview-deploy.yml`; check `alchemy.run.ts` and `infra/` before changing deploy behavior. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -361,19 +361,12 @@ the default launcher and image runtime. CI verifies the minimum and current rele | |
|
|
||
| ```sh | ||
| pnpm install --frozen-lockfile | ||
| pnpm verify | ||
| ``` | ||
|
|
||
| Useful focused checks: | ||
|
|
||
| ```sh | ||
| pnpm format:check | ||
| pnpm lint | ||
| pnpm typecheck | ||
| pnpm test | ||
| pnpm benchmark:check | ||
| pnpm build | ||
| ``` | ||
| Check only what you changed: `oxfmt --check <files>` and `oxlint <files>` on changed files, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new |
||
| `pnpm --filter <package> typecheck` for the one package touched, and one test file at a time, e.g. | ||
| `pnpm --filter @caplets/core test -- test/config.test.ts`. The pre-commit hook runs format and lint on | ||
| staged files. CI runs the full `pnpm verify` on every pull request. | ||
|
|
||
| Package map: | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run the local formatter and linter through pnpm.
oxfmtandoxlintare devDependencies.pnpm installplaces their binaries innode_modules/.bin, which an interactive shell does not add toPATH. In that shell, the bare commands can fail withcommand not found. Use thepnpm execform in this guidance and in the README.Suggested fix for AGENTS.md
Apply the same
pnpm execprefix to theoxfmt --checkandoxlintcommands in README.md:366.Committable suggestion