mdan-cli 2.2.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 +223 -0
- package/agents/AGENTS-REGISTRY.md +215 -0
- package/agents/architect.md +160 -0
- package/agents/dev.md +166 -0
- package/agents/devops.md +230 -0
- package/agents/doc.md +189 -0
- package/agents/learn.md +377 -0
- package/agents/product.md +124 -0
- package/agents/security.md +168 -0
- package/agents/test.md +151 -0
- package/agents/ux.md +207 -0
- package/cli/mdan.js +505 -0
- package/cli/mdan.py +259 -0
- package/cli/mdan.sh +724 -0
- package/cli/postinstall.js +4 -0
- package/core/orchestrator.md +238 -0
- package/core/universal-envelope.md +160 -0
- package/install.sh +228 -0
- package/integrations/all-integrations.md +300 -0
- package/integrations/claude.md +46 -0
- package/integrations/cursor.md +74 -0
- package/integrations/windsurf.md +48 -0
- package/memory/MDAN-STATE.template.json +44 -0
- package/memory/MEMORY-SYSTEM.md +197 -0
- package/package.json +48 -0
- package/phases/01-discover.md +136 -0
- package/phases/02-design.md +147 -0
- package/phases/03-build.md +113 -0
- package/phases/04-verify.md +101 -0
- package/phases/05-ship.md +156 -0
- package/skills/find-skills/skill.md +133 -0
- package/templates/ARCHITECTURE.md +186 -0
- package/templates/CHANGELOG.md +41 -0
- package/templates/MDAN-KNOWLEDGE.md +73 -0
- package/templates/PRD.md +120 -0
- package/templates/SECURITY-REVIEW.md +99 -0
- package/templates/TEST-PLAN.md +97 -0
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# MDAN — Multi-Agent Development Agentic Network
|
|
2
|
+
|
|
3
|
+
> Une méthode agentique moderne pour construire n'importe quel logiciel avec l'IA.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🌟 Pourquoi MDAN v2 ?
|
|
8
|
+
|
|
9
|
+
MDAN v2 a été repensé pour être un véritable collaborateur expert plutôt qu'un simple outil de génération de code.
|
|
10
|
+
|
|
11
|
+
- **🤖 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 de votre projet (du script solo à l'application d'entreprise)
|
|
13
|
+
- **🎉 Party Mode** — Invoquez plusieurs agents avec `/party` pour débattre et collaborer sur des choix d'architecture ou de design
|
|
14
|
+
- **🧠 Workflow Structuré** — 5 phases claires et éprouvées (Discover, Design, Build, Verify, Ship)
|
|
15
|
+
- **🔌 Mémoire Persistante** — Avec le fichier `MDAN-STATE.json` qui vous permet de reprendre votre travail d'une session à l'autre
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚡ Installation
|
|
20
|
+
|
|
21
|
+
### Option 1 : npm (Recommandé)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g mdan
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Option 2 : npx (Sans installation)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx mdan init mon-projet
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Option 3 : Script d'installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
curl -fsSL https://raw.githubusercontent.com/khalilbenaz/MDAN/main/install.sh | bash
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Option 4 : Manuel
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
git clone https://github.com/khalilbenaz/MDAN.git
|
|
43
|
+
cd MDAN && bash install.sh
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 🚀 Utilisation
|
|
49
|
+
|
|
50
|
+
### Nouveau projet
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
mdan init mon-projet
|
|
54
|
+
cursor mon-projet
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Projet existant
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
cd votre-projet
|
|
61
|
+
mdan attach
|
|
62
|
+
cursor .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Rebuild from scratch
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd votre-projet
|
|
69
|
+
mdan attach --rebuild
|
|
70
|
+
cursor .
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 📖 Commandes
|
|
76
|
+
|
|
77
|
+
MDAN v2 propose un installeur **interactif** : tapez simplement `mdan` pour être guidé !
|
|
78
|
+
|
|
79
|
+
Vous pouvez aussi utiliser les commandes directes :
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
mdan init # Lancer l'assistant de création (Wizard)
|
|
83
|
+
mdan init [nom] # Créer un nouveau projet directement
|
|
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 version # Version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
*Astuce : Vous pouvez ajouter `copy` ou `-c` à la fin des commandes `phase` ou `workflow` pour copier le contenu directement dans votre presse-papier (ex: `mdan phase 1 copy`).*
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🎯 Workflow
|
|
101
|
+
|
|
102
|
+
| Phase | Agent | Résultat |
|
|
103
|
+
|-------|-------|----------|
|
|
104
|
+
| **1. DISCOVER** | Product Agent | PRD validé |
|
|
105
|
+
| **2. DESIGN** | Architect + UX | Architecture + Specs |
|
|
106
|
+
| **3. BUILD** | Dev + Security | Code implémenté |
|
|
107
|
+
| **4. VERIFY** | Test + Security | Tests passants |
|
|
108
|
+
| **5. SHIP** | DevOps + Doc | Déployé + Documenté |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🤖 Agents
|
|
113
|
+
|
|
114
|
+
| Agent | Phase | Rôle |
|
|
115
|
+
|-------|-------|------|
|
|
116
|
+
| Learn Agent | Toutes | Skills, rules, MCP |
|
|
117
|
+
| Product Agent | DISCOVER | PRD, user stories |
|
|
118
|
+
| Architect Agent | DESIGN | Architecture, stack |
|
|
119
|
+
| UX Agent | DESIGN | Flows, design system |
|
|
120
|
+
| Dev Agent | BUILD | Code, tests unitaires |
|
|
121
|
+
| Security Agent | BUILD+VERIFY | Vulnérabilités |
|
|
122
|
+
| Test Agent | VERIFY | Tests E2E, perf |
|
|
123
|
+
| DevOps Agent | SHIP | CI/CD, infra |
|
|
124
|
+
| Doc Agent | SHIP | Documentation |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 💡 Exemples de prompts
|
|
129
|
+
|
|
130
|
+
### Nouveau projet
|
|
131
|
+
```
|
|
132
|
+
MDAN: Je veux créer une app de gestion de tâches avec auth,
|
|
133
|
+
dashboard et notifications. Commence par DISCOVER.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Projet existant
|
|
137
|
+
```
|
|
138
|
+
MDAN: Analyse ce projet et propose des améliorations.
|
|
139
|
+
Identifie la dette technique et suggère des optimizations.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Rebuild complet
|
|
143
|
+
```
|
|
144
|
+
MDAN REBUILD: Analyse tout le code existant, documente
|
|
145
|
+
chaque feature, et propose une architecture moderne
|
|
146
|
+
pour tout réécrire from scratch.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 🔌 IDE Supportés
|
|
152
|
+
|
|
153
|
+
- **Cursor** — `.cursorrules` auto-généré
|
|
154
|
+
- **Windsurf** — `.windsurfrules` auto-généré
|
|
155
|
+
- **Claude Code** — `.claude/skills/` auto-généré
|
|
156
|
+
- **GitHub Copilot** — `.github/copilot-instructions.md` auto-généré
|
|
157
|
+
- **Claude Web** — Copier `.mdan/orchestrator.md`
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 📁 Structure créée
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
projet/
|
|
165
|
+
├── .mdan/
|
|
166
|
+
│ ├── orchestrator.md # System prompt
|
|
167
|
+
│ ├── agents/ # Prompts des agents
|
|
168
|
+
│ ├── skills/ # Skills installés
|
|
169
|
+
│ └── STATUS.md # Progression
|
|
170
|
+
├── mdan_output/ # Dossier où les agents génèrent leurs livrables (PRD, Archi...)
|
|
171
|
+
├── .cursorrules # Pour Cursor
|
|
172
|
+
├── .windsurfrules # Pour Windsurf
|
|
173
|
+
├── .claude/skills/ # Pour Claude Code
|
|
174
|
+
└── .github/copilot-instructions.md
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 📄 Licence
|
|
180
|
+
|
|
181
|
+
MIT — Libre d'utilisation.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 🏗️ Architecture
|
|
186
|
+
|
|
187
|
+
MDAN se compose de plusieurs composants interconnectés:
|
|
188
|
+
|
|
189
|
+
| Composant | Rôle |
|
|
190
|
+
|-----------|------|
|
|
191
|
+
| **MDAN Core** | Orchestrateur central qui coordonne les agents |
|
|
192
|
+
| **Agents** | 9 agents spécialisés (Product, Architect, UX, Dev, etc.) |
|
|
193
|
+
| **CLI** | Interface en ligne de commande (`mdan init`, `mdan attach`) |
|
|
194
|
+
| **Memory** | Système de persistance entre sessions (`MDAN-STATE.json`) |
|
|
195
|
+
| **Skills** | Compétences optionnelles extensibles |
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Utilisateur → CLI → MDAN Core → Agents → Artifacts
|
|
199
|
+
↓
|
|
200
|
+
Memory System
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Voir [ARCHITECTURE.md](ARCHITECTURE.md) pour la documentation technique complète.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 📚 Documentation
|
|
208
|
+
|
|
209
|
+
| Document | Description |
|
|
210
|
+
|----------|-------------|
|
|
211
|
+
| [ARCHITECTURE.md](ARCHITECTURE.md) | Architecture technique du projet |
|
|
212
|
+
| [MDAN.md](MDAN.md) | Spécification complète de la méthode |
|
|
213
|
+
| [CLI-REFERENCE.md](docs/fr/CLI-REFERENCE.md) | Référence des commandes CLI |
|
|
214
|
+
| [CONTRIBUTING-DEV.md](docs/fr/CONTRIBUTING-DEV.md) | Guide du contributeur développeur |
|
|
215
|
+
| [Exemple complet](examples/taskflow-api/EXAMPLE.md) | Projet exemple TaskFlow API |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 🔗 Liens
|
|
220
|
+
|
|
221
|
+
- [Documentation EN](docs/en/README.md)
|
|
222
|
+
- [Documentation FR](docs/fr/README.md)
|
|
223
|
+
- [GitHub](https://github.com/khalilbenaz/MDAN)
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# MDAN — Agent Versioning System
|
|
2
|
+
|
|
3
|
+
> Comment les agents sont versionnés, mis à jour et rétrocompatibles.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pourquoi versionner les agents ?
|
|
8
|
+
|
|
9
|
+
Un projet peut durer des semaines. Entre deux sessions, tu peux mettre à jour un agent
|
|
10
|
+
(meilleur prompt, nouveaux patterns de sécurité, format de sortie amélioré).
|
|
11
|
+
Sans versioning, les projets en cours ne savent pas quelle version ils utilisent —
|
|
12
|
+
et les résultats deviennent incohérents.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Schéma de version
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
MAJOR.MINOR.PATCH
|
|
20
|
+
|
|
21
|
+
2.1.3
|
|
22
|
+
│ │ └── PATCH : correction de bug dans le prompt (même comportement, résultat plus propre)
|
|
23
|
+
│ └──── MINOR : nouvelle capacité ajoutée (rétrocompatible)
|
|
24
|
+
└────── MAJOR : changement de comportement ou format de sortie (breaking change)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Registre des versions — AGENTS-REGISTRY.json
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"registry_version": "1.0",
|
|
34
|
+
"last_updated": "2025-01-20",
|
|
35
|
+
"agents": {
|
|
36
|
+
"product": {
|
|
37
|
+
"current": "2.0.0",
|
|
38
|
+
"changelog": [
|
|
39
|
+
{
|
|
40
|
+
"version": "2.0.0",
|
|
41
|
+
"date": "2025-01-20",
|
|
42
|
+
"type": "MAJOR",
|
|
43
|
+
"changes": ["Added MoSCoW section", "Added risk matrix", "Added open questions table"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"version": "1.0.0",
|
|
47
|
+
"date": "2025-01-01",
|
|
48
|
+
"type": "MAJOR",
|
|
49
|
+
"changes": ["Initial release"]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"architect": {
|
|
54
|
+
"current": "2.0.0",
|
|
55
|
+
"changelog": [
|
|
56
|
+
{
|
|
57
|
+
"version": "2.0.0",
|
|
58
|
+
"date": "2025-01-20",
|
|
59
|
+
"type": "MAJOR",
|
|
60
|
+
"changes": ["Added Mermaid diagram requirement", "Added ADR format", "Added non-functional requirements table"]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"ux": {
|
|
65
|
+
"current": "2.0.0",
|
|
66
|
+
"changelog": [
|
|
67
|
+
{
|
|
68
|
+
"version": "2.0.0",
|
|
69
|
+
"date": "2025-01-20",
|
|
70
|
+
"type": "MAJOR",
|
|
71
|
+
"changes": ["Added design system template", "Added all-states requirement", "Added accessibility section"]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"dev": {
|
|
76
|
+
"current": "2.0.0",
|
|
77
|
+
"changelog": [
|
|
78
|
+
{
|
|
79
|
+
"version": "2.0.0",
|
|
80
|
+
"date": "2025-01-20",
|
|
81
|
+
"type": "MAJOR",
|
|
82
|
+
"changes": ["Added implementation plan format", "Added setup instructions section", "Added coding standards reference"]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"test": {
|
|
87
|
+
"current": "2.0.0",
|
|
88
|
+
"changelog": [
|
|
89
|
+
{
|
|
90
|
+
"version": "2.0.0",
|
|
91
|
+
"date": "2025-01-20",
|
|
92
|
+
"type": "MAJOR",
|
|
93
|
+
"changes": ["Added performance test section", "Added security edge cases", "Added flakiness prevention rules"]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"security": {
|
|
98
|
+
"current": "2.0.0",
|
|
99
|
+
"changelog": [
|
|
100
|
+
{
|
|
101
|
+
"version": "2.0.0",
|
|
102
|
+
"date": "2025-01-20",
|
|
103
|
+
"type": "MAJOR",
|
|
104
|
+
"changes": ["Added STRIDE template", "Added VULN severity format", "Added compliance notes section"]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"devops": {
|
|
109
|
+
"current": "2.0.0",
|
|
110
|
+
"changelog": [
|
|
111
|
+
{
|
|
112
|
+
"version": "2.0.0",
|
|
113
|
+
"date": "2025-01-20",
|
|
114
|
+
"type": "MAJOR",
|
|
115
|
+
"changes": ["Added multi-environment table", "Added runbook template", "Added rollback procedure"]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"doc": {
|
|
120
|
+
"current": "2.0.0",
|
|
121
|
+
"changelog": [
|
|
122
|
+
{
|
|
123
|
+
"version": "2.0.0",
|
|
124
|
+
"date": "2025-01-20",
|
|
125
|
+
"type": "MAJOR",
|
|
126
|
+
"changes": ["Added API documentation template", "Added README template"]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"learn": {
|
|
131
|
+
"current": "2.0.0",
|
|
132
|
+
"changelog": [
|
|
133
|
+
{
|
|
134
|
+
"version": "2.0.0",
|
|
135
|
+
"date": "2025-01-20",
|
|
136
|
+
"type": "MAJOR",
|
|
137
|
+
"changes": ["Initial release", "Knowledge acquisition and distribution specialist", "MCP server integration", "Rules ingestion capabilities"]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Compatibilité projet/agent
|
|
148
|
+
|
|
149
|
+
Quand MDAN Core reprend une session depuis MDAN-STATE.json, il compare :
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Project uses: dev agent v1.0.0
|
|
153
|
+
Current MDAN: dev agent v2.0.0
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Et affiche :
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
⚠️ Agent Update Available
|
|
160
|
+
|
|
161
|
+
Dev Agent: v1.0.0 → v2.0.0 (MAJOR)
|
|
162
|
+
|
|
163
|
+
Breaking changes in v2.0.0:
|
|
164
|
+
- Output format changed: now includes "Implementation Plan" section
|
|
165
|
+
- Notes section renamed to "Notes for MDAN Core"
|
|
166
|
+
|
|
167
|
+
Options:
|
|
168
|
+
[1] Continue with v1.0.0 (no change, consistent with past output)
|
|
169
|
+
[2] Upgrade to v2.0.0 (recommended, but review past artifacts)
|
|
170
|
+
[3] Show full changelog
|
|
171
|
+
|
|
172
|
+
What do you prefer?
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Règles de versioning pour les contributeurs
|
|
178
|
+
|
|
179
|
+
### Quand incrémenter PATCH (2.0.X)
|
|
180
|
+
- Correction de faute de frappe dans le prompt
|
|
181
|
+
- Reformulation qui améliore la clarté sans changer le comportement
|
|
182
|
+
- Ajout d'un exemple dans la checklist
|
|
183
|
+
|
|
184
|
+
### Quand incrémenter MINOR (2.X.0)
|
|
185
|
+
- Nouvelle capacité ajoutée (ex: l'agent peut maintenant produire des diagrammes Mermaid)
|
|
186
|
+
- Nouvelle section dans le format de sortie (rétrocompatible)
|
|
187
|
+
- Nouvelles questions dans la checklist qualité
|
|
188
|
+
|
|
189
|
+
### Quand incrémenter MAJOR (X.0.0)
|
|
190
|
+
- Changement de format de sortie (les projets existants ne sont plus compatibles)
|
|
191
|
+
- Changement de responsabilités de l'agent
|
|
192
|
+
- Renommage de sections
|
|
193
|
+
- Suppression de sections existantes
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Header de version dans chaque agent
|
|
198
|
+
|
|
199
|
+
Chaque fichier agent commence par :
|
|
200
|
+
|
|
201
|
+
```markdown
|
|
202
|
+
# MDAN — [Agent Name]
|
|
203
|
+
<!-- version: 2.0.0 -->
|
|
204
|
+
<!-- last-updated: 2025-01-20 -->
|
|
205
|
+
<!-- breaking-changes-from: 1.x -->
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Et dans l'Universal Envelope :
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
[MDAN-AGENT]
|
|
212
|
+
NAME: Dev Agent
|
|
213
|
+
VERSION: 2.0.0
|
|
214
|
+
...
|
|
215
|
+
```
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# MDAN — Architect Agent
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
[MDAN-AGENT]
|
|
5
|
+
NAME: Architect Agent (Reda)
|
|
6
|
+
VERSION: 2.0.0
|
|
7
|
+
ROLE: Principal Software Architect responsible for system design, tech stack selection, and technical specifications
|
|
8
|
+
PHASE: DESIGN
|
|
9
|
+
REPORTS_TO: MDAN Core
|
|
10
|
+
|
|
11
|
+
[IDENTITY]
|
|
12
|
+
You are Reda, a principal software architect with 20+ years of experience designing systems at scale.
|
|
13
|
+
You have built monoliths, microservices, event-driven systems, serverless architectures, and everything
|
|
14
|
+
in between. You know when to use each pattern and — more importantly — when NOT to over-engineer.
|
|
15
|
+
|
|
16
|
+
You design for:
|
|
17
|
+
- Correctness first
|
|
18
|
+
- Maintainability second
|
|
19
|
+
- Scalability third (only when needed)
|
|
20
|
+
|
|
21
|
+
You never choose a technology because it's trendy. You choose it because it's right for the job.
|
|
22
|
+
|
|
23
|
+
[CAPABILITIES]
|
|
24
|
+
- Design system architectures (monolith, microservices, serverless, hybrid)
|
|
25
|
+
- Select and justify technology stacks
|
|
26
|
+
- Design database schemas and data models
|
|
27
|
+
- Design REST, GraphQL, and event-driven APIs
|
|
28
|
+
- Define component diagrams and sequence diagrams (in text/Mermaid format)
|
|
29
|
+
- Identify technical risks and propose mitigations
|
|
30
|
+
- Define coding standards and project conventions
|
|
31
|
+
- Create the Architecture Decision Record (ADR)
|
|
32
|
+
- Estimate technical complexity
|
|
33
|
+
|
|
34
|
+
[CONSTRAINTS]
|
|
35
|
+
- Do NOT ignore non-functional requirements (performance, security, scalability)
|
|
36
|
+
- Do NOT choose complex architectures when simpler ones suffice
|
|
37
|
+
- Do NOT skip documentation of architecture decisions
|
|
38
|
+
- Do NOT define tech stack without considering team skill level
|
|
39
|
+
- Do NOT design APIs without considering backward compatibility
|
|
40
|
+
|
|
41
|
+
[INPUT_FORMAT]
|
|
42
|
+
MDAN Core will provide:
|
|
43
|
+
- Validated PRD from Product Agent
|
|
44
|
+
- Technical constraints (budget, team size, timeline)
|
|
45
|
+
- Existing tech stack (if any)
|
|
46
|
+
- Deployment environment preferences
|
|
47
|
+
|
|
48
|
+
[OUTPUT_FORMAT]
|
|
49
|
+
Produce a complete Architecture Document:
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
Artifact: Architecture Document
|
|
53
|
+
Phase: DESIGN
|
|
54
|
+
Agent: Architect Agent
|
|
55
|
+
Version: 1.0
|
|
56
|
+
Status: Draft
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
# Architecture: [Project Name]
|
|
60
|
+
|
|
61
|
+
## 1. Architecture Overview
|
|
62
|
+
[High-level description and chosen architecture pattern with justification]
|
|
63
|
+
|
|
64
|
+
## 2. System Diagram
|
|
65
|
+
```mermaid
|
|
66
|
+
graph TD
|
|
67
|
+
A[Client] --> B[API Gateway]
|
|
68
|
+
B --> C[Service 1]
|
|
69
|
+
B --> D[Service 2]
|
|
70
|
+
C --> E[(Database)]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 3. Technology Stack
|
|
74
|
+
| Layer | Technology | Version | Justification |
|
|
75
|
+
|-------|-----------|---------|---------------|
|
|
76
|
+
| Frontend | [Tech] | [Ver] | [Why] |
|
|
77
|
+
| Backend | [Tech] | [Ver] | [Why] |
|
|
78
|
+
| Database | [Tech] | [Ver] | [Why] |
|
|
79
|
+
| Cache | [Tech] | [Ver] | [Why] |
|
|
80
|
+
| Auth | [Tech] | [Ver] | [Why] |
|
|
81
|
+
| Hosting | [Tech] | [Ver] | [Why] |
|
|
82
|
+
|
|
83
|
+
## 4. Data Models
|
|
84
|
+
```
|
|
85
|
+
Entity: [Name]
|
|
86
|
+
Fields:
|
|
87
|
+
- id: UUID (PK)
|
|
88
|
+
- created_at: Timestamp
|
|
89
|
+
- [field]: [type] ([constraints])
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 5. API Design
|
|
93
|
+
### Endpoints
|
|
94
|
+
| Method | Path | Description | Auth |
|
|
95
|
+
|--------|------|-------------|------|
|
|
96
|
+
| GET | /api/v1/[resource] | [Description] | [Yes/No] |
|
|
97
|
+
|
|
98
|
+
### Request/Response Examples
|
|
99
|
+
```json
|
|
100
|
+
// POST /api/v1/[resource]
|
|
101
|
+
Request: { "field": "value" }
|
|
102
|
+
Response: { "id": "uuid", "field": "value", "created_at": "..." }
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 6. Security Architecture
|
|
106
|
+
- Authentication: [Method]
|
|
107
|
+
- Authorization: [Method]
|
|
108
|
+
- Data encryption: [At rest / In transit]
|
|
109
|
+
- Secret management: [Tool/Approach]
|
|
110
|
+
|
|
111
|
+
## 7. Non-Functional Requirements
|
|
112
|
+
| Requirement | Target | Strategy |
|
|
113
|
+
|-------------|--------|----------|
|
|
114
|
+
| Performance | [e.g., <200ms p95] | [Strategy] |
|
|
115
|
+
| Availability | [e.g., 99.9%] | [Strategy] |
|
|
116
|
+
| Scalability | [e.g., 10k RPS] | [Strategy] |
|
|
117
|
+
|
|
118
|
+
## 8. Project Structure
|
|
119
|
+
```
|
|
120
|
+
project/
|
|
121
|
+
├── src/
|
|
122
|
+
│ ├── [module]/
|
|
123
|
+
│ └── [module]/
|
|
124
|
+
├── tests/
|
|
125
|
+
├── mdan_output/
|
|
126
|
+
└── [config files]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 9. Coding Conventions
|
|
130
|
+
- Language: [Language + version]
|
|
131
|
+
- Style guide: [e.g., Airbnb, PEP8]
|
|
132
|
+
- Naming conventions: [camelCase, snake_case, etc.]
|
|
133
|
+
- Git branching: [Gitflow, trunk-based, etc.]
|
|
134
|
+
|
|
135
|
+
## 10. Architecture Decision Records (ADR)
|
|
136
|
+
### ADR-001: [Decision Title]
|
|
137
|
+
- Status: Accepted
|
|
138
|
+
- Context: [Why this decision was needed]
|
|
139
|
+
- Decision: [What was decided]
|
|
140
|
+
- Consequences: [Trade-offs]
|
|
141
|
+
|
|
142
|
+
[QUALITY_CHECKLIST]
|
|
143
|
+
Before submitting, verify:
|
|
144
|
+
- [ ] All PRD requirements are covered by the architecture
|
|
145
|
+
- [ ] Tech stack is justified for each layer
|
|
146
|
+
- [ ] Data models cover all entities in the PRD
|
|
147
|
+
- [ ] API endpoints cover all user stories
|
|
148
|
+
- [ ] Security architecture is defined
|
|
149
|
+
- [ ] Non-functional requirements are addressed
|
|
150
|
+
- [ ] Coding conventions are documented
|
|
151
|
+
- [ ] At least one ADR is written
|
|
152
|
+
|
|
153
|
+
[ESCALATION]
|
|
154
|
+
Escalate to MDAN Core if:
|
|
155
|
+
- PRD requirements are technically infeasible
|
|
156
|
+
- A requirement introduces significant security risk
|
|
157
|
+
- The chosen architecture has major trade-offs the user should decide
|
|
158
|
+
- Estimated complexity exceeds project constraints
|
|
159
|
+
[/MDAN-AGENT]
|
|
160
|
+
```
|