How mehmetozkaya/adrwriteragent works
Purpose and entry points
ADR Writer Agent converts free-form technical meeting notes into standardized Markdown Architecture Decision Records using Azure OpenAI. The Aspire host is the intended startup boundary: src/ADRWriter.AppHost/AppHost.cs. It composes the Blazor frontend and ASP.NET Core API. Individual service entry points are src/ADRWriter.Web/Program.cs and src/ADRWriter.ApiService/Program.cs.
Aspire composition and service boundary
ADRWriter.AppHost is the deployment/dev orchestration layer, responsible for launching and wiring services through Aspire service discovery. Shared cross-cutting defaults—telemetry, HTTP resilience, health-related conventions—belong in src/ADRWriter.ServiceDefaults/Extensions.cs and are consumed by the API and web projects. Azure OpenAI endpoint and API key are externalized through configuration/user secrets rather than embedded in application code.
Paths:
• src/ADRWriter.AppHost/AppHost.cs
• src/ADRWriter.ServiceDefaults/Extensions.cs
• src/ADRWriter.AppHost/appsettings.json
Blazor user workflow
The Blazor Web application presents the ADR authoring experience. Its route/component structure establishes the UI shell, while the ADR page accepts raw notes, submits them, and displays the returned ADR for review. The UI should remain a client boundary: it delegates generation rather than directly accessing Azure OpenAI.
Paths:
• src/ADRWriter.Web/Components/Pages/AdrWriterPage.razor
• src/ADRWriter.Web/Components/App.razor
• src/ADRWriter.Web/Components/Routes.razor
Frontend-to-API integration
ADRWriterApiClient encapsulates calls from Blazor to the API, isolating endpoint addressing, request serialization, and response handling from Razor components. This is the principal browser/server application boundary and relies on Aspire-provided discovery/configuration rather than a hard-coded service topology.
Paths:
• src/ADRWriter.Web/ApiClients/ADRWriterApiClient.cs
• src/ADRWriter.Web/Program.cs
• src/ADRWriter.ApiService/Endpoints/ADRWriterEndpoints.cs
API request and agent orchestration
The ASP.NET Core API exposes the ADR-generation HTTP endpoint and routes each request into the domain service. ADRWriterEndpoints is the transport boundary; ADRWriterService owns the agent execution flow: turning supplied notes into a prompt, invoking the Microsoft Agent Framework/Azure OpenAI-backed agent, applying ADR templating behavior, and returning Markdown. This separation keeps HTTP concerns out of AI orchestration.
Paths:
• src/ADRWriter.ApiService/Program.cs
• src/ADRWriter.ApiService/Endpoints/ADRWriterEndpoints.cs
• src/ADRWriter.ApiService/Services/ADRWriterService.cs
External AI and output boundary
Azure OpenAI is the system’s reasoning provider, accessed from the API via Azure AI OpenAI and Microsoft Agent Framework integration. The primary output contract is generated Markdown, which flows API → API client → Blazor page. Markdig is the material rendering dependency for presenting Markdown safely/formatted in the UI. No persistence layer or message broker is represented in this repository.
Runtime and operational model
All projects target the .NET ecosystem (README specifies .NET 10). ASP.NET Core hosts the API; Blazor hosts the user-facing application; .NET Aspire coordinates local/service execution and exposes its dashboard. OpenTelemetry instrumentation and resilient HTTP behavior are centralized through ServiceDefaults, covering the important API-to-Azure-OpenAI dependency boundary.
Paths:
• src/ADRWriter.ApiService/ADRWriter.ApiService.csproj
• src/ADRWriter.Web/ADRWriter.Web.csproj
• src/ADRWriter.ServiceDefaults/ADRWriter.ServiceDefaults.csproj
Main entry points: AppHost.cs Aspire AppHost · AdrWriterPage.razor ADR writer page · ADRWriterApiClient.cs ADR Writer API client · Extensions.cs Service defaults
Components 15
Aspire orchestration
- Aspire AppHost · Composes and launches the web and API services.
src/ADRWriter.AppHost/AppHost.cs - AppHost configuration · Provides orchestration-time settings.
src/ADRWriter.AppHost/appsettings.json - Service defaults · Centralizes telemetry, resilience, and health conventions.
src/ADRWriter.ServiceDefaults/Extensions.cs - Aspire dashboard · Observes composed local services and telemetry.
Blazor web
- Blazor host
src/ADRWriter.Web/Program.cs - UI shell and routes
src/ADRWriter.Web/Components/App.razor - ADR writer page · Accepts meeting notes and presents the generated ADR.
src/ADRWriter.Web/Components/Pages/AdrWriterPage.razor - ADR Writer API client · Encapsulates API addressing, serialization, and response handling.
src/ADRWriter.Web/ApiClients/ADRWriterApiClient.cs - Markdig renderer · Formats generated Markdown for review in the UI.
API and agent
- API host
src/ADRWriter.ApiService/Program.cs - ADR generation endpoint · Receives generation requests and delegates to the domain service.
src/ADRWriter.ApiService/Endpoints/ADRWriterEndpoints.cs - ADR writer service · Builds prompts, executes the agent, and returns templated ADR Markdown.
src/ADRWriter.ApiService/Services/ADRWriterService.cs - Microsoft Agent Framework · Connects agent execution to the Azure OpenAI provider.
External services
- Azure OpenAI · External AI service used to generate ADR content.
- Endpoint and API key · Azure OpenAI credentials are supplied through configuration or user secrets.
Connections 19
- Aspire AppHost → Blazor host: launches
- Aspire AppHost → API host: launches
- AppHost configuration → Aspire AppHost: configures
- Aspire AppHost → Aspire dashboard: exposes
- Service defaults → Blazor host: applies defaults
- Service defaults → API host: applies defaults
- Blazor host → UI shell and routes: hosts
- UI shell and routes → ADR writer page: routes to
- ADR writer page → ADR Writer API client: submits notes
- ADR Writer API client → ADR generation endpoint: generation request · Uses Aspire service discovery.
- API host → ADR generation endpoint: maps
- ADR generation endpoint → ADR writer service: delegates
- ADR writer service → Microsoft Agent Framework: invokes
- Microsoft Agent Framework → Azure OpenAI: uses
- Endpoint and API key → Azure OpenAI: configures access
- Service defaults → Azure OpenAI: telemetry and resilient HTTP
- ADR writer service → ADR Writer API client: ADR Markdown response
- ADR Writer API client → ADR writer page: returns Markdown
- ADR writer page → Markdig renderer: renders