SKILL.md
unknown
plain_text
23 days ago
4.6 kB
4
Indexable
--- name: materize-release description: >- Reads git changes in materize-be or materize-fe, drafts Keep a Changelog entries, proposes semver tags (BE per-binary rest/consumer-*, FE fe-v*). Use when the user mentions changelog, release notes, staging tag, deploy, or materize-be/cmd impact. disable-model-invocation: true --- # Materize release Changelog and semver tagging for `materize-be/` (per binary) and `materize-fe/` (single `fe-v*` tag). **Safety:** Do not commit, `git tag`, or `git push` unless the user explicitly asks. If there are no meaningful changes under the target package, stop — do not write a changelog. For BE cmd → tag mapping and path heuristics, see [reference.md](reference.md). --- ## Step 0 — Scope - User says BE / FE / both → limit to that tree. - Default: infer from `git diff` paths (`materize-be/` only → BE; `materize-fe/` only → FE). - Base branch: `main...HEAD` unless user names another (e.g. `staging`). --- ## Step 1 — Read git changes (readonly) ```bash git diff main...HEAD -- materize-be/ git diff main...HEAD -- materize-fe/ git status -- materize-be/ materize-fe/ ``` If `main` is missing, use `git diff HEAD~20..HEAD -- <path>` or ask the user for the base branch. **Stop** if diff is empty or only whitespace/format with no release impact: > No changes under materize-be / materize-fe — no CHANGELOG update. Otherwise summarize: files changed, user-facing intent (fix / feature / breaking). --- ## Step 2a — Backend: impacted binaries Use [reference.md](reference.md). Tag only binaries that **must** be rebuilt for this release. Latest staging tag per binary: ```bash git tag -l 'rest-v*-staging' --sort=-v:refname | head -1 git tag -l 'consumer-stamp-v*-staging' --sort=-v:refname | head -1 # repeat for each consumer-* prefix you need ``` --- ## Step 2b — Frontend: latest tag ```bash git tag -l 'fe-v*-staging' --sort=-v:refname | head -1 ``` Parse `fe-v0.19.0-staging` → `0.19.0`. Apply SemVer rules from `materize-fe/CHANGELOG.md` (intro table: MAJOR / MINOR / PATCH). --- ## Step 3 — Semver bump | Change type | Bump | |-------------|------| | Bug fix, small UX/text | PATCH | | New feature, non-breaking | MINOR | | Breaking user-facing behavior | MAJOR | - **BE:** bump independently per tagged binary. - **FE:** one `fe-v*` tag per release. --- ## Step 4 — CHANGELOG draft Show draft in chat. Edit files only if the user asks to apply. ### Backend (`materize-be/CHANGELOG.md`) - Move `## [Unreleased]` content into a new section, or insert after Unreleased. - Header: `## [x.y.z] — REST + consumer stamp — YYYY-MM-DD` (scope in title). - Line: `**Git tags:**` `rest-v…-staging`, `consumer-stamp-v…-staging`, etc. - Sections: `### Added` / `### Fixed` / `### Changed` / `### Notes` (which `cmd/*` to deploy, migrations). - Header version is usually **REST** when REST is involved; consumer-only → consumer version (see `## [0.0.3] — Consumer only` in changelog). - Link changed files: `[file.go](path)`. ### Frontend (`materize-fe/CHANGELOG.md`) - New section at top (after intro / SemVer table): - `## [0.20.0] — YYYY-MM-DD` - `**Git tag:**` `fe-v0.20.0-staging` --- ## Step 5 — Commit & tags (explicit user request only) Refuse to run `git commit`, `git tag`, or `git push` until the user clearly asks (e.g. “commit the changelog”, “create and push staging tags”). **Staging examples** (only impacted BE binaries): ```bash git tag rest-v1.12.8-staging git tag consumer-stamp-v0.1.4.7-staging git push origin rest-v1.12.8-staging consumer-stamp-v0.1.4.7-staging ``` **FE:** ```bash git tag fe-v0.20.0-staging git push origin fe-v0.20.0-staging ``` - Commit CHANGELOG first if requested: e.g. `docs(be): changelog for rest-v1.12.8-staging`. - Tag patterns must match `materize-be/.drone.yml` and `materize-fe/.drone.yml`. - Production: `*-production` suffix when user asks; same semver, different suffix. --- ## Output checklist Copy and track: ``` - [ ] Scope (BE / FE / both) confirmed - [ ] git diff reviewed — changes exist - [ ] Impacted binaries / FE tag identified - [ ] Semver proposed per service - [ ] CHANGELOG draft shown - [ ] Commit/tag/push: only if user explicitly asked ``` --- ## Quick prompts | User says | Do | |-----------|-----| | draft changelog for BE branch | Step 1–4 for `materize-be/` | | what tags for stamp changes? | Map to `rest-v*` / `consumer-stamp-v*` per reference | | FE release from latest tag | Step 2b–4 for `materize-fe/` | | no changes check | Step 1 only; stop if empty |
Editor is loading...
Leave a Comment