# Koder 4000

This document descibes the goal of this project

## Goal
The goal of this project is to create an MCP for LLMs to create a feature from a description to a well coded, and fully working feature.

The idea is the following:

1. A human creates a markdown document for the feature, describing it as detailed as the human wanted. The markdown document should have a clear name to reference the feature.
2. The MCP analyses the markdown document and tries to analyse whats missing, things that are unclear, holes in the description etc. It checks the current projects code to see how it fits with the current code and what might be missing. It asks the human to complete the documentation to the document is more well defined. The quests and answers are written to the same document but in a new section called `Q & A`. The new and more well defined version is written in a new section called `Complete Definition`. It also creates a section called `Plan` and writes down everything that it things should be done to complete the feature.
3. The human then reviews the document and alters whats needed.
4. The human then instructs the coding agent, such a Claude Code, to begin to code the feature, based on the document. Claude creates the feature and all tests needed to make sure it works. Claude follows the TDD principles. Claude also follows the code standard of the project and any instructions in the CLAUDE.md or similiar documents.
5. When Claude Code is done, it submits the code to a new MCP that has agents to review the code. It should review it from these perspectives:
    - Find any potential bugs
    - Check if the code follows best practices
    - Check for security issue
    - Check so the code is performant and memory safe
    - Check to see if the code is overcomplicated and suggest simplification
6. When the reviewing MCP is done, it feeds the result to Claude
7. Claude takes the feedback and fixes the issues
8. Claude submits the code to the agents to review it again
9. The loop continues until everything works and the reviewing MCP things is ok.
10. If the loop continues for too login (too many iterations), the human is asked to check if it should continue.
11. When done, if there where any intresting facts that are worth mentioning, it adds a section called `Finishing thoughts` to the markdown document.
12. It also creates or updates the project documentation with the new feature.

## Tech

- We want to use Rust for the MCP. 
  - We use Axum if we need a web server
  - We use Tokio for async
- We use Claude Opus as our LLM model when we need ot call a LLM with an API.
