guardian-framework 0.1.37 → 0.1.39

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/cli.js CHANGED
@@ -1335,7 +1335,7 @@ __export(exports_package, {
1335
1335
  bin: () => bin,
1336
1336
  author: () => author
1337
1337
  });
1338
- var name = "guardian-framework", version = "0.1.37", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1338
+ var name = "guardian-framework", version = "0.1.39", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1339
1339
  var init_package = __esm(() => {
1340
1340
  exports = {
1341
1341
  ".": {
package/dist/exports.js CHANGED
@@ -995,7 +995,7 @@ __export(exports_package, {
995
995
  bin: () => bin,
996
996
  author: () => author
997
997
  });
998
- var name = "guardian-framework", version = "0.1.37", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
998
+ var name = "guardian-framework", version = "0.1.39", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
999
999
  var init_package = __esm(() => {
1000
1000
  exports = {
1001
1001
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -248,27 +248,28 @@ export function findModuleByName(cwd: string, name: string): string | null {
248
248
  const files = discoverModules(cwd);
249
249
  const nameLower = name.toLowerCase().replace(/[^a-z0-9]/g, "");
250
250
 
251
- // Pass 1: exact match only (preferred)
251
+ // Pass 1: exact match
252
252
  for (const f of files) {
253
253
  const key = f.replace(".md", "").toLowerCase().replace(/[^a-z0-9]/g, "");
254
- if (key === nameLower) {
255
- return f;
256
- }
254
+ if (key === nameLower) return f;
257
255
  }
258
256
 
259
- // Pass 2: substring match only if unambiguous (exactly one match)
260
- const substringMatches: string[] = [];
257
+ // Pass 2: prefix match ("audit" audit-ingestion over audit-query, audit-export)
258
+ const prefix: string[] = [];
261
259
  for (const f of files) {
262
260
  const key = f.replace(".md", "").toLowerCase().replace(/[^a-z0-9]/g, "");
263
- if (nameLower.includes(key) || key.includes(nameLower)) {
264
- substringMatches.push(f);
265
- }
261
+ if (key.startsWith(nameLower) && key.length > nameLower.length) prefix.push(f);
266
262
  }
267
- if (substringMatches.length === 1) {
268
- return substringMatches[0];
263
+ if (prefix.length === 1) return prefix[0];
264
+
265
+ // Pass 3: unambiguous substring match
266
+ const subs: string[] = [];
267
+ for (const f of files) {
268
+ const key = f.replace(".md", "").toLowerCase().replace(/[^a-z0-9]/g, "");
269
+ if (key.includes(nameLower)) subs.push(f);
269
270
  }
271
+ if (subs.length === 1) return subs[0];
270
272
 
271
- // Ambiguous or no match — let caller decide
272
273
  return null;
273
274
  }
274
275
 
@@ -312,8 +313,8 @@ export function parseModuleFile(filePath: string): ModuleComponent[] {
312
313
  for (const line of lines) {
313
314
  const trimmed = line.trim();
314
315
 
315
- // Enter component section (supports "## Components", "## Component Details", "## Component")
316
- if (trimmed.match(/^##\s+Components?/i) || trimmed.match(/^##\s+Component\s+Details/i)) {
316
+ // Enter component section (supports "## Components", "## Aggregates", "## Component Details")
317
+ if (trimmed.match(/^##\s+Components?/i) || trimmed.match(/^##\s+Component\s+Details/i) || trimmed.match(/^##\s+Aggregates?/i)) {
317
318
  inComponentSection = true;
318
319
  continue;
319
320
  }
@@ -376,7 +376,20 @@ function findModuleByName(cwd: string, name: string): string | null {
376
376
  }
377
377
  }
378
378
 
379
- // Pass 2: substring match — only if unambiguous (exactly one match)
379
+ // Pass 2: prefix match — query is a prefix of the module name (most specific)
380
+ // e.g., "audit" matches audit-ingestion over audit-query or audit-export
381
+ const prefixMatches: string[] = [];
382
+ for (const f of files) {
383
+ const key = f.replace(".md", "").toLowerCase().replace(/[^a-z0-9]/g, "");
384
+ if (key.startsWith(nameLower) && key.length > nameLower.length) {
385
+ prefixMatches.push(f);
386
+ }
387
+ }
388
+ if (prefixMatches.length === 1) {
389
+ return prefixMatches[0];
390
+ }
391
+
392
+ // Pass 3: substring match — only if unambiguous (exactly one match)
380
393
  const substringMatches: string[] = [];
381
394
  for (const f of files) {
382
395
  const key = f.replace(".md", "").toLowerCase().replace(/[^a-z0-9]/g, "");
@@ -600,7 +613,7 @@ function parseRoadmap(cwd: string): RoadmapPhase[] {
600
613
 
601
614
  // Parse acceptance criteria: - [ ] item
602
615
  if (inCriteria && trimmed.startsWith("- [")) {
603
- currentPhase.criteria!.push(trimmed.replace(/^\[-\s*\]\s*/, "").trim());
616
+ currentPhase.criteria!.push(trimmed.replace(/^-\s+\[\s*\]\s*/, "").trim());
604
617
  }
605
618
  }
606
619
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-03T21:41:44Z",
2
+ "timestamp": "2026-07-03T22:22:29Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {