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

@@ -22,7 +22,8 @@ import {
truncate,
ensureTagMetadata,
performCompleteTagMigration,
markMigrationForNotice
markMigrationForNotice,
getCurrentTag
} from '../utils.js';
import { generateObjectService } from '../ai-services-unified.js';
import { getDefaultPriority } from '../config-manager.js';
@@ -253,8 +254,9 @@ async function addTask(
report('Successfully migrated to tagged format.', 'success');
}
// Use the provided tag, or the current tag, or default to 'master'
const targetTag = tag || context.tag || 'master';
// Use the provided tag, or the current active tag, or default to 'master'
const targetTag =
tag || context.tag || getCurrentTag(projectRoot) || 'master';
// Ensure the target tag exists
if (!rawData[targetTag]) {