guardian-framework 0.1.122 → 0.1.124

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
@@ -3202,7 +3202,7 @@ __export(exports_package, {
3202
3202
  bin: () => bin,
3203
3203
  author: () => author
3204
3204
  });
3205
- var name = "guardian-framework", version = "0.1.122", 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;
3205
+ var name = "guardian-framework", version = "0.1.124", 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;
3206
3206
  var init_package = __esm(() => {
3207
3207
  exports = {
3208
3208
  ".": {
package/dist/exports.js CHANGED
@@ -1987,7 +1987,7 @@ __export(exports_package, {
1987
1987
  bin: () => bin,
1988
1988
  author: () => author
1989
1989
  });
1990
- var name = "guardian-framework", version = "0.1.122", 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;
1990
+ var name = "guardian-framework", version = "0.1.124", 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;
1991
1991
  var init_package = __esm(() => {
1992
1992
  exports = {
1993
1993
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.122",
3
+ "version": "0.1.124",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -51,11 +51,18 @@ function readJavaModulePackages(cwd: string): Record<string, string> {
51
51
  return {};
52
52
  }
53
53
 
54
- /** Resolve a module ID to its Java sub-package suffix. Throws if unknown. */
54
+ /**
55
+ * Resolve a module ID to its Java sub-package suffix. Explicit
56
+ * `javaModulePackages` entries win; otherwise derive a deterministic suffix
57
+ * from the module id (e.g. "governance-spine" -> "governancespine" under the
58
+ * manifest groupId) instead of failing greenfield epics.
59
+ */
55
60
  function javaModulePackage(cwd: string, moduleId: string): string {
56
61
  const mapping = readJavaModulePackages(cwd);
57
62
  const pkg = mapping[moduleId];
58
63
  if (pkg) return pkg;
64
+ const derived = (moduleId || "").replace(/[^A-Za-z0-9]/g, "").toLowerCase();
65
+ if (derived) return derived;
59
66
  throw new Error(
60
67
  `Unknown Java package for module "${moduleId}". ` +
61
68
  `Add it to the "javaModulePackages" field in guardian-manifest.json.`
@@ -193,6 +193,7 @@ function mergeRawJson(existing: Record<string, unknown>, incoming: Record<string
193
193
  mergeArr("functionalRequirements", ["id"]);
194
194
  mergeArr("nonFunctionalRequirements", ["id"]);
195
195
  mergeArr("assumptions", ["assumption"]);
196
+ mergeArr("applicationServices", ["name", "context"]);
196
197
  mergeArr("domainEvents", ["name", "context"]);
197
198
  mergeArr("ubiquitousLanguage", ["term", "boundedContext"]);
198
199
  // entities dedupe by (context, name)
@@ -484,6 +485,7 @@ export default function (pi: ExtensionAPI) {
484
485
  const ents = toRow(parsedJson.entities as unknown[], ["name", "context", "type", "description"]);
485
486
  const evts = toRow(parsedJson.domainEvents as unknown[], ["name", "context", "description", "triggeredBy"]);
486
487
  const ul = toRow(parsedJson.ubiquitousLanguage as unknown[], ["term", "definition", "boundedContext", "aliases"]);
488
+ const ucs = toRow(parsedJson.applicationServices as unknown[], ["name", "context", "useCase", "commands"]);
487
489
  const oq = String(parsedJson.openQuestions ?? "None");
488
490
  const ar = String(parsedJson.aggregateRoots ?? "None");
489
491
 
@@ -509,6 +511,8 @@ export default function (pi: ExtensionAPI) {
509
511
  "", "| Event | Context | Description | Triggered By |", "|-------|---------|-------------|-------------|", evts,
510
512
  "", "---", "", "## Ubiquitous Language",
511
513
  "", "| Term | Definition | Bounded Context | Aliases/Synonyms |", "|------|-----------|----------------|-----------------|", ul,
514
+ "", "---", "", "## Use Cases (Application Services)",
515
+ "", "| Use Case | Context | Description | Commands / Collaborators |", "|-----------|---------|-------------|---------------------------|", ucs,
512
516
  "", "---", "", "## Open Questions", "", oq,
513
517
  "", "---", "", "## Aggregate Roots", "", ar,
514
518
  ].join("\n");
@@ -659,6 +663,7 @@ export default function (pi: ExtensionAPI) {
659
663
  ["entities", "entities", "per-context pass (step 2)"],
660
664
  ["domainEvents", "domain events", "per-context pass (step 2)"],
661
665
  ["ubiquitousLanguage", "ubiquitous-language terms", "per-context pass (step 2)"],
666
+ ["applicationServices", "use cases / application services", "use-cases pass (step 1c)"],
662
667
  ];
663
668
  const empty = sections.filter(([key]) => !Array.isArray(raw[key]) || (raw[key] as unknown[]).length === 0);
664
669
  if (empty.length > 0) {
@@ -915,6 +920,17 @@ export default function (pi: ExtensionAPI) {
915
920
  '}',
916
921
  '```',
917
922
  "",
923
+ "1c. USE-CASES PASS (next message): reply with ONLY this JSON for ALL core contexts, then call",
924
+ "domain_save_result (merge is by name+context):",
925
+ '```json',
926
+ '{',
927
+ ' "applicationServices": [',
928
+ ' { "name": "ApproveRequest", "context": "ApprovalWorkflow", "useCase": "what this application service orchestrates",',
929
+ ' "commands": ["verify intent", "consume"], "aggregates": ["ApprovalTicket"], "mapsToFr": "FR-00x" }',
930
+ ' ]',
931
+ '}',
932
+ '```',
933
+ "",
918
934
  "2. PER-CONTEXT PASS (repeat for EACH core/tactical bounded context, one context per message):",
919
935
  "reply with ONLY this JSON for one context, then call domain_save_result again:",
920
936
  '```json',
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-04T20:26:09Z",
2
+ "timestamp": "2026-09-05T10:44:17Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {
@@ -8,7 +8,7 @@
8
8
  "failed": 1,
9
9
  "skipped": 12
10
10
  },
11
- "duration_seconds": 1,
11
+ "duration_seconds": 0,
12
12
  "results": [
13
13
  {
14
14
  "name": "check_mr_traceability.sh",