relay-kit 0.2.0 → 0.3.1
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/.claude/commands/opsx/apply.md +152 -0
- package/.claude/commands/opsx/archive.md +157 -0
- package/.claude/commands/opsx/explore.md +173 -0
- package/.claude/commands/opsx/propose.md +106 -0
- package/.claude/skills/openspec-apply-change/SKILL.md +156 -0
- package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
- package/.claude/skills/openspec-explore/SKILL.md +288 -0
- package/.claude/skills/openspec-propose/SKILL.md +110 -0
- package/.claude/skills/relay-delegator/SKILL.md +55 -0
- package/.claude/skills/relay-escalation/SKILL.md +47 -0
- package/.claude/skills/relay-planner/SKILL.md +64 -0
- package/.claude/skills/relay-reviewer/SKILL.md +59 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +156 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +114 -0
- package/.codex/skills/openspec-explore/SKILL.md +288 -0
- package/.codex/skills/openspec-propose/SKILL.md +110 -0
- package/.opencode/commands/opsx-apply.md +149 -0
- package/.opencode/commands/opsx-archive.md +154 -0
- package/.opencode/commands/opsx-explore.md +170 -0
- package/.opencode/commands/opsx-propose.md +103 -0
- package/.opencode/skills/openspec-apply-change/SKILL.md +156 -0
- package/.opencode/skills/openspec-archive-change/SKILL.md +114 -0
- package/.opencode/skills/openspec-explore/SKILL.md +288 -0
- package/.opencode/skills/openspec-propose/SKILL.md +110 -0
- package/CHANGELOG.md +33 -1
- package/README.en.md +247 -0
- package/README.md +202 -190
- package/dist/cli.js +1000 -215
- package/dist/cli.js.map +1 -1
- package/docs/CLI_SPEC.md +108 -53
- package/docs/FINAL_DESIGN.md +18 -16
- package/docs/OPENSPEC_INTEGRATION.md +60 -30
- package/docs/SKILLS_INSTALLATION.md +46 -4
- package/docs/USAGE_FLOW.md +47 -58
- package/package.json +15 -9
- package/skills/relay-delegator/SKILL.md +14 -2
- package/skills/relay-planner/SKILL.md +12 -0
- package/skills/relay-runner/SKILL.md +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relay-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Skills-first, CLI-assisted AI programming relay workflow toolkit.",
|
|
5
5
|
"types": "./dist/cli.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,19 @@
|
|
|
24
24
|
"CHANGELOG.md",
|
|
25
25
|
"skills",
|
|
26
26
|
"templates",
|
|
27
|
-
"
|
|
27
|
+
".opencode",
|
|
28
|
+
".claude",
|
|
29
|
+
".codex",
|
|
30
|
+
"README.md",
|
|
31
|
+
"README.en.md"
|
|
28
32
|
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "tsx src/cli.ts",
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"prepublishOnly": "pnpm build",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"test": "node --import tsx --test tests/*.test.ts"
|
|
39
|
+
},
|
|
29
40
|
"keywords": [
|
|
30
41
|
"ai",
|
|
31
42
|
"cli",
|
|
@@ -45,10 +56,5 @@
|
|
|
45
56
|
"engines": {
|
|
46
57
|
"node": ">=20"
|
|
47
58
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
"build": "tsup",
|
|
51
|
-
"typecheck": "tsc --noEmit",
|
|
52
|
-
"test": "node --import tsx --test tests/*.test.ts"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
59
|
+
"packageManager": "pnpm@9.15.0"
|
|
60
|
+
}
|
|
@@ -14,8 +14,17 @@ description: 内部 skill,由 planner 自动衔接触发,将任务委派给
|
|
|
14
14
|
2. 生成有边界的执行指令。
|
|
15
15
|
3. 始终指定允许范围和禁止范围。
|
|
16
16
|
4. 始终提及升级规则。
|
|
17
|
-
5. 如果存在 OpenSpec
|
|
18
|
-
6.
|
|
17
|
+
5. 如果存在 OpenSpec,完整引用 proposal/design/tasks/specs 内容。
|
|
18
|
+
6. 如果 OpenSpec change 存在,运行 `relay openspec status --change <name> --json` 确认 artifact 状态。
|
|
19
|
+
7. 如果不存在 OpenSpec,使用 simple 模式。
|
|
20
|
+
|
|
21
|
+
## OpenSpec 集成
|
|
22
|
+
|
|
23
|
+
当项目为 OpenSpec 模式时:
|
|
24
|
+
- 将 proposal.md 的核心目标提炼到 Task 描述中。
|
|
25
|
+
- 将 design.md 的关键决策注入 Allowed Scope(不要全文复制,提取约束)。
|
|
26
|
+
- 将 tasks.md 的检查清单作为 Execution Steps。
|
|
27
|
+
- 明确引用 OpenSpec change 名称和 schema。
|
|
19
28
|
|
|
20
29
|
## 输出格式
|
|
21
30
|
|
|
@@ -27,8 +36,10 @@ description: 内部 skill,由 planner 自动衔接触发,将任务委派给
|
|
|
27
36
|
## Task
|
|
28
37
|
|
|
29
38
|
## Source
|
|
39
|
+
<!-- 如源自 OpenSpec,标注 change 名称和路径 -->
|
|
30
40
|
|
|
31
41
|
## Read First
|
|
42
|
+
<!-- 需要预先了解的上下文文件 -->
|
|
32
43
|
|
|
33
44
|
## Allowed Scope
|
|
34
45
|
|
|
@@ -37,6 +48,7 @@ description: 内部 skill,由 planner 自动衔接触发,将任务委派给
|
|
|
37
48
|
## Requirements
|
|
38
49
|
|
|
39
50
|
## Escalation Rule
|
|
51
|
+
同一问题尝试 2 次后仍失败,停止并生成 ASK_ADVISOR.md。
|
|
40
52
|
|
|
41
53
|
## Verification
|
|
42
54
|
|
|
@@ -26,6 +26,17 @@ description: 当用户运行 /relay:plan 或需要规划功能、决定 simple v
|
|
|
26
26
|
5. 如果任务是小的 UI/文案/bugfix,simple 模式可以接受。
|
|
27
27
|
6. 你可以提出多个路线图项,但同一时间只应实施一个活跃 change。
|
|
28
28
|
|
|
29
|
+
## OpenSpec 集成
|
|
30
|
+
|
|
31
|
+
当推荐 OpenSpec 模式时,在输出末尾提供具体的下一步指令:
|
|
32
|
+
|
|
33
|
+
- 创建 change 目录:
|
|
34
|
+
```bash
|
|
35
|
+
relay openspec new-change <name>
|
|
36
|
+
```
|
|
37
|
+
- 然后运行 `/opsx:propose <name>` 创建完整制品(proposal → design → tasks)。
|
|
38
|
+
- 或者手动创建各 artifact 文件后,用 `relay start --change <name>` 生成执行任务。
|
|
39
|
+
|
|
29
40
|
## 输出格式
|
|
30
41
|
|
|
31
42
|
# PLAN_REPORT
|
|
@@ -50,3 +61,4 @@ simple / openspec
|
|
|
50
61
|
## Human Decision Points
|
|
51
62
|
|
|
52
63
|
## 建议下一步
|
|
64
|
+
<!-- 当推荐 OpenSpec 时,此处给出具体的执行命令 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: relay-runner
|
|
3
|
-
description: 当用户运行 /relay:run 或需要执行任务时使用。自动检测读取 EXECUTOR_TASK.md 或 RESUME_PROMPT.md,以 Executor
|
|
3
|
+
description: 当用户运行 /relay:run 或需要执行任务时使用。自动检测读取 EXECUTOR_TASK.md 或 RESUME_PROMPT.md,以 Executor 角色执行实现。支持任务进度追踪和自动重试。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
|
|
@@ -22,12 +22,24 @@ description: 当用户运行 /relay:run 或需要执行任务时使用。自动
|
|
|
22
22
|
|
|
23
23
|
## 核心规则
|
|
24
24
|
|
|
25
|
-
1.
|
|
25
|
+
1. 小步执行。每次只完成一个子任务。
|
|
26
26
|
2. 不要超出当前任务范围。
|
|
27
27
|
3. 未经批准不要引入新依赖。
|
|
28
28
|
4. 除非明确要求,不要进行大规模重构。
|
|
29
29
|
5. 有意义的变更后,报告变更文件和验证步骤。
|
|
30
30
|
|
|
31
|
+
## 任务进度追踪
|
|
32
|
+
|
|
33
|
+
- 将 EXECUTOR_TASK.md 中的任务拆分为微步骤。
|
|
34
|
+
- 每完成一个微步骤,报告进度:`[N/M] <步骤描述> ✓`
|
|
35
|
+
- 如果 EXECUTOR_TASK.md 包含 OpenSpec tasks.md 内容,按 tasks.md 的 `- [ ]` 清单逐项执行。
|
|
36
|
+
- 每完成一个 task,将对应行标记为 `- [x]`。
|
|
37
|
+
|
|
38
|
+
## 重试与升级规则
|
|
39
|
+
|
|
40
|
+
- 首次失败:分析原因,尝试替代方案。
|
|
41
|
+
- 同一问题尝试 2 次后仍失败:停止,创建 `ASK_ADVISOR.md`。
|
|
42
|
+
|
|
31
43
|
## 停止并生成 ASK_ADVISOR.md
|
|
32
44
|
|
|
33
45
|
以下情况停止修改代码,创建 `ASK_ADVISOR.md`:
|
|
@@ -50,3 +62,4 @@ description: 当用户运行 /relay:run 或需要执行任务时使用。自动
|
|
|
50
62
|
- 修改的文件列表
|
|
51
63
|
- 每个文件的修改原因
|
|
52
64
|
- 验证结果
|
|
65
|
+
- 任务进度:`[M/M]` 或 `- [x]` 完成情况
|