Skip to content

Instantly share code, notes, and snippets.

@raybird
Created June 24, 2025 02:36
Show Gist options
  • Save raybird/3f4144265e2d9e0b1e6f97586e0f88ac to your computer and use it in GitHub Desktop.
Save raybird/3f4144265e2d9e0b1e6f97586e0f88ac to your computer and use it in GitHub Desktop.
通用問題處理工作流程

通用問題處理工作流程

概述

透過 Windsurf 整合 Sequential-Thinking(問題分解與推理)和 Serena(語義檢索與內容生成),處理用戶輸入的 prompt,生成結構化結果。

配置

  • Windsurf:啟用 MCP 功能。
  • MCP 伺服器
    • Serena:ide-assistant 上下文,負責內容生成。
    • Sequential-Thinking:負責結構化推理。
  • MCP 配置
    {
      "mcpServers": {
        "serena": { "command": "uv", "args": ["run", "--directory", "/path/to/serena", "serena-mcp-server", "--context", "ide-assistant"] },
        "sequential-thinking": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"] }
      }
    }
@raybird
Copy link
Author

raybird commented Jun 24, 2025


description: 使用 Sequential-Thinking 與 Serenal 組合

  1. 使用 Sequential-Thinking 將 prompt 分解為可執行任務,輸出到 .specstory/task.md
  2. 使用 Serena 根據任務清單逐步生成內容
  3. 使用 Serena 驗證任務清單實現結果
  4. 使用 Sequential-Thinking 驗證輸出並總結,輸出到 .specstory/summary.md
  5. 提示審查:請檢查總結:${summary}。是否需要優化

@raybird
Copy link
Author

raybird commented Jun 24, 2025

精簡說明

  • 通用性:接受任意用戶輸入的 user_prompt,適用於多種任務(程式碼、文本、分析等)。
  • 步驟精簡:縮減為 3 步(分解、生成、驗證),核心功能保留。
  • 分工
    • Sequential-Thinking:步驟 1(分解)、步驟 3(驗證與總結)。
    • Serena:步驟 2(內容生成與檢索)。
  • 靈活性:輸出路徑(./output/content/)和工具可依 prompt 調整。
  • Windsurf 整合:使用 Cascade 指令和記憶功能,確保流程連貫。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment