musubix2 0.5.0 → 0.5.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/.musubix-managed +1 -1
- package/dist/assets/skills-manifest.json +1 -1
- package/dist/cli.d.ts +10 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +156 -79
- package/dist/cli.js.map +1 -1
- package/dist/index.js +155 -79
- package/dist/interface/cli/init-command-handler.d.ts +6 -0
- package/dist/interface/cli/init-command-handler.d.ts.map +1 -1
- package/dist/interface/cli/init-command-handler.js +61 -10
- package/dist/interface/cli/init-command-handler.js.map +1 -1
- package/dist/templates/claude-md.md +21 -0
- package/package.json +1 -1
package/.claude/.musubix-managed
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generator":"musubix2","version":"0.5.
|
|
1
|
+
{"generator":"musubix2","version":"0.5.1","timestamp":"2026-07-09T07:56:54.900Z"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface CLICommand {
|
|
|
32
32
|
description: string;
|
|
33
33
|
default?: unknown;
|
|
34
34
|
}>;
|
|
35
|
-
action: (args: Record<string, unknown>) => Promise<void>;
|
|
35
|
+
action: (args: Record<string, unknown>) => Promise<ExitCodeValue | void>;
|
|
36
36
|
}
|
|
37
37
|
export interface CLIConfig {
|
|
38
38
|
name: string;
|
|
@@ -48,7 +48,7 @@ export declare class CLIDispatcher {
|
|
|
48
48
|
registerBatch(commands: CLICommand[]): void;
|
|
49
49
|
getCommand(name: string): CLICommand | undefined;
|
|
50
50
|
listCommands(): CLICommand[];
|
|
51
|
-
dispatch(commandName: string, args?: Record<string, unknown>): Promise<void>;
|
|
51
|
+
dispatch(commandName: string, args?: Record<string, unknown>): Promise<ExitCodeValue | void>;
|
|
52
52
|
getHelp(): string;
|
|
53
53
|
getVersion(): string;
|
|
54
54
|
/**
|
|
@@ -93,6 +93,14 @@ export declare function handleExplain(input: string | undefined): Promise<ExitCo
|
|
|
93
93
|
export declare function handleLearn(sub: string | undefined, args: string[]): Promise<ExitCodeValue>;
|
|
94
94
|
export declare function handleSynthesis(sub: string | undefined, args: string[]): Promise<ExitCodeValue>;
|
|
95
95
|
export declare function handleWatch(pattern: string | undefined): Promise<ExitCodeValue>;
|
|
96
|
+
/**
|
|
97
|
+
* Resolve the file/name target for a command, tolerating an optional leading
|
|
98
|
+
* verb subcommand (e.g. `design generate <file>`, `codegen generate <name>`,
|
|
99
|
+
* `requirements analyze <file>`). When the parsed subcommand is one of the
|
|
100
|
+
* known verbs, it is treated as syntactic sugar and the real target is taken
|
|
101
|
+
* from the first positional argument instead.
|
|
102
|
+
*/
|
|
103
|
+
export declare function resolveTarget(args: Record<string, unknown>, verbs: string[]): string | undefined;
|
|
96
104
|
export declare function getDefaultCommands(): CLICommand[];
|
|
97
105
|
export declare function createCLIDispatcher(): CLIDispatcher;
|
|
98
106
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAiC9D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAmDpD;AAwGD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAuBjD;AAID,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAA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OAAO,CAAC,aAAa,CAAC,CAuDxB;AAID,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,aAAa,CAAC,CA4CxB;AAID,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,OAAO,CAAC,aAAa,CAAC,CAexB;AAID;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAUhG;AAiBD,wBAAgB,kBAAkB,IAAI,UAAU,EAAE,CAydjD;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CASnD"}
|
package/dist/cli.js
CHANGED
|
@@ -11780,8 +11780,8 @@ __export(init_command_handler_exports, {
|
|
|
11780
11780
|
InitCommandHandler: () => InitCommandHandler,
|
|
11781
11781
|
createInitCommandHandler: () => createInitCommandHandler
|
|
11782
11782
|
});
|
|
11783
|
-
import {
|
|
11784
|
-
import { basename } from "node:path";
|
|
11783
|
+
import { mkdirSync as mkdirSync2, writeFileSync as writeFileSync2, existsSync as existsSync10 } from "node:fs";
|
|
11784
|
+
import { basename, join as join5 } from "node:path";
|
|
11785
11785
|
function createInitCommandHandler() {
|
|
11786
11786
|
const locator = new PackageRootLocator();
|
|
11787
11787
|
const catalog = new PackageAssetCatalog(locator);
|
|
@@ -11800,7 +11800,7 @@ function createInitCommandHandler() {
|
|
|
11800
11800
|
const dryRunReporter = new DryRunReporter();
|
|
11801
11801
|
return new InitCommandHandler(detector, confirmation, planner, copilotSetup, claudeSetup, merger, writer, updateService, dryRunReporter);
|
|
11802
11802
|
}
|
|
11803
|
-
var InitCommandHandler;
|
|
11803
|
+
var STARTER_REQUIREMENTS, InitCommandHandler;
|
|
11804
11804
|
var init_init_command_handler = __esm({
|
|
11805
11805
|
"dist/interface/cli/init-command-handler.js"() {
|
|
11806
11806
|
"use strict";
|
|
@@ -11819,6 +11819,20 @@ var init_init_command_handler = __esm({
|
|
|
11819
11819
|
init_workspace_writer();
|
|
11820
11820
|
init_confirmation_resolver();
|
|
11821
11821
|
init_dry_run_reporter();
|
|
11822
|
+
STARTER_REQUIREMENTS = `# \u8981\u4EF6\u5B9A\u7FA9\u66F8
|
|
11823
|
+
|
|
11824
|
+
> \`musubix requirements analyze storage/specs/requirements.md\` \u3067\u89E3\u6790\u3067\u304D\u307E\u3059\u3002
|
|
11825
|
+
> \u8981\u4EF6\u306F\u898B\u51FA\u3057\u5F62\u5F0F\u30FBID \u306F \`REQ-<3\u6587\u5B57\u30C9\u30E1\u30A4\u30F3>-<3\u6841\u9023\u756A>\` \u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
11826
|
+
|
|
11827
|
+
## REQ-SMP-001: \u30B5\u30F3\u30D7\u30EB\u8981\u4EF6
|
|
11828
|
+
**\u7A2E\u5225**: UBIQUITOUS
|
|
11829
|
+
**\u512A\u5148\u5EA6**: P1
|
|
11830
|
+
**\u8981\u4EF6**:
|
|
11831
|
+
THE \u30B7\u30B9\u30C6\u30E0 SHALL \u30E6\u30FC\u30B6\u30FC\u306B\u30B5\u30F3\u30D7\u30EB\u6A5F\u80FD\u3092\u63D0\u4F9B\u3059\u308B\u3002
|
|
11832
|
+
|
|
11833
|
+
**\u53D7\u5165\u57FA\u6E96**:
|
|
11834
|
+
- [ ] \u30B5\u30F3\u30D7\u30EB\u6A5F\u80FD\u304C\u52D5\u4F5C\u3059\u308B
|
|
11835
|
+
`;
|
|
11822
11836
|
InitCommandHandler = class {
|
|
11823
11837
|
detector;
|
|
11824
11838
|
confirmation;
|
|
@@ -11886,22 +11900,49 @@ var init_init_command_handler = __esm({
|
|
|
11886
11900
|
await this.writer.execute(copilotOps, false);
|
|
11887
11901
|
}
|
|
11888
11902
|
const summary = await this.writer.execute([], true);
|
|
11903
|
+
const scaffolded = options.dryRun ? [] : this.scaffoldSddWorkspace(options.projectPath);
|
|
11889
11904
|
return {
|
|
11890
11905
|
detectedPlatforms: selection,
|
|
11891
|
-
created: summary.created,
|
|
11906
|
+
created: [...summary.created, ...scaffolded],
|
|
11892
11907
|
updated: summary.updated,
|
|
11893
11908
|
skipped: summary.skipped,
|
|
11894
11909
|
warnings,
|
|
11895
11910
|
durationMs: Date.now() - start
|
|
11896
11911
|
};
|
|
11897
11912
|
}
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11913
|
+
/**
|
|
11914
|
+
* Create the SDD directory skeleton and a parseable starter requirements
|
|
11915
|
+
* document. Idempotent and non-destructive — existing files are left as-is.
|
|
11916
|
+
* Returns the relative paths of files/dirs actually created.
|
|
11917
|
+
*/
|
|
11918
|
+
scaffoldSddWorkspace(projectPath) {
|
|
11919
|
+
const created = [];
|
|
11901
11920
|
try {
|
|
11902
|
-
|
|
11921
|
+
for (const dir of ["steering", "storage/specs"]) {
|
|
11922
|
+
const abs = join5(projectPath, dir);
|
|
11923
|
+
if (!existsSync10(abs)) {
|
|
11924
|
+
mkdirSync2(abs, { recursive: true });
|
|
11925
|
+
created.push(`${dir}/`);
|
|
11926
|
+
}
|
|
11927
|
+
}
|
|
11928
|
+
const reqPath = join5(projectPath, "storage/specs/requirements.md");
|
|
11929
|
+
if (!existsSync10(reqPath)) {
|
|
11930
|
+
writeFileSync2(reqPath, STARTER_REQUIREMENTS, "utf-8");
|
|
11931
|
+
created.push("storage/specs/requirements.md");
|
|
11932
|
+
}
|
|
11903
11933
|
} catch {
|
|
11904
11934
|
}
|
|
11935
|
+
return created;
|
|
11936
|
+
}
|
|
11937
|
+
buildProjectContext(projectPath) {
|
|
11938
|
+
const name = basename(projectPath);
|
|
11939
|
+
const rootStructure = [
|
|
11940
|
+
"steering/ # \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30E1\u30E2\u30EA\uFF08\u6C7A\u5B9A\u524D\u306B\u53C2\u7167\uFF09",
|
|
11941
|
+
"storage/specs/ # requirements / design / tasks \u4ED5\u69D8",
|
|
11942
|
+
".claude/skills/ # SDD Agent Skills",
|
|
11943
|
+
"src/ # \u5B9F\u88C5\u30B3\u30FC\u30C9",
|
|
11944
|
+
"tests/ # \u30C6\u30B9\u30C8\u30B3\u30FC\u30C9"
|
|
11945
|
+
];
|
|
11905
11946
|
return {
|
|
11906
11947
|
projectName: name,
|
|
11907
11948
|
packageManager: "npm",
|
|
@@ -12903,7 +12944,7 @@ __export(dist_exports16, {
|
|
|
12903
12944
|
import { execFile } from "node:child_process";
|
|
12904
12945
|
import { writeFile as writeFile3, unlink } from "node:fs/promises";
|
|
12905
12946
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
12906
|
-
import { join as
|
|
12947
|
+
import { join as join6 } from "node:path";
|
|
12907
12948
|
import { promisify } from "node:util";
|
|
12908
12949
|
import { randomBytes } from "node:crypto";
|
|
12909
12950
|
function sanitizeName(raw) {
|
|
@@ -13106,7 +13147,7 @@ var init_dist16 = __esm({
|
|
|
13106
13147
|
}
|
|
13107
13148
|
async realSolve(smtScript) {
|
|
13108
13149
|
const start = Date.now();
|
|
13109
|
-
const tmpFile =
|
|
13150
|
+
const tmpFile = join6(tmpdir2(), `musubix2-z3-${randomBytes(8).toString("hex")}.smt2`);
|
|
13110
13151
|
try {
|
|
13111
13152
|
await writeFile3(tmpFile, smtScript, "utf-8");
|
|
13112
13153
|
const { stdout, stderr } = await execFileAsync(this.z3Path, ["-smt2", tmpFile], {
|
|
@@ -13330,7 +13371,7 @@ __export(dist_exports17, {
|
|
|
13330
13371
|
import { execFile as execFile2 } from "node:child_process";
|
|
13331
13372
|
import { writeFile as writeFile4, unlink as unlink2 } from "node:fs/promises";
|
|
13332
13373
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
13333
|
-
import { join as
|
|
13374
|
+
import { join as join7 } from "node:path";
|
|
13334
13375
|
import { promisify as promisify2 } from "node:util";
|
|
13335
13376
|
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
13336
13377
|
function createLeanIntegration() {
|
|
@@ -13454,7 +13495,7 @@ var init_dist17 = __esm({
|
|
|
13454
13495
|
time: Date.now() - start
|
|
13455
13496
|
};
|
|
13456
13497
|
}
|
|
13457
|
-
const tmpFile =
|
|
13498
|
+
const tmpFile = join7(tmpdir3(), `musubix2-lean-${randomBytes2(8).toString("hex")}.lean`);
|
|
13458
13499
|
try {
|
|
13459
13500
|
await writeFile4(tmpFile, leanCode, "utf-8");
|
|
13460
13501
|
const timeout = timeoutMs ?? this.defaultTimeoutMs;
|
|
@@ -15215,7 +15256,7 @@ init_dist5();
|
|
|
15215
15256
|
init_dist6();
|
|
15216
15257
|
init_dist();
|
|
15217
15258
|
init_dist();
|
|
15218
|
-
import { readFileSync as readFileSync6, existsSync as
|
|
15259
|
+
import { readFileSync as readFileSync6, existsSync as existsSync11 } from "node:fs";
|
|
15219
15260
|
function parseArgs(argv) {
|
|
15220
15261
|
const command = argv[0] ?? "";
|
|
15221
15262
|
let subcommand;
|
|
@@ -15275,7 +15316,7 @@ var COMMAND_HELP = {
|
|
|
15275
15316
|
description: "\u8A2D\u8A08\u751F\u6210"
|
|
15276
15317
|
},
|
|
15277
15318
|
codegen: {
|
|
15278
|
-
usage: "musubix codegen [
|
|
15319
|
+
usage: "musubix codegen [generate] <name> [--type class|interface|function|...]",
|
|
15279
15320
|
description: "\u30B3\u30FC\u30C9\u751F\u6210"
|
|
15280
15321
|
},
|
|
15281
15322
|
tasks: {
|
|
@@ -15407,7 +15448,7 @@ var CLIDispatcher = class {
|
|
|
15407
15448
|
if (!command) {
|
|
15408
15449
|
throw new Error(`Unknown command: ${commandName}. Available: ${[...this.commands.keys()].join(", ")}`);
|
|
15409
15450
|
}
|
|
15410
|
-
await command.action(args);
|
|
15451
|
+
return await command.action(args);
|
|
15411
15452
|
}
|
|
15412
15453
|
getHelp() {
|
|
15413
15454
|
const lines = [
|
|
@@ -15445,12 +15486,12 @@ var CLIDispatcher = class {
|
|
|
15445
15486
|
return ExitCode.SUCCESS;
|
|
15446
15487
|
}
|
|
15447
15488
|
try {
|
|
15448
|
-
await this.dispatch(parsed.command, {
|
|
15489
|
+
const result = await this.dispatch(parsed.command, {
|
|
15449
15490
|
subcommand: parsed.subcommand,
|
|
15450
15491
|
args: parsed.args,
|
|
15451
15492
|
...parsed.flags
|
|
15452
15493
|
});
|
|
15453
|
-
return ExitCode.SUCCESS;
|
|
15494
|
+
return result ?? ExitCode.SUCCESS;
|
|
15454
15495
|
} catch (err) {
|
|
15455
15496
|
const message = err instanceof Error ? err.message : String(err);
|
|
15456
15497
|
console.error(message);
|
|
@@ -15552,21 +15593,21 @@ async function handleInit(targetPath = ".", name, force) {
|
|
|
15552
15593
|
console.log(` ${f}`);
|
|
15553
15594
|
}
|
|
15554
15595
|
try {
|
|
15555
|
-
const { cpSync, existsSync:
|
|
15596
|
+
const { cpSync, existsSync: existsSync12, mkdirSync: mkdirSync3 } = await import("node:fs");
|
|
15556
15597
|
const { resolve: resolve9, dirname: dirname4 } = await import("node:path");
|
|
15557
15598
|
const { fileURLToPath: fileURLToPath2 } = await import("node:url");
|
|
15558
15599
|
const thisDir = typeof __dirname !== "undefined" ? __dirname : dirname4(fileURLToPath2(import.meta.url));
|
|
15559
15600
|
const pkgGithub = resolve9(thisDir, "..", ".github");
|
|
15560
15601
|
const destGithub = resolve9(targetPath, ".github");
|
|
15561
|
-
if (
|
|
15562
|
-
|
|
15602
|
+
if (existsSync12(pkgGithub)) {
|
|
15603
|
+
mkdirSync3(destGithub, { recursive: true });
|
|
15563
15604
|
const skillsSrc = resolve9(pkgGithub, "skills");
|
|
15564
|
-
if (
|
|
15605
|
+
if (existsSync12(skillsSrc)) {
|
|
15565
15606
|
cpSync(skillsSrc, resolve9(destGithub, "skills"), { recursive: true });
|
|
15566
15607
|
console.log(" .github/skills/ (SDD skills)");
|
|
15567
15608
|
}
|
|
15568
15609
|
const instrSrc = resolve9(pkgGithub, "copilot-instructions.md");
|
|
15569
|
-
if (
|
|
15610
|
+
if (existsSync12(instrSrc)) {
|
|
15570
15611
|
cpSync(instrSrc, resolve9(destGithub, "copilot-instructions.md"));
|
|
15571
15612
|
console.log(" .github/copilot-instructions.md");
|
|
15572
15613
|
}
|
|
@@ -15786,7 +15827,7 @@ async function handleCodegraph(sub, args) {
|
|
|
15786
15827
|
}
|
|
15787
15828
|
async function handleSecurity(filePath) {
|
|
15788
15829
|
try {
|
|
15789
|
-
if (!
|
|
15830
|
+
if (!existsSync11(filePath)) {
|
|
15790
15831
|
console.error(`\u274C File not found: ${filePath}`);
|
|
15791
15832
|
return ExitCode.GENERAL_ERROR;
|
|
15792
15833
|
}
|
|
@@ -15904,6 +15945,17 @@ async function handleReqValidate(filePath) {
|
|
|
15904
15945
|
}
|
|
15905
15946
|
if (requirements.length === 0) {
|
|
15906
15947
|
console.log("No requirements found in file");
|
|
15948
|
+
if (/REQ-/i.test(content)) {
|
|
15949
|
+
const headingLike = /^#{1,4}\s+REQ-[A-Z]{3}-\d{3}:/m.test(content);
|
|
15950
|
+
console.error('\u26A0 Found "REQ-" text but no parseable requirements. Requirements must be Markdown headings shaped like:');
|
|
15951
|
+
console.error(" ## REQ-XXX-000: <title> (XXX = 3-letter domain code)");
|
|
15952
|
+
console.error(" **\u8981\u4EF6**:");
|
|
15953
|
+
console.error(" THE \u30B7\u30B9\u30C6\u30E0 SHALL ...");
|
|
15954
|
+
if (!headingLike) {
|
|
15955
|
+
console.error('\u2139 Hint: list items (e.g. "- REQ-001: ...") and IDs without a 3-letter domain code are not recognized.');
|
|
15956
|
+
}
|
|
15957
|
+
return ExitCode.VALIDATION_ERROR;
|
|
15958
|
+
}
|
|
15907
15959
|
}
|
|
15908
15960
|
return hasIssues ? ExitCode.VALIDATION_ERROR : ExitCode.SUCCESS;
|
|
15909
15961
|
} catch (err) {
|
|
@@ -16494,7 +16546,7 @@ async function handleExplain(input) {
|
|
|
16494
16546
|
const recorder = new ReasoningChainRecorder2();
|
|
16495
16547
|
const generator = new ExplanationGenerator2();
|
|
16496
16548
|
let code;
|
|
16497
|
-
if (
|
|
16549
|
+
if (existsSync11(input)) {
|
|
16498
16550
|
code = readFileSync6(input, "utf-8");
|
|
16499
16551
|
} else {
|
|
16500
16552
|
code = input;
|
|
@@ -16622,6 +16674,29 @@ async function handleWatch(pattern) {
|
|
|
16622
16674
|
});
|
|
16623
16675
|
return ExitCode.SUCCESS;
|
|
16624
16676
|
}
|
|
16677
|
+
function resolveTarget(args, verbs) {
|
|
16678
|
+
const positional = args["args"] ?? [];
|
|
16679
|
+
const sub = args["subcommand"];
|
|
16680
|
+
const explicitFile = args["file"];
|
|
16681
|
+
if (explicitFile)
|
|
16682
|
+
return explicitFile;
|
|
16683
|
+
if (sub && verbs.includes(sub.toLowerCase())) {
|
|
16684
|
+
return positional[0];
|
|
16685
|
+
}
|
|
16686
|
+
return sub ?? positional[0];
|
|
16687
|
+
}
|
|
16688
|
+
async function reqAction(args) {
|
|
16689
|
+
if (args["help"] === true || args["h"] === true) {
|
|
16690
|
+
console.log(showHelp("requirements"));
|
|
16691
|
+
return;
|
|
16692
|
+
}
|
|
16693
|
+
const filePath = resolveTarget(args, ["analyze", "validate"]);
|
|
16694
|
+
if (!filePath) {
|
|
16695
|
+
console.error("\u274C Usage: musubix requirements [analyze|validate] <file>");
|
|
16696
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16697
|
+
}
|
|
16698
|
+
return await handleReqValidate(filePath);
|
|
16699
|
+
}
|
|
16625
16700
|
function getDefaultCommands() {
|
|
16626
16701
|
return [
|
|
16627
16702
|
{
|
|
@@ -16671,7 +16746,7 @@ function getDefaultCommands() {
|
|
|
16671
16746
|
return;
|
|
16672
16747
|
}
|
|
16673
16748
|
const targetPath = args["subcommand"] ?? args["args"]?.[0] ?? ".";
|
|
16674
|
-
await handleInit(targetPath, args["name"], args["force"] === true);
|
|
16749
|
+
return await handleInit(targetPath, args["name"], args["force"] === true);
|
|
16675
16750
|
}
|
|
16676
16751
|
},
|
|
16677
16752
|
{
|
|
@@ -16689,37 +16764,32 @@ function getDefaultCommands() {
|
|
|
16689
16764
|
case "validate":
|
|
16690
16765
|
if (!filePath) {
|
|
16691
16766
|
console.error("\u274C Usage: musubix tasks validate <file>");
|
|
16692
|
-
return;
|
|
16767
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16693
16768
|
}
|
|
16694
|
-
await handleTasksValidate(filePath);
|
|
16769
|
+
return await handleTasksValidate(filePath);
|
|
16695
16770
|
break;
|
|
16696
16771
|
case "list":
|
|
16697
|
-
await handleTasksList(filePath);
|
|
16772
|
+
return await handleTasksList(filePath);
|
|
16698
16773
|
break;
|
|
16699
16774
|
case "stats":
|
|
16700
|
-
await handleTasksStats(filePath);
|
|
16775
|
+
return await handleTasksStats(filePath);
|
|
16701
16776
|
break;
|
|
16702
16777
|
default:
|
|
16703
16778
|
console.log(showHelp("tasks"));
|
|
16779
|
+
return;
|
|
16704
16780
|
}
|
|
16705
16781
|
}
|
|
16706
16782
|
},
|
|
16707
16783
|
{
|
|
16708
16784
|
name: "req",
|
|
16709
16785
|
description: "Analyze requirements (EARS validation)",
|
|
16710
|
-
action:
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
if (!filePath) {
|
|
16718
|
-
console.error("\u274C Usage: musubix req <file>");
|
|
16719
|
-
return;
|
|
16720
|
-
}
|
|
16721
|
-
await handleReqValidate(filePath);
|
|
16722
|
-
}
|
|
16786
|
+
action: reqAction
|
|
16787
|
+
},
|
|
16788
|
+
{
|
|
16789
|
+
// Alias matching the documented `musubix requirements <analyze|validate> <file>` form.
|
|
16790
|
+
name: "requirements",
|
|
16791
|
+
description: "Analyze/validate requirements (EARS validation)",
|
|
16792
|
+
action: reqAction
|
|
16723
16793
|
},
|
|
16724
16794
|
{
|
|
16725
16795
|
name: "req:wizard",
|
|
@@ -16729,7 +16799,7 @@ function getDefaultCommands() {
|
|
|
16729
16799
|
console.log(showHelp("requirements"));
|
|
16730
16800
|
return;
|
|
16731
16801
|
}
|
|
16732
|
-
await handleReqWizard();
|
|
16802
|
+
return await handleReqWizard();
|
|
16733
16803
|
}
|
|
16734
16804
|
},
|
|
16735
16805
|
{
|
|
@@ -16740,7 +16810,7 @@ function getDefaultCommands() {
|
|
|
16740
16810
|
console.log(showHelp("requirements"));
|
|
16741
16811
|
return;
|
|
16742
16812
|
}
|
|
16743
|
-
await handleReqInterview(args);
|
|
16813
|
+
return await handleReqInterview(args);
|
|
16744
16814
|
}
|
|
16745
16815
|
},
|
|
16746
16816
|
{
|
|
@@ -16751,13 +16821,20 @@ function getDefaultCommands() {
|
|
|
16751
16821
|
console.log(showHelp("design"));
|
|
16752
16822
|
return;
|
|
16753
16823
|
}
|
|
16754
|
-
|
|
16755
|
-
|
|
16824
|
+
if (args["subcommand"]?.toLowerCase() === "verify") {
|
|
16825
|
+
const vf = resolveTarget(args, ["verify"]);
|
|
16826
|
+
if (!vf) {
|
|
16827
|
+
console.error("\u274C Usage: musubix design verify <design-file>");
|
|
16828
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16829
|
+
}
|
|
16830
|
+
return await handleDesignVerify(vf);
|
|
16831
|
+
}
|
|
16832
|
+
const filePath = resolveTarget(args, ["generate"]);
|
|
16756
16833
|
if (!filePath) {
|
|
16757
|
-
console.error("\u274C Usage: musubix design <requirements-file>");
|
|
16758
|
-
return;
|
|
16834
|
+
console.error("\u274C Usage: musubix design [generate] <requirements-file>");
|
|
16835
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16759
16836
|
}
|
|
16760
|
-
await handleDesignGenerate(filePath);
|
|
16837
|
+
return await handleDesignGenerate(filePath);
|
|
16761
16838
|
}
|
|
16762
16839
|
},
|
|
16763
16840
|
{
|
|
@@ -16772,10 +16849,10 @@ function getDefaultCommands() {
|
|
|
16772
16849
|
const filePath = args["file"] ?? args["subcommand"] ?? positionalArgs[0];
|
|
16773
16850
|
if (!filePath) {
|
|
16774
16851
|
console.error("\u274C Usage: musubix design:c4 <file> [--level context|container|component]");
|
|
16775
|
-
return;
|
|
16852
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16776
16853
|
}
|
|
16777
16854
|
const level = args["level"] ?? "context";
|
|
16778
|
-
await handleDesignC4(filePath, level);
|
|
16855
|
+
return await handleDesignC4(filePath, level);
|
|
16779
16856
|
}
|
|
16780
16857
|
},
|
|
16781
16858
|
{
|
|
@@ -16790,9 +16867,9 @@ function getDefaultCommands() {
|
|
|
16790
16867
|
const filePath = args["file"] ?? args["subcommand"] ?? positionalArgs[0];
|
|
16791
16868
|
if (!filePath) {
|
|
16792
16869
|
console.error("\u274C Usage: musubix design:verify <design-file>");
|
|
16793
|
-
return;
|
|
16870
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16794
16871
|
}
|
|
16795
|
-
await handleDesignVerify(filePath);
|
|
16872
|
+
return await handleDesignVerify(filePath);
|
|
16796
16873
|
}
|
|
16797
16874
|
},
|
|
16798
16875
|
{
|
|
@@ -16803,14 +16880,13 @@ function getDefaultCommands() {
|
|
|
16803
16880
|
console.log(showHelp("codegen"));
|
|
16804
16881
|
return;
|
|
16805
16882
|
}
|
|
16806
|
-
const
|
|
16807
|
-
const name = args["subcommand"] ?? positionalArgs[0];
|
|
16883
|
+
const name = resolveTarget(args, ["generate"]);
|
|
16808
16884
|
if (!name) {
|
|
16809
|
-
console.error("\u274C Usage: musubix codegen <name> [--type class|interface|function|...]");
|
|
16810
|
-
return;
|
|
16885
|
+
console.error("\u274C Usage: musubix codegen [generate] <name> [--type class|interface|function|...]");
|
|
16886
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16811
16887
|
}
|
|
16812
16888
|
const type = args["type"] ?? "class";
|
|
16813
|
-
await handleCodegen(name, type);
|
|
16889
|
+
return await handleCodegen(name, type);
|
|
16814
16890
|
}
|
|
16815
16891
|
},
|
|
16816
16892
|
{
|
|
@@ -16825,9 +16901,9 @@ function getDefaultCommands() {
|
|
|
16825
16901
|
const filePath = args["file"] ?? args["subcommand"] ?? positionalArgs[0];
|
|
16826
16902
|
if (!filePath) {
|
|
16827
16903
|
console.error("\u274C Usage: musubix test:gen <source-file>");
|
|
16828
|
-
return;
|
|
16904
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16829
16905
|
}
|
|
16830
|
-
await handleTestGen(filePath);
|
|
16906
|
+
return await handleTestGen(filePath);
|
|
16831
16907
|
}
|
|
16832
16908
|
},
|
|
16833
16909
|
{
|
|
@@ -16840,7 +16916,7 @@ function getDefaultCommands() {
|
|
|
16840
16916
|
}
|
|
16841
16917
|
const sub = args["subcommand"];
|
|
16842
16918
|
const positionalArgs = args["args"] ?? [];
|
|
16843
|
-
await handleTrace(sub, positionalArgs);
|
|
16919
|
+
return await handleTrace(sub, positionalArgs);
|
|
16844
16920
|
}
|
|
16845
16921
|
},
|
|
16846
16922
|
{
|
|
@@ -16851,7 +16927,7 @@ function getDefaultCommands() {
|
|
|
16851
16927
|
console.log(showHelp("trace:verify"));
|
|
16852
16928
|
return;
|
|
16853
16929
|
}
|
|
16854
|
-
await handleTraceVerify();
|
|
16930
|
+
return await handleTraceVerify();
|
|
16855
16931
|
}
|
|
16856
16932
|
},
|
|
16857
16933
|
{
|
|
@@ -16864,7 +16940,7 @@ function getDefaultCommands() {
|
|
|
16864
16940
|
}
|
|
16865
16941
|
const sub = args["subcommand"];
|
|
16866
16942
|
const positionalArgs = args["args"] ?? [];
|
|
16867
|
-
await handlePolicy(sub, positionalArgs);
|
|
16943
|
+
return await handlePolicy(sub, positionalArgs);
|
|
16868
16944
|
}
|
|
16869
16945
|
},
|
|
16870
16946
|
{
|
|
@@ -16876,7 +16952,7 @@ function getDefaultCommands() {
|
|
|
16876
16952
|
return;
|
|
16877
16953
|
}
|
|
16878
16954
|
const sub = args["subcommand"];
|
|
16879
|
-
await handleOntology(sub);
|
|
16955
|
+
return await handleOntology(sub);
|
|
16880
16956
|
}
|
|
16881
16957
|
},
|
|
16882
16958
|
{
|
|
@@ -16889,7 +16965,7 @@ function getDefaultCommands() {
|
|
|
16889
16965
|
}
|
|
16890
16966
|
const sub = args["subcommand"];
|
|
16891
16967
|
const positionalArgs = args["args"] ?? [];
|
|
16892
|
-
await handleCodegraph(sub, positionalArgs);
|
|
16968
|
+
return await handleCodegraph(sub, positionalArgs);
|
|
16893
16969
|
}
|
|
16894
16970
|
},
|
|
16895
16971
|
{
|
|
@@ -16904,9 +16980,9 @@ function getDefaultCommands() {
|
|
|
16904
16980
|
const filePath = args["subcommand"] ?? positionalArgs[0];
|
|
16905
16981
|
if (!filePath) {
|
|
16906
16982
|
console.error("\u274C Usage: musubix security <path>");
|
|
16907
|
-
return;
|
|
16983
|
+
return ExitCode.VALIDATION_ERROR;
|
|
16908
16984
|
}
|
|
16909
|
-
await handleSecurity(filePath);
|
|
16985
|
+
return await handleSecurity(filePath);
|
|
16910
16986
|
}
|
|
16911
16987
|
},
|
|
16912
16988
|
{
|
|
@@ -16919,7 +16995,7 @@ function getDefaultCommands() {
|
|
|
16919
16995
|
}
|
|
16920
16996
|
const sub = args["subcommand"];
|
|
16921
16997
|
const positionalArgs = args["args"] ?? [];
|
|
16922
|
-
await handleWorkflow(sub, positionalArgs);
|
|
16998
|
+
return await handleWorkflow(sub, positionalArgs);
|
|
16923
16999
|
}
|
|
16924
17000
|
},
|
|
16925
17001
|
{
|
|
@@ -16930,7 +17006,7 @@ function getDefaultCommands() {
|
|
|
16930
17006
|
console.log(showHelp("status"));
|
|
16931
17007
|
return;
|
|
16932
17008
|
}
|
|
16933
|
-
await handleStatus();
|
|
17009
|
+
return await handleStatus();
|
|
16934
17010
|
}
|
|
16935
17011
|
},
|
|
16936
17012
|
{
|
|
@@ -16943,7 +17019,7 @@ function getDefaultCommands() {
|
|
|
16943
17019
|
}
|
|
16944
17020
|
const sub = args["subcommand"];
|
|
16945
17021
|
const positionalArgs = args["args"] ?? [];
|
|
16946
|
-
await handleSkills(sub, positionalArgs);
|
|
17022
|
+
return await handleSkills(sub, positionalArgs);
|
|
16947
17023
|
}
|
|
16948
17024
|
},
|
|
16949
17025
|
{
|
|
@@ -16956,7 +17032,7 @@ function getDefaultCommands() {
|
|
|
16956
17032
|
}
|
|
16957
17033
|
const sub = args["subcommand"];
|
|
16958
17034
|
const positionalArgs = args["args"] ?? [];
|
|
16959
|
-
await handleKnowledge(sub, positionalArgs, args);
|
|
17035
|
+
return await handleKnowledge(sub, positionalArgs, args);
|
|
16960
17036
|
}
|
|
16961
17037
|
},
|
|
16962
17038
|
{
|
|
@@ -16969,7 +17045,7 @@ function getDefaultCommands() {
|
|
|
16969
17045
|
}
|
|
16970
17046
|
const sub = args["subcommand"];
|
|
16971
17047
|
const positionalArgs = args["args"] ?? [];
|
|
16972
|
-
await handleDecision(sub, positionalArgs, args);
|
|
17048
|
+
return await handleDecision(sub, positionalArgs, args);
|
|
16973
17049
|
}
|
|
16974
17050
|
},
|
|
16975
17051
|
{
|
|
@@ -16982,7 +17058,7 @@ function getDefaultCommands() {
|
|
|
16982
17058
|
}
|
|
16983
17059
|
const sub = args["subcommand"];
|
|
16984
17060
|
const positionalArgs = args["args"] ?? [];
|
|
16985
|
-
await handleDeepResearch(sub, positionalArgs);
|
|
17061
|
+
return await handleDeepResearch(sub, positionalArgs);
|
|
16986
17062
|
}
|
|
16987
17063
|
},
|
|
16988
17064
|
{
|
|
@@ -16993,7 +17069,7 @@ function getDefaultCommands() {
|
|
|
16993
17069
|
console.log(showHelp("repl"));
|
|
16994
17070
|
return;
|
|
16995
17071
|
}
|
|
16996
|
-
await handleRepl();
|
|
17072
|
+
return await handleRepl();
|
|
16997
17073
|
}
|
|
16998
17074
|
},
|
|
16999
17075
|
{
|
|
@@ -17006,7 +17082,7 @@ function getDefaultCommands() {
|
|
|
17006
17082
|
}
|
|
17007
17083
|
const sub = args["subcommand"];
|
|
17008
17084
|
const positionalArgs = args["args"] ?? [];
|
|
17009
|
-
await handleScaffold(sub, positionalArgs);
|
|
17085
|
+
return await handleScaffold(sub, positionalArgs);
|
|
17010
17086
|
}
|
|
17011
17087
|
},
|
|
17012
17088
|
{
|
|
@@ -17019,7 +17095,7 @@ function getDefaultCommands() {
|
|
|
17019
17095
|
}
|
|
17020
17096
|
const positionalArgs = args["args"] ?? [];
|
|
17021
17097
|
const input = args["subcommand"] ?? positionalArgs[0];
|
|
17022
|
-
await handleExplain(input);
|
|
17098
|
+
return await handleExplain(input);
|
|
17023
17099
|
}
|
|
17024
17100
|
},
|
|
17025
17101
|
{
|
|
@@ -17032,7 +17108,7 @@ function getDefaultCommands() {
|
|
|
17032
17108
|
}
|
|
17033
17109
|
const sub = args["subcommand"];
|
|
17034
17110
|
const positionalArgs = args["args"] ?? [];
|
|
17035
|
-
await handleLearn(sub, positionalArgs);
|
|
17111
|
+
return await handleLearn(sub, positionalArgs);
|
|
17036
17112
|
}
|
|
17037
17113
|
},
|
|
17038
17114
|
{
|
|
@@ -17045,7 +17121,7 @@ function getDefaultCommands() {
|
|
|
17045
17121
|
}
|
|
17046
17122
|
const sub = args["subcommand"];
|
|
17047
17123
|
const positionalArgs = args["args"] ?? [];
|
|
17048
|
-
await handleSynthesis(sub, positionalArgs);
|
|
17124
|
+
return await handleSynthesis(sub, positionalArgs);
|
|
17049
17125
|
}
|
|
17050
17126
|
},
|
|
17051
17127
|
{
|
|
@@ -17058,7 +17134,7 @@ function getDefaultCommands() {
|
|
|
17058
17134
|
}
|
|
17059
17135
|
const positionalArgs = args["args"] ?? [];
|
|
17060
17136
|
const pattern = args["subcommand"] ?? positionalArgs[0];
|
|
17061
|
-
await handleWatch(pattern);
|
|
17137
|
+
return await handleWatch(pattern);
|
|
17062
17138
|
}
|
|
17063
17139
|
},
|
|
17064
17140
|
// P3-07: MCP server launcher
|
|
@@ -17129,5 +17205,6 @@ export {
|
|
|
17129
17205
|
handleWorkflow,
|
|
17130
17206
|
parseArgs,
|
|
17131
17207
|
parseTaskFile,
|
|
17208
|
+
resolveTarget,
|
|
17132
17209
|
showHelp
|
|
17133
17210
|
};
|