Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions ai/context/architecture_principles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Architecture Principles

## Core Principles

- Keep solutions simple and focused on the problem at hand.
- Prefer readability and maintainability over cleverness.
- Small functions and modules that do one thing well.
- Use clear and descriptive names for variables, functions, and classes.
- Avoid premature optimization; optimize only when necessary.
- Avoid over-engineering; build only what is needed for the current problem.
- Clear boundaries between components to promote separation of concerns.
- Prefer to maintainability over perfection

## Delivery Principles

Prefer:
- small specs
- iterative delivery
- vertical slices of functionality
- simple APIs
- clear documentation
- understandable code

Avoid:
- giant upfront architecture
- premature optimization
- speculative abstractions
- over-engineering
- unnecessary complexity
- unnecessary microservices
17 changes: 17 additions & 0 deletions ai/context/domain_glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Domain Glossary

This glossary provides definitions for key terms and concepts related to the domain of artificial intelligence (AI). It serves as a reference for understanding the terminology used in AI research, development, and applications.

Use this file to maintain shared terminology.

Consistent terminology significantly improves:
- communication
- AI consistency
- implement quality

## General Terms

- **User**: Final application consumer, typically a human, who interacts with the AI system.
- **Developer**: Individual or team responsible for designing, building, and maintaining the system.
- **Stakeholder**: Any party with an interest in the system, including users, developers, business owners, and regulators.
- **Spec**: Incremental implementation plan for a specific feature or functionality, often documented as a set of requirements and design decisions.
31 changes: 31 additions & 0 deletions ai/context/project_constraints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Project constraints

## Backend

Always:

- Use the `SERIAL` type for `id` columns when creating migration SQL files;
- Define a table PRIMARY KEY in the end of the table columns using the table name plus `_pk` and the needed columns;
- Import needed packages one by one;
- Create JavaDoc for public classes and methods;
- Run `./mvnw -Ptests test` to check possible check style issues or failing tests;
- Fix existing test cases, if needed;
- Update docker-compose.yml and github workflow files if a new variable or application.yml has changed;

Never:
- Use `ON DELETE CASCADE` in SQL scripts or migration files;
- Use star to import packages;

## Frontend

Always:

- Type variables according with their data type;
- Create helper functions in the helper directory;
- Update Dockerfile, docker-compose.yml and github workflow files if a new environment variable was added;

Never:

- Use the `any` type;
- Add new dependencies for small helpers or util functions, prefer implementing them;

44 changes: 44 additions & 0 deletions ai/context/project_vision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Project Vision

## Project Name

TaskNote

## Problem Statement

In today's fast-paced world, individuals and teams often struggle to keep track of their tasks, deadlines, and project
progress. Traditional task management tools can be overwhelming and lack the flexibility needed to adapt to different
workflows. This leads to decreased productivity, missed deadlines, and increased stress.

As for notes, people often take notes in various formats and locations, such as notebooks, sticky notes, or digital
documents. This scattered approach can make it difficult to find and organize information, leading to inefficiency and
frustration.

## Users

The primary users of TaskNote are:

- **Individuals**: People who want to manage their personal tasks and notes efficiently.
- **Casual**: Users who need a simple and intuitive tool for managing their tasks and notes without the complexity of traditional task management software.
- **Developers**: Individuals who want to manage their coding tasks and notes in a streamlined manner.

## Core Features

- **Authentication**: Allow users to create accounts and securely log in to access their tasks and notes.
- **Task Management**: Create, organize, and prioritize tasks with deadlines and reminders.
- **Note-Taking**: Capture and organize notes in a flexible format, allowing for easy retrieval and organization.
- **Collaboration**: Enable users to share notes with others for better collaboration and teamwork.
- **Search and Organization**: Provide powerful search capabilities and organizational tools to help users find and manage their tasks and notes efficiently.
- **Multi-Language Support**: Support multiple languages to cater to a global user base.

## General Constraints

- **GraalVM Compatibility**: The application must be compatible with GraalVM to leverage its performance benefits and support for multiple languages.
- **Mobile-first UI**: The user interface should be designed with a mobile-first approach to ensure a seamless experience across devices.

## Success Criteria

- Users can manage their tasks and notes efficiently, leading to increased productivity and reduced stress.
- Positive user feedback and high engagement with the application.
- Specs remain under control, with a clear roadmap for future features and improvements.
- Codebase remains maintainable and scalable, allowing for easy addition of new features and improvements over time.
34 changes: 34 additions & 0 deletions ai/context/tech_stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Tech Stack

## Frontend

- **React**: A popular JavaScript library for building user interfaces, particularly single-page applications.
- **TypeScript**: A superset of JavaScript that adds static typing, improving code quality and maintainability.
- **Bootstrap**: A widely used CSS framework for building responsive and mobile-first websites.
- **Fetch API**: A modern interface for making HTTP requests from the browser, used for communicating with the backend.
- **Vite**: A build tool that provides a fast development environment and optimized production builds for modern web applications.

## Backend

- **Java**: A widely used programming language known for its portability, performance, and extensive ecosystem.
- **Spring Boot**: A framework for building production-ready applications with Java, providing features like dependency injection, security, and data access.
- **Spring Security**: A framework for securing Java applications, providing authentication and authorization features to protect resources and manage user access.
- **GraalVM**: A high-performance runtime that supports multiple programming languages, allowing for efficient execution of Java applications and interoperability with other languages.
- **JPA (Java Persistence API)**: A specification for managing relational data in Java applications, providing a standard way to interact with databases using object-relational mapping (ORM).

## Database
- **PostgreSQL**: A powerful, open-source relational database management system known for its reliability and performance.

## Infrastructure

- **Docker**: A platform for developing, shipping, and running applications in containers, providing consistency across different environments.
- **Kubernetes**: An open-source container orchestration system for automating the deployment, scaling, and management of containerized applications.
- **Terraform**: An infrastructure as code tool that allows for the provisioning and management of cloud resources in a declarative manner.
- **VPS**: Virtual Private Server, a virtualized server that provides dedicated resources and control over the hosting environment for deploying applications.

## AI Tools

- **Crusher**: An AI tool for code generation and assistance, helping developers write code more efficiently and accurately.
- **GitHub Copilot**: An AI-powered code completion tool that provides suggestions and helps developers write code faster by leveraging machine learning models trained on a vast amount of code from GitHub repositories.
- **Gemini**: An AI tool for natural language processing and understanding, enabling developers to build applications that can process and generate human-like text.
- **Groq**: An AI tool for optimizing and accelerating machine learning models, providing efficient execution and improved performance for AI applications.
50 changes: 50 additions & 0 deletions ai/contracts/templates/feedback_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Feedback Contract

This contract is used for:
- reviews
- implementation feedback
- architecture feedback
- iterative improvement

---

## 1. What Worked Well

Highlight:

- Good implementation choices
- Maintainability improvements
- Strong architectural decisions

## 2. Areas For Improvement

Identify:

- Unclear implementation
- Maintainability concerns
- Architectural inconsistencies

## 3. Risks

Surface:

- Technical debt
- Scalability concerns
- Workflow fragility

## 4. Recommendations

Provide:

- Practical improvements
- Simplification opportunities
- Next iteration suggestions

## Philosophy

Feedback should:

- Improve clarity
- Support maintainability
- Remain constructive
- Avoid unnecessary perfectionism
68 changes: 68 additions & 0 deletions ai/contracts/templates/handoff_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Handoff Contract

This contract is used whenever work moves between roles.

Example:
- PM → Architect
- Architect → Developer
- Developer → Reviewer

---

## 1. Summary

Concise explanation of:

- Completed work
- Important decisions
- Implementation status

## 2. Completed Work

Explicitly list:

- Implemented features
- Completed tasks
- Validated decisions

## 3. Pending Work

List:

- Unfinished work
- Blockers
- Remaining implementation

## 4. Important Decisions

Document:

- Tradeoffs
- Architectural decisions
- Assumptions
- Simplifications

## 5. Risks

Identify:

- Technical concerns
- Unclear requirements
- Scalability limitations
- Possible regressions

## 6. Questions

List:

- Unresolved ambiguity
- Missing requirements
- Pending decisions

## 7. Recommended Next Step

Clearly explain:

- What should happen next
- Which role should act next
- What should be prioritized
58 changes: 58 additions & 0 deletions ai/contracts/templates/question_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Question Contract

## Description

This contract is used when:

- Requirements are not clear
- Assumptions must be validated
- More information is needed to proceed
- Implementation direction is uncertain

## 1. Context

Explain:

- The background of the problem or task
- Why it is important to clarify the requirements or assumptions
- Related specs or documentation
- Implementation area

## 2. Questions

Clearly state:

- The specific questions that need to be answered
- What is unclear
- What assumptions are being made
- What decision needs to be made

## 3. Why It Matters

Explain:

- The potential impact of not clarifying the questions
- How it affects the implementation
- Architectural implications
- Performance implications
- User experience implications
- Workflow consequences

## 4. Suggested Options

Provide:

- Possible answers to the questions
- Pros and cons of each option
- Any relevant data or evidence to support the options

## 5. Philosophy

Good questions reduce:

- Hallucinations
- Unnecessary work
- Rework
- Implementation drift
- Misalignment with requirements
- Hidden assumptions
Loading
Loading