Add AI-agent help text to application commands#81
Conversation
e69fb61 to
5ae7420
Compare
Populate components.Command.AIDescription on commands. The new field
(added in jfrog-cli-core JGC-473) makes the conversion layer render
agent-oriented text when JFROG_CLI_AI_HELP is truthy or an AI agent is
auto-detected. Empty AIDescription falls back to Description, so
command output is unchanged in human mode.
Scope: 13 components.Command literals across apptrust/commands/{system,version,package,application}/ + 1 namespace in cli/cli.go.
TEMPORARY go.mod pin: the require for github.com/jfrog/jfrog-cli-core/v2
points at JGC-473-devbase (commit d507b5c6) - a coordination branch
that cherry-picks JGC-473 onto core's pinned commit 908527b4 (the last
commit before core master removed yarn.IsVersionSupported and
IsInstalledYarnVersionSupported, which downstream callers in
jfrog-cli-artifactory still depend on). This require MUST be updated to
the merged master commit's pseudo-version after the jfrog-cli-core
JGC-473 PR merges. Do not merge this PR until the require is re-pinned.
5ae7420 to
2b10f4d
Compare
Run gofumpt across apptrust/ and cli/ to fix struct-field alignment in the new AIDescription literals. Note: the repo's Static-Check also fails independently of this change because golangci-lint-action@v6 installs golangci-lint v1.64.8 (built with go1.24), which cannot load a go.mod targeting go 1.25.5. That CI-infra mismatch predates this PR and needs a separate fix (bump the action to v9 + migrate .golangci.yml to v2 format, as already done in jfrog-cli-platform-services).
1677d56 to
384beb1
Compare
Bug:
|
Style / Accuracy notes (non-blocking but worth fixing before merge)An AI agent treats 1.
|
Addresses review from @shayshim: - promote/release: fix invalid --overwrite-strategy=fail example -> =disabled (valid values are disabled/latest/all per model.OverwriteStrategyValues). - version-create: soften the SemVer gotcha; the CLI does not validate the format at parse time (validateCreateAppVersionContext only checks arg count and source flags). - version-delete: clarify that version-rollback is a separate, orthogonal operation (undo a promotion), not a softer form of delete. - version-update: document the --properties dual separator (';' between key=value pairs, ',' between multiple values for one key) per ParseListPropertiesFlag. - app-update: describe what the CLI actually sends for --user-owners / --group-owners (the full provided list; no incremental add/remove-owner flags) instead of asserting server-side replace semantics.
|
Thanks @shayshim — really valuable review, especially the point about agents treating Bug — 1. version-create SemVer: agreed — 2. version-delete rollback: agreed it conflated two orthogonal operations. Reworded to make clear rollback undoes a promotion and is not a softer delete. 3. version-update properties: good catch — confirmed 4. app-update owners: one clarification — the Tests pass and gofumpt is clean. |
Bug:
|
Addresses review from @shayshim: - version-update AIDescription: --delete-properties is parsed by utils.ParseSliceFlag, which splits on ';' (not ','). Fixed the example ("env,owner" -> "env;owner") and the gotcha ("comma-separated" -> "semicolon-separated"); a comma-joined value was treated as one literal key. - Corrected the pre-existing inaccurate doc comment on ParseSliceFlag in utils.go ("comma-separated" -> "semicolon-separated").
|
Fixed in d6e5fba. Confirmed |
Summary
Adds AI-agent-oriented help text (
AIDescription) so commands render richer help whenJFROG_CLI_AI_HELPis truthy or an AI agent is auto-detected. EmptyAIDescriptionfalls back toDescription; human-mode output is unchanged.Scope: 13
components.Commandliterals across apptrust/commands/* + 1 namespace in cli/cli.go.Dependency on jfrog-cli-core
jfrog-cli-core's JGC-473 PR (#1563) has MERGED. This PR'sgo.modnow requires the merged core master pseudo-versionv2.60.1-0.20260601130310-8d52a530da18directly — no temporaryreplacedirective. Ready to merge on its own.Linked