一键导入
spectra-discuss
Have a focused discussion about a topic and reach a conclusion
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Have a focused discussion about a topic and reach a conclusion
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when 使用者說「自動推」「loop」「幫我把 change 推到 ready」「不在的時候繼續做」、或 routine fire 自動觸發(--unattended)。適用於推進既有 spectra change;NOT for 非 spectra 工作、一次性任務、interval 盲跑命令(用 /loop)、user 在場想逐項拍板(用 /goal)、或想設計新 loop(看 vendor/snippets/loop-engineering cookbook)。
依功能分類變更並逐步完成 commit,遵循 commitlint 規範。Use when 使用者說「commit」「提交」「分批 commit」,或 working tree 有多組 unrelated 變更需要分門別類提交。
Deprecated alias — 已改名 /change-loop(2026-07-05)。Use when 既有 routine 或舊指令仍呼叫 /loop-engineer 時轉發。
Analyze artifact consistency for a change
Implement or resume tasks from a Spectra change
Archive a completed change
| name | spectra-discuss |
| description | Have a focused discussion about a topic and reach a conclusion |
| effort | medium |
| disallowedTools | ["Edit","Write"] |
| license | MIT |
| compatibility | Requires spectra CLI. |
| metadata | {"author":"spectra","version":"1.0","generatedBy":"Spectra"} |
Have a focused discussion about a topic and reach a conclusion.
IMPORTANT: Discuss mode is for thinking, not implementing. You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit discuss mode first (e.g., start a change with /spectra-propose). You MAY create Spectra artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
This is a task-oriented discussion. Every discussion has a topic, works toward a goal, and ends with a clear conclusion. Unlike open-ended exploration, discuss mode converges.
Input: The argument after /spectra-discuss is the topic. Could be:
Before asking anything, load the shared vocabulary, then do a quick codebase scout to decide how to run this discussion.
Try to read openspec/LANGUAGE.md. This file is the project's canonical vocabulary — terms with definition, avoid, and why notes, plus principles for when legacy terminology may remain.
avoid synonym in the user's topic or in the artifacts you read, plan to surface that as vocabulary drift in the conclusion.This step runs before the codebase scout, the assumptions list, the interview questions, and the conclusion capture.
Pull 2-5 keywords from the user's topic. For "search should support fuzzy matching", that's search, fuzzy, match. For "should we add a plugin system", that's plugin, extension, module.
Use Grep and Glob to find related source files (not docs, not tests — source code). Spend no more than a few seconds on this. Read up to 5 of the most relevant files found.
Announce which mode you picked and why: "Found search.rs, SearchPanel.svelte, search-store.ts — I have enough context to list my assumptions." or "Didn't find much related code — I'll ask questions instead."
When you enter assumptions mode, present 3-5 assumptions. Each one MUST include:
Example:
### My assumptions
1. **New IPC command goes in `commands/search.rs`**
Evidence: existing search commands are in `src-tauri/src/commands/search.rs`
If wrong: we'd need to create a new module and register it
2. **Use the existing `SearchStore` for state**
Evidence: `src/lib/stores/search-store.ts` already manages search state
If wrong: parallel state would cause sync bugs
3. **Fuzzy matching runs in Rust, not frontend**
Evidence: current search scoring is in `search.rs:calculate_score()`
If wrong: moving to frontend means rewriting the scoring logic in TypeScript
After presenting, ask: "Which of these are wrong?"
The user can switch modes at any time during the discussion:
After the codebase scout, evaluate whether the topic introduces a new architectural seam. Run this check only when the topic involves at least one of:
src-tauri/src/commands/, or a new top-level Svelte module).#[tauri::command] exposed to the frontend, or a new front-to-back message shape).If none of those conditions apply, skip this check. Topics that only change static UI copy, visual styling, documentation wording, or other non-architectural surfaces SHALL skip the depth check entirely. The vocabulary load from Step 0 still happens; nothing else from this step runs.
When the check is triggered, work through these four questions before you finalize assumptions or interview answers:
Surface the answers in the conclusion (or the assumptions list, if you are in assumptions mode) so the depth question is part of the captured decision, not an internal note.
This section applies to interview mode — either chosen automatically (insufficient code context) or switched to manually by the user.
One question at a time. Don't dump a list of 10 questions. Ask the most important one, listen, then follow up. Let the conversation breathe. If the user's initial description or previous answers already cover a question, skip it — don't ask what you already know.
Propose concrete options. When exploring approaches, present 2-3 specific options with trade-offs — not abstract possibilities. Use comparison tables when helpful:
| Approach | Pros | Cons |
|---------------|-------------------|-------------------|
| WebSockets | Real-time, bidir | Complex, stateful |
| SSE | Simple, HTTP | One-way only |
| Polling | Simplest | Latency, waste |
Ground in reality. Investigate the actual codebase when relevant. Map existing architecture, find integration points, surface hidden complexity. Don't just theorize.
Visualize freely. Use ASCII diagrams when they clarify thinking:
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Client │────▶│ Server │────▶│ DB │
└──────────┘ └──────────┘ └──────────┘
System diagrams, state machines, data flows, dependency graphs — whatever helps.
Challenge assumptions. Including the user's and your own. Ask "do we actually need this?" Apply YAGNI — the simplest solution that works is often the best.
Be direct. If you have a recommendation, say it. Don't hedge endlessly. "I'd go with option B because..." is more useful than "all options have merit."
No empty validation. Never pad responses with hollow affirmations. These add nothing and erode trust:
If you agree, say why. If you disagree, say why. Empty agreement is worse than honest pushback.
Push for specifics. When the user gives a vague answer, don't accept it — dig deeper. The goal is to reach decisions concrete enough to implement.
Bad vs. good:
User: "We should make it more modular"
Bad: "That sounds good. How would you like to proceed?"
Good: "What would you split out? Are we talking separate crates,
feature flags, or a plugin interface? Each has very different
cost."
User: "Performance might be an issue"
Bad: "Good point, we should keep performance in mind."
Good: "What's the threshold? Are we talking sub-100ms response time,
handling 1000 concurrent users, or keeping memory under a
budget? The answer changes the architecture."
User: "We need better error handling"
Bad: "Agreed, error handling is important."
Good: "Which errors are causing problems now? Are users seeing
crashes, silent failures, or unhelpful messages? Let's look
at the actual error paths."
Before convergence, MUST pause for a plain-language synthesis when the discussion's stakes extend beyond pure-technical detail. Surface misalignment in user-domain language before fixing it in artifact-domain language.
Run synthesis when any of:
Skip synthesis when the topic is purely technical (variable rename, internal helper refactor, dev-only script, lint config).
A schema-aware assumptions list (Step 3 output) is enough for engineers, but breaks down for:
Without a plain-language layer, propose may capture the surface motivation (e.g. "add 'part' enum value") and miss the real one underneath (e.g. "I need a two-layer inventory model + restock mutation"). Apply then catches the mismatch and burns ingest cycles.
現況(為什麼這件事存在) — describe status quo using everyday metaphors:
你要的兩件事的差異(layered intent table) — when discussion uncovers layered intent (visibility vs management; admin vs user; read vs write; current vs future scope), make it a table:
| 層次 | 描述 | 誰負責 |
|---|---|---|
| (e.g.) 看得到 | 倉儲頁能列出總量 | 既有 change |
| (e.g.) 管得到 | 倉儲頁能直接補貨 | 新 change |
建議做法(N 條,全非技術) — numbered list, each:
Example diagram (everyday vocabulary):
採購進來 倉庫存量 販賣機存量 員工領用
┌────────┐ → ┌────────┐ → ┌─────────┐ →
│ N 支 │ │ A 支 │ │ B 支 │
└────────┘ └────────┘ └─────────┘
範圍邊界(做 vs 不做) — table:
| 做 | 不做(未來另開) |
|---|---|
| (concrete action) | (concrete action with rationale) |
Close with one focused request_user_input — the single highest-leverage undecided question, with concrete options. NEVER dump all open questions at once. Synthesis is meant to surface the critical drill, not exhaust all open items.
Topic: "add 'part' to warehouse_items.item_category enum + integrate vending tool aggregation".
warehouse_items / tool_bodies / vending_slot_inventory採購 → 倉庫 → 販賣機 → 員工 made the four-stage flow visceral in 5 secondsOutcome: real motivation surfaced — user wanted two-layer inventory model + restock mutation, not cosmetic enum addition. Scope went from "30-min cosmetic" to "architectural addition" before propose started. Without synthesis, propose would have captured surface intent and apply would have hit "wait, that's not what I meant" mid-flow, burning ingest cycles.
Discussions must converge. As the conversation progresses:
The conclusion should be one of:
Example elicitation: When the discussion converges on a specific requirement or behavior, propose a concrete example before capturing the decision. Instead of concluding "search should sort by relevance", propose: "So if we have items scored 0.9, 0.3, 0.7, the result order would be 0.9, 0.7, 0.3 — is that right?" This naturally produces ##### Example: content for the spec and confirms shared understanding with real values.
If the user wants to move faster. Sometimes the user signals impatience — "let's just go with X", "I don't want to overthink this", "can we move on?". Respect their pace:
The goal is thoroughness, not interrogation. One nudge maximum.
You have full context of the Spectra system. Use it naturally.
At the start, quickly check what exists:
spectra list --json
If the user mentioned a specific change name, read its artifacts for context.
When the discussion converges, proactively present a conclusion summary. Don't wait to be asked — propose it, and let the user opt out.
Summary format:
## Conclusion
**Decision**: [What was decided]
**Rationale**: [Why — the key trade-off that drove this]
**Capture to**: [Where this should be recorded]
Where to capture:
| Insight Type | Where to Capture |
|---|---|
| New requirement discovered | specs/<capability>/spec.md |
| Design decision made | design.md |
| Scope changed | proposal.md |
| New work identified | tasks.md |
| Vocabulary drift | openspec/LANGUAGE.md |
Vocabulary drift means the discussion surfaced a recurring concept that is missing, ambiguous, or pulling away from the shared vocabulary loaded in Step 0. Examples: the topic uses a term that the vocabulary lists as an avoid synonym, or the discussion repeatedly names a concept that has no entry yet. When this happens, name it as vocabulary drift in the conclusion summary and direct the capture to openspec/LANGUAGE.md. The conclusion summary SHALL preserve this contract — do not silently rewrite the term in the artifacts without recording the drift.
Present the summary and say something like "I'll capture this to design.md unless you'd rather not." Default to capturing — the user can decline.
When the discussion converges on building something, MUST ask via request_user_input who runs propose before invoking anything:
| Option | 行為 | 適用場景 |
|---|---|---|
| A. Codex(GPT-5.5 xhigh) | 主線 Claude 自己派 Codex 在背景跑(不要使用者切 CLI) | propose 牽涉高度抽象決策、想要更高思考預算、或想用另一個模型獨立審視 |
| B. AI Agent 繼續做 | 當前 session 直接接 /spectra-propose 走 Step 1-11 | discuss 上下文已成熟、想保持單一 session 連續性 |
| Stay | 不進 propose,繼續 capture 到既有 artifacts | 結論還沒到「值得開 change」的程度,先存進 design.md / spec.md |
統一處理:選 A 或 B 都 invoke /spectra-propose <change-name>,並在呼叫前的訊息明示使用者選擇,讓 spectra-propose Step 0 統一分流——discuss 自己不派 codex、不印 handoff 純文字訊息。
▶ 使用者在 discuss 選擇 A(Codex GPT-5.5 xhigh)— 接下來由 spectra-propose Step 0 派 Codex 在背景執行 → 接著 invoke /spectra-propose <change-name>▶ 使用者在 discuss 選擇 B(AI Agent 繼續)— spectra-propose Step 0 會 skip 詢問,直接走 Step 1 → 接著 invoke /spectra-propose <change-name>禁止事項:
/spectra-propose 讓 Step 0 統一處理If request_user_input is unavailable, present the same three options as plain text and wait for the user's reply.