A Structured AI-Assisted Workflow for ~One Shot Development in Cursor

A Structured AI-Assisted Workflow for ~One Shot Development in Cursor

Overview

This is a systematic approach leveraging ChatGPT Deep Research tasks and Cursor IDE with agentic AI models (e.g., Sonnet 3.7 Thinking MAX) in the attempt to develop a codebase with one shot without writing any code. It was my first attempt at structured "vibe coding", and since then I have had better success at creating a prototype, but the real success comes in the strengthening of my workflows. I want to encourage folks to try and create workflows with AI as part of their toolchains and pipelines and not as a magic wand. I'm getting more value in workflow understanding than I am with a prototype being created. In this case, I still consider this workflow as manual and not automated.

Measuring "Success": In this exercise I attempt to create game based on the old BBS DOOR game, Trade Wars. General success would not, and should not, be defined as it writing the code to completion without error. Rather, could it create a prototype that could be iterated on?

Results: Partial success, partial failure. Close enough to post about, but not enough to brag. There are details on that at the bottom of this article. When observing this, there's an undeniable algorithmic market trading psychology where the reward system in my brain attempts to take over. That this is going to work. Immediately a false sense of security arose because I could start the game. It built the code without a hitch so this would be interesting.

The ASCII was misaligned. Some of the commands would freeze and crash the browser. I wanted to debug and customize. I had a base to work with that was created where I wrote 0 code. Zero.

So now the real fun starts. I started to debug but had an itch. I knew better. I didn't want to use a branching strategy for this exercise so this Jenga pile was now at risk. Regardless of the risk, the reward system reminded me how cool it would be to proceed with features.

Against any semblance of best practice, I tried to replace the ASCII with old school ACiD Productions style ANSI art from the 90's. I decide to implement modularization with visual assets by creating a single definition JSON that defined ANSI standards, then to have each visual asset represented by it's own JSON containing the structures. This lead me to believe this probably needs an engine in and of itself, or maybe Pablo Draw just needs an AI agent.

I'm working to refine this workflow with the addition of MCP servers and some other things, but the expectation in the outcome won't change. It needs to be a minimalist prototype that lacks in business rules and without production ready code, yet good enough for me to iterate on.

It's not a good idea for me to share the code base because twice I had overflows in my browser with a crash, it doesn't completely work, and the visuals are off. I hate that because it becomes a "trust me" thing, but it's barely working and I don't trust it. I'm posting this because after refining and performing this workflow a few times now, I can get a decent base to work with. I will include screenshots and if anyone wants to dig in just DM me.

Everything here is minimalist including the prompting giving the AI more autonomy to create.

Core Technologies

  • TypeScript

  • HTML5

  • CSS3

Frontend Framework

  • Pure JavaScript/TypeScript (no framework)

  • xterm.js (terminal emulator)

  • xterm-addon-fit (terminal sizing addon)

Build Tools & Development

  • Webpack (bundling)

  • Webpack Dev Server (development environment)

  • npm (package management)

Testing

  • Jest

  • ts-jest

Storage

  • localStorage (browser-based game save storage)

Cursor Version: 0.47.8
VSCode Version: 1.96.2
Commit: 82ef0f61c01d079d1b7e5ab04d88499d5af500e0
Date: 2025-03-18T05:39:44.386Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Linux x64 6.11.0-19-generic
        

Step-by-Step Workflow

1. Resource Gathering and Preparation

  1. Identify Essential Resources: I collected relevant documentation, guides, historical references, and existing open-source code. I love the feature of attaching zipped codebase to a Deep Research task with GPT 4.5, which I did with an open source example of the game.
  2. Don't Define the Tech: The selection of what to use for development is being left to AI, I didn't define it.

Key Insight: Thorough initial research and clear documentation improve subsequent AI-driven workflows significantly. This can't work work without it.


2. ChatGPT Deep Research Task

  1. Execute Deep Research: I attached the resources with prompt to the ChatGPT Deep Research task and a targeted prompt to produce detailed, step-by-step instructions.

"Our goal is to design a Trade Wars -like game using Cursor IDE and agentic AI models. Thoroughly review the provided resources. Generate a detailed and foolproof step-by-step development strategy. Review for accuracy before completion."        

2. Integration: Once that was complete, I incorporated the Deep Research task’s output into a new and empty Cursor IDE project with the contents placed in GAMEPLAN.md.

Key Insight: Well-structured initial prompts for Deep Research tasks yield detailed, actionable plans. If the prompt is too large, it will not explore enough. If the prompt is too small, it will create on it's own. Balance and informed prompt engineering are key.


3. Initiating Development in Cursor IDE

Agent Selection and Initialization

  1. Start a fresh Cursor IDE session.
  2. Select the Sonnet 3.7 Thinking MAX agent for optimal structured and logical reasoning.

Agent Priming Prompt

"GAMEPLAN.md is currently the only file in this project. Evaluate thoroughly. Create a new document named PROGRESS.md. Update this document as you proceed to develop the game according to GAMEPLAN.md."        

Key Lesson: Clear instructions and context setup enable the agent to efficiently manage progress tracking. It's the PROGRESS md file that drives the development without me needing to prompt further.


4. Iterative AI-Driven Development

  1. Iterative Sessions: I let the agent autonomously advance development based on its documented progress in PROGRESS. md. After the initial prompt into the chat, it completed once the task at hand that it's working on came to a conclusion.
  2. Continuous Iterations: Time to open a new chat session. The agent has completed it's development cycle for that chat session, I opened a new chat so that the context window is "refreshed". I paste the prompt for it to proceed.
  3. Use an improved version of the following prompt to guide continuity

"Read GAMEPLAN.md and PROGRESS.md, and evaluate the current state of the codebase. Once you've completed this review, proceed with executing the plan in PROGRESS.md."        

4. Repeated Cycles: Again, when the agent has completed it's development cycle for that chat session, I opened a new chat so that the context window is "refreshed". I used the prompt from step 4.3 to restart the progress where it left off.

Key Insight: Isolating each iteration maintains clarity, minimizes confusion, and ensures focused progression.


5. Completion and Finalization

  1. Final Validation: Once all planned tasks are completed, manually validate the final codebase and documentation. Refine and polish.

Key Insight: Final manual oversight complements the structured AI workflow, ensuring robust quality assurance.


Screenshots


Game Entry


SRC Root


Intro


Engage


Menu


Conclusion

Success Criteria (Met):

  • Prototype Creation: A functional, albeit imperfect, initial prototype was created using purely AI-driven code generation, fulfilling the primary goal of producing something tangible that can be iteratively refined.
  • Proof-of-Concept Achievement: Demonstrated that an entirely agentic workflow leveraging Cursor IDE and AI models (e.g., Sonnet 3.7 Thinking MAX) could produce a runnable codebase without manual coding intervention.
  • Base for Iteration: Provided a clear foundation allowing targeted debugging, feature expansion, and customization.


Challenges Encountered:

  • Visual Alignment Issues: ASCII art and ANSI visuals were misaligned and off-style, indicating limitations in the agent's comprehension or execution of precise visual rendering instructions.
  • Stability Problems: Commands occasionally froze and crashed the browser. This underscores the inherent instability in purely AI-generated code, which typically lacks defensive programming considerations.
  • Complexity Escalation (Scope Creep): Attempting to replace ASCII with ACiD Productions-style ANSI art and creating modular visual asset definitions introduced additional complexity beyond the initial agentic prototype's manageable scope, signaling the need for specialized tooling or dedicated visual asset management solutions.


Insight and Recommendations:

  • Embrace Iterative Success (Realistic Expectations): Redefine success strictly in iterative terms. AI workflows reliably produce valuable "starting points," not end solutions. Initial iterations are intentionally minimal and unstable, designed explicitly for human-driven iterative refinement.
  • Structured Post-AI Development: Adopt a structured manual refinement cycle immediately after AI-generated code to quickly stabilize and enhance initial implementations.
  • Asset and Visual Management: Consider that specialized visual rendering, such as authentic ANSI art management, may necessitate separate tooling or dedicated engines, as general-purpose AI models currently lack deep domain-specific precision.
  • Risk Management (Prototype Jenga): Avoid building complex features directly upon unstable AI-generated bases. Instead, stabilize the prototype first, employing basic version control practices even in iterative prototyping to minimize risk.


Future Workflow Enhancements (MCP Integration):

  • Minimal Control Protocol (MCP) servers: Integrate MCP servers to enhance modularity and management of prototypes, potentially stabilizing iterative development by isolating unstable components.
  • AI-assisted ANSI Asset Management: Explore dedicated ANSI art management tools (e.g., Pablo Draw)

PROGRESS.md

Created by the agent to be used by the agent for dev; based on GAMEPLAN. md. One thing to note is that the initial version of this was skeletal, and outside of project phases, it would alter it's next steps and grow this doc dynamically based on that skeletal foundation. This was really interesting to watch in real time.

## Project Overview
This is a web-based remake of the classic BBS door game Trade Wars 2002, focusing on creating an authentic retro experience with modern web technologies. The game aims to recreate the core mechanics of trading, combat, and exploration in a procedurally generated space universe.

## Current Development Phase
**Phase 2: Universe Generation Module - COMPLETED**
**Phase 3: Basic Navigation & Sector Commands - COMPLETED**
**Phase 4: Trading Mechanics - COMPLETED**
**Phase 5: Combat System Implementation - COMPLETED**
**Phase 6: AI-Driven NPCs and World Events - COMPLETED**
**Phase 7: Planets & Colonization - COMPLETED**
**Phase 8: Polishing the Interface and User Experience - COMPLETED**
**Phase 9: Testing & Balancing - COMPLETED**
**Phase 10: Deployment - IN PROGRESS**

## Completed Tasks
- [x] Read and analyzed the comprehensive GAMEPLAN.md
- [x] Created initial project documentation and progress tracker
- [x] Set up project structure and environment
- [x] Created package.json, tsconfig.json, and webpack configuration
- [x] Set up basic HTML/CSS for the terminal interface
- [x] Implemented OutputManager for terminal display and ANSI colors
- [x] Implemented InputManager for handling user input
- [x] Created Game class for orchestrating game operations
- [x] Created CommandParser for processing user commands
- [x] Implemented GameState for tracking game progress
- [x] Created model classes (Player, Ship, Port, Sector, Universe)
- [x] Added ASCII art assets
- [x] Implemented save/load functionality using localStorage
- [x] Added LICENSE and README files
- [x] Verified project builds and runs correctly
- [x] Set up git repository and made initial commit
- [x] Completed and tested the universe generation algorithm
- [x] Implemented and tested sector navigation and movement
- [x] Implemented the complete trading interface with buy/sell operations
- [x] Added ship types enumeration and multiple ship classes
- [x] Implemented ship upgrades at special ports (StarDock)
- [x] Designed and implemented NPC ship system with different behavior types
- [x] Created combat system with attack, retreat, and negotiation options
- [x] Added alignment system affecting interactions with different NPC types
- [x] Implemented economic simulation with NPC traders affecting port prices
- [x] Enhanced scan command to display detailed information about NPCs
- [x] Added attack command for player-initiated combat
- [x] Implemented advanced AI for NPCs with state-based behavior
- [x] Created pathfinding algorithm for intelligent NPC movement
- [x] Developed dynamic world events like Pirate Raids and Trade Wars
- [x] Added random economic events affecting port prices and inventory
- [x] Implemented News command for displaying galactic events
- [x] Enhanced economic simulation with more complex NPC activities
- [x] Created Planet model with five different planet types
- [x] Implemented Genesis Torpedo system for creating new planets
- [x] Added planets to sectors with support for planet ownership
- [x] Created base planet resource production system
- [x] Updated StarDock to sell Genesis Torpedoes
- [x] Integrated planets with save/load functionality
- [x] Added planet management interface
- [x] Enhanced scan command to display planet information
- [x] Implemented full planet building system with upgradeable structures
- [x] Developed resource transfer functionality between ships and planets
- [x] Implemented planet colonization mechanics with resource requirements
- [x] Added fighter transfer between ships and planets for defense
- [x] Created planetary defense system against NPCs
- [x] Added special planetary events (disasters, discoveries, etc.)
- [x] Implemented robust planet attack mechanics with combat calculations
- [x] Added detailed planet attack notifications via world events
- [x] Created temporary production bonuses for technological breakthroughs
- [x] Added new ASCII art for different ships and planets
- [x] Implemented improved welcome screen with colorful ANSI graphics
- [x] Enhanced combat interface with border-styled UI and visual feedback
- [x] Created detailed combat status display with tabular formatting
- [x] Overhauled UI with boxed borders and consistent color schemes
- [x] Enhanced help system with categorized commands and better formatting
- [x] Improved command parser with more descriptive error messages
- [x] Enhanced sector display with better visual organization
- [x] Enhanced News command interface with better formatting
- [x] Implemented additional visual effects for special events
- [x] Refined player status display for easier resource management
- [x] Added more animations and visual transitions between game states
- [x] Added typewriter text effect for storytelling
- [x] Implemented fade-in and wipe transitions between game screens
- [x] Created animated progress bars and status indicators
- [x] Added flashing alert effects for important notifications
- [x] Enhanced combat with dramatic pauses and animations
- [x] Implemented surrender and negotiation combat options
- [x] Conducted early game playtesting for progression balance
- [x] Tested late game mechanics with simulated high-resource scenarios
- [x] Adjusted economy parameters for optimal difficulty curve
- [x] Balanced combat mechanics for appropriate challenge levels
- [x] Fixed resource overflow issue when transferring between ships and planets
- [x] Enhanced price adjustment algorithm to prevent economic exploits
- [x] Improved planetary defense system with better balance against NPC attacks
- [x] Implemented progressive price impact for large transactions
- [x] Added readiness bonus for planets that haven't been attacked recently
- [x] Modified NPC attack thresholds for more strategic planet targeting
- [x] Identified and fixed gameplay bugs and exploits

## Next Steps
- [ ] Update README to include comprehensive game instruction
- [ ] Deploy the game to a web hosting service
- [ ] Set up continuous integration for future updates
- [ ] Clean up code and add comments for maintainability
- [ ] Create tutorial system for new players

## Future Milestones
1. ? Phase 1: Project Setup & Basic I/O
2. ? Phase 2: Universe Generation Module
3. ? Phase 3: Basic Navigation & Sector Commands
4. ? Phase 4: Trading Mechanics
5. ? Phase 5: Combat System Implementation
6. ? Phase 6: AI-Driven NPCs and World Events
7. ? Phase 7: Planets & Colonization
8. ? Phase 8: Polishing the Interface and User Experience
9. ? Phase 9: Testing & Balancing
10. □ Phase 10: Deployment

## Notes on Balance Adjustments

The following balance improvements have been implemented:

1. **Early Game Progression:**
   - Increased starting credits from 1000 to 1500 for smoother early gameplay
   - Reduced initial pirate count from 5 to 3
   - Implemented dynamic pirate spawn rates that increase with game progression
   - Delayed Ferrengi spawns from day 10 to day 15 to give players more preparation time

2. **Economy Stability:**
   - Implemented progressive price adjustment based on transaction size
   - Added inventory-based price adjustments for more realistic market behavior
   - Set proper price boundaries based on base commodity prices
   - Implemented limits to prevent extreme price fluctuations
   - Enhanced validation to prevent economic exploits

3. **Planet Production:**
   - Increased resource production rates across all planet types
   - Boosted equipment production by 15-50% across different planet types
   - Made all planet types more viable for colonization
   - Increased building defense values to make upgrades more meaningful
   - Improved population contribution to defense
   - Added readiness bonus for planets that haven't been attacked recently

4. **Combat System:**
   - Implemented ship type-specific combat modifiers to make ship choice more meaningful
   - Created distinct combat advantages for specialized ships
   - Enhanced the combat system with more predictable outcomes based on ship types
   - Modified NPC attack thresholds for better-balanced planetary combat

These adjustments aim to create a more balanced and engaging player experience from early to late game, with smoother progression and more strategic depth.

## Notes and Decisions
- Using TypeScript and xterm.js for development as specified in the GAMEPLAN
- Focusing on client-side only development for simplicity
- Implementing the game as a single-page application
- Using Map objects for efficient storage and retrieval of sectors and inventories
- Following a modular approach with clear separation of concerns between classes
- Using localStorage for game saves to avoid the need for a backend server
- Implemented a complete trading system with buy/sell functionality at ports
- Added 8 different ship types with unique specifications and upgrade options
- NPC ships have four behavior types: Traders, Pirates, Police, and Ferrengi
- Combat system includes tactical options and realistic outcomes based on ship stats
- Economic simulation affects port prices based on inventory levels and NPC activity
- NPC AI uses state-based behavior and pathfinding for more realistic movement
- World events create dynamic gameplay with variable economic conditions
- Planet system includes five types with different resource production characteristics
- Genesis Torpedoes allow players to create new planets for colonization
- Planet management system includes building construction and resource transfers
- Colonization requires minimal resources to establish initial outposts
- Planetary defense system protects colonies from NPC attacks
- Special planetary events create dynamic gameplay for colony management
- Planetary disasters can cause population and resource losses
- Resource discoveries provide random bonuses to colony resources
- Technological breakthroughs can upgrade buildings or boost production
- Population booms increase colonist numbers for faster development
- UI design uses consistent box-style borders with appropriate color schemes
- Command feedback uses color coding for different message types (errors, success, info)
- Combat displays use tabular formatting for clear status representation
- Visual animations and transitions enhance the retro gaming experience
- Text effects add dramatic storytelling elements to game interactions         




Karthik K.K

Test Automation Consultant ?? Avid Tech YouTuber ?? Udemy Trainer ??

3 天前

yes Jacob A., Cursor IDE with AI is so much powerful. Combined with MCP its doing things even more.

要查看或添加评论,请登录

Jacob A.的更多文章