mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
4.2 KiB
4.2 KiB
name, description, argument-hint
| name | description | argument-hint |
|---|---|---|
| replan | Replan individual tasks with detailed user input and change tracking | task-id ["text"|file.md] |
Task Replan Command (/task:replan)
Overview
Replans individual tasks with multiple input options, change tracking, and version management.
Core Principles
Task System: @~/.claude/workflows/task-core.md
Key Features
- Single-Task Focus: Operates on individual tasks only
- Multiple Input Sources: Text, files, or issue references
- Version Tracking: Backup previous versions
- Change Documentation: Track all modifications
⚠️ CRITICAL: Validates active session before replanning
Input Sources
Direct Text (Default)
/task:replan IMPL-1 "Add OAuth2 authentication support"
File-based Input
/task:replan IMPL-1 updated-specs.md
Supports: .md, .txt, .json, .yaml
Interactive Mode
/task:replan IMPL-1 --interactive
Guided step-by-step modification process with validation
Replanning Process
- Load & Validate: Read task JSON and validate session
- Parse Input: Process changes from input source
- Backup Version: Create previous version backup
- Update Task: Modify JSON structure and relationships
- Save Changes: Write updated task and increment version
- Update Session: Reflect changes in workflow stats
Version Management
Version Tracking
Tasks maintain version history:
{
"id": "IMPL-1",
"version": "1.2",
"replan_history": [
{
"version": "1.2",
"reason": "Add OAuth2 support",
"input_source": "direct_text",
"backup_location": ".task/versions/IMPL-1-v1.1.json"
}
]
}
Complete schema: See @~/.claude/workflows/task-core.md
File Structure
.task/
├── IMPL-1.json # Current version
├── versions/
│ └── IMPL-1-v1.1.json # Previous backup
└── [new subtasks as needed]
Implementation Updates
Change Detection
Tracks modifications to:
- Files in implementation.files array
- Dependencies and affected modules
- Risk assessments and performance notes
- Logic flows and code locations
Analysis Triggers
May require gemini re-analysis when:
- New files need code extraction
- Function locations change
- Dependencies require re-evaluation
Document Updates
Planning Document
May update IMPL_PLAN.md sections when task structure changes significantly
TODO List Sync
If TODO_LIST.md exists, synchronizes:
- New subtasks (with [ ] checkbox)
- Modified tasks (marked as updated)
- Removed subtasks (deleted from list)
Change Documentation
Change Summary
Generates brief change log with:
- Version increment (1.1 → 1.2)
- Input source and reason
- Key modifications made
- Files updated/created
- Backup location
Session Updates
Updates workflow-session.json with:
- Modified task tracking
- Task count changes (if subtasks added/removed)
- Last modification timestamps
Rollback Support
/task:replan IMPL-1 --rollback v1.1
Rollback to version 1.1:
- Restore task from backup
- Remove new subtasks if any
- Update session stats
Confirm rollback? (y/n): y
✅ Task rolled back to version 1.1
Examples
Text Input
/task:replan IMPL-1 "Add OAuth2 authentication support"
Processing changes...
Proposed updates:
+ Add OAuth2 integration
+ Update authentication flow
Apply changes? (y/n): y
✓ Version 1.2 created
✓ Context updated
✓ Backup saved
File Input
/task:replan IMPL-2 requirements.md
Loading requirements.md...
Applying specification changes...
✓ Task updated with new requirements
✓ Version 1.1 created
Error Handling
# Task not found
❌ Task IMPL-5 not found
→ Check task ID with /context
# Task completed
⚠️ Task IMPL-1 is completed (cannot replan)
→ Create new task for additional work
# File not found
❌ File requirements.md not found
→ Check file path
# No input provided
❌ Please specify changes needed
→ Provide text, file, or issue reference
Related Commands
/context- View updated task structure/task:execute- Execute replanned task/task:create- Create new tasks/workflow:action-plan- For workflow-wide changes