guardian-framework 0.1.84 → 0.1.86

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.84", 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.86", 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.84", 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.86", 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.84",
3
+ "version": "0.1.86",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -18,8 +18,7 @@ function readModuleDoc(cwd: string, moduleId: string): string {
18
18
 
19
19
  /** Extract a named section's body (between ## heading and next ## / --- / EOF). */
20
20
  function extractSection(doc: string, heading: string): string {
21
- const re = new RegExp(`## ${heading}\n([\\s\\S]*?)(?=\n##|\n---|$)`);
22
- const m = re.exec(doc);
21
+ const m = doc.match(new RegExp(`## ${heading}\n([\\s\\S]*?)(?=\n##|\n---|$)`));
23
22
  return m ? m[1].trim() : "";
24
23
  }
25
24
 
@@ -134,6 +133,30 @@ function isJavaProject(cwd?: string): boolean {
134
133
  }
135
134
  }
136
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
+
137
160
  // ── Issue Generation ──
138
161
 
139
162
  export function generateIssueMarkdown(
@@ -159,7 +182,7 @@ export function generateIssueMarkdown(
159
182
  // Language-aware test paths
160
183
  const isJava = isJavaProject(cwd);
161
184
  const testBaseDir = isJava ? "src/test/java" : "tests/unit";
162
- const testRunnerHint = isJava ? "mvn test" : "bun test";
185
+ const testRunnerHint = isJava ? "mvn test" : testRunnerFromCwd(cwd) || "bun test";
163
186
 
164
187
  const testLine = tdd
165
188
  ? ` - "update: ${testBaseDir}/ (failing tests already generated — make them pass)"`
@@ -252,11 +275,13 @@ ${yamlAcs}
252
275
  Read .pi/architecture/modules/${slice.module}.md BEFORE implementing.
253
276
  All Acceptance Criteria in that file must be satisfied before this issue is closed.
254
277
  Component focus: ${comp.name}.
278
+ 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
280
 
256
281
  file_changes:
257
- - "modify: src/${moduleId}/domain/"
258
- - "modify: src/${moduleId}/application/"
259
- - "modify: src/${moduleId}/infrastructure/"
282
+ - "create: src/${moduleId}/domain/"
283
+ - "create: src/${moduleId}/application/"
284
+ - "create: src/${moduleId}/infrastructure/"
260
285
  - "modify: src/${moduleId}/interfaces/"
261
286
  - ${testLine}
262
287
  ---
@@ -306,9 +331,10 @@ ${stepsMarkdown}
306
331
  > **Agent instructions:**
307
332
  > 1. Open \`.pi/architecture/modules/${slice.module}.md\` — read the full Acceptance Criteria table
308
333
  > 2. Identify which rows are your responsibility for **${comp.name}**
309
- > 3. Implement all of them — entity, JPA entity, migration, adapter (all endpoints), mapper, use case
310
- > 4. Verify each AC row is satisfied in \`src/\` before marking done
311
- > 5. Run validators and create MR
334
+ > 3. Create concrete implementation files (\`.impl.${implSuffix(cwd)}\`) in \`src/${moduleId}/\` — the interface stubs from the contract freeze are NOT enough
335
+ > 4. Each domain aggregate/service must have a working implementation with business logic
336
+ > 5. Verify each AC row is satisfied in \`src/\` before marking done
337
+ > 6. Run validators and create MR
312
338
 
313
339
  ### Steps
314
340
 
@@ -375,7 +401,6 @@ guardian_issue:
375
401
  Define the contract before any implementation. Every implementation issue
376
402
  depends on this contract being frozen first. The contract should include:
377
403
  interfaces, types, DTOs, event schemas, API paths, error formats.
378
- ${_codegenSkill ? `Follow: .pi/skills/agents/${_codegenSkill}.md` : ""}
379
404
 
380
405
  file_changes:
381
406
  - "create: src/${moduleId}/domain/"
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-16T13:08:13Z",
2
+ "timestamp": "2026-07-16T19:25:06Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {