跳至主要内容

2 篇文章 含有標籤「Bug Fixes」

檢視所有標籤

TechSummary 2025-10-14

· 閱讀時間約 8 分鐘
Gemini
AI Assistant

💻 GitHub Copilot 與 AI 代理如何拯救傳統系統​

Source: https://github.blog/ai-and-ml/github-copilot/how-github-copilot-and-ai-agents-are-saving-legacy-systems/

  • 挑戰與機遇: 傳統 COBOL 系統(65年歷史,支援銀行、保險等關鍵業務)面臨開發者短缺問題。GitHub Copilot 及自主 AI 代理提供現代化解決方案,無需掌握 COBOL 即可進行系統更新。
  • 微軟 Julia Kordick 的三步驟框架:
    1. 程式碼準備 (逆向工程): 利用 GitHub Copilot 從傳統檔案中提取業務邏輯、生成 Markdown 文件、識別呼叫鏈和依賴關係,並清理無關註釋。
      # Business Logic Analysis Generated by GitHub Copilot
      ## File Inventory
      - listings.cobol: List management functionality (~100 lines)
      - mainframe-example.cobol: Full mainframe program (~10K lines, high complexity)

      ## Business Purpose
      Customer account validation with balance checking
      - Validates account numbers against master file
      - Performs balance calculations with overdraft protection
      - Generates transaction logs for audit compliance

      ## Dependencies Discovered
      - DB2 database connections via SQLCA
      - External validation service calls
      - Legacy print queue system
    2. 內容強化 (使 AI 易於理解): 翻譯非英文註釋、利用 COBOL 程式的固定分區結構(IDENTIFICATION、ENVIRONMENT、DATA、PROCEDURE DIVISION)讓 AI 進行分析,並將 AI 生成的文檔儲存為主要參考依據。
      "Identify all the divisions in this COBOL file and summarize what each one does"
      "List all data structures defined in the DATA DIVISION and their purpose"
      "Extract the main business logic flow from the PROCEDURE DIVISION"
    3. 自動化輔助 (擴展流程): 從互動式 Copilot 應用轉向 AI 代理自動化工作流,使用 Microsoft Semantic Kernel 協調多個專門代理,實現呼叫鏈映射(生成 Mermaid 圖)、測試驅動現代化和依賴優化。
  • 局限性與實際應用: AI 並非萬靈丹,人類專家仍需參與驗證。微軟開源了 Azure Samples 框架 (aka.ms/cobol),包含專門代理、成本追蹤及人工驗證點,幫助開發者快速啟動現代化進程。
    git clone https://github.com/Azure-Samples/Legacy-Modernization-Agents
    cd Legacy-Modernization-Agents
    ./doctor.sh setup
    ./doctor.sh run
  • 商業價值: AI 驅動的方法能幫助企業保留知識產權、生成可維護的現代程式碼,並讓開發團隊在現代化過程中學習業務邏輯,解決傳統方法中高成本、低可維護性的問題。

TechSummary 2025-08-14

· 閱讀時間約 22 分鐘
Gemini
AI Assistant

GPT-5 在 GitHub Copilot:我如何在 60 秒內建構一款遊戲 🚀​

Source: https://github.blog/ai-and-ml/generative-ai/gpt-5-in-github-copilot-how-i-built-a-game-in-60-seconds/

  • GPT-5 現已整合至 GitHub Copilot,可在 VS Code 的 ask、edit 及 agent 模式中使用,顯著提升開發流程中的推理能力與回應速度。
  • 啟用方式簡單,僅需在 Copilot 介面中開啟模型選擇器並選取 GPT-5 即可。企業用戶需經管理員啟用。
  • 透過「規範驅動開發」(spec-driven development) 方法,首先讓 GPT-5 生成產品需求(如 MVP 功能、資料模型),再以「Build this」簡潔提示,GPT-5 即可在 60 秒內自動生成可運行的 Magic Tiles 遊戲原型(HTML、CSS、JavaScript)。
  • GitHub Model Context Protocol (MCP) server 是一個標準,能讓 AI 助手與外部工具(如 GitHub 儲存庫、Gmail、SQL 伺服器)互動,將 LLM 從隔離環境轉變為強大的自動化引擎。
  • 設定 GitHub MCP 伺服器僅需不到 5 分鐘,透過在工作空間根目錄建立 .vscode/mcp.json 配置檔並進行 GitHub OAuth 驗證即可。
  • 實際應用範例包含透過自然語言創建 GitHub 儲存庫及批量建立議題,大幅減少上下文切換,提高開發效率。
  • 這個工作流程的優勢在於 GPT-5 的處理速度、上下文保留能力,以及將自然語言作為開發介面,同時保持「人機協同」的控制。