@zalom/plastic 1.0.0-alpha.30 → 1.0.0-alpha.32
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
CHANGED
|
@@ -9,7 +9,8 @@ require "time"
|
|
|
9
9
|
# (intent 60).
|
|
10
10
|
#
|
|
11
11
|
# An intent is born complete when its frontmatter carries every required field
|
|
12
|
-
# and its `sources` and `chain` are well-formed arrays of Folgezettel id
|
|
12
|
+
# and its `sources` and `chain` are well-formed arrays of Folgezettel id references
|
|
13
|
+
# (bare ids like `1a2`, or cross-store refs like `global:1a2`; integer ids are coerced).
|
|
13
14
|
# This module is the only definition of that contract; the `validate-intent` CLI,
|
|
14
15
|
# the doctor diagnostics, and the creating-intent skill all consult it so the
|
|
15
16
|
# definition never drifts across copies.
|
|
@@ -28,11 +29,11 @@ module IntentValidator
|
|
|
28
29
|
|
|
29
30
|
# Folgezettel id form: digits then an optional lowercase-letter/digit suffix
|
|
30
31
|
# (for example "14", "14a", "4a1"). Mirrors scripts/folgezettel-id.
|
|
31
|
-
ID_PATTERN = /\A
|
|
32
|
+
ID_PATTERN = /\A([a-z0-9-]+:)?\d+[a-z0-9]*\z/
|
|
32
33
|
|
|
33
34
|
# True iff `value` is a String matching the Folgezettel id form.
|
|
34
35
|
def valid_id?(value)
|
|
35
|
-
value.
|
|
36
|
+
value.to_s.match?(ID_PATTERN)
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
# Read a file's YAML frontmatter, returning the parsed Hash (or {} when the
|
|
@@ -6,7 +6,7 @@ description: Use when merging a feature branch to main and tagging a release, bu
|
|
|
6
6
|
# Releasing
|
|
7
7
|
|
|
8
8
|
Merge, bump, tag, push. Annotated tags with changelogs. Semantic versioning.
|
|
9
|
-
Project configuration drives the workflow
|
|
9
|
+
Project configuration drives the workflow - no hardcoded assumptions.
|
|
10
10
|
|
|
11
11
|
## Checklist
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ Project configuration drives the workflow — no hardcoded assumptions.
|
|
|
18
18
|
- [ ] Create annotated tag
|
|
19
19
|
- [ ] Push to remote with tags
|
|
20
20
|
- [ ] Run post-push actions (GitHub release, npm publish, etc.)
|
|
21
|
+
- [ ] Verify release sync (npm dist-tag, GitHub "Latest", git tag all show the new version)
|
|
21
22
|
- [ ] Complete active intent
|
|
22
23
|
|
|
23
24
|
## Workflow
|
|
@@ -26,9 +27,9 @@ Project configuration drives the workflow — no hardcoded assumptions.
|
|
|
26
27
|
|
|
27
28
|
Before anything else, determine which project we are releasing and load its config.
|
|
28
29
|
|
|
29
|
-
1. Read `~/.plastic/projects.yml`
|
|
30
|
+
1. Read `~/.plastic/projects.yml` - find the project whose `path` matches the current working directory.
|
|
30
31
|
2. Extract the project slug (the key under `projects:`).
|
|
31
|
-
3. Read `~/.plastic/projects/{slug}/project.yml`
|
|
32
|
+
3. Read `~/.plastic/projects/{slug}/project.yml` - this contains the `release:` section.
|
|
32
33
|
|
|
33
34
|
Expected `release:` keys in project.yml:
|
|
34
35
|
|
|
@@ -37,8 +38,9 @@ release:
|
|
|
37
38
|
verify: "bin/rails test" # command to run before release
|
|
38
39
|
version_file: package.json # single file containing the version
|
|
39
40
|
version_files: # multiple files (overrides version_file)
|
|
40
|
-
- package.json
|
|
41
|
-
- .claude-plugin/plugin.json
|
|
41
|
+
- package.json # list EVERY file carrying the version;
|
|
42
|
+
- .claude-plugin/plugin.json # they must all be bumped together or they drift
|
|
43
|
+
- .claude-plugin/marketplace.json
|
|
42
44
|
tag_format: "v{{version}}" # tag naming pattern ({{version}} is replaced)
|
|
43
45
|
on_green: # actions to run after push succeeds
|
|
44
46
|
- github_release
|
|
@@ -47,7 +49,7 @@ release:
|
|
|
47
49
|
on_red: stop # what to do if verification fails
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
**Fallback:** If no project.yml exists or it has no `release:` section, fall back to asking the user for each step
|
|
52
|
+
**Fallback:** If no project.yml exists or it has no `release:` section, fall back to asking the user for each step - verify command, version files, tag format, and post-push actions.
|
|
51
53
|
|
|
52
54
|
### 1. Verify Tests Pass
|
|
53
55
|
|
|
@@ -77,7 +79,7 @@ Pre-1.0: minor bumps for features, patch for fixes. No major until stable.
|
|
|
77
79
|
|
|
78
80
|
```bash
|
|
79
81
|
git checkout main
|
|
80
|
-
git merge <branch-name> --no-ff -m "feat: merge intent [ID]
|
|
82
|
+
git merge <branch-name> --no-ff -m "feat: merge intent [ID] - [description]"
|
|
81
83
|
```
|
|
82
84
|
|
|
83
85
|
Always `--no-ff` to preserve branch history in the merge commit.
|
|
@@ -94,7 +96,7 @@ Update the version string in each file, then commit:
|
|
|
94
96
|
|
|
95
97
|
```bash
|
|
96
98
|
git add <version-files>
|
|
97
|
-
git commit -m "chore: bump version to X.Y.Z
|
|
99
|
+
git commit -m "chore: bump version to X.Y.Z - [one-line summary]"
|
|
98
100
|
```
|
|
99
101
|
|
|
100
102
|
### 5. Create Annotated Tag
|
|
@@ -113,7 +115,7 @@ git log $(git describe --tags --abbrev=0)..HEAD --oneline --no-merges | grep -E
|
|
|
113
115
|
Create the tag with a multi-line message:
|
|
114
116
|
|
|
115
117
|
```bash
|
|
116
|
-
git tag -a <tag-name> -m "<tag-name>
|
|
118
|
+
git tag -a <tag-name> -m "<tag-name> - [release name]
|
|
117
119
|
|
|
118
120
|
- [changelog bullet points from feat/fix/refactor commits]"
|
|
119
121
|
```
|
|
@@ -133,9 +135,15 @@ Read `release.on_green` from project.yml. This is a list of actions to run after
|
|
|
133
135
|
Create a GitHub release from the tag:
|
|
134
136
|
|
|
135
137
|
```bash
|
|
136
|
-
gh release create <tag-name> --title "<tag-name>
|
|
138
|
+
gh release create <tag-name> --title "<tag-name> - [release name]" --latest --generate-notes --notes-start-tag <previous-tag>
|
|
137
139
|
```
|
|
138
140
|
|
|
141
|
+
`--latest` is REQUIRED. Pre-release (alpha/beta) tags are NOT auto-promoted to the "Latest"
|
|
142
|
+
badge by GitHub, so without it the Releases page keeps showing an older version as Latest while
|
|
143
|
+
the newest tag sits below it (a real sync drift we hit on the alpha line). Pass `--latest` on
|
|
144
|
+
every release so the newest one always carries the badge. Do NOT pass `--prerelease` unless you
|
|
145
|
+
specifically want the release hidden from Latest.
|
|
146
|
+
|
|
139
147
|
For the first release (no previous tag), write notes manually with `--notes "..."` instead.
|
|
140
148
|
|
|
141
149
|
#### `npm_publish`
|
|
@@ -168,6 +176,22 @@ If `on_green` contains an action not listed above, log it:
|
|
|
168
176
|
|
|
169
177
|
If `on_green` is empty or absent: skip post-push actions entirely.
|
|
170
178
|
|
|
179
|
+
#### Verify sync (always, after the post-push actions)
|
|
180
|
+
|
|
181
|
+
A release is not done until all three surfaces show the SAME newest version. Confirm:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
npm view <package> dist-tags # channel tag (alpha/beta/latest) -> new version
|
|
185
|
+
gh release list --limit 1 # newest release is the new tag AND marked "Latest"
|
|
186
|
+
git ls-remote --tags origin | grep <tag-name> # the tag reached the remote
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
If the GitHub "Latest" badge is on an older tag (the common drift), fix it without re-releasing:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
gh release edit <tag-name> --latest
|
|
193
|
+
```
|
|
194
|
+
|
|
171
195
|
### 8. Complete Active Intent
|
|
172
196
|
|
|
173
197
|
A release IS a delivery. The active intent that drove this work must be completed as part of the release process. This is NOT optional.
|
|
@@ -179,18 +203,21 @@ A release IS a delivery. The active intent that drove this work must be complete
|
|
|
179
203
|
c. Update `## Insights` with final observations
|
|
180
204
|
d. Move from `## Active` to `## Completed` in INDEX.md (with today's date)
|
|
181
205
|
e. Update clusters to show `_(completed)_`
|
|
182
|
-
3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID>
|
|
206
|
+
3. Auto-commit: `cd ~/.plastic && git add . && git commit -m "feat: complete intent <ID> - delivered in <tag-name>"`
|
|
183
207
|
|
|
184
|
-
**If no active intent exists for this release**, that itself is a problem
|
|
208
|
+
**If no active intent exists for this release**, that itself is a problem - work happened outside the intent system. Log it and move on, but flag it.
|
|
185
209
|
|
|
186
210
|
## Conventions
|
|
187
211
|
|
|
188
|
-
- **Annotated tags only**
|
|
189
|
-
- **Tag format**
|
|
190
|
-
- **Tag message**
|
|
191
|
-
- **Commit prefixes**
|
|
192
|
-
- **
|
|
193
|
-
- **
|
|
212
|
+
- **Annotated tags only** - `git tag -a`, never lightweight tags
|
|
213
|
+
- **Tag format** - driven by `release.tag_format` in project.yml (default: `vX.Y.Z`)
|
|
214
|
+
- **Tag message** - first line: `<tag> - [short name]`, then blank line, then bullet changelog
|
|
215
|
+
- **Commit prefixes** - `feat:`, `fix:`, `refactor:`, `chore:`, `docs:` (conventional commits)
|
|
216
|
+
- **Hyphens, never em-dashes** - in tag names, release titles, and commit messages, use a hyphen (`-`). Never an em-dash.
|
|
217
|
+
- **Latest badge** - always `gh release create --latest`; the newest release must carry GitHub's "Latest" badge.
|
|
218
|
+
- **Version files** - driven by project.yml; list and bump EVERY file carrying the version (they drift otherwise)
|
|
219
|
+
- **Verify sync** - after pushing, confirm npm dist-tag, GitHub "Latest", and the git tag all show the new version
|
|
220
|
+
- **Branch cleanup** - delete merged feature branches: `git branch -d <branch>`
|
|
194
221
|
|
|
195
222
|
## Promotion
|
|
196
223
|
|
|
@@ -215,7 +242,7 @@ plastic-releasing --promote stable # promotes current beta → stable
|
|
|
215
242
|
For repos without prior tags, tag historical releases:
|
|
216
243
|
|
|
217
244
|
```bash
|
|
218
|
-
git tag -a v0.1.0 <commit-sha> -m "v0.1.0
|
|
245
|
+
git tag -a v0.1.0 <commit-sha> -m "v0.1.0 - [description]"
|
|
219
246
|
```
|
|
220
247
|
|
|
221
248
|
Use `git log --oneline` to find the right commits (look for version bump commits or major feature merges).
|