@icebreakers/monorepo-templates 1.3.4 → 2.0.0

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 (47) hide show
  1. package/assets/.agents/skills/repoctl/SKILL.md +63 -0
  2. package/assets/.agents/skills/repoctl/references/commands.md +243 -0
  3. package/assets/.agents/skills/repoctl/references/config.md +67 -0
  4. package/assets/.agents/skills/repoctl/references/templates.md +46 -0
  5. package/assets/AGENTS.md +31 -42
  6. package/assets/CLAUDE.md +14 -0
  7. package/assets/gitignore +3 -0
  8. package/assets/package.json +5 -45
  9. package/assets/pnpm-workspace.yaml +1 -1
  10. package/assets/turbo.json +11 -0
  11. package/assets-data.mjs +2 -0
  12. package/dist/cli.mjs +1 -1
  13. package/dist/index.mjs +1 -1
  14. package/dist/{prepare-D7eJqEqy.mjs → prepare-zIcRa4-K.mjs} +43 -7
  15. package/package.json +5 -3
  16. package/templates/cli/dev/index.ts +4 -2
  17. package/templates/cli/package.json +4 -1
  18. package/templates/client/gitignore +1 -0
  19. package/templates/client/package.json +13 -8
  20. package/templates/client/turbo.json +11 -0
  21. package/templates/server/gitignore +1 -0
  22. package/templates/server/package.json +9 -6
  23. package/templates/server/src/node-entry.ts +2 -2
  24. package/templates/server/tsconfig.json +2 -1
  25. package/templates/server/turbo.json +11 -0
  26. package/templates/tsdown/package.json +5 -2
  27. package/templates/vitepress/ai/create.md +45 -0
  28. package/templates/vitepress/ai/index.md +1 -0
  29. package/templates/vitepress/package.json +8 -5
  30. package/templates/vitepress/reference/templates.md +8 -0
  31. package/templates/vitepress/scripts/check-locales.ts +2 -2
  32. package/templates/vitepress/start/index.md +1 -1
  33. package/templates/vitepress/start/install.md +1 -1
  34. package/templates/vitepress/tasks/adopt-existing.md +1 -1
  35. package/templates/vitepress/tsconfig.json +1 -0
  36. package/templates/vitepress/zh/ai/create.md +45 -0
  37. package/templates/vitepress/zh/ai/index.md +1 -0
  38. package/templates/vitepress/zh/reference/templates.md +8 -0
  39. package/templates/vitepress/zh/start/index.md +1 -1
  40. package/templates/vitepress/zh/start/install.md +1 -1
  41. package/templates/vitepress/zh/tasks/adopt-existing.md +1 -1
  42. package/templates/vue-lib/package.json +5 -2
  43. package/templates/vue-lib/tsconfig.node.json +1 -1
  44. package/templates/vue-lib/vite.config.ts +2 -2
  45. package/templates/vue-lib/vite.shared.config.ts +2 -2
  46. package/templates/client/worker-configuration.d.ts +0 -15358
  47. package/templates/server/worker-configuration.d.ts +0 -15358
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: repoctl
3
+ description: Create and maintain pnpm/Turborepo workspaces with repoctl. Use when the user says 使用 repoctl 创建项目, create a monorepo, pnpm create repoctl, scaffold Vue/Hono/tsdown/vitepress, or run repo init/doctor/new/check.
4
+ ---
5
+
6
+ # repoctl
7
+
8
+ The package name is `repoctl`. The command is `repo`.
9
+
10
+ ## Empty directory
11
+
12
+ Do not prompt. Map the request to template keys, then:
13
+
14
+ ```bash
15
+ pnpm create repoctl <dir> -- --yes --templates <keys>
16
+ cd <dir>
17
+ pnpm install
18
+ pnpm exec repo init
19
+ pnpm exec repo doctor
20
+ ```
21
+
22
+ `npm create` and `pnpm create` need the extra `--` before flags. `npx create-repoctl <dir> --yes --templates <keys>` does not.
23
+
24
+ | User intent | `--templates` key |
25
+ | ------------------------ | ------------------ |
26
+ | Vue / full-stack web app | `vue-hono` |
27
+ | API / Hono service | `hono-server` |
28
+ | TypeScript library / SDK | `tsdown` |
29
+ | Vue component library | `vue-lib` |
30
+ | Documentation site | `vitepress` |
31
+ | CLI | `cli` |
32
+ | Unspecified | omit `--templates` |
33
+
34
+ Then implement the requested feature in the generated workspace.
35
+
36
+ ## Existing repoctl workspace
37
+
38
+ Look for `pnpm-workspace.yaml` and a `repoctl` / `repo` dependency.
39
+
40
+ ```bash
41
+ pnpm exec repo templates
42
+ pnpm exec repo new <name> --template <key>
43
+ pnpm exec repo check
44
+ ```
45
+
46
+ ## Verify
47
+
48
+ ```bash
49
+ pnpm exec repo doctor
50
+ pnpm exec repo check
51
+ ```
52
+
53
+ ## Do not
54
+
55
+ - Do not add packages by copying folders.
56
+ - Do not hang on create prompts; pass `--yes`.
57
+ - Do not create business apps inside the `sonofmagic/repoctl` source repository.
58
+
59
+ ## References
60
+
61
+ - `references/templates.md` for template keys and `repo new` flags.
62
+ - `references/commands.md` for other CLI commands.
63
+ - `references/config.md` for `repoctl.config.ts`.
@@ -0,0 +1,243 @@
1
+ # Commands
2
+
3
+ ## init
4
+
5
+ Purpose: bootstrap workspace metadata plus recommended tooling defaults.
6
+ Usage:
7
+
8
+ - pnpm exec repo init
9
+ Options:
10
+ - --preset <minimal|standard>: choose a lighter or fuller setup
11
+ - --force: overwrite existing tooling config files
12
+ Notes:
13
+ - `standard` is the default preset
14
+ - `minimal` currently focuses on the base TypeScript setup
15
+
16
+ ## new
17
+
18
+ Purpose: create a new package or app through an intent-driven flow.
19
+ Usage:
20
+
21
+ - npx repoctl new
22
+ - npx repoctl new my-lib
23
+ Notes:
24
+ - Prompts for what you want to create first, then maps to a template
25
+ - `library` defaults to `packages/<name>`
26
+ - `web-app`, `api-service`, `docs-site`, and `cli-tool` default to `apps/<name>`
27
+ - Advanced users can still use `repoctl package create` or `repoctl pkg new`
28
+
29
+ ## check
30
+
31
+ Purpose: run recommended local checks.
32
+ Usage:
33
+
34
+ - npx repoctl check
35
+ - npx repoctl check --staged
36
+ - npx repoctl check --full
37
+ - npx repoctl check --dry-run
38
+ - npx repoctl check --json --out reports/check-plan.json
39
+ Notes:
40
+ - default mode runs the lightweight local verification flow
41
+ - `--staged` adds staged typecheck routing
42
+ - `--full` maps to the heavier pre-push verification flow
43
+ - `--dry-run` previews the verification route without running checks
44
+ - `--json` and `--out <file>` emit the same plan for automation and imply dry-run
45
+
46
+ ## doctor
47
+
48
+ Purpose: diagnose whether the current workspace is ready to use.
49
+ Usage:
50
+
51
+ - npx repoctl doctor
52
+ - npx repoctl doctor --json
53
+ - npx repoctl doctor --json --out reports/doctor.json
54
+ Notes:
55
+ - default output is human-readable
56
+ - `--json` emits the structured report only and still exits non-zero when blocking failures exist
57
+ - `--out <file>` persists the text or JSON report and still exits non-zero when blocking failures exist
58
+
59
+ ## upgrade
60
+
61
+ Purpose: sync repo assets and scripts into the workspace.
62
+ Usage:
63
+
64
+ - npx repoctl upgrade
65
+ - npx repoctl workspace upgrade
66
+ - npx repoctl ws up
67
+ Options:
68
+ - --interactive: prompt for overwrites
69
+ - --core: sync core config only (skip GitHub assets)
70
+ - --outDir <dir>: write to another directory
71
+ - --skip-overwrite: never overwrite existing files
72
+ - --overwrite-release: explicitly replace an unmarked custom release workflow
73
+
74
+ For the first migration of an existing project, bootstrap with
75
+ `pnpm dlx repoctl@latest upgrade --yes`. Managed and official legacy release
76
+ workflows are migrated automatically; unmarked custom workflows are preserved
77
+ unless `--overwrite-release` is supplied.
78
+
79
+ ## release ci
80
+
81
+ Purpose: provide the single GitHub Actions entrypoint for stable and prerelease orchestration.
82
+ Usage:
83
+
84
+ - `pnpm exec repo release ci`
85
+ - `pnpm exec repo release ci --mode prepare`
86
+ - `pnpm exec repo release ci --mode publish`
87
+ - `pnpm exec repo release ci --mode publish-unpublished --package <name> --version <version>`
88
+
89
+ The command uses `GITHUB_TOKEN`, `GITHUB_REPOSITORY`, `GITHUB_API_URL`, and
90
+ `GITHUB_SHA` to upsert the Release PR, package tags, and GitHub Releases. It
91
+ consumes `pnpm-publish-summary.json` and is safe to retry.
92
+
93
+ ## workspace upgrade (alias: ws up)
94
+
95
+ Purpose: sync monorepo assets and scripts into the workspace.
96
+ Usage:
97
+
98
+ - npx repoctl workspace upgrade
99
+ - npx repoctl ws up
100
+ Options:
101
+ - --interactive: prompt for overwrites
102
+ - --core: sync core config only (skip GitHub assets)
103
+ - --outDir <dir>: write to another directory
104
+ - --skip-overwrite: never overwrite existing files
105
+
106
+ ## workspace init (alias: ws init)
107
+
108
+ Purpose: initialize workspace metadata such as README, package.json, pnpm change intent support, and issue template.
109
+ Usage:
110
+
111
+ - pnpm exec repo init
112
+ - npx repoctl workspace init
113
+ - npx repoctl ws init
114
+
115
+ ## workspace list (alias: ws ls)
116
+
117
+ Purpose: list workspace packages for inspection or automation.
118
+ Usage:
119
+
120
+ - npx repoctl workspace list
121
+ - npx repoctl ws ls --json
122
+ - npx repoctl ws ls --json --out reports/workspaces.json
123
+ Options:
124
+ - --json: emit structured workspace summary data
125
+ - --out <file>: persist the current text or JSON output
126
+ - --include-private: include private packages
127
+ - --include-root: include the workspace root package
128
+ - --pattern <glob>: add custom workspace globs; repeatable
129
+
130
+ ## tooling init (alias: tg init)
131
+
132
+ Purpose: generate tooling config files plus matching devDependencies.
133
+ Usage:
134
+
135
+ - npx repoctl tooling init
136
+ - npx repoctl tooling init eslint tsconfig vitest
137
+ - npx repoctl tg init --all
138
+ Options:
139
+ - --all: generate every built-in tooling config
140
+ - --force: overwrite existing tooling config files
141
+ Notes:
142
+ - Built-in tooling targets: commitlint, eslint, stylelint, lint-staged, tsconfig, vitest
143
+ - Generated files also update root package.json devDependencies
144
+
145
+ ## workspace clean (alias: ws clean)
146
+
147
+ Purpose: remove selected packages and update the repo helper package version.
148
+ Usage:
149
+
150
+ - npx repoctl workspace clean
151
+ - npx repoctl ws clean
152
+ Options:
153
+ - --yes: auto confirm
154
+ - --include-private
155
+ - --pinned-version <version>
156
+
157
+ ## env info (alias: e i)
158
+
159
+ Purpose: print environment details for debugging and automation.
160
+ Usage:
161
+
162
+ - npx repoctl env info
163
+ - npx repoctl e i --json
164
+ - npx repoctl env info --json --out reports/env.json
165
+ Options:
166
+ - --json: emit structured environment info
167
+ - --out <file>: persist the current text or JSON output
168
+ Notes:
169
+ - Includes cwd, workspace root, package manager, Node version, pnpm version,
170
+ platform, arch, and workspace package count.
171
+
172
+ ## env snapshot (alias: e s)
173
+
174
+ Purpose: collect a combined debugging snapshot for issues, CI artifacts, or editor integrations.
175
+ Usage:
176
+
177
+ - npx repoctl env snapshot
178
+ - npx repoctl e s --json
179
+ - npx repoctl env snapshot --json --out reports/snapshot.json
180
+ Options:
181
+ - --json: emit structured snapshot data
182
+ - --out <file>: persist the current text or JSON output
183
+ Notes:
184
+ - Includes `env info`, `doctor` report data, and the default `check` plan.
185
+
186
+ ## env mirror (alias: e m)
187
+
188
+ Purpose: set VSCode binary mirror env.
189
+ Usage:
190
+
191
+ - npx repoctl env mirror
192
+ - npx repoctl e m
193
+
194
+ ## skills sync
195
+
196
+ Purpose: sync the `repoctl` skill into global agent skill directories.
197
+ Usage:
198
+
199
+ - pnpm exec repo skills sync
200
+ - pnpm exec repo skills sync --codex
201
+ - pnpm exec repo skills sync --claude
202
+ - pnpm exec repo skills sync --cursor
203
+ - pnpm exec repo skills sync --agents
204
+ - pnpm exec repo skills sync --grok
205
+ - pnpm exec repo skills sync --all
206
+
207
+ ## ai prompt create (aliases: ai p create, ai p new)
208
+
209
+ Purpose: generate agentic prompt templates.
210
+ Usage:
211
+
212
+ - npx repoctl ai prompt create
213
+ - npx repoctl ai p new --name checkout
214
+ - npx repoctl ai prompt create --tasks agentic/tasks.json --format md -f
215
+ Options:
216
+ - --output <path>
217
+ - --force
218
+ - --format <md|json>
219
+ - --dir <path>
220
+ - --name <name>
221
+ - --tasks <file>
222
+ Notes:
223
+ - If no --output or --name is set, it prompts for a folder and writes to
224
+ agentic/prompts/<timestamp>/prompt.md.
225
+ - If --tasks is used, it expects a JSON array of strings or objects.
226
+
227
+ ## package create (alias: pkg new)
228
+
229
+ Purpose: create a new package from a template.
230
+ Usage:
231
+
232
+ - npx repoctl new
233
+ - npx repoctl package create [path]
234
+ - npx repoctl pkg new [path]
235
+ Notes:
236
+ - Prefer `repoctl new` for the lower-cost guided flow.
237
+ - Prompts for a template choice unless defaults are set in repoctl.config.ts or monorepo.config.ts.
238
+ - Explicit `--template` values are validated before writing files. Unknown keys
239
+ fail with the closest suggestion instead of silently falling back.
240
+ - Use `--json` to print the resolved create plan for automation. It implies
241
+ `--dry-run` and does not write files.
242
+ - Add `--out <file>` to write the preview or JSON plan to disk. It also implies
243
+ `--dry-run`.
@@ -0,0 +1,67 @@
1
+ # repoctl.config.ts
2
+
3
+ Preferred filename: `repoctl.config.ts`
4
+
5
+ Compatible legacy filename: `monorepo.config.ts`
6
+
7
+ Rule:
8
+
9
+ - `repoctl.config.*` has higher priority
10
+ - `monorepo.config.*` remains supported
11
+ - if both exist at the same time, CLI loading fails fast with an error
12
+
13
+ Use `defineMonorepoConfig` to set default options for CLI commands.
14
+ Only include the fields you need.
15
+
16
+ Example:
17
+
18
+ ```ts
19
+ import { defineMonorepoConfig } from 'repoctl'
20
+
21
+ export default defineMonorepoConfig({
22
+ commands: {
23
+ ai: {
24
+ baseDir: 'agentic/prompts',
25
+ format: 'md',
26
+ force: false,
27
+ tasksFile: 'agentic/tasks.json',
28
+ },
29
+ create: {
30
+ defaultTemplate: 'tsdown',
31
+ renameJson: false,
32
+ templatesDir: 'packages/monorepo/templates',
33
+ },
34
+ clean: {
35
+ autoConfirm: false,
36
+ ignorePackages: ['docs'],
37
+ includePrivate: true,
38
+ pinnedVersion: 'latest',
39
+ },
40
+ upgrade: {
41
+ skipOverwrite: false,
42
+ targets: ['.github', 'repoctl.config.ts'],
43
+ mergeTargets: true,
44
+ },
45
+ init: {
46
+ skipReadme: false,
47
+ skipPkgJson: false,
48
+ skipChangeset: false,
49
+ skipIssueTemplateConfig: false,
50
+ },
51
+ mirror: {
52
+ env: {
53
+ VSCode_CLI_MIRROR: 'https://example.invalid',
54
+ },
55
+ },
56
+ },
57
+ })
58
+ ```
59
+
60
+ Key areas:
61
+
62
+ - ai: default output, format, batch tasks
63
+ - create: default template and template directory
64
+ - clean: auto confirm and pinned version control
65
+ - upgrade: overwrite behavior and extra targets
66
+ - init: skip steps for README/package.json/pnpm change intent setup
67
+ - mirror: add or override env mirrors
@@ -0,0 +1,46 @@
1
+ # Templates
2
+
3
+ Prefer `repo new [name]` for the guided flow. For agents, pass `--template`
4
+ explicitly so the command does not prompt.
5
+
6
+ Intent defaults:
7
+
8
+ - library -> `tsdown` -> `packages/<name>`
9
+ - web-app -> `vue-hono` -> `apps/<name>`
10
+ - api-service -> `hono-server` -> `apps/<name>`
11
+ - docs-site -> `vitepress` -> `apps/<name>`
12
+ - cli-tool -> `cli` -> `apps/<name>`
13
+
14
+ Run `repo templates` to discover template keys, categories, default targets, and
15
+ descriptions. Use `repo templates <key>` for a single template detail page, and
16
+ `repo templates --json` when scripting. Use `repo templates --check` to verify
17
+ template metadata, directories, package.json files, duplicate targets, and
18
+ temporary files; combine it with `--json` for CI. Use `repo templates --markdown`
19
+ or `repo templates <key> --markdown` when generating documentation snippets.
20
+ Add `--out <file>` to write the selected output to disk.
21
+
22
+ Use `repo new <name> --template <key> --dry-run` to preview the target directory
23
+ and package metadata without writing files. Use `repo new <name> --template <key>
24
+ --json` when a script needs the same create plan as structured data; `--json`
25
+ implies `--dry-run`. Add `--out <file>` to write either preview format to disk.
26
+
27
+ Explicit template keys are validated before any files are written. If a key is
28
+ misspelled, the CLI fails and prints the closest known key when one is available.
29
+
30
+ Advanced users can still use `repo package create [path]` or `repo pkg new [path]`
31
+ to select templates directly.
32
+
33
+ Built-in template map:
34
+
35
+ - tsdown -> templates/tsdown => packages/tsdown
36
+ - vue-lib -> templates/vue-lib => packages/vue-lib
37
+ - hono-server -> templates/server => apps/server
38
+ - vue-hono -> templates/client => apps/client
39
+ - vitepress -> templates/vitepress => apps/website
40
+ - cli -> templates/cli => apps/cli
41
+
42
+ Notes:
43
+
44
+ - The command prompts for template selection unless defaults are set in
45
+ repoctl.config.ts or monorepo.config.ts.
46
+ - Override mappings with `commands.create.templateMap` and `commands.create.templatesDir`.
package/assets/AGENTS.md CHANGED
@@ -1,53 +1,42 @@
1
- # Repository Guidelines
1
+ # Agent instructions
2
2
 
3
- ## Project Structure & Module Organization
3
+ This workspace is managed by **repoctl**. The recommended command is `repo`.
4
+ Use `repoctl` only when a longer executable name is clearer. Do not treat this
5
+ repository as the repoctl source project.
4
6
 
5
- This repository is the source workspace for repoctl, a task-first CLI for pnpm and Turborepo monorepos. Product packages live under `packages/`: `repoctl` is the recommended entrypoint, `monorepo` contains the core engine, `monorepo-templates` distributes managed assets, and the create packages provide primary and compatibility bootstrap commands. Private template source workspaces live under `templates/`; they are product assets, not independently published packages. Shared TypeScript and build settings live in root configs such as `turbo.json`, `tsconfig.json`, and `eslint.config.js`.
7
+ ## Create packages and apps
6
8
 
7
- ## Build, Test, and Development Commands
9
+ ```bash
10
+ pnpm exec repo templates
11
+ pnpm exec repo new <name> --template <key>
12
+ ```
8
13
 
9
- - `pnpm install` — set up workspaces; ensure Node 22.12+ as defined in `package.json`.
10
- - `pnpm dev` — run `turbo run dev --parallel` for all apps that expose a `dev` script.
11
- - `pnpm build` — execute `turbo run build` to build every workspace with caching.
12
- - `pnpm test` / `pnpm test:dev` — run Vitest suites once or in watch mode across packages.
13
- - `pnpm lint` — invoke `turbo run lint` to apply ESLint/Stylelint policies repo-wide.
14
- - `pnpm repo:doctor` — diagnose the source workspace with the same repoctl entrypoint delivered to users.
15
- - `pnpm --filter @icebreakers/monorepo-templates sync:assets` — refresh the managed assets and template copies from repository sources.
14
+ | Intent | Template key |
15
+ | ------------------------ | ------------- |
16
+ | Vue / full-stack web app | `vue-hono` |
17
+ | API / Hono service | `hono-server` |
18
+ | TypeScript library / SDK | `tsdown` |
19
+ | Vue component library | `vue-lib` |
20
+ | Documentation site | `vitepress` |
21
+ | CLI | `cli` |
16
22
 
17
- ## Coding Style & Naming Conventions
23
+ Preview without writing files: `pnpm exec repo new <name> --template <key> --dry-run`.
18
24
 
19
- Follow the root `.editorconfig`: two-space indentation, LF line endings, UTF-8. Prefer TypeScript (`.ts`/`.tsx`) and Vue SFCs; name files with kebab-case (`user-table.vue`) and exported symbols with PascalCase for components or camelCase for utilities. ESLint (`@icebreakers/eslint-config`) and Stylelint enforce formatting; run `pnpm lint` before committing, and rely on Husky + lint-staged to auto-fix staged files. Any style-related code changes (CSS, SCSS, Less, Vue style blocks, and similar files) must pass Stylelint checks before commit. All changed JavaScript, TypeScript, and Vue code must pass ESLint checks before commit.
25
+ ## Verify
20
26
 
21
- `lint-staged.config.js` must include Stylelint checks for staged style files so style validation also runs during pre-commit. It must also route staged TypeScript and Vue files into workspace `typecheck` scripts so Vue workspaces run `vue-tsc` and non-Vue TypeScript workspaces run `tsc`.
27
+ ```bash
28
+ pnpm exec repo doctor
29
+ pnpm exec repo check
30
+ ```
22
31
 
23
- When a single code file exceeds 300 lines, treat it as a refactor signal and split it into smaller modules before commit whenever the change touches that area. Do not keep appending responsibilities to an already large file when a folder-based split would make the design clearer.
32
+ ## Do not
24
33
 
25
- When splitting code, do not create suffix-based sibling files such as `xxx.config.ts` or `xxx.filter.ts` just to move logic around. Create a dedicated folder (for example `xxx/`) and place the split modules inside it with clear responsibilities.
34
+ - Do not add packages by copying folders. Use `repo new`.
35
+ - Do not hand-edit managed root configs that `repo init` / `repo upgrade` own.
36
+ - Do not invent publish versions by hand. Use `pnpm change` for publishable packages.
26
37
 
27
- All generated code must pass ESLint checks, and all generated style files must pass Stylelint checks.
28
- Generated Vue files or other SFC files that include style blocks are also required to pass Stylelint checks.
38
+ ## Requirements
29
39
 
30
- ## Testing Guidelines
31
-
32
- Vitest powers unit tests located in `test/*.test.ts`. Mirror existing naming by matching the unit under test (`monorepo` utilities map to `packages/monorepo/test/*.test.ts`). Aim for meaningful assertions rather than snapshot defaults, and add coverage checks with `pnpm test -- --coverage`, which writes reports to `coverage/`. When introducing new public APIs, include integration-style tests in the relevant app workspace. AI-assisted validation must run a full test matrix when available, including unit, integration, and E2E tests.
33
-
34
- Before running tests, build the packages first and run tests against build artifacts instead of source-only execution to better match real delivery behavior.
35
-
36
- TypeScript issues must be fixed before commit. Do not commit with unresolved TypeScript compile or type-check errors.
37
-
38
- TypeScript code must be validated with the relevant workspace `typecheck` script and must not contain type errors. Pure TypeScript workspaces are expected to validate with `tsc` (`pnpm typecheck` or `tsc -p tsconfig.json`). Vue workspaces are expected to validate with `vue-tsc` (typically `vue-tsc -b`).
39
-
40
- When building TypeScript libraries (type-focused APIs or public type definitions), add and maintain `tsd` type tests to verify exported type behavior.
41
-
42
- ## Commit & Pull Request Guidelines
43
-
44
- Commits must conform to Conventional Commit syntax; recent history uses prefixes like `feat`, `fix`, and `chore`. Example: `feat(server): add auth router`. Use `pnpm commit` (commitlint prompt) or ensure your manual message passes `pnpm commitlint --edit`. Before opening a PR, make sure `pnpm lint` and `pnpm test` succeed, link related issues, and provide screenshots or logs for user-facing changes. Touching publishable packages requires a pnpm change intent (`pnpm change`) so releases stay traceable.
45
-
46
- For AI-generated or AI-assisted changes, use this verification order before commit or PR:
47
-
48
- 1. Run build first (`pnpm build` or the relevant workspace build command).
49
- 2. Run lint checks, ensuring all changed JavaScript, TypeScript, and Vue code passes ESLint and all style-related code passes Stylelint.
50
- 3. Run TypeScript checks and fix all type errors before proceeding. Vue workspaces must pass `vue-tsc`; TypeScript workspaces must pass `tsc`.
51
- 4. For TypeScript libraries, run `tsd` type tests and fix all failures before proceeding.
52
- 5. Run tests against built artifacts, including unit, integration, and E2E suites (when available in the affected workspace).
53
- 6. Before commit, review whether the touched files need splitting or refactoring; do not commit avoidable large-file growth when a clearer module boundary is apparent.
40
+ - Node.js 22.13 or newer
41
+ - pnpm
42
+ - CLI output is English by default; `--lang zh-CN` or `REPOCTL_LANG=zh-CN` selects Simplified Chinese
@@ -0,0 +1,14 @@
1
+ # Agent instructions
2
+
3
+ This workspace is managed by **repoctl**. The recommended command is `repo`.
4
+
5
+ Follow `AGENTS.md` in the workspace root. Create packages with
6
+ `pnpm exec repo new <name> --template <key>`. Verify with
7
+ `pnpm exec repo doctor` and `pnpm exec repo check`.
8
+
9
+ If you were asked to create a new business project, do not add it inside an
10
+ existing unrelated repository. Use:
11
+
12
+ ```bash
13
+ pnpm create repoctl <dir> -- --yes --templates <keys>
14
+ ```
package/assets/gitignore CHANGED
@@ -37,3 +37,6 @@ vite.config.ts.timestamp-*.mjs
37
37
  config.ts.timestamp-*.mjs
38
38
  .vite-inspect
39
39
  .playwright-cli
40
+
41
+ # local AI task artifacts
42
+ /.qoder/
@@ -6,6 +6,7 @@
6
6
  "packageManager": "pnpm@12.3.4",
7
7
  "description": "Source workspace for repoctl and Icebreaker's shared development packages",
8
8
  "author": "ice breaker <hi@sonofmagic.top>",
9
+ "license": "MIT",
9
10
  "homepage": "https://repoctl.icebreaker.top",
10
11
  "repository": {
11
12
  "type": "git",
@@ -71,66 +72,25 @@
71
72
  },
72
73
  "devDependencies": {
73
74
  "@commitlint/cli": "^21.2.2",
74
- "@eslint/config-inspector": "^3.4.0",
75
- "@eslint/eslintrc": "^3.3.7",
75
+ "@eslint/config-inspector": "^3.4.1",
76
76
  "@icebreakers/commitlint-config": "workspace:*",
77
77
  "@icebreakers/eslint-config": "workspace:*",
78
- "@icebreakers/stylelint-config": "workspace:*",
79
- "@next/eslint-plugin-next": "^16.3.4",
80
- "@prettier/plugin-xml": "^3.4.2",
81
- "@tanstack/eslint-plugin-query": "^5.102.8",
82
- "@types/eslint-plugin-tailwindcss": "^3.17.0",
83
- "@types/fs-extra": "^11.0.4",
84
- "@types/lodash": "^4.17.25",
85
- "@types/lodash-es": "^4.17.12",
86
- "@types/micromatch": "^4.0.10",
87
78
  "@icebreakers/monorepo": "workspace:*",
88
- "@types/node": "^26.5.0",
89
- "@types/semver": "^7.8.0",
90
- "@types/set-value": "^4.0.3",
91
- "@typescript-eslint/types": "^8.70.0",
92
- "@unocss/eslint-plugin": "66.10.0",
79
+ "@icebreakers/stylelint-config": "workspace:*",
80
+ "@types/node": "^26.5.1",
93
81
  "@vitest/coverage-v8": "~5.0.0",
94
- "astro-eslint-parser": "^3.1.0",
95
- "ci-info": "^4.4.0",
96
- "cross-env": "^10.1.0",
97
- "defu": "^6.1.7",
98
- "es-toolkit": "^1.52.0",
99
82
  "eslint": "^10.10.0",
100
- "eslint-plugin-astro": "^3.1.0",
101
- "eslint-plugin-mdx": "3.8.1",
102
- "eslint-plugin-svelte": "^3.23.0",
103
83
  "execa": "^10.0.1",
104
- "fast-glob": "^3.3.3",
105
- "fs-extra": "^11.4.0",
106
- "get-value": "^4.1.0",
107
84
  "husky": "^9.1.7",
108
- "jiti": "^2.7.0",
109
- "lint-staged": "^17.5.0",
110
- "lodash": "^4.18.1",
111
- "lodash-es": "^4.18.1",
112
- "micromatch": "^4.0.8",
85
+ "lint-staged": "^17.5.1",
113
86
  "only-allow": "^1.2.2",
114
- "pathe": "^2.0.3",
115
- "pkg-types": "^2.3.3",
116
- "prettier": "^3.9.6",
117
- "prettier-plugin-astro": "^0.14.1",
118
87
  "repoctl": "workspace:*",
119
- "rimraf": "^6.1.3",
120
- "set-value": "^4.1.0",
121
88
  "stylelint": "^17.15.0",
122
- "svelte": "^5.57.0",
123
- "svelte-eslint-parser": "^1.8.1",
124
89
  "tailwindcss": "^4.3.3",
125
90
  "tsd": "^0.33.0",
126
91
  "tsdown": "0.23.0",
127
- "tslib": "^2.8.1",
128
- "tsx": "^4.23.13",
129
92
  "turbo": "^2.10.12",
130
- "type-fest": "^5.9.0",
131
- "tsup": "^8.5.1",
132
93
  "typescript": "^6.0.3",
133
- "unbuild": "^3.6.1",
134
94
  "vitest": "~5.0.0",
135
95
  "yaml": "^2.9.0"
136
96
  },
@@ -17,7 +17,7 @@ allowBuilds:
17
17
  overrides:
18
18
  prettier: 3.9.6
19
19
  typescript: 6.0.3
20
- vite: 8.2.2
20
+ vite: 8.3.0
21
21
  postcss: 8.5.28
22
22
  postcss-selector-parser: 7.1.6
23
23
  js-yaml: 5.4.1
package/assets/turbo.json CHANGED
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "$schema": "https://turborepo.com/schema.json",
3
+ "globalDependencies": [
4
+ "pnpm-lock.yaml"
5
+ ],
3
6
  "tasks": {
4
7
  "build": {
5
8
  "dependsOn": [
@@ -8,6 +11,10 @@
8
11
  "inputs": [
9
12
  "src/**",
10
13
  "lib/**",
14
+ "worker/**",
15
+ "wrangler.{json,jsonc,toml}",
16
+ ".dev.vars*",
17
+ ".env*",
11
18
  "package.json",
12
19
  "tsconfig*.json",
13
20
  "*.config.{js,ts,mjs,mts}"
@@ -72,6 +79,10 @@
72
79
  "inputs": [
73
80
  "src/**",
74
81
  "lib/**",
82
+ "worker/**",
83
+ "wrangler.{json,jsonc,toml}",
84
+ ".dev.vars*",
85
+ ".env*",
75
86
  "test/**",
76
87
  "package.json",
77
88
  "tsconfig*.json"
package/assets-data.mjs CHANGED
@@ -13,6 +13,8 @@ const coreAssetTargets = [
13
13
  'repoctl.config.ts',
14
14
  'package.json',
15
15
  'AGENTS.md',
16
+ 'CLAUDE.md',
17
+ '.agents',
16
18
  // pnpm
17
19
  'pnpm-workspace.yaml',
18
20
  // base tsconfig
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as prepareAssets } from "./prepare-D7eJqEqy.mjs";
1
+ import { t as prepareAssets } from "./prepare-zIcRa4-K.mjs";
2
2
  import process from "node:process";
3
3
  //#region src/cli.ts
4
4
  async function main() {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-D7eJqEqy.mjs";
1
+ import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-zIcRa4-K.mjs";
2
2
  import path from "node:path";
3
3
  import fs, { access, open, rm } from "node:fs/promises";
4
4
  import exec from "nanoexec";