Skip to content

Commit 40cf978

Browse files
committed
chore: add writing-changesets AI skill
1 parent b149015 commit 40cf978

File tree

2 files changed

+112
-11
lines changed

2 files changed

+112
-11
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
name: writing-changesets
3+
description: Create changeset files for user-facing changes. Use when making schema changes, modifying types, or any change that affects package consumers.
4+
---
5+
6+
# Writing Changesets
7+
8+
Create a changeset file to document user-facing changes for release.
9+
10+
## When to Use
11+
12+
Add a changeset when making changes that affect consumers:
13+
14+
- Adding new lexicons
15+
- Modifying existing lexicon schemas (breaking or non-breaking)
16+
- Changing TypeScript type exports
17+
- Renaming any exported constants, types, or functions
18+
- Modifying generation scripts that affect exported code
19+
- Any change that requires a version bump or affects package consumers
20+
21+
Skip changesets for internal changes (build scripts, documentation only).
22+
23+
## Format
24+
25+
Create in `.changeset/` a Markdown file with a descriptive name (e.g.,
26+
`add-attachment-outcome-types.md`) in this format:
27+
28+
```markdown
29+
---
30+
"@hypercerts-org/lexicon": minor
31+
---
32+
33+
Add new attachment and outcome record types to support rich media claims
34+
```
35+
36+
### Frontmatter Fields
37+
38+
There should be a frontmatter field for each package being changed.
39+
The field name should be the package name, and the field value should
40+
be one of the following change types:
41+
42+
- `patch` - Bug fixes, non-breaking changes
43+
- `minor` - New features, non-breaking additions (also breaking
44+
changes if the version in `package.json` is still 0.x.y)
45+
- `major` - Breaking changes (_ONLY_ use if the version in `package.json`
46+
is already greater than 0.x.y)
47+
48+
### Description
49+
50+
In the body after the frontmatter field(s), write a clear, concise
51+
description following conventional commit style. Focus on what changed
52+
and why.
53+
54+
## Example Changesets
55+
56+
**New lexicon type:**
57+
58+
```markdown
59+
---
60+
"@hypercerts-org/lexicon": minor
61+
---
62+
63+
Add attachment record type for supporting rich media evidence on claims
64+
```
65+
66+
**Schema change:**
67+
68+
```markdown
69+
---
70+
"@hypercerts-org/lexicon": minor
71+
---
72+
73+
Convert location field to locations array across activity, evaluation, and measurement records
74+
```
75+
76+
**Breaking change when package version is 1.x.y:**
77+
78+
```markdown
79+
---
80+
"@hypercerts-org/lexicon": major
81+
---
82+
83+
Rename evidence record to attachment and outcome, requiring migration of existing records
84+
```
85+
86+
**Breaking change when package version is 0.x.y:**
87+
88+
```markdown
89+
---
90+
"@hypercerts-org/lexicon": minor
91+
---
92+
93+
Rename evidence record to attachment and outcome, requiring migration of existing records
94+
```
95+
96+
## Key Files
97+
98+
- `.changeset/config.json` - Changeset configuration
99+
- Existing changeset files in `.changeset/` - Reference for naming and format
100+
- `package.json` - Contains version and release scripts

AGENTS.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,22 +265,23 @@ npm run check
265265
- The `.prettierignore` excludes `generated/` and `dist/` since they're auto-generated
266266
- The `.gitignore` excludes `generated/` and `dist/` to keep the repo clean
267267

268+
## Changesets
269+
270+
This repository uses
271+
[Changesets](https://github.com/changesets/changesets) for versioning.
272+
268273
### ⚠️ CHANGESET REQUIREMENTS (MANDATORY)
269274

270275
**AI agents MUST create a changeset file** for ANY of the following changes:
271276

272-
- ✅ Adding new lexicons
273-
- ✅ Modifying existing lexicon schemas (breaking or non-breaking)
274-
- ✅ Changing TypeScript type exports
275-
- ✅ Renaming any exported constants, types, or functions
276-
- ✅ Modifying generation scripts that affect exported code
277-
- ✅ Any change that requires a version bump or affects package consumers
278-
279-
**How to create a changeset** (AI agents):
277+
- Adding new lexicons
278+
- Modifying existing lexicon schemas (breaking or non-breaking)
279+
- Changing TypeScript type exports
280+
- Renaming any exported constants, types, or functions
281+
- Modifying generation scripts that affect exported code
282+
- Any change that requires a version bump or affects package consumers
280283

281-
1. Create a new `.md` file in `.changeset/` directory
282-
2. Use format shown in "Versioning" section
283-
3. DO NOT use the interactive `npm run changeset` command
284+
Use the `writing-changesets` skill for writing changesets.
284285

285286
**Example scenarios requiring changesets:**
286287

0 commit comments

Comments
 (0)