You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: update CLI coverage workflow to perform full SDK method enumeration
The previous prompt only checked recent commits and vaguely asked to identify
coverage gaps. This update makes the prompt explicit about:
1. Reading api.md as the authoritative source of ALL SDK methods
2. Reading param structs from Go files to enumerate ALL options/fields
3. Building an SDK coverage matrix (methods + params)
4. Building a CLI coverage matrix (commands + flags)
5. Performing gap analysis to find missing commands and flags
6. Mapping guidance for SDK param fields to CLI flags (CamelCase -> kebab-case)
This ensures the agent does a complete enumeration rather than just checking
what changed in the most recent commit.
Co-authored-by: mason <mason@onkernel.com>
Copy file name to clipboardExpand all lines: .github/workflows/update-cli-coverage.yml
+95-41Lines changed: 95 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -89,59 +89,103 @@ jobs:
89
89
The Go SDK (this repo) was just updated by Stainless, and may contain new API methods. The CLI (kernel/cli) needs to be updated to expose these new methods as CLI commands.
90
90
91
91
# Source Files
92
-
- SDK: Current directory - check for new/changed methods in the Go SDK
92
+
- SDK api.md: Current directory - READ THIS FILE FIRST. This is the authoritative list of all SDK methods and their signatures.
93
+
- SDK *.go files: Current directory - Contains param structs (e.g., BrowserNewParams, DeploymentListParams) with all available options/fields.
93
94
- API Spec: /tmp/kernel-api/packages/api/stainless.yaml - SDK configuration with resources and methods
94
95
- API Spec: /tmp/kernel-api/packages/api/openapi.yaml - Full OpenAPI specification
95
96
- CLI: /tmp/kernel-cli - Existing CLI commands
96
97
97
98
# Task
98
-
1. ALWAYS update the CLI to use the latest Go SDK version:
99
-
- Go to /tmp/kernel-cli
100
-
- Update go.mod to require the latest SDK: ${{ steps.sdk-version.outputs.module }}@${{ steps.sdk-version.outputs.version }}
101
-
- Run: go get ${{ steps.sdk-version.outputs.module }}@${{ steps.sdk-version.outputs.version }}
102
-
- Run: go mod tidy
103
-
- This ensures the CLI always uses the latest SDK, even if no new commands are added
104
99
105
-
2. Check the recent commit(s) to this SDK repo to see what methods were added/changed:
106
-
git log -1 --name-only
107
-
git diff HEAD~1 --name-only
108
-
109
-
3. Read the stainless.yaml to understand the full resource/method structure
110
-
111
-
4. Check the CLI repo at /tmp/kernel-cli to see what commands already exist:
112
-
- Look at cmd/ directory structure for existing commands
113
-
- Identify which SDK methods have CLI command equivalents
114
-
115
-
5. Identify coverage gaps - SDK methods that don't have CLI equivalents, or new SDK method parameters that aren't exposed via the CLI
116
-
117
-
6. If new commands or flags are needed:
118
-
- Implement them in /tmp/kernel-cli following existing patterns
119
-
- Run \`go build ./...\` to verify the code compiles
120
-
121
-
7. Create and push changes (SDK version update + any new commands):
122
-
- Create/update the evergreen branch: cli-coverage-update (always use this single branch name)
123
-
- Commit with message describing SDK version bump and any new commands
124
-
- Force push changes to the CLI repo (since we're updating an evergreen branch)
125
-
- Create or update an evergreen PR in kernel/cli (check if PR already exists for this branch first)
126
-
- Tag the commit author as a reviewer
127
-
128
-
8. If only SDK version was updated (no new commands), still update the evergreen PR with title 'CLI: Update Go SDK to <version>'
0 commit comments