Using Task Lists and Timestamped Design Files for AI Coding with Cline and Copilot Agent in Existing Product Development


I'm Takaoka @tomohisa, CTO of JTech Japan. Following my previous article on AI pair programming, I'll introduce practical methods for advancing existing project development with AI.
Introduction
This article is an improved version of my previous "Optimizing Context by Abandoning Memory Bank and Using Task Lists in Cline." I'll specifically share how I've been modifying existing programs, introducing task lists and timestamped design files to control AI and prevent excessive wild modifications.
https://zenn.dev/jtechjapan_pub/articles/a1cace00f7f96f
Coexistence of Cline and Copilot
I basically configure the same instructions for both Cline and Copilot. While there are subtle differences in behavior, I aim to achieve similar results.
Cline Configuration
As custom instructions, I ask for emotions to be written at the end of sentences, a practice common in English-speaking regions.
Be humble and do what I ask you. If you have a good idea, ask me if I want to do it.
Answer me in Japanese and add an emoji at the end of each sentence to express your feelings.
Write comments only for class and function XML comments.
Write other comments only when exceptionally important.
Additionally, I include project-specific instructions in the .clinerules
folder.
Copilot Configuration
Similar instructions are added to the copilot-instructions.md
file. Essentially, it's an integrated version of Cline's Custom Instructions + .Clinerules content.
# Basic
Do exactly what I ask. You are assisting, do not break current feature without being asked.
Just suggest if you think about better refactoring.
Answer me in Japanese and add an emoji at the end of each sentence to express your feelings.
# Project Structure
- The project follows a clean architecture pattern with Event Sourcing as the core persistence mechanism.
- Domain models are organized into aggregates, each with its own events, commands, and projections.
- The frontend is built with Blazor, following a component-based architecture.
# Various commands and environment information (omitted)...
Creating Task Lists
I've implemented a system that lets AI plan at the task level before changing code.
Task Instruction File
Create task instruction files in the clinerules_bank/task
folder, in a format like 000_bug_something.md
.
These files include:
File references using relative paths within the workspace
Clear analysis requests and files to examine
Plans manageable with changes to just a few files
Instructions focused on domain code changes
Here's an example:
clinerules_bank/tasks/021_start_group.123243.md
clinerules_bank/tasks/021_start_group.md
Start Display is now working correctly.
However, after creating two groups and clicking Start Display from AdminWeb's
EsCQRSQuestions/EsCQRSQuestions.AdminWeb/Components/Pages/Planning.razor
questions appear in both separate groups displayed in
EsCQRSQuestions/EsCQRSQuestions.Web/Components/Pages/Questionair.razor
The issue could be with the registration in
EsCQRSQuestions/EsCQRSQuestions.Web/Components/Pages/Questionair.razor
or with the notification in
EsCQRSQuestions/EsCQRSQuestions.AdminWeb/Components/Pages/Planning.razor
or with the handling in
EsCQRSQuestions/EsCQRSQuestions.ApiService/IHubNotificationService.cs
EsCQRSQuestions/EsCQRSQuestions.ApiService/HubNotificationService.cs
EsCQRSQuestions/EsCQRSQuestions.ApiService/QuestionHub.cs
Please investigate and consider how to change before writing code.
For this task, however, we're only planning.
Please add your well-thought-out plan as an appendix at the bottom of this file. Conduct the necessary investigations like reading required files, and make the plan as specific as possible.
If anything is unclear, please ask. A good programmer asks questions rather than making assumptions when unsure.
Instead of writing the design in the chat, please write the current design in a new file:
clinerules_bank/tasks/022_filter_code.[hhmmss edit start time, minutes, seconds].md
Also, please write your LLM model name at the beginning of the file.
The section after For this task, however, we're only planning.
is a template, and by instructing to create a new file like
clinerules_bank/tasks/022_filter_code.[hhmmss edit start time, minutes, seconds].md
it enables creating separate files for multiple attempts, which is advantageous.
This approach separates instructions and designs, allowing you to create designs with different models for comparison, or adjust instructions to correct inadequate designs.
In practice, both Copilot Agent and Cline sometimes proceed with design in the chat rather than creating a design file, but I instruct them to write to a file to ensure designs are preserved.
While this method allows deleting past tasks and design files, keeping the most recent ~10 designs and instructions enables reusing them for future instructions, letting you use Copilot and Cline without worrying about context.
Also, having instructions and designs as files allows seamless switching between Copilot and Cline. You can create a design with Copilot and implement it with Cline, freely enabled by using files for instructions.
To start designing, use:
Execute clinerules_bank/tasks/021_start_group.md
Design File
In response to task instructions, AI generates a design file (multiple possible per task). This file details what needs to be done before making changes.
This is how I wish the Plan mode would function. Personally, Cline's Plan mode doesn't meet my expectations, so I always use Act mode. Design content can be adjusted in chat or tested with different models to select the optimal design.
As an example, let's look at an actual task list sample (solving a group filtering feature issue):
https://github.com/tomohisa/EsStudy0314/blob/main/clinerules_bank/tasks/022_filter_code.124817.md
It creates an md file with a timestamp. When generated multiple times, separate files are created, allowing you to choose the best design.
https://github.com/tomohisa/EsStudy0314/blob/b27c9710a4ee8dd9120c5698e18c0cd9a921a7c0/clinerules_bank/tasks
This folder contains many instruction and design files I've actually used, so please feel free to take a look.
Development Process Using Task Lists
The core of this methodology is a cycle of progressive planning and execution:
Creating Task Lists and Design Files
Have AI create plans and select the optimal design from multiple options. If designs are insufficient, add reference code or exemplars.Task Execution and Verification
Have AI code based on the selected design, then verify functionality. Use the following command for execution:
Implement clinerules_bank/tasks/022_filter_code.124817.md
Commit and Next Task Planning
Commit good code and proceed to the next task. Often, subsequent tasks relate to previous ones, so include previous task instruction or design files as references.Session Management
Cline and GitHub Copilot Agent chat sessions often start fresh for context management. However, for short tasks where AI responses consistently include emoticons at the end (indicating sufficient context), I may continue in the same session.Code Verification
While I may not scrutinize all code, I judge quality through the list of changed files, functionality verification, and test results.Pull Request Structure
One pull request often includes multiple tasks, managing related changes together.
Model Selection
Choosing Between Cline and Copilot
Copilot: Preferred when Sonnet3.7 is available in preview
Cline: Anthropic API already configured
The Art of Alternating: Sometimes having Cline redesign when Copilot's design is unsatisfactory. Due to smarter prompting and better command integration settings, Cline can produce better designs even with the same model.
Selecting the Optimal Model
Sonnet3.7: Currently delivers overwhelmingly good results (possibly due to good compatibility with C# code and the task list method)
Gemini 2.5 Pro: Regularly tested but not yet producing satisfactory designs and code
GPT 4.1o: Better results than Gemini 2.5, will continue to evaluate
Creating a Quality Product
Here are the key points for utilizing AI tools:
It's important to determine when humans should intervene when using AI tools. I'll introduce three principles I practice.
First, I employ the "2-turn rule." If AI can't present a satisfactory solution to the same problem twice in a row, I switch to manual coding mode. Trying to force AI to solve a problem can waste time, so an early switch is efficient.
Next is "thorough verification." AI sometimes generates code based on a "vague understanding." While it may appear to work on the surface, it often doesn't consider edge cases or future extensibility. Therefore, it's essential for humans to properly verify the generated code and improve it as necessary.
Finally, the importance of "problem-solving skills." AI might repeatedly suggest the same solution or get stuck in a loop without grasping the essence of a problem. In such cases, the ability to identify and solve bugs yourself is required. Ultimately, AI can only effectively solve problems that you could solve yourself given enough time. This highlights the importance of recognizing that "AI is not magic, but merely a tool."
The Importance of Design
By combining event sourcing and the actor model, I achieve code classification focused on domains and scalability. As mentioned in previous articles, I aim for designs that facilitate future feature additions:
https://zenn.dev/jtechjapan_pub/articles/b2d1c3bf9bebf2
https://zenn.dev/jtechjapan_pub/articles/5ea55a6ba47658
Practical Example
https://github.com/tomohisa/EsStudy0314
This project was originally created for an event sourcing study group in about 3 hours for around $15, but I've been gradually improving it. Total investment so far is about 40 hours and less than $100, but it now implements complex feature additions and support for multiple question groups. This project is being developed as open source, so you can refer to it directly.
Being able to understand and modify AI-generated code myself has enabled collaborative work using AI coding for existing program modifications.
Conclusion
By utilizing task lists and timestamped design files, AI coding becomes more controllable and can be safely incorporated into existing product development. I will continue to explore practical approaches to advance efficient and high-quality development by leveraging the strengths of both AI and humans.
Subscribe to my newsletter
Read articles from Tomohisa Takaoka directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Tomohisa Takaoka
Tomohisa Takaoka
CTO of J-Tech Creations, Inc. Recently working on the development of the event sourcing and CQRS framework Sekiban. Enthusiast of DIY keyboards and trackballs.