guardian-framework 0.1.141 → 0.1.142

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
@@ -3206,7 +3206,7 @@ __export(exports_package, {
3206
3206
  bin: () => bin,
3207
3207
  author: () => author
3208
3208
  });
3209
- var name = "guardian-framework", version = "0.1.141", 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;
3209
+ var name = "guardian-framework", version = "0.1.142", 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;
3210
3210
  var init_package = __esm(() => {
3211
3211
  exports = {
3212
3212
  ".": {
package/dist/exports.js CHANGED
@@ -1991,7 +1991,7 @@ __export(exports_package, {
1991
1991
  bin: () => bin,
1992
1992
  author: () => author
1993
1993
  });
1994
- var name = "guardian-framework", version = "0.1.141", 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;
1994
+ var name = "guardian-framework", version = "0.1.142", 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;
1995
1995
  var init_package = __esm(() => {
1996
1996
  exports = {
1997
1997
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.141",
3
+ "version": "0.1.142",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -14,8 +14,12 @@ acceptance criteria.
14
14
 
15
15
  **Format conventions:**
16
16
  - Each `## Phase N` section defines one delivery phase
17
- - `### Modules` table lists the bounded contexts implemented in this phase
18
- - `### Dependencies` lists phase prerequisites
17
+ - `### Modules` table lists ONLY the bounded contexts built in this phase
18
+ - **Invariant:** each bounded context appears in exactly ONE phase's `### Modules` table
19
+ (its build phase). Modules a phase merely uses are referenced under `### Dependencies`,
20
+ never re-listed as Modules (no repeats, no "All")
21
+ - `### Dependencies` lists upstream phases AND the modules they provide (keep these
22
+ references — implementation agents use them)
19
23
  - `### Database Migrations` lists SQL migration files
20
24
  - `### Acceptance Criteria` lists verifiable checkboxes
21
25
 
@@ -1586,6 +1586,34 @@ export default function (pi: ExtensionAPI) {
1586
1586
  if (chunks.length > 0) servicesCatalog = chunks.join("\n\n");
1587
1587
  } catch { /* leave fallback text */ }
1588
1588
 
1589
+ // Dependency context for the roadmap phase: keep the references (they are
1590
+ // useful) and hand the agent the graph so it can order phases without
1591
+ // duplicating a module across Modules tables.
1592
+ let dependencyContext = "(no dependency sections found)";
1593
+ try {
1594
+ const depRaw = JSON.parse(fs.readFileSync(sRawPath, "utf-8")) as Record<string, unknown>;
1595
+ const lines: string[] = [];
1596
+ for (const f of moduleFiles) {
1597
+ const doc = fs.readFileSync(path.join(modulesDir, f), "utf-8");
1598
+ // Accept both formats: "### Depends On" (list of module names/links) and
1599
+ // "**Depends On**". Keep the raw bullets — maximum context for the agent
1600
+ // (references are useful), not just parsed names.
1601
+ const m = doc.match(/(?:###\s*Depends On|\**Depends On\**)\s*\n([\s\S]*?)(?=\n\s*(?:###\s*Used By|\**Used By\**|###\s|##\s)|$)/i);
1602
+ if (!m) continue;
1603
+ const bullets = m[1].split("\n").map((l) => l.trim()).filter((l) => l.startsWith("-")).join("\n");
1604
+ if (bullets) lines.push("### " + f + "\n" + bullets);
1605
+ }
1606
+ const edges = Array.isArray(depRaw.contextMap) ? (depRaw.contextMap as Record<string, unknown>[]) : [];
1607
+ if (edges.length > 0) {
1608
+ lines.push("");
1609
+ lines.push("Context-map relationships (context → context):");
1610
+ for (const e of edges) {
1611
+ lines.push("- " + String(e.from ?? "") + " → " + String(e.to ?? "") + " (" + String(e.relationship ?? "") + ")" + (e.note ? " — " + String(e.note) : ""));
1612
+ }
1613
+ }
1614
+ if (lines.length > 0) dependencyContext = lines.join("\n");
1615
+ } catch { /* leave fallback text */ }
1616
+
1589
1617
  const enrichPrompt = [
1590
1618
  "## Task: Complete Architecture Package",
1591
1619
  "",
@@ -1602,6 +1630,14 @@ export default function (pi: ExtensionAPI) {
1602
1630
  "",
1603
1631
  servicesCatalog,
1604
1632
  "",
1633
+ "### Module dependency references (CONTEXT for phase ordering — keep these, they are useful)",
1634
+ "",
1635
+ "Order phases so a module's dependencies are built first. These are REFERENCES: if a",
1636
+ "later phase uses a module, list it under that phase's `### Dependencies` (with what it",
1637
+ "provides) — never again in its `### Modules` table.",
1638
+ "",
1639
+ dependencyContext,
1640
+ "",
1605
1641
  "**YOU MUST FOLLOW THESE 3 STEPS IN ORDER. Do not skip steps or reorder them.**",
1606
1642
  "",
1607
1643
  "### Source Data",
@@ -1705,16 +1741,27 @@ export default function (pi: ExtensionAPI) {
1705
1741
  "",
1706
1742
  "**After all module docs are enriched, generate the implementation roadmap.**",
1707
1743
  "",
1708
- "Read each module doc's dependency section and create `.pi/architecture/implementation-roadmap.md`",
1709
- "with `## Phase N: Name (Days N-N)` sections, each having:",
1710
- "- Goal, Modules table, Dependencies, Database Migrations, Acceptance Criteria",
1744
+ "Read each module doc's dependency section and the dependency references above; create",
1745
+ "`.pi/architecture/implementation-roadmap.md` with `## Phase N: Name (Days N-N)` sections,",
1746
+ "each having: Goal, Modules table, Dependencies, Database Migrations, Acceptance Criteria.",
1747
+ "",
1748
+ "HARD RULES:",
1749
+ "- Each bounded context appears in EXACTLY ONE phase's `### Modules` table — the phase where",
1750
+ " it is built (the earliest phase whose dependencies are already satisfied). Never re-list a",
1751
+ " module in a later phase: no repeats, no 'All', no 'Hardening applies to all modules' row.",
1752
+ "- Modules a phase merely USES go under `### Dependencies`, naming what they provide",
1753
+ " (ports/types/endpoints). Keep those references — they are useful and must not be dropped.",
1754
+ "- Total rows across all `### Modules` tables MUST equal the number of module docs.",
1755
+ "- Keep the `| Module | Deliverables | Architecture Doc |` columns; Architecture Doc links",
1756
+ " are the per-phase reference that implementation agents follow.",
1711
1757
  "",
1712
1758
  "Organize phases by dependency chain:",
1713
- "- Phase 0: Foundation (no upstream deps)",
1714
- "- Phase 1: Core services depending on Phase 0",
1715
- "- Phase 2+: Following the dependency chain",
1759
+ "- Phase 0: Foundation — contexts with no upstream dependencies",
1760
+ "- Phase 1: contexts whose dependencies were built in Phase 0, and so on",
1761
+ "- Do not create a phase just to group later touches of an already-built module.",
1716
1762
  "",
1717
- "Also add: Dependency Graph, Effort Estimates table, Key Milestones",
1763
+ "Also add: Dependency Graph (phase arrows + which modules cross phase boundaries),",
1764
+ "Effort Estimates table, Key Milestones",
1718
1765
  "",
1719
1766
  "### STEP 5: Fill Architecture CHANGELOG",
1720
1767
  "",
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-25T19:29:02Z",
2
+ "timestamp": "2026-09-25T19:38:51Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {