- the user will create an empty folder, and put a project description text file into this folder.
- With this project description file's content as a part of the initial prompt to the AI assistant, we'd expect the AI assistant to give us a shell script to setup the project's structure, including create folders and files.
- The user can modify the project description file for more input, and also can modify the files to add in comments to indicate what will need to be implemented, all with the # User Prompt: mark
- With the whole project we will iterate the directories and files, so this prompt will contain the project structure and files content.
- The user input continue to the app to trigger another interaction, then fetch the response from the AI assistant to write into the project.
- Loop step 3, 4 and 5 until the user is satisfied with the final implementation.
This workflow fosters a highly dynamic and responsive coding environment, where the AI acts as a co-developer, providing code, structure, and content based on the evolving instructions from the user. Let's break down each step with some additional considerations to ensure the success of this approach:
-
Project Initialization
User Action: Create an empty project folder and a descriptive text file outlining the project's goals, technology stack, and initial structure requirements. Consideration: The format of this description should be standardized to ensure the AI can parse it effectively. YAML or JSON might be advantageous for structured data, but plain text can work if formatted consistently.
-
Structure Setup via Shell Script
AI Output: Generate a shell script or series of commands to establish the initial project structure, including directories and template files. Consideration: Ensure that the user reviews this script for safety and relevance before execution. The script should be clear about where files are created and what their initial content might be.
-
Iterative Development through Prompts
User Action: Add or modify prompts within the project description file and source code comments to guide the next development steps. Consideration: Clearly marked user prompts (# User Prompt:) in the code or description files help distinguish user instructions from other comments or content, guiding the AI's response accurately.
-
Project-Wide Iteration
Process: Iterate over the project's directories and files, assembling a comprehensive prompt from the project structure and the content of its files, including newly added user prompts. Consideration: This step requires a tool or script capable of reading file structures and content, then formatting this information into a coherent prompt for the AI. Handling large projects could become complex, so consider batching or focusing on specific areas per iteration.
-
Continuous Integration of AI Contributions
User Action: Trigger interactions with the AI assistant, using the assembled prompts to generate code, documentation, and other project components. Consideration: Automated or semi-automated tools that can fetch AI responses and integrate them back into the project will streamline this step. Review and testing of AI-generated content are crucial for maintaining code quality and security.
-
Loop for Refinement
Process: Repeat the cycle of adding prompts, generating AI responses, and integrating these into the project until satisfaction is achieved. Consideration: Establishing checkpoints or versions could be beneficial, allowing users to revert or branch the project based on different sets of AI contributions.
This iterative development process emphasizes collaboration between the user and the AI, enabling a unique, flexible approach to software development. It combines the creative and strategic insights of human developers with the efficiency and evolving capabilities of AI coding assistance.
To implement this workflow, need a combination of scripting for automation, a method to safely execute generated code, and a user-friendly way to edit and update prompts. Additionally, integrating version control early in the process can facilitate tracking changes and managing different development branches.