guardian-framework 0.1.132 → 0.1.133
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.133", 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
|
".": {
|
|
@@ -3213,7 +3213,10 @@ var init_package = __esm(() => {
|
|
|
3213
3213
|
bin = {
|
|
3214
3214
|
"guardian-framework": "dist/cli.js"
|
|
3215
3215
|
};
|
|
3216
|
-
files = [
|
|
3216
|
+
files = [
|
|
3217
|
+
"dist/",
|
|
3218
|
+
"templates/"
|
|
3219
|
+
];
|
|
3217
3220
|
engines = {
|
|
3218
3221
|
bun: ">=1.0.0"
|
|
3219
3222
|
};
|
|
@@ -3231,9 +3234,15 @@ var init_package = __esm(() => {
|
|
|
3231
3234
|
access: "public"
|
|
3232
3235
|
};
|
|
3233
3236
|
pi = {
|
|
3234
|
-
extensions: [
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
+
extensions: [
|
|
3238
|
+
"./templates/pi/extensions"
|
|
3239
|
+
],
|
|
3240
|
+
skills: [
|
|
3241
|
+
"./templates/pi/skills"
|
|
3242
|
+
],
|
|
3243
|
+
prompts: [
|
|
3244
|
+
"./templates/pi/prompts"
|
|
3245
|
+
]
|
|
3237
3246
|
};
|
|
3238
3247
|
repository = {
|
|
3239
3248
|
type: "git",
|
|
@@ -12838,6 +12847,27 @@ ${bc.description}
|
|
|
12838
12847
|
}
|
|
12839
12848
|
content += `
|
|
12840
12849
|
`;
|
|
12850
|
+
content += `## Application Services (from exploration use-cases)
|
|
12851
|
+
`;
|
|
12852
|
+
content += `
|
|
12853
|
+
`;
|
|
12854
|
+
const ctxServices = (sessionResult.applicationServices ?? []).filter((svc) => svc.context === bc.name);
|
|
12855
|
+
if (ctxServices.length === 0) {
|
|
12856
|
+
content += `None captured in exploration yet (run the use-cases pass).
|
|
12857
|
+
|
|
12858
|
+
`;
|
|
12859
|
+
} else {
|
|
12860
|
+
content += `| Service | Use case | Maps to FR |
|
|
12861
|
+
`;
|
|
12862
|
+
content += `|---------|----------|-----------|
|
|
12863
|
+
`;
|
|
12864
|
+
for (const svc of ctxServices) {
|
|
12865
|
+
content += `| \`${svc.name}\` | ${svc.useCase ?? "\u2014"} | ${svc.mapsToFr ?? "\u2014"} |
|
|
12866
|
+
`;
|
|
12867
|
+
}
|
|
12868
|
+
content += `
|
|
12869
|
+
`;
|
|
12870
|
+
}
|
|
12841
12871
|
content += `## Ubiquitous Language
|
|
12842
12872
|
`;
|
|
12843
12873
|
content += `
|
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.133", 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
|
".": {
|
|
@@ -1998,7 +1998,10 @@ var init_package = __esm(() => {
|
|
|
1998
1998
|
bin = {
|
|
1999
1999
|
"guardian-framework": "dist/cli.js"
|
|
2000
2000
|
};
|
|
2001
|
-
files = [
|
|
2001
|
+
files = [
|
|
2002
|
+
"dist/",
|
|
2003
|
+
"templates/"
|
|
2004
|
+
];
|
|
2002
2005
|
engines = {
|
|
2003
2006
|
bun: ">=1.0.0"
|
|
2004
2007
|
};
|
|
@@ -2016,9 +2019,15 @@ var init_package = __esm(() => {
|
|
|
2016
2019
|
access: "public"
|
|
2017
2020
|
};
|
|
2018
2021
|
pi = {
|
|
2019
|
-
extensions: [
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
+
extensions: [
|
|
2023
|
+
"./templates/pi/extensions"
|
|
2024
|
+
],
|
|
2025
|
+
skills: [
|
|
2026
|
+
"./templates/pi/skills"
|
|
2027
|
+
],
|
|
2028
|
+
prompts: [
|
|
2029
|
+
"./templates/pi/prompts"
|
|
2030
|
+
]
|
|
2022
2031
|
};
|
|
2023
2032
|
repository = {
|
|
2024
2033
|
type: "git",
|
|
@@ -13162,6 +13171,27 @@ ${bc.description}
|
|
|
13162
13171
|
}
|
|
13163
13172
|
content += `
|
|
13164
13173
|
`;
|
|
13174
|
+
content += `## Application Services (from exploration use-cases)
|
|
13175
|
+
`;
|
|
13176
|
+
content += `
|
|
13177
|
+
`;
|
|
13178
|
+
const ctxServices = (sessionResult.applicationServices ?? []).filter((svc) => svc.context === bc.name);
|
|
13179
|
+
if (ctxServices.length === 0) {
|
|
13180
|
+
content += `None captured in exploration yet (run the use-cases pass).
|
|
13181
|
+
|
|
13182
|
+
`;
|
|
13183
|
+
} else {
|
|
13184
|
+
content += `| Service | Use case | Maps to FR |
|
|
13185
|
+
`;
|
|
13186
|
+
content += `|---------|----------|-----------|
|
|
13187
|
+
`;
|
|
13188
|
+
for (const svc of ctxServices) {
|
|
13189
|
+
content += `| \`${svc.name}\` | ${svc.useCase ?? "—"} | ${svc.mapsToFr ?? "—"} |
|
|
13190
|
+
`;
|
|
13191
|
+
}
|
|
13192
|
+
content += `
|
|
13193
|
+
`;
|
|
13194
|
+
}
|
|
13165
13195
|
content += `## Ubiquitous Language
|
|
13166
13196
|
`;
|
|
13167
13197
|
content += `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardian-framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.133",
|
|
4
4
|
"description": "Token-optimized agentic framework scaffolder with pi-first architecture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/exports.js",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"guardian-framework": "dist/cli.js"
|
|
16
16
|
},
|
|
17
|
-
"files": [
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/",
|
|
19
|
+
"templates/"
|
|
20
|
+
],
|
|
18
21
|
"engines": {
|
|
19
22
|
"bun": ">=1.0.0"
|
|
20
23
|
},
|
|
@@ -32,9 +35,15 @@
|
|
|
32
35
|
"access": "public"
|
|
33
36
|
},
|
|
34
37
|
"pi": {
|
|
35
|
-
"extensions": [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
"extensions": [
|
|
39
|
+
"./templates/pi/extensions"
|
|
40
|
+
],
|
|
41
|
+
"skills": [
|
|
42
|
+
"./templates/pi/skills"
|
|
43
|
+
],
|
|
44
|
+
"prompts": [
|
|
45
|
+
"./templates/pi/prompts"
|
|
46
|
+
]
|
|
38
47
|
},
|
|
39
48
|
"repository": {
|
|
40
49
|
"type": "git",
|
|
@@ -1550,12 +1550,46 @@ export default function (pi: ExtensionAPI) {
|
|
|
1550
1550
|
ctx.ui.notify("Enriching " + moduleFiles.length + " module docs from session " + sessionId, "info");
|
|
1551
1551
|
const lang = readLanguage(ctx.cwd);
|
|
1552
1552
|
|
|
1553
|
+
let servicesCatalog = "(no catalog available)";
|
|
1554
|
+
try {
|
|
1555
|
+
const svcRaw = JSON.parse(fs.readFileSync(sRawPath, "utf-8")) as Record<string, unknown>;
|
|
1556
|
+
const svcAll = Array.isArray(svcRaw.applicationServices) ? (svcRaw.applicationServices as Record<string, unknown>[]) : [];
|
|
1557
|
+
const svcBcs = Array.isArray(svcRaw.boundedContexts) ? (svcRaw.boundedContexts as Record<string, unknown>[]) : [];
|
|
1558
|
+
const ctxFor = (file: string): string => {
|
|
1559
|
+
const wanted = norm(file.replace(/\.md$/, ""));
|
|
1560
|
+
const bc = svcBcs.find((b) => norm(String(b.name ?? "")) === wanted);
|
|
1561
|
+
return bc ? String(bc.name ?? "") : "";
|
|
1562
|
+
};
|
|
1563
|
+
const chunks = moduleFiles.map((f) => {
|
|
1564
|
+
const ctx = ctxFor(f);
|
|
1565
|
+
const svcs = svcAll.filter((sv) => String(sv.context ?? "") === ctx);
|
|
1566
|
+
if (!ctx || svcs.length === 0) return "";
|
|
1567
|
+
const lines = svcs.map((sv) => {
|
|
1568
|
+
const extra = [String(sv.useCase ?? ""), sv.mapsToFr ? "mapsToFr: " + String(sv.mapsToFr) : ""]
|
|
1569
|
+
.filter(Boolean).join(" — ");
|
|
1570
|
+
return `- \u0060${String(sv.name ?? "")}\u0060 : ${extra}`;
|
|
1571
|
+
});
|
|
1572
|
+
return "### " + ctx + " (module doc: " + f + ")\n" + lines.join("\n");
|
|
1573
|
+
}).filter(Boolean);
|
|
1574
|
+
if (chunks.length > 0) servicesCatalog = chunks.join("\n\n");
|
|
1575
|
+
} catch { /* leave fallback text */ }
|
|
1576
|
+
|
|
1553
1577
|
const enrichPrompt = [
|
|
1554
1578
|
"## Task: Complete Architecture Package",
|
|
1555
1579
|
"",
|
|
1556
1580
|
"The scaffold generated basic stubs. Your task is to produce a **complete, interconnected architecture package**",
|
|
1557
1581
|
"that an implementation agent can build from.",
|
|
1558
1582
|
"",
|
|
1583
|
+
"### Application-services catalog (AUTHORITATIVE — from the exploration use-cases pass)",
|
|
1584
|
+
"",
|
|
1585
|
+
"The Application Layer section of EVERY module doc you enrich must list exactly these",
|
|
1586
|
+
"application services for that module's bounded context — EXACT names, use-case, and",
|
|
1587
|
+
"FR mapping. Do NOT rename, drop, or substitute services, and do not invent services",
|
|
1588
|
+
"that replace them. Extra controllers/adapters/query helpers may be added BELOW the",
|
|
1589
|
+
"catalog, but every catalog entry must appear verbatim:",
|
|
1590
|
+
"",
|
|
1591
|
+
servicesCatalog,
|
|
1592
|
+
"",
|
|
1559
1593
|
"**YOU MUST FOLLOW THESE 3 STEPS IN ORDER. Do not skip steps or reorder them.**",
|
|
1560
1594
|
"",
|
|
1561
1595
|
"### Source Data",
|
|
@@ -1711,6 +1745,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
1711
1745
|
|
|
1712
1746
|
const explorationDir = path.join(ctx.cwd, ".pi", "domain", "exploration");
|
|
1713
1747
|
const sessionPath = path.join(explorationDir, sessionId + ".md");
|
|
1748
|
+
const modulesDir = path.join(ctx.cwd, ".pi", "architecture", "modules");
|
|
1749
|
+
const norm = (n: string) => n.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1714
1750
|
const checks: string[] = [];
|
|
1715
1751
|
let allPassed = true;
|
|
1716
1752
|
|
|
@@ -1725,6 +1761,39 @@ export default function (pi: ExtensionAPI) {
|
|
|
1725
1761
|
checks.push(content.includes("## Ubiquitous Language") ? " PASS Ubiquitous language section" : " FAIL Missing ubiquitous language section");
|
|
1726
1762
|
}
|
|
1727
1763
|
|
|
1764
|
+
// Application-services drift gate: every catalog service (use-cases pass)
|
|
1765
|
+
// must appear in its module doc so exploration -> architecture ->
|
|
1766
|
+
// implementation never silently drops a use case.
|
|
1767
|
+
const rawVPath = sessionPath.replace(/\.md$/, ".raw.json");
|
|
1768
|
+
if (fs.existsSync(rawVPath)) {
|
|
1769
|
+
try {
|
|
1770
|
+
const rawV = JSON.parse(fs.readFileSync(rawVPath, "utf-8")) as Record<string, unknown>;
|
|
1771
|
+
const svcV = Array.isArray(rawV.applicationServices) ? (rawV.applicationServices as Record<string, unknown>[]) : [];
|
|
1772
|
+
if (svcV.length > 0) {
|
|
1773
|
+
const vModules = fs.readdirSync(modulesDir).filter((f) => f.endsWith(".md") && f !== "module-template.md");
|
|
1774
|
+
let missingV = 0;
|
|
1775
|
+
for (const sv of svcV) {
|
|
1776
|
+
const ctx = String(sv.context ?? "");
|
|
1777
|
+
const svcName = String(sv.name ?? "");
|
|
1778
|
+
if (!ctx || !svcName) continue;
|
|
1779
|
+
const docFile = vModules.find((f) => norm(f.replace(/\.md$/, "")) === norm(ctx)) ?? "";
|
|
1780
|
+
if (!docFile) { checks.push(" FAIL Module doc not found for context " + ctx + " (service " + svcName + ")"); missingV++; continue; }
|
|
1781
|
+
const docText = fs.readFileSync(path.join(modulesDir, docFile), "utf-8");
|
|
1782
|
+
if (!docText.includes(svcName)) {
|
|
1783
|
+
checks.push(" FAIL Module doc " + docFile + " is missing catalog service " + svcName + " (from exploration use-cases)");
|
|
1784
|
+
missingV++;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
checks.push(missingV === 0
|
|
1788
|
+
? " PASS All " + svcV.length + " catalog application services present in module docs"
|
|
1789
|
+
: " FAIL " + missingV + " catalog application service(s) missing from module docs");
|
|
1790
|
+
if (missingV > 0) allPassed = false;
|
|
1791
|
+
} else {
|
|
1792
|
+
checks.push(" PASS No application services in session (use-cases pass not run)");
|
|
1793
|
+
}
|
|
1794
|
+
} catch { /* ignore */ }
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1728
1797
|
const header = allPassed ? "Domain Validation - All Checks Passed" : "Domain Validation - Some Checks Failed";
|
|
1729
1798
|
ctx.ui.notify(header, allPassed ? "success" : "error");
|
|
1730
1799
|
|