guardian-framework 0.1.148 → 0.1.150

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/README.md CHANGED
@@ -41,15 +41,24 @@ Enrich Module Docs ←─ agent fills DDD content from exploration
41
41
  ADRs, Diagrams, Specs ←─ you challenge decisions, finalize
42
42
  │
43
43
  ▼
44
- Roadmap Plan ←─ you adopt phases, set priorities
44
+ Roadmap Plan ←─ one module per phase (Phase 0 = bootstrap)
45
45
  │
46
46
  ▼
47
- Epic Execution ─── agents implement, you review PRs
47
+ Epic Execution ─── one branch + one PR per epic, local CI per issue
48
+ │ └─ parallel epics: isolated worktrees, contract-freeze gate
49
+ ▼
50
+ Wiring Check ─── every module must be INSTALLED in the app shell
48
51
  │
49
52
  ▼
50
53
  Enforcement Pipeline ─── CI blocks merges on violation
51
54
  ```
52
55
 
56
+ > New since 0.1.128: exploration is terminal and self-driving, stubs follow the
57
+ > detected language, epics ship as one PR, parallel epics are gated on frozen
58
+ > contracts, and five enforcement controls make "can this actually block a
59
+ > merge?" a machine-readable answer. See
60
+ > [manual §30–39](docs/USER_MANUAL.md#30-exploration--roadmap--epic-the-current-pipeline).
61
+
53
62
  ---
54
63
 
55
64
  ## Walkthrough: From Intent to Enforcement
@@ -207,30 +216,42 @@ If someone (or an AI) adds a dependency from the domain layer to infrastructure,
207
216
  ## Quick Start
208
217
 
209
218
  ```bash
210
- # 1. Scaffold
219
+ # 1. Init (installs .pi/ — prompts, extensions, validators)
211
220
  cd your-project
212
221
  npx guardian-framework init
213
222
 
214
- # 2. Explore (iterative — review, refine, repeat)
215
- /domain --explore "your business intent" # agent classifies core/supporting/generic — YOU gate it
216
- /domain --validate <session-id> # structural + UL + ADR-008 depth rules
217
-
218
- # 3. Generate architecture from exploration (module docs gain Modeling Depth + invariants)
219
- /domain --architect-scaffold <session-id>
223
+ # 2. Explore — the agent classifies core/supporting/generic; YOU gate the depth.
224
+ # Delivers the full protocol in one message, then STOPS. Resume with --resume.
225
+ /domain --explore "your business intent"
220
226
 
221
- # 4. Enrich module docs with full DDD content
222
- /domain --enrich <session-id>
227
+ # 3. Validate the analysis against the files that were written (drift gate)
228
+ guardian domain validate <session-id>
223
229
 
224
- # 5. Review and refine (ADRs, diagrams, modules — human-in-the-loop)
230
+ # 4. Create module docs — never overwrites existing ones
231
+ guardian domain scaffold --session <session-id>
232
+ guardian domain enrich --session <session-id> # full DDD content, session-scoped
225
233
 
226
- # 6. Adopt the roadmap
234
+ # 5. Roadmap — ONE module per phase, Phase 0 is Project Bootstrap
227
235
  /architect --roadmap
228
- /architect --adopt-roadmap
229
236
 
230
- # 6. Execute
231
- /architect --phase "Phase 0"
237
+ # 6. Execute — epic mode is the default: one branch, local CI per issue, one PR
238
+ /architect --epic "Policy Engine"
239
+
240
+ # ...or run several in parallel (gated on frozen contracts)
241
+ bash .pi/scripts/epic-registry.sh freeze "Policy Engine" --frozen
242
+ bash .pi/scripts/epic-parallel.sh "Policy Engine" # isolated worktree
243
+
244
+ # 7. Prove it is actually wired, not just implemented
245
+ bash .pi/scripts/check_composition_root.sh
246
+ bash .pi/scripts/validate-wiring-claims.sh
247
+
248
+ # 8. See what can block a merge
249
+ bash .pi/scripts/validate-guards.sh --list
232
250
  ```
233
251
 
252
+ Minimal project bootstrap is the default (shared kernel only). Add bounded-context
253
+ folders with `--withContexts`, or let the roadmap phases create them.
254
+
234
255
  ---
235
256
 
236
257
  ## What This Means
@@ -248,6 +269,8 @@ Guardian was proven on [Rigorix](https://github.com/arman-jalili/rigorix-oss): 1
248
269
  | | |
249
270
  |---|---|
250
271
  | **User Manual** | [docs/USER_MANUAL.md](docs/USER_MANUAL.md) — every workflow, command, and extension |
272
+ | **Pipeline (0.1.148)** | [manual §30–39](docs/USER_MANUAL.md#30-exploration--roadmap--epic-the-current-pipeline) — explore → roadmap → epic → wiring → controls |
273
+ | **Design note** | [docs/design/exploration-and-roadmap-pipeline.md](docs/design/exploration-and-roadmap-pipeline.md) |
251
274
  | **Proven on** | [Rigorix](https://github.com/arman-jalili/rigorix-oss) — 146K LOC Rust, 30 modules |
252
275
  | **Source** | [github.com/arman-jalili/guardian-framework](https://github.com/arman-jalili/guardian-framework) |
253
276
  | **License** | MIT |
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.148", 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.150", 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.148", 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.150", 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.148",
3
+ "version": "0.1.150",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -157,5 +157,12 @@ export type EpicState = {
157
157
  createdAt: string;
158
158
  tdd: boolean;
159
159
  tddTestFiles: string[];
160
+ // ── Orchestration (optional: added 0.1.150) ──────────────────────────
161
+ // These are written by /architect before the epic starts (--pr-per,
162
+ // --parallel/--worktree) and MUST survive startEpic's state save, which
163
+ // otherwise builds a fresh literal and drops them.
164
+ prStrategy?: "epic" | "issue";
165
+ parallel?: boolean;
166
+ worktree?: string;
160
167
  };
161
168
 
@@ -434,7 +434,18 @@ class EpicManager {
434
434
  }
435
435
  }
436
436
 
437
+ // Carry over orchestration decided BEFORE the epic started (--pr-per,
438
+ // --parallel/--worktree). This literal is written over the file, so
439
+ // anything not carried here is silently lost — which is exactly what
440
+ // happened to prStrategy/parallel/worktree before 0.1.150.
441
+ const priorState = loadEpicState(this.cwd);
442
+ const carried: Pick<EpicState, "prStrategy" | "parallel" | "worktree"> = {};
443
+ if (priorState?.prStrategy) carried.prStrategy = priorState.prStrategy;
444
+ if (priorState?.parallel) carried.parallel = priorState.parallel;
445
+ if (priorState?.worktree) carried.worktree = priorState.worktree;
446
+
437
447
  const state: EpicState = {
448
+ ...carried,
438
449
  name,
439
450
  trackingIssueId: effectiveTrackingId,
440
451
  epicId: effectiveEpicId,
@@ -879,13 +890,19 @@ export default function architectExtension(pi: ExtensionAPI) {
879
890
  const tddEnabled = tokens.includes("--tdd");
880
891
 
881
892
  if (!epicName) {
882
- ctx.ui.notify('Usage: /architect --epic "Epic Name" [--tracking-issue N] [--tdd]', "error");
893
+ ctx.ui.notify(
894
+ 'Usage: /architect --epic "Epic Name" [--tracking-issue N] [--tdd] [--pr-per epic|issue] [--parallel|--worktree]',
895
+ "error",
896
+ );
883
897
  return;
884
898
  }
885
899
 
886
900
  try {
887
901
  if (!epicName || epicName.trim() === "") {
888
- ctx.ui.notify('Usage: /architect --epic "Epic Name" [--tracking-issue N] [--tdd]', "error");
902
+ ctx.ui.notify(
903
+ 'Usage: /architect --epic "Epic Name" [--tracking-issue N] [--tdd] [--pr-per epic|issue] [--parallel|--worktree]',
904
+ "error",
905
+ );
889
906
  return;
890
907
  }
891
908
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-11-07T14:10:40Z",
2
+ "timestamp": "2026-11-13T15:22:46Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {