This folder contains a **meta-development script** (`dev.js`) and related utilities that manage tasks for an AI-driven or traditional software development workflow. The script revolves around a `tasks.json` file, which holds an up-to-date list of development tasks.
## Overview
In an AI-driven development process—particularly with tools like [Cursor](https://www.cursor.so/)—it's beneficial to have a **single source of truth** for tasks. This script allows you to:
1.**Parse** a PRD or requirements document (`.txt`) to initialize a set of tasks (`tasks.json`).
2.**List** all existing tasks (IDs, statuses, titles).
3.**Update** tasks to accommodate new prompts or architecture changes (useful if you discover "implementation drift").
4.**Generate** individual task files (e.g., `task_001.txt`) for easy reference or to feed into an AI coding workflow.
5.**Set task status**—mark tasks as `done`, `pending`, or `deferred` based on progress.
6.**Expand** tasks with subtasks—break down complex tasks into smaller, more manageable subtasks.
- The `--research` flag uses Perplexity AI to generate more informed and contextually relevant subtasks
- If Perplexity API is unavailable, the script will fall back to using Anthropic's Claude
## AI Integration
The script integrates with two AI services:
1.**Anthropic Claude**: Used for parsing PRDs, generating tasks, and creating subtasks.
2.**Perplexity AI**: Used for research-backed subtask generation when the `--research` flag is specified.
The Perplexity integration uses the OpenAI client to connect to Perplexity's API, which provides enhanced research capabilities for generating more informed subtasks. If the Perplexity API is unavailable or encounters an error, the script will automatically fall back to using Anthropic's Claude.
To use the Perplexity integration:
1. Obtain a Perplexity API key
2. Add `PERPLEXITY_API_KEY` to your `.env` file
3. Optionally specify `PERPLEXITY_MODEL` in your `.env` file (default: "sonar-medium-online")
4. Use the `--research` flag with the `expand` command