cad-workflow 1.1.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/LICENSE +21 -0
- package/README.md +88 -0
- package/bin/cli.js +529 -0
- package/bin/wrapper.js +32 -0
- package/config/install-config.yaml +167 -0
- package/package.json +42 -0
- package/src/base/.cad/config.yaml.tpl +25 -0
- package/src/base/.cad/workflow-status.yaml.tpl +18 -0
- package/src/base/.claude/settings.local.json.tpl +8 -0
- package/src/base/CLAUDE.md +69 -0
- package/src/base/commands/cad.md +547 -0
- package/src/base/commands/commit.md +103 -0
- package/src/base/commands/comprendre.md +96 -0
- package/src/base/commands/concevoir.md +121 -0
- package/src/base/commands/documenter.md +97 -0
- package/src/base/commands/e2e.md +79 -0
- package/src/base/commands/implementer.md +98 -0
- package/src/base/commands/review.md +85 -0
- package/src/base/commands/status.md +55 -0
- package/src/base/skills/clean-code/SKILL.md +92 -0
- package/src/base/skills/tdd/SKILL.md +132 -0
- package/src/integrations/jira/.mcp.json.tpl +19 -0
- package/src/integrations/jira/commands/jira-setup.md +34 -0
- package/src/stacks/backend-only/agents/backend-developer.md +167 -0
- package/src/stacks/backend-only/agents/backend-reviewer.md +89 -0
- package/src/stacks/backend-only/agents/orchestrator.md +69 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/SKILL.md +187 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/templates/adapter.template.ts +75 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/templates/controller.template.ts +131 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/templates/entity.template.ts +87 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/templates/port.template.ts +62 -0
- package/src/stacks/backend-only/skills/clean-hexa-backend/templates/use-case.template.ts +77 -0
- package/src/stacks/backend-only/skills/mutation-testing/SKILL.md +129 -0
- package/src/stacks/mobile/agents/backend-developer.md +167 -0
- package/src/stacks/mobile/agents/backend-reviewer.md +89 -0
- package/src/stacks/mobile/agents/mobile-developer.md +70 -0
- package/src/stacks/mobile/agents/mobile-reviewer.md +175 -0
- package/src/stacks/mobile/agents/orchestrator.md +69 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/SKILL.md +187 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/templates/adapter.template.ts +75 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/templates/controller.template.ts +131 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/templates/entity.template.ts +87 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/templates/port.template.ts +62 -0
- package/src/stacks/mobile/skills/clean-hexa-backend/templates/use-case.template.ts +77 -0
- package/src/stacks/mobile/skills/clean-hexa-mobile/SKILL.md +984 -0
- package/src/stacks/mobile/skills/mutation-testing/SKILL.md +129 -0
- package/src/stacks/web/agents/backend-developer.md +167 -0
- package/src/stacks/web/agents/backend-reviewer.md +89 -0
- package/src/stacks/web/agents/frontend-developer.md +65 -0
- package/src/stacks/web/agents/frontend-reviewer.md +92 -0
- package/src/stacks/web/agents/orchestrator.md +69 -0
- package/src/stacks/web/skills/clean-hexa-backend/SKILL.md +187 -0
- package/src/stacks/web/skills/clean-hexa-backend/templates/adapter.template.ts +75 -0
- package/src/stacks/web/skills/clean-hexa-backend/templates/controller.template.ts +131 -0
- package/src/stacks/web/skills/clean-hexa-backend/templates/entity.template.ts +87 -0
- package/src/stacks/web/skills/clean-hexa-backend/templates/port.template.ts +62 -0
- package/src/stacks/web/skills/clean-hexa-backend/templates/use-case.template.ts +77 -0
- package/src/stacks/web/skills/clean-hexa-frontend/SKILL.md +172 -0
- package/src/stacks/web/skills/mutation-testing/SKILL.md +129 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
code: cad
|
|
2
|
+
name: "CAD - Clean Agentic Dev Workflow"
|
|
3
|
+
description: "Workflow de développement assisté par IA avec Clean Architecture Hexagonale et TDD"
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
|
|
6
|
+
welcome_message: |
|
|
7
|
+
|
|
8
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
9
|
+
║ ║
|
|
10
|
+
║ 🚀 CAD - Clean Agentic Dev Workflow ║
|
|
11
|
+
║ ║
|
|
12
|
+
║ Développement assisté par IA avec : ║
|
|
13
|
+
║ • Clean Architecture Hexagonale ║
|
|
14
|
+
║ • TDD (Test-Driven Development) ║
|
|
15
|
+
║ • Agents spécialisés (dev, review) ║
|
|
16
|
+
║ • Workflow en 7 phases avec validation ║
|
|
17
|
+
║ ║
|
|
18
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
19
|
+
|
|
20
|
+
project_name:
|
|
21
|
+
prompt: "Nom du projet ?"
|
|
22
|
+
default: "{directory_name}"
|
|
23
|
+
result: "{value}"
|
|
24
|
+
|
|
25
|
+
stack:
|
|
26
|
+
prompt: "Quelle stack utilisez-vous ?"
|
|
27
|
+
default: "mobile"
|
|
28
|
+
result: "{value}"
|
|
29
|
+
single-select:
|
|
30
|
+
- value: "mobile"
|
|
31
|
+
label: "📱 Mobile - React Native Expo + Backend NestJS"
|
|
32
|
+
description: "App mobile iOS/Android avec API backend"
|
|
33
|
+
installs:
|
|
34
|
+
- "stacks/mobile"
|
|
35
|
+
- value: "web"
|
|
36
|
+
label: "🌐 Web - Angular/React + Backend NestJS"
|
|
37
|
+
description: "Application web frontend + API backend"
|
|
38
|
+
installs:
|
|
39
|
+
- "stacks/web"
|
|
40
|
+
- value: "backend-only"
|
|
41
|
+
label: "⚙️ Backend Only - NestJS"
|
|
42
|
+
description: "API backend uniquement"
|
|
43
|
+
installs:
|
|
44
|
+
- "stacks/backend-only"
|
|
45
|
+
|
|
46
|
+
ticket_management:
|
|
47
|
+
prompt: "Comment gérez-vous vos tickets/stories ?"
|
|
48
|
+
default: "local"
|
|
49
|
+
result: "{value}"
|
|
50
|
+
single-select:
|
|
51
|
+
- value: "jira"
|
|
52
|
+
label: "🎫 Jira - Connecter à un board Jira"
|
|
53
|
+
description: "Récupération tickets, transitions auto, commentaires"
|
|
54
|
+
installs:
|
|
55
|
+
- "integrations/jira"
|
|
56
|
+
triggers_prompts:
|
|
57
|
+
- jira_url
|
|
58
|
+
- jira_email
|
|
59
|
+
- jira_token
|
|
60
|
+
- jira_project_key
|
|
61
|
+
- value: "local"
|
|
62
|
+
label: "📁 Local - Stories en fichiers markdown"
|
|
63
|
+
description: "Gérer les stories localement dans .cad/stories/"
|
|
64
|
+
|
|
65
|
+
jira_url:
|
|
66
|
+
prompt: "URL de votre workspace Atlassian"
|
|
67
|
+
placeholder: "https://votre-workspace.atlassian.net"
|
|
68
|
+
validation: "^https://.+\\.atlassian\\.net$"
|
|
69
|
+
validation_error: "L'URL doit être au format https://xxx.atlassian.net"
|
|
70
|
+
result: "{value}"
|
|
71
|
+
conditional: "ticket_management == jira"
|
|
72
|
+
|
|
73
|
+
jira_email:
|
|
74
|
+
prompt: "Email de votre compte Atlassian"
|
|
75
|
+
placeholder: "vous@example.com"
|
|
76
|
+
validation: "^[^@]+@[^@]+\\.[^@]+$"
|
|
77
|
+
validation_error: "Email invalide"
|
|
78
|
+
result: "{value}"
|
|
79
|
+
conditional: "ticket_management == jira"
|
|
80
|
+
|
|
81
|
+
jira_token:
|
|
82
|
+
prompt: "API Token Jira"
|
|
83
|
+
type: "password"
|
|
84
|
+
help: "Créer sur https://id.atlassian.com/manage-profile/security/api-tokens"
|
|
85
|
+
result: "{value}"
|
|
86
|
+
conditional: "ticket_management == jira"
|
|
87
|
+
sensitive: true
|
|
88
|
+
|
|
89
|
+
jira_project_key:
|
|
90
|
+
prompt: "Clé du projet Jira"
|
|
91
|
+
placeholder: "PROJ"
|
|
92
|
+
validation: "^[A-Z][A-Z0-9_]*$"
|
|
93
|
+
validation_error: "La clé doit être en majuscules (ex: PROJ, CAD, MYAPP)"
|
|
94
|
+
result: "{value}"
|
|
95
|
+
conditional: "ticket_management == jira"
|
|
96
|
+
|
|
97
|
+
workflow_config:
|
|
98
|
+
min_coverage:
|
|
99
|
+
prompt: "Couverture de tests minimum (%)"
|
|
100
|
+
default: "80"
|
|
101
|
+
result: "{value}"
|
|
102
|
+
min_mutation_score:
|
|
103
|
+
prompt: "Score de mutation minimum (%)"
|
|
104
|
+
default: "75"
|
|
105
|
+
result: "{value}"
|
|
106
|
+
|
|
107
|
+
directories:
|
|
108
|
+
- ".cad"
|
|
109
|
+
- ".claude/agents"
|
|
110
|
+
- ".claude/commands"
|
|
111
|
+
- ".claude/skills"
|
|
112
|
+
- "docs/architecture"
|
|
113
|
+
- "docs/adr"
|
|
114
|
+
|
|
115
|
+
conditional_directories:
|
|
116
|
+
- path: ".cad/stories"
|
|
117
|
+
condition: "ticket_management == local"
|
|
118
|
+
|
|
119
|
+
files_to_generate:
|
|
120
|
+
- template: ".cad/config.yaml.tpl"
|
|
121
|
+
output: ".cad/config.yaml"
|
|
122
|
+
- template: ".cad/workflow-status.yaml.tpl"
|
|
123
|
+
output: ".cad/workflow-status.yaml"
|
|
124
|
+
|
|
125
|
+
sensitive_files:
|
|
126
|
+
- template: ".claude/settings.local.json.tpl"
|
|
127
|
+
output: ".claude/settings.local.json"
|
|
128
|
+
condition: "ticket_management == jira"
|
|
129
|
+
gitignore: true
|
|
130
|
+
|
|
131
|
+
post_install_message_local: |
|
|
132
|
+
|
|
133
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
134
|
+
║ ✅ CAD WORKFLOW INSTALLÉ (MODE LOCAL) ║
|
|
135
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
136
|
+
║ ║
|
|
137
|
+
║ Stack : {stack} ║
|
|
138
|
+
║ Tickets : Local (.cad/stories/) ║
|
|
139
|
+
║ ║
|
|
140
|
+
║ Commandes disponibles : ║
|
|
141
|
+
║ ║
|
|
142
|
+
║ /cad-workflow:cad [description] - Créer une story ║
|
|
143
|
+
║ /cad-workflow:status - Voir l'état ║
|
|
144
|
+
║ ║
|
|
145
|
+
║ 💡 Passer en mode Jira : /cad-workflow:jira-setup ║
|
|
146
|
+
║ ║
|
|
147
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
148
|
+
|
|
149
|
+
post_install_message_jira: |
|
|
150
|
+
|
|
151
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
152
|
+
║ ✅ CAD WORKFLOW INSTALLÉ (MODE JIRA) ║
|
|
153
|
+
╠═══════════════════════════════════════════════════════════════╣
|
|
154
|
+
║ ║
|
|
155
|
+
║ Stack : {stack} ║
|
|
156
|
+
║ Projet Jira : {jira_project_key} ║
|
|
157
|
+
║ ║
|
|
158
|
+
║ Commandes disponibles : ║
|
|
159
|
+
║ ║
|
|
160
|
+
║ /cad-workflow:cad list - Voir les tickets To Do ║
|
|
161
|
+
║ /cad-workflow:cad PROJ-123 - Démarrer sur un ticket ║
|
|
162
|
+
║ /cad-workflow:status - Voir l'état du workflow ║
|
|
163
|
+
║ ║
|
|
164
|
+
║ ⚠️ Credentials Jira sauvegardés dans : ║
|
|
165
|
+
║ .claude/settings.local.json (non commité) ║
|
|
166
|
+
║ ║
|
|
167
|
+
╚═══════════════════════════════════════════════════════════════╝
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cad-workflow",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Clean Agentic Dev - Workflow IA avec Clean Architecture Hexagonale et TDD",
|
|
5
|
+
"bin": {
|
|
6
|
+
"cad-workflow": "bin/wrapper.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "bin/cli.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/",
|
|
12
|
+
"config/",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"chalk": "^4.1.2",
|
|
17
|
+
"enquirer": "^2.4.1",
|
|
18
|
+
"fs-extra": "^11.0.0",
|
|
19
|
+
"js-yaml": "^4.1.0",
|
|
20
|
+
"mustache": "^4.2.0"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18.0.0"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"claude-code",
|
|
27
|
+
"clean-architecture",
|
|
28
|
+
"hexagonal",
|
|
29
|
+
"tdd",
|
|
30
|
+
"ai-workflow",
|
|
31
|
+
"nestjs",
|
|
32
|
+
"react-native",
|
|
33
|
+
"expo",
|
|
34
|
+
"angular"
|
|
35
|
+
],
|
|
36
|
+
"author": "Taha K",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/tahakhelifi/cad-workflow.git"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# CAD Workflow Configuration
|
|
2
|
+
# Généré par create-cad-workflow
|
|
3
|
+
|
|
4
|
+
project_name: "{{project_name}}"
|
|
5
|
+
stack: "{{stack}}"
|
|
6
|
+
mode: "{{ticket_management}}"
|
|
7
|
+
|
|
8
|
+
{{#jira_project_key}}
|
|
9
|
+
jira:
|
|
10
|
+
project_key: "{{jira_project_key}}"
|
|
11
|
+
transitions:
|
|
12
|
+
start: "In Progress"
|
|
13
|
+
review: "Code Review"
|
|
14
|
+
done: "Done"
|
|
15
|
+
todo_statuses:
|
|
16
|
+
- "To Do"
|
|
17
|
+
- "Backlog"
|
|
18
|
+
- "Ready for Dev"
|
|
19
|
+
{{/jira_project_key}}
|
|
20
|
+
|
|
21
|
+
workflow:
|
|
22
|
+
require_tests: true
|
|
23
|
+
min_coverage: {{min_coverage}}
|
|
24
|
+
min_mutation_score: {{min_mutation_score}}
|
|
25
|
+
conventional_commits: true
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# CAD Workflow Status
|
|
2
|
+
initialized: true
|
|
3
|
+
initialized_at: "{{timestamp}}"
|
|
4
|
+
mode: "{{ticket_management}}"
|
|
5
|
+
stack: "{{stack}}"
|
|
6
|
+
current_phase: idle
|
|
7
|
+
{{#jira_project_key}}
|
|
8
|
+
current_jira_ticket: null
|
|
9
|
+
{{/jira_project_key}}
|
|
10
|
+
{{^jira_project_key}}
|
|
11
|
+
current_story: null
|
|
12
|
+
last_story_number: 0
|
|
13
|
+
{{/jira_project_key}}
|
|
14
|
+
|
|
15
|
+
stats:
|
|
16
|
+
completed: 0
|
|
17
|
+
total_tests: 0
|
|
18
|
+
average_coverage: 0
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# CAD Workflow - Clean Agentic Dev
|
|
2
|
+
|
|
3
|
+
Plugin de developpement assiste par IA avec Clean Architecture Hexagonale et TDD.
|
|
4
|
+
|
|
5
|
+
## Commandes disponibles
|
|
6
|
+
|
|
7
|
+
| Commande | Phase | Description |
|
|
8
|
+
|----------|-------|-------------|
|
|
9
|
+
| `/status` | - | Afficher le status actuel du workflow |
|
|
10
|
+
| `/cad` | 1-7 | Workflow complet avec validation entre chaque phase |
|
|
11
|
+
| `/comprendre` | 1 | Analyse et clarification du besoin |
|
|
12
|
+
| `/concevoir` | 2 | Design et plan d'implementation |
|
|
13
|
+
| `/implementer` | 3 | Implementation TDD (Red-Green-Refactor) |
|
|
14
|
+
| `/review` | 4 | Review code + mutation tests |
|
|
15
|
+
| `/e2e` | 5 | Tests end-to-end |
|
|
16
|
+
| `/documenter` | 6 | Documentation et memoire |
|
|
17
|
+
| `/commit` | 7 | Formatage, linting, commit conventionnel |
|
|
18
|
+
|
|
19
|
+
Reprise : `/cad continue` - Reprend le workflow interrompu
|
|
20
|
+
|
|
21
|
+
## Architecture Hexagonale
|
|
22
|
+
|
|
23
|
+
Les projets suivent cette structure :
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
src/
|
|
27
|
+
├── domain/ # Coeur metier - AUCUNE dependance externe
|
|
28
|
+
│ ├── entities/ # Entites metier
|
|
29
|
+
│ ├── value-objects/
|
|
30
|
+
│ ├── ports/ # Interfaces (contrats)
|
|
31
|
+
│ └── errors/ # Erreurs metier typees
|
|
32
|
+
├── application/ # Cas d'utilisation
|
|
33
|
+
│ ├── use-cases/ # 1 classe = 1 action metier
|
|
34
|
+
│ ├── dtos/ # Data Transfer Objects
|
|
35
|
+
│ └── mappers/ # Entity <-> DTO
|
|
36
|
+
├── infrastructure/ # Implementations techniques
|
|
37
|
+
│ ├── adapters/ # Implementation des ports
|
|
38
|
+
│ ├── repositories/ # Acces donnees
|
|
39
|
+
│ └── services/ # Services externes
|
|
40
|
+
└── presentation/ # Interface (Controllers/Components)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Regle absolue** : Les imports vont TOUJOURS vers le centre (domain). Domain n'importe JAMAIS d'infrastructure.
|
|
44
|
+
|
|
45
|
+
## Conventions
|
|
46
|
+
|
|
47
|
+
- **Commits** : Conventionnels (feat:, fix:, refactor:, test:, docs:)
|
|
48
|
+
- **Coverage** : Minimum 80%
|
|
49
|
+
- **Mutation score** : Minimum 75%
|
|
50
|
+
- **TypeScript** : strict mode, pas de `any`
|
|
51
|
+
- **Nommage** :
|
|
52
|
+
- Use cases : `VerbNounUseCase` (ex: `CreateUserUseCase`)
|
|
53
|
+
- Ports : `INounRepository`, `INounService`
|
|
54
|
+
- Adapters : `HttpNounAdapter`, `TypeOrmNounRepository`
|
|
55
|
+
|
|
56
|
+
## Avant de coder
|
|
57
|
+
|
|
58
|
+
1. Lire `/status` pour connaitre l'etat du workflow
|
|
59
|
+
2. Utiliser la commande de phase appropriee
|
|
60
|
+
3. Toujours suivre TDD : RED -> GREEN -> REFACTOR
|
|
61
|
+
4. Consulter les skills avant d'implementer
|
|
62
|
+
|
|
63
|
+
## Anti-patterns a eviter
|
|
64
|
+
|
|
65
|
+
- Logique metier dans les controllers/components
|
|
66
|
+
- Appels HTTP directs dans le domain
|
|
67
|
+
- Tests qui testent l'implementation plutot que le comportement
|
|
68
|
+
- Dependances du domain vers l'exterieur
|
|
69
|
+
- Code sans tests
|