# @metricinsights/qa-ai-rules

> Shared QA rules for AI coding tools (Cursor, Claude Code) across MI repositories

Latest version **1.2.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @metricinsights/qa-ai-rules
pnpm add @metricinsights/qa-ai-rules
yarn add @metricinsights/qa-ai-rules
bun add @metricinsights/qa-ai-rules
```

Provides the command `qa-ai-rules`.

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-09-24 |
| First published | 2026-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=22.12 |
| Dependencies | 3 |
| Unpacked size | 24.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Serhii Shpak |
| Maintainers | mi.graysonstebbins, michail.ozdemir.metricinsights, mi-npm, serhii.shpak.metricinsights |
| Keywords | qa, testing, cursor, claude, ai, rules, metricinsights |

## Links

- npm: https://www.npmjs.com/package/@metricinsights/qa-ai-rules
- Repository: https://github.com/mi-examples/qa-ai-rules
- Homepage: https://github.com/mi-examples/qa-ai-rules#readme
- Issues: https://github.com/mi-examples/qa-ai-rules/issues
- npm.io page: https://npm.io/package/@metricinsights/qa-ai-rules

## Dependencies (3)

- [cac](https://npm.io/package/cac.md) ^7.0.0
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1
- [@clack/prompts](https://npm.io/package/@clack/prompts.md) ^1.8.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2026-09-24
- 1.1.0 — 2026-05-22
- 1.0.1 — 2026-05-13
- 1.0.0 — 2026-04-09

## README

# @metricinsights/qa-ai-rules

Shared QA/testing rules for AI coding tools, distributed as an npm package. Install once, get consistent test-case rules across all your repositories.

Currently supports **Cursor IDE** and **Claude Code**.

## Installation

```bash
npx @metricinsights/qa-ai-rules
```

This runs the interactive setup and adds the package to your `devDependencies` automatically.

## Setup

The `init` command walks you through tool selection, updates `.gitignore`, and installs rule files:

```bash
npx qa-ai-rules          # interactive setup (default)
npx qa-ai-rules init     # same as above
```

Or skip prompts with flags:

```bash
npx qa-ai-rules init --cursor
npx qa-ai-rules init --cursor --claude
```

This creates `qa-ai-rules.config.json` at your repo root — commit this file:

```json
{
  "tools": {
    "cursor": true,
    "claude": false
  }
}
```

## CLI commands

| Command                   | Description                                                 |
| ------------------------- | ----------------------------------------------------------- |
| `npx qa-ai-rules`         | Interactive setup (default)                                 |
| `npx qa-ai-rules init`    | Select tools, update `.gitignore`, install rule files       |
| `npx qa-ai-rules install` | Silent reinstall from existing config (used by postinstall) |
| `npx qa-ai-rules status`  | Show config, installed files, and `.gitignore` health       |

## Where files are installed

| Tool        | Destination                        |
| ----------- | ---------------------------------- |
| Cursor IDE  | `.cursor/rules/qa-ai-rules--*.mdc` |
| Claude Code | `.claude/rules/qa-ai-rules/*.md`   |

Generated files are **gitignored** automatically. Only `qa-ai-rules.config.json` is committed.

> **Note:** Cursor does not load `.mdc` files from subdirectories of `.cursor/rules/`, so rules are installed flat with a `qa-ai-rules--` filename prefix. Claude Code supports subdirectories natively.

## Included rules

| File                  | Description                                                        |
| --------------------- | ------------------------------------------------------------------ |
| `test-case-rules`     | Structure, formatting, and content rules for generating test cases |
| `test-suite-template` | Starter template for a page-level test suite                       |

## Updating

`postinstall` automatically reinstalls rule files whenever you run `npm install`. To pick up new rules after a version bump, just update the package:

```bash
npm update @metricinsights/qa-ai-rules
```

Use Dependabot to auto-update minor and patch bumps.

## Publishing

Stable releases go to [registry.npmjs.org](https://www.npmjs.com/package/@metricinsights/qa-ai-rules) when a `v*` tag is pushed. The [Production Release](.github/workflows/release.yml) workflow publishes via **npm Trusted Publisher** (OIDC) — no `NPM_TOKEN` secret.

**One-time setup on npmjs.com** (package **Settings** → **Trusted publishing** → GitHub Actions):

| Field | Value |
| ----- | ----- |
| Organization / user | `mi-examples` |
| Repository | `qa-ai-rules` |
| Workflow filename | `release.yml` |

After the first successful OIDC publish, you can disable token-based publishing under **Publishing access** and remove the `NPM_TOKEN` repository secret.

Beta pre-releases are created from `develop` via [release-beta.yml](.github/workflows/release-beta.yml) (GitHub pre-release only, not published to npm).

## License

MIT

---
_Source: https://npm.io/package/@metricinsights/qa-ai-rules · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
