搭配自動推理政策使用 Kiro CLI - Amazon Bedrock

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

搭配自動推理政策使用 Kiro CLI

您可以使用 Kiro CLI 來詢問有關自動化推理政策的問題、了解各種規則的行為,以及請求變更以解決政策本身中失敗的測試或模棱兩可的問題。

先決條件

若要將 Kiro CLI 與自動化理由政策搭配使用,您必須先完成下列步驟:

  • 安裝最新版本的 Kiro CLI

  • 安裝最新版本的 AWS CLI。

  • 透過主控台或 APIs 使用文件建立自動化理由政策。若要快速開始使用,請從 主控台使用內建範例 Homework 政策。如需詳細資訊,請參閱建立自動推理政策

  • 複製 中提供的內容提示內容,自動化理由政策 API 內容提示並將其儲存在專案資料夾中的 Markdown 檔案中。此提示可協助 Kiro CLI 正確使用自動推理政策控制平面和測試 API。

注意

針對以下提示範例,我們使用範例 Homework 政策。提示應該與其他政策一樣運作,只要變更反白的主題即可。

注意

自動化推理政策可能很複雜,需要 Kiro CLI 透過複雜的邏輯建構推理。為了獲得最佳效能,建議使用較大的 LLMs,例如 Anthropic Sonnet 4.5。若要在 Kiro CLI 中變更模型,請使用 /model命令。

開始使用

您需要所建立的自動化理由政策 ARN,才能使用 Kiro CLI 啟動工作流程。

  1. 使用 主控台,開啟您的自動推理政策,並從政策概觀頁面開啟政策詳細資訊索引標籤。

  2. 政策詳細資訊索引標籤中,尋找政策 ARN,並將其複製到剪貼簿。

  3. 使用終端機,使用以下命令啟動 Kiro CLI 工作階段:

    kiro-cli
  4. 使用第一個提示,請 Kiro 尋找您從此頁面複製的指示 Markdown 檔案,做為先決條件的一部分。例如:

    We will be using Automated Reasoning checks control plane APIs. I have saved an instructions file called your_file_name.md in this folder. Read this file as it will give you the context you need to work with the APIs.
  5. 在 Kiro CLI 載入並了解自動化原因檢查的 APIs之後,請它載入政策的最新建置並開始探索它。將下列提示的變化與您複製的 ARN 搭配使用:

    Load the policy assets for the latest build of the policy with ARN YOUR_POLICY_ARN. Make sure you understand the policy with all its rules and variables. Give a high-level description of the policy and the type of content it is capable of validating.

此時,Kiro CLI 應為您提供政策規則和變數的簡短描述。Kiro CLI 也應載入政策品質報告,並摘要未使用的類型和變數等問題。

解決政策問題

您可以使用 Kiro CLI 來解決政策報告中報告的政策問題。首先,請 Kiro 提供您品質報告的摘要:

Can you give me a summary of the quality report for this policy?

品質報告包含未使用的變數清單、衝突的規則、取消加入的規則,以及政策的其他潛在問題。

衝突規則會導致您的政策IMPOSSIBLE回應所有驗證請求。您可以要求 Kiro CLI 解釋衝突並提議解決方案:

Can you look at the conflicting rules, explain how they are used in the policy, why they conflict, and suggest a change such as deleting one of the rules or merging the logic from the two into a single rule?

未使用的變數可能會導致驗證結果傳回TRANSLATION_AMBIGUOUS結果。您可以要求 Kiro CLI 協助處理此問題:

I see the quality report lists some unused variables, can you get rid of them?

同樣地,語義相似的模棱兩可變數可能會導致驗證結果傳回TRANSLATION_AMBIGUOUS結果。您可以要求 Kiro CLI 協助處理此問題:

Automated Reasoning checks translate input natural language into logical statements that use the schema of variables from the policy. Variables that are semantically similar - ambiguous - can cause issues with inconsistent translations. Can you take a look at the schema of variables and help me identify variables that have potentially overlapping meanings? If you find any, suggest changes like removing one of them or merging them. Variable changes are also likely to require corresponding rule changes.
注意

處理一些變更之後,Kiro CLI 會請求確認以套用變更。此時,您可以使用 Bedrock 主控台使用者介面來檢閱 diff 畫面中提議的變更。如果您使用主控台來檢閱和核准變更,請不要忘記告知 Kiro CLI 重新載入政策定義的最新建置。

與政策互動

您可以使用 Kiro CLI 來探索您的政策。例如,您可以要求 Kiro CLI 摘要與特定區域相關的政策規則。使用範例家庭作業政策做為範例,您可以要求 Kiro CLI 特別告訴您限制數學家庭作業的規則:

Can you tell me about the rules that constrain math homework? Explain the rules themselves and how they fit in the broader policy.

您也可以使用 Kiro CLI 將功能新增至政策。自動化推理政策通常圍繞一些擷取使用者意圖的關鍵輸出變數。例如,範例家庭作業提交政策會使用 isSubmissionAcceptable變數做為其規則的輸出。您可以使用 Kiro CLI 來修改政策,以擷取其他可能的使用者問題。

編輯或修改您的政策

您可以詢問 Kiro CLI 政策是否能夠驗證使用者的特定問題。例如,家庭作業政策著重於判斷提交的家庭作業是否可接受。您可以使用以下問題預期 Kiro CLI 的正面答案:

Can this policy validate answers about whether homework submissions are acceptable?

如果您詢問在範例家庭作業政策中延遲提交家庭作業,Kiro CLI 會解釋該政策無法回答這些問題:

Can this policy validate answers about permissible delays in homework submissions?

Kiro CLI 將說明政策可以和不可以執行的動作:

> Yes, but with limitations. The policy can validate whether a late submission is acceptable, but it cannot answer general questions about permissible delays.

What it CAN validate:
- Whether a specific late submission is acceptable given the circumstances
- Example: "Student submitted 2 days late with a doctor's note because they were sick before the deadline" → The policy will determine if this is acceptable (it would be)

What it CANNOT validate:
- General questions like "How many days late can a student submit homework?"
- Questions about delay policies without specific submission details
- Hypothetical scenarios without concrete variable values

The late submission logic:
The policy allows late submissions (submissionDate > 0) ONLY if:
1. The student has a valid doctor's note (hasDoctorNote = true), AND
2. The student was sick before the original deadline (wasSickPriorToDeadline = true)

Without both conditions met, any submission after the due date (submissionDate > 0) is automatically rejected.

So it's designed to validate specific submission instances against the rules, not to answer policy interpretation questions.
    

當您發現政策無法執行的動作時,您可以使用下列提示要求 Kiro CLI 更新政策以擷取此資訊:

I would like the policy to also validate answers about by how many days homework submissions can be delayed. Homework submissions accompanied by a doctor note can be up to 7 days late. Suggest the necessary variables and rules to capture these new questions.

為了回應此提示,Kiro CLI 會建議一組變數和規則,這些變數和規則可以新增至政策,以驗證新類型的問題。檢閱建議,如果它們與您的意圖一致,您可以指示 Kiro CLI 使用自動原因檢查的註釋 APIs 對政策進行這些變更:

Looks good. Can you use the annotation APIs to submit these changes to the policy.

一旦 Kiro CLI 確認註釋準備就緒,您可以在主控台中開啟政策以檢閱註釋。如果註釋正確,請選擇套用註釋

注意

教學影片:如需檢閱和套用註釋的step-by-step演練,請觀看下列教學課程:

教學課程示範 3 - 精簡自動推理政策

套用註釋後,請 Kiro CLI 重新載入政策的最新建置,以確保 Kiro CLI 使用目前的複本:

I applied the annotations. Reload the latest build of the policy.

地址失敗測試

測試自動化推理政策是否可以驗證應用程式所產生的自然語言的好方法,就是使用 測試。使用預期結果建立測試 Q&A 之後,您可以使用 Kiro CLI 來了解為什麼測試未傳回預期結果並調整政策。如需建立和執行測試的詳細資訊,請參閱 測試自動推理政策

  1. 首先,請 Kiro CLI 載入失敗的測試,並解釋為什麼它未根據政策定義傳回預期的結果。使用 主控台或 APIs來複製失敗測試的測試 ID。在 主控台中,測試 ID 可在列出測試的表格中使用,以及每個測試的詳細資訊頁面。

    The test with ID YOUR_TEST_ID is not returning the expected result. Can you load the test definition and findings, look at the policy definition, and explain why this test is failing.
  2. Kiro CLI 的說明將引導您了解政策是否做正確的事 (而且您應該變更測試的預期結果) 或政策錯誤。您可以要求 Kiro CLI 建議對政策進行變更,以確保測試傳回預期的結果:

    Can you suggest changes to the policy to ensure this test returns the expected result? Explain why you are suggesting these changes. Only create rules in if/then format.
    注意

    建議規則變更時,Kiro CLI 可能會嘗試過度適應特定範例,並建立在其他使用案例中無效的規則。檢查測試輸出,並提供 Kiro CLI 指引,以專注於正確的問題。

    例如,要求 Kiro 變更範例 Homework 政策,以便SATISFIABLE測試傳回 VALID,可能會導致 Kiro 建議將軸線新增至讓測試一律通過的政策,例如建立顯示 的規則(false isHomeworkSubmissionAcceptable)。這可確保值一律為 false。雖然此技術上修正了有問題的測試,但對整體政策功能不利。分析SATISFIABLE測試結果傳回的案例,您可以看到為 Kiro CLI 提供更好的指導,以建立新的規則,只涵蓋測試中指定的限制條件,或更新現有的規則,只檢查測試限制條件:

  3. 一旦您對建議的變更感到滿意,請要求 Kiro CLI 提交註釋,並使用主控台使用者介面對其進行檢閱:

    Looks good. Can you start a build workflow to apply these changes to the policy.
  4. 套用變更並繼續進行下一個失敗測試之後,請 Kiro CLI 重新載入政策的最新建置:

    I applied the changes. Reload the latest build of the policy.

後續步驟

您對自動推理政策感到滿意後,即可將其部署以用於 Amazon Bedrock Guardrails。如需詳細資訊,請參閱在應用程式中部署自動推理政策

自動化理由政策 API 內容提示

複製下列內容,並將其儲存在 Kiro CLI 專案資料夾中的 Markdown 檔案中。此提示提供 Kiro CLI 正確使用自動化理由政策 APIs 所需的內容。

# Automated Reasoning Policy APIs and Workflows ## Table of Contents ### Core APIs - Policy Management - Policy Versions - Build Workflows - Test Management - Annotations & Scenarios ### Build Workflow Types - INGEST_CONTENT Workflow - REFINE_POLICY Workflow - IMPORT_POLICY Workflow ### Annotation Type Reference - Type Management Annotations - Variable Management Annotations - Rule Management Annotations - Natural Language Rule Creation - Feedback-Based Updates ### Common Workflows 1. Getting Started (New Policy) 2. Building Policy from Document 3. Policy Development Cycle 4. REFINE_POLICY Workflow (Annotation-Based) ### Testing Workflow 1. Primary Approach: Scenarios API (Recommended) 2. Secondary Approach: Test Cases (User Experience) 3. Test Result Analysis and Troubleshooting ### Build Workflow Monitoring - Check Build Status - List Build History - Best Practice: Clean Build Management - Troubleshooting Build Failures ### Build Workflow Assets - Asset Types - Understanding Conflicting Rules - Understanding Disjoint Rule Sets - Advanced Quality Report Analysis ### Additional Topics - Policy Version Export - Key Concepts - Important Format Requirements - Policy Modeling Best Practices - ARN Formats ## Core APIs ### Policy Management - `create-automated-reasoning-policy` - Create initial policy (returns policy ARN) - `get-automated-reasoning-policy` - Retrieve policy (DRAFT version by default with unversioned ARN) - `update-automated-reasoning-policy` - Update DRAFT policy with new definition - `delete-automated-reasoning-policy` - Delete policy - `list-automated-reasoning-policies` - List all policies ### Policy Versions - `create-automated-reasoning-policy-version` - Snapshot DRAFT into numbered version - `export-automated-reasoning-policy-version` - Export specific policy version ### Build Workflows - `start-automated-reasoning-policy-build-workflow` - Start build process - `get-automated-reasoning-policy-build-workflow` - Get build workflow status - `cancel-automated-reasoning-policy-build-workflow` - Cancel running build - `delete-automated-reasoning-policy-build-workflow` - Delete build workflow - `list-automated-reasoning-policy-build-workflows` - List build workflows - `get-automated-reasoning-policy-build-workflow-result-assets` - Get compiled policy assets ### Test Management - `create-automated-reasoning-policy-test-case` - Create test case - `get-automated-reasoning-policy-test-case` - Get test case details - `update-automated-reasoning-policy-test-case` - Update test case - `delete-automated-reasoning-policy-test-case` - Delete test case - `list-automated-reasoning-policy-test-cases` - List test cases - `start-automated-reasoning-policy-test-workflow` - Run tests - `get-automated-reasoning-policy-test-result` - Get test results - `list-automated-reasoning-policy-test-results` - List test results ### Annotations & Scenarios - `get-automated-reasoning-policy-annotations` - Get policy annotations - `get-automated-reasoning-policy-next-scenario` - Get next test scenario **Important**: Do NOT use `get-automated-reasoning-policy-annotations` or `update-automated-reasoning-policy-annotations` for the `REFINE_POLICY` workflow. Annotations are passed directly in the `start-automated-reasoning-policy-build-workflow` call. ## Build Workflow Types 1. **INGEST_CONTENT** - Process documents to create/extract policy rules 2. **REFINE_POLICY** - Refine and improve existing policies using annotations 3. **IMPORT_POLICY** - Import policies from external sources ### INGEST_CONTENT Workflow - **Purpose**: Extract policy rules from documents (PDF/TXT) - **Input**: Documents + optional existing policy definition - **Use Cases**: Document-to-policy conversion, incremental policy building - **Content Structure**: `workflowContent.documents[]` **CRITICAL: Complete Policy Definition for Incremental Building** When adding documents to an existing policy, you must include the complete current policy definition: ```json // CORRECT - Incremental policy building { "policyDefinition": { "version": "1.0", "types": [/* ALL existing types */], "rules": [/* ALL existing rules */], "variables": [/* ALL existing variables */] }, "workflowContent": { "documents": [/* New documents to process */] } } ``` ### REFINE_POLICY Workflow - **Purpose**: Iteratively improve policies with targeted modifications - **Input**: Policy definition + annotations for specific changes - **Use Cases**: Kiro CLI suggestions, test-driven improvements, feedback-based refinement - **Content Structure**: `workflowContent.policyRepairAssets.annotations[]` **CRITICAL: Complete Policy Definition Required** ALL build workflows require the COMPLETE existing policy definition in the `policyDefinition` section, not just the changes you want to make. **REFINE_POLICY Annotation Types:** **Top-Level Annotations:** - **Type Management**: `addType`, `updateType`, `deleteType` - **Variable Management**: `addVariable`, `updateVariable`, `deleteVariable` - **Rule Management**: `addRule`, `updateRule`, `deleteRule` - **Natural Language Rules**: `addRuleFromNaturalLanguage` - **Feedback-Based Updates**: `updateFromRulesFeedback`, `updateFromScenarioFeedback` **Sub-Operations (only within `updateType`):** - `addTypeValue`, `updateTypeValue`, `deleteTypeValue` - Used to modify values within an existing custom type **important**: Only create rules in if/then format. ## Annotation Type Reference ### Type Management Annotations #### `addType` - Create New Custom Type ```json { "addType": { "name": "ApprovalStatus", "description": "Status values for approval requests", "values": [ { "value": "PENDING", "description": "Request is awaiting approval" }, { "value": "APPROVED", "description": "Request has been approved" }, { "value": "REJECTED", "description": "Request has been rejected" } ] } } ``` #### `updateType` - Modify Existing Custom Type ```json { "updateType": { "name": "ApprovalStatus", "newName": "RequestStatus", "description": "Updated status values for all request types", "values": [ { "addTypeValue": { "value": "ESCALATED", "description": "Request escalated to higher authority" } }, { "updateTypeValue": { "value": "PENDING", "newValue": "WAITING", "description": "Request is waiting for review" } }, { "deleteTypeValue": { "value": "REJECTED" } } ] } } ``` #### `deleteType` - Remove Custom Type ```json { "deleteType": { "name": "ObsoleteType" } } ``` ### Variable Management Annotations #### `addVariable` - Create New Variable ```json { "addVariable": { "name": "requestAmount", "type": "real", "description": "The monetary amount of the approval request in USD" } } ``` #### `updateVariable` - Modify Existing Variable ```json { "updateVariable": { "name": "requestAmount", "newName": "approvalAmount", "description": "The monetary amount requiring approval in USD (updated description)" } } ``` #### `deleteVariable` - Remove Variable ```json { "deleteVariable": { "name": "obsoleteVariable" } } ``` ### Rule Management Annotations #### `addRule` - Create New Rule (SMT-LIB) ```json { "addRule": { "expression": "(=> (and (= userRole MANAGER) (< requestAmount 10000)) (not approvalRequired))" } } ``` #### `updateRule` - Modify Existing Rule ```json { "updateRule": { "ruleId": "A1B2C3D4E5F6", "expression": "(=> (and (= userRole MANAGER) (< requestAmount 5000)) (not approvalRequired))" } } ``` #### `deleteRule` - Remove Rule ```json { "deleteRule": { "ruleId": "G7H8I9J0K1L2" } } ``` ### Natural Language Rule Creation #### `addRuleFromNaturalLanguage` - Convert Natural Language to Rule ```json { "addRuleFromNaturalLanguage": { "naturalLanguage": "Managers can approve expense requests up to $5,000 without additional authorization. Senior managers can approve up to $25,000." } } ``` ### Feedback-Based Updates #### `updateFromRulesFeedback` - Improve Rules Based on Performance ```json { "updateFromRulesFeedback": { "ruleIds": ["A1B2C3D4E5F6", "G7H8I9J0K1L2"], "feedback": "These rules are too restrictive for emergency scenarios. Add exception handling for urgent requests with proper escalation paths." } } ``` #### `updateFromScenarioFeedback` - Improve Based on Test Scenarios ```json { "updateFromScenarioFeedback": { "ruleIds": ["A1B2C3D4E5F6"], "scenarioExpression": "(and (= requestType EMERGENCY) (= userRole MANAGER) (> requestAmount 10000))", "feedback": "Emergency requests should have different approval thresholds. Current rule blocks legitimate emergency expenses." } } ``` **Important**: Do NOT use `get-automated-reasoning-policy-annotations` or `update-automated-reasoning-policy-annotations` for the `REFINE_POLICY` workflow. Annotations are passed directly in the `start-automated-reasoning-policy-build-workflow` call. ## Common Workflows ### 1. Getting Started (New Policy) **CRITICAL: Always Create Policy First** You must create a policy before starting any build workflows. ```bash # Step 1: Create initial policy (REQUIRED FIRST STEP) aws bedrock create-automated-reasoning-policy \ --region us-west-2 \ --name "YourPolicyName" # Step 2: Extract the policyArn from the response above, then start build workflow aws bedrock start-automated-reasoning-policy-build-workflow \ --region us-west-2 \ --policy-arn "arn:aws:bedrock:us-west-2:123456789012:automated-reasoning-policy/abcd1234efgh" \ --build-workflow-type INGEST_CONTENT \ --source-content <policy-definition> # Step 3: Get build results aws bedrock get-automated-reasoning-policy-build-workflow-result-assets \ --region us-west-2 \ --policy-arn "arn:aws:bedrock:us-west-2:123456789012:automated-reasoning-policy/abcd1234efgh" \ --build-workflow-id <workflow-id> ``` ### 2. Building Policy from Document **RECOMMENDED: Using CLI Input JSON File** ```bash # Step 1: Encode PDF to base64 and create JSON file with base64 content PDF_BASE64=$(base64 -i your-policy.pdf | tr -d '\n') cat > ingest-policy.json << EOF { "policyArn": "arn:aws:bedrock:us-west-2:123456789012:automated-reasoning-policy/your-actual-policy-id", "buildWorkflowType": "INGEST_CONTENT", "sourceContent": { "policyDefinition": { "version": "1.0", "types": [], "rules": [], "variables": [] }, "workflowContent": { "documents": [ { "document": "$PDF_BASE64", "documentContentType": "pdf", "documentName": "Company Policy Document", "documentDescription": "Main policy document containing business rules and organizational guidelines." } ] } } } EOF # Step 2: Use the JSON file aws bedrock start-automated-reasoning-policy-build-workflow \ --region us-west-2 \ --cli-input-json file://ingest-policy.json ``` ### 3. Policy Development Cycle ```bash # 1. Import/process policy definition aws bedrock start-automated-reasoning-policy-build-workflow \ --build-workflow-type IMPORT_POLICY # 2. Update DRAFT with processed definition aws bedrock update-automated-reasoning-policy \ --policy-arn <unversioned-arn> \ --policy-definition <build-output> # 3. Create versioned snapshot of DRAFT aws bedrock create-automated-reasoning-policy-version \ --policy-arn <unversioned-arn> ``` ## Testing Workflow ### Primary Approach: Scenarios API (Recommended) Use `get-automated-reasoning-policy-next-scenario` for comprehensive policy validation. The Scenarios API is superior for testing because it: - Tests formal logic directly - Validates policy rules work correctly - AI-generated scenarios - Comprehensive coverage of edge cases and rule interactions - Targets specific rules - Tests individual rules and combinations - Always works - No natural language translation issues - Intelligent test generation - AI understands policy logic deeply ```bash # Generate intelligent test scenarios automatically aws bedrock get-automated-reasoning-policy-next-scenario \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --build-workflow-id "workflow-123" ``` ### Secondary Approach: Test Cases (User Experience) Use manual test cases to validate natural language translation. ```bash # Create test cases for natural language validation aws bedrock create-automated-reasoning-policy-test-case \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --guard-content "It is 2:30 PM on a clear day" \ --query-content "What color should the sky be?" \ --expected-aggregated-findings-result "VALID" ``` ### Test Result Analysis and Troubleshooting **Understanding Test Results:** **Scenarios API Results:** - `expectedResult: SATISFIABLE` - Policy logic works correctly - API errors or logic conflicts - Policy needs fixing with REFINE_POLICY **Common Test Case Failure Modes:** 1. **TRANSLATION_AMBIGUOUS** - Problem: AI can't map natural language to policy variables - Solution: Improve variable descriptions with more natural language synonyms 2. **SATISFIABLE when expecting VALID** - Problem: Your expected result label is likely WRONG, not the policy - SATISFIABLE = "This scenario is logically consistent with the policy rules" - VALID = "This is the correct/expected answer according to the policy" - Solution: Change `expectedAggregatedFindingsResult` from `VALID` to `SATISFIABLE` 3. **Empty testFindings arrays** - Problem: Translation issues, not rule violations - Solution: Focus on improving natural language descriptions, not policy logic ## Build Workflow Monitoring **Critical Build Limits**: The API supports maximum 2 total build workflows per policy, with only 1 allowed to be IN_PROGRESS at any time. When a build workflow completes, you can instruct the user to review the output using the console. ### Check Build Status ```bash aws bedrock get-automated-reasoning-policy-build-workflow \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --build-workflow-id "workflow-123" ``` ### List Build History ```bash aws bedrock list-automated-reasoning-policy-build-workflows \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --max-results 50 ``` ### Best Practice: Clean Build Management ```bash # 1. Check existing builds before starting new ones aws bedrock list-automated-reasoning-policy-build-workflows \ --policy-arn <policy-arn> \ --max-results 10 # 2. Delete old/completed builds if you have 2 already aws bedrock delete-automated-reasoning-policy-build-workflow \ --policy-arn <policy-arn> \ --build-workflow-id "old-workflow-id" \ --last-updated-at "2025-11-15T00:41:18.608000+00:00" # 3. Now start your new build aws bedrock start-automated-reasoning-policy-build-workflow \ --policy-arn <policy-arn> \ --build-workflow-type INGEST_CONTENT \ --source-content <content> ``` ## Build Workflow Assets After a build workflow completes successfully, you can retrieve various assets. After you complete a build workflow, you can ask the user to check the build diff using the Automated Reasoning checks console. ### Asset Types #### 1. POLICY_DEFINITION - The Main Output ```bash aws bedrock get-automated-reasoning-policy-build-workflow-result-assets \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --build-workflow-id "workflow-123" \ --asset-type "POLICY_DEFINITION" ``` **What it contains:** - Compiled policy with extracted/refined rules, variables, and types - SMT-LIB expressions for all rules - Complete policy structure ready for deployment #### 2. BUILD_LOG - Build Process Details ```bash aws bedrock get-automated-reasoning-policy-build-workflow-result-assets \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --build-workflow-id "workflow-123" \ --asset-type "BUILD_LOG" ``` **What it shows:** - Document processing steps - What content was analyzed - Extraction results - What rules, variables, and types were found - Processing warnings - Content that couldn't be interpreted - Success/failure status for each extraction step #### 3. QUALITY_REPORT - Policy Quality Analysis ```bash aws bedrock get-automated-reasoning-policy-build-workflow-result-assets \ --policy-arn "arn:aws:bedrock:region:account:automated-reasoning-policy/policy-id" \ --build-workflow-id "workflow-123" \ --asset-type "QUALITY_REPORT" ``` **What it contains:** - Conflicting rules - Rules that contradict each other - Unused variables - Variables not referenced by any rules - Unused type values - Enum values not used in rules - Disjoint rule sets - Groups of rules that don't interact