mustflow 2.25.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/default/i18n.toml +5 -5
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +5 -5
- package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +37 -18
- package/templates/default/locales/en/.mustflow/skills/file-path-cross-platform-change/SKILL.md +36 -21
- package/templates/default/locales/en/.mustflow/skills/line-ending-hygiene/SKILL.md +15 -6
- package/templates/default/locales/en/.mustflow/skills/process-execution-safety/SKILL.md +33 -11
- package/templates/default/manifest.toml +1 -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 = 85
|
|
60
60
|
translations = {}
|
|
61
61
|
|
|
62
62
|
[documents."skill.adapter-boundary"]
|
|
@@ -146,13 +146,13 @@ translations = {}
|
|
|
146
146
|
[documents."skill.line-ending-hygiene"]
|
|
147
147
|
source = "locales/en/.mustflow/skills/line-ending-hygiene/SKILL.md"
|
|
148
148
|
source_locale = "en"
|
|
149
|
-
revision =
|
|
149
|
+
revision = 2
|
|
150
150
|
translations = {}
|
|
151
151
|
|
|
152
152
|
[documents."skill.file-path-cross-platform-change"]
|
|
153
153
|
source = "locales/en/.mustflow/skills/file-path-cross-platform-change/SKILL.md"
|
|
154
154
|
source_locale = "en"
|
|
155
|
-
revision =
|
|
155
|
+
revision = 4
|
|
156
156
|
translations = {}
|
|
157
157
|
|
|
158
158
|
[documents."skill.diff-risk-review"]
|
|
@@ -302,7 +302,7 @@ translations = {}
|
|
|
302
302
|
[documents."skill.cross-platform-filesystem-safety"]
|
|
303
303
|
source = "locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md"
|
|
304
304
|
source_locale = "en"
|
|
305
|
-
revision =
|
|
305
|
+
revision = 6
|
|
306
306
|
translations = {}
|
|
307
307
|
|
|
308
308
|
[documents."skill.pure-core-imperative-shell"]
|
|
@@ -391,7 +391,7 @@ translations = {}
|
|
|
391
391
|
[documents."skill.process-execution-safety"]
|
|
392
392
|
source = "locales/en/.mustflow/skills/process-execution-safety/SKILL.md"
|
|
393
393
|
source_locale = "en"
|
|
394
|
-
revision =
|
|
394
|
+
revision = 4
|
|
395
395
|
translations = {}
|
|
396
396
|
|
|
397
397
|
[documents."skill.repo-improvement-loop"]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
mustflow_doc: skills.index
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 85
|
|
6
6
|
authority: router
|
|
7
7
|
lifecycle: mustflow-owned
|
|
8
8
|
---
|
|
@@ -155,9 +155,9 @@ routes. Event routes stay inactive until their event occurs.
|
|
|
155
155
|
| Generated or edited code, configuration, CI workflows, package metadata, install instructions, examples, Docker images, framework setup, runtime declarations, toolchain declarations, or migration-sensitive snippets introduce explicit external version references, action refs, package ranges, runtime versions, framework majors, Docker image tags, or scaffold commands that may be stale | `.mustflow/skills/version-freshness-check/SKILL.md` | Versioned reference, owning files, repository version policy, approved freshness source, compatibility context, migration risk, and command contract entries | Package metadata, lockfiles, CI workflows, Dockerfiles, runtime files, framework config, docs, examples, templates, tests, and version-decision reports | stale default version, false latest claim, accidental major migration, repository policy mismatch, unsupported generated example, floating-tag drift, or unverified security/support claim | `changes_status`, `changes_diff_summary`, `build`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Versioned surfaces checked, repository policy and freshness source, selected version track, compatibility classification, approval need, synchronized surfaces, verification, and remaining version-freshness risk |
|
|
156
156
|
| External systems, protocols, SDKs, databases, webhooks, queues, files, object storage, signed upload or download URLs, caches, API response models, framework requests or responses, server actions, route handlers, edge functions, worker handlers, AI models, browser storage, search engines, analytics tools, email platforms, no-code tools, observability backends, trace or request context, or provider data cross the core boundary or need port/adapter translation, error mapping, timeout, retry, circuit-breaker, bulkhead, idempotency, reconciliation, security, core-state ownership, vendor portability, or observability handling | `.mustflow/skills/adapter-boundary/SKILL.md` | External system or protocol, inbound/outbound direction, delivery boundary, internal use case, local port/adapter patterns, provider risk, provider failure policy, core-state ownership risk, vendor portability risk, observability identifier policy, API contract risk, changed files, and command contract entries | Ports, adapters, mappers, controllers, workers, stores, gateways, response mappers, telemetry mappers, timeout and retry policies, circuit breakers, bulkhead boundaries, tests, fixtures, assembly wiring, and directly synchronized docs or templates | provider leakage, framework business-rule leakage, telemetry backend leakage, storage-key leakage, screen-shaped API coupling, pass-through wrapper, SaaS dashboard as truth source, search or analytics policy leakage, queue contract leakage, unclassified external failure, duplicate side effect, unsafe retry, missing timeout, missing circuit breaker, missing bulkhead, unresolved unknown provider outcome, broken identifier propagation, secret or personal-data leak, or untested integration drift | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Boundary classification, delivery adapter responsibility, internal port, provider containment, core-state ownership, vendor portability, validation and mapping, API response mapping, observability identifier flow, timeout/retry/circuit-breaker/bulkhead/idempotency handling, reconciliation behavior, security notes, verification, and remaining provider risk |
|
|
157
157
|
| Tauri frontend invokes, Rust commands, capabilities, permissions, scopes, plugins, filesystem, dialog, shell, opener, updater, sidecar, or mobile native permissions are created or changed | `.mustflow/skills/tauri-code-change/SKILL.md` | Frontend call sites, Tauri config, Rust commands, capability and permission files, plugin config, changed files, and command contract entries | Tauri frontend, Rust commands, capabilities, permissions, scopes, plugins, tests, and docs | broad native permission, untrusted IPC input, filesystem escape, shell or updater risk, or WebView/native boundary drift | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | IPC, permission, scope, filesystem, shell, updater, and native boundary checked, verification, and remaining Tauri risk |
|
|
158
|
-
| File path handling, cross-platform path behavior, path helpers, safe filesystem wrappers, temp or cache paths, atomic writes, locks, archive extraction, uploads, downloads, scanners, CLI/API/schema path contracts, snapshots, generated outputs, or package artifact paths are created, changed, reviewed, or reported | `.mustflow/skills/file-path-cross-platform-change/SKILL.md` | Path ledger, trust classes, accepted path representation, base root, path helpers, safe filesystem wrappers, temp/cache helpers, lock policy, archive policy, upload/download policy, scanner policy, CLI/API/schema/snapshot/generated/package surfaces, platform expectations, and command contract entries | Path validators, helpers, wrappers, schemas, CLI/API parsing, snapshots, fixtures, docs, tests, generated-output paths, package artifact paths, archive extraction, scanner bounds, temp/cache handling, locks, and cleanup code | path traversal, base containment bypass, drive-relative path bug, reserved-name bug, case-collision bug,
|
|
159
|
-
| File paths, directories, symlinks, real paths, traversal, atomic writes, file copies, generated outputs, temporary files, cleanup, or Windows/POSIX filesystem behavior are created, changed, reviewed, or reported | `.mustflow/skills/cross-platform-filesystem-safety/SKILL.md` | Path inputs, base directory, trust boundary, symlink policy, write or cleanup strategy, platform expectations, and command contract entries | Path validation, file helpers, copy/update/delete code, scan bounds, fixtures, tests, docs, and templates | path traversal, symlink escape, unsafe overwrite, platform-only behavior, stale output, or cleanup data loss | `changes_status`, `changes_diff_summary`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Path trust classes, root boundary, symlink/write/delete/scan decisions, platform assumptions, verification, and remaining filesystem risk |
|
|
160
|
-
| Child processes, shell or argv execution, built-in command reruns, timeouts, process trees, output limits, streaming, environment policy, command eligibility, or execution receipts are created, changed, reviewed, or reported | `.mustflow/skills/process-execution-safety/SKILL.md` | Execution path, timeout, output limit, stdin, environment, cwd, process tree behavior, receipt and write-tracking expectations, and command contract entries | Process execution code, process-tree helpers, output buffers, environment creation, eligibility checks, receipts, tests, and docs | runaway process, unbounded output, leaked environment, inconsistent JSON/text execution, false cleanup claim, or unreliable receipt | `changes_status`, `changes_diff_summary`, `test_related`, `test_release`, `mustflow_check` | Execution surface, timeout/output/environment/process-tree boundaries, receipt consistency, tests, verification, and remaining process risk |
|
|
158
|
+
| File path handling, cross-platform path behavior, path helpers, safe filesystem wrappers, clone or checkout destinations, scaffold roots, temp or cache paths, atomic writes, locks, archive extraction, uploads, downloads, scanners, CLI/API/schema path contracts, snapshots, generated outputs, or package artifact paths are created, changed, reviewed, or reported | `.mustflow/skills/file-path-cross-platform-change/SKILL.md` | Path ledger, trust classes, accepted path representation, base root, path helpers, safe filesystem wrappers, clone/checkout/scaffold/install/extract outputs, staging and promotion policy, temp/cache helpers, lock policy, archive policy, upload/download policy, scanner policy, CLI/API/schema/snapshot/generated/package surfaces, platform expectations, failure taxonomy, and command contract entries | Path validators, helpers, wrappers, schemas, CLI/API parsing, snapshots, fixtures, docs, tests, generated-output paths, package artifact paths, clone or scaffold destinations, archive extraction, scanner bounds, temp/cache handling, locks, and cleanup code | path traversal, base containment bypass, drive-relative path bug, reserved-name bug, case-collision bug, Unicode-collision bug, Git checkout path-length failure misreported as network or auth, unsafe archive extraction, non-atomic write claim, stale lock, scanner loop, partial-output cleanup data loss, user-selected destination deletion, path contract drift, or package artifact path drift | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Path contract, path ledger, trust classes, root policy, preflight/staging/promotion decisions, Windows/macOS/Linux/archive/upload/download/scanner/lock/temp/cache/atomic/cleanup decisions, failure taxonomy, synchronized contract surfaces, verification, and remaining path risk |
|
|
159
|
+
| File paths, directories, symlinks, real paths, traversal, atomic writes, file copies, generated outputs, temporary files, clone or checkout materialization, cleanup, or Windows/POSIX filesystem behavior are created, changed, reviewed, or reported | `.mustflow/skills/cross-platform-filesystem-safety/SKILL.md` | Path inputs, base directory, trust boundary, symlink policy, write or cleanup strategy, clone/checkout/scaffold/install/extract path budget, app-owned staging boundary, platform expectations, failure taxonomy, and command contract entries | Path validation, file helpers, copy/update/delete code, clone/scaffold/archive cleanup code, scan bounds, fixtures, tests, docs, and templates | path traversal, symlink escape, unsafe overwrite, platform-only behavior, stale output, path-length or filename-length misclassification, watcher/resource misclassification, or cleanup data loss | `changes_status`, `changes_diff_summary`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Path trust classes, root boundary, symlink/write/delete/scan decisions, preflight and staging boundaries, clone/scaffold/extract classification, platform assumptions, verification, and remaining filesystem risk |
|
|
160
|
+
| Child processes, shell or argv execution, built-in command reruns, Git/package-manager/scaffolder failures, timeouts, process trees, output limits, streaming, environment policy, command eligibility, failure classification, command-line length limits, or execution receipts are created, changed, reviewed, or reported | `.mustflow/skills/process-execution-safety/SKILL.md` | Execution path, timeout, output limit, stdin, argv and shell command-length budget, environment, cwd, process tree behavior, failure taxonomy, receipt and write-tracking expectations, and command contract entries | Process execution code, process-tree helpers, output buffers, environment creation, eligibility checks, failure classifiers, receipts, tests, and docs | runaway process, unbounded output, leaked environment, argv-too-long failure, shell-command-too-long failure, inconsistent JSON/text execution, false cleanup claim, Git checkout path failure misreported as network or auth, blind retry, diagnostic loss, or unreliable receipt | `changes_status`, `changes_diff_summary`, `test_related`, `test_release`, `mustflow_check` | Execution surface, timeout/output/environment/process-tree boundaries, argv and shell length handling, failure classification, diagnostic preservation, receipt consistency, tests, verification, and remaining process risk |
|
|
161
161
|
| Core or application logic creates, imports, resolves, or hides external dependencies such as databases, SDKs, clocks, random generators, configuration, loggers, framework objects, filesystems, queues, AI clients, or payment/email providers | `.mustflow/skills/dependency-injection/SKILL.md` | Target code area, hidden dependency, intended business capability, layer ownership, local port/adapter patterns, changed files, and command contract entries | Core logic signatures, ports, adapters, assembly roots, tests, and directly synchronized docs or templates | hidden global state, untestable business logic, provider leakage, lifecycle drift, or service-locator coupling | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Dependency boundary, direct dependencies found, injection style, ports/adapters, assembly boundary, tests or fakes, verification, and remaining dependency leakage |
|
|
162
162
|
| Code, data, schema, configuration, file layout, template, content frontmatter, file-to-database, URL, slug, lifecycle, asset, claim or fact extraction, API projection compatibility, public identifier changes, provider id mappings, event-schema changes, observability identifier continuity, deployment-state reproduction, generated-state, backup or restore proof, semantic export, import, platform exit, or cache migrations are planned, edited, documented, or reported | `.mustflow/skills/migration-safety-check/SKILL.md` | Source state, target state, migration surface owner, identity, lifecycle, asset, claim, export/import reconstruction shape, URL continuity, API projection expectations, public id mapping, provider id mapping, event schema versioning, observability identifier continuity, deployment-state reproduction, cache key versioning, restore evidence, idempotency, rollback, dry-run, compatibility, and command contract entries | Migration plans, compatibility notes, lock metadata, docs, tests, templates, generated state, redirects, assets, exports, imports, deployment notes, observability continuity notes, caches, restore notes, and reports | irreversible migration, data loss, incomplete export, broken links, identity drift, provider-id lock-in, lost asset originals, API contract break, event-schema ambiguity, broken traceability, dashboard-only operating state, cache-key drift, untested restore, or false migration-success claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Migration surface, source and target state, identity, lifecycle, asset, claim, URL, API, event, observability, deployment-state, cache, restore, and export/import continuity, idempotency, rollback, metadata updates, verification, and remaining migration risk |
|
|
163
163
|
|
|
@@ -205,7 +205,7 @@ routes. Event routes stay inactive until their event occurs.
|
|
|
205
205
|
| `.mustflow/config/commands.toml` command intents, resources, effects, timeouts, output limits, environment policies, lifecycle values, run policies, command-selection metadata, CI/CD reproducibility rules, build/test/migration/deploy verification handoffs, or health-check command surfaces are created, changed, reviewed, or removed | `.mustflow/skills/command-contract-authoring/SKILL.md` | Command goal, current command contract, expected reads and writes, side effects, locks, timeout, output, environment, stdin, dashboard or platform setting dependency, and verification entries | Command contract, template command contracts, workflow docs, skills, tests, and directly synchronized public docs | accidental command authority, inferred command, dashboard-only source of truth, unreproducible deployment, unbounded side effect, missing lock, secret exposure, or long-running command approval | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Intent authority decision, side-effect model, environment and timeout boundary, CI/CD reproducibility boundary, synchronized surfaces, verification, and remaining command-contract risk |
|
|
206
206
|
| CLI text output, JSON output, exit codes, error messages, warnings, deprecations, help text, command aliases, schema-backed reports, or automation-facing command behavior are created, changed, reviewed, or reported | `.mustflow/skills/cli-output-contract-review/SKILL.md` | Affected command, output modes, exit-code expectations, docs examples, schemas, fixtures, consumers, and command contract entries | CLI output code, schemas, fixtures, docs, README examples, package tests, templates, and reports | broken automation, misleading success, schema drift, undocumented deprecation, stale example, or incompatible output change | `changes_status`, `changes_diff_summary`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Output surfaces reviewed, status and exit-code semantics, synchronized schemas/docs/tests/templates, verification, and remaining CLI-output risk |
|
|
207
207
|
| Dates, versions, counts, durations, limits, metrics, benchmarks, prices, percentages, or other numeric facts are created, edited, or reported | `.mustflow/skills/date-number-audit/SKILL.md` | Date or numeric fact, source of truth, dependent surfaces, precision expectation, and command contract entries | Numeric statements, metadata, tests, docs, templates, and reports | invented, stale, or mismatched numeric claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Audited values, source of truth, synchronized surfaces, skipped checks, and remaining numeric risk |
|
|
208
|
-
| Git reports CRLF/LF warnings or tracked text files may need line-ending normalization | `.mustflow/skills/line-ending-hygiene/SKILL.md` | Warning text
|
|
208
|
+
| Git reports CRLF/LF warnings, Docker or shell scripts fail with CRLF interpreter errors, `.gitattributes` policy is proposed, or tracked text files may need line-ending normalization | `.mustflow/skills/line-ending-hygiene/SKILL.md` | Warning or runtime error text, changed-file evidence, line-ending policy, requested scope, changed-file status, and command contract entries | Line-ending policy files when explicitly requested, tracked text files when explicitly normalized, command metadata, tests, and reports | silent working-tree rewrite, hidden repository-wide policy change, unrelated renormalization, or policy drift | `line_endings_check`, `changes_status`, `mustflow_check` | Policy found or deferred, drift files, normalization status, verification, and remaining line-ending risk |
|
|
209
209
|
| External `SKILL.md` files, skill packs, awesome lists, GitHub skill repositories, installer recommendations, or third-party skill procedures are reviewed for possible mustflow adoption | `.mustflow/skills/external-skill-intake/SKILL.md` | Source path or URL, license or provenance evidence, external skill files, intended adoption outcome, existing skill overlap, and command contract entries | Skill procedures, skill routes, template metadata, tests, docs, and review notes that adapt the external idea | third-party command bypass, license or provenance gap, unsafe helper script, duplicated skill, stale source claim, or default-profile bloat | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Source review, overlap decision, safety findings, command-intent mapping, adoption decision, synchronized surfaces, verification, and remaining intake risk |
|
|
210
210
|
| Repository, host, user, nested-project, command-contract, preference, or generated instruction sources conflict or make safe scope unclear | `.mustflow/skills/instruction-conflict-scope-check/SKILL.md` | Conflicting instruction sources, affected scope, direct user request, command contract entries, and nearest instruction files | Workflow docs, skills, templates, tests, reports, and selected repository scope | authority drift, unsafe scope expansion, wrong repository edit, or unauthorized command | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Conflicts reviewed, chosen priority rule, narrowed or skipped actions, clarification changes, and remaining authority risk |
|
|
211
211
|
| `.mustflow/context/PROJECT.md` needs cautious project context | `.mustflow/skills/project-context-authoring/SKILL.md` | Supported project facts | `.mustflow/context/PROJECT.md` | authority drift | `mustflow_check` | Updated cautious context |
|
package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
mustflow_doc: skill.cross-platform-filesystem-safety
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 6
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: cross-platform-filesystem-safety
|
|
9
|
-
description: Apply this skill when file paths, directories, symlinks, reparse points, real paths, path traversal, reserved names, null bytes, atomic file writes, temporary files, file copies, generated outputs, Windows/POSIX path behavior, line endings, file permissions, durable writes, or filesystem cleanup are created, changed, reviewed, or reported.
|
|
9
|
+
description: Apply this skill when file paths, directories, symlinks, reparse points, real paths, path traversal, reserved names, null bytes, atomic file writes, temporary files, file copies, generated outputs, clone or checkout materialization, Windows/POSIX path behavior, line endings, file permissions, durable writes, failure classification, or filesystem cleanup are created, changed, reviewed, or reported.
|
|
10
10
|
metadata:
|
|
11
11
|
mustflow_schema: "1"
|
|
12
12
|
mustflow_kind: procedure
|
|
@@ -33,6 +33,7 @@ Keep filesystem behavior safe across Windows and POSIX while preventing path tra
|
|
|
33
33
|
|
|
34
34
|
- Code creates, reads, writes, deletes, copies, moves, normalizes, scans, watches, or reports files or directories.
|
|
35
35
|
- A change handles user-provided paths, repository-relative paths, real paths, symlinks, Windows reparse points or junctions, temporary files, generated output, backups, manifests, locks, caches, or latest pointers.
|
|
36
|
+
- Code materializes large or externally sourced trees such as Git checkouts, cloned repositories, project scaffolds, dependency trees, archive extractions, template installs, generated snapshots, or package artifacts.
|
|
36
37
|
- Behavior must work on Windows and POSIX path separators, drive roots, case differences, reserved names, maximum path lengths, executable extensions, line endings, permissions, or rename semantics.
|
|
37
38
|
- A test or final report claims a path is inside the project, symlink-safe, traversal-safe, race-safe, atomic, idempotent, cleanup-safe, or cross-platform.
|
|
38
39
|
|
|
@@ -49,6 +50,8 @@ Keep filesystem behavior safe across Windows and POSIX while preventing path tra
|
|
|
49
50
|
- Affected path inputs, output paths, base directory, trust boundary, and whether each path is user-controlled, template-controlled, generated, or repository-owned.
|
|
50
51
|
- Current filesystem helpers, path validation rules, symlink policy, case-sensitivity policy, write strategy, cleanup strategy, temporary-file strategy, permission strategy, and platform expectations.
|
|
51
52
|
- Expected behavior for missing paths, existing files, directories, symlinks, dangling symlinks, reparse points or junctions, path traversal, null bytes, Windows namespace prefixes, Windows reserved names, alternate data streams, trailing spaces or dots, collisions, long paths, large files, and permissions errors.
|
|
53
|
+
- Path-length, filename-length, collision, staging, promotion, and cleanup expectations for clone, checkout, scaffold, install, archive, and generated-tree flows, including the deepest known entry path when available.
|
|
54
|
+
- Failure classification expectations for filesystem and platform errors such as Windows path length, POSIX `ENAMETOOLONG`, reserved names, case collisions, Unicode aliases, file locks, permissions, quota, cross-device moves, missing executable bits, line endings, watcher limits, and descriptor limits.
|
|
52
55
|
- Whether atomicity requires best-effort rename, same-directory temporary files on the same volume, file fsync, parent directory fsync, Windows replacement behavior, or reader-safe latest pointers.
|
|
53
56
|
- Relevant command-intent entries for tests, docs, release, and mustflow validation.
|
|
54
57
|
|
|
@@ -69,6 +72,7 @@ Keep filesystem behavior safe across Windows and POSIX while preventing path tra
|
|
|
69
72
|
- Do not accept null bytes, Windows device names, namespace bypass prefixes, alternate data streams, or platform-invalid path segments as ordinary filenames.
|
|
70
73
|
- Do not recursively delete, overwrite, or copy broad directories unless the target is resolved, bounded, and intentionally owned by the task.
|
|
71
74
|
- Do not claim operating-system mitigations such as Windows RedirectionGuard unless the application actually enables and verifies the mitigation in the relevant process boundary.
|
|
75
|
+
- Do not change system-wide or user-wide settings such as Windows registry long-path flags, global Git config, Developer Mode, WSL mount metadata, Linux sysctl limits, Docker Desktop storage backends, antivirus exclusions, or shell profile files from this skill. Report the missing prerequisite or require an explicit configured setup command.
|
|
72
76
|
|
|
73
77
|
<!-- mustflow-section: procedure -->
|
|
74
78
|
## Procedure
|
|
@@ -77,26 +81,37 @@ Keep filesystem behavior safe across Windows and POSIX while preventing path tra
|
|
|
77
81
|
2. Reject impossible or dangerous path text early. Check null bytes, empty segments, absolute paths where relative paths are required, Windows device names such as `CON` or `NUL`, namespace prefixes such as `\\?\`, alternate data streams using colon segments, trailing dots or spaces when Windows compatibility matters, and platform-invalid characters before writing.
|
|
78
82
|
3. Establish the base boundary. Use normalized repository-relative paths for storage and real-path checks for filesystem safety when symlinks may be present.
|
|
79
83
|
4. Use Unicode normalization for validation only when detecting platform aliases such as superscript Windows device-name variants. Do not rewrite or persist normalized filenames unless the repository policy explicitly says so.
|
|
80
|
-
5.
|
|
81
|
-
6.
|
|
82
|
-
7.
|
|
83
|
-
8.
|
|
84
|
-
9.
|
|
85
|
-
10. Check
|
|
86
|
-
11.
|
|
87
|
-
12.
|
|
88
|
-
13.
|
|
89
|
-
14.
|
|
90
|
-
15.
|
|
91
|
-
16.
|
|
92
|
-
17.
|
|
93
|
-
18.
|
|
94
|
-
19.
|
|
84
|
+
5. For externally sourced trees, use a `preflight -> dangerous operation -> classifier -> safe cleanup` pipeline. Estimate the materialized path budget before writing, including destination root, project directory, generated subdirectories, deepest known repository or archive entry, Windows path-length behavior, POSIX path and component limits, byte limits, case collisions, reserved names, and safety headroom.
|
|
85
|
+
6. For Git clone and checkout materialization, prefer an app-owned staging directory and no-checkout or metadata-first flow when feasible. Inspect repository entries before checkout, check them against the final destination, then promote the result only after success. Do not delete a user-selected final destination when checkout fails.
|
|
86
|
+
7. For Windows Git checkout or clone materialization, prefer a per-invocation `core.longpaths=true` setting when product code invokes Git. Do not mutate global Git config from application code unless the user explicitly chose that setup action. Long-path support still depends on operating-system, Git, filesystem, and downstream tool behavior, so checkout failures must remain classifiable.
|
|
87
|
+
8. For symlink-heavy repositories on Windows, detect whether checkout produced real links or plain-text symlink stubs before running build logic. Report missing Developer Mode, `core.symlinks`, or native symlink support as an environment prerequisite; do not silently replace file symlinks with junctions or copies unless the repository contract explicitly supports that compatibility mode.
|
|
88
|
+
9. For POSIX, do not assume that forward slashes make paths safe. Check `ENAMETOOLONG`, byte-based per-component name limits, mount permissions, executable bits, case-sensitive import paths, symlink loops, file descriptor limits, watcher limits, quota, and cross-device rename behavior.
|
|
89
|
+
10. Check containment with path-aware logic. Prefer relative-path or resolved-path containment helpers over raw string prefixes, and include a path-separator boundary so partial path traversal cannot let sibling names masquerade as children.
|
|
90
|
+
11. Check case behavior explicitly. Windows and many macOS volumes preserve case but compare case-insensitively by default; POSIX commonly compares case-sensitively. State whether the code preserves spelling, rejects conflicting names, or relies on the host filesystem.
|
|
91
|
+
12. Check collisions before materializing Git trees, archives, generated files, uploaded names, or dependency trees. Include case-only collisions, Unicode normalization aliases, reserved Windows names with extensions, trailing dot or space aliases, duplicate archive entries, and byte-limit collisions from multibyte names.
|
|
92
|
+
13. Check symlink, reparse point, and junction behavior explicitly. Decide whether they are rejected, followed only within the root, or treated as ordinary path entries. Test dangling, outside-target, loop, text-stub, and junction-like cases when relevant.
|
|
93
|
+
14. Close time-of-check to time-of-use gaps where practical. Prefer opening or writing through safe helpers that reject symlinks at the final operation, then verify the opened target when the platform and helper support it.
|
|
94
|
+
15. Treat high-level path APIs as incomplete defenses when the runtime cannot expose descriptor-relative open, no-follow, or opened-file verification. Do not claim race-free behavior from resolve-then-open code alone.
|
|
95
|
+
16. Check traversal and root handling across platforms. Account for absolute paths, drive letters, UNC-like paths, mixed separators, empty paths, dot segments, reserved names, long paths, and case sensitivity where relevant.
|
|
96
|
+
17. Classify filesystem failures before generic network, auth, or unknown failures. Use stable categories such as `path_too_long`, `filename_too_long`, `byte_limit_exceeded`, `invalid_path`, `reserved_name`, `case_collision`, `unicode_collision`, `symlink_escape`, `permission_denied`, `file_locked`, `cross_device_move`, `disk_full_or_quota`, `executable_bit_missing`, `line_ending_mismatch`, `watcher_limit`, and `descriptor_limit`.
|
|
97
|
+
18. For writes, prefer same-directory temporary-file then rename or replace behavior when readers may observe the file. Keep the temporary file on the same volume, use unpredictable names, least-privilege creation permissions, and safe no-follow writes when the project already has that helper.
|
|
98
|
+
19. Treat atomic writes as platform-specific. POSIX rename semantics, Windows replacement behavior, cross-filesystem moves, network filesystems, fsync availability, and directory fsync support differ; report best-effort guarantees honestly.
|
|
99
|
+
20. When durable writes matter, include the full durability sequence where the platform supports it: write the temporary file, flush the file data, close it, rename or replace it, then flush the parent directory entry. If parent directory fsync is unavailable, downgrade the durability claim.
|
|
100
|
+
21. For copies and updates, close the check-then-write gap as much as the platform and existing helpers allow. Do not report symlink safety if the final write can still follow a changed symlink.
|
|
101
|
+
22. For privileged Windows services, check whether reparse-point traversal mitigations belong at process startup. If the code cannot enable or verify them, report the remaining junction risk instead of claiming system-level protection.
|
|
102
|
+
23. For host environment limitations such as long-path registry flags, Developer Mode, WSL metadata mounts, Linux inotify/sysctl limits, Docker Desktop volume backend, or antivirus locks, classify and report the environment prerequisite. Do not perform privileged host repair from ordinary file logic.
|
|
103
|
+
24. Distinguish disk and quota errors from watch or descriptor exhaustion. In a watcher or scanner path, `ENOSPC` may mean an inotify watch limit rather than a full disk, and `EMFILE` or similar failures may indicate a per-process or per-user file-descriptor limit.
|
|
104
|
+
25. For deletes and cleanup, verify the resolved absolute target is inside the intended generated or temporary directory and narrow the deletion scope. Preserve bounded diagnostic evidence before deleting partial clone, checkout, scaffold, install, extraction, or generated output. Cleanup may remove only app-owned staging or generated-state paths, never the user-selected destination that the operation was supposed to populate.
|
|
105
|
+
26. For scans, bound recursion, generated/vendor exclusions, file size, symlink traversal, reparse-point traversal, loop detection, and maximum path length or depth where relevant.
|
|
106
|
+
27. Keep path output stable for users and automation. Report repository-relative paths unless an absolute path is necessary for local diagnosis.
|
|
107
|
+
28. Add focused tests for the highest-risk path shapes and failure categories instead of broad platform speculation.
|
|
95
108
|
|
|
96
109
|
<!-- mustflow-section: postconditions -->
|
|
97
110
|
## Postconditions
|
|
98
111
|
|
|
99
112
|
- Path boundaries, invalid-name policy, case policy, symlink and reparse-point policy, write strategy, cleanup strategy, durability expectations, and platform assumptions are explicit.
|
|
113
|
+
- Clone, checkout, scaffold, install, extraction, and generated-tree flows have preflight, staging, promotion, path-length, byte-limit, symlink-stub, collision, diagnostic-preservation, cleanup, and failure-taxonomy policies.
|
|
114
|
+
- Host setting prerequisites are reported without unapproved registry, global config, WSL, sysctl, Docker Desktop, antivirus, or shell-profile mutation.
|
|
100
115
|
- Dangerous file operations are bounded to known repository-owned or generated locations.
|
|
101
116
|
- Atomicity and race-safety claims are scoped to what the current helpers and platform can actually guarantee.
|
|
102
117
|
- Any untested platform behavior is reported as remaining risk instead of claimed safe.
|
|
@@ -122,8 +137,10 @@ Use release checks when template files, package artifacts, or installed workflow
|
|
|
122
137
|
- If the platform cannot prove symlink-safe behavior, fail closed or document the exact remaining gap.
|
|
123
138
|
- If atomic replace, file fsync, parent directory fsync, no-follow open, or final-target verification is not available on the platform, downgrade the claim to best-effort and keep the write boundary narrow.
|
|
124
139
|
- If Unicode normalization, Windows namespace prefixes, alternate data streams, or reparse points could change the effective target, fail closed or report the exact unhandled path class.
|
|
140
|
+
- If clone, checkout, scaffold, install, extraction, or generated-tree materialization fails, classify filesystem and platform causes before reporting network, token, auth, dependency, or unknown causes.
|
|
141
|
+
- If a fix requires elevated host settings or global user configuration, stop at a clear prerequisite report unless an explicit configured command intent and user request authorize the setup.
|
|
125
142
|
- If a test depends on platform-specific symlink support or permissions, state the platform boundary and keep assertions narrow.
|
|
126
|
-
- If cleanup might remove user data, do not proceed without a tighter generated-state boundary.
|
|
143
|
+
- If cleanup might remove user data, do not proceed without a tighter app-owned staging or generated-state boundary.
|
|
127
144
|
|
|
128
145
|
<!-- mustflow-section: output-format -->
|
|
129
146
|
## Output Format
|
|
@@ -131,6 +148,8 @@ Use release checks when template files, package artifacts, or installed workflow
|
|
|
131
148
|
- Filesystem surface reviewed
|
|
132
149
|
- Path trust classes, invalid-name handling, case policy, and root boundary
|
|
133
150
|
- Null byte, reserved-name, Unicode normalization, namespace prefix, alternate data stream, symlink, reparse-point, traversal, race, atomic write, durability, permission, copy, delete, scan, and cleanup decisions
|
|
151
|
+
- Clone, checkout, scaffold, install, extraction, preflight, staging, promotion, path-length, collision, failure-taxonomy, and diagnostic-preservation decisions
|
|
152
|
+
- Host-setting prerequisites reported or deferred
|
|
134
153
|
- Windows/POSIX assumptions and skipped platform checks
|
|
135
154
|
- Tests or fixtures added or reused
|
|
136
155
|
- Command intents run
|
package/templates/default/locales/en/.mustflow/skills/file-path-cross-platform-change/SKILL.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
mustflow_doc: skill.file-path-cross-platform-change
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 4
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: file-path-cross-platform-change
|
|
9
|
-
description: Apply this skill when file path handling, cross-platform path behavior, path helpers, safe filesystem wrappers, temp or cache paths, atomic writes, locks, archive extraction, uploads, downloads, scanners, CLI/API/schema path contracts, snapshots, generated outputs, or package artifact paths are created, changed, reviewed, or reported.
|
|
9
|
+
description: Apply this skill when file path handling, cross-platform path behavior, path helpers, safe filesystem wrappers, clone or checkout destinations, scaffold roots, temp or cache paths, atomic writes, locks, archive extraction, uploads, downloads, scanners, CLI/API/schema path contracts, snapshots, generated outputs, or package artifact paths are created, changed, reviewed, or reported.
|
|
10
10
|
metadata:
|
|
11
11
|
mustflow_schema: "1"
|
|
12
12
|
mustflow_kind: procedure
|
|
@@ -35,7 +35,8 @@ Treat file paths as security boundaries and operating-system contracts, not as o
|
|
|
35
35
|
## Use When
|
|
36
36
|
|
|
37
37
|
- Code accepts, stores, serializes, validates, normalizes, joins, resolves, compares, scans, extracts, uploads, downloads, writes, deletes, locks, packages, or reports paths.
|
|
38
|
-
- Path behavior appears in CLI arguments, API request or response schemas, config files, snapshots, fixtures, generated output, package artifacts, logs, manifests, caches, temp directories, upload or download flows, archive extraction, or scanner output.
|
|
38
|
+
- Path behavior appears in CLI arguments, API request or response schemas, config files, snapshots, fixtures, generated output, package artifacts, logs, manifests, caches, temp directories, upload or download flows, archive extraction, repository clone or checkout destinations, project scaffolding, installer output, or scanner output.
|
|
39
|
+
- Code clones or checks out repositories, downloads and extracts templates, scaffolds projects, installs dependency trees, or cleans up partially materialized project folders after a filesystem or toolchain failure.
|
|
39
40
|
- A change claims path traversal safety, base-directory containment, symlink safety, junction or reparse-point safety, archive extraction safety, atomic write behavior, durable write behavior, lock ownership, cleanup safety, deterministic scanning, or Windows/macOS/Linux compatibility.
|
|
40
41
|
- A test or docs example includes paths that must behave consistently across Windows, macOS, Linux, CI, containers, archives, package artifacts, or user machines.
|
|
41
42
|
|
|
@@ -53,6 +54,7 @@ Treat file paths as security boundaries and operating-system contracts, not as o
|
|
|
53
54
|
- Every path input and output, including user input, CLI args, API fields, config fields, archive entries, generated files, temp files, cache paths, lock files, uploaded filenames, download filenames, scanner roots, package artifact paths, and logs.
|
|
54
55
|
- The path owner and trust class: user-controlled, repository-owned, generated, temp, cache, archive-contained, package artifact, external file, or unknown.
|
|
55
56
|
- The base directory or allowed root, expected relative/absolute policy, symlink and reparse-point policy, case-sensitivity policy, invalid-name policy, atomic-write policy, lock policy, archive extraction policy, scanner bounds, cleanup policy, and platform expectations.
|
|
57
|
+
- For clone, checkout, scaffold, extract, and install flows: requested source, destination root, final project directory, deepest expected entry when known, path-length budget, component-length budget, byte budget, preflight coverage, partial-output owner, staging directory owner, promotion policy, cleanup policy, and failure classification contract.
|
|
56
58
|
- Current path helpers, safe filesystem wrappers, temp/cache helpers, archive helpers, upload/download helpers, scanners, schema validators, snapshots, and tests.
|
|
57
59
|
- Relevant command-intent entries for build, tests, docs, release, and mustflow validation.
|
|
58
60
|
|
|
@@ -75,34 +77,45 @@ Treat file paths as security boundaries and operating-system contracts, not as o
|
|
|
75
77
|
<!-- mustflow-section: procedure -->
|
|
76
78
|
## Procedure
|
|
77
79
|
|
|
78
|
-
1. Build a path ledger. List every path field, argument, helper, schema, snapshot, generated output, package artifact, archive entry, upload/download filename, scanner root, temp/cache path, lock file, and cleanup target touched by the change.
|
|
80
|
+
1. Build a path ledger. List every path field, argument, helper, schema, snapshot, generated output, package artifact, archive entry, clone or checkout destination, scaffold output, installer output, upload/download filename, scanner root, temp/cache path, lock file, and cleanup target touched by the change.
|
|
79
81
|
2. Classify each path by trust and owner: trusted repository path, user input, generated state, template path, package artifact, temporary file, cache file, archive-contained path, external path, uploaded name, downloaded name, scanner root, or unknown.
|
|
80
82
|
3. Define the allowed root and representation. Decide whether the contract accepts relative paths, absolute paths, URLs, file URLs, archive entry names, package-relative paths, repository-relative paths, or display-only paths.
|
|
81
83
|
4. Reject dangerous path text before filesystem access: null bytes, empty names where not allowed, absolute paths where relative paths are required, dot segments where not allowed, Windows device names, drive-relative paths, UNC roots, namespace prefixes, alternate data streams, trailing dots or spaces, reserved characters, and mixed separator bypasses.
|
|
82
84
|
5. Treat Windows drive-relative paths such as `C:tmp.txt` as relative to a drive current directory, not as `C:\tmp.txt`.
|
|
83
85
|
6. Treat Windows reserved names as reserved even with extensions. Names such as `CON`, `PRN`, `AUX`, `NUL`, `COM1`, and `LPT1` must not become ordinary user filenames.
|
|
84
|
-
7.
|
|
85
|
-
8.
|
|
86
|
-
9.
|
|
87
|
-
10.
|
|
88
|
-
11.
|
|
89
|
-
12.
|
|
90
|
-
13. Do not
|
|
91
|
-
14.
|
|
92
|
-
15.
|
|
93
|
-
16.
|
|
94
|
-
17. For
|
|
95
|
-
18.
|
|
96
|
-
19. For
|
|
97
|
-
20. For
|
|
98
|
-
21.
|
|
99
|
-
22.
|
|
86
|
+
7. For clone, checkout, scaffold, extract, and install flows, use an explicit `preflight -> dangerous operation -> classifier -> safe cleanup` pipeline. Preflight must estimate the effective path budget before materializing files, including the destination root, project directory, generated path segments, archive or repository entry names when known, operating-system path limits, component-name limits, byte limits, and safety headroom.
|
|
87
|
+
8. For Git clone and checkout materialization, do not treat `clone` as one indivisible operation. When feasible, fetch repository metadata into an app-owned staging area without checkout, inspect the tree or manifest entries, check the final destination budget, Windows reserved names, byte limits, Unicode aliases, and case collisions, then perform checkout or promotion only after the destination is known to be safe.
|
|
88
|
+
9. Do not clone, extract, scaffold, or install directly into a user-selected final directory when the operation may partially materialize an externally sourced tree. Materialize into an owned staging directory, preserve diagnostics on failure, and promote or move into the final directory only after success.
|
|
89
|
+
10. On Windows Git checkout paths, do not assume the operating system long-path setting alone is enough. Product code that invokes Git should prefer per-invocation `core.longpaths=true` configuration when compatible, avoid mutating global Git config without explicit user intent, and still surface a path-specific error if checkout cannot create an entry.
|
|
90
|
+
11. Treat POSIX `ENAMETOOLONG`, component-length failures, case-only conflicts on case-sensitive filesystems, missing executable bits, watcher limits, descriptor limits, quota, and mount permission errors as platform failures, not generic application failures.
|
|
91
|
+
12. Count bytes where the platform counts bytes. A filename that looks short in characters can exceed component limits when it contains CJK, combining marks, emoji, or mixed normalization forms. Do not treat JavaScript string length, Python `len`, or UI character count as a filesystem byte-budget proof.
|
|
92
|
+
13. Do not silently hash, truncate, underscore-prefix, fullwidth-convert, or otherwise rename user, repository, archive, or generated filenames to dodge platform restrictions unless the product contract explicitly defines a reversible mapping, collision handling, display name, migration behavior, and user-facing explanation.
|
|
93
|
+
14. Treat macOS and Windows case-insensitive defaults as compatibility risks. Decide whether to reject case-only collisions, preserve spelling, normalize display only, or rely on the host filesystem.
|
|
94
|
+
15. Detect candidate collisions before writing when entries come from Git trees, archives, generators, uploads, or package artifacts. Include case collisions, Unicode normalization aliases, reserved names, trailing dot or space aliases, and duplicate archive entries.
|
|
95
|
+
16. Do not solve containment with string prefixes. Establish the base real path, resolve or canonicalize the candidate parent when possible, then use path-aware relative containment with a separator boundary.
|
|
96
|
+
17. For new files whose final path does not exist yet, canonicalize the existing parent directory and verify that parent remains inside the allowed root.
|
|
97
|
+
18. Recheck symlink, junction, reparse-point, and final-target behavior at the operation boundary where the runtime allows it. Do not claim race-free behavior from normalize-then-open code alone.
|
|
98
|
+
19. For uploads and downloads, separate displayed filename from storage key. Validate extension, size, content type, magic bytes when relevant, path separators, Unicode aliasing, reserved names, collision policy, overwrite policy, and tenant or user ownership.
|
|
99
|
+
20. For archive extraction, validate every entry before extraction. Reject absolute entries, parent traversal, empty names, platform-reserved names, symlink entries unless explicitly supported, hard links unless explicitly supported, duplicate or case-colliding entries, oversized entries, zip bombs, and extraction outside the target root.
|
|
100
|
+
21. Do not call extract-all behavior on untrusted archives unless the helper performs per-entry validation and bounded extraction.
|
|
101
|
+
22. Classify filesystem and platform errors before reporting a generic network, auth, dependency, or unknown failure. Use a stable taxonomy such as `path_too_long`, `filename_too_long`, `byte_limit_exceeded`, `invalid_path`, `reserved_name`, `case_collision`, `unicode_collision`, `symlink_escape`, `permission_denied`, `file_locked`, `cross_device_move`, `disk_full_or_quota`, `executable_bit_missing`, `line_ending_mismatch`, `watcher_limit`, and `descriptor_limit`.
|
|
102
|
+
23. Preserve bounded diagnostic evidence before cleaning up a failed clone, scaffold, extraction, install, or generated-output write. Cleanup may remove only an app-owned staging directory or owned partial output, never an ambiguous parent directory, an existing project directory, or a user-selected final folder.
|
|
103
|
+
24. For atomic writes, create the temporary file in the target directory on the same filesystem, use an unpredictable temp name, write, flush, close, replace or rename, and flush the parent directory when the platform and helper support it.
|
|
104
|
+
25. Scope atomicity claims. Cross-filesystem moves, network filesystems, Windows sharing violations, antivirus/indexer locks, and missing directory fsync support can downgrade a claim to best effort.
|
|
105
|
+
26. For Windows replace or rename failures caused by sharing violations, use bounded retry or report the platform limitation. Do not turn every transient lock into silent data loss.
|
|
106
|
+
27. For locks and mutexes, define owner token, stale lock policy, crash recovery, deletion race handling, PID reuse handling, and whether the lock works on local filesystems only. Do not treat a PID file alone as proof of ownership.
|
|
107
|
+
28. For scanners, set max depth, max file count, max file size, binary-file handling, ignored directories, hidden-file policy, permission-error behavior, symlink traversal policy, loop detection, deterministic ordering, and output path format.
|
|
108
|
+
29. For temp and cache paths, keep them under an owned root, avoid global temp rename into a target location, include cleanup bounds, and avoid leaking user data through predictable names.
|
|
109
|
+
30. For CLI, API, schema, snapshot, docs, and package artifact path changes, update every contract surface together. Path spelling, separators, slash policy, absolute/relative policy, escaping, sorting, and error messages are part of the contract.
|
|
110
|
+
31. Add focused tests for the riskiest path shapes: traversal, absolute input, drive-relative input, UNC-like input, reserved names, trailing dots or spaces, case collision, Unicode collision, long path, overlong filename, byte-limit overflow with multibyte names, symlink escape, archive traversal, duplicate archive entries, scanner loop, large file cap, clone checkout failure classification, and cleanup boundary.
|
|
111
|
+
32. Select verification from the command contract based on risk. Public CLI/API/schema/package artifact changes need broader checks than internal helper-only changes.
|
|
100
112
|
|
|
101
113
|
<!-- mustflow-section: postconditions -->
|
|
102
114
|
## Postconditions
|
|
103
115
|
|
|
104
116
|
- Path trust classes, accepted path representation, invalid-name policy, case policy, root boundary, symlink and reparse-point policy, archive policy, upload/download policy, scanner policy, atomic-write policy, lock policy, temp/cache policy, and cleanup policy are explicit.
|
|
105
117
|
- Path contracts are synchronized across helpers, schemas, CLI/API docs, snapshots, fixtures, generated outputs, package artifacts, tests, and reports.
|
|
118
|
+
- Clone, checkout, scaffold, extract, and install flows have explicit preflight, staging, promotion, path-length, collision, platform-failure classification, diagnostic-preservation, and cleanup policies.
|
|
106
119
|
- Any race-safety, atomicity, durability, lock, or cross-platform claim is scoped to what the current runtime and helpers can actually guarantee.
|
|
107
120
|
- Platform behavior that was not tested is reported as remaining risk.
|
|
108
121
|
|
|
@@ -129,6 +142,7 @@ Prefer focused tests for helper-only path changes. Use release or package checks
|
|
|
129
142
|
- If root containment is unclear, stop before writing, deleting, extracting, scanning, or opening and report the ambiguous path owner.
|
|
130
143
|
- If the platform cannot prove symlink-safe behavior, fail closed or report the exact remaining gap.
|
|
131
144
|
- If archive entries cannot be validated before extraction, do not extract the archive.
|
|
145
|
+
- If clone, checkout, scaffold, extraction, or install fails mid-materialization, classify filesystem and platform causes before network or auth causes, preserve bounded diagnostics, and cleanup only the owned staging directory or owned partial output.
|
|
132
146
|
- If atomic replace, file fsync, parent directory fsync, no-follow open, lock ownership, or final-target verification is unavailable, downgrade the claim and keep the operation bounded.
|
|
133
147
|
- If Windows, macOS, Linux, container, CI, or network-filesystem behavior differs and cannot be tested, state the untested platform boundary.
|
|
134
148
|
- If cleanup might remove user data or files outside generated state, do not proceed without a tighter owned root.
|
|
@@ -139,7 +153,8 @@ Prefer focused tests for helper-only path changes. Use release or package checks
|
|
|
139
153
|
- Path contract changed
|
|
140
154
|
- Path ledger and trust classes
|
|
141
155
|
- Accepted representation and base-root policy
|
|
142
|
-
- Windows, macOS, Linux, archive, upload/download, scanner, lock, temp/cache, atomic-write, and cleanup decisions
|
|
156
|
+
- Windows, macOS, Linux, byte-limit, Unicode, archive, upload/download, scanner, lock, temp/cache, atomic-write, and cleanup decisions
|
|
157
|
+
- Clone, checkout, scaffold, extract, install, preflight, staging, promotion, failure-taxonomy, diagnostic-preservation, and safe-cleanup decisions
|
|
143
158
|
- CLI/API/schema/snapshot/generated-output/package artifact surfaces synchronized
|
|
144
159
|
- Tests or fixtures added or reused
|
|
145
160
|
- Command intents run
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
mustflow_doc: skill.line-ending-hygiene
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 2
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: line-ending-hygiene
|
|
9
|
-
description: Apply this skill when Git reports CRLF/LF warnings or
|
|
9
|
+
description: Apply this skill when Git reports CRLF/LF warnings, Docker or shell scripts fail with CRLF interpreter errors, or tracked text files may need repository line-ending policy or normalization review.
|
|
10
10
|
metadata:
|
|
11
11
|
mustflow_schema: "1"
|
|
12
12
|
mustflow_kind: procedure
|
|
@@ -30,6 +30,8 @@ Detect line-ending drift without silently rewriting a repository, and normalize
|
|
|
30
30
|
|
|
31
31
|
- Git reports CRLF, LF, or line-ending replacement warnings.
|
|
32
32
|
- A diff or formatter appears to rewrite files only because of line endings.
|
|
33
|
+
- Docker, Linux, WSL, CI, or shell execution fails with `bad interpreter`, `bash\r`, `env: ...\r`, `exec format error`, or similar CRLF-related symptoms.
|
|
34
|
+
- A proposal suggests creating `.gitattributes`, running renormalization, or rewriting tracked files to fix cross-platform line endings.
|
|
33
35
|
- A user asks why line-ending warnings appear.
|
|
34
36
|
- A user asks to normalize tracked files to the repository line-ending policy.
|
|
35
37
|
|
|
@@ -46,6 +48,7 @@ Detect line-ending drift without silently rewriting a repository, and normalize
|
|
|
46
48
|
- The warning text or changed-file evidence.
|
|
47
49
|
- Current `.gitattributes` or equivalent repository line-ending policy.
|
|
48
50
|
- Current changed-file status.
|
|
51
|
+
- Whether the request is diagnosis-only, policy authoring, or explicit tracked-file normalization.
|
|
49
52
|
- The configured command intents for line-ending checks and manual normalization.
|
|
50
53
|
|
|
51
54
|
<!-- mustflow-section: preconditions -->
|
|
@@ -62,6 +65,7 @@ Detect line-ending drift without silently rewriting a repository, and normalize
|
|
|
62
65
|
- Normalize tracked text files only when the user explicitly requests normalization and the repository declares an LF policy.
|
|
63
66
|
- Do not rewrite binary files, generated archives, dependency folders, or unrelated source files.
|
|
64
67
|
- Do not change formatting, indentation, or content while handling line endings.
|
|
68
|
+
- Do not create `.gitattributes`, run repository-wide renormalization, or commit line-ending changes as an automatic fallback from a build, Docker, clone, scaffold, or script failure.
|
|
65
69
|
|
|
66
70
|
<!-- mustflow-section: procedure -->
|
|
67
71
|
## Procedure
|
|
@@ -69,15 +73,18 @@ Detect line-ending drift without silently rewriting a repository, and normalize
|
|
|
69
73
|
1. Inspect the changed-file status before deciding whether line endings are the actual issue.
|
|
70
74
|
2. Use the `line_endings_check` intent when it is configured and agent-runnable.
|
|
71
75
|
3. If no LF policy is declared, report the missing policy instead of normalizing files.
|
|
72
|
-
4. If
|
|
73
|
-
5.
|
|
74
|
-
6.
|
|
75
|
-
7.
|
|
76
|
+
4. If a runtime error mentions CRLF symptoms, classify it as a line-ending/platform issue before treating it as a missing executable, missing dependency, Docker image problem, or shell bug.
|
|
77
|
+
5. If drift is found, report the affected tracked files and whether normalization was only previewed.
|
|
78
|
+
6. If a policy file needs to be created or changed, keep that as an explicit policy change with reviewable scope. Do not smuggle a new repository-wide policy into an unrelated bug fix.
|
|
79
|
+
7. Use normalization only after an explicit user request, and treat `line_endings_normalize` as manual-only unless the repository declares otherwise.
|
|
80
|
+
8. After any normalization, re-run the line-ending check and a relevant validation intent for the touched scope.
|
|
81
|
+
9. Keep the final report focused on policy, files changed, checks run, and remaining risk.
|
|
76
82
|
|
|
77
83
|
<!-- mustflow-section: postconditions -->
|
|
78
84
|
## Postconditions
|
|
79
85
|
|
|
80
86
|
- The agent has not silently rewritten the working tree.
|
|
87
|
+
- The agent has not silently created or changed a repository-wide line-ending policy.
|
|
81
88
|
- Any normalization is tied to a declared repository policy.
|
|
82
89
|
- Remaining CRLF, mixed line endings, missing policy, or manual-only command gaps are reported.
|
|
83
90
|
|
|
@@ -99,11 +106,13 @@ If normalization touched code, documentation, templates, or release surfaces, al
|
|
|
99
106
|
- If a line-ending check fails because drift exists, do not treat it as a tool failure; report the affected files and next safe action.
|
|
100
107
|
- If normalization fails, stop after the first relevant error and do not attempt broader formatting.
|
|
101
108
|
- If the repository policy conflicts with user intent, ask for an explicit policy decision before editing.
|
|
109
|
+
- If a fix would require repository-wide policy authoring or tracked-file renormalization, report the prerequisite unless the user explicitly requested that scope.
|
|
102
110
|
|
|
103
111
|
<!-- mustflow-section: output-format -->
|
|
104
112
|
## Output Format
|
|
105
113
|
|
|
106
114
|
- Line-ending policy found
|
|
115
|
+
- Policy changes made or deferred
|
|
107
116
|
- Files with CRLF or mixed line endings
|
|
108
117
|
- Files normalized
|
|
109
118
|
- Command intents run
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
mustflow_doc: skill.process-execution-safety
|
|
3
3
|
locale: en
|
|
4
4
|
canonical: true
|
|
5
|
-
revision:
|
|
5
|
+
revision: 4
|
|
6
6
|
lifecycle: mustflow-owned
|
|
7
7
|
authority: procedure
|
|
8
8
|
name: process-execution-safety
|
|
9
|
-
description: Apply this skill when spawning, wrapping, previewing, timing out, terminating, buffering, streaming, or reporting child processes, built-in command reruns, shell commands, argv commands, environment variables, output limits, process trees, or long-running command patterns.
|
|
9
|
+
description: Apply this skill when spawning, wrapping, previewing, timing out, terminating, buffering, streaming, classifying, or reporting child processes, built-in command reruns, shell commands, argv commands, environment variables, output limits, process trees, Git or package-manager failures, or long-running command patterns.
|
|
10
10
|
metadata:
|
|
11
11
|
mustflow_schema: "1"
|
|
12
12
|
mustflow_kind: procedure
|
|
@@ -32,6 +32,7 @@ Ensure process execution obeys declared command contracts, terminates reliably,
|
|
|
32
32
|
|
|
33
33
|
- Code spawns, wraps, previews, streams, buffers, times out, kills, reruns, or reports a child process or in-process built-in command.
|
|
34
34
|
- A command path handles shell mode, argv mode, process groups, Windows task termination, POSIX signals, output limits, stdin, environment variables, or working directories.
|
|
35
|
+
- Code invokes Git clone or checkout, package managers, project scaffolders, archive tools, build tools, test runners, Docker wrappers, or installers whose failures can be misclassified as network, token, auth, dependency, or unknown errors.
|
|
35
36
|
- Long-running, background, watcher, server, browser, daemon, shell wrapper, package-manager, or project-local executable patterns are allowed, blocked, or classified.
|
|
36
37
|
- Receipts, logs, verification, write tracking, or final reports depend on whether a command actually finished.
|
|
37
38
|
|
|
@@ -46,8 +47,10 @@ Ensure process execution obeys declared command contracts, terminates reliably,
|
|
|
46
47
|
## Required Inputs
|
|
47
48
|
|
|
48
49
|
- The execution path: shell, argv, built-in rerun, preview, dry run, JSON mode, streaming mode, or configured command intent.
|
|
49
|
-
- Timeout, grace period, force-kill behavior, output limit, stdin policy, environment policy, working directory, process tree behavior, and receipt or write-tracking expectations.
|
|
50
|
+
- Timeout, grace period, force-kill behavior, output limit, stdin policy, argv and shell command-length budget, environment policy, working directory, process tree behavior, and receipt or write-tracking expectations.
|
|
50
51
|
- Platform boundary for Windows and POSIX process termination.
|
|
52
|
+
- Failure classification rules for child-process output and exit causes, including filesystem/path, permission/lock, resource exhaustion, shell/environment, missing executable, network, token, auth, dependency, timeout, output overflow, and unknown categories.
|
|
53
|
+
- For Git and scaffolding flows: clone or checkout destination, path-length policy, per-process Git config policy, partial-output owner, cleanup timing, and diagnostic-preservation expectations.
|
|
51
54
|
- Existing tests for timeout, output overflow, environment redaction, local executable avoidance, command eligibility, and receipt status.
|
|
52
55
|
- Relevant command-intent entries for related tests, release checks, and mustflow validation.
|
|
53
56
|
|
|
@@ -65,25 +68,40 @@ Ensure process execution obeys declared command contracts, terminates reliably,
|
|
|
65
68
|
- Prefer one execution path for JSON and human modes when output format alone should differ.
|
|
66
69
|
- Do not bypass timeouts, output limits, working-directory checks, environment policy, or receipt generation for convenience.
|
|
67
70
|
- Do not run unconfigured servers, watchers, background tasks, or interactive commands.
|
|
71
|
+
- Do not use child-process code to apply privileged host repairs such as registry edits, global Git config, Developer Mode changes, WSL shutdown or mount edits, sysctl writes, Docker Desktop setting changes, antivirus exclusions, shell profile edits, or automatic commits unless an explicit configured command intent and user request authorize that setup operation.
|
|
68
72
|
|
|
69
73
|
<!-- mustflow-section: procedure -->
|
|
70
74
|
## Procedure
|
|
71
75
|
|
|
72
76
|
1. Map the execution path from command contract to child process, output handling, receipt writing, write tracking, and final status.
|
|
73
77
|
2. Confirm that shell and argv modes enforce the same safety boundary where they represent the same command intent.
|
|
74
|
-
3.
|
|
75
|
-
4.
|
|
76
|
-
5.
|
|
77
|
-
6.
|
|
78
|
-
7. Check
|
|
79
|
-
8. Check
|
|
80
|
-
9. Check
|
|
81
|
-
10.
|
|
78
|
+
3. Prefer argv execution over shell-string execution for dynamic commands. Do not build `exec("long command string")` or shell wrappers from repository paths, file lists, prompts, JSON, or user input when the tool can accept a file plus args, stdin, or an owned temporary parameter file.
|
|
79
|
+
4. Keep large payloads out of argv and shell strings. Pass large JSON, file lists, AI prompts, generated context, and batch parameters through stdin or an owned temporary file with bounded lifetime, ownership, redaction, and cleanup policy.
|
|
80
|
+
5. Classify command-length failures separately. Windows process creation, `cmd.exe`, POSIX `ARG_MAX`, shells, package managers, and wrapper scripts can fail at different limits; map these to `argv_too_long` or `shell_command_too_long` before retrying or reporting an unknown tool failure.
|
|
81
|
+
6. In Node.js path handling around process execution, use explicit `path.win32` or `path.posix` behavior when parsing a path format that may differ from the host OS. Do not assume host-default `node:path` behavior proves cross-platform command construction.
|
|
82
|
+
7. Check timeout semantics. A timeout should initiate termination, wait through the declared grace behavior when possible, attempt force termination when needed, and record whether cleanup was confirmed or still uncertain.
|
|
83
|
+
8. Check output limit semantics. Output overflow should be distinct from process start failure, apply consistently across output modes, preserve bounded tails, and avoid unbounded memory growth.
|
|
84
|
+
9. Check process-tree cleanup. On POSIX, account for process groups and signals. On Windows, account for task termination behavior and the fact that process-group semantics differ.
|
|
85
|
+
10. Check in-process shortcuts. Built-in commands should not bypass timeout, output, environment, working-directory, or receipt policy unless the command contract explicitly accepts the weaker boundary.
|
|
86
|
+
11. Check environment exposure. Minimal or allowlisted environments should be the default for agent-runnable commands, with redaction only as a logging safeguard, not as execution isolation.
|
|
87
|
+
12. Check command eligibility before execution. Long-running and shell-wrapper patterns should be blocked or made manual-only before relying on timeout as the only defense.
|
|
88
|
+
13. For Git clone or checkout on Windows, prefer argv mode with a per-process `core.longpaths=true` configuration when compatible. Do not mutate global Git config from product code unless the user explicitly selected that setup action.
|
|
89
|
+
14. For Git, package-manager, and scaffolder materialization, coordinate with filesystem safety: preflight entries when feasible, run the dangerous operation only against an app-owned staging area, classify failure before cleanup, then delete only owned partial output.
|
|
90
|
+
15. Classify child-process failures before retrying or reporting them. Separate filesystem/path, permission/lock, resource exhaustion, shell/environment, missing executable, network, token, auth, dependency, timeout, output overflow, argv length, shell command length, and unknown causes.
|
|
91
|
+
16. Do not classify a Git checkout path failure as network, token, or auth merely because the top-level operation was clone. Output such as filename-too-long, invalid path, reserved name, permission denied, file locked, no space left, too many open files, watcher limit, bad interpreter, missing executable bit, argv-too-long, or shell-command-too-long should map to platform, filesystem, resource, or shell categories first.
|
|
92
|
+
17. Preserve bounded stdout/stderr tails, exit status, signal, timeout status, cwd, argv summary, and cleanup status before deleting partial output from clone, checkout, scaffold, install, or archive-tool failures.
|
|
93
|
+
18. Keep retry policy cause-aware. Retry transient locks or recoverable process cleanup only when bounded and idempotent; do not blindly retry auth, token, path-too-long, reserved-name, or destructive cleanup failures.
|
|
94
|
+
19. Treat environment repair as a separate setup workflow, not as an invisible fallback inside clone, install, build, or test execution. Report missing host prerequisites and the blocked action rather than silently running privileged or global mutation commands.
|
|
95
|
+
20. Check write tracking and receipts. Do not finalize a receipt or write-drift snapshot as complete while a child process may still be writing, unless the receipt states cleanup is unconfirmed.
|
|
96
|
+
21. Add focused tests for timeout, output limit, environment, built-in rerun, local executable avoidance, failure classification, diagnostic preservation, partial-output cleanup, blocked host-repair fallback, and platform-neutral status semantics as justified by the change.
|
|
82
97
|
|
|
83
98
|
<!-- mustflow-section: postconditions -->
|
|
84
99
|
## Postconditions
|
|
85
100
|
|
|
86
101
|
- Execution status, timeout status, output status, cleanup status, receipt status, and write tracking tell the same story.
|
|
102
|
+
- Child-process failures have cause-aware categories that separate filesystem/path, permission/lock, resource exhaustion, shell/environment, network, token, auth, dependency, timeout, output overflow, argv length, shell command length, and unknown causes.
|
|
103
|
+
- Partial clone, checkout, scaffold, install, or archive outputs are cleaned up only after bounded diagnostics and app-owned staging or generated-state ownership are known.
|
|
104
|
+
- Host repair commands are either modeled as explicit configured setup intents or reported as prerequisites, not hidden inside ordinary command execution.
|
|
87
105
|
- JSON and human modes differ only in presentation unless a documented contract says otherwise.
|
|
88
106
|
- Any unconfirmed cleanup or platform limitation is explicit in the report.
|
|
89
107
|
|
|
@@ -104,6 +122,8 @@ Escalate to broader configured tests when execution behavior crosses many comman
|
|
|
104
122
|
## Failure Handling
|
|
105
123
|
|
|
106
124
|
- If a timed-out or output-limited process cannot be confirmed terminated, record the uncertainty and do not claim full cleanup.
|
|
125
|
+
- If a child process fails after creating files, preserve bounded diagnostics and classify path/platform causes before deleting owned partial output or reporting a network, token, auth, dependency, or unknown failure.
|
|
126
|
+
- If recovery would require privileged or global host mutation, stop and report the prerequisite instead of running the mutation as a fallback.
|
|
107
127
|
- If environment isolation cannot be applied to a path, fail closed or route through a spawned process that can honor the contract.
|
|
108
128
|
- If a platform-specific termination test is not available, report the skipped platform check and cover the shared status contract.
|
|
109
129
|
- If a process safety fix conflicts with convenience or performance, preserve safety and report the tradeoff.
|
|
@@ -115,6 +135,8 @@ Escalate to broader configured tests when execution behavior crosses many comman
|
|
|
115
135
|
- Timeout, force-kill, output-limit, environment, stdin, cwd, and process-tree boundaries
|
|
116
136
|
- Receipt, write-tracking, and cleanup-confirmation behavior
|
|
117
137
|
- Shell, argv, JSON, streaming, and built-in path consistency
|
|
138
|
+
- Failure classification, retry policy, argv and shell length handling, diagnostic preservation, and partial-output cleanup behavior
|
|
139
|
+
- Host repair prerequisites reported or deferred
|
|
118
140
|
- Tests or fixtures added or reused
|
|
119
141
|
- Command intents run
|
|
120
142
|
- Remaining process execution risk
|