guardian-framework 0.1.1 → 0.1.3
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/README.md +0 -7
- package/dist/cli.js +15 -16
- package/dist/exports.js +15 -16
- package/package.json +15 -5
- package/templates/pi/preflight_report.json +2 -2
- package/pi-package/extensions/guardian-bootstrap.ts +0 -113
package/README.md
CHANGED
|
@@ -97,13 +97,6 @@ npx guardian-framework init
|
|
|
97
97
|
npm install -g guardian-framework
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
**Pi package** — load extensions, skills, and prompts directly into a [pi](https://github.com/badlogic/pi-mono) session:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
pi install npm:guardian-framework
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
This makes all Guardian slash commands (`/architect`, `/pipeline`, `/goal`, `/domain`, etc.) available inside pi without running `guardian init` first. Run `/guardian-status` after install to check availability.
|
|
107
100
|
|
|
108
101
|
**Prerequisites:** [Bun](https://bun.sh) >= 1.0.0
|
|
109
102
|
|
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.
|
|
1338
|
+
var name = "guardian-framework", version = "0.1.3", 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
|
".": {
|
|
@@ -1346,7 +1346,11 @@ var init_package = __esm(() => {
|
|
|
1346
1346
|
bin = {
|
|
1347
1347
|
"guardian-framework": "./dist/cli.js"
|
|
1348
1348
|
};
|
|
1349
|
-
files = [
|
|
1349
|
+
files = [
|
|
1350
|
+
"dist/",
|
|
1351
|
+
"templates/",
|
|
1352
|
+
"pi-package/"
|
|
1353
|
+
];
|
|
1350
1354
|
engines = {
|
|
1351
1355
|
bun: ">=1.0.0"
|
|
1352
1356
|
};
|
|
@@ -1364,9 +1368,15 @@ var init_package = __esm(() => {
|
|
|
1364
1368
|
access: "public"
|
|
1365
1369
|
};
|
|
1366
1370
|
pi = {
|
|
1367
|
-
extensions: [
|
|
1368
|
-
|
|
1369
|
-
|
|
1371
|
+
extensions: [
|
|
1372
|
+
"./pi-package/extensions"
|
|
1373
|
+
],
|
|
1374
|
+
skills: [
|
|
1375
|
+
"./pi-package/skills"
|
|
1376
|
+
],
|
|
1377
|
+
prompts: [
|
|
1378
|
+
"./pi-package/prompts"
|
|
1379
|
+
]
|
|
1370
1380
|
};
|
|
1371
1381
|
repository = {
|
|
1372
1382
|
type: "git",
|
|
@@ -11393,17 +11403,6 @@ function scaffoldPiDirectory(piDir, context, scaffoldedFiles) {
|
|
|
11393
11403
|
} else {
|
|
11394
11404
|
errors.push(`INDEX.md: ${indexResult.error.message}`);
|
|
11395
11405
|
}
|
|
11396
|
-
const readmePath = path9.join(piDir, "README.md");
|
|
11397
|
-
const readmeResult = readTemplate("README.md");
|
|
11398
|
-
if (readmeResult.ok) {
|
|
11399
|
-
fs11.writeFileSync(readmePath, readmeResult.value, "utf-8");
|
|
11400
|
-
scaffoldedFiles[`${PI_DIR}/README.md`] = {
|
|
11401
|
-
category: "framework",
|
|
11402
|
-
content: readmeResult.value
|
|
11403
|
-
};
|
|
11404
|
-
} else {
|
|
11405
|
-
errors.push(`README.md: ${readmeResult.error.message}`);
|
|
11406
|
-
}
|
|
11407
11406
|
return errors;
|
|
11408
11407
|
}
|
|
11409
11408
|
function shouldSkipFile(relativePath, language) {
|
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.
|
|
998
|
+
var name = "guardian-framework", version = "0.1.3", 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
|
".": {
|
|
@@ -1006,7 +1006,11 @@ var init_package = __esm(() => {
|
|
|
1006
1006
|
bin = {
|
|
1007
1007
|
"guardian-framework": "./dist/cli.js"
|
|
1008
1008
|
};
|
|
1009
|
-
files = [
|
|
1009
|
+
files = [
|
|
1010
|
+
"dist/",
|
|
1011
|
+
"templates/",
|
|
1012
|
+
"pi-package/"
|
|
1013
|
+
];
|
|
1010
1014
|
engines = {
|
|
1011
1015
|
bun: ">=1.0.0"
|
|
1012
1016
|
};
|
|
@@ -1024,9 +1028,15 @@ var init_package = __esm(() => {
|
|
|
1024
1028
|
access: "public"
|
|
1025
1029
|
};
|
|
1026
1030
|
pi = {
|
|
1027
|
-
extensions: [
|
|
1028
|
-
|
|
1029
|
-
|
|
1031
|
+
extensions: [
|
|
1032
|
+
"./pi-package/extensions"
|
|
1033
|
+
],
|
|
1034
|
+
skills: [
|
|
1035
|
+
"./pi-package/skills"
|
|
1036
|
+
],
|
|
1037
|
+
prompts: [
|
|
1038
|
+
"./pi-package/prompts"
|
|
1039
|
+
]
|
|
1030
1040
|
};
|
|
1031
1041
|
repository = {
|
|
1032
1042
|
type: "git",
|
|
@@ -10156,17 +10166,6 @@ function scaffoldPiDirectory(piDir, context, scaffoldedFiles) {
|
|
|
10156
10166
|
} else {
|
|
10157
10167
|
errors.push(`INDEX.md: ${indexResult.error.message}`);
|
|
10158
10168
|
}
|
|
10159
|
-
const readmePath = path6.join(piDir, "README.md");
|
|
10160
|
-
const readmeResult = readTemplate("README.md");
|
|
10161
|
-
if (readmeResult.ok) {
|
|
10162
|
-
fs7.writeFileSync(readmePath, readmeResult.value, "utf-8");
|
|
10163
|
-
scaffoldedFiles[`${PI_DIR}/README.md`] = {
|
|
10164
|
-
category: "framework",
|
|
10165
|
-
content: readmeResult.value
|
|
10166
|
-
};
|
|
10167
|
-
} else {
|
|
10168
|
-
errors.push(`README.md: ${readmeResult.error.message}`);
|
|
10169
|
-
}
|
|
10170
10169
|
return errors;
|
|
10171
10170
|
}
|
|
10172
10171
|
function shouldSkipFile(relativePath, language) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardian-framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
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,11 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"guardian-framework": "./dist/cli.js"
|
|
16
16
|
},
|
|
17
|
-
"files": [
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/",
|
|
19
|
+
"templates/",
|
|
20
|
+
"pi-package/"
|
|
21
|
+
],
|
|
18
22
|
"engines": {
|
|
19
23
|
"bun": ">=1.0.0"
|
|
20
24
|
},
|
|
@@ -32,9 +36,15 @@
|
|
|
32
36
|
"access": "public"
|
|
33
37
|
},
|
|
34
38
|
"pi": {
|
|
35
|
-
"extensions": [
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
"extensions": [
|
|
40
|
+
"./pi-package/extensions"
|
|
41
|
+
],
|
|
42
|
+
"skills": [
|
|
43
|
+
"./pi-package/skills"
|
|
44
|
+
],
|
|
45
|
+
"prompts": [
|
|
46
|
+
"./pi-package/prompts"
|
|
47
|
+
]
|
|
38
48
|
},
|
|
39
49
|
"repository": {
|
|
40
50
|
"type": "git",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-07-
|
|
2
|
+
"timestamp": "2026-07-02T16:34:18Z",
|
|
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":
|
|
11
|
+
"duration_seconds": 1,
|
|
12
12
|
"results": [
|
|
13
13
|
{
|
|
14
14
|
"name": "check_mr_traceability.sh",
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Guardian Framework — Pi Package Bootstrap
|
|
3
|
-
*
|
|
4
|
-
* Onboards users who install guardian-framework as a pi package.
|
|
5
|
-
* Checks if the project is scaffolded and guides them through setup.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { existsSync } from "node:fs";
|
|
9
|
-
import { join } from "node:path";
|
|
10
|
-
import { execSync } from "node:child_process";
|
|
11
|
-
|
|
12
|
-
const PI_DIR = ".pi";
|
|
13
|
-
const PACKAGE_VERSION = "0.1.0";
|
|
14
|
-
|
|
15
|
-
export default function (pi: any) {
|
|
16
|
-
pi.on("session_start", async (_event: any, ctx: any) => {
|
|
17
|
-
const piDir = join(ctx.cwd, PI_DIR);
|
|
18
|
-
const isScaffolded = existsSync(piDir);
|
|
19
|
-
|
|
20
|
-
if (!isScaffolded) {
|
|
21
|
-
ctx.ui.notify(
|
|
22
|
-
"Guardian Framework: project not scaffolded. Run `guardian-framework init` or use /guardian-init to get started.",
|
|
23
|
-
"info",
|
|
24
|
-
);
|
|
25
|
-
} else {
|
|
26
|
-
ctx.ui.notify(
|
|
27
|
-
`Guardian Framework v${PACKAGE_VERSION} loaded. ${isScaffolded ? "Project scaffolded." : ""}`,
|
|
28
|
-
"info",
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
pi.registerCommand("guardian-init", {
|
|
34
|
-
description:
|
|
35
|
-
"Scaffold Guardian framework (.pi/ + exports for AI tools)",
|
|
36
|
-
handler: async (_args: string, ctx: any) => {
|
|
37
|
-
const piDir = join(ctx.cwd, PI_DIR);
|
|
38
|
-
if (existsSync(piDir)) {
|
|
39
|
-
ctx.ui.notify("Guardian already scaffolded in this project.", "warn");
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
ctx.ui.notify("Scaffolding Guardian framework...", "info");
|
|
44
|
-
try {
|
|
45
|
-
const result = execSync("npx guardian-framework init --nonInteractive --lang typescript", {
|
|
46
|
-
cwd: ctx.cwd,
|
|
47
|
-
encoding: "utf-8",
|
|
48
|
-
timeout: 60000,
|
|
49
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
50
|
-
});
|
|
51
|
-
ctx.ui.notify("Guardian scaffolded successfully!", "success");
|
|
52
|
-
return result.trim();
|
|
53
|
-
} catch (e: any) {
|
|
54
|
-
ctx.ui.notify(
|
|
55
|
-
`Scaffolding failed. Run 'npx guardian-framework init' manually.\nError: ${e.message?.slice(0, 200) || e}`,
|
|
56
|
-
"error",
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
pi.registerCommand("guardian-status", {
|
|
63
|
-
description:
|
|
64
|
-
"Check Guardian framework status — installed resources + scaffold state",
|
|
65
|
-
handler: async (_args: string, ctx: any) => {
|
|
66
|
-
const piDir = join(ctx.cwd, PI_DIR);
|
|
67
|
-
const isScaffolded = existsSync(piDir);
|
|
68
|
-
|
|
69
|
-
const lines = [
|
|
70
|
-
"## Guardian Framework Status",
|
|
71
|
-
"",
|
|
72
|
-
`Version: ${PACKAGE_VERSION}`,
|
|
73
|
-
`Project scaffolded: ${isScaffolded ? "Yes" : "No"}`,
|
|
74
|
-
"",
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
if (isScaffolded) {
|
|
78
|
-
lines.push("### Resources Available");
|
|
79
|
-
lines.push("");
|
|
80
|
-
lines.push("- 19 TypeScript extensions (via package + .pi/extensions/)");
|
|
81
|
-
lines.push("- 27 agent skill definitions");
|
|
82
|
-
lines.push("- 10 validator skill definitions");
|
|
83
|
-
lines.push("- 22 workflow prompt templates");
|
|
84
|
-
lines.push("- 50+ validation shell scripts");
|
|
85
|
-
lines.push("");
|
|
86
|
-
lines.push("### Commands");
|
|
87
|
-
lines.push("");
|
|
88
|
-
lines.push("- /architect --epic <name> — Start epic from architecture");
|
|
89
|
-
lines.push("- /pipeline <name> --items=... --steps=... — Multi-step workflow");
|
|
90
|
-
lines.push("- /goal <text> — Persistent objective");
|
|
91
|
-
lines.push("- /kanban create|list|status — Task board");
|
|
92
|
-
lines.push("- /domain --explore <desc> — DDD exploration");
|
|
93
|
-
lines.push("- /project create --lang ... — Source scaffolding");
|
|
94
|
-
lines.push("- /validate — Run validators");
|
|
95
|
-
lines.push("- /curator review — Skill lifecycle");
|
|
96
|
-
lines.push("- /plan | /plan-apply — Queue edits for review");
|
|
97
|
-
lines.push("- /snippet list|add|remove — Token expansion");
|
|
98
|
-
} else {
|
|
99
|
-
lines.push("### Getting Started");
|
|
100
|
-
lines.push("");
|
|
101
|
-
lines.push("Run one of:");
|
|
102
|
-
lines.push("- `/guardian-init` — interactive scaffold");
|
|
103
|
-
lines.push("- `npx guardian-framework init` — interactive CLI");
|
|
104
|
-
lines.push("");
|
|
105
|
-
lines.push("Or for detailed docs:");
|
|
106
|
-
lines.push("- `npx guardian-framework --help`");
|
|
107
|
-
lines.push("- https://github.com/arman-jalili/guardian-framework");
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return lines.join("\n");
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
}
|