@flyin-ai/alloy 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +151 -0
  2. package/commands/alloy/apply.md +485 -0
  3. package/commands/alloy/archive.md +170 -0
  4. package/commands/alloy/discard.md +80 -0
  5. package/commands/alloy/finish.md +204 -0
  6. package/commands/alloy/fix.md +149 -0
  7. package/commands/alloy/plan.md +360 -0
  8. package/commands/alloy/start.md +314 -0
  9. package/commands/alloy/status.md +79 -0
  10. package/compat.yaml +10 -0
  11. package/dist/cli/commands/completion.d.ts +1 -0
  12. package/dist/cli/commands/completion.js +155 -0
  13. package/dist/cli/commands/completion.js.map +1 -0
  14. package/dist/cli/commands/doctor.d.ts +7 -0
  15. package/dist/cli/commands/doctor.js +93 -0
  16. package/dist/cli/commands/doctor.js.map +1 -0
  17. package/dist/cli/commands/init.d.ts +6 -0
  18. package/dist/cli/commands/init.js +168 -0
  19. package/dist/cli/commands/init.js.map +1 -0
  20. package/dist/cli/commands/internal/archive.d.ts +1 -0
  21. package/dist/cli/commands/internal/archive.js +91 -0
  22. package/dist/cli/commands/internal/archive.js.map +1 -0
  23. package/dist/cli/commands/internal/guard.d.ts +1 -0
  24. package/dist/cli/commands/internal/guard.js +135 -0
  25. package/dist/cli/commands/internal/guard.js.map +1 -0
  26. package/dist/cli/commands/internal/record.d.ts +1 -0
  27. package/dist/cli/commands/internal/record.js +144 -0
  28. package/dist/cli/commands/internal/record.js.map +1 -0
  29. package/dist/cli/commands/internal/state.d.ts +1 -0
  30. package/dist/cli/commands/internal/state.js +99 -0
  31. package/dist/cli/commands/internal/state.js.map +1 -0
  32. package/dist/cli/commands/status.d.ts +1 -0
  33. package/dist/cli/commands/status.js +112 -0
  34. package/dist/cli/commands/status.js.map +1 -0
  35. package/dist/cli/commands/update.d.ts +1 -0
  36. package/dist/cli/commands/update.js +162 -0
  37. package/dist/cli/commands/update.js.map +1 -0
  38. package/dist/cli/index.d.ts +2 -0
  39. package/dist/cli/index.js +291 -0
  40. package/dist/cli/index.js.map +1 -0
  41. package/dist/cli/utils/state.d.ts +6 -0
  42. package/dist/cli/utils/state.js +64 -0
  43. package/dist/cli/utils/state.js.map +1 -0
  44. package/dist/core/agents.d.ts +8 -0
  45. package/dist/core/agents.js +85 -0
  46. package/dist/core/agents.js.map +1 -0
  47. package/dist/core/claude-md.d.ts +4 -0
  48. package/dist/core/claude-md.js +47 -0
  49. package/dist/core/claude-md.js.map +1 -0
  50. package/dist/core/compat.d.ts +2 -0
  51. package/dist/core/compat.js +8 -0
  52. package/dist/core/compat.js.map +1 -0
  53. package/dist/core/detect.d.ts +2 -0
  54. package/dist/core/detect.js +22 -0
  55. package/dist/core/detect.js.map +1 -0
  56. package/dist/core/health.d.ts +22 -0
  57. package/dist/core/health.js +283 -0
  58. package/dist/core/health.js.map +1 -0
  59. package/dist/core/openspec.d.ts +2 -0
  60. package/dist/core/openspec.js +79 -0
  61. package/dist/core/openspec.js.map +1 -0
  62. package/dist/core/skills.d.ts +3 -0
  63. package/dist/core/skills.js +68 -0
  64. package/dist/core/skills.js.map +1 -0
  65. package/dist/core/superpowers.d.ts +1 -0
  66. package/dist/core/superpowers.js +31 -0
  67. package/dist/core/superpowers.js.map +1 -0
  68. package/dist/core/types.d.ts +76 -0
  69. package/dist/core/types.js +2 -0
  70. package/dist/core/types.js.map +1 -0
  71. package/dist/utils/fs.d.ts +1 -0
  72. package/dist/utils/fs.js +7 -0
  73. package/dist/utils/fs.js.map +1 -0
  74. package/dist/utils/prompt.d.ts +10 -0
  75. package/dist/utils/prompt.js +90 -0
  76. package/dist/utils/prompt.js.map +1 -0
  77. package/openspec/schemas/alloy/instructions/design.md +46 -0
  78. package/openspec/schemas/alloy/instructions/draft.md +39 -0
  79. package/openspec/schemas/alloy/instructions/plans.md +59 -0
  80. package/openspec/schemas/alloy/instructions/proposal.md +34 -0
  81. package/openspec/schemas/alloy/instructions/retrospective.md +157 -0
  82. package/openspec/schemas/alloy/instructions/specs.md +53 -0
  83. package/openspec/schemas/alloy/instructions/tasks.md +40 -0
  84. package/openspec/schemas/alloy/instructions/verify.md +90 -0
  85. package/openspec/schemas/alloy/schema.yaml +100 -0
  86. package/openspec/schemas/alloy/templates/design.md +15 -0
  87. package/openspec/schemas/alloy/templates/draft.md +17 -0
  88. package/openspec/schemas/alloy/templates/plans.md +28 -0
  89. package/openspec/schemas/alloy/templates/proposal.md +22 -0
  90. package/openspec/schemas/alloy/templates/retrospective.md +163 -0
  91. package/openspec/schemas/alloy/templates/specs.md +54 -0
  92. package/openspec/schemas/alloy/templates/tasks.md +8 -0
  93. package/openspec/schemas/alloy/templates/verify.md +55 -0
  94. package/package.json +43 -0
@@ -0,0 +1,90 @@
1
+ # verify 制品指令
2
+
3
+ **定位:** apply 阶段 step 4 产出。实现完成后的结构化验证——不依赖 LLM 自觉,通过具体命令逐项确认。
4
+ 与其他制品不同,verify.md 在 apply 阶段实现完成后产出,不在规划期生成。
5
+
6
+ 产出: `verify.md`
7
+ 依赖: plan.md 完成 + 代码已提交 + tasks.md checkbox 全部勾选
8
+
9
+ ## PRECHECK(shell 命令,非 LLM 判断)
10
+
11
+ 两条命令都返回 >0 才进入验证。若任一为 0,STOP 并告知用户 apply 阶段尚未产出可审查的变更:
12
+
13
+ 1. 提交证据:
14
+ ```
15
+ git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null)..HEAD | wc -l
16
+ ```
17
+
18
+ 2. 任务进度:
19
+ ```
20
+ grep -c '^- \[x\]' openspec/changes/<change-name>/tasks.md
21
+ ```
22
+
23
+ ## 技能调用
24
+
25
+ 使用 Skill 工具调用 **superpowers:verification-before-completion**(代码层验证在 step 3 完成),然后执行下方七项检查,将结果写入 verify.md。
26
+
27
+ 本步骤调用 `/opsx:verify`(即 openspec-verify-change),若不可用,降级为手动执行七项检查并记录结果。
28
+
29
+ ## 七项检查
30
+
31
+ ### 1. 结构校验
32
+ 执行 `openspec validate --all --json`(或等效检查)。确认每一项返回 `"valid": true`。
33
+ 若有任何失败项:记录问题 → 修复对应制品 → 重新验证。
34
+ 阻塞项。
35
+
36
+ ### 2. 任务完成
37
+ 确认 tasks.md 中所有 `- [ ]` 已变为 `- [x]`。统计完成率。
38
+ 若存在剩余 `- [ ]`:记录原因(manual / out-of-scope / blocked),并说明是否阻塞归档。
39
+ 阻塞项(有未完成的 task 且阻塞归档时)。
40
+
41
+ ### 3. Delta Spec 同步
42
+ 对 `openspec/changes/<name>/specs/` 下的每个目录,与 `openspec/specs/<capability>/spec.md` 对比,记录状态:
43
+ - ✓ 已同步
44
+ - ✗ 需要同步(列出 capability 名称)
45
+ - N/A(无 delta spec 产出)
46
+ 阻塞项(有未同步的 delta spec 时)。
47
+
48
+ ### 4. Design / Specs 一致性抽查
49
+ 抽取 design.md 中的 2-3 个关键决策点,在 specs 中确认有对应的行为需求。
50
+ 记录任何偏离作为 WARNING(非阻塞)。
51
+
52
+ ### 5. 实现信号
53
+ 确认所有代码变更已提交(worktree 中无未暂存文件)。
54
+ 记录提交范围:`<base>..HEAD`。
55
+ 阻塞项(无提交记录时)。
56
+
57
+ ### 6. 路由泄漏检测(WARNING,非阻塞)
58
+ 执行:
59
+ ```
60
+ ls docs/superpowers/specs/*.md 2>/dev/null
61
+ ```
62
+ 若存在文件,记录 WARNING:
63
+ "Front-door routing leak — design output found at docs/superpowers/specs/...
64
+ 这些内容应属于 openspec/changes/<name>/ 下的 draft.md 或 design.md。
65
+ 确认内容已捕获到 change 目录后,移动或删除泄漏文件。"
66
+ 非阻塞——用户可能在安装 schema 之前就有该目录的合法使用。
67
+
68
+ ### 7. 延期任务 vs 自动化测试等价对照
69
+ 若 plan.md 中存在 `[~]` 延期任务(手动冒烟 / dogfood / 线上环境检查等),逐个列出并找出覆盖相同断言的等价自动化测试。
70
+ 若某延期任务无等价自动化测试覆盖,该行代表真实覆盖缺口:
71
+ - 记录到 retrospective §2 Misses,附带后续计划
72
+ - 不静默延后
73
+ 非阻塞——Overall Decision 即使有缺口也保持 PASS(前提是缺口已记录为后续计划)。
74
+ 仅当 §7 为空但 plan.md 中确有 `[~]` 行时才算阻塞(说明 gap analysis 被跳过)。
75
+
76
+ ## 结果判定
77
+
78
+ - **PASS** — 全部 7 项通过(允许 WARNING)
79
+ - **PASS WITH WARNINGS** — 有非阻塞 WARNING(如 §4 偏离、§6 路由泄漏、§7 覆盖缺口),已全部记录
80
+ - **FAIL** — 有阻塞问题(§1 结构校验失败、§2 有未完成且阻塞归档的 task、§5 无实现信号、§7 gap analysis 被跳过)
81
+
82
+ FAIL 时列出具体修复项,循环修复直到 PASS 或 PASS WITH WARNINGS。
83
+
84
+ ## 重新运行策略
85
+
86
+ verify 可多次重新运行——每次运行用当前状态覆盖 verify.md。
87
+
88
+ ## 降级策略
89
+
90
+ 若 `/opsx:verify` 不可用,降级为手动执行上方七项检查并记录结果到 verify.md。
@@ -0,0 +1,100 @@
1
+ name: alloy
2
+ version: 1
3
+ description: >
4
+ Alloy schema - 融合 OpenSpec 制品治理和 Superpowers 执行技能。
5
+ Pre-OpenSpec 阶段产出 draft.md,规划阶段依次生成 proposal → design → specs → tasks → plans。
6
+ 执行阶段(apply)编排:worktree 隔离 → SDD(TDD) → 代码验证 → 制品验证 → 复盘。
7
+ 收尾阶段:/alloy-archive(归档),/alloy-finish(合入)。
8
+
9
+ artifacts:
10
+ - id: draft
11
+ description: Pre-OpenSpec 阶段产出——explore + brainstorming 的设计草案
12
+ generates: draft.md
13
+ template: draft.md
14
+ instruction: draft.md
15
+ requires: []
16
+
17
+ - id: proposal
18
+ description: 变更提案——Why/What/Scope,读 draft.md 产出
19
+ generates: proposal.md
20
+ template: proposal.md
21
+ instruction: proposal.md
22
+ requires: [draft]
23
+
24
+ - id: design
25
+ description: 技术设计——架构决策和实现方案,依赖 proposal
26
+ generates: design.md
27
+ template: design.md
28
+ instruction: design.md
29
+ requires: [proposal]
30
+
31
+ - id: specs
32
+ description: 行为规格——Capability 级别的功能契约,只读 proposal 防止被技术细节污染
33
+ generates: "specs/"
34
+ template: specs.md
35
+ instruction: specs.md
36
+ requires: [proposal]
37
+
38
+ - id: tasks
39
+ description: 任务清单——可追踪的实现任务拆解
40
+ generates: tasks.md
41
+ template: tasks.md
42
+ instruction: tasks.md
43
+ requires: [specs, design]
44
+
45
+ - id: plans
46
+ description: 执行脚本——给 Agent 执行的微步骤路线图(含代码片段)
47
+ generates: plans.md
48
+ template: plans.md
49
+ instruction: plans.md
50
+ requires: [tasks]
51
+
52
+ - id: verify
53
+ description: 制品验证——7 项结构化检查,apply 阶段产出
54
+ generates: verify.md
55
+ template: verify.md
56
+ instruction: verify.md
57
+ requires: [plans]
58
+
59
+ - id: retrospective
60
+ description: 复盘报告——证据驱动的 §0-§6 结构化复盘
61
+ generates: retrospective.md
62
+ template: retrospective.md
63
+ instruction: retrospective.md
64
+ requires: [verify]
65
+
66
+ apply:
67
+ requires: [plans]
68
+ tracks: tasks.md
69
+
70
+ precheck:
71
+ - superpowers:using-git-worktrees
72
+ - superpowers:subagent-driven-development
73
+ - superpowers:executing-plans
74
+ - superpowers:test-driven-development
75
+ - superpowers:requesting-code-review
76
+ - superpowers:verification-before-completion
77
+
78
+ steps:
79
+ - order: 1
80
+ skill: superpowers:using-git-worktrees
81
+ description: 创建隔离 workspace
82
+
83
+ - order: 2
84
+ skill: superpowers:subagent-driven-development
85
+ description: SDD + TDD + code review 执行 tasks
86
+ transitive: [superpowers:test-driven-development, superpowers:requesting-code-review]
87
+ fallback: superpowers:executing-plans
88
+
89
+ - order: 3
90
+ skill: superpowers:verification-before-completion
91
+ description: 代码层验证 — 测试通过、行为正确
92
+
93
+ - order: 4
94
+ skill: opsx:verify
95
+ description: 制品层验证 — 7 项结构化检查,产出 verify.md
96
+ produces: verify
97
+
98
+ - order: 5
99
+ description: 证据驱动复盘 — 纯 AI 生成,产出 retrospective.md
100
+ produces: retrospective
@@ -0,0 +1,15 @@
1
+ ## 架构决策
2
+
3
+ <!-- 整体架构方案 -->
4
+
5
+ ## 技术选型
6
+
7
+ <!-- 关键技术选择及理由 -->
8
+
9
+ ## 集成点
10
+
11
+ <!-- 与现有系统的接口和交互方式 -->
12
+
13
+ ## 数据流
14
+
15
+ <!-- 数据如何流转 -->
@@ -0,0 +1,17 @@
1
+ # [功能名称]
2
+
3
+ ## Why
4
+
5
+ <!-- 为什么要做这个功能 -->
6
+
7
+ ## What
8
+
9
+ <!-- 功能方案概述 -->
10
+
11
+ ## 关键决策
12
+
13
+ <!-- 关键技术决策及理由 -->
14
+
15
+ ## 范围与边界
16
+
17
+ <!-- 做什么,不做什么 -->
@@ -0,0 +1,28 @@
1
+ ---
2
+ strategy: sdd
3
+ reason: 任务独立、可并行(由 writing-plans 技能分析后填入)
4
+ ---
5
+
6
+ # [功能名称] 实现计划
7
+
8
+ > **Goal:** [目标描述]
9
+
10
+ **Architecture:** [架构方案]
11
+
12
+ **Tech Stack:** [技术栈]
13
+
14
+ ---
15
+
16
+ ## Task 1: [任务名]
17
+
18
+ **Files:** [涉及文件]
19
+
20
+ - [ ] **Step 1: [步骤描述]**
21
+ - [ ] **Step 2: [步骤描述]**
22
+
23
+ ## Task 2: [任务名]
24
+
25
+ **Files:** [涉及文件]
26
+
27
+ - [ ] **Step 1: [步骤描述]**
28
+ - [ ] **Step 2: [步骤描述]**
@@ -0,0 +1,22 @@
1
+ ## Why
2
+ <!-- 为什么做这个变更。要解决什么问题?为什么现在做? -->
3
+
4
+ ## What Changes
5
+ <!-- 描述具体变更内容。新的能力、修改、移除。 -->
6
+
7
+ ## Capabilities
8
+
9
+ ### New Capabilities
10
+ <!--
11
+ 每个新能力用 kebab-case 命名(如 user-auth),会生成 specs/<name>/spec.md。
12
+ 新能力列表是 proposal 与 specs 之间的契约——specs 阶段为每个新能力创建 spec 文件。
13
+ -->
14
+
15
+ ### Modified Capabilities
16
+ <!--
17
+ 仅当现有能力有 spec 级别的行为变化时才列出。
18
+ 每个 Modified 能力需要一个 delta spec 文件。
19
+ -->
20
+
21
+ ## Impact
22
+ <!-- 影响范围:受影响的代码、API、依赖、系统 -->
@@ -0,0 +1,163 @@
1
+ # Retrospective
2
+
3
+ > 生成前 PRECHECK:
4
+ > 1. 确认 `verify.md` 存在
5
+ > 2. 确认 verify.md 的 Overall Decision 不是 FAIL
6
+ > 两项都通过后才生成 retrospective。每项结论引用具体 commit hash、文件路径或测试名称。
7
+
8
+ ## §0 量化全景
9
+
10
+ ### 全周期时间线
11
+ <!-- 从 .alloy.yaml records 提取:created_at → 每个制品的 committed_at -->
12
+
13
+ | 制品 | 审批人 | Hash | 审批时间 |
14
+ |------|--------|------|---------|
15
+ | draft | | | |
16
+ | proposal | | | |
17
+ | design | | | |
18
+ | specs | | | |
19
+ | tasks | | | |
20
+ | plans | | | |
21
+ | verify | | | |
22
+ | retrospective | | | |
23
+
24
+ ### Commit 汇总(按 type)
25
+ <!-- git log <base>..HEAD --oneline,按 Conventional Commits type 分组 -->
26
+
27
+ | Type | 数量 |
28
+ |------|-----|
29
+ | feat | |
30
+ | docs | |
31
+ | chore | |
32
+ | fix | |
33
+ | test | |
34
+ | 其他 | |
35
+
36
+ ### Commit 汇总(按阶段)
37
+ <!-- 根据 commit message 前缀分组 -->
38
+
39
+ | 阶段 | 数量 |
40
+ |------|-----|
41
+ | start | |
42
+ | plan | |
43
+ | apply | |
44
+
45
+ ### 阶段耗时
46
+ <!-- .alloy.yaml created_at + git log 最后 commit 时间 -->
47
+
48
+ | 阶段 | 开始 | 结束 | 耗时 |
49
+ |------|------|------|-----|
50
+ | start | | | |
51
+ | plan | | | |
52
+ | apply | | | |
53
+ | **总计** | | | |
54
+
55
+ ### 任务完成比
56
+ <!-- tasks.md checkbox -->
57
+
58
+ 已勾 / 总数 = xx%
59
+
60
+ ### 变更规模
61
+ <!-- git diff --stat <base>..HEAD -->
62
+
63
+ - 文件数:
64
+ - 行数(+/-):
65
+
66
+ ### Worktree 状态
67
+ <!-- .alloy.yaml worktree -->
68
+
69
+ ### 计划策略 vs 实际策略
70
+ <!-- plans.md frontmatter strategy vs Agent 自报 -->
71
+
72
+ - 计划推荐:
73
+ - 实际采用:
74
+ - 偏差原因(如有):
75
+
76
+ ### 验证状态
77
+ <!-- verify.md Overall Decision -->
78
+
79
+ ### 测试覆盖信号
80
+ <!-- 测试文件 vs 源文件变更比例 -->
81
+
82
+ ### 完整提交链
83
+ <!-- git log <base>..HEAD --oneline -->
84
+ ```
85
+ ```
86
+
87
+ ## §1 做对了什么
88
+
89
+ <!-- 什么做得好,每条引用 §0 的证据 -->
90
+
91
+ ## §2 做错了什么
92
+
93
+ <!-- 按严重程度标注,每条带 evidence:
94
+ - 🔴 [blocking | evidence: <commit/file/test>] <描述>
95
+ - 🟡 [painful | evidence: <commit/file/test>] <描述>
96
+ - 📌 [nit | evidence: <commit/file/test>] <描述>
97
+ -->
98
+
99
+ ## §3 计划偏离
100
+
101
+ <!-- 哪些 task 的范围在执行中发生了变化,为什么 -->
102
+
103
+ | Plan task | What changed | Why |
104
+ |-----------|-------------|-----|
105
+ | | | |
106
+
107
+ ## §4 全周期技能审计
108
+
109
+ ### start 阶段
110
+
111
+ | 技能/命令 | 使用 |
112
+ |----------|:---:|
113
+ | `opsx:explore` | |
114
+ | `superpowers:brainstorming` | |
115
+
116
+ ### plan 阶段
117
+
118
+ | 技能/命令 | 使用 |
119
+ |----------|:---:|
120
+ | `/opsx:continue` | |
121
+ | `superpowers:writing-plans` | |
122
+
123
+ ### apply 阶段
124
+
125
+ | 技能/命令 | 使用 |
126
+ |----------|:---:|
127
+ | `superpowers:using-git-worktrees` | |
128
+ | `superpowers:subagent-driven-development` | |
129
+ | `superpowers:executing-plans` | |
130
+ | `superpowers:test-driven-development` | |
131
+ | `superpowers:requesting-code-review` | |
132
+ | `superpowers:verification-before-completion` | |
133
+ | `/opsx:verify` | |
134
+
135
+ ### Deliberately Skipped Skills
136
+
137
+ <!-- 对于每个标记 ✗ 的技能,填写以下三项:
138
+ 1. **What was skipped** — 具体跳过了哪个技能或子步骤
139
+ 2. **Why this cycle** — 具体触发原因(必须有具体的 commit hash、日志行或观察到的行为)
140
+ 3. **How to prevent recurrence** — schema graph fix / skill description tightening / CLAUDE.md trigger / scope-judgment rule / one-off
141
+ -->
142
+
143
+ ## §5 意外发现
144
+
145
+ <!-- 哪些假设被证明是错误的 -->
146
+
147
+ ## §6 值得推广
148
+
149
+ <!-- 使用 - [ ] checklist,未勾选的 = 跨周期 carry-forward
150
+ 格式:
151
+ - [ ] 🔴 教训简述
152
+ → **Promote to** memory(或 CLAUDE.md / schema / skill / one-off)
153
+ > **Why**: <原因>
154
+ > **How to apply**: <触发条件>
155
+ -->
156
+
157
+ ---
158
+
159
+ ## Forward-Pointer 策略
160
+
161
+ 后续 cycle 发现本 retrospective 中结论有误时:
162
+ - **不要重写**本文件(会丢失审计线索)
163
+ - 追加:`> **Update YYYY-MM-DD**: section X superseded by <链接>
@@ -0,0 +1,54 @@
1
+ <!--
2
+ Delta spec 模板 — 跟踪对 capability spec 的变更。
3
+ 路径:openspec/changes/<change-name>/specs/<capability>/spec.md
4
+
5
+ 硬校验规则(OpenSpec 严格校验):
6
+ - Requirement 描述 MUST 含 SHALL 或 MUST
7
+ - 每个 Requirement MUST 至少有一个 #### Scenario:
8
+ - Scenario MUST 用 level-4 (####),level-3 或 bullet 会导致静默解析失败
9
+ -->
10
+
11
+ ## ADDED Requirements
12
+ <!-- 新增的行为能力 -->
13
+
14
+ ### Requirement: <requirement name>
15
+ <requirement text — 须含 SHALL 或 MUST>
16
+
17
+ #### Scenario: <scenario name>
18
+ - **WHEN** <condition>
19
+ - **THEN** <expected outcome>
20
+
21
+ ---
22
+
23
+ ## MODIFIED Requirements
24
+ <!--
25
+ 修改的现有行为。MUST 包含完整更新后的内容(不只是 diff)。
26
+ 使用与 openspec/specs/<capability>/spec.md 完全相同的 header。
27
+ -->
28
+
29
+ ### Requirement: <requirement name>
30
+ <完整更新后的内容 — 须含 SHALL 或 MUST>
31
+
32
+ #### Scenario: <scenario name>
33
+ - **WHEN** <condition>
34
+ - **THEN** <expected outcome>
35
+
36
+ ---
37
+
38
+ ## REMOVED Requirements
39
+ <!-- 每个条目 MUST 包含 Reason 和 Migration 说明 -->
40
+
41
+ ### Requirement: <exact header to delete>
42
+ **Reason**: <why removed>
43
+ **Migration**: <how existing consumers should adapt>
44
+
45
+ ---
46
+
47
+ ## RENAMED Requirements
48
+ <!--
49
+ Archive 时的 apply 顺序:RENAMED → REMOVED → MODIFIED → ADDED
50
+ 如果内容也有变化,在此列出 rename,完整内容放到 MODIFIED(使用新 header)。
51
+ -->
52
+
53
+ - FROM: `### Requirement: <Old Name>`
54
+ - TO: `### Requirement: <New Name>`
@@ -0,0 +1,8 @@
1
+ ## 实现任务
2
+
3
+ - [ ] 1. [任务类别]
4
+ - [ ] 1.1 [具体任务]
5
+ - [ ] 1.2 [具体任务]
6
+ - [ ] 2. [任务类别]
7
+ - [ ] 2.1 [具体任务]
8
+ - [ ] 2.2 [具体任务]
@@ -0,0 +1,55 @@
1
+ # Verify: <change-name>
2
+
3
+ > 生成时间: <timestamp>
4
+ > 提交范围: <base>..HEAD
5
+
6
+ ## Overall Decision
7
+
8
+ - [ ] ✅ PASS
9
+ - [ ] ⚠️ PASS WITH WARNINGS
10
+ - [ ] ❌ FAIL
11
+
12
+ ## 1. 结构校验
13
+
14
+ - 状态: <!-- ✓ / ✗ -->
15
+ - 命令: `openspec validate --all --json`
16
+ - 输出: <!-- 命令输出摘要 -->
17
+
18
+ ## 2. 任务完成
19
+
20
+ - 已完成: <!-- N --> / <!-- 总数 -->
21
+ - 完成率: <!-- 百分比 -->
22
+ - 未完成项: <!-- 列出或 "无" -->
23
+ - 是否阻塞归档: <!-- 是 / 否 -->
24
+
25
+ ## 3. Delta Spec 同步
26
+
27
+ - 状态: <!-- ✓ / ✗ / N/A -->
28
+ - 变更的 Capability: <!-- 列出 -->
29
+ - 冲突: <!-- 列出或 "无" -->
30
+
31
+ ## 4. Design / Specs 一致性抽查
32
+
33
+ | Design 决策 | Specs 对应 | 状态 |
34
+ |------------|-----------|------|
35
+ | <!-- 决策 --> | <!-- 对应需求 --> | <!-- ✓ / ✗ --> |
36
+
37
+ ## 5. 实现信号
38
+
39
+ - 提交数: <!-- N -->
40
+ - 变更文件: <!-- N -->
41
+ - 状态: <!-- ✓ / ✗ -->
42
+
43
+ ## 6. 路由泄漏检测
44
+
45
+ - 命令: `ls docs/superpowers/specs/*.md 2>/dev/null`
46
+ - 状态: <!-- ✓ / ⚠️ -->
47
+ - 泄漏文件: <!-- 列出或 "无" -->
48
+
49
+ ## 7. 延期任务对照
50
+
51
+ | 延期任务 | 等价自动化覆盖 | 状态 |
52
+ |---------|--------------|------|
53
+ | <!-- 任务 --> | <!-- 覆盖方式 --> | <!-- ✓ / ⚠️ --> |
54
+
55
+ > 状态说明:✓ 有等价自动化覆盖 | ⚠️ 无等价覆盖(记录到 retrospective §2 Misses)
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@flyin-ai/alloy",
3
+ "version": "0.1.0",
4
+ "description": "Alloy - OpenSpec + Superpowers 编排层 CLI 工具",
5
+ "type": "module",
6
+ "main": "dist/cli/index.js",
7
+ "bin": {
8
+ "alloy": "dist/cli/index.js"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Rushing0711/alloy.git"
13
+ },
14
+ "files": [
15
+ "dist/",
16
+ "compat.yaml",
17
+ "commands/",
18
+ "openspec/schemas/alloy/"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "postbuild": "chmod +x dist/cli/index.js",
23
+ "dev": "tsc --watch",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest"
26
+ },
27
+ "dependencies": {
28
+ "@inquirer/prompts": "^8.5.0",
29
+ "semver": "^7.7.0",
30
+ "yaml": "^2.7.0"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^22.0.0",
34
+ "@types/semver": "^7.7.0",
35
+ "@vitest/coverage-istanbul": "^3.2.4",
36
+ "typescript": "^5.8.0",
37
+ "vitest": "^3.1.0"
38
+ },
39
+ "engines": {
40
+ "node": ">=18.0.0"
41
+ },
42
+ "license": "MIT"
43
+ }