From 8ea304517c351e09297db7763abf1820eea823e4 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Mon, 9 Mar 2026 10:00:20 +0000 Subject: [PATCH 1/2] build: add .claude/skills for updating llgo version Add a Claude skill file that documents the step-by-step process for updating the llgo dependency version across go.mod, CI workflows, and the setup action. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com> --- .claude/skills/update-llgo-version.md | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .claude/skills/update-llgo-version.md diff --git a/.claude/skills/update-llgo-version.md b/.claude/skills/update-llgo-version.md new file mode 100644 index 00000000..e5060515 --- /dev/null +++ b/.claude/skills/update-llgo-version.md @@ -0,0 +1,61 @@ +# Skill: Update LLGo Version + +## Description +Update the `github.com/goplus/llgo` dependency to a new version across the project. This includes the Go module, CI workflows, and the setup action. + +## When to Use +When asked to bump, update, or upgrade the llgo version (e.g., "update llgo to v0.14.0"). + +## Instructions + +Given a target version (e.g., `v0.14.0`), update all of the following files: + +### 1. `go.mod` +Replace the `github.com/goplus/llgo` version in the `require` block with the new version. + +### 2. `go.sum` +Run `go mod tidy` to update the checksums automatically. + +### 3. `.github/workflows/go.yml` +Update the `llgo` entry in the `strategy.matrix` section: +```yaml +llgo: [v0.14.0] +``` + +### 4. `.github/workflows/end2end.yml` +Update the `llgo` entry in the `strategy.matrix` section: +```yaml +llgo: [v0.14.0] +``` + +### 5. `.github/workflows/gentest.yml` +Update the `llgo` entry in the `strategy.matrix` section: +```yaml +llgo: [v0.14.0] +``` + +### 6. `.github/actions/setup-llcppg/action.yml` +Update the default value for the `llgo` input: +```yaml +llgo: + description: "LLGo version to download (e.g. v0.14.0)" + default: "v0.14.0" +``` + +## Verification + +After making all changes, run: + +```bash +go mod tidy +go build -v ./... +go vet ./... +go test -v ./config ./internal/name ./internal/arg ./internal/unmarshal +``` + +## Commit Convention + +Use this commit message format: +``` +build(deps): bump github.com/goplus/llgo from to +``` From 6dd5f3bdc19d3e28b2a8c8482576a35d89d01d5d Mon Sep 17 00:00:00 2001 From: xgopilot Date: Mon, 9 Mar 2026 10:05:50 +0000 Subject: [PATCH 2/2] build: improve update-llgo-version skill with frontmatter and better instructions - Add YAML frontmatter (name, description) for proper skill triggering - Replace manual go.mod editing with idiomatic `go get` workflow - Add step to detect current version for commit message - Consolidate workflow file updates into a single clear step - Remove redundant "When to Use" section (now in description field) - Add explanatory context for why `go get` is preferred Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com> --- .claude/skills/update-llgo-version.md | 67 ++++++++++++++------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.claude/skills/update-llgo-version.md b/.claude/skills/update-llgo-version.md index e5060515..19a3d551 100644 --- a/.claude/skills/update-llgo-version.md +++ b/.claude/skills/update-llgo-version.md @@ -1,50 +1,48 @@ -# Skill: Update LLGo Version +--- +name: update-llgo-version +description: Update the github.com/goplus/llgo dependency version across the llcppg project — Go module, CI workflows, and setup action. Use this skill whenever the user asks to bump, update, or upgrade the llgo version, or mentions changing the llgo dependency, even if they don't use the exact phrase "update llgo version". +--- -## Description -Update the `github.com/goplus/llgo` dependency to a new version across the project. This includes the Go module, CI workflows, and the setup action. +# Update LLGo Version -## When to Use -When asked to bump, update, or upgrade the llgo version (e.g., "update llgo to v0.14.0"). +Update `github.com/goplus/llgo` to a new version across the entire project. Six files reference the llgo version and they all need to stay in sync. ## Instructions -Given a target version (e.g., `v0.14.0`), update all of the following files: +Given a target version (e.g., `v0.14.0`): -### 1. `go.mod` -Replace the `github.com/goplus/llgo` version in the `require` block with the new version. +### Step 1: Detect the current version -### 2. `go.sum` -Run `go mod tidy` to update the checksums automatically. +Read `go.mod` and note the current `github.com/goplus/llgo` version — you'll need it for the commit message. -### 3. `.github/workflows/go.yml` -Update the `llgo` entry in the `strategy.matrix` section: -```yaml -llgo: [v0.14.0] -``` +### Step 2: Update Go module dependency -### 4. `.github/workflows/end2end.yml` -Update the `llgo` entry in the `strategy.matrix` section: -```yaml -llgo: [v0.14.0] -``` +Use `go get` to update the module dependency, then tidy: -### 5. `.github/workflows/gentest.yml` -Update the `llgo` entry in the `strategy.matrix` section: -```yaml -llgo: [v0.14.0] +```bash +go get github.com/goplus/llgo@ +go mod tidy ``` -### 6. `.github/actions/setup-llcppg/action.yml` -Update the default value for the `llgo` input: -```yaml -llgo: - description: "LLGo version to download (e.g. v0.14.0)" - default: "v0.14.0" -``` +This updates both `go.mod` and `go.sum` automatically. Using `go get` is safer than manually editing `go.mod` because it resolves transitive dependencies correctly. + +### Step 3: Update CI workflow matrices + +Three workflow files have a `strategy.matrix.llgo` entry that pins the llgo version. Update each one: + +- `.github/workflows/go.yml` — line with `llgo: [...]` +- `.github/workflows/end2end.yml` — line with `llgo: [...]` +- `.github/workflows/gentest.yml` — line with `llgo: [...]` + +Replace the version in the `llgo` array, e.g., `llgo: [v0.14.0]`. + +### Step 4: Update the setup action default + +In `.github/actions/setup-llcppg/action.yml`, update the `default` value for the `llgo` input to match the new version. ## Verification -After making all changes, run: +After making all changes, run these commands to confirm nothing is broken: ```bash go mod tidy @@ -53,9 +51,12 @@ go vet ./... go test -v ./config ./internal/name ./internal/arg ./internal/unmarshal ``` +These are the fast unit tests. If they pass, the version bump is safe to commit. + ## Commit Convention -Use this commit message format: ``` build(deps): bump github.com/goplus/llgo from to ``` + +Replace `` with the version you noted in Step 1 and `` with the target version.