guardian-framework 0.1.101 → 0.1.102

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
@@ -3197,7 +3197,7 @@ __export(exports_package, {
3197
3197
  bin: () => bin,
3198
3198
  author: () => author
3199
3199
  });
3200
- var name = "guardian-framework", version = "0.1.101", 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;
3200
+ var name = "guardian-framework", version = "0.1.102", 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;
3201
3201
  var init_package = __esm(() => {
3202
3202
  exports = {
3203
3203
  ".": {
package/dist/exports.js CHANGED
@@ -1982,7 +1982,7 @@ __export(exports_package, {
1982
1982
  bin: () => bin,
1983
1983
  author: () => author
1984
1984
  });
1985
- var name = "guardian-framework", version = "0.1.101", 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;
1985
+ var name = "guardian-framework", version = "0.1.102", 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;
1986
1986
  var init_package = __esm(() => {
1987
1987
  exports = {
1988
1988
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.101",
3
+ "version": "0.1.102",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -133,30 +133,6 @@ function isJavaProject(cwd?: string): boolean {
133
133
  }
134
134
  }
135
135
 
136
- /** Get the test runner command for a project language. */
137
- function testRunnerFromCwd(cwd?: string): string | null {
138
- if (!cwd) return null;
139
- try {
140
- if (existsSync(join(cwd, "Cargo.toml"))) return "cargo test";
141
- if (existsSync(join(cwd, "go.mod"))) return "go test";
142
- if (existsSync(join(cwd, "pyproject.toml")) || existsSync(join(cwd, "requirements.txt"))) return "pytest";
143
- if (existsSync(join(cwd, "package.json"))) return "bun test";
144
- } catch {}
145
- return null;
146
- }
147
-
148
- /** Get the implementation file suffix for a project language. */
149
- function implSuffix(cwd?: string): string {
150
- if (!cwd) return "ts";
151
- try {
152
- if (existsSync(join(cwd, "pom.xml")) || existsSync(join(cwd, "build.gradle")) || existsSync(join(cwd, "build.gradle.kts"))) return "java";
153
- if (existsSync(join(cwd, "Cargo.toml"))) return "rs";
154
- if (existsSync(join(cwd, "go.mod"))) return "go";
155
- if (existsSync(join(cwd, "pyproject.toml")) || existsSync(join(cwd, "requirements.txt"))) return "py";
156
- } catch {}
157
- return "ts";
158
- }
159
-
160
136
  // ── Issue Generation ──
161
137
 
162
138
  export function generateIssueMarkdown(
@@ -182,7 +158,7 @@ export function generateIssueMarkdown(
182
158
  // Language-aware test paths
183
159
  const isJava = isJavaProject(cwd);
184
160
  const testBaseDir = isJava ? "src/test/java" : "tests/unit";
185
- const testRunnerHint = isJava ? "mvn test" : testRunnerFromCwd(cwd) || "bun test";
161
+ const testRunnerHint = isJava ? "mvn test" : "bun test";
186
162
 
187
163
  const testLine = tdd
188
164
  ? ` - "update: ${testBaseDir}/ (failing tests already generated — make them pass)"`
@@ -276,7 +252,7 @@ ${yamlAcs}
276
252
  All Acceptance Criteria in that file must be satisfied before this issue is closed.
277
253
  Component focus: ${comp.name}.
278
254
  CONCRETE IMPLEMENTATIONS MUST BE CREATED — interface stubs from the contract freeze
279
- are not sufficient. Each domain service/aggregate needs a concrete .impl.${implSuffix(cwd)} file.
255
+ are not sufficient. Each domain service/aggregate needs a concrete .impl.${isJava ? "java" : "ts"} file.
280
256
 
281
257
  file_changes:
282
258
  - "create: src/${moduleId}/domain/"
@@ -331,7 +307,7 @@ ${stepsMarkdown}
331
307
  > **Agent instructions:**
332
308
  > 1. Open \`.pi/architecture/modules/${slice.module}.md\` — read the full Acceptance Criteria table
333
309
  > 2. Identify which rows are your responsibility for **${comp.name}**
334
- > 3. Create concrete implementation files (\`.impl.${implSuffix(cwd)}\`) in \`src/${moduleId}/\` — the interface stubs from the contract freeze are NOT enough
310
+ > 3. Create concrete implementation files (\`.impl.${isJava ? "java" : "ts"}\`) in \`src/${moduleId}/\` — the interface stubs from the contract freeze are NOT enough
335
311
  > 4. Each domain aggregate/service must have a working implementation with business logic
336
312
  > 5. Verify each AC row is satisfied in \`src/\` before marking done
337
313
  > 6. Run validators and create MR
@@ -466,8 +442,8 @@ ${implSteps.length > 0
466
442
 
467
443
  > **Agent:** Create interface-only files. No implementation. Use Clean Architecture layers:
468
444
  > 1. Read the architecture module to understand each component's role
469
- > 2. Place domain interfaces in domain/, service interfaces in application/, API contracts in interfaces/http/
470
- > 3. DTOs with proper validation decorators go in application/
445
+ > 2. Place domain interfaces in domain/, service interfaces in application/, DTOs in application/
446
+ > 3. Controllers/routers are CONCRETE — they do NOT get interfaces. The concrete router/handler class goes directly in interfaces/http/ without a separate contract file.
471
447
  > 4. Event schemas go in domain/event/
472
448
  > 5. Repository interfaces go in infrastructure/repository/
473
449
  >
@@ -598,6 +574,16 @@ run_stage "11" "${moduleId}_proofing" \\
598
574
  > 3. Self-documenting with --help
599
575
  > 4. Exit 0 for pass, 1 for fail
600
576
  >
577
+ > CRITICAL: Do NOT map handler type files to separate impl files. Controllers/routers
578
+ > are concrete — they DO NOT have a separate interface. The contract checker must:
579
+ > - ✅ Verify domain and application interfaces have impls
580
+ > - ✅ Verify DTO schemas exist and match the module doc
581
+ > - ❌ NOT check for a handlers.ts → router.impl.ts mapping (handlers are concrete)
582
+ > - ❌ NOT create separate contract files for the HTTP layer
583
+ >
584
+ > For the HTTP layer, just verify the router file exists in interfaces/http/. That\'s
585
+ > the concrete handler — no interface needed.
586
+ >
601
587
  > End by running the full CI pipeline to verify integration:
602
588
  > \`bash .pi/scripts/ci/run_hardening_stages.sh\`
603
589
  `;
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-19T06:04:23Z",
2
+ "timestamp": "2026-07-20T12:29:56Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {