-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore: add quick-check skill and document it in AGENTS.md #9955
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
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| --- | ||
| name: quick-check | ||
| description: "Run the smallest useful format, lint, type-check, or test command for the affected Insomnia workspace, and only escalate to broader validation when the change scope justifies it." | ||
| argument-hint: "Provide changed file paths and the desired check type (format, lint, type-check, test), or name the target workspace and what you want validated" | ||
| --- | ||
|
|
||
| # Quick Workspace Checks | ||
|
|
||
| ## When to Use | ||
|
|
||
| - You are iterating on a change and want the fastest useful validation loop. | ||
| - The change is limited to one workspace or a small set of files. | ||
| - You do not want repo-wide checks yet. | ||
|
|
||
| ## Core Rule | ||
|
|
||
| Choose the smallest affected workspace first. Only expand to more workspaces or repo-wide checks when the change crosses boundaries. | ||
|
|
||
| ## Workspace Mapping | ||
|
Member
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. IMO, workspace seems not to be that useful since most changes also affect other workspaces. A full repo |
||
|
|
||
| | Changed paths | Workspace | Quick checks | | ||
| | -------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| | `packages/insomnia/**` | `insomnia` | `npm run lint -w insomnia`, `npm run type-check -w insomnia`, `npm test -w insomnia` | | ||
| | `packages/insomnia-api/**` | `insomnia-api` | `npm run lint -w insomnia-api`, `npm run type-check -w insomnia-api` | | ||
|
|
||
| | `packages/insomnia-inso/**` | `insomnia-inso` | `npm run lint -w insomnia-inso`, `npm run type-check -w insomnia-inso`, `npm run test:unit -w insomnia-inso` | | ||
| | `packages/insomnia-testing/**` | `insomnia-testing` | `npm run lint -w insomnia-testing`, `npm run type-check -w insomnia-testing`, `npm test -w insomnia-testing` | | ||
| | `packages/insomnia-scripting-environment/**` | `insomnia-scripting-environment` | `npm run lint -w insomnia-scripting-environment`, `npm run type-check -w insomnia-scripting-environment`, `npm test -w insomnia-scripting-environment` | | ||
| | `packages/insomnia-smoke-test/**` | `insomnia-smoke-test` | `npm run lint -w insomnia-smoke-test`, `npm run test:dev -w insomnia-smoke-test -- --project=Smoke <optional file>` | | ||
|
|
||
|
|
||
| ## Check Types | ||
|
|
||
| - `format` | ||
| ```bash | ||
| npx prettier --write <changed files> | ||
| ``` | ||
| - `lint` | ||
| Run prettier, then eslint --fix, then verify: | ||
| ```bash | ||
| npx prettier --write <changed files> | ||
| npx eslint --fix <changed files> | ||
| npm run lint -w <workspace> | ||
| ``` | ||
| - `type-check` | ||
| ```bash | ||
| npm run type-check -w <workspace> | ||
| ``` | ||
| - `test` | ||
| Use the workspace test command or the narrowest file-specific test you can. | ||
|
|
||
| ## Targeted Test Shortcuts | ||
|
|
||
| - App: | ||
| ```bash | ||
| npm test -w insomnia -- --run src/<path>/<file>.test.ts | ||
| ``` | ||
| - Testing: | ||
| ```bash | ||
| npm test -w insomnia-testing -- --run src/<path>/<file>.test.ts | ||
| ``` | ||
| - Scripting environment: | ||
| ```bash | ||
| npm test -w insomnia-scripting-environment -- --run src/<path>/<file>.test.ts | ||
| ``` | ||
| - CLI: | ||
| ```bash | ||
| npm run test:unit -w insomnia-inso | ||
| ``` | ||
| - Smoke: | ||
| ```bash | ||
| npm run test:dev -w insomnia-smoke-test -- --project=Smoke tests/smoke/<file>.test.ts | ||
| ``` | ||
|
|
||
| ## App E2E Near Push | ||
|
|
||
| Prefer the fastest path first. | ||
|
|
||
| ### Fast dev-runtime path | ||
|
|
||
| Run these in separate terminals: | ||
|
|
||
| - Terminal 1: | ||
| ```bash | ||
| npm run dev | ||
| ``` | ||
| or | ||
| ```bash | ||
| npm run watch:app | ||
| ``` | ||
| - Terminal 2: | ||
| ```bash | ||
| npm run test:dev -w insomnia-smoke-test -- --project=Smoke tests/smoke/<file>.test.ts | ||
| ``` | ||
|
|
||
| ### Built-app path | ||
|
|
||
| Use this when Vite config changed, when you need build-mode confidence, or when the failure only reproduces in the built app. | ||
|
|
||
| Run these as separate steps, preferably in separate terminals: | ||
|
|
||
| - Terminal 1: | ||
| ```bash | ||
| npm run app-build | ||
| ``` | ||
| - Terminal 2: | ||
| ```bash | ||
| npm run test:build -w insomnia-smoke-test -- --project=Smoke tests/smoke/<file>.test.ts | ||
| ``` | ||
|
|
||
| ## Escalate Scope When | ||
|
|
||
| - You changed more than one workspace. | ||
| - You changed root config or shared tooling such as `package.json`, `package-lock.json`, or `eslint.config.mjs`. | ||
| - You changed shared code paths used by multiple workspaces. | ||
| - You touched the renderer/main boundary. In that case consider: | ||
| ```bash | ||
| npm run check:renderer-node-imports -w insomnia | ||
| ``` | ||
|
|
||
| If the scope is broad enough, use the repo-wide commands: | ||
|
|
||
| ```bash | ||
| npm run lint | ||
| npm run type-check | ||
| npm test | ||
| ``` | ||
|
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. Maybe we can give it an early exit condition section to prevent any spikes. We could also have it not write everything to the terminal so only errors are shown to lower token usage even more. |
||
|
|
||
| ## Notes | ||
|
|
||
| - In VS Code, format-on-save runs Prettier (`esbenp.prettier-vscode`) then ESLint autofix (`source.fixAll.eslint`) in that order. The lint check type above replicates this. | ||
| - `insomnia-smoke-test` has no `type-check` script. | ||
| - `insomnia-inso` has no generic `test` script; prefer `test:unit` for quick checks. | ||
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.
It might be worth adding
allowed toolsto the metadata for the commands it'll use. We can scope to specific commands not purely *. So,npx prettier *instead ofnpx *- docs