Follow these steps to set up and run the DevFlowCheck project itself:
-
Clone the Repository:
- Open your terminal or command prompt.
- Navigate to the directory where you want to place the project (e.g.,
cd C:/wamp64/www). - Clone the repository from GitHub:
git clone https://github.com/bestyec/DevFlowCheck.git
- This will create a
DevFlowCheckdirectory.
-
Install Dependencies:
- Navigate into the newly created project directory:
cd DevFlowCheck - Run the command to install necessary libraries:
(This installs project-specific libraries, but not the
npm install
task-masterCLI tool itself. The following steps usenpm runcommands which utilize the project's internal scripts.)
- Navigate into the newly created project directory:
-
Configure Environment:
- Copy the example environment file:
# On Windows (Command Prompt/PowerShell) copy .env.example .env # On Linux/macOS/Git Bash # cp .env.example .env
- Crucial: Edit the new
.envfile with a text editor and add your actual API keys, especiallyGEMINI_API_KEY. Other API keys might be needed depending on configured features.
- Copy the example environment file:
-
Define Requirements & Create PRD:
- Discuss: Clearly define the project's goals, features, and scope that DevFlowCheck itself should work on. Think about the initial set of tasks.
- Document: Create a Product Requirements Document (PRD) file (e.g.,
prd.txt) detailing these requirements. Structure it clearly (e.g., using headings for features, bullet points for details) to help the parsing step.
-
Generate Tasks from PRD:
- Use the built-in scripts (via
npm run) to process your PRD and create the task structure:- Parse the PRD to create
tasks.json:(Replacenpm run parse-prd -- --input=path/to/your/prd.txt
path/to/your/prd.txtwith the actual path to your PRD file) - Generate individual task files (
tasks/*.md) fromtasks.json:npm run generate
- Parse the PRD to create
- Use the built-in scripts (via
-
Run the Orchestrator:
- Once the tasks are generated, start the automated workflow:
node orchestrator.js
- The orchestrator will now take over, processing the tasks defined in
tasks.json.
- Once the tasks are generated, start the automated workflow:
If you want to use this repository's structure and tools as a starting point for a completely new project (e.g., named MyNewApp), follow these steps instead of the ones above:
- Clone with New Name: Clone the repository directly into a folder with your new project's name:
git clone https://github.com/bestyec/DevFlowCheck.git MyNewApp cd MyNewApp - Remove Original Git History: Detach it from the
DevFlowCheckhistory:# Use this command for PowerShell: Remove-Item -Recurse -Force .git # Or this for Bash/Linux/Mac: # rm -rf .git
- Initialize New Git Repository: Start fresh tracking for your new project:
git init
- Install Dependencies:
npm install
- Update Project Name: Edit the
package.jsonfile and change the"name"field from"devflowcheck"(or"nestflex") to"mynewapp"(or your actual project name). - Start Your Project: Now you can define requirements (PRD) and generate tasks specifically for
MyNewAppusing thenpm run parse-prdandnpm run generatecommands within theMyNewAppfolder, then runnode orchestrator.jswhen ready.
(Existing README content follows here)
This project combines the task-master CLI tool for AI-assisted task management with a Node.js orchestrator (orchestrator.js) designed to automate the development workflow. The orchestrator fetches tasks, analyzes complexity, expands complex tasks, simulates AI code generation, performs quality assurance (linting, testing), attempts automated test fixing, and commits changes via Git.
- Task Master (
task-masterCLI):- Parses Product Requirements Documents (PRDs) into structured tasks (
tasks.json). - Generates individual task files.
- Manages task status, dependencies, and priorities.
- Analyzes task complexity and recommends expansion.
- Provides commands for listing, showing, expanding, and updating tasks.
- (See original Task Master documentation below for full CLI details).
- Parses Product Requirements Documents (PRDs) into structured tasks (
- Orchestrator (
orchestrator.js):- Runs a continuous loop to process available tasks from
task-master. - Fetches the next available task using
task-master next. - Retrieves task details using
task-master show. - Complexity Analysis & Expansion: Runs
task-master analyze-complexityand automatically callstask-master expandfor tasks exceeding a complexity threshold. - AI Prompt Generation: Creates prompts for AI code generation based on task details (simulation currently).
- Quality Assurance (QA): Runs linters and tests (simulation/basic execution currently).
- Automated Test Fixing: If tests fail, attempts to generate a fix prompt and re-run tests (simulation currently).
- Git Integration: Stages and commits changes upon successful QA using standardized messages (simulation currently).
- Task Completion: Updates task status to 'done' using
task-master set-status.
- Runs a continuous loop to process available tasks from
- Node.js (v18+ recommended for ES Modules support)
- NPM
task-master-aipackage (install globally or locally)# Install globally (recommended for CLI access) npm install -g task-master-ai # OR install locally # npm install task-master-ai
- Git (for version control)
- Initialize Project: If starting fresh or you don't have
tasks.json, runtask-master initortask-master parse-prd <your-prd.txt>. - Environment Variables: Create a
.envfile in the project root for API keys and configuration (see Task Master section below for details likeGEMINI_API_KEY). - Dependencies: Run
npm installif you have apackage.jsonor need local dependencies. Ensure"type": "module"is set in yourpackage.jsonfor ES Module support.
To start the automated workflow, run the orchestrator script:
node orchestrator.js The orchestrator will:
- Fetch the next available task.
- Analyze its complexity and potentially expand it.
- (If not expanded) Simulate AI prompt generation, QA, test fixing, Git commit, and status update.
- Loop to fetch the next task.
Monitor the console output to observe the workflow.
You can interact with the task list directly using the task-master CLI:
# List all tasks and their status
task-master list
# Show details of a specific task
task-master show <task_id>
# Example: task-master show 9
# Show the next task recommended by the tool
task-master next
# Manually set task status
task-master set-status --id <task_id> --status <pending|done|deferred|...>
# Example: task-master set-status --id 9 --status pending
# Generate/regenerate individual task files in tasks/
task-master generate
# Analyze complexity (generates scripts/task-complexity-report.json)
task-master analyze-complexity --research
# Manually expand a task
task-master expand --id <task_id> --research (This section summarizes key details from the original task-master-ai documentation. Refer to the original source for complete information.)
- Node.js 14.0.0 or higher
- Google Generative AI API key (gemini API)
- (Optional) Perplexity API Key for research features
GEMINI_API_KEY: Required Google Generative AI API key.MODEL: Generative model (default:gemini-1.5-flash).MAX_TOKENS: Max output tokens (default:8192).TEMPERATURE: Controls randomness (default:0.5).PERPLEXITY_API_KEY: Optional Perplexity API key.PERPLEXITY_MODEL: Perplexity model (default:llama-3-sonar-large-32k-online).DEBUG: Enable debug logging (default:false).LOG_LEVEL: Console log level (default:info).- ... (Refer to original docs for others like
DEFAULT_PRIORITY,PROJECT_NAME)
id: Unique identifiertitle: Task titledescription: Task summarystatus: Current state (pending,done, etc.)dependencies: Array of prerequisite task IDspriority: Importance (high,medium,low)details: Implementation instructionstestStrategy: Verification approachsubtasks: Array of subtask objects
الخيارات الآن مفتوحة: البدء في التنفيذ الحقيقي: استبدال أجزاء المحاكاة (مثل استدعاءات AI، أوامر Git، أوامر Task Master الفعلية بدلاً من runTaskMasterCommand) باستدعاءات حقيقية. إضافة ميزات جديدة: هل هناك مهام أخرى أو وظائف تود إضافتها إلى الـ Orchestrator؟ تحسينات: تحسين بناء الـ prompts، أو معالجة الأخطاء، أو إضافة المزيد من التسجيلات، أو تحسين واجهة المستخدم إذا كان ذلك مناسبًا. التوقف هنا: يمكن اعتبار هذا الإصدار الحالي بمثابة نموذج أولي مكتمل للمفهوم. ما هي وجهتك التالية المفضلة؟
This project leverages an automated workflow. Follow these steps to get started: يستخدم هذا المشروع سير عمل مؤتمت. اتبع هذه الخطوات للبدء:
-
Install Dependencies / تثبيت الاعتماديات:
- Navigate to the project directory (
nestflex). / انتقل إلى مجلد المشروع (nestflex). - Run the command: / قم بتشغيل الأمر:
npm install
- Navigate to the project directory (
-
Define Requirements / تحديد المتطلبات:
- Discuss and clearly define the project's goals, features, and scope. / ناقش وحدد بوضوح أهداف المشروع وميزاته ونطاقه.
- Create a Product Requirements Document (PRD) file (e.g.,
prd.txt) detailing these requirements. Structure it clearly (e.g., using headings for features). / قم بإنشاء ملف مستند متطلبات المنتج (PRD) (على سبيل المثال،prd.txt) يفصل هذه المتطلبات. قم بتنظيمه بوضوح (على سبيل المثال، باستخدام العناوين للميزات).
-
Generate Tasks / إنشاء المهام:
- Use the Task Master tool (via npm scripts) to process your PRD and create the task structure: / استخدم أداة Task Master (عبر سكربتات npm) لمعالجة PRD الخاص بك وإنشاء هيكل المهام:
- Parse the PRD to create
tasks.json: / قم بتحليل PRD لإنشاءtasks.json:(Replacenpm run parse-prd -- --input=path/to/your/prd.txt
path/to/your/prd.txtwith the actual path to your PRD file / استبدلpath/to/your/prd.txtبالمسار الفعلي لملف PRD الخاص بك) - Generate individual task files (
tasks/*.md) fromtasks.json: / قم بإنشاء ملفات المهام الفردية (tasks/*.md) منtasks.json:npm run generate
- Parse the PRD to create
- Use the Task Master tool (via npm scripts) to process your PRD and create the task structure: / استخدم أداة Task Master (عبر سكربتات npm) لمعالجة PRD الخاص بك وإنشاء هيكل المهام:
-
Run the Orchestrator / تشغيل المنظم:
- Once the tasks are generated, start the automated workflow: / بمجرد إنشاء المهام، ابدأ سير العمل المؤتمت:
node orchestrator.js
- The orchestrator will now take over, processing the tasks defined in
tasks.json. / سيتولى المنظم الآن المهمة، ويعالج المهام المحددة فيtasks.json.
- Once the tasks are generated, start the automated workflow: / بمجرد إنشاء المهام، ابدأ سير العمل المؤتمت:
(Existing README content might follow here / قد يتبع محتوى README الحالي هنا)