@flyin-ai/alloy 0.1.0 → 0.2.0-beta.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.
- package/README.md +28 -90
- package/commands/alloy/apply.md +274 -119
- package/commands/alloy/archive.md +116 -60
- package/commands/alloy/discard.md +57 -15
- package/commands/alloy/finish.md +92 -70
- package/commands/alloy/fix.md +282 -53
- package/commands/alloy/plan.md +125 -63
- package/commands/alloy/references/interaction-style.md +82 -0
- package/commands/alloy/references/main-branch-detection.md +32 -0
- package/commands/alloy/references/phase-routing.md +21 -0
- package/commands/alloy/references/skill-precheck.md +46 -0
- package/commands/alloy/start.md +167 -64
- package/commands/alloy/status.md +1 -1
- package/dist/cli/commands/doctor.d.ts +1 -0
- package/dist/cli/commands/doctor.js +28 -6
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/init.js +40 -37
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/internal/config.d.ts +1 -0
- package/dist/cli/commands/internal/config.js +45 -0
- package/dist/cli/commands/internal/config.js.map +1 -0
- package/dist/cli/commands/internal/guard.js +2 -41
- package/dist/cli/commands/internal/guard.js.map +1 -1
- package/dist/cli/commands/internal/record.js +10 -47
- package/dist/cli/commands/internal/record.js.map +1 -1
- package/dist/cli/commands/internal/skill-usage.d.ts +1 -0
- package/dist/cli/commands/internal/skill-usage.js +78 -0
- package/dist/cli/commands/internal/skill-usage.js.map +1 -0
- package/dist/cli/commands/internal/state.js +105 -6
- package/dist/cli/commands/internal/state.js.map +1 -1
- package/dist/cli/commands/status.d.ts +1 -0
- package/dist/cli/commands/status.js +50 -11
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/update.js +20 -17
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +73 -31
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/hash.d.ts +3 -0
- package/dist/cli/utils/hash.js +42 -0
- package/dist/cli/utils/hash.js.map +1 -0
- package/dist/cli/utils/state.d.ts +4 -2
- package/dist/cli/utils/state.js +34 -2
- package/dist/cli/utils/state.js.map +1 -1
- package/dist/core/artifacts.d.ts +3 -0
- package/dist/core/artifacts.js +45 -0
- package/dist/core/artifacts.js.map +1 -0
- package/dist/core/detect-installations.d.ts +19 -0
- package/dist/core/detect-installations.js +65 -0
- package/dist/core/detect-installations.js.map +1 -0
- package/dist/core/openspec.d.ts +2 -1
- package/dist/core/openspec.js +30 -12
- package/dist/core/openspec.js.map +1 -1
- package/dist/core/skills.js +16 -0
- package/dist/core/skills.js.map +1 -1
- package/dist/core/superpowers.d.ts +8 -1
- package/dist/core/superpowers.js +60 -13
- package/dist/core/superpowers.js.map +1 -1
- package/dist/core/types.d.ts +20 -0
- package/dist/utils/format.d.ts +31 -0
- package/dist/utils/format.js +101 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/output.d.ts +16 -0
- package/dist/utils/output.js +38 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/prompt.d.ts +0 -1
- package/dist/utils/prompt.js +11 -83
- package/dist/utils/prompt.js.map +1 -1
- package/openspec/schemas/alloy/instructions/retrospective.md +17 -35
- package/openspec/schemas/alloy/templates/design.md +2 -0
- package/openspec/schemas/alloy/templates/draft.md +2 -0
- package/openspec/schemas/alloy/templates/plans.md +2 -0
- package/openspec/schemas/alloy/templates/proposal.md +2 -0
- package/openspec/schemas/alloy/templates/retrospective.md +39 -19
- package/openspec/schemas/alloy/templates/specs.md +2 -0
- package/openspec/schemas/alloy/templates/tasks.md +2 -0
- package/package.json +10 -3
- package/vendor/superpowers/skills/brainstorming/SKILL.md +164 -0
- package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
- package/vendor/superpowers/skills/brainstorming/scripts/helper.js +88 -0
- package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +354 -0
- package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
- package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/brainstorming/visual-companion.md +287 -0
- package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
- package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +251 -0
- package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
- package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
- package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +168 -0
- package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +279 -0
- package/vendor/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/vendor/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
- package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
- package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +215 -0
- package/vendor/superpowers/skills/using-superpowers/SKILL.md +117 -0
- package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +59 -0
- package/vendor/superpowers/skills/using-superpowers/references/copilot-tools.md +42 -0
- package/vendor/superpowers/skills/using-superpowers/references/gemini-tools.md +51 -0
- package/vendor/superpowers/skills/verification-before-completion/SKILL.md +139 -0
- package/vendor/superpowers/skills/writing-plans/SKILL.md +152 -0
- package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/writing-skills/SKILL.md +655 -0
- package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/vendor/superpowers/skills/writing-skills/render-graphs.js +168 -0
- package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
package/README.md
CHANGED
|
@@ -1,41 +1,30 @@
|
|
|
1
1
|
# Alloy
|
|
2
2
|
|
|
3
|
-
**Alloy 是 AI 编码 Agent 的驾驶舱。**
|
|
3
|
+
**Alloy 是 AI 编码 Agent 的驾驶舱。** 把需求管理(OpenSpec)和流程纪律(Superpowers)编成一条 5 阶段流水线——你只管 `/alloy:start`,剩下的编排、校验、归档全自动。
|
|
4
|
+
|
|
5
|
+
| 有 Alloy | 裸用 AI Agent |
|
|
6
|
+
|----------|-------------|
|
|
7
|
+
| 需求 → draft → specs,完整审计链 | "帮我加个功能"——需求在聊天里 |
|
|
8
|
+
| 5 阶段 hard gate,脚本校验 | 无闸门,Agent 自由发挥 |
|
|
9
|
+
| TDD + code review + 双层验证 | 靠 Agent 自觉 |
|
|
10
|
+
| 任意阶段退出,回来随便打哪个命令都能接上 | 掉线从头开始 |
|
|
11
|
+
| 做到一半改需求?编码未开始就回溯修正,已开始开新 change | 规格和代码分叉 |
|
|
12
|
+
| 每次 change 结束自动复盘,教训反哺下次 | 每次都从零开始 |
|
|
13
|
+
| 每个制品 hash 锁定 + 独立 commit,完整可追溯 | 改了什么都记不住 |
|
|
4
14
|
|
|
5
15
|
---
|
|
6
16
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
1. **需求漂移** — Agent 理解的"要做的东西"和你想要的不一样,聊着聊着范围就跑了
|
|
10
|
-
2. **质量靠自觉** — TDD、代码审查、分支隔离全看 Agent 当天心情,前脚记得后脚忘
|
|
11
|
-
3. **改完不留痕** — 代码改了,但"为什么这么改"、"变了哪些 spec"没记录,换人就断片
|
|
12
|
-
|
|
13
|
-
| | Alloy | 裸用 AI Agent |
|
|
14
|
-
|------|------|------|
|
|
15
|
-
| 需求管理 | brainstorming → draft → proposal → specs,完整审计链 | "帮我加个功能"——需求在聊天里 |
|
|
16
|
-
| 流程闸门 | 5 阶段 hard gate,每阶段脚本校验 | 无闸门,Agent 自由发挥 |
|
|
17
|
-
| 制品追踪 | 8 制品 DAG + hash 锁定 + 每制品独立 commit,精准回溯 | 改了什么都记不住 |
|
|
18
|
-
| 隔离环境 | 可选 worktree,自动管理 | 直接在主分支上改 |
|
|
19
|
-
| 质量保证 | TDD + code review + 双层验证 | 靠 Agent 自觉 |
|
|
20
|
-
| 掉线恢复 | 任意阶段退出,回来随便打哪个命令,自动接续 | 掉线从头开始 |
|
|
21
|
-
| 事后复盘 | evidence-driven retrospective,教训跨周期传递 | 无 |
|
|
22
|
-
| 自我优化 | 复盘数据自动反哺下一个 change | 每次都从零开始 |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Alloy 是什么?
|
|
27
|
-
|
|
28
|
-
Alloy 把两个工具缝合到一起:
|
|
29
|
-
|
|
30
|
-
| 工具 | 管什么 | 各自缺的 |
|
|
31
|
-
|------|--------|---------|
|
|
32
|
-
| [OpenSpec](https://github.com/Fission-AI/OpenSpec) | "做成什么样" — 需求追踪、Delta Spec、归档审计 | 有文档没纪律:不强 TDD、不强审查、不强隔离 |
|
|
33
|
-
| [Superpowers](https://github.com/obra/superpowers) | "怎么做" — 流程闸门、TDD、系统化调试、验证 | 有纪律没档案:改了代码但没记录"变了什么 spec" |
|
|
34
|
-
| **Alloy** | **编排两者** — 规格管理 + 流程纪律 = 完整且不可跳步的工作流 | — |
|
|
17
|
+
## 工作流
|
|
35
18
|
|
|
36
|
-
|
|
19
|
+
```
|
|
20
|
+
/alloy:start [1/5] 智能入口 → 需求探索 → draft.md
|
|
21
|
+
/alloy:plan [2/5] proposal → design → specs → tasks → plan(每步审查)
|
|
22
|
+
/alloy:apply [3/5] worktree 隔离 → TDD 实现 → 双层验证 → 复盘
|
|
23
|
+
/alloy:archive [4/5] Delta Spec 合并 → 移入 archive/
|
|
24
|
+
/alloy:finish [5/5] merge / PR / keep(人工闸门)
|
|
25
|
+
```
|
|
37
26
|
|
|
38
|
-
|
|
27
|
+
任意阶段退出,回来随便打哪个命令都能自动接上。
|
|
39
28
|
|
|
40
29
|
---
|
|
41
30
|
|
|
@@ -47,36 +36,13 @@ cd your-project
|
|
|
47
36
|
alloy init
|
|
48
37
|
```
|
|
49
38
|
|
|
50
|
-
`alloy init`
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 工作流
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
/alloy:start [1/5] 智能入口 — 状态检测 → 上下文探查 → 需求设计 → draft.md
|
|
58
|
-
/alloy:plan [2/5] 制品生成 — proposal → design → specs → tasks → plan(每步审查)
|
|
59
|
-
/alloy:apply [3/5] 隔离执行 — worktree(可选) + SDD/串行(可选) + 双层验证 + 复盘
|
|
60
|
-
/alloy:archive [4/5] 归档 — Delta Spec 合并主 spec → 移入 archive/ → 提交
|
|
61
|
-
/alloy:finish [5/5] 收尾 — merge / PR / keep(人工闸门)
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
| 制品 | 阶段 | 说明 |
|
|
65
|
-
|------|------|------|
|
|
66
|
-
| `draft.md` | start | 需求探索 + 设计决策 |
|
|
67
|
-
| `proposal.md` | plan | 变更提案,创建 specs 的合约 |
|
|
68
|
-
| `design.md` | plan | 技术决策、架构、数据流 |
|
|
69
|
-
| `specs/*.md` | plan | 行为契约(Delta Spec) |
|
|
70
|
-
| `tasks.md` | plan | 实现任务清单 |
|
|
71
|
-
| `plan.md` | plan | 执行剧本(含代码片段) |
|
|
72
|
-
| `verify.md` | apply | 7 项结构化检查结果 |
|
|
73
|
-
| `retrospective.md` | apply | 证据驱动复盘(§0-§6) |
|
|
39
|
+
`alloy init` 交互式完成环境检测、选择 AI Agent、部署命令和 schema。支持 Claude Code、Cursor、OpenCode 等 8 个平台。
|
|
74
40
|
|
|
75
41
|
---
|
|
76
42
|
|
|
77
43
|
## 命令速查
|
|
78
44
|
|
|
79
|
-
### Slash Command(
|
|
45
|
+
### Slash Command(Agent 内使用)
|
|
80
46
|
|
|
81
47
|
| 命令 | 用途 |
|
|
82
48
|
|------|------|
|
|
@@ -89,8 +55,6 @@ alloy init
|
|
|
89
55
|
| `/alloy:discard [name]` | 放弃 change,清理现场 |
|
|
90
56
|
| `/alloy:status [name]` | 查看阶段、制品、下一步 |
|
|
91
57
|
|
|
92
|
-
> **命名约定:** 命令以冒号为主格式(`alloy:start`)——冒号在 Claude Code 等平台提供命名空间分组,输入 `/alloy:` 即可看到全部子命令。冒号改横线是单向派生(→ `alloy-start`),因此选冒号做主格式。不支持冒号的 Agent(Cursor、OpenCode、Codex 等)自动获得横线版。
|
|
93
|
-
|
|
94
58
|
### CLI 命令(终端使用)
|
|
95
59
|
|
|
96
60
|
| 命令 | 用途 |
|
|
@@ -102,47 +66,21 @@ alloy init
|
|
|
102
66
|
|
|
103
67
|
---
|
|
104
68
|
|
|
105
|
-
## 核心特点
|
|
106
|
-
|
|
107
|
-
**三层防线,Agent 想跳也跳不过去:**
|
|
108
|
-
|
|
109
|
-
| 防线 | 机制 | 作用 |
|
|
110
|
-
|------|------|------|
|
|
111
|
-
| 指令层 | SKILL.md 硬约束 + 反例定义 | 引导 Agent 行为 |
|
|
112
|
-
| 脚本层 | `alloy _guard` + `alloy _record check` | 硬阻断非法操作:phase 校验、hash 校验、制品完整性 |
|
|
113
|
-
| 审查层 | 每制品人工确认(不提供"跳过") | 人类最终决策 |
|
|
114
|
-
|
|
115
|
-
**每一步都有明确决策点:** start 选分支 → plan 每制品审查 → apply 选隔离方式和执行策略 → archive 确认归档 → finish 明确合入方式。每个阶段转换前有闸门脚本校验。
|
|
116
|
-
|
|
117
|
-
**掉线零负担:** 任何时候退出,回来随便打 `/alloy:start`、`/alloy:plan`、`/alloy:apply` 任意一个命令——自动检测进度,从断点继续。不需要记住"上次做到哪了"。
|
|
118
|
-
|
|
119
|
-
**越用越聪明:** 每次 change 的 retrospective 复盘数据自动反哺后续 change——上次踩的坑、跳过的技能、未完成的改进项,都带回新一轮 start,不会每次都从零开始。
|
|
120
|
-
|
|
121
|
-
> 完整设计细节见 [alloy-design.md](docs/alloy-design.md)。
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
69
|
## 文档导航
|
|
126
70
|
|
|
127
71
|
| 我想… | 读这个 |
|
|
128
72
|
|-------|------|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
| 了解项目起源 | [project-background.md](docs/project-background.md) |
|
|
73
|
+
| 快速了解 Alloy | [可视化介绍](docs/intro/index.html) — 幻灯片 |
|
|
74
|
+
| 快速上手使用 | [handbook.md](docs/handbook.md) |
|
|
75
|
+
| 看完整产品规格 | [specification/01-product-spec.md](docs/specification/01-product-spec.md) |
|
|
76
|
+
| 写或改 Alloy Skill | [reference/skill-writing-guide.md](docs/reference/skill-writing-guide.md) |
|
|
77
|
+
| 理解设计背景 | [background/](docs/background/) — 起源 / 工具对比 / 流程推导 |
|
|
135
78
|
|
|
136
79
|
---
|
|
137
80
|
|
|
138
81
|
## 依赖
|
|
139
82
|
|
|
140
|
-
|
|
141
|
-
|------|------|------|
|
|
142
|
-
| [OpenSpec CLI](https://github.com/Fission-AI/OpenSpec) | `>=1.3.0 <2.0.0` | 需求管理和 Delta Spec 追踪 |
|
|
143
|
-
| [Superpowers](https://github.com/obra/superpowers) | `>=5.0.0 <6.0.0` | 流程闸门技能 |
|
|
144
|
-
| Node.js | ≥ 18 | 运行时 |
|
|
145
|
-
| git | — | 版本控制 |
|
|
83
|
+
[OpenSpec](https://github.com/Fission-AI/OpenSpec) · [Superpowers](https://github.com/obra/superpowers) · Node.js ≥ 18 · git
|
|
146
84
|
|
|
147
85
|
---
|
|
148
86
|
|