guardian-framework 0.1.140 → 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.
|
|
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.
|
|
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
|
@@ -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
|
|
18
|
-
-
|
|
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
|
|
1709
|
-
"with `## Phase N: Name (Days N-N)` sections,
|
|
1710
|
-
"
|
|
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
|
|
1714
|
-
"- Phase 1:
|
|
1715
|
-
"-
|
|
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
|
|
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
|
"",
|
|
@@ -1823,21 +1870,35 @@ export default function (pi: ExtensionAPI) {
|
|
|
1823
1870
|
}
|
|
1824
1871
|
const docText = fs.readFileSync(path.join(modulesDir, docFile), "utf-8");
|
|
1825
1872
|
const catNames = svcByCtx.get(ctx)!;
|
|
1873
|
+
// Scope to the Application/Service Layer section — module docs
|
|
1874
|
+
// legitimately title it "### Application Layer (`application/`)"
|
|
1875
|
+
// or "### Service Layer (application)".
|
|
1876
|
+
const secMatch = docText.match(/###\s+(?:Application|Service)\s+Layer[^\n]*\n([\s\S]*?)(?=\n##\s|$)/i);
|
|
1877
|
+
const section = secMatch ? secMatch[1] : docText;
|
|
1878
|
+
// Catalog rows: markdown table rows whose FIRST cell is the service
|
|
1879
|
+
// name. This is the real invariant (the service is presented as a
|
|
1880
|
+
// row in the catalog table) — not a specific header wording.
|
|
1881
|
+
const rowServices = new Set<string>();
|
|
1882
|
+
for (const line of section.split("\n")) {
|
|
1883
|
+
if (!line.trim().startsWith("|")) continue;
|
|
1884
|
+
const first = (line.split("|")[1] ?? "").trim().replace(/^`|`$/g, "");
|
|
1885
|
+
if (first && !/^-+$/.test(first)) rowServices.add(first);
|
|
1886
|
+
}
|
|
1826
1887
|
let miss = 0;
|
|
1827
|
-
for (const nm of catNames)
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1888
|
+
for (const nm of catNames) {
|
|
1889
|
+
if (!rowServices.has(nm)) {
|
|
1890
|
+
checks.push(" FAIL " + docFile + ": catalog service " + nm + " is not presented as a row in the Application Layer catalog section" +
|
|
1891
|
+
(docText.includes(nm) ? " (the name appears in the doc, but not as a catalog row)" : ""));
|
|
1892
|
+
miss++;
|
|
1893
|
+
}
|
|
1832
1894
|
}
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1895
|
+
issues += miss;
|
|
1896
|
+
// Implemented-seam / planned-pointer checks apply only to WIDE
|
|
1897
|
+
// catalog rows (5-column: Service | use case | FR | Status |
|
|
1898
|
+
// Delivered by). A 3-column catalog is accepted as-is.
|
|
1899
|
+
for (const line of section.split("\n")) {
|
|
1836
1900
|
if (!line.trim().startsWith("|")) continue;
|
|
1837
1901
|
const cells = line.split("|").map((c) => c.trim());
|
|
1838
|
-
// Locate the mapsToFr column (FR-00x[, FR-00y]*) — use-case
|
|
1839
|
-
// text may contain escaped pipes (\|) which naive split
|
|
1840
|
-
// fragments, so fixed indexes are unreliable.
|
|
1841
1902
|
const frIdx = cells.findIndex((c, i) => i >= 2 && /^((FR|NFR)-\d[\d, ]*)(,\s*(FR|NFR)-\d[\d, ]*)*$/.test(c));
|
|
1842
1903
|
if (cells.length < 6 || frIdx < 0) continue;
|
|
1843
1904
|
const svcName = cells[1].replace(/^`|`$/g, "");
|
|
@@ -1865,7 +1926,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
1865
1926
|
}
|
|
1866
1927
|
}
|
|
1867
1928
|
}
|
|
1868
|
-
|
|
1929
|
+
|
|
1930
|
+
checks.push(issues === 0
|
|
1869
1931
|
? " PASS Catalog blocks + seams verified for all " + svcV.length + " application services"
|
|
1870
1932
|
: " FAIL " + issues + " catalog/seam issue(s)");
|
|
1871
1933
|
if (issues > 0) allPassed = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-09-
|
|
2
|
+
"timestamp": "2026-09-25T19:38:51Z",
|
|
3
3
|
"mode": "all",
|
|
4
4
|
"stages_run": [],
|
|
5
5
|
"summary": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"failed": 1,
|
|
9
9
|
"skipped": 12
|
|
10
10
|
},
|
|
11
|
-
"duration_seconds":
|
|
11
|
+
"duration_seconds": 1,
|
|
12
12
|
"results": [
|
|
13
13
|
{
|
|
14
14
|
"name": "check_mr_traceability.sh",
|