一键导入
spectra-ingest
Update an existing Spectra change from external context
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update an existing Spectra change from external context
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Kim 黃晨皓的思維框架與決策方式。基於一手課程素材(墾丁特訓班、使用說明書), 提煉5個核心心智模型、7條決策啟發式和完整的表達DNA。 用途:作為思維顧問,用 Kim 的視角分析問題、拆解結構、審視決策。 觸發詞:「阿金視角」「Kim 會怎麼看」「Kim 會怎麼做」「阿金會怎麼做」「阿金模式」「kim perspective」「用阿金的方式」「用 Kim 的方式」「這件事 Kim」「這件事阿金」。 適用:結構拆解、創業決策分析、積木思維練習、BWPA 風險分析、溝通意圖分析。 不觸發:純技術問題、單純情感支持、法律財務專業建議。
Create a change proposal with all required artifacts
BuyGo 五階段自動化 debug
WordPress 外掛一鍵部署
設計哲學核對、思維模型討論、設計洞察捕獲
建立或升級 Skill / Agent / Hook 時使用。走世代 3 完整流程:GATE 確認方向 → 分類 → 訪談 → 產出結構 → 品質檢查。用戶說「建 Skill」、「做 Agent」、「加 Hook」、「升級這個 Skill」等都應觸發。
| name | spectra-ingest |
| description | Update an existing Spectra change from external context |
| effort | high |
| license | MIT |
| compatibility | Requires spectra CLI. |
| metadata | {"author":"spectra","version":"1.0","generatedBy":"Spectra"} |
Update an existing Spectra change — from a plan file or conversation context.
Plan file support is available when the tool has a plan directory (~/.claude/plans/). Otherwise, use conversation context to update artifacts.
Prerequisites: This skill requires the spectra CLI. If any spectra command fails with "command not found" or similar, report the error and STOP.
Input: Optionally specify a plan file path or name.
/spectra-ingest ~/.claude/plans/agile-discovering-rocket.md/spectra-ingest agile-discovering-rocket/spectra-ingest (use conversation context or auto-detect plan file)Steps
Config 前置檢查(Project Setup Gate) ⚠️ 強制,不可跳過
同
/spectra-proposeStep 0:確認openspec/config.yaml有實質內容,避免 AI 沒有專案背景知識。 ingest 場景下 config 通常已存在,這步主要檢查 rules 是否完整、context 是否過時。
a. 讀 openspec/config.yaml:
context: 空/僅註解 → 判定「空」,同上處理rules: 空 → 套用預設 rules 模板,不問用戶b. 回報狀態:顯示「✓ config.yaml 已就緒」或「✓ 已補齊 config.yaml」
Locate the requirement source
a. Argument provided → treat as plan file reference (prepend ~/.claude/plans/ and append .md if needed)
b. No argument, plan file detectable:
~/.claude/plans/<name>.md)c. No argument, no plan file detectable:
~/.claude/plans/ for recent filesd. Conversation context fallback (no plan files found at all):
Parse the plan structure (skip if using conversation context)
Claude Code plan files typically contain:
# ...) — the high-level goalExtract:
plan_title: from the H1 headingplan_context: from the Context sectionplan_stages: each numbered stage with its goal and file listplan_files: all file paths mentionedplan_verification: verification stepsCheck for active changes (REQUIRED — ingest only updates existing changes)
spectra list --json
Also check for parked changes:
spectra list --parked --json
Parse both JSON outputs to get the full list of changes (active + parked). Parked changes should be annotated with "(parked)" in any selection list.
/spectra-propose first to create one." and stopSelect the change
After selecting the change, check if it is parked:
spectra list --parked --json
If the selected change appears in the parked array:
spectra unpark "<name>" then proceedIf there is no AskUserQuestion tool available (non-Claude-Code environment):
Inform the user that this change is currently parked(暫存)and ask via plain text whether to unpark and continue, or cancel.
Wait for the user's response. If the user confirms, run spectra unpark "<name>" then proceed.
Read existing artifacts for context before updating.
Update artifacts
For each artifact, get instructions first:
spectra instructions <artifact-id> --change "<name>" --json
Use the template from instructions as the output structure. Apply context and rules as constraints but do NOT copy them into the file.
The instructions JSON includes locale — the language to write artifacts in. If present, you MUST write the artifact content in that language. Exception: spec files (specs/*/*.md) MUST always be written in English regardless of locale, because they use normative language (SHALL/MUST).
Plan-to-Artifact Mapping (when using a plan file):
| Plan Section | Artifact | How to Map |
|---|---|---|
| Title | Change name | Convert to kebab-case |
| Context | proposal: Why | Direct content transfer |
| Stages overview | proposal: What | Summarize all stages |
| Individual stages | tasks.md groups | One stage = one ## heading, sub-items = - [ ] |
| File paths | proposal: Impact | Affected code list |
| Verification steps | tasks.md | Final verification task group |
Context-to-Artifact Mapping (when using conversation context):
| Conversation Element | Artifact | How to Map |
|---|---|---|
| Goal / requirement | proposal: Why | Extract motivation from discussion |
| Discussed approach | proposal: What | Summarize agreed approach |
| Mentioned files | proposal: Impact | Affected code list |
| Discussion phases | tasks.md groups | One topic = one ## heading |
When updating an existing change:
[x] items[P] markers on tasks that still qualifyParallel task markers ([P]): When creating or updating the tasks artifact, first read .spectra.yaml. If parallel_tasks: true is set, add [P] markers to new tasks that can be executed in parallel. Format: - [ ] [P] Task description. A task qualifies for [P] if it targets different files from other pending tasks AND has no dependency on incomplete tasks in the same group. When parallel_tasks is not enabled, do NOT add [P] markers — but still preserve any existing [P] markers already in the file.
After creating each artifact, re-check status:
spectra status --change "<name>" --json
Continue until all applyRequires artifacts are complete. Show progress: "✓ Created "
Inline Self-Review (before CLI analysis)
After updating all artifacts, scan them manually. Fix issues inline, then proceed to the CLI analyzer.
Check 1: No Placeholders
These patterns are artifact failures — fix each one before proceeding:
Check 2: Internal Consistency
Check 3: Scope Check
Check 4: Ambiguity Check
Check 5: Preservation Check (ingest-specific)
[x] still present and unchanged?[P] markers preserved on tasks that still qualify?| What You're Thinking | What You Should Do |
|---|---|
| "The existing artifacts are close enough, just adjust the tasks" | Read the new context carefully. "Close enough" means you're missing something |
| "The proposal doesn't need updating, the change is the same" | If new context exists, the proposal likely needs updates. At minimum, check |
| "I can merge these tasks, they're basically the same" | Keep tasks granular. Merged tasks are harder to track |
| "The completed tasks still apply, no need to review" | Verify they're still relevant to updated scope. Don't blindly keep stale work |
| "This spec change is minor, skip the scenario update" | If the requirement changed, the scenario must change |
| "The conversation didn't discuss this artifact, so skip it" | Absence of discussion doesn't mean absence of impact. Check |
Analyze-Fix Loop — 四大面向全零(Four-Dimension Zero Gate) ⚠️ 強制,不可跳過
目的:Spectra GUI 四個徽章(Coverage / Consistency / Ambiguity / Gaps)必須全零才算過關。 處理原則:最多 3 輪自動修正,修不完不能靜默放行。
spectra analyze <name> --jsonfinding_count:
spectra analyze <name> --json
d. 四大全零 → 停,進入 Step 8
e. 尚有警告且未達 3 輪 → 繼續下一輪Validation
spectra validate "<name>"
If validation fails, fix errors and re-validate.
Summary and next steps
Show:
<path>) or conversation contextUse AskUserQuestion tool to confirm the workflow is complete. This ensures the workflow stops even when auto-accept is enabled. Provide exactly these options:
/spectra-apply <change-name> when ready./spectra-apply <change-name> to start implementation.If AskUserQuestion tool is not available, display the summary and inform the user to run /spectra-apply <change-name> when ready. Then STOP — do not continue.
After the user responds, if they chose "Done", the workflow is OVER. If they chose "Apply", invoke /spectra-apply <change-name> to begin implementation.
Guardrails
~/.claude/plans//spectra-propose[x]) — never revert progressspectra CLI is not available, report the error and stop