guardian-framework 0.1.123 → 0.1.125
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.
|
|
3205
|
+
var name = "guardian-framework", version = "0.1.125", 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.
|
|
1990
|
+
var name = "guardian-framework", version = "0.1.125", 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
|
@@ -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',
|
|
@@ -1332,6 +1348,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
1332
1348
|
"8. **Ubiquitous Language** — Terms for this context from `.pi/domain/ubiquitous-language.md`",
|
|
1333
1349
|
"9. **Dependencies** — Depends On + Used By",
|
|
1334
1350
|
"10. **Implementation Sequence** — Ordered build list",
|
|
1351
|
+
"11. **Patterns & OOP Mapping** — for every tactical aggregate and application",
|
|
1352
|
+
" service, state the design pattern(s) it uses + a one-line rationale:",
|
|
1353
|
+
" Strategy (when a rule/algorithm has 2+ variants — fee/tax/gate policies),",
|
|
1354
|
+
" Factory (ONLY for complex aggregate creation), Specification (combinable",
|
|
1355
|
+
" business rules), Observer/domain events (cross-aggregate flows), record/DTO",
|
|
1356
|
+
" & value objects (immutables, @Embeddable). OOP: no anemic aggregates, no",
|
|
1357
|
+
" setters on roots, tell-don't-ask, CQS. Do NOT abstract speculatively — only",
|
|
1358
|
+
" introduce an interface/strategy when 2+ variants are known (curriculum rule).",
|
|
1359
|
+
" Ensure code stubs reflect the chosen patterns.",
|
|
1335
1360
|
"",
|
|
1336
1361
|
"### STEP 4: Generate Implementation Roadmap",
|
|
1337
1362
|
"",
|
|
@@ -92,6 +92,12 @@ commands are per-language; hard gates (deterministic) live in
|
|
|
92
92
|
service with no production caller outside its own module and outside tests
|
|
93
93
|
is dead code: report it and require the Runtime-Integration issue. Evidence:
|
|
94
94
|
`grep -rn "<ServiceName>" <src> | grep -v tests` per language.
|
|
95
|
+
- **R6 patterns & OOP appropriateness** — for each implemented aggregate/application
|
|
96
|
+
service, confirm the chosen pattern is justified: if/switch on type in
|
|
97
|
+
app/domain suggests Strategy (only when ≥2 known variants), complex creation
|
|
98
|
+
without a Factory, anemic aggregates (no behavior methods), setters on roots,
|
|
99
|
+
tell-don't-ask/CQS violations. Warn on speculative abstraction too (single
|
|
100
|
+
variant behind an interface). Evidence: `file:line` + the pattern rationale.
|
|
95
101
|
|
|
96
102
|
## Output
|
|
97
103
|
Use format from `.pi/context/output-formats.md` → "Validation Report"
|