guardian-framework 0.1.113 → 0.1.114

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.113", 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;
3205
+ var name = "guardian-framework", version = "0.1.114", 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
  ".": {
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.113", 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;
1990
+ var name = "guardian-framework", version = "0.1.114", 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
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.113",
3
+ "version": "0.1.114",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -797,32 +797,58 @@ export default function (pi: ExtensionAPI) {
797
797
  // Using sendMessage with triggerTurn=true causes the agent to process
798
798
  // this as a new conversation turn, not as a command response.
799
799
  const analysisPrompt = [
800
- "I need you to analyze the following business domain using Domain-Driven Design.",
801
- "I have created stub files in .pi/domain/exploration.md and .pi/domain/ubiquitous-language.md.",
800
+ "Analyze this business domain with Domain-Driven Design. You MUST work in SMALL",
801
+ "incremental steps — never produce the whole model in one message, or you will be",
802
+ "truncated mid-JSON and lose work.",
802
803
  "",
803
- "Your task:",
804
- "1. READ .pi/domain/exploration.md — it has the business context and empty tables",
805
- "2. ANALYZE the domain: actors, FR/NFR, assumptions, bounded contexts, entities, events , glossary",
806
- "3. FILL IN all empty tables in .pi/domain/exploration.md with your analysis",
807
- "4. UPDATE .pi/domain/ubiquitous-language.md with the glossary terms",
804
+ "Session: " + sessionId,
805
+ "Business Context: " + sanitized,
808
806
  "",
809
- "Business Context:",
810
- sanitized,
807
+ "STEP PROTOCOL (strict — one step per message, each message <= ~1,500 tokens of JSON):",
808
+ "",
809
+ "1. STRATEGIC PASS (this message): reply with ONLY this JSON, nothing else —",
810
+ '```json',
811
+ '{',
812
+ ' "actors": [{ "name": "...", "description": "...", "interactions": "..." }],',
813
+ ' "assumptions": [{ "assumption": "...", "impactIfWrong": "...", "mitigation": "..." }],',
814
+ ' "boundedContexts": [',
815
+ ' { "name": "...", "description": "...", "entities": ["..."],',
816
+ ' "subdomainType": "core|supporting|generic", "subdomainRationale": "one line" }',
817
+ ' ],',
818
+ ' "contextMap": [{ "from": "A", "to": "B", "relationship": "partnership|shared-kernel|conformist|anticorruption-layer|open-host", "note": "..." }],',
819
+ ' "openQuestions": "..."',
820
+ '}',
821
+ '```',
822
+ "then call domain_save_result with { sessionId, responseJson: <that JSON> }. It merges;",
823
+ "the file is saved for you. Do NOT also edit exploration.md by hand.",
811
824
  "",
812
- "Use this JSON schema as a reference for structuring your analysis:",
825
+ "2. PER-CONTEXT PASS (repeat for EACH core/tactical bounded context, one context per message):",
826
+ "reply with ONLY this JSON for one context, then call domain_save_result again:",
813
827
  '```json',
814
- "{",
815
- ' "actors": [{ "name": "", "description": "", "interactions": "" }],',
816
- ' "functionalRequirements": [{ "id": "FR-001", "requirement": "", "priority": "critical|high|medium|low", "boundedContext": "" }],',
817
- ' "nonFunctionalRequirements": [{ "id": "NFR-001", "requirement": "", "category": "performance|security|scalability|availability|maintainability", "target": "" }],',
818
- ' "assumptions": [{ "assumption": "", "impactIfWrong": "", "mitigation": "" }],',
819
- ' "boundedContexts": [{ "name": "", "description": "", "entities": [""] }],',
820
- ' "entities": [{ "name": "", "context": "", "type": "entity|value-object|aggregate-root", "description": "" }],',
821
- ' "domainEvents": [{ "name": "", "context": "", "description": "", "triggeredBy": "" }],',
822
- ' "ubiquitousLanguage": [{ "term": "", "definition": "", "boundedContext": "", "aliases": [""], "examples": "" }]',
823
- "}",
828
+ '{',
829
+ ' "boundedContexts": [{ "name": "TheContext", "description": "...", "entities": ["Entity1"],',
830
+ ' "invariants": [{ "rule": "...", "illegalStatePrevented": "..." }] }],',
831
+ ' "entities": [',
832
+ ' { "name": "Entity1", "context": "TheContext", "type": "entity|value-object|aggregate-root",',
833
+ ' "description": "...",',
834
+ ' "justification": { "identityPersists": true, "immutable": false, "equalByState": false } }',
835
+ ' ],',
836
+ ' "domainEvents": [',
837
+ ' { "name": "Event", "context": "TheContext", "description": "...", "triggeredBy": "...",',
838
+ ' "triage": { "domainExpertCares": true, "crossesAggregateBoundary": false, "needsAudit": false } }',
839
+ ' ],',
840
+ ' "ubiquitousLanguage": [{ "term": "...", "definition": "...", "boundedContext": "TheContext", "aliases": [], "examples": "" }]',
841
+ '}',
824
842
  '```',
843
+ "Supporting/generic contexts need no detail pass — the strategic entry is enough.",
844
+ "",
845
+ "RULES:",
846
+ "- If a message of yours is cut off mid-JSON, continue from exactly where you stopped in the",
847
+ " NEXT message (never restart the whole model).",
848
+ "- Never emit the full model in one response and never exceed ~1,500 tokens of JSON per message.",
849
+ "- After the last context, run /domain --validate " + sessionId + " and report the checks.",
825
850
  ].join("\n");
851
+
826
852
 
827
853
  try {
828
854
  pi.sendMessage(
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-04T16:15:16Z",
2
+ "timestamp": "2026-09-04T18:20:52Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {