Viking Recommend
When to Use
Use this skill for:
- recommendation runtime checks
- V2 recommend scene inspection, creation, publishing, deletion, and deployment verification
- V2 recommend rule inspection and management
- diagnosing whether bad recommendation results come from scene config, behavior-scene binding, user context, parent/item context, data readiness, or online config propagation
- separating persistent scene defaults from request-only runtime parameters
If the user asks a general product/API/auth/pricing question rather than a recommend workflow action, temporarily hand off to vs-product-qa and return here only after the grounded product answer is complete.
Version Check
Before starting this skill workflow, run vs version check --json. Continue only when status is up-to-date. If status is update-available, stop and tell the user to update the cloned vs repository, then run git pull --ff-only, bash ./scripts/install.sh, and bash ./scripts/install-skills.sh all --target auto --force (PowerShell: scripts/install.ps1 and scripts/install-skills.ps1). If the status is unknown, stop and report that the CLI version could not be verified.
Preconditions
- an
application-idis available - runtime checks need a
scene-idand usually at least one ofuser-id,parent-id, or shopping-cart item context - scene creation needs an item dataset bound to the application and at least one behavior scene value from the bound UserEvent dataset; when the value is not explicit, resolve it with
vs dataset get --id <user-event-dataset-id> --fullfrom the UserEvent schema field whose business attribute is UserEventScene - if the scene does not exist yet, inspect the existing scene list first and only create a new scene when reuse is not possible
- the agent should treat the installed CLI behavior as authoritative when help text, skill text, and runtime behavior disagree
Scope
Before changing anything, decide whether the user wants:
- a temporary runtime verification with
vs recommend run - a persistent V2 recommend scene publish
- a new V2 recommend scene for a target page or module
- a reusable V2 recommend rule change
- a readiness, binding, or online-config diagnosis for a failing recommendation app
This skill stays at the recommendation workflow level. Do not embed low-level API field mappings, payload design, or enum interpretation here. When a concrete command needs exact parameters, first consult vs-product-qa and the matching API reference. For recommend scene update, the authoritative update contract is PublishRecommendSceneV2.
V2 API Semantics
Recommend scene and rule commands now use the V2 OpenAPI surface.
recommend scene create->CreateRecommendSceneV2recommend scene list->ListRecommendScenesV2recommend scene get->GetRecommendSceneV2recommend scene update->PublishRecommendSceneV2recommend scene delete->DeleteRecommendSceneV2recommend rule list->ListRecommendRulesV2recommend rule get->GetRecommendRuleV2recommend rule upsert->UpsertRecommendRuleV2recommend rule delete->DeleteRecommendRuleV2
V2 naming differences:
- request IDs use
ApplicationId,SceneId,RuleId,DatasetId,ItemDatasetId - behavior-scene binding is
UserEventScenes[]; use--user-event-scenes RecommendModelis a string:defaultorlong_sequenceRecommendOptimizationTargetis a string:ctror empty- create/publish/delete/upsert write APIs support
DryRun - scene lists return
Scenes[]; rule lists returnRules[] - rule type values are snake_case in V2, for example
user_interest,item_cf,force_item,boost_bury_cond,cold_start,rec_reason
Deployment Semantics
Recommend scene deployment is not just a row update.
recommend scene updatecallsPublishRecommendSceneV2. The backend validates the scene, persists the updated scene/config/rule bindings, generates online recommendation metadata, writes runtime config, and marks the scene aspublished.- Standard-model scene creation with an item dataset can synchronously deploy through the same online path. Long-sequence scene creation submits an async workflow; treat
SceneConfigPhase/Statusas part of the deployment state. - Online deployment writes generated
recommend_scene_metaunder the scene namespace in ConfigCenter; DTS then syncs it to the online runtime store used by rec-retriever. - Deployment also updates application-level behavior-scene mapping under
event_scene_mapping: it storesscene-id -> selected UserEventScenes[]. This is the selected binding, not the full list of possibleevent_scenevalues. - Deployment updates deduplication/invert configs when impression/exposure dedupe is enabled.
GetRecommendSceneExpConfigV2is a preview/experience-config helper and is not a public CLI/OpenAPI workflow.
Important difference from search scenes: SearchSceneV2 supports partial Config publish semantics. Recommend PublishRecommendSceneV2 should be treated as a full scene publish. Build update payloads from the current vs recommend scene get response and preserve unrelated config areas unless the user explicitly asks to replace them. When using the CLI, --config and advanced flags are merged over the readback at the first Config level; if changing a nested field, provide the full updated first-level object.
Commands
vs recommend run: send a production-style recommendation requestvs recommend scene create/vs recommend scene list/vs recommend scene get: manage V2 recommend scenesvs recommend scene update: publish V2 recommend scene metadata andRecommendSceneConfigV2vs recommend scene delete: delete and undeploy a recommend scenevs recommend rule list/vs recommend rule get: inspect V2 reusable recommend rulesvs recommend rule upsert/vs recommend rule delete: create, update, or delete V2 reusable recommend rulesvs dataset get --full: inspect item/UserEvent schema, enum metadata, and exact field casingvs app dataset-config get --full: inspect app-bound dataset field config when a non-workflow diagnostic explicitly needs app-level configvs app status/vs app diagnose: inspect readiness before blaming runtime results
Workflow
- Start by determining whether the user wants:
- a runtime recommendation check
- a persistent recommend scene publish
- a new recommend scene
- a reusable recommend rule change
- a readiness, behavior-scene binding, or online-config diagnosis
- Before running any concrete command, consult
vs-product-qato confirm the current command behavior and exact parameter requirements. - For runtime checks, use
vs recommend runfirst, then inspectresult.rec_results,extra_info, recall info, boost status, diversity status, and invalid parent items from the raw response. - For natural-language scene-change requests, use
references/recommend-scene-natural-language-routing.mdto identify the target V2 field, config area, deployment check, or rule-resource workflow before running resource-specific read/write commands such asvs dataset get,vs recommend rule list/get/upsert/delete, orvs recommend scene update. - For persistent changes to an existing scene, run the selected workflow's first
vs recommend scene get --application-id <application-id> --scene-id <scene-id>step before any later schema, dataset, rule, or publish command. Treat the readback as the base payload for a full publish; first-levelConfigsections may be replaced, but nested field edits require a full updated first-level section. - Before building a
recommend scene createorrecommend scene updatepayload, consult the matching V2 API reference. The routing reference identifies where to edit; it is not sufficient for final payload values. - Before creating or updating a recommend scene, resolve the target page/module and the required
UserEventScenes. For real writes, pass--confirm-entry-binding. - Resolve dataset facts before writing:
- use
vs dataset get --id <user-event-dataset-id> --fullto inspectevent_sceneandevent_typeenum values; forevent_scene, find the schema field whose business attribute is UserEventScene and readEnumerateMeta[].EnumerateValue - use
vs dataset get --id <item-dataset-id> --fullfor exact item field casing and filterable fields
- use
- For rule-resource changes, follow the concrete command sequence in
references/recommend-scene-natural-language-routing.md; do not replace a requiredvs recommend rule getstep withvs recommend rule list, or replace a requiredvs recommend scene getstep withvs recommend scene list. - After every scene mutation, immediately read the scene back with
vs recommend scene get --application-id <application-id> --scene-id <scene-id>and verify that the intended persistent fields are visible. - When deployment matters, run a runtime check with
vs recommend runafter readback. If results do not reflect the update, inspect readiness/status and propagation before changing config again. - If command behavior conflicts with the skill text or
--help, trust the installed CLI behavior first, and only then inspect repository code when needed to explain or fix the gap.
References
references/recommend-scene-natural-language-routing.md: workflow-oriented mapping from natural-language recommend-scene requests to the first V2 config area, scene field, deployment check, or rule-resource workflow you should inspect../vs-product-qa/references/api-references/control-plane/scene/CreateRecommendSceneV2.md: authoritative V2 recommend-scene creation fields, enum values, and behavior-event constraints../vs-product-qa/references/api-references/control-plane/scene/PublishRecommendSceneV2.md: authoritative V2 recommend-scene publish payload,Configfields, enum-like string values, and validation notes../vs-product-qa/references/api-references/control-plane/scene/GetRecommendSceneV2.md: authoritative V2 recommend-scene readback shape../vs-product-qa/references/api-references/control-plane/scene/UpsertRecommendRuleV2.md: authoritative V2 reusable recommend-rule upsert payload and rule type values../vs-product-qa/references/api-references/data-plane/online-api/Recommend.md: authoritative online recommendation request and response contract forvs recommend run
Customer Environment Principle
- In customer environments, assume repository source code is unavailable.
- Execute tasks using only the installed skills, the packaged
vsCLI surface (--help, command output, and observed runtime behavior), and explicit user-provided information. - Do not rely on reading local repository source files, generated repo snapshots, or implementation details to decide runtime actions.
- If the installed CLI behavior conflicts with a skill, trust the installed CLI behavior first.
- If the skills and the packaged CLI still do not provide enough information to proceed safely, stop and ask the user instead of searching source code.
Constraints
- Before executing any concrete
vs ...command in this recommend workflow, first consultvs-product-qato verify the current command surface, required flags, payload fields, input format, and allowed values. Only after that check may you finalize parameters and run the command. - Numbered workflows in
references/recommend-scene-natural-language-routing.mdare ordered command sequences. Execute their requiredvs ...commands serially in the documented order; do not parallelize, reorder, or replace required read commands with list-style alternatives unless the workflow explicitly says the step is optional. - The first resource command in a numbered workflow is mandatory even when IDs are already available from test context or user input. Do not run later dataset/schema/rule reads before earlier
vs recommend scene getsteps; use the scene readback as the authoritative source for scene-bound IDs such asItemDatasetId. - When a numbered rule-attachment workflow creates a reusable rule with
vs recommend rule upsertand then listsvs recommend rule get, the rule readback is a required in-flow validation step to explicitly confirm the rule was created successfully before continuing to the next numbered step. - Before building a
recommend scene createorrecommend scene updatepayload, consult the matching V2 API reference. The routing reference only identifies the config area; it is not sufficient for final payload values. - Recommend scene update is a full publish workflow. Start from
vs recommend scene get, carry forward top-level fields and existingConfig, then modify only the requested area. The CLI may accept first-levelConfigpatches and merge them over readback; do not send or recommend tiny nested patches such as onlyRecAssistantConfig.AnswerStyle. - When the user request includes a scene type, model, optimization, strategy, channel, or mode qualifier such as
for_you,related,shopping_cart,long_sequence,ctr,custom merge,cold_start,item_similarity,always,boost, orbury, do not treat enabling the feature as sufficient. Set the corresponding field explicitly and verify that exact value in the readback response. - Field name case sensitivity: All item dataset field names used in recommendation filters,
ShuffleConfig.Rules[].FieldName,ShuffleConfig.Rules[].ShuffleExpression.field,BoostBuryCondConfig.Rules[].Config.field,ColdStartConfig.ItemFilter.field,FilterConfig.ItemTypeFilter.Filter.field, and ruleConfigare case-sensitive. Before writing any field name into config, first complete any earliervs recommend scene getstep required by the selected workflow, then runvs dataset get --id <item-dataset-id> --fullwith the dataset ID from that readback and copy the field name exactly as it appears there. If the field name does not match the schema, stop and ask the user to confirm which field they mean instead of guessing. UserEventScenes[]values must come from the bound UserEvent dataset'sevent_sceneenum values. In console, the dropdown is populated from the UserEvent schema field whose business attribute is UserEventScene, usingEnumerateMeta[].EnumerateValuereturned byGetDataset; mirror that withvs dataset get --id <user-event-dataset-id> --full.ClickEventTypes[],PositiveEventTypes[], andNegativeEventTypes[]values must come from that dataset'sevent_typeenum values.event_sceneoption discovery is read-time metadata:vs dataset get --id <user-event-dataset-id> --fullreturns schema enum metadata plus offline-received event_scene values when available. Do not assume those candidate values are written to scene config until the user selects them and publishes the scene.FilterConfig.ItemTypeFilteris schema-dependent: it is required when the item dataset has an ItemType business attribute, invalid when the dataset has no ItemType business attribute, and requires the paired ParentId business attribute plus a filterable ItemType field.- For cold-start item-field filtering, first run
vs dataset get --id <item-dataset-id> --full, useItemConditionType="custom_filter"with a non-emptyItemFilterwhose field names exactly match filterable schema fields, and submit the complete first-levelColdStartConfigobject. Do not combinecustom_filterwith an import-time condition or send only a nestedItemFilterpatch. ColdStartConfig.ItemFilteruses the console item-filter DSL directly. For a single equality condition such ascategory = 短袖, send exactly{"field":"category","op":"must","conds":["短袖"]}. Do not wrap a single condition in{"op":"and","conds":[...]}, and do not use condition-tree operators such as{"field":"category","op":"eq","value":"短袖"}. Console maps=/==andintoop:"must"; it maps!=andnot_intoop:"must_not"; range comparisons useop:"range"withgt/gte/lt/lte.- When configuring
ReasonTemplateConfig, every enabled template must include an explicit non-nullVariables[]array derived from the template and recall channel. Use["rank"]forhot_item,["category"]foruser_profile, de-duplicateditem.*placeholders foritem_cf/item_similarity, and[]for channels with no variables. If any requested template contains{{item.<field_path>}}, runvs dataset get --id <item-dataset-id> --fullwith theItemDatasetIdfrom the workflow's prior scene readback before dry-run or publish, and verify the exact field path; do not skip this because the field name appears obvious. The console may display variables from the template text, but the backend stores only the providedVariables; omitting it makes runtime reason rendering incomplete. - Removing or replacing a scene's reusable rule binding does not authorize deleting the old rule by itself. Keep detached rules by default. When cleanup is explicitly requested, publish and read back the scene first, then verify each exact old rule has
Used=falsebefore deleting it; never delete a system-generated default rule. - Check scene-specific merge constraints before writing
MergeConfigs:for_youdoes not supportitem_similarity, andshopping_cartsupports onlyitem_similarity_firstorcustom. - Do not create or update a recommend scene until the target page/module and
UserEventScenesare resolved; use--confirm-entry-bindingfor real writes. - Start with the scene when debugging recommendation behavior; do not jump to raw API calls first.
- Use
vs recommend scene updatefor persistent recommendation behavior and do not invent low-level API mappings inside this skill. - For natural-language scene-change requests, use
references/recommend-scene-natural-language-routing.mdas the routing layer; if the target is a rule-resource workflow, do not reduce it to a single inline scene field edit. - For scene updates, prefer a readback check after mutation instead of assuming the write succeeded.
- If a scene update unexpectedly fails or appears to no-op, verify the accepted command behavior and parameter requirements before retrying.
- When reporting runtime results, summarize the scene, user context, item context, raw
rec_results, and relevantextra_infobefore proposing tuning changes. - Do not invent item titles or explanations. Ground every recommendation summary in the actual response payload.
- If you show only a subset such as Top 5, explicitly say that the full response contains more items.
- If a command failure or user follow-up turns into a product concept, capability, API field, console UI path, purchase, billing, or general troubleshooting question outside this recommend workflow, temporarily hand off to
vs-product-qa; return to this workflow only after the grounded product answer is complete.