Split foundational flows definitions into per-flow modules
What does this MR do and why?
Ai::Catalog::FoundationalFlow::Items#fixed_items had grown into a single
~300-line array literal covering all foundational flows (code review, fix
pipeline, security review, etc.), making it hard to scan, diff, or add a new
flow to without touching a huge unrelated block of code.
Each flow now lives in its own file under foundational_flow/definitions/,
exposing a configuration method that returns the same hash that used to be
embedded inline. fixed_items itself is now a short manifest that maps over
these per-flow definitions. This mirrors the pattern already documented in
doc/development/fixed_items_model.md ("Define a model with .fixed_items")
and used by WorkItems::TypesFramework::SystemDefined::Type.
No behavioral change: fixed_items still returns the same Array<Hash>
shape, so every consumer of FoundationalFlow's
ActiveRecord::FixedItemsModel::Model niceties (.all, .find_by,
.find_each, etc.) is unaffected.
References
Screenshots or screen recordings
Not applicable - no UI changes.
How to set up and validate locally
bundle exec rspec ee/spec/models/ai/catalog/foundational_flow_spec.rbbundle exec rspec ee/spec/services/ai/catalog/flows/seed_foundational_flows_service_spec.rb- In a Rails console, confirm all flows still resolve:
Ai::Catalog::FoundationalFlow.all.map(&:foundational_flow_reference)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.