mdan-cli 2.4.3 → 2.5.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 +168 -139
- package/cli/mdan.js +97 -97
- package/cli/mdan.py +1 -1
- package/cli/mdan.sh +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
# MDAN — Multi-Agent Development Agentic Network
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/mdan-cli)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nodejs.org)
|
|
8
|
+
[](https://discord.gg/mdan)
|
|
9
|
+
|
|
10
|
+
**Multi-Agent Development Agentic Network** — Une méthode agentique moderne et adaptative pour construire n'importe quel logiciel avec l'IA. MDAN est votre collaborateur expert qui guide le développement de l'analyse jusqu'au déploiement.
|
|
11
|
+
|
|
12
|
+
**100% gratuit et open source.** Pas de paywall. Pas de contenu bloqué. Nous croyons en l'accessibilité pour tous.
|
|
4
13
|
|
|
5
14
|
---
|
|
6
15
|
|
|
7
|
-
##
|
|
16
|
+
## Pourquoi MDAN ?
|
|
8
17
|
|
|
9
|
-
MDAN
|
|
18
|
+
Les outils IA traditionnels font le travail à votre place, produisant des résultats médiocres. Les agents MDAN et ses workflows structurés agissent comme des collaborateurs experts qui vous guident à travers un processus structuré pour exploiter au maximum votre potentiel en partenariat avec l'IA.
|
|
10
19
|
|
|
11
20
|
- **🤖 Aide Intelligente IA** — Tapez `/mdan-help` à tout moment pour savoir quoi faire ensuite
|
|
12
|
-
- **⚖️ Auto-adaptatif (Scale-Domain)** — Ajuste automatiquement la profondeur de la planification selon la taille
|
|
13
|
-
- **🎉 Party Mode** —
|
|
14
|
-
- **🧠 Workflow Structuré** — 5 phases claires et éprouvées (
|
|
15
|
-
- **🔌 Mémoire Persistante** —
|
|
21
|
+
- **⚖️ Auto-adaptatif (Scale-Domain)** — Ajuste automatiquement la profondeur de la planification selon la taille du projet (du script solo à l'application d'entreprise)
|
|
22
|
+
- **🎉 Party Mode** — Invokequez plusieurs agents avec `/party` pour débattre et collaborer sur des choix d'architecture
|
|
23
|
+
- **🧠 Workflow Structuré** — 5 phases claires et éprouvées (DISCOVER, DESIGN, BUILD, VERIFY, SHIP)
|
|
24
|
+
- **🔌 Mémoire Persistante** — Reprenez votre travail d'une session à l'autre avec `MDAN-STATE.json`
|
|
25
|
+
- **👥 Agents Personnalisés** — Chaque agent a un nom et une personnalité unique (Khalil, Reda, Jihane, Haytame, etc.)
|
|
26
|
+
- **✅ Quality Gates** — Portes de qualité adaptatives selon le profil du projet
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🚀 Nouveautés dans MDAN v2.4
|
|
31
|
+
|
|
32
|
+
**MDAN évolue rapidement avec des optimisations incluant :**
|
|
33
|
+
|
|
34
|
+
- **Cross Platform Agent Team** — Agents multi-plateformes (Cursor, Windsurf, Claude Code, VS Code)
|
|
35
|
+
- **Sub Agent Inclusion** — Sous-agents spécialisés pour des tâches ciblées
|
|
36
|
+
- **Skills Architecture** — Architecture de skills extensible et modulable
|
|
37
|
+
- **MDAN Builder v1** — Créez vos propres agents et workflows
|
|
38
|
+
- **Dev Loop Automation** — Automatisation complète du cycle de développement
|
|
39
|
+
- **Better Agents Integration** — Scenarios et evaluations intégrés
|
|
16
40
|
|
|
17
41
|
---
|
|
18
42
|
|
|
@@ -36,116 +60,135 @@ npx mdan-cli init mon-projet
|
|
|
36
60
|
curl -fsSL https://raw.githubusercontent.com/khalilbenaz/MDAN/main/install.sh | bash
|
|
37
61
|
```
|
|
38
62
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
git clone https://github.com/khalilbenaz/MDAN.git
|
|
43
|
-
cd MDAN && bash install.sh
|
|
44
|
-
```
|
|
63
|
+
Suivez les instructions de l'installeur, puis ouvrez votre IDE IA (Claude Code, Cursor, etc.) dans votre dossier de projet.
|
|
45
64
|
|
|
46
65
|
---
|
|
47
66
|
|
|
48
|
-
## 🚀
|
|
49
|
-
|
|
50
|
-
### Nouveau projet
|
|
67
|
+
## 🚀 Démarrage Rapide
|
|
51
68
|
|
|
52
69
|
```bash
|
|
70
|
+
# Créer un nouveau projet
|
|
53
71
|
mdan init mon-projet
|
|
54
|
-
cursor mon-projet
|
|
55
|
-
```
|
|
56
72
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
cd votre-projet
|
|
73
|
+
# Ou attacher à un projet existant
|
|
74
|
+
cd mon-projet
|
|
61
75
|
mdan attach
|
|
62
|
-
cursor .
|
|
63
|
-
```
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
cd votre-projet
|
|
69
|
-
mdan attach --rebuild
|
|
77
|
+
# Ouvrir dans votre IDE
|
|
70
78
|
cursor .
|
|
71
79
|
```
|
|
72
80
|
|
|
81
|
+
**Pas sûr de quoi faire ?** Tapez `/mdan-help` — cela vous dit exactement quoi faire ensuite.
|
|
82
|
+
|
|
73
83
|
---
|
|
74
84
|
|
|
75
|
-
##
|
|
85
|
+
## 🎯 Phases de Développement
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
| Phase | Agent | Résultat |
|
|
88
|
+
|-------|-------|----------|
|
|
89
|
+
| **1. DISCOVER** | Product Agent (Khalil) | PRD validé, user stories |
|
|
90
|
+
| **2. DESIGN** | Architect (Reda) + UX (Jihane) | Architecture + Specs |
|
|
91
|
+
| **3. BUILD** | Dev (Haytame) + Security (Said) | Code implémenté |
|
|
92
|
+
| **4. VERIFY** | Test (Youssef) + Security (Said) | Tests passants, sécurité |
|
|
93
|
+
| **5. SHIP** | DevOps (Anas) + Doc (Amina) | Déployé + Documenté |
|
|
78
94
|
|
|
79
|
-
|
|
95
|
+
---
|
|
80
96
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
mdan attach # Ajouter MDAN au projet courant
|
|
85
|
-
mdan attach --rebuild # Préparer pour un rebuild complet
|
|
86
|
-
mdan status # Voir le statut du projet
|
|
87
|
-
mdan phase [1-5|nom] # Voir le guide d'une phase (ex: mdan phase discover)
|
|
88
|
-
mdan workflow [nom] # Voir une micro-procédure (ex: bug-fix, refactoring)
|
|
89
|
-
mdan module add [nom] # Ajouter une extension métier (ex: agile-scrum)
|
|
90
|
-
mdan oc # Copier le prompt de l'Orchestrateur dans le presse-papier
|
|
91
|
-
mdan agent [nom] # Voir le prompt d'un agent
|
|
92
|
-
mdan skills # Lister les skills
|
|
93
|
-
mdan mcp [action] # MCP config (init|validate|list)
|
|
94
|
-
mdan prompt [action] # Gérer les prompts (list|show)
|
|
95
|
-
mdan version # Version
|
|
96
|
-
```
|
|
97
|
+
## 🤖 Agents Spécialisés
|
|
98
|
+
|
|
99
|
+
MDAN dispose de 9 agents spécialisés avec personnalité :
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
| Agent | Nom | Phase | Rôle |
|
|
102
|
+
|-------|-----|-------|------|
|
|
103
|
+
| Product | Khalil | DISCOVER | PRD, user stories, priorisation |
|
|
104
|
+
| Architect | Reda | DESIGN | Architecture, stack, ADR |
|
|
105
|
+
| UX | Jihane | DESIGN | Flows, design system, accessibilité |
|
|
106
|
+
| Dev | Haytame | BUILD | Code, tests, refactoring |
|
|
107
|
+
| Test | Youssef | VERIFY | Tests unitaires, E2E, scénarios |
|
|
108
|
+
| Security | Said | BUILD+VERIFY | Vulnérabilités, audit |
|
|
109
|
+
| DevOps | Anas | SHIP | CI/CD, déploiement,监控 |
|
|
110
|
+
| Doc | Amina | SHIP | Documentation, API docs |
|
|
111
|
+
| Learn | - | Toutes | Skills, rules, MCP |
|
|
99
112
|
|
|
100
113
|
---
|
|
101
114
|
|
|
102
|
-
##
|
|
115
|
+
## 📦 Modules
|
|
103
116
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
|
107
|
-
|
|
108
|
-
| **
|
|
109
|
-
| **
|
|
110
|
-
| **
|
|
117
|
+
MDAN s'étend avec des modules officiels pour domaines spécialisés :
|
|
118
|
+
|
|
119
|
+
| Module | Description |
|
|
120
|
+
|--------|-------------|
|
|
121
|
+
| **MDAN Core** | Framework principal avec 5 phases |
|
|
122
|
+
| **Agile Scrum** | Workflows Agile/Scrum (Sprint, backlog, retrospectives) |
|
|
123
|
+
| **Skills** | Compétences additionnelles |
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Ajouter un module
|
|
127
|
+
mdan module add agile-scrum
|
|
128
|
+
```
|
|
111
129
|
|
|
112
130
|
---
|
|
113
131
|
|
|
114
|
-
##
|
|
132
|
+
## 🔧 Fonctionnalités Avancées
|
|
115
133
|
|
|
116
|
-
|
|
117
|
-
|-------|-------|------|
|
|
118
|
-
| Learn Agent | Toutes | Skills, rules, MCP |
|
|
119
|
-
| Product Agent | DISCOVER | PRD, user stories |
|
|
120
|
-
| Architect Agent | DESIGN | Architecture, stack |
|
|
121
|
-
| UX Agent | DESIGN | Flows, design system |
|
|
122
|
-
| Dev Agent | BUILD | Code, tests unitaires |
|
|
123
|
-
| Security Agent | BUILD+VERIFY | Vulnérabilités |
|
|
124
|
-
| Test Agent | VERIFY | Tests E2E, perf |
|
|
125
|
-
| DevOps Agent | SHIP | CI/CD, infra |
|
|
126
|
-
| Doc Agent | SHIP | Documentation |
|
|
134
|
+
### Scenarios (Better Agents)
|
|
127
135
|
|
|
128
|
-
|
|
136
|
+
Tests conversationnels end-to-end pour valider le comportement des agents.
|
|
129
137
|
|
|
130
|
-
|
|
138
|
+
```bash
|
|
139
|
+
# Créer un scenario
|
|
140
|
+
tests/scenarios/auth.test.md
|
|
131
141
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
MDAN: Je veux créer une app de gestion de tâches avec auth,
|
|
135
|
-
dashboard et notifications. Commence par DISCOVER.
|
|
142
|
+
# Exécuter
|
|
143
|
+
npm test -- tests/scenarios/
|
|
136
144
|
```
|
|
137
145
|
|
|
138
|
-
###
|
|
146
|
+
### Evaluations
|
|
147
|
+
|
|
148
|
+
Benchmarking structuré pour les composants RAG/ML.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Évaluer la qualité RAG
|
|
152
|
+
langwatch evaluate --dataset customer-support
|
|
139
153
|
```
|
|
140
|
-
|
|
141
|
-
|
|
154
|
+
|
|
155
|
+
### Prompts Versionnés
|
|
156
|
+
|
|
157
|
+
Tous les prompts sont versionnés en YAML avec historique.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Lister les prompts
|
|
161
|
+
mdan prompt list
|
|
162
|
+
|
|
163
|
+
# Voir un prompt
|
|
164
|
+
mdan prompt show orchestrator
|
|
142
165
|
```
|
|
143
166
|
|
|
144
|
-
###
|
|
167
|
+
### MCP Integration
|
|
168
|
+
|
|
169
|
+
Configuration automatique pour Cursor, Claude Code, Windsurf.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Générer la config MCP
|
|
173
|
+
mdan mcp init
|
|
145
174
|
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 📖 Commandes
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
mdan init [nom] # Créer un nouveau projet
|
|
182
|
+
mdan attach [--rebuild] # Ajouter MDAN à un projet existant
|
|
183
|
+
mdan status # Voir le statut du projet
|
|
184
|
+
mdan phase [1-5] # Afficher le guide d'une phase
|
|
185
|
+
mdan workflow [nom] # Afficher un workflow détaillé
|
|
186
|
+
mdan module add [nom] # Installer un module
|
|
187
|
+
mdan oc # Copier l'orchestrateur
|
|
188
|
+
mdan agent [nom] # Voir un agent
|
|
189
|
+
mdan skills # Lister les skills
|
|
190
|
+
mdan mcp [action] # Config MCP
|
|
191
|
+
mdan prompt [action] # Gérer les prompts
|
|
149
192
|
```
|
|
150
193
|
|
|
151
194
|
---
|
|
@@ -155,75 +198,55 @@ pour tout réécrire from scratch.
|
|
|
155
198
|
- **Cursor** — `.cursorrules` auto-généré
|
|
156
199
|
- **Windsurf** — `.windsurfrules` auto-généré
|
|
157
200
|
- **Claude Code** — `.claude/skills/` auto-généré
|
|
158
|
-
- **
|
|
159
|
-
- **
|
|
201
|
+
- **VS Code** — Via MCP
|
|
202
|
+
- **GitHub Copilot** — `.github/copilot-instructions.md`
|
|
160
203
|
|
|
161
204
|
---
|
|
162
205
|
|
|
163
|
-
## 📁 Structure
|
|
206
|
+
## 📁 Structure du Projet
|
|
164
207
|
|
|
165
208
|
```
|
|
166
209
|
projet/
|
|
167
210
|
├── mdan/
|
|
168
|
-
│ ├── orchestrator.md # System prompt
|
|
211
|
+
│ ├── orchestrator.md # System prompt principal
|
|
212
|
+
│ ├── universal-envelope.md
|
|
169
213
|
│ ├── agents/ # Prompts des agents
|
|
170
|
-
│ ├──
|
|
171
|
-
│
|
|
214
|
+
│ │ ├── dev.md
|
|
215
|
+
│ │ ├── test.md
|
|
216
|
+
│ │ └── ...
|
|
217
|
+
│ └── skills/ # Skills installés
|
|
172
218
|
├── tests/
|
|
173
|
-
│ ├── scenarios/ # Tests conversationnels
|
|
174
|
-
│ └── evaluations/ # Évaluations
|
|
219
|
+
│ ├── scenarios/ # Tests conversationnels
|
|
220
|
+
│ └── evaluations/ # Évaluations benchmarks
|
|
175
221
|
├── templates/
|
|
176
|
-
│ ├── prompts/
|
|
177
|
-
│ └── prompts.json
|
|
178
|
-
├── mdan_output/
|
|
179
|
-
├── .cursorrules
|
|
180
|
-
├── .windsurfrules
|
|
181
|
-
├── .claude/skills/
|
|
182
|
-
├── .github/
|
|
183
|
-
├── .mcp.json
|
|
184
|
-
|
|
222
|
+
│ ├── prompts/ # Prompts versionnés (YAML)
|
|
223
|
+
│ └── prompts.json # Registre des prompts
|
|
224
|
+
├── mdan_output/ # Artifacts générés par les agents
|
|
225
|
+
├── .cursorrules # Pour Cursor
|
|
226
|
+
├── .windsurfrules # Pour Windsurf
|
|
227
|
+
├── .claude/skills/ # Pour Claude Code
|
|
228
|
+
├── .github/ # Pour Copilot
|
|
229
|
+
├── .mcp.json # Configuration MCP
|
|
230
|
+
├── AGENTS.md # Guidelines de développement
|
|
231
|
+
└── MDAN-STATE.json # État de la session
|
|
185
232
|
```
|
|
186
233
|
|
|
187
|
-
### Fonctionnalités Better Agents intégrées
|
|
188
|
-
|
|
189
|
-
| Feature | Description |
|
|
190
|
-
|---------|-------------|
|
|
191
|
-
| **Scenarios** | Tests conversationnels end-to-end dans `tests/scenarios/` |
|
|
192
|
-
| **Evaluations** | Benchmarking structuré (RAG, classification) dans `tests/evaluations/` |
|
|
193
|
-
| **Prompts** | Versionnage des prompts en YAML dans `templates/prompts/` |
|
|
194
|
-
| **MCP** | Configuration pour Cursor/Claude via `.mcp.json` |
|
|
195
|
-
| **AGENTS.md** | Guidelines de développement (copie de Better Agents) |
|
|
196
|
-
|
|
197
234
|
---
|
|
198
235
|
|
|
199
|
-
##
|
|
236
|
+
## 🏗️ Architecture Technique
|
|
200
237
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## 🏗️ Architecture
|
|
206
|
-
|
|
207
|
-
MDAN se compose de plusieurs composants interconnectés:
|
|
238
|
+
MDAN se compose de plusieurs composants interconnectés :
|
|
208
239
|
|
|
209
240
|
| Composant | Rôle |
|
|
210
241
|
|-----------|------|
|
|
211
242
|
| **MDAN Core** | Orchestrateur central qui coordonne les agents |
|
|
212
|
-
| **Agents** | 9 agents spécialisés
|
|
213
|
-
| **CLI** | Interface en ligne de commande
|
|
214
|
-
| **Memory** |
|
|
243
|
+
| **Agents** | 9 agents spécialisés avec personnalité |
|
|
244
|
+
| **CLI** | Interface en ligne de commande |
|
|
245
|
+
| **Memory** | Persistance entre sessions |
|
|
215
246
|
| **Skills** | Compétences optionnelles extensibles |
|
|
216
|
-
| **Scenarios** | Tests conversationnels
|
|
217
|
-
| **Evaluations** | Benchmarking de composants
|
|
218
|
-
| **Prompts** | Versionnage YAML
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
Utilisateur → CLI → MDAN Core → Agents → Artifacts
|
|
222
|
-
↓
|
|
223
|
-
Memory System
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Voir [ARCHITECTURE.md](ARCHITECTURE.md) pour la documentation technique complète.
|
|
247
|
+
| **Scenarios** | Tests conversationnels |
|
|
248
|
+
| **Evaluations** | Benchmarking de composants |
|
|
249
|
+
| **Prompts** | Versionnage YAML |
|
|
227
250
|
|
|
228
251
|
---
|
|
229
252
|
|
|
@@ -231,18 +254,24 @@ Voir [ARCHITECTURE.md](ARCHITECTURE.md) pour la documentation technique complèt
|
|
|
231
254
|
|
|
232
255
|
| Document | Description |
|
|
233
256
|
|----------|-------------|
|
|
234
|
-
| [ARCHITECTURE.md](ARCHITECTURE.md) | Architecture technique
|
|
235
|
-
| [MDAN.md](MDAN.md) | Spécification complète
|
|
236
|
-
| [
|
|
237
|
-
| [
|
|
238
|
-
| [Exemple complet](examples/taskflow-api/EXAMPLE.md) | Projet exemple TaskFlow API |
|
|
257
|
+
| [ARCHITECTURE.md](ARCHITECTURE.md) | Architecture technique |
|
|
258
|
+
| [MDAN.md](MDAN.md) | Spécification complète |
|
|
259
|
+
| [AGENTS.md](AGENTS.md) | Guidelines de développement |
|
|
260
|
+
| [docs/fr/](docs/fr/) | Documentation en français |
|
|
239
261
|
|
|
240
262
|
---
|
|
241
263
|
|
|
242
264
|
## 🔗 Liens
|
|
243
265
|
|
|
244
|
-
- [Documentation EN](docs/en/README.md)
|
|
245
|
-
- [Documentation FR](docs/fr/README.md)
|
|
246
266
|
- [GitHub](https://github.com/khalilbenaz/MDAN)
|
|
247
267
|
- [NPM](https://www.npmjs.com/package/mdan-cli)
|
|
248
|
-
- [
|
|
268
|
+
- [Documentation](https://github.com/khalilbenaz/MDAN#readme)
|
|
269
|
+
- [Discord](https://discord.gg/mdan)
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 📄 Licence
|
|
274
|
+
|
|
275
|
+
MIT License — voir [LICENSE](LICENSE) pour les détails.
|
|
276
|
+
|
|
277
|
+
---
|
package/cli/mdan.js
CHANGED
|
@@ -6,7 +6,7 @@ const { execSync } = require('child_process');
|
|
|
6
6
|
const { intro, text, select, isCancel, cancel, outro, spinner } = require('@clack/prompts');
|
|
7
7
|
const pc = require('picocolors');
|
|
8
8
|
|
|
9
|
-
const VERSION = '2.
|
|
9
|
+
const VERSION = '2.5.0';
|
|
10
10
|
const MDAN_DIR = path.resolve(__dirname, '..');
|
|
11
11
|
|
|
12
12
|
// Colors
|
|
@@ -35,29 +35,29 @@ ${colors.nc}
|
|
|
35
35
|
|
|
36
36
|
function showHelp() {
|
|
37
37
|
banner();
|
|
38
|
-
console.log(`${colors.bold}
|
|
38
|
+
console.log(`${colors.bold}UTILISATION${colors.nc}
|
|
39
39
|
mdan <command> [options]
|
|
40
40
|
|
|
41
|
-
${colors.bold}
|
|
42
|
-
init [
|
|
43
|
-
attach [--rebuild]
|
|
44
|
-
status
|
|
45
|
-
phase [1-5]
|
|
46
|
-
workflow [
|
|
47
|
-
module add [
|
|
48
|
-
agent [
|
|
49
|
-
oc
|
|
50
|
-
skills
|
|
51
|
-
mcp [action]
|
|
52
|
-
prompt [action]
|
|
53
|
-
version
|
|
54
|
-
|
|
55
|
-
${colors.bold}
|
|
56
|
-
mdan init
|
|
57
|
-
cd
|
|
58
|
-
mdan attach --rebuild
|
|
59
|
-
mdan mcp init
|
|
60
|
-
mdan prompt list
|
|
41
|
+
${colors.bold}COMMANDES${colors.nc}
|
|
42
|
+
init [nom] Creer un nouveau projet
|
|
43
|
+
attach [--rebuild] Ajouter MDAN a un projet existant
|
|
44
|
+
status Afficher le statut du projet
|
|
45
|
+
phase [1-5] Afficher le guide d'une phase
|
|
46
|
+
workflow [nom] Afficher un workflow detaille
|
|
47
|
+
module add [nom] Installer un module (ex: agile-scrum)
|
|
48
|
+
agent [nom] Afficher le prompt d'un agent
|
|
49
|
+
oc Copier le prompt de l'orchestrateur
|
|
50
|
+
skills Lister les skills disponibles
|
|
51
|
+
mcp [action] Config MCP (init|validate|list)
|
|
52
|
+
prompt [action] Gerer les prompts (list|show <nom>)
|
|
53
|
+
version Afficher la version
|
|
54
|
+
|
|
55
|
+
${colors.bold}EXEMPLES${colors.nc}
|
|
56
|
+
mdan init mon-projet # Nouveau projet
|
|
57
|
+
cd mon-projet && mdan attach # Projet existant
|
|
58
|
+
mdan attach --rebuild # Rebuild complet
|
|
59
|
+
mdan mcp init # Generer .mcp.json
|
|
60
|
+
mdan prompt list # Lister les prompts
|
|
61
61
|
|
|
62
62
|
${colors.bold}AGENTS${colors.nc}
|
|
63
63
|
product, architect, ux, dev, test, security, devops, doc
|
|
@@ -65,43 +65,43 @@ function showHelp() {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
async function cmdInit(initialName) {
|
|
68
|
-
intro(pc.bgCyan(pc.black(' MDAN v' + VERSION + ' -
|
|
68
|
+
intro(pc.bgCyan(pc.black(' MDAN v' + VERSION + ' - Assistant de creation ')));
|
|
69
69
|
|
|
70
70
|
let name = initialName;
|
|
71
71
|
|
|
72
72
|
if (!name) {
|
|
73
73
|
const namePrompt = await text({
|
|
74
|
-
message: '
|
|
75
|
-
initialValue: '
|
|
74
|
+
message: 'Quel est le nom de votre projet ?',
|
|
75
|
+
initialValue: 'mon-projet',
|
|
76
76
|
validate(value) {
|
|
77
|
-
if (value.length === 0) return '
|
|
77
|
+
if (value.length === 0) return 'Le nom est requis !';
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
if (isCancel(namePrompt)) {
|
|
82
|
-
cancel('Operation
|
|
82
|
+
cancel('Operation annulee.');
|
|
83
83
|
return process.exit(0);
|
|
84
84
|
}
|
|
85
85
|
name = namePrompt;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
const setupType = await select({
|
|
89
|
-
message: '
|
|
89
|
+
message: 'Quel type de projet construisez-vous ?',
|
|
90
90
|
options: [
|
|
91
|
-
{ value: 'standard', label: '
|
|
92
|
-
{ value: 'micro', label: 'Micro
|
|
93
|
-
{ value: 'api', label: 'API / SDK', hint: '
|
|
94
|
-
{ value: 'product', label: 'Scale-up
|
|
91
|
+
{ value: 'standard', label: 'Application Web/Mobile standard', hint: 'Workflow 5 phases par defaut' },
|
|
92
|
+
{ value: 'micro', label: 'Micro projet', hint: 'Dev solo, une seule feature' },
|
|
93
|
+
{ value: 'api', label: 'API / SDK', hint: 'Pas de UI, oriente dev' },
|
|
94
|
+
{ value: 'product', label: 'Produit Scale-up', hint: 'Multi-mois, stakeholders' }
|
|
95
95
|
]
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
if (isCancel(setupType)) {
|
|
99
|
-
cancel('Operation
|
|
99
|
+
cancel('Operation annulee.');
|
|
100
100
|
return process.exit(0);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const s = spinner();
|
|
104
|
-
s.start(`
|
|
104
|
+
s.start(`Creation de la structure du projet ${name}...`);
|
|
105
105
|
|
|
106
106
|
const dirs = [
|
|
107
107
|
`${name}/mdan/agents`,
|
|
@@ -167,33 +167,33 @@ async function cmdInit(initialName) {
|
|
|
167
167
|
};
|
|
168
168
|
fs.writeFileSync(`${name}/.mcp.json`, JSON.stringify(mcpConfig, null, 2));
|
|
169
169
|
|
|
170
|
-
s.stop(pc.green(`
|
|
170
|
+
s.stop(pc.green(`Projet ${name} initialise avec succes !`));
|
|
171
171
|
|
|
172
172
|
outro(
|
|
173
|
-
pc.bold('
|
|
173
|
+
pc.bold('Prochaines etapes:\n') +
|
|
174
174
|
`1. ${pc.cyan(`cd ${name}`)}\n` +
|
|
175
|
-
`2.
|
|
176
|
-
`3.
|
|
175
|
+
`2. Ouvrez le dossier dans votre IDE (Cursor, Windsurf, etc.)\n` +
|
|
176
|
+
`3. Ou executez ${pc.cyan('mdan oc')} et collez dans votre LLM prefere.`
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
async function cmdAttach(rebuildMode) {
|
|
181
|
-
intro(pc.bgMagenta(pc.black(' MDAN v' + VERSION + ' -
|
|
181
|
+
intro(pc.bgMagenta(pc.black(' MDAN v' + VERSION + ' - Assistant d\'attachement ')));
|
|
182
182
|
|
|
183
183
|
const projectName = path.basename(process.cwd());
|
|
184
184
|
let isRebuild = rebuildMode === '--rebuild';
|
|
185
185
|
|
|
186
186
|
if (!rebuildMode) {
|
|
187
187
|
const action = await select({
|
|
188
|
-
message: `
|
|
188
|
+
message: `Comment voulez-vous attacher MDAN a ${pc.bold(projectName)} ?`,
|
|
189
189
|
options: [
|
|
190
|
-
{ value: 'attach', label: '
|
|
191
|
-
{ value: 'rebuild', label: 'Rebuild
|
|
190
|
+
{ value: 'attach', label: 'Attacher normalement', hint: 'Analyser le code existant et ajouter des features' },
|
|
191
|
+
{ value: 'rebuild', label: 'Mode Rebuild', hint: 'Analyser et tout reecrire from scratch' }
|
|
192
192
|
]
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
if (isCancel(action)) {
|
|
196
|
-
cancel('Operation
|
|
196
|
+
cancel('Operation annulee.');
|
|
197
197
|
return process.exit(0);
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -202,8 +202,8 @@ async function cmdAttach(rebuildMode) {
|
|
|
202
202
|
|
|
203
203
|
const s = spinner();
|
|
204
204
|
s.start(isRebuild
|
|
205
|
-
? `
|
|
206
|
-
: `
|
|
205
|
+
? `Preparation de l'environnement REBUILD pour ${projectName}...`
|
|
206
|
+
: `Attachement de MDAN a ${projectName}...`);
|
|
207
207
|
|
|
208
208
|
fs.mkdirSync('mdan/agents', { recursive: true });
|
|
209
209
|
fs.mkdirSync('mdan/skills', { recursive: true });
|
|
@@ -260,15 +260,15 @@ async function cmdAttach(rebuildMode) {
|
|
|
260
260
|
};
|
|
261
261
|
fs.writeFileSync('.mcp.json', JSON.stringify(mcpConfig, null, 2));
|
|
262
262
|
|
|
263
|
-
s.stop(pc.green(`MDAN
|
|
263
|
+
s.stop(pc.green(`MDAN attache avec succes !`));
|
|
264
264
|
|
|
265
265
|
outro(
|
|
266
|
-
pc.bold('
|
|
267
|
-
`1.
|
|
268
|
-
`2.
|
|
266
|
+
pc.bold('Prochaines etapes:\n') +
|
|
267
|
+
`1. Ouvrez ce dossier dans votre IDE (Cursor, Windsurf, etc.)\n` +
|
|
268
|
+
`2. Ou executez ${pc.cyan('mdan oc')} et collez le prompt dans Claude/ChatGPT\n\n` +
|
|
269
269
|
(isRebuild
|
|
270
|
-
? pc.magenta(`
|
|
271
|
-
: pc.cyan(`
|
|
270
|
+
? pc.magenta(`Prompt de demarrage: "MDAN REBUILD: Analyze and rewrite this project"`)
|
|
271
|
+
: pc.cyan(`Prompt de demarrage: "MDAN: Analyze this project and help me [votre objectif]"`))
|
|
272
272
|
);
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -294,26 +294,26 @@ function cmdOc() {
|
|
|
294
294
|
} else {
|
|
295
295
|
throw new Error('Unsupported platform');
|
|
296
296
|
}
|
|
297
|
-
console.log(`${colors.green}✅
|
|
298
|
-
console.log('
|
|
297
|
+
console.log(`${colors.green}✅ Prompt de l'orchestrateur copie dans le presse-papier !${colors.nc}`);
|
|
298
|
+
console.log(' Collez-le dans Claude, ChatGPT, ou votre LLM prefere.');
|
|
299
299
|
} catch (e) {
|
|
300
300
|
console.log(content);
|
|
301
|
-
console.log(`\n${colors.yellow}⚠️
|
|
301
|
+
console.log(`\n${colors.yellow}⚠️ Impossible de copier automatiquement. Veuillez copier le texte ci-dessus.${colors.nc}`);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
|
-
console.log(`${colors.red}
|
|
304
|
+
console.log(`${colors.red}Fichier orchestrateur introuvable.${colors.nc}`);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
function cmdStatus() {
|
|
309
309
|
if (fs.existsSync('mdan/orchestrator.md')) {
|
|
310
|
-
console.log(`${colors.green}✅ MDAN
|
|
310
|
+
console.log(`${colors.green}✅ MDAN est actif dans ce projet${colors.nc}`);
|
|
311
311
|
if (fs.existsSync('mdan/STATUS.md')) {
|
|
312
312
|
console.log(fs.readFileSync('mdan/STATUS.md', 'utf8'));
|
|
313
313
|
}
|
|
314
314
|
} else {
|
|
315
|
-
console.log(`${colors.yellow}
|
|
316
|
-
console.log('
|
|
315
|
+
console.log(`${colors.yellow}Pas de projet MDAN ici.${colors.nc}`);
|
|
316
|
+
console.log(' Executer: mdan init [nom] ou mdan attach');
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
|
|
@@ -332,7 +332,7 @@ function cmdPhase(num, action) {
|
|
|
332
332
|
};
|
|
333
333
|
|
|
334
334
|
if (!phases[num]) {
|
|
335
|
-
console.log('
|
|
335
|
+
console.log('Utilisation: mdan phase [1-5|nom] [copy]');
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -357,26 +357,26 @@ function cmdPhase(num, action) {
|
|
|
357
357
|
} else {
|
|
358
358
|
throw new Error('Unsupported platform');
|
|
359
359
|
}
|
|
360
|
-
console.log(`${colors.green}✅
|
|
361
|
-
console.log('
|
|
360
|
+
console.log(`${colors.green}✅ Prompt de la phase ${name} copie dans le presse-papier !${colors.nc}`);
|
|
361
|
+
console.log(' Collez-le dans votre LLM pour demarrer la phase.');
|
|
362
362
|
} catch (e) {
|
|
363
363
|
console.log(content);
|
|
364
|
-
console.log(`\n${colors.yellow}⚠️
|
|
364
|
+
console.log(`\n${colors.yellow}⚠️ Impossible de copier automatiquement. Veuillez copier le texte ci-dessus.${colors.nc}`);
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
367
|
console.log(`${colors.cyan}${colors.bold}Phase ${name}${colors.nc}`);
|
|
368
368
|
console.log(content);
|
|
369
|
-
console.log(`\n${colors.yellow}
|
|
369
|
+
console.log(`\n${colors.yellow}Astuce: Executez '${colors.cyan}mdan phase ${num} copy${colors.yellow}' pour copier ce contenu.${colors.nc}`);
|
|
370
370
|
}
|
|
371
371
|
} else {
|
|
372
|
-
console.log(`${colors.red}
|
|
372
|
+
console.log(`${colors.red}Fichier de phase introuvable: ${file}${colors.nc}`);
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
function cmdModule(action, name) {
|
|
377
377
|
if (action !== 'add' || !name) {
|
|
378
|
-
console.log('
|
|
379
|
-
console.log('
|
|
378
|
+
console.log('Utilisation: mdan module add [nom]');
|
|
379
|
+
console.log('Modules disponibles:');
|
|
380
380
|
if (fs.existsSync(`${MDAN_DIR}/modules`)) {
|
|
381
381
|
fs.readdirSync(`${MDAN_DIR}/modules`).forEach(m => {
|
|
382
382
|
const stat = fs.statSync(`${MDAN_DIR}/modules/${m}`);
|
|
@@ -388,14 +388,14 @@ function cmdModule(action, name) {
|
|
|
388
388
|
|
|
389
389
|
const moduleDir = `${MDAN_DIR}/modules/${name}`;
|
|
390
390
|
if (!fs.existsSync(moduleDir)) {
|
|
391
|
-
console.log(`${colors.red}Module
|
|
391
|
+
console.log(`${colors.red}Module introuvable: ${name}${colors.nc}`);
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
console.log(`${colors.cyan}📦
|
|
395
|
+
console.log(`${colors.cyan}📦 Installation du module: ${colors.bold}${name}${colors.nc}`);
|
|
396
396
|
|
|
397
397
|
if (!fs.existsSync('mdan')) {
|
|
398
|
-
console.log(`${colors.yellow}⚠️
|
|
398
|
+
console.log(`${colors.yellow}⚠️ Pas de dossier mdan trouve. Etes-vous dans un projet MDAN ?${colors.nc}`);
|
|
399
399
|
return;
|
|
400
400
|
}
|
|
401
401
|
|
|
@@ -403,17 +403,17 @@ function cmdModule(action, name) {
|
|
|
403
403
|
if (fs.existsSync(`${moduleDir}/agents`)) {
|
|
404
404
|
fs.readdirSync(`${moduleDir}/agents`).forEach(f => {
|
|
405
405
|
fs.copyFileSync(`${moduleDir}/agents/${f}`, `mdan/agents/${f}`);
|
|
406
|
-
console.log(`${colors.green}
|
|
406
|
+
console.log(`${colors.green} Agent ajoute:${colors.nc} ${f}`);
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
console.log(`\n${colors.green}✅ Module ${name}
|
|
410
|
+
console.log(`\n${colors.green}✅ Module ${name} installe !${colors.nc}`);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
function cmdWorkflow(name, action) {
|
|
414
414
|
if (!name) {
|
|
415
|
-
console.log('
|
|
416
|
-
console.log('
|
|
415
|
+
console.log('Utilisation: mdan workflow [nom] [copy]');
|
|
416
|
+
console.log('Workflows disponibles:');
|
|
417
417
|
if (fs.existsSync(`${MDAN_DIR}/workflows`)) {
|
|
418
418
|
fs.readdirSync(`${MDAN_DIR}/workflows`).forEach(f => {
|
|
419
419
|
if (f.endsWith('.md')) console.log(` ${f.replace('.md', '')}`);
|
|
@@ -440,18 +440,18 @@ function cmdWorkflow(name, action) {
|
|
|
440
440
|
execSync('wl-copy', { input: content });
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
console.log(`${colors.green}✅
|
|
443
|
+
console.log(`${colors.green}✅ Prompt du workflow ${name} copie dans le presse-papier !${colors.nc}`);
|
|
444
444
|
} catch (e) {
|
|
445
445
|
console.log(content);
|
|
446
|
-
console.log(`\n${colors.yellow}⚠️
|
|
446
|
+
console.log(`\n${colors.yellow}⚠️ Impossible de copier automatiquement. Veuillez copier le texte ci-dessus.${colors.nc}`);
|
|
447
447
|
}
|
|
448
448
|
} else {
|
|
449
449
|
console.log(`${colors.cyan}${colors.bold}Workflow: ${name}${colors.nc}`);
|
|
450
450
|
console.log(content);
|
|
451
|
-
console.log(`\n${colors.yellow}
|
|
451
|
+
console.log(`\n${colors.yellow}Astuce: Executez '${colors.cyan}mdan workflow ${name} copy${colors.yellow}' pour copier ce contenu.${colors.nc}`);
|
|
452
452
|
}
|
|
453
453
|
} else {
|
|
454
|
-
console.log(`${colors.red}Workflow
|
|
454
|
+
console.log(`${colors.red}Workflow introuvable: ${name}${colors.nc}`);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
|
|
@@ -470,7 +470,7 @@ function cmdSkills() {
|
|
|
470
470
|
if (fs.existsSync(skillsDir)) {
|
|
471
471
|
fs.readdirSync(skillsDir).forEach(s => console.log(` ${s}`));
|
|
472
472
|
} else {
|
|
473
|
-
console.log('
|
|
473
|
+
console.log(' Aucun skill installe');
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
|
@@ -500,38 +500,38 @@ function cmdMcp(action) {
|
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
502
|
fs.writeFileSync('.mcp.json', JSON.stringify(mcpConfig, null, 2));
|
|
503
|
-
console.log(`${colors.green}✅ .mcp.json
|
|
504
|
-
console.log('
|
|
503
|
+
console.log(`${colors.green}✅ .mcp.json cree !${colors.nc}`);
|
|
504
|
+
console.log(' Configurez votre IDE pour utiliser MCP avec ce fichier.');
|
|
505
505
|
} else if (action === 'validate') {
|
|
506
506
|
if (fs.existsSync('.mcp.json')) {
|
|
507
507
|
try {
|
|
508
508
|
JSON.parse(fs.readFileSync('.mcp.json', 'utf8'));
|
|
509
|
-
console.log(`${colors.green}✅ .mcp.json
|
|
509
|
+
console.log(`${colors.green}✅ .mcp.json est valide${colors.nc}`);
|
|
510
510
|
} catch (e) {
|
|
511
|
-
console.log(`${colors.red}❌
|
|
511
|
+
console.log(`${colors.red}❌ JSON invalide: ${e.message}${colors.nc}`);
|
|
512
512
|
}
|
|
513
513
|
} else {
|
|
514
|
-
console.log(`${colors.yellow}⚠️
|
|
514
|
+
console.log(`${colors.yellow}⚠️ Pas de .mcp.json trouve${colors.nc}`);
|
|
515
515
|
}
|
|
516
516
|
} else if (action === 'list') {
|
|
517
|
-
console.log(`${colors.cyan}MCP
|
|
518
|
-
console.log(' - mdan-state:
|
|
519
|
-
console.log(' - mdan-agents:
|
|
520
|
-
console.log(' - mdan-phases:
|
|
517
|
+
console.log(`${colors.cyan}Outils MCP:${colors.nc}`);
|
|
518
|
+
console.log(' - mdan-state: Lire/ecrire l\'etat du projet');
|
|
519
|
+
console.log(' - mdan-agents: Lister les agents MDAN');
|
|
520
|
+
console.log(' - mdan-phases: Obtenir les informations des phases');
|
|
521
521
|
} else {
|
|
522
|
-
console.log('
|
|
522
|
+
console.log('Utilisation: mdan mcp [init|validate|list]');
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
function cmdPrompt(action, name) {
|
|
527
527
|
const promptsDir = `${MDAN_DIR}/templates/prompts`;
|
|
528
528
|
if (!fs.existsSync(promptsDir)) {
|
|
529
|
-
console.log(`${colors.yellow}
|
|
529
|
+
console.log(`${colors.yellow}Pas de dossier de prompts trouve${colors.nc}`);
|
|
530
530
|
return;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
if (!action || action === 'list') {
|
|
534
|
-
console.log(`${colors.cyan}
|
|
534
|
+
console.log(`${colors.cyan}Prompts disponibles:${colors.nc}`);
|
|
535
535
|
fs.readdirSync(promptsDir).filter(f => f.endsWith('.yaml')).forEach(f => {
|
|
536
536
|
console.log(` ${f.replace('.yaml', '')}`);
|
|
537
537
|
});
|
|
@@ -540,10 +540,10 @@ function cmdPrompt(action, name) {
|
|
|
540
540
|
if (fs.existsSync(file)) {
|
|
541
541
|
console.log(fs.readFileSync(file, 'utf8'));
|
|
542
542
|
} else {
|
|
543
|
-
console.log(`${colors.red}Prompt
|
|
543
|
+
console.log(`${colors.red}Prompt introuvable: ${name}${colors.nc}`);
|
|
544
544
|
}
|
|
545
545
|
} else {
|
|
546
|
-
console.log('
|
|
546
|
+
console.log('Utilisation: mdan prompt [list|show <nom>]');
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
|
|
@@ -556,16 +556,16 @@ async function main() {
|
|
|
556
556
|
// Interactive Wizard Default
|
|
557
557
|
intro(pc.bgCyan(pc.black(' MDAN v' + VERSION + ' ')));
|
|
558
558
|
const action = await select({
|
|
559
|
-
message: '
|
|
559
|
+
message: 'Que souhaitez-vous faire ?',
|
|
560
560
|
options: [
|
|
561
|
-
{ value: 'init', label: '
|
|
562
|
-
{ value: 'attach', label: '
|
|
563
|
-
{ value: 'help', label: '
|
|
561
|
+
{ value: 'init', label: 'Creer un nouveau projet', hint: 'Commencer a zero' },
|
|
562
|
+
{ value: 'attach', label: 'Attacher a un projet existant', hint: 'Ajouter MDAN a ce dossier' },
|
|
563
|
+
{ value: 'help', label: 'Afficher l\'aide', hint: 'Voir toutes les commandes' }
|
|
564
564
|
]
|
|
565
565
|
});
|
|
566
566
|
|
|
567
567
|
if (isCancel(action)) {
|
|
568
|
-
cancel('Operation
|
|
568
|
+
cancel('Operation annulee.');
|
|
569
569
|
return process.exit(0);
|
|
570
570
|
}
|
|
571
571
|
|
package/cli/mdan.py
CHANGED
package/cli/mdan.sh
CHANGED