@shivaedev/quality 0.70.2 → 0.70.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +12 -12
  3. package/dist/adapters/outsideImportFindings.d.ts.map +1 -1
  4. package/dist/adapters/outsideImportFindings.js +1 -0
  5. package/dist/adapters/outsideImportFindings.js.map +1 -1
  6. package/dist/baseline/update.d.ts +1 -1
  7. package/dist/baseline/update.d.ts.map +1 -1
  8. package/dist/baseline/update.js +4 -7
  9. package/dist/baseline/update.js.map +1 -1
  10. package/dist/cli/args.d.ts +0 -2
  11. package/dist/cli/args.d.ts.map +1 -1
  12. package/dist/cli/args.js +0 -2
  13. package/dist/cli/args.js.map +1 -1
  14. package/dist/cli/baseline.d.ts +1 -1
  15. package/dist/cli/baseline.d.ts.map +1 -1
  16. package/dist/cli/baseline.js +12 -26
  17. package/dist/cli/baseline.js.map +1 -1
  18. package/dist/cli/misplaced.d.ts +0 -7
  19. package/dist/cli/misplaced.d.ts.map +1 -1
  20. package/dist/cli/misplaced.js +2 -4
  21. package/dist/cli/misplaced.js.map +1 -1
  22. package/dist/cli/program.js +1 -1
  23. package/dist/cli/program.js.map +1 -1
  24. package/dist/cli/reportBaselineWrite.d.ts +4 -0
  25. package/dist/cli/reportBaselineWrite.d.ts.map +1 -0
  26. package/dist/cli/reportBaselineWrite.js +19 -0
  27. package/dist/cli/reportBaselineWrite.js.map +1 -0
  28. package/dist/cli/usage.d.ts +1 -1
  29. package/dist/cli/usage.d.ts.map +1 -1
  30. package/dist/cli/usage.js +3 -3
  31. package/dist/rules/effect/adapterImports.js +1 -1
  32. package/dist/rules/effect/adapterImports.js.map +1 -1
  33. package/docs/debt-and-hooks.md +5 -7
  34. package/package.json +1 -1
  35. package/src/adapters/outsideImportFindings.ts +1 -0
  36. package/src/baseline/update.ts +3 -9
  37. package/src/cli/args.ts +0 -4
  38. package/src/cli/baseline.ts +10 -28
  39. package/src/cli/misplaced.ts +2 -4
  40. package/src/cli/program.ts +1 -1
  41. package/src/cli/reportBaselineWrite.ts +26 -0
  42. package/src/cli/usage.ts +3 -3
  43. package/src/rules/effect/adapterImports.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.70.3 - 2026-11-07
4
+
5
+ ### Fixed
6
+
7
+ - Accept recharts imports in `client/` folders for shadcn charts while continuing to report them in server modules. Prefer shadcn's Chart component (`ChartContainer` and friends) over raw recharts primitives where it covers the case.
8
+
3
9
  ## 0.70.2 - 2026-11-07
4
10
 
5
11
  ### Fixed
package/README.md CHANGED
@@ -124,9 +124,9 @@ The `ambient-runtime` Biome plugin also reports `Effect.run*` calls whose comput
124
124
 
125
125
  `effect/service-parameters` reports parameters carrying a service in exported and local functions and public methods, including returned factories and function-typed parameters returning services. It follows service classes and tags, non-empty Contexts and service implementation shapes through aliases, interfaces, generic constraints, inferred parameters and destructuring. Read services from Effect's environment instead. An Effect or Stream requiring a service is a computation and is accepted. Methods implementing a service and functions constructing Layers may take services as parameters. Within Effect code, `test-support/` folders are exempt from this rule; `adapters/` folders are checked. Module-level PascalCase functions returning React nodes or elements are components: their props and callback prop signatures may carry services, including a connection’s AtomRegistry. An ordinary function taking the same service still fails. Callbacks whose arguments are supplied by their owner keep those arguments, including object methods contextually typed by a foreign signature; wrapping and returning a callback as a runtime operation still checks it. Test-kit registrations do not turn plain kit state into runtime service plumbing. Type predicates inspect service values without declaring a runtime dependency. Operation parameters supplied exclusively by the service’s `methods: (state)` argument, directly or through other such parameters, carry owned initializer state, including the Layer’s own Scope. A hand-built state object or an independent Scope parameter still counts as service plumbing. Owned fibers, closeable scopes and native atom evaluation contexts follow Effect’s lifecycle conventions; wrapping a function with `Effect.fn` still checks its parameters. An adapter may pass a foreign resource between its functions when the calls supply values constructed through an outside library or received by its host callbacks, including local construction helpers and an Effect acquisition wrapper; reading that resource from the environment still counts as service plumbing. Installed implementation shapes are discovered in the consuming repository's package scopes, alongside the framework service package's scope.
126
126
 
127
- Both rules refuse config exceptions and inline suppressions. Record existing debt with `quality baseline write --rule effect/boundary --file src/legacy.ts` and `quality baseline write --rule effect/service-parameters --file src/legacy.ts`; the normal report and baseline burn-down apply.
127
+ Both rules refuse config exceptions and inline suppressions. Record existing debt with `quality baseline write --rule effect/boundary` and `quality baseline write --rule effect/service-parameters`; the normal report and baseline burn-down apply.
128
128
 
129
- When an upgrade expands these checks, inspect the new findings, repair the small ones and record retained debt with `quality baseline write --first-adoption --rule effect/boundary` (or `--rule effect/service-parameters`). This explicit first-adoption mode accepts every rule, including rules that permit config exceptions, and may record unchanged files. With an existing baseline, name the rules being adopted. Review each raised count and explain its reason in the pull request. Ordinary writes still require changed `--file` selections. Run `quality baseline tighten` after repairs to lower the touched files' counts.
129
+ When an upgrade expands these checks, inspect the new findings, fix every finding you can and record retained debt with `quality baseline write --rule effect/boundary` (or `--rule effect/service-parameters`). Writing the baseline accepts every rule, including rules that permit config exceptions, and records unchanged files. Omit `--rule` to record every current finding. The output names recorded rules and counts; for rules new since the previous baseline, review each case and report any misread to Platform with the file, lines and what Quality would need instead of leaving it as debt. Run `quality baseline tighten` after repairs to lower the touched files' counts.
130
130
 
131
131
  ### Package service ids
132
132
 
@@ -140,7 +140,7 @@ Import and local aliases, string literals and templates without substitutions ar
140
140
 
141
141
  `effect/service-folders` applies wherever a file declares `defineService`, as well as to conventional `services/<name>` folders. Each service has its own folder. Its declaration belongs in `service.ts` with one named service export, beside its operation files. A second declaration beside an existing `service.ts` belongs in a separate service folder.
142
142
 
143
- `effect/context-capture` rejects `Effect.provideContext`, `runPromiseWith` and `runForkWith` calls in core code, including imported aliases and destructured runners. It also checks the native Context overload of `Effect.provide`; Layer provision stays available. Composition roots and full-application test harnesses may merge inherited services with contexts built from Layers and acquire those Layers under an explicit restart scope with Scope.provide, or capture an environment inside an application whose requirements are fully provided by Layers. This follows the construction rather than the filename or folder; an ambient context in an ordinary service remains a finding. Yield the environment instead of capturing and re-providing it; runtime bridges belong in `adapters/` or `test-support/`. These service rules permit no config exceptions or inline suppressions. To adopt the policy in an existing repository, review retained findings and record them with `quality baseline write --first-adoption --rule effect/service-model --rule effect/service-folders --rule effect/context-capture`.
143
+ `effect/context-capture` rejects `Effect.provideContext`, `runPromiseWith` and `runForkWith` calls in core code, including imported aliases and destructured runners. It also checks the native Context overload of `Effect.provide`; Layer provision stays available. Composition roots and full-application test harnesses may merge inherited services with contexts built from Layers and acquire those Layers under an explicit restart scope with Scope.provide, or capture an environment inside an application whose requirements are fully provided by Layers. This follows the construction rather than the filename or folder; an ambient context in an ordinary service remains a finding. Yield the environment instead of capturing and re-providing it; runtime bridges belong in `adapters/` or `test-support/`. These service rules permit no config exceptions or inline suppressions. To adopt the policy in an existing repository, review retained findings and record them with `quality baseline write --rule effect/service-model --rule effect/service-folders --rule effect/context-capture`.
144
144
 
145
145
  The rule reports hidden configurations and method records, configuration and operation spreads, computed members, local implementations and inline bodies, including in adapters and tests. It takes no config exceptions or inline suppressions. See the [service guide](https://github.com/ShivaeDev/platform/tree/main/packages/service#1-assemble-the-service-from-focused-files) for the shape.
146
146
 
@@ -148,9 +148,9 @@ The rule reports hidden configurations and method records, configuration and ope
148
148
 
149
149
  `effect/adapter-imports` reports value imports of non-Effect dependencies, peers and optional dependencies, and Node builtins, at the import site. It includes side-effect imports, value re-exports, literal dynamic imports and `require` calls. Each package is checked against its own manifest; dev-only tools and workspace modules are accepted. Type-only imports and re-exports are accepted, including inline `type` specifiers when every binding is a type.
150
150
 
151
- Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages, plain Vitest imports in `.unit` tests, and rendering libraries in `client/` folders are accepted. The client rendering libraries are `react`, `react-dom`, `lucide-react`, `@base-ui/react`, `@tanstack/react-router`, `@tanstack/react-table`, `class-variance-authority`, `cn`, `clsx` and `tailwind-merge`, including their subpath imports. Import UI components, routing and styling helpers directly in client code. Libraries that perform I/O or manage external state, such as `axios`, `better-auth/react`, `@tanstack/react-query` and `zustand`, still need adapters there. Other outside libraries and non-client rendering imports still need adapters; entry points do not exempt imports.
151
+ Move the integration into an `adapters/` folder and expose Effect values to the rest of the application. Use `import type` when only a type is needed. Folders named `adapters/` and `test-support/`, Effect packages (`effect` and `@effect/*`, including `@effect/platform-node`), native `@shivaedev/*` framework packages, plain Vitest imports in `.unit` tests, and rendering libraries in `client/` folders are accepted. The client rendering libraries are `react`, `react-dom`, `recharts`, `lucide-react`, `@base-ui/react`, `@tanstack/react-router`, `@tanstack/react-table`, `class-variance-authority`, `cn`, `clsx` and `tailwind-merge`, including their subpath imports. Import UI components, routing and styling helpers directly in client code. Recharts is the stack's charting library; build charts with shadcn's Chart component (`ChartContainer` and friends) rather than raw recharts primitives where shadcn covers the case. Libraries that perform I/O or manage external state, such as `axios`, `better-auth/react`, `@tanstack/react-query` and `zustand`, still need adapters there. Other outside libraries and non-client rendering imports still need adapters; entry points do not exempt imports.
152
152
 
153
- The rule refuses config exceptions and inline suppressions. For existing debt, run `quality baseline write --first-adoption --rule effect/adapter-imports`; baseline shards keep one entry per file with its finding count. Run `quality baseline tighten` after moving integrations.
153
+ The rule refuses config exceptions and inline suppressions. For existing debt, run `quality baseline write --rule effect/adapter-imports`; baseline shards keep one entry per file with its finding count. Run `quality baseline tighten` after moving integrations.
154
154
 
155
155
  ### Shared error classes
156
156
 
@@ -170,7 +170,7 @@ The rule refuses config exceptions and inline suppressions. For existing debt, r
170
170
 
171
171
  The check follows Effect import aliases, local operation and handler aliases, nested calls and `.pipe(...)` stages. It recognizes FileSystem instances yielded from the native service and their local aliases. Retry options are checked as object literals; a spread may supply a bound. It does not infer whether a supplied schedule terminates or analyze arbitrary recovery helpers. Static findings identify these shapes, not every possible swallowed failure.
172
172
 
173
- This rule refuses config exceptions and inline suppressions, with no exempt folders. For first adoption, review each finding, fix small repairs and record retained debt with `quality baseline write --first-adoption --rule effect/failure-honesty`, explaining each retained entry in the pull request. Subsequent debt follows the normal changed-file baseline contract; run `quality baseline tighten` after repairs.
173
+ This rule refuses config exceptions and inline suppressions, with no exempt folders. Review each finding, fix what you can and record retained debt with `quality baseline write --rule effect/failure-honesty`. Run `quality baseline tighten` after repairs.
174
174
 
175
175
  ### 1. Once per repository: connect the shared policy
176
176
 
@@ -213,9 +213,9 @@ quality hooks install
213
213
 
214
214
  For an application setup script, use `quality setup`. It installs the same hook when the current folder has its own `.git` entry, including a linked worktree. An unversioned app or an app inside another repository leaves hooks alone.
215
215
 
216
- Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository, `quality baseline write` records error-level findings when there is no baseline; ordinary later writes require `--rule <id>` and `--file <path>`. Each selected path must be changed since `HEAD`; stage new files first. `quality baseline write --first-adoption` also records every rule repo-wide when there is no baseline, including rules that permit config exceptions. With an existing baseline, first-adoption writes require explicit `--rule <id>` selections for a policy upgrade; omitting them refuses the write. Ordinary later writes still require changed file selections.
216
+ Installing the package does not install a hook. `hooks install` writes the repository's pre-commit hook. A hook Quality did not write is kept unless `--force` replaces it. For an existing repository or a policy upgrade, `quality baseline write` records every current finding, including unchanged files. Add `--rule <id>` to record only selected rules. The output asks you to fix what you can first, then review each recorded case of rules new since the previous baseline and report misreads to Platform with the file, lines and what Quality would need instead of leaving them as debt.
217
217
 
218
- Apps generated by create-app provide `pnpm baseline write --rule <id> --file <path>` for adopting Quality upgrades in existing application code. Review the recorded findings and burn them down with `pnpm baseline tighten`; checks remain strict above the recorded counts. The starter stays free of Quality debt, so newly generated apps start with an empty baseline.
218
+ Apps generated by create-app provide `pnpm baseline write` for adopting Quality upgrades in existing application code. Review the recorded findings and burn them down with `pnpm baseline tighten`; checks remain strict above the recorded counts. The starter stays free of Quality debt, so newly generated apps start with an empty baseline.
219
219
 
220
220
  Use `pnpm format --rule react/jsx-conditionals` (or `quality fix --rule react/jsx-conditionals`) for mechanical repairs. It extracts a conditional child into a variable before its return when the enclosing intrinsic elements or fragments have no attributes or other children. It preserves the conditional expression, including falsy values such as `0`, and leaves mapped children, component elements and evaluation-sensitive cases for manual repair. Remaining findings are printed and exit 1 even when the baseline covers them. The rule-specific command does not run Biome’s unsafe fixes.
221
221
 
@@ -404,10 +404,10 @@ quality baseline tighten
404
404
  When a Quality upgrade adds a check, or a reviewed change needs to record one rule's findings again:
405
405
 
406
406
  ```sh
407
- quality baseline write --rule tests/story-setup --file src/orders.spec.ts
407
+ quality baseline write --rule tests/story-setup
408
408
  ```
409
409
 
410
- Keep the default error level. The command replaces that rule's entries only for the selected changed files. Repeat `--file` for additional paths; every other entry stays unchanged. Call out any new or raised count in the review and the pull request description. The [debt and hook guide](https://github.com/ShivaeDev/platform/blob/main/packages/quality/docs/debt-and-hooks.md) covers the baseline format, exception subjects, limit changes, renames and commit checks.
410
+ Keep the default error level. The command replaces that rule's entries across all files; every other rule's entries stay unchanged. Omit `--rule` to record every finding. Review the recorded cases using the guidance printed after each write. The [debt and hook guide](https://github.com/ShivaeDev/platform/blob/main/packages/quality/docs/debt-and-hooks.md) covers the baseline format, exception subjects, limit changes, renames and commit checks.
411
411
 
412
412
  ### Baseline merges
413
413
 
@@ -430,7 +430,7 @@ Package `exports` are public API, including wildcard targets and source conditio
430
430
 
431
431
  When Knip cannot produce a valid report, including when a tool config such as `prisma.config.ts` throws because `DATABASE_URL` is missing, `code/unused` reports one finding on the root `package.json` with the tool’s output and repair guidance. The other rules still run. This finding means unused-code analysis did not complete; repair the failure and rerun the gate.
432
432
 
433
- For adoption, run `quality baseline write --rule code/unused --file src/legacy.ts` and review the recorded debt. Burn it down by deleting unused code, removing unused dependency declarations, declaring missing dependencies, or connecting code to a real entry point. Run `quality baseline tighten` after repairs, or `quality baseline prune` across the repository. Do not add an entry point just to hide dead code.
433
+ For adoption, run `quality baseline write --rule code/unused` and review the recorded debt. Burn it down by deleting unused code, removing unused dependency declarations, declaring missing dependencies, or connecting code to a real entry point. Run `quality baseline tighten` after repairs, or `quality baseline prune` across the repository. Do not add an entry point just to hide dead code.
434
434
 
435
435
  ### What the rules check
436
436
 
@@ -593,7 +593,7 @@ quality fix [--config <file>]
593
593
  quality exceptions migrate [--config <file>] [--from <registry>]
594
594
  quality baseline merge <ancestor> <current> <other>
595
595
  quality baseline install-driver
596
- quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]
596
+ quality baseline write [--config <file>] [--rule <id>]...
597
597
  quality baseline prune [--config <file>] [--against <ref>]
598
598
  quality baseline tighten [--config <file>] [--staged]
599
599
  quality baseline migrate [--config <file>] [--from <file>]
@@ -1 +1 @@
1
- {"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA0BpD,eAAO,MAAM,qBAAqB,yFA6ChC,CAAC"}
1
+ {"version":3,"file":"outsideImportFindings.d.ts","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAMhF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA2BpD,eAAO,MAAM,qBAAqB,yFA6ChC,CAAC"}
@@ -7,6 +7,7 @@ import { testName } from "#naming/testName.ts";
7
7
  const CLIENT_RENDERING_LIBRARIES = new Set([
8
8
  "react",
9
9
  "react-dom",
10
+ "recharts",
10
11
  "lucide-react",
11
12
  "@base-ui/react",
12
13
  "@tanstack/react-router",
@@ -1 +1 @@
1
- {"version":3,"file":"outsideImportFindings.js","sourceRoot":"","sources":["../../src/adapters/outsideImportFindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IAC1C,OAAO;IACP,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,wBAAwB;IACxB,uBAAuB;IACvB,0BAA0B;IAC1B,IAAI;IACJ,MAAM;IACN,gBAAgB;CAChB,CAAC,CAAC;AAEH,SAAS,MAAM,CAAC,IAAY,EAAE,IAAY;IACzC,OAAO,CACN,sCAAsC,CAAC,IAAI,CAAC,IAAI,CAAC;WAC9C,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;WAC1E,IAAI,KAAK,QAAQ;WACjB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;WAC3B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;WAC9B,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAC3E,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,EAAE,CAAC,+BAA+B,CAAC,CAAC,QAAQ,CAAC,EACxF,MAAkB;IAElB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,WAAW,CAA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,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;KACnE,CAAC;IACF,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,IAAI,GAAG,CAAC;QACzE,IACC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;eACrB,IAAI,CAAC,IAAI;eACT,IAAI,CAAC,IAAI,KAAK,QAAQ;eACtB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;eAC5B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAC5E,CAAC;YACF,OAAO,EAAE,CAAC;QACX,CAAC;QACD,OAAO;YACN;gBACC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,4BAA4B,IAAI,CAAC,SAAS,iOAAiO;aACpR;SACD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -15,7 +15,7 @@ export interface Pruned {
15
15
  readonly moved: number;
16
16
  readonly removed: number;
17
17
  }
18
- export declare function adopt(existing: readonly BaselineEntry[] | undefined, rules: readonly string[], violations: readonly Violation[], index: RuleIndex, files?: ReadonlySet<string>): Adoption;
18
+ export declare function adopt(existing: readonly BaselineEntry[] | undefined, rules: readonly string[], violations: readonly Violation[], index: RuleIndex): Adoption;
19
19
  export interface Scope {
20
20
  readonly files?: ReadonlySet<string> | undefined;
21
21
  readonly moves: ReadonlyMap<string, string>;
@@ -1 +1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AAC,CAAC;CAC5C;AAiBD,wBAAgB,KAAK,CACpB,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,KAAK,EAAE,SAAS,EAChB,KAAK,GAAE,KAA4B,GACjC,MAAM,CAsBR"}
@@ -17,19 +17,16 @@ function refusal(id, index) {
17
17
  }
18
18
  return [];
19
19
  }
20
- export function adopt(existing, rules, violations, index, files) {
21
- if (existing !== undefined && rules.length === 0) {
22
- return { _tag: "Refused", reasons: ["a baseline exists. Record a rule with --rule <id>, or drop fixed debt with prune."] };
23
- }
20
+ export function adopt(existing, rules, violations, index) {
24
21
  const reasons = rules.flatMap((id) => refusal(id, index));
25
22
  if (reasons.length > 0) {
26
23
  return { _tag: "Refused", reasons };
27
24
  }
28
25
  function named(rule) {
29
- return rules.some((name) => covers(name, rule));
26
+ return rules.length === 0 || rules.some((name) => covers(name, rule));
30
27
  }
31
- const kept = (existing ?? []).filter((entry) => !(named(entry.rule) && (files === undefined || files.has(entry.file))));
32
- const adopted = violations.filter((violation) => (rules.length === 0 || named(violation.rule)) && (files === undefined || files.has(violation.file)));
28
+ const kept = (existing ?? []).filter((entry) => !named(entry.rule));
29
+ const adopted = violations.filter((violation) => named(violation.rule));
33
30
  const added = record(adopted);
34
31
  return { _tag: "Adopted", added: added.length, entries: [...kept, ...added], replaced: (existing ?? []).length - kept.length };
35
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/baseline/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAkC,MAAM,sBAAsB,CAAC;AAavG,SAAS,MAAM,CAAC,UAAgC;IAC/C,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,IAA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I,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7G,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9C,OAAO,EAAE,CAAC;QACX,CAAC;QACD,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACrG,CAAC,CAAC,CAAC;IACH,OAAO;QACN,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;QACvC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM;QAChF,KAAK;QACL,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;KACtC,CAAC;AACH,CAAC"}
@@ -26,8 +26,6 @@ export type Command = {
26
26
  readonly _tag: "BaselineWrite";
27
27
  readonly config: string | undefined;
28
28
  readonly rules: readonly string[];
29
- readonly files: readonly string[];
30
- readonly firstAdoption: boolean;
31
29
  } | {
32
30
  readonly _tag: "BaselinePrune";
33
31
  readonly config: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,OAAO,GAChB;IAAE,QAAQ,C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Adoption: values["first-adoption"] === true,
35
33
  rules: values.rule ?? [],
36
34
  });
37
35
  case "baseline prune":
@@ -1 +1 @@
1
- {"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAe,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA4BlD,SAAS,KAAK,CAAC,OAAe;IAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,OAAgB;IAC/B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,GAAG,CAAC,OAA2B,EAAE,OAAgB;IACzD,OAAO,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,mCAAmC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpH,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,MAAc;IAC/C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,IAAI;YACR,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC,CAAC;QACnE,KAAK,OAAO;YACX,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1C,KAAK,MAAM;YACV,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,E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AAI,OAAO,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC"}
@@ -3,6 +3,6 @@ import { type Scope } from "#baseline/update.ts";
3
3
  import { type Session } from "#engine/session.ts";
4
4
  import { SetupFailure } from "#failure.ts";
5
5
  import type { RuleServices } from "#rule.ts";
6
- export declare const writeBaseline: (cwd: string, config: string | undefined, rules: readonly string[], files: readonly string[], firstAdoption?: any) => Effect.Effect<void, SetupFailure, RuleServices>;
6
+ export declare const writeBaseline: (cwd: string, config: string | undefined, rules: readonly string[]) => Effect.Effect<void, SetupFailure, RuleServices>;
7
7
  export declare const shrinkBaseline: <TRequirements>(cwd: string, config: string | undefined, scopeOf: (session: Session) => Effect.Effect<Scope, SetupFailure, TRequirements>) => Effect.Effect<void, SetupFailure, TRequirements | RuleServices>;
8
8
  //# sourceMappingURL=baseline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAyB,MAAM,QAAQ,CAAC;AAGhE,OAAO,EAA6B,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,eAAO,MAAM,aAAa,uKAoCxB,CAAC;AAWH,eAAO,MAAM,cAAc,GAA8C,aAAa,8DAGlE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,oEAa/E,CAAC"}
1
+ {"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAmB,MAAM,QAAQ,CAAC;AAG1D,OAAO,EAA6B,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,eAAO,MAAM,aAAa,wHAmBxB,CAAC;AAWH,eAAO,MAAM,cAAc,GAA8C,aAAa,8DAGlE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,CAAC,oEAa/E,CAAC"}
@@ -1,11 +1,10 @@
1
- import * as NodePath from "@effect/platform-node/NodePath";
2
- import { Console, Effect, Path } from "effect";
1
+ import { Console, Effect } from "effect";
3
2
  import { saveShards } from "#baseline/shards.ts";
4
3
  import { adopt, prune } from "#baseline/update.ts";
4
+ import { reportBaselineWrite } from "#cli/reportBaselineWrite.ts";
5
5
  import { openSession } from "#engine/session.ts";
6
6
  import { applyRegistry } from "#exceptions/registry.ts";
7
7
  import { SetupFailure } from "#failure.ts";
8
- import { changesSince } from "#git/history.ts";
9
8
  import { plural } from "#report/plural.ts";
10
9
  function save(session, entries) {
11
10
  return saveShards(session.config, session.baseline.files, entries);
@@ -13,35 +12,22 @@ function save(session, entries) {
13
12
  function unregistered(session) {
14
13
  return applyRegistry(session.violations, session.registry, session.config).kept;
15
14
  }
16
- export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (cwd, config, rules, files, firstAdoption = false) {
17
- const { relative, resolve } = yield* Path.Path.pipe(Effect.provide(NodePath.layer));
15
+ export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (cwd, config, rules) {
18
16
  const session = yield* openSession(cwd, config);
19
- const existing = session.baseline.files.size === 0 ? undefined : session.baseline.entries;
20
- if (existing !== undefined && files.length === 0 && !firstAdoption) {
21
- return yield* new SetupFailure({
22
- message: "baseline write refused: a baseline exists. Record a rule with --rule <id> and --file <path>; use prune for moved or fixed debt.",
23
- });
24
- }
25
- const selected = files.length === 0 ? undefined : new Set(files.map((file) => relative(session.config.root, resolve(session.config.root, file))));
26
- if (selected !== undefined && !firstAdoption) {
27
- const changed = yield* changesSince(session.config.root, ["HEAD"]);
28
- const outside = [...selected].filter((file) => !changed.files.has(file));
29
- if (outside.length > 0) {
30
- return yield* new SetupFailure({
31
- message: `baseline write refused: outside the current change set: ${outside.join(", ")}. Stage new files with git add first.`,
32
- });
33
- }
34
- }
35
- const adoption = adopt(existing, rules, unregistered(session), session.config, selected);
17
+ const existing = session.baseline.entries;
18
+ const adoption = adopt(existing, rules, unregistered(session), session.config);
36
19
  if (adoption._tag === "Refused") {
37
20
  return yield* new SetupFailure({ message: `baseline write refused:\n${adoption.reasons.map((reason) => ` - ${reason}`).join("\n")}` });
38
21
  }
39
22
  if (adoption.added === 0 && adoption.replaced === 0) {
40
- return yield* Console.log(`quality: no error-level violations to record; ${session.config.baseline} is unchanged.`);
23
+ yield* Console.log(`quality: no error-level violations to record; ${session.config.baseline} is unchanged.`);
24
+ }
25
+ else {
26
+ yield* save(session, adoption.entries);
27
+ const replaced = adoption.replaced > 0 ? `, replacing ${plural(adoption.replaced, "entry", "entries")}` : "";
28
+ yield* Console.log(`quality: recorded ${plural(adoption.added, "entry", "entries")} in ${session.config.baseline}${replaced}.`);
41
29
  }
42
- yield* save(session, adoption.entries);
43
- const replaced = adoption.replaced > 0 ? `, replacing ${plural(adoption.replaced, "entry", "entries")}` : "";
44
- yield* Console.log(`quality: recorded ${plural(adoption.added, "entry", "entries")} in ${session.config.baseline}${replaced}.`);
30
+ yield* reportBaselineWrite(existing, adoption.entries, rules);
45
31
  });
46
32
  function changes(pruned) {
47
33
  const parts = [
@@ -1 +1 @@
1
- {"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/cli/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAmB,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAe,KAAK,EAAc,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAgB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,SAAS,IAAI,CAAC,OAAgB,EAAE,OAAiC;IAChE,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB;IACrC,OAAO,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;AACjF,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,EACpE,GAAW,E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CAAC,YAAY,OAAO,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC"}
@@ -9,13 +9,6 @@ export declare const OPTIONS: {
9
9
  readonly coverage: {
10
10
  readonly type: "boolean";
11
11
  };
12
- readonly file: {
13
- readonly multiple: true;
14
- readonly type: "string";
15
- };
16
- readonly "first-adoption": {
17
- readonly type: "boolean";
18
- };
19
12
  readonly force: {
20
13
  readonly type: "boolean";
21
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"misplaced.d.ts","sourceRoot":"","sources":["../../src/cli/misplaced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,OAAO;aACnB,OAAO;iBAAI,IAAI,EAAE,QAAQ;;aACzB,MAAM;iBAAI,IAAI,EAAE,QAAQ;;aACxB,QAAQ;iBAAI,IAAI,EAAE,SAAS;;aAC3B,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,gBAAgB;iBAAI,IAAI,EAAE,SAAS;;aACnC,KAAK;iBAAI,IAAI,EAAE,SAAS;;aACxB,IAAI;iBAAI,IAAI,EAAE,QAAQ;;aACtB,IAAI;iBAAI,KAAK,EAAE,GAAG;iBAAE,IAAI,EAAE,SAAS;;aACnC,IAAI;iBAAI,QAAQ;iBAAQ,IAAI,EAAE,QAAQ;;aACtC,MAAM;iBAAI,IAAI,EAAE,SAAS;;CAChB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC;IAAE,OAAO,EAAE,OAAO,OAAO,CAAC;IAAC,gBAAgB,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEjH,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAIvD,eAA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: "string" },
3
3
  config: { type: "string" },
4
4
  coverage: { type: "boolean" },
5
- file: { multiple: true, type: "string" },
6
- "first-adoption": { type: "boolean" },
7
5
  force: { type: "boolean" },
8
6
  from: { type: "string" },
9
7
  help: { short: "h", type: "boolean" },
10
8
  rule: { multiple: true, type: "string" },
11
9
  staged: { type: "boolean" },
12
10
  };
13
- const COMMAND_OPTIONS = ["against", "coverage", "file", "first-adoption", "force", "from", "rule", "staged"];
11
+ const COMMAND_OPTIONS = ["against", "coverage", "force", "from", "rule", "staged"];
14
12
  export const ACCEPTS = {
15
13
  "baseline install-driver": [],
16
14
  "baseline migrate": ["from"],
17
15
  "baseline prune": ["against"],
18
16
  "baseline tighten": ["staged"],
19
- "baseline write": ["rule", "file", "first-adoption"],
17
+ "baseline write": ["rule"],
20
18
  ci: ["coverage"],
21
19
  "exceptions migrate": ["from"],
22
20
  fix: ["rule"],
@@ -1 +1 @@
1
- {"version":3,"file":"misplaced.js","sourceRoot":"","sources":["../../src/cli/misplaced.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7B,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IACrC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxC,MAAM,EAAE,EAAE,IAAI,EAA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,EAAE;IACrB,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;CACT,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,MAAc;IACrD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAChH,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACvH,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,oBAAoB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAClG,CAAC"}
@@ -41,7 +41,7 @@ export const program = Effect.fn("Cli.program")(function* (args, { cwd, launch }
41
41
  case "BaselineInstallDriver":
42
42
  return yield* installDriver(cwd, launch);
43
43
  case "BaselineWrite":
44
- return yield* writeBaseline(cwd, command.config, command.rules, command.files, command.firstAdoption);
44
+ return yield* writeBaseline(cwd, command.config, command.rules);
45
45
  case "BaselinePrune":
46
46
  return yield* pruneBaseline(cwd, command.config, command.against);
47
47
  case "BaselineTighten":
@@ -1 +1 @@
1
- {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/cli/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B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ineEntry } from "#baseline/format.ts";
3
+ export declare const reportBaselineWrite: (before: readonly BaselineEntry[], after: readonly BaselineEntry[], rules: readonly string[]) => Effect.Effect<void, never, never>;
4
+ //# sourceMappingURL=reportBaselineWrite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportBaselineWrite.d.ts","sourceRoot":"","sources":["../../src/cli/reportBaselineWrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,eAAO,MAAM,mBAAmB,oIAoB9B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Console, Effect } from "effect";
2
+ import { covers, groupBy } from "#engine/violation.ts";
3
+ import { plural } from "#report/plural.ts";
4
+ export const reportBaselineWrite = Effect.fn("Cli.reportBaselineWrite")(function* (before, after, rules) {
5
+ const recorded = after.filter((entry) => rules.length === 0 || rules.some((rule) => covers(rule, entry.rule)));
6
+ const previousRules = new Set(before.map((entry) => entry.rule));
7
+ yield* Console.log("First, fix every finding you can fix instead of recording it. Run `quality baseline tighten` after repairs.");
8
+ yield* Console.log("Then, for rules new since the previous baseline, review each recorded case and judge whether the rule reads the code correctly. Report any misread to Platform with the file, lines and what Quality would need instead of leaving it as debt.");
9
+ yield* Console.log("Recorded findings by rule:");
10
+ for (const [rule, entries] of [...groupBy(recorded, (entry) => entry.rule)].sort(([left], [right]) => left.localeCompare(right))) {
11
+ const count = entries.reduce((total, entry) => total + entry.count, 0);
12
+ const added = previousRules.has(rule) ? "" : " (new since previous baseline)";
13
+ yield* Console.log(` ${rule}: ${plural(count, "finding", "findings")}${added}`);
14
+ }
15
+ if (recorded.length === 0) {
16
+ yield* Console.log(" none");
17
+ }
18
+ });
19
+ //# sourceMappingURL=reportBaselineWrite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportBaselineWrite.js","sourceRoot":"","sources":["../../src/cli/reportBaselineWrite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,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACvE,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gCAAgC,CAAC;QAC9E,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;AACF,CAAC,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--config <file>]\n quality fix [--config <file>] [--rule <id>]...\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\n With --rule, apply only that rule's safe mechanical fixes and report remaining findings (exit 1), including baseline debt. Unsupported rules exit 2.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.\n --first-adoption records any rule, including unchanged files. With an existing baseline, name explicit --rule ids.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit Check lint and staged baseline counts, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
1
+ export declare const USAGE = "Usage:\n quality lint [--config <file>]\n quality ci [--coverage]\n quality setup [--config <file>]\n quality fix [--config <file>] [--rule <id>]...\n quality exceptions migrate [--config <file>] [--from <registry>]\n quality baseline merge <ancestor> <current> <other>\n quality baseline install-driver\n quality baseline write [--config <file>] [--rule <id>]...\n quality baseline prune [--config <file>] [--against <ref>]\n quality baseline tighten [--config <file>] [--staged]\n quality baseline migrate [--config <file>] [--from <file>]\n quality hooks install [--config <file>] [--force]\n quality hooks uninstall\n quality hooks status\n quality hooks pre-commit [--config <file>]\n\nci Check pnpm peers, then run the application scripts lint, typecheck, build and test, stopping on failure.\nsetup Install the Quality hook when the current folder owns a .git entry; skip unversioned and enclosed apps.\nlint Run every rule. Exits 1 on an error-level violation, a file over its baseline, a stale registry entry\n or a baseline entry for an unknown rule.\nfix Sort every package.json, apply Biome's lint fixes, unsafe ones included, its assist actions and formatting, then format again.\n With --rule, apply only that rule's safe mechanical fixes and report remaining findings (exit 1), including baseline debt. Unsupported rules exit 2.\nexceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.\nbaseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.\nbaseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.\nbaseline write Record every current finding, or only the named --rule ids, including findings in unchanged files.\n Fix what you can first; review each case of new rules and report misreads to Platform.\nbaseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.\nbaseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.\nbaseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.\nhooks install Install the git pre-commit hook, shared by every worktree, that runs hooks pre-commit. Keeps a hook that is not quality's\n unless --force replaces it.\nhooks uninstall Remove quality's pre-commit hook. Keeps a hook that is not quality's.\nhooks status Check that git's effective hooks path runs Quality's pre-commit hook and report global chaining.\nhooks pre-commit Check lint and staged baseline counts, then package.json scripts typecheck and quality:commit when present.\n\n--config <file> Config file; its directory is the repository root. Without this option, uses ./quality.config.ts when present, otherwise defaults.\n--against <ref> The branch the work merges into, whose merge base prune follows moves from. Defaults to origin/HEAD, then origin/main, then origin/master.\n--coverage Collect V8 coverage and JUnit from ci's single test run into coverage/, including failed tests.\nExit codes: 0 passed, 1 failed the gate, 2 could not run.";
2
2
  //# sourceMappingURL=usage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/cli/usage.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,84GAwCwC,CAAC"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/cli/usage.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,+zGAwCwC,CAAC"}
package/dist/cli/usage.js CHANGED
@@ -6,7 +6,7 @@ export const USAGE = `Usage:
6
6
  quality exceptions migrate [--config <file>] [--from <registry>]
7
7
  quality baseline merge <ancestor> <current> <other>
8
8
  quality baseline install-driver
9
- quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]
9
+ quality baseline write [--config <file>] [--rule <id>]...
10
10
  quality baseline prune [--config <file>] [--against <ref>]
11
11
  quality baseline tighten [--config <file>] [--staged]
12
12
  quality baseline migrate [--config <file>] [--from <file>]
@@ -24,8 +24,8 @@ fix Sort every package.json, apply Biome's lint fixes, unsafe ones
24
24
  exceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.
25
25
  baseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.
26
26
  baseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.
27
- baseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.
28
- --first-adoption records any rule, including unchanged files. With an existing baseline, name explicit --rule ids.
27
+ baseline write Record every current finding, or only the named --rule ids, including findings in unchanged files.
28
+ Fix what you can first; review each case of new rules and report misreads to Platform.
29
29
  baseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.
30
30
  baseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.
31
31
  baseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.
@@ -2,7 +2,7 @@ import { outsideImportFindings } from "#adapters/outsideImportFindings.ts";
2
2
  import { defineRule } from "#rule.ts";
3
3
  export const adapterImports = defineRule({
4
4
  check: outsideImportFindings,
5
- description: "Keep value imports of non-Effect runtime dependencies, peers, optional dependencies and Node builtins in adapters/. Type-only imports, workspace modules, test-support/ kits, Effect and @shivaedev packages, supported UI, routing and styling libraries in client/ folders and Vitest in unit tests are accepted. Libraries that perform I/O or manage external state still need adapters/. Move integrations into adapters/ and expose Effect values. No config exceptions or inline suppressions; baseline existing debt.",
5
+ description: "Keep value imports of non-Effect runtime dependencies, peers, optional dependencies and Node builtins in adapters/. Type-only imports, workspace modules, test-support/ kits, Effect and @shivaedev packages, supported UI, routing and styling libraries in client/ folders and Vitest in unit tests are accepted. Recharts is the stack's charting library, accepted in client/ folders; build charts with shadcn's Chart component (ChartContainer and friends) rather than raw recharts primitives where shadcn covers the case. Libraries that perform I/O or manage external state still need adapters/. Move integrations into adapters/ and expose Effect values. No config exceptions or inline suppressions; baseline existing debt.",
6
6
  id: "effect/adapter-imports",
7
7
  registrable: false,
8
8
  });
@@ -1 +1 @@
1
- {"version":3,"file":"adapterImports.js","sourceRoot":"","sources":["../../../src/rules/effect/adapterImports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACxC,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACV,+fAA+f;IAChgB,EAAE,EAAE,wBAAwB;IAC5B,WAAW,EAAE,KAAK;CAClB,CAAC,CAAC"}
1
+ {"version":3,"file":"adapterImports.js","sourceRoot":"","sources":["../../../src/rules/effect/adapterImports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACxC,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EACV,gtBAAgtB;IACjtB,EAAE,EAAE,wBAAwB;IAC5B,WAAW,EAAE,KAAK;CAClB,CAAC,CAAC"}
@@ -4,7 +4,9 @@ The [README](../README.md) introduces the gate. This page explains how the basel
4
4
 
5
5
  ## Baseline
6
6
 
7
- `quality baseline write --first-adoption` records existing findings of every rule when there is no baseline, including rules that permit config exceptions and findings in unchanged files. For a shared policy upgrade with an existing baseline, name the rules with `quality baseline write --first-adoption --rule <id>`; every rule is eligible, and unrelated entries remain unchanged. An existing baseline refuses an unnamed write, including with `--first-adoption`. Ordinary later writes still require named rules and changed file selections. Review each new or raised entry and state why that debt needs a separate migration.
7
+ `quality baseline write` records every current finding, including findings in unchanged files after a policy upgrade. Repeat `--rule <id>` to record only named rules or rule families; unrelated entries stay unchanged. Writing is a deliberate step: commit checks and CI still reject findings the baseline does not cover.
8
+
9
+ After every write, the output asks you to fix every finding you can fix instead of recording it. It names the recorded rules and counts, marking rules absent from the previous baseline as new. For each recorded case of those new rules, judge whether the rule reads the code correctly. Report any misread to Platform with the file, lines and what Quality would need instead of leaving it as debt. Run `quality baseline tighten` after repairs.
8
10
 
9
11
  ```jsonl
10
12
  {"path":"src/legacy/sync.ts","rule":"comments/no-jsdoc","count":3}
@@ -14,7 +16,7 @@ The [README](../README.md) introduces the gate. This page explains how the basel
14
16
  The baseline is sharded: `packages/<package>/quality-baseline.jsonl` holds paths inside that package, and the root `quality-baseline.jsonl` holds all other paths. Packages without entries have no file. Each shard is JSON Lines with one entry per line: the violations of one rule in one file. `count` is how many violations the file may have. For a rule that counts occurrences, such as `comments/no-jsdoc`, that is the number of occurrences. For a rule with a limit, it is the amount over the limit: the entry above lets `src/server/db.ts` have 412 lines under a limit of 150. A new baseline is sorted by path and then rule. Later edits preserve unrelated lines, including their formatting and order, so the diff shows the entries that changed.
15
17
 
16
18
  `quality lint` fails when a baselined file has more violations than its `count`; the report then lists all of that file's violations for the rule. A file at or below its entry passes. An entry that allows more than is left, including a file with no violations left, is listed as a note and does not fail, so fixing debt never breaks the build; `tighten` and `prune` lower it. An entry for an unknown rule fails until it is pruned.
17
- - `quality baseline write` records every error-level violation when there is no baseline yet. For ordinary writes after a baseline exists, both `--rule <id>` and `--file <path>` are required. Repeat either option for multiple selections. Each path is relative to the config folder and must be changed since `HEAD`, staged or unstaged; new files need `git add` first. An unchanged file refuses the whole write. Only selected rule/file entries are replaced; all other entries stay as they are. With no baseline and no file selection, initial adoption records the repository once.
19
+ - `quality baseline write` replaces the baseline with every current finding. With `--rule <id>`, only the named rules are replaced; repeat the option to select several rules.
18
20
  - `quality baseline tighten` lowers and removes the entries of files changed since `HEAD`, and with `--staged`, of the files staged for the next commit. It carries the entry of a file that git sees as moved to the new path. Every other line stays byte for byte.
19
21
  - `quality baseline prune` does the same for every entry. It carries the entries of files moved since the merge base (see `--against` under [Command line](../README.md#command-line)), and prunes without following moves outside a git work tree.
20
22
  - `quality baseline migrate` moves a baseline from the earlier JSON format, `quality/baseline.json` or the file `--from` names, to the root and package shards, and removes the old one. `--from quality/baseline.jsonl` splits a single JSON Lines baseline without changing its counts. An old entry that stored a size, such as a line count, becomes that size less the rule's current limit; an entry whose file is now within the limit is dropped.
@@ -35,13 +37,9 @@ quality lint
35
37
 
36
38
  `tighten` counts the files as they are on disk. When a commit stages only part of a file, stash the rest first (as lint-staged does), or the entry may be lowered below what the commit holds.
37
39
 
38
- ### Baseline growth
39
-
40
- An error-level finding that neither the config exceptions nor the baseline covers fails `quality lint`; that is how new debt gets noticed. The baseline itself may grow: a reviewer sees each new or raised entry in the diff and judges it. For moved files, run `quality baseline prune --against <base>` to carry existing counts to the new paths. The failing report ends with that guidance. For retained findings in a changed file, use `quality baseline write --rule <id> --file <path>` and call out new or raised counts in the pull request. Writing a rule does not absorb findings from other files.
41
-
42
40
  ### Counts after a policy change
43
41
 
44
- A count depends on the rule's limit, so a Quality policy change that adjusts a limit shifts every count of that rule. A looser limit leaves entries that allow more than is left: they pass, and `tighten` and `prune` lower them. A stricter limit can make an error-level rule's files fail `quality lint`, since each is now further over the limit. Inspect the findings under the new policy before recording retained debt again with `quality baseline write --rule <id> --file <path>`. Commit the counts with the policy upgrade. The raised entries show in the diff, and the pull request calls them out.
42
+ A count depends on the rule's limit, so a Quality policy change that adjusts a limit shifts every count of that rule. A looser limit leaves entries that allow more than is left: they pass, and `tighten` and `prune` lower them. A stricter limit can make an error-level rule's files fail `quality lint`, since each is now further over the limit. Inspect the findings under the new policy before recording retained debt again with `quality baseline write`. Commit the counts with the policy upgrade. Review the recorded cases using the guidance printed after the write.
45
43
 
46
44
  ## Exceptions
47
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/quality",
3
- "version": "0.70.2",
3
+ "version": "0.70.3",
4
4
  "description": "Repository quality gate with typed rules, a baseline of existing debt and a registry of reasoned exceptions",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/quality#readme",
6
6
  "bugs": {
@@ -10,6 +10,7 @@ import type { Finding, RuleInputs } from "#rule.ts";
10
10
  const CLIENT_RENDERING_LIBRARIES = new Set([
11
11
  "react",
12
12
  "react-dom",
13
+ "recharts",
13
14
  "lucide-react",
14
15
  "@base-ui/react",
15
16
  "@tanstack/react-router",
@@ -37,22 +37,16 @@ export function adopt(
37
37
  rules: readonly string[],
38
38
  violations: readonly Violation[],
39
39
  index: RuleIndex,
40
- files?: ReadonlySet<string>,
41
40
  ): Adoption {
42
- if (existing !== undefined && rules.length === 0) {
43
- return { _tag: "Refused", reasons: ["a baseline exists. Record a rule with --rule <id>, or drop fixed debt with prune."] };
44
- }
45
41
  const reasons = rules.flatMap((id) => refusal(id, index));
46
42
  if (reasons.length > 0) {
47
43
  return { _tag: "Refused", reasons };
48
44
  }
49
45
  function named(rule: string): boolean {
50
- return rules.some((name) => covers(name, rule));
46
+ return rules.length === 0 || rules.some((name) => covers(name, rule));
51
47
  }
52
- const kept = (existing ?? []).filter((entry) => !(named(entry.rule) && (files === undefined || files.has(entry.file))));
53
- const adopted = violations.filter(
54
- (violation) => (rules.length === 0 || named(violation.rule)) && (files === undefined || files.has(violation.file)),
55
- );
48
+ const kept = (existing ?? []).filter((entry) => !named(entry.rule));
49
+ const adopted = violations.filter((violation) => named(violation.rule));
56
50
  const added = record(adopted);
57
51
  return { _tag: "Adopted", added: added.length, entries: [...kept, ...added], replaced: (existing ?? []).length - kept.length };
58
52
  }
package/src/cli/args.ts CHANGED
@@ -15,8 +15,6 @@ export type Command =
15
15
  readonly _tag: "BaselineWrite";
16
16
  readonly config: string | undefined;
17
17
  readonly rules: readonly string[];
18
- readonly files: readonly string[];
19
- readonly firstAdoption: boolean;
20
18
  }
21
19
  | { readonly _tag: "BaselinePrune"; readonly config: string | undefined; readonly against: string | undefined }
22
20
  | { readonly _tag: "BaselineTighten"; readonly config: string | undefined; readonly staged: boolean }
@@ -60,8 +58,6 @@ function commandFor(name: string, values: Values): Parsed {
60
58
  return parsed({
61
59
  _tag: "BaselineWrite",
62
60
  config,
63
- files: values.file ?? [],
64
- firstAdoption: values["first-adoption"] === true,
65
61
  rules: values.rule ?? [],
66
62
  });
67
63
  case "baseline prune":
@@ -1,12 +1,11 @@
1
- import * as NodePath from "@effect/platform-node/NodePath";
2
- import { Console, Effect, type FileSystem, Path } from "effect";
1
+ import { Console, Effect, type FileSystem } from "effect";
3
2
  import type { BaselineEntry } from "#baseline/format.ts";
4
3
  import { saveShards } from "#baseline/shards.ts";
5
4
  import { adopt, type Pruned, prune, type Scope } from "#baseline/update.ts";
5
+ import { reportBaselineWrite } from "#cli/reportBaselineWrite.ts";
6
6
  import { openSession, type Session } from "#engine/session.ts";
7
7
  import { applyRegistry } from "#exceptions/registry.ts";
8
8
  import { SetupFailure } from "#failure.ts";
9
- import { changesSince } from "#git/history.ts";
10
9
  import { plural } from "#report/plural.ts";
11
10
  import type { RuleServices } from "#rule.ts";
12
11
 
@@ -22,38 +21,21 @@ export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (
22
21
  cwd: string,
23
22
  config: string | undefined,
24
23
  rules: readonly string[],
25
- files: readonly string[],
26
- firstAdoption = false,
27
24
  ): Effect.fn.Return<void, SetupFailure, RuleServices> {
28
- const { relative, resolve } = yield* Path.Path.pipe(Effect.provide(NodePath.layer));
29
-
30
25
  const session = yield* openSession(cwd, config);
31
- const existing = session.baseline.files.size === 0 ? undefined : session.baseline.entries;
32
- if (existing !== undefined && files.length === 0 && !firstAdoption) {
33
- return yield* new SetupFailure({
34
- message: "baseline write refused: a baseline exists. Record a rule with --rule <id> and --file <path>; use prune for moved or fixed debt.",
35
- });
36
- }
37
- const selected = files.length === 0 ? undefined : new Set(files.map((file) => relative(session.config.root, resolve(session.config.root, file))));
38
- if (selected !== undefined && !firstAdoption) {
39
- const changed = yield* changesSince(session.config.root, ["HEAD"]);
40
- const outside = [...selected].filter((file) => !changed.files.has(file));
41
- if (outside.length > 0) {
42
- return yield* new SetupFailure({
43
- message: `baseline write refused: outside the current change set: ${outside.join(", ")}. Stage new files with git add first.`,
44
- });
45
- }
46
- }
47
- const adoption = adopt(existing, rules, unregistered(session), session.config, selected);
26
+ const existing = session.baseline.entries;
27
+ const adoption = adopt(existing, rules, unregistered(session), session.config);
48
28
  if (adoption._tag === "Refused") {
49
29
  return yield* new SetupFailure({ message: `baseline write refused:\n${adoption.reasons.map((reason) => ` - ${reason}`).join("\n")}` });
50
30
  }
51
31
  if (adoption.added === 0 && adoption.replaced === 0) {
52
- return yield* Console.log(`quality: no error-level violations to record; ${session.config.baseline} is unchanged.`);
32
+ yield* Console.log(`quality: no error-level violations to record; ${session.config.baseline} is unchanged.`);
33
+ } else {
34
+ yield* save(session, adoption.entries);
35
+ const replaced = adoption.replaced > 0 ? `, replacing ${plural(adoption.replaced, "entry", "entries")}` : "";
36
+ yield* Console.log(`quality: recorded ${plural(adoption.added, "entry", "entries")} in ${session.config.baseline}${replaced}.`);
53
37
  }
54
- yield* save(session, adoption.entries);
55
- const replaced = adoption.replaced > 0 ? `, replacing ${plural(adoption.replaced, "entry", "entries")}` : "";
56
- yield* Console.log(`quality: recorded ${plural(adoption.added, "entry", "entries")} in ${session.config.baseline}${replaced}.`);
38
+ yield* reportBaselineWrite(existing, adoption.entries, rules);
57
39
  });
58
40
 
59
41
  function changes(pruned: Pruned): string {
@@ -4,8 +4,6 @@ export const OPTIONS = {
4
4
  against: { type: "string" },
5
5
  config: { type: "string" },
6
6
  coverage: { type: "boolean" },
7
- file: { multiple: true, type: "string" },
8
- "first-adoption": { type: "boolean" },
9
7
  force: { type: "boolean" },
10
8
  from: { type: "string" },
11
9
  help: { short: "h", type: "boolean" },
@@ -17,14 +15,14 @@ export type Values = ReturnType<typeof parseArgs<{ options: typeof OPTIONS; allo
17
15
 
18
16
  type Option = Exclude<keyof Values, "config" | "help">;
19
17
 
20
- const COMMAND_OPTIONS: readonly Option[] = ["against", "coverage", "file", "first-adoption", "force", "from", "rule", "staged"];
18
+ const COMMAND_OPTIONS: readonly Option[] = ["against", "coverage", "force", "from", "rule", "staged"];
21
19
 
22
20
  export const ACCEPTS: Readonly<Record<string, readonly Option[]>> = {
23
21
  "baseline install-driver": [],
24
22
  "baseline migrate": ["from"],
25
23
  "baseline prune": ["against"],
26
24
  "baseline tighten": ["staged"],
27
- "baseline write": ["rule", "file", "first-adoption"],
25
+ "baseline write": ["rule"],
28
26
  ci: ["coverage"],
29
27
  "exceptions migrate": ["from"],
30
28
  fix: ["rule"],
@@ -48,7 +48,7 @@ export const program = Effect.fn("Cli.program")(function* (args: readonly string
48
48
  case "BaselineInstallDriver":
49
49
  return yield* installDriver(cwd, launch);
50
50
  case "BaselineWrite":
51
- return yield* writeBaseline(cwd, command.config, command.rules, command.files, command.firstAdoption);
51
+ return yield* writeBaseline(cwd, command.config, command.rules);
52
52
  case "BaselinePrune":
53
53
  return yield* pruneBaseline(cwd, command.config, command.against);
54
54
  case "BaselineTighten":
@@ -0,0 +1,26 @@
1
+ import { Console, Effect } from "effect";
2
+ import type { BaselineEntry } from "#baseline/format.ts";
3
+ import { covers, groupBy } from "#engine/violation.ts";
4
+ import { plural } from "#report/plural.ts";
5
+
6
+ export const reportBaselineWrite = Effect.fn("Cli.reportBaselineWrite")(function* (
7
+ before: readonly BaselineEntry[],
8
+ after: readonly BaselineEntry[],
9
+ rules: readonly string[],
10
+ ) {
11
+ const recorded = after.filter((entry) => rules.length === 0 || rules.some((rule) => covers(rule, entry.rule)));
12
+ const previousRules = new Set(before.map((entry) => entry.rule));
13
+ yield* Console.log("First, fix every finding you can fix instead of recording it. Run `quality baseline tighten` after repairs.");
14
+ yield* Console.log(
15
+ "Then, for rules new since the previous baseline, review each recorded case and judge whether the rule reads the code correctly. Report any misread to Platform with the file, lines and what Quality would need instead of leaving it as debt.",
16
+ );
17
+ yield* Console.log("Recorded findings by rule:");
18
+ for (const [rule, entries] of [...groupBy(recorded, (entry) => entry.rule)].sort(([left], [right]) => left.localeCompare(right))) {
19
+ const count = entries.reduce((total, entry) => total + entry.count, 0);
20
+ const added = previousRules.has(rule) ? "" : " (new since previous baseline)";
21
+ yield* Console.log(` ${rule}: ${plural(count, "finding", "findings")}${added}`);
22
+ }
23
+ if (recorded.length === 0) {
24
+ yield* Console.log(" none");
25
+ }
26
+ });
package/src/cli/usage.ts CHANGED
@@ -6,7 +6,7 @@ export const USAGE = `Usage:
6
6
  quality exceptions migrate [--config <file>] [--from <registry>]
7
7
  quality baseline merge <ancestor> <current> <other>
8
8
  quality baseline install-driver
9
- quality baseline write [--config <file>] [--rule <id>]... [--file <path>]... [--first-adoption]
9
+ quality baseline write [--config <file>] [--rule <id>]...
10
10
  quality baseline prune [--config <file>] [--against <ref>]
11
11
  quality baseline tighten [--config <file>] [--staged]
12
12
  quality baseline migrate [--config <file>] [--from <file>]
@@ -24,8 +24,8 @@ fix Sort every package.json, apply Biome's lint fixes, unsafe ones
24
24
  exceptions migrate Move legacy registry entries and Biome declarations into quality.config.ts exceptions and remove matching root overrides.
25
25
  baseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.
26
26
  baseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.
27
- baseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.
28
- --first-adoption records any rule, including unchanged files. With an existing baseline, name explicit --rule ids.
27
+ baseline write Record every current finding, or only the named --rule ids, including findings in unchanged files.
28
+ Fix what you can first; review each case of new rules and report misreads to Platform.
29
29
  baseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.
30
30
  baseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.
31
31
  baseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.
@@ -4,7 +4,7 @@ import { defineRule } from "#rule.ts";
4
4
  export const adapterImports = defineRule({
5
5
  check: outsideImportFindings,
6
6
  description:
7
- "Keep value imports of non-Effect runtime dependencies, peers, optional dependencies and Node builtins in adapters/. Type-only imports, workspace modules, test-support/ kits, Effect and @shivaedev packages, supported UI, routing and styling libraries in client/ folders and Vitest in unit tests are accepted. Libraries that perform I/O or manage external state still need adapters/. Move integrations into adapters/ and expose Effect values. No config exceptions or inline suppressions; baseline existing debt.",
7
+ "Keep value imports of non-Effect runtime dependencies, peers, optional dependencies and Node builtins in adapters/. Type-only imports, workspace modules, test-support/ kits, Effect and @shivaedev packages, supported UI, routing and styling libraries in client/ folders and Vitest in unit tests are accepted. Recharts is the stack's charting library, accepted in client/ folders; build charts with shadcn's Chart component (ChartContainer and friends) rather than raw recharts primitives where shadcn covers the case. Libraries that perform I/O or manage external state still need adapters/. Move integrations into adapters/ and expose Effect values. No config exceptions or inline suppressions; baseline existing debt.",
8
8
  id: "effect/adapter-imports",
9
9
  registrable: false,
10
10
  });