@chenmk/superflow 0.3.0 → 0.4.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 +20 -1
- package/README.zh-CN.md +16 -1
- package/assets/manifest.json +5 -4
- package/assets/prompts/superflow-design.md +3 -0
- package/assets/prompts/superflow-docs.md +4 -1
- package/assets/scripts/superflow-dependency-update-hook.sh +1 -1
- package/assets/scripts/superflow-managed-work-check.mjs +194 -0
- package/assets/scripts/superflow-managed-work-guard.sh +103 -0
- package/assets/skills/openspec-propose/SKILL.md +11 -0
- package/assets/skills/superflow-design/SKILL.md +18 -9
- package/assets/skills/superflow-docs/SKILL.md +16 -0
- package/assets/skills/superflow-pipeline/SKILL.md +46 -0
- package/assets/skills/superflow-pipeline/references/document-templates.md +8 -0
- package/assets/skills/superflow-pipeline/references/managed-work.md +58 -0
- package/assets/skills/superflow-pipeline/references/quality-gate.md +1 -0
- package/assets/skills/superflow-pipeline/references/superpower-technical-design-template.md +10 -0
- package/assets/skills/superflow-pipeline/scripts/superflow-archive.sh +1 -1
- package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +79 -9
- package/assets/skills-en/openspec-propose/SKILL.md +14 -0
- package/assets/skills-en/superflow-design/SKILL.md +18 -8
- package/assets/skills-en/superflow-docs/SKILL.md +16 -0
- package/assets/skills-en/superflow-pipeline/SKILL.md +48 -0
- package/assets/skills-en/superflow-pipeline/references/document-templates.md +5 -0
- package/assets/skills-en/superflow-pipeline/references/managed-work.md +34 -0
- package/assets/skills-en/superflow-pipeline/references/quality-gate.md +8 -0
- package/assets/skills-en/superflow-pipeline/references/superpower-technical-design-template.md +11 -0
- package/assets/skills-en/superflow-pipeline/scripts/superflow-archive.sh +1 -1
- package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +78 -9
- package/dist/app/cli.js +120 -102
- package/dist/app/cli.js.map +1 -1
- package/dist/app/commands/init.js +6 -2
- package/dist/app/commands/init.js.map +1 -1
- package/dist/app/commands/managed-service.js +5 -0
- package/dist/app/commands/managed-service.js.map +1 -0
- package/dist/app/commands/pipeline.js +123 -3
- package/dist/app/commands/pipeline.js.map +1 -1
- package/dist/app/commands/status.js +199 -77
- package/dist/app/commands/status.js.map +1 -1
- package/dist/app/commands/uninstall.js +5 -2
- package/dist/app/commands/uninstall.js.map +1 -1
- package/dist/app/commands/update.js +31 -6
- package/dist/app/commands/update.js.map +1 -1
- package/dist/domains/config/cli-help.js +103 -73
- package/dist/domains/config/cli-help.js.map +1 -1
- package/dist/domains/deps.js +2 -1
- package/dist/domains/deps.js.map +1 -1
- package/dist/domains/hook.js +71 -38
- package/dist/domains/hook.js.map +1 -1
- package/dist/domains/managed-work/contract.js +218 -0
- package/dist/domains/managed-work/contract.js.map +1 -0
- package/dist/domains/managed-work/i18n.js +12 -0
- package/dist/domains/managed-work/i18n.js.map +1 -0
- package/dist/domains/managed-work/input.js +111 -0
- package/dist/domains/managed-work/input.js.map +1 -0
- package/dist/domains/managed-work/journal.js +122 -0
- package/dist/domains/managed-work/journal.js.map +1 -0
- package/dist/domains/managed-work/lock.js +40 -0
- package/dist/domains/managed-work/lock.js.map +1 -0
- package/dist/domains/managed-work/notifications.js +53 -0
- package/dist/domains/managed-work/notifications.js.map +1 -0
- package/dist/domains/managed-work/paths.js +18 -0
- package/dist/domains/managed-work/paths.js.map +1 -0
- package/dist/domains/managed-work/prompts.js +218 -0
- package/dist/domains/managed-work/prompts.js.map +1 -0
- package/dist/domains/managed-work/runner.js +626 -0
- package/dist/domains/managed-work/runner.js.map +1 -0
- package/dist/domains/managed-work/schemas.js +85 -0
- package/dist/domains/managed-work/schemas.js.map +1 -0
- package/dist/domains/managed-work/service.js +121 -0
- package/dist/domains/managed-work/service.js.map +1 -0
- package/dist/domains/managed-work/state.js +90 -0
- package/dist/domains/managed-work/state.js.map +1 -0
- package/dist/domains/managed-work/storage.js +181 -0
- package/dist/domains/managed-work/storage.js.map +1 -0
- package/dist/domains/managed-work/types.js +16 -0
- package/dist/domains/managed-work/types.js.map +1 -0
- package/dist/domains/managed-work/wait.js +40 -0
- package/dist/domains/managed-work/wait.js.map +1 -0
- package/dist/platform/agent-process.js +308 -0
- package/dist/platform/agent-process.js.map +1 -0
- package/dist/platform/process-liveness.js +10 -0
- package/dist/platform/process-liveness.js.map +1 -0
- package/dist/platform/version-check.js +30 -9
- package/dist/platform/version-check.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ VALIDATE="$SCRIPT_DIR/superflow-yaml-validate.sh"
|
|
|
24
24
|
CHANGE_DIR="${1:-}"
|
|
25
25
|
PHASE="${2:-}"
|
|
26
26
|
MODE="${3:-}"
|
|
27
|
+
CHANGE_DIR_INPUT="${CHANGE_DIR%/}"
|
|
27
28
|
|
|
28
29
|
[[ -n "$CHANGE_DIR" && -n "$PHASE" ]] || {
|
|
29
30
|
usage
|
|
@@ -35,6 +36,25 @@ MODE="${3:-}"
|
|
|
35
36
|
CHANGE_DIR="$(cd "$CHANGE_DIR" && pwd)"
|
|
36
37
|
issues=()
|
|
37
38
|
|
|
39
|
+
require_canonical_change_layout() {
|
|
40
|
+
local suffix
|
|
41
|
+
|
|
42
|
+
if [[ -L "$CHANGE_DIR_INPUT" ]]; then
|
|
43
|
+
issues+=("symlinked OpenSpec change directory is forbidden; keep one physical openspec/changes/<change-name> directory")
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
[[ "$CHANGE_DIR" == */openspec/changes/* ]] || return 0
|
|
47
|
+
suffix="${CHANGE_DIR#*/openspec/changes/}"
|
|
48
|
+
case "$suffix" in
|
|
49
|
+
archive/*|*/embedded-changes/*) return 0 ;;
|
|
50
|
+
esac
|
|
51
|
+
if [[ "$suffix" == */* ]]; then
|
|
52
|
+
issues+=("non-canonical OpenSpec change directory: encode the version in <change-name> and use openspec/changes/<change-name>")
|
|
53
|
+
fi
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
require_canonical_change_layout
|
|
57
|
+
|
|
38
58
|
require_file() {
|
|
39
59
|
local path="$1"
|
|
40
60
|
[[ -f "$CHANGE_DIR/$path" ]] || issues+=("missing file: $path")
|
|
@@ -302,15 +322,29 @@ change_has_field_status_risk() {
|
|
|
302
322
|
"$CHANGE_DIR"/*.md "$CHANGE_DIR"/**/*.md 2>/dev/null
|
|
303
323
|
}
|
|
304
324
|
|
|
325
|
+
change_contract_docs_without_complexity_budget() {
|
|
326
|
+
local path
|
|
327
|
+
for path in proposal.md api.md design.md tests.md spec.md; do
|
|
328
|
+
[[ -f "$CHANGE_DIR/$path" ]] || continue
|
|
329
|
+
sed -E '/New-item counts|Complexity budget/d' "$CHANGE_DIR/$path"
|
|
330
|
+
done
|
|
331
|
+
if [[ -d "$CHANGE_DIR/specs" ]]; then
|
|
332
|
+
find "$CHANGE_DIR/specs" -path '*/spec.md' -type f \
|
|
333
|
+
-exec sed -E '/New-item counts|Complexity budget/d' {} +
|
|
334
|
+
fi
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
change_all_docs_without_complexity_budget() {
|
|
338
|
+
find "$CHANGE_DIR" -maxdepth 2 -name '*.md' -type f \
|
|
339
|
+
-exec sed -E '/New-item counts|Complexity budget/d' {} +
|
|
340
|
+
}
|
|
341
|
+
|
|
305
342
|
change_has_external_config_risk() {
|
|
306
|
-
|
|
343
|
+
local content
|
|
344
|
+
content="$(change_contract_docs_without_complexity_budget)"
|
|
345
|
+
grep -Eiq \
|
|
307
346
|
'third[- ]party|external (platform|tool|integration|system)|SDK|MQ|Kafka|RocketMQ|TDMQ|callback|webhook|payment gateway|cloud service' \
|
|
308
|
-
"$
|
|
309
|
-
"$CHANGE_DIR/api.md" \
|
|
310
|
-
"$CHANGE_DIR/design.md" \
|
|
311
|
-
"$CHANGE_DIR/tests.md" \
|
|
312
|
-
"$CHANGE_DIR/spec.md" \
|
|
313
|
-
"$CHANGE_DIR"/specs/*/spec.md 2>/dev/null
|
|
347
|
+
<<< "$content"
|
|
314
348
|
}
|
|
315
349
|
|
|
316
350
|
change_has_concurrency_idempotency_risk() {
|
|
@@ -347,9 +381,11 @@ change_has_fx_precision_risk() {
|
|
|
347
381
|
}
|
|
348
382
|
|
|
349
383
|
change_has_architecture_boundary_risk() {
|
|
350
|
-
|
|
384
|
+
local content
|
|
385
|
+
content="$(change_all_docs_without_complexity_budget)"
|
|
386
|
+
grep -Eiq \
|
|
351
387
|
'cross-repo|cross-service|sibling|SDK|MQ|topic|consumer|scheduler|scheduled|device|callback|third[- ]party|mini[- ]program|gateway|adapter|protocol|interconnect|call chain|entry|exit' \
|
|
352
|
-
|
|
388
|
+
<<< "$content"
|
|
353
389
|
}
|
|
354
390
|
|
|
355
391
|
first_prompt_rel() {
|
|
@@ -460,6 +496,29 @@ require_money_precision_evidence() {
|
|
|
460
496
|
fi
|
|
461
497
|
}
|
|
462
498
|
|
|
499
|
+
require_minimal_design_review() {
|
|
500
|
+
local path="$1"
|
|
501
|
+
local label="$2"
|
|
502
|
+
require_grep 'Minimal Design Review|Complexity Reduction Review' "$path" "$label"
|
|
503
|
+
require_grep 'reuse|existing capability|existing module' "$path" "$label reuse evidence"
|
|
504
|
+
require_grep 'simplest|minimum design|minimal implementation' "$path" "$label simplest implementation"
|
|
505
|
+
require_grep 'removed|rejected|do not add|out of scope' "$path" "$label removed or rejected complexity"
|
|
506
|
+
require_grep 'New-item counts|Complexity budget' "$path" "$label complexity budget"
|
|
507
|
+
require_grep 'table' "$path" "$label table count"
|
|
508
|
+
require_grep 'field' "$path" "$label field count"
|
|
509
|
+
require_grep 'API' "$path" "$label API count"
|
|
510
|
+
require_grep 'service|component' "$path" "$label service/component count"
|
|
511
|
+
require_grep 'cache' "$path" "$label cache count"
|
|
512
|
+
require_grep 'MQ|event|async' "$path" "$label async/event count"
|
|
513
|
+
require_grep 'scheduled job|scheduler' "$path" "$label scheduled-job count"
|
|
514
|
+
require_grep 'compatibility layer' "$path" "$label compatibility-layer count"
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
require_minimal_design_pass() {
|
|
518
|
+
local path="$1"
|
|
519
|
+
require_grep '(Minimal Design Review|Complexity Reduction Review).*PASS|PASS.*(Minimal Design Review|Complexity Reduction Review)' "$path" "complexity reduction review PASS verdict"
|
|
520
|
+
}
|
|
521
|
+
|
|
463
522
|
transition_event=""
|
|
464
523
|
|
|
465
524
|
if [[ -x "$VALIDATE" && -f "$CHANGE_DIR/.sdd/state.yaml" ]]; then
|
|
@@ -489,6 +548,12 @@ case "$PHASE" in
|
|
|
489
548
|
require_grep 'RED|red-green|GREEN' tests.md "RED/GREEN test contract"
|
|
490
549
|
require_grep 'curl|Postman|Newman|pytest|RestAssured|automation command' tests.md "interface automation command"
|
|
491
550
|
require_grep 'handoff_hash|sdd-context|context package|anti-drift' sdd-quality-gate.md "handoff/context-drift gate"
|
|
551
|
+
workflow="$(state_get workflow)"
|
|
552
|
+
if [[ "$workflow" == "full" ]]; then
|
|
553
|
+
require_minimal_design_review design.md "complexity reduction review"
|
|
554
|
+
require_grep 'Minimal Design Review|Complexity Reduction Review' sdd-quality-gate.md "complexity reduction quality gate"
|
|
555
|
+
require_minimal_design_pass sdd-quality-gate.md
|
|
556
|
+
fi
|
|
492
557
|
if change_has_money_precision_risk; then
|
|
493
558
|
require_grep 'Money Precision Boundary' sdd-quality-gate.md "money precision quality gate"
|
|
494
559
|
fi
|
|
@@ -520,6 +585,9 @@ case "$PHASE" in
|
|
|
520
585
|
require_hash_recorded
|
|
521
586
|
workflow="$(state_get workflow)"
|
|
522
587
|
if [[ "$workflow" == "full" ]]; then
|
|
588
|
+
require_minimal_design_review design.md "complexity reduction review"
|
|
589
|
+
require_grep 'Minimal Design Review|Complexity Reduction Review' sdd-quality-gate.md "complexity reduction quality gate"
|
|
590
|
+
require_minimal_design_pass sdd-quality-gate.md
|
|
523
591
|
require_optional_state_path technical_design "technical_design"
|
|
524
592
|
technical_design_rel="$(state_get technical_design)"
|
|
525
593
|
if [[ -n "${technical_design_rel:-}" && "$technical_design_rel" != "null" ]]; then
|
|
@@ -540,6 +608,7 @@ case "$PHASE" in
|
|
|
540
608
|
if change_has_money_precision_risk; then
|
|
541
609
|
require_money_precision_contract "$technical_design_rel" "money precision boundary"
|
|
542
610
|
fi
|
|
611
|
+
require_minimal_design_review "$technical_design_rel" "technical design minimal design review"
|
|
543
612
|
fi
|
|
544
613
|
fi
|
|
545
614
|
require_grep 'Superpowers Technical Design Handoff|Superpowers Technical Design|technical_design|source-level HOW' design.md "Superpowers technical design handoff"
|
package/dist/app/cli.js
CHANGED
|
@@ -1,213 +1,231 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Command } from
|
|
3
|
-
import { readFileSync } from
|
|
4
|
-
import { fileURLToPath } from
|
|
5
|
-
import { dirname, join } from
|
|
6
|
-
import { cliText, resolveCliLanguage } from
|
|
7
|
-
import { checkForUpdates } from
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { readFileSync } from "fs";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import { dirname, join } from "path";
|
|
6
|
+
import { cliText, resolveCliLanguage } from "../domains/config/cli-help.js";
|
|
7
|
+
import { checkForUpdates } from "../platform/version-check.js";
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = dirname(__filename);
|
|
10
|
-
const pkgPath = join(__dirname,
|
|
11
|
-
const pkg = JSON.parse(readFileSync(pkgPath,
|
|
10
|
+
const pkgPath = join(__dirname, "..", "..", "package.json");
|
|
11
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
12
12
|
// 启动时后台检查新版本(非阻塞,不 await)
|
|
13
13
|
checkForUpdates(pkg.version);
|
|
14
14
|
const program = new Command();
|
|
15
15
|
const helpText = cliText(resolveCliLanguage());
|
|
16
16
|
function resolveTargetPathArg(value, command, commandName) {
|
|
17
|
-
if (typeof value ===
|
|
17
|
+
if (typeof value === "string" && value.length > 0 && value !== ".")
|
|
18
18
|
return value;
|
|
19
19
|
const args = command?.args;
|
|
20
20
|
const first = args?.[0];
|
|
21
|
-
if (typeof first ===
|
|
21
|
+
if (typeof first === "string" && first.length > 0)
|
|
22
22
|
return first;
|
|
23
23
|
const index = process.argv.indexOf(commandName);
|
|
24
24
|
if (index >= 0) {
|
|
25
|
-
const valueOptions = new Set([
|
|
26
|
-
'--agent',
|
|
27
|
-
'--scope',
|
|
28
|
-
]);
|
|
25
|
+
const valueOptions = new Set(["--agent", "--scope"]);
|
|
29
26
|
for (let i = index + 1; i < process.argv.length; i++) {
|
|
30
27
|
const arg = process.argv[i];
|
|
31
28
|
if (valueOptions.has(arg)) {
|
|
32
29
|
i++;
|
|
33
30
|
continue;
|
|
34
31
|
}
|
|
35
|
-
if (!arg.startsWith(
|
|
32
|
+
if (!arg.startsWith("-"))
|
|
36
33
|
return arg;
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
|
-
return
|
|
36
|
+
return ".";
|
|
40
37
|
}
|
|
41
38
|
function commandOptions(options) {
|
|
42
|
-
const opts = options
|
|
39
|
+
const opts = options
|
|
40
|
+
?.opts;
|
|
43
41
|
return {
|
|
44
42
|
...program.opts(),
|
|
45
|
-
...(typeof opts ===
|
|
43
|
+
...(typeof opts === "function"
|
|
44
|
+
? opts.call(options)
|
|
45
|
+
: { ...options }),
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
program
|
|
49
|
-
.name(
|
|
49
|
+
.name("superflow")
|
|
50
50
|
.description(helpText.programDescription)
|
|
51
|
-
.option(
|
|
52
|
-
.option(
|
|
51
|
+
.option("--language <language>", helpText.languageOption)
|
|
52
|
+
.option("--lang <language>", helpText.languageOption)
|
|
53
53
|
.version(pkg.version);
|
|
54
54
|
program
|
|
55
|
-
.command(
|
|
55
|
+
.command("init [targetPath]")
|
|
56
56
|
.description(helpText.initDescription)
|
|
57
|
-
.option(
|
|
58
|
-
.option(
|
|
59
|
-
.option(
|
|
60
|
-
.option(
|
|
61
|
-
.option(
|
|
62
|
-
.option(
|
|
63
|
-
.option(
|
|
64
|
-
.option(
|
|
65
|
-
.option(
|
|
66
|
-
.option(
|
|
67
|
-
.option(
|
|
68
|
-
.option(
|
|
57
|
+
.option("--dry-run", helpText.dryRun)
|
|
58
|
+
.option("--agent <agent>", helpText.agentOption)
|
|
59
|
+
.option("--scope <scope>", helpText.scopeOption, "global")
|
|
60
|
+
.option("--language <language>", helpText.languageOption)
|
|
61
|
+
.option("--yes", helpText.yesOption)
|
|
62
|
+
.option("--json", helpText.jsonOption)
|
|
63
|
+
.option("--resume", helpText.resumeOption)
|
|
64
|
+
.option("--skip-existing", helpText.skipExistingOption)
|
|
65
|
+
.option("--overwrite", helpText.overwriteOption)
|
|
66
|
+
.option("--no-hooks", helpText.noHooksOption)
|
|
67
|
+
.option("--no-openspec-init", helpText.noOpenspecInitOption)
|
|
68
|
+
.option("--no-scan", helpText.noScanOption)
|
|
69
69
|
.action(async (targetPath, options) => {
|
|
70
|
-
const { initCommand } = await import(
|
|
70
|
+
const { initCommand } = await import("./commands/init.js");
|
|
71
71
|
await initCommand({
|
|
72
72
|
...commandOptions(options),
|
|
73
|
-
targetPath: resolveTargetPathArg(targetPath, options,
|
|
73
|
+
targetPath: resolveTargetPathArg(targetPath, options, "init"),
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
program
|
|
77
|
-
.command(
|
|
77
|
+
.command("scan")
|
|
78
78
|
.description(helpText.scanDescription)
|
|
79
|
-
.option(
|
|
80
|
-
.option(
|
|
81
|
-
.option(
|
|
79
|
+
.option("--dry-run", helpText.dryRun)
|
|
80
|
+
.option("--force", helpText.forceOption)
|
|
81
|
+
.option("--language <language>", helpText.languageOption)
|
|
82
82
|
.action(async (options) => {
|
|
83
|
-
const { scanCommand } = await import(
|
|
83
|
+
const { scanCommand } = await import("./commands/scan.js");
|
|
84
84
|
await scanCommand(commandOptions(options));
|
|
85
85
|
});
|
|
86
86
|
program
|
|
87
|
-
.command(
|
|
87
|
+
.command("clarify [feature]")
|
|
88
88
|
.description(helpText.clarifyDescription)
|
|
89
|
-
.option(
|
|
89
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
90
90
|
.action(async (feature, options) => {
|
|
91
|
-
const { clarifyCommand } = await import(
|
|
91
|
+
const { clarifyCommand } = await import("./commands/clarify.js");
|
|
92
92
|
await clarifyCommand(feature, options);
|
|
93
93
|
});
|
|
94
94
|
program
|
|
95
|
-
.command(
|
|
95
|
+
.command("docs [change]")
|
|
96
96
|
.description(helpText.docsDescription)
|
|
97
|
-
.option(
|
|
97
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
98
98
|
.action(async (change, options) => {
|
|
99
|
-
const { docsCommand } = await import(
|
|
99
|
+
const { docsCommand } = await import("./commands/docs.js");
|
|
100
100
|
await docsCommand(change, options);
|
|
101
101
|
});
|
|
102
102
|
program
|
|
103
|
-
.command(
|
|
103
|
+
.command("design [change]")
|
|
104
104
|
.description(helpText.designDescription)
|
|
105
|
-
.option(
|
|
105
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
106
106
|
.action(async (change, options) => {
|
|
107
|
-
const { designCommand } = await import(
|
|
107
|
+
const { designCommand } = await import("./commands/design.js");
|
|
108
108
|
await designCommand(change, options);
|
|
109
109
|
});
|
|
110
110
|
program
|
|
111
|
-
.command(
|
|
111
|
+
.command("implement [task]")
|
|
112
112
|
.description(helpText.implementDescription)
|
|
113
|
-
.option(
|
|
113
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
114
114
|
.action(async (task, options) => {
|
|
115
|
-
const { implementCommand } = await import(
|
|
115
|
+
const { implementCommand } = await import("./commands/implement.js");
|
|
116
116
|
await implementCommand(task, options);
|
|
117
117
|
});
|
|
118
118
|
program
|
|
119
|
-
.command(
|
|
119
|
+
.command("pipeline [request]")
|
|
120
120
|
.description(helpText.pipelineDescription)
|
|
121
|
-
.option(
|
|
121
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
122
|
+
.option("--managed", helpText.managedOption)
|
|
123
|
+
.option("--project <path>", helpText.managedProjectOption)
|
|
124
|
+
.option("--profile <profile>", helpText.managedProfileOption, "auto")
|
|
125
|
+
.option("--supervisor <agent>", helpText.managedSupervisorOption, "codex")
|
|
126
|
+
.option("--executor <agent>", helpText.managedExecutorOption)
|
|
127
|
+
.option("--add-dir <paths...>", helpText.managedAddDirOption)
|
|
128
|
+
.option("--resume-task <taskId>", helpText.managedResumeOption)
|
|
129
|
+
.option("--language <language>", helpText.languageOption)
|
|
130
|
+
.option("--dry-run", helpText.dryRun)
|
|
131
|
+
.action(async (request, options) => {
|
|
132
|
+
const { pipelineCommand } = await import("./commands/pipeline.js");
|
|
133
|
+
await pipelineCommand(request, commandOptions(options));
|
|
134
|
+
});
|
|
135
|
+
program
|
|
136
|
+
.command("managed-service", { hidden: true })
|
|
137
|
+
.option("--once")
|
|
122
138
|
.action(async (options) => {
|
|
123
|
-
const {
|
|
124
|
-
await
|
|
139
|
+
const { managedServiceCommand } = await import("./commands/managed-service.js");
|
|
140
|
+
await managedServiceCommand(options);
|
|
125
141
|
});
|
|
126
142
|
program
|
|
127
|
-
.command(
|
|
143
|
+
.command("verify [change]")
|
|
128
144
|
.description(helpText.verifyDescription)
|
|
129
|
-
.option(
|
|
145
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
130
146
|
.action(async (change, options) => {
|
|
131
|
-
const { verifyCommand } = await import(
|
|
147
|
+
const { verifyCommand } = await import("./commands/verify.js");
|
|
132
148
|
await verifyCommand(change, options);
|
|
133
149
|
});
|
|
134
150
|
program
|
|
135
|
-
.command(
|
|
151
|
+
.command("archive [change]")
|
|
136
152
|
.description(helpText.archiveDescription)
|
|
137
|
-
.option(
|
|
153
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
138
154
|
.action(async (change, options) => {
|
|
139
|
-
const { archiveCommand } = await import(
|
|
155
|
+
const { archiveCommand } = await import("./commands/archive.js");
|
|
140
156
|
await archiveCommand(change, options);
|
|
141
157
|
});
|
|
142
158
|
program
|
|
143
|
-
.command(
|
|
159
|
+
.command("status [path]")
|
|
144
160
|
.description(helpText.statusDescription)
|
|
145
|
-
.option(
|
|
146
|
-
.
|
|
147
|
-
|
|
148
|
-
await
|
|
161
|
+
.option("--json", helpText.jsonOption)
|
|
162
|
+
.option("--language <language>", helpText.languageOption)
|
|
163
|
+
.action(async (targetPath = ".", options) => {
|
|
164
|
+
const { statusCommand } = await import("./commands/status.js");
|
|
165
|
+
await statusCommand(targetPath, commandOptions(options));
|
|
149
166
|
});
|
|
150
167
|
program
|
|
151
|
-
.command(
|
|
168
|
+
.command("update [targetPath]")
|
|
152
169
|
.description(helpText.updateDescription)
|
|
153
|
-
.option(
|
|
154
|
-
.option(
|
|
155
|
-
.option(
|
|
156
|
-
.option(
|
|
157
|
-
.option(
|
|
158
|
-
.option(
|
|
170
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
171
|
+
.option("--scope <scope>", helpText.updateScopeOption, "auto")
|
|
172
|
+
.option("--dry-run", helpText.dryRun)
|
|
173
|
+
.option("--json", helpText.jsonOption)
|
|
174
|
+
.option("--no-hooks", helpText.noHooksUpdateOption)
|
|
175
|
+
.option("--with-package", helpText.withPackageOption)
|
|
176
|
+
.option("--language <language>", helpText.languageOption)
|
|
159
177
|
.action(async (targetPath, options) => {
|
|
160
|
-
const { updateCommand } = await import(
|
|
178
|
+
const { updateCommand } = await import("./commands/update.js");
|
|
161
179
|
await updateCommand({
|
|
162
180
|
...commandOptions(options),
|
|
163
|
-
targetPath: resolveTargetPathArg(targetPath, options,
|
|
181
|
+
targetPath: resolveTargetPathArg(targetPath, options, "update"),
|
|
164
182
|
});
|
|
165
183
|
});
|
|
166
184
|
program
|
|
167
|
-
.command(
|
|
185
|
+
.command("doctor [targetPath]")
|
|
168
186
|
.description(helpText.doctorDescription)
|
|
169
|
-
.option(
|
|
170
|
-
.option(
|
|
171
|
-
.option(
|
|
187
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
188
|
+
.option("--scope <scope>", helpText.commandScopeOption, "global")
|
|
189
|
+
.option("--json", helpText.jsonOption)
|
|
172
190
|
.action(async (targetPath, options) => {
|
|
173
|
-
const { doctorCommand } = await import(
|
|
191
|
+
const { doctorCommand } = await import("./commands/doctor.js");
|
|
174
192
|
await doctorCommand({
|
|
175
193
|
...commandOptions(options),
|
|
176
|
-
targetPath: resolveTargetPathArg(targetPath, options,
|
|
194
|
+
targetPath: resolveTargetPathArg(targetPath, options, "doctor"),
|
|
177
195
|
});
|
|
178
196
|
});
|
|
179
197
|
program
|
|
180
|
-
.command(
|
|
198
|
+
.command("uninstall [targetPath]")
|
|
181
199
|
.description(helpText.uninstallDescription)
|
|
182
|
-
.option(
|
|
183
|
-
.option(
|
|
184
|
-
.option(
|
|
185
|
-
.option(
|
|
186
|
-
.option(
|
|
187
|
-
.option(
|
|
200
|
+
.option("--agent <agent>", helpText.agentOption, "both")
|
|
201
|
+
.option("--scope <scope>", helpText.commandScopeOption, "global")
|
|
202
|
+
.option("--dry-run", helpText.dryRun)
|
|
203
|
+
.option("--json", helpText.jsonOption)
|
|
204
|
+
.option("--force", helpText.uninstallForceOption)
|
|
205
|
+
.option("--with-deps", helpText.withDepsOption)
|
|
188
206
|
.action(async (targetPath, options) => {
|
|
189
|
-
const { uninstallCommand } = await import(
|
|
207
|
+
const { uninstallCommand } = await import("./commands/uninstall.js");
|
|
190
208
|
await uninstallCommand({
|
|
191
209
|
...commandOptions(options),
|
|
192
|
-
targetPath: resolveTargetPathArg(targetPath, options,
|
|
210
|
+
targetPath: resolveTargetPathArg(targetPath, options, "uninstall"),
|
|
193
211
|
});
|
|
194
212
|
});
|
|
195
213
|
program
|
|
196
|
-
.command(
|
|
197
|
-
.description(
|
|
198
|
-
.option(
|
|
214
|
+
.command("check <change>")
|
|
215
|
+
.description("检查 SDD change 的文档完整性")
|
|
216
|
+
.option("--json", "输出 JSON")
|
|
199
217
|
.action(async (change, options) => {
|
|
200
|
-
const { checkCommand } = await import(
|
|
218
|
+
const { checkCommand } = await import("./commands/check.js");
|
|
201
219
|
await checkCommand(change, { json: options.json });
|
|
202
220
|
});
|
|
203
221
|
program
|
|
204
|
-
.command(
|
|
205
|
-
.description(
|
|
206
|
-
.option(
|
|
207
|
-
.option(
|
|
208
|
-
.option(
|
|
222
|
+
.command("config <change>")
|
|
223
|
+
.description("Set workflow config for a change (review_mode, auto_transition)")
|
|
224
|
+
.option("--review-mode <mode>", "Review mode: off | standard | thorough")
|
|
225
|
+
.option("--auto-transition <bool>", "Auto-advance phases: true | false")
|
|
226
|
+
.option("--json", "Output JSON")
|
|
209
227
|
.action(async (change, options) => {
|
|
210
|
-
const { configCommand } = await import(
|
|
228
|
+
const { configCommand } = await import("./commands/config.js");
|
|
211
229
|
await configCommand(change, {
|
|
212
230
|
reviewMode: options.reviewMode,
|
|
213
231
|
autoTransition: options.autoTransition,
|
package/dist/app/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/app/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YA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C,0BAA0B,EAAE,mCAAmC,CAAC;KACvE,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC;KAC/B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAC/D,MAAM,aAAa,CAAC,MAAM,EAAE;QAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { stdin as input, stdout as output } from 'process';
|
|
|
5
5
|
import { detectOS } from '../../platform/os.js';
|
|
6
6
|
import { getPlatformPaths, stateFile } from '../../platform/paths.js';
|
|
7
7
|
import { parseAgentSelection, parseInstallScope, resolveAgents, } from '../../domains/agent.js';
|
|
8
|
-
import { installOpenspec, initializeOpenspec, openspecInitArgs, installSuperpowers, installCodexSuperpowers, installUnderstand, installCodexUnderstand, installApiDocChangelog, } from '../../domains/deps.js';
|
|
8
|
+
import { CODEX_SUPERPOWERS_PLUGIN, installOpenspec, initializeOpenspec, openspecInitArgs, installSuperpowers, installCodexSuperpowers, installUnderstand, installCodexUnderstand, installApiDocChangelog, } from '../../domains/deps.js';
|
|
9
9
|
import { deploySkill } from '../../domains/skill/deploy.js';
|
|
10
10
|
import { deployScripts } from '../../domains/skill/scripts.js';
|
|
11
11
|
import { deployPrompts } from '../../domains/skill/prompts.js';
|
|
@@ -253,7 +253,8 @@ export async function runInit(options) {
|
|
|
253
253
|
log('[dry-run] Claude plugins: superpowers / understand-anything / api-doc');
|
|
254
254
|
}
|
|
255
255
|
if (agents.includes('codex')) {
|
|
256
|
-
log(
|
|
256
|
+
log(`[dry-run] codex plugin add ${CODEX_SUPERPOWERS_PLUGIN}`);
|
|
257
|
+
log('[dry-run] Codex skills: understand-anything / api-doc');
|
|
257
258
|
}
|
|
258
259
|
if (agents.includes('opencode')) {
|
|
259
260
|
log('[dry-run] OpenCode: deploy skills/commands/scripts/rules; native hooks are not registered');
|
|
@@ -290,6 +291,9 @@ export async function runInit(options) {
|
|
|
290
291
|
const sup = await installCodexSuperpowers();
|
|
291
292
|
if (!sup.ok)
|
|
292
293
|
throw new Error(`codex superpowers install failed: ${sup.error}`);
|
|
294
|
+
log(zh
|
|
295
|
+
? ' ✓ Codex Superpowers 已安装,包含验证、代码评审和分支收尾技能'
|
|
296
|
+
: ' ✓ Codex Superpowers installed for verification, code review, and branch closeout');
|
|
293
297
|
const und = await installCodexUnderstand();
|
|
294
298
|
if (!und.ok)
|
|
295
299
|
warn(`[WARN] codex understand-anything: ${und.error}`);
|