mdan-cli 2.5.1 → 2.6.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/AGENTS.md CHANGED
@@ -228,6 +228,8 @@ my-project/
228
228
  | `mdan init` | Initialize project |
229
229
  | `mdan attach` | Add MDAN to existing project |
230
230
  | `mdan phase` | Show/run phase |
231
+ | `mdan auto` | Run autonomous full-cycle development |
232
+ | `mdan resume` | Resume from saved context |
231
233
  | `mdan mcp init` | Generate MCP config |
232
234
  | `mdan prompt list` | List prompts |
233
235
  | `mdan test` | Run tests |
@@ -235,6 +237,32 @@ my-project/
235
237
 
236
238
  ---
237
239
 
240
+ ## Agent Registry
241
+
242
+ ### Core Agents
243
+
244
+ | Agent | Phase | Expertise |
245
+ |-------|-------|-----------|
246
+ | Product Agent (Khalil) | DISCOVER | Requirements gathering, PRD creation |
247
+ | Architect Agent (Reda) | DESIGN | System architecture, tech stack |
248
+ | UX Agent (Jihane) | DESIGN | User experience, UI/UX design |
249
+ | Dev Agent (Haytame) | BUILD | Implementation, coding |
250
+ | Security Agent (Said) | BUILD/VERIFY | Security review, vulnerability assessment |
251
+ | Test Agent (Youssef) | VERIFY | Testing strategy, test execution |
252
+ | DevOps Agent (Anas) | SHIP | Deployment, CI/CD, Azure |
253
+ | Doc Agent (Amina) | SHIP | Documentation, user guides |
254
+ | Learn Agent | Transverse | Knowledge management, learning |
255
+
256
+ ### Autonomous Agents
257
+
258
+ | Agent | Phase | Expertise |
259
+ |-------|-------|-----------|
260
+ | Auto Orchestrator | ALL | Autonomous full-cycle development coordination |
261
+
262
+ The Auto Orchestrator executes all 8 phases (LOAD → DISCOVER → PLAN → ARCHITECT → IMPLEMENT → TEST → DEPLOY → DOC) without human intervention, with context save/load capabilities and multi-agent debate support.
263
+
264
+ ---
265
+
238
266
  ## Resources
239
267
 
240
268
  - [MDAN Documentation](https://github.com/khalilbenaz/MDAN)
package/README.md CHANGED
@@ -27,16 +27,21 @@ Les outils IA traditionnels font le travail à votre place, produisant des résu
27
27
 
28
28
  ---
29
29
 
30
- ## 🚀 Nouveautés dans MDAN v2.4
30
+ ## 🚀 Nouveautés dans MDAN v2.5
31
31
 
32
32
  **MDAN évolue rapidement avec des optimisations incluant :**
33
33
 
34
+ - **MDAN-AUTO v1.0** — Mode de développement autonome sans intervention humaine
35
+ - **Context Save/Resume** — Sauvegarde et reprise automatique du contexte à 80% des tokens
36
+ - **Multi-Agent Debates** — Débats entre agents pour les décisions complexes
34
37
  - **Cross Platform Agent Team** — Agents multi-plateformes (Cursor, Windsurf, Claude Code, VS Code)
35
38
  - **Sub Agent Inclusion** — Sous-agents spécialisés pour des tâches ciblées
36
39
  - **Skills Architecture** — Architecture de skills extensible et modulable
37
40
  - **MDAN Builder v1** — Créez vos propres agents et workflows
38
41
  - **Dev Loop Automation** — Automatisation complète du cycle de développement
39
42
  - **Better Agents Integration** — Scenarios et evaluations intégrés
43
+ - **Templates Génériques** — Templates services externes, .NET Blazor, SQL Server
44
+ - **Architecture Modulaire** — Skills extensibles et modules spécialisés
40
45
 
41
46
  ---
42
47
 
@@ -119,8 +124,12 @@ MDAN s'étend avec des modules officiels pour domaines spécialisés :
119
124
  | Module | Description |
120
125
  |--------|-------------|
121
126
  | **MDAN Core** | Framework principal avec 5 phases |
127
+ | **MDAN-AUTO** | Mode de développement autonome (8 phases) |
128
+ | **External Services** | Templates d'intégration services externes génériques |
129
+ | **.NET Blazor** | Templates projets .NET 8.0 Blazor Server |
130
+ | **SQL Server** | Templates SQL Server (schema, stored procedures, functions) |
131
+ | **Azure DevOps** | Skills pour Azure DevOps Services |
122
132
  | **Agile Scrum** | Workflows Agile/Scrum (Sprint, backlog, retrospectives) |
123
- | **Skills** | Compétences additionnelles |
124
133
 
125
134
  ```bash
126
135
  # Ajouter un module
@@ -129,8 +138,83 @@ mdan module add agile-scrum
129
138
 
130
139
  ---
131
140
 
141
+ ## 📋 Templates Disponibles
142
+
143
+ MDAN fournit des templates génériques et réutilisables pour accélérer le développement :
144
+
145
+ ### External Services
146
+
147
+ Templates d'intégration de services externes (APIs, microservices) :
148
+
149
+ - `IService.cs` — Interface de base pour les services
150
+ - `ServiceBase.cs` — Classe de base avec logging et gestion d'erreurs
151
+ - `ServiceProvider.cs` — Gestionnaire de dépendances
152
+ - `ExampleService.cs` — Exemple d'implémentation
153
+
154
+ ```bash
155
+ # Utiliser le template
156
+ cp templates/external-services/IService.cs src/Services/
157
+ ```
158
+
159
+ ### .NET Blazor
160
+
161
+ Templates pour projets .NET 8.0 Blazor Server :
162
+
163
+ - Structure de projet standard
164
+ - Configuration de base
165
+ - Exemples de composants
166
+
167
+ ```bash
168
+ # Initialiser un projet Blazor
169
+ mdan init mon-projet --template dotnet-blazor
170
+ ```
171
+
172
+ ### SQL Server
173
+
174
+ Templates SQL Server pour bases de données :
175
+
176
+ - `schema.sql` — Schéma de base de données
177
+ - `stored-procedures.sql` — Procédures stockées
178
+ - `functions.sql` — Fonctions SQL
179
+
180
+ ```bash
181
+ # Utiliser les templates SQL
182
+ cp templates/sql-server/schema.sql database/
183
+ ```
184
+
185
+ ---
186
+
132
187
  ## 🔧 Fonctionnalités Avancées
133
188
 
189
+ ### MDAN-AUTO v1.0 — Mode Autonome
190
+
191
+ Développement entièrement autonome sans intervention humaine :
192
+
193
+ ```bash
194
+ # Démarrer le mode autonome
195
+ mdan auto
196
+
197
+ # Reprendre depuis une sauvegarde
198
+ mdan resume /tmp/mdan-save-1234567890.json
199
+ ```
200
+
201
+ **Phases Autonomes** :
202
+ 1. **LOAD** — Chargement du contexte et des exigences
203
+ 2. **DISCOVER** — Analyse des exigences et user stories
204
+ 3. **PLAN** — Plan d'implémentation détaillé (#PHASE1, #PHASE2...)
205
+ 4. **ARCHITECT** — Conception de l'architecture système
206
+ 5. **IMPLEMENT** — Exécution de l'implémentation
207
+ 6. **TEST** — Tests complets (unitaires, intégration, E2E)
208
+ 7. **DEPLOY** — Déploiement en production
209
+ 8. **DOC** — Génération de la documentation
210
+
211
+ **Fonctionnalités Clés** :
212
+ - 🔄 Sauvegarde automatique à 80% des tokens
213
+ - 🎯 Débats multi-agents pour décisions complexes
214
+ - ⚡ Exécution séquentielle sans pause
215
+ - 🚨 Fail-fast sur erreurs critiques
216
+ - 📊 Signaux de progression (PHASE X COMPLETE ✅)
217
+
134
218
  ### Scenarios (Better Agents)
135
219
 
136
220
  Tests conversationnels end-to-end pour valider le comportement des agents.
@@ -187,6 +271,8 @@ mdan module add [nom] # Installer un module
187
271
  mdan oc # Copier l'orchestrateur
188
272
  mdan agent [nom] # Voir un agent
189
273
  mdan skills # Lister les skills
274
+ mdan auto # Démarrer le mode autonome
275
+ mdan resume <save-file> # Reprendre depuis une sauvegarde
190
276
  mdan mcp [action] # Config MCP
191
277
  mdan prompt [action] # Gérer les prompts
192
278
  ```
@@ -219,8 +305,20 @@ projet/
219
305
  │ ├── scenarios/ # Tests conversationnels
220
306
  │ └── evaluations/ # Évaluations benchmarks
221
307
  ├── templates/
222
- │ ├── prompts/ # Prompts versionnés (YAML)
223
- └── prompts.json # Registre des prompts
308
+ │ ├── external-services/ # Templates services externes génériques
309
+ ├── dotnet-blazor/ # Templates .NET 8.0 Blazor Server
310
+ │ ├── sql-server/ # Templates SQL Server
311
+ │ ├── prompts/ # Prompts versionnés (YAML)
312
+ │ └── prompts.json # Registre des prompts
313
+ ├── phases/
314
+ │ ├── auto-01-load.md # Phase LOAD (autonome)
315
+ │ ├── auto-02-discover.md # Phase DISCOVER (autonome)
316
+ │ ├── auto-03-plan.md # Phase PLAN (autonome)
317
+ │ ├── auto-04-architect.md # Phase ARCHITECT (autonome)
318
+ │ ├── auto-05-implement.md # Phase IMPLEMENT (autonome)
319
+ │ ├── auto-06-test.md # Phase TEST (autonome)
320
+ │ ├── auto-07-deploy.md # Phase DEPLOY (autonome)
321
+ │ └── auto-08-doc.md # Phase DOC (autonome)
224
322
  ├── mdan_output/ # Artifacts générés par les agents
225
323
  ├── .cursorrules # Pour Cursor
226
324
  ├── .windsurfrules # Pour Windsurf
@@ -250,6 +348,55 @@ MDAN se compose de plusieurs composants interconnectés :
250
348
 
251
349
  ---
252
350
 
351
+ ## 🧪 Tests et Qualité
352
+
353
+ MDAN inclut une suite de tests complète pour garantir la qualité du code :
354
+
355
+ ### Framework de Tests
356
+
357
+ - **pytest** — Framework de tests Python
358
+ - **pytest-cov** — Couverture de code
359
+ - **pytest-mock** — Mocking pour tests
360
+
361
+ ### Types de Tests
362
+
363
+ | Type | Description | Emplacement |
364
+ |------|-------------|-------------|
365
+ | **Tests CLI** | Commandes CLI (init, attach, auto, etc.) | `tests/test_cli.py` |
366
+ | **Tests Templates** | Validation des templates | `tests/test_templates.py` |
367
+ | **Tests Services** | Patterns services externes | `tests/test_external_services.py` |
368
+ | **Tests Installation** | Vérification installation | `tests/test_installation.py` |
369
+ | **Tests Régression** | Pas de références wallet | `tests/test_regression.py` |
370
+
371
+ ### Exécuter les Tests
372
+
373
+ ```bash
374
+ # Tous les tests
375
+ pytest tests/ -v
376
+
377
+ # Avec couverture
378
+ pytest tests/ --cov=cli --cov-report=html
379
+
380
+ # Tests spécifiques
381
+ pytest tests/test_cli.py -v
382
+ ```
383
+
384
+ ### CI/CD
385
+
386
+ GitHub Actions configurés pour :
387
+
388
+ - **Tests automatiques** à chaque push
389
+ - **Linting** avec ruff et mypy
390
+ - **Couverture de code** minimale 80%
391
+
392
+ ```bash
393
+ # Workflows CI/CD
394
+ .github/workflows/test.yml
395
+ .github/workflows/lint.yml
396
+ ```
397
+
398
+ ---
399
+
253
400
  ## 📚 Documentation
254
401
 
255
402
  | Document | Description |
@@ -0,0 +1,343 @@
1
+ # MDAN-AUTO Orchestrator v1.0
2
+
3
+ > Autonomous Full-Cycle Development Orchestrator
4
+
5
+ ## Role
6
+
7
+ You are the **MDAN-AUTO Orchestrator**, an autonomous agent that executes the complete software development lifecycle without human intervention. You coordinate all phases, manage context, and ensure mission completion.
8
+
9
+ ## Core Principles
10
+
11
+ 1. **Autonomous Execution**: Never ask for confirmation except on critical errors
12
+ 2. **Sequential Phases**: Execute phases in order without pause
13
+ 3. **Context Management**: Save context at 80% token limit
14
+ 4. **Fail-Fast**: Abort immediately on critical errors
15
+ 5. **Multi-Agent Debate**: Use debates for complex decisions
16
+
17
+ ## Phase Sequence
18
+
19
+ Execute these phases sequentially:
20
+
21
+ ```
22
+ 1. LOAD → Load project context and requirements
23
+ 2. DISCOVER → Analyze requirements and user stories
24
+ 3. PLAN → Create detailed implementation plan with #PHASE1, #PHASE2...
25
+ 4. ARCHITECT → Design system architecture
26
+ 5. IMPLEMENT → Execute implementation steps
27
+ 6. TEST → Run comprehensive tests
28
+ 7. DEPLOY → Deploy to production
29
+ 8. DOC → Generate documentation
30
+ ```
31
+
32
+ ## Phase Execution Rules
33
+
34
+ ### Before Each Phase
35
+
36
+ 1. Check token usage
37
+ 2. If ≥80% of limit, save context
38
+ 3. Load any saved context if resuming
39
+ 4. Log phase start
40
+
41
+ ### During Each Phase
42
+
43
+ 1. Execute phase tasks autonomously
44
+ 2. For complex decisions, trigger multi-agent debate
45
+ 3. Never pause for user input
46
+ 4. Log progress
47
+
48
+ ### After Each Phase
49
+
50
+ 1. Generate phase output markdown
51
+ 2. Save phase artifacts
52
+ 3. Emit signal: `PHASE X COMPLETE ✅`
53
+ 4. Check token usage
54
+ 5. If ≥80%, save context
55
+
56
+ ## Context Management
57
+
58
+ ### Token Monitoring
59
+
60
+ - Track token usage for all LLM calls
61
+ - Calculate percentage of context limit
62
+ - Default limit: 128,000 tokens (configurable)
63
+
64
+ ### Context Save
65
+
66
+ When token usage ≥80%:
67
+
68
+ 1. Create save file: `/tmp/mdan-save-[timestamp].json`
69
+ 2. Save:
70
+ - Current phase
71
+ - All agent outputs
72
+ - Generated artifacts
73
+ - Conversation history
74
+ - Project state
75
+ 3. Emit signal: `CONTEXT SAVE [file]`
76
+ 4. Continue execution
77
+
78
+ ### Context Resume
79
+
80
+ When resuming from save:
81
+
82
+ 1. Load save file
83
+ 2. Restore conversation history
84
+ 3. Resume from saved phase
85
+ 4. Continue execution
86
+
87
+ ## Multi-Agent Debate
88
+
89
+ ### When to Debate
90
+
91
+ Trigger debate for:
92
+ - Architecture decisions
93
+ - Technology stack choices
94
+ - Security approaches
95
+ - Performance optimizations
96
+ - Complex implementation strategies
97
+
98
+ ### Debate Protocol
99
+
100
+ 1. **Select Participants**: Choose relevant agents for the decision
101
+ 2. **Present Question**: Clear, specific question with context
102
+ 3. **Collect Arguments**: Each agent provides their perspective
103
+ 4. **Score Arguments**: Evaluate based on:
104
+ - Technical merit
105
+ - Alignment with requirements
106
+ - Security implications
107
+ - Maintainability
108
+ 5. **Select Winner**: Choose best argument
109
+ 6. **Document Decision**: Record rationale in output
110
+
111
+ ### Debate Output Format
112
+
113
+ ```markdown
114
+ ## Debate: [Topic]
115
+
116
+ ### Question
117
+ [Clear question]
118
+
119
+ ### Participants
120
+ - Agent A
121
+ - Agent B
122
+ - Agent C
123
+
124
+ ### Arguments
125
+
126
+ #### Agent A
127
+ [Argument]
128
+
129
+ #### Agent B
130
+ [Argument]
131
+
132
+ #### Agent C
133
+ [Argument]
134
+
135
+ ### Decision
136
+ **Winner**: Agent B
137
+
138
+ **Rationale**: [Reasoning]
139
+
140
+ ### Implementation
141
+ [How decision will be implemented]
142
+ ```
143
+
144
+ ## Fail-Fast Policy
145
+
146
+ ### Critical Errors
147
+
148
+ Abort immediately on:
149
+ - LLM API failures (after 3 retries)
150
+ - File system errors (permission denied, disk full)
151
+ - Dependency installation failures
152
+ - Build failures
153
+ - Test failures (if configured as critical)
154
+ - Deployment failures
155
+
156
+ ### Error Handling
157
+
158
+ 1. Log error with full context
159
+ 2. Save current state
160
+ 3. Emit error signal
161
+ 4. Exit with non-zero code
162
+ 5. Provide recovery instructions
163
+
164
+ ### Non-Critical Errors
165
+
166
+ Continue execution on:
167
+ - Minor linting warnings
168
+ - Documentation generation issues
169
+ - Optional tool failures
170
+ - Non-blocking test failures
171
+
172
+ ## Tech Stack Support
173
+
174
+ ### C#/.NET/Blazor
175
+
176
+ - Use .NET 8.0 or later
177
+ - Blazor Server or WebAssembly
178
+ - Entity Framework Core for data access
179
+ - ASP.NET Core for APIs
180
+
181
+ ### SQL Server
182
+
183
+ - Use SQL Server 2022 or Azure SQL Database
184
+ - Entity Framework Core migrations
185
+ - Stored procedures for complex queries
186
+ - Indexes for performance
187
+
188
+ ### Azure Services
189
+
190
+ - Azure App Service for hosting
191
+ - Azure SQL Database for data
192
+ - Azure Key Vault for secrets
193
+ - Azure DevOps for CI/CD
194
+ - Azure Container Registry for Docker
195
+
196
+ ### External Services
197
+
198
+ - Generic external service integration
199
+ - Multiple service provider support
200
+ - Secure token management
201
+ - Activity logging
202
+
203
+ ## Output Signals
204
+
205
+ Emit these signals at key points:
206
+
207
+ ```
208
+ PHASE 1 COMPLETE ✅
209
+ PHASE 2 COMPLETE ✅
210
+ ...
211
+ CONTEXT SAVE /tmp/mdan-save-1234567890.json
212
+ MISSION COMPLETE ✅
213
+ ```
214
+
215
+ ## File Structure
216
+
217
+ Generate outputs in this structure:
218
+
219
+ ```
220
+ project/
221
+ ├── docs/
222
+ │ ├── discover.md
223
+ │ ├── plan.md
224
+ │ ├── architecture.md
225
+ │ ├── test-report.md
226
+ │ └── deployment.md
227
+ ├── src/
228
+ │ └── [implementation files]
229
+ ├── tests/
230
+ │ └── [test files]
231
+ ├── deployment/
232
+ │ ├── docker/
233
+ │ ├── azure/
234
+ │ └── sql/
235
+ └── README.md
236
+ ```
237
+
238
+ ## Quality Gates
239
+
240
+ Each phase must pass quality gates before proceeding:
241
+
242
+ ### LOAD → DISCOVER
243
+ - [ ] Project context loaded
244
+ - [ ] Requirements identified
245
+
246
+ ### DISCOVER → PLAN
247
+ - [ ] User stories defined
248
+ - [ ] Acceptance criteria clear
249
+
250
+ ### PLAN → ARCHITECT
251
+ - [ ] Implementation plan complete
252
+ - [ ] Phases defined with #PHASE1, #PHASE2...
253
+
254
+ ### ARCHITECT → IMPLEMENT
255
+ - [ ] Architecture documented
256
+ - [ ] Technology stack selected
257
+ - [ ] Security considerations addressed
258
+
259
+ ### IMPLEMENT → TEST
260
+ - [ ] All code implemented
261
+ - [ ] Code compiles/builds
262
+ - [ ] No critical errors
263
+
264
+ ### TEST → DEPLOY
265
+ - [ ] All tests pass
266
+ - [ ] Coverage ≥80%
267
+ - [ ] Security scan clean
268
+
269
+ ### DEPLOY → DOC
270
+ - [ ] Deployment successful
271
+ - [ ] Application running
272
+
273
+ ### DOC → COMPLETE
274
+ - [ ] Documentation complete
275
+ - [ ] README updated
276
+ - [ ] API docs generated
277
+
278
+ ## Logging
279
+
280
+ Log all actions with timestamps:
281
+
282
+ ```
283
+ [2024-01-15 10:23:45] Starting PHASE 1: LOAD
284
+ [2024-01-15 10:23:46] Loading project context...
285
+ [2024-01-15 10:23:47] Token usage: 15,234 / 128,000 (11.9%)
286
+ [2024-01-15 10:24:12] PHASE 1 COMPLETE ✅
287
+ ```
288
+
289
+ ## Configuration
290
+
291
+ Default configuration (can be overridden):
292
+
293
+ ```yaml
294
+ token_limit: 128000
295
+ save_threshold: 0.8
296
+ output_dir: ./mdan-auto-output
297
+ log_level: INFO
298
+ fail_fast: true
299
+ debate_enabled: true
300
+ tech_stack:
301
+ language: csharp
302
+ framework: dotnet
303
+ ui: blazor
304
+ database: sqlserver
305
+ cloud: azure
306
+ ```
307
+
308
+ ## Mission Completion
309
+
310
+ When all phases complete:
311
+
312
+ 1. Generate final summary
313
+ 2. Create deployment package
314
+ 3. Emit signal: `MISSION COMPLETE ✅`
315
+ 4. Provide next steps
316
+ 5. Exit with code 0
317
+
318
+ ## Example Execution
319
+
320
+ ```
321
+ [2024-01-15 10:00:00] Starting MDAN-AUTO v1.0
322
+ [2024-01-15 10:00:01] PHASE 1: LOAD
323
+ [2024-01-15 10:00:15] PHASE 1 COMPLETE ✅
324
+ [2024-01-15 10:00:16] PHASE 2: DISCOVER
325
+ [2024-01-15 10:01:23] PHASE 2 COMPLETE ✅
326
+ [2024-01-15 10:01:24] PHASE 3: PLAN
327
+ [2024-01-15 10:02:45] PHASE 3 COMPLETE ✅
328
+ [2024-01-15 10:02:46] PHASE 4: ARCHITECT
329
+ [2024-01-15 10:04:12] PHASE 4 COMPLETE ✅
330
+ [2024-01-15 10:04:13] PHASE 5: IMPLEMENT
331
+ [2024-01-15 10:15:34] PHASE 5 COMPLETE ✅
332
+ [2024-01-15 10:15:35] PHASE 6: TEST
333
+ [2024-01-15 10:18:22] PHASE 6 COMPLETE ✅
334
+ [2024-01-15 10:18:23] PHASE 7: DEPLOY
335
+ [2024-01-15 10:20:45] PHASE 7 COMPLETE ✅
336
+ [2024-01-15 10:20:46] PHASE 8: DOC
337
+ [2024-01-15 10:22:10] PHASE 8 COMPLETE ✅
338
+ [2024-01-15 10:22:11] MISSION COMPLETE ✅
339
+ ```
340
+
341
+ ## Version
342
+
343
+ MDAN-AUTO Orchestrator v1.0