|
1 | 1 | ## 🚀 Setting up the AI Assisted Coding Framework in your project |
2 | 2 |
|
3 | | -This framework integrates two powerful MCP (Model Context Protocol) servers to supercharge your development workflow: |
| 3 | +This framework integrates several powerful MCP (Model Context Protocol) tools to supercharge your development workflow: |
4 | 4 |
|
5 | 5 | - **Context7 MCP**: Provides live documentation and code snippet retrieval for authoritative technical references |
6 | | -- **ConPort MCP**: Delivers persistent project memory, decision tracking, and knowledge graph capabilities |
| 6 | +- **Memory MCP**: Delivers persistent project memory, decision tracking, and knowledge graph capabilities |
| 7 | +- **Sequential Thinking MCP**: Assists the LLM with ordering tasks, and breaking down complex ideas |
| 8 | +- **Microsoft.Learn MCP**: Give your LLM access to the entire Microsoft Learn knowledgebase! |
7 | 9 |
|
8 | 10 | Together, they transform GitHub Copilot into an intelligent development assistant that remembers project context, tracks architectural decisions, and maintains comprehensive project knowledge across sessions. |
9 | 11 |
|
10 | 12 | ## 📋 Prerequisites |
11 | 13 |
|
12 | | -- **Docker** or **Podman** (for ConPort MCP) |
13 | | -- **Node.js 16+** (for Context7 MCP server) - Optional, see step 2 below |
14 | | -- **VS Code** with GitHub Copilot extension |
| 14 | +- **Node.js 16+** (for MCP tools) |
| 15 | +- **Container Platform** An OCI compliant container runtime, such as: |
| 16 | + - [Docker Desktop](https://www.docker.com/products/docker-desktop) |
| 17 | + - [Podman](https://podman.io/) [^1] |
| 18 | +- **IDE** with GitHub Copilot[^2] |
15 | 19 | - **Git** for version control |
16 | 20 |
|
17 | 21 | ## 🛠️ Installation & Setup |
18 | 22 |
|
19 | | -### Step 1: Clone and Copy Framework Files |
| 23 | +### Step 1: Clone The Framework Repository |
20 | 24 | #### Windows Terminal: |
21 | 25 | ```powershell |
22 | 26 | # Clone this repository |
23 | 27 | git clone https://github.com/ChrisMcKee1/AI-Assisted-Coding.git |
24 | | -cd AI-Assisted-Coding |
25 | | -
|
26 | | -# Copy all framework files to your project's root directory |
27 | | -# Replace 'your-project-path' with the actual path to your project |
28 | | -robocopy . "C:\path\to\your-project" /E /XD .git |
29 | 28 | ``` |
30 | 29 |
|
31 | | -#### Linux / OSX Terminal: |
32 | | -```bash |
33 | | -git clone https://github.com/ChrisMcKee1/AI-Assisted-Coding.git |
34 | | -cd AI-Assisted-Coding |
35 | | - |
36 | | -# Copy all framework files to your project's root directory |
37 | | -# Replace '/path/to/your-project' with the actual path to your project |
38 | | -rsync -av --exclude='.git' . /path/to/your-project/ |
39 | | -``` |
| 30 | +We will use the files in this repository once you've setup your local workspace. Keep them somewhere easy to access, we recommend a folder such as `C:\github\` or `~/github` on Linux & OSX. |
40 | 31 |
|
41 | 32 | ### Step 2 (optional): Change the MCP Configuration |
42 | 33 |
|
43 | | -By default, we utilize the local Contex7 MCP server for caching and speed. However, if you don't have NodeJS installed, and do not wish to use NodeJS, you can instead utilize iether the public Context7 MCP server, or build and run the Docker version of the Context7 MCP tool. The `.vscode/mcp.json` file has commented out configuration options for these two paths. |
| 34 | +By default, we utilize the local MCP tools for caching and speed. However, if you don't have NodeJS installed, and do not wish to use NodeJS, you can instead utilize docker versions of each tool. To build and run the Docker version of the the tools, you will need to see the documentation for each to setup the docker config: |
44 | 35 |
|
45 | 36 | See the [Context7 Docker Readme](../../context7-docker.md) for instructions on how to use Docker to host Context7 locally. |
46 | 37 |
|
47 | | -Also, we are using Docker for hosting the Context Portal MCP server. We recommend you pull the image locally before you start up VS Code. To pull the image: |
| 38 | +See the [Playwright MCP Readme](https://github.com/microsoft/playwright-mcp) for details on advanced configuration and docker support for Playwright. |
| 39 | + |
| 40 | +See the [Sequential Thinking MCP Readme](https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking) for details on how to configure it using docker. |
| 41 | + |
| 42 | +See the [Memory MCP Readme](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) for details on how to configure it using Docker |
| 43 | + |
| 44 | +> [!IMPORTANT] |
| 45 | +> If you intend to do this, please do this before coming to the workshop, and ensure they are setup and configured. This can take time to setup and troubleshoot, so be prepared. Our recommendation is to use the NodeJS versions of the tools. |
48 | 46 |
|
49 | | -`docker pull seiggy/context-portal-mcp:0.2.18` |
| 47 | +### Step 3: Clone the eShop Repository |
50 | 48 |
|
51 | | -If you are using Podman, replace `docker` with `podman` in both the command, and in the `mcp.json` file. If you do not have Docker installed, you can run the Context Portal MCP server locally using Python and UV. For further details on how to use the ConPort MCP server with Python, see the [Context Portal Python Readme](../../conportal-python.md). |
| 49 | +You'll be building this challenge using the popular eShop demo repository from Microsoft. Clone the [eShop](https://github.com/dotnet/eShop/) Repository from the dotnet team to an easy to access location on your machine. |
52 | 50 |
|
53 | | -### Step 3: Open Project in VS Code |
| 51 | +### Step 4: Copy the Framework to the eShop repository |
54 | 52 |
|
| 53 | +Copy the `.github` and `.vscode` folders from the AI-Assisted-Coding repository to the root of your eShop repository. An example script below assumes you cloned both repositories to the root of `C:\github` or `~/github` respectively. |
| 54 | + |
| 55 | +#### Powershell |
55 | 56 | ```powershell |
56 | | -# Open your project in VS Code |
57 | | -code . |
| 57 | +cd c:\github\AI-Assisted-Coding |
| 58 | +robocopy . "C:\github\eShop" /E /XD .git |
| 59 | +``` |
| 60 | + |
| 61 | +#### Bash |
| 62 | +```bash |
| 63 | +cd ~/github |
| 64 | +rsync -av --exclude='.git' . ~/github/eShop |
58 | 65 | ``` |
59 | | -### Step 4: Update Your Project Brief |
60 | 66 |
|
61 | | -Before proceeding, overwrite the `projectBrief.md` in your project root that you copied from the AI-Assisted-Coding repository, with the `projectBrief.md` file we provided in this repository. |
62 | 67 |
|
63 | | -### Step 5: Verify GitHub Copilot Integration |
| 68 | +### Step 5: Run the Analyze Workflow |
64 | 69 |
|
65 | | -1. Ensure GitHub Copilot extension is installed and activated |
66 | | -2. The framework will automatically detect the `copilot-instructions.md` file |
| 70 | +Open the eShop Solution using VS Code or your preferrred IDE. |
67 | 71 |
|
| 72 | +Run the `/analyze-product` prompt in Copilot Agent Mode to analyze your woskpace and generate the documents that help the spec-driven development workflow operate smoothly. |
68 | 73 |
|
69 | | -### Step 6: Initialize ConPort MCP |
| 74 | +> [!NOTE] |
| 75 | +> If you are using Visual Studio 2022, you will need to manually reference custom instruction files. You will need to swap to "folder view" in Visual Studio 2022, and then you can type `#analyze-product.instructions.md` to find and reference the file in the chat window. |
70 | 76 |
|
71 | | -After verifying Copilot integration, initialize the ConPort MCP memory system: |
| 77 | +> [!NOTE] |
| 78 | +> If you are using Jebrains Rider, you will need to manually reference the file by dragging it from the file system window, or by right-clicking, and using the context menu to reference the file in chat. |
72 | 79 |
|
73 | | -1. In the Copilot chat or comments, type: |
74 | | - ``` |
75 | | - Initialize ConPort |
76 | | - ``` |
77 | | -1. Follow the prompts to complete setup. |
78 | | - This step creates the persistent memory database and loads your project context before you start coding. |
| 80 | + |
79 | 81 |
|
80 | | -### Step 7: Have the AI conduct Architecture Review |
| 82 | +### Step 6: Verify Framework setup is completed |
81 | 83 |
|
82 | | -Have Copilot Create an Architecture Review of the repo. Take a look at the `README.md` in the AI Assisted Coding framework for help on how to conduct the Architecture review. When it completes, you should end up with a new folder named `architectureDiagrams` that contains 5 ore more markdown files with charts, documentation, and more about the eShop Application! Make sure you pass the #codebase token in your command, so that VS Code will give the AI access to the codebase for the context! |
| 84 | +1. Answer any questions that the AI prompts you with, and wait for it to complete. |
| 85 | +2. The framework will automatically generate the `copilot-instructions.md` file |
| 86 | +3. The framework should also generate a series of files in a folder named `.docs` |
| 87 | +4. Review these documents for accuracy, and fix any problems you see. |
| 88 | + |
| 89 | + |
| 90 | +### Step 7: Follow the instructions from the `README.md` file to run eShop locally |
| 91 | + |
| 92 | +Follow the instructions in the `README.md` file at the base of the eShop Repository to setup the application locally. You'll want to run the application using Aspire, and Docker, so that you can debug the application. Ensure that you can reach the Blazor Customer Portal, and that you can add an item from the catalog to your cart before you continue. |
83 | 93 |
|
84 | 94 | ## Next challenge |
85 | 95 |
|
86 | | -Now that you've setup the AI to be able to better understand and work within your repository, it's time to [understand how to write requirements!](./2-requirements.md) |
| 96 | +Now that you've setup the AI to be able to better understand and work within your repository, it's time to [understand how to write requirements!](./2-requirements.md) |
| 97 | + |
| 98 | +[^1]: For more information, see [Container Runtime](https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=linux%2Cunix&pivots=dotnet-cli#container-runtime) |
| 99 | +[^2]: _VS Code supports all features, Visual Studio 2022 17.14.13 and Jetbrains IDEs require workarounds noted through the workshop_ |
0 commit comments