musubix2 0.5.75 → 0.5.76
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.js +20 -19
- package/dist/index.js +20 -19
- package/package.json +1 -1
package/.claude/.musubix-managed
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generator":"musubix2","version":"0.5.
|
|
1
|
+
{"generator":"musubix2","version":"0.5.76","timestamp":"2026-07-11T00:09:01.910Z"}
|
package/dist/cli.js
CHANGED
|
@@ -2979,26 +2979,28 @@ var init_design = __esm({
|
|
|
2979
2979
|
ISP: 100,
|
|
2980
2980
|
DIP: 100
|
|
2981
2981
|
};
|
|
2982
|
-
for (const section of design.sections) {
|
|
2983
|
-
|
|
2982
|
+
for (const section of design.sections ?? []) {
|
|
2983
|
+
const reqCount = (section.requirementIds ?? []).length;
|
|
2984
|
+
const ifaceCount = (section.interfaces ?? []).length;
|
|
2985
|
+
if (reqCount > 5) {
|
|
2984
2986
|
violations.push({
|
|
2985
2987
|
principle: "SRP",
|
|
2986
2988
|
section: section.id,
|
|
2987
|
-
message: `Section handles ${
|
|
2989
|
+
message: `Section handles ${reqCount} requirements (>5)`,
|
|
2988
2990
|
suggestion: "Consider splitting this section into smaller, focused sections"
|
|
2989
2991
|
});
|
|
2990
2992
|
principleScores.SRP = Math.max(0, principleScores.SRP - 20);
|
|
2991
2993
|
}
|
|
2992
|
-
if (
|
|
2994
|
+
if (ifaceCount > 4) {
|
|
2993
2995
|
violations.push({
|
|
2994
2996
|
principle: "ISP",
|
|
2995
2997
|
section: section.id,
|
|
2996
|
-
message: `Section suggests ${
|
|
2998
|
+
message: `Section suggests ${ifaceCount} interfaces (>4)`,
|
|
2997
2999
|
suggestion: "Consider splitting large interfaces into smaller, role-specific ones"
|
|
2998
3000
|
});
|
|
2999
3001
|
principleScores.ISP = Math.max(0, principleScores.ISP - 15);
|
|
3000
3002
|
}
|
|
3001
|
-
if (
|
|
3003
|
+
if (ifaceCount === 0 && reqCount > 1) {
|
|
3002
3004
|
violations.push({
|
|
3003
3005
|
principle: "DIP",
|
|
3004
3006
|
section: section.id,
|
|
@@ -12543,7 +12545,7 @@ var init_dist13 = __esm({
|
|
|
12543
12545
|
}
|
|
12544
12546
|
}
|
|
12545
12547
|
for (const [term, df] of this.documentFrequency) {
|
|
12546
|
-
this.idfScores.set(term, Math.log(this.documentCount / df));
|
|
12548
|
+
this.idfScores.set(term, Math.log((1 + this.documentCount) / (1 + df)) + 1);
|
|
12547
12549
|
}
|
|
12548
12550
|
}
|
|
12549
12551
|
/** Get current vocabulary size. */
|
|
@@ -15629,10 +15631,10 @@ function policyTools() {
|
|
|
15629
15631
|
try {
|
|
15630
15632
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15631
15633
|
const engine = new policy.PolicyEngine();
|
|
15632
|
-
const
|
|
15633
|
-
return ok(
|
|
15634
|
-
} catch {
|
|
15635
|
-
return
|
|
15634
|
+
const report = await engine.validateAll(params["artifact"] ?? {});
|
|
15635
|
+
return ok(report);
|
|
15636
|
+
} catch (err) {
|
|
15637
|
+
return fail(errMsg(err));
|
|
15636
15638
|
}
|
|
15637
15639
|
}),
|
|
15638
15640
|
tool("policy.gate.run", "Run a quality gate check", "policy", [
|
|
@@ -15642,20 +15644,19 @@ function policyTools() {
|
|
|
15642
15644
|
try {
|
|
15643
15645
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15644
15646
|
const runner = new policy.QualityGateRunner();
|
|
15645
|
-
const
|
|
15646
|
-
return ok(
|
|
15647
|
-
} catch {
|
|
15648
|
-
return
|
|
15647
|
+
const results = await runner.runAll(params["context"] ?? {});
|
|
15648
|
+
return ok({ gate: params["gate"], results, passed: runner.allPassed(results) });
|
|
15649
|
+
} catch (err) {
|
|
15650
|
+
return fail(errMsg(err));
|
|
15649
15651
|
}
|
|
15650
15652
|
}),
|
|
15651
15653
|
tool("policy.articles.list", "List all constitution articles", "policy", [], async () => {
|
|
15652
15654
|
try {
|
|
15653
15655
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15654
15656
|
const engine = new policy.PolicyEngine();
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
return ok([]);
|
|
15657
|
+
return ok(engine.listPolicies());
|
|
15658
|
+
} catch (err) {
|
|
15659
|
+
return fail(errMsg(err));
|
|
15659
15660
|
}
|
|
15660
15661
|
})
|
|
15661
15662
|
];
|
package/dist/index.js
CHANGED
|
@@ -2979,26 +2979,28 @@ var init_design = __esm({
|
|
|
2979
2979
|
ISP: 100,
|
|
2980
2980
|
DIP: 100
|
|
2981
2981
|
};
|
|
2982
|
-
for (const section of design.sections) {
|
|
2983
|
-
|
|
2982
|
+
for (const section of design.sections ?? []) {
|
|
2983
|
+
const reqCount = (section.requirementIds ?? []).length;
|
|
2984
|
+
const ifaceCount = (section.interfaces ?? []).length;
|
|
2985
|
+
if (reqCount > 5) {
|
|
2984
2986
|
violations.push({
|
|
2985
2987
|
principle: "SRP",
|
|
2986
2988
|
section: section.id,
|
|
2987
|
-
message: `Section handles ${
|
|
2989
|
+
message: `Section handles ${reqCount} requirements (>5)`,
|
|
2988
2990
|
suggestion: "Consider splitting this section into smaller, focused sections"
|
|
2989
2991
|
});
|
|
2990
2992
|
principleScores.SRP = Math.max(0, principleScores.SRP - 20);
|
|
2991
2993
|
}
|
|
2992
|
-
if (
|
|
2994
|
+
if (ifaceCount > 4) {
|
|
2993
2995
|
violations.push({
|
|
2994
2996
|
principle: "ISP",
|
|
2995
2997
|
section: section.id,
|
|
2996
|
-
message: `Section suggests ${
|
|
2998
|
+
message: `Section suggests ${ifaceCount} interfaces (>4)`,
|
|
2997
2999
|
suggestion: "Consider splitting large interfaces into smaller, role-specific ones"
|
|
2998
3000
|
});
|
|
2999
3001
|
principleScores.ISP = Math.max(0, principleScores.ISP - 15);
|
|
3000
3002
|
}
|
|
3001
|
-
if (
|
|
3003
|
+
if (ifaceCount === 0 && reqCount > 1) {
|
|
3002
3004
|
violations.push({
|
|
3003
3005
|
principle: "DIP",
|
|
3004
3006
|
section: section.id,
|
|
@@ -12543,7 +12545,7 @@ var init_dist13 = __esm({
|
|
|
12543
12545
|
}
|
|
12544
12546
|
}
|
|
12545
12547
|
for (const [term, df] of this.documentFrequency) {
|
|
12546
|
-
this.idfScores.set(term, Math.log(this.documentCount / df));
|
|
12548
|
+
this.idfScores.set(term, Math.log((1 + this.documentCount) / (1 + df)) + 1);
|
|
12547
12549
|
}
|
|
12548
12550
|
}
|
|
12549
12551
|
/** Get current vocabulary size. */
|
|
@@ -15629,10 +15631,10 @@ function policyTools() {
|
|
|
15629
15631
|
try {
|
|
15630
15632
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15631
15633
|
const engine = new policy.PolicyEngine();
|
|
15632
|
-
const
|
|
15633
|
-
return ok(
|
|
15634
|
-
} catch {
|
|
15635
|
-
return
|
|
15634
|
+
const report = await engine.validateAll(params["artifact"] ?? {});
|
|
15635
|
+
return ok(report);
|
|
15636
|
+
} catch (err) {
|
|
15637
|
+
return fail(errMsg(err));
|
|
15636
15638
|
}
|
|
15637
15639
|
}),
|
|
15638
15640
|
tool("policy.gate.run", "Run a quality gate check", "policy", [
|
|
@@ -15642,20 +15644,19 @@ function policyTools() {
|
|
|
15642
15644
|
try {
|
|
15643
15645
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15644
15646
|
const runner = new policy.QualityGateRunner();
|
|
15645
|
-
const
|
|
15646
|
-
return ok(
|
|
15647
|
-
} catch {
|
|
15648
|
-
return
|
|
15647
|
+
const results = await runner.runAll(params["context"] ?? {});
|
|
15648
|
+
return ok({ gate: params["gate"], results, passed: runner.allPassed(results) });
|
|
15649
|
+
} catch (err) {
|
|
15650
|
+
return fail(errMsg(err));
|
|
15649
15651
|
}
|
|
15650
15652
|
}),
|
|
15651
15653
|
tool("policy.articles.list", "List all constitution articles", "policy", [], async () => {
|
|
15652
15654
|
try {
|
|
15653
15655
|
const policy = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
|
|
15654
15656
|
const engine = new policy.PolicyEngine();
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
return ok([]);
|
|
15657
|
+
return ok(engine.listPolicies());
|
|
15658
|
+
} catch (err) {
|
|
15659
|
+
return fail(errMsg(err));
|
|
15659
15660
|
}
|
|
15660
15661
|
})
|
|
15661
15662
|
];
|