claude-autopm 1.20.0 → 1.21.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.
- package/README.md +255 -878
- package/autopm/.claude/agents/README.md +1 -1
- package/autopm/.claude/agents/decision-matrices/python-backend-selection.md +25 -25
- package/autopm/.claude/agents/decision-matrices/ui-framework-selection.md +43 -43
- package/autopm/.claude/agents/devops/github-operations-specialist.md +1 -1
- package/autopm/.claude/agents/frameworks/README.md +5 -5
- package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +1 -1
- package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +1 -1
- package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +1 -1
- package/autopm/.claude/agents/frameworks/react-ui-expert.md +3 -3
- package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +3 -3
- package/autopm/.claude/agents/frameworks/ux-design-expert.md +3 -3
- package/autopm/.claude/commands/infrastructure/traefik-setup.md +1 -1
- package/autopm/.claude/commands/playwright/test-scaffold.md +1 -1
- package/autopm/.claude/commands/pm/epic-sync.md +37 -4
- package/autopm/.claude/commands/ui/bootstrap-scaffold.md +6 -5
- package/autopm/.claude/commands/ui/tailwind-system.md +1 -1
- package/autopm/.claude/examples/mcp/playwright-mcp.md +2 -2
- package/autopm/.claude/examples/mcp-servers.example.json +2 -2
- package/autopm/.claude/hooks/docker-first-enforcement.sh +1 -1
- package/autopm/.claude/mcp/playwright-mcp.md +2 -2
- package/autopm/.claude/rules/agent-coordination.md +26 -24
- package/autopm/.claude/rules/docker-first-development.md +1 -1
- package/autopm/.claude/rules/framework-path-rules.md +180 -0
- package/autopm/.claude/rules/infrastructure-pipeline.md +1 -1
- package/autopm/.claude/rules/ui-development-standards.md +1 -1
- package/autopm/.claude/rules/visual-testing.md +3 -3
- package/autopm/.claude/scripts/pm/epic-sync/README.md +208 -0
- package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +68 -192
- package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +60 -328
- package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +61 -354
- package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +67 -305
- package/autopm/.claude/scripts/pm/epic-sync.sh +137 -0
- package/autopm/.claude/teams.json +3 -5
- package/autopm/.claude/templates/claude-templates/addons/devops-agents.md +2 -2
- package/autopm/.claude/templates/claude-templates/addons/docker-agents.md +4 -4
- package/autopm/.claude/templates/claude-templates/addons/minimal-agents.md +1 -1
- package/autopm/.claude/templates/issue-decomposition/api.yaml +2 -2
- package/autopm/.claude/templates/issue-decomposition/auth.yaml +4 -4
- package/autopm/.claude/templates/issue-decomposition/crud.yaml +3 -3
- package/autopm/.claude/templates/issue-decomposition/default.yaml +1 -1
- package/autopm/.claude/templates/issue-decomposition/ui-feature.yaml +2 -2
- package/package.json +4 -3
- package/scripts/validate-framework-paths.sh +104 -0
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"react-docs": {
|
|
39
39
|
"type": "shared",
|
|
40
|
-
"agents": ["react-frontend-engineer", "
|
|
40
|
+
"agents": ["react-frontend-engineer", "frontend-testing-engineer"],
|
|
41
41
|
"sources": ["context7"],
|
|
42
42
|
"filters": ["react", "nextjs", "typescript", "tailwind", "vite"],
|
|
43
43
|
"maxSize": "75MB",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"testing-context": {
|
|
66
66
|
"type": "shared",
|
|
67
|
-
"agents": ["
|
|
67
|
+
"agents": ["frontend-testing-engineer", "test-runner"],
|
|
68
68
|
"sources": ["context7", "playwright-mcp"],
|
|
69
69
|
"filters": ["playwright", "testing", "e2e"],
|
|
70
70
|
"maxSize": "50MB",
|
|
@@ -89,7 +89,7 @@ check_docker_files() {
|
|
|
89
89
|
if [[ ${#missing_files[@]} -gt 0 ]]; then
|
|
90
90
|
echo ""
|
|
91
91
|
echo "📝 MISSING FILES: ${missing_files[*]}"
|
|
92
|
-
echo "💡 TIP: Use docker-expert agent to create Docker files:"
|
|
92
|
+
echo "💡 TIP: Use docker-containerization-expert agent to create Docker files:"
|
|
93
93
|
echo " Task: Create Docker development environment for this project"
|
|
94
94
|
echo ""
|
|
95
95
|
fi
|
|
@@ -74,7 +74,7 @@ autopm mcp sync
|
|
|
74
74
|
### Integration with Agents
|
|
75
75
|
|
|
76
76
|
Used extensively with:
|
|
77
|
-
- `
|
|
77
|
+
- `frontend-testing-engineer` - For E2E test creation
|
|
78
78
|
- `react-frontend-engineer` - For UI testing
|
|
79
79
|
- `ux-design-expert` - For visual regression
|
|
80
80
|
|
|
@@ -309,4 +309,4 @@ npx playwright show-trace trace.zip
|
|
|
309
309
|
|
|
310
310
|
- [Playwright Documentation](https://playwright.dev)
|
|
311
311
|
- [MCP Browser Control](https://modelcontextprotocol.org/browser)
|
|
312
|
-
- [E2E Test Engineer Agent](../agents/frameworks/
|
|
312
|
+
- [E2E Test Engineer Agent](../agents/frameworks/frontend-testing-engineer.md)
|
|
@@ -20,10 +20,10 @@ Comprehensive coordination system for multi-agent collaboration in ClaudeAutoPM.
|
|
|
20
20
|
| python-backend-expert | Backend APIs | `*.py`, `requirements.txt`, `pyproject.toml` | react-ui-expert, kubernetes, cloud architects | framework: fastapi/flask/django |
|
|
21
21
|
| react-ui-expert | Frontend UI | `*.tsx`, `*.jsx`, `*.css`, `package.json` | python-backend, e2e-test | framework: mui/chakra/antd/bootstrap |
|
|
22
22
|
| e2e-test-engineer | E2E Tests | `tests/`, `*.spec.ts`, `playwright.config.ts` | react-ui, python-backend | tool: playwright/cypress |
|
|
23
|
-
|
|
|
23
|
+
| terraform-infrastructure-expert | Cloud Infrastructure | `terraform/`, `*.tf`, cloud configs | kubernetes, docker, cloud architects | provider: aws/azure/gcp |
|
|
24
24
|
| kubernetes-orchestrator | K8s Manifests | `k8s/`, `charts/`, `*.yaml` | cloud architects, github-ops | tool: helm/kustomize |
|
|
25
25
|
| docker-containerization-expert | Containers | `Dockerfile*`, `docker-compose*.yml` | All deployment agents | strategy: multi-stage/compose |
|
|
26
|
-
|
|
|
26
|
+
| postgresql-expert / mongodb-expert | Database | `migrations/`, `*.sql`, schema files | python-backend-engineer | engine: postgresql/mongodb/redis |
|
|
27
27
|
| github-operations-specialist | CI/CD | `.github/`, `*.yml`, `*.yaml` | All agents | platform: actions/azure-devops |
|
|
28
28
|
| mcp-context-manager | Context | `.claude/mcp-servers.json`, context pools | All agents | pool: shared/isolated |
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ Comprehensive coordination system for multi-agent collaboration in ClaudeAutoPM.
|
|
|
32
32
|
| Agent | Use Case | Replaces |
|
|
33
33
|
|-------|----------|----------|
|
|
34
34
|
| azure-devops-specialist | Azure DevOps specific | Part of github-operations |
|
|
35
|
-
|
|
|
35
|
+
| e2e-test-engineer | E2E testing with Playwright/Cypress | Support role |
|
|
36
36
|
| code-analyzer | Read-only analysis | Support role |
|
|
37
37
|
| file-analyzer | Log/file summarization | Support role |
|
|
38
38
|
| test-runner | Test execution only | Support role |
|
|
@@ -103,7 +103,7 @@ Notes: Added rate limiting middleware
|
|
|
103
103
|
|
|
104
104
|
```yaml
|
|
105
105
|
backend-context:
|
|
106
|
-
agents: [python-backend-expert,
|
|
106
|
+
agents: [python-backend-expert, postgresql-expert, mongodb-expert]
|
|
107
107
|
sources: [context7, context7]
|
|
108
108
|
filters: [python, fastapi, flask, django, sqlalchemy, databases]
|
|
109
109
|
persistence: true
|
|
@@ -115,7 +115,7 @@ frontend-context:
|
|
|
115
115
|
persistence: true
|
|
116
116
|
|
|
117
117
|
infrastructure-context:
|
|
118
|
-
agents: [
|
|
118
|
+
agents: [terraform-infrastructure-expert, kubernetes-orchestrator, docker-containerization-expert]
|
|
119
119
|
sources: [context7, terraform-registry]
|
|
120
120
|
filters: [terraform, kubernetes, docker, cloud-providers]
|
|
121
121
|
persistence: true
|
|
@@ -159,7 +159,7 @@ Stream B: Frontend Development
|
|
|
159
159
|
Priority: P1
|
|
160
160
|
|
|
161
161
|
Stream C: Infrastructure
|
|
162
|
-
Agent:
|
|
162
|
+
Agent: terraform-infrastructure-expert
|
|
163
163
|
Parameters:
|
|
164
164
|
provider: aws
|
|
165
165
|
iac: terraform
|
|
@@ -243,7 +243,7 @@ graph LR
|
|
|
243
243
|
B -->|UI Ready| C[e2e-test-engineer]
|
|
244
244
|
C -->|Tests Pass| D[github-operations-specialist]
|
|
245
245
|
D -->|CI/CD Ready| E[kubernetes-orchestrator]
|
|
246
|
-
E -->|Deployment Config| F[
|
|
246
|
+
E -->|Deployment Config| F[terraform-infrastructure-expert]
|
|
247
247
|
F -->|Infrastructure| G[Production]
|
|
248
248
|
```
|
|
249
249
|
|
|
@@ -261,7 +261,7 @@ graph LR
|
|
|
261
261
|
|
|
262
262
|
```mermaid
|
|
263
263
|
graph LR
|
|
264
|
-
A[
|
|
264
|
+
A[terraform-infrastructure-expert] -->|New Infrastructure| B[docker-containerization-expert]
|
|
265
265
|
B -->|Updated Images| C[kubernetes-orchestrator]
|
|
266
266
|
C -->|Manifests Ready| D[github-operations-specialist]
|
|
267
267
|
D -->|Blue-Green Deploy| E[Production]
|
|
@@ -325,11 +325,11 @@ git commit -m "Multiple changes"
|
|
|
325
325
|
|
|
326
326
|
| Scenario | Priority | Lead Agent | Support Agents | SLA |
|
|
327
327
|
|----------|----------|------------|----------------|-----|
|
|
328
|
-
| Production Down | P0 | kubernetes-orchestrator |
|
|
328
|
+
| Production Down | P0 | kubernetes-orchestrator | terraform-infrastructure-expert, python-backend | 15 min |
|
|
329
329
|
| Security Vulnerability | P0 | code-analyzer | python-backend, github-ops | 30 min |
|
|
330
|
-
| Data Loss Risk | P0 |
|
|
330
|
+
| Data Loss Risk | P0 | postgresql-expert | terraform-infrastructure-expert, kubernetes | 15 min |
|
|
331
331
|
| Failed Deployment | P1 | github-operations-specialist | kubernetes-orchestrator | 1 hour |
|
|
332
|
-
| Performance Degradation | P1 | python-backend-expert |
|
|
332
|
+
| Performance Degradation | P1 | python-backend-expert | postgresql-expert, terraform-infrastructure-expert | 2 hours |
|
|
333
333
|
| Test Failures | P2 | e2e-test-engineer | react-ui, python-backend | 4 hours |
|
|
334
334
|
| Feature Development | P3 | Varies by stream | Full stack team | 1-5 days |
|
|
335
335
|
| Technical Debt | P4 | code-analyzer | All relevant agents | Best effort |
|
|
@@ -338,13 +338,13 @@ git commit -m "Multiple changes"
|
|
|
338
338
|
|
|
339
339
|
### Never Modify Without Coordination
|
|
340
340
|
|
|
341
|
-
- **Production configurations** - Requires
|
|
341
|
+
- **Production configurations** - Requires terraform-infrastructure-expert + kubernetes-orchestrator
|
|
342
342
|
- **Security settings** - Requires security review + python-backend-expert
|
|
343
343
|
- **API contracts** - Requires python-backend + react-ui agreement
|
|
344
|
-
- **Database schemas** - Requires
|
|
344
|
+
- **Database schemas** - Requires postgresql-expert + python-backend
|
|
345
345
|
- **Authentication flows** - Requires security review + full stack team
|
|
346
346
|
- **Payment processing** - Requires security + compliance review
|
|
347
|
-
- **User data handling** - Requires privacy review +
|
|
347
|
+
- **User data handling** - Requires privacy review + postgresql-expert
|
|
348
348
|
|
|
349
349
|
### Safe for Independent Work
|
|
350
350
|
|
|
@@ -405,31 +405,31 @@ git commit -m "chore: Sync checkpoint"
|
|
|
405
405
|
### System Down
|
|
406
406
|
|
|
407
407
|
1. **kubernetes-orchestrator** takes incident command
|
|
408
|
-
2. **
|
|
408
|
+
2. **terraform-infrastructure-expert** checks infrastructure health
|
|
409
409
|
3. **python-backend-expert** validates application state
|
|
410
|
-
4. **
|
|
410
|
+
4. **postgresql-expert** verifies data integrity
|
|
411
411
|
5. **github-operations-specialist** prepares rollback if needed
|
|
412
412
|
|
|
413
413
|
### Security Breach
|
|
414
414
|
|
|
415
415
|
1. **code-analyzer** identifies scope and entry point
|
|
416
|
-
2. **
|
|
416
|
+
2. **terraform-infrastructure-expert** isolates affected resources
|
|
417
417
|
3. **python-backend-expert** patches vulnerability
|
|
418
|
-
4. **
|
|
418
|
+
4. **postgresql-expert** audits data access
|
|
419
419
|
5. **github-operations-specialist** deploys emergency fix
|
|
420
420
|
|
|
421
421
|
### Performance Crisis
|
|
422
422
|
|
|
423
423
|
1. **python-backend-expert** profiles application bottlenecks
|
|
424
|
-
2. **
|
|
424
|
+
2. **postgresql-expert** analyzes and optimizes queries
|
|
425
425
|
3. **docker-containerization-expert** optimizes container resources
|
|
426
426
|
4. **kubernetes-orchestrator** scales resources horizontally
|
|
427
|
-
5. **
|
|
427
|
+
5. **terraform-infrastructure-expert** provisions additional infrastructure
|
|
428
428
|
|
|
429
429
|
### Data Corruption
|
|
430
430
|
|
|
431
|
-
1. **
|
|
432
|
-
2. **
|
|
431
|
+
1. **postgresql-expert** stops writes immediately
|
|
432
|
+
2. **terraform-infrastructure-expert** initiates backup restoration
|
|
433
433
|
3. **kubernetes-orchestrator** redirects traffic to healthy replicas
|
|
434
434
|
4. **python-backend-expert** validates data integrity checks
|
|
435
435
|
5. **e2e-test-engineer** runs full regression suite
|
|
@@ -444,11 +444,13 @@ git commit -m "chore: Sync checkpoint"
|
|
|
444
444
|
| flask-backend-engineer | python-backend-expert | framework: flask |
|
|
445
445
|
| mui-react-expert | react-ui-expert | framework: mui |
|
|
446
446
|
| chakra-ui-expert | react-ui-expert | framework: chakra |
|
|
447
|
+
| antd-react-expert | react-ui-expert | framework: antd |
|
|
448
|
+
| bootstrap-ui-expert | react-ui-expert | framework: bootstrap |
|
|
447
449
|
| docker-expert | docker-containerization-expert | focus: dockerfile |
|
|
448
450
|
| docker-compose-expert | docker-containerization-expert | focus: compose |
|
|
449
|
-
|
|
|
450
|
-
| gcp-cloud-architect | multi-cloud-architect | provider: gcp |
|
|
451
|
+
| docker-development-orchestrator | docker-containerization-expert | focus: development |
|
|
451
452
|
| playwright-test-engineer | e2e-test-engineer | tool: playwright |
|
|
453
|
+
| playwright-mcp-frontend-tester | e2e-test-engineer | browser_control: mcp-enhanced |
|
|
452
454
|
|
|
453
455
|
### Backward Compatibility
|
|
454
456
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Framework Path Rules
|
|
2
|
+
|
|
3
|
+
## Critical Path Convention
|
|
4
|
+
|
|
5
|
+
**NEVER** hardcode the `autopm/` directory path in framework files. The `autopm/` directory only exists during development and is **NOT** present after installation in user projects.
|
|
6
|
+
|
|
7
|
+
## The Problem
|
|
8
|
+
|
|
9
|
+
During installation, files from `autopm/.claude/` are copied to user projects as `.claude/`. Any references to `autopm/.claude/` or `autopm/scripts/` will be broken after installation.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
❌ WRONG (Development structure):
|
|
13
|
+
autopm/
|
|
14
|
+
├── .claude/
|
|
15
|
+
│ ├── commands/
|
|
16
|
+
│ ├── scripts/
|
|
17
|
+
│ └── agents/
|
|
18
|
+
|
|
19
|
+
✅ CORRECT (After installation):
|
|
20
|
+
user-project/
|
|
21
|
+
├── .claude/
|
|
22
|
+
│ ├── commands/
|
|
23
|
+
│ ├── scripts/
|
|
24
|
+
│ └── agents/
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
### 1. Use Relative Paths from Project Root
|
|
30
|
+
|
|
31
|
+
All paths in framework files must be relative to the **user's project root** (where `.claude/` will exist after installation).
|
|
32
|
+
|
|
33
|
+
**✅ CORRECT:**
|
|
34
|
+
```bash
|
|
35
|
+
bash .claude/scripts/pm/epic-sync/create-epic-issue.sh "$EPIC_NAME"
|
|
36
|
+
node .claude/lib/commands/pm/prdStatus.js
|
|
37
|
+
source .claude/scripts/lib/github-utils.sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**❌ WRONG:**
|
|
41
|
+
```bash
|
|
42
|
+
bash autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh "$EPIC_NAME"
|
|
43
|
+
node autopm/.claude/lib/commands/pm/prdStatus.js
|
|
44
|
+
source autopm/.claude/scripts/lib/github-utils.sh
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Exception: Comments and Documentation References
|
|
48
|
+
|
|
49
|
+
It's acceptable to reference `autopm/` in:
|
|
50
|
+
- Code comments explaining migration history
|
|
51
|
+
- Documentation describing the development structure
|
|
52
|
+
- Git commit messages
|
|
53
|
+
|
|
54
|
+
**✅ ACCEPTABLE:**
|
|
55
|
+
```javascript
|
|
56
|
+
/**
|
|
57
|
+
* Migrated from autopm/.claude/scripts/azure/validate.sh to Node.js
|
|
58
|
+
*/
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**✅ ACCEPTABLE:**
|
|
62
|
+
```markdown
|
|
63
|
+
## Development Structure
|
|
64
|
+
During development, framework files are in `autopm/.claude/`, but after
|
|
65
|
+
installation they are copied to the user project's `.claude/` directory.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. Files That Must Follow These Rules
|
|
69
|
+
|
|
70
|
+
- **Commands** (`autopm/.claude/commands/**/*.md`)
|
|
71
|
+
- **Scripts** (`autopm/.claude/scripts/**/*.sh`, `**/*.js`)
|
|
72
|
+
- **Agents** (`autopm/.claude/agents/**/*.md`)
|
|
73
|
+
- **Rules** (`autopm/.claude/rules/**/*.md`)
|
|
74
|
+
- **Templates** (`autopm/.claude/templates/**/*`)
|
|
75
|
+
|
|
76
|
+
### 4. Environment Variables
|
|
77
|
+
|
|
78
|
+
If you need to reference the framework location dynamically, use environment variables that work in both contexts:
|
|
79
|
+
|
|
80
|
+
**✅ CORRECT:**
|
|
81
|
+
```bash
|
|
82
|
+
CLAUDE_DIR="${CLAUDE_DIR:-.claude}"
|
|
83
|
+
bash "${CLAUDE_DIR}/scripts/pm/epic-sync/create-epic-issue.sh"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This allows:
|
|
87
|
+
- Development: `CLAUDE_DIR=autopm/.claude`
|
|
88
|
+
- Production: `CLAUDE_DIR=.claude` (default)
|
|
89
|
+
|
|
90
|
+
## Validation
|
|
91
|
+
|
|
92
|
+
### Pre-Commit Hook
|
|
93
|
+
|
|
94
|
+
A pre-commit hook validates all framework files before commit:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Checks for hardcoded autopm/ paths (excluding comments)
|
|
98
|
+
grep -r "bash autopm" autopm/.claude --include="*.md" --include="*.sh"
|
|
99
|
+
grep -r "node autopm" autopm/.claude --include="*.md" --include="*.sh"
|
|
100
|
+
grep -r "source autopm" autopm/.claude --include="*.md" --include="*.sh"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Manual Check
|
|
104
|
+
|
|
105
|
+
Before committing changes to framework files:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Run validation
|
|
109
|
+
npm run validate:paths
|
|
110
|
+
|
|
111
|
+
# Or manually
|
|
112
|
+
./scripts/validate-framework-paths.sh
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Common Mistakes
|
|
116
|
+
|
|
117
|
+
### Mistake 1: Copy-Paste from Development Environment
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# ❌ Copying terminal command that worked in development
|
|
121
|
+
bash autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh "feature-name"
|
|
122
|
+
|
|
123
|
+
# ✅ Use project-relative path
|
|
124
|
+
bash .claude/scripts/pm/epic-sync/create-epic-issue.sh "feature-name"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Mistake 2: Documentation Examples
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
❌ WRONG:
|
|
131
|
+
To run the script:
|
|
132
|
+
`bash autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh`
|
|
133
|
+
|
|
134
|
+
✅ CORRECT:
|
|
135
|
+
To run the script:
|
|
136
|
+
`bash .claude/scripts/pm/issue-sync/preflight-validation.sh`
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Mistake 3: Relative Imports in Scripts
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# ❌ WRONG - hardcoded framework path
|
|
143
|
+
source autopm/.claude/scripts/lib/github-utils.sh
|
|
144
|
+
|
|
145
|
+
# ✅ CORRECT - relative to project root
|
|
146
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
147
|
+
source "${SCRIPT_DIR}/../lib/github-utils.sh"
|
|
148
|
+
|
|
149
|
+
# ✅ ALSO CORRECT - explicit project root
|
|
150
|
+
source .claude/scripts/lib/github-utils.sh
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Enforcement
|
|
154
|
+
|
|
155
|
+
This rule is enforced by:
|
|
156
|
+
|
|
157
|
+
1. **Pre-commit hook** - Blocks commits with hardcoded `autopm/` paths
|
|
158
|
+
2. **CI/CD validation** - GitHub Actions check on every PR
|
|
159
|
+
3. **Installation tests** - Verify all paths work post-installation
|
|
160
|
+
4. **Code review** - Reviewers check for path correctness
|
|
161
|
+
|
|
162
|
+
## Quick Reference
|
|
163
|
+
|
|
164
|
+
| Context | Use | Don't Use |
|
|
165
|
+
|---------|-----|-----------|
|
|
166
|
+
| Shell scripts | `.claude/scripts/` | `autopm/.claude/scripts/` |
|
|
167
|
+
| Node.js scripts | `.claude/lib/` | `autopm/.claude/lib/` |
|
|
168
|
+
| Command files | `.claude/commands/` | `autopm/.claude/commands/` |
|
|
169
|
+
| Documentation | `.claude/agents/` | `autopm/.claude/agents/` |
|
|
170
|
+
| Comments | `autopm/` ✅ OK | N/A |
|
|
171
|
+
|
|
172
|
+
## Related Rules
|
|
173
|
+
|
|
174
|
+
- `/rules/naming-conventions.md` - File and directory naming
|
|
175
|
+
- `/rules/development-workflow.md` - Development best practices
|
|
176
|
+
- `/rules/golden-rules.md` - Core framework principles
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
**Remember:** If a user installs this framework, the `autopm/` directory will not exist in their project. All paths must work from their project root where `.claude/` is located.
|
|
@@ -179,8 +179,8 @@ describe('Accessibility', () => {
|
|
|
179
179
|
|
|
180
180
|
### Required Agents for Visual Testing
|
|
181
181
|
|
|
182
|
-
- **
|
|
183
|
-
- **
|
|
182
|
+
- **frontend-testing-engineer**: Visual regression tests
|
|
183
|
+
- **frontend-testing-engineer**: Browser automation
|
|
184
184
|
- **react-frontend-engineer**: Component development
|
|
185
185
|
- **code-analyzer**: Review UI code quality
|
|
186
186
|
|
|
@@ -188,7 +188,7 @@ describe('Accessibility', () => {
|
|
|
188
188
|
|
|
189
189
|
```
|
|
190
190
|
1. Implement UI change following TDD
|
|
191
|
-
2.
|
|
191
|
+
2. frontend-testing-engineer → Create visual tests
|
|
192
192
|
3. Run visual regression tests at all breakpoints
|
|
193
193
|
4. code-analyzer → Verify accessibility
|
|
194
194
|
5. Capture screenshots for PR
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Epic Sync Modular Scripts
|
|
2
|
+
|
|
3
|
+
This directory contains the modular implementation of the epic-sync workflow that pushes epics and tasks to GitHub as issues.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
The epic-sync process is split into 4 specialized scripts:
|
|
8
|
+
|
|
9
|
+
1. **create-epic-issue.sh** - Creates the main epic GitHub issue
|
|
10
|
+
2. **create-task-issues.sh** - Creates GitHub issues for all tasks
|
|
11
|
+
3. **update-references.sh** - Renames task files to match GitHub issue numbers
|
|
12
|
+
4. **update-epic-file.sh** - Updates epic.md with real issue numbers
|
|
13
|
+
|
|
14
|
+
## Orchestration
|
|
15
|
+
|
|
16
|
+
The **recommended way** to use these scripts is via the orchestration script:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# From project root
|
|
20
|
+
bash .claude/scripts/pm/epic-sync.sh <epic_name>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This automatically runs all 4 steps in the correct order.
|
|
24
|
+
|
|
25
|
+
## Individual Scripts
|
|
26
|
+
|
|
27
|
+
### 1. create-epic-issue.sh
|
|
28
|
+
|
|
29
|
+
**Purpose:** Creates the main GitHub issue for the epic
|
|
30
|
+
|
|
31
|
+
**Input:**
|
|
32
|
+
- Epic name (e.g., `postgresql-connection-module`)
|
|
33
|
+
|
|
34
|
+
**Output:**
|
|
35
|
+
- GitHub issue number (stdout)
|
|
36
|
+
|
|
37
|
+
**What it does:**
|
|
38
|
+
- Strips frontmatter from epic.md
|
|
39
|
+
- Counts tasks in epic directory
|
|
40
|
+
- Detects epic type (bug vs feature)
|
|
41
|
+
- Creates GitHub issue with proper labels
|
|
42
|
+
- Returns epic issue number
|
|
43
|
+
|
|
44
|
+
**Usage:**
|
|
45
|
+
```bash
|
|
46
|
+
epic_number=$(bash .claude/scripts/pm/epic-sync/create-epic-issue.sh "my-feature")
|
|
47
|
+
echo "Epic created: #$epic_number"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. create-task-issues.sh
|
|
51
|
+
|
|
52
|
+
**Purpose:** Creates GitHub issues for all task files
|
|
53
|
+
|
|
54
|
+
**Input:**
|
|
55
|
+
- Epic name
|
|
56
|
+
- Epic issue number (from step 1)
|
|
57
|
+
|
|
58
|
+
**Output:**
|
|
59
|
+
- Path to task mapping file (stdout)
|
|
60
|
+
|
|
61
|
+
**What it does:**
|
|
62
|
+
- Finds all `[0-9]*.md` files in epic directory
|
|
63
|
+
- Strips frontmatter from each task
|
|
64
|
+
- Creates GitHub issue for each task
|
|
65
|
+
- Labels with `task,epic:<epic_name>`
|
|
66
|
+
- Saves mapping of old_name -> issue_number to `.task-mapping.txt`
|
|
67
|
+
- **Mapping file is saved in epic directory** (persistent, not in /tmp)
|
|
68
|
+
|
|
69
|
+
**Usage:**
|
|
70
|
+
```bash
|
|
71
|
+
mapping=$(bash .claude/scripts/pm/epic-sync/create-task-issues.sh "my-feature" "42")
|
|
72
|
+
echo "Mapping saved: $mapping"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Important:** The mapping file is saved as `.claude/epics/<epic>/.task-mapping.txt` for use in subsequent steps.
|
|
76
|
+
|
|
77
|
+
### 3. update-references.sh
|
|
78
|
+
|
|
79
|
+
**Purpose:** Renames task files to GitHub issue numbers and updates frontmatter
|
|
80
|
+
|
|
81
|
+
**Input:**
|
|
82
|
+
- Epic name
|
|
83
|
+
- Path to task mapping file (from step 2)
|
|
84
|
+
|
|
85
|
+
**Output:**
|
|
86
|
+
- None (modifies files in place)
|
|
87
|
+
|
|
88
|
+
**What it does:**
|
|
89
|
+
- Reads `.task-mapping.txt` file
|
|
90
|
+
- For each mapping (e.g., `001 -> 2`):
|
|
91
|
+
- Renames `001.md` to `2.md`
|
|
92
|
+
- Updates frontmatter with GitHub URL
|
|
93
|
+
- Updates frontmatter timestamp
|
|
94
|
+
- Creates backups during rename (removed on success)
|
|
95
|
+
|
|
96
|
+
**Usage:**
|
|
97
|
+
```bash
|
|
98
|
+
bash .claude/scripts/pm/epic-sync/update-references.sh "my-feature" ".claude/epics/my-feature/.task-mapping.txt"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Before:**
|
|
102
|
+
```
|
|
103
|
+
.claude/epics/my-feature/
|
|
104
|
+
├── 001.md (github: [Will be updated...])
|
|
105
|
+
├── 002.md (github: [Will be updated...])
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**After:**
|
|
109
|
+
```
|
|
110
|
+
.claude/epics/my-feature/
|
|
111
|
+
├── 2.md (github: https://github.com/user/repo/issues/2)
|
|
112
|
+
├── 3.md (github: https://github.com/user/repo/issues/3)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 4. update-epic-file.sh
|
|
116
|
+
|
|
117
|
+
**Purpose:** Updates epic.md with GitHub URL and real task references
|
|
118
|
+
|
|
119
|
+
**Input:**
|
|
120
|
+
- Epic name
|
|
121
|
+
- Epic issue number
|
|
122
|
+
|
|
123
|
+
**Output:**
|
|
124
|
+
- None (modifies epic.md in place)
|
|
125
|
+
|
|
126
|
+
**What it does:**
|
|
127
|
+
- Updates epic.md frontmatter with GitHub URL
|
|
128
|
+
- Updates timestamp
|
|
129
|
+
- Reads `.task-mapping.txt`
|
|
130
|
+
- Replaces task references (e.g., `- [ ] 001` → `- [ ] #2`)
|
|
131
|
+
- Creates backup during update (removed on success)
|
|
132
|
+
|
|
133
|
+
**Usage:**
|
|
134
|
+
```bash
|
|
135
|
+
bash .claude/scripts/pm/epic-sync/update-epic-file.sh "my-feature" "42"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## File Persistence Fix
|
|
139
|
+
|
|
140
|
+
**IMPORTANT:** The task mapping file is saved to a **persistent location**:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
.claude/epics/<epic_name>/.task-mapping.txt
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
This fixes the bug where the mapping file was being saved to `/tmp` and deleted before subsequent scripts could use it.
|
|
147
|
+
|
|
148
|
+
## Error Handling
|
|
149
|
+
|
|
150
|
+
All scripts use `set -euo pipefail` for robust error handling:
|
|
151
|
+
- `-e`: Exit on error
|
|
152
|
+
- `-u`: Error on undefined variables
|
|
153
|
+
- `-o pipefail`: Fail if any command in pipeline fails
|
|
154
|
+
|
|
155
|
+
## Testing
|
|
156
|
+
|
|
157
|
+
Test individual scripts:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Create a test epic first
|
|
161
|
+
mkdir -p .claude/epics/test-epic
|
|
162
|
+
echo "---\ntitle: Test\n---\n# Test Epic" > .claude/epics/test-epic/epic.md
|
|
163
|
+
echo "---\ntitle: Task 1\n---\n# Task 1" > .claude/epics/test-epic/001.md
|
|
164
|
+
echo "---\ntitle: Task 2\n---\n# Task 2" > .claude/epics/test-epic/002.md
|
|
165
|
+
|
|
166
|
+
# Run orchestration script
|
|
167
|
+
bash .claude/scripts/pm/epic-sync.sh test-epic
|
|
168
|
+
|
|
169
|
+
# Verify files were renamed
|
|
170
|
+
ls .claude/epics/test-epic/
|
|
171
|
+
# Should show: epic.md, <issue_number>.md files
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Dependencies
|
|
175
|
+
|
|
176
|
+
- **bash** >= 4.0
|
|
177
|
+
- **gh** (GitHub CLI) - authenticated
|
|
178
|
+
- **awk** - for frontmatter processing
|
|
179
|
+
- **find** - for file discovery
|
|
180
|
+
- **grep** - for pattern matching
|
|
181
|
+
|
|
182
|
+
## Common Issues
|
|
183
|
+
|
|
184
|
+
### "Template repository detected"
|
|
185
|
+
```bash
|
|
186
|
+
# Fix: Set correct remote
|
|
187
|
+
git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### "GitHub CLI not authenticated"
|
|
191
|
+
```bash
|
|
192
|
+
gh auth login
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### "Mapping file not found"
|
|
196
|
+
- Ensure step 2 completed successfully
|
|
197
|
+
- Check `.claude/epics/<epic>/.task-mapping.txt` exists
|
|
198
|
+
|
|
199
|
+
### "Task files still numbered 001, 002..."
|
|
200
|
+
- Step 3 (update-references.sh) may not have run
|
|
201
|
+
- Check for errors in step 2 output
|
|
202
|
+
- Run orchestration script instead of individual scripts
|
|
203
|
+
|
|
204
|
+
## Related Files
|
|
205
|
+
|
|
206
|
+
- **/.claude/commands/pm/epic-sync.md** - Command documentation
|
|
207
|
+
- **/.claude/commands/pm/issue-start.md** - Works with renamed files
|
|
208
|
+
- **/.claude/commands/pm/issue-analyze.md** - Expects GitHub issue numbers
|