[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBQ91K0K1XCJADFCWX8WHF":3,"skill-same:01M6XBQ91K0K1XCJADFCWX8WHF":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":25,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":13,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6XBQ91K0K1XCJADFCWX8WHF","unified-deliverable-workflow",null,"Generate spreadsheets, diagrams, and PDF reports with iteration budgeting and error recovery","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-checklist-workflow-enhanced-780c5d\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[26,27,28,29,30,31,32,33,34,35,36,37,38],"workflow","unified deliverable workflow","PDF","spreadsheets","error recovery","generate","recovery","budgeting","reports","diagrams","iteration","error","with","2026-11-10 10:12:30",false,"---\nname: unified-deliverable-workflow\ndescription: Generate spreadsheets, diagrams, and PDF reports with iteration budgeting and error recovery\n---\n\n# Unified Multi-Deliverable Workflow\n\nThis skill provides a structured pattern for creating multiple document artifacts (spreadsheets, diagrams, PDF reports) in a single workflow with explicit iteration budgeting and robust error handling.\n\n## Overview\n\nUse this workflow when you need to:\n- Generate multiple related deliverables (Excel, PNG diagrams, PDF reports)\n- Manage iteration budget across different artifact types\n- Handle execute_code_sandbox failures gracefully\n- Ensure all deliverables are completed before budget exhaustion\n- Create cohesive documentation packages with cross-referenced content\n\n## Iteration Budget Template\n\n**Default Allocation (adjust based on task complexity):**\n\n| Phase | Deliverable | Iterations | Validation |\n|-------|-------------|------------|------------|\n| 1 | Spreadsheet (.xlsx) | 8-10 | File exists, readable, correct structure |\n| 2 | Diagram (.png) | 8-10 | File exists, viewable, correct dimensions |\n| 3 | PDF Report (.pdf) | 8-10 | File exists, downloadable, proper formatting |\n| Buffer | Error recovery | 4-6 | Retry failed phases |\n\n**Total recommended budget: 30-36 iterations**\n\n## Pre-Flight Checks (Iteration 1-2)\n\nBefore generating any deliverables:\n\n1. **Verify workspace path**: Always use `\u002Fworkspace\u002F` as base directory\n2. **Test execute_code_sandbox**: Run a simple print statement to confirm tool works\n3. **Check required libraries**: Plan to install via `!pip install` if needed\n4. **Standardize filenames**: Use consistent naming pattern (e.g., `projectname_deliverable.ext`)\n\n```python\n# Quick sandbox test\nprint(\"SANDBOX_OK\")\nprint(f\"WORKSPACE_PATH:\u002Fworkspace\")\n```\n\nIf this fails, use `run_shell` as fallback for file operations.\n\n## Phase 1: Spreadsheet Creation (Iterations 3-12)\n\n### Step 1.1: Plan Structure\nDefine your spreadsheet structure before coding:\n- Sheet names\n- Column headers\n- Data types\n- Any formulas or formatting\n\n### Step 1.2: Write Generation Code\n\n**Using openpyxl (recommended for .xlsx):**\n\n```python\n# Install if needed\n# !pip install openpyxl\n\nfrom openpyxl import Workbook\nfrom openpyxl.styles import Font, PatternFill, Alignment\n\nwb = Workbook()\nws = wb.active\nws.title = \"Data\"\n\n# Header row with styling\nheaders = [\"Item\", \"Description\", \"Value\", \"Status\"]\nfor col, header in enumerate(headers, 1):\n    cell = ws.cell(row=1, column=col, value=header)\n    cell.font = Font(bold=True)\n    cell.fill = PatternFill(start_color=\"CCCCCC\", end_color=\"CCCCCC\", fill_type=\"solid\")\n    cell.alignment = Alignment(horizontal=\"center\")\n\n# Data rows\ndata = [\n    [\"Item 1\", \"Description 1\", 100, \"Complete\"],\n    [\"Item 2\", \"Description 2\", 200, \"Pending\"],\n]\nfor row_idx, row_data in enumerate(data, 2):\n    for col_idx, value in enumerate(row_data, 1):\n        ws.cell(row=row_idx, column=col_idx, value=value)\n\n# Auto-adjust column widths\nfor column in ws.columns:\n    max_length = 0\n    column_letter = column[0].column_letter\n    for cell in column:\n        try:\n            if len(str(cell.value)) > max_length:\n                max_length = len(str(cell.value))\n        except:\n            pass\n    adjusted_width = min(max_length + 2, 50)\n    ws.column_dimensions[column_letter].width = adjusted_width\n\n# Save with standard path\noutput_path = \"\u002Fworkspace\u002Fhardware_selection_table.xlsx\"\nwb.save(output_path)\nprint(f\"ARTIFACT_PATH:{output_path}\")\nprint(\"SPREADSHEET_GENERATED\")\n```\n\n### Step 1.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour spreadsheet code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.xlsx`\n- [ ] File size > 1KB\n- [ ] No error messages in output\n\n### Step 1.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Library not found | Add `!pip install openpyxl` at code start |\n| '[ERROR] unknown error' | Retry once, then try simpler code structure |\n| File not created | Check path is `\u002Fworkspace\u002F` not `.\u002F` or `\u002Ftmp\u002F` |\n| Permission denied | Ensure no file lock from previous execution |\n\n**If 2 consecutive failures:** Skip to Phase 2 and return later with reduced scope.\n\n## Phase 2: Diagram Generation (Iterations 13-22)\n\n### Step 2.1: Choose Diagram Type\n\n| Type | Library | Best For |\n|------|---------|----------|\n| Flowchart | `graphviz` or `matplotlib` | Process flows, decision trees |\n| Layout\u002FDiagram | `matplotlib` | Physical layouts, workcell designs |\n| Network\u002FTopology | `networkx` + `matplotlib` | System architecture |\n| Simple shapes | `PIL\u002FPillow` | Basic boxes, arrows, labels |\n\n### Step 2.2: Write Generation Code\n\n**Using matplotlib for layout diagrams:**\n\n```python\n# Install if needed\n# !pip install matplotlib\n\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\n\nfig, ax = plt.subplots(figsize=(12, 8))\nax.set_xlim(0, 100)\nax.set_ylim(0, 80)\nax.set_aspect('equal')\n\n# Add components (example: workcell layout)\ncomponents = [\n    {\"label\": \"Robot\", \"x\": 30, \"y\": 40, \"w\": 20, \"h\": 15, \"color\": \"lightblue\"},\n    {\"label\": \"Conveyor\", \"x\": 60, \"y\": 35, \"w\": 30, \"h\": 10, \"color\": \"lightgreen\"},\n    {\"label\": \"Safety Zone\", \"x\": 10, \"y\": 10, \"w\": 80, \"h\": 60, \"color\": \"none\", \"border\": \"red\"},\n]\n\nfor comp in components:\n    rect = patches.Rectangle(\n        (comp[\"x\"], comp[\"y\"]), \n        comp[\"w\"], \n        comp[\"h\"],\n        linewidth=2, \n        edgecolor=\"black\" if comp.get(\"border\") else \"black\",\n        facecolor=comp[\"color\"] if comp[\"color\"] != \"none\" else \"white\",\n        linestyle=\"--\" if comp.get(\"border\") else \"-\"\n    )\n    ax.add_patch(rect)\n    ax.text(\n        comp[\"x\"] + comp[\"w\"]\u002F2, \n        comp[\"y\"] + comp[\"h\"]\u002F2, \n        comp[\"label\"],\n        ha=\"center\", \n        va=\"center\",\n        fontsize=10,\n        fontweight=\"bold\"\n    )\n\n# Remove axis, add title\nax.axis(\"off\")\nplt.title(\"Workcell Layout Diagram\", fontsize=14, fontweight=\"bold\", pad=20)\nplt.tight_layout()\n\n# Save with standard path\noutput_path = \"\u002Fworkspace\u002Fcnc_workcell_layout.png\"\nplt.savefig(output_path, dpi=150, bbox_inches=\"tight\")\nprint(f\"ARTIFACT_PATH:{output_path}\")\nprint(\"DIAGRAM_GENERATED\")\n```\n\n### Step 2.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour diagram code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.png`\n- [ ] File size > 5KB (diagrams should be substantial)\n- [ ] No error messages in output\n\n### Step 2.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Backend unknown error | Retry with simplified diagram (fewer elements) |\n| Font rendering issues | Use default matplotlib fonts, avoid custom fonts |\n| Memory issues | Reduce figure size or DPI |\n| Import errors | Add `!pip install matplotlib pillow` at start |\n\n**If 2 consecutive failures:** Create a simpler placeholder diagram and move to Phase 3.\n\n## Phase 3: PDF Report Generation (Iterations 23-32)\n\n### Step 3.1: Gather Content from Previous Phases\n\nBefore generating PDF, collect:\n- Data from spreadsheet (reference key findings)\n- Diagram file path for embedding or referencing\n- Any additional text content or analysis\n\n### Step 3.2: Write Generation Code\n\n**Using reportlab for professional reports:**\n\n```python\n# Install if needed\n# !pip install reportlab\n\nfrom reportlab.lib import colors\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, Image\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.units import inch\n\ndef create_pdf_report(output_path, spreadsheet_path, diagram_path):\n    doc = SimpleDocTemplate(output_path, pagesize=letter)\n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title\n    title_style = ParagraphStyle('CustomTitle', parent=styles['Heading1'],\n                                  fontSize=18, spaceAfter=30, alignment=1)\n    story.append(Paragraph(\"Project Deliverables Report\", title_style))\n    story.append(Spacer(1, 0.3*inch))\n    \n    # Executive Summary\n    story.append(Paragraph(\"Executive Summary\", styles['Heading2']))\n    story.append(Paragraph(\"This report summarizes the project deliverables including hardware selection, layout design, and implementation recommendations.\", styles['Normal']))\n    story.append(Spacer(1, 0.2*inch))\n    \n    # Spreadsheet Reference Section\n    story.append(Paragraph(\"Hardware Selection Summary\", styles['Heading2']))\n    story.append(Paragraph(f\"See: {spreadsheet_path}\", styles['Normal']))\n    \n    # Sample data table\n    data = [\n        ['Component', 'Selected Option', 'Status'],\n        ['Robot Arm', 'Model X-200', 'Approved'],\n        ['Controller', 'Unity Pro', 'Approved'],\n        ['Safety System', 'Light Curtain', 'Pending']\n    ]\n    \n    table = Table(data, colWidths=[2*inch, 2*inch, 1.5*inch])\n    table.setStyle(TableStyle([\n        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),\n        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),\n        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),\n        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n        ('GRID', (0, 0), (-1, -1), 1, colors.black)\n    ]))\n    story.append(table)\n    story.append(Spacer(1, 0.3*inch))\n    \n    # Diagram Reference Section\n    story.append(Paragraph(\"Layout Diagram\", styles['Heading2']))\n    story.append(Paragraph(f\"See: {diagram_path}\", styles['Normal']))\n    story.append(Spacer(1, 0.2*inch))\n    \n    # Try to embed diagram if it exists\n    try:\n        img = Image(diagram_path, width=6*inch, height=4*inch)\n        story.append(img)\n        story.append(Spacer(1, 0.2*inch))\n    except:\n        story.append(Paragraph(\"Diagram referenced but not embedded.\", styles['Normal']))\n    \n    # Recommendations\n    story.append(Paragraph(\"Recommendations\", styles['Heading2']))\n    recommendations = [\n        \"Proceed with approved hardware components\",\n        \"Complete safety system evaluation before deployment\",\n        \"Schedule installation during planned maintenance window\"\n    ]\n    for i, rec in enumerate(recommendations, 1):\n        story.append(Paragraph(f\"{i}. {rec}\", styles['Normal']))\n    \n    # Build PDF\n    doc.build(story)\n    print(f\"ARTIFACT_PATH:{output_path}\")\n    print(\"PDF_REPORT_GENERATED\")\n\ncreate_pdf_report(\n    '\u002Fworkspace\u002Fproject_report.pdf',\n    '\u002Fworkspace\u002Fhardware_selection_table.xlsx',\n    '\u002Fworkspace\u002Fcnc_workcell_layout.png'\n)\n```\n\n### Step 3.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour PDF code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.pdf`\n- [ ] File size > 10KB (reports should have substantial content)\n- [ ] All previous deliverables referenced correctly\n\n### Step 3.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Font errors | Use standard fonts (Helvetica, Arial, Courier) |\n| Image embed fails | Reference diagram path in text instead |\n| Unknown error | Simplify report structure, remove images |\n| Path issues | Hardcode absolute `\u002Fworkspace\u002F` paths |\n\n**If failures persist:** Generate a text-only PDF with basic structure.\n\n## Phase 4: Final Validation (Iterations 33-36)\n\n### Step 4.1: Verify All Deliverables\n\n```\nrun_shell\n  command: ls -lh \u002Fworkspace\u002F*.xlsx \u002Fworkspace\u002F*.png \u002Fworkspace\u002F*.pdf\n```\n\n### Step 4.2: Check File Integrity\n\n```\nrun_shell\n  command: file \u002Fworkspace\u002F*.xlsx \u002Fworkspace\u002F*.png \u002Fworkspace\u002F*.pdf\n```\n\n### Step 4.3: Confirm Download Paths\n\nEnsure each deliverable has `ARTIFACT_PATH:` prefix in execution output for proper download handling.\n\n## Cross-Phase Best Practices\n\n### Path Standardization\n- **Always use**: `\u002Fworkspace\u002Ffilename.ext`\n- **Never use**: `.\u002Ffilename.ext`, `\u002Ftmp\u002Ffilename.ext`, or relative paths\n- **Consistent naming**: `projectname_deliverabletype.ext`\n\n### Iteration Management\n- Track iterations used per phase\n- If Phase 1 uses >12 iterations, reduce Phase 2 and 3 budgets\n- Reserve minimum 4 iterations for error recovery\n- **Hard stop at iteration 28**: Begin PDF generation regardless of previous phase completion status\n\n### Error Handling Strategy\n1. **First failure**: Retry same code once\n2. **Second failure**: Simplify the approach (reduce complexity)\n3. **Third failure**: Create minimal viable deliverable and move on\n4. **Document failures**: Note what failed for post-task review\n\n### Tool Failure Workarounds\n\n| Tool | Primary Use | Fallback |\n|------|-------------|----------|\n| execute_code_sandbox | Run Python code | run_shell with python -c |\n| read_file | Verify file content | run_shell cat\u002Fhead |\n| run_shell | Check file existence | execute_code_sandbox with os.path |\n\n## Quick Start Template\n\n```python\n# Unified deliverable generator - minimal viable version\n# Run in execute_code_sandbox\n\n# ===== SPREADSHEET =====\nfrom openpyxl import Workbook\nwb = Workbook()\nws = wb.active\nws.append([\"Item\", \"Value\", \"Status\"])\nws.append([\"Component A\", 100, \"OK\"])\nwb.save(\"\u002Fworkspace\u002Fdata.xlsx\")\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Fdata.xlsx\")\n\n# ===== DIAGRAM =====\nimport matplotlib.pyplot as plt\nfig, ax = plt.subplots(figsize=(8, 6))\nax.text(0.5, 0.5, \"Diagram Placeholder\", ha='center', va='center', fontsize=16)\nax.axis('off')\nplt.savefig(\"\u002Fworkspace\u002Fdiagram.png\", dpi=100)\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Fdiagram.png\")\n\n# ===== PDF =====\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph\nfrom reportlab.lib.styles import getSampleStyleSheet\ndoc = SimpleDocTemplate(\"\u002Fworkspace\u002Freport.pdf\", pagesize=letter)\nstyles = getSampleStyleSheet()\nstory = [Paragraph(\"Report\", styles['Heading1']), \n         Paragraph(\"Generated successfully.\", styles['Normal'])]\ndoc.build(story)\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Freport.pdf\")\n```\n\n## Related Tools\n\n- `execute_code_sandbox` - Run Python code for all deliverable generation\n- `read_file` - Verify file content (type: xlsx, png, pdf)\n- `run_shell` - Check file existence, size, and integrity\n- `create_file` - For simple text-based deliverables if needed\n\n## Common Pitfalls and Solutions\n\n| Pitfall | Solution |\n|---------|----------|\n| Exhausting budget on Phase 1 | Set hard iteration limit per phase (max 12) |\n| Workspace path confusion | Always use absolute `\u002Fworkspace\u002F` paths |\n| Repeated unknown errors | Simplify code, reduce library dependencies |\n| Missing ARTIFACT_PATH | Always print prefix for each deliverable |\n| PDF created but not downloadable | Verify ARTIFACT_PATH is on its own line |\n| Diagram too complex | Start with basic shapes, add detail only if time permits |\n\n## Success Criteria\n\nA successful execution should produce:\n- [ ] 3 deliverable files in `\u002Fworkspace\u002F`\n- [ ] Each file > minimum size threshold\n- [ ] Each execution outputs `ARTIFACT_PATH:` prefix\n- [ ] Completed before iteration budget exhaustion\n- [ ] No unrecovered tool errors\n","# Unified Multi-Deliverable Workflow\n\nThis skill provides a structured pattern for creating multiple document artifacts (spreadsheets, diagrams, PDF reports) in a single workflow with explicit iteration budgeting and robust error handling.\n\n## Overview\n\nUse this workflow when you need to:\n- Generate multiple related deliverables (Excel, PNG diagrams, PDF reports)\n- Manage iteration budget across different artifact types\n- Handle execute_code_sandbox failures gracefully\n- Ensure all deliverables are completed before budget exhaustion\n- Create cohesive documentation packages with cross-referenced content\n\n## Iteration Budget Template\n\n**Default Allocation (adjust based on task complexity):**\n\n| Phase | Deliverable | Iterations | Validation |\n|-------|-------------|------------|------------|\n| 1 | Spreadsheet (.xlsx) | 8-10 | File exists, readable, correct structure |\n| 2 | Diagram (.png) | 8-10 | File exists, viewable, correct dimensions |\n| 3 | PDF Report (.pdf) | 8-10 | File exists, downloadable, proper formatting |\n| Buffer | Error recovery | 4-6 | Retry failed phases |\n\n**Total recommended budget: 30-36 iterations**\n\n## Pre-Flight Checks (Iteration 1-2)\n\nBefore generating any deliverables:\n\n1. **Verify workspace path**: Always use `\u002Fworkspace\u002F` as base directory\n2. **Test execute_code_sandbox**: Run a simple print statement to confirm tool works\n3. **Check required libraries**: Plan to install via `!pip install` if needed\n4. **Standardize filenames**: Use consistent naming pattern (e.g., `projectname_deliverable.ext`)\n\n```python\n# Quick sandbox test\nprint(\"SANDBOX_OK\")\nprint(f\"WORKSPACE_PATH:\u002Fworkspace\")\n```\n\nIf this fails, use `run_shell` as fallback for file operations.\n\n## Phase 1: Spreadsheet Creation (Iterations 3-12)\n\n### Step 1.1: Plan Structure\nDefine your spreadsheet structure before coding:\n- Sheet names\n- Column headers\n- Data types\n- Any formulas or formatting\n\n### Step 1.2: Write Generation Code\n\n**Using openpyxl (recommended for .xlsx):**\n\n```python\n# Install if needed\n# !pip install openpyxl\n\nfrom openpyxl import Workbook\nfrom openpyxl.styles import Font, PatternFill, Alignment\n\nwb = Workbook()\nws = wb.active\nws.title = \"Data\"\n\n# Header row with styling\nheaders = [\"Item\", \"Description\", \"Value\", \"Status\"]\nfor col, header in enumerate(headers, 1):\n    cell = ws.cell(row=1, column=col, value=header)\n    cell.font = Font(bold=True)\n    cell.fill = PatternFill(start_color=\"CCCCCC\", end_color=\"CCCCCC\", fill_type=\"solid\")\n    cell.alignment = Alignment(horizontal=\"center\")\n\n# Data rows\ndata = [\n    [\"Item 1\", \"Description 1\", 100, \"Complete\"],\n    [\"Item 2\", \"Description 2\", 200, \"Pending\"],\n]\nfor row_idx, row_data in enumerate(data, 2):\n    for col_idx, value in enumerate(row_data, 1):\n        ws.cell(row=row_idx, column=col_idx, value=value)\n\n# Auto-adjust column widths\nfor column in ws.columns:\n    max_length = 0\n    column_letter = column[0].column_letter\n    for cell in column:\n        try:\n            if len(str(cell.value)) > max_length:\n                max_length = len(str(cell.value))\n        except:\n            pass\n    adjusted_width = min(max_length + 2, 50)\n    ws.column_dimensions[column_letter].width = adjusted_width\n\n# Save with standard path\noutput_path = \"\u002Fworkspace\u002Fhardware_selection_table.xlsx\"\nwb.save(output_path)\nprint(f\"ARTIFACT_PATH:{output_path}\")\nprint(\"SPREADSHEET_GENERATED\")\n```\n\n### Step 1.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour spreadsheet code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.xlsx`\n- [ ] File size > 1KB\n- [ ] No error messages in output\n\n### Step 1.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Library not found | Add `!pip install openpyxl` at code start |\n| '[ERROR] unknown error' | Retry once, then try simpler code structure |\n| File not created | Check path is `\u002Fworkspace\u002F` not `.\u002F` or `\u002Ftmp\u002F` |\n| Permission denied | Ensure no file lock from previous execution |\n\n**If 2 consecutive failures:** Skip to Phase 2 and return later with reduced scope.\n\n## Phase 2: Diagram Generation (Iterations 13-22)\n\n### Step 2.1: Choose Diagram Type\n\n| Type | Library | Best For |\n|------|---------|----------|\n| Flowchart | `graphviz` or `matplotlib` | Process flows, decision trees |\n| Layout\u002FDiagram | `matplotlib` | Physical layouts, workcell designs |\n| Network\u002FTopology | `networkx` + `matplotlib` | System architecture |\n| Simple shapes | `PIL\u002FPillow` | Basic boxes, arrows, labels |\n\n### Step 2.2: Write Generation Code\n\n**Using matplotlib for layout diagrams:**\n\n```python\n# Install if needed\n# !pip install matplotlib\n\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\n\nfig, ax = plt.subplots(figsize=(12, 8))\nax.set_xlim(0, 100)\nax.set_ylim(0, 80)\nax.set_aspect('equal')\n\n# Add components (example: workcell layout)\ncomponents = [\n    {\"label\": \"Robot\", \"x\": 30, \"y\": 40, \"w\": 20, \"h\": 15, \"color\": \"lightblue\"},\n    {\"label\": \"Conveyor\", \"x\": 60, \"y\": 35, \"w\": 30, \"h\": 10, \"color\": \"lightgreen\"},\n    {\"label\": \"Safety Zone\", \"x\": 10, \"y\": 10, \"w\": 80, \"h\": 60, \"color\": \"none\", \"border\": \"red\"},\n]\n\nfor comp in components:\n    rect = patches.Rectangle(\n        (comp[\"x\"], comp[\"y\"]), \n        comp[\"w\"], \n        comp[\"h\"],\n        linewidth=2, \n        edgecolor=\"black\" if comp.get(\"border\") else \"black\",\n        facecolor=comp[\"color\"] if comp[\"color\"] != \"none\" else \"white\",\n        linestyle=\"--\" if comp.get(\"border\") else \"-\"\n    )\n    ax.add_patch(rect)\n    ax.text(\n        comp[\"x\"] + comp[\"w\"]\u002F2, \n        comp[\"y\"] + comp[\"h\"]\u002F2, \n        comp[\"label\"],\n        ha=\"center\", \n        va=\"center\",\n        fontsize=10,\n        fontweight=\"bold\"\n    )\n\n# Remove axis, add title\nax.axis(\"off\")\nplt.title(\"Workcell Layout Diagram\", fontsize=14, fontweight=\"bold\", pad=20)\nplt.tight_layout()\n\n# Save with standard path\noutput_path = \"\u002Fworkspace\u002Fcnc_workcell_layout.png\"\nplt.savefig(output_path, dpi=150, bbox_inches=\"tight\")\nprint(f\"ARTIFACT_PATH:{output_path}\")\nprint(\"DIAGRAM_GENERATED\")\n```\n\n### Step 2.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour diagram code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.png`\n- [ ] File size > 5KB (diagrams should be substantial)\n- [ ] No error messages in output\n\n### Step 2.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Backend unknown error | Retry with simplified diagram (fewer elements) |\n| Font rendering issues | Use default matplotlib fonts, avoid custom fonts |\n| Memory issues | Reduce figure size or DPI |\n| Import errors | Add `!pip install matplotlib pillow` at start |\n\n**If 2 consecutive failures:** Create a simpler placeholder diagram and move to Phase 3.\n\n## Phase 3: PDF Report Generation (Iterations 23-32)\n\n### Step 3.1: Gather Content from Previous Phases\n\nBefore generating PDF, collect:\n- Data from spreadsheet (reference key findings)\n- Diagram file path for embedding or referencing\n- Any additional text content or analysis\n\n### Step 3.2: Write Generation Code\n\n**Using reportlab for professional reports:**\n\n```python\n# Install if needed\n# !pip install reportlab\n\nfrom reportlab.lib import colors\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, Image\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.units import inch\n\ndef create_pdf_report(output_path, spreadsheet_path, diagram_path):\n    doc = SimpleDocTemplate(output_path, pagesize=letter)\n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title\n    title_style = ParagraphStyle('CustomTitle', parent=styles['Heading1'],\n                                  fontSize=18, spaceAfter=30, alignment=1)\n    story.append(Paragraph(\"Project Deliverables Report\", title_style))\n    story.append(Spacer(1, 0.3*inch))\n    \n    # Executive Summary\n    story.append(Paragraph(\"Executive Summary\", styles['Heading2']))\n    story.append(Paragraph(\"This report summarizes the project deliverables including hardware selection, layout design, and implementation recommendations.\", styles['Normal']))\n    story.append(Spacer(1, 0.2*inch))\n    \n    # Spreadsheet Reference Section\n    story.append(Paragraph(\"Hardware Selection Summary\", styles['Heading2']))\n    story.append(Paragraph(f\"See: {spreadsheet_path}\", styles['Normal']))\n    \n    # Sample data table\n    data = [\n        ['Component', 'Selected Option', 'Status'],\n        ['Robot Arm', 'Model X-200', 'Approved'],\n        ['Controller', 'Unity Pro', 'Approved'],\n        ['Safety System', 'Light Curtain', 'Pending']\n    ]\n    \n    table = Table(data, colWidths=[2*inch, 2*inch, 1.5*inch])\n    table.setStyle(TableStyle([\n        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),\n        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),\n        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),\n        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n        ('GRID', (0, 0), (-1, -1), 1, colors.black)\n    ]))\n    story.append(table)\n    story.append(Spacer(1, 0.3*inch))\n    \n    # Diagram Reference Section\n    story.append(Paragraph(\"Layout Diagram\", styles['Heading2']))\n    story.append(Paragraph(f\"See: {diagram_path}\", styles['Normal']))\n    story.append(Spacer(1, 0.2*inch))\n    \n    # Try to embed diagram if it exists\n    try:\n        img = Image(diagram_path, width=6*inch, height=4*inch)\n        story.append(img)\n        story.append(Spacer(1, 0.2*inch))\n    except:\n        story.append(Paragraph(\"Diagram referenced but not embedded.\", styles['Normal']))\n    \n    # Recommendations\n    story.append(Paragraph(\"Recommendations\", styles['Heading2']))\n    recommendations = [\n        \"Proceed with approved hardware components\",\n        \"Complete safety system evaluation before deployment\",\n        \"Schedule installation during planned maintenance window\"\n    ]\n    for i, rec in enumerate(recommendations, 1):\n        story.append(Paragraph(f\"{i}. {rec}\", styles['Normal']))\n    \n    # Build PDF\n    doc.build(story)\n    print(f\"ARTIFACT_PATH:{output_path}\")\n    print(\"PDF_REPORT_GENERATED\")\n\ncreate_pdf_report(\n    '\u002Fworkspace\u002Fproject_report.pdf',\n    '\u002Fworkspace\u002Fhardware_selection_table.xlsx',\n    '\u002Fworkspace\u002Fcnc_workcell_layout.png'\n)\n```\n\n### Step 3.3: Execute and Validate\n\n```\nexecute_code_sandbox\n  code: \u003Cyour PDF code>\n  language: python\n```\n\n**Validation checklist:**\n- [ ] ARTIFACT_PATH output present\n- [ ] File exists: `run_shell command: ls -lh \u002Fworkspace\u002F*.pdf`\n- [ ] File size > 10KB (reports should have substantial content)\n- [ ] All previous deliverables referenced correctly\n\n### Step 3.4: Error Recovery\n\n| Error | Recovery Action |\n|-------|-----------------|\n| Font errors | Use standard fonts (Helvetica, Arial, Courier) |\n| Image embed fails | Reference diagram path in text instead |\n| Unknown error | Simplify report structure, remove images |\n| Path issues | Hardcode absolute `\u002Fworkspace\u002F` paths |\n\n**If failures persist:** Generate a text-only PDF with basic structure.\n\n## Phase 4: Final Validation (Iterations 33-36)\n\n### Step 4.1: Verify All Deliverables\n\n```\nrun_shell\n  command: ls -lh \u002Fworkspace\u002F*.xlsx \u002Fworkspace\u002F*.png \u002Fworkspace\u002F*.pdf\n```\n\n### Step 4.2: Check File Integrity\n\n```\nrun_shell\n  command: file \u002Fworkspace\u002F*.xlsx \u002Fworkspace\u002F*.png \u002Fworkspace\u002F*.pdf\n```\n\n### Step 4.3: Confirm Download Paths\n\nEnsure each deliverable has `ARTIFACT_PATH:` prefix in execution output for proper download handling.\n\n## Cross-Phase Best Practices\n\n### Path Standardization\n- **Always use**: `\u002Fworkspace\u002Ffilename.ext`\n- **Never use**: `.\u002Ffilename.ext`, `\u002Ftmp\u002Ffilename.ext`, or relative paths\n- **Consistent naming**: `projectname_deliverabletype.ext`\n\n### Iteration Management\n- Track iterations used per phase\n- If Phase 1 uses >12 iterations, reduce Phase 2 and 3 budgets\n- Reserve minimum 4 iterations for error recovery\n- **Hard stop at iteration 28**: Begin PDF generation regardless of previous phase completion status\n\n### Error Handling Strategy\n1. **First failure**: Retry same code once\n2. **Second failure**: Simplify the approach (reduce complexity)\n3. **Third failure**: Create minimal viable deliverable and move on\n4. **Document failures**: Note what failed for post-task review\n\n### Tool Failure Workarounds\n\n| Tool | Primary Use | Fallback |\n|------|-------------|----------|\n| execute_code_sandbox | Run Python code | run_shell with python -c |\n| read_file | Verify file content | run_shell cat\u002Fhead |\n| run_shell | Check file existence | execute_code_sandbox with os.path |\n\n## Quick Start Template\n\n```python\n# Unified deliverable generator - minimal viable version\n# Run in execute_code_sandbox\n\n# ===== SPREADSHEET =====\nfrom openpyxl import Workbook\nwb = Workbook()\nws = wb.active\nws.append([\"Item\", \"Value\", \"Status\"])\nws.append([\"Component A\", 100, \"OK\"])\nwb.save(\"\u002Fworkspace\u002Fdata.xlsx\")\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Fdata.xlsx\")\n\n# ===== DIAGRAM =====\nimport matplotlib.pyplot as plt\nfig, ax = plt.subplots(figsize=(8, 6))\nax.text(0.5, 0.5, \"Diagram Placeholder\", ha='center', va='center', fontsize=16)\nax.axis('off')\nplt.savefig(\"\u002Fworkspace\u002Fdiagram.png\", dpi=100)\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Fdiagram.png\")\n\n# ===== PDF =====\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph\nfrom reportlab.lib.styles import getSampleStyleSheet\ndoc = SimpleDocTemplate(\"\u002Fworkspace\u002Freport.pdf\", pagesize=letter)\nstyles = getSampleStyleSheet()\nstory = [Paragraph(\"Report\", styles['Heading1']), \n         Paragraph(\"Generated successfully.\", styles['Normal'])]\ndoc.build(story)\nprint(\"ARTIFACT_PATH:\u002Fworkspace\u002Freport.pdf\")\n```\n\n## Related Tools\n\n- `execute_code_sandbox` - Run Python code for all deliverable generation\n- `read_file` - Verify file content (type: xlsx, png, pdf)\n- `run_shell` - Check file existence, size, and integrity\n- `create_file` - For simple text-based deliverables if needed\n\n## Common Pitfalls and Solutions\n\n| Pitfall | Solution |\n|---------|----------|\n| Exhausting budget on Phase 1 | Set hard iteration limit per phase (max 12) |\n| Workspace path confusion | Always use absolute `\u002Fworkspace\u002F` paths |\n| Repeated unknown errors | Simplify code, reduce library dependencies |\n| Missing ARTIFACT_PATH | Always print prefix for each deliverable |\n| PDF created but not downloadable | Verify ARTIFACT_PATH is on its own line |\n| Diagram too complex | Start with basic shapes, add detail only if time permits |\n\n## Success Criteria\n\nA successful execution should produce:\n- [ ] 3 deliverable files in `\u002Fworkspace\u002F`\n- [ ] Each file > minimum size threshold\n- [ ] Each execution outputs `ARTIFACT_PATH:` prefix\n- [ ] Completed before iteration budget exhaustion\n- [ ] No unrecovered tool errors\n",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-checklist-workflow-enhanced-780c5d","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill unified-deliverable-workflow",{"tool":56,"command":57},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill unified-deliverable-workflow",{"tool":59,"command":60},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill unified-deliverable-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-checklist-workflow-enhanced-780c5d\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},".skill_id","OTHER","其他",52,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-checklist-workflow-enhanced-780c5d\u002F.skill_id",[71,96,112,121,151,167],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":39},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","python",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":39},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[103,104,79,94,105,95,106,107,108,109,110,93,111,38,83,86,88],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[119,79,83,120,88,107,93,94,95,86],"write special chars heredoc","shell",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":132,"publishedAt":39},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[127],{"categoryNo":128,"categoryName":129,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[133,134,135,136,137,81,138,139,140,141,142,86,143,144,145,146,147,148,149,150],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":39},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[158,159,160,161,86,162,38,163,164,165,166],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":39},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[174,175,176,177,178,179,94,180,181,182],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]