Repository navigation
Conversation
… them Collection refreshes renamed commands and flags under the handwritten examples in the skills, README and site pages, so agents following them got "unknown command" or "unknown flag". The examples now use the current names, and a test checks every `webex` example in a code block, and every row of a skill's command table, against the command tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
The table check read each skill by the wrong key, so it checked no rows. Examples now also count when webex follows a shell operator or nohup, or global flags, and a placeholder after a command is an argument. Flags are checked by their whole name, shorthands included. A self-test feeds the checker each kind of stale example. Customer Assist queue examples show --has-cx-essentials true, which selects that tier. Contact Center bulk bodies are an object with items, not an array. The call-history example explains its time window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
edumansky
left a comment
There was a problem hiding this comment.
Codex review (gpt-6.2-astra, reasoning effort: high)
The new test passes, but it never checks any skill command table and skips several existing example forms. Some corrected examples also still send an invalid request or operate on a different queue tier than their names suggest.
| if !ok || file != "SKILL.md" { | ||
| continue | ||
| } | ||
| for _, row := range commandTableRows(string(files[name])) { |
There was a problem hiding this comment.
[P2] Read command tables using the skill-relative file key
skill.Files() keys entries as admin/SKILL.md, but name here is skill/admin/SKILL.md. The lookup therefore returns nil for every area, and commandTableRows always receives an empty string. A collection refresh can remove a command from any skill table without failing the test promised by AGENTS.md:127. Read docs[name], which already holds the content under the prefixed key.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. The table check now reads the document content it already has (documentProblems(root, name, content)), so every area skill's table rows are checked; they all pass. Regression test: the "table row" case in TestDocumentCheckFindsStaleExamples.
| webex calling call-queue get-customer-assist --location-id <id> --queue-id <id> | ||
| webex calling call-queue create-customer-assist --location-id <id> --body '{...}' |
There was a problem hiding this comment.
[P2] Distinguish Basic and Customer Assist queue operations
The -customer-assist command name does not select the license tier. CallingPostTelephonyConfigLocationsByLocationIdQueues creates a Customer Assist queue only with --has-cx-essentials true; copying the example with a valid body can create a Basic queue instead. The same selector is required to read an Assist queue and modify an Assist supervisor, and omitting it from the list returns Basic queues rather than both tiers. Label the default examples as Basic and show the flag for the Assist operations.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. The section now says the -customer-assist commands serve both tiers and that --has-cx-essentials true selects Customer Assist. It shows Basic and Customer Assist get/create examples, and the flag on both supervisor commands. The site example says the default list is Basic.
| webex cc dial-number delete-dialed-mapping-id --id <id> | ||
| webex cc dial-number list-references-dialed-mapping --id <id> | ||
| webex cc dial-number bulk-export-dialed-mapping | ||
| webex cc dial-number bulk-save-dialed-mapping --body '[{...}]' |
There was a problem hiding this comment.
[P2] Wrap dial-number bulk-save items in the request object
The committed Contact Center collection defines Bulk save Dialed Number Mapping(s) with a top-level items property; each entry contains itemIdentifier, requestAction, and item. The CLI forwards --body unchanged, so replacing the ellipsis with valid mapping data still sends an array where the API expects an object. Show the envelope in the example.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3, and not only here. Every Contact Center bulk body in the skill was written as an array: site bulk-save, the generic <resource> bulk-save, dial-number bulk-save-dialed-mapping, address-book bulk-save-entry and users bulk-partial-update. They now show {"items":[{"itemIdentifier":1,"requestAction":"SAVE","item":{...}}]}, matching each operation's collection example, with one sentence explaining the envelope.
|
|
||
| # Get detailed call history | ||
| webex calling reports-detailed-call-history list --start-time "2024-01-01T00:00:00Z" | ||
| webex calling reports-detailed-call-history get --start-time "2024-01-01T00:00:00Z" --end-time "2024-01-01T12:00:00Z" |
There was a problem hiding this comment.
[P2] Use a supported time window for the call-history example
CallingGetCdrFeed requires a start time between 5 minutes and 48 hours ago and specifies UTC timestamps with milliseconds. The fixed January 2024 range is outside that window, so the corrected command still cannot retrieve the history shown. Use recent timestamps or named placeholders that explain the window and format.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. The example now uses START_TIME and END_TIME placeholders, with a comment giving the window (start between 5 minutes and 48 hours ago) and the format (UTC with milliseconds). I checked a request in that form live, read-only, and it returns items.
| for len(args) > 0 && commandWord.MatchString(args[0]) { | ||
| ex.words, args = append(ex.words, args[0]), args[1:] | ||
| } | ||
| // "webex <area> <resource> --help" stands for many commands. | ||
| if len(ex.words) == 0 || len(args) > 0 && strings.HasPrefix(args[0], "<") { | ||
| last = nil | ||
| continue |
There was a problem hiding this comment.
[P2] Validate commands with leading flags or positional placeholders
The skip intended for generic paths also drops concrete invocations. For example, webex --token "$WEBEX_TOKEN" calling people list in the quick start has no initial command words, while webex auth switch <email> in README has a placeholder after a complete command. Neither the command nor its flags are checked if either example goes stale. Resolve leading global flags and distinguish a placeholder argument from a placeholder command to preserve the coverage specified in AGENTS.md:127.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. Leading global flags are skipped, along with the value of a flag that takes one, before the command words are read. A placeholder after the words is skipped only when the words name a group (webex cc <resource> list); after a command (webex auth switch <email>) it is an argument, and the flags are still checked. Regression tests: the "leading global flag" and "argument placeholder" cases in TestDocumentCheckFindsStaleExamples.
| tokens := shellWords(line) | ||
| switch { | ||
| case len(tokens) > 0 && tokens[0] == "webex": | ||
| ex := skillExample{line: i + 1, text: line} |
There was a problem hiding this comment.
[P2] Check the Webex invocations embedded in setup shell commands
Requiring webex to be the first token skips both CLI invocations in skill/SETUP.md: mkdir … && webex post-install -y and nohup webex login --device --output json …. Including skill.Setup in the document map therefore does not protect either onboarding step against a rename. Recognize these shell command positions and validate the CLI arguments, as required by AGENTS.md:127.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. webex now counts as a command after a shell operator (&&, ||, ;, |, &) or after nohup, sudo or exec. Its words stop at the next operator or redirection, so both setup steps in SETUP.md are checked. Regression tests: the "after &&" and "after nohup" cases.
| for _, tok := range tokens { | ||
| // "[--flag <value>]" marks an optional flag. | ||
| if m := flagName.FindStringSubmatch(strings.TrimLeft(tok, "[")); m != nil { | ||
| flags = append(flags, m[1]) | ||
| } |
There was a problem hiding this comment.
[P3] Validate whole flag names and Cobra shorthands
The flag matcher accepts a valid prefix rather than the flag actually passed: --max_results in a people-list example is checked as --max, although Cobra rejects the former. Single-dash flags such as the setup skill's -y are never collected either. Strip only the documentation delimiters and =value, then check the complete long name or shorthand so invalid flags fail as specified in AGENTS.md:127.
The new test passes, but it never checks any skill command table and skips several existing example forms. Some corrected examples also still send an invalid request or operate on a different queue tier than their names suggest.
There was a problem hiding this comment.
Valid, fixed in 6bb97c3. Flags are now checked by their whole name, up to any =value and without the list punctuation [, ] and ,; a name that is not a well-formed long flag fails. Single-letter shorthands such as -y are checked with ShorthandLookup. No current document had a prefix-matched flag. Regression tests: the "flag prefix" and "unknown shorthand" cases.
Codex review: outcomeAll seven findings were valid and are fixed in 6bb97c3:
Checks at 6bb97c3:
|
functions get returns the code as fnCode, while create and update read only sourceCode; an update body copied from get fails with a wrapper-code error. functions test takes its inputs as an object and publishes the latest draft first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
Why
The handwritten examples in the skills, the README and the site pages had fallen behind the commands. Collection refreshes renamed commands and flags, and nothing checked the examples. An agent that ran them as written got
unknown commandorunknown flag. For example, the cc skill saiddial-numberhas no create, update or delete, and listeddial-number listandget, which don't exist.What changes
A new test,
skill_examples_test.go. It checks everywebexline in a code block of each skill file, the README and each site page. The command must exist, and every flag on the line must be one that command takes: its own flags, inherited flags, or--help. Flags on continuation lines count too. It also checks every row of a skill's| group | command, … |table. It skips lines with placeholders such aswebex cc <resource> listand the generated Command Reference. Before the fixes it reported 61 problems in the skills alone.Fixed examples:
dial-numbernow lists its real commands, includingcreate-dialed-mapping,update-dialed-mapping-idanddelete-dialed-mapping-id.users get-ci-idtakes--id.--address-book-id,--out-dial-ani-id).flowgotcha no longer says flows have only four commands.functions getreturns the code asfnCode, butcreateandupdateread onlysourceCode, and an update body copied fromgetfails with a wrapper-code error.functions testtakes{"inputs": {...}}and publishes the latest draft first.users bulk-update-dynamic-skills. The collection's example lists every field of a skill record with no descriptions, and Webex returns a bare 500 whenitemIdentifieris missing or the value field has the wrong name.call-queue … -cxeis now… -customer-assist. Cisco's collection reads call queues only through those routes.user-call get-forwarding-settings-personandupdate-forward-person, andcall-settings-for-me get-my-forwardandupdate-my-forward.xapi execute-commandhas no--device-idflag; the device ID and the command's arguments go in the body ({"deviceId": …, "arguments": {…}}).workspace-locationscommands take--location-id.workspace-metricsandworkspace-personalizationare corrected.participants get-meetingandupdatetake only--participant-id.--meeting-invitee-id.summaries deletetakes--summary-id.meeting-qa list-q.transcripts list-meeting-compliance-officerhas no--host-email.team-membershipstakes--membership-id.attachment-actions gettakes--id.ecm-folder-linkingtable row is corrected.hybrid-clusters gettakes--hybrid-cluster-id.hybrid-connectors listhas no filter flag.authorizations list-user).service-appshas onlycreate-access-token.admin groups list-search,admin admin-audit list-eventsandcalling reports-detailed-call-history get.AGENTS.md mentions the test under Documentation checks.
Checks
go vet ./...andgo test -p 1 -timeout 300s ./...pass.python3 -m unittest discover -s codegen -p 'test_*.py': 91 tests pass.make codegenleaves every file unchanged, so the generated Command Reference blocks are untouched.npm run buildinsite/passes.🤖 Generated with Claude Code
https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.