Skip to content

Project-Specific Prompt Library for GitLab Duo

Problem to solve

As a developer working on a GitLab project, I want GitLab Duo to have a project-specific prompt library that automatically loads when opening Duo Chat, so I can quickly get started with project-relevant context and expected outputs without manual input each time.

Proposal

Implement a project-specific prompt library feature for GitLab Duo:

  1. Create a .gitlab-duo-prompts.yml file in the project root to store prompts.
  2. Develop a mechanism for Duo to detect and load these prompts when initializing a chat session for the project.
  3. Provide an interface within Duo Chat to manage and update the prompt library.

Further details

  • Example implementation details:

    • Define a YAML structure for storing prompts (title, description, category).
    • Develop a parser for the .gitlab-duo-prompts.yml file.
    • Modify Duo's initialization process to check for and load project-specific prompts.
    • Create a UI component in Duo Chat for prompt selection.
  • Benefits:

    • Faster onboarding for new team members.
    • Consistency in Duo interactions across the team.
    • Improved efficiency by reducing repetitive context-setting.
    • Better knowledge sharing through centralized prompt management.