@chenmk/superflow 0.2.3 → 0.2.4
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 +15 -0
- package/README.zh-CN.md +8 -0
- package/package.json +3 -1
- package/scripts/postinstall.js +56 -0
package/README.md
CHANGED
|
@@ -81,6 +81,16 @@ state, and dependency guards for Claude Code, Codex, and OpenCode.
|
|
|
81
81
|
required: `> use SuperFlow to handle this requirement` triggers clarify →
|
|
82
82
|
docs → design → implement → verify → archive. Phase progression, guards,
|
|
83
83
|
hashes, and hooks are flow-enforced, not user-discipline.
|
|
84
|
+
- **`superflow check` audits document completeness.** Runs against a 13-item
|
|
85
|
+
required-file checklist per change. Missing a required doc? Exit 1. No more
|
|
86
|
+
surprises at the implement phase — the gate catches gaps while you're still
|
|
87
|
+
in docs.
|
|
88
|
+
- **`superflow config` tunes review depth per change.** `--review-mode
|
|
89
|
+
off|standard|thorough` controls code-review intensity; `--auto-transition`
|
|
90
|
+
controls automatic phase progression. Match the rigor to the risk.
|
|
91
|
+
- **Startup version check.** Every superflow command silently compares your
|
|
92
|
+
installed version against the npm registry. A new version triggers a
|
|
93
|
+
non-blocking upgrade hint on stderr.
|
|
84
94
|
|
|
85
95
|
## Workflow
|
|
86
96
|
|
|
@@ -165,6 +175,11 @@ best-effort and does not block initialization.
|
|
|
165
175
|
| `superflow implement` | Check implement-phase skill deployment |
|
|
166
176
|
| `superflow verify` | Check verify-phase skill deployment |
|
|
167
177
|
| `superflow archive` | Check archive-phase skill deployment |
|
|
178
|
+
| `superflow check <change>` | Audit 13-file SDD document completeness |
|
|
179
|
+
| `superflow config <change> --review-mode <mode>` | Set review depth (off/standard/thorough) |
|
|
180
|
+
| `superflow config <change> --auto-transition <bool>` | Toggle automatic phase progression |
|
|
181
|
+
| `superflow status` | List active changes with phase, tasks, and doc gaps |
|
|
182
|
+
| `superflow update --with-package` | Update superflow, OpenSpec, and Superpowers |
|
|
168
183
|
|
|
169
184
|
## Agent Usage
|
|
170
185
|
|
package/README.zh-CN.md
CHANGED
|
@@ -50,6 +50,9 @@ CLI 会把 SuperBridge Flow 技能、配套 hook/command 脚本整合为单一 n
|
|
|
50
50
|
- **5 个阶段 × 5+ 门禁脚本硬阻断。** `superflow-guard.sh` + `superflow-hook-guard.sh` + `superflow-contract-hooks.sh` + `superflow-sql-sync-hook.py` + `superflow-test-report-lint.py` + `superflow-verify-integration.sh`。没有 handoff hash 不进实现,没有真实入口证据不写"通过"。
|
|
51
51
|
- **用 handoff + state + sha256 治上下文漂移。** 长会话压缩、切 agent、并行 worktree——`.sdd/handoff/sdd-context.{md,json}` + sha256 + `.sdd/state.yaml` 让 Worker / Tester / Reviewer 始终基于同一份上下文,hash 对不上的旧 prompt 自动被 guard 拒绝。
|
|
52
52
|
- **用户只说一句话,流水线跑 9 步。** 不用写复杂 prompt:`> 用 SuperFlow 处理这个需求` 触发 clarify → docs → design → implement → verify → archive。阶段推进、guard、hash、hook 全是流程强制,不靠用户自觉。
|
|
53
|
+
- **`superflow check` 一键诊断文档缺口。** 对照 13 项必备 SDD 文件逐项核验,缺失即 exit 1。再也不会进了 implement 才发现 proposal 没写——check 在 docs 阶段就拦住你。
|
|
54
|
+
- **`superflow config` 按需调整审查强度。** `--review-mode off|standard|thorough` 控制代码审查深度;`--auto-transition` 控制阶段自动流转。不同改动匹配不同强度,省 token 不省质量。
|
|
55
|
+
- **启动自动检查新版本。** 每次执行 superflow 命令,后台静默对比 npm registry。发现新版本时 stderr 输出升级提示,不阻塞、不拖慢。
|
|
53
56
|
|
|
54
57
|
## 工作流
|
|
55
58
|
|
|
@@ -141,6 +144,11 @@ superflow init
|
|
|
141
144
|
| `superflow design [change]` | 校验 SuperBridge Flow design 阶段技能部署 |
|
|
142
145
|
| `superflow implement [task]` | 校验 SuperBridge Flow implement 阶段技能部署 |
|
|
143
146
|
| `superflow pipeline` | 校验 SuperBridge Flow pipeline 阶段技能部署 |
|
|
147
|
+
| `superflow check <change>` | 对照 13 项必备文件清单检查文档完整性 |
|
|
148
|
+
| `superflow config <change> --review-mode <mode>` | 设置代码审查强度(off/standard/thorough) |
|
|
149
|
+
| `superflow config <change> --auto-transition <bool>` | 控制阶段自动流转(true/false) |
|
|
150
|
+
| `superflow status` | 展示所有 active change 的阶段、任务、文档缺口 |
|
|
151
|
+
| `superflow update --with-package` | 更新 superflow 自身和 openspec/superpowers 依赖 |
|
|
144
152
|
|
|
145
153
|
## 系统支持
|
|
146
154
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chenmk/superflow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "SuperBridge Flow workflow CLI for Claude Code, Codex, and OpenCode",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"dist",
|
|
30
|
+
"scripts",
|
|
30
31
|
"assets",
|
|
31
32
|
"README.md",
|
|
32
33
|
"README.zh-CN.md",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build": "tsc",
|
|
38
39
|
"dev": "tsx watch src/cli/index.ts",
|
|
40
|
+
"postinstall": "node scripts/postinstall.js",
|
|
39
41
|
"prepack": "npm run build",
|
|
40
42
|
"prepublishOnly": "npm test && npm run build",
|
|
41
43
|
"test": "vitest run",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
4
|
+
import { dirname, join } from 'path';
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = dirname(__filename);
|
|
8
|
+
const pkgPath = join(__dirname, '..', 'package.json');
|
|
9
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
10
|
+
|
|
11
|
+
const LANGUAGE_ZH = 'zh';
|
|
12
|
+
const LANGUAGE_EN = 'en';
|
|
13
|
+
|
|
14
|
+
export function isGlobalInstall(env = process.env) {
|
|
15
|
+
return env.npm_config_global === 'true';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function resolveInstallLanguage(env = process.env) {
|
|
19
|
+
const lang = env.SUPERFLOW_LANG || env.LC_ALL || env.LANG || '';
|
|
20
|
+
const normalized = lang.toLowerCase();
|
|
21
|
+
if (normalized.includes('zh') || normalized.includes('cn')) return LANGUAGE_ZH;
|
|
22
|
+
if (normalized.includes('en')) return LANGUAGE_EN;
|
|
23
|
+
return LANGUAGE_ZH;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function buildInstallMessage(version, language) {
|
|
27
|
+
if (language === LANGUAGE_ZH) {
|
|
28
|
+
return [
|
|
29
|
+
`✅ @chenmk/superflow v${version} 安装成功`,
|
|
30
|
+
'',
|
|
31
|
+
' 快速开始:',
|
|
32
|
+
' superflow init # 在当前项目初始化',
|
|
33
|
+
' superflow --help # 查看全部命令',
|
|
34
|
+
].join('\n');
|
|
35
|
+
}
|
|
36
|
+
return [
|
|
37
|
+
`✅ @chenmk/superflow v${version} installed successfully`,
|
|
38
|
+
'',
|
|
39
|
+
' Quick start:',
|
|
40
|
+
' superflow init # Initialize in current project',
|
|
41
|
+
' superflow --help # Show all commands',
|
|
42
|
+
].join('\n');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function printInstallMessage(version, language) {
|
|
46
|
+
console.log(buildInstallMessage(version, language));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function runPostinstall(env = process.env) {
|
|
50
|
+
if (!isGlobalInstall(env)) return;
|
|
51
|
+
printInstallMessage(pkg.version, resolveInstallLanguage(env));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
55
|
+
runPostinstall();
|
|
56
|
+
}
|