@thinkingai/ae-cli 6.1.9 → 6.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/README.md +25 -3
  2. package/README.zh.md +25 -3
  3. package/dist/{auth-56Z45UVR.js → auth-GDV3H5I4.js} +18 -8
  4. package/dist/{auth-ENM3FE6L.js → auth-NN55553T.js} +3 -3
  5. package/dist/{capability-2H6PAOA3.js → capability-TPORIKRQ.js} +19 -15
  6. package/dist/{capability-YPOQX6PL.js → capability-VQNC5CF7.js} +19 -15
  7. package/dist/chunk-4NN5IWVN.js +26 -0
  8. package/dist/{chunk-DB4Q3ANU.js → chunk-6A2FUCIS.js} +3 -3
  9. package/dist/{chunk-PVBYJWC2.js → chunk-7KQWSBSL.js} +4 -4
  10. package/dist/{chunk-24BAVOX3.js → chunk-AXDXJTPC.js} +3 -1
  11. package/dist/{chunk-CPVTECJ3.js → chunk-DT6Y3TD7.js} +5 -5
  12. package/dist/{chunk-EGEIXA2Z.js → chunk-DWO43OIB.js} +0 -248
  13. package/dist/{chunk-V6FR6WTW.js → chunk-GJJA4CQZ.js} +34 -2
  14. package/dist/{chunk-RGXCNC4N.js → chunk-GS2P7LFD.js} +50 -17
  15. package/dist/{chunk-LYVNONC4.js → chunk-JHENBQ5B.js} +35 -0
  16. package/dist/{chunk-3P3562ZX.js → chunk-MVDZ7DBQ.js} +5 -5
  17. package/dist/{chunk-LCXU3AAT.js → chunk-NBPKWKRA.js} +2 -2
  18. package/dist/{chunk-HQ2A7ITL.js → chunk-RBNKI5ZW.js} +50 -17
  19. package/dist/{chunk-LHVM35J4.js → chunk-TS6BUGUY.js} +4 -4
  20. package/dist/chunk-TUKQZTMI.js +250 -0
  21. package/dist/{chunk-J7MZHDHQ.js → chunk-VKD5WQKN.js} +5 -5
  22. package/dist/{chunk-3KI3RRXX.js → chunk-VTXHDCBW.js} +3 -3
  23. package/dist/{chunk-KTYR3U6D.js → chunk-YTG6Q75E.js} +10 -6
  24. package/dist/{chunk-IR4ZLVPW.js → chunk-YV52FB5G.js} +25 -3
  25. package/dist/{chunk-E7UXXHO3.js → chunk-Z3OXWCIA.js} +3 -3
  26. package/dist/{cli-token-4SBMXAUK.js → cli-token-GL5MS5FK.js} +4 -4
  27. package/dist/{client-PP5FETMW.js → client-DAIPF7XN.js} +4 -4
  28. package/dist/{community-report-client-KK2QBANO.js → community-report-client-M2RW4MXD.js} +2 -2
  29. package/dist/config-4VZNLBKF.js +489 -0
  30. package/dist/index.js +94 -35
  31. package/dist/memory-RWJW4XFO.js +892 -0
  32. package/dist/memory-VO2ZJCRT.js +892 -0
  33. package/dist/{metadata-JIQ77HFY.js → metadata-YGTHR2XJ.js} +8 -8
  34. package/dist/{metadata-AN3YFZEV.js → metadata-ZRN2GHPN.js} +8 -8
  35. package/dist/{model-JASQVOFD.js → model-CLUIK3K5.js} +7 -5
  36. package/dist/{raw-XJCAT3HX.js → raw-52B4UKO4.js} +8 -7
  37. package/dist/sync-3REDHGY6.js +10259 -0
  38. package/dist/{te-agent-JHUG6DVV.js → te-agent-XNPELAKX.js} +580 -84
  39. package/dist/{te-analysis-IWQZO423.js → te-analysis-GJI5FZUL.js} +1611 -25
  40. package/dist/{te-analysis-X222IRYR.js → te-analysis-N2BRDJZ5.js} +1611 -25
  41. package/dist/{te-community-QOYIYEJI.js → te-community-SQXKE5OO.js} +7 -7
  42. package/dist/{te-community-UFKI6ONP.js → te-community-TYSNU3NQ.js} +7 -7
  43. package/dist/{te-dataops-PZQ5NQLY.js → te-dataops-5TM7WZDI.js} +370 -189
  44. package/dist/{te-dataops-XTWVTJCA.js → te-dataops-OWIADNSM.js} +370 -189
  45. package/dist/{te-engage-NLZUPSBK.js → te-engage-F7V55KVW.js} +333 -105
  46. package/dist/{te-engage-E7F4HTXU.js → te-engage-FMYAYCNV.js} +333 -105
  47. package/dist/{te-experiment-N63WF7XA.js → te-experiment-JWXOYJ3W.js} +83 -10
  48. package/dist/{te-experiment-D32TB6ZB.js → te-experiment-UPDMHCAJ.js} +83 -10
  49. package/dist/{te-kb-E7NSCBRB.js → te-kb-VRMEY3D4.js} +6 -6
  50. package/dist/{te-meta-GBDTMPEL.js → te-meta-53BVXPFI.js} +7 -7
  51. package/dist/{te-meta-ZTLTSHXC.js → te-meta-TOCBPBXI.js} +7 -7
  52. package/dist/{te-system-AH7DMCAQ.js → te-system-XGS5EQIQ.js} +4 -4
  53. package/dist/{te-team-BQ3SKSZV.js → te-team-BZRDV2CM.js} +7 -7
  54. package/dist/{update-DKG6UXEM.js → update-HEDXGOJH.js} +8 -6
  55. package/package.json +5 -2
  56. package/skills/ae-agent/SKILL.md +178 -16
  57. package/skills/ae-agent/references/add-skill.md +22 -10
  58. package/skills/ae-agent/references/edit-skill.md +24 -14
  59. package/skills/ae-agent/references/find-archived-conversations.md +82 -0
  60. package/skills/ae-agent/references/restore-conversation.md +54 -0
  61. package/skills/ae-agent/references/upload-skill.md +24 -14
  62. package/skills/ae-analysis/SKILL.md +1 -1
  63. package/skills/ae-analysis/references/command_index.md +109 -42
  64. package/skills/ae-analysis/references/debug_data_list.md +28 -0
  65. package/skills/ae-analysis/references/debug_device_add.md +23 -0
  66. package/skills/ae-analysis/references/debug_device_list.md +19 -0
  67. package/skills/ae-analysis/references/debug_device_select.md +22 -0
  68. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  69. package/skills/ae-analysis/references/plan_sync_display_names.md +28 -0
  70. package/skills/ae-analysis/references/project_access_detail_get.md +3 -3
  71. package/skills/ae-analysis/references/project_data_power_delete.md +3 -3
  72. package/skills/ae-analysis/references/project_data_power_get.md +3 -3
  73. package/skills/ae-analysis/references/project_data_power_list.md +3 -3
  74. package/skills/ae-analysis/references/project_data_power_upsert.md +3 -3
  75. package/skills/ae-analysis/references/project_entity_create.md +3 -3
  76. package/skills/ae-analysis/references/project_entity_delete.md +3 -3
  77. package/skills/ae-analysis/references/project_entity_event_list.md +3 -3
  78. package/skills/ae-analysis/references/project_entity_get.md +3 -3
  79. package/skills/ae-analysis/references/project_entity_list.md +3 -3
  80. package/skills/ae-analysis/references/project_entity_update.md +3 -3
  81. package/skills/ae-analysis/references/project_function_list.md +3 -3
  82. package/skills/ae-analysis/references/project_info_create.md +25 -0
  83. package/skills/ae-analysis/references/project_info_delete.md +24 -0
  84. package/skills/ae-analysis/references/project_info_get.md +3 -3
  85. package/skills/ae-analysis/references/project_info_list.md +3 -3
  86. package/skills/ae-analysis/references/project_info_update.md +3 -3
  87. package/skills/ae-analysis/references/project_mark_time_create.md +3 -3
  88. package/skills/ae-analysis/references/project_mark_time_delete.md +3 -3
  89. package/skills/ae-analysis/references/project_mark_time_list.md +3 -3
  90. package/skills/ae-analysis/references/project_mark_time_update.md +3 -3
  91. package/skills/ae-analysis/references/project_member_add.md +3 -3
  92. package/skills/ae-analysis/references/project_member_batch_update.md +3 -3
  93. package/skills/ae-analysis/references/project_member_candidate_list.md +3 -3
  94. package/skills/ae-analysis/references/project_member_handover_export.md +3 -3
  95. package/skills/ae-analysis/references/project_member_handover_run.md +3 -3
  96. package/skills/ae-analysis/references/project_member_import.md +3 -3
  97. package/skills/ae-analysis/references/project_member_list.md +3 -3
  98. package/skills/ae-analysis/references/project_member_receiver_list.md +3 -3
  99. package/skills/ae-analysis/references/project_member_remove.md +3 -3
  100. package/skills/ae-analysis/references/project_member_update.md +3 -3
  101. package/skills/ae-analysis/references/project_owner_update.md +3 -3
  102. package/skills/ae-analysis/references/project_permission_binding_list.md +3 -3
  103. package/skills/ae-analysis/references/project_receive_status_update.md +3 -3
  104. package/skills/ae-analysis/references/project_role_delete.md +3 -3
  105. package/skills/ae-analysis/references/project_role_function_list.md +3 -3
  106. package/skills/ae-analysis/references/project_role_get.md +3 -3
  107. package/skills/ae-analysis/references/project_role_list.md +3 -3
  108. package/skills/ae-analysis/references/project_role_upsert.md +3 -3
  109. package/skills/ae-analysis/references/project_role_user_list.md +3 -3
  110. package/skills/ae-analysis/references/project_space_list.md +1 -1
  111. package/skills/ae-analysis/references/project_timezone_get.md +3 -3
  112. package/skills/ae-analysis/references/project_timezone_overview.md +3 -3
  113. package/skills/ae-analysis/references/project_timezone_update.md +3 -3
  114. package/skills/ae-analysis/references/project_user_id_items_update.md +3 -3
  115. package/skills/ae-analysis/references/system_admin_function_list.md +22 -0
  116. package/skills/ae-analysis/references/system_admin_function_update.md +26 -0
  117. package/skills/ae-analysis/references/system_admin_list.md +21 -0
  118. package/skills/ae-analysis/references/system_admin_remove.md +25 -0
  119. package/skills/ae-analysis/references/system_admin_upsert.md +25 -0
  120. package/skills/ae-analysis/references/system_function_list.md +21 -0
  121. package/skills/ae-analysis/references/system_member_add.md +25 -0
  122. package/skills/ae-analysis/references/system_member_candidate_list.md +22 -0
  123. package/skills/ae-analysis/references/system_member_delete.md +25 -0
  124. package/skills/ae-analysis/references/system_member_list.md +24 -0
  125. package/skills/ae-analysis/references/system_member_mfa_unbind.md +25 -0
  126. package/skills/ae-analysis/references/system_member_password_reset.md +32 -0
  127. package/skills/ae-analysis/references/system_member_project_batch_update.md +27 -0
  128. package/skills/ae-analysis/references/system_member_status_update.md +26 -0
  129. package/skills/ae-analysis/references/system_member_update.md +23 -0
  130. package/skills/ae-analysis/references/system_mfa_get.md +21 -0
  131. package/skills/ae-analysis/references/system_mfa_update.md +25 -0
  132. package/skills/ae-analysis/references/system_node_monitor_list.md +24 -0
  133. package/skills/ae-analysis/references/system_oauth2_update.md +22 -0
  134. package/skills/ae-analysis/references/system_ops_alert_contact_delete.md +25 -0
  135. package/skills/ae-analysis/references/system_ops_alert_contact_list.md +23 -0
  136. package/skills/ae-analysis/references/system_ops_alert_contact_test.md +29 -0
  137. package/skills/ae-analysis/references/system_ops_alert_contact_upsert.md +39 -0
  138. package/skills/ae-analysis/references/system_preference_get.md +21 -0
  139. package/skills/ae-analysis/references/system_preference_update.md +22 -0
  140. package/skills/ae-analysis/references/system_project_usage_list.md +28 -0
  141. package/skills/ae-analysis/references/system_query_alert_rule_list.md +21 -0
  142. package/skills/ae-analysis/references/system_query_alert_rule_update.md +26 -0
  143. package/skills/ae-analysis/references/system_query_monitor_overview.md +26 -0
  144. package/skills/ae-analysis/references/system_query_task_cancel.md +25 -0
  145. package/skills/ae-analysis/references/system_query_task_export.md +49 -0
  146. package/skills/ae-analysis/references/system_query_task_get.md +23 -0
  147. package/skills/ae-analysis/references/system_query_task_list.md +35 -0
  148. package/skills/ae-analysis/references/system_query_task_options.md +27 -0
  149. package/skills/ae-analysis/references/system_receiver_address_delete.md +26 -0
  150. package/skills/ae-analysis/references/system_receiver_address_overview.md +21 -0
  151. package/skills/ae-analysis/references/system_receiver_address_project_list.md +21 -0
  152. package/skills/ae-analysis/references/system_receiver_address_promote.md +24 -0
  153. package/skills/ae-analysis/references/system_receiver_address_upsert.md +27 -0
  154. package/skills/ae-analysis/references/system_receiver_detection_get.md +22 -0
  155. package/skills/ae-analysis/references/system_receiver_detection_run.md +22 -0
  156. package/skills/ae-analysis/references/system_receiver_detection_update.md +25 -0
  157. package/skills/ae-analysis/references/system_role_delete.md +26 -0
  158. package/skills/ae-analysis/references/system_role_function_list.md +22 -0
  159. package/skills/ae-analysis/references/system_role_get.md +22 -0
  160. package/skills/ae-analysis/references/system_role_list.md +24 -0
  161. package/skills/ae-analysis/references/system_role_upsert.md +27 -0
  162. package/skills/ae-analysis/references/system_role_user_list.md +22 -0
  163. package/skills/ae-analysis/references/system_seat_list.md +25 -0
  164. package/skills/ae-analysis/references/system_seat_update.md +26 -0
  165. package/skills/ae-analysis/references/system_smtp_delete.md +24 -0
  166. package/skills/ae-analysis/references/system_smtp_get.md +21 -0
  167. package/skills/ae-analysis/references/system_smtp_test.md +22 -0
  168. package/skills/ae-analysis/references/system_smtp_upsert.md +31 -0
  169. package/skills/ae-analysis/references/system_third_party_login_disable.md +25 -0
  170. package/skills/ae-analysis/references/system_third_party_login_list.md +21 -0
  171. package/skills/ae-analysis/references/system_third_party_login_upsert.md +33 -0
  172. package/skills/ae-analysis/references/system_usage_overview.md +21 -0
  173. package/skills/ae-analysis/references/system_usage_trend_export.md +44 -0
  174. package/skills/ae-analysis/references/system_usage_trend_query.md +28 -0
  175. package/skills/ae-dataops/SKILL.md +1 -1
  176. package/skills/ae-dataops/references/dataops-flow-create.md +51 -16
  177. package/skills/ae-engage/SKILL.md +56 -26
  178. package/skills/ae-engage/references/activity-activity.md +3 -0
  179. package/skills/ae-engage/references/activity-approval.md +12 -4
  180. package/skills/ae-engage/references/activity-task.md +21 -6
  181. package/skills/ae-engage/references/activity-topic.md +31 -13
  182. package/skills/ae-engage/references/add-channel.md +170 -41
  183. package/skills/ae-engage/references/build-task-save-guide.md +40 -27
  184. package/skills/ae-engage/references/channel-update-config.md +3 -2
  185. package/skills/ae-engage/references/common-metric.md +48 -120
  186. package/skills/ae-engage/references/flow-detail.md +13 -0
  187. package/skills/ae-engage/references/preset-event.md +12 -32
  188. package/skills/ae-engage/references/save-flow.md +127 -64
  189. package/skills/ae-engage/references/save-task.md +197 -59
  190. package/skills/ae-engage/references/scene-config-metric.md +3 -0
  191. package/skills/ae-engage/references/scene-preset-metric.md +8 -37
  192. package/skills/ae-engage/references/scene-strategy-audience.md +51 -643
  193. package/skills/ae-engage/references/scene-strategy.md +6 -6
  194. package/skills/ae-engage/references/task-detail.md +10 -0
  195. package/skills/ae-engage/references/task-submit-approval.md +45 -0
  196. package/skills/ae-engage/references/validate-flow-node-config.md +1 -1
  197. package/skills/ae-experiment/SKILL.md +21 -1
  198. package/skills/ae-experiment/references/check_experiment_ready.md +2 -0
  199. package/skills/ae-experiment/references/query_experiment_detail.md +6 -0
  200. package/skills/ae-experiment/references/query_experiment_list.md +4 -0
  201. package/skills/ae-experiment/references/query_experiment_list_archived.md +3 -0
  202. package/skills/ae-experiment/references/query_metric_detail.md +5 -0
  203. package/skills/ae-experiment/references/query_metric_list.md +3 -0
  204. package/skills/ae-experiment/references/save_experiment.md +46 -3
  205. package/skills/ae-experiment/references/save_metric.md +62 -0
  206. package/skills/ae-experiment/references/save_submit_experiment.md +3 -0
  207. package/skills/ae-experiment-design/SKILL.md +149 -0
  208. package/skills/ae-experiment-design/agents/openai.yaml +4 -0
  209. package/skills/ae-experiment-design/references/client-experiment-sdk.md +147 -0
  210. package/skills/ae-experiment-design/references/experiment-creation.md +108 -0
  211. package/skills/ae-experiment-design/references/experiment-sdk-contract.md +100 -0
  212. package/skills/ae-experiment-design/references/exposure-contract.md +91 -0
  213. package/skills/ae-experiment-design/references/hybrid-experiment-sdk.md +74 -0
  214. package/skills/ae-experiment-design/references/metric-readiness.md +143 -0
  215. package/skills/ae-experiment-design/references/platform-operations.md +99 -0
  216. package/skills/ae-experiment-design/references/sdk-index.md +76 -0
  217. package/skills/ae-experiment-design/references/sdk-integration.md +114 -0
  218. package/skills/ae-experiment-design/references/sdk-troubleshooting.md +139 -0
  219. package/skills/ae-experiment-design/references/server-experiment-sdk.md +78 -0
  220. package/skills/ae-experiment-design/scripts/calculate_experiment_plan.py +450 -0
  221. package/skills/ae-experiment-insight/SKILL.md +149 -0
  222. package/skills/ae-experiment-insight/agents/openai.yaml +4 -0
  223. package/skills/ae-experiment-insight/references/decision-framework.md +69 -0
  224. package/skills/ae-experiment-insight/references/diagnostic-playbook.md +225 -0
  225. package/skills/ae-experiment-insight/references/platform-operations.md +76 -0
  226. package/skills/ae-experiment-insight/scripts/analyze_experiment.py +478 -0
  227. package/skills/ae-generate-tracking-code/SKILL.md +24 -8
  228. package/skills/ae-generate-tracking-code/references/debug-script.md +46 -37
  229. package/skills/ae-generate-tracking-plan/SKILL.md +26 -1
  230. package/skills/ae-metadata/SKILL.md +1 -1
  231. package/dist/config-BSSALXEN.js +0 -128
  232. package/dist/sync-QFP4XFN3.js +0 -485
@@ -24,9 +24,9 @@ ae-cli engage-scene strategy update --project-id <project_id> \
24
24
  # Query a strategy's log
25
25
  ae-cli engage-scene strategy log --project-id <project_id> --strategy-uuid <uuid>
26
26
 
27
- # Predict custom-audience size (mix QP)
27
+ # Predict custom-audience size
28
28
  ae-cli engage-scene strategy predict --project-id <project_id> \
29
- --qp '<targetClusterQp JSON string>' \
29
+ --definition-request '{"type":"condition","conditions":{...}}' \
30
30
  --zone-offset 8 \
31
31
  [--strategy-uuid <uuid>]
32
32
 
@@ -48,7 +48,7 @@ ae-cli engage-scene strategy manage --project-id <project_id> --config-id <confi
48
48
  | create | `--project-id`, `--payload` | payload = `ConfigStrategyAddDTO`. |
49
49
  | update | `--project-id`, `--payload` | payload = `ConfigStrategyModifyDTO` (`strategyUuid` + fields). |
50
50
  | log | `--project-id`, `--strategy-uuid` | read. |
51
- | predict | `--project-id`, `--qp`, `--zone-offset` | Optional `--strategy-uuid`, `--request-id`. read. |
51
+ | predict | `--project-id`, `--definition-request`, `--zone-offset` | Optional `--strategy-uuid`, `--request-id`. read. |
52
52
  | batch-copy | `--project-id`, `--config-id`, `--strategy-ids` | `--op-mode` optional (default `batch`). |
53
53
  | manage | `--project-id`, `--config-id`, `--action` | Lifecycle actions require `--strategy-uuid-list`; review actions require `--strategy-list`; write. |
54
54
 
@@ -67,10 +67,10 @@ ae-cli engage-scene strategy manage --project-id <project_id> --config-id <confi
67
67
  - Discover real strategy UUIDs / config IDs first; never invent IDs.
68
68
  - **Custom audience (`targetClusterType=1`)** — follow [`scene-strategy-audience.md`](scene-strategy-audience.md) end-to-end:
69
69
  1. Preflight every **用户满足** user property and **用户行为** event via `analysis-meta property get` / `event get`; if missing, **stop** and list available properties — never invent or drop.
70
- 2. Assemble mix QP with **two-block layout**: `totalCFilter.filts[0]` = 用户满足, `totalCFilter.filts[1]` = 用户行为; `totalCFilter.relation` = 且/或 between them. **Never** nest `event` inside user-side `COMPOUND`.
71
- 3. `JSON.stringify` `targetClusterQp`; then `strategy create|update`.
70
+ 2. Build an Analysis-compatible semantic condition in `payload.definitionRequest`.
71
+ 3. Reuse the same definition with `strategy predict --definition-request`.
72
72
  4. **Do not** call `analysis user-cluster create` unless the user explicitly asks for an existing/named cluster.
73
- - Full QP spec + examples A/B/C: [`scene-strategy-audience.md`](scene-strategy-audience.md).
73
+ - Semantic contract and examples: [`scene-strategy-audience.md`](scene-strategy-audience.md).
74
74
  - **`create` requires an enabled template** on the same config item. Enable workflow: `config-param batch-add` → `template create` → `template update` (non-empty `config[]` with real `paramId`) → `template update-status --status 1`. Otherwise `create` returns `TEMPLATE_ENABLE`.
75
75
  - `create` output field is `data.strategy_uuid` (not `strategy_id`).
76
76
  - `manage` supports `online`, `offline`, `suspend`, `delete`, `approve`, `deny`, and `cancel`; it is a write operation.
@@ -5,6 +5,16 @@ Query the details of a single task.
5
5
 
6
6
  Mapped command: `ae-cli engage-task task get`
7
7
 
8
+ For a custom target audience, the response hides persisted `qp` and returns:
9
+
10
+ - `definition_status`: `AVAILABLE`, `UNAVAILABLE`, or `NOT_APPLICABLE`
11
+ - `definition_request`: the Analysis-compatible semantic audience definition when available
12
+ - `definition_unavailable_reason`: present only when a historical QP cannot be reversed
13
+
14
+ Reuse `definition_request` as `req.targetConfig.definitionRequest` when updating a task.
15
+ Soft-deleted tasks are treated as unavailable and return `TASK_NOT_FOUND`, matching task-list
16
+ visibility.
17
+
8
18
  ## Flags
9
19
 
10
20
  | Flag | Type | Required | Description |
@@ -0,0 +1,45 @@
1
+ # engage-task task submit-approval
2
+
3
+ Submit an existing draft engagement task for approval. The legacy full save-and-submit request remains supported.
4
+ This is a regular write operation.
5
+
6
+ > Capability id: `engage-task.task.submit-approval` · Domain: `engage`.
7
+
8
+ ```bash
9
+ ae-cli engage-task task submit-approval --project-id <project_id> --task-id <task_id>
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Flag | Required | Notes |
15
+ |---|---|---|
16
+ | `--project-id` / `-p` | yes | Numeric project ID. |
17
+ | `--task-id` | conditional | Existing draft task ID. Recommended after `task save`. |
18
+ | `--request` | conditional | Legacy `ApprovalSaveAndSubmitDTO` / `OperationTaskOpDTO` JSON (camelCase or snake_case). |
19
+
20
+ Provide exactly one of `--task-id` or `--request`.
21
+
22
+ ## Output
23
+
24
+ - `data.task_id`
25
+
26
+ ## Request notes
27
+
28
+ - Prefer `task save` followed by `submit-approval --task-id`. The server loads the persisted draft, validates its
29
+ trigger rule, and reuses the existing save-and-submit approval workflow.
30
+ - Do not reconstruct or pass `trigger_rule`. It is an internal persisted field.
31
+ - The legacy `--request` mode remains available for existing callers.
32
+ - Required body fields (server validates): `task_name`, `channel_type`, `channel_id`, `group_content_list`, `target_cluster_type`, `trigger_type`, `completion_indicator_def`, `frequency_limits`, `enable_channel_touch_limits`, `group_id`, `trigger_time_strategy`.
33
+ - Missing `expConfig` is auto-filled as `{"enableExp":false}` (same as activity task create/update).
34
+ - TEXT channel params missing `config` are auto-filled with Slate.js JSON from `value`.
35
+ - For schedule-single (`triggerType=0`), include a future `triggerTime` (and `tzOffset` / `triggerTimeStrategy` as needed).
36
+ - Prefer save → submit by task ID; do not invent `taskId` / `channelId`.
37
+
38
+ ## Common Errors
39
+
40
+ | code | when |
41
+ |---|---|
42
+ | `APPROVAL_INPUT_INVALID` | neither or both of `task_id` and `request` supplied |
43
+ | `REQUEST_REQUIRED` | `--request` missing or not an object |
44
+ | `REQUEST_FIELDS_REQUIRED` | required body fields absent/blank |
45
+ | `CAPABILITY_EXECUTION_FAILED` | unmapped domain failure; check `invocation_id` / Hermes logs |
@@ -30,7 +30,7 @@ Use `--operation-mode save_flow` for the current exposed MCP protocol. Use `save
30
30
  Important current rules:
31
31
 
32
32
  - `event_trigger` / `event_judge` A segment: use `periodStart`, `periodEnd`, `periodTimeSymbol`; do not use branch-style `delayTime`.
33
- - `event_split_flow` branch segment: use `delayTime`, `delayTimeSymbol`, `targetClusterType`; omit `triggerRule` on default branches.
33
+ - `event_split_flow` branch segment: use `delayTime`, `delayTimeSymbol`, `targetClusterType`; omit `triggerDefinition` on default branches.
34
34
  - `event_trigger targetUserType=2` is invalid.
35
35
  - Push `OBJ_ARRAY.value` must be a JSON array, not a stringified array.
36
36
  - Push `contentList[].content` should be a JSON array, but a JSON-stringified array is accepted for compatibility.
@@ -22,8 +22,17 @@ Naming and response boundary:
22
22
  - CLI command segments and flags use kebab-case.
23
23
  - Outer Capability input and all response keys use snake_case.
24
24
  - Nested business DTOs passed through `--req` keep their native camelCase fields.
25
+ - Audience QP is semantic at the CLI boundary: write `targeting.definitionRequest`; read
26
+ `targeting.definition_request`. Never generate or submit `targetConfig`.
27
+ - Metric QP is semantic at the CLI boundary: write `metricDefinition`; read
28
+ `metric_definition`. Never generate or submit `metricConfig`, `calcType`, or `Axxx` codes.
29
+ - For metric aggregations `sum` / `avg` / `max` / `distinct_count`, `metricDefinition.property`
30
+ is **required** and must be a concrete available event property from Analysis metadata.
31
+ Never create property aggregations without `property` (for example `metric_avg_no_property_*`).
32
+ - Event-count aggregations `total_count` / `user_count` / `active_days` omit `property`.
33
+ - Resolve event and property names with Analysis metadata before saving semantic definitions.
25
34
  - Lists return `data.items` and `data.total`; detail commands return `data.item`.
26
- - Readiness returns `data.readiness`; reports return `data.report`; writes return `data.result`.
35
+ - Readiness returns `data.readiness`; reports return `data.report`; save guides return `data.guide`; save dry-run validation returns `data.validation`; writes return `data.result`.
27
36
  - Query cancellation returns `data.success`.
28
37
 
29
38
  ## Typical Workflow
@@ -34,6 +43,8 @@ Naming and response boundary:
34
43
  - `experiment feature list`
35
44
  - `experiment metric list`
36
45
  2. Create missing assets if needed:
46
+ - `experiment save build-guide --operation-mode save_metric` when save validation fails or req shape is unclear
47
+ - `experiment save validate --operation-mode save_metric --req '{...}'` before retrying a failed save
37
48
  - `experiment traffic-layer save`
38
49
  - `experiment feature save`
39
50
  - `experiment metric save`
@@ -45,9 +56,12 @@ Naming and response boundary:
45
56
 
46
57
  ## Parameter Conventions
47
58
 
59
+ - Experiment save payloads distinguish two allocation fields: experiment-level `req.allocation` (**integer only; no decimals**) and group-level `req.groups[].allocation` (**integer only; sum must equal `100` exactly**).
60
+
48
61
  ```bash
49
62
  ae-cli experiment experiment get --project-id 1 --exp-id exp_123
50
63
  ae-cli experiment experiment save --project-id 1 --req '{"expName":"Demo"}' --dry-run
64
+ ae-cli experiment metric save --project-id 1 --req '{"metricId":"login_users","metricName":"Login users","createType":"event","goalDirection":"up","metricDesc":"Users who logged in","metricDefinition":{"type":"event","event":"login","aggregation":"user_count"}}' --dry-run
51
65
  ae-cli capability run experiment.report.metric-trend --input '{"project_id":1,"exp_id":"exp_123","metric_id":"metric_1","start_time":"2026-07-01","end_time":"2026-07-07"}'
52
66
  ```
53
67
 
@@ -57,6 +71,12 @@ Optional global parameters work as in other domains: `--host`, `--mcp-url`, `--f
57
71
 
58
72
  Open the matching file in `references/` before using a command, especially for write operations and JSON payloads.
59
73
 
74
+ ### Save Helpers
75
+
76
+ `experiment save build-guide`, `experiment save validate`
77
+
78
+ When a save command returns `next_tool: experiment.save.build-guide`, call the guide first, then `experiment save validate`, then retry the final save capability.
79
+
60
80
  ### Experiment
61
81
 
62
82
  `experiment experiment save`, `capability run experiment.experiment.save-submit`, `experiment experiment list`, `experiment experiment list-archived`, `experiment experiment get`, `experiment experiment ready-check`, `experiment experiment conflict-check`, `experiment experiment manage`, `experiment experiment update-group`, `experiment experiment batch-delete`, `experiment operation-log query`
@@ -12,4 +12,6 @@ Flags:
12
12
 
13
13
  Use this before `experiment experiment manage` moves an experiment to `pending`, `testing`, or `running`.
14
14
 
15
+ Common `groups` failure: `atlas.service.error.experiment.group.allocation.invalid`. Rule: each `groups[].allocation` must be an **integer**, and **sum = 100 exactly** (for example `34 + 33 + 33 = 100`).
16
+
15
17
  Response shape: the readiness result is in `data.readiness`, with recursively snake_case keys.
@@ -11,3 +11,9 @@ Flags:
11
11
  - `--exp-id`: Experiment ID.
12
12
 
13
13
  Response shape: the experiment is in `data.item`, with recursively snake_case keys such as `exp_id` and `feature_key_list`.
14
+
15
+ When targeting contains reversible QP, it is returned as
16
+ `targeting.definition_request` with `targeting.definition_status=AVAILABLE`.
17
+ An absent definition is `NOT_APPLICABLE`; a historical unsupported definition is
18
+ `UNAVAILABLE` with `definition_unavailable_reason`. The internal `target_config`
19
+ field is never returned.
@@ -16,3 +16,7 @@ Flags:
16
16
  - `--query-name`: Optional fuzzy match against experiment name (`exp_name LIKE`). Does not match `exp_id`.
17
17
 
18
18
  Response shape: `data.items` contains the experiments, `data.total` contains the count, and item keys are recursively snake_case.
19
+
20
+ Targeting follows the same semantic projection as detail:
21
+ `targeting.definition_request` plus `targeting.definition_status`; internal
22
+ `target_config` is not returned.
@@ -13,3 +13,6 @@ Flags:
13
13
  - `--project-id`, `-p`: Project ID.
14
14
 
15
15
  Response shape: `data.items` contains the archived experiments, `data.total` contains the count, and item keys are recursively snake_case.
16
+
17
+ Targeting is returned through `targeting.definition_request` and
18
+ `targeting.definition_status`; internal `target_config` is not returned.
@@ -11,3 +11,8 @@ Flags:
11
11
  - `--metric-id`: Metric ID.
12
12
 
13
13
  Response shape: the metric is in `data.item`, with recursively snake_case keys.
14
+
15
+ Reversible QP is returned as `metric_definition` with
16
+ `metric_definition_status=AVAILABLE`. Missing QP is `NOT_APPLICABLE`; unsupported
17
+ historical QP is `UNAVAILABLE` with `metric_definition_unavailable_reason`.
18
+ Internal `metric_config` and `calc_type` are never returned.
@@ -10,3 +10,6 @@ Flags:
10
10
  - `--project-id`, `-p`: Project ID.
11
11
 
12
12
  Response shape: `data.items` contains metrics, `data.total` contains the count, and item keys are recursively snake_case.
13
+
14
+ Each item uses `metric_definition` and `metric_definition_status`. Internal
15
+ `metric_config` and `calc_type` are never returned.
@@ -26,10 +26,14 @@ Nested payload fields must match the server DTO types, not just the visible CLI
26
26
  | Field | Correct shape | Incorrect shape |
27
27
  | --- | --- | --- |
28
28
  | `featureKeyList` | `["payment_color"]` | `[{"featureKey":"payment_color"}]` |
29
+ | `allocation` | integer (e.g. `20`) | `20.5`, `33.33` |
30
+ | `groups[].allocation` | integer; all groups sum to `100` (e.g. `34+33+33`) | `33.33`, or sum `99`/`101` |
29
31
  | `groups[].expGroupValue` | `"[\"green\"]"` | `["green"]` |
30
32
  | `metrics` | `[{"metricId":"payment","metricRole":"primary"}]` | `["payment"]` |
31
33
 
32
34
  - `featureKeyList` is an array of Feature key strings, not Feature objects. For feature experiments, pass one Feature key string.
35
+ - `allocation` (experiment-level) and `groups[].allocation` are validated at the CLI interface: **integers only, decimals rejected** (for example `33.33` fails before save).
36
+ - `groups[].allocation` rule: each value must be an **integer**, and the **sum of all group allocations must equal `100` exactly** (for example `34 + 33 + 33 = 100`, not `33 + 33 + 33 = 99` and not decimal thirds).
33
37
  - `groups[].expGroupValue` is a JSON-encoded string of a string array. Pass a string whose content is a JSON array, not a native JSON array.
34
38
  - `metrics` is an array of metric binding objects. Each object contains `metricId` and `metricRole`.
35
39
 
@@ -88,12 +92,44 @@ ae-cli experiment experiment save --project-id 1 --req '{"expId":"exp_123","allo
88
92
 
89
93
  - `isExpSharing=1` uses a shared traffic layer from `experiment traffic-layer list`; pick a `trafficLayerId` whose available idle traffic can cover `allocation`.
90
94
  - `isExpSharing=0` uses exclusive traffic with `bucketId`; select the bucket with `experiment bucket list`.
91
- - `allocation` is optional during draft construction, but before readiness it must be greater than `0` and no more than `100`.
95
+ - `allocation` (experiment-level) is the experiment's share of the traffic layer. It is optional during draft construction, but before readiness it must be greater than `0` and no more than `100`. **Integer only** (for example `20`); decimals such as `20.5` are rejected at the CLI interface.
96
+ - `groups[].allocation` (group-level): **integer only; sum must equal `100` exactly**. Example for 3 groups: `34 + 33 + 33 = 100`. Decimals such as `33.33` are rejected at the CLI interface before save.
92
97
  - `expCycle.cycleType` can be `day` or `sample`; when `cycleType=day`, `dayNum` is `1..90`. Blank cycle defaults to day + 30.
93
- - Before readiness, `groups` must be non-empty, contain exactly one control group, total allocation must equal `100`, and each `expGroupValue` must be a non-empty JSON string array.
98
+ - Before readiness, `groups` must be non-empty, contain exactly one control group (`isControl=1`), group allocations must sum to exactly `100`, and each `expGroupValue` must be a non-empty JSON string array.
94
99
  - Feature experiments must bind `featureKeyList` before readiness. `featureKeyList` contains Feature key strings, not Feature objects. The MCP currently supports one `featureKey` for feature experiments.
95
100
  - Metrics use `metricRole=primary|secondary|guardrail|observation`; before readiness at least one primary metric is required.
96
101
  - `targeting` replaces the saved targeting object when provided.
102
+ - Custom audience QP must be supplied as the semantic object
103
+ `targeting.definitionRequest`. Do not submit the internal `targeting.targetConfig`
104
+ JSON or any `Cxx`/`Axxx` code. Resolve event and property names with Analysis
105
+ metadata first.
106
+
107
+ Semantic audience example:
108
+
109
+ ```json
110
+ {
111
+ "targeting": {
112
+ "definitionRequest": {
113
+ "type": "condition",
114
+ "conditions": {
115
+ "relation": "and",
116
+ "items": [
117
+ {"type": "user", "field": "country", "operator": "eq", "values": ["CN"]},
118
+ {
119
+ "type": "event",
120
+ "event": "purchase",
121
+ "operator": "gte",
122
+ "value": 2,
123
+ "aggregation": "sum",
124
+ "property": "amount",
125
+ "time_range": {"mode": "recent", "unit": "day", "value": 7}
126
+ }
127
+ ]
128
+ }
129
+ }
130
+ }
131
+ }
132
+ ```
97
133
 
98
134
  ## Payload Examples
99
135
 
@@ -103,12 +139,18 @@ Patch a Feature binding. `featureKeyList` is a string array:
103
139
  ae-cli experiment experiment save --project-id 2 --req '{"expId":"e024","featureKeyList":["payment_color"]}'
104
140
  ```
105
141
 
106
- Patch groups. `expGroupValue` is a JSON-encoded string, not a native array:
142
+ Patch groups. `expGroupValue` is a JSON-encoded string, not a native array. `groups[].allocation` must be integers that sum to exactly `100`:
107
143
 
108
144
  ```bash
109
145
  ae-cli experiment experiment save --project-id 2 --req '{"expId":"e024","groups":[{"expGroupName":"control","isControl":1,"allocation":50,"expGroupValue":"[\"green\"]"},{"expGroupName":"variant","isControl":0,"allocation":50,"expGroupValue":"[\"red\"]"}]}'
110
146
  ```
111
147
 
148
+ Three-group even split example:
149
+
150
+ ```bash
151
+ ae-cli experiment experiment save --project-id 2 --req '{"expId":"e024","groups":[{"expGroupName":"control","isControl":1,"allocation":34,"expGroupValue":"[\"A\"]"},{"expGroupName":"variant_b","isControl":0,"allocation":33,"expGroupValue":"[\"B\"]"},{"expGroupName":"variant_c","isControl":0,"allocation":33,"expGroupValue":"[\"C\"]"}]}'
152
+ ```
153
+
112
154
  Patch metrics. `metrics` is an object array:
113
155
 
114
156
  ```bash
@@ -122,6 +164,7 @@ ae-cli experiment experiment save --project-id 2 --req '{"expId":"e024","metrics
122
164
  If execution reports a DTO type mismatch after a clean dry-run, inspect nested field types first:
123
165
 
124
166
  - `featureKeyList` must be a string array.
167
+ - `groups[].allocation` must be an integer, and all group allocations must sum to exactly `100`.
125
168
  - `groups[].expGroupValue` must be a JSON-encoded string.
126
169
  - `metrics` must be an object array with `metricId` and `metricRole`.
127
170
 
@@ -11,3 +11,65 @@ Flags:
11
11
  - `--req`: Metric save request JSON object.
12
12
 
13
13
  Create mode requires metric identifiers and metric configuration. Modify mode uses `update=true`.
14
+
15
+ ## Semantic Metric Contract
16
+
17
+ - Supply metric QP as `req.metricDefinition`.
18
+ - Never submit internal `metricConfig`, `calcType`, or an `Axxx` calculation code.
19
+ - Experiment metrics currently accept event definitions only.
20
+ - Supported aggregations:
21
+ - Event-count (no property): `total_count`, `user_count`, `active_days`
22
+ - Property-based (**`property` REQUIRED**): `sum`, `avg`, `max`, `distinct_count`
23
+
24
+ ### Property rule (mandatory)
25
+
26
+ When `aggregation` is `sum`, `avg`, `max`, or `distinct_count`:
27
+
28
+ 1. Resolve the event's available properties with Analysis metadata first
29
+ (`ae-cli analysis-meta property list` / `get` for that event).
30
+ 2. Pass one concrete available property name in `metricDefinition.property`.
31
+ 3. Do **not** invent placeholder metrics without a property (for example
32
+ `metric_avg_no_property_*`). Hermes rejects property aggregations with a blank
33
+ or missing `property`.
34
+
35
+ When `aggregation` is `total_count`, `user_count`, or `active_days`, omit `property`.
36
+
37
+ ### Correct example (avg with property)
38
+
39
+ ```bash
40
+ ae-cli experiment metric save --project-id 1 --req '{
41
+ "metricId":"startup_style_payment_avg_20260729",
42
+ "metricName":"Startup style payment avg",
43
+ "createType":"event",
44
+ "goalDirection":"up",
45
+ "metricDesc":"Average payment amount",
46
+ "metricDefinition":{
47
+ "type":"event",
48
+ "event":"payment",
49
+ "aggregation":"avg",
50
+ "property":"amount"
51
+ }
52
+ }'
53
+ ```
54
+
55
+ ### Wrong example (avg without property — rejected)
56
+
57
+ ```json
58
+ {
59
+ "metricId": "metric_avg_no_property_actual_20260729_144230",
60
+ "metricDefinition": {
61
+ "type": "event",
62
+ "event": "payment",
63
+ "aggregation": "avg"
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### Event-count example (no property)
69
+
70
+ ```bash
71
+ ae-cli experiment metric save --project-id 1 --req '{"metricId":"purchase_users","metricName":"Purchase users","createType":"event","goalDirection":"up","metricDesc":"Unique purchasers","metricDefinition":{"type":"event","event":"purchase","aggregation":"user_count"}}'
72
+ ```
73
+
74
+ Filters use the semantic `filters` tree with `relation=and|or` and items containing
75
+ `field`, `operator`, and `values`.
@@ -8,6 +8,9 @@ ae-cli capability run experiment.experiment.save-submit --input '{"project_id":1
8
8
 
9
9
  Input fields: `project_id` and `req`. The outer input is snake_case; fields inside `req` keep the native camelCase DTO shape.
10
10
 
11
+ Custom audiences use semantic `req.targeting.definitionRequest`. Never pass the
12
+ internal `targetConfig` field or hand-write `Cxx`/`Axxx` codes.
13
+
11
14
  Response shape: `data.result`, with object keys recursively converted to snake_case.
12
15
 
13
16
  Prefer `experiment experiment save` for progressive draft construction.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: ae-experiment-design
3
+ description: "Design AE/TE A/B experiments from a business goal through a reviewable draft. Use when the user asks to form an experiment hypothesis, assess metric readiness, choose or create metrics and Features, design groups or traffic, estimate sample size or duration, create an experiment draft, or run readiness and conflict checks. SDK guidance is a conditional branch: enter it only when the user explicitly asks about an A/B experiment SDK, client SDK integration, experiment SDK code generation, or SDK troubleshooting; do not include SDK work in an ordinary experiment-design or draft-creation request."
4
+ ---
5
+
6
+ # AE Experiment Design and Integration
7
+
8
+ Turn a business objective into an evidence-backed experiment design, an implementation contract, and, when requested and supported, an AE experiment draft.
9
+
10
+ ## Hard boundaries
11
+
12
+ - Use `ae-cli` for every AE/TE platform interaction. Do not substitute raw HTTP, browser automation, direct database queries, MCP tools, or application SDKs.
13
+ - Do not infer an SDK request from the fact that an experiment needs implementation. Load SDK references only when the user explicitly asks about an A/B experiment SDK or client SDK integration.
14
+ - Do not copy general tracking SDK documentation into this Skill. Route generic initialization, event reporting, `track`, user identity, user properties, data upload, LogBus, and REST questions to `ae-data-integration-helper` when that Skill is available.
15
+ - Use only the event-metric calculation contracts defined in
16
+ `metric-readiness.md`. Bind one confirmed primary event metric and do not add
17
+ unsupported metric roles.
18
+ - Never claim that a platform asset exists, was created, passed a check, or generated project code without a successful `ae-cli` response.
19
+ - Never invent platform IDs, schemas, SDK APIs, versions, defaults, or behavior.
20
+
21
+ ## Progressive disclosure router
22
+
23
+ Read only the references needed for the current request:
24
+
25
+ | Request | Required references |
26
+ |---|---|
27
+ | Any AE/TE platform read or write | [`references/platform-operations.md`](references/platform-operations.md) |
28
+ | Create or reuse an experiment draft | [`references/experiment-creation.md`](references/experiment-creation.md) and [`references/platform-operations.md`](references/platform-operations.md) |
29
+ | Metric selection, feasibility, or creation | [`references/metric-readiness.md`](references/metric-readiness.md) |
30
+ | Explicit A/B experiment SDK or client SDK integration request | [`references/sdk-integration.md`](references/sdk-integration.md) |
31
+ | Exact SDK version, dependency, class, or source lookup | [`references/sdk-index.md`](references/sdk-index.md) |
32
+ | Cross-platform Feature, default, fetch, cache, or assignment behavior | [`references/experiment-sdk-contract.md`](references/experiment-sdk-contract.md) |
33
+ | Android, iOS, or JavaScript experiment SDK | [`references/client-experiment-sdk.md`](references/client-experiment-sdk.md) |
34
+ | Server-side assignment or evaluation | [`references/server-experiment-sdk.md`](references/server-experiment-sdk.md) |
35
+ | Server assignment with client rendering | [`references/hybrid-experiment-sdk.md`](references/hybrid-experiment-sdk.md) |
36
+ | Exposure design, deduplication, or metric join | [`references/exposure-contract.md`](references/exposure-contract.md) |
37
+ | SDK retrieval, default, identity, exposure, or debug issue | [`references/sdk-troubleshooting.md`](references/sdk-troubleshooting.md) |
38
+
39
+ References are a curated fast path, not the whole documentation set.
40
+
41
+ ## Workflow
42
+
43
+ ### 1. Frame the decision
44
+
45
+ Extract:
46
+
47
+ - business goal and desired direction;
48
+ - experiment variable and user-visible change;
49
+ - target population and exclusions;
50
+ - decision that the result must support;
51
+ - success threshold.
52
+
53
+ Convert these into a falsifiable hypothesis. Clarify only missing facts that materially change the design. For a conversion goal, establish the population, denominator or exposure behavior, numerator behavior, attribution window, and analysis unit.
54
+
55
+ Do not silently invent a target population, conversion definition, or technical platform.
56
+
57
+ ### 2. Resolve the project and evidence
58
+
59
+ Pass the project gate in `platform-operations.md`. With `ae-cli`, establish candidate exposure and outcome events, assignment identity and join path, timestamps, exact saved-metric definitions, and—when available—baseline and eligible traffic.
60
+
61
+ If the project is unavailable, accept user-provided schemas or definitions and label all platform-dependent conclusions as unverified.
62
+
63
+ ### 3. Assess metric readiness
64
+
65
+ Apply `metric-readiness.md`. Classify candidates as `recommended`, `available`,
66
+ `blocked`, or `unverified`; recommend one primary event metric and confirm its
67
+ calculation code before planning sample size or duration.
68
+
69
+ ### 4. Design Feature, assignment, and groups
70
+
71
+ Define the Feature key, type, typed default, ownership, stable assignment unit, one control group, treatment groups, group values, traffic, allocations, layer, targeting, and exclusions.
72
+
73
+ Require allocations totaling `1.0`, experiment traffic in `(0, 1]`, type-correct values, a stable exposure-to-outcome identity join, and at least one primary metric. Resolve real Features and layers with `ae-cli` before reuse or creation.
74
+
75
+ ### 5. Calculate sample size and duration
76
+
77
+ Follow this order: confirm the primary metric and calculation code → obtain its
78
+ baseline, MDE, and any required variance → calculate the sample target with
79
+ [`scripts/calculate_experiment_plan.py`](scripts/calculate_experiment_plan.py)
80
+ → derive duration from the sample target and effective eligible daily units.
81
+ Apply the preregistered planning policy in `metric-readiness.md`. Use fixed
82
+ `alpha=0.05` and two-sided testing, policy-default `power=0.80`, and Bonferroni
83
+ planning for multiple treatments. Require the MDE type and direction; never
84
+ default MDE to 5% or assume variance for a continuous metric.
85
+
86
+ When experiment traffic is already confirmed, calculate its duration. When it
87
+ is not confirmed, obtain verified layer capacity and let the script recommend
88
+ the smallest absolute traffic candidate that reaches the target within the
89
+ maximum runtime. Default to at least seven days and full-week alignment. Return
90
+ the actual infeasible duration instead of truncating it. Explain the baseline,
91
+ MDE, power source, allocations, multiplicity rule, traffic evidence, sample
92
+ targets, duration adjustment, and any native-report mismatch. Do not return a
93
+ definitive plan when required evidence is unavailable.
94
+
95
+ ### 6. Materialize the design
96
+
97
+ For an explicit draft-creation request, follow `experiment-creation.md` and `platform-operations.md`. Create only authorized draft assets, verify the saved result by reading it back, run supported readiness and conflict checks, and return the compact receipt and experiment link defined there.
98
+
99
+ Submitting, starting, changing live traffic, pausing, ending, or deleting requires separate explicit confirmation. Never turn draft creation into launch.
100
+
101
+ ## Output requirements
102
+
103
+ - Use the language explicitly requested by the user. Otherwise, use the language of the user's latest substantive message.
104
+ - Localize all user-visible prose, including headings, table headers, field labels, status names, recommendations, warnings, assumptions, and next actions.
105
+ - Keep code, commands, raw IDs, event/property/metric names, Feature keys, SDK/API names, and official enum values unchanged when translation would alter their technical meaning.
106
+ - Treat section names in this Skill as semantic guidance, not literal output text. Do not copy an English heading into a non-English response.
107
+ - For a design request, lead with the experiment recommendation. For a creation, validation, or conflict-check request, lead with the operation outcome.
108
+ - Include only the smallest set of relevant sections; do not reproduce every workflow stage.
109
+ - Separate observed platform evidence, verified documentation, deterministic calculations, design judgments, and unresolved assumptions.
110
+ - Before responding, check every heading, table header, label, and status for unintended mixed-language output.
111
+
112
+ Treat project resolution, metadata discovery, candidate-event searches, metric comparison, Feature and layer inventory, capability discovery, schema inspection, and command execution as internal working context.
113
+
114
+ - Do not narrate the execution sequence in the final answer. Omit phrases such as "first load the reference", "now query in parallel", "verified with ae-cli", or "the evidence collection is complete".
115
+ - Do not expose raw commands, capability IDs, request schemas, full candidate lists, or a platform-evidence dump unless the user explicitly asks for the evidence, audit trail, or debugging details.
116
+ - Surface platform evidence only when it changes the design, blocks the operation, reveals a material semantic mismatch, or requires user confirmation. Summarize it in at most three concise bullets by default.
117
+ - Do not repeat the full experiment design after a creation request unless the user explicitly asks for the complete design.
118
+ - Do not expose hidden reasoning. Give the conclusion, the user-relevant basis, and the action result.
119
+
120
+ ## Failure behavior
121
+
122
+ - Missing project or ambiguous host: show candidates and ask; do not guess.
123
+ - Missing metadata: return the required event, property, identity, and timestamp checklist.
124
+ - Experiment product unavailable:
125
+ - State that the project has not enabled the experiment product only when an
126
+ explicit platform entitlement result establishes that fact. A missing
127
+ capability alone means the experiment capability is unavailable, not that
128
+ the product was not purchased.
129
+ - For a design request, tell the user that experiment design can continue,
130
+ but Feature, layer, metric, and traffic details cannot be verified on the
131
+ platform. Continue with an offline design and request the baseline, MDE,
132
+ and eligible daily units when sample-size or duration planning needs them.
133
+ - For a draft-creation request, lead with the outcome that the experiment
134
+ draft was not created. Explain that Feature, layer, and draft creation are
135
+ blocked, preserve the proposed design, and say that platform creation and
136
+ readiness checks can continue after the product is enabled or the required
137
+ access is granted.
138
+ - HTTP 403 or equivalent permission denial: state that the current account
139
+ lacks the required experiment permission, stop dependent writes, and explain
140
+ that this result does not establish whether the project purchased the
141
+ experiment product. Ask the project administrator to check both product
142
+ availability and the user's project permissions.
143
+ - Capability gap without an explicit entitlement or permission result: report
144
+ that the current environment does not expose the required experiment
145
+ capability, continue with an offline design when useful, and do not bypass
146
+ `ae-cli`.
147
+ - For SDK gaps or conflicts, follow `sdk-integration.md`; do not invent exact code.
148
+ - Validation failure: correct documented input or ask for the missing value; do not retry unchanged input.
149
+ - Partial success: report created and failed assets separately and never imply atomic success.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Experiment Design & Integration"
3
+ short_description: "Design AE experiments with optional SDK guidance"
4
+ default_prompt: "Use $ae-experiment-design to design an A/B experiment and prepare an AE draft; include SDK guidance only when I explicitly request it."