copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

/init or context shortening

Open DJTheron opened this issue 2 months ago • 0 comments

Describe the feature or problem you'd like to solve

Add a feature which allows user to ask the ai and for the ai to perform itself when it deems necessary, to create a markdown file that summarises the conversation/project for future context to the next chat..

Proposed solution

It is a feature competitors have and it will benefit the users, by allowing the model to have deeper context and past context of what has happened with a certain project or repository locally, and any specific requirements you have told the chatbot. It will automatically detect if there is one in your current directory already.

Example prompts or workflows

  1. You have just coded a basic web app and ask copilot to do a security review and add security measures to the code, you add another feature to the web app and ask copilot to do another security review, you add another feature and ask copilot to do another security review, by now copilot will have seen that you frequently ask it to do security reviews on your code and it will have created a CONTEXT.md file listing the security vulnerabilities and that it is frequently asked to do security reviews on your code, this allows for the Copilot agent in a future session to have deeper context and know that you will likely ask it ro review your code again.

  1. You're building a Node.js app and ask Copilot to set up Stripe API authentication, then add PayPal integration with the same error handling patterns, then add Twilio for SMS. Copilot creates a CONTEXT.md file noting your preference for environment variable naming (API_KEY_STRIPE format), your custom error wrapper pattern, and your use of separate service classes for each API. When you return later to add Shopify integration, Copilot already knows to follow your established architectural patterns without re-explaining them.

  1. You're working on a Python pipeline and consistently ask Copilot to write pytest tests with fixtures, follow 100-character line limits, add type hints, use Google-style docstrings, and prefer list comprehensions. After several sessions, Copilot creates a CONTEXT.md file documenting these preferences. When you return and ask to "add a new data transformation function," Copilot automatically generates code with type hints, proper docstrings, and matching tests—all following your style without you repeating the requirements.

Additional context

You have created a clean, new project:

$ mkdir my-new-project && cd my-new-project
$ copilot
┌──                                                                         ──┐
│                                                           ▄██████▄          │
    Welcome to GitHub                                   ▄█▀▀▀▀▀██▀▀▀▀▀█▄
    █████┐ █████┐ █████┐ ██┐██┐     █████┐ ██████┐     ▐█      ▐▌      █▌
   ██┌───┘██┌──██┐██┌─██┐██│██│    ██┌──██┐└─██┌─┘     ▐█▄    ▄██▄    ▄█▌
   ██│    ██│  ██│█████┌┘██│██│    ██│  ██│  ██│      ▄▄███████▀▀███████▄▄
   ██│    ██│  ██│██┌──┘ ██│██│    ██│  ██│  ██│     ████     ▄  ▄     ████
   └█████┐└█████┌┘██│    ██│██████┐└█████┌┘  ██│     ████     █  █     ████
    └────┘ └────┘ └─┘    └─┘└─────┘ └────┘   └─┘     ▀███▄            ▄███▀
│                              CLI Version 0.0.353      ▀▀████████████▀▀      │
└──                                                                         ──┘
 Version 0.0.353 · Commit f8fd3e3

 Copilot can write, test and debug code right from your terminal. Describe a 
 task to get started or enter ? for help. Copilot uses AI, check for mistakes.

 ● Connected to GitHub MCP Server

 ● Logged in as user: example-username

 ● Using context file: none - use command /comp-context to tell Copilot to create one

You are returning to your project

$ cd my-new-project
$ copilot
┌──                                                                         ──┐
│                                                           ▄██████▄          │
    Welcome to GitHub                                   ▄█▀▀▀▀▀██▀▀▀▀▀█▄
    █████┐ █████┐ █████┐ ██┐██┐     █████┐ ██████┐     ▐█      ▐▌      █▌
   ██┌───┘██┌──██┐██┌─██┐██│██│    ██┌──██┐└─██┌─┘     ▐█▄    ▄██▄    ▄█▌
   ██│    ██│  ██│█████┌┘██│██│    ██│  ██│  ██│      ▄▄███████▀▀███████▄▄
   ██│    ██│  ██│██┌──┘ ██│██│    ██│  ██│  ██│     ████     ▄  ▄     ████
   └█████┐└█████┌┘██│    ██│██████┐└█████┌┘  ██│     ████     █  █     ████
    └────┘ └────┘ └─┘    └─┘└─────┘ └────┘   └─┘     ▀███▄            ▄███▀
│                              CLI Version 0.0.353      ▀▀████████████▀▀      │
└──                                                                         ──┘
 Version 0.0.353 · Commit f8fd3e3

 Copilot can write, test and debug code right from your terminal. Describe a 
 task to get started or enter ? for help. Copilot uses AI, check for mistakes.

 ● Connected to GitHub MCP Server

 ● Logged in as user: example-username

 ● Using context file: CONTEXT.md

DJTheron avatar Nov 04 '25 10:11 DJTheron