mustflow 2.25.2 → 2.26.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.
- package/package.json +1 -1
- package/templates/default/i18n.toml +13 -1
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/en/.mustflow/skills/bun-code-change/SKILL.md +143 -0
- package/templates/default/locales/en/.mustflow/skills/node-code-change/SKILL.md +145 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +12 -0
- package/templates/default/manifest.toml +15 -1
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ translations = {}
|
|
|
56
56
|
[documents."skills.index"]
|
|
57
57
|
source = "locales/en/.mustflow/skills/INDEX.md"
|
|
58
58
|
source_locale = "en"
|
|
59
|
-
revision =
|
|
59
|
+
revision = 88
|
|
60
60
|
translations = {}
|
|
61
61
|
|
|
62
62
|
[documents."skill.adapter-boundary"]
|
|
@@ -191,6 +191,12 @@ source_locale = "en"
|
|
|
191
191
|
revision = 2
|
|
192
192
|
translations = {}
|
|
193
193
|
|
|
194
|
+
[documents."skill.bun-code-change"]
|
|
195
|
+
source = "locales/en/.mustflow/skills/bun-code-change/SKILL.md"
|
|
196
|
+
source_locale = "en"
|
|
197
|
+
revision = 1
|
|
198
|
+
translations = {}
|
|
199
|
+
|
|
194
200
|
[documents."skill.cpp-code-change"]
|
|
195
201
|
source = "locales/en/.mustflow/skills/cpp-code-change/SKILL.md"
|
|
196
202
|
source_locale = "en"
|
|
@@ -239,6 +245,12 @@ source_locale = "en"
|
|
|
239
245
|
revision = 2
|
|
240
246
|
translations = {}
|
|
241
247
|
|
|
248
|
+
[documents."skill.node-code-change"]
|
|
249
|
+
source = "locales/en/.mustflow/skills/node-code-change/SKILL.md"
|
|
250
|
+
source_locale = "en"
|
|
251
|
+
revision = 1
|
|
252
|
+
translations = {}
|
|
253
|
+
|
|
242
254
|
[documents."skill.python-code-change"]
|
|
243
255
|
source = "locales/en/.mustflow/skills/python-code-change/SKILL.md"
|
|
244
256
|
source_locale = "en"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skills.index
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 88
|
|
6
6
|
authority: router
|
|
7
7
|
lifecycle: mustflow-owned
|
|
8
8
|
---
|
|
@@ -101,6 +101,8 @@ routes. Event routes stay inactive until their event occurs.
|
|
|
101
101
|
| A coding task has missing intent, scope, domain, data, security, UX, dependency, architecture, or verification decisions that cannot be safely inferred from repository evidence | `.mustflow/skills/clarifying-question-gate/SKILL.md` | User request, inspected repository evidence, unresolved decisions, reversibility classification, recommended option, and tradeoffs | Blocking questions, safe assumptions, and the smallest safe implementation boundary | over-questioning, lazy questions, expensive wrong assumptions, user-owned decision drift, data loss, auth bypass, public-contract drift, dependency bloat, or unverifiable completion | `changes_status`, `changes_diff_summary`, `mustflow_check` | Repository evidence inspected, blocking questions with recommendations, safe assumptions, selected scope, verification, and remaining ambiguity |
|
|
102
102
|
| HTTP, REST, GraphQL, tRPC, Hono RPC, Elysia Eden, gRPC, protobuf, OpenAPI, request/response schema, status code, header, error envelope, pagination, filtering, sorting, search, generated client, SDK, mock, fixture, or API docs contract is created or changed | `.mustflow/skills/api-contract-change/SKILL.md` | API style, contract source of truth, changed operations, request and response schemas, status and headers, error envelope, auth and permission behavior, pagination/filter/sort/search semantics, generated clients, SDKs, mocks, fixtures, callers, docs, and command contract entries | Routes, handlers, resolvers, validators, schemas, generated clients, SDKs, mocks, fixtures, docs, tests, and directly synchronized examples | route-only change, schema drift, generated-client breakage, hidden breaking change, status or error drift, pagination/search semantic drift, auth/permission drift, or stale docs examples | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | API contract source, changed operations, compatibility classification, synchronized client/schema/docs/tests surfaces, verification, and remaining API contract risk |
|
|
103
103
|
| C++ source, headers, modules, native build metadata, toolchains, package managers, public headers, shared or static libraries, ABI surfaces, generated bindings, FFI, tests, or benchmarks are created or changed | `.mustflow/skills/cpp-code-change/SKILL.md` | Owning target, compilation identity, build front door, changed consumed surface, public API/ABI/FFI/binding surfaces, ownership and lifetime contracts, and command contract entries | C++ source, headers, modules, build metadata, package metadata, generated bindings, FFI code, tests, benchmarks, and directly synchronized docs | target drift, source API break, binary ABI break, undefined behavior, lifetime bug, build-graph drift, generated-binding drift, FFI memory bug, unverified modern C++ feature, or false performance claim | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Owning target, compilation identity, highest compatibility risk, ownership/lifetime/UB/concurrency notes, public API/ABI/FFI/binding impact, verification, and remaining C++ risk |
|
|
104
|
+
| Node.js runtime code, package manager ownership, module format, package entry metadata, native dependencies, Node test runner behavior, TypeScript execution mode, or deployment runtime support is created or changed | `.mustflow/skills/node-code-change/SKILL.md` | Node version signals, package manager and lockfile owner, module/package metadata, TypeScript loader, test runner, native dependency, deployment target, and command contract entries | Node runtime code, package metadata, lockfiles, scripts, CI or Docker runtime declarations, test runner config, native dependency handling, docs examples, and directly synchronized package surfaces | newest-Node assumption, package manager drift, ESM/CJS break, blocked deep import, native dependency break, Node native TypeScript overclaim, test runner migration risk, deployment mismatch, or permission-model overclaim | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Runtime and package manager decision, module/package entry notes, TypeScript/test runner notes, native/deployment risks, verification, and remaining Node.js risk |
|
|
105
|
+
| Bun runtime code, Bun package manager behavior, `bun.lock`, `bunfig.toml`, Bun test runner behavior, Bun bundling, Bun TypeScript execution, or Bun-specific APIs are created or changed | `.mustflow/skills/bun-code-change/SKILL.md` | Bun role signals, `package.json`, Bun and non-Bun lockfiles, `bunfig.toml`, CI/Docker Bun setup, TypeScript config, Bun APIs, native dependency signals, and command contract entries | Bun runtime code, Bun package manager metadata, lockfiles, `bunfig.toml`, scripts, tests, bundler config, TypeScript/declaration pipeline, package metadata, and directly synchronized docs | Bun role confusion, lockfile drift, trusted dependency overgrant, runtime/package-manager conflation, Bun TypeScript typecheck overclaim, Bun build declaration gap, Node compatibility break, shebang mismatch, or native binary break | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Bun role classification, lockfile/trust notes, runtime/type/build/test notes, Node compatibility risks, verification, and remaining Bun risk |
|
|
104
106
|
| TypeScript source, declarations, tsconfig, package exports, module resolution, public API, or TypeScript tests are created or changed | `.mustflow/skills/typescript-code-change/SKILL.md` | TypeScript config, package entry metadata, target runtime, changed files, and command contract entries | TypeScript source, declarations, compiler config, exports, tests, and directly synchronized docs | weakened type safety, module drift, public API drift, or unverified declaration output | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | Runtime, module, type, and public API boundary checked, changes made, verification, and remaining TypeScript risk |
|
|
105
107
|
| JavaScript source, module format, package entry, browser or Node runtime, dependency usage, Promise handling, bundler config, or JavaScript tests are created or changed | `.mustflow/skills/javascript-code-change/SKILL.md` | Package metadata, module system, runtime target, entrypoints, changed files, and command contract entries | JavaScript source, package exports, bundler config, dependencies, tests, and docs examples | runtime API leakage, ESM/CJS drift, discarded Promise, dependency bloat, or broken package entry | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | Runtime and module boundary checked, async and dependency notes, verification, and remaining JavaScript risk |
|
|
106
108
|
| Python source, package metadata, runtime version, import layout, type checking, linting, CLI entry points, or tests are created or changed | `.mustflow/skills/python-code-change/SKILL.md` | Python version source, packaging files, import layout, lint/type/test config, changed files, and command contract entries | Python source, packaging metadata, imports, type hints, tests, and docs examples | unsupported syntax, import hacks, packaging drift, swallowed errors, or weakened lint/type checks | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | Runtime, packaging, import, and type boundary checked, verification, and remaining Python risk |
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
mustflow_doc: skill.bun-code-change
|
|
3
|
+
locale: en
|
|
4
|
+
canonical: true
|
|
5
|
+
revision: 1
|
|
6
|
+
lifecycle: mustflow-owned
|
|
7
|
+
authority: procedure
|
|
8
|
+
name: bun-code-change
|
|
9
|
+
description: Apply this skill when Bun runtime code, Bun package manager behavior, bun.lock, bunfig.toml, Bun test runner behavior, Bun bundling, Bun TypeScript execution, or Bun-specific APIs are created or changed.
|
|
10
|
+
metadata:
|
|
11
|
+
mustflow_schema: "1"
|
|
12
|
+
mustflow_kind: procedure
|
|
13
|
+
pack_id: mustflow.core
|
|
14
|
+
skill_id: mustflow.core.bun-code-change
|
|
15
|
+
command_intents:
|
|
16
|
+
- changes_status
|
|
17
|
+
- changes_diff_summary
|
|
18
|
+
- lint
|
|
19
|
+
- build
|
|
20
|
+
- test_related
|
|
21
|
+
- test
|
|
22
|
+
- docs_validate_fast
|
|
23
|
+
- test_release
|
|
24
|
+
- mustflow_check
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Bun Code Change
|
|
28
|
+
|
|
29
|
+
<!-- mustflow-section: purpose -->
|
|
30
|
+
## Purpose
|
|
31
|
+
|
|
32
|
+
Preserve Bun's separate roles as runtime, package manager, script runner, test runner, bundler, transpiler, and Node-compatible environment without mistaking one successful role for another.
|
|
33
|
+
|
|
34
|
+
<!-- mustflow-section: use-when -->
|
|
35
|
+
## Use When
|
|
36
|
+
|
|
37
|
+
- `bun.lock`, `bun.lockb`, `bunfig.toml`, `packageManager: "bun@..."`, Bun install settings, `trustedDependencies`, Bun workspace behavior, or Bun lockfile migration changes.
|
|
38
|
+
- Bun runtime code or config changes, including `Bun.*`, `Bun.serve`, `Bun.file`, `Bun.write`, `Bun.spawn`, `Bun.$`, `bun:sqlite`, `#!/usr/bin/env bun`, Bun preload, Bun `.env` behavior, or `bun run --bun`.
|
|
39
|
+
- Bun test runner behavior changes, including `bun test`, `bun:test`, `[test]` in `bunfig.toml`, snapshots, mocks, preload, isolation, coverage, sharding, or parallelism.
|
|
40
|
+
- Bun bundling, compile, transpiler, build target, JSX settings, path aliases, TypeScript runtime execution, or library packaging with Bun changes.
|
|
41
|
+
|
|
42
|
+
<!-- mustflow-section: do-not-use-when -->
|
|
43
|
+
## Do Not Use When
|
|
44
|
+
|
|
45
|
+
- Bun appears only as the local command used by mustflow's configured command intents, and the changed project surface is not Bun-specific.
|
|
46
|
+
- The task changes generic TypeScript type modeling or declaration surfaces without Bun runtime, bundler, package manager, or test runner behavior; use `typescript-code-change`.
|
|
47
|
+
- The task changes generic JavaScript without Bun ownership; use `javascript-code-change`.
|
|
48
|
+
- Elysia route, schema, plugin, OpenAPI, or Eden behavior is the main surface; use `elysia-code-change` first and this skill only for Bun runtime or tooling risks.
|
|
49
|
+
|
|
50
|
+
<!-- mustflow-section: required-inputs -->
|
|
51
|
+
## Required Inputs
|
|
52
|
+
|
|
53
|
+
- `package.json` fields: `packageManager`, `scripts`, `workspaces`, `trustedDependencies`, `overrides`, `resolutions`, `patchedDependencies`, `dependencies`, `devDependencies`, `optionalDependencies`, and package entry metadata.
|
|
54
|
+
- Bun ownership files: `bun.lock`, `bun.lockb`, `bunfig.toml`, npm, pnpm, or Yarn lockfiles that coexist with Bun, CI install commands, Docker install and runtime commands, and `oven-sh/setup-bun` usage.
|
|
55
|
+
- Bun config sections: `[install]`, `[test]`, top-level preload, env, define, loader, JSX, and run settings.
|
|
56
|
+
- Runtime and compatibility surfaces: `Bun.*`, `bun:test`, `node:*`, `.node`, `node-gyp`, lifecycle scripts, Prisma, sharp, Playwright, esbuild, native binary packages, streams, workers, child processes, crypto, filesystem watch, and shebangs.
|
|
57
|
+
- TypeScript and package surfaces: `tsconfig*.json`, `@types/bun`, `types: ["bun"]`, module resolution, path aliases, JSX runtime, declaration output, build targets, package exports, and command contract entries.
|
|
58
|
+
|
|
59
|
+
<!-- mustflow-section: preconditions -->
|
|
60
|
+
## Preconditions
|
|
61
|
+
|
|
62
|
+
- Classify Bun's role before editing. Bun may be only the package manager, only the script runner, only the test runner, only the bundler, the runtime, or several of these at once.
|
|
63
|
+
- Do not treat Bun package installation as proof that Bun runtime behavior works.
|
|
64
|
+
- Do not treat Bun runtime execution, Bun transpilation, Bun tests, or Bun bundling as TypeScript typechecking or declaration generation.
|
|
65
|
+
- Treat lockfile, trusted dependency, build target, and package entry changes as release-sensitive unless proven internal.
|
|
66
|
+
|
|
67
|
+
<!-- mustflow-section: allowed-edits -->
|
|
68
|
+
## Allowed Edits
|
|
69
|
+
|
|
70
|
+
- Keep Bun-specific APIs in Bun-owned runtime files, adapters, tests, or package entrypoints.
|
|
71
|
+
- Keep Bun package manager changes aligned with `bun.lock`, `bunfig.toml`, CI, Docker, and workspace ownership.
|
|
72
|
+
- Preserve existing Node, browser, edge, Jest, Vitest, TypeScript, and package-consumer contracts unless the task explicitly asks to migrate them.
|
|
73
|
+
- Add focused tests or package checks only when they protect changed Bun runtime, package manager, test runner, build, or public package behavior.
|
|
74
|
+
|
|
75
|
+
<!-- mustflow-section: procedure -->
|
|
76
|
+
## Procedure
|
|
77
|
+
|
|
78
|
+
1. Classify every Bun signal by role before editing:
|
|
79
|
+
- `bun install`, `bun add`, `bun remove`, `bun update`, `bun.lock`, `trustedDependencies`, and `[install]` are package manager signals.
|
|
80
|
+
- `bun <file>`, `bun --watch`, `bun run --bun`, `#!/usr/bin/env bun`, `Bun.serve`, `Bun.file`, `Bun.write`, `Bun.spawn`, `Bun.$`, and preload settings are runtime signals.
|
|
81
|
+
- `bun test`, `bun:test`, and `[test]` are test runner signals.
|
|
82
|
+
- `bun build`, `Bun.build`, `--compile`, and build target settings are bundler or compiler signals.
|
|
83
|
+
- `bun run <script>` is script execution until the script body proves a more specific role.
|
|
84
|
+
2. Determine package manager ownership from `packageManager`, Bun lockfiles, other lockfiles, CI, Docker, workspace config, and `bunfig.toml`. If `bun.lock` exists, treat Bun as the dependency owner unless current project evidence says otherwise.
|
|
85
|
+
3. Do not delete `bun.lockb`, create `bun.lock`, or switch between npm, pnpm, Yarn, and Bun lockfiles as a side effect. If multiple lockfiles exist, identify whether the state is migration, legacy compatibility, or intentional parallel ownership before editing dependencies.
|
|
86
|
+
4. For Bun installs, check frozen lockfile behavior, workspace filters, linker mode, global virtual store, cache settings, registry settings, overrides, resolutions, patched dependencies, peer dependency behavior, optional dependency behavior, OS, CPU, and libc-sensitive packages when relevant.
|
|
87
|
+
5. Treat `trustedDependencies` as install-time code execution policy. Omitted, explicit array, and empty array each have different trust semantics. Do not broaden trust with a generic trust-all action. If a native package or binary install fails, inspect blocked lifecycle scripts, trust only the required package, and verify with a fresh install and real import or CLI use when a configured intent exists.
|
|
88
|
+
6. Do not claim Bun runs TypeScript as typecheck. Bun runtime execution and `Bun.Transpiler` strip or transform syntax for execution; they do not run the TypeScript checker, emit declarations, or prove generic, JSX, path alias, or public type correctness.
|
|
89
|
+
7. Do not claim Bun bundling replaces TypeScript build output. Bun build output proves bundling for the selected target and format, not `tsc --noEmit`, declaration emit, or downstream TypeScript consumer compatibility.
|
|
90
|
+
8. For TypeScript changes in a Bun project, keep the existing typecheck intent and declaration pipeline. For libraries, inspect declaration output when package exports, path aliases, public types, or build output change. Source-only aliases must not leak into public declarations unless consumers can resolve them.
|
|
91
|
+
9. Align Bun and TypeScript JSX settings when JSX runtime, factory, fragment, or import source changes. TypeScript seeing one JSX runtime while Bun transpiles another is a runtime contract bug.
|
|
92
|
+
10. For Bun bundling and package output, distinguish `bun run build` from direct Bun bundler usage. Confirm script bodies before treating a build as Bun bundling. Choose target and format according to actual consumers; Bun-targeted output is not automatically Node-compatible.
|
|
93
|
+
11. If Node consumers are supported, do not emit package entrypoints that rely on Bun-only APIs, Bun-only wrappers, or Bun-only module resolution unless the package clearly exposes a Bun-specific entry.
|
|
94
|
+
12. Treat Bun runtime as Node-compatible, not Node itself. JavaScriptCore, Node API compatibility gaps, native addons, Node internals, worker options, child process IPC, stream/backpressure, crypto/FIPS, watch behavior, Prisma CLI, sharp, Playwright, and esbuild all need targeted evidence when touched.
|
|
95
|
+
13. Check shebang and runner behavior. A CLI with `#!/usr/bin/env node` may execute under Node even when launched through Bun. Do not call a path Bun-runtime-verified unless the entrypoint actually ran under Bun.
|
|
96
|
+
14. Use Bun's test runner only when the project intentionally uses it or the task targets Bun. Do not silently migrate Jest or Vitest tests to `bun:test`. Treat mocks, snapshots, preloads, globals, path aliases, coverage, isolation, and parallelism as migration-risk areas.
|
|
97
|
+
15. Do not update Bun snapshots as a generic fix. Snapshot updates require intended output change, diff inspection, and a follow-up run without update mode through configured intents.
|
|
98
|
+
16. Choose configured verification intents that cover typecheck, build, tests, package metadata, package artifact risk, docs examples, Bun runtime behavior, Bun test behavior, and mustflow contract checks when available. Report missing frozen install, Bun runtime, Bun test, declaration, package artifact, native dependency, Node compatibility, Docker, or CI verification.
|
|
99
|
+
|
|
100
|
+
<!-- mustflow-section: postconditions -->
|
|
101
|
+
## Postconditions
|
|
102
|
+
|
|
103
|
+
- Bun's role is explicit: package manager, runtime, script runner, test runner, bundler, transpiler, or mixed.
|
|
104
|
+
- Bun lockfile, install, workspace, trust, and lifecycle behavior is aligned with project ownership.
|
|
105
|
+
- Bun runtime, test, bundler, TypeScript, and declaration claims are not conflated.
|
|
106
|
+
- Bun-only APIs do not leak into Node, browser, edge, or shared package surfaces unintentionally.
|
|
107
|
+
- Native dependency, shebang, Node compatibility, and package consumer risks are handled or reported.
|
|
108
|
+
|
|
109
|
+
<!-- mustflow-section: verification -->
|
|
110
|
+
## Verification
|
|
111
|
+
|
|
112
|
+
Use configured oneshot command intents when available:
|
|
113
|
+
|
|
114
|
+
- `lint`
|
|
115
|
+
- `build`
|
|
116
|
+
- `test_related`
|
|
117
|
+
- `test`
|
|
118
|
+
- `docs_validate_fast`
|
|
119
|
+
- `test_release`
|
|
120
|
+
- `mustflow_check`
|
|
121
|
+
|
|
122
|
+
Report missing frozen install, Bun runtime, Bun test, declaration output, package artifact, Node compatibility, native dependency, CI, Docker, or snapshot review verification intents when those surfaces change.
|
|
123
|
+
|
|
124
|
+
<!-- mustflow-section: failure-handling -->
|
|
125
|
+
## Failure Handling
|
|
126
|
+
|
|
127
|
+
- If Bun's role is unclear, stop changing runtime or dependency behavior and inspect scripts, lockfiles, `bunfig.toml`, CI, Docker, and entrypoints.
|
|
128
|
+
- If lockfile ownership conflicts, do not run dependency migration or generate a new lockfile unless the task explicitly asks for migration.
|
|
129
|
+
- If Bun runtime execution succeeds but typecheck or declarations are unverified, report that gap instead of claiming TypeScript correctness.
|
|
130
|
+
- If a package works under Bun but claims Node support, repair the Node-compatible entry or report the compatibility risk.
|
|
131
|
+
- If a native dependency, lifecycle script, or trusted dependency change cannot be verified, keep the change scoped and report release-sensitive risk.
|
|
132
|
+
|
|
133
|
+
<!-- mustflow-section: output-format -->
|
|
134
|
+
## Output Format
|
|
135
|
+
|
|
136
|
+
- Bun role classification
|
|
137
|
+
- Package manager, lockfile, and trust notes
|
|
138
|
+
- Runtime, TypeScript, bundler, and test runner notes
|
|
139
|
+
- Native, shebang, Node compatibility, or package consumer risks
|
|
140
|
+
- Files changed
|
|
141
|
+
- Command intents run
|
|
142
|
+
- Skipped checks and reasons
|
|
143
|
+
- Remaining Bun risk
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
mustflow_doc: skill.node-code-change
|
|
3
|
+
locale: en
|
|
4
|
+
canonical: true
|
|
5
|
+
revision: 1
|
|
6
|
+
lifecycle: mustflow-owned
|
|
7
|
+
authority: procedure
|
|
8
|
+
name: node-code-change
|
|
9
|
+
description: Apply this skill when Node.js runtime code, package manager ownership, module format, package entry metadata, native dependencies, Node test runner behavior, TypeScript execution mode, or deployment runtime support is created or changed.
|
|
10
|
+
metadata:
|
|
11
|
+
mustflow_schema: "1"
|
|
12
|
+
mustflow_kind: procedure
|
|
13
|
+
pack_id: mustflow.core
|
|
14
|
+
skill_id: mustflow.core.node-code-change
|
|
15
|
+
command_intents:
|
|
16
|
+
- changes_status
|
|
17
|
+
- changes_diff_summary
|
|
18
|
+
- lint
|
|
19
|
+
- build
|
|
20
|
+
- test_related
|
|
21
|
+
- test
|
|
22
|
+
- docs_validate_fast
|
|
23
|
+
- test_release
|
|
24
|
+
- mustflow_check
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Node Code Change
|
|
28
|
+
|
|
29
|
+
<!-- mustflow-section: purpose -->
|
|
30
|
+
## Purpose
|
|
31
|
+
|
|
32
|
+
Preserve the actual Node.js runtime, module, package manager, TypeScript execution, test runner, package entry, native dependency, and deployment boundaries.
|
|
33
|
+
|
|
34
|
+
<!-- mustflow-section: use-when -->
|
|
35
|
+
## Use When
|
|
36
|
+
|
|
37
|
+
- Node.js runtime code, `node:*` APIs, `process`, `Buffer`, streams, workers, child processes, native addons, Node permission flags, Node test runner behavior, package entry metadata, or deployment runtime support changes.
|
|
38
|
+
- `package.json` Node fields change, including `engines.node`, `devEngines`, `packageManager`, `type`, `main`, `exports`, `imports`, `types`, `typesVersions`, `files`, `bin`, `sideEffects`, or `workspaces`.
|
|
39
|
+
- Node version signals, CI Node setup, Docker Node base images, serverless Node runtime settings, Corepack usage, npm, pnpm, Yarn, or lockfile ownership changes.
|
|
40
|
+
- The task proposes native Node TypeScript execution, ESM/CJS conversion, conditional exports, package manager migration, or Node built-in test runner migration.
|
|
41
|
+
|
|
42
|
+
<!-- mustflow-section: do-not-use-when -->
|
|
43
|
+
## Do Not Use When
|
|
44
|
+
|
|
45
|
+
- The task only changes TypeScript type modeling, validators, declarations, or `.ts` source without Node runtime or package entry impact; use `typescript-code-change`.
|
|
46
|
+
- The task only changes plain JavaScript without Node-specific runtime, package, or deployment behavior; use `javascript-code-change`.
|
|
47
|
+
- Bun owns the runtime, package manager, test runner, or bundler behavior being changed; use `bun-code-change`.
|
|
48
|
+
- A narrower framework skill owns the changed route or handler surface, unless Node runtime, package, or deployment behavior is also affected.
|
|
49
|
+
|
|
50
|
+
<!-- mustflow-section: required-inputs -->
|
|
51
|
+
## Required Inputs
|
|
52
|
+
|
|
53
|
+
- Node version signals: `.nvmrc`, `.node-version`, `.tool-versions`, Volta or mise/asdf config, `package.json#engines.node`, `package.json#devEngines`, CI Node matrix, Docker `FROM node:*`, and deployment runtime config.
|
|
54
|
+
- Package ownership signals: `package.json#packageManager`, npm, pnpm, Yarn, Bun, or vlt lockfiles, workspace config, `.npmrc`, `.yarnrc.yml`, Corepack usage, CI install commands, and Docker install commands.
|
|
55
|
+
- Module and package metadata: nearest `package.json#type`, file extensions, `main`, `module`, `exports`, `imports`, `types`, `typings`, `typesVersions`, `files`, `bin`, `sideEffects`, and documented import paths.
|
|
56
|
+
- TypeScript and loader signals: `tsconfig*.json`, `tsx`, `ts-node`, SWC, Babel, Vite, tsup, esbuild, Node native type stripping, path aliases, declaration output, and test or build transforms.
|
|
57
|
+
- Test, native, and deployment signals: package scripts, test runner config, `node:test` usage, native dependency indicators such as `.node`, `binding.gyp`, `node-gyp`, lifecycle scripts, optional dependencies, serverless or edge config, and command contract entries.
|
|
58
|
+
|
|
59
|
+
<!-- mustflow-section: preconditions -->
|
|
60
|
+
## Preconditions
|
|
61
|
+
|
|
62
|
+
- Determine the effective Node runtime before using newer syntax, APIs, or flags.
|
|
63
|
+
- Determine package manager ownership before editing dependencies or lockfiles.
|
|
64
|
+
- Determine Node's actual module loading path before changing imports, file extensions, or package entry metadata.
|
|
65
|
+
- Treat package entry, engine, and lockfile changes as public contract or release-sensitive changes unless proven internal.
|
|
66
|
+
|
|
67
|
+
<!-- mustflow-section: allowed-edits -->
|
|
68
|
+
## Allowed Edits
|
|
69
|
+
|
|
70
|
+
- Keep runtime-specific Node APIs in Node-owned files or adapters.
|
|
71
|
+
- Keep package manager changes aligned with the owner already used by CI, Docker, and lockfiles.
|
|
72
|
+
- Keep ESM, CJS, and dual package boundaries explicit and synchronized with declarations, tests, docs examples, and consumer entrypoints.
|
|
73
|
+
- Preserve existing TypeScript build, typecheck, declaration, and loader pipelines unless the task explicitly asks to replace them.
|
|
74
|
+
- Add or update focused tests only when they protect the changed runtime, package, module, native, or deployment contract.
|
|
75
|
+
|
|
76
|
+
<!-- mustflow-section: procedure -->
|
|
77
|
+
## Procedure
|
|
78
|
+
|
|
79
|
+
1. Read runtime version signals before editing. Treat deployment runtime as the hard constraint, CI runtime as the verified constraint, `engines.node` as the compatibility contract, and local version files as developer hints. If these conflict, report the conflict before introducing APIs or syntax that depend on one side.
|
|
80
|
+
2. Do not assume Node Current. Use Current-only APIs only when local tooling, CI, Docker, deployment, package metadata, and intended consumers all prove support for that Current major. For production applications, prefer Active LTS or Maintenance LTS when the project does not declare otherwise.
|
|
81
|
+
3. Determine package manager ownership from `packageManager`, lockfiles, workspace config, CI, and Docker. If `packageManager` and lockfiles disagree, or multiple lockfiles exist, do not rewrite dependencies until the owner and migration intent are clear.
|
|
82
|
+
4. Keep package manager semantics distinct:
|
|
83
|
+
- npm dependency changes update `package.json` and npm lockfiles; clean CI installs use npm's clean-install mode.
|
|
84
|
+
- pnpm workspaces and frozen lockfile behavior can affect every workspace even when one package changed.
|
|
85
|
+
- Yarn PnP, Zero-Install, and immutable installs can make `node_modules` assumptions wrong.
|
|
86
|
+
- Corepack availability depends on the Node/runtime environment; do not assume it exists in every Node version, image, or CI runner.
|
|
87
|
+
5. Determine Node module loading from Node rules, not preference or `tsconfig` alone. `.mjs` and `.mts` are ESM, `.cjs` and `.cts` are CommonJS, and `.js` or `.ts` follows the nearest package `type` after the project's loader/build path is considered.
|
|
88
|
+
6. Treat `type`, `main`, `exports`, `imports`, file extensions, and conditional export changes as package entry contract changes. Adding `exports` can block deep imports and should be classified as compatibility-sensitive unless all previously supported paths remain exported or the release is intentionally breaking.
|
|
89
|
+
7. For conditional exports, keep condition order deliberate, include a `default` fallback when multi-runtime or bundler consumers are intended, and avoid splitting `import` and `require` into separate stateful implementations unless dual package hazards are tested.
|
|
90
|
+
8. For `imports`, use `#` aliases only for package-internal paths, and keep TypeScript paths, bundler aliases, test runner aliases, and declaration output aligned.
|
|
91
|
+
9. For JSON imports, `require(esm)`, top-level await, `.mts`, `.cts`, `.d.mts`, and `.d.cts`, verify the minimum Node version, TypeScript module resolution, generated output, and consumer path before changing code.
|
|
92
|
+
10. Do not replace an existing TypeScript pipeline with native Node TypeScript execution unless the task explicitly asks for that migration. Node native TypeScript execution is limited type stripping; it does not typecheck, read `tsconfig`, resolve path aliases, emit declarations, downlevel syntax, transform decorators or enums, or support TSX as a full build pipeline.
|
|
93
|
+
11. If native Node TypeScript execution is intentionally used, keep syntax erasable-only, use `import type` for type-only imports, avoid runtime TypeScript features that require transforms, and keep the configured typecheck/build pipeline for application and library code.
|
|
94
|
+
12. Detect the actual test runner from scripts, config files, dependencies, and CI. Do not migrate Jest, Vitest, Playwright, or another runner to `node:test` just because Node has a built-in runner. Watch, coverage, mock, snapshot, worker, and cleanup behavior are runner-specific.
|
|
95
|
+
13. Treat watch mode and snapshot update modes as development or review actions, not final verification. Use the configured oneshot intents and report when no configured runner-specific intent exists.
|
|
96
|
+
14. Before using Node APIs in deployment code, classify the target as Node server, Docker, serverless Node, edge runtime, static build, or multi-runtime package. Edge runtimes are not full Node.js runtimes.
|
|
97
|
+
15. Inspect native and install-sensitive dependencies when package metadata or runtime imports touch `.node`, `binding.gyp`, `node-gyp`, `preinstall`, `install`, `postinstall`, `prepare`, optional dependencies, peer dependencies, OS, CPU, libc, or Node ABI boundaries.
|
|
98
|
+
16. Treat optional dependencies and optional peers as absent until code handles absence. Do not require optional packages directly without fallback or error handling that matches the existing project pattern.
|
|
99
|
+
17. Treat the Node permission model as a trusted-code seatbelt, not a sandbox for untrusted code. If permission flags are introduced or changed, map required filesystem, network, child process, worker, native addon, WASI, inspector, and temporary directory access explicitly.
|
|
100
|
+
18. Choose configured verification intents that cover lint, build, tests, package metadata, release-sensitive package output, docs examples, and mustflow contract checks when available. Report missing consumer fixture, ESM, CJS, TypeScript consumer, native dependency, deployment, or permission verification.
|
|
101
|
+
|
|
102
|
+
<!-- mustflow-section: postconditions -->
|
|
103
|
+
## Postconditions
|
|
104
|
+
|
|
105
|
+
- Effective Node runtime and package manager ownership are known or explicitly reported as conflicting.
|
|
106
|
+
- Module and package entry changes are synchronized with declarations, tests, docs examples, and consumer surfaces when relevant.
|
|
107
|
+
- Native TypeScript execution is not mistaken for typecheck, declaration emit, or a full build pipeline.
|
|
108
|
+
- Node-only APIs do not leak into browser, edge, Bun, or shared package surfaces unintentionally.
|
|
109
|
+
- Native dependency, lifecycle, optional dependency, and permission-model risks are handled or reported.
|
|
110
|
+
|
|
111
|
+
<!-- mustflow-section: verification -->
|
|
112
|
+
## Verification
|
|
113
|
+
|
|
114
|
+
Use configured oneshot command intents when available:
|
|
115
|
+
|
|
116
|
+
- `lint`
|
|
117
|
+
- `build`
|
|
118
|
+
- `test_related`
|
|
119
|
+
- `test`
|
|
120
|
+
- `docs_validate_fast`
|
|
121
|
+
- `test_release`
|
|
122
|
+
- `mustflow_check`
|
|
123
|
+
|
|
124
|
+
Report missing ESM/CJS consumer, declaration output, package artifact, frozen install, native dependency, deployment runtime, permission-model, or runner-specific verification intents when those surfaces change.
|
|
125
|
+
|
|
126
|
+
<!-- mustflow-section: failure-handling -->
|
|
127
|
+
## Failure Handling
|
|
128
|
+
|
|
129
|
+
- If runtime signals conflict, do not resolve the conflict by assuming the newest Node version.
|
|
130
|
+
- If package manager ownership conflicts, do not add, remove, or migrate dependencies until the owner is clear.
|
|
131
|
+
- If a package entry change blocks a documented or previously supported import path, restore compatibility or report the breaking-change requirement.
|
|
132
|
+
- If native Node TypeScript execution fails, repair the build/loader boundary instead of weakening typecheck or deleting the TypeScript pipeline.
|
|
133
|
+
- If native dependency installation or optional dependency behavior is unclear, classify the change as release-sensitive and report the missing install or runtime evidence.
|
|
134
|
+
|
|
135
|
+
<!-- mustflow-section: output-format -->
|
|
136
|
+
## Output Format
|
|
137
|
+
|
|
138
|
+
- Runtime and package manager decision
|
|
139
|
+
- Module and package entry notes
|
|
140
|
+
- TypeScript execution and test runner notes
|
|
141
|
+
- Native, lifecycle, deployment, or permission risks
|
|
142
|
+
- Files changed
|
|
143
|
+
- Command intents run
|
|
144
|
+
- Skipped checks and reasons
|
|
145
|
+
- Remaining Node.js risk
|
|
@@ -120,6 +120,18 @@ route_type = "primary"
|
|
|
120
120
|
priority = 85
|
|
121
121
|
applies_to_reasons = ["code_change", "public_api_change", "test_change", "package_metadata_change"]
|
|
122
122
|
|
|
123
|
+
[routes."node-code-change"]
|
|
124
|
+
category = "general_code"
|
|
125
|
+
route_type = "primary"
|
|
126
|
+
priority = 85
|
|
127
|
+
applies_to_reasons = ["code_change", "public_api_change", "test_change", "package_metadata_change"]
|
|
128
|
+
|
|
129
|
+
[routes."bun-code-change"]
|
|
130
|
+
category = "general_code"
|
|
131
|
+
route_type = "primary"
|
|
132
|
+
priority = 85
|
|
133
|
+
applies_to_reasons = ["code_change", "public_api_change", "test_change", "package_metadata_change"]
|
|
134
|
+
|
|
123
135
|
[routes."api-contract-change"]
|
|
124
136
|
category = "general_code"
|
|
125
137
|
route_type = "primary"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id = "default"
|
|
2
2
|
name = "default"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.26.0"
|
|
4
4
|
description = "Minimal workflow for LLM agents to read, edit, and verify their work in a repository."
|
|
5
5
|
common_root = "common"
|
|
6
6
|
locales_root = "locales"
|
|
@@ -21,6 +21,7 @@ creates = [
|
|
|
21
21
|
".mustflow/skills/codebase-orientation/SKILL.md",
|
|
22
22
|
".mustflow/skills/clarifying-question-gate/SKILL.md",
|
|
23
23
|
".mustflow/skills/astro-code-change/SKILL.md",
|
|
24
|
+
".mustflow/skills/bun-code-change/SKILL.md",
|
|
24
25
|
".mustflow/skills/css-code-change/SKILL.md",
|
|
25
26
|
".mustflow/skills/cpp-code-change/SKILL.md",
|
|
26
27
|
".mustflow/skills/dart-code-change/SKILL.md",
|
|
@@ -30,6 +31,7 @@ creates = [
|
|
|
30
31
|
".mustflow/skills/hono-code-change/SKILL.md",
|
|
31
32
|
".mustflow/skills/html-code-change/SKILL.md",
|
|
32
33
|
".mustflow/skills/javascript-code-change/SKILL.md",
|
|
34
|
+
".mustflow/skills/node-code-change/SKILL.md",
|
|
33
35
|
".mustflow/skills/python-code-change/SKILL.md",
|
|
34
36
|
".mustflow/skills/rust-code-change/SKILL.md",
|
|
35
37
|
".mustflow/skills/svelte-code-change/SKILL.md",
|
|
@@ -129,6 +131,7 @@ minimal = [
|
|
|
129
131
|
"codebase-orientation",
|
|
130
132
|
"clarifying-question-gate",
|
|
131
133
|
"astro-code-change",
|
|
134
|
+
"bun-code-change",
|
|
132
135
|
"css-code-change",
|
|
133
136
|
"cpp-code-change",
|
|
134
137
|
"dart-code-change",
|
|
@@ -138,6 +141,7 @@ minimal = [
|
|
|
138
141
|
"hono-code-change",
|
|
139
142
|
"html-code-change",
|
|
140
143
|
"javascript-code-change",
|
|
144
|
+
"node-code-change",
|
|
141
145
|
"python-code-change",
|
|
142
146
|
"rust-code-change",
|
|
143
147
|
"svelte-code-change",
|
|
@@ -182,6 +186,7 @@ patterns = [
|
|
|
182
186
|
"codebase-orientation",
|
|
183
187
|
"clarifying-question-gate",
|
|
184
188
|
"astro-code-change",
|
|
189
|
+
"bun-code-change",
|
|
185
190
|
"css-code-change",
|
|
186
191
|
"cpp-code-change",
|
|
187
192
|
"dart-code-change",
|
|
@@ -191,6 +196,7 @@ patterns = [
|
|
|
191
196
|
"hono-code-change",
|
|
192
197
|
"html-code-change",
|
|
193
198
|
"javascript-code-change",
|
|
199
|
+
"node-code-change",
|
|
194
200
|
"python-code-change",
|
|
195
201
|
"rust-code-change",
|
|
196
202
|
"svelte-code-change",
|
|
@@ -246,6 +252,7 @@ oss = [
|
|
|
246
252
|
"codebase-orientation",
|
|
247
253
|
"clarifying-question-gate",
|
|
248
254
|
"astro-code-change",
|
|
255
|
+
"bun-code-change",
|
|
249
256
|
"css-code-change",
|
|
250
257
|
"cpp-code-change",
|
|
251
258
|
"dart-code-change",
|
|
@@ -255,6 +262,7 @@ oss = [
|
|
|
255
262
|
"hono-code-change",
|
|
256
263
|
"html-code-change",
|
|
257
264
|
"javascript-code-change",
|
|
265
|
+
"node-code-change",
|
|
258
266
|
"python-code-change",
|
|
259
267
|
"rust-code-change",
|
|
260
268
|
"svelte-code-change",
|
|
@@ -323,6 +331,7 @@ team = [
|
|
|
323
331
|
"codebase-orientation",
|
|
324
332
|
"clarifying-question-gate",
|
|
325
333
|
"astro-code-change",
|
|
334
|
+
"bun-code-change",
|
|
326
335
|
"css-code-change",
|
|
327
336
|
"cpp-code-change",
|
|
328
337
|
"dart-code-change",
|
|
@@ -332,6 +341,7 @@ team = [
|
|
|
332
341
|
"hono-code-change",
|
|
333
342
|
"html-code-change",
|
|
334
343
|
"javascript-code-change",
|
|
344
|
+
"node-code-change",
|
|
335
345
|
"python-code-change",
|
|
336
346
|
"rust-code-change",
|
|
337
347
|
"svelte-code-change",
|
|
@@ -388,6 +398,7 @@ product = [
|
|
|
388
398
|
"codebase-orientation",
|
|
389
399
|
"clarifying-question-gate",
|
|
390
400
|
"astro-code-change",
|
|
401
|
+
"bun-code-change",
|
|
391
402
|
"css-code-change",
|
|
392
403
|
"cpp-code-change",
|
|
393
404
|
"dart-code-change",
|
|
@@ -397,6 +408,7 @@ product = [
|
|
|
397
408
|
"hono-code-change",
|
|
398
409
|
"html-code-change",
|
|
399
410
|
"javascript-code-change",
|
|
411
|
+
"node-code-change",
|
|
400
412
|
"python-code-change",
|
|
401
413
|
"rust-code-change",
|
|
402
414
|
"svelte-code-change",
|
|
@@ -458,6 +470,7 @@ library = [
|
|
|
458
470
|
"codebase-orientation",
|
|
459
471
|
"clarifying-question-gate",
|
|
460
472
|
"astro-code-change",
|
|
473
|
+
"bun-code-change",
|
|
461
474
|
"css-code-change",
|
|
462
475
|
"cpp-code-change",
|
|
463
476
|
"dart-code-change",
|
|
@@ -467,6 +480,7 @@ library = [
|
|
|
467
480
|
"hono-code-change",
|
|
468
481
|
"html-code-change",
|
|
469
482
|
"javascript-code-change",
|
|
483
|
+
"node-code-change",
|
|
470
484
|
"python-code-change",
|
|
471
485
|
"rust-code-change",
|
|
472
486
|
"svelte-code-change",
|