claude-autopm 1.15.5 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Agent Usage - MANDATORY
|
|
2
|
+
|
|
3
|
+
**🚨 CRITICAL: This rule has HIGHEST PRIORITY and MUST be followed for ALL tasks.**
|
|
4
|
+
|
|
5
|
+
## Core Requirement
|
|
6
|
+
|
|
7
|
+
**YOU MUST USE SPECIALIZED AGENTS FOR ALL NON-TRIVIAL TASKS.**
|
|
8
|
+
|
|
9
|
+
Do NOT perform complex tasks yourself. Use the Task tool to delegate to appropriate agents.
|
|
10
|
+
|
|
11
|
+
## When to Use Agents
|
|
12
|
+
|
|
13
|
+
### ✅ ALWAYS Use Agents For:
|
|
14
|
+
|
|
15
|
+
1. **Writing Code** (any language)
|
|
16
|
+
- Use: `python-backend-engineer`, `react-frontend-engineer`, `nodejs-backend-engineer`
|
|
17
|
+
- Example: "I need to create an API endpoint" → Use python-backend-engineer
|
|
18
|
+
|
|
19
|
+
2. **Testing**
|
|
20
|
+
- Use: `test-runner`, `frontend-testing-engineer`, `e2e-test-engineer`
|
|
21
|
+
- Example: "Run the test suite" → Use test-runner
|
|
22
|
+
|
|
23
|
+
3. **Infrastructure/DevOps**
|
|
24
|
+
- Use: `kubernetes-orchestrator`, `docker-containerization-expert`, `terraform-infrastructure-expert`
|
|
25
|
+
- Example: "Deploy to Kubernetes" → Use kubernetes-orchestrator
|
|
26
|
+
|
|
27
|
+
4. **Database Work**
|
|
28
|
+
- Use: `postgresql-expert`, `mongodb-expert`, `bigquery-expert`
|
|
29
|
+
- Example: "Design database schema" → Use postgresql-expert
|
|
30
|
+
|
|
31
|
+
5. **Code Analysis**
|
|
32
|
+
- Use: `code-analyzer`
|
|
33
|
+
- Example: "Review this code for bugs" → Use code-analyzer
|
|
34
|
+
|
|
35
|
+
6. **GitHub/Azure DevOps Operations**
|
|
36
|
+
- Use: `github-operations-specialist`, `azure-devops-specialist`
|
|
37
|
+
- Example: "Create a PR" → Use github-operations-specialist
|
|
38
|
+
|
|
39
|
+
7. **Large File Analysis**
|
|
40
|
+
- Use: `file-analyzer`
|
|
41
|
+
- Example: "Summarize this 10k line log file" → Use file-analyzer
|
|
42
|
+
|
|
43
|
+
### ⚪ Can Do Yourself:
|
|
44
|
+
|
|
45
|
+
1. **Simple file reads** (1-2 files, quick lookup)
|
|
46
|
+
2. **Simple bash commands** (ls, pwd, basic git commands)
|
|
47
|
+
3. **Answering questions** about existing code/documentation
|
|
48
|
+
4. **Creating todo lists** with TodoWrite
|
|
49
|
+
|
|
50
|
+
## Agent Selection Guide
|
|
51
|
+
|
|
52
|
+
### By Task Type
|
|
53
|
+
|
|
54
|
+
| Task | Agent | Example |
|
|
55
|
+
|------|-------|---------|
|
|
56
|
+
| Python API development | `python-backend-engineer` | Build FastAPI endpoint |
|
|
57
|
+
| React component | `react-frontend-engineer` | Create dashboard UI |
|
|
58
|
+
| Database schema | `postgresql-expert` | Design user tables |
|
|
59
|
+
| Kubernetes deployment | `kubernetes-orchestrator` | Deploy to K8s cluster |
|
|
60
|
+
| Docker container | `docker-containerization-expert` | Create Dockerfile |
|
|
61
|
+
| GitHub workflow | `github-operations-specialist` | Setup CI/CD |
|
|
62
|
+
| Code review | `code-analyzer` | Find bugs in PR |
|
|
63
|
+
| Test execution | `test-runner` | Run test suite |
|
|
64
|
+
| Log analysis | `file-analyzer` | Parse 50MB log file |
|
|
65
|
+
|
|
66
|
+
### By Technology
|
|
67
|
+
|
|
68
|
+
| Technology | Primary Agent | Secondary Agent |
|
|
69
|
+
|------------|---------------|-----------------|
|
|
70
|
+
| Python/FastAPI | `python-backend-engineer` | `postgresql-expert` for DB |
|
|
71
|
+
| React/Next.js | `react-frontend-engineer` | `tailwindcss-expert` for styles |
|
|
72
|
+
| Node.js/Express | `nodejs-backend-engineer` | `mongodb-expert` for DB |
|
|
73
|
+
| TypeScript | `javascript-frontend-engineer` | Language-specific |
|
|
74
|
+
| Kubernetes | `kubernetes-orchestrator` | `docker-containerization-expert` |
|
|
75
|
+
| Terraform | `terraform-infrastructure-expert` | Cloud-specific architects |
|
|
76
|
+
| Testing | `test-runner` | `frontend-testing-engineer` |
|
|
77
|
+
|
|
78
|
+
## Violation Examples
|
|
79
|
+
|
|
80
|
+
### ❌ WRONG - Doing It Yourself:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
User: "Create a FastAPI endpoint for user registration"
|
|
84
|
+
You: *writes Python code directly*
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### ✅ CORRECT - Using Agent:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
User: "Create a FastAPI endpoint for user registration"
|
|
91
|
+
You: "I'll use the python-backend-engineer agent to create this endpoint"
|
|
92
|
+
*Uses Task tool with python-backend-engineer*
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### ❌ WRONG - Not Using Agent for Analysis:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
User: "Review this 5000 line file for security issues"
|
|
99
|
+
You: *reads file and tries to analyze*
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### ✅ CORRECT - Using Agent:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
User: "Review this 5000 line file for security issues"
|
|
106
|
+
You: "I'll use the code-analyzer agent to review this file"
|
|
107
|
+
*Uses Task tool with code-analyzer*
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## How to Use Agents
|
|
111
|
+
|
|
112
|
+
### Single Task:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
I'll use the [agent-name] agent to [task description].
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Then invoke Task tool:
|
|
119
|
+
- `subagent_type`: Agent name (e.g., "python-backend-engineer")
|
|
120
|
+
- `description`: Short task description
|
|
121
|
+
- `prompt`: Detailed task requirements
|
|
122
|
+
|
|
123
|
+
### Multiple Parallel Tasks:
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
I'll launch multiple agents in parallel:
|
|
127
|
+
1. python-backend-engineer - Create API endpoints
|
|
128
|
+
2. react-frontend-engineer - Build dashboard UI
|
|
129
|
+
3. postgresql-expert - Design database schema
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Then invoke multiple Task tools IN SINGLE MESSAGE.
|
|
133
|
+
|
|
134
|
+
## Active Team Agents
|
|
135
|
+
|
|
136
|
+
**Check the "Active Team Agents" section at the top of CLAUDE.md** for the current list of available agents in this project.
|
|
137
|
+
|
|
138
|
+
If you need an agent that's not listed, you can still use any agent from the registry. The active team list is just a convenience reference.
|
|
139
|
+
|
|
140
|
+
## Common Mistakes to Avoid
|
|
141
|
+
|
|
142
|
+
1. ❌ **Not reading Active Team Agents section** - Always check what agents are available
|
|
143
|
+
2. ❌ **Writing code yourself for non-trivial tasks** - Use appropriate agent
|
|
144
|
+
3. ❌ **Not using parallel agents** - Launch multiple agents when tasks are independent
|
|
145
|
+
4. ❌ **Using wrong agent for task** - Match agent specialty to task type
|
|
146
|
+
5. ❌ **Forgetting file-analyzer for large files** - Use it for files >1000 lines or logs
|
|
147
|
+
|
|
148
|
+
## Enforcement
|
|
149
|
+
|
|
150
|
+
This rule is enforced through:
|
|
151
|
+
|
|
152
|
+
1. **Git Hooks** - Pre-commit checks for agent usage patterns
|
|
153
|
+
2. **Code Review** - Human reviewers check for proper agent delegation
|
|
154
|
+
3. **Self-Monitoring** - You must self-enforce and explain why you're using/not using agents
|
|
155
|
+
|
|
156
|
+
## Questions?
|
|
157
|
+
|
|
158
|
+
If you're unsure whether to use an agent:
|
|
159
|
+
- **Default: YES, use an agent**
|
|
160
|
+
- When in doubt, delegate to specialist
|
|
161
|
+
- Better to over-use agents than under-use them
|
|
162
|
+
|
|
163
|
+
## Summary
|
|
164
|
+
|
|
165
|
+
**Before doing ANY complex task, ask yourself:**
|
|
166
|
+
1. Is there a specialized agent for this?
|
|
167
|
+
2. Would an agent do this better/faster/more thoroughly?
|
|
168
|
+
3. Am I trying to do something I should delegate?
|
|
169
|
+
|
|
170
|
+
**If answer is YES to any → USE THE AGENT!**
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
> Think carefully and implement the most concise solution that changes as little code as possible.
|
|
4
4
|
|
|
5
|
+
## 🚨 AGENT USAGE - MANDATORY
|
|
6
|
+
|
|
7
|
+
**CRITICAL: You MUST use specialized agents for ALL non-trivial tasks.**
|
|
8
|
+
|
|
9
|
+
See: `.claude/rules/agent-mandatory.md` for complete enforcement rules.
|
|
10
|
+
|
|
11
|
+
### Quick Reference - When to Use Agents:
|
|
12
|
+
|
|
13
|
+
| Task Type | Agent | Example |
|
|
14
|
+
|-----------|-------|---------|
|
|
15
|
+
| Python code | `python-backend-engineer` | Build FastAPI endpoint |
|
|
16
|
+
| React/UI | `react-frontend-engineer` | Create dashboard component |
|
|
17
|
+
| Testing | `test-runner` | Run test suite |
|
|
18
|
+
| Database | `postgresql-expert`, `mongodb-expert` | Design schema |
|
|
19
|
+
| DevOps | `kubernetes-orchestrator`, `docker-containerization-expert` | Deploy app |
|
|
20
|
+
| Code review | `code-analyzer` | Find bugs/security issues |
|
|
21
|
+
| Large files | `file-analyzer` | Parse logs >1000 lines |
|
|
22
|
+
|
|
23
|
+
**Before doing ANY complex task**: Check if there's a specialized agent. If YES → USE IT!
|
|
24
|
+
|
|
5
25
|
## Active Team Agents
|
|
6
26
|
|
|
7
27
|
<!-- AGENTS_START -->
|
|
@@ -13,10 +33,14 @@
|
|
|
13
33
|
|
|
14
34
|
All rule files in `.claude/rules/` define mandatory behaviors and must be followed:
|
|
15
35
|
|
|
16
|
-
###
|
|
36
|
+
### 🚨 HIGHEST PRIORITY Rules
|
|
17
37
|
|
|
18
|
-
- **
|
|
38
|
+
- **agent-mandatory.md** - MANDATORY agent usage for all non-trivial tasks. READ THIS FIRST!
|
|
39
|
+
- **tdd.enforcement.md** - Test-Driven Development cycle (RED-GREEN-REFACTOR)
|
|
19
40
|
- **pipeline-mandatory.md** - Required pipelines for errors, features, bugs, code search, and log analysis
|
|
41
|
+
|
|
42
|
+
### Core Development Rules
|
|
43
|
+
|
|
20
44
|
- **naming-conventions.md** - Naming standards, code quality requirements, and prohibited patterns
|
|
21
45
|
- **context-optimization.md** - Agent usage patterns for context preservation (<20% data return)
|
|
22
46
|
- **development-workflow.md** - Development patterns, search-before-create, and best practices
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Epic Status Checker
|
|
4
|
+
# Part of ClaudeAutoPM Framework
|
|
5
|
+
# Usage: ./scripts/epic-status.sh [epic-name]
|
|
6
|
+
|
|
7
|
+
EPIC_NAME=${1:-}
|
|
8
|
+
|
|
9
|
+
if [ -z "$EPIC_NAME" ]; then
|
|
10
|
+
echo "Usage: $0 <epic-name>"
|
|
11
|
+
echo ""
|
|
12
|
+
echo "Available epics:"
|
|
13
|
+
if [ -d ".claude/epics" ]; then
|
|
14
|
+
ls -1 .claude/epics/ 2>/dev/null || echo "No epics found"
|
|
15
|
+
else
|
|
16
|
+
echo "No .claude/epics directory found"
|
|
17
|
+
fi
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
EPIC_DIR=".claude/epics/$EPIC_NAME"
|
|
22
|
+
|
|
23
|
+
if [ ! -d "$EPIC_DIR" ]; then
|
|
24
|
+
echo "Error: Epic '$EPIC_NAME' not found"
|
|
25
|
+
echo ""
|
|
26
|
+
echo "Available epics:"
|
|
27
|
+
ls -1 .claude/epics/ 2>/dev/null
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
echo "Epic: $EPIC_NAME"
|
|
32
|
+
echo "===================="
|
|
33
|
+
echo ""
|
|
34
|
+
|
|
35
|
+
# Count total tasks
|
|
36
|
+
total_tasks=$(find "$EPIC_DIR" -maxdepth 2 -name "[0-9][0-9][0-9].md" 2>/dev/null | wc -l | tr -d ' ')
|
|
37
|
+
|
|
38
|
+
# Count completed tasks (looking for status: completed in frontmatter)
|
|
39
|
+
completed=0
|
|
40
|
+
in_progress=0
|
|
41
|
+
pending=0
|
|
42
|
+
|
|
43
|
+
for task_file in $(find "$EPIC_DIR" -maxdepth 2 -name "[0-9][0-9][0-9].md" 2>/dev/null); do
|
|
44
|
+
if grep -q "^status: completed" "$task_file" 2>/dev/null; then
|
|
45
|
+
completed=$((completed + 1))
|
|
46
|
+
elif grep -q "^status: in-progress\|^status: in_progress" "$task_file" 2>/dev/null; then
|
|
47
|
+
in_progress=$((in_progress + 1))
|
|
48
|
+
else
|
|
49
|
+
pending=$((pending + 1))
|
|
50
|
+
fi
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
# Calculate progress percentage
|
|
54
|
+
if [ "$total_tasks" -gt 0 ]; then
|
|
55
|
+
progress=$((completed * 100 / total_tasks))
|
|
56
|
+
else
|
|
57
|
+
progress=0
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "Total tasks: $total_tasks"
|
|
61
|
+
echo "Completed: $completed ($progress%)"
|
|
62
|
+
echo "In Progress: $in_progress"
|
|
63
|
+
echo "Pending: $pending"
|
|
64
|
+
echo ""
|
|
65
|
+
|
|
66
|
+
# Progress bar
|
|
67
|
+
if [ "$total_tasks" -gt 0 ]; then
|
|
68
|
+
bar_length=50
|
|
69
|
+
filled=$((progress * bar_length / 100))
|
|
70
|
+
empty=$((bar_length - filled))
|
|
71
|
+
|
|
72
|
+
printf "Progress: ["
|
|
73
|
+
printf "%${filled}s" | tr ' ' '='
|
|
74
|
+
printf "%${empty}s" | tr ' ' '-'
|
|
75
|
+
printf "] %d%%\n" "$progress"
|
|
76
|
+
echo ""
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# Show breakdown by sub-epic if they exist
|
|
80
|
+
sub_dirs=$(find "$EPIC_DIR" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
|
|
81
|
+
|
|
82
|
+
if [ "$sub_dirs" -gt 0 ]; then
|
|
83
|
+
echo "Sub-Epic Breakdown:"
|
|
84
|
+
echo "-------------------"
|
|
85
|
+
|
|
86
|
+
for sub_dir in "$EPIC_DIR"/*/; do
|
|
87
|
+
if [ -d "$sub_dir" ]; then
|
|
88
|
+
sub_name=$(basename "$sub_dir")
|
|
89
|
+
sub_count=$(find "$sub_dir" -maxdepth 1 -name "[0-9][0-9][0-9].md" 2>/dev/null | wc -l | tr -d ' ')
|
|
90
|
+
|
|
91
|
+
if [ "$sub_count" -gt 0 ]; then
|
|
92
|
+
# Count completed in sub-epic
|
|
93
|
+
sub_completed=0
|
|
94
|
+
for task_file in $(find "$sub_dir" -maxdepth 1 -name "[0-9][0-9][0-9].md" 2>/dev/null); do
|
|
95
|
+
if grep -q "^status: completed" "$task_file" 2>/dev/null; then
|
|
96
|
+
sub_completed=$((sub_completed + 1))
|
|
97
|
+
fi
|
|
98
|
+
done
|
|
99
|
+
|
|
100
|
+
printf " %-30s %3d tasks (%d completed)\n" "$sub_name" "$sub_count" "$sub_completed"
|
|
101
|
+
fi
|
|
102
|
+
fi
|
|
103
|
+
done
|
|
104
|
+
fi
|
package/bin/autopm.js
CHANGED
|
@@ -180,6 +180,8 @@ function main() {
|
|
|
180
180
|
.command(require('./commands/config'))
|
|
181
181
|
// MCP management command
|
|
182
182
|
.command(require('./commands/mcp'))
|
|
183
|
+
// Epic management command
|
|
184
|
+
.command(require('./commands/epic'))
|
|
183
185
|
// Validation command
|
|
184
186
|
.command('validate', 'Validate ClaudeAutoPM configuration and setup',
|
|
185
187
|
(yargs) => {
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Epic Command for autopm CLI
|
|
3
|
+
* Manages epic status, breakdown, and analysis
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
command: 'epic <action> [name]',
|
|
12
|
+
describe: 'Manage epics and view epic status',
|
|
13
|
+
|
|
14
|
+
builder: (yargs) => {
|
|
15
|
+
return yargs
|
|
16
|
+
.positional('action', {
|
|
17
|
+
describe: 'Epic action to perform',
|
|
18
|
+
type: 'string',
|
|
19
|
+
choices: ['status', 'list', 'breakdown']
|
|
20
|
+
})
|
|
21
|
+
.positional('name', {
|
|
22
|
+
describe: 'Epic name (for status action)',
|
|
23
|
+
type: 'string'
|
|
24
|
+
})
|
|
25
|
+
.option('detailed', {
|
|
26
|
+
alias: 'd',
|
|
27
|
+
describe: 'Show detailed breakdown',
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
default: false
|
|
30
|
+
})
|
|
31
|
+
.example('autopm epic list', 'List all available epics')
|
|
32
|
+
.example('autopm epic status fullstack', 'Show status of fullstack epic')
|
|
33
|
+
.example('autopm epic breakdown fullstack', 'Show detailed task breakdown');
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
handler: async (argv) => {
|
|
37
|
+
const action = argv.action;
|
|
38
|
+
const name = argv.name;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
switch (action) {
|
|
42
|
+
case 'list':
|
|
43
|
+
listEpics();
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'status':
|
|
47
|
+
if (!name) {
|
|
48
|
+
console.error('Error: Epic name required for status action');
|
|
49
|
+
console.log('Usage: autopm epic status <epic-name>');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
showEpicStatus(name);
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 'breakdown':
|
|
56
|
+
if (!name) {
|
|
57
|
+
console.error('Error: Epic name required for breakdown action');
|
|
58
|
+
console.log('Usage: autopm epic breakdown <epic-name>');
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
showEpicBreakdown(name);
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
default:
|
|
65
|
+
console.error(`Unknown action: ${action}`);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error('Error:', error.message);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
function listEpics() {
|
|
76
|
+
const epicsDir = path.join(process.cwd(), '.claude', 'epics');
|
|
77
|
+
|
|
78
|
+
if (!fs.existsSync(epicsDir)) {
|
|
79
|
+
console.log('No epics found. Create epics with /pm:epic-split or /pm:epic-decompose');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const epics = fs.readdirSync(epicsDir).filter(f => {
|
|
84
|
+
return fs.statSync(path.join(epicsDir, f)).isDirectory();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
if (epics.length === 0) {
|
|
88
|
+
console.log('No epics found. Create epics with /pm:epic-split or /pm:epic-decompose');
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log('Available Epics:');
|
|
93
|
+
console.log('================\n');
|
|
94
|
+
|
|
95
|
+
epics.forEach(epic => {
|
|
96
|
+
console.log(` • ${epic}`);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
console.log('');
|
|
100
|
+
console.log('Use: autopm epic status <epic-name> to see details');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function showEpicStatus(epicName) {
|
|
104
|
+
const scriptPath = path.join(process.cwd(), 'scripts', 'epic-status.sh');
|
|
105
|
+
|
|
106
|
+
if (!fs.existsSync(scriptPath)) {
|
|
107
|
+
console.error('Error: epic-status.sh script not found');
|
|
108
|
+
console.error('Run: autopm install to get the latest scripts');
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
execSync(`bash "${scriptPath}" "${epicName}"`, {
|
|
114
|
+
stdio: 'inherit',
|
|
115
|
+
cwd: process.cwd()
|
|
116
|
+
});
|
|
117
|
+
} catch (error) {
|
|
118
|
+
process.exit(error.status || 1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function showEpicBreakdown(epicName) {
|
|
123
|
+
const epicDir = path.join(process.cwd(), '.claude', 'epics', epicName);
|
|
124
|
+
|
|
125
|
+
if (!fs.existsSync(epicDir)) {
|
|
126
|
+
console.error(`Error: Epic '${epicName}' not found`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log(`Epic Breakdown: ${epicName}`);
|
|
131
|
+
console.log('='.repeat(50));
|
|
132
|
+
console.log('');
|
|
133
|
+
|
|
134
|
+
// Find all task files
|
|
135
|
+
const findTasks = (dir, prefix = '') => {
|
|
136
|
+
const items = fs.readdirSync(dir);
|
|
137
|
+
|
|
138
|
+
items.forEach(item => {
|
|
139
|
+
const itemPath = path.join(dir, item);
|
|
140
|
+
const stat = fs.statSync(itemPath);
|
|
141
|
+
|
|
142
|
+
if (stat.isDirectory()) {
|
|
143
|
+
console.log(`\n${prefix}📁 ${item}`);
|
|
144
|
+
findTasks(itemPath, prefix + ' ');
|
|
145
|
+
} else if (item.match(/^\d{3}\.md$/)) {
|
|
146
|
+
const content = fs.readFileSync(itemPath, 'utf-8');
|
|
147
|
+
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
148
|
+
const statusMatch = content.match(/^status:\s+(.+)$/m);
|
|
149
|
+
|
|
150
|
+
const title = titleMatch ? titleMatch[1] : item;
|
|
151
|
+
const status = statusMatch ? statusMatch[1] : 'pending';
|
|
152
|
+
|
|
153
|
+
const icon = status === 'completed' ? '✅' : status === 'in-progress' ? '🔄' : '⚪';
|
|
154
|
+
|
|
155
|
+
console.log(`${prefix} ${icon} ${item}: ${title}`);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
findTasks(epicDir);
|
|
161
|
+
}
|
package/install/install.js
CHANGED
|
@@ -38,6 +38,7 @@ class Installer {
|
|
|
38
38
|
'.claude/agents',
|
|
39
39
|
'.claude/commands',
|
|
40
40
|
'.claude/rules',
|
|
41
|
+
'.claude/hooks',
|
|
41
42
|
'.claude/scripts',
|
|
42
43
|
'.claude/checklists',
|
|
43
44
|
'.claude/strategies',
|
|
@@ -323,7 +324,8 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
|
|
|
323
324
|
'safe-commit.sh',
|
|
324
325
|
'safe-commit.js',
|
|
325
326
|
'setup-hooks.sh',
|
|
326
|
-
'setup-hooks.js'
|
|
327
|
+
'setup-hooks.js',
|
|
328
|
+
'epic-status.sh'
|
|
327
329
|
];
|
|
328
330
|
|
|
329
331
|
for (const script of scripts) {
|