@mstar-harness/engine 3.1.3 → 3.2.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/dist/audit.d.ts +5 -5
- package/dist/audit.js +3 -3
- package/dist/core.d.ts +1 -1
- package/dist/engine.js +4 -4
- package/dist/lint.d.ts +2 -2
- package/package.json +1 -1
package/dist/audit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GateResult } from "./core.js";
|
|
2
|
-
/** Priority values (mstar-audit SKILL § Plan
|
|
2
|
+
/** Priority values (mstar-audit SKILL.md § Plan output (all variants) Status block). */
|
|
3
3
|
export declare const AUDIT_PRIORITIES: readonly ["P1", "P2", "P3"];
|
|
4
4
|
export type AuditPriority = (typeof AUDIT_PRIORITIES)[number];
|
|
5
5
|
/** Effort values (Morning Star agent-oriented effort scale). */
|
|
@@ -8,12 +8,12 @@ export type AuditEffort = (typeof AUDIT_EFFORTS)[number];
|
|
|
8
8
|
/** Risk values. */
|
|
9
9
|
export declare const AUDIT_RISKS: readonly ["LOW", "MED", "HIGH"];
|
|
10
10
|
export type AuditRisk = (typeof AUDIT_RISKS)[number];
|
|
11
|
-
/** Category codes (finding-format.md § Category codes + SKILL Status block). */
|
|
11
|
+
/** Category codes (finding-format.md § Category codes + mstar-audit SKILL.md § Plan output (all variants) Status block). */
|
|
12
12
|
export declare const AUDIT_CATEGORIES: readonly ["bug", "security", "perf", "tests", "tech-debt", "migration", "dx", "docs", "direction"];
|
|
13
13
|
export type AuditCategory = (typeof AUDIT_CATEGORIES)[number];
|
|
14
14
|
/**
|
|
15
15
|
* Validate the audit Status block(s) of a plan file against the field
|
|
16
|
-
* contract (mstar-audit SKILL § Plan
|
|
16
|
+
* contract (mstar-audit SKILL.md § Plan output (all variants) Status block):
|
|
17
17
|
* - `Priority`: P1 | P2 | P3
|
|
18
18
|
* - `Effort`: XS | S | M | L | XL
|
|
19
19
|
* - `Risk`: LOW | MED | HIGH
|
|
@@ -89,7 +89,7 @@ export type ScaffoldAuditPlanResult = {
|
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
91
|
* Scaffold an audit plan directory (`{PLAN_DIR}/audit-<date>/` layout,
|
|
92
|
-
* mstar-audit SKILL §
|
|
92
|
+
* mstar-audit SKILL.md § Plan output (all variants)): numbered `NNN-<slug>.md` plan files from
|
|
93
93
|
* findings plus a README.md index. Numbering is monotonic — when the
|
|
94
94
|
* directory already contains `NNN-*.md` files (same-date re-run), the new
|
|
95
95
|
* batch continues after the highest existing number instead of restarting
|
|
@@ -107,7 +107,7 @@ export type PromoteAuditPlansOptions = {
|
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* Promote selected audit plans into the v2 workflow lifecycle as a
|
|
110
|
-
* `type: "plan"` workflow (mstar-audit
|
|
110
|
+
* `type: "plan"` workflow (mstar-audit SKILL.md § Plan output (all variants) — handoff): write the workflow
|
|
111
111
|
* snapshot FIRST (with one Todo PlanRow per selected file), then register
|
|
112
112
|
* the workflow entry — `validateStatusV2` validates the full status doc
|
|
113
113
|
* including the per-snapshot existence check, so the snapshot must exist
|
package/dist/audit.js
CHANGED
|
@@ -381,14 +381,14 @@ function validateAuditStatusBlocks(planText) {
|
|
|
381
381
|
const violations = [];
|
|
382
382
|
const blocks = parseStatusBlocks(planText);
|
|
383
383
|
if (blocks.length === 0) {
|
|
384
|
-
violations.push(violation2("medium", "audit.status.missing-block", "no `## Status` block found — audit plan files carry the Status block fields (mstar-audit SKILL § Plan
|
|
384
|
+
violations.push(violation2("medium", "audit.status.missing-block", "no `## Status` block found — audit plan files carry the Status block fields (mstar-audit SKILL.md § Plan output)", "add a `## Status` block with Priority, Effort, Risk, Depends on, Category, Planned at"));
|
|
385
385
|
return { ok: false, violations };
|
|
386
386
|
}
|
|
387
387
|
blocks.forEach((block, index) => {
|
|
388
388
|
const label = blocks.length > 1 ? ` #${index + 1}` : "";
|
|
389
389
|
for (const field of AUDIT_STATUS_FIELDS) {
|
|
390
390
|
if (!block.fields.has(field)) {
|
|
391
|
-
violations.push(violation2("medium", "audit.status.missing-field", `Status block${label} missing required field "${field}" (mstar-audit SKILL § Plan
|
|
391
|
+
violations.push(violation2("medium", "audit.status.missing-field", `Status block${label} missing required field "${field}" (mstar-audit SKILL.md § Plan output)`, `add \`- **${field}**: <value>\` to the Status block`));
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
const check = (field, pattern, code, expected) => {
|
|
@@ -396,7 +396,7 @@ function validateAuditStatusBlocks(planText) {
|
|
|
396
396
|
if (value === undefined)
|
|
397
397
|
return;
|
|
398
398
|
if (!pattern.test(value)) {
|
|
399
|
-
violations.push(violation2("medium", code, `Status block${label} "${field}" = "${value}" — expected ${expected} (mstar-audit SKILL § Plan
|
|
399
|
+
violations.push(violation2("medium", code, `Status block${label} "${field}" = "${value}" — expected ${expected} (mstar-audit SKILL.md § Plan output)`, `fix \`- **${field}**:\` to one of: ${expected}`));
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
check("Priority", /^P[123]$/, "audit.status.invalid-priority", "P1 | P2 | P3");
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Severity levels used across harness validation results.
|
|
3
3
|
*
|
|
4
|
-
* Machine SSOT — `mstar-
|
|
4
|
+
* Machine SSOT — `mstar-artifacts/references/status-and-residuals.md`
|
|
5
5
|
* § "Residual findings: `severity` (SSOT, machine field)" defines the same
|
|
6
6
|
* five lowercase-English values; `warning` / `Major` / any other value are
|
|
7
7
|
* forbidden in JSON severity fields.
|
package/dist/engine.js
CHANGED
|
@@ -3468,14 +3468,14 @@ function validateAuditStatusBlocks(planText) {
|
|
|
3468
3468
|
const violations = [];
|
|
3469
3469
|
const blocks = parseStatusBlocks(planText);
|
|
3470
3470
|
if (blocks.length === 0) {
|
|
3471
|
-
violations.push(violation9("medium", "audit.status.missing-block", "no `## Status` block found — audit plan files carry the Status block fields (mstar-audit SKILL § Plan
|
|
3471
|
+
violations.push(violation9("medium", "audit.status.missing-block", "no `## Status` block found — audit plan files carry the Status block fields (mstar-audit SKILL.md § Plan output)", "add a `## Status` block with Priority, Effort, Risk, Depends on, Category, Planned at"));
|
|
3472
3472
|
return { ok: false, violations };
|
|
3473
3473
|
}
|
|
3474
3474
|
blocks.forEach((block, index) => {
|
|
3475
3475
|
const label = blocks.length > 1 ? ` #${index + 1}` : "";
|
|
3476
3476
|
for (const field of AUDIT_STATUS_FIELDS) {
|
|
3477
3477
|
if (!block.fields.has(field)) {
|
|
3478
|
-
violations.push(violation9("medium", "audit.status.missing-field", `Status block${label} missing required field "${field}" (mstar-audit SKILL § Plan
|
|
3478
|
+
violations.push(violation9("medium", "audit.status.missing-field", `Status block${label} missing required field "${field}" (mstar-audit SKILL.md § Plan output)`, `add \`- **${field}**: <value>\` to the Status block`));
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
3481
3481
|
const check = (field, pattern, code, expected) => {
|
|
@@ -3483,7 +3483,7 @@ function validateAuditStatusBlocks(planText) {
|
|
|
3483
3483
|
if (value === undefined)
|
|
3484
3484
|
return;
|
|
3485
3485
|
if (!pattern.test(value)) {
|
|
3486
|
-
violations.push(violation9("medium", code, `Status block${label} "${field}" = "${value}" — expected ${expected} (mstar-audit SKILL § Plan
|
|
3486
|
+
violations.push(violation9("medium", code, `Status block${label} "${field}" = "${value}" — expected ${expected} (mstar-audit SKILL.md § Plan output)`, `fix \`- **${field}**:\` to one of: ${expected}`));
|
|
3487
3487
|
}
|
|
3488
3488
|
};
|
|
3489
3489
|
check("Priority", /^P[123]$/, "audit.status.invalid-priority", "P1 | P2 | P3");
|
|
@@ -4309,7 +4309,7 @@ function planQualityBar(planText) {
|
|
|
4309
4309
|
if (token !== null) {
|
|
4310
4310
|
const text = trimmed.length > 80 ? `${trimmed.slice(0, 77)}...` : trimmed;
|
|
4311
4311
|
findings.push({ token, line: i + 1, text });
|
|
4312
|
-
violations.push(violation11("medium", "lint.plan-quality.placeholder", `placeholder token "${token}" at line ${i + 1}: "${text}"`, "replace the placeholder with concrete content before locking the plan (mstar-
|
|
4312
|
+
violations.push(violation11("medium", "lint.plan-quality.placeholder", `placeholder token "${token}" at line ${i + 1}: "${text}"`, "replace the placeholder with concrete content before locking the plan (mstar-artifacts/references/plan-quality-bar.md; templates/plan.main.md placeholder scan)"));
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
4315
|
return { ok: violations.length === 0, violations, findings };
|
package/dist/lint.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* completion evidence must include the TDD triple (test file(s), command,
|
|
19
19
|
* output) in `task-N-report.md`; `mstar-sdd/references/file-handoffs.md` —
|
|
20
20
|
* fix subagents append covering test file(s), command run, output.
|
|
21
|
-
* - Plan quality bar: `mstar-
|
|
21
|
+
* - Plan quality bar: `mstar-artifacts/references/plan-quality-bar.md`
|
|
22
22
|
* § Quality checklist + `templates/plan.main.md` self-review
|
|
23
23
|
* ("Placeholder scan: no TBD").
|
|
24
24
|
* - Skill frontmatter contract: `mstar-skill-authoring` SKILL.md § Frontmatter
|
|
@@ -180,7 +180,7 @@ export type PlanQualityResult = GateResult & {
|
|
|
180
180
|
findings: PlanQualityFinding[];
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
183
|
-
* Plan quality bar — placeholder scan (mstar-
|
|
183
|
+
* Plan quality bar — placeholder scan (mstar-artifacts
|
|
184
184
|
* `references/plan-quality-bar.md` § Quality checklist + `templates/
|
|
185
185
|
* plan.main.md` self-review "Placeholder scan: no TBD"). Every placeholder
|
|
186
186
|
* token found becomes one `lint.plan-quality.placeholder` violation whose
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstar-harness/engine",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Morning Star Harness Workflow Engine — deterministic workflow enforcement library (path, status, lease, dispatch, sdd, iteration, lint gates).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|