name: vk-ads-operator description: "Use when Codex should operate the central VK Ads control plane: resolve project, inspect campaign data, validate plans, generate manual execution packs, and only then consider guarded writes."
VK Ads Operator
Purpose
Use the central control plane instead of hand-building VK Ads payloads inside the conversation. For manual cabinet handoff, use the manual execution pack and launch-session chain.
Offline Official Docs
- Local official VK API snapshot:
docs/reference/vk-api-official-snapshot/. - Auditor single-file copy:
audit/VK_API_OFFICIAL_DOCS_FOR_AUDITOR.md. - Use this snapshot when
dev.vk.comor VK Ads docs are unreachable without Russian VPN. - If a required VK API method, field, enum, or payload shape is missing from the local snapshot and existing repo evidence, ask Vitaly to retrieve the official page through VPN before designing or executing the payload.
Workflow
- Resolve
project_keyfrom explicit input or.vkads-project.yaml. - Read project context and capabilities.
- For planning, launch handoff, or hybrid launch rehearsal, run:
vkads_validate_campaign_planvkads_generate_manual_execution_packvkads_validate_manual_execution_packvkads_create_launch_workspacevkads_validate_hybrid_launch_readinessvkads_estimate_guardrails
- When the operator has moved the plan into the cabinet, record the launch with
vkads_record_manual_launch_session. - For Stage 5A/5B hybrid launch readiness, keep the sidecar honest:
vkads_capture_cabinet_snapshotvkads_resolve_launch_workspace_against_cabinetvkads_generate_api_payload_draftvkads_generate_real_cabinet_operator_runbookvkads_record_readback_after_manual_launch- if you are promoting live-read evidence, run
pnpm smoke:live-readwith explicitVKADS_SMOKE_PROJECT_KEY,VKADS_SMOKE_WORKSPACE_PATH, and scoped reads before treating registry runtime status as current truth
- For Stage 6A battle rehearsal, stay manual-first and use:
vkads_create_battle_run_candidatevkads_run_real_cabinet_preflightvkads_generate_battle_run_operator_packetvkads_record_operator_checkpointvkads_capture_battle_run_snapshotvkads_reconcile_battle_run_readbackvkads_generate_battle_run_closeout
- For Stage 6B controlled launch overlays, only continue after explicit user approval:
vkads_record_controlled_launch_approvalvkads_ingest_manual_resultswithanalysisPoint=day0|day1and linkedbattleRunIdvkads_run_day1_controlled_reviewvkads_generate_stage6b_controlled_launch_closeout
- For Stage 7A controlled hybrid live create, stay on the guarded path:
vkads_validate_live_create_candidatevkads_create_campaignwithexecutionMode=controlled_live_createvkads_record_operator_checkpointwithlive_create_approved,campaign_created_via_api,manual_fields_completed, andmanual_submit_completedas neededvkads_capture_live_create_readbackvkads_generate_stage7a_live_create_closeout
- If moderation rejects the launch or the cabinet UI diverges from the verified field map, record that with:
vkads_ingest_moderation_feedbackvkads_record_manual_ui_observation
- After launch, keep the manual loop consistent:
vkads_ingest_manual_resultsvkads_generate_optimization_recommendationsvkads_revise_campaign_planwhen the revision note is ready
- For Stage 9A-9K user-visible micro-pilots, use
guided-production-pilot-dev; prefer create-primary automation when live-write gates and existing lead-form evidence are available:
vkads_start_pilot_runvkads_generate_pilot_launch_packvkads_validate_pilot_go_no_govkads_resolve_pilot_api_create_inputsto resolve lead form, geo, package, package banner pattern, and approved creative refs before a retryvkads_prepare_pilot_api_create_previewto review the plannedcampaign + ad group + adentity treevkads_execute_pilot_api_createonly after exact approval, project lock, budget caps, and redacted readback gates passvkads_record_pilot_manual_launchvkads_readback_pilotvkads_record_pilot_observationvkads_recommend_pilot_next_actionvkads_close_pilot_run
- For Stage 10R/10S stopped method drafts, use
fast-create-dev; do not reuse Stage 9 REST v2 banner payload assumptions:
vkads_prepare_fast_create_runto pickvk_api_methods_classic_ad_draft_v1, run redacted method preflight, and generateapproval.txtvkads_method_targeting_preflightwhen link/audience checks are needed without creating artifactsvkads_method_readbackto inspect method-visible campaign/ad statevkads_execute_fast_create_runonly after the exactAPPROVE VKADS METHOD CREATE ... status=stopped ...text, project lock, and live-write gates pass
- For Stage 11A daily operations, stay read-only and use the existing CLIs:
pnpm hermes:daily-reportfor daily spend/click/lead/CPL decisionspnpm darky:lead-alerts -- --env-checkbefore enabling notificationspnpm darky:lead-alerts -- --dry-runor--initialize-baselinebefore any live Telegram delivery
- For Stage 11B and later local operator runs, prefer the canonical ignored
.env.local/VKADS_ENV_FILEenv bootstrap. Never print env values; env-check output must stay<set>/<missing>. - Only use live write tools after explicit user confirmation and only if the control plane allows the requested execution mode.
Hard Rules
- Do not bypass registry or guardrails.
- Do not invent raw VK Ads payloads when the control plane has a normalized request schema or manual execution pack.
- Do not invent VK API method details from memory. Check
docs/reference/vk-api-official-snapshot/first; if the official method details are missing, ask Vitaly for the source page instead of guessing. - Do not treat
ApiPayloadDraftas executable; it remains a non-executable sidecar in Stage 5/6/7. - Do not expose raw
vkads_create_campaignthroughguided-production-pilot-dev; Stage 9 create goes only throughvkads_execute_pilot_api_create. - Do not claim full Stage 9 entity-tree success unless redacted readback confirms
campaign + ad group + ad. - Stage 9H may accept
campaign + ad groupas a minimum shell result only with truthful outcomecampaign_ad_group_created_banner_manual_requiredand a manual banner completion packet. - Stage 9J child banner create sends a single
contentobject and must not sendpatternsortextblocks; its live rejection showed scalarcontent.*values are invalid. - Stage 9K child banner create keeps
contentbut wraps text fields as{ text: ... }and media fields as{ id: ... }; it must not sendpatterns,textblocks, or scalarcontent.*. - Do not reuse rejected Stage 9C/9D/9E/9F/9G/9H/9J approval text for Stage 9K; generate a fresh executable preview and wait for a fresh exact approval.
- Stage 9G may use VK validation-error pattern candidates only as bounded runtime evidence: max three attempts, raw IDs runtime-only, no submit/moderation/paid launch.
- Stage 10R/10S treats
vk_api_methods,vk_ads_rest_v2, andmanual_cabinetas separate families. Do not portpatterns,textblocks, orcontent.*assumptions from REST v2 intoads.createAds. - Stage 10S requires
VKADS_METHOD_ACCESS_TOKENforvk_api_methods; method calls must not fall back to VK Ads REST client-credentials tokens. - Stage 10R/10S method creates must stay stopped:
status=0, one campaign/ad maximum per approval, no moderation submit, no paid launch. - Do not expose raw
ads.createCampaignsorads.createAds; use onlyvkads_execute_fast_create_runinfast-create-dev. - Stage 11A/11B are read-only. Do not add banner-create retries, lifecycle writes, new write profiles, or new MCP tools for the daily operations baseline.
- Lead-alert repo artifacts and state files must not contain lead phone numbers, names, raw answers, tokens, headers, or raw VK IDs. Telegram may contain lead PII only in the live notification path after the operator intentionally runs non-dry-run alerts.
- Do not treat read-only annotations as a substitute for artifact review.
- Treat
vkads_create_campaignas a guarded live-write tool and never use it outsidecontrolled-live-create-dev.
References
references/tool-contracts.mddocs/reference/vk-api-official-snapshot/audit/VK_API_OFFICIAL_DOCS_FOR_AUDITOR.md- The manual execution artifact contract and UI evidence docs in the repo.