guardian-framework 0.1.105 → 0.1.110
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 +11 -2
- package/dist/cli.js +232 -16
- package/dist/exports.js +232 -16
- package/package.json +1 -1
- package/templates/languages/rust-patterns.md +5 -2
- package/templates/pi/context/checklists.md +15 -1
- package/templates/pi/domain/exploration.md +9 -0
- package/templates/pi/domain/ubiquitous-language.md +12 -0
- package/templates/pi/extensions/architect-lib/generators.ts +158 -7
- package/templates/pi/extensions/architect-lib/helpers.ts +49 -0
- package/templates/pi/extensions/architect-lib/types.ts +44 -2
- package/templates/pi/extensions/architect.ts +102 -42
- package/templates/pi/extensions/ask-user-question.ts +2 -2
- package/templates/pi/extensions/bash-guard.ts +2 -2
- package/templates/pi/extensions/config-reload.ts +12 -5
- package/templates/pi/extensions/coordinator.ts +2 -2
- package/templates/pi/extensions/curator.ts +1 -1
- package/templates/pi/extensions/domain-explorer.ts +50 -3
- package/templates/pi/extensions/filechanges.ts +2 -2
- package/templates/pi/extensions/goal-loop.ts +3 -3
- package/templates/pi/extensions/hooks.ts +1 -1
- package/templates/pi/extensions/pi-env.d.ts +96 -0
- package/templates/pi/extensions/pipeline.ts +1 -1
- package/templates/pi/extensions/project-scaffolder.ts +1 -1
- package/templates/pi/extensions/read-only-mode.ts +5 -1
- package/templates/pi/extensions/tsconfig.json +9 -2
- package/templates/pi/preflight_report.json +1 -1
- package/templates/pi/prompts/ci-blueprint.md +2 -2
- package/templates/pi/scripts/check_model_judgment.sh +28 -0
- package/templates/pi/scripts/ci/check_judgment_contracts.sh +93 -0
- package/templates/pi/scripts/ci/run_preflight.sh +3 -3
- package/templates/pi/scripts/ci/run_stage.sh +1 -1
- package/templates/pi/scripts/ci/stage_lint.sh +1 -1
- package/templates/pi/scripts/coverage.sh +58 -0
- package/templates/pi/scripts/install_coverage_tools.sh +43 -0
- package/templates/pi/scripts/languages/go/check_model_judgment.sh +70 -0
- package/templates/pi/scripts/languages/go/check_runtime_reachability.sh +34 -0
- package/templates/pi/scripts/languages/go/coverage.sh +78 -0
- package/templates/pi/scripts/languages/go/install_coverage_tools.sh +17 -0
- package/templates/pi/scripts/languages/java/check_model_judgment.sh +142 -0
- package/templates/pi/scripts/languages/java/check_runtime_reachability.sh +31 -0
- package/templates/pi/scripts/languages/java/coverage.sh +103 -0
- package/templates/pi/scripts/languages/java/install_coverage_tools.sh +40 -0
- package/templates/pi/scripts/languages/java/validate-architecture.sh +20 -0
- package/templates/pi/scripts/languages/python/check_model_judgment.sh +67 -0
- package/templates/pi/scripts/languages/python/check_runtime_reachability.sh +34 -0
- package/templates/pi/scripts/languages/python/coverage.sh +88 -0
- package/templates/pi/scripts/languages/python/install_coverage_tools.sh +22 -0
- package/templates/pi/scripts/languages/rust/check_model_judgment.sh +61 -0
- package/templates/pi/scripts/languages/rust/check_runtime_reachability.sh +40 -0
- package/templates/pi/scripts/languages/rust/coverage.sh +79 -0
- package/templates/pi/scripts/languages/rust/install_coverage_tools.sh +20 -0
- package/templates/pi/scripts/languages/rust/validate-tests.sh +9 -6
- package/templates/pi/scripts/languages/typescript/check_model_judgment.sh +81 -0
- package/templates/pi/scripts/languages/typescript/check_runtime_reachability.sh +41 -0
- package/templates/pi/scripts/languages/typescript/coverage.sh +154 -0
- package/templates/pi/scripts/languages/typescript/install_coverage_tools.sh +41 -0
- package/templates/pi/scripts/languages/typescript/validate-canonical.sh +6 -2
- package/templates/pi/scripts/languages/typescript/validate-ci.sh +2 -2
- package/templates/pi/scripts/validate-architecture-readiness.sh +29 -0
- package/templates/pi/scripts/validate-exploration-depth.sh +112 -0
- package/templates/pi/scripts/validate-runtime-wiring.sh +35 -0
- package/templates/pi/skills/agents/architecture-validator.md +28 -0
- package/templates/pi/skills/agents/test-validator.md +1 -1
- package/templates/pi/skills/go-enterprise-codegen.md +46 -0
- package/templates/pi/skills/java-spring-enterprise-codegen.md +50 -0
- package/templates/pi/skills/python-enterprise-codegen.md +46 -0
- package/templates/pi/skills/rust-enterprise-codegen.md +46 -0
- package/templates/pi/skills/typescript-enterprise-codegen.md +46 -0
|
@@ -1021,3 +1021,49 @@ live-tests = [] # Flag for tests that hit real APIs
|
|
|
1021
1021
|
*Version: 1.0.0*
|
|
1022
1022
|
*Last updated: 2026-07-03*
|
|
1023
1023
|
*Source: Guardian DDD patterns + context7 DDD reference (/jkazama/ddd-java, /ardalis/cleanarchitecture)*
|
|
1024
|
+
|
|
1025
|
+
## Judgment Tables (ADR-008)
|
|
1026
|
+
|
|
1027
|
+
Compact decision tables distilled from professional OOP/DDD practice (token-lean;
|
|
1028
|
+
the full rationale lives in the curriculum, not here).
|
|
1029
|
+
|
|
1030
|
+
### Entity vs Value Object
|
|
1031
|
+
| Question | Entity | Value Object |
|
|
1032
|
+
|----------|--------|--------------|
|
|
1033
|
+
| Identity persists across state changes? | yes | no |
|
|
1034
|
+
| Change = mutate in place? | yes | replace entirely |
|
|
1035
|
+
| Equality by identity or by attributes? | identity | all attributes |
|
|
1036
|
+
| Immutable by nature? | no | yes |
|
|
1037
|
+
| Track change history? | yes | no |
|
|
1038
|
+
|
|
1039
|
+
### Aggregate Boundaries
|
|
1040
|
+
- An aggregate is a **consistency boundary**, not a data grouping.
|
|
1041
|
+
- One aggregate modified per transaction; everything else via events.
|
|
1042
|
+
- Reference other aggregates **by identity**, never by object graph.
|
|
1043
|
+
- Design **small** aggregates; the root is the only entry point — behavior methods, no setters.
|
|
1044
|
+
|
|
1045
|
+
### Service Classifier
|
|
1046
|
+
| Service | Layer | Contains | Named by |
|
|
1047
|
+
|---------|-------|----------|----------|
|
|
1048
|
+
| Domain service | domain/ | business process spanning entities | ubiquitous language |
|
|
1049
|
+
| Application service | application/ | use-case orchestration (thin) | technical intent |
|
|
1050
|
+
| Infrastructure service | infrastructure/ | technical impl (persistence, http, events) | implementation |
|
|
1051
|
+
| Persistence port (interface) | domain/ | aggregate persistence contract | aggregate language |
|
|
1052
|
+
| Persistence adapter | infrastructure/ | framework impl (ORM/DB) | — |
|
|
1053
|
+
|
|
1054
|
+
### Event Triage (3 questions)
|
|
1055
|
+
Keep a candidate event only if ≥1 is true: (1) would a domain expert care?
|
|
1056
|
+
(2) does it cross an aggregate boundary? (3) do we need an audit trail?
|
|
1057
|
+
Otherwise it is an implementation detail. Publish from the aggregate;
|
|
1058
|
+
dispatch **after** save from the application service.
|
|
1059
|
+
|
|
1060
|
+
### Transaction & Persistence Placement
|
|
1061
|
+
| Concern | Location | Why |
|
|
1062
|
+
|---------|----------|-----|
|
|
1063
|
+
| Transaction handle scope | application service only | one aggregate per transaction |
|
|
1064
|
+
| Repository trait | domain/ (crate) | dependency inversion |
|
|
1065
|
+
| Repository impl (sqlx/diesel) | infrastructure/ | framework out of domain |
|
|
1066
|
+
| Value object | domain/ (struct/type, immutable) | replace, don't mutate |
|
|
1067
|
+
| HTTP (axum/actix) | interfaces/ | web out of domain |
|
|
1068
|
+
|
|
1069
|
+
*Distilled 2026-09-03 from professional OOP/DDD curriculum (Modules 0–6) — ADR-008/009.*
|
|
@@ -431,3 +431,49 @@ tsconfig.json
|
|
|
431
431
|
*Version: 1.0.0*
|
|
432
432
|
*Last updated: 2026-07-03*
|
|
433
433
|
*Source: Guardian DDD patterns + TypeScript best practices + context7 (/microsoft/typescript)*
|
|
434
|
+
|
|
435
|
+
## Judgment Tables (ADR-008)
|
|
436
|
+
|
|
437
|
+
Compact decision tables distilled from professional OOP/DDD practice (token-lean;
|
|
438
|
+
the full rationale lives in the curriculum, not here).
|
|
439
|
+
|
|
440
|
+
### Entity vs Value Object
|
|
441
|
+
| Question | Entity | Value Object |
|
|
442
|
+
|----------|--------|--------------|
|
|
443
|
+
| Identity persists across state changes? | yes | no |
|
|
444
|
+
| Change = mutate in place? | yes | replace entirely |
|
|
445
|
+
| Equality by identity or by attributes? | identity | all attributes |
|
|
446
|
+
| Immutable by nature? | no | yes |
|
|
447
|
+
| Track change history? | yes | no |
|
|
448
|
+
|
|
449
|
+
### Aggregate Boundaries
|
|
450
|
+
- An aggregate is a **consistency boundary**, not a data grouping.
|
|
451
|
+
- One aggregate modified per transaction; everything else via events.
|
|
452
|
+
- Reference other aggregates **by identity**, never by object graph.
|
|
453
|
+
- Design **small** aggregates; the root is the only entry point — behavior methods, no setters.
|
|
454
|
+
|
|
455
|
+
### Service Classifier
|
|
456
|
+
| Service | Layer | Contains | Named by |
|
|
457
|
+
|---------|-------|----------|----------|
|
|
458
|
+
| Domain service | domain/ | business process spanning entities | ubiquitous language |
|
|
459
|
+
| Application service | application/ | use-case orchestration (thin) | technical intent |
|
|
460
|
+
| Infrastructure service | infrastructure/ | technical impl (persistence, http, events) | implementation |
|
|
461
|
+
| Persistence port (interface) | domain/ | aggregate persistence contract | aggregate language |
|
|
462
|
+
| Persistence adapter | infrastructure/ | framework impl (ORM/DB) | — |
|
|
463
|
+
|
|
464
|
+
### Event Triage (3 questions)
|
|
465
|
+
Keep a candidate event only if ≥1 is true: (1) would a domain expert care?
|
|
466
|
+
(2) does it cross an aggregate boundary? (3) do we need an audit trail?
|
|
467
|
+
Otherwise it is an implementation detail. Publish from the aggregate;
|
|
468
|
+
dispatch **after** save from the application service.
|
|
469
|
+
|
|
470
|
+
### Transaction & Persistence Placement
|
|
471
|
+
| Concern | Location | Why |
|
|
472
|
+
|---------|----------|-----|
|
|
473
|
+
| Unit of Work / transaction scope | application service only | one aggregate per transaction |
|
|
474
|
+
| Repository interface | domain/ (interfaces/port) | dependency inversion |
|
|
475
|
+
| Repository impl (TypeORM/Prisma) | infrastructure/ | framework out of domain |
|
|
476
|
+
| Value object | domain/ (class/record, immutable) | replace, don't mutate |
|
|
477
|
+
| DI wiring | composition root (infrastructure) | explicit assembly |
|
|
478
|
+
|
|
479
|
+
*Distilled 2026-09-03 from professional OOP/DDD curriculum (Modules 0–6) — ADR-008/009.*
|