openspec-archive-change by arisng/github-copilot-fc
npx skills add https://github.com/arisng/github-copilot-fc --skill openspec-archive-change在实验性工作流中归档已完成的变更。
输入:可选指定变更名称。如果省略,检查是否可以从对话上下文中推断。如果模糊或歧义,则必须提示可用的变更。
步骤
运行 openspec list --json 获取可用变更。使用 AskUserQuestion 工具 让用户选择。
仅显示活跃变更(尚未归档的)。如果可用,包含每个变更使用的模式。
重要:不要猜测或自动选择变更。始终让用户选择。
运行 openspec status --change "<name>" --json 检查产物完成情况。
解析 JSON 以了解:
* `schemaName`:正在使用的工作流
* `artifacts`:产物列表及其状态(`done` 或其他)
如果任何产物未标记为 done:
* 显示警告,列出未完成的产物
* 使用 **AskUserQuestion 工具** 确认用户是否要继续
* 如果用户确认,则继续
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
3. 检查任务完成状态
读取任务文件(通常是 tasks.md)以检查未完成的任务。
统计标记为 - [ ](未完成)与 - [x](完成)的任务。
如果发现未完成的任务:
* 显示警告,展示未完成任务的数量
* 使用 **AskUserQuestion 工具** 确认用户是否要继续
* 如果用户确认,则继续
如果任务文件不存在: 继续执行,不显示任务相关警告。
检查 openspec/changes/<name>/specs/ 处是否存在增量规范。如果不存在,则继续执行,不显示同步提示。
如果存在增量规范:
* 将每个增量规范与 `openspec/specs/<capability>/spec.md` 处对应的主规范进行比较
* 确定将应用哪些更改(添加、修改、删除、重命名)
* 在提示前显示合并摘要
提示选项:
* 如果需要更改:"立即同步(推荐)"、"不同步直接归档"
* 如果已同步:"立即归档"、"仍然同步"、"取消"
如果用户选择同步,使用 Task 工具 (subagent_type: "general-purpose", prompt: "使用 Skill 工具调用 openspec-sync-specs 处理变更 ''。增量规范分析:")。无论选择如何,都继续执行归档。
如果归档目录不存在,则创建:
mkdir -p openspec/changes/archive
使用当前日期生成目标名称:YYYY-MM-DD-<change-name>
检查目标是否已存在:
* 如果存在:失败并报错,建议重命名现有归档或使用不同日期
* 如果不存在:将变更目录移动到归档目录
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
6. 显示摘要
显示归档完成摘要,包括:
* 变更名称
* 使用的模式
* 归档位置
* 规范是否已同步(如果适用)
* 关于任何警告的说明(未完成的产物/任务)
成功时输出
## 归档完成
**变更:** <change-name>
**模式:** <schema-name>
**归档至:** openspec/changes/archive/YYYY-MM-DD-<name>/
**规范:** ✓ 已同步到主规范(或"无增量规范"或"跳过同步")
所有产物已完成。所有任务已完成。
防护措施
每周安装数
1
仓库
GitHub 星标数
2
首次出现
1 天前
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Archive a completed change in the experimental workflow.
Input : Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Run openspec list --json to get available changes. Use the AskUserQuestion tool to let the user select.
Show only active changes (not already archived). Include the schema used for each change if available.
IMPORTANT : Do NOT guess or auto-select a change. Always let the user choose.
Run openspec status --change "<name>" --json to check artifact completion.
Parse the JSON to understand:
* `schemaName`: The workflow being used
* `artifacts`: List of artifacts with their status (`done` or other)
If any artifacts are notdone:
* Display warning listing incomplete artifacts
* Use **AskUserQuestion tool** to confirm user wants to proceed
* Proceed if user confirms
3. Check task completion status
Read the tasks file (typically tasks.md) to check for incomplete tasks.
Count tasks marked with - [ ] (incomplete) vs - [x] (complete).
If incomplete tasks found:
* Display warning showing count of incomplete tasks
* Use **AskUserQuestion tool** to confirm user wants to proceed
* Proceed if user confirms
If no tasks file exists: Proceed without task-related warning.
Check for delta specs at openspec/changes/<name>/specs/. If none exist, proceed without sync prompt.
If delta specs exist:
* Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
* Determine what changes would be applied (adds, modifications, removals, renames)
* Show a combined summary before prompting
Prompt options:
* If changes needed: "Sync now (recommended)", "Archive without syncing"
* If already synced: "Archive now", "Sync anyway", "Cancel"
If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change ''. Delta spec analysis: "). Proceed to archive regardless of choice.
Create the archive directory if it doesn't exist:
mkdir -p openspec/changes/archive
Generate target name using current date: YYYY-MM-DD-<change-name>
Check if target already exists:
* If yes: Fail with error, suggest renaming existing archive or using different date
* If no: Move the change directory to archive
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
6. Display summary
Show archive completion summary including:
* Change name
* Schema that was used
* Archive location
* Whether specs were synced (if applicable)
* Note about any warnings (incomplete artifacts/tasks)
Output On Success
## Archive Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
**Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
All artifacts complete. All tasks complete.
Guardrails
Weekly Installs
1
Repository
GitHub Stars
2
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装