一键导入
archive-milestone
Archive a completed milestone by generating a snapshot summary, folding the roadmap stage, and removing the stale tasks directory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Archive a completed milestone by generating a snapshot summary, folding the roadmap stage, and removing the stale tasks directory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Store, look up, or delete a personal credential (server SSH password, database password, website login, API key/token, certificate passphrase) in the macOS Keychain using a consistent <project>-<env>-<kind> naming scheme, and optionally record a pointer (never the secret itself) in the current project's Claude Code memory. Always use this skill whenever the user asks to save, store, remember, look up, rotate, or delete a password, API key, token, SSH credential, or database credential on this machine — even if they don't say "Keychain" or "security" explicitly, e.g. "save this database password so I don't lose it", "把这个数据库密码存一下", "记一条密钥", "这台服务器的密码帮我记下来", "what's the postgres password for staging again", "delete the old GitHub token from keychain". Do not use this for team-shared secret vaults, CI/CD secret injection, or anything that needs to sync across machines — those need a real secrets manager, not this skill.
Drain pending NATS messages from a producer contract via NATS MCP tools. Discovers the available NATS tool capabilities, selects exact-subject or wildcard mode from .cortex/nats.yaml, applies Tolerant Reader semantics, executes ack/nak/term decisions, and returns aggregated stats.
Audit and refactor existing SKILLs to meet spec compliance, repository asset boundaries, tool adaptation requirements, and LLM best practices.
From inside a linked worktree, deliver the current feature branch into main — merge with --no-ff, push, and optionally clean up the worktree, all without leaving CWD.
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
From the main repo on the main branch, scan all linked worktrees and local branches, let the user multi-select, then merge --no-ff + push them sequentially and clean up succeeded worktrees together.
| name | archive-milestone |
| description | Archive a completed milestone by generating a snapshot summary, folding the roadmap stage, and removing the stale tasks directory. |
| description_zh | 将已完成里程碑转为快照摘要,折叠路线图历史阶段,移除历史任务目录,减少 AI 上下文污染。 |
| tags | ["governance","lifecycle","archive","milestone"] |
| version | 1.1.0 |
| license | MIT |
| recommended_scope | project |
| metadata | {"author":"ai-cortex","triggers_after":["plan-next"]} |
| triggers | ["archive milestone","completed milestone cleanup","milestone summary"] |
| input_schema | {"type":"structured","fields":{"milestone_slug":{"type":"string","required":true,"description":"里程碑目录名(如 \"m3\")"},"apply":{"type":"bool","required":false,"default":false,"description":"false = dry-run(仅预览),true = 落盘执行"}},"defaults":{"apply":false}} |
| output_schema | {"type":"document-artifact","description":"Milestone snapshot summary + roadmap fold preview + reference update list","artifact_type":"milestone-summary","path_pattern":"docs/process-management/milestones/_archive/{slug}-summary.md","lifecycle":"snapshot"} |
将已完成里程碑的历史执行细节从活跃路径移出,生成精简快照摘要,防止历史文档持续污染 AI 对当前项目状态的判断。
首要目标:为已完成里程碑生成快照摘要,折叠路线图历史段落,并将原始任务目录移至 _archive/。
成功标准(apply=true 时必须全部满足):
milestones/_archive/{slug}-summary.md 生成快照摘要roadmap.md 中对应阶段已折叠为 ≤ 3 行引用milestones/{slug}/ 目录已移除(内容已在摘要中保留关键信息)验收测试:执行后,AI 读取 milestones/_archive/m3-summary.md 能准确理解 m3 的关键结果,不需要读取原始 tasks.md。
满足以下任意一条即可归档;全部不满足则技能拒绝执行并说明原因:
| 条件 | 判定依据 |
|---|---|
| 距完成日期 ≥ 60 天 | tasks.md frontmatter 中 completed_at 字段 |
| 当前进行中里程碑索引 ≥ slug + 2 | roadmap.md 中 in-progress 里程碑的数字后缀 |
两个条件均需同时满足"全部任务 status=done 或 ✅"。
未达成熟度时输出诊断:里程碑 {slug} 尚不满足归档条件:{具体原因}。
读取 milestones/{slug}/tasks.md,验证成熟度条件。不满足任一条件则停止。
从 tasks.md 提取:
completed_at 或最后任务完成日期status=done 的任务,按验收凭据分组,提炼为 ≤ 5 条检测:
roadmap.md 中需折叠的阶段段落milestones/{slug}/tasks.md 的文件dry-run(apply=false,默认):
输出预览报告,不修改任何文件:
=== dry-run 预览 ===
将生成:
docs/process-management/milestones/_archive/{slug}-summary.md
(摘要草稿如下)
将修改:
roadmap.md 第 N-M 行折叠为:
### {阶段名}(已完成 {日期})→ 详见 [milestones/_archive/{slug}-summary.md]
将删除:
docs/process-management/milestones/{slug}/({N} 个文件)
引用更新({K} 处):
{文件路径}:{行号} → 旧路径 → 新摘要路径
=== 无文件已修改 ===
apply=true:
按预览执行全部操作,最后输出操作日志。
执行前:
执行后(apply=true):
_archive/{slug}-summary.md 存在且内容完整milestones/{slug}/tasks.md 无结果milestones/{slug}/ 目录不存在输入:
docs/process-management/milestones/m3/ 含完成 60 天的 tasks.md(全部 status=completed)roadmap.md M3 阶段标记 ✅执行(dry-run 默认):
milestones/_archive/m3-summary.md:完成日、5 条关键交付物、关键 ADR 引用milestones/m3/ 将删除Apply 后:roadmap.md M3 段折叠完成、milestones/_archive/m3-summary.md 生成、milestones/m3/ 移除。
输入:M5 完成日仅 14 天,M6 尚未启动。
执行:
结果:保留 M5 现状;用户可在条件满足后重新运行。