mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
fix: Remove unnecessary metadata and timestamps from task and workflow documentation
This commit is contained in:
@@ -103,10 +103,6 @@ Context inherited from workflow
|
||||
"last_attempt": null
|
||||
},
|
||||
|
||||
"meta": {
|
||||
"created": "2025-09-05T10:30:00Z",
|
||||
"updated": "2025-09-05T10:30:00Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -135,13 +135,11 @@ Each replan creates a new version with complete history:
|
||||
"replan_history": [
|
||||
{
|
||||
"version": "1.1",
|
||||
"date": "2025-09-08T10:00:00Z",
|
||||
"reason": "Original plan",
|
||||
"input_source": "initial_creation"
|
||||
},
|
||||
{
|
||||
"version": "1.2",
|
||||
"date": "2025-09-08T14:00:00Z",
|
||||
"reason": "Add OAuth2 authentication support",
|
||||
"input_source": "direct_text",
|
||||
"changes": [
|
||||
@@ -196,7 +194,7 @@ When task is replanned, the corresponding section in IMPL_PLAN.md is updated:
|
||||
- Token management (added)
|
||||
- Password reset
|
||||
|
||||
*Last updated: 2025-09-08 14:00 via task:replan*
|
||||
*Last updated via task:replan*
|
||||
```
|
||||
|
||||
### Plan Update Process
|
||||
|
||||
@@ -85,7 +85,7 @@ Choice: _
|
||||
|
||||
### Status Update
|
||||
- Changes status from "open" to "closed"
|
||||
- Records closure timestamp
|
||||
- Records closure details
|
||||
- Saves closure reason and category
|
||||
|
||||
### Integration Cleanup
|
||||
|
||||
@@ -80,7 +80,7 @@ Choice: _
|
||||
- Validates priority and type values
|
||||
|
||||
### Change Tracking
|
||||
- Records update timestamp
|
||||
- Records update details
|
||||
- Tracks who made changes
|
||||
- Maintains change history
|
||||
|
||||
@@ -95,7 +95,6 @@ Maintains audit trail:
|
||||
{
|
||||
"changes": [
|
||||
{
|
||||
"timestamp": "2025-09-08T10:30:00Z",
|
||||
"field": "priority",
|
||||
"old_value": "high",
|
||||
"new_value": "critical",
|
||||
|
||||
@@ -1,273 +0,0 @@
|
||||
#!/bin/bash
|
||||
# medium-project-update.sh
|
||||
# Layered parallel execution for medium projects (50-200 files)
|
||||
# Emphasizes gemini CLI usage with direct file modification
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
echo "🚀 === Medium Project Layered Analysis ==="
|
||||
echo "Project: $(pwd)"
|
||||
echo "Timestamp: $(date)"
|
||||
|
||||
# Function to check if directory exists and has files
|
||||
check_directory() {
|
||||
local dir=$1
|
||||
local pattern=$2
|
||||
if [ -d "$dir" ] && find "$dir" -type f $pattern -print -quit | grep -q .; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to run gemini with error handling
|
||||
run_gemini() {
|
||||
local cmd="$1"
|
||||
local desc="$2"
|
||||
echo " 📝 $desc"
|
||||
if ! eval "$cmd"; then
|
||||
echo " ❌ Failed: $desc"
|
||||
return 1
|
||||
else
|
||||
echo " ✅ Completed: $desc"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "🏗️ === Layer 1: Foundation modules (parallel) ==="
|
||||
echo "Analyzing base dependencies: types, utils, core..."
|
||||
(
|
||||
# Only run gemini commands for directories that exist
|
||||
if check_directory "src/types" "-name '*.ts' -o -name '*.js'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/types/**/*}
|
||||
Analyze type definitions and interfaces. Update src/types/CLAUDE.md with:
|
||||
- Type architecture patterns
|
||||
- Interface design principles
|
||||
- Type safety guidelines
|
||||
- Usage examples'" "Type definitions analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/utils" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/utils/**/*}
|
||||
Analyze utility functions and helpers. Update src/utils/CLAUDE.md with:
|
||||
- Utility function patterns
|
||||
- Helper library organization
|
||||
- Common functionality guidelines
|
||||
- Reusability principles'" "Utility functions analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/core" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/core/**/*}
|
||||
Analyze core modules and system architecture. Update src/core/CLAUDE.md with:
|
||||
- Core system architecture
|
||||
- Module initialization patterns
|
||||
- System-wide configuration
|
||||
- Base class implementations'" "Core modules analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/lib" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/lib/**/*}
|
||||
Analyze library modules and shared functionality. Update src/lib/CLAUDE.md with:
|
||||
- Shared library patterns
|
||||
- Cross-module utilities
|
||||
- External integrations
|
||||
- Library architecture'" "Library modules analysis" &
|
||||
fi
|
||||
|
||||
wait
|
||||
)
|
||||
|
||||
echo ""
|
||||
echo "🏭 === Layer 2: Business logic (parallel, depends on Layer 1) ==="
|
||||
echo "Analyzing business modules with foundation context..."
|
||||
(
|
||||
if check_directory "src/api" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/api/**/*} @{src/core/CLAUDE.md,src/types/CLAUDE.md}
|
||||
Analyze API endpoints and routes with core/types context. Update src/api/CLAUDE.md with:
|
||||
- API architecture patterns
|
||||
- Endpoint design principles
|
||||
- Request/response handling
|
||||
- Authentication integration
|
||||
- Error handling patterns'" "API endpoints analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/services" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/services/**/*} @{src/utils/CLAUDE.md,src/types/CLAUDE.md}
|
||||
Analyze business services with utils/types context. Update src/services/CLAUDE.md with:
|
||||
- Service layer architecture
|
||||
- Business logic patterns
|
||||
- Data processing workflows
|
||||
- Service integration patterns
|
||||
- Dependency injection'" "Business services analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/models" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/models/**/*} @{src/types/CLAUDE.md}
|
||||
Analyze data models with types context. Update src/models/CLAUDE.md with:
|
||||
- Data model architecture
|
||||
- Entity relationship patterns
|
||||
- Validation strategies
|
||||
- Model lifecycle management
|
||||
- Database integration'" "Data models analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/database" "-name '*.ts' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/database/**/*} @{src/models/CLAUDE.md,src/core/CLAUDE.md}
|
||||
Analyze database layer with models/core context. Update src/database/CLAUDE.md with:
|
||||
- Database architecture
|
||||
- Query optimization patterns
|
||||
- Migration strategies
|
||||
- Connection management
|
||||
- Data access patterns'" "Database layer analysis" &
|
||||
fi
|
||||
|
||||
wait
|
||||
)
|
||||
|
||||
echo ""
|
||||
echo "🎨 === Layer 3: Application layer (depends on Layer 2) ==="
|
||||
echo "Analyzing UI and application modules with business context..."
|
||||
(
|
||||
if check_directory "src/components" "-name '*.tsx' -o -name '*.jsx' -o -name '*.vue'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/components/**/*} @{src/api/CLAUDE.md,src/services/CLAUDE.md}
|
||||
Analyze UI components with API/services context. Update src/components/CLAUDE.md with:
|
||||
- Component architecture patterns
|
||||
- State management strategies
|
||||
- Props and event handling
|
||||
- Component lifecycle patterns
|
||||
- Styling conventions'" "UI components analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/pages" "-name '*.tsx' -o -name '*.jsx' -o -name '*.vue'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/pages/**/*} @{src/services/CLAUDE.md,src/components/CLAUDE.md}
|
||||
Analyze page components with services/components context. Update src/pages/CLAUDE.md with:
|
||||
- Page architecture patterns
|
||||
- Route management
|
||||
- Data fetching strategies
|
||||
- Layout compositions
|
||||
- SEO considerations'" "Page components analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/hooks" "-name '*.ts' -o -name '*.js'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/hooks/**/*} @{src/services/CLAUDE.md}
|
||||
Analyze custom hooks with services context. Update src/hooks/CLAUDE.md with:
|
||||
- Custom hook patterns
|
||||
- State logic reusability
|
||||
- Effect management
|
||||
- Hook composition strategies
|
||||
- Performance considerations'" "Custom hooks analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "src/styles" "-name '*.css' -o -name '*.scss' -o -name '*.less'"; then
|
||||
run_gemini "gemini -yolo -p '@{src/styles/**/*} @{src/components/CLAUDE.md}
|
||||
Analyze styling with components context. Update src/styles/CLAUDE.md with:
|
||||
- Styling architecture
|
||||
- CSS methodology
|
||||
- Theme management
|
||||
- Responsive design patterns
|
||||
- Design system integration'" "Styling analysis" &
|
||||
fi
|
||||
|
||||
wait
|
||||
)
|
||||
|
||||
echo ""
|
||||
echo "📋 === Layer 4: Supporting modules (parallel) ==="
|
||||
echo "Analyzing configuration, tests, and documentation..."
|
||||
(
|
||||
if check_directory "tests" "-name '*.test.*' -o -name '*.spec.*'"; then
|
||||
run_gemini "gemini -yolo -p '@{tests/**/*,**/*.test.*,**/*.spec.*}
|
||||
Analyze testing strategy and patterns. Update tests/CLAUDE.md with:
|
||||
- Testing architecture
|
||||
- Unit test patterns
|
||||
- Integration test strategies
|
||||
- Mocking and fixtures
|
||||
- Test data management
|
||||
- Coverage requirements'" "Testing strategy analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "config" "-name '*.json' -o -name '*.js' -o -name '*.yaml'"; then
|
||||
run_gemini "gemini -yolo -p '@{config/**/*,*.config.*,.env*}
|
||||
Analyze configuration management. Update config/CLAUDE.md with:
|
||||
- Configuration architecture
|
||||
- Environment management
|
||||
- Secret handling patterns
|
||||
- Build configuration
|
||||
- Deployment settings'" "Configuration analysis" &
|
||||
fi
|
||||
|
||||
if check_directory "scripts" "-name '*.sh' -o -name '*.js' -o -name '*.py'"; then
|
||||
run_gemini "gemini -yolo -p '@{scripts/**/*}
|
||||
Analyze build and deployment scripts. Update scripts/CLAUDE.md with:
|
||||
- Build process documentation
|
||||
- Deployment workflows
|
||||
- Development scripts
|
||||
- Automation patterns
|
||||
- CI/CD integration'" "Scripts analysis" &
|
||||
fi
|
||||
|
||||
wait
|
||||
)
|
||||
|
||||
echo ""
|
||||
echo "🎯 === Layer 5: Root documentation integration ==="
|
||||
echo "Generating comprehensive root documentation..."
|
||||
|
||||
# Collect all existing CLAUDE.md files
|
||||
existing_docs=$(find . -name "CLAUDE.md" -path "*/src/*" | sort)
|
||||
if [ -n "$existing_docs" ]; then
|
||||
echo "Found module documentation:"
|
||||
echo "$existing_docs" | sed 's/^/ 📄 /'
|
||||
|
||||
run_gemini "gemini -yolo -p '@{src/*/CLAUDE.md,tests/CLAUDE.md,config/CLAUDE.md,scripts/CLAUDE.md} @{CLAUDE.md}
|
||||
Integrate all module documentation and update root CLAUDE.md with:
|
||||
|
||||
## Project Overview
|
||||
- Complete project architecture summary
|
||||
- Technology stack and dependencies
|
||||
- Module integration patterns
|
||||
- Development workflow and guidelines
|
||||
|
||||
## Architecture
|
||||
- System design principles
|
||||
- Module interdependencies
|
||||
- Data flow patterns
|
||||
- Key architectural decisions
|
||||
|
||||
## Development Guidelines
|
||||
- Coding standards and patterns
|
||||
- Testing strategies
|
||||
- Deployment procedures
|
||||
- Contribution guidelines
|
||||
|
||||
## Module Summary
|
||||
- Brief overview of each module's purpose
|
||||
- Key patterns and conventions
|
||||
- Integration points
|
||||
- Performance considerations
|
||||
|
||||
Focus on providing a comprehensive yet concise project overview that serves as the single source of truth for new developers.'" "Root documentation integration"
|
||||
else
|
||||
echo "⚠️ No module documentation found, generating basic root documentation..."
|
||||
run_gemini "gemini -yolo -p '@{**/*} @{CLAUDE.md}
|
||||
Generate comprehensive root CLAUDE.md documentation with:
|
||||
- Project overview and architecture
|
||||
- Technology stack summary
|
||||
- Development guidelines
|
||||
- Key patterns and conventions'" "Basic root documentation"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ === Medium project update completed ==="
|
||||
echo "📊 Summary:"
|
||||
echo " - Layered analysis completed in dependency order"
|
||||
echo " - All gemini commands executed with -yolo for direct file modification"
|
||||
echo " - Module-specific CLAUDE.md files updated with contextual information"
|
||||
echo " - Root documentation integrated with complete project overview"
|
||||
echo " - Timestamp: $(date)"
|
||||
|
||||
# Optional: Show generated documentation structure
|
||||
echo ""
|
||||
echo "📁 Generated documentation structure:"
|
||||
find . -name "CLAUDE.md" | sort | sed 's/^/ 📄 /'
|
||||
@@ -1,101 +0,0 @@
|
||||
#!/bin/bash
|
||||
# plan-executor.sh - DMSFlow Planning Template Loader
|
||||
# Returns role-specific planning templates for Claude processing
|
||||
|
||||
set -e
|
||||
|
||||
# Define paths
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TEMPLATE_DIR="${SCRIPT_DIR}/../planning-templates"
|
||||
|
||||
# Parse arguments
|
||||
COMMAND="$1"
|
||||
ROLE="$2"
|
||||
|
||||
# Handle version check
|
||||
if [ "$COMMAND" = "--version" ] || [ "$COMMAND" = "-v" ]; then
|
||||
echo "DMSFlow plan-executor v2.0"
|
||||
echo "Semantic-based planning role system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# List all available planning roles
|
||||
if [ "$COMMAND" = "--list" ]; then
|
||||
echo "Available Planning Roles:"
|
||||
echo "========================"
|
||||
for file in "$TEMPLATE_DIR"/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
# Extract name and description from YAML frontmatter
|
||||
name=$(grep "^name:" "$file" | head -1 | cut -d: -f2 | sed 's/^ *//' | sed 's/ *$//')
|
||||
desc=$(grep "^description:" "$file" | head -1 | cut -d: -f2- | sed 's/^ *//' | sed 's/ *$//')
|
||||
|
||||
if [ -n "$name" ] && [ -n "$desc" ]; then
|
||||
printf "%-20s - %s\n" "$name" "$desc"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Load specific planning role
|
||||
if [ "$COMMAND" = "--load" ] && [ -n "$ROLE" ]; then
|
||||
TEMPLATE_PATH="${TEMPLATE_DIR}/${ROLE}.md"
|
||||
|
||||
if [ -f "$TEMPLATE_PATH" ]; then
|
||||
# Output content, skipping YAML frontmatter
|
||||
awk '
|
||||
BEGIN { in_yaml = 0; yaml_ended = 0 }
|
||||
/^---$/ {
|
||||
if (!yaml_ended) {
|
||||
if (in_yaml) yaml_ended = 1
|
||||
else in_yaml = 1
|
||||
next
|
||||
}
|
||||
}
|
||||
yaml_ended { print }
|
||||
' "$TEMPLATE_PATH"
|
||||
else
|
||||
>&2 echo "Error: Planning role '$ROLE' not found"
|
||||
>&2 echo "Use --list to see available planning roles"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Handle legacy usage (direct role name)
|
||||
if [ -n "$COMMAND" ] && [ "$COMMAND" != "--help" ] && [ "$COMMAND" != "--list" ] && [ "$COMMAND" != "--load" ]; then
|
||||
TEMPLATE_PATH="${TEMPLATE_DIR}/${COMMAND}.md"
|
||||
|
||||
if [ -f "$TEMPLATE_PATH" ]; then
|
||||
# Output content, skipping YAML frontmatter
|
||||
awk '
|
||||
BEGIN { in_yaml = 0; yaml_ended = 0 }
|
||||
/^---$/ {
|
||||
if (!yaml_ended) {
|
||||
if (in_yaml) yaml_ended = 1
|
||||
else in_yaml = 1
|
||||
next
|
||||
}
|
||||
}
|
||||
yaml_ended { print }
|
||||
' "$TEMPLATE_PATH"
|
||||
exit 0
|
||||
else
|
||||
>&2 echo "Error: Planning role '$COMMAND' not found"
|
||||
>&2 echo "Use --list to see available planning roles"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Show help
|
||||
echo "Usage:"
|
||||
echo " plan-executor.sh --list List all available planning roles with descriptions"
|
||||
echo " plan-executor.sh --load <role> Load specific planning role template"
|
||||
echo " plan-executor.sh <role> Load specific role template (legacy format)"
|
||||
echo " plan-executor.sh --help Show this help message"
|
||||
echo " plan-executor.sh --version Show version information"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " plan-executor.sh --list"
|
||||
echo " plan-executor.sh --load system-architect"
|
||||
echo " plan-executor.sh feature-planner"
|
||||
@@ -59,12 +59,7 @@ Each session directory contains `workflow-session.json`:
|
||||
"status": "active|paused|completed",
|
||||
"progress": {
|
||||
"completed_phases": ["PLAN"],
|
||||
"current_tasks": ["impl-1", "impl-2"],
|
||||
"last_checkpoint": "2025-09-07T10:00:00Z"
|
||||
},
|
||||
"meta": {
|
||||
"created": "2025-09-05T10:00:00Z",
|
||||
"updated": "2025-09-07T10:00:00Z"
|
||||
"current_tasks": ["impl-1", "impl-2"]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -106,11 +101,6 @@ All task files use this 8-field schema:
|
||||
"execution": {
|
||||
"attempts": 0,
|
||||
"last_attempt": null
|
||||
},
|
||||
|
||||
"meta": {
|
||||
"created": "2025-09-05T10:30:00Z",
|
||||
"updated": "2025-09-05T10:30:00Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -171,7 +161,7 @@ File structure scales with task complexity to minimize overhead for simple tasks
|
||||
├── workflow-session.json # Session metadata and state
|
||||
├── [.brainstorming/] # Optional brainstorming phase
|
||||
├── [.chat/] # Gemini CLI interaction sessions
|
||||
│ ├── chat-*.md # Saved chat sessions with timestamps
|
||||
│ ├── chat-*.md # Saved chat sessions
|
||||
│ └── analysis-*.md # Comprehensive analysis results
|
||||
├── IMPL_PLAN.md # Comprehensive planning document
|
||||
├── TODO_LIST.md # Progress tracking and monitoring
|
||||
@@ -196,7 +186,7 @@ File structure scales with task complexity to minimize overhead for simple tasks
|
||||
- `workflow-session.json` - Session state (required)
|
||||
- `IMPL_PLAN.md` - Planning document (required)
|
||||
- `TODO_LIST.md` - Progress tracking (auto-generated when needed)
|
||||
- Chat sessions: `chat-YYYYMMDD-HHMMSS.md`
|
||||
- Chat sessions: `chat-analysis-*.md`
|
||||
- Task summaries: `IMPL-[task-id]-summary.md`
|
||||
|
||||
## Complexity Classification
|
||||
|
||||
Reference in New Issue
Block a user