Skip to content

Proposal: Image Optimization & Recommendation Engine#282

Open
czifrushanna wants to merge 2 commits into
goharbor:mainfrom
czifrushanna:feature/recommendation-engine-proposal
Open

Proposal: Image Optimization & Recommendation Engine#282
czifrushanna wants to merge 2 commits into
goharbor:mainfrom
czifrushanna:feature/recommendation-engine-proposal

Conversation

@czifrushanna
Copy link
Copy Markdown

No description provided.

Signed-off-by: Hanna Czifrus <czifrus.hanna@gmail.com>
Copilot AI review requested due to automatic review settings May 4, 2026 14:57
@czifrushanna czifrushanna requested review from a team as code owners May 4, 2026 14:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new design proposal describing a pluggable “recommendation engine” for Harbor that turns scan results and image metadata into actionable remediation and image-optimization guidance, modeled after Harbor’s existing scanner integration approach.

Changes:

  • Introduces a proposal document outlining goals, non-goals, rationale, compatibility notes, and a high-level implementation plan.
  • Describes a provider-based workflow that can rank relevant optimizations and optionally generate improved build instructions (e.g., Dockerfile).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proposals/recommendation_engine.md
Comment on lines +19 to +28
The proposal is to add a recommendation workflow that analyzes an image and returns an optimized version together with a human-readable explanation of the changes.

At a high level, the workflow would be:

1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata.
2. Harbor sends those inputs to a recommendation provider through a stable API.
3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile.
4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes.
5. The user can review, edit, and choose the recommended result before generating the final image.

Comment on lines +24 to +33
2. Harbor sends those inputs to a recommendation provider through a stable API.
3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile.
4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes.
5. The user can review, edit, and choose the recommended result before generating the final image.

The recommendation provider would combine two steps internally:

1. A lightweight ranking model determines which optimization tasks are relevant for the image.
2. An LLM-based generation step, optionally augmented with retrieval, produces the recommended Dockerfile.

- General hardening and best-practice improvements

The engine should support future inputs such as runtime usage signals to make recommendations more precise over time.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proposals/recommendation_engine.md
Comment on lines +21 to +27
At a high level, the workflow would be:

1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata.
2. Harbor sends those inputs to a recommendation provider through a stable API.
3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile.
4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes.
5. The user can review, edit, and choose the recommended result before generating the final image.
Comment on lines +19 to +27
The proposal is to add a recommendation workflow that analyzes an image and returns an optimized version together with a human-readable explanation of the changes.

At a high level, the workflow would be:

1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata.
2. Harbor sends those inputs to a recommendation provider through a stable API.
3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile.
4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes.
5. The user can review, edit, and choose the recommended result before generating the final image.
Comment on lines +29 to +33
The recommendation provider would combine two steps internally:

1. A lightweight ranking model determines which optimization tasks are relevant for the image.
2. An LLM-based generation step, optionally augmented with retrieval, produces the recommended Dockerfile.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Hanna <73664424+czifrushanna@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants