diff --git a/ccpm/commands/pm/epic-merge.md b/ccpm/commands/pm/epic-merge.md index e0f886e48..84f3cf90d 100644 --- a/ccpm/commands/pm/epic-merge.md +++ b/ccpm/commands/pm/epic-merge.md @@ -31,7 +31,7 @@ Navigate to worktree and check status: cd ../epic-$ARGUMENTS # Check for uncommitted changes -if [[ $(git status --porcelain) ]]; then +if [[ `git status --porcelain` ]]; then echo "⚠️ Uncommitted changes in worktree:" git status --short echo "Commit or stash changes before merging" @@ -104,7 +104,7 @@ if [ -d ".claude/epics/$ARGUMENTS" ]; then cd .claude/epics/$ARGUMENTS for task_file in [0-9]*.md; do [ -f "$task_file" ] || continue - task_name=$(grep '^name:' "$task_file" | cut -d: -f2 | sed 's/^ *//') + task_name=`grep '^name:' "$task_file" | cut -d: -f2 | sed 's/^ *//'` feature_list="$feature_list\n- $task_name" done cd - > /dev/null @@ -113,9 +113,9 @@ fi echo "$feature_list" # Extract epic issue number -epic_github_line=$(grep 'github:' .claude/epics/$ARGUMENTS/epic.md 2>/dev/null || true) +epic_github_line=`grep 'github:' .claude/epics/$ARGUMENTS/epic.md 2>/dev/null || true` if [ -n "$epic_github_line" ]; then - epic_issue=$(echo "$epic_github_line" | grep -oE '[0-9]+' || true) + epic_issue=`echo "$epic_github_line" | grep -oE '[0-9]+' || true` if [ -n "$epic_issue" ]; then echo "\nCloses epic #$epic_issue" fi @@ -133,7 +133,7 @@ echo " ❌ Merge conflicts detected! Conflicts in: -$(git diff --name-only --diff-filter=U) +`git diff --name-only --diff-filter=U` Options: 1. Resolve manually: @@ -179,9 +179,9 @@ Close related issues: ```bash # Get issue numbers from epic # Extract epic issue number -epic_github_line=$(grep 'github:' .claude/epics/archived/$ARGUMENTS/epic.md 2>/dev/null || true) +epic_github_line=`grep 'github:' .claude/epics/archived/$ARGUMENTS/epic.md 2>/dev/null || true` if [ -n "$epic_github_line" ]; then - epic_issue=$(echo "$epic_github_line" | grep -oE '[0-9]+$' || true) + epic_issue=`echo "$epic_github_line" | grep -oE '[0-9]+$' || true` else epic_issue="" fi @@ -193,9 +193,9 @@ gh issue close $epic_issue -c "Epic completed and merged to main" for task_file in .claude/epics/archived/$ARGUMENTS/[0-9]*.md; do [ -f "$task_file" ] || continue # Extract task issue number - task_github_line=$(grep 'github:' "$task_file" 2>/dev/null || true) + task_github_line=`grep 'github:' "$task_file" 2>/dev/null || true` if [ -n "$task_github_line" ]; then - issue_num=$(echo "$task_github_line" | grep -oE '[0-9]+$' || true) + issue_num=`echo "$task_github_line" | grep -oE '[0-9]+$' || true` else issue_num="" fi diff --git a/ccpm/commands/pm/epic-refresh.md b/ccpm/commands/pm/epic-refresh.md index 7fa511eee..4d547d977 100644 --- a/ccpm/commands/pm/epic-refresh.md +++ b/ccpm/commands/pm/epic-refresh.md @@ -44,13 +44,13 @@ if [ ! -z "$epic_issue" ]; then # For each task, check its status and update checkbox for task_file in .claude/epics/$ARGUMENTS/[0-9]*.md; do # Extract task issue number - task_github_line=$(grep 'github:' "$task_file" 2>/dev/null || true) + task_github_line=`grep 'github:' "$task_file" 2>/dev/null || true` if [ -n "$task_github_line" ]; then - task_issue=$(echo "$task_github_line" | grep -oE '[0-9]+$' || true) + task_issue=`echo "$task_github_line" | grep -oE '[0-9]+$' || true` else task_issue="" fi - task_status=$(grep 'status:' $task_file | cut -d: -f2 | tr -d ' ') + task_status=`grep 'status:' $task_file | cut -d: -f2 | tr -d ' '` if [ "$task_status" = "closed" ]; then # Mark as checked diff --git a/ccpm/commands/pm/epic-start.md b/ccpm/commands/pm/epic-start.md index 51628a494..9fe520265 100644 --- a/ccpm/commands/pm/epic-start.md +++ b/ccpm/commands/pm/epic-start.md @@ -41,7 +41,7 @@ Follow `/rules/branch-operations.md`: ```bash # Check for uncommitted changes -if [ -n "$(git status --porcelain)" ]; then +if [ -n "`git status --porcelain`" ]; then echo "❌ You have uncommitted changes. Please commit or stash them before starting an epic." exit 1 fi diff --git a/ccpm/commands/pm/epic-sync.md b/ccpm/commands/pm/epic-sync.md index 7c5a26d27..ed8f59a7a 100644 --- a/ccpm/commands/pm/epic-sync.md +++ b/ccpm/commands/pm/epic-sync.md @@ -31,7 +31,7 @@ Follow `/rules/github-operations.md` to ensure we're not syncing to the CCPM tem ```bash # Check if remote origin is the CCPM template repository -remote_url=$(git remote get-url origin 2>/dev/null || echo "") +remote_url=`git remote get-url origin 2>/dev/null || echo ""` if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazeio/ccpm.git"* ]]; then echo "❌ ERROR: You're trying to sync with the CCPM template repository!" echo "" @@ -58,8 +58,8 @@ fi #### First, detect the GitHub repository: ```bash # Get the current repository from git remote -remote_url=$(git remote get-url origin 2>/dev/null || echo "") -REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||') +remote_url=`git remote get-url origin 2>/dev/null || echo ""` +REPO=`echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||'` [ -z "$REPO" ] && REPO="user/repo" echo "Creating issues in repository: $REPO" ``` @@ -118,12 +118,12 @@ else fi # Create epic issue with labels -epic_number=$(gh issue create \ +epic_number=`gh issue create \ --repo "$REPO" \ --title "Epic: $ARGUMENTS" \ --body-file /tmp/epic-body.md \ --label "epic,epic:$ARGUMENTS,$epic_type" \ - --json number -q .number) + --json number -q .number` ``` Store the returned issue number for epic frontmatter update. @@ -142,7 +142,7 @@ fi Count task files to determine strategy: ```bash -task_count=$(ls .claude/epics/$ARGUMENTS/[0-9][0-9][0-9].md 2>/dev/null | wc -l) +task_count=`ls .claude/epics/$ARGUMENTS/[0-9][0-9][0-9].md 2>/dev/null | wc -l` ``` ### For Small Batches (< 5 tasks): Sequential Creation @@ -154,26 +154,26 @@ if [ "$task_count" -lt 5 ]; then [ -f "$task_file" ] || continue # Extract task name from frontmatter - task_name=$(grep '^name:' "$task_file" | sed 's/^name: *//') + task_name=`grep '^name:' "$task_file" | sed 's/^name: *//'` # Strip frontmatter from task content sed '1,/^---$/d; 1,/^---$/d' "$task_file" > /tmp/task-body.md # Create sub-issue with labels if [ "$use_subissues" = true ]; then - task_number=$(gh sub-issue create \ + task_number=`gh sub-issue create \ --parent "$epic_number" \ --title "$task_name" \ --body-file /tmp/task-body.md \ --label "task,epic:$ARGUMENTS" \ - --json number -q .number) + --json number -q .number` else - task_number=$(gh issue create \ + task_number=`gh issue create \ --repo "$REPO" \ --title "$task_name" \ --body-file /tmp/task-body.md \ --label "task,epic:$ARGUMENTS" \ - --json number -q .number) + --json number -q .number` fi # Record mapping for renaming @@ -252,7 +252,7 @@ First, build a mapping of old numbers to new issue IDs: > /tmp/id-mapping.txt while IFS=: read -r task_file task_number; do # Extract old number from filename (e.g., 001 from 001.md) - old_num=$(basename "$task_file" .md) + old_num=`basename "$task_file" .md` echo "$old_num:$task_number" >> /tmp/id-mapping.txt done < /tmp/task-mapping.txt ``` @@ -261,15 +261,15 @@ Then rename files and update all references: ```bash # Process each task file while IFS=: read -r task_file task_number; do - new_name="$(dirname "$task_file")/${task_number}.md" + new_name="`dirname "$task_file"`/${task_number}.md" # Read the file content - content=$(cat "$task_file") + content=`cat "$task_file"` # Update depends_on and conflicts_with references while IFS=: read -r old_num new_num; do # Update arrays like [001, 002] to use new issue numbers - content=$(echo "$content" | sed "s/\b$old_num\b/$new_num/g") + content=`echo "$content" | sed "s/\b$old_num\b/$new_num/g"` done < /tmp/id-mapping.txt # Write updated content to new file @@ -280,11 +280,11 @@ while IFS=: read -r task_file task_number; do # Update github field in frontmatter # Add the GitHub URL to the frontmatter - repo=$(gh repo view --json nameWithOwner -q .nameWithOwner) + repo=`gh repo view --json nameWithOwner -q .nameWithOwner` github_url="https://github.com/$repo/issues/$task_number" # Update frontmatter with GitHub URL and current timestamp - current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + current_date=`date -u +"%Y-%m-%dT%H:%M:%SZ"` # Use sed to update the github and updated fields sed -i.bak "/^github:/c\github: $github_url" "$new_name" @@ -325,9 +325,9 @@ Update the epic file with GitHub URL, timestamp, and real task IDs: #### 5a. Update Frontmatter ```bash # Get repo info -repo=$(gh repo view --json nameWithOwner -q .nameWithOwner) +repo=`gh repo view --json nameWithOwner -q .nameWithOwner` epic_url="https://github.com/$repo/issues/$epic_number" -current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +current_date=`date -u +"%Y-%m-%dT%H:%M:%SZ"` # Update epic frontmatter sed -i.bak "/^github:/c\github: $epic_url" .claude/epics/$ARGUMENTS/epic.md @@ -347,21 +347,21 @@ for task_file in .claude/epics/$ARGUMENTS/[0-9]*.md; do [ -f "$task_file" ] || continue # Get issue number (filename without .md) - issue_num=$(basename "$task_file" .md) + issue_num=`basename "$task_file" .md` # Get task name from frontmatter - task_name=$(grep '^name:' "$task_file" | sed 's/^name: *//') + task_name=`grep '^name:' "$task_file" | sed 's/^name: *//'` # Get parallel status - parallel=$(grep '^parallel:' "$task_file" | sed 's/^parallel: *//') + parallel=`grep '^parallel:' "$task_file" | sed 's/^parallel: *//'` # Add to tasks section echo "- [ ] #${issue_num} - ${task_name} (parallel: ${parallel})" >> /tmp/tasks-section.md done # Add summary statistics -total_count=$(ls .claude/epics/$ARGUMENTS/[0-9]*.md 2>/dev/null | wc -l) -parallel_count=$(grep -l '^parallel: true' .claude/epics/$ARGUMENTS/[0-9]*.md 2>/dev/null | wc -l) +total_count=`ls .claude/epics/$ARGUMENTS/[0-9]*.md 2>/dev/null | wc -l` +parallel_count=`grep -l '^parallel: true' .claude/epics/$ARGUMENTS/[0-9]*.md 2>/dev/null | wc -l` sequential_count=$((total_count - parallel_count)) cat >> /tmp/tasks-section.md << EOF @@ -408,15 +408,15 @@ EOF for task_file in .claude/epics/$ARGUMENTS/[0-9]*.md; do [ -f "$task_file" ] || continue - issue_num=$(basename "$task_file" .md) - task_name=$(grep '^name:' "$task_file" | sed 's/^name: *//') + issue_num=`basename "$task_file" .md` + task_name=`grep '^name:' "$task_file" | sed 's/^name: *//'` echo "- #${issue_num}: ${task_name} - https://github.com/${repo}/issues/${issue_num}" >> .claude/epics/$ARGUMENTS/github-mapping.md done # Add sync timestamp echo "" >> .claude/epics/$ARGUMENTS/github-mapping.md -echo "Synced: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> .claude/epics/$ARGUMENTS/github-mapping.md +echo "Synced: `date -u +"%Y-%m-%dT%H:%M:%SZ"`" >> .claude/epics/$ARGUMENTS/github-mapping.md ``` ### 7. Create Worktree diff --git a/ccpm/commands/pm/issue-close.md b/ccpm/commands/pm/issue-close.md index a7b96f21f..7d92bcec6 100644 --- a/ccpm/commands/pm/issue-close.md +++ b/ccpm/commands/pm/issue-close.md @@ -61,7 +61,7 @@ Check the task checkbox in the epic issue: epic_name={extract_from_path} # Get epic issue number from epic.md -epic_issue=$(grep 'github:' .claude/epics/$epic_name/epic.md | grep -oE '[0-9]+$') +epic_issue=`grep 'github:' .claude/epics/$epic_name/epic.md | grep -oE '[0-9]+$'` if [ ! -z "$epic_issue" ]; then # Get current epic body diff --git a/ccpm/commands/pm/issue-sync.md b/ccpm/commands/pm/issue-sync.md index fd8137cf8..44246a8e6 100644 --- a/ccpm/commands/pm/issue-sync.md +++ b/ccpm/commands/pm/issue-sync.md @@ -24,7 +24,7 @@ Do not bother the user with preflight checks progress ("I'm not going to ..."). 0. **Repository Protection Check:** Follow `/rules/github-operations.md` - check remote origin: ```bash - remote_url=$(git remote get-url origin 2>/dev/null || echo "") + remote_url=`git remote get-url origin 2>/dev/null || echo ""` if [[ "$remote_url" == *"automazeio/ccpm"* ]]; then echo "❌ ERROR: Cannot sync to CCPM template repository!" echo "Update your remote: git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git" diff --git a/ccpm/commands/pm/test-reference-update.md b/ccpm/commands/pm/test-reference-update.md index 1986e6853..75d7e6a75 100644 --- a/ccpm/commands/pm/test-reference-update.md +++ b/ccpm/commands/pm/test-reference-update.md @@ -74,7 +74,7 @@ EOF # Create old -> new ID mapping > /tmp/id-mapping.txt while IFS=: read -r task_file task_number; do - old_num=$(basename "$task_file" .md) + old_num=`basename "$task_file" .md` echo "$old_num:$task_number" >> /tmp/id-mapping.txt done < /tmp/task-mapping.txt @@ -90,11 +90,11 @@ while IFS=: read -r task_file task_number; do echo "Processing: $task_file -> $task_number.md" # Read the file content - content=$(cat "$task_file") + content=`cat "$task_file"` # Update references while IFS=: read -r old_num new_num; do - content=$(echo "$content" | sed "s/\b$old_num\b/$new_num/g") + content=`echo "$content" | sed "s/\b$old_num\b/$new_num/g"` done < /tmp/id-mapping.txt # Write to new file diff --git a/ccpm/hooks/bash-worktree-fix.sh b/ccpm/hooks/bash-worktree-fix.sh index 3eb90adc8..0b9b97143 100755 --- a/ccpm/hooks/bash-worktree-fix.sh +++ b/ccpm/hooks/bash-worktree-fix.sh @@ -22,7 +22,7 @@ shell_squote() { # Detect if CWD is inside a *linked worktree* and print the worktree root. # Returns 0 with path on stdout if yes; 1 otherwise. get_worktree_path() { - check_dir="$(pwd)" + check_dir="`pwd`" if [ ! -d "${check_dir}" ]; then debug_log "pwd is not a directory: ${check_dir}" @@ -35,7 +35,7 @@ get_worktree_path() { if [ -r "${check_dir}/.git" ]; then IFS= read -r gitdir_content < "${check_dir}/.git" || gitdir_content="" # Strip a possible trailing CR (CRLF files) - gitdir_content=$(printf %s "$gitdir_content" | tr -d '\r') + gitdir_content=`printf %s "$gitdir_content" | tr -d '\r'` else debug_log "Unreadable .git file at: ${check_dir}" fi @@ -81,7 +81,7 @@ get_worktree_path() { return 1 fi - check_dir=$(dirname "${check_dir}") + check_dir=`dirname "${check_dir}"` done debug_log "No git repository found" @@ -141,7 +141,7 @@ inject_prefix() { worktree_path=$1 command=$2 - qpath=$(shell_squote "${worktree_path}") + qpath=`shell_squote "${worktree_path}"` # Right-trim spaces (portable loop) trimmed=${command} @@ -170,7 +170,7 @@ main() { debug_log "Processing command: ${original_command}" # Fast path: if not in a worktree, pass through unchanged - if ! worktree_path="$(get_worktree_path)"; then + if ! worktree_path="`get_worktree_path`"; then debug_log "Not in worktree, passing through unchanged" printf '%s\n' "${original_command}" exit 0 @@ -180,7 +180,7 @@ main() { debug_log "Passing through unchanged" printf '%s\n' "${original_command}" else - modified_command="$(inject_prefix "${worktree_path}" "${original_command}")" + modified_command="`inject_prefix "${worktree_path}" "${original_command}"`" debug_log "Modified command: ${modified_command}" printf '%s\n' "${modified_command}" fi diff --git a/ccpm/rules/agent-coordination.md b/ccpm/rules/agent-coordination.md index 9b9b10d38..0918a19d7 100644 --- a/ccpm/rules/agent-coordination.md +++ b/ccpm/rules/agent-coordination.md @@ -34,7 +34,7 @@ Before modifying a shared file: git status {file} # If modified by another agent, wait -if [[ $(git status --porcelain {file}) ]]; then +if [[ `git status --porcelain {file}` ]]; then echo "Waiting for {file} to be available..." sleep 30 # Retry diff --git a/ccpm/rules/datetime.md b/ccpm/rules/datetime.md index 388c93049..e4fb5ae37 100644 --- a/ccpm/rules/datetime.md +++ b/ccpm/rules/datetime.md @@ -60,7 +60,7 @@ updated: 2024-01-15T14:30:45Z # Use actual output from date command **Creating a new PRD:** ```bash # First, get current datetime -CURRENT_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +CURRENT_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` # Output: 2024-01-15T14:30:45Z # Then use in frontmatter: @@ -75,7 +75,7 @@ created: 2024-01-15T14:30:45Z # Use the actual $CURRENT_DATE value **Updating an existing task:** ```bash # Get current datetime for update -UPDATE_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +UPDATE_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` # Update only the 'updated' field: --- diff --git a/ccpm/rules/github-operations.md b/ccpm/rules/github-operations.md index 5f9c84039..1a498c2bf 100644 --- a/ccpm/rules/github-operations.md +++ b/ccpm/rules/github-operations.md @@ -8,7 +8,7 @@ Standard patterns for GitHub CLI operations across all commands. ```bash # Check if remote origin is the CCPM template repository -remote_url=$(git remote get-url origin 2>/dev/null || echo "") +remote_url=`git remote get-url origin 2>/dev/null || echo ""` if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazeio/ccpm.git"* ]]; then echo "❌ ERROR: You're trying to sync with the CCPM template repository!" echo "" @@ -55,8 +55,8 @@ gh issue view {number} --json state,title,labels,body ### Create Issue ```bash # Always specify repo to avoid defaulting to wrong repository -remote_url=$(git remote get-url origin 2>/dev/null || echo "") -REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||') +remote_url=`git remote get-url origin 2>/dev/null || echo ""` +REPO=`echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||'` [ -z "$REPO" ] && REPO="user/repo" gh issue create --repo "$REPO" --title "{title}" --body-file {file} --label "{labels}" ``` diff --git a/ccpm/rules/path-standards.md b/ccpm/rules/path-standards.md index 029c3670f..48bfdfb12 100644 --- a/ccpm/rules/path-standards.md +++ b/ccpm/rules/path-standards.md @@ -72,9 +72,9 @@ config_path: "configs/" # Configuration files directory normalize_paths() { local content="$1" # Remove user-specific paths (generic patterns) - content=$(echo "$content" | sed "s|/Users/[^/]*/[^/]*/|../|g") - content=$(echo "$content" | sed "s|/home/[^/]*/[^/]*/|../|g") - content=$(echo "$content" | sed "s|C:\\\\Users\\\\[^\\\\]*\\\\[^\\\\]*\\\\|..\\\\|g") + content=`echo "$content" | sed "s|/Users/[^/]*/[^/]*/|../|g"` + content=`echo "$content" | sed "s|/home/[^/]*/[^/]*/|../|g"` + content=`echo "$content" | sed "s|C:\\\\Users\\\\[^\\\\]*\\\\[^\\\\]*\\\\|..\\\\|g"` echo "$content" } ``` diff --git a/ccpm/rules/strip-frontmatter.md b/ccpm/rules/strip-frontmatter.md index 4e27034d1..53bd42850 100644 --- a/ccpm/rules/strip-frontmatter.md +++ b/ccpm/rules/strip-frontmatter.md @@ -39,8 +39,8 @@ Always strip frontmatter when: gh issue create --body-file task.md # Good - strips frontmatter and specifies repo -remote_url=$(git remote get-url origin 2>/dev/null || echo "") -REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||') +remote_url=`git remote get-url origin 2>/dev/null || echo ""` +REPO=`echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||'` [ -z "$REPO" ] && REPO="user/repo" sed '1,/^---$/d; 1,/^---$/d' task.md > /tmp/clean.md gh issue create --repo "$REPO" --body-file /tmp/clean.md @@ -57,7 +57,7 @@ gh issue comment 123 --body-file /tmp/comment.md ```bash for file in *.md; do # Strip frontmatter from each file - sed '1,/^---$/d; 1,/^---$/d' "$file" > "/tmp/$(basename $file)" + sed '1,/^---$/d; 1,/^---$/d' "$file" > "/tmp/`basename $file`" # Use the clean version done ``` diff --git a/ccpm/scripts/check-path-standards.sh b/ccpm/scripts/check-path-standards.sh index 04588c59a..459ff5447 100755 --- a/ccpm/scripts/check-path-standards.sh +++ b/ccpm/scripts/check-path-standards.sh @@ -93,7 +93,7 @@ check_sync_content() { total_checks=$((total_checks + 1)) # Check update files for proper path formats - update_files=$(find .claude/epics/*/updates/ -name "*.md" 2>/dev/null | head -10) + update_files=`find .claude/epics/*/updates/ -name "*.md" 2>/dev/null | head -10` if [ -z "$update_files" ]; then print_warning "No update files found, skipping this check" diff --git a/ccpm/scripts/fix-path-standards.sh b/ccpm/scripts/fix-path-standards.sh index 1f9f2b31c..64e22a717 100755 --- a/ccpm/scripts/fix-path-standards.sh +++ b/ccpm/scripts/fix-path-standards.sh @@ -53,10 +53,10 @@ normalize_paths() { # Check for changes if ! diff -q "$file" "$backup_file" >/dev/null 2>&1; then - print_success "File fixed: $(basename "$file")" + print_success "File fixed: `basename "$file"`" return 0 else - print_info "File needs no changes: $(basename "$file")" + print_info "File needs no changes: `basename "$file"`" rm "$backup_file" # Remove unnecessary backup return 1 fi diff --git a/ccpm/scripts/pm/blocked.sh b/ccpm/scripts/pm/blocked.sh index 584acfa62..96c943641 100755 --- a/ccpm/scripts/pm/blocked.sh +++ b/ccpm/scripts/pm/blocked.sh @@ -11,34 +11,34 @@ found=0 for epic_dir in .claude/epics/*/; do [ -d "$epic_dir" ] || continue - epic_name=$(basename "$epic_dir") + epic_name=`basename "$epic_dir"` for task_file in "$epic_dir"/[0-9]*.md; do [ -f "$task_file" ] || continue # Check if task is open - status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$task_file" | head -1 | sed 's/^status: *//'` if [ "$status" != "open" ] && [ -n "$status" ]; then continue fi # Check for dependencies # Extract dependencies from task file - deps_line=$(grep "^depends_on:" "$task_file" | head -1) + deps_line=`grep "^depends_on:" "$task_file" | head -1` if [ -n "$deps_line" ]; then - deps=$(echo "$deps_line" | sed 's/^depends_on: *//') - deps=$(echo "$deps" | sed 's/^\[//' | sed 's/\]$//') - deps=$(echo "$deps" | sed 's/,/ /g') + deps=`echo "$deps_line" | sed 's/^depends_on: *//'` + deps=`echo "$deps" | sed 's/^\[//' | sed 's/\]$//'` + deps=`echo "$deps" | sed 's/,/ /g'` # Trim whitespace and handle empty cases - deps=$(echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//') + deps=`echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//'` [ -z "$deps" ] && deps="" else deps="" fi if [ -n "$deps" ] && [ "$deps" != "depends_on:" ]; then - task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') - task_num=$(basename "$task_file" .md) + task_name=`grep "^name:" "$task_file" | head -1 | sed 's/^name: *//'` + task_num=`basename "$task_file" .md` echo "⏸️ Task #$task_num - $task_name" echo " Epic: $epic_name" @@ -49,7 +49,7 @@ for epic_dir in .claude/epics/*/; do for dep in $deps; do dep_file="$epic_dir$dep.md" if [ -f "$dep_file" ]; then - dep_status=$(grep "^status:" "$dep_file" | head -1 | sed 's/^status: *//') + dep_status=`grep "^status:" "$dep_file" | head -1 | sed 's/^status: *//'` [ "$dep_status" = "open" ] && open_deps="$open_deps #$dep" fi done diff --git a/ccpm/scripts/pm/epic-list.sh b/ccpm/scripts/pm/epic-list.sh index 945b4d32a..0535b5ae1 100755 --- a/ccpm/scripts/pm/epic-list.sh +++ b/ccpm/scripts/pm/epic-list.sh @@ -7,7 +7,7 @@ if [ ! -d ".claude/epics" ]; then echo "📁 No epics directory found. Create your first epic with: /pm:prd-parse " exit 0 fi -epic_dirs=$(ls -d .claude/epics/*/ 2>/dev/null || true) +epic_dirs=`ls -d .claude/epics/*/ 2>/dev/null || true` if [ -z "$epic_dirs" ]; then echo "📁 No epics found. Create your first epic with: /pm:prd-parse " exit 0 @@ -28,21 +28,21 @@ for dir in .claude/epics/*/; do [ -f "$dir/epic.md" ] || continue # Extract metadata - n=$(grep "^name:" "$dir/epic.md" | head -1 | sed 's/^name: *//') - s=$(grep "^status:" "$dir/epic.md" | head -1 | sed 's/^status: *//' | tr '[:upper:]' '[:lower:]') - p=$(grep "^progress:" "$dir/epic.md" | head -1 | sed 's/^progress: *//') - g=$(grep "^github:" "$dir/epic.md" | head -1 | sed 's/^github: *//') + n=`grep "^name:" "$dir/epic.md" | head -1 | sed 's/^name: *//'` + s=`grep "^status:" "$dir/epic.md" | head -1 | sed 's/^status: *//' | tr '[:upper:]' '[:lower:]'` + p=`grep "^progress:" "$dir/epic.md" | head -1 | sed 's/^progress: *//'` + g=`grep "^github:" "$dir/epic.md" | head -1 | sed 's/^github: *//'` # Defaults - [ -z "$n" ] && n=$(basename "$dir") + [ -z "$n" ] && n=`basename "$dir"` [ -z "$p" ] && p="0%" # Count tasks - t=$(ls "$dir"/[0-9]*.md 2>/dev/null | wc -l) + t=`ls "$dir"/[0-9]*.md 2>/dev/null | wc -l` # Format output with GitHub issue number if available if [ -n "$g" ]; then - i=$(echo "$g" | grep -o '/[0-9]*$' | tr -d '/') + i=`echo "$g" | grep -o '/[0-9]*$' | tr -d '/'` entry=" 📋 ${dir}epic.md (#$i) - $p complete ($t tasks)" else entry=" 📋 ${dir}epic.md - $p complete ($t tasks)" @@ -93,8 +93,8 @@ fi # Summary echo "" echo "📊 Summary" -total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l) -tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l) +total=`ls -d .claude/epics/*/ 2>/dev/null | wc -l` +tasks=`find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l` echo " Total epics: $total" echo " Total tasks: $tasks" diff --git a/ccpm/scripts/pm/epic-show.sh b/ccpm/scripts/pm/epic-show.sh index bbc588da3..7d77ea49e 100755 --- a/ccpm/scripts/pm/epic-show.sh +++ b/ccpm/scripts/pm/epic-show.sh @@ -20,7 +20,7 @@ if [ ! -f "$epic_file" ]; then echo "" echo "Available epics:" for dir in .claude/epics/*/; do - [ -d "$dir" ] && echo " • $(basename "$dir")" + [ -d "$dir" ] && echo " • `basename "$dir"`" done exit 1 fi @@ -31,10 +31,10 @@ echo "================================" echo "" # Extract metadata -status=$(grep "^status:" "$epic_file" | head -1 | sed 's/^status: *//') -progress=$(grep "^progress:" "$epic_file" | head -1 | sed 's/^progress: *//') -github=$(grep "^github:" "$epic_file" | head -1 | sed 's/^github: *//') -created=$(grep "^created:" "$epic_file" | head -1 | sed 's/^created: *//') +status=`grep "^status:" "$epic_file" | head -1 | sed 's/^status: *//'` +progress=`grep "^progress:" "$epic_file" | head -1 | sed 's/^progress: *//'` +github=`grep "^github:" "$epic_file" | head -1 | sed 's/^github: *//'` +created=`grep "^created:" "$epic_file" | head -1 | sed 's/^created: *//'` echo "📊 Metadata:" echo " Status: ${status:-planning}" @@ -52,10 +52,10 @@ closed_count=0 for task_file in "$epic_dir"/[0-9]*.md; do [ -f "$task_file" ] || continue - task_num=$(basename "$task_file" .md) - task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') - task_status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//') - parallel=$(grep "^parallel:" "$task_file" | head -1 | sed 's/^parallel: *//') + task_num=`basename "$task_file" .md` + task_name=`grep "^name:" "$task_file" | head -1 | sed 's/^name: *//'` + task_status=`grep "^status:" "$task_file" | head -1 | sed 's/^status: *//'` + parallel=`grep "^parallel:" "$task_file" | head -1 | sed 's/^parallel: *//'` if [ "$task_status" = "closed" ] || [ "$task_status" = "completed" ]; then echo " ✅ #$task_num - $task_name" diff --git a/ccpm/scripts/pm/epic-status.sh b/ccpm/scripts/pm/epic-status.sh index 76bf43427..207394b80 100755 --- a/ccpm/scripts/pm/epic-status.sh +++ b/ccpm/scripts/pm/epic-status.sh @@ -12,7 +12,7 @@ if [ -z "$epic_name" ]; then echo "" echo "Available epics:" for dir in .claude/epics/*/; do - [ -d "$dir" ] && echo " • $(basename "$dir")" + [ -d "$dir" ] && echo " • `basename "$dir"`" done exit 1 else @@ -25,7 +25,7 @@ else echo "" echo "Available epics:" for dir in .claude/epics/*/; do - [ -d "$dir" ] && echo " • $(basename "$dir")" + [ -d "$dir" ] && echo " • `basename "$dir"`" done exit 1 fi @@ -35,9 +35,9 @@ else echo "" # Extract metadata - status=$(grep "^status:" "$epic_file" | head -1 | sed 's/^status: *//') - progress=$(grep "^progress:" "$epic_file" | head -1 | sed 's/^progress: *//') - github=$(grep "^github:" "$epic_file" | head -1 | sed 's/^github: *//') + status=`grep "^status:" "$epic_file" | head -1 | sed 's/^status: *//'` + progress=`grep "^progress:" "$epic_file" | head -1 | sed 's/^progress: *//'` + github=`grep "^github:" "$epic_file" | head -1 | sed 's/^github: *//'` # Count tasks total=0 @@ -50,8 +50,8 @@ else [ -f "$task_file" ] || continue ((total++)) - task_status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//') - deps=$(grep "^depends_on:" "$task_file" | head -1 | sed 's/^depends_on: *\[//' | sed 's/\]//') + task_status=`grep "^status:" "$task_file" | head -1 | sed 's/^status: *//'` + deps=`grep "^depends_on:" "$task_file" | head -1 | sed 's/^depends_on: *\[//' | sed 's/\]//'` if [ "$task_status" = "closed" ] || [ "$task_status" = "completed" ]; then ((closed++)) @@ -69,8 +69,8 @@ else empty=$((20 - filled)) echo -n "Progress: [" - [ $filled -gt 0 ] && printf '%0.s█' $(seq 1 $filled) - [ $empty -gt 0 ] && printf '%0.s░' $(seq 1 $empty) + [ $filled -gt 0 ] && printf '%0.s█' `seq 1 $filled` + [ $empty -gt 0 ] && printf '%0.s░' `seq 1 $empty` echo "] $percent%" else echo "Progress: No tasks created" diff --git a/ccpm/scripts/pm/in-progress.sh b/ccpm/scripts/pm/in-progress.sh index f75af9e61..258979784 100755 --- a/ccpm/scripts/pm/in-progress.sh +++ b/ccpm/scripts/pm/in-progress.sh @@ -14,17 +14,19 @@ if [ -d ".claude/epics" ]; then for updates_dir in .claude/epics/*/updates/*/; do [ -d "$updates_dir" ] || continue - issue_num=$(basename "$updates_dir") - epic_name=$(basename $(dirname $(dirname "$updates_dir"))) + issue_num=`basename "$updates_dir"` + updates_parent=`dirname "$updates_dir"` + epic_dir=`dirname "$updates_parent"` + epic_name=`basename "$epic_dir"` if [ -f "$updates_dir/progress.md" ]; then - completion=$(grep "^completion:" "$updates_dir/progress.md" | head -1 | sed 's/^completion: *//') + completion=`grep "^completion:" "$updates_dir/progress.md" | head -1 | sed 's/^completion: *//'` [ -z "$completion" ] && completion="0%" # Get task name from the task file task_file=".claude/epics/$epic_name/$issue_num.md" if [ -f "$task_file" ]; then - task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') + task_name=`grep "^name:" "$task_file" | head -1 | sed 's/^name: *//'` else task_name="Unknown task" fi @@ -35,7 +37,7 @@ if [ -d ".claude/epics" ]; then # Check for recent updates if [ -f "$updates_dir/progress.md" ]; then - last_update=$(grep "^last_sync:" "$updates_dir/progress.md" | head -1 | sed 's/^last_sync: *//') + last_update=`grep "^last_sync:" "$updates_dir/progress.md" | head -1 | sed 's/^last_sync: *//'` [ -n "$last_update" ] && echo " Last update: $last_update" fi @@ -51,11 +53,11 @@ for epic_dir in .claude/epics/*/; do [ -d "$epic_dir" ] || continue [ -f "$epic_dir/epic.md" ] || continue - status=$(grep "^status:" "$epic_dir/epic.md" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$epic_dir/epic.md" | head -1 | sed 's/^status: *//'` if [ "$status" = "in-progress" ] || [ "$status" = "active" ]; then - epic_name=$(grep "^name:" "$epic_dir/epic.md" | head -1 | sed 's/^name: *//') - progress=$(grep "^progress:" "$epic_dir/epic.md" | head -1 | sed 's/^progress: *//') - [ -z "$epic_name" ] && epic_name=$(basename "$epic_dir") + epic_name=`grep "^name:" "$epic_dir/epic.md" | head -1 | sed 's/^name: *//'` + progress=`grep "^progress:" "$epic_dir/epic.md" | head -1 | sed 's/^progress: *//'` + [ -z "$epic_name" ] && epic_name=`basename "$epic_dir"` [ -z "$progress" ] && progress="0%" echo " • $epic_name - $progress complete" diff --git a/ccpm/scripts/pm/init.sh b/ccpm/scripts/pm/init.sh index c7b914761..8aff29cf8 100755 --- a/ccpm/scripts/pm/init.sh +++ b/ccpm/scripts/pm/init.sh @@ -74,7 +74,7 @@ mkdir -p .claude/scripts/pm echo " ✅ Directories created" # Copy scripts if in main repo -if [ -d "scripts/pm" ] && [ ! "$(pwd)" = *"/.claude"* ]; then +if [ -d "scripts/pm" ] && [ ! "`pwd`" = *"/.claude"* ]; then echo "" echo "📝 Copying PM scripts..." cp -r scripts/pm/* .claude/scripts/pm/ @@ -90,7 +90,7 @@ if git rev-parse --git-dir > /dev/null 2>&1; then # Check remote if git remote -v | grep -q origin; then - remote_url=$(git remote get-url origin) + remote_url=`git remote get-url origin` echo " ✅ Remote configured: $remote_url" # Check if remote is the CCPM template repository @@ -179,8 +179,8 @@ echo "==========================" echo "" echo "📊 System Status:" gh --version | head -1 -echo " Extensions: $(gh extension list | wc -l) installed" -echo " Auth: $(gh auth status 2>&1 | grep -o 'Logged in to [^ ]*' || echo 'Not authenticated')" +echo " Extensions: `gh extension list | wc -l` installed" +echo " Auth: `gh auth status 2>&1 | grep -o 'Logged in to [^ ]*' || echo 'Not authenticated'`" echo "" echo "🎯 Next Steps:" echo " 1. Create your first PRD: /pm:prd-new " diff --git a/ccpm/scripts/pm/next.sh b/ccpm/scripts/pm/next.sh index a6e94facb..c368f3b8e 100755 --- a/ccpm/scripts/pm/next.sh +++ b/ccpm/scripts/pm/next.sh @@ -12,25 +12,25 @@ found=0 for epic_dir in .claude/epics/*/; do [ -d "$epic_dir" ] || continue - epic_name=$(basename "$epic_dir") + epic_name=`basename "$epic_dir"` for task_file in "$epic_dir"/[0-9]*.md; do [ -f "$task_file" ] || continue # Check if task is open - status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$task_file" | head -1 | sed 's/^status: *//'` if [ "$status" != "open" ] && [ -n "$status" ]; then continue fi # Check dependencies # Extract dependencies from task file - deps_line=$(grep "^depends_on:" "$task_file" | head -1) + deps_line=`grep "^depends_on:" "$task_file" | head -1` if [ -n "$deps_line" ]; then - deps=$(echo "$deps_line" | sed 's/^depends_on: *//') - deps=$(echo "$deps" | sed 's/^\[//' | sed 's/\]$//') + deps=`echo "$deps_line" | sed 's/^depends_on: *//'` + deps=`echo "$deps" | sed 's/^\[//' | sed 's/\]$//'` # Trim whitespace and handle empty cases - deps=$(echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//') + deps=`echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//'` [ -z "$deps" ] && deps="" else deps="" @@ -38,9 +38,9 @@ for epic_dir in .claude/epics/*/; do # If no dependencies or empty, task is available if [ -z "$deps" ] || [ "$deps" = "depends_on:" ]; then - task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') - task_num=$(basename "$task_file" .md) - parallel=$(grep "^parallel:" "$task_file" | head -1 | sed 's/^parallel: *//') + task_name=`grep "^name:" "$task_file" | head -1 | sed 's/^name: *//'` + task_num=`basename "$task_file" .md` + parallel=`grep "^parallel:" "$task_file" | head -1 | sed 's/^parallel: *//'` echo "✅ Ready: #$task_num - $task_name" echo " Epic: $epic_name" diff --git a/ccpm/scripts/pm/prd-list.sh b/ccpm/scripts/pm/prd-list.sh index 30d845dda..ef6bb9c7a 100755 --- a/ccpm/scripts/pm/prd-list.sh +++ b/ccpm/scripts/pm/prd-list.sh @@ -30,11 +30,11 @@ echo "" echo "🔍 Backlog PRDs:" for file in .claude/prds/*.md; do [ -f "$file" ] || continue - status=$(grep "^status:" "$file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$file" | head -1 | sed 's/^status: *//'` if [ "$status" = "backlog" ] || [ "$status" = "draft" ] || [ -z "$status" ]; then - name=$(grep "^name:" "$file" | head -1 | sed 's/^name: *//') - desc=$(grep "^description:" "$file" | head -1 | sed 's/^description: *//') - [ -z "$name" ] && name=$(basename "$file" .md) + name=`grep "^name:" "$file" | head -1 | sed 's/^name: *//'` + desc=`grep "^description:" "$file" | head -1 | sed 's/^description: *//'` + [ -z "$name" ] && name=`basename "$file" .md` [ -z "$desc" ] && desc="No description" # echo " 📋 $name - $desc" echo " 📋 $file - $desc" @@ -48,11 +48,11 @@ echo "" echo "🔄 In-Progress PRDs:" for file in .claude/prds/*.md; do [ -f "$file" ] || continue - status=$(grep "^status:" "$file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$file" | head -1 | sed 's/^status: *//'` if [ "$status" = "in-progress" ] || [ "$status" = "active" ]; then - name=$(grep "^name:" "$file" | head -1 | sed 's/^name: *//') - desc=$(grep "^description:" "$file" | head -1 | sed 's/^description: *//') - [ -z "$name" ] && name=$(basename "$file" .md) + name=`grep "^name:" "$file" | head -1 | sed 's/^name: *//'` + desc=`grep "^description:" "$file" | head -1 | sed 's/^description: *//'` + [ -z "$name" ] && name=`basename "$file" .md` [ -z "$desc" ] && desc="No description" # echo " 📋 $name - $desc" echo " 📋 $file - $desc" @@ -65,11 +65,11 @@ echo "" echo "✅ Implemented PRDs:" for file in .claude/prds/*.md; do [ -f "$file" ] || continue - status=$(grep "^status:" "$file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$file" | head -1 | sed 's/^status: *//'` if [ "$status" = "implemented" ] || [ "$status" = "completed" ] || [ "$status" = "done" ]; then - name=$(grep "^name:" "$file" | head -1 | sed 's/^name: *//') - desc=$(grep "^description:" "$file" | head -1 | sed 's/^description: *//') - [ -z "$name" ] && name=$(basename "$file" .md) + name=`grep "^name:" "$file" | head -1 | sed 's/^name: *//'` + desc=`grep "^description:" "$file" | head -1 | sed 's/^description: *//'` + [ -z "$name" ] && name=`basename "$file" .md` [ -z "$desc" ] && desc="No description" # echo " 📋 $name - $desc" echo " 📋 $file - $desc" diff --git a/ccpm/scripts/pm/prd-status.sh b/ccpm/scripts/pm/prd-status.sh index 8744eab5c..fc205d7b6 100755 --- a/ccpm/scripts/pm/prd-status.sh +++ b/ccpm/scripts/pm/prd-status.sh @@ -9,7 +9,7 @@ if [ ! -d ".claude/prds" ]; then exit 0 fi -total=$(ls .claude/prds/*.md 2>/dev/null | wc -l) +total=`ls .claude/prds/*.md 2>/dev/null | wc -l` [ $total -eq 0 ] && echo "No PRDs found." && exit 0 # Count by status @@ -19,7 +19,7 @@ implemented=0 for file in .claude/prds/*.md; do [ -f "$file" ] || continue - status=$(grep "^status:" "$file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$file" | head -1 | sed 's/^status: *//'` case "$status" in backlog|draft|"") ((backlog++)) ;; @@ -38,9 +38,9 @@ echo "📊 Distribution:" echo "================" echo "" -echo " Backlog: $(printf '%-3d' $backlog) [$(printf '%0.s█' $(seq 1 $((backlog*20/total))))]" -echo " In Progress: $(printf '%-3d' $in_progress) [$(printf '%0.s█' $(seq 1 $((in_progress*20/total))))]" -echo " Implemented: $(printf '%-3d' $implemented) [$(printf '%0.s█' $(seq 1 $((implemented*20/total))))]" +echo " Backlog: `printf '%-3d' $backlog` [$(printf '%0.s█' $(seq 1 $((backlog*20/total))))]" +echo " In Progress: `printf '%-3d' $in_progress` [$(printf '%0.s█' $(seq 1 $((in_progress*20/total))))]" +echo " Implemented: `printf '%-3d' $implemented` [$(printf '%0.s█' $(seq 1 $((implemented*20/total))))]" echo "" echo " Total PRDs: $total" @@ -48,8 +48,8 @@ echo " Total PRDs: $total" echo "" echo "📅 Recent PRDs (last 5 modified):" ls -t .claude/prds/*.md 2>/dev/null | head -5 | while read file; do - name=$(grep "^name:" "$file" | head -1 | sed 's/^name: *//') - [ -z "$name" ] && name=$(basename "$file" .md) + name=`grep "^name:" "$file" | head -1 | sed 's/^name: *//'` + [ -z "$name" ] && name=`basename "$file" .md` echo " • $name" done diff --git a/ccpm/scripts/pm/search.sh b/ccpm/scripts/pm/search.sh index 3b0c8c25d..55e5aacf5 100755 --- a/ccpm/scripts/pm/search.sh +++ b/ccpm/scripts/pm/search.sh @@ -19,11 +19,11 @@ echo "" # Search in PRDs if [ -d ".claude/prds" ]; then echo "📄 PRDs:" - results=$(grep -l -i "$query" .claude/prds/*.md 2>/dev/null) + results=`grep -l -i "$query" .claude/prds/*.md 2>/dev/null` if [ -n "$results" ]; then for file in $results; do - name=$(basename "$file" .md) - matches=$(grep -c -i "$query" "$file") + name=`basename "$file" .md` + matches=`grep -c -i "$query" "$file"` echo " • $name ($matches matches)" done else @@ -35,11 +35,12 @@ fi # Search in Epics if [ -d ".claude/epics" ]; then echo "📚 Epics:" - results=$(find .claude/epics -name "epic.md" -exec grep -l -i "$query" {} \; 2>/dev/null) + results=`find .claude/epics -name "epic.md" -exec grep -l -i "$query" {} \; 2>/dev/null` if [ -n "$results" ]; then for file in $results; do - epic_name=$(basename $(dirname "$file")) - matches=$(grep -c -i "$query" "$file") + epic_dir=`dirname "$file"` + epic_name=`basename "$epic_dir"` + matches=`grep -c -i "$query" "$file"` echo " • $epic_name ($matches matches)" done else @@ -51,11 +52,12 @@ fi # Search in Tasks if [ -d ".claude/epics" ]; then echo "📝 Tasks:" - results=$(find .claude/epics -name "[0-9]*.md" -exec grep -l -i "$query" {} \; 2>/dev/null | head -10) + results=`find .claude/epics -name "[0-9]*.md" -exec grep -l -i "$query" {} \; 2>/dev/null | head -10` if [ -n "$results" ]; then for file in $results; do - epic_name=$(basename $(dirname "$file")) - task_num=$(basename "$file" .md) + task_dir=`dirname "$file"` + epic_name=`basename "$task_dir"` + task_num=`basename "$file" .md` echo " • Task #$task_num in $epic_name" done else @@ -64,7 +66,7 @@ if [ -d ".claude/epics" ]; then fi # Summary -total=$(find .claude -name "*.md" -exec grep -l -i "$query" {} \; 2>/dev/null | wc -l) +total=`find .claude -name "*.md" -exec grep -l -i "$query" {} \; 2>/dev/null | wc -l` echo "" echo "📊 Total files with matches: $total" diff --git a/ccpm/scripts/pm/standup.sh b/ccpm/scripts/pm/standup.sh index 9992431e7..e4bb8e8b2 100755 --- a/ccpm/scripts/pm/standup.sh +++ b/ccpm/scripts/pm/standup.sh @@ -1,10 +1,10 @@ #!/bin/bash -echo "📅 Daily Standup - $(date '+%Y-%m-%d')" +echo "📅 Daily Standup - `date '+%Y-%m-%d'`" echo "================================" echo "" -today=$(date '+%Y-%m-%d') +today=`date '+%Y-%m-%d'` echo "Getting status..." echo "" @@ -15,14 +15,14 @@ echo "====================" echo "" # Find files modified today -recent_files=$(find .claude -name "*.md" -mtime -1 2>/dev/null) +recent_files=`find .claude -name "*.md" -mtime -1 2>/dev/null` if [ -n "$recent_files" ]; then # Count by type - prd_count=$(echo "$recent_files" | grep -c "/prds/" || echo 0) - epic_count=$(echo "$recent_files" | grep -c "/epic.md" || echo 0) - task_count=$(echo "$recent_files" | grep -c "/[0-9]*.md" || echo 0) - update_count=$(echo "$recent_files" | grep -c "/updates/" || echo 0) + prd_count=`echo "$recent_files" | grep -c "/prds/" || echo 0` + epic_count=`echo "$recent_files" | grep -c "/epic.md" || echo 0` + task_count=`echo "$recent_files" | grep -c "/[0-9]*.md" || echo 0` + update_count=`echo "$recent_files" | grep -c "/updates/" || echo 0` [ $prd_count -gt 0 ] && echo " • Modified $prd_count PRD(s)" [ $epic_count -gt 0 ] && echo " • Updated $epic_count epic(s)" @@ -38,9 +38,11 @@ echo "🔄 Currently In Progress:" for updates_dir in .claude/epics/*/updates/*/; do [ -d "$updates_dir" ] || continue if [ -f "$updates_dir/progress.md" ]; then - issue_num=$(basename "$updates_dir") - epic_name=$(basename $(dirname $(dirname "$updates_dir"))) - completion=$(grep "^completion:" "$updates_dir/progress.md" | head -1 | sed 's/^completion: *//') + issue_num=`basename "$updates_dir"` + updates_parent=`dirname "$updates_dir"` + epic_dir=`dirname "$updates_parent"` + epic_name=`basename "$epic_dir"` + completion=`grep "^completion:" "$updates_dir/progress.md" | head -1 | sed 's/^completion: *//'` echo " • Issue #$issue_num ($epic_name) - ${completion:-0%} complete" fi done @@ -53,25 +55,25 @@ for epic_dir in .claude/epics/*/; do [ -d "$epic_dir" ] || continue for task_file in "$epic_dir"/[0-9]*.md; do [ -f "$task_file" ] || continue - status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//') + status=`grep "^status:" "$task_file" | head -1 | sed 's/^status: *//'` if [ "$status" != "open" ] && [ -n "$status" ]; then continue fi # Extract dependencies from task file - deps_line=$(grep "^depends_on:" "$task_file" | head -1) + deps_line=`grep "^depends_on:" "$task_file" | head -1` if [ -n "$deps_line" ]; then - deps=$(echo "$deps_line" | sed 's/^depends_on: *//') - deps=$(echo "$deps" | sed 's/^\[//' | sed 's/\]$//') + deps=`echo "$deps_line" | sed 's/^depends_on: *//'` + deps=`echo "$deps" | sed 's/^\[//' | sed 's/\]$//'` # Trim whitespace and handle empty cases - deps=$(echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//') + deps=`echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//'` [ -z "$deps" ] && deps="" else deps="" fi if [ -z "$deps" ] || [ "$deps" = "depends_on:" ]; then - task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') - task_num=$(basename "$task_file" .md) + task_name=`grep "^name:" "$task_file" | head -1 | sed 's/^name: *//'` + task_num=`basename "$task_file" .md` echo " • #$task_num - $task_name" ((count++)) [ $count -ge 3 ] && break 2 @@ -81,9 +83,9 @@ done echo "" echo "📊 Quick Stats:" -total_tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l) -open_tasks=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l) -closed_tasks=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l) +total_tasks=`find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l` +open_tasks=`find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l` +closed_tasks=`find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l` echo " Tasks: $open_tasks open, $closed_tasks closed, $total_tasks total" exit 0 diff --git a/ccpm/scripts/pm/status.sh b/ccpm/scripts/pm/status.sh index 8a5e6a559..8bc70b749 100755 --- a/ccpm/scripts/pm/status.sh +++ b/ccpm/scripts/pm/status.sh @@ -11,7 +11,7 @@ echo "" echo "📄 PRDs:" if [ -d ".claude/prds" ]; then - total=$(ls .claude/prds/*.md 2>/dev/null | wc -l) + total=`ls .claude/prds/*.md 2>/dev/null | wc -l` echo " Total: $total" else echo " No PRDs found" @@ -20,7 +20,7 @@ fi echo "" echo "📚 Epics:" if [ -d ".claude/epics" ]; then - total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l) + total=`ls -d .claude/epics/*/ 2>/dev/null | wc -l` echo " Total: $total" else echo " No epics found" @@ -29,9 +29,9 @@ fi echo "" echo "📝 Tasks:" if [ -d ".claude/epics" ]; then - total=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l) - open=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l) - closed=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l) + total=`find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l` + open=`find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l` + closed=`find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l` echo " Open: $open" echo " Closed: $closed" echo " Total: $total" diff --git a/ccpm/scripts/pm/validate.sh b/ccpm/scripts/pm/validate.sh index a8b61386b..504e4346c 100755 --- a/ccpm/scripts/pm/validate.sh +++ b/ccpm/scripts/pm/validate.sh @@ -26,13 +26,13 @@ echo "🗂️ Data Integrity:" for epic_dir in .claude/epics/*/; do [ -d "$epic_dir" ] || continue if [ ! -f "$epic_dir/epic.md" ]; then - echo " ⚠️ Missing epic.md in $(basename "$epic_dir")" + echo " ⚠️ Missing epic.md in `basename "$epic_dir"`" ((warnings++)) fi done # Check for tasks without epics -orphaned=$(find .claude -name "[0-9]*.md" -not -path ".claude/epics/*/*" 2>/dev/null | wc -l) +orphaned=`find .claude -name "[0-9]*.md" -not -path ".claude/epics/*/*" 2>/dev/null | wc -l` [ $orphaned -gt 0 ] && echo " ⚠️ Found $orphaned orphaned task files" && ((warnings++)) # Check for broken references @@ -43,22 +43,22 @@ for task_file in .claude/epics/*/[0-9]*.md; do [ -f "$task_file" ] || continue # Extract dependencies from task file - deps_line=$(grep "^depends_on:" "$task_file" | head -1) + deps_line=`grep "^depends_on:" "$task_file" | head -1` if [ -n "$deps_line" ]; then - deps=$(echo "$deps_line" | sed 's/^depends_on: *//') - deps=$(echo "$deps" | sed 's/^\[//' | sed 's/\]$//') - deps=$(echo "$deps" | sed 's/,/ /g') + deps=`echo "$deps_line" | sed 's/^depends_on: *//'` + deps=`echo "$deps" | sed 's/^\[//' | sed 's/\]$//'` + deps=`echo "$deps" | sed 's/,/ /g'` # Trim whitespace and handle empty cases - deps=$(echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//') + deps=`echo "$deps" | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//'` [ -z "$deps" ] && deps="" else deps="" fi if [ -n "$deps" ] && [ "$deps" != "depends_on:" ]; then - epic_dir=$(dirname "$task_file") + epic_dir=`dirname "$task_file"` for dep in $deps; do if [ ! -f "$epic_dir/$dep.md" ]; then - echo " ⚠️ Task $(basename "$task_file" .md) references missing task: $dep" + echo " ⚠️ Task `basename "$task_file" .md` references missing task: $dep" ((warnings++)) fi done @@ -74,9 +74,9 @@ echo "" echo "📝 Frontmatter Validation:" invalid=0 -for file in $(find .claude -name "*.md" -path "*/epics/*" -o -path "*/prds/*" 2>/dev/null); do +for file in `find .claude -name "*.md" -path "*/epics/*" -o -path "*/prds/*" 2>/dev/null`; do if ! grep -q "^---" "$file"; then - echo " ⚠️ Missing frontmatter: $(basename "$file")" + echo " ⚠️ Missing frontmatter: `basename "$file"`" ((invalid++)) fi done diff --git a/ccpm/scripts/test-and-log.sh b/ccpm/scripts/test-and-log.sh index ef38af305..ebe7a2274 100755 --- a/ccpm/scripts/test-and-log.sh +++ b/ccpm/scripts/test-and-log.sh @@ -32,7 +32,7 @@ if [ $# -ge 2 ]; then LOG_FILE="tests/logs/${LOG_NAME}" else # Extract the test filename without extension for the log name - TEST_NAME=$(basename "$TEST_PATH") + TEST_NAME=`basename "$TEST_PATH"` TEST_NAME=${TEST_NAME%.*} # Remove extension regardless of what it is LOG_FILE="tests/logs/${TEST_NAME}.log" fi @@ -61,9 +61,9 @@ elif [[ "$TEST_PATH" =~ \.(js|ts)$ ]]; then elif [[ "$TEST_PATH" =~ \.java$ ]]; then # Java - try Maven, then Gradle if [ -f pom.xml ]; then - mvn test -Dtest="$(basename "$TEST_PATH" .java)" > "$LOG_FILE" 2>&1 + mvn test -Dtest="`basename "$TEST_PATH" .java`" > "$LOG_FILE" 2>&1 elif [ -f build.gradle ] || [ -f build.gradle.kts ]; then - ./gradlew test --tests "$(basename "$TEST_PATH" .java)" > "$LOG_FILE" 2>&1 + ./gradlew test --tests "`basename "$TEST_PATH" .java`" > "$LOG_FILE" 2>&1 else echo "❌ Java test runner not found (need Maven or Gradle)" > "$LOG_FILE" 2>&1 exit 1 @@ -91,10 +91,10 @@ elif [[ "$TEST_PATH" =~ \.php$ ]]; then fi elif [[ "$TEST_PATH" =~ \.go$ ]]; then # Go - go test "$(dirname "$TEST_PATH")" -v > "$LOG_FILE" 2>&1 + go test "`dirname "$TEST_PATH"`" -v > "$LOG_FILE" 2>&1 elif [[ "$TEST_PATH" =~ \.rs$ ]]; then # Rust - cargo test "$(basename "$TEST_PATH" .rs)" > "$LOG_FILE" 2>&1 + cargo test "`basename "$TEST_PATH" .rs`" > "$LOG_FILE" 2>&1 elif [[ "$TEST_PATH" =~ \.swift$ ]]; then # Swift swift test > "$LOG_FILE" 2>&1