Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Feature Request: AI-Assisted Coder for Automated Issue-to-PR Workflow #3312

Open
DonnieBLT opened this issue Feb 1, 2025 · 4 comments
Assignees

Comments

@DonnieBLT
Copy link
Collaborator

We propose an enhancement to our development workflow by integrating an AI-assisted coder. This system will automatically:
1. Accept an issue link that describes the required changes.
2. Pull the repository into a working environment (using CodeSpaces, Copilot Workspace, Cursor AI, or its own local workspace).
3. Set up the project, install dependencies, and run the existing tests.
4. Generate all required file changes (including new files, modifications, tests, and documentation updates) to implement the issue.
5. Run and verify that all tests pass.
6. Submit a fully functional pull request (PR) with all changes committed, ensuring that the branch follows our contribution guidelines.

The AI-assisted coder will leverage the latest o3-mini-high model to generate code and documentation, ensuring the output is of high quality and meets our coding standards.

Feature Details:
• Triggering the Process:
• The process is initiated by providing the AI-assisted coder with an issue link (e.g., the URL of this issue).
• The AI agent will fetch the full issue description and any referenced details.
• Repository Setup:
• The agent will clone the repository into an isolated workspace.
• It will configure the environment (install dependencies, set environment variables, etc.) and run the test suite to ensure the baseline is correct.
• Implementation:
• The AI agent uses the o3-mini-high model to interpret the issue, generate all necessary code changes, and create or update files as required.
• The implementation must include:
• Modifications to existing files.
• New files if necessary (e.g., tests, configuration updates, documentation).
• Inline comments and documentation to explain the changes.
• The AI must ensure that all code adheres to our project’s coding guidelines and is thoroughly tested.
• Testing & Validation:
• After applying the changes, the AI agent runs the full test suite.
• If tests fail, the agent is expected to iterate on the changes until a green build is achieved.
• Pull Request Submission:
• Once the changes are verified, the AI agent automatically creates a new branch, commits the changes with clear commit messages, and submits a pull request.
• The PR should reference the original issue and include a summary of changes and instructions for manual testing (if needed).

AI Agent Coding Instructions:

You are an AI-assisted coder responsible for automating the workflow from issue to pull request. Your tasks are:

  1. Initialization:

    • Receive an issue URL (passed as a parameter) which contains all details of the required changes.
    • Clone the repository into a secure working environment (e.g., CodeSpaces, Copilot Workspace, Cursor AI, or a local workspace).
  2. Setup:

    • Set up the project environment by installing dependencies and configuring environment variables as per the project documentation.
    • Run the current test suite to verify the baseline environment is correct.
  3. Implementation:

    • Parse the issue details and generate all required file changes using the latest o3-mini-high model.
    • Ensure that code modifications, new tests, and documentation updates follow the project's coding standards.
    • The changes must fully address the issue requirements and include:
      • A detailed code implementation.
      • Inline comments and documentation.
      • Necessary configuration and environment changes.
  4. Validation:

    • Run the full test suite after implementing the changes.
    • If any tests fail, debug and adjust the code until all tests pass.
  5. Submission:

    • Create a new branch named according to the issue (e.g., ai/issue-<id>-feature-name).
    • Commit all changes with descriptive commit messages.
    • Automatically create a pull request referencing the original issue URL.
    • The pull request should include:
      • A summary of changes.
      • AI agent instructions used.
      • Any additional notes or instructions for reviewers.
  6. Error Handling:

    • Ensure that any errors during cloning, environment setup, or testing are logged and reported.
    • The process should abort gracefully if a critical error occurs.

Make sure that the final pull request is clean, all tests pass, and the code is production-ready.

Acceptance Criteria:
1. Automation:
• Given an issue URL, the AI-assisted coder clones the repo, sets up the environment, and runs tests without manual intervention.
• The AI agent generates all necessary file changes that fully implement the issue.
2. Testing:
• All tests pass after the modifications are applied.
• The AI agent handles any errors gracefully and iterates until a successful build is achieved.
3. Pull Request:
• A new branch is created, and a pull request is submitted automatically.
• The PR contains a detailed summary, references the original issue, and includes all required file changes.
4. Quality:
• The generated code adheres to the project’s coding standards, includes proper inline documentation, and is maintainable.
• The solution is verified by a green test suite and meets all acceptance criteria outlined in the issue.

@tsu-ki
Copy link
Contributor

tsu-ki commented Feb 1, 2025

/assign

Copy link
Contributor

github-actions bot commented Feb 1, 2025

You cannot be assigned to this issue because you are already assigned to the following issues without an open pull request: #1874. Please submit a pull request for these issues before getting assigned to a new one.

@tsu-ki
Copy link
Contributor

tsu-ki commented Feb 1, 2025

/assign

Copy link
Contributor

github-actions bot commented Feb 1, 2025

Hello @tsu-ki! You've been assigned to OWASP-BLT/BLT issue #3312. You have 24 hours to complete a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants