How paulomtts/xarch works
xarch is a profile-driven architecture checker and scaffolder. The principal workflow is to choose a profile, optionally create its project skeleton, then check application and test files against its layout, import rules, tiers, and guards; findings include fixes. where explains a path before it is written. Separate commands validate and explain profiles, while experimental review asks a decision model for advisory placement readings, with calibration and acceptance records. The graph emphasizes these product stages and the rule engine; many lower-level adapters and services are grouped by subsystem. Edges are limited to documented behavior or visible registration and calls; unsampled wiring is not inferred.
Main entry points: reviewing.py Review service · app.py Command app · controller.py Rules controller · check.py Check and where
Components 26
CLI entry
- Command app
xarch/cli/app.py - Runtime wiring
xarch/bootstrap/wiring.py - Check and where
xarch/cli/commands/check.py - Profile commands
xarch/cli/commands/profile.py - Scaffold commands
xarch/cli/commands/scaffold.py - Review commands
xarch/cli/commands/review.py
Architecture checks
- Rules controller
xarch/modules/rules/application/controller.py - Check services
xarch/modules/rules/application/services - Rule engine
xarch/modules/rules/application/logic/engine.py - Source model
xarch/kernel/source.py - Finding catalogue
xarch/kernel/violations.py
Profiles and scaffolding
- Profile controller
xarch/modules/spec/application/controller.py - Profile services
xarch/modules/spec/application/services - Profile vocabulary
xarch/profile_values/placement.py - Scaffold controller
xarch/modules/scaffold/application/controller.py - Scaffolding service
xarch/modules/scaffold/application/services/scaffolding.py
Advisory review
- Review controller
xarch/modules/review/application/controller.py - Review service
xarch/modules/review/application/services/reviewing.py - Review decisions
xarch/modules/review/application/logic - Answer handling
xarch/modules/review/application/logic/answers.py - Question building
xarch/modules/review/application/logic/questions.py - Model requests
xarch/modules/review/application/logic/sending.py - Decision model port
xarch/modules/review/application/ports/decision_model.py - Review results
xarch/modules/review/domain/values.py
Other components
- Engineer
- Decision model
Connections 25
- Engineer → Command app: runs commands
README.md - Runtime wiring → Command app: builds app
xarch/bootstrap/app.py - Command app → Check and where: registers
xarch/cli/app.py - Command app → Profile commands: registers
xarch/cli/app.py - Command app → Scaffold commands: registers
xarch/cli/app.py - Command app → Review commands: registers
xarch/cli/app.py - Check and where → Rules controller: invokes
xarch/cli/app.py - Profile commands → Profile controller: invokes
xarch/cli/app.py - Scaffold commands → Scaffold controller: invokes
xarch/cli/app.py - Review commands → Review controller: invokes
xarch/cli/app.py - Rules controller → Check services: delegates
xarch/modules/rules/application/controller.py - Rule engine → Finding catalogue: emits findings
xarch/modules/rules/application/logic/engine.py - Check services → Rule engine: evaluates rules
xarch/modules/rules/application/services/asking.py - Rules controller → Source model: uses source types
xarch/modules/rules/application/controller.py - Profile controller → Profile services: delegates
xarch/modules/spec/application/controller.py - Profile services → Profile vocabulary: uses vocabulary
- Scaffold controller → Scaffolding service: delegates
xarch/modules/scaffold/application/controller.py - Review controller → Review service: delegates
xarch/modules/review/application/controller.py - Review service → Review decisions: uses decisions
xarch/modules/review/application/services/reviewing.py - Review service → Answer handling: reads cached answers
xarch/modules/review/application/services/reviewing.py - Review service → Question building: builds questions
xarch/modules/review/application/services/reviewing.py - Review service → Model requests: prepares requests
xarch/modules/review/application/services/reviewing.py - Model requests → Decision model port: uses port
- Decision model port → Decision model: requests judgment
- Review service → Review results: returns readings
xarch/modules/review/application/services/reviewing.py