@yandy-r/ycc-opencode 6.4.0 → 6.6.0
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/README.md +11 -4
- package/agents/code-finder.md +1 -1
- package/agents/planner.md +1 -2
- package/agents/pr-evidence-collector.md +99 -0
- package/agents/root-cause-analyzer.md +1 -1
- package/index.js +9 -0
- package/package.json +1 -1
- package/registration.json +67 -0
- package/shared/references/branching-model.md +2 -1
- package/shared/references/standalone-dispatch.md +4 -1
- package/shared/references/target-capability-matrix.md +170 -30
- package/shared/references/worktree-strategy.md +9 -31
- package/shared/scripts/lib/ci-classify.sh +2 -2
- package/shared/scripts/release-feature-sets.sh +18 -0
- package/shared/scripts/release_feature_sets.py +232 -0
- package/shared/scripts/setup-worktree.sh +2 -69
- package/skills/bundle-author/references/surface-map.md +1 -1
- package/skills/bundle-author/references/when-not-to-scaffold.md +1 -1
- package/skills/bundle-author/scripts/scaffold-skill.sh +9 -0
- package/skills/bundle-release/SKILL.md +22 -5
- package/skills/bundle-release/references/release-checklist.md +9 -1
- package/skills/bundle-release/references/version-policy.md +11 -4
- package/skills/bundle-release/scripts/release_versions.py +19 -1
- package/skills/code-report/SKILL.md +0 -2
- package/skills/code-report/templates/report-structure.md +0 -2
- package/skills/compatibility-audit/SKILL.md +8 -4
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +75 -5
- package/skills/compatibility-audit/scripts/audit-target-features.sh +15 -9
- package/skills/feature-research/SKILL.md +1 -1
- package/skills/feature-research/scripts/validate-spec.sh +0 -4
- package/skills/formatters/SKILL.md +2 -1
- package/skills/formatters/references/flag-reference.md +8 -4
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +189 -23
- package/skills/formatters/references/templates/lint.yml.tmpl +11 -11
- package/skills/formatters/references/templates/readme-section.md.tmpl +1 -1
- package/skills/formatters/scripts/bundle/go-tools.sh +73 -41
- package/skills/formatters/scripts/bundle/init-formatters.sh +1 -1
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +0 -5
- package/skills/formatters/scripts/bundle/style.sh +2 -2
- package/skills/git-cleanup/SKILL.md +4 -5
- package/skills/git-workflow/SKILL.md +1 -0
- package/skills/git-workflow/templates/agent-prompts.md +5 -6
- package/skills/git-workflow/templates/documentation-decision.md +1 -3
- package/skills/git-workflow/templates/pr-template.md +1 -3
- package/skills/go-patterns/references/design-and-tooling.md +16 -13
- package/skills/go-testing/references/advanced-testing.md +2 -2
- package/skills/implement-plan/references/agent-task-prompt.md +18 -20
- package/skills/implement-plan/scripts/parse-dependencies.sh +3 -9
- package/skills/init/references/conventional-commits.md +8 -1
- package/skills/init/references/template-library.md +1 -1
- package/skills/init/templates/git/gitignore.tmpl +2 -0
- package/skills/init/templates/git/gitmessage.tmpl +2 -1
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +1 -1
- package/skills/orchestrate/SKILL.md +1 -1
- package/skills/orchestrate/references/dispatch-playbook.md +1 -1
- package/skills/parallel-plan/SKILL.md +6 -10
- package/skills/plan-workflow/SKILL.md +3 -3
- package/skills/plan-workflow/references/plan-structure.md +1 -3
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +2 -8
- package/skills/pr-evidence/SKILL.md +138 -0
- package/skills/pr-evidence/references/perf-evidence.md +119 -0
- package/skills/pr-evidence/references/pr-body-and-hosting.md +112 -0
- package/skills/pr-evidence/references/ui-evidence.md +152 -0
- package/skills/pr-evidence/scripts/bench_report.py +331 -0
- package/skills/pr-evidence/scripts/capture-ui.mjs +311 -0
- package/skills/pr-evidence/scripts/classify-change.sh +135 -0
- package/skills/prp-plan/SKILL.md +4 -5
- package/skills/prp-plan/scripts/validate-prp-plan.sh +1 -11
- package/skills/prp-pr/SKILL.md +4 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +2 -1
- package/skills/releaser/SKILL.md +5 -1
- package/skills/releaser/references/ci-optimization-checklist.md +1 -1
- package/skills/releaser/references/ci-templates/docker-release.yml +8 -8
- package/skills/releaser/references/ci-templates/generic-release.yml +5 -5
- package/skills/releaser/references/ci-templates/go-release.yml +4 -4
- package/skills/releaser/references/ci-templates/node-release.yml +8 -8
- package/skills/releaser/references/ci-templates/python-release.yml +8 -8
- package/skills/releaser/references/ci-templates/rust-release.yml +10 -10
- package/skills/releaser/references/release-preparation.md +34 -15
- package/skills/rust-testing/references/advanced-testing.md +1 -1
- package/skills/shared-context/SKILL.md +6 -10
- package/skills/ts-testing/references/advanced-testing.md +4 -4
- package/skills/visual-recap/SKILL.md +3 -4
- package/shared/scripts/merge-children.sh +0 -82
- package/skills/write-docs/templates/docs-readme.md +0 -34
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# classify-change.sh — classify a branch's diff for pull-request evidence.
|
|
4
|
+
#
|
|
5
|
+
# Prints key=value lines that tell the pr-evidence skill which evidence a PR
|
|
6
|
+
# needs. The result is a hint: the agent confirms it against the diff before
|
|
7
|
+
# skipping or capturing anything.
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# classify-change.sh [--base <ref>] [--head <ref>]
|
|
11
|
+
#
|
|
12
|
+
# Output (stdout):
|
|
13
|
+
# base=<ref> resolved comparison base (merge-base with head)
|
|
14
|
+
# ui=0|1 user-visible UI files changed
|
|
15
|
+
# perf=0|1 performance intent or benchmark files changed
|
|
16
|
+
# ui_files=<n> count of UI files
|
|
17
|
+
# perf_reasons=<a,b,...> why perf=1 (commit-type, keyword, bench-files)
|
|
18
|
+
# kind=ui|perf|ui+perf|none
|
|
19
|
+
#
|
|
20
|
+
# Exit codes:
|
|
21
|
+
# 0 - classified
|
|
22
|
+
# 1 - usage error, not a git repository, or unknown ref
|
|
23
|
+
#
|
|
24
|
+
set -euo pipefail
|
|
25
|
+
|
|
26
|
+
_die() {
|
|
27
|
+
echo "classify-change.sh: error: $*" >&2
|
|
28
|
+
exit 1
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
BASE=""
|
|
32
|
+
HEAD_REF="HEAD"
|
|
33
|
+
while [[ $# -gt 0 ]]; do
|
|
34
|
+
case "$1" in
|
|
35
|
+
--base)
|
|
36
|
+
[[ $# -ge 2 && -n "$2" ]] || _die "--base needs a ref"
|
|
37
|
+
BASE="$2"
|
|
38
|
+
shift 2
|
|
39
|
+
;;
|
|
40
|
+
--head)
|
|
41
|
+
[[ $# -ge 2 && -n "$2" ]] || _die "--head needs a ref"
|
|
42
|
+
HEAD_REF="$2"
|
|
43
|
+
shift 2
|
|
44
|
+
;;
|
|
45
|
+
-h | --help)
|
|
46
|
+
sed -n '2,22p' "$0" | sed 's/^# \{0,1\}//'
|
|
47
|
+
exit 0
|
|
48
|
+
;;
|
|
49
|
+
*) _die "unknown argument: $1" ;;
|
|
50
|
+
esac
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
git rev-parse --git-dir >/dev/null 2>&1 || _die "not inside a git repository"
|
|
54
|
+
git rev-parse --verify --quiet "${HEAD_REF}^{commit}" >/dev/null || _die "unknown head ref: ${HEAD_REF}"
|
|
55
|
+
|
|
56
|
+
if [[ -z "$BASE" ]]; then
|
|
57
|
+
default_ref="$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || true)"
|
|
58
|
+
for candidate in "$default_ref" origin/main origin/master main master; do
|
|
59
|
+
if [[ -n "$candidate" ]] && git rev-parse --verify --quiet "${candidate}^{commit}" >/dev/null; then
|
|
60
|
+
BASE="$candidate"
|
|
61
|
+
break
|
|
62
|
+
fi
|
|
63
|
+
done
|
|
64
|
+
[[ -n "$BASE" ]] || _die "cannot find a base branch; pass --base <ref>"
|
|
65
|
+
fi
|
|
66
|
+
git rev-parse --verify --quiet "${BASE}^{commit}" >/dev/null || _die "unknown base ref: ${BASE}"
|
|
67
|
+
|
|
68
|
+
MERGE_BASE="$(git merge-base "$BASE" "$HEAD_REF")" || _die "no merge base between ${BASE} and ${HEAD_REF}"
|
|
69
|
+
|
|
70
|
+
FILES="$(git diff --name-only --diff-filter=ACMR "$MERGE_BASE" "$HEAD_REF")"
|
|
71
|
+
SUBJECTS="$(git log --format='%s%n%b' "${MERGE_BASE}..${HEAD_REF}")"
|
|
72
|
+
BRANCH="$(git rev-parse --abbrev-ref "$HEAD_REF" 2>/dev/null || true)"
|
|
73
|
+
|
|
74
|
+
# UI: markup, styles, components and visual assets; tests and stories excluded.
|
|
75
|
+
UI_EXT_RE='\.(css|scss|sass|less|styl|pcss|tsx|jsx|vue|svelte|astro|html|htm|hbs|ejs|erb|liquid|twig|njk|razor|cshtml|xaml|swift|kt|dart)$'
|
|
76
|
+
UI_DIR_RE='(^|/)(components|pages|app|views|layouts|templates|ui|styles|theme|screens|widgets)/'
|
|
77
|
+
UI_CFG_RE='(^|/)(tailwind|postcss|uno|panda)\.config\.[a-z]+$'
|
|
78
|
+
UI_ASSET_RE='(^|/)(public|static|assets)/.*\.(svg|png|jpe?g|webp|gif|ico|woff2?)$'
|
|
79
|
+
TEST_RE='(^|/)(__tests__|tests?|e2e|spec|__snapshots__)/|\.(test|spec|stories|story)\.[a-z]+$'
|
|
80
|
+
NATIVE_RE='\.(swift|kt|dart|xaml)$'
|
|
81
|
+
|
|
82
|
+
ui_files=0
|
|
83
|
+
while IFS= read -r f; do
|
|
84
|
+
[[ -n "$f" ]] || continue
|
|
85
|
+
[[ "$f" =~ $TEST_RE ]] && continue
|
|
86
|
+
if [[ "$f" =~ $UI_CFG_RE || "$f" =~ $UI_ASSET_RE ]]; then
|
|
87
|
+
ui_files=$((ui_files + 1))
|
|
88
|
+
elif [[ "$f" =~ $UI_EXT_RE ]]; then
|
|
89
|
+
# Native-language sources count only inside a UI directory.
|
|
90
|
+
if [[ "$f" =~ $NATIVE_RE && ! "$f" =~ $UI_DIR_RE ]]; then
|
|
91
|
+
continue
|
|
92
|
+
fi
|
|
93
|
+
ui_files=$((ui_files + 1))
|
|
94
|
+
fi
|
|
95
|
+
done <<<"$FILES"
|
|
96
|
+
|
|
97
|
+
perf_reasons=()
|
|
98
|
+
if grep -Eiq '^perf(\([^)]*\))?!?:' <<<"$SUBJECTS"; then
|
|
99
|
+
perf_reasons+=("commit-type")
|
|
100
|
+
fi
|
|
101
|
+
if grep -Eiq '(^|[^[:alnum:]])(perf|performance|optimi[sz](e|ed|es|ing|ation)|faster|speed ?up|latency|throughput|benchmarks?|hot ?path|allocations?|memory usage)([^[:alnum:]]|$)' <<<"${SUBJECTS}"$'\n'"${BRANCH}"; then
|
|
102
|
+
perf_reasons+=("keyword")
|
|
103
|
+
fi
|
|
104
|
+
if grep -Eiq '(^|/)(benches|benchmarks?|perf)/|(_bench|\.bench|_benchmark|bench_)[^/]*$' <<<"$FILES"; then
|
|
105
|
+
perf_reasons+=("bench-files")
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
ui=0
|
|
109
|
+
[[ "$ui_files" -gt 0 ]] && ui=1
|
|
110
|
+
perf=0
|
|
111
|
+
[[ ${#perf_reasons[@]} -gt 0 ]] && perf=1
|
|
112
|
+
|
|
113
|
+
kind="none"
|
|
114
|
+
if [[ "$ui" -eq 1 && "$perf" -eq 1 ]]; then
|
|
115
|
+
kind="ui+perf"
|
|
116
|
+
elif [[ "$ui" -eq 1 ]]; then
|
|
117
|
+
kind="ui"
|
|
118
|
+
elif [[ "$perf" -eq 1 ]]; then
|
|
119
|
+
kind="perf"
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
reasons=""
|
|
123
|
+
if [[ ${#perf_reasons[@]} -gt 0 ]]; then
|
|
124
|
+
reasons="$(
|
|
125
|
+
IFS=,
|
|
126
|
+
echo "${perf_reasons[*]}"
|
|
127
|
+
)"
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
printf 'base=%s\n' "$BASE"
|
|
131
|
+
printf 'ui=%s\n' "$ui"
|
|
132
|
+
printf 'perf=%s\n' "$perf"
|
|
133
|
+
printf 'ui_files=%s\n' "$ui_files"
|
|
134
|
+
printf 'perf_reasons=%s\n' "$reasons"
|
|
135
|
+
printf 'kind=%s\n' "$kind"
|
package/skills/prp-plan/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ Extract flags from `$ARGUMENTS`:
|
|
|
30
30
|
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
31
|
| `--parallel` | Fan out research into 3 **standalone sub-agent** researchers; emit tasks with batch/dependency annotations. Works in opencode, Cursor, and Codex. |
|
|
32
32
|
| `--worktree` | (legacy — now default; safe to omit) Worktree annotations are emitted by default. Accepted as a silent no-op so existing pipelines continue to work. |
|
|
33
|
-
| `--no-worktree` | Opt out of worktree annotations. The plan will not contain a `## Worktree Setup` section
|
|
33
|
+
| `--no-worktree` | Opt out of worktree annotations. The plan will not contain a `## Worktree Setup` section. |
|
|
34
34
|
| `--enhanced` | Enhanced research mode: grow the research fan-out from 3 to 7 specialized researchers (api/business/tech/ux/security/practices/recommendations — same coverage as feature-research). Output is still a single PRP-compliant plan file. Composes with --parallel (default) (Claude Code only), and --no-worktree. |
|
|
35
35
|
| `--visual` | Render the finished plan as an Agent-Native visual artifact (MDX) via `visual-plan`; local-files by default, hosted shareable link requires `--share`. |
|
|
36
36
|
| `--store=local\|linear` | Artifact-store override; strip it before interpreting the feature description or input path and forward it to every resolver and visual-plan call. |
|
|
@@ -147,7 +147,7 @@ Dispatch a single `prp-researcher` agent via the `subagent` tool, in codebase mo
|
|
|
147
147
|
|
|
148
148
|
By default (`WORKTREE_MODE=true`), append the following directive to the researcher prompt. Omit when `--no-worktree` was passed (`WORKTREE_MODE=false`):
|
|
149
149
|
|
|
150
|
-
> **WORKTREE MODE:** The plan you are helping to build will include worktree annotations. In the emitted plan, include a `## Worktree Setup` section with a single `**Parent**:` line naming the feature worktree
|
|
150
|
+
> **WORKTREE MODE:** The plan you are helping to build will include worktree annotations. In the emitted plan, include a `## Worktree Setup` section with a single `**Parent**:` line naming the feature worktree. All tasks (parallel and sequential) share this one feature worktree path. Follow `{{package-root}}/shared/references/worktree-strategy.md` for the naming scheme and annotation format.
|
|
151
151
|
|
|
152
152
|
### Path B — Three standalone researchers (`PARALLEL_MODE=true`)
|
|
153
153
|
|
|
@@ -189,7 +189,7 @@ Define:
|
|
|
189
189
|
|
|
190
190
|
## Phase 6 — GENERATE
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
Write the plan progressively in chunks to avoid timeouts.
|
|
193
193
|
|
|
194
194
|
Now that the dry-run exit is past, in linear mode apply the Linear call gate before ensuring the plan destination:
|
|
195
195
|
|
|
@@ -219,7 +219,6 @@ If `ENHANCED_MODE=true`, also read `{{package-root}}/skills/prp-plan/references/
|
|
|
219
219
|
2. **Edit/append** the Patterns to Mirror section (populated from researcher discovery tables)
|
|
220
220
|
3. **Edit/append** the Files to Change + NOT Building sections
|
|
221
221
|
4. **Edit/append** the Step-by-Step Tasks section (this is usually the largest — keep each task description concise)
|
|
222
|
-
- All tasks (parallel and sequential) share the single feature worktree. Do NOT add per-task `- **Worktree**: ...` annotation lines.
|
|
223
222
|
5. **Edit/append** the Testing Strategy, Validation Commands, Acceptance Criteria, Completion Checklist, Risks, and Notes sections
|
|
224
223
|
|
|
225
224
|
Each chunk should be a separate Write or Edit call. This prevents any single generation from being too large.
|
|
@@ -236,7 +235,7 @@ Use the feature slug resolved in Phase 1 for `<feature-slug>` (never derive it f
|
|
|
236
235
|
- **Parent**: <repo-root>/.opencode/worktrees/<repo>-<feature-slug>/ (branch: feat/<feature-slug>)
|
|
237
236
|
```
|
|
238
237
|
|
|
239
|
-
All tasks — parallel and sequential — share this one feature worktree path.
|
|
238
|
+
All tasks — parallel and sequential — share this one feature worktree path.
|
|
240
239
|
|
|
241
240
|
> **Plan-file handoff**: in local mode, leave `$OUT` in the current checkout; the implementor (`prp-implement`) will **move** it into the feature worktree once created — do not pre-write or copy it there (see `worktree-strategy.md` §7). In linear mode, never move the cache; the implementor loads the plan from it via `/ycc:prp-implement --store=linear {resolved cached plan path or Linear Document URL}`.
|
|
242
241
|
|
|
@@ -156,8 +156,7 @@ RECOMMENDED_SECTIONS=(
|
|
|
156
156
|
|
|
157
157
|
# Optional sections: present → pass, absent → pass (no error, no warning).
|
|
158
158
|
# Add new optional sections here as the plan format evolves.
|
|
159
|
-
#
|
|
160
|
-
# default-on, but plans generated with --no-worktree skip the annotation.
|
|
159
|
+
# Worktree Setup: emitted by default, omitted by --no-worktree plans.
|
|
161
160
|
OPTIONAL_SECTIONS=(
|
|
162
161
|
"Worktree Setup"
|
|
163
162
|
)
|
|
@@ -225,12 +224,6 @@ if [[ $TASK_COUNT -gt 0 ]]; then
|
|
|
225
224
|
warning "No tasks have MIRROR fields"
|
|
226
225
|
fi
|
|
227
226
|
|
|
228
|
-
# Optional. Single worktree: per-task **Worktree** is not required; count is informational.
|
|
229
|
-
WORKTREE_FIELD_COUNT=$(grep -c '\*\*Worktree\*\*:' <<< "$CONTENT" || true)
|
|
230
|
-
if [[ $WORKTREE_FIELD_COUNT -gt 0 ]]; then
|
|
231
|
-
success "Per-task **Worktree** field(s) present: $WORKTREE_FIELD_COUNT (deprecated — not required)"
|
|
232
|
-
fi
|
|
233
|
-
|
|
234
227
|
# Self-containment heuristic: tasks with all 4 core fields
|
|
235
228
|
COMPLETE_TASKS=0
|
|
236
229
|
# Extract task blocks and check each
|
|
@@ -372,9 +365,6 @@ if [[ $TASK_COUNT -gt 0 ]]; then
|
|
|
372
365
|
echo " Batch fields: $BATCH_FIELD_COUNT"
|
|
373
366
|
echo " Batch table rows: $BATCH_TABLE_ROWS"
|
|
374
367
|
fi
|
|
375
|
-
if [[ ${WORKTREE_FIELD_COUNT:-0} -gt 0 ]]; then
|
|
376
|
-
echo " Worktree annotations: $WORKTREE_FIELD_COUNT"
|
|
377
|
-
fi
|
|
378
368
|
echo ""
|
|
379
369
|
fi
|
|
380
370
|
|
package/skills/prp-pr/SKILL.md
CHANGED
|
@@ -187,6 +187,10 @@ Use this default format:
|
|
|
187
187
|
|
|
188
188
|
Before creating the PR, run `pr-guard.sh backport-label --base <base> --title "<PR title>"` (add `--labels` when labels are known). On `backport=1`, ask `Backport to <branch>? (yes/no)`; on yes, add the printed label to the new PR and tell the user to run `/ycc:backport <PR#>` after it merges. Details: `{{package-root}}/shared/references/pr-base-and-backport.md#backport-prompt`.
|
|
189
189
|
|
|
190
|
+
### Review evidence
|
|
191
|
+
|
|
192
|
+
Before creating the PR, apply `{{package-root}}/skills/pr-evidence/SKILL.md`: it adds before/after UI screenshots or base-vs-branch benchmark graphs to the body (or a one-line skip reason) and the `--attach` flags for the create call below.
|
|
193
|
+
|
|
190
194
|
### Create the PR
|
|
191
195
|
|
|
192
196
|
PR creation is provider-aware. Detect the forge provider on `origin` first
|
|
@@ -40,7 +40,8 @@ The block below is read by tools; the table is generated from it. Change both wi
|
|
|
40
40
|
5. **No new long-lived branches.** Large work lands on `{{TRUNK}}` in small PRs. See
|
|
41
41
|
[Unfinished work](#unfinished-work).
|
|
42
42
|
6. **`{{TRUNK}}` is always releasable.** CI green, and nothing half-built reachable by users.
|
|
43
|
-
7. **
|
|
43
|
+
7. **A maintainer approves each release once** ("ship x.y.z to prod?"), following
|
|
44
|
+
[Releasing](#releasing). After that approval, agents may tag, publish and cut the release.
|
|
44
45
|
|
|
45
46
|
## Where does my change go?
|
|
46
47
|
|
package/skills/releaser/SKILL.md
CHANGED
|
@@ -43,7 +43,8 @@ Parse `$ARGUMENTS`:
|
|
|
43
43
|
|
|
44
44
|
- **version** (optional first positional) — target semver (`1.4.0`, `v1.4.0`, or a
|
|
45
45
|
pre-release like `1.4.0-rc.1`). If omitted, propose one from commit history
|
|
46
|
-
(
|
|
46
|
+
(feature-set bump: a `feat` commit requires a minor only once its feature set is
|
|
47
|
+
complete) and ask for confirmation before continuing.
|
|
47
48
|
- **--arch=\<list\>** — comma-separated target architectures (e.g. `amd64,arm64`).
|
|
48
49
|
Overrides language defaults.
|
|
49
50
|
- **--os=\<list\>** — comma-separated target operating systems
|
|
@@ -246,6 +247,9 @@ If a file cannot be read, say so.
|
|
|
246
247
|
Scripts (invoke as `{{package-root}}/skills/releaser/scripts/<name>`):
|
|
247
248
|
|
|
248
249
|
- `scripts/detect-project.sh` — Run when: Phase 1 detection (emits JSON).
|
|
250
|
+
- `{{package-root}}/shared/scripts/release-feature-sets.sh` — Run when:
|
|
251
|
+
Phase 2 version proposal or sanity check (groups `feat` commits into feature sets
|
|
252
|
+
and reports `required_bump`).
|
|
249
253
|
- `scripts/check-release-branch.sh` — Run when: Phase 2 branch check after the
|
|
250
254
|
version is confirmed.
|
|
251
255
|
- `scripts/draft-changelog.sh` — Run when: Phase 4 notes drafting.
|
|
@@ -65,7 +65,7 @@ Findings emitted by the audit agent use this format:
|
|
|
65
65
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
|
|
66
66
|
| Language-specific setup actions use their built-in cache (`setup-node` cache input, `setup-python` cache input, cargo cache via `Swatinem/rust-cache`, Go module cache via `actions/setup-go`) | high |
|
|
67
67
|
| Cache keys include lockfile hashes, not just OS | medium |
|
|
68
|
-
| Release artifacts use `actions/upload-artifact@
|
|
68
|
+
| Release artifacts use `actions/upload-artifact@v7` (Node 24; v4 and older run on Node 20) | high |
|
|
69
69
|
|
|
70
70
|
## 5. Build Matrix
|
|
71
71
|
|
|
@@ -31,16 +31,16 @@ jobs:
|
|
|
31
31
|
id-token: write # cosign keyless signing
|
|
32
32
|
attestations: write # SLSA provenance
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v7
|
|
35
35
|
|
|
36
36
|
- name: Set up QEMU
|
|
37
|
-
uses: docker/setup-qemu-action@
|
|
37
|
+
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 — TODO(releaser): verify latest SHA
|
|
38
38
|
|
|
39
39
|
- name: Set up Buildx
|
|
40
|
-
uses: docker/setup-buildx-action@
|
|
40
|
+
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 — TODO(releaser): verify latest SHA
|
|
41
41
|
|
|
42
42
|
- name: Login to GHCR
|
|
43
|
-
uses: docker/login-action@
|
|
43
|
+
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 — TODO(releaser): verify latest SHA
|
|
44
44
|
with:
|
|
45
45
|
registry: ${{ env.REGISTRY }}
|
|
46
46
|
username: ${{ github.actor }}
|
|
@@ -48,7 +48,7 @@ jobs:
|
|
|
48
48
|
|
|
49
49
|
- name: Extract metadata
|
|
50
50
|
id: meta
|
|
51
|
-
uses: docker/metadata-action@
|
|
51
|
+
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 — TODO(releaser): verify latest SHA
|
|
52
52
|
with:
|
|
53
53
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
54
54
|
tags: |
|
|
@@ -57,11 +57,11 @@ jobs:
|
|
|
57
57
|
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }}
|
|
58
58
|
|
|
59
59
|
- name: Install cosign
|
|
60
|
-
uses: sigstore/cosign-installer@
|
|
60
|
+
uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 — TODO(releaser): verify latest SHA
|
|
61
61
|
|
|
62
62
|
- name: Build and push
|
|
63
63
|
id: build
|
|
64
|
-
uses: docker/build-push-action@
|
|
64
|
+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 — TODO(releaser): verify latest SHA
|
|
65
65
|
with:
|
|
66
66
|
context: .
|
|
67
67
|
platforms: linux/amd64,linux/arm64 # TODO(releaser): trim to the --arch list
|
|
@@ -81,7 +81,7 @@ jobs:
|
|
|
81
81
|
echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
|
|
82
82
|
|
|
83
83
|
- name: Attest provenance
|
|
84
|
-
uses: actions/attest-build-provenance@
|
|
84
|
+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 — TODO(releaser): verify latest SHA
|
|
85
85
|
with:
|
|
86
86
|
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
87
87
|
subject-digest: ${{ steps.build.outputs.digest }}
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
permissions:
|
|
26
26
|
contents: read
|
|
27
27
|
steps:
|
|
28
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@v7
|
|
29
29
|
|
|
30
30
|
# TODO(releaser): add your toolchain setup here (e.g. actions/setup-<lang>).
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
find . -maxdepth 1 -type f -not -name 'SHA256SUMS*' -print0 \
|
|
42
42
|
| xargs -0 sha256sum > SHA256SUMS.txt
|
|
43
43
|
|
|
44
|
-
- uses: actions/upload-artifact@
|
|
44
|
+
- uses: actions/upload-artifact@v7
|
|
45
45
|
with:
|
|
46
46
|
name: dist
|
|
47
47
|
path: dist/
|
|
@@ -55,13 +55,13 @@ jobs:
|
|
|
55
55
|
permissions:
|
|
56
56
|
contents: write
|
|
57
57
|
steps:
|
|
58
|
-
- uses: actions/checkout@
|
|
59
|
-
- uses: actions/download-artifact@
|
|
58
|
+
- uses: actions/checkout@v7
|
|
59
|
+
- uses: actions/download-artifact@v8
|
|
60
60
|
with:
|
|
61
61
|
name: dist
|
|
62
62
|
path: dist/
|
|
63
63
|
- name: Create release
|
|
64
|
-
uses: softprops/action-gh-release@
|
|
64
|
+
uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3.0.5 — TODO(releaser): verify latest SHA
|
|
65
65
|
with:
|
|
66
66
|
files: dist/*
|
|
67
67
|
body_path: docs/releases/${{ github.ref_name }}.md # TODO(releaser): adjust path if needed
|
|
@@ -27,20 +27,20 @@ jobs:
|
|
|
27
27
|
packages: write # for pushing container images if .goreleaser.yml defines `dockers:`
|
|
28
28
|
id-token: write # for cosign keyless signing
|
|
29
29
|
steps:
|
|
30
|
-
- uses: actions/checkout@
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
31
|
with:
|
|
32
32
|
fetch-depth: 0 # goreleaser needs full history for changelog generation
|
|
33
33
|
|
|
34
|
-
- uses: actions/setup-go@
|
|
34
|
+
- uses: actions/setup-go@v7
|
|
35
35
|
with:
|
|
36
36
|
go-version-file: 'go.mod'
|
|
37
37
|
cache: true
|
|
38
38
|
|
|
39
39
|
- name: Install cosign
|
|
40
|
-
uses: sigstore/cosign-installer@
|
|
40
|
+
uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 — TODO(releaser): verify latest SHA
|
|
41
41
|
|
|
42
42
|
- name: Run goreleaser
|
|
43
|
-
uses: goreleaser/goreleaser-action@
|
|
43
|
+
uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 — TODO(releaser): verify latest SHA
|
|
44
44
|
with:
|
|
45
45
|
distribution: goreleaser
|
|
46
46
|
version: '~> v2'
|
|
@@ -47,9 +47,9 @@ jobs:
|
|
|
47
47
|
arch: amd64
|
|
48
48
|
runner: windows-latest
|
|
49
49
|
steps:
|
|
50
|
-
- uses: actions/checkout@
|
|
50
|
+
- uses: actions/checkout@v7
|
|
51
51
|
|
|
52
|
-
- uses: actions/setup-node@
|
|
52
|
+
- uses: actions/setup-node@v7
|
|
53
53
|
with:
|
|
54
54
|
node-version-file: '.nvmrc' # TODO(releaser): or replace with `node-version: '20'`
|
|
55
55
|
cache: 'npm' # TODO(releaser): switch to 'pnpm' or 'yarn' as appropriate
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
find . -maxdepth 1 -type f \( -name '*.tgz' -o -name "${{ github.event.repository.name }}-*" \) -print0 \
|
|
72
72
|
| xargs -0 sha256sum > SHA256SUMS-${{ matrix.os }}-${{ matrix.arch }}.txt
|
|
73
73
|
|
|
74
|
-
- uses: actions/upload-artifact@
|
|
74
|
+
- uses: actions/upload-artifact@v7
|
|
75
75
|
with:
|
|
76
76
|
name: release-${{ matrix.os }}-${{ matrix.arch }}
|
|
77
77
|
path: |
|
|
@@ -90,8 +90,8 @@ jobs:
|
|
|
90
90
|
id-token: write # Required for npm Trusted Publishing (OIDC)
|
|
91
91
|
environment: release
|
|
92
92
|
steps:
|
|
93
|
-
- uses: actions/checkout@
|
|
94
|
-
- uses: actions/setup-node@
|
|
93
|
+
- uses: actions/checkout@v7
|
|
94
|
+
- uses: actions/setup-node@v7
|
|
95
95
|
with:
|
|
96
96
|
node-version-file: '.nvmrc'
|
|
97
97
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -112,13 +112,13 @@ jobs:
|
|
|
112
112
|
permissions:
|
|
113
113
|
contents: write # needed to upload release assets
|
|
114
114
|
steps:
|
|
115
|
-
- uses: actions/checkout@
|
|
116
|
-
- uses: actions/download-artifact@
|
|
115
|
+
- uses: actions/checkout@v7
|
|
116
|
+
- uses: actions/download-artifact@v8
|
|
117
117
|
with:
|
|
118
118
|
path: artifacts
|
|
119
119
|
merge-multiple: true
|
|
120
120
|
- name: Create release
|
|
121
|
-
uses: softprops/action-gh-release@
|
|
121
|
+
uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3.0.5 — TODO(releaser): verify latest SHA
|
|
122
122
|
with:
|
|
123
123
|
files: artifacts/*
|
|
124
124
|
body_path: docs/releases/${{ github.ref_name }}.md # TODO(releaser): adjust if notes live elsewhere
|
|
@@ -26,9 +26,9 @@ jobs:
|
|
|
26
26
|
permissions:
|
|
27
27
|
contents: read
|
|
28
28
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
29
|
+
- uses: actions/checkout@v7
|
|
30
30
|
|
|
31
|
-
- uses: actions/setup-python@
|
|
31
|
+
- uses: actions/setup-python@v7
|
|
32
32
|
with:
|
|
33
33
|
python-version: '3.12'
|
|
34
34
|
cache: 'pip'
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
cd dist
|
|
47
47
|
sha256sum * > SHA256SUMS.txt
|
|
48
48
|
|
|
49
|
-
- uses: actions/upload-artifact@
|
|
49
|
+
- uses: actions/upload-artifact@v7
|
|
50
50
|
with:
|
|
51
51
|
name: dist
|
|
52
52
|
path: dist/
|
|
@@ -64,12 +64,12 @@ jobs:
|
|
|
64
64
|
name: pypi
|
|
65
65
|
url: https://pypi.org/p/${{ github.event.repository.name }} # TODO(releaser): set to the real package name if it differs
|
|
66
66
|
steps:
|
|
67
|
-
- uses: actions/download-artifact@
|
|
67
|
+
- uses: actions/download-artifact@v8
|
|
68
68
|
with:
|
|
69
69
|
name: dist
|
|
70
70
|
path: dist/
|
|
71
71
|
- name: Publish
|
|
72
|
-
uses: pypa/gh-action-pypi-publish@
|
|
72
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 — TODO(releaser): verify latest SHA
|
|
73
73
|
with:
|
|
74
74
|
skip-existing: false
|
|
75
75
|
|
|
@@ -81,13 +81,13 @@ jobs:
|
|
|
81
81
|
permissions:
|
|
82
82
|
contents: write
|
|
83
83
|
steps:
|
|
84
|
-
- uses: actions/checkout@
|
|
85
|
-
- uses: actions/download-artifact@
|
|
84
|
+
- uses: actions/checkout@v7
|
|
85
|
+
- uses: actions/download-artifact@v8
|
|
86
86
|
with:
|
|
87
87
|
name: dist
|
|
88
88
|
path: dist/
|
|
89
89
|
- name: Create release
|
|
90
|
-
uses: softprops/action-gh-release@
|
|
90
|
+
uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3.0.5 — TODO(releaser): verify latest SHA
|
|
91
91
|
with:
|
|
92
92
|
files: dist/*
|
|
93
93
|
body_path: docs/releases/${{ github.ref_name }}.md # TODO(releaser): adjust path if needed
|
|
@@ -41,15 +41,15 @@ jobs:
|
|
|
41
41
|
- target: x86_64-pc-windows-msvc
|
|
42
42
|
runner: windows-latest
|
|
43
43
|
steps:
|
|
44
|
-
- uses: actions/checkout@
|
|
44
|
+
- uses: actions/checkout@v7
|
|
45
45
|
|
|
46
46
|
- name: Install Rust toolchain
|
|
47
|
-
uses: dtolnay/rust-toolchain@
|
|
47
|
+
uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable — TODO(releaser): verify latest SHA
|
|
48
48
|
with:
|
|
49
49
|
toolchain: stable
|
|
50
50
|
targets: ${{ matrix.target }}
|
|
51
51
|
|
|
52
|
-
- uses: Swatinem/rust-cache@
|
|
52
|
+
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 — TODO(releaser): verify latest SHA
|
|
53
53
|
with:
|
|
54
54
|
key: ${{ matrix.target }}
|
|
55
55
|
|
|
@@ -79,7 +79,7 @@ jobs:
|
|
|
79
79
|
sha256sum "$f" > "${f}.sha256"
|
|
80
80
|
done
|
|
81
81
|
|
|
82
|
-
- uses: actions/upload-artifact@
|
|
82
|
+
- uses: actions/upload-artifact@v7
|
|
83
83
|
with:
|
|
84
84
|
name: release-${{ matrix.target }}
|
|
85
85
|
path: |
|
|
@@ -97,11 +97,11 @@ jobs:
|
|
|
97
97
|
contents: read
|
|
98
98
|
environment: release
|
|
99
99
|
steps:
|
|
100
|
-
- uses: actions/checkout@
|
|
101
|
-
- uses: dtolnay/rust-toolchain@
|
|
100
|
+
- uses: actions/checkout@v7
|
|
101
|
+
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca
|
|
102
102
|
with:
|
|
103
103
|
toolchain: stable
|
|
104
|
-
- uses: Swatinem/rust-cache@
|
|
104
|
+
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0
|
|
105
105
|
- run: cargo publish
|
|
106
106
|
env:
|
|
107
107
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
@@ -114,13 +114,13 @@ jobs:
|
|
|
114
114
|
permissions:
|
|
115
115
|
contents: write
|
|
116
116
|
steps:
|
|
117
|
-
- uses: actions/checkout@
|
|
118
|
-
- uses: actions/download-artifact@
|
|
117
|
+
- uses: actions/checkout@v7
|
|
118
|
+
- uses: actions/download-artifact@v8
|
|
119
119
|
with:
|
|
120
120
|
path: artifacts
|
|
121
121
|
merge-multiple: true
|
|
122
122
|
- name: Create release
|
|
123
|
-
uses: softprops/action-gh-release@
|
|
123
|
+
uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3.0.5 — TODO(releaser): verify latest SHA
|
|
124
124
|
with:
|
|
125
125
|
files: artifacts/*
|
|
126
126
|
body_path: docs/releases/${{ github.ref_name }}.md # TODO(releaser): adjust path if needed
|
|
@@ -77,25 +77,44 @@ matrix.
|
|
|
77
77
|
|
|
78
78
|
## Phase 2: Propose version and compute bump
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
80
|
+
Steps 1–2 run whether or not the user supplied a version; they produce
|
|
81
|
+
`required_bump` (printed as `Required bump:` by `--format text`).
|
|
82
|
+
|
|
83
|
+
1. Group the commits since `latest_tag` into feature sets:
|
|
84
|
+
`{{package-root}}/shared/scripts/release-feature-sets.sh --format text`
|
|
85
|
+
(`--from <ref>` when `latest_tag` is not the right range start; with no tag it covers
|
|
86
|
+
all history). `feat` commits are grouped by their `Feature-Set:` footer, else their
|
|
87
|
+
scope, else `unscoped`; merge commits are skipped.
|
|
88
|
+
2. If any feature sets are listed, ASK which ones are complete and user-visible (one
|
|
89
|
+
multi-select question listing each set with its commit count; "none" is a valid
|
|
90
|
+
answer). Several `feat` commits for one feature are one set, and a set that is still
|
|
91
|
+
in progress, or hidden behind an off-by-default switch, is not complete. Also ask
|
|
92
|
+
whether a set whose `feat` commits shipped in an earlier patch is now complete: it is
|
|
93
|
+
not listed, but naming it in `--complete` is accepted (the helper finds it before
|
|
94
|
+
the range). Rerun the helper with `--complete <set,...>` (or `--complete all`) to
|
|
95
|
+
get `required_bump`:
|
|
96
|
+
- Any `!` marker or `BREAKING CHANGE` footer → major.
|
|
97
|
+
- Any complete feature set → minor.
|
|
98
|
+
- Otherwise → patch. `feat` commits from in-progress sets ship in a patch.
|
|
99
|
+
3. If the user did NOT supply a version, propose the next semver from `required_bump`
|
|
100
|
+
and ASK for confirmation before writing anything. The bump is a floor; the
|
|
101
|
+
maintainer may choose a higher one.
|
|
102
|
+
|
|
103
|
+
If the user DID supply a version, check it against `required_bump`. A version below it
|
|
104
|
+
(a patch over a complete feature set, or a minor/patch over a breaking change) is
|
|
105
|
+
refused, not confirmed: stop, say which set or breaking commit sets the floor, and ask
|
|
106
|
+
for a version at or above it (headless: stop and print the rerun command). A patch over
|
|
107
|
+
`feat` commits whose sets are all in progress is not a mismatch; note the in-progress
|
|
108
|
+
sets once and continue. The `release/X.Y` rules below take precedence on that branch.
|
|
109
|
+
|
|
110
|
+
Headless (no question tool or chat turn): treat every set as in progress, report the
|
|
111
|
+
sets in the proposal, and require the version as an argument as usual.
|
|
93
112
|
|
|
94
113
|
The release model (from `release-state.sh get`) decides how commit types map to the bump:
|
|
95
114
|
|
|
96
115
|
- **No RELEASING.md, or trunk-only:** the rules above apply as written. Every release is
|
|
97
|
-
cut from the trunk
|
|
98
|
-
requested over
|
|
116
|
+
cut from the trunk; a complete feature set makes the next release a minor, and a
|
|
117
|
+
patch requested over a complete set is refused.
|
|
99
118
|
- **release-branches, on `release/X.Y`:** the branch bounds the bump to the next
|
|
100
119
|
`X.Y.Z` patch. Everything on the branch is a deliberate backport, so a `feat:`
|
|
101
120
|
cherry-pick is expected and does NOT raise the mismatch concern or make it a minor.
|