@mstar-harness/engine 3.0.1 → 3.1.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/engine.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/project.d.ts +16 -0
- package/package.json +1 -1
package/dist/engine.js
CHANGED
|
@@ -2212,6 +2212,7 @@ function parseFlowArray(raw, filePath) {
|
|
|
2212
2212
|
import { existsSync as existsSync5, readFileSync as readFileSync7, readdirSync as readdirSync5 } from "node:fs";
|
|
2213
2213
|
import { join as join9 } from "node:path";
|
|
2214
2214
|
var PROJECT_ROADMAP_FILE = "roadmap.md";
|
|
2215
|
+
var PROJECT_REFERENCES_DIR = "references";
|
|
2215
2216
|
var PROJECT_REGISTER_FILE = "residuals.json";
|
|
2216
2217
|
var _DEFAULT_PROJECT = "_default";
|
|
2217
2218
|
var ROADMAP_STATUSES = ["active", "paused", "completed"];
|
|
@@ -2427,6 +2428,35 @@ function techDebtRollup(projectDir) {
|
|
|
2427
2428
|
const overall = "DRIFT";
|
|
2428
2429
|
return { computed, stored, checks, overall };
|
|
2429
2430
|
}
|
|
2431
|
+
function listProjectReferenceFiles(projectDir) {
|
|
2432
|
+
const root = join9(projectDir, PROJECT_REFERENCES_DIR);
|
|
2433
|
+
let entries;
|
|
2434
|
+
try {
|
|
2435
|
+
entries = readdirSync5(root, { withFileTypes: true });
|
|
2436
|
+
} catch {
|
|
2437
|
+
return [];
|
|
2438
|
+
}
|
|
2439
|
+
const files = [];
|
|
2440
|
+
for (const entry of entries) {
|
|
2441
|
+
if (entry.name === PROJECT_ROADMAP_FILE || entry.name === PROJECT_REGISTER_FILE)
|
|
2442
|
+
continue;
|
|
2443
|
+
if (entry.isFile()) {
|
|
2444
|
+
files.push(entry.name);
|
|
2445
|
+
} else if (entry.isDirectory()) {
|
|
2446
|
+
let nested;
|
|
2447
|
+
try {
|
|
2448
|
+
nested = readdirSync5(join9(root, entry.name), { withFileTypes: true });
|
|
2449
|
+
} catch {
|
|
2450
|
+
continue;
|
|
2451
|
+
}
|
|
2452
|
+
for (const child of nested) {
|
|
2453
|
+
if (child.isFile())
|
|
2454
|
+
files.push(`${entry.name}/${child.name}`);
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
return files.sort();
|
|
2459
|
+
}
|
|
2430
2460
|
// src/migrate.ts
|
|
2431
2461
|
import { copyFileSync, mkdirSync as mkdirSync6, readFileSync as readFileSync8, readdirSync as readdirSync6, writeFileSync as writeFileSync4 } from "node:fs";
|
|
2432
2462
|
import { dirname as dirname7, isAbsolute as isAbsolute6, join as join10, relative as relative3, resolve as resolve8, sep as sep2 } from "node:path";
|
|
@@ -4615,6 +4645,7 @@ export {
|
|
|
4615
4645
|
parseAssignmentBranchForms,
|
|
4616
4646
|
normalizeSeverity,
|
|
4617
4647
|
migrateHarnessTree,
|
|
4648
|
+
listProjectReferenceFiles,
|
|
4618
4649
|
lintStrategySections,
|
|
4619
4650
|
lintSkillFrontmatter,
|
|
4620
4651
|
lintLoadOrder,
|
|
@@ -4667,6 +4698,7 @@ export {
|
|
|
4667
4698
|
QC_REVIEWER_PARAMS,
|
|
4668
4699
|
PROJECT_ROADMAP_FILE,
|
|
4669
4700
|
PROJECT_REGISTER_FILE,
|
|
4701
|
+
PROJECT_REFERENCES_DIR,
|
|
4670
4702
|
NOTES_LEDGER_FILE,
|
|
4671
4703
|
MSTARC_WORKFLOW_DIR_KEY,
|
|
4672
4704
|
MSTARC_SECTION,
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export { SddScriptError, assertBaseSha, implementerSessionStickyRules, readProgr
|
|
|
41
41
|
export type { CompassDoc, PhaseGateOptions, PhaseGateResult, PhaseTransition, } from "./iteration.js";
|
|
42
42
|
export { assertIndexRowObligations, evaluatePhaseGate, parseCompassFrontmatter, parseCompassFrontmatterText, pushCadenceProbe, validateCompassFrontmatter, } from "./iteration.js";
|
|
43
43
|
export type { FindingsCleanupMode, ProjectRegisterDoc, ProjectRegisterEntry, RoadmapFrontmatter, RoadmapStatus, RoadmapValidation, TechDebtCheck, TechDebtRollup, TechDebtSummary, } from "./project.js";
|
|
44
|
-
export { PROJECT_REGISTER_FILE, PROJECT_ROADMAP_FILE, ROADMAP_STATUSES, _DEFAULT_PROJECT, findingsCleanupGate, techDebtRollup, validateProjectRegister, validateRoadmap, } from "./project.js";
|
|
44
|
+
export { PROJECT_REFERENCES_DIR, PROJECT_REGISTER_FILE, PROJECT_ROADMAP_FILE, ROADMAP_STATUSES, _DEFAULT_PROJECT, findingsCleanupGate, listProjectReferenceFiles, techDebtRollup, validateProjectRegister, validateRoadmap, } from "./project.js";
|
|
45
45
|
export type { MigrateNotesFile, MigrateOptions, MigratePlan, MigrateRegister, MigrateResult, MigrateRoadmap, MigrateRootV2, MigrateSnapshot, MigrateStep, } from "./migrate.js";
|
|
46
46
|
export { ARCHIVED_STATUS_V1_FILE, MIGRATE_STATUS_FILE, NOTES_LEDGER_FILE, applyMigratePlan, migrateHarnessTree, } from "./migrate.js";
|
|
47
47
|
export type { CompletenessItem, CompletenessLevel, CompletenessPlaceholder, CompletenessResult, DesignFrontmatter, } from "./design-md.js";
|
package/dist/project.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { type GateResult, type ValidationResult } from "./core.js";
|
|
|
2
2
|
import { type ResidualEntry } from "./status.js";
|
|
3
3
|
/** Roadmap file name inside `projects/<id>/` (plan Task 4 — writer contract). */
|
|
4
4
|
export declare const PROJECT_ROADMAP_FILE = "roadmap.md";
|
|
5
|
+
/** Theme-scoped research directory name inside `projects/<id>/` (plan 20260820-project-research-corpus Task 1 — compass ruling 1). */
|
|
6
|
+
export declare const PROJECT_REFERENCES_DIR = "references";
|
|
5
7
|
/** Project register file name inside `projects/<id>/` (plan Task 4). */
|
|
6
8
|
export declare const PROJECT_REGISTER_FILE = "residuals.json";
|
|
7
9
|
/** Fallback project id for project-less flows (plan Task 4 — compass ruling 2). */
|
|
@@ -132,3 +134,17 @@ export declare function findingsCleanupGate(register: ProjectRegisterDoc, planId
|
|
|
132
134
|
* anything.
|
|
133
135
|
*/
|
|
134
136
|
export declare function techDebtRollup(projectDir: string): TechDebtRollup;
|
|
137
|
+
/**
|
|
138
|
+
* List theme-scoped research files under `<projectDir>/references/` (plan
|
|
139
|
+
* 20260820-project-research-corpus Task 1 — compass ruling 1): top-level
|
|
140
|
+
* files plus files exactly one subdirectory deep; deeper nesting ignored;
|
|
141
|
+
* directories never listed; regular files only (`Dirent.isFile()`). Returns
|
|
142
|
+
* paths relative to the references root with `/` separators, sorted by code
|
|
143
|
+
* unit. Strays named exactly `roadmap.md` / `residuals.json` at the
|
|
144
|
+
* references **root** are excluded — project-layer filenames are never
|
|
145
|
+
* research rows. `projectDir` is the **per-project** directory (the caller
|
|
146
|
+
* resolves `join(resolveProjectDir(startDir), projectId)`; `_DEFAULT_PROJECT`
|
|
147
|
+
* is the fallback id), never the projects root. Missing or unreadable
|
|
148
|
+
* `references/` → `[]`; never throws; never opens a file body.
|
|
149
|
+
*/
|
|
150
|
+
export declare function listProjectReferenceFiles(projectDir: string): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstar-harness/engine",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.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": {
|