@clearlydev/nx-archweave 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +265 -2
- package/dist/bin/review-verdict.js +330 -0
- package/dist/eslint/fsd-boundaries.d.ts +119 -0
- package/dist/eslint/fsd-boundaries.js +144 -0
- package/dist/eslint/index.d.ts +78 -0
- package/dist/eslint/index.js +256 -0
- package/dist/eslint/tsconfig-aliases.d.ts +18 -0
- package/dist/eslint/tsconfig-aliases.js +114 -0
- package/dist/generators/add-agent-rules/generator.js +550 -0
- package/dist/generators/add-agent-rules/render.js +46 -0
- package/dist/generators/add-backend/generator.js +784 -0
- package/dist/generators/add-backend/render.js +102 -0
- package/dist/generators/add-fsd-lite/generator.js +553 -0
- package/dist/generators/add-fsd-lite/render.js +72 -0
- package/dist/generators/add-github-templates/files/en/codeowners/.github/CODEOWNERS.template +4 -0
- package/dist/generators/add-github-templates/files/en/issue/.github/ISSUE_TEMPLATE/bug-report.yml.template +28 -0
- package/dist/generators/add-github-templates/files/en/issue/.github/ISSUE_TEMPLATE/feature-request.yml.template +17 -0
- package/dist/generators/add-github-templates/files/en/pr/.github/PULL_REQUEST_TEMPLATE.md.template +12 -0
- package/dist/generators/add-github-templates/files/ko/codeowners/.github/CODEOWNERS.template +4 -0
- package/dist/generators/add-github-templates/files/ko/issue/.github/ISSUE_TEMPLATE/bug-report.yml.template +28 -0
- package/dist/generators/add-github-templates/files/ko/issue/.github/ISSUE_TEMPLATE/feature-request.yml.template +17 -0
- package/dist/generators/add-github-templates/files/ko/pr/.github/PULL_REQUEST_TEMPLATE.md.template +12 -0
- package/dist/generators/add-github-templates/generator.js +125 -0
- package/dist/generators/add-github-templates/render.js +26 -0
- package/dist/generators/add-integration/generator.js +818 -0
- package/dist/generators/add-integration/render.js +34 -0
- package/dist/generators/add-review/generator.js +921 -0
- package/dist/generators/add-review/render.js +96 -0
- package/dist/generators/allow-builds/generator.js +436 -0
- package/dist/generators/allow-builds/render.js +82 -0
- package/dist/generators/doctor/generator.js +2431 -0
- package/dist/generators/doctor/integration-report.js +70 -0
- package/dist/generators/doctor/render.js +10 -0
- package/dist/generators/entity/generator.js +395 -0
- package/dist/generators/feature/generator.js +395 -0
- package/dist/generators/init/generator.js +3211 -0
- package/dist/generators/init/render.js +125 -0
- package/dist/generators/init/validation.js +74 -0
- package/dist/generators/install-integration/generator.js +1233 -0
- package/dist/generators/install-integration/render.js +128 -0
- package/dist/generators/page/generator.js +395 -0
- package/dist/generators/record-integration/generator.js +852 -0
- package/dist/generators/record-integration/render.js +31 -0
- package/dist/generators/shared/dry-run.js +12 -0
- package/dist/generators/shared/frontend-app.js +57 -0
- package/dist/generators/shared/generator.js +395 -0
- package/dist/generators/shared/project-type.js +39 -0
- package/dist/generators/shared/record-pipeline.js +34 -0
- package/dist/generators/shared/run-nx.js +24 -0
- package/dist/generators/shared/template-files.js +38 -0
- package/dist/generators/shared/toolkit-config-file.js +110 -0
- package/dist/generators/slice/core.js +185 -0
- package/dist/generators/slice/files/index/index.ts.template +14 -0
- package/dist/generators/slice/files/module/__name__.spec.ts.template +11 -0
- package/dist/generators/slice/files/module/__name__.ts.template +11 -0
- package/dist/generators/slice/files/segment/index.ts.template +20 -0
- package/dist/generators/slice/render.js +70 -0
- package/dist/generators/widget/generator.js +395 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +680 -0
- package/dist/lib/nx-plugin.d.ts +2 -0
- package/dist/lib/nx-plugin.js +7 -0
- package/dist/runtime/integrations-composition-root.js +20 -0
- package/dist/runtime/node-command-runner.js +81 -0
- package/generators.json +85 -0
- package/package.json +95 -4
- package/src/generators/add-agent-rules/schema.json +43 -0
- package/src/generators/add-backend/schema.json +39 -0
- package/src/generators/add-fsd-lite/schema.json +43 -0
- package/src/generators/add-github-templates/schema.json +35 -0
- package/src/generators/add-integration/schema.json +35 -0
- package/src/generators/add-review/schema.json +72 -0
- package/src/generators/allow-builds/schema.json +20 -0
- package/src/generators/doctor/schema.json +20 -0
- package/src/generators/entity/schema.json +37 -0
- package/src/generators/feature/schema.json +37 -0
- package/src/generators/init/schema.json +98 -0
- package/src/generators/install-integration/schema.json +35 -0
- package/src/generators/page/schema.json +53 -0
- package/src/generators/record-integration/schema.json +26 -0
- package/src/generators/shared/schema.json +32 -0
- package/src/generators/widget/schema.json +45 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createCatalogIntegrations, createIntegrationRegistry, getIntegration as getIntegrationFromRegistry, listIntegrations as listIntegrationsFromRegistry, } from '@nx-archweave/integrations';
|
|
2
|
+
import { NodeCommandRunner } from "./node-command-runner.js";
|
|
3
|
+
// The single place every generator (doctor, add-integration,
|
|
4
|
+
// record-integration) obtains its ToolIntegration objects from — never a
|
|
5
|
+
// package-level singleton (factory-based
|
|
6
|
+
// construction). Each call constructs a fresh registry; there is no shared,
|
|
7
|
+
// mutated module state between calls. Defaults to the real, Node-backed
|
|
8
|
+
// runner; tests inject a fake one. The tool list is the plugin catalog (data, in
|
|
9
|
+
// @nx-archweave/integrations); the generators' --tool/--target schema enums are kept
|
|
10
|
+
// equal to it by a test (catalog-schema-enums.spec.ts).
|
|
11
|
+
export function createIntegrationsCompositionRoot(deps = {}) {
|
|
12
|
+
const runner = deps.runner ?? new NodeCommandRunner();
|
|
13
|
+
const registry = createIntegrationRegistry(createCatalogIntegrations({ runner }));
|
|
14
|
+
return {
|
|
15
|
+
registry,
|
|
16
|
+
runner,
|
|
17
|
+
getIntegration: (id) => getIntegrationFromRegistry(registry, id),
|
|
18
|
+
listIntegrations: () => listIntegrationsFromRegistry(registry),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { spawnableCommand } from '@nx-archweave/shared';
|
|
3
|
+
// SIGTERM is not guaranteed to actually end a process — a child that traps
|
|
4
|
+
// or ignores it would otherwise keep this runner's promise pending forever,
|
|
5
|
+
// silently defeating the fixed timeout/output-limit guarantees. SIGKILL
|
|
6
|
+
// cannot be caught or ignored, so it is the backstop once a process has had
|
|
7
|
+
// a short grace period to exit cleanly on its own.
|
|
8
|
+
const KILL_GRACE_MS = 500;
|
|
9
|
+
// The one place node:child_process is imported — packages/integrations never
|
|
10
|
+
// imports it directly. Uses spawn (never a shell) so stdout/stderr can be bounded
|
|
11
|
+
// independently at the exact approved limits, and so the child process can be
|
|
12
|
+
// terminated on timeout or overflow without waiting for it to finish producing output.
|
|
13
|
+
export class NodeCommandRunner {
|
|
14
|
+
run(input) {
|
|
15
|
+
return new Promise((resolve, reject) => {
|
|
16
|
+
let stdout = '';
|
|
17
|
+
let stderr = '';
|
|
18
|
+
let timedOut = false;
|
|
19
|
+
let outputExceeded = false;
|
|
20
|
+
let settled = false;
|
|
21
|
+
let killTimer;
|
|
22
|
+
// An npm-installed claude is a .cmd shim on Windows: it runs through cmd.exe with every
|
|
23
|
+
// argument escaped — still never a shell string built from raw input.
|
|
24
|
+
const spawnable = spawnableCommand(input.executable, input.argv);
|
|
25
|
+
const child = spawn(spawnable.command, spawnable.args, {
|
|
26
|
+
cwd: input.cwd,
|
|
27
|
+
shell: false,
|
|
28
|
+
windowsVerbatimArguments: spawnable.windowsVerbatimArguments,
|
|
29
|
+
windowsHide: true,
|
|
30
|
+
// No stdin: nothing here ever answers a prompt (a command that wants
|
|
31
|
+
// confirmation must fail fast instead of waiting on an open pipe).
|
|
32
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
33
|
+
});
|
|
34
|
+
// SIGTERM first (lets a well-behaved process clean up); SIGKILL after a
|
|
35
|
+
// short grace period as a backstop against one that ignores it.
|
|
36
|
+
const terminate = () => {
|
|
37
|
+
child.kill('SIGTERM');
|
|
38
|
+
killTimer = setTimeout(() => {
|
|
39
|
+
child.kill('SIGKILL');
|
|
40
|
+
}, KILL_GRACE_MS);
|
|
41
|
+
};
|
|
42
|
+
const timer = setTimeout(() => {
|
|
43
|
+
timedOut = true;
|
|
44
|
+
terminate();
|
|
45
|
+
}, input.timeoutMs);
|
|
46
|
+
child.stdout.on('data', (chunk) => {
|
|
47
|
+
stdout += chunk.toString('utf8');
|
|
48
|
+
if (Buffer.byteLength(stdout, 'utf8') > input.stdoutLimitBytes) {
|
|
49
|
+
outputExceeded = true;
|
|
50
|
+
terminate();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
child.stderr.on('data', (chunk) => {
|
|
54
|
+
stderr += chunk.toString('utf8');
|
|
55
|
+
if (Buffer.byteLength(stderr, 'utf8') > input.stderrLimitBytes) {
|
|
56
|
+
outputExceeded = true;
|
|
57
|
+
terminate();
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// Spawn-level failure (e.g. ENOENT — executable not found) is distinct
|
|
61
|
+
// from a completed process with a non-zero exit code. Only this case
|
|
62
|
+
// rejects the promise.
|
|
63
|
+
child.on('error', (error) => {
|
|
64
|
+
if (settled)
|
|
65
|
+
return;
|
|
66
|
+
settled = true;
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
clearTimeout(killTimer);
|
|
69
|
+
reject(error);
|
|
70
|
+
});
|
|
71
|
+
child.on('close', (code) => {
|
|
72
|
+
if (settled)
|
|
73
|
+
return;
|
|
74
|
+
settled = true;
|
|
75
|
+
clearTimeout(timer);
|
|
76
|
+
clearTimeout(killTimer);
|
|
77
|
+
resolve({ stdout, stderr, exitCode: code, timedOut, outputExceeded });
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
package/generators.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/generators.json",
|
|
3
|
+
"generators": {
|
|
4
|
+
"doctor": {
|
|
5
|
+
"factory": "./dist/generators/doctor/generator",
|
|
6
|
+
"schema": "./src/generators/doctor/schema.json",
|
|
7
|
+
"description": "Diagnose the current Nx workspace (read-only)"
|
|
8
|
+
},
|
|
9
|
+
"init": {
|
|
10
|
+
"factory": "./dist/generators/init/generator",
|
|
11
|
+
"schema": "./src/generators/init/schema.json",
|
|
12
|
+
"description": "Run the preset-driven init pipeline (FSD Lite, agent rules, GitHub templates, review) against a clean working tree"
|
|
13
|
+
},
|
|
14
|
+
"add-integration": {
|
|
15
|
+
"factory": "./dist/generators/add-integration/generator",
|
|
16
|
+
"schema": "./src/generators/add-integration/schema.json",
|
|
17
|
+
"description": "Preview the official installation flow for a supported external integration"
|
|
18
|
+
},
|
|
19
|
+
"add-review": {
|
|
20
|
+
"factory": "./dist/generators/add-review/generator",
|
|
21
|
+
"schema": "./src/generators/add-review/schema.json",
|
|
22
|
+
"description": "Install the Claude PR review workflow"
|
|
23
|
+
},
|
|
24
|
+
"add-backend": {
|
|
25
|
+
"factory": "./dist/generators/add-backend/generator",
|
|
26
|
+
"schema": "./src/generators/add-backend/schema.json",
|
|
27
|
+
"description": "Wire a backend app into the workspace: shared-types lib, scope tags, and module-boundary constraints"
|
|
28
|
+
},
|
|
29
|
+
"add-agent-rules": {
|
|
30
|
+
"factory": "./dist/generators/add-agent-rules/generator",
|
|
31
|
+
"schema": "./src/generators/add-agent-rules/schema.json",
|
|
32
|
+
"description": "Install CLAUDE.md / AGENTS.md agent rules"
|
|
33
|
+
},
|
|
34
|
+
"add-github-templates": {
|
|
35
|
+
"factory": "./dist/generators/add-github-templates/generator",
|
|
36
|
+
"schema": "./src/generators/add-github-templates/schema.json",
|
|
37
|
+
"description": "Install GitHub Issue/PR templates and CODEOWNERS"
|
|
38
|
+
},
|
|
39
|
+
"add-fsd-lite": {
|
|
40
|
+
"factory": "./dist/generators/add-fsd-lite/generator",
|
|
41
|
+
"schema": "./src/generators/add-fsd-lite/schema.json",
|
|
42
|
+
"description": "Wire the archweave/fsd-boundaries ESLint rule into the frontend app and print the FSD layer guide"
|
|
43
|
+
},
|
|
44
|
+
"page": {
|
|
45
|
+
"factory": "./dist/generators/page/generator",
|
|
46
|
+
"schema": "./src/generators/page/schema.json",
|
|
47
|
+
"description": "Scaffold a new FSD page slice under src/pages (src/_pages on Next.js)"
|
|
48
|
+
},
|
|
49
|
+
"widget": {
|
|
50
|
+
"factory": "./dist/generators/widget/generator",
|
|
51
|
+
"schema": "./src/generators/widget/schema.json",
|
|
52
|
+
"description": "Scaffold a new FSD widget slice under src/widgets (opt-in: outside the Lite default scope)"
|
|
53
|
+
},
|
|
54
|
+
"feature": {
|
|
55
|
+
"factory": "./dist/generators/feature/generator",
|
|
56
|
+
"schema": "./src/generators/feature/schema.json",
|
|
57
|
+
"description": "Scaffold a new FSD feature slice under src/features"
|
|
58
|
+
},
|
|
59
|
+
"entity": {
|
|
60
|
+
"factory": "./dist/generators/entity/generator",
|
|
61
|
+
"schema": "./src/generators/entity/schema.json",
|
|
62
|
+
"description": "Scaffold a new FSD entity slice under src/entities"
|
|
63
|
+
},
|
|
64
|
+
"shared": {
|
|
65
|
+
"factory": "./dist/generators/shared/generator",
|
|
66
|
+
"schema": "./src/generators/shared/schema.json",
|
|
67
|
+
"description": "Scaffold a new FSD shared slice under src/shared"
|
|
68
|
+
},
|
|
69
|
+
"install-integration": {
|
|
70
|
+
"factory": "./dist/generators/install-integration/generator",
|
|
71
|
+
"schema": "./src/generators/install-integration/schema.json",
|
|
72
|
+
"description": "Install a supported external integration through its official CLI (on --dryRun=false), verify it live, record it, and declare it"
|
|
73
|
+
},
|
|
74
|
+
"record-integration": {
|
|
75
|
+
"factory": "./dist/generators/record-integration/generator",
|
|
76
|
+
"schema": "./src/generators/record-integration/schema.json",
|
|
77
|
+
"description": "Verify a manually installed integration and record its verified state"
|
|
78
|
+
},
|
|
79
|
+
"allow-builds": {
|
|
80
|
+
"factory": "./dist/generators/allow-builds/generator",
|
|
81
|
+
"schema": "./src/generators/allow-builds/schema.json",
|
|
82
|
+
"description": "Allow dependency build scripts pnpm skipped (pnpm-workspace.yaml) and, on --apply, run pnpm rebuild for them"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,97 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clearlydev/nx-archweave",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Nx generators that make a workspace ready to work on in one preset: FSD Lite structure with enforced module boundaries, AI agent rules, GitHub templates, and optional AI PR review (Claude, Gemini, GPT, Cursor)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "clearlydev (https://github.com/clearlydev)",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.18"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/clearlydev/nx-archweave.git",
|
|
13
|
+
"directory": "packages/nx-plugin"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/clearlydev/nx-archweave/tree/main/packages/nx-plugin#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/clearlydev/nx-archweave/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"nx",
|
|
21
|
+
"nx-plugin",
|
|
22
|
+
"generators",
|
|
23
|
+
"monorepo",
|
|
24
|
+
"scaffolding",
|
|
25
|
+
"feature-sliced-design",
|
|
26
|
+
"fsd",
|
|
27
|
+
"ai",
|
|
28
|
+
"code-review",
|
|
29
|
+
"claude",
|
|
30
|
+
"gemini",
|
|
31
|
+
"gpt",
|
|
32
|
+
"cursor"
|
|
33
|
+
],
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"prepack": "pnpm exec nx run @clearlydev/nx-archweave:bundle && node ../../tools/pack-sanitize.mjs prepack",
|
|
40
|
+
"postpack": "node ../../tools/pack-sanitize.mjs postpack"
|
|
41
|
+
},
|
|
42
|
+
"type": "module",
|
|
43
|
+
"main": "./dist/index.js",
|
|
44
|
+
"module": "./dist/index.js",
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"generators": "./generators.json",
|
|
47
|
+
"bin": {
|
|
48
|
+
"archweave-review-verdict": "dist/bin/review-verdict.js"
|
|
49
|
+
},
|
|
50
|
+
"exports": {
|
|
51
|
+
"./package.json": "./package.json",
|
|
52
|
+
".": {
|
|
53
|
+
"@nx-archweave/source": "./src/index.ts",
|
|
54
|
+
"types": "./dist/index.d.ts",
|
|
55
|
+
"import": "./dist/index.js",
|
|
56
|
+
"default": "./dist/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./eslint": {
|
|
59
|
+
"@nx-archweave/source": "./src/eslint/index.ts",
|
|
60
|
+
"types": "./dist/eslint/index.d.ts",
|
|
61
|
+
"import": "./dist/eslint/index.js",
|
|
62
|
+
"default": "./dist/eslint/index.js"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"files": [
|
|
66
|
+
"dist",
|
|
67
|
+
"generators.json",
|
|
68
|
+
"src/generators/*/schema.json",
|
|
69
|
+
"!**/*.tsbuildinfo",
|
|
70
|
+
"!**/*.d.ts.map",
|
|
71
|
+
"!dist/generators/**/*.d.ts",
|
|
72
|
+
"!dist/runtime/**/*.d.ts",
|
|
73
|
+
"!dist/bin/**/*.d.ts"
|
|
74
|
+
],
|
|
75
|
+
"nx": {
|
|
76
|
+
"tags": [
|
|
77
|
+
"type:plugin"
|
|
78
|
+
],
|
|
79
|
+
"targets": {
|
|
80
|
+
"bundle": {
|
|
81
|
+
"executor": "nx:run-commands",
|
|
82
|
+
"dependsOn": [
|
|
83
|
+
"build"
|
|
84
|
+
],
|
|
85
|
+
"options": {
|
|
86
|
+
"command": "node tools/bundle.mjs nx-plugin"
|
|
87
|
+
},
|
|
88
|
+
"outputs": [
|
|
89
|
+
"{projectRoot}/dist"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"@nx/devkit": "^23.1.0"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddAgentRules",
|
|
5
|
+
"title": "Write nx-archweave's agent rules into CLAUDE.md / AGENTS.md for the AI hosts you use",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"hosts": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": ["claude-code", "codex", "cursor", "gemini-cli"]
|
|
13
|
+
},
|
|
14
|
+
"description": "The AI coding tools you use. Claude Code reads CLAUDE.md; Codex, Cursor and Gemini CLI read AGENTS.md. Defaults to toolkit.config.json's aiHosts, else Claude Code.",
|
|
15
|
+
"x-prompt": {
|
|
16
|
+
"message": "Which AI coding tools do you use? (space to select, enter to confirm; none selected = toolkit.config.json's aiHosts, else Claude Code)",
|
|
17
|
+
"type": "list",
|
|
18
|
+
"multiselect": true,
|
|
19
|
+
"items": [
|
|
20
|
+
{ "value": "claude-code", "label": "Claude Code" },
|
|
21
|
+
{ "value": "codex", "label": "Codex" },
|
|
22
|
+
{ "value": "cursor", "label": "Cursor" },
|
|
23
|
+
{ "value": "gemini-cli", "label": "Gemini CLI" }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"locale": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["ko", "en"],
|
|
30
|
+
"description": "Content language. Defaults to toolkit.config.json's locale, else en"
|
|
31
|
+
},
|
|
32
|
+
"teamRules": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "Include the Team Rules section (collaboration rules for a shared repository). Defaults to toolkit.config.json's agentRules.teamRules, else false"
|
|
35
|
+
},
|
|
36
|
+
"dryRun": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": false,
|
|
39
|
+
"description": "Print the full generated content and effective decision without writing"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": []
|
|
43
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddBackend",
|
|
5
|
+
"title": "Wire a backend app into the workspace: shared-types, scope tags, module-boundary constraints",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"backend": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"express",
|
|
12
|
+
"nest"
|
|
13
|
+
],
|
|
14
|
+
"description": "Which backend the api app uses. App creation itself is delegated to the official @nx generator — when the api project is missing, the refusal report prints the exact commands to run first"
|
|
15
|
+
},
|
|
16
|
+
"apiName": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"default": "api",
|
|
19
|
+
"description": "Name of the backend application project to wire (convention: api)"
|
|
20
|
+
},
|
|
21
|
+
"frontendProject": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Explicit frontend project to wire, skipping auto-detection — the escape hatch when the workspace has several applications"
|
|
24
|
+
},
|
|
25
|
+
"applyEslint": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": false,
|
|
28
|
+
"description": "Write the scope depConstraints into the root ESLint config (only the exact Nx-generated allow-all block is rewritten; anything else degrades to a report-only snippet). Off by default so existing configs are never modified unasked"
|
|
29
|
+
},
|
|
30
|
+
"dryRun": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"description": "Preview every wiring action with zero writes"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"backend"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddFsdLite",
|
|
5
|
+
"title": "Wire the FSD layer rules into the frontend app",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"frontend": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["react-vite", "next"],
|
|
11
|
+
"description": "Target frontend — decides the layer set the guide prints. Next.js has no FSD 'app' layer (its App Router directory is it) and its pages layer is the _pages/ directory (FSD's Next.js guide: Next.js reads src/pages as its Pages Router). Omitted: toolkit.config.json's frontend (init records it); required when none is recorded"
|
|
12
|
+
},
|
|
13
|
+
"project": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The frontend app whose eslint.config.mjs gets the rule and whose source root holds the layers. Omitted: the workspace's one frontend application (e2e projects and the backend api are not candidates); with more than one, the run is refused with the candidates listed"
|
|
16
|
+
},
|
|
17
|
+
"enforcement": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["error", "warn"],
|
|
20
|
+
"description": "Severity of the archweave/fsd-boundaries ESLint rule. The rule is canonical FSD either way; only how hard it reports differs (Team preset: error; Solo / Quick Start: warn). Defaults to toolkit.config.json's fsd.enforcement, else warn"
|
|
21
|
+
},
|
|
22
|
+
"applyEslint": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false,
|
|
25
|
+
"description": "Write the rule into the app's ESLint config instead of printing a paste-ready snippet. The create CLI passes this on workspaces it just created; leave it off to keep an existing config untouched"
|
|
26
|
+
},
|
|
27
|
+
"steiger": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false,
|
|
30
|
+
"description": "Also set up steiger, the official FSD linter, as an opt-in fsd-check target: writes the app's steiger.config.mjs (recommended rules; an existing config is kept), adds the target to the app and the two devDependencies to the root package.json, and prints the install command. Needs Node >= 22.18"
|
|
31
|
+
},
|
|
32
|
+
"locale": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": ["ko", "en"],
|
|
35
|
+
"description": "Report and snippet language. Defaults to toolkit.config.json's locale, else en"
|
|
36
|
+
},
|
|
37
|
+
"dryRun": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false,
|
|
40
|
+
"description": "Print the report (including what --applyEslint would write) without writing anything"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddGithubTemplates",
|
|
5
|
+
"title": "Install GitHub Issue/PR templates and CODEOWNERS",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"issue": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"default": false,
|
|
11
|
+
"description": "Install the bug-report and feature-request Issue Forms"
|
|
12
|
+
},
|
|
13
|
+
"pr": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": true,
|
|
16
|
+
"description": "Install the PULL_REQUEST_TEMPLATE.md"
|
|
17
|
+
},
|
|
18
|
+
"codeowners": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"default": false,
|
|
21
|
+
"description": "Install a CODEOWNERS placeholder"
|
|
22
|
+
},
|
|
23
|
+
"locale": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["ko", "en"],
|
|
26
|
+
"description": "Template language. Defaults to toolkit.config.json's locale, else en"
|
|
27
|
+
},
|
|
28
|
+
"dryRun": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": false,
|
|
31
|
+
"description": "Print the full content of every selected file without writing"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": []
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddIntegration",
|
|
5
|
+
"title": "Preview the official installation flow for a supported external integration",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"tool": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["ponytail"],
|
|
11
|
+
"description": "The plugin to preview, by its plugin-catalog id (@nx-archweave/integrations plugin-catalog.ts). The enum is kept equal to the catalog by a test."
|
|
12
|
+
},
|
|
13
|
+
"target": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["claude-code"],
|
|
16
|
+
"default": "claude-code",
|
|
17
|
+
"description": "The host environment to target. Hosts with a plugin adapter; today only 'claude-code'."
|
|
18
|
+
},
|
|
19
|
+
"scope": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["user", "project", "local"],
|
|
22
|
+
"description": "Claude Code plugin scope shown in the previewed install command (default project: recorded in the workspace's .claude/settings.json). Only an explicit value is carried into the install-integration hint."
|
|
23
|
+
},
|
|
24
|
+
"versionRange": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Version to show as requested. Without it, the preview says the marketplace decides — it installs its own latest. No network access."
|
|
27
|
+
},
|
|
28
|
+
"dryRun": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": true,
|
|
31
|
+
"description": "Always previews only — no installer, file, or manifest write ever occurs, regardless of this value."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": ["tool"]
|
|
35
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AddReview",
|
|
5
|
+
"title": "Install the PR review workflow",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"provider": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"claude",
|
|
12
|
+
"gemini",
|
|
13
|
+
"gpt",
|
|
14
|
+
"cursor"
|
|
15
|
+
],
|
|
16
|
+
"description": "Review provider whose workflow to install. Omitted: toolkit.config.json's review.provider, else claude (no schema default — it would shadow the recorded one on a rerun)"
|
|
17
|
+
},
|
|
18
|
+
"mode": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": [
|
|
21
|
+
"fast",
|
|
22
|
+
"standard",
|
|
23
|
+
"thorough"
|
|
24
|
+
],
|
|
25
|
+
"description": "Review mode (thorough adds the over-engineering pass). Omitted: toolkit.config.json's review.mode, else standard"
|
|
26
|
+
},
|
|
27
|
+
"locale": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"ko",
|
|
31
|
+
"en"
|
|
32
|
+
],
|
|
33
|
+
"description": "Review language. Defaults to toolkit.config.json's locale, else en"
|
|
34
|
+
},
|
|
35
|
+
"maxRounds": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"enum": [
|
|
38
|
+
1,
|
|
39
|
+
2,
|
|
40
|
+
3,
|
|
41
|
+
4,
|
|
42
|
+
5
|
|
43
|
+
],
|
|
44
|
+
"description": "Automatic review round cap per PR (bounded 1-5). Omitted: toolkit.config.json's review.maxRounds, else 3"
|
|
45
|
+
},
|
|
46
|
+
"onConflict": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"overwrite",
|
|
50
|
+
"skip",
|
|
51
|
+
"alternate-filename"
|
|
52
|
+
],
|
|
53
|
+
"description": "How to resolve an existing, differing workflow file. Omit to get a merge proposal (diff printed, nothing written)"
|
|
54
|
+
},
|
|
55
|
+
"dryRun": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"default": false,
|
|
58
|
+
"description": "Print the full generated YAML, config snippet, and effective decision without writing"
|
|
59
|
+
},
|
|
60
|
+
"packageManager": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"pnpm",
|
|
64
|
+
"npm",
|
|
65
|
+
"yarn",
|
|
66
|
+
"bun"
|
|
67
|
+
],
|
|
68
|
+
"description": "Package manager the generated workflow installs with (default: detected, then pnpm)."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": []
|
|
72
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "AllowBuilds",
|
|
5
|
+
"title": "Allow dependency build scripts pnpm skipped, and run them",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"packages": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": { "type": "string" },
|
|
11
|
+
"description": "npm package names whose install scripts may run (comma-separated: --packages=sharp,@swc/core). Each must be installed (listed in pnpm-lock.yaml)."
|
|
12
|
+
},
|
|
13
|
+
"apply": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": false,
|
|
16
|
+
"description": "Allow the builds in pnpm-workspace.yaml and run `pnpm rebuild` for them. Without it (default) the generator shows what would change and writes nothing. Ignored when Nx's own --dry-run is set."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": ["packages"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "Doctor",
|
|
5
|
+
"title": "Diagnose the current Nx workspace (read-only)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"liveIntegrations": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"default": false,
|
|
11
|
+
"description": "When true, performs live verification (e.g. claude plugin list --json for the catalog's Claude Code plugins) instead of trusting only the recorded manifest state. Still fully read-only \u2014 no config or manifest write, no repair."
|
|
12
|
+
},
|
|
13
|
+
"json": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"default": false,
|
|
16
|
+
"description": "Print the machine-readable archweave/doctor-report@1 JSON to stdout instead of the console report. Still read-only \u2014 nothing is written."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": []
|
|
20
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"id": "Entity",
|
|
5
|
+
"title": "Scaffold a new FSD entity slice",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Slice name in kebab-case (e.g. \"user\") — becomes <app>/src/entities/<name>. Invalid values are refused with a report, not thrown"
|
|
11
|
+
},
|
|
12
|
+
"publicApiName": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Exported stub function name. Defaults to the camelCase form of name"
|
|
15
|
+
},
|
|
16
|
+
"segments": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": { "type": "string" },
|
|
19
|
+
"description": "Extra segments to start the slice with, each as <segment>/index.ts (e.g. ui,api). model always exists — it holds the stub. Names are by purpose: ui, api, lib, config … (components/hooks/utils/types are refused)"
|
|
20
|
+
},
|
|
21
|
+
"project": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The frontend app whose source root holds the FSD layers (run add-fsd-lite first). Omitted: the workspace's one frontend application; with more than one, the run is refused with the candidates listed"
|
|
24
|
+
},
|
|
25
|
+
"locale": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["ko", "en"],
|
|
28
|
+
"description": "Generated content language. Defaults to toolkit.config.json's locale, else en"
|
|
29
|
+
},
|
|
30
|
+
"dryRun": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"description": "Print the files that would be generated without writing anything"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["name"]
|
|
37
|
+
}
|