PRD - azure-functions-doctor
Defines a diagnostic CLI for Azure Functions Python v2 projects that checks configuration, dependencies, and environment before runtime.
What this file does
Defines a diagnostic CLI for Azure Functions Python v2 projects that checks configuration, dependencies, and environment before runtime.
When to use it
- You are building a CLI tool that validates project setup for a specific framework
- You want to include both healthy and broken example projects in your repo
- You need a PRD template for a developer tool with example-first design
- You are designing diagnostics that run in CI and produce machine-readable output
Assumes this stack
PRD - azure-functions-doctor
Overview
azure-functions-doctor is a diagnostic CLI for projects built on the Azure Functions Python v2
programming model.
It inspects a local project and reports common configuration, dependency, and environment issues before they surface during local runs or deployment.
Problem Statement
Azure Functions Python projects can fail for routine reasons that are easy to miss:
- missing
host.json - missing or incorrect
azure-functionsdependency - unsupported Python configuration
- incomplete local development setup
- inconsistent project layout
These failures are often discovered late, through confusing runtime errors or deployment issues.
Goals
- Provide fast, readable diagnostics for Azure Functions Python v2 projects.
- Surface required and optional checks with clear pass/fail output.
- Support both local CLI use and CI integration.
- Keep checks aligned with representative example projects.
Non-Goals
- Fixing project issues automatically
- Replacing Azure Functions Core Tools
- Managing deployment workflows
- Supporting the legacy
function.json-based Python v1 model
Primary Users
- Maintainers of Azure Functions Python repositories
- Developers setting up local Azure Functions projects
- Teams that want lightweight CI diagnostics for Functions projects
Core Use Cases
- Run diagnostics against the current project directory
- Run diagnostics against a specific example or target path
- Use a smaller profile for required-only checks
- Consume human-readable or machine-readable output in automation
Success Criteria
- Representative examples pass diagnostic smoke tests in CI
- Broken example copies fail in predictable ways
- CLI output remains stable enough for user troubleshooting and automation
Example-First Design
Philosophy
A diagnostic CLI earns trust by showing exactly what it does. azure-functions-doctor
ships runnable example projects — both healthy and intentionally broken — so developers
can see real pass/fail output before pointing the tool at their own code.
Quick Start (Hello World)
Run diagnostics against the representative example:
pip install azure-functions-doctor
azure-functions doctor --path examples/v2/http-trigger
Expected output shows a clean diagnostic pass:
Azure Functions Doctor
[PASS] HOST_JSON_EXISTS
[PASS] REQUIREMENTS_TXT_EXISTS
[PASS] AZURE_FUNCTIONS_DEPENDENCY
[PASS] V2_DECORATORS_USED
...
Result: All checks passed
Run against a broken example to see clear failure output:
azure-functions doctor --path examples/v2/broken-missing-host-json
Why Examples Matter
- Lower entry barrier. Developers can run the CLI against bundled examples before applying it to their own project. The pass/fail contrast builds confidence.
- AI agent discoverability. Tools like GitHub Copilot, Cursor, and Claude Code recommend
libraries based on README, PRD, and example content. CLI output samples in documentation
help AI agents understand what
azure-functions-doctordoes and when to suggest it. - Cookbook role. For niche ecosystems,
examples/anddocs/often serve as the primary learning material. Both healthy and broken examples teach diagnostic patterns. - Proven approach. FastAPI, LangChain, SQLAlchemy, and Pandas all achieved early adoption through extensive, copy-paste-friendly examples and clear output samples.
Examples Inventory
| Role | Path | Pattern |
|---|---|---|
| Representative | examples/v2/http-trigger | Minimal HTTP trigger (passes all checks) |
| Representative | examples/v2/timer-trigger | Timer trigger (passes all checks) |
| Complex | examples/v2/multi-trigger | Multiple triggers in one app |
| Complex | examples/v2/blueprint | Blueprint-based modular routing |
| Broken | examples/v2/broken-missing-host-json | Missing host.json |
| Broken | examples/v2/broken-missing-requirements | Missing requirements.txt |
| Broken | examples/v2/broken-missing-azure-functions | Missing azure-functions dep |
| Broken | examples/v2/broken-no-v2-decorators | No v2 decorators |
All examples are smoke-tested in CI. New diagnostic rules should ship with a corresponding broken example that demonstrates the failure.
What's inside
7 sections covering problem, goals, users, use cases, success criteria, example-first design, and an examples inventory table
Change this for your project
- Replace
azure-functions-doctorwith your own package name - Replace
examples/v2/paths with your own example directory structure - Replace
Azure Functions Python v2with your target framework and version
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Ship both healthy and broken example projects so users can see pass/fail output before running on their own code
- Include a table mapping example roles to paths and patterns for clarity
- State non-goals explicitly to avoid scope creep and set user expectations
Related Documents
Project Requirements Document: Long Video Generation Pipeline
Breaks long video prompts into segments, generates keyframes and clips via local or remote models, then stitches them into a final video.
AGENTS.md — ShakkaShell v2.0
Guides AI coding agents through building a CLI that translates natural language into offensive security commands, with a defined tech stack, structure, and implementation order.
SourceAtlas PRD v2.9.6
Defines the product requirements, architecture, and command interface for an AI-powered codebase understanding assistant integrated into Claude Code.
Fleet Management System - Product Requirements Document (PRD)
Defines functional, non-functional, and technical requirements for a fleet management system with compressed GPS tracking and predictive maintenance.