一键导入
spok-archive
Archive a completed Spok change. Applies any delta specs to the main specs unconditionally, then moves the change directory under changes/archive/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Archive a completed Spok change. Applies any delta specs to the main specs unconditionally, then moves the change directory under changes/archive/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ship the next unchecked chunk from spok/changes/<name>/tasks.md end-to-end via the vendored spok-flow skill. Use when the user wants to implement the next chunk of a Spok change.
Commit Changes in CI with no user interaction
first step of planning
convert structure outline into a detailed implementation plan
generate research questions based on a task, spec, or ticket
research the codebase
| name | spok-archive |
| description | Archive a completed Spok change. Applies any delta specs to the main specs unconditionally, then moves the change directory under changes/archive/. |
| license | MIT |
| compatibility | Requires spok CLI. |
| metadata | {"author":"spok","version":"2.0","generatedBy":"1.3.1"} |
Archive a completed Spok change.
This skill folds spec-sync into archive: any delta specs the change carries are applied to the main specs before the change directory moves into the archive. There is no separate sync step.
Input: Optionally specify a change name. If omitted, infer from conversation context. If still ambiguous you MUST prompt the user.
Steps
Select the change
If a name is provided, use it. Otherwise:
spok list --json and use AskUserQuestion to let the user pick.Show only active changes (not already archived). Include the schema used for each change if available.
IMPORTANT: Do NOT guess or auto-select. Always let the user choose when ambiguous.
Check artifact completion status
spok status --change "<name>" --json
Parse the JSON to understand:
schemaName: The workflow being used.planningHome, changeRoot, artifactPaths, actionContext: path and scope context.artifacts: list of artifacts with their status (done or other).If status reports actionContext.mode: "workspace-planning", explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.
If any artifacts are not done:
Check chunk completion status
Read <changeRoot>/tasks.md and count top-level checkboxes:
- [ ] lines = incomplete chunks.- [x] lines = shipped chunks.If incomplete chunks found:
If tasks.md is missing: Proceed without a chunk-related warning.
Apply delta specs unconditionally
Use artifactPaths.specs.existingOutputPaths from the status JSON to find delta spec files.
If no delta specs exist: Skip to step 5.
If delta specs exist:
<changeRoot>/specs/<capability>/spec.md:
spok/specs/<capability>/spec.md.## ADDED Requirements — append new requirements.## MODIFIED Requirements — replace existing requirements whose ### Requirement: header text matches (whitespace-insensitive). MODIFIED blocks contain the full updated requirement; copy verbatim.## REMOVED Requirements — delete the matching requirement block. Keep a <!-- removed: <reason> --> comment if the delta supplied a Reason.## RENAMED Requirements — rename per FROM:/TO: pairs without changing scenarios.spok/specs/<capability>/spec.md (stripping the delta operation headers).Do NOT ask the user whether to sync. Sync is part of archive.
Perform the archive move
Create the archive directory if needed:
mkdir -p "<planningHome.changesDir>/archive"
Generate the target name from today's date: YYYY-MM-DD-<change-name>.
Check if the target exists already:
mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
Display summary
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** <planningHome.changesDir>/archive/YYYY-MM-DD-<name>/
**Specs:** <one of: "Synced N capability spec(s)", "No delta specs">
If any warnings were acknowledged in steps 2–3, append a Warnings section listing them.
Guardrails
spok status --json) for completion checking..spok.yaml when moving (it moves with the directory).