assist
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/assist — 萬用助手
/assist — Universal Assistant
自動分析當前情境,盤點可用 ECC 資源,智慧選擇最佳 agent pipeline 並執行。適合不確定該用哪個工具時使用。
Automatically analyzes the current scenario, takes inventory of available ECC resources, intelligently selects and executes the optimal agent pipeline. Suitable for use when you are not sure which tool to use.
Step 1: 情境分析
Step 1: Scenario Analysis
收集當前工作環境的完整資訊:
Collect complete information about the current working environment:
1a. Git 狀態
1a. Git Status
bash
git status
git diff --stat
git log --oneline -5- 是否有未 commit 的變更?變更了哪些檔案?
- 最近的 commit 在做什麼?
- 當前 branch 名稱和狀態
bash
git status
git diff --stat
git log --oneline -5- Are there any uncommitted changes? Which files have been modified?
- What is the content of recent commits?
- Current branch name and status
1b. 專案偵測
1b. Project Detection
bash
ls -la- 專案語言/框架(package.json → Node.js、go.mod → Go、requirements.txt → Python 等)
- 是否有測試框架設定
- 是否有 CI/CD 設定
bash
ls -la- Project language/framework (package.json → Node.js、go.mod → Go、requirements.txt → Python, etc.)
- Whether there is a test framework configuration
- Whether there is CI/CD configuration
1c. 使用者指令
1c. User Instructions
- 分析 中的任務描述
$ARGUMENTS - 回顧對話脈絡中的需求和上下文
- Analyze the task description in
$ARGUMENTS - Review requirements and context in the conversation history
1d. Build 狀態
1d. Build Status
- 如果有相關指令(、
npm run build、go build),快速檢查 build 是否正常python -m py_compile - 只在偵測到明確的 build 設定時才執行
- If there are relevant commands (、
npm run build、go build), quickly check if the build works normallypython -m py_compile - Only execute when explicit build configuration is detected
Step 2: 盤點 ECC 資源
Step 2: Inventory ECC Resources
快速掃描可用的 agents、skills、commands:
可用 Agents(根據專案類型篩選):
| Agent | 適用情境 |
|---|---|
| planner | 需要規劃的複雜任務 |
| architect | 架構設計決策 |
| tdd-guide | 新功能、bug 修復 |
| code-reviewer | 程式碼品質審查 |
| security-reviewer | 安全性分析 |
| build-error-resolver | build 失敗 |
| e2e-runner | E2E 測試 |
| refactor-cleaner | 重構、清理 dead code |
| doc-updater | 文件更新 |
| go-reviewer | Go 專案專用 |
| go-build-resolver | Go build 錯誤 |
| python-reviewer | Python 專案專用 |
| database-reviewer | 資料庫相關 |
| harness-optimizer | agent harness 設定優化(hooks/evals/routing) |
| loop-operator | 自主迴圈運行與監控 |
Quickly scan available agents, skills, commands:
Available Agents (filtered by project type):
| Agent | Applicable Scenario |
|---|---|
| planner | Complex tasks requiring planning |
| architect | Architecture design decisions |
| tdd-guide | New features, bug fixes |
| code-reviewer | Code quality review |
| security-reviewer | Security analysis |
| build-error-resolver | Build failure |
| e2e-runner | E2E testing |
| refactor-cleaner | Refactoring, dead code cleanup |
| doc-updater | Documentation update |
| go-reviewer | Exclusive for Go projects |
| go-build-resolver | Go build errors |
| python-reviewer | Exclusive for Python projects |
| database-reviewer | Database related tasks |
| harness-optimizer | Agent harness configuration optimization (hooks/evals/routing) |
| loop-operator | Autonomous loop operation and monitoring |
ECC 資源分配原則
ECC Resource Allocation Principles
- 盤點結果直接影響 Step 3 路由選擇
- 路由決策前必須確認所選 pipeline 中的所有 agent 均為可用狀態
- 若需要的 agent 已被 defer,提示使用者先 restore 或選擇替代 pipeline
- Inventory results directly affect Step 3 routing selection
- All agents in the selected pipeline must be confirmed available before making routing decisions
- If the required agent is deferred, prompt the user to restore it first or select an alternative pipeline
Step 3: 智慧路由
Step 3: Intelligent Routing
根據 Step 1 的情境分析結果,自動選擇最佳 pipeline:
Automatically select the optimal pipeline based on the scenario analysis results from Step 1:
路由規則
Routing Rules
| 偵測到的情境 | 選擇的 Pipeline | 說明 |
|---|---|---|
| 有明確的新功能需求 | planner(含業界/學術方案調研)-> architect -> tdd-guide -> code-reviewer | 完整功能開發流程;planner 須附上技術方案的業界標準或學術支撐 |
| 有 bug 描述或錯誤訊息 | planner -> tdd-guide -> code-reviewer | bug 修復流程 |
| 有未 commit 變更需 review | code-reviewer -> security-reviewer | 快速品質審查 |
| build 失敗 | build-error-resolver | 直接修復 build |
| 需要重構(使用者明確要求或偵測到 code smell) | architect -> refactor-cleaner -> code-reviewer | 安全重構流程 |
| 需要寫文件 | doc-updater -> code-reviewer | 文件更新流程 |
| Go 專案 | 在 pipeline 中加入 go-reviewer | 自動附加語言專用 reviewer |
| Python 專案 | 在 pipeline 中加入 python-reviewer | 自動附加語言專用 reviewer |
| 涉及資料庫 schema 或 query | 在 pipeline 中加入 database-reviewer | 自動附加資料庫 reviewer |
| 需要優化 agent harness 設定 | harness-optimizer | hooks/evals/routing 設定調優 |
| 需要執行自主迴圈任務 | loop-operator | 長時間 autonomous loop 監控 |
| 不確定 / 多種可能 | 列出建議 pipeline,讓使用者選擇 | 透過 AskUserQuestion 互動 |
| Detected Scenario | Selected Pipeline | Description |
|---|---|---|
| Clear new feature requirement | planner (including industry/academic solution research) -> architect -> tdd-guide -> code-reviewer | Complete feature development process; planner must attach industry standards or academic support for technical solutions |
| Bug description or error message exists | planner -> tdd-guide -> code-reviewer | Bug fix process |
| Uncommitted changes need review | code-reviewer -> security-reviewer | Quick quality review |
| Build failure | build-error-resolver | Directly fix build issues |
| Refactoring required (explicitly requested by user or code smell detected) | architect -> refactor-cleaner -> code-reviewer | Secure refactoring process |
| Documentation writing required | doc-updater -> code-reviewer | Documentation update process |
| Go project | Add go-reviewer to the pipeline | Automatically append language-specific reviewer |
| Python project | Add python-reviewer to the pipeline | Automatically append language-specific reviewer |
| Involves database schema or query | Add database-reviewer to the pipeline | Automatically append database reviewer |
| Need to optimize agent harness configuration | harness-optimizer | Hooks/evals/routing configuration tuning |
| Need to run autonomous loop tasks | loop-operator | Long-term autonomous loop monitoring |
| Uncertain / multiple possibilities | List recommended pipelines for user selection | Interact via AskUserQuestion |
路由判斷邏輯
Routing Judgment Logic
- 優先使用 :如果使用者有明確指令,以指令為準
$ARGUMENTS - 其次分析 git 狀態:未 commit 變更 → review pipeline;build 失敗 → build-fix pipeline
- 再看對話脈絡:從對話中推斷使用者的意圖
- 無法判斷時詢問:使用 AskUserQuestion 提供 2-4 個建議選項
- Prioritize : If the user has clear instructions, follow the instructions first
$ARGUMENTS - Then analyze Git status: Uncommitted changes → review pipeline; build failure → build-fix pipeline
- Then check conversation context: Infer user intent from conversation history
- Ask when unable to judge: Provide 2-4 suggested options using AskUserQuestion
多情境衝突處理
Multi-scenario Conflict Handling
當同時偵測到多個情境時,依以下優先順序決定先處理哪個:
- Build 失敗 — 必須先修復,否則其他工作無法驗證
- 安全問題 — 不能延後
- 使用者明確指令($ARGUMENTS)— 使用者意圖優先
- Bug 修復 — 修復比新功能重要
- 新功能開發 — 標準優先級
- 重構/清理 — 較低優先級
- 文件更新 — 可延後或與其他工作並行
若偵測到的情境與 衝突(例如使用者要 review 但 build 失敗),先說明偵測結果,詢問使用者是否仍要繼續原指令。
$ARGUMENTSWhen multiple scenarios are detected at the same time, decide the processing order according to the following priority:
- Build failure — Must be fixed first, otherwise other work cannot be verified
- Security issues — Cannot be postponed
- Explicit user instructions ($ARGUMENTS) — User intent takes priority
- Bug fix — Fixes are more important than new features
- New feature development — Standard priority
- Refactoring/cleanup — Lower priority
- Documentation update — Can be postponed or executed in parallel with other work
If the detected scenario conflicts with (for example, user requests review but build fails), first explain the detection result and ask if the user still wants to continue the original instruction.
$ARGUMENTS不確定時的互動
Interaction When Uncertain
使用 AskUserQuestion 提供選項:
情境分析結果:[簡述偵測到的狀態]
建議的工作流程:
1. [Pipeline A] — [適用原因]
2. [Pipeline B] — [適用原因]
3. [Pipeline C] — [適用原因]Use AskUserQuestion to provide options:
Scenario analysis result: [Brief description of detected state]
Recommended workflows:
1. [Pipeline A] — [Applicable reason]
2. [Pipeline B] — [Applicable reason]
3. [Pipeline C] — [Applicable reason]Step 4: 執行 Pipeline
Step 4: Execute Pipeline
按選定的 pipeline 依序執行 agents,使用 handoff protocol 傳遞 context。
Execute agents in sequence according to the selected pipeline, use handoff protocol to pass context.
Handoff Protocol
Handoff Protocol
每個 agent 完成後,整理交接資訊傳給下一個 agent:
markdown
undefinedAfter each agent completes, organize handover information and pass it to the next agent:
markdown
undefinedHANDOFF: [previous-agent] -> [next-agent]
HANDOFF: [previous-agent] -> [next-agent]
Status: [COMPLETED | COMPLETED_WITH_ISSUES | FAILED]
Status: [COMPLETED | COMPLETED_WITH_ISSUES | FAILED]
<!-- COMPLETED = 正常繼續 | COMPLETED_WITH_ISSUES = 繼續但標記 | FAILED = 暫停詢問使用者 -->
<!-- COMPLETED = Continue normally | COMPLETED_WITH_ISSUES = Continue but mark issues | FAILED = Pause and ask user -->
Context
Context
<!-- 任務背景和目標 -->
<!-- Task background and objective -->
Findings
Findings
<!-- 上一個 agent 的發現和產出 -->
<!-- Findings and outputs of the previous agent -->
Industry & Standards Referenced
Industry & Standards Referenced
<!-- 本階段引用的業界標準或學術依據 -->
<!-- Industry standards or academic basis cited in this phase -->
Files Modified
Files Modified
<!-- 被修改的檔案清單 -->
<!-- List of modified files -->
Open Questions
Open Questions
<!-- 未解決的問題 -->
<!-- Unresolved issues -->
Recommendations
Recommendations
<!-- 給下一個 agent 的建議 -->
undefined<!-- Recommendations for the next agent -->
undefined執行原則
Execution Principles
- 每個 agent 依序執行,不跳過
- 如果某個 agent 發現 CRITICAL 問題,暫停 pipeline 並使用 AskUserQuestion 詢問使用者
- 語言專用 reviewer(go-reviewer、python-reviewer)在 code-reviewer 之後執行
- database-reviewer 在涉及 DB 變更的步驟之後執行
- Each agent is executed in sequence, no skipping
- If an agent finds a CRITICAL issue, pause the pipeline and ask the user using AskUserQuestion
- Language-specific reviewers (go-reviewer, python-reviewer) are executed after code-reviewer
- database-reviewer is executed after steps involving DB changes
Step 5: 輸出報告
Step 5: Output Report
所有 agents 執行完畢後,輸出最終報告:
markdown
undefinedAfter all agents are executed, output the final report:
markdown
undefined/assist 執行報告
/assist Execution Report
情境分析
Scenario Analysis
- 專案類型: [語言/框架]
- 偵測到的情境: [情境描述]
- 選擇的 Pipeline: [pipeline 名稱]
- Project type: [Language/Framework]
- Detected scenario: [Scenario description]
- Selected Pipeline: [pipeline name]
Agent 執行結果
Agent Execution Results
1. [Agent 名稱]
1. [Agent Name]
- 狀態: 完成 / 有問題
- 摘要: [1-2 句話]
- 重要發現: [列表]
- Status: Completed / With issues
- Summary: [1-2 sentences]
- Key findings: [List]
2. [Agent 名稱]
2. [Agent Name]
- ...
- ...
變更的檔案
Modified Files
| 檔案 | 動作 | 說明 |
|---|---|---|
| ... | 新增/修改/刪除 | ... |
| File | Action | Description |
|---|---|---|
| ... | Add/Modify/Delete | ... |
未解決的問題
Unresolved Issues
<!-- 如果有的話 -->
<!-- If any -->
建議下一步
Recommended Next Steps
- ...
- ...
undefined- ...
- ...
undefined