-
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 all 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,54 @@ | ||
| --- | ||
| 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" | ||
| --- | ||
|
|
||
| ## 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 | Commands | | ||
| | -------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------- | | ||
| | `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 <file>` | | ||
|
|
||
| `insomnia-smoke-test` has no `type-check` script. `insomnia-inso` has no generic `test` script. | ||
|
|
||
| ## Lint | ||
|
|
||
| Format then fix then verify: | ||
|
|
||
| ```bash | ||
| npx prettier --write <changed files> | ||
| npx eslint --fix <changed files> | ||
| npm run lint -w <workspace> | ||
| ``` | ||
|
|
||
| ## Targeted Tests | ||
|
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 could also tell it explicitly to either auto-fix or not fix the issues found in tests to be clear on its goals. |
||
|
|
||
| Narrow to a single file using `--run`: | ||
|
|
||
| ```bash | ||
| npm test -w <workspace> -- --run src/<path>/<file>.test.ts | ||
| ``` | ||
|
|
||
| For smoke tests: | ||
|
|
||
| ```bash | ||
| npm run test:dev -w insomnia-smoke-test -- --project=Smoke tests/smoke/<file>.test.ts | ||
| ``` | ||
|
|
||
| To run smoke tests against the dev server, start `npm run dev` in a separate terminal first. Use `npm run app-build` + `npm run test:build` only when the failure requires a production build. | ||
|
|
||
| ## Escalate When | ||
|
|
||
| - Change spans more than one workspace | ||
| - Root config changed (`package.json`, `package-lock.json`, `eslint.config.mjs`) | ||
| - Renderer/main boundary touched — also run `npm run check:renderer-node-imports -w insomnia` | ||
|
|
||
| ```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. |
||
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