@clearlydev/nx-archweave 0.4.3 → 0.4.4

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.
package/README.md CHANGED
@@ -4,9 +4,12 @@ Nx generators that get a workspace ready to work on with one preset:
4
4
 
5
5
  - an FSD Lite lint rule for the frontend app's layers (`warn` or `error` by preset), plus slice generators
6
6
  - frontend/backend boundaries as lint errors between the projects it tags, when there is a backend
7
+
8
+ and, each one optional:
9
+
7
10
  - AI agent rules
8
11
  - GitHub templates
9
- - optional AI PR review with the provider you choose (Claude supported; Gemini, GPT and Cursor in beta)
12
+ - AI PR review with the provider you choose (Claude supported; Gemini, GPT and Cursor in beta)
10
13
 
11
14
  Starting a brand-new workspace instead? Use [`create-nx-archweave`](https://www.npmjs.com/package/create-nx-archweave). It creates the workspace, installs this plugin, and runs `init`, all in one command.
12
15
 
@@ -30,8 +33,9 @@ yarn nx g @clearlydev/nx-archweave:doctor # yarn
30
33
  bun nx g @clearlydev/nx-archweave:doctor # bun
31
34
  ```
32
35
 
33
- - **Requirements:** Node >= 22.18, plus one of npm, pnpm >= 10, yarn (classic or berry) or bun. All four package managers are first-class.
36
+ - **Requirements:** Node >= 22.18, plus one of npm, pnpm >= 10, yarn (classic or berry) or bun. All four package managers are first-class. Use the latest patch release of your Node line: the [November 2026 security release](https://nodejs.org/en/blog/vulnerability/november-2026-security-releases) is 22.23.5, 24.22.3 or 26.13.1.
34
37
  - Generators detect the workspace's real package manager from its lockfiles.
38
+ - Commit the install before you run `init`: it changed `package.json` and the lockfile, and `init` runs only against a clean working tree.
35
39
  - The examples below use `pnpm nx g`. With another package manager, run the same generator the way the `doctor` commands above show.
36
40
  - The package ships its own code as a bundle. Its runtime dependencies are `@nx/devkit` and `jsonc-parser`, which nx already depends on at the same version.
37
41
 
@@ -40,15 +44,19 @@ bun nx g @clearlydev/nx-archweave:doctor # bun
40
44
  Preview the full run first. This writes nothing:
41
45
 
42
46
  ```bash
43
- pnpm nx g @clearlydev/nx-archweave:init --preset=team --frontend=next --dryRun
47
+ pnpm nx g @clearlydev/nx-archweave:init --preset=solo --frontend=next --review=false --applyEslint --dryRun
44
48
  ```
45
49
 
46
50
  Then run it for real:
47
51
 
48
52
  ```bash
49
- pnpm nx g @clearlydev/nx-archweave:init --preset=team --frontend=next
53
+ pnpm nx g @clearlydev/nx-archweave:init --preset=solo --frontend=next --review=false --applyEslint
50
54
  ```
51
55
 
56
+ - This sets up the `solo` preset (the FSD rule as `warn`, agent rules, a PR template) without AI review.
57
+ - `--applyEslint` writes the FSD rule into the app's `eslint.config.mjs`. Without it, `init` leaves your ESLint config alone and prints the two lines to paste, so the rule isn't on until you add them. `--preset=team` is for a team repository: the FSD rule as `error`, issue templates, and AI review on (see [Presets](#presets)).
58
+ - Only the FSD rule: add `--agentRules=false --githubTemplates=false --review=false`.
59
+
52
60
  - `init` runs the content generators below according to the preset (`quick-start` | `solo` | `team`).
53
61
  - `init` requires a clean git working tree, so a partial run can be undone exactly: the report lists the files it modified (`git restore -- …`) and the files it created.
54
62
  - `--allowDirty` opts out of the clean-tree check. The report then warns you that the rollback scope is wider.
@@ -203,29 +211,15 @@ Options: `--packages`\*, `--apply`
203
211
 
204
212
  Explicit flags always win over preset defaults. create-nx-archweave passes `--review=false` for `quick-start` and `solo` unless you pass `--review`, so from the CLI only `team` starts with review on.
205
213
 
206
- ## AI PR review
207
-
208
- Review is fully optional and isn't tied to one provider.
209
-
210
- - If review is disabled, zero review artifacts are generated.
211
- - If review is enabled, the workflow **green-skips** (it never fails) until you register the provider's secret.
212
- - A round marker stops the workflow after `--maxRounds` reviews per PR (1–5, default 3). A later commit has no AI verdict, so the `review` check fails on it; merge it with your branch ruleset's bypass.
213
-
214
- | `--provider` | Workflow file | Required secret |
215
- | --- | --- | --- |
216
- | `claude` (default) | `.github/workflows/claude-code-review.yml` | `CLAUDE_CODE_OAUTH_TOKEN` |
217
- | `gemini` (beta) | `.github/workflows/gemini-code-review.yml` | `GEMINI_API_KEY` |
218
- | `gpt` (beta) | `.github/workflows/gpt-code-review.yml` | `OPENAI_API_KEY` |
219
- | `cursor` (beta) | `.github/workflows/cursor-code-review.yml` | `CURSOR_API_KEY` |
220
-
221
- What each provider has been checked on, where to get its secret, and known issues: [Provider status](https://github.com/clearlydev/nx-archweave/blob/main/docs/pr-review.md#provider-status).
214
+ ## AI PR review (optional)
222
215
 
223
- Modes:
216
+ `add-review` adds a GitHub Actions workflow that reviews each pull request with the provider you pick: `claude` (default) is supported; `gemini`, `gpt` and `cursor` are beta.
224
217
 
225
- - `fast` and `standard` review correctness & security.
226
- - `thorough` adds an over-engineering pass.
218
+ - Off: no review files at all.
219
+ - On: until you register the provider's secret, the `review` check ends green with a notice. After that, it fails on a blocking finding (P0/P1) or when the review leaves no verdict it can read, so it can be a required check.
220
+ - It doesn't replace a person's review: keep a person's approval required on pull requests.
227
221
 
228
- Findings are prioritized P0–P3/Nit per the bundled review policy.
222
+ Setup step by step, each provider's secret and status, when the check is green or red, and troubleshooting: [Automated PR review](https://github.com/clearlydev/nx-archweave/blob/main/docs/pr-review.md) ([Provider status](https://github.com/clearlydev/nx-archweave/blob/main/docs/pr-review.md#provider-status)).
229
223
 
230
224
  ## Behavioral contracts
231
225
 
@@ -4,7 +4,7 @@ import {
4
4
  REVIEW_WORKFLOW_CONTRACT,
5
5
  VERDICT_MARKER,
6
6
  runVerdictGate
7
- } from "../generators/_chunks/chunk-FRDRJXMO.js";
7
+ } from "../generators/_chunks/chunk-JEQQCSOB.js";
8
8
 
9
9
  // src/bin/review-verdict.ts
10
10
  import { spawnSync } from "node:child_process";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  composeReviewSetup,
3
3
  judgeReviewFileConflict
4
- } from "./chunk-FRDRJXMO.js";
4
+ } from "./chunk-JEQQCSOB.js";
5
5
  import {
6
6
  DEPENDABOT_PATH,
7
7
  renderAddReviewReport,
@@ -813,6 +813,9 @@ function renderWorkspaceSetupSteps(packageManager) {
813
813
  ` uses: ${pinnedUses("actions/setup-node")}`,
814
814
  " with:",
815
815
  ` node-version: ${SETUP_NODE_VERSION}`,
816
+ // The runner image can lag behind a Node security release; check-latest makes setup-node
817
+ // fetch the newest patch of the line instead of using an older cached one.
818
+ " check-latest: true",
816
819
  // yarn: no setup-node cache — it would query the runner's global yarn 1 even in a
817
820
  // berry project. Corepack (shipped with Node) provides the project's own yarn below.
818
821
  // bun: setup-node has no bun cache. Node is still set up — nx and the verdict bin
@@ -3,8 +3,8 @@ import {
3
3
  generator_default,
4
4
  recordedReview,
5
5
  runAddReview
6
- } from "../_chunks/chunk-PNK6HLOX.js";
7
- import "../_chunks/chunk-FRDRJXMO.js";
6
+ } from "../_chunks/chunk-AEAL4ICT.js";
7
+ import "../_chunks/chunk-JEQQCSOB.js";
8
8
  import "../_chunks/chunk-HGEMEXKF.js";
9
9
  import "../_chunks/chunk-YNMLB4DL.js";
10
10
  import "../_chunks/chunk-TUN34LAQ.js";
@@ -11,7 +11,7 @@ import {
11
11
  REVIEW_WORKFLOW_CONTRACT,
12
12
  ROUND_MARKER,
13
13
  judgeReviewFileConflict
14
- } from "../_chunks/chunk-FRDRJXMO.js";
14
+ } from "../_chunks/chunk-JEQQCSOB.js";
15
15
  import {
16
16
  createGroupDetector,
17
17
  indexFilePattern
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  recordedReview,
3
3
  runAddReview
4
- } from "../_chunks/chunk-PNK6HLOX.js";
4
+ } from "../_chunks/chunk-AEAL4ICT.js";
5
5
  import {
6
6
  DEFAULT_MAX_ROUNDS,
7
7
  buildReviewConfigSnippet
8
- } from "../_chunks/chunk-FRDRJXMO.js";
8
+ } from "../_chunks/chunk-JEQQCSOB.js";
9
9
  import {
10
10
  renderAddAgentRulesReport,
11
11
  runAddAgentRules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clearlydev/nx-archweave",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Nx generators for an FSD Lite lint rule, frontend/backend boundaries, AI agent rules, GitHub templates and optional AI PR review",
5
5
  "license": "MIT",
6
6
  "author": "clearlydev (https://github.com/clearlydev)",