mustflow 2.115.5 → 2.115.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/templates/default/i18n.toml +57 -21
  3. package/templates/default/locales/en/.mustflow/docs/agent-workflow.md +13 -1
  4. package/templates/default/locales/en/.mustflow/skills/INDEX.md +16 -7
  5. package/templates/default/locales/en/.mustflow/skills/ada-code-change/SKILL.md +293 -0
  6. package/templates/default/locales/en/.mustflow/skills/astro-code-change/SKILL.md +10 -2
  7. package/templates/default/locales/en/.mustflow/skills/completion-evidence-gate/SKILL.md +14 -1
  8. package/templates/default/locales/en/.mustflow/skills/core-web-vitals-field-review/SKILL.md +2 -2
  9. package/templates/default/locales/en/.mustflow/skills/deno-code-change/SKILL.md +291 -0
  10. package/templates/default/locales/en/.mustflow/skills/dependency-upgrade-review/SKILL.md +12 -6
  11. package/templates/default/locales/en/.mustflow/skills/elysia-code-change/SKILL.md +3 -3
  12. package/templates/default/locales/en/.mustflow/skills/hono-code-change/SKILL.md +2 -2
  13. package/templates/default/locales/en/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +23 -12
  14. package/templates/default/locales/en/.mustflow/skills/nestjs-code-change/SKILL.md +5 -7
  15. package/templates/default/locales/en/.mustflow/skills/node-code-change/SKILL.md +2 -2
  16. package/templates/default/locales/en/.mustflow/skills/pascal-code-change/SKILL.md +301 -0
  17. package/templates/default/locales/en/.mustflow/skills/performance-measurement-integrity-review/SKILL.md +324 -0
  18. package/templates/default/locales/en/.mustflow/skills/php-code-change/SKILL.md +327 -0
  19. package/templates/default/locales/en/.mustflow/skills/python-code-change/SKILL.md +11 -7
  20. package/templates/default/locales/en/.mustflow/skills/routes.toml +36 -0
  21. package/templates/default/locales/en/.mustflow/skills/skill-authoring/SKILL.md +35 -9
  22. package/templates/default/locales/en/.mustflow/skills/skill-refresh/SKILL.md +10 -1
  23. package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +13 -6
  24. package/templates/default/locales/en/.mustflow/skills/svelte-code-change/SKILL.md +16 -5
  25. package/templates/default/locales/en/.mustflow/skills/tauri-code-change/SKILL.md +3 -2
  26. package/templates/default/locales/en/.mustflow/skills/threejs-code-change/SKILL.md +207 -0
  27. package/templates/default/locales/en/.mustflow/skills/typescript-code-change/SKILL.md +23 -16
  28. package/templates/default/locales/en/.mustflow/skills/version-freshness-check/SKILL.md +12 -6
  29. package/templates/default/locales/en/AGENTS.md +8 -1
  30. package/templates/default/manifest.toml +43 -1
@@ -0,0 +1,327 @@
1
+ ---
2
+ mustflow_doc: skill.php-code-change
3
+ locale: en
4
+ canonical: true
5
+ revision: 2
6
+ lifecycle: mustflow-owned
7
+ authority: procedure
8
+ name: php-code-change
9
+ description: Apply this skill when PHP source, Composer packages, Laravel or Symfony applications, Eloquent or Doctrine persistence, PHP-FPM, OPcache, Octane, RoadRunner, Swoole, Messenger or queue workers, authentication, sessions, uploads, database concurrency, tests, or PHP deployment behavior are created, changed, reviewed, migrated, or upgraded.
10
+ metadata:
11
+ mustflow_schema: "1"
12
+ mustflow_kind: procedure
13
+ pack_id: mustflow.core
14
+ skill_id: mustflow.core.php-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
+ # PHP Code Change
28
+
29
+ <!-- mustflow-section: purpose -->
30
+ ## Purpose
31
+
32
+ Preserve PHP language, Composer, dependency injection, request lifetime, ORM, transaction, input,
33
+ authentication, session, filesystem, worker, FPM, OPcache, container, and deployment contracts.
34
+ Do not let PHP-FPM's request reset hide stateful design that leaks users or resources under Octane,
35
+ RoadRunner, Swoole, Messenger, queue workers, persistent connections, or other long-lived processes.
36
+
37
+ <!-- mustflow-section: use-when -->
38
+ ## Use When
39
+
40
+ - PHP source, Composer metadata or lockfiles, autoloading, extensions, static analysis, tests,
41
+ framework bootstrap, console commands, queues, scheduled jobs, or package APIs change.
42
+ - Laravel, Symfony, Eloquent, Doctrine, service containers, middleware, events, cache, sessions,
43
+ authentication, authorization, uploads, validation, serialization, or database behavior changes.
44
+ - PHP-FPM pools, OPcache, web-server/FastCGI integration, containers, health probes, timeouts,
45
+ long-running workers, deployment caches, migrations, or rollout behavior changes.
46
+
47
+ <!-- mustflow-section: do-not-use-when -->
48
+ ## Do Not Use When
49
+
50
+ - The change is framework-free frontend code or another language with no PHP runtime boundary.
51
+ - Only SQL schema or database operations change and PHP behavior is unaffected; use the narrower
52
+ data or migration skill.
53
+ - The task asks only for the current PHP, Laravel, Symfony, or Doctrine version; use
54
+ source-freshness guidance unless code or durable documentation changes too.
55
+
56
+ <!-- mustflow-section: required-inputs -->
57
+ ## Required Inputs
58
+
59
+ - PHP version source, supported runtime range, required extensions, Composer metadata and lockfile,
60
+ autoload rules, framework and ORM versions, static-analysis level, test config, CI and image.
61
+ - Execution model: PHP-FPM, CLI, server, Octane, RoadRunner, Swoole, queue worker, Messenger,
62
+ scheduled job, persistent process, or mixed deployment.
63
+ - Request and state ledger: container scope, request/user/tenant state, globals, statics, singleton
64
+ fields, ORM unit of work, sessions, caches, connections, files, timers, buffers, and reset owners.
65
+ - Security ledger: input sources, validation, output context, SQL, commands, paths, uploads,
66
+ deserialization, secrets, passwords, authentication, CSRF, session lifetime, and proxy trust.
67
+ - Data ledger: query count, rows and bytes, hydration, lazy loading, transaction owner, connection,
68
+ locks, unique constraints, optimistic versions, retries, outbox, pagination, and batch ownership.
69
+ - Runtime ledger: FPM mode and limits, OPcache policy, timeouts, web server, probes, container
70
+ resources, deployment cache generation, worker reload, observability, and rollback.
71
+
72
+ <!-- mustflow-section: preconditions -->
73
+ ## Preconditions
74
+
75
+ - Read repository PHP, Composer, framework, ORM, extension, deployment, and test evidence before
76
+ using current APIs or migration guidance.
77
+ - Refresh official PHP, Composer, Laravel, Symfony, Doctrine, web-server, database, and platform
78
+ sources before preserving exact version, default, deprecation, security, or support claims.
79
+ - Treat version research as a dated snapshot. The official-source snapshot reviewed on 2026-07-11
80
+ identified PHP 8.5.8 as stable and PHP 8.6.0 Alpha 1 as prerelease; recheck the current stable,
81
+ supported branches, migration guides, and each feature's actual release status before reuse.
82
+ - Identify whether process state ends after one request. Treat every service as potentially reused
83
+ until the selected runtime proves request-scoped destruction.
84
+ - Apply narrower auth, upload, transaction, cache, queue, logging, performance, or deployment skills
85
+ when those boundaries materially change.
86
+
87
+ <!-- mustflow-section: allowed-edits -->
88
+ ## Allowed Edits
89
+
90
+ - Make focused PHP, Composer, framework, ORM, config, test, deployment, and docs changes required by
91
+ the task.
92
+ - Add explicit DTOs, query objects, reset hooks, transaction owners, validation, session controls,
93
+ performance instrumentation, or deployment checks where they protect changed behavior.
94
+ - Preserve supported PHP versions and framework conventions unless migration is explicit.
95
+ - Do not hide failures by lowering static analysis, disabling tests, granting broad filesystem
96
+ permissions, enabling unsafe deserialization, widening session scope, or raising resource limits
97
+ without evidence.
98
+
99
+ <!-- mustflow-section: procedure -->
100
+ ## Procedure
101
+
102
+ 1. **Classify runtime and package contracts.**
103
+ - Record PHP SAPI, version, extensions, Composer platform requirements, autoload roots, scripts,
104
+ plugins, package type, framework, ORM, worker model, image, and deployment target.
105
+ - Treat Composer scripts and plugins as executable supply-chain boundaries. Review lockfile,
106
+ platform checks, extension requirements, optimized autoload, authoritative classmaps, and
107
+ packaged files separately from source-tree success.
108
+ - Keep library dependency ranges compatible and application environments reproducible. Commit
109
+ application lockfiles, use `composer install` in CI and deployment, and validate the lock
110
+ rather than resolving a fresh graph during release.
111
+ - Treat repository priority, canonical repositories, package names, `replace`, `provide`,
112
+ `conflict`, stability flags, Composer plugins, and `autoload.files` as supply-chain behavior.
113
+ Do not assume a dependency's `repositories` configuration propagates to the root project.
114
+ - Use `composer why` and `why-not` before widening constraints or deleting a lockfile. Verify the
115
+ built artifact with real platform requirements; `config.platform` and
116
+ `--ignore-platform-reqs` do not prove that production has the required PHP or extensions.
117
+ - Enforce PSR-4 path and case correctness on a case-sensitive CI filesystem and detect ambiguous
118
+ classes. Optimize production autoloading, but use authoritative classmaps only after proving
119
+ that runtime-generated proxies or classes do not depend on fallback discovery.
120
+ 2. **Keep dependencies and state ownership visible.**
121
+ - Confine container access and service location to composition roots. Prefer constructor
122
+ injection of narrow contracts over global helpers, facades, or arbitrary container lookup.
123
+ - Add layers only where policy, representation, transaction, authorization, or replacement
124
+ changes. Remove pass-through controller, action, service, manager, and generic repository
125
+ chains that hide cost without owning a boundary.
126
+ - Keep request, user, tenant, locale, auth, and transaction state out of singleton and static
127
+ fields. Pass request values explicitly or use a resettable request-scoped owner.
128
+ - For long-lived runtimes, reset application state, ORM units of work, log buffers, caches,
129
+ files, connections, and framework services between jobs or requests. Bound worker lifetime and
130
+ reload workers during deployment.
131
+ 3. **Separate ORM entities from external contracts.**
132
+ - Do not use Eloquent models or Doctrine entities as universal API, queue, event, cache, or
133
+ integration payloads. Define whether a queued job needs an identifier and execution-time state
134
+ or an immutable publication-time snapshot.
135
+ - Keep business invariants in explicit application or domain operations. Do not hide critical
136
+ payments, stock, authorization, or external effects in model listeners whose execution differs
137
+ across bulk update, delete, flush, or import paths.
138
+ - Use transactional outbox and idempotent consumers for external side effects.
139
+ 4. **Measure query shape, not only query count.**
140
+ - Detect N+1 by request-level query count, normalized fingerprints, total DB time, rows, bytes,
141
+ and result-size scaling. Make unexpected lazy loading fail in development or tests.
142
+ - Do not replace N+1 with an unbounded eager-loaded graph or multi-collection join explosion.
143
+ Page parent identifiers first and batch child, aggregate, or projection queries deliberately.
144
+ - Use entities for behavior-changing writes. Use DTO, scalar, array, DBAL, or query-builder
145
+ projections for lists, reports, exports, counts, and read-only views.
146
+ - Use bounded iteration, keyset or cursor pagination, stable unique tie-breakers, and unit-of-work
147
+ clearing for large datasets. Avoid deep OFFSET and per-request exact counts without product need.
148
+ - Avoid `fetchAll()` and full ORM hydration for large streams. Select only required columns,
149
+ choose an explicit fetch mode, and account for driver buffering, identity maps, and connection
150
+ restrictions while an unbuffered result remains open.
151
+ 5. **Own transactions and concurrency at the use case.**
152
+ - Let one business operation own begin, commit, rollback, retry, and the shared connection.
153
+ Nested work cannot commit independently; use explicit savepoints only when supported and intended.
154
+ - Keep HTTP, email, queue publication, and long computation outside row-locking transactions.
155
+ Store business data and outbox records atomically, then publish after commit.
156
+ - Enforce uniqueness and invariants with database constraints and atomic updates or upserts.
157
+ Treat check-then-insert and read-compute-write as races.
158
+ - Verify affected rows, optimistic versions, lock scope, index support, and deterministic lock
159
+ order. Retry the whole transaction on classified deadlock or serialization failure with a
160
+ bounded backoff; never repeat only the final statement with stale reads.
161
+ - Persistent PDO connections require explicit cleanup of transactions, locks, temporary state,
162
+ and session settings before reuse.
163
+ 6. **Validate input by meaning and encode output by context.**
164
+ - Avoid loose comparison for authentication, tokens, signatures, hashes, identifiers, and
165
+ security decisions. Use strict types and constant-time comparison where secret equality matters.
166
+ - Distinguish filtering from validation. Normalize only according to a named domain rule and
167
+ preserve missing, empty, null, zero, and false as different states where the contract does.
168
+ - Use parameterized SQL for values and allowlists for identifiers, sort direction, table,
169
+ column, operator, and dynamic query structure.
170
+ - Avoid `extract()`, variable variables, mass assignment, and broad array-to-object hydration at
171
+ trust boundaries. Define allowed fields and nested shapes explicitly.
172
+ - Encode output for HTML text, attributes, URLs, JavaScript, JSON, headers, and logs at the final
173
+ sink; one escaping function does not fit every context.
174
+ 7. **Harden files, commands, serialization, and secrets.**
175
+ - For uploads, validate authorization, size, count, extension, MIME, magic bytes, image or archive
176
+ structure, decompression limits, generated server-side names, storage outside executable roots,
177
+ and safe download headers. Never trust the client filename or MIME alone.
178
+ - Canonicalize and constrain filesystem paths against an owned root, accounting for symlinks,
179
+ races, archive traversal, stream wrappers, and web-server handlers.
180
+ - Avoid shell construction. Use argument-safe process APIs, narrow executable allowlists,
181
+ timeouts, bounded output, environment control, and least OS privilege.
182
+ - Do not `unserialize()` untrusted data. Use explicit schemas; when signed client state is
183
+ unavoidable, authenticate integrity and separate confidentiality requirements.
184
+ - Keep secrets out of errors, dumps, logs, phpinfo, source control, build artifacts, caches, and
185
+ browser-visible configuration.
186
+ 8. **Harden passwords, authentication, and sessions.**
187
+ - Use supported password APIs and sufficient storage width. Account for bcrypt's byte limit,
188
+ reject over-limit input rather than truncating, avoid silent normalization, and rehash after
189
+ successful login when policy changes.
190
+ - Keep unknown-account and wrong-password responses, status, shape, and expensive hash path
191
+ comparable. Apply bounded risk-based throttling without creating an attacker-controlled
192
+ permanent account lock.
193
+ - Generate reset and verification URLs from a configured trusted origin. Store token hashes,
194
+ enforce short expiry and single use, and revoke affected sessions after sensitive changes.
195
+ - Enable strict session-ID handling, cookie-only transport, secure cookie attributes, ID rotation
196
+ at privilege changes, and a concurrency-safe transition from old IDs.
197
+ - Treat SameSite as defense in depth, not CSRF authorization. Protect state-changing and login
198
+ requests with CSRF tokens and origin checks as appropriate.
199
+ - Enforce idle, absolute, renewal, revocation, and recent-authentication policy server-side;
200
+ garbage collection and cookie expiry are not authentication policy.
201
+ 9. **Design cache and middleware cost explicitly.**
202
+ - Include tenant, locale, currency, authorization visibility, query shape, and schema version in
203
+ cache identity. Avoid caching ORM entities.
204
+ - Prevent stampedes with jitter, locks, stale-while-revalidate, and one refresh owner.
205
+ - Keep global middleware and subscribers limited to truly universal work. Measure auth, tenant,
206
+ session, locale, feature flag, audit, and activity-update costs by route.
207
+ - Release a file-backed session lock as soon as session mutation is complete. Do not hold one
208
+ user's parallel requests behind database, HTTP, upload, or other slow work.
209
+ 10. **Measure algorithm, allocation, and discovery cost before micro-optimizing.**
210
+ - Profile representative data sizes and concurrency with wall time, CPU, allocations, peak RSS,
211
+ I/O waits, and tail latency. Do not trade clarity for `isset()`-scale folklore while quadratic
212
+ copying, serialization, locks, or network waits dominate.
213
+ - Avoid repeated `array_merge()` accumulation and front-removal with `array_shift()` in growing
214
+ loops. Append directly, merge once, use a cursor, or choose a queue with the required
215
+ complexity while preserving numeric and string key semantics.
216
+ - Remember that PHP arrays are ordered maps, not compact primitive vectors. Avoid retaining
217
+ millions of rows or duplicate numeric and associative PDO keys; benchmark specialized
218
+ structures before accepting their compatibility and maintenance cost.
219
+ - Collapse filter-map-reindex chains when intermediate arrays dominate memory. Use generators
220
+ or streaming only when every downstream stage also remains bounded; laziness does not repair a
221
+ consumer that collects the whole result again.
222
+ - Rely on copy-on-write for ordinary read-only arguments instead of adding references as a
223
+ speculative optimization. Minimize aliases, return explicit result objects instead of output
224
+ parameters, and `unset` a reference variable immediately after reference iteration.
225
+ - Bound adversarial input before regular expressions and remove ambiguous nested repetition.
226
+ Check regex failure separately from no-match; raising backtracking limits is not a fix for
227
+ catastrophic backtracking.
228
+ - Compile route, container, event, serialization, template, and class discovery metadata during
229
+ build or cache warmup where supported. Account for autoload side effects from `class_exists()`,
230
+ and instantiate delayed attributes in CI so invalid targets do not wait for first traffic.
231
+ - Observe OPcache capacity, cached scripts, wasted memory, hit rate, and restart causes. Do not
232
+ infer health from `opcache.enable` alone, and do not assume JIT improves framework or I/O-bound
233
+ workloads without a representative benchmark.
234
+ 11. **Tune FPM, OPcache, web server, and containers from evidence.**
235
+ - Bound FPM concurrency by the smallest of memory, CPU/tail-latency, and downstream connection
236
+ budgets. Choose static, dynamic, or ondemand from traffic shape, not container folklore.
237
+ - Set worker recycling from measured memory growth. Observe listen queue, max-children events,
238
+ worker RSS, CPU throttling, DB waits, slow logs, and OOM behavior together.
239
+ - Order database, application, FPM, FastCGI, proxy, and load-balancer timeouts deliberately.
240
+ Know whether post-response work remains subject to termination and cancellation.
241
+ - Keep liveness limited to restart-recoverable process failure; use startup and readiness for
242
+ boot and dependency availability without causing restart storms.
243
+ - Build or warm environment-independent caches before traffic and environment-dependent caches
244
+ only after correct configuration exists. Do not let every replica race migrations or mutate
245
+ a shared cache directory.
246
+ - Treat OPcache preload and immutable-container assumptions as deployment contracts. Reload
247
+ FPM and long-running workers when code or cached containers change.
248
+ 12. **Apply language and type contracts deliberately.**
249
+ - Enforce `declare(strict_types=1)` across owned source files, not only entrypoints. Remember that
250
+ scalar argument coercion follows the calling file, return coercion follows the defining file,
251
+ and typed-property assignment follows the write site; strict types do not validate domain
252
+ formats, ranges, or decoded input shapes.
253
+ - Keep `mixed` at untrusted or dynamic boundaries and narrow it immediately. Layer precise
254
+ PHPDoc shapes, lists, ranges, callable signatures, generics, conditional returns, and
255
+ assertions over native runtime types rather than replacing native types with comments.
256
+ - Prefer `Closure` plus an analyzed signature for stored callbacks. Preserve generic type
257
+ relationships and collection variance; mutable collections are not automatically covariant.
258
+ - Fix inaccurate types at their source through native declarations, PHPDoc, stubs, generics,
259
+ assertions, or analysis extensions. Do not scatter inline `@var` claims or grow a baseline to
260
+ silence new errors; run the strongest practical rules and make legacy suppressions shrink.
261
+ - For PHP 8.5 upgrades, verify URI interpretation against the actual consumer, pipe only unary
262
+ callables, preserve shallow-clone semantics, and test ignored `#[NoDiscard]` results as
263
+ failures where the return value is contractual. Instantiate delayed attributes during build.
264
+ - Audit migration warnings and deprecations before changing the runtime, including OPcache
265
+ loading assumptions, destructuring non-arrays, lossy numeric casts, legacy casts, backtick
266
+ execution, legacy serialization hooks, null array keys, and changed extension APIs. Keep
267
+ prerelease-only features out of production code unless the project explicitly targets them.
268
+ 13. **Verify framework-specific behavior.**
269
+ - For Laravel, inspect container and facade use, mass assignment, model events, lazy loading,
270
+ queue model serialization, after-commit dispatch, cache locks, config/route/view caches,
271
+ Octane reset behavior, and worker reload.
272
+ - For Symfony and Doctrine, inspect service scope and reset, kernel subscribers, Messenger
273
+ redelivery, Doctrine hydration and identity map, flush/listener behavior, cache warmup, and
274
+ long-running worker reset.
275
+ - Treat framework cache, ORM, queue, and runtime features as separate version-sensitive tracks.
276
+ 14. **Verify the real execution model.**
277
+ - Cover static analysis, unit and integration tests, query-count growth, transaction conflict,
278
+ auth/session failure, upload rejection, repeated request/job state reset, FPM/container smoke,
279
+ worker reload, and production cache behavior according to the changed surface.
280
+ - Report missing configured intents rather than running raw servers, migrations, deploys,
281
+ dependency installs, or long-running workers.
282
+
283
+ <!-- mustflow-section: postconditions -->
284
+ ## Postconditions
285
+
286
+ - Runtime, package, container, request state, ORM, transaction, validation, authentication, session,
287
+ filesystem, worker, FPM, cache, and deployment ownership are explicit.
288
+ - Code that is safe only because PHP-FPM resets the request is not silently reused in a persistent process.
289
+ - Query and performance claims include rows, hydration, concurrency, memory, and tail-latency evidence.
290
+ - Security decisions do not depend on loose comparison, client metadata, unsafe serialization,
291
+ cookie expiry, or application-only uniqueness checks.
292
+
293
+ <!-- mustflow-section: verification -->
294
+ ## Verification
295
+
296
+ Use configured oneshot intents that cover the changed scope:
297
+
298
+ - `changes_status`
299
+ - `changes_diff_summary`
300
+ - `lint`
301
+ - `build`
302
+ - `test_related`
303
+ - `test`
304
+ - `docs_validate_fast`
305
+ - `test_release`
306
+ - `mustflow_check`
307
+
308
+ <!-- mustflow-section: failure-handling -->
309
+ ## Failure Handling
310
+
311
+ - If the PHP, framework, ORM, SAPI, or worker track is unclear, preserve existing behavior and
312
+ report the missing evidence.
313
+ - If a performance fix only raises workers, memory, timeout, eager loading, or cache TTL without
314
+ proving the bottleneck, keep it out and report the missing measurement.
315
+ - If a transaction path includes external side effects, split it behind an outbox or report the
316
+ atomicity gap before claiming safety.
317
+ - If long-running reset behavior cannot be verified, keep services stateless and report missing
318
+ repeated-request or repeated-message coverage.
319
+
320
+ <!-- mustflow-section: output-format -->
321
+ ## Output Format
322
+
323
+ - PHP runtime, Composer, framework, ORM, SAPI, and worker tracks
324
+ - State, security, data, cache, FPM, container, and deployment owners
325
+ - Structural, performance, compatibility, and migration decisions
326
+ - Verification evidence and configured intents run
327
+ - Skipped checks and remaining PHP, framework, persistence, security, or deployment risk
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.python-code-change
3
3
  locale: en
4
4
  canonical: true
5
- revision: 5
5
+ revision: 6
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: python-code-change
@@ -127,13 +127,13 @@ Preserve Python runtime, standard-library, packaging, import, architecture, asyn
127
127
  - rebuild large dicts after bulk deletion when long-lived memory and iteration cost matter;
128
128
  - avoid eager default factories hidden in `dict.get(key, expensive())` or `setdefault(key, expensive())`.
129
129
  15. Treat newer syntax and typing features as semantic tools, not style trophies:
130
- - use template string literals only when a handler needs the static and interpolated parts separately, such as SQL builders, shell command objects, logging templates, or markup renderers; do not replace ordinary f-strings when the result is just a string;
131
- - when runtime code reads annotations, use the supported annotation inspection API and choose the intended format explicitly instead of assuming `__annotations__` already contains runtime values;
132
- - use sentinel values to distinguish "argument omitted" from `None`, but compare sentinels by identity and keep public signatures readable;
130
+ - use Python 3.14+ template string literals only when a handler needs the static and interpolated parts separately, such as SQL builders, shell command objects, logging templates, or markup renderers; do not replace ordinary f-strings when the result is just a string;
131
+ - when runtime code reads annotations, use Python 3.14+ `annotationlib` or the official inspection API supported by the declared runtime, and choose the intended format explicitly instead of assuming `__annotations__` already contains runtime values;
132
+ - use sentinel values to distinguish "argument omitted" from `None`, but compare sentinels by identity and keep public signatures readable; in the official snapshot checked on 2026-07-11, the built-in sentinel facility was Python 3.15+ prerelease-only, so refresh the current release status before adoption;
133
133
  - prefer `Mapping` or narrower read-only protocols for read-only inputs so immutable mapping implementations are not rejected accidentally;
134
- - use closed or extra-key `TypedDict` forms only when the supported Python and type-checker versions agree with that shape.
134
+ - use closed or extra-key `TypedDict` forms only when the supported Python and type-checker versions agree with that shape; the Python 3.15-only forms were prerelease-only in the official snapshot checked on 2026-07-11, so refresh status before adoption.
135
135
  16. Keep `finally` as cleanup, not outcome selection. Do not add `return`, `break`, or `continue` inside `finally` blocks because they can mask exceptions and cancellation; move result decisions outside cleanup or make suppression an explicit documented contract.
136
- 17. Use explicit lazy imports only for startup-sensitive module-scope dependencies after checking version support and import-time side effects. Do not lazily import plugins, registries, monkey patches, model definitions, ORM mappings, or observability setup whose import side effects are part of startup correctness.
136
+ 17. Use Python 3.15+ explicit lazy imports only for startup-sensitive module-scope dependencies after checking version support and import-time side effects. The syntax was prerelease-only in the official snapshot checked on 2026-07-11; refresh the current Python 3.15 release status before placing it in stable-target examples. Do not lazily import plugins, registries, monkey patches, model definitions, ORM mappings, or observability setup whose import side effects are part of startup correctness.
137
137
  18. Keep process, archive, and concurrency safety explicit:
138
138
  - subprocess calls use argument lists, checked failure handling, timeouts, bounded captured output, and a narrow `shell=True` exception when the project already permits it;
139
139
  - archive extraction, including `tarfile`, keeps untrusted archive inspection, extraction filters, partial-extract cleanup, and older-runtime defaults visible;
@@ -215,7 +215,11 @@ Report missing package, type, or test intents rather than inventing raw tool com
215
215
  - If build backend, package manager, lockfile, dependency group, optional dependency, or editable-install behavior is ambiguous, keep the existing owner and report the missing packaging contract instead of migrating tools.
216
216
  - If the supported Python version blocks a syntax choice, rewrite to the supported form.
217
217
  - If the supported Python version blocks a standard-library feature, changed default, diagnostic flag, or helper API, use the supported equivalent or report the runtime-support decision instead of silently raising `requires-python`.
218
- - If template strings, annotation runtime access, lazy imports, sentinels, immutable mappings, or typed extra keys are useful but version-gated, keep a fallback or report the required support bump instead of smuggling the newer feature into a lower-runtime project.
218
+ - If Python 3.14 template strings or annotation inspection are useful but the project supports older runtimes, keep a fallback or report the required stable-runtime bump.
219
+ - If Python 3.15 lazy imports, built-in sentinels or immutable mappings, or advanced `TypedDict`
220
+ shapes are useful, first refresh the official release and feature status. When the target remains
221
+ prerelease, keep them out of stable-target code and examples unless the repository explicitly
222
+ adopts that prerelease track.
219
223
  - If third-party stubs or package metadata are wrong, document the local workaround and keep it narrow.
220
224
  - If `Any`, `cast`, `type: ignore`, runtime `Protocol`, or type guard behavior is needed, keep it local, justified, and backed by runtime validation or tests where the type claim can lie.
221
225
  - If performance risk appears in collections, generators, copies, or caches, report the input-size assumption or use an existing benchmark/profile intent when configured.
@@ -546,6 +546,18 @@ route_type = "primary"
546
546
  priority = 85
547
547
  applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "performance_change", "security_change", "package_metadata_change", "release_risk"]
548
548
 
549
+ [routes."ada-code-change"]
550
+ category = "general_code"
551
+ route_type = "primary"
552
+ priority = 85
553
+ applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "data_change", "performance_change", "security_change", "package_metadata_change", "release_risk"]
554
+
555
+ [routes."pascal-code-change"]
556
+ category = "general_code"
557
+ route_type = "primary"
558
+ priority = 85
559
+ applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "data_change", "performance_change", "security_change", "package_metadata_change", "release_risk"]
560
+
549
561
  [routes."shell-code-change"]
550
562
  category = "general_code"
551
563
  route_type = "primary"
@@ -570,6 +582,12 @@ route_type = "primary"
570
582
  priority = 85
571
583
  applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "migration_change", "security_change", "package_metadata_change", "release_risk"]
572
584
 
585
+ [routes."deno-code-change"]
586
+ category = "general_code"
587
+ route_type = "primary"
588
+ priority = 85
589
+ applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "docs_change", "performance_change", "security_change", "privacy_change", "data_change", "migration_change", "package_metadata_change", "release_risk"]
590
+
573
591
  [routes."docker-code-change"]
574
592
  category = "general_code"
575
593
  route_type = "primary"
@@ -618,6 +636,12 @@ route_type = "primary"
618
636
  priority = 85
619
637
  applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "data_change", "migration_change", "performance_change", "security_change", "privacy_change", "package_metadata_change", "release_risk"]
620
638
 
639
+ [routes."php-code-change"]
640
+ category = "general_code"
641
+ route_type = "primary"
642
+ priority = 85
643
+ applies_to_reasons = ["code_change", "behavior_change", "public_api_change", "test_change", "docs_change", "data_change", "migration_change", "performance_change", "security_change", "privacy_change", "package_metadata_change", "release_risk"]
644
+
621
645
  [routes."powershell-code-change"]
622
646
  category = "general_code"
623
647
  route_type = "primary"
@@ -918,6 +942,12 @@ route_type = "adjunct"
918
942
  priority = 70
919
943
  applies_to_reasons = ["performance_change", "code_change", "data_change", "ui_change", "behavior_change"]
920
944
 
945
+ [routes."performance-measurement-integrity-review"]
946
+ category = "general_code"
947
+ route_type = "adjunct"
948
+ priority = 79
949
+ applies_to_reasons = ["unknown_change", "code_change", "behavior_change", "test_change", "performance_change", "security_change", "privacy_change", "data_change", "docs_change", "package_metadata_change", "release_risk"]
950
+
921
951
  [routes."vertical-slice-tdd"]
922
952
  category = "tests"
923
953
  route_type = "primary"
@@ -1176,6 +1206,12 @@ route_type = "primary"
1176
1206
  priority = 85
1177
1207
  applies_to_reasons = ["ui_change", "code_change", "behavior_change", "public_api_change", "data_change", "security_change", "privacy_change", "performance_change", "test_change", "docs_change", "migration_change", "package_metadata_change", "release_risk"]
1178
1208
 
1209
+ [routes."threejs-code-change"]
1210
+ category = "ui_assets"
1211
+ route_type = "primary"
1212
+ priority = 85
1213
+ applies_to_reasons = ["ui_change", "code_change", "behavior_change", "public_api_change", "data_change", "security_change", "privacy_change", "performance_change", "test_change", "docs_change", "migration_change", "package_metadata_change", "release_risk"]
1214
+
1179
1215
  [routes."react-code-change"]
1180
1216
  category = "ui_assets"
1181
1217
  route_type = "primary"
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.skill-authoring
3
3
  locale: en
4
4
  canonical: true
5
- revision: 9
5
+ revision: 11
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: skill-authoring
9
- description: Apply this skill when creating or maintaining `.mustflow/skills/*/SKILL.md` procedures and `.mustflow/skills/INDEX.md` routes.
9
+ description: Apply this skill when creating or maintaining logically rigorous `.mustflow/skills/*/SKILL.md` procedures and `.mustflow/skills/INDEX.md` routes.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -30,6 +30,7 @@ Create narrow, repeatable mustflow skill procedures without turning skills into
30
30
  - A `.mustflow/skills/<name>/SKILL.md` file is created, renamed, split, removed, or substantially changed.
31
31
  - `.mustflow/skills/INDEX.md` needs a new or updated route for a skill.
32
32
  - A skill needs clearer use conditions, exclusion conditions, required inputs, command intent references, verification, or failure handling.
33
+ - A skill contains broad, conditional, exception-bearing, authority-sensitive, or completion claims whose logical scope needs review.
33
34
  - A broad prompt, checklist, or outside recommendation needs to be adapted into mustflow's skill format.
34
35
 
35
36
  <!-- mustflow-section: do-not-use-when -->
@@ -47,6 +48,10 @@ Create narrow, repeatable mustflow skill procedures without turning skills into
47
48
  - Existing `.mustflow/skills/INDEX.md` and nearby skill documents.
48
49
  - `.mustflow/config/commands.toml` command intent names relevant to verification.
49
50
  - Any repository evidence showing that the task is repeatable and not better handled by an existing skill.
51
+ - Nearby rules that can require, forbid, narrow, override, or create exceptions to the proposed procedure.
52
+ - The selected repository boundary for every command intent or verification claim, including any
53
+ explicit parent-owned dependency.
54
+ - At least one representative positive case and one boundary or counterexample for material rules.
50
55
  - Canonical source locale, localization policy, and template metadata when the skill is part of an installed template.
51
56
 
52
57
  <!-- mustflow-section: preconditions -->
@@ -69,19 +74,34 @@ Create narrow, repeatable mustflow skill procedures without turning skills into
69
74
  2. Search existing skills before adding a new one. Prefer updating a matching skill over creating overlapping procedures.
70
75
  3. Use a stable folder name and matching frontmatter `name`. Set `mustflow_doc` to `skill.<name>`, `metadata.mustflow_schema` to `"1"`, `metadata.mustflow_kind` to `procedure`, `metadata.pack_id` to the package namespace, and `metadata.skill_id` to `<pack_id>.<name>`.
71
76
  4. Write the standard sections: Purpose, Use When, Do Not Use When, Required Inputs, Preconditions, Allowed Edits, Procedure, Postconditions, Verification, Failure Handling, and Output Format.
72
- 5. Run the skill quality gate before accepting the draft: trigger is concrete, non-use boundaries are explicit, required inputs are observable, allowed edits are narrow, procedure steps are actionable, verification names configured intents, failure handling says what to do when evidence is missing, output format matches the evidence expected, overlap with nearby skills is controlled, and template impact is decided.
73
- 6. Reject broad advice disguised as a skill. A skill should not say only "be careful", "write better tests", "sync docs", or "think about security" unless it names a repeatable trigger, source files to inspect, allowed edits, verification, and reporting evidence.
74
- 7. Keep the procedure concrete and bounded. Include what to read, what to change, what to avoid, and what evidence to report.
75
- 8. Reference command intent names only. Do not include raw shell command blocks or claim that the skill authorizes command execution.
76
- 9. Update `.mustflow/skills/INDEX.md` with a compact route that includes trigger, required input, edit scope, risk, verification intents, and expected output.
77
- 10. If the skill is installed by a template, update the canonical skill copy plus installation metadata, package tests, and public docs that list installed files. Do not fan out routine skill edits into every localized skill copy by default; localized skill copies may be absent, and non-source template locales should fall back to the canonical source-locale skill text unless locale-specific skill text is intentionally maintained and translation review is available.
78
- 11. If a portable Agent Skills artifact is part of the task, create or validate it as a derived export, not as the mustflow-native canonical source. Use portable-only top-level fields and string-to-string metadata. A `gh skill publish --dry-run` check may validate the export artifact when available, but `gh skill publish --fix` must be limited to the export directory because it can remove installed provenance metadata and mustflow-native fields.
77
+ 5. Normalize material rules before accepting the draft.
78
+ - Rewrite each material rule mentally as `conditions -> required, allowed, or forbidden action -> observable result`. Keep the prose natural, but make the condition, modality, actor, scope, and result unambiguous.
79
+ - Distinguish a necessary condition from a sufficient condition. Do not infer the converse: a rule saying `A requires B` does not say that every `B` permits or proves `A`.
80
+ - Name quantifier and scope when they matter: one item, every item, at least one item, only configured items, the selected repository, the current platform, or another bounded set. Avoid `always`, `never`, `all`, `only`, and equivalent absolutes unless every permitted exception is excluded or explicitly subordinate to a higher-authority rule.
81
+ - Attach exceptions to the rule they narrow. State whether an exception waives a requirement, permits an action, or changes only reporting; do not let an exception silently authorize commands or erase safety constraints.
82
+ 6. Run the logical consistency gate across Purpose, Use When, Do Not Use When, Required Inputs, Preconditions, Allowed Edits, Procedure, Postconditions, Verification, and Failure Handling.
83
+ - Check whether the same reachable condition both requires and forbids an action. Resolve the contradiction or state the higher-authority discriminator.
84
+ - Separate different authority dimensions instead of forcing them into one total order. Goal ownership, safety constraints, repository scope, command authority, evidence quality, and preferences can constrain the same action without being interchangeable.
85
+ - Check reachability and termination. Every required input may be present or missing; every verification may pass, fail, be unavailable, or be skipped; each material branch must lead to an action, handoff, bounded retry, or stop state.
86
+ - Attack universal and completion claims with a counterexample. Narrow or qualify any claim that one realistic permitted case can falsify.
87
+ - Require postconditions to be observable from named evidence. A procedure step, local test, workflow success, or report is not proof of a broader state unless the evidence actually covers that state.
88
+ - Resolve verification intent names against the repository being changed. A shared parent skill
89
+ does not impose parent-root verification on child-only work; require a parent check only when
90
+ parent-owned files, orchestration, artifacts, or contracts are direct inputs to the result.
91
+ 7. Run the skill quality gate before accepting the draft: trigger is concrete, non-use boundaries are explicit, required inputs are observable, allowed edits are narrow, procedure steps are actionable, verification names configured intents, failure handling says what to do when evidence is missing, output format matches the evidence expected, overlap with nearby skills is controlled, logical branches terminate, and template impact is decided.
92
+ 8. Reject broad advice disguised as a skill. A skill should not say only "be careful", "write better tests", "sync docs", or "think about security" unless it names a repeatable trigger, source files to inspect, allowed edits, verification, and reporting evidence.
93
+ 9. Keep the procedure concrete and bounded. Include what to read, what to change, what to avoid, and what evidence to report.
94
+ 10. Reference command intent names only. Do not include raw shell command blocks or claim that the skill authorizes command execution.
95
+ 11. Update `.mustflow/skills/INDEX.md` with a compact route that includes trigger, required input, edit scope, risk, verification intents, and expected output.
96
+ 12. If the skill is installed by a template, update the canonical skill copy plus installation metadata, package tests, and public docs that list installed files. Do not fan out routine skill edits into every localized skill copy by default; localized skill copies may be absent, and non-source template locales should fall back to the canonical source-locale skill text unless locale-specific skill text is intentionally maintained and translation review is available.
97
+ 13. If a portable Agent Skills artifact is part of the task, create or validate it as a derived export, not as the mustflow-native canonical source. Use portable-only top-level fields and string-to-string metadata. A `gh skill publish --dry-run` check may validate the export artifact when available, but `gh skill publish --fix` must be limited to the export directory because it can remove installed provenance metadata and mustflow-native fields.
79
98
 
80
99
  <!-- mustflow-section: postconditions -->
81
100
  ## Postconditions
82
101
 
83
102
  - The expected output can be produced with clear evidence, executed command intents, skipped checks, and remaining risks.
84
103
  - Any missing command intent, unknown input, or authority conflict is reported instead of hidden.
104
+ - Material rules have bounded scope, explicit exception behavior, reachable failure branches, and observable postconditions.
85
105
 
86
106
  <!-- mustflow-section: verification -->
87
107
  ## Verification
@@ -100,6 +120,11 @@ If the skill changes tests or behavior-sensitive template output, also use the r
100
120
  - If two skills overlap, tighten their use and non-use conditions or merge the duplicate procedure.
101
121
  - If a needed command intent is missing, record the missing intent instead of inventing a command inside the skill.
102
122
  - If the draft can be applied to almost any task, narrow the trigger or turn the material into workflow guidance instead of a skill.
123
+ - If a reachable condition both requires and forbids the same action, do not hide it behind priority language. Split authority dimensions, add the missing discriminator, or stop with an explicit conflict.
124
+ - If a universal or completion claim fails one realistic permitted counterexample, narrow the claim to the evidence actually established.
125
+ - If a branch can retry, wait, or defer without a bound or stop state, add a termination condition before accepting the skill.
126
+ - If a skill makes a child task depend on parent-root verification without naming a direct parent
127
+ dependency, remove the cross-root obligation.
103
128
  - If translation confidence is low, keep the source skill authoritative and mark translations for review through template metadata.
104
129
 
105
130
  <!-- mustflow-section: output-format -->
@@ -108,6 +133,7 @@ If the skill changes tests or behavior-sensitive template output, also use the r
108
133
  - Skill files added, updated, renamed, or removed
109
134
  - Skill index routes changed
110
135
  - Quality gate result and overlap decision
136
+ - Logical consistency result, counterexamples checked, and material claims narrowed
111
137
  - Command intents referenced
112
138
  - Template or localization metadata updated
113
139
  - Portable export validation result when relevant
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.skill-refresh
3
3
  locale: en
4
4
  canonical: true
5
- revision: 2
5
+ revision: 3
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: skill-refresh
@@ -135,6 +135,11 @@ source freshness, routing metadata, helper-file alignment, and verification evid
135
135
  - official vendor docs or repositories for product behavior;
136
136
  - user-provided source text as snapshot-only when live refresh is unnecessary or unavailable.
137
137
  Omit or date claims that cannot be checked.
138
+ - Record feature status separately from package or framework release status: stable,
139
+ experimental, beta, release candidate, prerelease, deprecated, removed, or
140
+ compatibility-only.
141
+ - Do not infer stability from presence in current docs or infer recommendation from a retained
142
+ compatibility option. Verify the status in the official feature, migration, or config source.
138
143
  6. Decide runtime mode before editing frontmatter or fields. Keep mustflow-native metadata for
139
144
  mustflow skills. For cross-runtime skills, separate portable guidance from Codex-native,
140
145
  Claude-native, or other product-specific extensions instead of mixing incompatible fields.
@@ -199,6 +204,9 @@ source freshness, routing metadata, helper-file alignment, and verification evid
199
204
  - Trigger and non-trigger wording is concrete, short enough to route reliably, and checked against
200
205
  nearby skills.
201
206
  - Runtime-specific behavior is either scoped to the target runtime or excluded from portable mode.
207
+ - Package release tracks and per-feature stability tracks are independently classified, so stable
208
+ releases do not silently promote experimental features and compatibility shims do not become
209
+ recommendations.
202
210
  - Helper files, examples, routes, template copies, locale metadata, and package surfaces agree.
203
211
  - External material is either rewritten as repository-native procedure, attributed where required,
204
212
  or omitted.
@@ -243,6 +251,7 @@ package output, public docs, or release-sensitive template output changed.
243
251
  - Skill refreshed
244
252
  - Runtime mode and behavior contract preserved or changed
245
253
  - Sources checked and stale claims omitted or dated
254
+ - Package or framework release track, per-feature status, and owning official source
246
255
  - Semantic change classification
247
256
  - Package files, helpers, examples, routes, and template surfaces synchronized
248
257
  - Version impact decision