canonical_id: "ai_transform_compile" display_name: "AI 轉換編譯" category: "logic" version: "v1" wasi_target: "preview1" stability: "floating" runtime_compat: - "cf-workers" - "workerd" - "wazero" constraints: max_size_kb: 2048 max_cold_start_ms: 50 no_network_syscall: true no_filesystem_syscall: true io_model: "stdin_stdout_json" input_schema: type: object required: [description] properties: description: type: string description: 自然語言描述,如「把日期改成台灣格式」 example_input: {} output_schema: type: object properties: success: type: boolean data: type: object properties: transform_id: type: string fn_preview: type: string description: type: string gherkin_tests: - scenario: "正常編譯" given: '{"description":"把日期改成台灣格式","example_input":{}}' then_contains: '"transform_id"' - scenario: "缺少 description" given: '{}' then_contains: '{"success":false' tags: [ai, transform, compile, nlp, codegen] description: "Phase 0 stub:接收自然語言描述,回傳 transform_id 和 fn_preview placeholder。Phase 2 接 AI host function。" config_example: | my_ai_compile: # 節點名稱(可自訂) description: "把日期改成台灣格式" # 自然語言轉換描述(必填) example_input: {"date": "2024-01-15"} # 範例輸入,用於輔助 AI 生成(選填)