Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Jira User Stories & Test Cases Generator

This project is a lightweight AI-powered agent designed to streamline JIRA management by automatically generating user stories and test cases. It integrates a fine-tuned model with a simple backend–frontend setup for seamless interaction.

📂 Project Directory Structure

This project uses a seperated/microservices structure where layers are self-contained within their own folders, i.e. backend/ and frontend/.

jira-agent/
├───LoRA/                 # Contains files to fine tune model  
│         
├───backend/
│   ├───main.py
│   │
│   ├───api/
│   │   ├───routes.py     # Exposes API endpoints
│   │   │
│   │   ├───handlers/     # Contains handler functions for respective routes
│   │   └───models/       # Contains data schemas
│   │      
│   └───services/
│       └───pipeline.py   # Exposes model
│
└───frontend/             # Holds frontend files
    └───static/           # Holds CSS, JS, Images, Icons, ...

Note: The file structure above does not include all the files, i.e. .env, etc...

🔧 Fine Tuning the Model

All the resources needed to fine tune the model are found within LoRA/.

A .env is required with a HF_USERNAME key containing the username of your Huggingface account. This is used when uploading the fine tuned model to Huggingface!

  1. Fine tuning the Model

    python LoRA/lora_training.py --task story --maxlines 100
    python LoRA/lora_training.py --task test --maxlines 100
  2. Uploading the fine tuned Model to Huggingface Use command generated by Python script

    python LoRA/utils/push_tuned_to_hf.py
    

💻 Setup & Usage

Follow these steps to get your development environment set up and operational:

  1. Clone the Repository

    git clone https://github.com/dotping-me/jira-agent.git
    cd jira-agent
  2. Install Dependencies

    pip install -r requirements.txt
  3. Set up .env

    JIRA_KEY=your-jira-key-here
    JIRA_EMAIL=your-jira-account@email.com

    Note: This shouldn't normally be exposed in a README.md!

  4. Start Server (Backend + Frontend)

    • Using uvicorn CLI
      uvicorn backend.main:app --port 8000 --reload
    • Python Script directly
      python backend/main.py
  5. Test Routes

    • Use Postman
    • Use curl:
      • Testing AI/ML endpoint
        curl -X POST -H "Content-Type: application/json" -d "{\"prompt\": \"Login with third-party platforms\"}" "http://127.0.0.1:8000/api/prompt"
      • Testing JIRA endpoint
        curl -X POST -H "Content-Type: application/json" -d "{\"project_domain\": \"https://yout-domain.atlassian.net/\", \"project_or_epic_key\": \"SCRUM\", \"epic_prompt\": \"Login with third-party apps\", \"user_stories\": [\"As a user, I want to log in using third-party apps like Google and Facebook.\"], \"test_cases\": [\"Verify login using Google or Facebook works.\"]}" "127.0.0.1:8000/api/jira"

Note: The HF Transformer we are using is 3.3 GiBs in size. Thank you!

About

An AI-Powered/ML-Driven user stories/story points generator for the module DGT 2036Y - Principles of Software Development (Group F)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages