feat(tags): Add --tag flag support to core commands for multi-context task management

- parse-prd now supports creating tasks in specific contexts
- Fixed tag preservation logic to prevent data loss
- analyze-complexity generates tag-specific reports
- Non-existent tags created automatically
- Enables rapid prototyping and parallel development workflows
This commit is contained in:
Eyal Toledano
2025-06-13 02:50:08 -04:00
parent ddaa1dceef
commit 6b929fa9fa
14 changed files with 683 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
{
"currentTag": "master",
"lastSwitched": "2025-06-13T04:31:45.652Z",
"currentTag": "test-prd-tag",
"lastSwitched": "2025-06-13T06:07:05.204Z",
"branchTagMapping": {},
"migrationNoticeShown": true
}

View File

@@ -6736,5 +6736,75 @@
"updated": "2025-06-13T04:12:48.834Z",
"description": "Tasks for master context"
}
},
"test-prd-tag": {
"tasks": [
{
"id": 1,
"title": "Setup Project Repository and Node.js Environment",
"description": "Initialize the Node.js project structure with package.json, dependencies, and basic configuration files",
"details": "1. Initialize npm project with `npm init -y`\n2. Create project directory structure:\n - src/ (main application code)\n - test/ (test files)\n - bin/ (CLI executable)\n3. Install essential dependencies:\n - Development: jest, eslint, prettier\n - Runtime: commander (for CLI), chalk (for colored output)\n4. Configure package.json:\n - Set main entry point\n - Add scripts for test, lint, start\n - Configure bin field for CLI\n5. Create .gitignore, .eslintrc.js, and README.md\n6. Set up basic project structure with index.js as main entry point",
"testStrategy": "Verify project initializes correctly by running `npm install` and checking all configuration files are properly created. Test that basic npm scripts execute without errors.",
"priority": "high",
"dependencies": [],
"status": "pending",
"subtasks": []
},
{
"id": 2,
"title": "Implement Core Functionality and CLI Interface",
"description": "Develop the main application logic and create a simple command-line interface using Node.js",
"details": "1. Create src/index.js with main application logic\n2. Implement CLI using Commander.js:\n ```javascript\n const { Command } = require('commander');\n const program = new Command();\n \n program\n .name('test-app')\n .description('Simple test application')\n .version('1.0.0');\n \n program\n .command('run')\n .description('Execute core functionality')\n .action(() => {\n // Core functionality implementation\n });\n ```\n3. Create bin/cli.js as executable entry point\n4. Implement core business logic functions\n5. Add error handling and user-friendly output\n6. Make CLI executable with proper shebang: `#!/usr/bin/env node`",
"testStrategy": "Test CLI commands manually and verify all options work correctly. Test core functionality with various inputs to ensure proper behavior and error handling.",
"priority": "high",
"dependencies": [
1
],
"status": "pending",
"subtasks": []
},
{
"id": 3,
"title": "Implement Testing Suite and Validation",
"description": "Create comprehensive test suite using Jest to validate core functionality and CLI interface",
"details": "1. Configure Jest in package.json:\n ```json\n {\n \"scripts\": {\n \"test\": \"jest\",\n \"test:watch\": \"jest --watch\"\n },\n \"jest\": {\n \"testEnvironment\": \"node\",\n \"collectCoverage\": true\n }\n }\n ```\n2. Create test/index.test.js for core functionality tests:\n - Unit tests for main functions\n - Integration tests for complete workflows\n - Edge case and error condition testing\n3. Create test/cli.test.js for CLI interface testing:\n - Test command parsing and execution\n - Test help and version commands\n - Test error scenarios and user input validation\n4. Add test coverage reporting\n5. Create test fixtures and mock data as needed\n6. Ensure all tests pass and coverage meets minimum threshold",
"testStrategy": "Run full test suite with `npm test` and verify 100% test execution. Check test coverage reports and ensure critical paths are covered. Validate that all CLI commands work as expected through automated testing.",
"priority": "medium",
"dependencies": [
2
],
"status": "pending",
"subtasks": []
},
{
"id": 4,
"title": "Setup Node.js Project with CLI Interface",
"description": "Initialize Node.js project structure with basic setup and CLI interface implementation",
"details": "1. Initialize npm project with `npm init -y`\n2. Create package.json with proper metadata and scripts\n3. Set up project directory structure:\n - src/ (main source code)\n - bin/ (CLI executable)\n - test/ (test files)\n4. Install necessary dependencies:\n - commander.js or yargs for CLI parsing\n - chalk for colored output (optional)\n5. Create main CLI entry point in bin/cli.js:\n ```javascript\n #!/usr/bin/env node\n const { program } = require('commander');\n \n program\n .name('test-cli')\n .description('Simple CLI for test project')\n .version('1.0.0');\n \n program\n .command('run')\n .description('Run core functionality')\n .action(() => {\n console.log('Running core functionality...');\n });\n \n program.parse();\n ```\n6. Update package.json to include bin field pointing to CLI\n7. Make CLI executable with proper shebang\n8. Create basic src/index.js for core module exports",
"testStrategy": "Verify project initialization by checking package.json exists, dependencies are installed correctly, CLI command responds to --help and --version flags, and basic project structure is in place",
"priority": "high",
"dependencies": [],
"status": "pending",
"subtasks": []
},
{
"id": 5,
"title": "Implement Core Functionality with Testing",
"description": "Develop core application features and implement comprehensive test suite",
"details": "1. Implement Feature A (Basic setup) in src/setup.js:\n ```javascript\n class Setup {\n constructor() {\n this.initialized = false;\n }\n \n initialize() {\n this.initialized = true;\n return 'Setup completed';\n }\n }\n module.exports = Setup;\n ```\n2. Implement Feature B (Core functionality) in src/core.js:\n ```javascript\n class Core {\n process(data) {\n return `Processed: ${data}`;\n }\n \n execute() {\n return 'Core functionality executed';\n }\n }\n module.exports = Core;\n ```\n3. Set up testing framework (Jest or Mocha):\n - Install test dependencies: `npm install --save-dev jest`\n - Configure test script in package.json\n4. Create test files in test/ directory:\n - test/setup.test.js\n - test/core.test.js\n - test/cli.test.js\n5. Implement Feature C (Testing) with comprehensive test cases:\n ```javascript\n const Setup = require('../src/setup');\n \n describe('Setup', () => {\n test('should initialize correctly', () => {\n const setup = new Setup();\n expect(setup.initialize()).toBe('Setup completed');\n expect(setup.initialized).toBe(true);\n });\n });\n ```\n6. Update CLI to integrate with core functionality\n7. Add test coverage reporting",
"testStrategy": "Run full test suite with `npm test`, verify all features work correctly through unit tests, integration tests for CLI commands, and ensure test coverage meets minimum threshold (>80%). Test CLI functionality manually and programmatically.",
"priority": "medium",
"dependencies": [
4
],
"status": "pending",
"subtasks": []
}
],
"metadata": {
"created": "2025-06-13T06:22:05.805Z",
"updated": "2025-06-13T06:24:34.352Z",
"description": "Tasks for test-prd-tag context"
}
}
}