@tsparticles/cli 3.3.1 → 3.3.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 (40) hide show
  1. package/.github/dependabot.yml +7 -0
  2. package/.planning/codebase/ARCHITECTURE.md +83 -51
  3. package/.planning/codebase/CONCERNS.md +61 -58
  4. package/.planning/codebase/CONVENTIONS.md +47 -52
  5. package/.planning/codebase/INTEGRATIONS.md +26 -17
  6. package/.planning/codebase/STACK.md +37 -31
  7. package/.planning/codebase/STRUCTURE.md +87 -53
  8. package/.planning/codebase/TESTING.md +80 -62
  9. package/dist/build/build-distfiles.js +14 -13
  10. package/dist/build/build-diststats.js +8 -7
  11. package/dist/build/build-prettier.js +16 -15
  12. package/dist/build/build-tsc.js +4 -3
  13. package/dist/build/build.js +10 -8
  14. package/dist/cli.js +3 -3
  15. package/dist/create/plugin/create-plugin.js +4 -3
  16. package/dist/create/preset/create-preset.js +4 -3
  17. package/dist/create/shape/create-shape.js +4 -3
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/utils/file-utils.js +8 -7
  20. package/dist/utils/template-utils.js +4 -3
  21. package/files/empty-project/package.json +7 -7
  22. package/files/empty-project/webpack.config.js +11 -11
  23. package/package.json +9 -11
  24. package/src/build/build-distfiles.ts +15 -14
  25. package/src/build/build-diststats.ts +8 -8
  26. package/src/build/build-prettier.ts +16 -15
  27. package/src/build/build-tsc.ts +4 -3
  28. package/src/build/build.ts +10 -10
  29. package/src/cli.ts +3 -3
  30. package/src/create/plugin/create-plugin.ts +4 -3
  31. package/src/create/preset/create-preset.ts +4 -3
  32. package/src/create/shape/create-shape.ts +4 -3
  33. package/src/utils/file-utils.ts +8 -7
  34. package/src/utils/template-utils.ts +4 -3
  35. package/tests/create-plugin.test.ts +25 -25
  36. package/tests/create-preset.test.ts +25 -25
  37. package/tests/create-shape.test.ts +25 -25
  38. package/tests/file-utils.test.ts +87 -78
  39. package/tests/tsconfig.json +12 -11
  40. package/tsconfig.json +52 -53
@@ -1,73 +1,82 @@
1
1
  # External Integrations
2
2
 
3
- **Analysis Date:** 2026-03-08
3
+ **Analysis Date:** 2026-03-10
4
4
 
5
5
  ## APIs & External Services
6
6
 
7
- No cloud SDKs (Stripe, AWS, Supabase, etc.) detected in `src/` imports. Searches for common providers returned no matches.
7
+ This project is a local CLI tool focused on scaffolding and building tsParticles-related packages. There are minimal external service integrations.
8
+
9
+ **Repository / Git:**
10
+
11
+ - Git: CLI uses the `git` binary when available to obtain repository URL (`src/utils/file-utils.ts` uses `lookpath("git")` and executes `git config --get remote.origin.url`). No other GitHub API integration detected.
12
+
13
+ **NPM Registry:**
14
+
15
+ - Publishing: GitHub Actions workflow publishes packages to npm registry (`.github/workflows/npm-publish.yml`) using `pnpm publish` against `https://registry.npmjs.org`.
16
+ - Auth: CI uses OIDC/GitHub Actions environment for authentication as configured in `.github/workflows/npm-publish.yml` (permissions include `id-token: write`).
8
17
 
9
18
  ## Data Storage
10
19
 
11
20
  **Databases:**
12
21
 
13
- - Not detected. No database clients (pg/mysql/mongodb) are imported in `src/`.
22
+ - Not detected. The CLI operates on the local filesystem; no database clients (e.g. PostgreSQL, MongoDB) are referenced in `src/`.
14
23
 
15
24
  **File Storage:**
16
25
 
17
- - Local filesystem via `fs-extra` used throughout (`src/utils/file-utils.ts`, `src/utils/template-utils.ts`, `src/create/*`) to read/write project templates and package files.
26
+ - Local filesystem via `fs-extra` (`src/utils/file-utils.ts` and many create/template helpers). Templates are copied from `files/*` into target directories (`src/create/*`, e.g. `src/create/plugin/create-plugin.ts` uses `files/create-plugin`).
18
27
 
19
28
  **Caching:**
20
29
 
21
- - None detected.
30
+ - Not detected. No Redis or in-process caching libraries observed.
22
31
 
23
32
  ## Authentication & Identity
24
33
 
25
34
  **Auth Provider:**
26
35
 
27
- - Not applicable. This is a local CLI tool and does not integrate with external auth providers.
36
+ - None for runtime. CI publishes to npm using GitHub Actions OIDC flow (see `.github/workflows/npm-publish.yml`). There are no runtime OAuth or Identity providers integrated into the CLI.
28
37
 
29
38
  ## Monitoring & Observability
30
39
 
31
40
  **Error Tracking:**
32
41
 
33
- - None detected (no Sentry / Datadog / Rollbar SDK imports).
42
+ - Not detected. No Sentry, Datadog, or similar SDKs in dependencies.
34
43
 
35
44
  **Logs:**
36
45
 
37
- - Standard console logging (`console.log`, `console.error`, `console.warn`) used throughout build and template utilities (e.g., `src/build/*`, `src/utils/*`).
46
+ - Console logging used throughout the CLI (`console.log`, `console.warn`, `console.error`). See `src/build/*` and `src/create/*` for examples (e.g. `src/build/build.ts`, `src/build/build-prettier.ts`).
38
47
 
39
48
  ## CI/CD & Deployment
40
49
 
41
50
  **Hosting:**
42
51
 
43
- - NPM registry publishes defined in `.github/workflows/npm-publish.yml` (publishes on tags `v*`).
52
+ - NPM registry for package distribution. Source is maintained in GitHub and CI runs on GitHub Actions (`.github/workflows/*`).
44
53
 
45
54
  **CI Pipeline:**
46
55
 
47
- - GitHub Actions workflows:
48
- - `/.github/workflows/node.js-ci.yml` runs on push and pull_request for `main`, executes `pnpm install`, `pnpm run build:ci`, and `pnpm test`.
49
- - `/.github/workflows/npm-publish.yml` publishes package on version tags using OIDC-based authentication.
56
+ - GitHub Actions pipelines:
57
+ - `Node.js CI` (`.github/workflows/node.js-ci.yml`) runs on push and PRs to `main`: installs via `pnpm install`, runs `pnpm run build:ci` and `pnpm test`.
58
+ - `Publish Packages` (`.github/workflows/npm-publish.yml`) publishes tags `v*` to npm, using OIDC-based auth and `pnpm publish`.
50
59
 
51
60
  ## Environment Configuration
52
61
 
53
62
  **Required env vars:**
54
63
 
55
- - No application runtime env vars detected in source. CI workflows rely on GitHub OIDC and standard GitHub Actions environment variables.
64
+ - Not enforced in repo code. CI publishing relies on GitHub Actions OIDC configured in workflow; no runtime environment variables are required by the CLI itself.
56
65
 
57
66
  **Secrets location:**
58
67
 
59
- - No secrets files in repo. GitHub publishing uses built-in OIDC and repository permissions configured in the workflow (`id-token: write`).
68
+ - Not present in repo. CI uses OIDC in the publish workflow. No local secrets files detected (no `.env`).
60
69
 
61
70
  ## Webhooks & Callbacks
62
71
 
63
72
  **Incoming:**
64
73
 
65
- - None detected.
74
+ - Not detected. This is a CLI tool; it does not expose HTTP endpoints.
66
75
 
67
76
  **Outgoing:**
68
77
 
69
- - None detected.
78
+ - Not detected. The CLI does not make outbound HTTP API calls; templates and README files reference public CDNs (jsDelivr) and GitHub URLs but no HTTP client libraries are used.
70
79
 
71
80
  ---
72
81
 
73
- _Integration audit: 2026-03-08_
82
+ _Integration audit: 2026-03-10_
@@ -1,85 +1,91 @@
1
1
  # Technology Stack
2
2
 
3
- **Analysis Date:** 2026-03-08
3
+ **Analysis Date:** 2026-03-10
4
4
 
5
5
  ## Languages
6
6
 
7
7
  **Primary:**
8
8
 
9
- - TypeScript (>=5.x) - used across the entire codebase in `src/` (e.g. `src/cli.ts`, `src/create/*`, `src/build/*`)
9
+ - TypeScript 5.x (project uses `typescript` ^5.9.3) - used across CLI source under `src/` (`src/**/*.ts`). See `package.json` and `tsconfig.json` (`package.json`: `dependencies`/`devDependencies`, `tsconfig.json`: `compilerOptions`).
10
10
 
11
11
  **Secondary:**
12
12
 
13
- - JavaScript (Node) - runtime JS emitted to `dist/` (package `type` set to `module` in `package.json`)
13
+ - JavaScript (Node ESM runtime output in `dist/` / CLI entry `dist/cli.js`) - `package.json` `type: "module"` and `bin` field (`package.json`).
14
14
 
15
15
  ## Runtime
16
16
 
17
17
  **Environment:**
18
18
 
19
- - Node.js 24 (CI uses `actions/setup-node` with `node-version: "24"` in `.github/workflows/node.js-ci.yml`)
19
+ - Node.js (ES module, NodeNext resolution). CI workflows use Node 24 (`.github/workflows/node.js-ci.yml`). `tsconfig.json` `module: "NodeNext"`, `target: "ESNext"`.
20
20
 
21
21
  **Package Manager:**
22
22
 
23
- - pnpm (declared in `package.json` via `packageManager`: `pnpm@10.31.0`)
24
- - Lockfile present: `pnpm-lock.yaml`
23
+ - pnpm (project declares `packageManager: "pnpm@10.32.0"` in `package.json`, lock file `pnpm-lock.yaml` present).
24
+ - Lockfile: `pnpm-lock.yaml` (present).
25
25
 
26
26
  ## Frameworks
27
27
 
28
28
  **Core:**
29
29
 
30
- - None web-framework specific. This is a CLI application built with Node and TypeScript. Entry point: `src/cli.ts`.
31
-
32
- **CLI/Command parsing:**
33
-
34
- - `commander` (`src/cli.ts`, `src/create/create.ts`, `src/build/*`) - used to declare commands and subcommands.
30
+ - None web-framework-specific. This is a CLI application built with Node and TypeScript. CLI command framework: `commander` (`package.json` -> `dependencies`), commands live in `src/cli.ts`, `src/build/*`, `src/create/*`.
35
31
 
36
32
  **Testing:**
37
33
 
38
- - `vitest` (configured in `vitest.config.ts`, tests in `tests/*.test.ts`)
34
+ - Vitest (`vitest` ^4.x) - config file: `vitest.config.ts`, tests located in `tests/*.test.ts`.
39
35
 
40
36
  **Build/Dev:**
41
37
 
42
- - `typescript` for compilation (`tsc -p src`, see `package.json` scripts)
43
- - `webpack` used by some build tasks (see `src/build/build-bundle.ts` importing `webpack`)
44
- - `swc` (`@swc/core`) is listed as dependency (used by some tooling or downstream tasks)
38
+ - TypeScript compiler (`tsc`) is used for building (`scripts.build:ts*` in `package.json`, `tsconfig.json` and `src/tsconfig.json`).
39
+ - Prettier for formatting (configured via dependency `@tsparticles/prettier-config` referenced in `package.json`). Prettier is run by `src/build/build-prettier.ts` and scripts in `package.json`.
40
+ - ESLint (`eslint`) with `@tsparticles/eslint-config` - linting run in `src/build/build-eslint.ts` and via `package.json` scripts.
41
+ - Webpack used for bundling (dependency `webpack`, `swc-loader`, `@swc/core`) - bundling logic in `src/build/build-bundle.ts`.
42
+ - dependency-cruiser used for circular dependency checks - config `.dependency-cruiser.cjs` and script `circular-deps` in `package.json`.
45
43
 
46
44
  ## Key Dependencies
47
45
 
48
46
  **Critical:**
49
47
 
50
- - `commander` - command-line parsing (`src/cli.ts`)
51
- - `fs-extra` - filesystem utilities used widely (`src/utils/*`, `src/create/*`, `src/build/*`)
52
- - `prettier` - formatting (`src/build/build-prettier.ts`)
53
- - `typescript` - language (dev dependency and build target)
48
+ - `typescript` ^5.9.3 - primary language toolchain (`package.json`).
49
+ - `commander` ^14.x - CLI command framework (`src/cli.ts`, `package.json`).
50
+ - `fs-extra` ^11.x - filesystem utilities used widely (`src/utils/file-utils.ts`, `package.json`).
51
+ - `prettier` ^3.8.x - formatting; project references `@tsparticles/prettier-config` (`package.json`).
52
+ - `eslint` ^10.x and TypeScript ESLint tooling (`package.json`, `src/build/build-eslint.ts`).
53
+
54
+ **Infrastructure / Build:**
55
+
56
+ - `webpack` ^5.x, `swc-loader`, `@swc/core` - bundling and fast transpilation (`package.json`, `src/build/build-bundle.ts`).
57
+ - `vitest` ^4.x - test runner (`vitest.config.ts`, `package.json`).
58
+ - `klaw` - used by prettier tooling to walk folders (`src/build/build-prettier.ts`).
54
59
 
55
- **Infrastructure / Tooling:**
60
+ **Utilities:**
56
61
 
57
- - `prompts` - interactive prompts for the `create` subcommands (`src/create/*`)
58
- - `lookpath` - used to detect external commands (`src/utils/template-utils.ts`, `src/utils/file-utils.ts`)
59
- - `webpack` - bundling (`src/build/build-bundle.ts`)
60
- - `vitest` - testing runner (`tests/*.test.ts`, `vitest.config.ts`)
62
+ - `prompts` - interactive prompts used in templates/generator code (`package.json`, `src/create/*`).
63
+ - `lookpath` - used to detect `git` presence in `src/utils/file-utils.ts`.
61
64
 
62
65
  ## Configuration
63
66
 
64
67
  **Environment:**
65
68
 
66
- - No `.env` usage detected. CI sets Node version and runs pnpm in GitHub workflows (`.github/workflows/*.yml`).
69
+ - No project-level `.env` files detected. The CLI uses the local environment (executes `git` where available). See `src/utils/file-utils.ts` (calls `lookpath("git")` and runs `git config --get remote.origin.url`).
67
70
 
68
71
  **Build:**
69
72
 
70
- - TypeScript config: `tsconfig.json` (root) and `src/tsconfig.json` included via `eslint.config.js` (parserOptions.project).
71
- - Build scripts are defined in `package.json` (e.g. `pnpm run build`, `pnpm run build:ci`, `pnpm run build:ts:cjs`)
73
+ - TypeScript config: `tsconfig.json` (root) and `src/tsconfig.json` (per-source) - `module: NodeNext`, `target: ESNext`, strict compiler options.
74
+ - Linting config is provided by `@tsparticles/eslint-config` (referenced in `package.json`). A dependency-cruiser configuration is present at `.dependency-cruiser.cjs`.
75
+ - Prettier config is supplied via `@tsparticles/prettier-config` and `package.json` scripts rely on `src/build/build-prettier.ts`.
72
76
 
73
77
  ## Platform Requirements
74
78
 
75
79
  **Development:**
76
80
 
77
- - Node.js 24+, pnpm (v10+), git - used by scripts and utilities (`src/utils/file-utils.ts` uses `git` if available)
81
+ - Node.js >= 24 recommended (CI uses Node 24 in `.github/workflows/node.js-ci.yml`).
82
+ - pnpm >= 10.x (project `packageManager` sets `pnpm@10.32.0`).
83
+ - Git CLI for repository URL resolution used by templates (`src/utils/file-utils.ts`).
78
84
 
79
- **Production / Distribution:**
85
+ **Production / Publishing:**
80
86
 
81
- - Packaged as npm package (`publishConfig` in `package.json` and `npm-publish` workflow). Outputs are placed under `dist/` and CLI binary `dist/cli.js` (`bin` in `package.json`).
87
+ - Packages are published to npm registry (see `.github/workflows/npm-publish.yml`). The CI uses GitHub Actions and OIDC for auth when publishing (`.github/workflows/npm-publish.yml`).
82
88
 
83
89
  ---
84
90
 
85
- _Stack analysis: 2026-03-08_
91
+ _Stack analysis: 2026-03-10_
@@ -1,104 +1,138 @@
1
1
  # Codebase Structure
2
2
 
3
- **Analysis Date:** 2026-03-08
3
+ **Analysis Date:** 2026-03-10
4
4
 
5
5
  ## Directory Layout
6
6
 
7
7
  ```
8
8
  [project-root]/
9
- ├── src/ # TypeScript source for the CLI
10
- │ ├── build/ # Build command implementations and helpers
11
- │ ├── create/ # Create command implementations (preset, plugin, shape)
12
- └── utils/ # Shared utilities (file, template, string helpers)
13
- ├── files/ # Template files used by create commands
14
- ├── tests/ # Vitest unit tests for utilities and create flows
15
- ├── dist/ # Build output (generated, should be ignored)
16
- ├── package.json # NPM package config and scripts
17
- ├── pnpm-lock.yaml # Lockfile for pnpm
18
- ├── tsconfig.json # TypeScript compiler options
19
- └── .github/workflows/ # CI and publish workflows
9
+ ├── src/ # TypeScript source for CLI and build tasks
10
+ │ ├── cli.ts # CLI entrypoint (registers commands)
11
+ │ ├── create/ # "create" command and subcommands
12
+ │ ├── create.ts
13
+ │ │ ├── plugin/
14
+ │ │ │ ├── plugin.ts
15
+ │ │ │ └── create-plugin.ts
16
+ │ │ ├── preset/
17
+ │ │ │ ├── preset.ts
18
+ │ │ │ └── create-preset.ts
19
+ │ │ └── shape/
20
+ │ │ ├── shape.ts
21
+ │ │ └── create-shape.ts
22
+ │ ├── build/ # Build helper commands/tasks
23
+ │ │ ├── build.ts
24
+ │ │ ├── build-tsc.ts
25
+ │ │ ├── build-bundle.ts
26
+ │ │ └── ...
27
+ │ └── utils/ # Shared utilities
28
+ │ ├── file-utils.ts
29
+ │ ├── template-utils.ts
30
+ │ └── string-utils.ts
31
+ ├── files/ # Template files used by generators (not under src/ but referenced)
32
+ ├── tests/ # Vitest unit tests
33
+ ├── dist/ # Compiled ESM output (generated)
34
+ ├── package.json
35
+ ├── pnpm-lock.yaml
36
+ ├── tsconfig.json
37
+ └── .planning/ # Mapping and planning docs
20
38
  ```
21
39
 
22
40
  ## Directory Purposes
23
41
 
24
- **`src/`**:
42
+ **src/**:
25
43
 
26
- - Purpose: Primary implementation in TypeScript.
27
- - Contains: `src/cli.ts`, `src/build/*`, `src/create/*`, `src/utils/*`.
28
- - Key files: `src/cli.ts` (entry), `src/create/create.ts`, `src/build/build.ts`, `src/utils/file-utils.ts`.
44
+ - Purpose: Source code for the CLI tool and internal build tasks.
45
+ - Contains: Command modules (`src/create/*`), build tasks (`src/build/*`), utilities (`src/utils/*`).
46
+ - Key files: `src/cli.ts`, `src/create/create.ts`, `src/create/preset/create-preset.ts`.
29
47
 
30
- **`files/`**:
48
+ **src/create/**:
31
49
 
32
- - Purpose: Scaffolding templates used by the create commands.
33
- - Contains: `files/create-shape`, `files/create-preset`, `files/create-plugin`, `files/empty-project`.
50
+ - Purpose: Implements the `create` command and its subcommands.
51
+ - Contains: `plugin`, `preset`, `shape` subfolders each exposing a `Command` instance and a template-creation implementation (`create-*.ts`).
52
+ - Key files: `src/create/preset/preset.ts`, `src/create/preset/create-preset.ts`.
34
53
 
35
- **`tests/`**:
54
+ **src/build/**:
36
55
 
37
- - Purpose: Unit tests executed by `vitest`.
38
- - Contains: tests validating template creation and utility behavior (e.g., `tests/create-shape.test.ts`, `tests/file-utils.test.ts`).
56
+ - Purpose: Build and CI helper tasks used by `pnpm run build` and `build` CLI command.
57
+ - Contains: modular build steps: `build-prettier.ts`, `build-eslint.ts`, `build-tsc.ts`, bundling helpers.
58
+ - Key files: `src/build/build.ts` (aggregator), `src/build/build-tsc.ts`.
39
59
 
40
- **`dist/`**:
60
+ **src/utils/**:
41
61
 
42
- - Purpose: Output of compilation/build process. Generated; not committed.
62
+ - Purpose: Shared helpers for filesystem operations, string handling, and template updates.
63
+ - Contains: `file-utils.ts` (`replaceTokensInFile`, `getDestinationDir`), `template-utils.ts` (`runInstall`, `runBuild`, `updatePackageFile`).
64
+
65
+ **files/**:
66
+
67
+ - Purpose: Template projects that are copied into new destinations by `create` commands.
68
+ - Note: Referenced by `src/create/*` code via relative paths (e.g., `path.join(__dirname, "..", "..", "files", "create-preset")` in `src/create/preset/create-preset.ts`).
69
+
70
+ **tests/**:
71
+
72
+ - Purpose: Unit tests using Vitest for template creation behavior.
73
+ - Contains: `tests/create-shape.test.ts`, `tests/create-preset.test.ts`.
43
74
 
44
75
  ## Key File Locations
45
76
 
46
- **Entry Points:**
77
+ Entry Points:
47
78
 
48
- - `src/cli.ts`: CLI program creation and command registration.
79
+ - `src/cli.ts`: boots the program, reads package version from `package.json`, registers `build` and `create` commands.
49
80
 
50
- **Configuration:**
81
+ Create commands:
51
82
 
52
- - `package.json`: scripts, dependencies, package metadata.
53
- - `tsconfig.json`: TypeScript configuration.
54
- - `vitest.config.ts`: Test runner configuration.
83
+ - `src/create/create.ts`: aggregates subcommands.
84
+ - `src/create/preset/preset.ts`: CLI surface for `preset` command.
85
+ - `src/create/preset/create-preset.ts`: implementation that writes files and runs install/build.
55
86
 
56
- **Core Logic:**
87
+ Utilities:
57
88
 
58
- - `src/utils/file-utils.ts`: token replacement, destination directory checks, git repository lookup.
59
- - `src/utils/template-utils.ts`: template transformers, copy helpers, npm build/install invocations.
89
+ - `src/utils/file-utils.ts`: token replacement helpers and repository detection.
90
+ - `src/utils/template-utils.ts`: file copying, package updates and running `npm` commands.
60
91
 
61
- **Commands:**
92
+ Build tasks:
62
93
 
63
- - `src/create/*`: `src/create/create.ts`, `src/create/preset/*`, `src/create/plugin/*`, `src/create/shape/*`.
64
- - `src/build/*`: `build.ts`, `build-prettier.ts`, `build-bundle.ts`, `build-tsc.ts`, `build-eslint.ts`, `build-distfiles.ts`, `build-diststats.ts`.
94
+ - `src/build/build.ts`: orchestration of build steps called both in CI and local `pnpm run build`.
65
95
 
66
96
  ## Naming Conventions
67
97
 
68
98
  Files:
69
99
 
70
- - Kebab-case for templates/files under `files/`.
71
- - Source files in `src/` use `camelCase` or `kebab-case` depending on purpose; commands grouped into directories named by feature.
100
+ - Pattern: kebab-case for file names that represent commands or grouped concerns (e.g., `create-preset.ts`, `build-tsc.ts`).
101
+ - Source modules are TypeScript (`.ts`) compiled to ESM JS in `dist/`.
72
102
 
73
103
  Directories:
74
104
 
75
- - Feature directories under `src/` (e.g., `create`, `build`, `utils`).
105
+ - Pattern: singular, descriptive names (`create`, `build`, `utils`, `files`).
76
106
 
77
107
  ## Where to Add New Code
78
108
 
79
- New Feature (command):
80
- New Component/Module:
109
+ New Feature (CLI command):
81
110
 
82
- - Implementation: `src/utils/` for shared helpers, or `src/<feature>/` if feature-specific.
83
- - Export public helpers from their files; avoid adding global side-effects.
111
+ - Primary code: add a new command module under `src/<feature>/` or create a subcommand under `src/create/`.
112
+ - Registration: register the new `Command` in `src/cli.ts` or in `src/create/create.ts` for `create`-subcommands.
113
+ - Tests: add unit tests under `tests/` following existing patterns (`tests/<feature>.test.ts`).
84
114
 
85
- Utilities:
115
+ New Utility:
116
+
117
+ - Implementation: add new helper in `src/utils/` and export named functions; reuse in command modules.
118
+ - Examples: `src/utils/new-util.ts` and update `src/utils/index.ts` (if created) to re-export it.
119
+
120
+ Templates and Files:
86
121
 
87
- - Shared helpers: `src/utils/`.
88
- - If utility is generic, add tests in `tests/` and export clearly-typed interfaces.
122
+ - Add new templates under `files/` and reference them from create implementations using `path.join(__dirname, "..", "..", "files", "<template>")`.
89
123
 
90
124
  ## Special Directories
91
125
 
92
- `files/`:
126
+ dist/:
93
127
 
94
- - Purpose: Template assets for project scaffolding.
95
- - Generated: No
96
- - Committed: Yes
128
+ - Purpose: Compiled ESM output for packaging and the `bin` entry (`dist/cli.js`).
129
+ - Generated: Yes
130
+ - Committed: No (should be generated during build)
97
131
 
98
- `tests/`:
132
+ tests/tmp-files/:
99
133
 
100
- - Purpose: Contains unit tests. Committed: Yes
134
+ - Purpose: Tests write temporary projects into `tests/tmp-files/*` during execution and remove them afterwards (see `tests/*.test.ts`).
101
135
 
102
136
  ---
103
137
 
104
- _Structure analysis: 2026-03-08_
138
+ _Structure analysis: 2026-03-10_