sdd-flow-kit 0.1.0 → 1.0.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 +27 -13
- package/dist/cli.js +13 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,22 +13,19 @@
|
|
|
13
13
|
|
|
14
14
|
#### 安装教程
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
21
|
-
6.
|
|
22
|
-
7. 环境健检:`npx sdd-flow-kit doctor --agent claude-code`
|
|
16
|
+
1. 进入你要开发的项目目录
|
|
17
|
+
2. 安装:`npm i -D sdd-flow-kit`
|
|
18
|
+
3. 安装流程(安装即用,默认 `claude-code`):`npx sdd-flow-kit install`
|
|
19
|
+
4. (可选)预演安装:`npx sdd-flow-kit install --dry-run --plan-json`
|
|
20
|
+
5. (可选)环境健检:`npx sdd-flow-kit doctor --agent claude-code`
|
|
21
|
+
6. 完成后,直接在 Cursor / Claude Code / Codex / OpenClaw 中用自然语言发起需求,例如:`开发 ADI 2.3.2 需求`
|
|
23
22
|
|
|
24
23
|
#### 使用说明
|
|
25
24
|
|
|
26
|
-
1. `setup
|
|
27
|
-
2.
|
|
28
|
-
3. `run
|
|
29
|
-
4.
|
|
30
|
-
5. `invoke`:从自然语言解析 product/version,并自动触发 `run`
|
|
31
|
-
6. `doctor`:检查 git/npx/agent CLI/openspec/tool 目录,输出可机读诊断结果
|
|
25
|
+
1. `install`(等价 `setup`):提示选择开发环境(cursor/claude-code/codex/openclaw,默认 claude-code)与开发分支(无则自动创建),并检测/安装 openspec+superpower 基础环境
|
|
26
|
+
2. 安装完成后,本工具主要负责“流程环境与模板”落地;业务需求由你在目标 AI 工具中自然语言驱动
|
|
27
|
+
3. `start`/`run`/`invoke` 属于进阶能力(脚本化或一键编排时使用)
|
|
28
|
+
4. `doctor`:检查 git/npx/agent CLI/openspec/tool 目录,输出可机读诊断结果
|
|
32
29
|
|
|
33
30
|
#### 当前自动化边界
|
|
34
31
|
|
|
@@ -36,6 +33,23 @@
|
|
|
36
33
|
- 已支持:环境检测与按工具自动执行 `npx @lixin5257xxx/opsx-workflow setup ...`
|
|
37
34
|
- 自动化增强:`claude-code` adapter 支持 `claude -p` 自动执行并记录 `AUTO-RUN-LOG.md`(失败自动降级人工)
|
|
38
35
|
|
|
36
|
+
#### npm 发包流程
|
|
37
|
+
|
|
38
|
+
1. 发布前检查:`npm whoami`(确认已登录正确 npm 账号)
|
|
39
|
+
2. 构建产物:`npm run build`
|
|
40
|
+
3. 本地打包检查:`npm pack`(确认 tar 包内容包含 `dist/`、`src/templates/`、`README.md`)
|
|
41
|
+
4. (可选)在目标项目验证安装:`npm i -D ./sdd-flow-kit-<version>.tgz`,并执行 `npx sdd-flow-kit install --dry-run --plan-json`
|
|
42
|
+
5. 正式发布:
|
|
43
|
+
- 首次发布 scoped 包:`npm publish --access public`
|
|
44
|
+
- 非 scoped 或后续版本:`npm publish`
|
|
45
|
+
6. 发布后验证:在任意项目执行 `npm i -D sdd-flow-kit`,再执行 `npx sdd-flow-kit install`
|
|
46
|
+
|
|
47
|
+
版本升级建议:
|
|
48
|
+
|
|
49
|
+
1. 修改版本号:`npm version patch`(或 `minor` / `major`)
|
|
50
|
+
2. 重新执行构建与发布步骤
|
|
51
|
+
3. 在 `README.md` 或变更记录中补充本次升级说明
|
|
52
|
+
|
|
39
53
|
#### 参与贡献
|
|
40
54
|
|
|
41
55
|
1. Fork 本仓库
|
package/dist/cli.js
CHANGED
|
@@ -30,14 +30,15 @@ function printHelp() {
|
|
|
30
30
|
"1) 生成流程产物骨架:",
|
|
31
31
|
" npx sdd-flow-kit start --product ADI --version 2.3.2",
|
|
32
32
|
"",
|
|
33
|
-
"2)
|
|
34
|
-
" npx sdd-flow-kit
|
|
33
|
+
"2) 安装流程到当前项目(推荐,安装即用):",
|
|
34
|
+
" npx sdd-flow-kit install",
|
|
35
|
+
" (等价于: npx sdd-flow-kit setup)",
|
|
35
36
|
"",
|
|
36
37
|
"3) 生成骨架并进入可执行模式(推荐):",
|
|
37
38
|
" npx sdd-flow-kit run --product ADI --version 2.3.2 --agent claude-code",
|
|
38
39
|
"",
|
|
39
|
-
"4)
|
|
40
|
-
" npx sdd-flow-kit invoke \"开发
|
|
40
|
+
"4) 一句话触发(可选能力):",
|
|
41
|
+
" npx sdd-flow-kit invoke \"开发 XXX 1.2.3 需求\"",
|
|
41
42
|
"",
|
|
42
43
|
"5) 环境健检:",
|
|
43
44
|
" npx sdd-flow-kit doctor --agent claude-code",
|
|
@@ -60,7 +61,12 @@ async function main() {
|
|
|
60
61
|
printHelp();
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
|
-
if (cmd !== "start" &&
|
|
64
|
+
if (cmd !== "start" &&
|
|
65
|
+
cmd !== "run" &&
|
|
66
|
+
cmd !== "setup" &&
|
|
67
|
+
cmd !== "install" &&
|
|
68
|
+
cmd !== "doctor" &&
|
|
69
|
+
cmd !== "invoke") {
|
|
64
70
|
printHelp();
|
|
65
71
|
node_process_1.default.exitCode = 1;
|
|
66
72
|
return;
|
|
@@ -97,7 +103,7 @@ async function main() {
|
|
|
97
103
|
node_process_1.default.exitCode = 1;
|
|
98
104
|
return;
|
|
99
105
|
}
|
|
100
|
-
if (cmd === "setup") {
|
|
106
|
+
if (cmd === "setup" || cmd === "install") {
|
|
101
107
|
const result = await (0, setupProject_1.setupProject)({
|
|
102
108
|
projectRoot: node_path_1.default.resolve(projectRoot),
|
|
103
109
|
agent,
|
|
@@ -114,7 +120,7 @@ async function main() {
|
|
|
114
120
|
if (planJson) {
|
|
115
121
|
// eslint-disable-next-line no-console
|
|
116
122
|
console.log(JSON.stringify({
|
|
117
|
-
command:
|
|
123
|
+
command: cmd,
|
|
118
124
|
projectRoot: node_path_1.default.resolve(projectRoot),
|
|
119
125
|
dryRun,
|
|
120
126
|
result,
|