Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProductAgent - AI Agent for Azure DevOps Sprint Readiness

.NET C%23 Azure DevOps Azure OpenAI Status License

Evidence-based AI agent for Azure DevOps work item analysis, sprint readiness automation, RAG-based code understanding, and developer task planning.

ProductAgent is an AI agent for Azure DevOps that improves sprint readiness by analyzing work items, repository code, wiki pages, markdown files, and supporting documents. It uses local RAG-style retrieval and Azure OpenAI to generate evidence-based developer guidance, impact analysis, discussion notes, and child task proposals.

Instead of asking an AI model to guess from a work item alone, ProductAgent first builds a searchable knowledge base from your configured sources, retrieves the most relevant evidence, and then produces work item analysis grounded in repository code, project documentation, and business context.

ProductAgent architecture overview

Project knowledge + code + documents
  -> normalized knowledge base
  -> local evidence retrieval
  -> AI-assisted work item analysis
  -> preview-first discussion notes and child task proposals

Use Cases

ProductAgent is designed for teams that want to use AI responsibly inside software delivery workflows:

  • Azure DevOps work item analysis
  • Sprint readiness automation
  • AI-assisted backlog refinement
  • Developer task breakdown generation
  • Repository code impact analysis
  • RAG-based software delivery planning
  • AI-generated Azure DevOps discussion notes
  • Child task proposal generation
  • Product owner and architect review support
  • Developer productivity improvement

Who Is This For?

ProductAgent is useful for:

  • Product owners preparing sprint backlog items
  • Architects reviewing likely impact across code and documentation
  • Developers looking for implementation guidance before coding
  • Engineering leads improving consistency in sprint planning
  • Teams using Azure DevOps, Azure OpenAI, .NET, and C#

Why This Exists

Sprint planning and work item refinement often require engineers and architects to jump across repositories, wiki pages, documents, business rules, and old implementation patterns. ProductAgent explores how an AI agent can reduce that discovery effort and improve consistency by turning existing project knowledge into actionable delivery guidance.

The goal is not to replace developers, product owners, or architects. The goal is to give them a faster, evidence-backed starting point.

SEO Keywords

This project is relevant to these technical themes:

AI agent for Azure DevOps
sprint readiness AI
work item analysis AI
Azure OpenAI RAG agent
RAG-based code understanding
developer productivity AI
Azure DevOps work item automation
AI backlog refinement
developer task planning
clean architecture AI agent

What It Can Do

  • Read Azure DevOps repository code and documents.
  • Read Azure DevOps wiki pages.
  • Read Azure DevOps work items from current sprint or explicit IDs.
  • Read local markdown folders.
  • Extract text from supported Word, PowerPoint, PDF, image, markdown, and text-like files.
  • Build normalized knowledge items and searchable chunks.
  • Enrich code files with metadata such as language, layer, role, types, methods, routes, and dependencies.
  • Retrieve relevant evidence for each work item using local search.
  • Generate AI-assisted work item analysis using retrieved evidence.
  • Preview discussion notes and child task proposals before Azure DevOps write-back.
  • Optionally add discussion comments and child tasks to Azure DevOps when configured and approved.
  • Run from a CLI host or a timer-triggered Azure Functions host.

Example Scenario

Imagine a user story:

Add Excel export support for Employee Profile.

ProductAgent can retrieve evidence from code and documentation such as:

/EmployeeManagementSystem.Api/Controllers/EmployeeProfileController.cs
/EmployeeManagementSystem.AppManager/EmployeeProfileService.cs
/EmployeeManagementSystem.Repo/EmployeeProfileRepository.cs
/Client/src/features/employee-profile/EmployeeProfilePage.tsx
/wiki/Employee Management/Employee Profile Functional Overview

Then it can generate:

  • likely impacted files and areas
  • developer implementation approach
  • risks and open questions
  • Azure DevOps discussion note preview
  • child task proposals with evidence paths

Architecture At A Glance

ProductAgent follows a clean architecture / ports-and-adapters approach.

ProductAgent.Domain
  Pure models

ProductAgent.Application
  Workflows, use cases, configuration, ports

ProductAgent.Infrastructure.*
  Azure DevOps, document extraction, local retrieval, Azure OpenAI, files

ProductAgent.Composition
  Reusable dependency injection registration

Hosts
  ProductAgent.Cli
  ProductAgent.Functions

The host is intentionally thin. The core workflow lives in ProductAgent.Application, while integrations live behind interfaces in infrastructure projects.

flowchart LR
    Host["CLI / Timer Function / Future Host"]
    Composition["ProductAgent.Composition"]
    App["ProductAgent.Application"]
    Domain["ProductAgent.Domain"]
    Infra["ProductAgent.Infrastructure.*"]
    ADO["Azure DevOps"]
    AOAI["Azure OpenAI"]
    Output["Preview + Knowledge Outputs"]

    Host --> Composition
    Composition --> App
    App --> Domain
    Composition --> Infra
    Infra --> ADO
    Infra --> AOAI
    App --> Output
Loading

Solution Projects

Project Responsibility
ProductAgent.Domain Pure shared models such as source documents, knowledge items, and knowledge chunks
ProductAgent.Application Workflow orchestration, configuration, ports, chunking, retrieval coordination, and work item analysis contracts
ProductAgent.Infrastructure.AzureDevOps Azure DevOps REST client, repository/wiki/work item readers, and work item write-back
ProductAgent.Infrastructure.DocumentExtraction Text extraction from documents, PDFs, images, and Office files
ProductAgent.Infrastructure.Search.Local Local evidence retrieval over generated knowledge chunks
ProductAgent.Infrastructure.AI.AzureOpenAI Azure OpenAI prompts, response parsing, and work item analysis
ProductAgent.Infrastructure.Files Manifest, cache, markdown reader, knowledge writers, and preview writers
ProductAgent.Composition Reusable dependency injection setup through AddProductAgent(config)
ProductAgent.Cli Console host with progress output and interactive approval
ProductAgent.Functions Timer-triggered Azure Functions host

How Evidence-Based Analysis Works

ProductAgent uses a local RAG-style flow:

Work item
  -> build focused search queries
  -> retrieve top matching knowledge chunks
  -> send work item + retrieved evidence to Azure OpenAI
  -> generate grounded development guidance
  -> write previews
  -> optionally apply to Azure DevOps

The AI model does not receive the whole repository. It receives only the evidence selected by retrieval. This helps reduce cost, improve focus, and make outputs easier to review.

Knowledge Base Pipeline

ProductAgent creates its knowledge base during execution:

SourceDocument
  -> KnowledgeItem
  -> KnowledgeChunk
  -> local retrieval evidence

Outputs are written under the configured agent-output folder:

agent-output/
  manifest.json
  source-documents.json
  normalized-knowledge/
    knowledge-items.json
    knowledge-chunks.json
  work-item-context/
    work-item-{id}-context.md
  work-item-enrichment/
    work-item-{id}-analysis.md
    work-item-{id}-discussion-comment.md
    work-item-{id}-child-task.json
    work-item-{id}-child-tasks.json

Quick Start

Prerequisites

  • .NET SDK compatible with the target framework used by the projects.
  • Azure DevOps access token with read permissions for configured sources.
  • Azure OpenAI resource and chat deployment.
  • Optional: Azure Document Intelligence for PDF/image extraction.
  • Optional for local Function App testing: Azure Functions Core Tools and Azurite or a real Azure Storage account.

1. Clone and Build

git clone <your-repo-url>
cd ProductAgent
dotnet build ProductAgent.slnx

2. Configure Environment Variables

The sample YAML uses environment variable names instead of storing secrets.

$env:ADO_PAT = "<your-ado-pat>"
$env:AZURE_OPENAI_API_KEY = "<your-azure-openai-key>"
$env:AZURE_DOCUMENT_INTELLIGENCE_KEY = "<optional-document-intelligence-key>"

3. Update Configuration

Edit:

config/agent-config.yaml

Set your own:

  • Azure OpenAI endpoint and deployment name
  • Azure DevOps organization URL
  • Azure DevOps project
  • wiki identifiers and paths
  • repository IDs, branch, include paths, exclude paths, and file extensions
  • work item mode: current sprint or explicit IDs
  • output folder
  • retrieval aliases
  • write-back behavior

The committed config uses safe placeholder values such as:

organizationUrl: "https://dev.azure.com/your-organization/"
project: "Employee Management System"
patEnvironmentVariable: "ADO_PAT"

4. Run The CLI

dotnet run --project src/ProductAgent.Cli/ProductAgent.Cli.csproj -- config/agent-config.yaml

For a first run, keep this safe:

workItemEnrichment:
  previewOnly: true
  requireApprovalBeforeApply: true

That lets you inspect generated previews without changing Azure DevOps.

Running The Function Host Locally

The repository includes a timer-triggered Azure Functions host.

Create a real local settings file from the sample:

cd src/ProductAgent.Functions
copy local.settings.sample.json local.settings.json

Set your local secrets and schedule:

{
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "ProductAgentSchedule": "0 0 */6 * * *",
    "ProductAgent__ConfigPath": "config/agent-config.yaml",
    "AZURE_OPENAI_API_KEY": "<set locally or in Azure App Settings>",
    "AZURE_DOCUMENT_INTELLIGENCE_KEY": "<set locally or in Azure App Settings>",
    "ADO_PAT": "<set locally or in Azure App Settings>"
  }
}

Start Azurite or use a real Azure Storage connection string, then run:

func start

Timer-triggered Functions require storage for schedule coordination.

Configuration Highlights

Area Purpose
azureOpenAI Azure OpenAI endpoint, deployment, and API key environment variable
azureDevOps Default Azure DevOps organization/project connection
documentExtraction Azure Document Intelligence and supported file extraction settings
knowledgeSources.markdownFolders Local markdown source folders
knowledgeSources.adoWikis Azure DevOps wiki pages to read
knowledgeSources.adoRepositories Azure DevOps repository paths and extensions to read
knowledgeSources.adoWorkItems Current sprint or explicit work item ingestion
workItemEnrichment Preview, approval, AI analysis, discussion note, and child task behavior
retrieval.local Local search scoring, aliases, fuzzy matching, and boosts
codeAnalysis Code metadata extraction rules
chunking Knowledge chunk size and overlap
output Output folder and preview file naming

Documentation Map

Start here if you want to understand or extend the solution:

Project-specific guides:

Current Status

This is a POC implementation designed to validate the approach and architecture. It is useful for experimentation, demos, and architecture review. Before using it in production, consider adding:

  • automated tests
  • richer telemetry and run history
  • stronger approval workflow integration
  • required-field discovery for Azure DevOps child tasks
  • enterprise storage for generated previews
  • semantic or hybrid retrieval if local lexical retrieval is not enough
  • security review for source access, output storage, and AI usage

Roadmap Ideas

  • HTTP-triggered Function App for Azure DevOps pipeline or button-style invocation.
  • Runtime work item ID override instead of YAML-only IDs.
  • Azure DevOps custom extension for manual work item enrichment.
  • Teams or ServiceNow approval workflow.
  • Hybrid retrieval using lexical scoring plus embeddings.
  • Blob-backed output writers.
  • Deeper code understanding using Roslyn and TypeScript compiler APIs.
  • MCP server host for assistant/tool integration.

License

Licensed under the MIT License

Releases

Packages

Contributors

Languages