@plainconceptsplatform/workflows 0.4.34 → 0.5.1
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 +88 -88
- package/loops/actions/agent-output.cjs +17 -17
- package/loops/actions/audit-close/action.yml +24 -0
- package/loops/actions/classify-route/action.yml +1 -3
- package/loops/actions/classify-route/classify-route.sh +40 -35
- package/loops/actions/update-changelog/action.yml +113 -0
- package/loops/actions/validate-merge-gate-output/action.yml +40 -40
- package/loops/actions/validate-refine-output/validate-refine-output.sh +16 -3
- package/loops/actions/validate-review-output/action.yml +35 -35
- package/loops/actions/validate-triage-output/action.yml +36 -36
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +91 -36
- package/loops/scripts/compile-agent-workflows.mjs +195 -6
- package/loops/templates/agentics/agentics-checks.yml +86 -86
- package/loops/templates/agentics/agentics-maintenance.yml +121 -121
- package/loops/templates/ci/app-ci-dotnet-next.yml +268 -171
- package/loops/templates/ci/app-ci-node-monorepo.yml +208 -178
- package/loops/templates/issues/bug_report.yml +109 -109
- package/loops/templates/issues/feature_request.yml +75 -75
- package/loops/templates/opencode/opencode.ci.json +49 -47
- package/loops/templates/opencode/opencode.ci.json.md +46 -41
- package/loops/templates/release/github-release.yml +30 -30
- package/loops/workflows/agent-apply-review.md +465 -443
- package/loops/workflows/agent-audit.md +213 -197
- package/loops/workflows/agent-implement.md +538 -414
- package/loops/workflows/agent-merge-gate.md +730 -584
- package/loops/workflows/agent-refine.md +609 -418
- package/loops/workflows/agent-release.md +258 -0
- package/loops/workflows/agent-triage.md +447 -439
- package/loops/workflows/authorize-bot-work.yml +85 -82
- package/loops/workflows/shared/opencode-ci.md +206 -197
- package/loops/workflows/shared/platform-defaults.md +19 -16
- package/loops/workflows/work-router.yml +862 -632
- package/package.json +7 -8
- package/dist/action-validation.test.d.ts +0 -1
- package/dist/action-validation.test.js +0 -84
- package/dist/catalog-installation.d.ts +0 -30
- package/dist/catalog-installation.js +0 -379
- package/dist/catalog-installation.test.d.ts +0 -1
- package/dist/catalog-installation.test.js +0 -448
- package/dist/catalog-listing.d.ts +0 -13
- package/dist/catalog-listing.js +0 -70
- package/dist/catalog-listing.test.d.ts +0 -1
- package/dist/catalog-listing.test.js +0 -150
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -218
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -273
- package/dist/repository-inspection.d.ts +0 -23
- package/dist/repository-inspection.js +0 -113
- package/dist/repository-inspection.test.d.ts +0 -1
- package/dist/repository-inspection.test.js +0 -77
- package/dist/repository-state.d.ts +0 -18
- package/dist/repository-state.js +0 -77
- package/dist/repository-state.test.d.ts +0 -1
- package/dist/repository-state.test.js +0 -96
- package/dist/route-processing.d.ts +0 -6
- package/dist/route-processing.js +0 -150
- package/dist/route-processing.test.d.ts +0 -1
- package/dist/route-processing.test.js +0 -350
- package/dist/stack-defaults.d.ts +0 -11
- package/dist/stack-defaults.js +0 -104
- package/dist/stack-defaults.test.d.ts +0 -1
- package/dist/stack-defaults.test.js +0 -266
- package/dist/tui.d.ts +0 -25
- package/dist/tui.js +0 -287
- package/dist/tui.test.d.ts +0 -1
- package/dist/tui.test.js +0 -246
- package/dist/workflow-catalog.d.ts +0 -25
- package/dist/workflow-catalog.js +0 -59
- package/dist/workflow-catalog.test.d.ts +0 -1
- package/dist/workflow-catalog.test.js +0 -29
- package/loops/workflows/agent-direct.md +0 -375
- package/loops/workflows/agent-propose.md +0 -342
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/workflows/agent-release.md. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
3
|
+
env:
|
|
4
|
+
GIT_AUTHOR_NAME: "github-actions[bot]"
|
|
5
|
+
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
6
|
+
GIT_COMMITTER_NAME: "github-actions[bot]"
|
|
7
|
+
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
|
8
|
+
description: |
|
|
9
|
+
Generates release notes from the commit log and creates a tagged GitHub Release.
|
|
10
|
+
The agent writes human-readable release notes; every other step (version bump,
|
|
11
|
+
commit, tag, push, release creation) is deterministic.
|
|
12
|
+
|
|
13
|
+
Router-only worker: triggered exclusively via workflow_call from work-router.yml.
|
|
14
|
+
Contract input: version-bump(patch|minor|major|auto).
|
|
15
|
+
|
|
16
|
+
name: "Agent: Release"
|
|
17
|
+
|
|
18
|
+
imports:
|
|
19
|
+
- github/gh-aw/.github/workflows/shared/opencode.md@v0.87.5
|
|
20
|
+
- shared/platform-defaults.md
|
|
21
|
+
- shared/opencode-ci.md
|
|
22
|
+
|
|
23
|
+
on:
|
|
24
|
+
workflow_call:
|
|
25
|
+
inputs:
|
|
26
|
+
version-bump:
|
|
27
|
+
description: "Version bump strategy: patch, minor, major, or auto"
|
|
28
|
+
required: false
|
|
29
|
+
type: string
|
|
30
|
+
default: "auto"
|
|
31
|
+
|
|
32
|
+
runs-on: agents-arc
|
|
33
|
+
runs-on-slim: agents-arc
|
|
34
|
+
|
|
35
|
+
secrets:
|
|
36
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
37
|
+
|
|
38
|
+
engine:
|
|
39
|
+
id: opencode
|
|
40
|
+
version: "1.2.14"
|
|
41
|
+
env:
|
|
42
|
+
OPENAI_BASE_URL: https://forge.plainconcepts.com/v1
|
|
43
|
+
|
|
44
|
+
model: openai/glm-5-3
|
|
45
|
+
|
|
46
|
+
max-turns: 100
|
|
47
|
+
max-turn-cache-misses: 3000
|
|
48
|
+
max-ai-credits: 2000
|
|
49
|
+
|
|
50
|
+
permissions: read-all
|
|
51
|
+
|
|
52
|
+
checkout:
|
|
53
|
+
fetch: ["*"]
|
|
54
|
+
fetch-depth: 0
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Prepare release context
|
|
58
|
+
env:
|
|
59
|
+
GH_TOKEN: ${{ github.token }}
|
|
60
|
+
REPO: ${{ github.repository }}
|
|
61
|
+
run: |
|
|
62
|
+
set -euo pipefail
|
|
63
|
+
mkdir -p /tmp/gh-aw/agent
|
|
64
|
+
|
|
65
|
+
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
|
66
|
+
if [ -n "$last_tag" ]; then
|
|
67
|
+
git log --oneline --no-decorate "${last_tag}..HEAD" > /tmp/gh-aw/agent/git-log.txt
|
|
68
|
+
else
|
|
69
|
+
git log --oneline --no-decorate -50 > /tmp/gh-aw/agent/git-log.txt
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
version=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")
|
|
73
|
+
echo "$version" > /tmp/gh-aw/agent/current-version.txt
|
|
74
|
+
|
|
75
|
+
echo "Last tag: ${last_tag:-none}"
|
|
76
|
+
echo "Current version: $version"
|
|
77
|
+
|
|
78
|
+
safe-outputs:
|
|
79
|
+
report-failure-as-issue: false
|
|
80
|
+
threat-detection: false
|
|
81
|
+
noop:
|
|
82
|
+
max: 1
|
|
83
|
+
|
|
84
|
+
timeout-minutes: 30
|
|
85
|
+
|
|
86
|
+
jobs:
|
|
87
|
+
conclude:
|
|
88
|
+
needs: [activation, agent, safe_outputs]
|
|
89
|
+
if: >
|
|
90
|
+
always() &&
|
|
91
|
+
needs.agent.result == 'success' &&
|
|
92
|
+
needs.safe_outputs.result == 'success'
|
|
93
|
+
runs-on: agents-arc
|
|
94
|
+
permissions:
|
|
95
|
+
contents: write
|
|
96
|
+
steps:
|
|
97
|
+
- name: Download agent output artifact
|
|
98
|
+
id: download-agent-output
|
|
99
|
+
continue-on-error: true
|
|
100
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
101
|
+
with:
|
|
102
|
+
pattern: "{${{ needs.activation.outputs.artifact_prefix }}agent,${{ needs.activation.outputs.artifact_prefix }}agent-output-fallback}"
|
|
103
|
+
merge-multiple: true
|
|
104
|
+
path: /tmp/gh-aw/
|
|
105
|
+
- name: Checkout repository
|
|
106
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
107
|
+
with:
|
|
108
|
+
token: ${{ github.token }}
|
|
109
|
+
fetch-depth: 0
|
|
110
|
+
- name: Read release notes and determine version
|
|
111
|
+
id: release
|
|
112
|
+
env:
|
|
113
|
+
VERSION_BUMP: ${{ inputs.version-bump }}
|
|
114
|
+
run: |
|
|
115
|
+
set -euo pipefail
|
|
116
|
+
|
|
117
|
+
notes="/tmp/gh-aw/agent/release-notes.md"
|
|
118
|
+
if [ ! -f "$notes" ]; then
|
|
119
|
+
echo "::error::Agent did not write release-notes.md"
|
|
120
|
+
exit 1
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
current=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")
|
|
124
|
+
echo "current_version=$current" >> "$GITHUB_OUTPUT"
|
|
125
|
+
|
|
126
|
+
# Determine the version bump
|
|
127
|
+
bump="$VERSION_BUMP"
|
|
128
|
+
if [ "$bump" = "auto" ]; then
|
|
129
|
+
if grep -qiE 'BREAKING CHANGE' "$notes" || grep -qE '\w+\(!:' /tmp/gh-aw/agent/git-log.txt; then
|
|
130
|
+
bump="major"
|
|
131
|
+
elif grep -qE '^feat(\(.+\))?:' /tmp/gh-aw/agent/git-log.txt; then
|
|
132
|
+
bump="minor"
|
|
133
|
+
else
|
|
134
|
+
bump="patch"
|
|
135
|
+
fi
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
# Semver bump
|
|
139
|
+
IFS='.' read -r major minor patch <<< "$current"
|
|
140
|
+
case "$bump" in
|
|
141
|
+
major) major=$((major + 1)); minor=0; patch=0 ;;
|
|
142
|
+
minor) minor=$((minor + 1)); patch=0 ;;
|
|
143
|
+
patch) patch=$((patch + 1)) ;;
|
|
144
|
+
*) echo "::error::Unknown version-bump: $bump"; exit 1 ;;
|
|
145
|
+
esac
|
|
146
|
+
new_version="${major}.${minor}.${patch}"
|
|
147
|
+
echo "new_version=$new_version" >> "$GITHUB_OUTPUT"
|
|
148
|
+
echo "Determined version: $current -> $new_version (bump: $bump)"
|
|
149
|
+
|
|
150
|
+
# Copy notes to a clean location the release step can read
|
|
151
|
+
cp "$notes" /tmp/release-notes.md
|
|
152
|
+
- name: Bump version in package.json
|
|
153
|
+
env:
|
|
154
|
+
NEW_VERSION: ${{ steps.release.outputs.new_version }}
|
|
155
|
+
run: |
|
|
156
|
+
set -euo pipefail
|
|
157
|
+
node -e "
|
|
158
|
+
const fs = require('fs');
|
|
159
|
+
for (const file of ['package.json', 'cli/package.json']) {
|
|
160
|
+
if (fs.existsSync(file)) {
|
|
161
|
+
const pkg = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
162
|
+
pkg.version = process.env.NEW_VERSION;
|
|
163
|
+
fs.writeFileSync(file, JSON.stringify(pkg, null, 2) + '\n');
|
|
164
|
+
console.log('Bumped ' + file + ' to ' + process.env.NEW_VERSION);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
"
|
|
168
|
+
- name: Commit, tag, and push
|
|
169
|
+
env:
|
|
170
|
+
NEW_VERSION: ${{ steps.release.outputs.new_version }}
|
|
171
|
+
GH_TOKEN: ${{ github.token }}
|
|
172
|
+
run: |
|
|
173
|
+
set -euo pipefail
|
|
174
|
+
git config user.name "github-actions[bot]"
|
|
175
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
176
|
+
git add package.json
|
|
177
|
+
[ -f cli/package.json ] && git add cli/package.json
|
|
178
|
+
git commit -m "chore(release): v${NEW_VERSION}"
|
|
179
|
+
git tag "v${NEW_VERSION}"
|
|
180
|
+
git push
|
|
181
|
+
git push --tags
|
|
182
|
+
echo "Tagged v${NEW_VERSION} and pushed."
|
|
183
|
+
- name: Create GitHub Release
|
|
184
|
+
env:
|
|
185
|
+
NEW_VERSION: ${{ steps.release.outputs.new_version }}
|
|
186
|
+
GH_TOKEN: ${{ github.token }}
|
|
187
|
+
run: |
|
|
188
|
+
set -euo pipefail
|
|
189
|
+
gh release create "v${NEW_VERSION}" \
|
|
190
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
191
|
+
--title "v${NEW_VERSION}" \
|
|
192
|
+
--notes-file /tmp/release-notes.md
|
|
193
|
+
echo "GitHub Release v${NEW_VERSION} created."
|
|
194
|
+
|
|
195
|
+
incomplete:
|
|
196
|
+
needs: [agent, safe_outputs]
|
|
197
|
+
if: >
|
|
198
|
+
always() &&
|
|
199
|
+
(needs.agent.result != 'success' || needs.safe_outputs.result != 'success')
|
|
200
|
+
runs-on: agents-arc
|
|
201
|
+
permissions:
|
|
202
|
+
contents: read
|
|
203
|
+
steps:
|
|
204
|
+
- name: Report release failure
|
|
205
|
+
run: |
|
|
206
|
+
echo "::error::Release agent did not complete successfully."
|
|
207
|
+
echo "The release was not created. Check the agent logs."
|
|
208
|
+
exit 1
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
1. Read `/tmp/gh-aw/agent/git-log.txt`. It contains the commit log since the last
|
|
213
|
+
tag (or the last 50 commits if no tag exists).
|
|
214
|
+
|
|
215
|
+
2. Read `/tmp/gh-aw/agent/current-version.txt` for the current version.
|
|
216
|
+
|
|
217
|
+
3. Categorize commits by conventional-commit prefix:
|
|
218
|
+
- `feat:` / `feat(scope):` → Features
|
|
219
|
+
- `fix:` / `fix(scope):` → Bug Fixes
|
|
220
|
+
- `chore:` / `chore(scope):` → Maintenance
|
|
221
|
+
- `docs:` → Documentation
|
|
222
|
+
- `refactor:` → Refactoring
|
|
223
|
+
- `perf:` → Performance
|
|
224
|
+
- Any `BREAKING CHANGE` footer or `!:` prefix → Breaking Changes (top of the notes)
|
|
225
|
+
|
|
226
|
+
4. Write structured release notes in markdown to `/tmp/gh-aw/agent/release-notes.md`.
|
|
227
|
+
Format:
|
|
228
|
+
- A `## What's Changed` heading
|
|
229
|
+
- Breaking Changes section first (if any)
|
|
230
|
+
- Grouped sections: `### Features`, `### Bug Fixes`, etc.
|
|
231
|
+
- One bullet per commit with the commit message (not the hash)
|
|
232
|
+
- A `**Full Changelog**: <last-tag>...<new-tag>` line at the end
|
|
233
|
+
- Keep it concise and factual. Do not invent changes that are not in the log.
|
|
234
|
+
|
|
235
|
+
5. Call `noop` and stop. The deterministic `conclude` job reads the notes you wrote
|
|
236
|
+
and handles version bumping, tagging, and release creation.
|
|
237
|
+
|
|
238
|
+
## Diagram
|
|
239
|
+
|
|
240
|
+
```mermaid
|
|
241
|
+
flowchart TD
|
|
242
|
+
relStart("Work Router<br/>release route<br/>(manual dispatch)") --> relActivation
|
|
243
|
+
relActivation("Activation<br/>Prepare prompt + env") --> relPreAgent
|
|
244
|
+
relPreAgent["Pre-agent<br/>Write git log + version to /tmp"] --> relAgent
|
|
245
|
+
relAgent["Agent<br/>Read commit log<br/>Write release-notes.md"] --> relNoop
|
|
246
|
+
relNoop("Safe Outputs<br/>Process noop") --> relConclude
|
|
247
|
+
relConclude["Conclude<br/>Bump version, commit, tag<br/>push, create GitHub Release"]
|
|
248
|
+
relConclude --> relDone(("Released<br/>Tag + GitHub Release created"))
|
|
249
|
+
relConclude -.->|failure| relFail(("Failed<br/>No tag created"))
|
|
250
|
+
classDef start fill:#ffffff,stroke:#172033,stroke-width:2px,color:#172033
|
|
251
|
+
classDef action fill:#eef0ff,stroke:#554cff,stroke-width:2px,color:#172033
|
|
252
|
+
classDef success fill:#e8f8ec,stroke:#18883c,stroke-width:2px,color:#145a32
|
|
253
|
+
classDef failure fill:#fff0f0,stroke:#ef2929,stroke-width:2px,color:#8b1a2a
|
|
254
|
+
class relStart start
|
|
255
|
+
class relActivation,relPreAgent,relAgent action
|
|
256
|
+
class relDone success
|
|
257
|
+
class relFail failure
|
|
258
|
+
```
|