@imix-js/taproot 0.8.7 → 0.8.8

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 (2) hide show
  1. package/package.json +1 -1
  2. package/skills/release.md +130 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imix-js/taproot",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "AI-driven specs, enforced at commit time. Code without traceability doesn't merge.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,130 @@
1
+ # Skill: release
2
+
3
+ ## Description
4
+
5
+ Run the taproot maintainer's local release phase: pre-flight checks, changelog generation, version bump, commit, tag, and push. Triggers GitHub Actions CI to build, gate on approval, and publish. Not distributed to user projects.
6
+
7
+ ## Inputs
8
+
9
+ - `bump` (required): Version bump type — `patch`, `minor`, or `major`.
10
+
11
+ ## Steps
12
+
13
+ 1. Confirm `bump` is one of `patch`, `minor`, `major`. If missing or invalid, report: "Usage: `/tr-release patch|minor|major`" and stop.
14
+
15
+ 2. **Pre-flight checks** — run `npm run preflight -- <bump>`. This script runs all checks in order and stops on the first failure:
16
+ - Branch is up to date with origin/main
17
+ - Tests pass (`npm test`)
18
+ - No high-severity audit vulnerabilities
19
+ - Build succeeds (`npm run build`)
20
+ - `taproot validate-structure` clean
21
+ - `taproot sync-check` clean (errors only; warnings are acceptable)
22
+ - All implementations complete or deferred (`taproot coverage --show-incomplete` to diagnose)
23
+ - Working tree clean
24
+ - Next version computed (v\<current\> → v\<next\>) and tag v\<next\> available
25
+
26
+ If the script exits non-zero, it prints the failing check and what to fix. Do not proceed until it exits 0.
27
+
28
+ **If the coverage check fails:** run `taproot coverage --show-incomplete` to list the impls. Either complete them or set their `**State:**` to `deferred` in their `impl.md` if the work is intentionally punted. Commit the state change, then re-run preflight.
29
+
30
+ Extract v\<next\> from the final line of the script output.
31
+
32
+ Report: "✓ All pre-flight checks passed. Releasing v\<next\>."
33
+
34
+ 3. **Changelog generation** — run `git describe --tags --abbrev=0 2>/dev/null` to find the most recent tag. If no tags exist (first release), use the full history.
35
+
36
+ Run `git log <last-tag>..HEAD --oneline --no-merges` (or `git log --oneline --no-merges` for first release) to collect commits.
37
+
38
+ Group commits into sections (omit empty sections):
39
+ - Commits matching `taproot(...)`: ...` → **Taproot**
40
+ - Commits starting with `feat:` or `feat(` → **Features**
41
+ - Commits starting with `fix:` or `fix(` → **Bug Fixes**
42
+ - Commits starting with `docs:` or `chore:` → **Maintenance**
43
+ - All remaining commits → **Other**
44
+
45
+ Format today's date as `YYYY-MM-DD`. Draft the changelog entry:
46
+ ```
47
+ ## [<next>] - <today>
48
+
49
+ ### Taproot
50
+ - taproot(scope/path): message (abc1234)
51
+
52
+ ### Features
53
+ - feat: description (def5678)
54
+ ```
55
+
56
+ Present the entry in the conversation and ask:
57
+ > Review changelog for v\<next\>. **[Y]** proceed · **[E]** edit `CHANGELOG.md` directly then reply Y · **[Q]** abort
58
+
59
+ - **[Q]**: report "Release aborted — no files modified." and stop.
60
+ - **[E]**: wait for the user to confirm they have finished editing, then re-read the edited `CHANGELOG.md` entry.
61
+ - **[Y]**: write the entry to `CHANGELOG.md`:
62
+ - If `CHANGELOG.md` does not exist, create it:
63
+ ```
64
+ # Changelog
65
+
66
+ All notable changes to taproot are documented here.
67
+
68
+ <!-- entries below -->
69
+
70
+ <entry>
71
+ ```
72
+ - If `CHANGELOG.md` exists and contains `<!-- entries below -->`, insert the new entry on the line immediately after that marker.
73
+ - If `CHANGELOG.md` exists but has no marker, prepend the entry after the first blank line following the `# Changelog` heading.
74
+
75
+ 4. **Version bump** — update the `version` field in both `package.json` and `channels/vscode/package.json` to `<next>`. Write each file with the same formatting (2-space indent, trailing newline). Verify by re-reading both files.
76
+
77
+ 5. **Commit** — this is a **plain commit** (message `chore: release v<next>` does not match the `taproot(<scope>):` pattern). The taproot pre-commit hook classifies it as plain and runs no DoD or DoR conditions. Stage and commit:
78
+ ```
79
+ git add package.json channels/vscode/package.json CHANGELOG.md
80
+ git commit -m "chore: release v<next>"
81
+ ```
82
+ If the commit is blocked by the pre-commit hook, report the hook output verbatim and stop. Do not bypass the hook (`--no-verify`).
83
+
84
+ 6. **Tag** — create the release tag:
85
+ ```
86
+ git tag v<next>
87
+ ```
88
+
89
+ 7. **Push** — push the commit and tag to origin:
90
+ ```
91
+ git push origin main && git push origin v<next>
92
+ ```
93
+ If the push fails, report: "local commit ✓ · local tag `v<next>` ✓ — push failed: `<error>`. Retry with: `git push origin main && git push origin v<next>`" and stop.
94
+
95
+ 8. Report release initiated:
96
+ ```
97
+ ✓ Local phase complete.
98
+
99
+ Tag v<next> pushed to origin/main — GitHub Actions CI workflow triggered.
100
+
101
+ Monitor: gh run watch
102
+ Approve: github.com/<owner>/taproot/actions (approve the 'release' environment after CI passes)
103
+
104
+ The npm publish and GitHub release will complete after you approve the deployment.
105
+ ```
106
+
107
+ 💡 If this session is getting long, consider running `/compact` or starting a fresh context before monitoring CI.
108
+
109
+ **Next:** `gh run watch` — monitor CI; approve the `release` environment deployment when checks pass
110
+
111
+ ## Output
112
+
113
+ - `package.json` version bumped to `<next>`
114
+ - `CHANGELOG.md` entry added for `<next>`
115
+ - Release commit on `origin/main` with message `chore: release v<next>`
116
+ - Git tag `v<next>` on `origin/main`
117
+ - GitHub Actions `release.yml` workflow triggered and awaiting CI checks + maintainer approval
118
+
119
+ ## CLI Dependencies
120
+
121
+ - `git`
122
+ - `npm`
123
+ - `npx taproot`
124
+
125
+ ## Notes
126
+
127
+ - This skill is for the taproot maintainer only. It is not listed in `SKILL_FILES` in `src/commands/init.ts` and is never distributed to user projects by `taproot update`.
128
+ - The CI phase (build, `npm publish --provenance`, GitHub release) runs automatically in `.github/workflows/release.yml` after the tag is pushed and the maintainer approves the `release` GitHub Environment deployment.
129
+ - If CI fails after the tag is pushed: fix the issue, delete the tag, and re-run — `git push origin :v<next> && git tag -d v<next>`.
130
+ - If you need to abort after pushing but before CI approval: delete the remote and local tag — npm publish has not run at that point.