@monochange/skill 0.0.0 → 0.4.2
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/LICENSE +24 -0
- package/SKILL.md +271 -0
- package/changelog.md +887 -0
- package/examples/migration.md +21 -0
- package/examples/publishing.md +21 -0
- package/examples/quickstart.md +22 -0
- package/examples/readme.md +22 -0
- package/examples/release-pr.md +20 -0
- package/package.json +40 -13
- package/readme.md +63 -0
- package/skills/adoption.md +125 -0
- package/skills/artifact-types.md +529 -0
- package/skills/changeset-guide.md +231 -0
- package/skills/changesets.md +332 -0
- package/skills/commands.md +204 -0
- package/skills/configuration.md +258 -0
- package/skills/linting.md +539 -0
- package/skills/multi-package-publishing.md +237 -0
- package/skills/readme.md +18 -0
- package/skills/reference.md +667 -0
- package/skills/trusted-publishing.md +459 -0
- package/README.md +0 -3
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
# Artifact types and changeset rules
|
|
2
|
+
|
|
3
|
+
Different artifact types — libraries, applications, CLI tools, and LSP/MCP servers — have different user-facing boundaries. Changesets must adapt to the artifact type being changed.
|
|
4
|
+
|
|
5
|
+
## Artifact type overview
|
|
6
|
+
|
|
7
|
+
<!-- {=changesetArtifactTypeTable} -->
|
|
8
|
+
|
|
9
|
+
| Artifact Type | User-Facing Changes | Internal Changes |
|
|
10
|
+
| --------------- | ------------------------------------------------------------------------ | ---------------------------------------------- |
|
|
11
|
+
| **Library** | Public API signatures, types, traits, module exports | Private functions, internal refactoring |
|
|
12
|
+
| **Application** | UI behavior, user workflows, navigation, visual design | Internal state management, component structure |
|
|
13
|
+
| **CLI tool** | Commands, flags, output format, exit codes, prompts | Internal command dispatch, error handling |
|
|
14
|
+
| **LSP / MCP** | Protocol methods, capability declarations, tool schemas, response shapes | Internal message routing, transport layer |
|
|
15
|
+
|
|
16
|
+
<!-- {/changesetArtifactTypeTable} -->
|
|
17
|
+
|
|
18
|
+
## How monochange detects artifact types
|
|
19
|
+
|
|
20
|
+
`monochange_analysis` classifies packages based on their structure:
|
|
21
|
+
|
|
22
|
+
- **Library** — has `src/lib.rs` or `Cargo.toml` with `[lib]` or `crate-type = ["cdylib", "staticlib"]`
|
|
23
|
+
- **Application** — has `src/main.rs` with web framework imports (axum, actix, rocket, warp)
|
|
24
|
+
- **CLI tool** — has `src/main.rs` without web framework imports, or `Cargo.toml` with `[[bin]]`
|
|
25
|
+
- **Mixed** — has both `src/lib.rs` and `src/main.rs`
|
|
26
|
+
|
|
27
|
+
The classification affects suggested bump levels, grouping thresholds, and changeset template selection.
|
|
28
|
+
|
|
29
|
+
## Library changesets
|
|
30
|
+
|
|
31
|
+
<!-- {=changesetArtifactTypeLibrary} -->
|
|
32
|
+
|
|
33
|
+
Libraries expose a public API surface. Changesets should focus on what consumers of the library will experience:
|
|
34
|
+
|
|
35
|
+
**Breaking changes (major bump):**
|
|
36
|
+
|
|
37
|
+
- New published library package or crate is introduced
|
|
38
|
+
- Public function removed or renamed
|
|
39
|
+
- Public type removed or has fields removed
|
|
40
|
+
- Public trait signature changed
|
|
41
|
+
- Public constant removed or changed type
|
|
42
|
+
- Module removed from public API
|
|
43
|
+
|
|
44
|
+
**New features (minor bump):**
|
|
45
|
+
|
|
46
|
+
- New public function, type, trait, or constant added
|
|
47
|
+
- New module added to public API
|
|
48
|
+
- Public function gains optional parameters (non-breaking)
|
|
49
|
+
- New trait implementation on existing type
|
|
50
|
+
|
|
51
|
+
**Patches (patch bump):**
|
|
52
|
+
|
|
53
|
+
- Bug fix in public function behavior
|
|
54
|
+
- Documentation improvement for public API
|
|
55
|
+
- Performance improvement with no API change
|
|
56
|
+
- Internal refactoring with no public-facing impact
|
|
57
|
+
|
|
58
|
+
**When to create vs. update:**
|
|
59
|
+
|
|
60
|
+
- Each new public addition → create a new changeset
|
|
61
|
+
- Each new published package or crate → create a new changeset with a `major` bump for that new package
|
|
62
|
+
- If a function was added then modified before release → update the existing changeset
|
|
63
|
+
- If a function was added then removed before release → delete the changeset
|
|
64
|
+
|
|
65
|
+
<!-- {/changesetArtifactTypeLibrary} -->
|
|
66
|
+
|
|
67
|
+
### Library changeset template
|
|
68
|
+
|
|
69
|
+
<!-- {=changesetTemplateLibrary} -->
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
---
|
|
73
|
+
{ { package_id } }: minor
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
#### add {{feature_name}}
|
|
77
|
+
|
|
78
|
+
{{one_sentence_summary}}.
|
|
79
|
+
|
|
80
|
+
- **`{{symbol}}`** — {{what_it_does}} {{#each additional_symbols}}
|
|
81
|
+
- **`{{symbol}}`** — {{what_it_does}} {{/each}}
|
|
82
|
+
|
|
83
|
+
**Before:** {{before_state}}
|
|
84
|
+
|
|
85
|
+
**After:** {{after_state}}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
<!-- {/changesetTemplateLibrary} -->
|
|
89
|
+
|
|
90
|
+
### Library example
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
---
|
|
94
|
+
monochange_core: minor
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
#### add `ChangelogFormat` enum for format detection
|
|
98
|
+
|
|
99
|
+
Introduces an enum for detecting and selecting changelog rendering formats.
|
|
100
|
+
|
|
101
|
+
- **`ChangelogFormat`** — New enum with `KeepAChangelog` and `Monochange` variants
|
|
102
|
+
- **`detect_changelog_format()`** — Reads a changelog file header and returns the detected format
|
|
103
|
+
- **`ChangelogRenderOptions.format`** — New field for selecting output format during rendering
|
|
104
|
+
|
|
105
|
+
**Before:** Changelog rendering always used the keep-a-changelog format.
|
|
106
|
+
|
|
107
|
+
**After:** Users can opt into the monochange structured format or keep the traditional layout.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Application changesets
|
|
111
|
+
|
|
112
|
+
<!-- {=changesetArtifactTypeApplication} -->
|
|
113
|
+
|
|
114
|
+
Applications expose user-facing behavior through UI, navigation, and interaction design. Changesets should describe what users see and do:
|
|
115
|
+
|
|
116
|
+
**Breaking changes (major bump):**
|
|
117
|
+
|
|
118
|
+
- Route removed or URL structure changed without redirect
|
|
119
|
+
- User workflow significantly altered
|
|
120
|
+
- Feature removed that users depend on
|
|
121
|
+
- API endpoint removed or changed without versioning
|
|
122
|
+
|
|
123
|
+
**New features (minor bump):**
|
|
124
|
+
|
|
125
|
+
- New page, route, or screen added
|
|
126
|
+
- New interactive component added
|
|
127
|
+
- New API endpoint exposed
|
|
128
|
+
- New user-facing setting or preference
|
|
129
|
+
|
|
130
|
+
**Patches (patch bump):**
|
|
131
|
+
|
|
132
|
+
- Bug fix in UI behavior
|
|
133
|
+
- Copy or text improvement
|
|
134
|
+
- Accessibility improvement
|
|
135
|
+
- Performance improvement in page load or interaction
|
|
136
|
+
|
|
137
|
+
**UX changelog section:**
|
|
138
|
+
|
|
139
|
+
Applications and websites should configure a `ux` changelog section type for changes that affect the user experience visually or interactively. This includes:
|
|
140
|
+
|
|
141
|
+
- Visual redesigns or layout changes
|
|
142
|
+
- New screenshots or UI mockups
|
|
143
|
+
- Interaction pattern changes (drag-and-drop, gestures, keyboard shortcuts)
|
|
144
|
+
- Accessibility improvements visible to users
|
|
145
|
+
- User flow changes (onboarding, checkout, navigation)
|
|
146
|
+
|
|
147
|
+
Configure the section in `monochange.toml`:
|
|
148
|
+
|
|
149
|
+
```toml
|
|
150
|
+
extra_changelog_sections = [
|
|
151
|
+
{ name = "User Experience", types = ["ux"], default_bump = "minor" },
|
|
152
|
+
]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Use `--type ux` when creating changesets:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
mc change --package web-app --bump minor --type ux --reason "redesign settings page navigation"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Screenshot support:**
|
|
162
|
+
|
|
163
|
+
For user-facing changes, include screenshots or screen recordings in the changeset details. The project should configure an S3-compatible upload service in `monochange.toml` for hosting images:
|
|
164
|
+
|
|
165
|
+
```toml
|
|
166
|
+
[defaults.screenshots]
|
|
167
|
+
provider = "s3"
|
|
168
|
+
bucket = "changelog-screenshots"
|
|
169
|
+
region = "us-east-1"
|
|
170
|
+
path_prefix = "{{ package_id }}/{{ version }}/"
|
|
171
|
+
public_url_template = "https://cdn.example.com/{{ path }}"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
When screenshots are configured, reference them in changeset details using relative paths or markdown image syntax:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
#### redesign settings page navigation
|
|
178
|
+
|
|
179
|
+
Settings page now uses a tab-based layout instead of accordion sections.
|
|
180
|
+
|
|
181
|
+

|
|
182
|
+
|
|
183
|
+
- Tab-based navigation replaces accordion sections
|
|
184
|
+
- Search field is now persistent across all tabs
|
|
185
|
+
- Mobile layout stacks tabs vertically
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
<!-- {/changesetArtifactTypeApplication} -->
|
|
189
|
+
|
|
190
|
+
### Application changeset template
|
|
191
|
+
|
|
192
|
+
<!-- {=changesetTemplateApplication} -->
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
---
|
|
196
|
+
{ { package_id } }: minor
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
#### add {{feature_name}}
|
|
200
|
+
|
|
201
|
+
{{one_sentence_summary}}.
|
|
202
|
+
|
|
203
|
+
<!-- TYPE: ux -->
|
|
204
|
+
|
|
205
|
+
{{#if has_screenshots}}  {{/if}}
|
|
206
|
+
|
|
207
|
+
- {{what_changed}} {{#each additional_changes}}
|
|
208
|
+
- {{what_changed}} {{/each}}
|
|
209
|
+
|
|
210
|
+
**Before:** {{before_state}}
|
|
211
|
+
|
|
212
|
+
**After:** {{after_state}}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
<!-- {/changesetTemplateApplication} -->
|
|
216
|
+
|
|
217
|
+
### Application example with screenshots
|
|
218
|
+
|
|
219
|
+
```markdown
|
|
220
|
+
---
|
|
221
|
+
web-app: minor
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
#### redesign settings page navigation
|
|
225
|
+
|
|
226
|
+
Settings page now uses a tab-based layout for faster access.
|
|
227
|
+
|
|
228
|
+
<!-- TYPE: ux -->
|
|
229
|
+
|
|
230
|
+

|
|
231
|
+
|
|
232
|
+
- Tab-based navigation replaces accordion sections
|
|
233
|
+
- Search field is persistent across all tabs
|
|
234
|
+
- Mobile layout stacks tabs vertically
|
|
235
|
+
|
|
236
|
+
**Before:** Settings used a long scrollable accordion with nested sections.
|
|
237
|
+
|
|
238
|
+
**After:** Horizontal tabs group related settings, with persistent search.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## CLI tool changesets
|
|
242
|
+
|
|
243
|
+
<!-- {=changesetArtifactTypeCli} -->
|
|
244
|
+
|
|
245
|
+
CLI tools expose commands, flags, output format, and exit codes. Changesets should focus on what developers and automation scripts will experience:
|
|
246
|
+
|
|
247
|
+
**Breaking changes (major bump):**
|
|
248
|
+
|
|
249
|
+
- Command removed or renamed
|
|
250
|
+
- Flag removed or changed meaning
|
|
251
|
+
- Default output format changed
|
|
252
|
+
- Exit code semantics changed
|
|
253
|
+
- Configuration file format has incompatible changes
|
|
254
|
+
|
|
255
|
+
**New features (minor bump):**
|
|
256
|
+
|
|
257
|
+
- New command added
|
|
258
|
+
- New flag or option added
|
|
259
|
+
- New output format added (e.g., `--format json`)
|
|
260
|
+
- New configuration file option
|
|
261
|
+
- New interactive prompt or autocompletion
|
|
262
|
+
|
|
263
|
+
**Patches (patch bump):**
|
|
264
|
+
|
|
265
|
+
- Bug fix in command behavior
|
|
266
|
+
- Error message improvement
|
|
267
|
+
- Performance improvement
|
|
268
|
+
- Documentation improvement for command usage
|
|
269
|
+
|
|
270
|
+
**When to create vs. update:**
|
|
271
|
+
|
|
272
|
+
- Each new command or flag → new changeset
|
|
273
|
+
- If a command was added then renamed before release → update the existing changeset
|
|
274
|
+
- If a command was added then removed before release → delete the changeset
|
|
275
|
+
|
|
276
|
+
**Agent-focused changes:**
|
|
277
|
+
|
|
278
|
+
CLI tools used by agents (like `mc` itself) should document changes that affect automation workflows:
|
|
279
|
+
|
|
280
|
+
- New or changed command exit codes
|
|
281
|
+
- New or changed output formats (`--format json`, structured output)
|
|
282
|
+
- New or changed MCP tool schemas
|
|
283
|
+
- New or changed configuration options that affect behavior
|
|
284
|
+
|
|
285
|
+
<!-- {/changesetArtifactTypeCli} -->
|
|
286
|
+
|
|
287
|
+
### CLI/LSP/MCP changeset template
|
|
288
|
+
|
|
289
|
+
<!-- {=changesetTemplateCliLspMcp} -->
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
---
|
|
293
|
+
{ { package_id } }: minor
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
#### add {{feature_name}}
|
|
297
|
+
|
|
298
|
+
{{one_sentence_summary}}.
|
|
299
|
+
|
|
300
|
+
- **{{tool_or_command}}:** `{{name}}` — {{what_it_does}} {{#each additional_items}}
|
|
301
|
+
- **{{tool_or_command}}:** `{{name}}` — {{what_it_does}} {{/each}}
|
|
302
|
+
|
|
303
|
+
**Before:** {{before_state}}
|
|
304
|
+
|
|
305
|
+
**After:** {{after_state}}
|
|
306
|
+
|
|
307
|
+
**Integration impact:** {{backward_compat_note}}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
<!-- {/changesetTemplateCliLspMcp} -->
|
|
311
|
+
|
|
312
|
+
### CLI tool example
|
|
313
|
+
|
|
314
|
+
```markdown
|
|
315
|
+
---
|
|
316
|
+
monochange: minor
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
#### add `mc diagnostics` command for changeset context
|
|
320
|
+
|
|
321
|
+
Introduces a new command that shows git provenance and review metadata for pending changesets.
|
|
322
|
+
|
|
323
|
+
- **Command:** `mc diagnostics` — Display changeset context including introduced commit, linked PR, and related issues
|
|
324
|
+
- **Flag:** `--format json` — Output structured diagnostics for automation
|
|
325
|
+
|
|
326
|
+
**Before:** Agents had to parse raw changeset markdown files to understand context.
|
|
327
|
+
|
|
328
|
+
**After:** `mc diagnostics --format json` provides structured context for all pending changesets.
|
|
329
|
+
|
|
330
|
+
**Integration impact:** Fully backward compatible. Existing commands are unchanged.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## LSP and MCP server changesets
|
|
334
|
+
|
|
335
|
+
<!-- {=changesetArtifactTypeLspMcp} -->
|
|
336
|
+
|
|
337
|
+
LSPs and MCPs expose protocol methods, capability declarations, tool schemas, and response shapes. Changesets should focus on what client integrations will experience:
|
|
338
|
+
|
|
339
|
+
**Breaking changes (major bump):**
|
|
340
|
+
|
|
341
|
+
- Protocol method removed or has changed signature
|
|
342
|
+
- Tool schema field removed or changed type
|
|
343
|
+
- Capability declaration removed or changed semantics
|
|
344
|
+
- Response shape has fields removed or renamed
|
|
345
|
+
- Required field added to request schema
|
|
346
|
+
|
|
347
|
+
**New features (minor bump):**
|
|
348
|
+
|
|
349
|
+
- New protocol method or notification added
|
|
350
|
+
- New tool or resource added
|
|
351
|
+
- New capability declared
|
|
352
|
+
- New optional field added to response schema
|
|
353
|
+
- New notification type added
|
|
354
|
+
|
|
355
|
+
**Patches (patch bump):**
|
|
356
|
+
|
|
357
|
+
- Bug fix in protocol method behavior
|
|
358
|
+
- Documentation improvement for tool schemas
|
|
359
|
+
- Performance improvement in response time
|
|
360
|
+
- Error message improvement in diagnostics
|
|
361
|
+
|
|
362
|
+
**Developer-focused changes:**
|
|
363
|
+
|
|
364
|
+
LSP and MCP servers serve developers and their tools. Changesets should emphasize:
|
|
365
|
+
|
|
366
|
+
- How the integration surface changes
|
|
367
|
+
- What client code needs to update
|
|
368
|
+
- Whether the change is backward compatible
|
|
369
|
+
|
|
370
|
+
**Example changeset for an MCP tool addition:**
|
|
371
|
+
|
|
372
|
+
```markdown
|
|
373
|
+
---
|
|
374
|
+
monochange: minor
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
#### add `monochange_validate_changeset` MCP tool
|
|
378
|
+
|
|
379
|
+
Introduces a new MCP tool for validating changeset content against the current semantic diff.
|
|
380
|
+
|
|
381
|
+
- **Tool name:** `monochange_validate_changeset`
|
|
382
|
+
- **New parameters:** `path`, `changeset_path`
|
|
383
|
+
- **Returns:** validation result with severity-tagged issues and lifecycle status
|
|
384
|
+
- **Current semantic support:** Cargo, npm, Deno, and Dart/Flutter packages
|
|
385
|
+
- **Backward compatible:** existing tools unchanged
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
<!-- {/changesetArtifactTypeLspMcp} -->
|
|
389
|
+
|
|
390
|
+
## Granularity rules
|
|
391
|
+
|
|
392
|
+
<!-- {=changesetGranularityRules} -->
|
|
393
|
+
|
|
394
|
+
When deciding how many changesets to create for a single PR or branch:
|
|
395
|
+
|
|
396
|
+
| Change type | Library | Application | CLI / LSP / MCP |
|
|
397
|
+
| ------------------------------ | --------------- | --------------------------- | --------------- |
|
|
398
|
+
| Single new feature | Separate | Separate | Separate |
|
|
399
|
+
| Multiple related API additions | 3+ → group | 2+ → group | 2+ → group |
|
|
400
|
+
| Internal refactoring only | Patch | Patch | Patch |
|
|
401
|
+
| Breaking + non-breaking mixed | Separate | Separate | Separate |
|
|
402
|
+
| New routes/pages | N/A | 2+ → summarize | N/A |
|
|
403
|
+
| New commands/tools | N/A | N/A | 2+ → summarize |
|
|
404
|
+
| **Documentation-only** | 10+ → summarize | 10+ → summarize | 10+ → summarize |
|
|
405
|
+
| **UX / visual changes** | N/A | Separate (with screenshots) | N/A |
|
|
406
|
+
|
|
407
|
+
**Summarize** = Create a single changeset with a grouped description. **Separate** = Create individual changesets (or mark as breaking).
|
|
408
|
+
|
|
409
|
+
<!-- {/changesetGranularityRules} -->
|
|
410
|
+
|
|
411
|
+
## UX changelog section configuration
|
|
412
|
+
|
|
413
|
+
<!-- {=changesetUxSectionConfig} -->
|
|
414
|
+
|
|
415
|
+
For applications and websites, configure a `ux` changelog section in `monochange.toml`:
|
|
416
|
+
|
|
417
|
+
```toml
|
|
418
|
+
# Per-package configuration for an application
|
|
419
|
+
[package.web-app]
|
|
420
|
+
path = "apps/web"
|
|
421
|
+
type = "cargo"
|
|
422
|
+
|
|
423
|
+
[package.web-app.extra_changelog_sections]
|
|
424
|
+
ux = { name = "User Experience", types = ["ux"], default_bump = "minor", description = "Visual and interaction changes that affect the user experience" }
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Or at the group level:
|
|
428
|
+
|
|
429
|
+
```toml
|
|
430
|
+
[group.main]
|
|
431
|
+
extra_changelog_sections = [
|
|
432
|
+
{ name = "User Experience", types = ["ux"], default_bump = "minor", description = "Visual and interaction changes that affect the user experience" },
|
|
433
|
+
{ name = "Testing", types = ["test"], default_bump = "none", description = "Changes that only modify tests" },
|
|
434
|
+
{ name = "Documentation", types = ["docs"], default_bump = "none", description = "Changes that only modify documentation" },
|
|
435
|
+
]
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
When creating a changeset for a UX change, use `--type ux`:
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
mc change --package web-app --bump minor --type ux --reason "redesign settings page navigation"
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
<!-- {/changesetUxSectionConfig} -->
|
|
445
|
+
|
|
446
|
+
## Screenshot configuration
|
|
447
|
+
|
|
448
|
+
<!-- {=changesetUxScreenshots} -->
|
|
449
|
+
|
|
450
|
+
For visual changes, include screenshots in changeset details. Configure an S3-compatible upload service in `monochange.toml`:
|
|
451
|
+
|
|
452
|
+
```toml
|
|
453
|
+
[defaults.screenshots]
|
|
454
|
+
provider = "s3"
|
|
455
|
+
bucket = "changelog-screenshots"
|
|
456
|
+
region = "us-east-1"
|
|
457
|
+
path_prefix = "{{ package_id }}/{{ version }}/"
|
|
458
|
+
public_url_template = "https://cdn.example.com/{{ path }}"
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
Reference uploaded screenshots in changeset markdown:
|
|
462
|
+
|
|
463
|
+
```markdown
|
|
464
|
+

|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Or use relative paths if screenshots are committed alongside changesets:
|
|
468
|
+
|
|
469
|
+
```markdown
|
|
470
|
+

|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
<!-- {/changesetUxScreenshots} -->
|
|
474
|
+
|
|
475
|
+
## Dependency propagation with `caused_by`
|
|
476
|
+
|
|
477
|
+
<!-- {=changesetCausedByField} -->
|
|
478
|
+
|
|
479
|
+
### Dependency propagation with `caused_by`
|
|
480
|
+
|
|
481
|
+
When a dependency changes, monochange automatically patches all dependents. This creates release notes with no context for _why_ the dependent is being updated.
|
|
482
|
+
|
|
483
|
+
The `caused_by` field in changeset frontmatter provides that context. It lists the root package(s) or group(s) that triggered this dependent change. Because `caused_by` is part of the object form, use table syntax instead of scalar shorthand whenever you need it:
|
|
484
|
+
|
|
485
|
+
```markdown
|
|
486
|
+
---
|
|
487
|
+
monochange_config:
|
|
488
|
+
bump: patch
|
|
489
|
+
caused_by: ["monochange_core"]
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
#### update dependency on monochange_core
|
|
493
|
+
|
|
494
|
+
Bumps `monochange_core` dependency to v2.1.0 after the public API change to `ChangelogFormat`.
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**How it works:**
|
|
498
|
+
|
|
499
|
+
1. Without `caused_by`: a dependent gets an automatic "dependency changed → patch" record with no explanation
|
|
500
|
+
2. With `caused_by`: the authored changeset **replaces** the matching automatic propagation — it provides human-readable context instead
|
|
501
|
+
3. A changeset with `caused_by` and `bump: patch` suppresses the automatic "dependency changed → patch" record for that package when the same upstream package or group triggered it
|
|
502
|
+
4. A changeset with `caused_by` and `bump: none` suppresses that matching propagation entirely — the package is acknowledged as affected but no version bump is warranted
|
|
503
|
+
5. Unrelated upstream sources can still propagate normally; `caused_by` is not a global opt-out for every dependency edge
|
|
504
|
+
|
|
505
|
+
**`none` bump with `caused_by` — the "nothing meaningful changed" case:**
|
|
506
|
+
|
|
507
|
+
When `mc step:affected-packages` (or a config-defined wrapper such as `mc affected`) flags a package but the change is not meaningful (just a lockfile update or a re-export), use `bump: none` with `caused_by`:
|
|
508
|
+
|
|
509
|
+
```markdown
|
|
510
|
+
---
|
|
511
|
+
monochange_config:
|
|
512
|
+
bump: none
|
|
513
|
+
caused_by: ["monochange_core"]
|
|
514
|
+
type: deps
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
#### update monochange_core dependency
|
|
518
|
+
|
|
519
|
+
No user-facing changes. Dependency version updated to match the group release.
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
This tells monochange: "this package is affected, but the change doesn't warrant a version bump for consumers. Suppress the matching automatic patch propagation entirely."
|
|
523
|
+
|
|
524
|
+
CLI authoring supports one or more `--caused-by` flags:
|
|
525
|
+
|
|
526
|
+
- `mc change --package <id> --bump patch --caused-by monochange_core --reason "update dependency"`
|
|
527
|
+
- `mc change --package <id> --bump none --caused-by sdk --reason "dependency-only follow-up"`
|
|
528
|
+
|
|
529
|
+
<!-- {/changesetCausedByField} -->
|