Repository X-Ray MVC
## Background
This epics covers work towards MVC of Repository X-Ray feature described in full at https://gitlab.com/groups/gitlab-org/-/epics/11733
## Goal
The goal of this epic is to define scope that have to be covered for MVC of Repository X-Ray project. This epic houses all issues related to the MVC to provide single place that reports overall progress
## MVC
In the parent epic https://gitlab.com/groups/gitlab-org/-/epics/11733 scope of MVC was agreed upon at https://gitlab.com/groups/gitlab-org/-/epics/11733#note_1651762606.
As a result MVC should:
1. Generate information about 3rd party libraries used by a repository
1. Include information about 3rd party libraries into Code Generation prompt to improve quality of resulting LLM generated source code
The high level overview of architecture of X-Ray MVC solution is shown on the next two diagrams
### Write path of MVC

Following elements are visible on above diagram
1. An X-Ray scanner job - a CI job that will process repositories and produce data for code generation enhancement.
1. An X-Ray scanner job template. Implementation should follow https://docs.gitlab.com/ee/development/cicd/templates.html#template-authoring-guidelines
1. An X-Ray scanner image similar to image produced by https://gitlab.com/gitlab-org/cloud-deploy. X-Ray scanner image should provide **Go** script that will prepare prompt and bundle it with packer file content, before sending it to AI for processing.
1. A new endpoint in the GitLab Rails application responsible for proxying requests from the scanner job into the AI Gateway
1. A new AI Gateway endpoint that would accept requests from the x-ray scanner and send them over to the Anthropic model
1. A new table in GitLab Rails database that will store X-Ray information about 3rd party libraries
1. A new background job that process X-Ray scanner artifact and uploads it into GitLab Rails database
### Read path of MVC

On the read path it is expected that GitLab Rails will be responsible for fetching information about 3rd party libraries from GitLab Rails database and including it into code generation prompt that will be sent to AI Gateway
epic