Audit architecture

This workflow compares the actual codebase state (dependencies, modules, versions) against the modular_architecture_blueprint.md.

  1. Read the Blueprint:
  2. Read knowledge/sd_platform_architecture_governance/artifacts/blueprint/modular_architecture_blueprint.md.

  3. Scan Critical Configurations:

  4. Read package.json (Root) to check workspace definitions.
  5. Read apps/platform/package.json to check Next.js version and key dependencies.
  6. Read tsconfig.json to check compiler options (target, module resolution).
  7. Read packages/foundation/firebase-admin/package.json (or similar) to check for build quirks (e.g. exports, types).

  8. Inventory Modules:

  9. List directories in packages/modules (Layer 1).
  10. List directories in packages/modules/unified (Layer 2).
  11. List directories in packages/foundation (Layer 3).

  12. Compare & Report:

  13. Compare the "As-Built" inventory with the "Blueprint" inventory.
  14. Check if critical versions (Next.js, Node) match.
  15. Action: If strictly version bumps or new modules found, UPDATE the blueprint. If structural violations found (e.g. circular deps), REPORT discrepancies to user.