# io8 Project Manager Agent - Customized for This Project

## Project-Specific Instructions

--- 
### Product Requirements Document (PRD) Update - 2025-10-09T05:47:50Z

## 1. Executive Summary
The Simple Notes Taking App is a user-friendly application designed to enable individuals to efficiently create, view, edit, and delete personal notes. Built upon an Angular Clarity Boilerplate frontend and a Python/Flask RESTful API backend with PostgreSQL/SQLite persistence, it offers a straightforward digital notepad for users prioritizing simplicity and ease of use. The core objective is to deliver a reliable and intuitive note management experience while adhering to a modular, scalable architecture.

## 2. Product Vision & Strategy
**Product Vision:** To be the most intuitive and reliable digital notepad for individuals seeking a simple, distraction-free way to capture and manage their thoughts.

**Strategic Goals:**
-   **Deliver Core Value Quickly:** Launch a Minimum Viable Product (MVP) that fully supports note CRUD operations.
-   **Ensure High Usability:** Provide an exceptionally easy-to-use and responsive interface.
-   **Guarantee Data Reliability:** Implement robust data persistence to prevent loss of user information.
-   **Maintain Scalability:** Design the architecture to allow for future enhancements (e.g., user authentication, search) without significant refactoring.

**Success Metrics:**
-   **Feature Completion:** 100% of core note CRUD functionalities implemented and tested.
-   **User Adoption (Conceptual):** High engagement with core features, indicating ease of use.
-   **Performance:** Fast load times for note lists and individual notes (e.g., < 2 seconds for initial load, < 500ms for note operations).
-   **Reliability:** Zero critical data loss incidents; minimal user-facing bugs related to note management.

## 3. Target Users & Personas
**Target Users:** Individuals seeking a simple, no-frills digital solution for taking and managing personal notes. This includes students, professionals for quick thoughts, and anyone needing a basic personal organizer.

**Persona: "Mindful Maeve"**
-   **Demographics:** Early 30s, Marketing Coordinator, lives in a mid-sized city. Tech-savvy but prefers minimalist tools.
-   **Goals:** Quickly jot down ideas during meetings, create shopping lists, remember key personal tasks. Needs something reliable that doesn't overwhelm her with features she won't use.
-   **Pain Points:** Existing note apps are too complex, require too many steps for simple tasks, or have cluttered interfaces. She fears losing unsaved notes.
-   **Needs:** Fast note creation, easy viewing, ability to quickly edit or delete outdated information. Data persistence is crucial.
-   **Usage Scenario:** Opens the app on her laptop or phone, types a quick thought with a title, saves it. Later, she browses her notes, edits one to add more details, and deletes an old shopping list.

## 4. Problem Statement
Many existing note-taking applications are feature-rich but often complex, leading to cognitive overhead and a steep learning curve for users who simply need to capture and manage basic information. This complexity deters users who prioritize speed, simplicity, and ease of use, making it challenging for them to find a digital tool that reliably meets their fundamental note-taking needs without unnecessary distractions or advanced functionalities.

## 5. Solution Overview
The Simple Notes Taking App addresses this problem by providing a streamlined, intuitive platform for core note management (Create, Read, Update, Delete). It features a responsive web frontend built with Angular and the Clarity Design System, ensuring a consistent and user-friendly experience across devices. A robust Python/Flask backend handles all business logic and interacts with a PostgreSQL (production) or SQLite (development) database for persistent and reliable data storage. The application is designed to be lean, performant, and easily extendable for future capabilities like user authentication.

## 6. Functional Requirements
-   **FR-001: Note Creation:** Users shall be able to create new notes by providing a title and optional content.
-   **FR-002: View Notes List:** Users shall be able to view a list of all their notes, displaying titles and content previews.
-   **FR-003: View Single Note:** Users shall be able to view the full details (title and content) of a specific note.
-   **FR-004: Edit Note:** Users shall be able to modify the title and content of an existing note.
-   **FR-005: Delete Note:** Users shall be able to permanently delete an existing note.
-   **FR-006: Data Persistence:** All created, updated, and deleted notes shall be reliably saved and retrieved across user sessions.
-   **FR-007 (Stretch Goal): Basic User Authentication:** The system should support user registration and login to allow for personalized note ownership.

## 7. Non-Functional Requirements
-   **NFR-001: Performance:** The application shall offer fast load times for note lists and individual note views (target: <2s initial load, <500ms for note operations).
-   **NFR-002: Usability:** The user interface shall be intuitive and easy to navigate, making all note CRUD operations straightforward.
-   **NFR-003: Reliability:** Note data shall be saved and retrieved consistently, with robust error handling to prevent data corruption or loss.
-   **NFR-004: Scalability:** The architecture shall accommodate future enhancements (e.g., user authentication, tagging) without requiring a complete overhaul.
-   **NFR-005: Security:** Input fields shall be validated and sanitized on both client and server-side to prevent vulnerabilities (e.g., XSS). HTTPS shall be enforced.
-   **NFR-006: Maintainability:** The codebase shall be modular, well-documented, and adhere to established coding standards for easy maintenance and future development.
-   **NFR-007: Responsiveness:** The web interface shall adapt and be fully usable across various devices (desktop, tablet, mobile).

## 8. Epic Stories

### Epic 1: Core Note Management
**Epic Description:** This epic encompasses all fundamental Create, Read, Update, and Delete (CRUD) operations for notes, providing users with the primary functionality to interact with their personal notes.
**Business Value:** Delivers the core value proposition of the application, enabling users to efficiently capture, organize, and manage their thoughts, directly addressing their primary need for a simple note-taking tool.
**Acceptance Criteria:**
-   Users can successfully create new notes with titles and content.
-   Users can view a comprehensive list of all their notes.
-   Users can access and view the full details of any selected note.
-   Users can modify existing notes and save their changes.
-   Users can permanently remove notes they no longer need.
-   All UI interactions related to note management are intuitive and responsive.

**User Stories:**
-   **US-001:** Create New Note
  -   **As a** user
  -   **I want to** create a new note with a title and content
  -   **So that** I can jot down my thoughts.
  -   **Acceptance Criteria:**
    -   [ ] Given I am on the notes application home page,
    -   [ ] When I click on a 'New Note' or 'Add Note' button/icon,
    -   [ ] Then I should be presented with a form to enter a title and content.
    -   [ ] When I enter a title (max 100 chars) and content (no max, basic text) and submit the form,
    -   [ ] Then the note should be successfully saved.
    -   [ ] And I should see the newly created note appear in my list of notes.
    -   [ ] And I should receive confirmation that the note was saved.
    -   [ ] When I try to submit a note with an empty title, Then I should receive an error message and the note should not be saved.
  -   **Story Points:** 5
  -   **Priority:** High

-   **US-002:** View All Notes
  -   **As a** user
  -   **I want to** view a list of all my notes
  -   **So that** I can easily browse them.
  -   **Acceptance Criteria:**
    -   [ ] Given I have created multiple notes,
    -   [ ] When I visit the notes application home page,
    -   [ ] Then I should see a list of all my notes.
    -   [ ] And each item in the list should display the note's title and a short preview of its content.
    -   [ ] And the list should be displayed in a clear, readable format.
  -   **Story Points:** 3
  -   **Priority:** High

-   **US-003:** View Individual Note Details
  -   **As a** user
  -   **I want to** view the details of a specific note
  -   **So that** I can read its full content.
  -   **Acceptance Criteria:**
    -   [ ] Given I am viewing the list of notes,
    -   [ ] When I click on a specific note's title or entry in the list,
    -   [ ] Then I should be navigated to a dedicated page showing the full title and content of that note.
    -   [ ] And I should have options to go back to the notes list or edit the current note.
  -   **Story Points:** 3
  -   **Priority:** High

-   **US-004:** Edit Existing Note
  -   **As a** user
  -   **I want to** edit an existing note's title and content
  -   **So that** I can update my information.
  -   **Acceptance Criteria:**
    -   [ ] Given I am viewing the details of a specific note (US-003),
    -   [ ] When I click on an 'Edit' button/icon,
    -   [ ] Then I should be presented with a pre-filled form containing the note's current title and content.
    -   [ ] When I modify the title or content and submit the form,
    -   [ ] Then the note should be successfully updated in storage.
    -   [ ] And I should see the updated note details.
    -   [ ] And I should receive confirmation that the note was updated.
  -   **Story Points:** 5
  -   **Priority:** High

-   **US-005:** Delete Note
  -   **As a** user
  -   **I want to** delete a note
  -   **So that** I can remove outdated information.
  -   **Acceptance Criteria:**
    -   [ ] Given I am viewing the details of a specific note (US-003) or the notes list (US-002),
    -   [ ] When I click on a 'Delete' button/icon associated with a note,
    -   [ ] Then I should be prompted with a confirmation dialog (e.g., 'Are you sure you want to delete this note?').
    -   [ ] When I confirm the deletion,
    -   [ ] Then the note should be permanently removed from storage.
    -   [ ] And the note should no longer appear in the list of notes.
    -   [ ] And I should receive confirmation that the note was deleted.
  -   **Story Points:** 3
  -   **Priority:** High

### Epic 2: Data Persistence & Reliability
**Epic Description:** This epic focuses on ensuring that all user notes are securely and consistently stored and retrieved, preventing data loss and establishing trust in the application's ability to manage user information over time.
**Business Value:** Guarantees the fundamental reliability of the application, ensuring that users' valuable information is never lost, which is critical for adoption and sustained usage.
**Acceptance Criteria:**
-   Notes are successfully saved to and retrieved from the database.
-   All changes (creation, updates, deletions) persist across application restarts and refreshes.
-   The backend API handles data storage operations without corruption.
-   Error handling mechanisms prevent data loss during unexpected events.

**User Stories:**
-   **US-006:** Ensure Note Persistence
  -   **As a** user
  -   **I want to** notes to be saved persistently
  -   **So that** I don't lose my data.
  -   **Acceptance Criteria:**
    -   [ ] Given I have created, edited, or deleted notes,
    -   [ ] When I close and reopen the application (or refresh the page),
    -   [ ] Then all my changes should be reflected accurately.
    -   [ ] And no data should be lost due to application restarts or browser closures.
  -   **Story Points:** 8
  -   **Priority:** High

## 9. User Interface Requirements
-   **Clarity Design System Adherence:** All UI components shall strictly follow the VMware Clarity Design System for a consistent and professional look and feel, leveraging the base boilerplate's integration.
-   **Responsive Design:** The layout and components shall adapt gracefully to various screen sizes (desktop, tablet, mobile), ensuring optimal usability across devices (NFR-007).
-   **Intuitive Navigation:** A clear and simple navigation scheme (e.g., a sidebar entry for "Notes" within the existing Clarity shell) shall allow users to easily access note-related functionalities.
-   **Note List View:** Display notes in an easily scannable list or data grid (e.g., using `clr-datagrid` for titles and content previews) with actions for viewing detail, editing, or deleting.
-   **Note Detail View:** A dedicated view for a single note showing its full title and content, with clear 'Edit' and 'Delete' buttons, and a 'Back' option.
-   **Note Form:** A clean form for creating/editing notes, utilizing Clarity form controls (`clr-input` for title, `clr-textarea` for content), with clear labels, validation feedback, and 'Save'/'Cancel' actions.
-   **Confirmation Dialogs:** Critical actions like note deletion shall trigger confirmation dialogs (e.g., Clarity modal `clr-modal`) to prevent accidental data loss.

## 10. Technical Requirements
-   **Frontend Framework:** Angular (v16+), building on the provided boilerplate.
-   **Backend Framework:** Python Flask (v2.x) for the RESTful API.
-   **Database:** PostgreSQL (v14+) for production, SQLite for development and testing.
-   **ORM:** SQLAlchemy (v1.4+) with Alembic for database migrations.
-   **API Design:** RESTful endpoints for Notes CRUD operations (`/api/v1/notes`), exchanging JSON data.
-   **Client-Server Communication:** HTTPS for secure communication between Angular frontend and Flask backend.
-   **Modularity:** Notes functionality encapsulated within a lazy-loaded `NotesModule` in Angular.
-   **Data Model:** `Note` entity with `id`, `title`, `content`, `createdAt`, `updatedAt`, `userId` (optional/future FK).
-   **Error Handling:** Robust error handling on both frontend (global error handler, user-friendly messages) and backend (API error responses).
-   **Code Quality:** Adherence to ESLint/Prettier (frontend) and Flake8/Black (backend) standards.

## 11. Success Metrics & KPIs
-   **Completion Rate:** Percentage of user stories completed within planned iterations.
-   **API Uptime:** 99.9% uptime for the backend notes API.
-   **Response Times:** Average API response time for GET operations < 200ms, for POST/PUT/DELETE < 500ms.
-   **Bug Density:** Number of critical/high severity bugs reported post-release (target: zero critical bugs for core features).
-   **Code Coverage:** Maintain high unit test coverage (e.g., >80% for critical services/components).
-   **User Feedback:** Positive qualitative feedback on ease of use and reliability.

## 12. Risk Assessment
-   **Scope Creep:**
    -   **Risk:** Tendency to add more features beyond the MVP (e.g., rich text editor, tagging, search) before core is stable.
    -   **Mitigation:** Strict adherence to MVP definition. Clearly label stretch goals. Regular scope reviews.
-   **Performance Degradation:**
    -   **Risk:** Frontend or backend performance issues impacting user experience, especially with a growing number of notes.
    -   **Mitigation:** Regular performance testing, efficient database queries, lazy loading, optimized frontend bundling, backend caching (future consideration).
-   **Security Vulnerabilities:**
    -   **Risk:** Input injection, data exposure, or unauthorized access (especially if user authentication is added).
    -   **Mitigation:** Comprehensive input validation/sanitization, HTTPS, secure password hashing (for auth), regular security audits, generic error messages.
-   **Data Loss/Corruption:**
    -   **Risk:** Database issues, application bugs leading to lost or corrupted user notes.
    -   **Mitigation:** Database backups, robust transaction management, comprehensive unit/integration tests for data operations, clear error handling.
-   **Technical Debt:**
    -   **Risk:** Rapid development leading to compromises in code quality, maintainability, or scalability.
    -   **Mitigation:** Enforce coding standards (linting, formatting), thorough code reviews, automated testing, refactoring as part of development sprints.

## 13. Timeline & Milestones
*(Note: This timeline is conceptual for an automated workflow. Specific dates would be assigned in a live project.)*

-   **Phase 1: Foundation & Core Feature MVP (Estimated: Initial 2 Sprints)**
    -   **Milestone 1.1:** Backend API for Notes CRUD (POST, GET, PUT, DELETE /api/v1/notes) operational and tested.
    -   **Milestone 1.2:** Frontend `NotesModule` integrated into boilerplate, `NotesService` implemented for API interaction.
    -   **Milestone 1.3:** `NoteFormComponent` (Create mode) and `NotesListComponent` fully functional.
    -   **Milestone 1.4:** `NoteDetailComponent` and `NoteFormComponent` (Edit mode) fully functional.
    -   **Milestone 1.5:** Note deletion functionality complete with confirmation.
    -   **Deliverable:** Working MVP of Simple Notes Taking App.

-   **Phase 2: Refinement & Non-Functional Excellence (Estimated: 1-2 Sprints)**
    -   **Milestone 2.1:** Comprehensive unit and integration test coverage achieved for notes features.
    -   **Milestone 2.2:** Robust error handling and user feedback implemented across frontend/backend.
    -   **Milestone 2.3:** Performance optimizations applied; responsive UI verified across devices.
    -   **Deliverable:** Stable and polished core application.

-   **Phase 3: Future Enhancements (Stretch Goals) (Estimated: Subsequent Sprints)**
    -   **Milestone 3.1:** User authentication (registration, login, JWT) implemented (if prioritized).
    -   **Deliverable:** Enhanced application with user-specific notes.

## 14. Dependencies & Assumptions
-   **Dependencies:**
    -   Availability and stability of Python/Flask backend and PostgreSQL/SQLite database.
    -   Existing Angular Clarity Boilerplate must be stable and provide the necessary foundational structure.
    -   Development environment (Node.js, npm, Python, pip, Docker) properly configured.
-   **Assumptions:**
    -   User inputs for notes are primarily text-based; no rich text editing or attachments in MVP.
    -   Initial scope does not require user authentication; all notes are publicly accessible or for a single "user" until authentication is implemented.
    -   Frontend and backend teams (or development phases) can coordinate effectively on API contracts.
    -   Standard browser capabilities are sufficient; no specific accessibility tools beyond Clarity's built-in support are required for MVP.


--- 
### Project Plan Update - 2025-10-09T05:47:50Z

# Project Plan: Simple Notes Taking App

## 1. Project Overview
This project focuses on developing a "Simple Notes Taking App" by integrating new features into an existing Angular Clarity Boilerplate. The application will enable users to create, view, edit, and delete notes, supported by a Python/Flask backend and a PostgreSQL/SQLite database. The core objective is to deliver a highly usable and reliable note-taking experience as an MVP, with considerations for future scalability.

## 2. Project Management Methodology
**Lean-Agile Hybrid:** We will employ an iterative and incremental development approach. This methodology emphasizes continuous delivery of value, rapid feedback loops, and flexibility to adapt to evolving requirements. Key practices include:
-   **MVP Definition:** Strict focus on delivering the essential note CRUD functionality first.
-   **Iterative Cycles:** Development will proceed in short, focused cycles (sprints/iterations).
-   **Prioritization:** Features and tasks will be prioritized based on user value and business impact.
-   **Continuous Improvement:** Regular reviews and retrospectives (conceptual in this automated flow) to optimize the process.

## 3. Project Phases & Milestones

### Phase 1: Inception & Planning (Current Phase)
-   **Objective:** Define clear requirements, architecture, and technology stack.
-   **Milestones:**
    -   **M1.1 (Done):** Initial Project Analysis, Architecture, and Tech Stack Documents completed.
    -   **M1.2 (Current):** Product Requirements Document (PRD) with Epics and User Stories finalized.
    -   **M1.3 (Upcoming):** Initial Project Plan created.

### Phase 2: Backend Development
-   **Objective:** Develop and test the RESTful API for note management.
-   **Milestones:**
    -   **M2.1:** Database schema designed and implemented (Alembic migrations).
    -   **M2.2:** Flask API endpoints for `Note` CRUD operations implemented and unit-tested.
    -   **M2.3:** API documentation drafted (e.g., OpenAPI/Swagger).

### Phase 3: Frontend Development & Integration
-   **Objective:** Implement the user interface and integrate with the backend API.
-   **Milestones:**
    -   **M3.1:** Angular `NotesModule` structure and core components (`NotesListComponent`, `NoteFormComponent`, `NoteDetailComponent`) created.
    -   **M3.2:** `NotesService` implemented to consume backend API.
    -   **M3.3:** Note creation and listing UI/UX fully functional.
    -   **M3.4:** Note viewing, editing, and deletion UI/UX fully functional.
    -   **M3.5:** Frontend unit tests developed.

### Phase 4: Testing & Quality Assurance
-   **Objective:** Ensure the application meets functional and non-functional requirements.
-   **Milestones:**
    -   **M4.1:** Integration testing between frontend and backend completed.
    -   **M4.2:** End-to-End (E2E) tests for critical user flows implemented (if prioritized).
    -   **M4.3:** Performance testing conducted; NFRs met.
    -   **M4.4:** Security review/testing (e.g., input validation, XSS checks).

### Phase 5: Deployment & Operations
-   **Objective:** Deploy the application and establish monitoring.
-   **Milestones:**
    -   **M5.1:** Docker containers for frontend and backend created and configured.
    -   **M5.2:** Deployment to staging environment successful.
    -   **M5.3:** Monitoring and logging established (frontend error reporting, backend logs, API metrics).
    -   **M5.4:** Production deployment.

## 4. Key Deliverables
-   Product Requirements Document (PRD)
-   Backend RESTful API (Python/Flask)
-   Frontend SPA (Angular/Clarity)
-   Database Schema and Migrations
-   Unit, Integration, and (Optional) E2E Test Suites
-   Docker Images for Frontend and Backend
-   Deployment Scripts/Configurations

## 5. Resource Allocation (Conceptual)
-   **Frontend Development:** Focused on Angular/Clarity UI, RxJS, API integration.
-   **Backend Development:** Focused on Flask API, SQLAlchemy, database interactions, security.
-   **DevOps/Infrastructure:** Focused on Docker, deployment scripts, monitoring setup.
-   *(In this automated context, these are distinct "agent roles" rather than human resources.)*

## 6. Risk Management
(Refer to PRD Section 12 for detailed risk assessment and mitigation strategies. Key risks include scope creep, performance degradation, security vulnerabilities, and data loss.)

## 7. Assumptions
(Refer to PRD Section 14 for detailed dependencies and assumptions. Key assumptions include stability of boilerplate, text-based notes, and initial lack of user authentication for MVP.)


## Base Agent Prompt Reference

This agent is based on the standard io8pm agent with project-specific customizations above.
Refer to the base io8pm agent prompt for general PM principles and workflow instructions.
