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
    python -m py_compile
    ),快速檢查 build 是否正常
  • 只在偵測到明確的 build 設定時才執行
  • If there are relevant commands (
    npm run build
    go build
    python -m py_compile
    ), quickly check if the build works normally
  • 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-resolverbuild 失敗
e2e-runnerE2E 測試
refactor-cleaner重構、清理 dead code
doc-updater文件更新
go-reviewerGo 專案專用
go-build-resolverGo build 錯誤
python-reviewerPython 專案專用
database-reviewer資料庫相關
harness-optimizeragent harness 設定優化(hooks/evals/routing)
loop-operator自主迴圈運行與監控
Quickly scan available agents, skills, commands:
Available Agents (filtered by project type):
AgentApplicable Scenario
plannerComplex tasks requiring planning
architectArchitecture design decisions
tdd-guideNew features, bug fixes
code-reviewerCode quality review
security-reviewerSecurity analysis
build-error-resolverBuild failure
e2e-runnerE2E testing
refactor-cleanerRefactoring, dead code cleanup
doc-updaterDocumentation update
go-reviewerExclusive for Go projects
go-build-resolverGo build errors
python-reviewerExclusive for Python projects
database-reviewerDatabase related tasks
harness-optimizerAgent harness configuration optimization (hooks/evals/routing)
loop-operatorAutonomous 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-reviewerbug 修復流程
有未 commit 變更需 reviewcode-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-optimizerhooks/evals/routing 設定調優
需要執行自主迴圈任務loop-operator長時間 autonomous loop 監控
不確定 / 多種可能列出建議 pipeline,讓使用者選擇透過 AskUserQuestion 互動
Detected ScenarioSelected PipelineDescription
Clear new feature requirementplanner (including industry/academic solution research) -> architect -> tdd-guide -> code-reviewerComplete feature development process; planner must attach industry standards or academic support for technical solutions
Bug description or error message existsplanner -> tdd-guide -> code-reviewerBug fix process
Uncommitted changes need reviewcode-reviewer -> security-reviewerQuick quality review
Build failurebuild-error-resolverDirectly fix build issues
Refactoring required (explicitly requested by user or code smell detected)architect -> refactor-cleaner -> code-reviewerSecure refactoring process
Documentation writing requireddoc-updater -> code-reviewerDocumentation update process
Go projectAdd go-reviewer to the pipelineAutomatically append language-specific reviewer
Python projectAdd python-reviewer to the pipelineAutomatically append language-specific reviewer
Involves database schema or queryAdd database-reviewer to the pipelineAutomatically append database reviewer
Need to optimize agent harness configurationharness-optimizerHooks/evals/routing configuration tuning
Need to run autonomous loop tasksloop-operatorLong-term autonomous loop monitoring
Uncertain / multiple possibilitiesList recommended pipelines for user selectionInteract via AskUserQuestion

路由判斷邏輯

Routing Judgment Logic

  1. 優先使用
    $ARGUMENTS
    :如果使用者有明確指令,以指令為準
  2. 其次分析 git 狀態:未 commit 變更 → review pipeline;build 失敗 → build-fix pipeline
  3. 再看對話脈絡:從對話中推斷使用者的意圖
  4. 無法判斷時詢問:使用 AskUserQuestion 提供 2-4 個建議選項
  1. Prioritize
    $ARGUMENTS
    : If the user has clear instructions, follow the instructions first
  2. Then analyze Git status: Uncommitted changes → review pipeline; build failure → build-fix pipeline
  3. Then check conversation context: Infer user intent from conversation history
  4. Ask when unable to judge: Provide 2-4 suggested options using AskUserQuestion

多情境衝突處理

Multi-scenario Conflict Handling

當同時偵測到多個情境時,依以下優先順序決定先處理哪個:
  1. Build 失敗 — 必須先修復,否則其他工作無法驗證
  2. 安全問題 — 不能延後
  3. 使用者明確指令($ARGUMENTS)— 使用者意圖優先
  4. Bug 修復 — 修復比新功能重要
  5. 新功能開發 — 標準優先級
  6. 重構/清理 — 較低優先級
  7. 文件更新 — 可延後或與其他工作並行
若偵測到的情境與
$ARGUMENTS
衝突(例如使用者要 review 但 build 失敗),先說明偵測結果,詢問使用者是否仍要繼續原指令。
When multiple scenarios are detected at the same time, decide the processing order according to the following priority:
  1. Build failure — Must be fixed first, otherwise other work cannot be verified
  2. Security issues — Cannot be postponed
  3. Explicit user instructions ($ARGUMENTS) — User intent takes priority
  4. Bug fix — Fixes are more important than new features
  5. New feature development — Standard priority
  6. Refactoring/cleanup — Lower priority
  7. Documentation update — Can be postponed or executed in parallel with other work
If the detected scenario conflicts with
$ARGUMENTS
(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.

不確定時的互動

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
undefined
After each agent completes, organize handover information and pass it to the next agent:
markdown
undefined

HANDOFF: [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
undefined
After 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

檔案動作說明
...新增/修改/刪除...
FileActionDescription
...Add/Modify/Delete...

未解決的問題

Unresolved Issues

<!-- 如果有的話 -->
<!-- If any -->

建議下一步

Recommended Next Steps

  • ...
  • ...
undefined
  • ...
  • ...
undefined