guardian-framework 0.1.0 → 0.1.1

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 CHANGED
@@ -92,10 +92,19 @@ During that build:
92
92
  ## Installation
93
93
 
94
94
  ```bash
95
- npx guardian-framework init # Scaffold in current directory
95
+ # CLI tool scaffold in any project
96
+ npx guardian-framework init
96
97
  npm install -g guardian-framework
97
98
  ```
98
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
+
99
108
  **Prerequisites:** [Bun](https://bun.sh) >= 1.0.0
100
109
 
101
110
  ---
package/dist/cli.js CHANGED
@@ -1317,6 +1317,8 @@ __export(exports_package, {
1317
1317
  type: () => type,
1318
1318
  scripts: () => scripts,
1319
1319
  repository: () => repository,
1320
+ publishConfig: () => publishConfig,
1321
+ pi: () => pi,
1320
1322
  name: () => name,
1321
1323
  main: () => main,
1322
1324
  license: () => license,
@@ -1333,7 +1335,7 @@ __export(exports_package, {
1333
1335
  bin: () => bin,
1334
1336
  author: () => author
1335
1337
  });
1336
- var name = "guardian-framework", version = "0.1.0", 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, 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.1", 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;
1337
1339
  var init_package = __esm(() => {
1338
1340
  exports = {
1339
1341
  ".": {
@@ -1344,7 +1346,7 @@ var init_package = __esm(() => {
1344
1346
  bin = {
1345
1347
  "guardian-framework": "./dist/cli.js"
1346
1348
  };
1347
- files = ["dist/", "templates/"];
1349
+ files = ["dist/", "templates/", "pi-package/"];
1348
1350
  engines = {
1349
1351
  bun: ">=1.0.0"
1350
1352
  };
@@ -1358,6 +1360,14 @@ var init_package = __esm(() => {
1358
1360
  typecheck: "tsc --noEmit",
1359
1361
  dev: "bun run src/cli.ts"
1360
1362
  };
1363
+ publishConfig = {
1364
+ access: "public"
1365
+ };
1366
+ pi = {
1367
+ extensions: ["./pi-package/extensions"],
1368
+ skills: ["./pi-package/skills"],
1369
+ prompts: ["./pi-package/prompts"]
1370
+ };
1361
1371
  repository = {
1362
1372
  type: "git",
1363
1373
  url: "https://github.com/arman-jalili/guardian-framework"
@@ -1366,13 +1376,13 @@ var init_package = __esm(() => {
1366
1376
  url: "https://github.com/arman-jalili/guardian-framework/issues"
1367
1377
  };
1368
1378
  dependencies = {
1369
- "@clack/prompts": "^0.7.0",
1379
+ "@clack/prompts": "^1.6.0",
1370
1380
  yaml: "^2.9.0"
1371
1381
  };
1372
1382
  devDependencies = {
1373
1383
  "@biomejs/biome": "^1.9.0",
1374
1384
  "@types/bun": "latest",
1375
- typescript: "^5.0.0"
1385
+ typescript: "^6.0.3"
1376
1386
  };
1377
1387
  keywords = [
1378
1388
  "cli",
@@ -1383,7 +1393,8 @@ var init_package = __esm(() => {
1383
1393
  "pi-first",
1384
1394
  "token-optimized",
1385
1395
  "claude-code",
1386
- "github-copilot"
1396
+ "github-copilot",
1397
+ "pi-package"
1387
1398
  ];
1388
1399
  package_default = {
1389
1400
  name,
@@ -1397,6 +1408,8 @@ var init_package = __esm(() => {
1397
1408
  files,
1398
1409
  engines,
1399
1410
  scripts,
1411
+ publishConfig,
1412
+ pi,
1400
1413
  repository,
1401
1414
  homepage,
1402
1415
  bugs,
@@ -10916,9 +10929,9 @@ async function runInitPrompts() {
10916
10929
  message: "What is your project name?",
10917
10930
  placeholder: "my-project",
10918
10931
  validate: (value) => {
10919
- if (!value.trim())
10932
+ if (!value?.trim())
10920
10933
  return "Project name is required";
10921
- if (value.includes(" "))
10934
+ if (value?.includes(" "))
10922
10935
  return "Use dashes instead of spaces";
10923
10936
  return;
10924
10937
  }
package/dist/exports.js CHANGED
@@ -977,6 +977,8 @@ __export(exports_package, {
977
977
  type: () => type,
978
978
  scripts: () => scripts,
979
979
  repository: () => repository,
980
+ publishConfig: () => publishConfig,
981
+ pi: () => pi,
980
982
  name: () => name,
981
983
  main: () => main,
982
984
  license: () => license,
@@ -993,7 +995,7 @@ __export(exports_package, {
993
995
  bin: () => bin,
994
996
  author: () => author
995
997
  });
996
- var name = "guardian-framework", version = "0.1.0", 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, 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.1", 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;
997
999
  var init_package = __esm(() => {
998
1000
  exports = {
999
1001
  ".": {
@@ -1004,7 +1006,7 @@ var init_package = __esm(() => {
1004
1006
  bin = {
1005
1007
  "guardian-framework": "./dist/cli.js"
1006
1008
  };
1007
- files = ["dist/", "templates/"];
1009
+ files = ["dist/", "templates/", "pi-package/"];
1008
1010
  engines = {
1009
1011
  bun: ">=1.0.0"
1010
1012
  };
@@ -1018,6 +1020,14 @@ var init_package = __esm(() => {
1018
1020
  typecheck: "tsc --noEmit",
1019
1021
  dev: "bun run src/cli.ts"
1020
1022
  };
1023
+ publishConfig = {
1024
+ access: "public"
1025
+ };
1026
+ pi = {
1027
+ extensions: ["./pi-package/extensions"],
1028
+ skills: ["./pi-package/skills"],
1029
+ prompts: ["./pi-package/prompts"]
1030
+ };
1021
1031
  repository = {
1022
1032
  type: "git",
1023
1033
  url: "https://github.com/arman-jalili/guardian-framework"
@@ -1026,13 +1036,13 @@ var init_package = __esm(() => {
1026
1036
  url: "https://github.com/arman-jalili/guardian-framework/issues"
1027
1037
  };
1028
1038
  dependencies = {
1029
- "@clack/prompts": "^0.7.0",
1039
+ "@clack/prompts": "^1.6.0",
1030
1040
  yaml: "^2.9.0"
1031
1041
  };
1032
1042
  devDependencies = {
1033
1043
  "@biomejs/biome": "^1.9.0",
1034
1044
  "@types/bun": "latest",
1035
- typescript: "^5.0.0"
1045
+ typescript: "^6.0.3"
1036
1046
  };
1037
1047
  keywords = [
1038
1048
  "cli",
@@ -1043,7 +1053,8 @@ var init_package = __esm(() => {
1043
1053
  "pi-first",
1044
1054
  "token-optimized",
1045
1055
  "claude-code",
1046
- "github-copilot"
1056
+ "github-copilot",
1057
+ "pi-package"
1047
1058
  ];
1048
1059
  package_default = {
1049
1060
  name,
@@ -1057,6 +1068,8 @@ var init_package = __esm(() => {
1057
1068
  files,
1058
1069
  engines,
1059
1070
  scripts,
1071
+ publishConfig,
1072
+ pi,
1060
1073
  repository,
1061
1074
  homepage,
1062
1075
  bugs,
@@ -9679,9 +9692,9 @@ async function runInitPrompts() {
9679
9692
  message: "What is your project name?",
9680
9693
  placeholder: "my-project",
9681
9694
  validate: (value) => {
9682
- if (!value.trim())
9695
+ if (!value?.trim())
9683
9696
  return "Project name is required";
9684
- if (value.includes(" "))
9697
+ if (value?.includes(" "))
9685
9698
  return "Use dashes instead of spaces";
9686
9699
  return;
9687
9700
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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,7 @@
14
14
  "bin": {
15
15
  "guardian-framework": "./dist/cli.js"
16
16
  },
17
- "files": ["dist/", "templates/"],
17
+ "files": ["dist/", "templates/", "pi-package/"],
18
18
  "engines": {
19
19
  "bun": ">=1.0.0"
20
20
  },
@@ -28,6 +28,14 @@
28
28
  "typecheck": "tsc --noEmit",
29
29
  "dev": "bun run src/cli.ts"
30
30
  },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "pi": {
35
+ "extensions": ["./pi-package/extensions"],
36
+ "skills": ["./pi-package/skills"],
37
+ "prompts": ["./pi-package/prompts"]
38
+ },
31
39
  "repository": {
32
40
  "type": "git",
33
41
  "url": "https://github.com/arman-jalili/guardian-framework"
@@ -37,13 +45,13 @@
37
45
  "url": "https://github.com/arman-jalili/guardian-framework/issues"
38
46
  },
39
47
  "dependencies": {
40
- "@clack/prompts": "^0.7.0",
48
+ "@clack/prompts": "^1.6.0",
41
49
  "yaml": "^2.9.0"
42
50
  },
43
51
  "devDependencies": {
44
52
  "@biomejs/biome": "^1.9.0",
45
53
  "@types/bun": "latest",
46
- "typescript": "^5.0.0"
54
+ "typescript": "^6.0.3"
47
55
  },
48
56
  "keywords": [
49
57
  "cli",
@@ -54,7 +62,8 @@
54
62
  "pi-first",
55
63
  "token-optimized",
56
64
  "claude-code",
57
- "github-copilot"
65
+ "github-copilot",
66
+ "pi-package"
58
67
  ],
59
68
  "author": "Arman Wolkensteiner-Jalili",
60
69
  "license": "MIT"
@@ -0,0 +1,113 @@
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
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-06-29T22:16:25Z",
2
+ "timestamp": "2026-07-01T06:22:13Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {