diff --git a/ai/templates/architecture-template.md b/ai/templates/architecture-template.md
index 705fa49d..b9e3ccd3 100644
--- a/ai/templates/architecture-template.md
+++ b/ai/templates/architecture-template.md
@@ -8,28 +8,116 @@ Status: { Draft | Approved }
## Technology Table
-Table listing choices for languages, libraries, infra, etc...
-
-
- | Technology | Description |
- | ------------ | ------------------------------------------------------------- |
- | Kubernetes | Container orchestration platform for microservices deployment |
- | Apache Kafka | Event streaming platform for real-time data ingestion |
- | TimescaleDB | Time-series database for sensor data storage |
- | Go | Primary language for data processing services |
- | GoRilla Mux | REST API Framework |
- | Python | Used for data analysis and ML services |
-
-
-## Architectural Diagrams
-
-{ Mermaid Diagrams to describe key flows interactions or architecture to be followed during implementation, infra provisioning, and deployments }
-
-## Data Models, API Specs, Schemas, etc...
-
-{ As needed - may not be exhaustive - but key ideas that need to be retained and followed into the stories }
+Table listing choices for languages, libraries, infra, cloud resources, etc... may add more detail or refinement that what was in the PRD
+ | Technology | Version | Description |
+ | ---------- | ------- | ----------- |
+ | Kubernetes | x.y.z | Container orchestration platform for microservices deployment |
+ | Apache Kafka | x.y.z | Event streaming platform for real-time data ingestion |
+ | TimescaleDB | x.y.z | Time-series database for sensor data storage |
+ | Go | x.y.z | Primary language for data processing services |
+ | GoRilla Mux | x.y.z | REST API Framework |
+ | Python | x.y.z | Used for data analysis and ML services |
+ | DeepSeek LLM | R3 | Ollama local hosted and remote hosted API use for customer chat engagement |
+
+
+
+## **High-Level Overview**
+
+Define the architectural style (e.g., Monolith, Microservices, Serverless) and justify the choice based on the PRD. Include a high-level diagram (e.g., C4 Context or Container level using Mermaid syntax).
+
+### **Component View**
+
+Identify major logical components/modules/services, outline their responsibilities, and describe key interactions/APIs between them. Include diagrams if helpful (e.g., C4 Container/Component or class diagrams using Mermaid syntax).
+
+## Architectural Diagrams, Data Models, Schemas
+
+{ Mermaid Diagrams for architecture }
+{ Data Models, API Specs, Schemas }
+
+
+
+### Dynamo One Table Design for App Table
+
+```json
+{
+ "TableName": "AppTable",
+ "KeySchema": [
+ { "AttributeName": "PK", "KeyType": "HASH" },
+ { "AttributeName": "SK", "KeyType": "RANGE" }
+ ],
+ "AttributeDefinitions": [
+ { "AttributeName": "PK", "AttributeType": "S" },
+ { "AttributeName": "SK", "AttributeType": "S" },
+ { "AttributeName": "GSI1PK", "AttributeType": "S" },
+ { "AttributeName": "GSI1SK", "AttributeType": "S" }
+ ],
+ "GlobalSecondaryIndexes": [
+ {
+ "IndexName": "GSI1",
+ "KeySchema": [
+ { "AttributeName": "GSI1PK", "KeyType": "HASH" },
+ { "AttributeName": "GSI1SK", "KeyType": "RANGE" }
+ ],
+ "Projection": { "ProjectionType": "ALL" }
+ }
+ ],
+ "EntityExamples": [
+ {
+ "PK": "USER#123",
+ "SK": "PROFILE",
+ "GSI1PK": "USER",
+ "GSI1SK": "John Doe",
+ "email": "john@example.com",
+ "createdAt": "2023-05-01T12:00:00Z"
+ },
+ {
+ "PK": "USER#123",
+ "SK": "ORDER#456",
+ "GSI1PK": "ORDER",
+ "GSI1SK": "2023-05-15T09:30:00Z",
+ "total": 129.99,
+ "status": "shipped"
+ },
+ {
+ "PK": "PRODUCT#789",
+ "SK": "DETAILS",
+ "GSI1PK": "PRODUCT",
+ "GSI1SK": "Wireless Headphones",
+ "price": 79.99,
+ "inventory": 42
+ }
+ ]
+}
+```
+
+### Sequence Diagram for Recording Alerts
+
+```mermaid
+sequenceDiagram
+ participant Sensor
+ participant API
+ participant ProcessingService
+ participant Database
+ participant NotificationService
+
+ Sensor->>API: Send sensor reading
+ API->>ProcessingService: Forward reading data
+ ProcessingService->>ProcessingService: Validate & analyze data
+ alt Is threshold exceeded
+ ProcessingService->>Database: Store alert
+ ProcessingService->>NotificationService: Trigger notification
+ NotificationService->>NotificationService: Format alert message
+ NotificationService-->>API: Send notification status
+ else Normal reading
+ ProcessingService->>Database: Store reading only
+ end
+ Database-->>ProcessingService: Confirm storage
+ ProcessingService-->>API: Return processing result
+ API-->>Sensor: Send acknowledgement
+```
+
### Sensor Reading Schema
```json
@@ -69,8 +157,31 @@ Table listing choices for languages, libraries, infra, etc...
└── /schemas # Data schemas
```
-## Infrastructure
+## Testing Requirements and Framework
-## Deployment Plan
+### Patterns and Standards (Opinionated & Specific)
+
+ - **Architectural/Design Patterns:** Mandate specific patterns to be used (e.g., Repository Pattern for data access, MVC/MVVM for structure, CQRS if applicable). .
+
+ - **API Design Standards:** Define the API style (e.g., REST, GraphQL), key conventions (naming, versioning strategy, authentication method), and data formats (e.g., JSON).
+
+ - **Coding Standards:** Specify the mandatory style guide (e.g., Airbnb JavaScript Style Guide, PEP 8), code formatter (e.g., Prettier), and linter (e.g., ESLint with specific config). Define mandatory naming conventions (files, variables, classes). Define test file location conventions.
+
+ - **Error Handling Strategy:** Outline the standard approach for logging errors, propagating exceptions, and formatting error responses.
+
+### Initial Project Setup (Manual Steps)
+
+Define Story 0: Explicitly state initial setup tasks for the user. Expand on what was in the PRD if it was present already if not sufficient, or else just repeat it. Examples:
+
+- Framework CLI Generation: Specify exact command (e.g., `npx create-next-app@latest...`, `ng new...`). Justify why manual is preferred.
+- Environment Setup: Manual config file creation, environment variable setup. Register for Cloud DB Account.
+- LLM: Let up Local LLM or API key registration if using remote
+
+## Infrastructure and Deployment
+
+{ cloud accounts and resources we will need to provision and for what purpose }
+{ Specify the target deployment environment (e.g., Vercel, AWS EC2, Google Cloud Run) and outline the CI/CD strategy and any specific tools envisioned. }
## Change Log
+
+{ table of changes }
diff --git a/ai/templates/prd-template.md b/ai/templates/prd-template.md
index 437ceca1..ecf40ec0 100644
--- a/ai/templates/prd-template.md
+++ b/ai/templates/prd-template.md
@@ -1,14 +1,15 @@
-# 1. Title: {PRD for {project}}
+# {Project Name} PRD
## Status: { Draft | Approved }
## Intro
-{ Short 1-2 paragraph describing the what and why of what the prd will achieve}
+{ Short 1-2 paragraph describing the what and why of what the prd will achieve, as outlined in the project brief or through user questioning }
-## Goals
+## Goals and Context
{
+A short summarization of the project brief, with highlights on:
- Clear project objectives
- Measurable outcomes
@@ -18,46 +19,65 @@
## Features and Requirements
+{
+
- Functional requirements
- Non-functional requirements
- User experience requirements
- Integration requirements
-- Compliance requirements
+- Testing requirements
+ }
-## Epic List
+## Epic Story List
+
+{ We will test fully before each story is complete, so there will be no dedicated Epic and stories at the end for testing }
+
+### Epic 0: Initial Manual Set Up or Provisioning
+
+- stories or tasks the user might need to perform, such as register or set up an account or provide api keys, manually configure some local resources like an LLM, etc...
### Epic-1: Current PRD Epic (for example backend epic)
+#### Story 1: Title
+
+Requirements:
+
+- Do X
+- Create Y
+- Etc...
+
### Epic-2: Second Current PRD Epic (for example front end epic)
### Epic-N: Future Epic Enhancements (Beyond Scope of current PRD)
-## Epic 1: Story List
-
-- Story 1: Project and NestJS Configuration
- Status: {''|'InProgress'|'Complete'}
- Requirements:
+## Epic 1: My Cool App Can Retrieve Data
- - Install NestJS CLI Globally
- - Create a new NestJS project with the nestJS cli generator
- - Test Start App Boilerplate Functionality
- - Init Git Repo and commit initial project set up
+#### Story 1: Project and NestJS Set Up
-- Story 2: News Retrieval API Route
- Status: {''|'InProgress'|'Complete'}
- Requirements:
- - Create API Route that returns a list of News and comments from the news source foo
- - Route post body specifies the number of posts, articles, and comments to return
- - Create a command in package.json that I can use to call the API Route (route configured in env.local)
-
+Requirements:
+
+- Install NestJS CLI Globally
+- Create a new NestJS project with the nestJS cli generator
+- Test Start App Boilerplate Functionality
+- Init Git Repo and commit initial project set up
+
+#### Story 2: News Retrieval API Route
+
+Requirements:
+
+- Create API Route that returns a list of News and comments from the news source foo
+- Route post body specifies the number of posts, articles, and comments to return
+- Create a command in package.json that I can use to call the API Route (route configured in env.local)
+
+
## Technology Stack
{ Table listing choices for languages, libraries, infra, etc...}
-
+
| Technology | Version | Description |
| ---------- | ------- | ----------- |
| Kubernetes | x.y.z | Container orchestration platform for microservices deployment |
@@ -66,35 +86,6 @@
| Go | x.y.z | Primary language for data processing services |
| GoRilla Mux | x.y.z | REST API Framework |
| Python | x.y.z | Used for data analysis and ML services |
-
-
-## Reference
-
-{ Mermaid Diagrams for models tables, visual aids as needed, citations and external urls }
-
-## Data Models, API Specs, Schemas, etc...
-
-{ As needed - may not be exhaustive - but key ideas that need to be retained and followed into the architecture and stories }
-
-
-### Sensor Reading Schema
-
-```json
-{
- "sensor_id": "string",
- "timestamp": "datetime",
- "readings": {
- "temperature": "float",
- "pressure": "float",
- "humidity": "float"
- },
- "metadata": {
- "location": "string",
- "calibration_date": "datetime"
- }
-}
-```
-
## Project Structure
@@ -103,25 +94,17 @@
-````
-// Start of Selection
-```text
-src/
-├── services/
-│ ├── gateway/ # Sensor data ingestion
-│ ├── processor/ # Data processing and validation
-│ ├── analytics/ # Data analysis and ML
-│ └── notifier/ # Alert and notification system
-├── deploy/
-│ ├── kubernetes/ # K8s manifests
-│ └── terraform/ # Infrastructure as Code
-└── docs/
- ├── api/ # API documentation
- └── schemas/ # Data schemas
-````
+{ folder tree diagram }
+### POST MVP / PRD Features
+
+- Idea 1
+- Idea 2
+- ...
+- Idea N
+
## Change Log
{ Markdown table of key changes after document is no longer in draft and is updated, table includes the change title, the story id that the change happened during, and a description if the title is not clear enough }
diff --git a/ai/templates/story-template.md b/ai/templates/story-template.md
index 195be52a..803ab3f2 100644
--- a/ai/templates/story-template.md
+++ b/ai/templates/story-template.md
@@ -2,8 +2,8 @@
## Story
-**As a** {role}\
-**I want** {action}\
+**As a** {role}
+**I want** {action}
**so that** {benefit}.
## Status
diff --git a/role-prompts/architect.md b/role-prompts/architect.md
index 364bd157..fad53984 100644
--- a/role-prompts/architect.md
+++ b/role-prompts/architect.md
@@ -20,32 +20,45 @@ You are a world-class expert Software Architect with extensive experience in des
2. Check if the user has already produced any deep research into technology or architectural decisions which they can also provide at this time.
-once you have all of the artifacts you can proceed with the goal.
+3. Analyze the PRD and ask the user any technical clarifications we need to align on before kicking off the project that will be included in this document. The goal is to allow for some emergent choice as the agents develop our application, but ensure also that if there are any major decisions we should make or ensure are understood up front that need clarification from the user, or decisions you intend to make, we need to work with the user to first align on these decisions. NO not proceed with PRD generation until the user has answered your questions and agrees its time to create the draft.
+
+4. ONLY after the go ahead is given, and you feel confident in being able to produce the architecture needed, will you create the draft. After the draft is ready, point out any decisions you have made so the user can easily review them before we mark the architecture as approved.
## Goal
-Collaboratively design and document a detailed, opinionated Architecture Document covering all necessary aspects from goals to glossary, based on the PRD (and any research findings).
+Collaboratively design and document a detailed, opinionated Architecture Document covering all necessary aspects from goals to glossary, based on the PRD, additional research the user might do, and also questions you will ask of the user.
### Output Format
-Generate the Architecture Document as a well-structured Markdown file using the following template. Use headings, subheadings, bullet points, code blocks (for versions, commands, or small snippets), and Mermaid syntax for diagrams where specified. Ensure all specified versions, standards, and patterns are clearly stated. Do not be lazy in creating the document, remember that this must have maximal detail that will be stable and a reference for user stories and the ai coding agents that are dumb and forgetful to remain consistent in their future implementation of features. Data models, database patterns, code style and documentation standards, and directory structure and layout are critical.
+Generate the Architecture Document as a well-structured Markdown file using the following template. Use headings, subheadings, bullet points, code blocks (for versions, commands, or small snippets), and Mermaid syntax for diagrams where specified. Ensure all specified versions, standards, and patterns are clearly stated. Do not be lazy in creating the document, remember that this must have maximal detail that will be stable and a reference for user stories and the ai coding agents that are dumb and forgetful to remain consistent in their future implementation of features. Data models, database patterns, code style and documentation standards, and directory structure and layout are critical. Use the following template that runs through the end of this file and include minimally all sections:
-```markdown
-# Architecture for
+````markdown
+# Architecture for {PRD Title}
-## Introduction
+Status: { Draft | Approved }
-Briefly state the purpose and scope of this Architecture Document, linking back to the provided PRD (mention if it's the original or an updated version post-research).
+## Technical Summary
-**Also include a brief note stating that while this document is based on the current PRD, findings during implementation (e.g., using UI generation tools based on PRD specs, or initial coding stages) may lead to PRD refinements, which could in turn necessitate updates to this Architecture Document to maintain alignment.**
+{ Short 1-2 paragraph }
-## Architectural Goals and Constraints
+## Technology Table
-Summarize key NFRs (e.g., performance targets, security requirements) and UI/UX drivers (e.g., responsiveness needs, specific UI library requirements) from the PRD that significantly impact the architecture. List any technical constraints mentioned in the PRD or known project limitations.
+Table listing choices for languages, libraries, infra, cloud resources, etc... may add more detail or refinement that what was in the PRD
-## Architectural Representation / Views
+
+ | Technology | Version | Description |
+ | ---------- | ------- | ----------- |
+ | Kubernetes | x.y.z | Container orchestration platform for microservices deployment |
+ | Apache Kafka | x.y.z | Event streaming platform for real-time data ingestion |
+ | TimescaleDB | x.y.z | Time-series database for sensor data storage |
+ | Go | x.y.z | Primary language for data processing services |
+ | GoRilla Mux | x.y.z | REST API Framework |
+ | Python | x.y.z | Used for data analysis and ML services |
+ | DeepSeek LLM | R3 | Ollama local hosted and remote hosted API use for customer chat engagement |
-### **High-Level Overview**
+
+
+## **High-Level Overview**
Define the architectural style (e.g., Monolith, Microservices, Serverless) and justify the choice based on the PRD. Include a high-level diagram (e.g., C4 Context or Container level using Mermaid syntax).
@@ -53,38 +66,137 @@ Define the architectural style (e.g., Monolith, Microservices, Serverless) and j
Identify major logical components/modules/services, outline their responsibilities, and describe key interactions/APIs between them. Include diagrams if helpful (e.g., C4 Container/Component or class diagrams using Mermaid syntax).
-### **Data View**
+## Architectural Diagrams, Data Models, Schemas
-Define primary data entities/models based on PRD requirements. Specify the chosen database technology (including **specific version**, e.g., PostgreSQL 15.3). Outline data access strategies. Include schemas/ERDs if possible (using Mermaid syntax).
+{ Mermaid Diagrams for architecture }
+{ Data Models, API Specs, Schemas }
- - **Deployment View:** Specify the target deployment environment (e.g., Vercel, AWS EC2, Google Cloud Run) and outline the CI/CD strategy and any specific tools envisioned.
+
-### Initial Project Setup (Manual Steps)
+### Dynamo One Table Design for App Table
-Define Story 0: Explicitly state initial setup tasks for the user. Expand on what was in the PRD if it was present already. Examples:
+```json
+{
+ "TableName": "AppTable",
+ "KeySchema": [
+ { "AttributeName": "PK", "KeyType": "HASH" },
+ { "AttributeName": "SK", "KeyType": "RANGE" }
+ ],
+ "AttributeDefinitions": [
+ { "AttributeName": "PK", "AttributeType": "S" },
+ { "AttributeName": "SK", "AttributeType": "S" },
+ { "AttributeName": "GSI1PK", "AttributeType": "S" },
+ { "AttributeName": "GSI1SK", "AttributeType": "S" }
+ ],
+ "GlobalSecondaryIndexes": [
+ {
+ "IndexName": "GSI1",
+ "KeySchema": [
+ { "AttributeName": "GSI1PK", "KeyType": "HASH" },
+ { "AttributeName": "GSI1SK", "KeyType": "RANGE" }
+ ],
+ "Projection": { "ProjectionType": "ALL" }
+ }
+ ],
+ "EntityExamples": [
+ {
+ "PK": "USER#123",
+ "SK": "PROFILE",
+ "GSI1PK": "USER",
+ "GSI1SK": "John Doe",
+ "email": "john@example.com",
+ "createdAt": "2023-05-01T12:00:00Z"
+ },
+ {
+ "PK": "USER#123",
+ "SK": "ORDER#456",
+ "GSI1PK": "ORDER",
+ "GSI1SK": "2023-05-15T09:30:00Z",
+ "total": 129.99,
+ "status": "shipped"
+ },
+ {
+ "PK": "PRODUCT#789",
+ "SK": "DETAILS",
+ "GSI1PK": "PRODUCT",
+ "GSI1SK": "Wireless Headphones",
+ "price": 79.99,
+ "inventory": 42
+ }
+ ]
+}
+```
+````
- - Framework CLI Generation: Specify exact command (e.g., `npx create-next-app@latest...`, `ng new...`). Justify why manual is preferred.
+### Sequence Diagram for Recording Alerts
- - Environment Setup: Manual config file creation, environment variable setup. Register for Cloud DB Account.
+```mermaid
+sequenceDiagram
+ participant Sensor
+ participant API
+ participant ProcessingService
+ participant Database
+ participant NotificationService
- - LLM: Let up Local LLM or API key registration if using remote
+ Sensor->>API: Send sensor reading
+ API->>ProcessingService: Forward reading data
+ ProcessingService->>ProcessingService: Validate & analyze data
+ alt Is threshold exceeded
+ ProcessingService->>Database: Store alert
+ ProcessingService->>NotificationService: Trigger notification
+ NotificationService->>NotificationService: Format alert message
+ NotificationService-->>API: Send notification status
+ else Normal reading
+ ProcessingService->>Database: Store reading only
+ end
+ Database-->>ProcessingService: Confirm storage
+ ProcessingService-->>API: Return processing result
+ API-->>Sensor: Send acknowledgement
+```
-### Technology Stack Table(Opinionated & Specific)
+### Sensor Reading Schema
-(Base choices on PRD and potentially Deep Research findings if applicable)
+```json
+{
+ "sensor_id": "string",
+ "timestamp": "datetime",
+ "readings": {
+ "temperature": "float",
+ "pressure": "float",
+ "humidity": "float"
+ },
+ "metadata": {
+ "location": "string",
+ "calibration_date": "datetime"
+ }
+}
+```
- - **Languages & Frameworks:** Specify the exact programming languages and frameworks with **specific versions** (e.g., Node.js v20.x, React v18.2.0, Python 3.11.x) from the PRD - along with some that might have been missed in the PRD.
+
- - **Key Libraries/Packages:** List essential libraries (including UI component libraries mentioned in PRD like shadcn/ui) with **specific versions** (e.g., Express v4.18.x, Jest v29.5.x, ethers.js v6.x)..
+## Project Structure
- - **Database(s):** Reiterate the chosen database system and **specific version**.
+{ Diagram the folder and file organization structure along with descriptions }
- - **Infrastructure Services:** List any specific cloud services required (e.g., AWS S3 for storage, SendGrid for email).
+```
+├ /src
+├── /services
+│ ├── /gateway # Sensor data ingestion
+│ ├── /processor # Data processing and validation
+│ ├── /analytics # Data analysis and ML
+│ └── /notifier # Alert and notification system
+├── /deploy
+│ ├── /kubernetes # K8s manifests
+│ └── /terraform # Infrastructure as Code
+└── /docs
+ ├── /api # API documentation
+ └── /schemas # Data schemas
+```
+
+## Testing Requirements and Framework
### Patterns and Standards (Opinionated & Specific)
-(Incorporate relevant best practices if Deep Research was performed)
-
- **Architectural/Design Patterns:** Mandate specific patterns to be used (e.g., Repository Pattern for data access, MVC/MVVM for structure, CQRS if applicable). .
- **API Design Standards:** Define the API style (e.g., REST, GraphQL), key conventions (naming, versioning strategy, authentication method), and data formats (e.g., JSON).
@@ -93,29 +205,23 @@ Define Story 0: Explicitly state initial setup tasks for the user. Expand on wha
- **Error Handling Strategy:** Outline the standard approach for logging errors, propagating exceptions, and formatting error responses.
-### Folder Structure
+### Initial Project Setup (Manual Steps)
-Define the mandatory top-level directory layout for the codebase. Use a tree view or clear description (e.g., `/src`, `/tests`, `/config`, `/scripts`). Specify conventions for organizing components, modules, utils, etc.
+Define Story 0: Explicitly state initial setup tasks for the user. Expand on what was in the PRD if it was present already if not sufficient, or else just repeat it. Examples:
-### Testing Strategy (Opinionated & Specific)
+- Framework CLI Generation: Specify exact command (e.g., `npx create-next-app@latest...`, `ng new...`). Justify why manual is preferred.
+- Environment Setup: Manual config file creation, environment variable setup. Register for Cloud DB Account.
+- LLM: Let up Local LLM or API key registration if using remote
- - **Required Test Types:** Specify mandatory types (e.g., Unit, Integration, End-to-End).
+## Infrastructure and Deployment
- - **Frameworks/Libraries:** Mandate specific testing tools and **versions** (e.g., Jest v29.x, Cypress v12.x, Pytest v7.x).
+{ cloud accounts and resources we will need to provision and for what purpose }
+{ Specify the target deployment environment (e.g., Vercel, AWS EC2, Google Cloud Run) and outline the CI/CD strategy and any specific tools envisioned. }
- - **Code Coverage Requirement:** State the mandatory minimum code coverage percentage (e.g., >= 85%) that must be enforced via CI.
+## Change Log
- - **Testing Standards:** Define conventions (e.g., AAA pattern for unit tests, standard setup/teardown procedures, mocking guidelines).
+{ table of changes }
+
+```
-### Security Considerations
-
-Outline key security mechanisms required based on PRD (e.g., authentication flows like JWT, password hashing algorithms like bcrypt, input validation strategies, authorization model, data encryption requirements). (Incorporate specific findings/best practices if Deep Research was performed).
-
-### Architectural Decisions (ADRs)
-
-For significant choices where alternatives exist (e.g., database selection, framework choice), briefly document the decision, the context from the PRD (and research if applicable), and the rationale.
-
-### Glossary
-
-Define any project-specific technical terms used in the architecture document for clarity.
```
diff --git a/role-prompts/pm.md b/role-prompts/pm.md
index 5fd943ec..948af589 100644
--- a/role-prompts/pm.md
+++ b/role-prompts/pm.md
@@ -31,64 +31,116 @@ You will ask the user clarifying questions for unknowns to help generate the det
You will follow the PRD Template below and minimally contain all sections from the template. This is the expected final output that will serve as the project's source of truth to realize the MVP of what we are building.
```markdown
-# [Title] PRD
+# {Project Name} PRD
-## Purpose
+## Status: { Draft | Approved }
-[Describe the purpose of the project.]
+## Intro
-## Context
+{ Short 1-2 paragraph describing the what and why of what the prd will achieve, as outlined in the project brief or through user questioning }
-[Provide background and context.]
+## Goals and Context
-## Story (Task) List
+{
+A short summarization of the project brief, with highlights on:
-### Epic 1
+- Clear project objectives
+- Measurable outcomes
+- Success criteria
+- Key performance indicators (KPIs)
+ }
-**Story 0: Initial Project Setup**
+## Features and Requirements
-- Project init, account, environment, or other manual provisioning as needed. For example, for a Next.js app, it is better to let the user manually run the project generator or clone a starter repo than relying on the LLM. Also ensure we have a version control plan in place before getting too far (git repo set up).
+{
-**Story 1: [Title]**
+- Functional requirements
+- Non-functional requirements
+- User experience requirements
+- Integration requirements
+- Testing requirements
+ }
-- Subtask
-- Subtask
+## Epic Story List
-**Story 2: [Title]**
+{ We will test fully before each story is complete, so there will be no dedicated Epic and stories at the end for testing }
-- Subtask
-- Subtask
+### Epic 0: Initial Manual Set Up or Provisioning
-### Epic N
+- stories or tasks the user might need to perform, such as register or set up an account or provide api keys, manually configure some local resources like an LLM, etc...
-...
+### Epic-1: Current PRD Epic (for example backend epic)
-## Testing Strategy
+#### Story 1: Title
-- **Unit Tests:**
-- **Integration Tests:**
-- **End-to-End (e2e) Tests:**
+Requirements:
-## UX/UI
+- Do X
+- Create Y
+- Etc...
-[Describe the user experience and interface requirements.]
+### Epic-2: Second Current PRD Epic (for example front end epic)
-## Tech Stack
+### Epic-N: Future Epic Enhancements (Beyond Scope of current PRD)
-| Category | Choice(s) / Version(s) |
-| ---------------- | ---------------------- |
-| Language | |
-| Libraries | |
-| Frameworks | |
-| UI | |
-| Deployment Env | |
-| Unit Test | |
-| Integration Test | |
-| E2E Test | |
+
-## Out of Scope Post-MVP
+## Epic 1: My Cool App Can Retrieve Data
-- Feature A
-- Feature B
-- Feature ...
+#### Story 1: Project and NestJS Set Up
+
+Requirements:
+
+- Install NestJS CLI Globally
+- Create a new NestJS project with the nestJS cli generator
+- Test Start App Boilerplate Functionality
+- Init Git Repo and commit initial project set up
+
+#### Story 2: News Retrieval API Route
+
+Requirements:
+
+- Create API Route that returns a list of News and comments from the news source foo
+- Route post body specifies the number of posts, articles, and comments to return
+- Create a command in package.json that I can use to call the API Route (route configured in env.local)
+
+
+
+## Technology Stack
+
+{ Table listing choices for languages, libraries, infra, etc...}
+
+
+ | Technology | Version | Description |
+ | ---------- | ------- | ----------- |
+ | Kubernetes | x.y.z | Container orchestration platform for microservices deployment |
+ | Apache Kafka | x.y.z | Event streaming platform for real-time data ingestion |
+ | TimescaleDB | x.y.z | Time-series database for sensor data storage |
+ | Go | x.y.z | Primary language for data processing services |
+ | GoRilla Mux | x.y.z | REST API Framework |
+ | Python | x.y.z | Used for data analysis and ML services |
+
+
+## Project Structure
+
+{ folder tree diagram }
+
+### POST MVP / PRD Features
+
+- Idea 1
+- Idea 2
+- ...
+- Idea N
+
+## Change Log
+
+{ Markdown table of key changes after document is no longer in draft and is updated, table includes the change title, the story id that the change happened during, and a description if the title is not clear enough }
+
+
+| Change | Story ID | Description |
+| -------------------- | -------- | ------------------------------------------------------------- |
+| Initial draft | N/A | Initial draft prd |
+| Add ML Pipeline | story-4 | Integration of machine learning prediction service story |
+| Kafka Upgrade | story-6 | Upgraded from Kafka 2.0 to Kafka 3.0 for improved performance |
+
```