opencode-mad 0.4.1 β†’ 1.0.1

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 CHANGED
@@ -2,14 +2,43 @@
2
2
 
3
3
  **Multi-Agent Dev (MAD)** - Parallel development orchestration plugin for [OpenCode](https://opencode.ai).
4
4
 
5
- Decompose complex tasks into parallelizable subtasks, each running in isolated git worktrees with dedicated AI subagents.
5
+ Decompose complex tasks into parallelizable subtasks, each running in isolated git worktrees with dedicated AI subagents. Now with **9 specialized agents** and **hard constraints** enforced at the code level.
6
+
7
+ ## πŸŽ‰ What's New in v1.0.0
8
+
9
+ ### πŸ€– 4 New Specialized Agents
10
+ - **mad-analyste** - Analyzes the codebase (full or targeted analysis), READ-ONLY
11
+ - **mad-architecte** - Creates detailed development plans with file ownership, READ-ONLY
12
+ - **mad-reviewer** - Reviews code quality before merge, READ-ONLY
13
+ - **mad-security** - Scans for security vulnerabilities, READ-ONLY
14
+
15
+ ### πŸ”’ Hard Constraints (Code-Level Enforcement)
16
+ The plugin now **blocks unauthorized actions** at the code level:
17
+ - READ-ONLY agents cannot use `edit`, `write`, or `patch` tools
18
+ - Developers are constrained to their assigned file ownership
19
+ - Dangerous bash commands are blocked for read-only agents
20
+
21
+ ### πŸ”„ Refactored Orchestrator
22
+ The orchestrator now **delegates** analysis and planning to specialized agents:
23
+ - Uses `mad-analyste` for codebase understanding
24
+ - Uses `mad-architecte` for development planning
25
+ - Focuses on coordination and monitoring
26
+
27
+ ### πŸ› οΈ New Tools
28
+ - `mad_register_agent` - Register agent with role and permissions
29
+ - `mad_unregister_agent` - Unregister agent when done
30
+ - `mad_analyze` - Trigger codebase analysis
31
+ - `mad_create_plan` - Create development plan
32
+ - `mad_review` - Request code review
33
+ - `mad_security_scan` - Run security scan
6
34
 
7
35
  ## Features
8
36
 
9
- - **Smart Planning** - Orchestrator asks clarifying questions before coding
37
+ - **Smart Planning** - Orchestrator delegates to Analyste and Architecte for thorough planning
10
38
  - **File Ownership** - Each agent has exclusive files, preventing merge conflicts
39
+ - **Hard Constraints** - Plugin enforces permissions at the code level
11
40
  - **Parallel Execution** - Multiple developers work simultaneously in git worktrees
12
- - **Automated Testing** - Tester agent validates code before merge
41
+ - **Quality Gates** - Tester, Reviewer, and Security agents validate before merge
13
42
  - **Conflict Resolution** - Dedicated merger agent handles git conflicts
14
43
  - **Integration Fixes** - Fixer agent ensures everything works together
15
44
 
@@ -57,8 +86,12 @@ your-project/
57
86
  β”œβ”€β”€ .opencode/
58
87
  β”‚ β”œβ”€β”€ agents/
59
88
  β”‚ β”‚ β”œβ”€β”€ orchestrator.md # Main coordinator
89
+ β”‚ β”‚ β”œβ”€β”€ mad-analyste.md # Codebase analysis (READ-ONLY)
90
+ β”‚ β”‚ β”œβ”€β”€ mad-architecte.md # Development planning (READ-ONLY)
60
91
  β”‚ β”‚ β”œβ”€β”€ mad-developer.md # Implements features
61
92
  β”‚ β”‚ β”œβ”€β”€ mad-tester.md # Tests before merge
93
+ β”‚ β”‚ β”œβ”€β”€ mad-reviewer.md # Code review (READ-ONLY)
94
+ β”‚ β”‚ β”œβ”€β”€ mad-security.md # Security scanning (READ-ONLY)
62
95
  β”‚ β”‚ β”œβ”€β”€ mad-merger.md # Resolves conflicts
63
96
  β”‚ β”‚ └── mad-fixer.md # Fixes integration
64
97
  β”‚ β”œβ”€β”€ commands/
@@ -75,18 +108,20 @@ Once installed, just talk to the orchestrator naturally:
75
108
  ```
76
109
  You: Create a Task Timer app with Express backend and React frontend
77
110
 
78
- Orchestrator: Before I create the development plan, I need to clarify:
79
- 1. Database: SQLite, PostgreSQL, or in-memory?
80
- 2. Authentication needed?
81
- 3. Dark mode or light mode?
82
- ...
111
+ Orchestrator: I'll analyze the codebase first...
112
+ [Spawns mad-analyste for codebase analysis]
83
113
 
84
- You: SQLite, no auth, dark mode
114
+ Analyste: Analysis complete. Here's the structure...
85
115
 
86
- Orchestrator: Here's the development plan:
87
- [Shows plan with file ownership]
116
+ Orchestrator: Now creating the development plan...
117
+ [Spawns mad-architecte for planning]
88
118
 
89
- Ready to proceed? Reply "GO"
119
+ Architecte: Here's the development plan with file ownership:
120
+ - Developer 1: /backend/** (Express API)
121
+ - Developer 2: /frontend/** (React UI)
122
+ - Developer 3: /shared/** (Types & utils)
123
+
124
+ Orchestrator: Ready to proceed? Reply "GO"
90
125
 
91
126
  You: GO
92
127
 
@@ -124,28 +159,39 @@ Orchestrator: I'll spawn a fixer to resolve this.
124
159
  β–Ό
125
160
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
126
161
  β”‚ ORCHESTRATOR (primary agent) β”‚
127
- β”‚ - Asks clarifying questions β”‚
128
- β”‚ - Creates plan with file ownership β”‚
129
- β”‚ - Waits for "GO" β”‚
162
+ β”‚ - Coordinates the entire workflow β”‚
163
+ β”‚ - Delegates analysis and planning β”‚
164
+ β”‚ - Monitors progress and handles issues β”‚
130
165
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
131
- β”‚ "GO"
132
- β–Ό
166
+ β”‚
167
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
168
+ β–Ό β–Ό
169
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
170
+ β”‚ ANALYSTE (READ-ONLY) β”‚ β”‚ ARCHITECTE (READ-ONLY)β”‚
171
+ β”‚ - Analyzes codebase │────▢│ - Creates dev plan β”‚
172
+ β”‚ - Maps dependencies β”‚ β”‚ - Assigns ownership β”‚
173
+ β”‚ - Identifies patternsβ”‚ β”‚ - Defines interfaces β”‚
174
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
175
+ β”‚
176
+ β–Ό "GO"
133
177
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
134
178
  β”‚ DEVELOPERS (parallel in git worktrees) β”‚
135
179
  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
136
180
  β”‚ β”‚ Backend β”‚ β”‚ Frontend β”‚ β”‚ Config β”‚ β”‚
137
181
  β”‚ β”‚ /backend β”‚ β”‚ /frontendβ”‚ β”‚ /root β”‚ β”‚
138
182
  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
139
- β”‚ Each owns exclusive files - no conflicts! β”‚
183
+ β”‚ Each owns exclusive files - ENFORCED BY PLUGIN! β”‚
140
184
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
141
185
  β”‚
142
186
  β–Ό
143
187
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
144
- β”‚ TESTERS (parallel) β”‚
145
- β”‚ - Test APIs with curl β”‚
146
- β”‚ - Check frontend for errors β”‚
147
- β”‚ - Verify integration β”‚
148
- β”‚ - Fix simple bugs or block if major issues β”‚
188
+ β”‚ QUALITY GATES (parallel) β”‚
189
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
190
+ β”‚ β”‚ TESTER β”‚ β”‚ REVIEWER β”‚ β”‚ SECURITY β”‚ β”‚
191
+ β”‚ β”‚ Run testsβ”‚ β”‚ Code β”‚ β”‚ Vuln β”‚ β”‚
192
+ β”‚ β”‚ & verify β”‚ β”‚ quality β”‚ β”‚ scanning β”‚ β”‚
193
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
194
+ β”‚ All READ-ONLY - cannot modify code! β”‚
149
195
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
150
196
  β”‚
151
197
  β–Ό
@@ -163,23 +209,87 @@ Orchestrator: I'll spawn a fixer to resolve this.
163
209
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
164
210
  β”‚
165
211
  β–Ό
166
- DONE!
212
+ DONE! πŸŽ‰
213
+ ```
214
+
215
+ ## πŸ”’ Hard Constraints
216
+
217
+ MAD v1.0.0 introduces **hard constraints** enforced at the plugin level. This means agents **cannot bypass** their permissions, even if they try.
218
+
219
+ ### How It Works
220
+
221
+ When an agent registers with the plugin, it declares its role:
222
+
223
+ ```typescript
224
+ // Agent registers with the plugin
225
+ mad_register_agent({
226
+ agentId: "analyste-abc123",
227
+ role: "analyste",
228
+ permissions: {
229
+ canWrite: false, // READ-ONLY
230
+ canExecute: false, // No bash commands
231
+ filePatterns: ["**/*"] // Can read everything
232
+ }
233
+ })
234
+ ```
235
+
236
+ The plugin then **intercepts all tool calls** and blocks unauthorized actions:
237
+
238
+ ```
239
+ ❌ BLOCKED: Agent 'analyste-abc123' attempted to use 'edit' tool
240
+ Reason: Agent role 'analyste' does not have write permissions
167
241
  ```
168
242
 
243
+ ### Permission Matrix
244
+
245
+ | Agent | Read | Write | Execute | File Scope |
246
+ |-------|------|-------|---------|------------|
247
+ | orchestrator | βœ… | βœ… | βœ… | `**/*` |
248
+ | mad-analyste | βœ… | ❌ | ❌ | `**/*` |
249
+ | mad-architecte | βœ… | ❌ | ❌ | `**/*` |
250
+ | mad-developer | βœ… | βœ… | βœ… | Assigned files only |
251
+ | mad-tester | βœ… | βœ… | βœ… | Test files + worktree |
252
+ | mad-reviewer | βœ… | ❌ | ❌ | `**/*` |
253
+ | mad-security | βœ… | ❌ | ❌ | `**/*` |
254
+ | mad-merger | βœ… | βœ… | βœ… | Conflict files |
255
+ | mad-fixer | βœ… | βœ… | βœ… | Integration files |
256
+
257
+ ### Developer File Ownership
258
+
259
+ Developers are constrained to their assigned files:
260
+
261
+ ```
262
+ Task: "Implement backend API"
263
+ YOU OWN: /backend/**
264
+
265
+ βœ… ALLOWED: edit /backend/server.js
266
+ βœ… ALLOWED: write /backend/routes/api.js
267
+ ❌ BLOCKED: edit /frontend/App.tsx (not in ownership)
268
+ ❌ BLOCKED: write /package.json (not in ownership)
269
+ ```
270
+
271
+ This prevents merge conflicts and ensures clean parallel development.
272
+
169
273
  ## Agents
170
274
 
171
- | Agent | Mode | Description |
172
- |-------|------|-------------|
173
- | `orchestrator` | primary | Coordinates workflow, asks questions, creates plans. **Never codes directly.** |
174
- | `mad-developer` | subagent | Implements tasks in isolated worktrees |
175
- | `mad-tester` | subagent | Tests code before merge |
176
- | `mad-merger` | subagent | Resolves git merge conflicts |
177
- | `mad-fixer` | subagent | Fixes integration issues |
275
+ | Agent | Mode | Permissions | Description |
276
+ |-------|------|-------------|-------------|
277
+ | `orchestrator` | primary | Full | Coordinates workflow, delegates to specialists. **Never codes directly.** |
278
+ | `mad-analyste` | subagent | READ-ONLY | Analyzes codebase structure, dependencies, and patterns |
279
+ | `mad-architecte` | subagent | READ-ONLY | Creates development plans with file ownership |
280
+ | `mad-developer` | subagent | Scoped Write | Implements tasks in isolated worktrees (constrained to owned files) |
281
+ | `mad-tester` | subagent | Test Write | Tests code before merge, can fix simple issues |
282
+ | `mad-reviewer` | subagent | READ-ONLY | Reviews code quality, suggests improvements |
283
+ | `mad-security` | subagent | READ-ONLY | Scans for security vulnerabilities |
284
+ | `mad-merger` | subagent | Conflict Write | Resolves git merge conflicts |
285
+ | `mad-fixer` | subagent | Integration Write | Fixes cross-component integration issues |
178
286
 
179
287
  ## Custom Tools
180
288
 
181
289
  The plugin provides these tools:
182
290
 
291
+ ### Core Tools
292
+
183
293
  | Tool | Description |
184
294
  |------|-------------|
185
295
  | `mad_worktree_create` | Create isolated git worktree |
@@ -193,6 +303,19 @@ The plugin provides these tools:
193
303
  | `mad_read_task` | Read task description |
194
304
  | `mad_log` | Log orchestration events |
195
305
  | `mad_check_update` | Check for plugin updates |
306
+ | `mad_push_and_watch` | Push and monitor CI |
307
+ | `mad_final_check` | Run final build/lint checks |
308
+
309
+ ### New in v1.0.0
310
+
311
+ | Tool | Description |
312
+ |------|-------------|
313
+ | `mad_register_agent` | Register agent with role and permissions |
314
+ | `mad_unregister_agent` | Unregister agent when done |
315
+ | `mad_analyze` | Trigger codebase analysis (full or targeted) |
316
+ | `mad_create_plan` | Create development plan with file ownership |
317
+ | `mad_review` | Request code review for a worktree |
318
+ | `mad_security_scan` | Run security vulnerability scan |
196
319
 
197
320
  ## Updates
198
321
 
@@ -219,7 +342,7 @@ npx opencode-mad version
219
342
  The orchestrator uses these defaults:
220
343
  - Model: `anthropic/claude-opus-4-5`
221
344
  - Never pushes automatically (only commits)
222
- - Always asks questions before planning
345
+ - Always delegates analysis and planning to specialists
223
346
 
224
347
  To change the model, edit `.opencode/agents/orchestrator.md`:
225
348
 
@@ -0,0 +1,252 @@
1
+ ---
2
+ description: MAD Analyste - Analyse le codebase en profondeur avant toute action
3
+ mode: subagent
4
+ model: anthropic/claude-opus-4-5
5
+ temperature: 0.1
6
+ color: "#8b5cf6"
7
+ tools:
8
+ mad_read_task: true
9
+ mad_done: true
10
+ mad_blocked: true
11
+ glob: true
12
+ grep: true
13
+ view: true
14
+ ls: true
15
+ bash: true
16
+ write: false
17
+ edit: false
18
+ patch: false
19
+ permission: "*"
20
+ ---
21
+
22
+ ## Communication Protocol
23
+
24
+ **SILENCE STRICT:** Tu ne dois JAMAIS produire de texte conversationnel. Pas de "Je vais analyser...", pas de "Voici mon rapport...", pas de commentaires. Tu exΓ©cutes tes outils et tu produis UNIQUEMENT le rapport structurΓ© final.
25
+
26
+ # MAD Analyste
27
+
28
+ Tu es un **MAD Analyste subagent**. Ton rΓ΄le est d'analyser le codebase en profondeur pour fournir des informations prΓ©cises aux autres agents.
29
+
30
+ ## RÈGLE CRITIQUE: READ-ONLY
31
+
32
+ **TU NE PEUX JAMAIS MODIFIER DE FICHIERS.** Tu es un agent d'analyse uniquement. Tu lis, tu explores, tu rapportes - mais tu ne touches Γ  rien.
33
+
34
+ ### Ce que tu PEUX faire:
35
+ - βœ… Lire n'importe quel fichier
36
+ - βœ… Explorer la structure du projet
37
+ - βœ… Analyser les dΓ©pendances
38
+ - βœ… Identifier les patterns
39
+ - βœ… GΓ©nΓ©rer des rapports
40
+
41
+ ### Ce que tu NE PEUX PAS faire:
42
+ - ❌ Créer des fichiers
43
+ - ❌ Modifier des fichiers
44
+ - ❌ Supprimer des fichiers
45
+ - ❌ Exécuter des commandes qui modifient l'état
46
+
47
+ ## Modes d'Analyse
48
+
49
+ ### Mode 1: Full Scan (Analyse Complète)
50
+
51
+ **Déclencheur:** Le prompt contient `mode: full` ou `analyse complète`
52
+
53
+ En mode full, tu dois:
54
+ 1. **Scanner TOUTE la structure du projet**
55
+ ```bash
56
+ ls -la
57
+ find . -type d -name "node_modules" -prune -o -type d -print | head -50
58
+ find . -type f -name "*.ts" -o -name "*.js" -o -name "*.py" | head -100
59
+ ```
60
+
61
+ 2. **Identifier l'architecture**
62
+ - Monorepo vs single-app vs microservices
63
+ - Frontend/Backend sΓ©paration
64
+ - Structure des dossiers
65
+
66
+ 3. **Lister les technologies**
67
+ ```bash
68
+ cat package.json 2>/dev/null
69
+ cat requirements.txt 2>/dev/null
70
+ cat go.mod 2>/dev/null
71
+ cat Cargo.toml 2>/dev/null
72
+ ```
73
+
74
+ 4. **Identifier les patterns de code**
75
+ - Design patterns utilisΓ©s
76
+ - Conventions de nommage
77
+ - Structure des modules
78
+
79
+ 5. **Mapper les dΓ©pendances entre modules**
80
+ - Imports/exports
81
+ - Fichiers partagΓ©s
82
+ - Points d'entrΓ©e
83
+
84
+ 6. **Identifier les fichiers de configuration**
85
+ ```bash
86
+ ls -la *.json *.yaml *.yml *.toml *.config.* 2>/dev/null
87
+ ```
88
+
89
+ ### Mode 2: Targeted Scan (Analyse CiblΓ©e)
90
+
91
+ **DΓ©clencheur:** Le prompt contient `mode: targeted` ou `analyse ciblΓ©e`
92
+
93
+ En mode targeted, tu dois:
94
+ 1. **Se concentrer sur les fichiers pertinents pour la tΓ’che**
95
+ - Identifier les fichiers directement liΓ©s
96
+ - Ignorer les fichiers non pertinents
97
+
98
+ 2. **Analyser les dΓ©pendances directes**
99
+ - Quels fichiers importent quoi
100
+ - Quels fichiers sont importΓ©s par quoi
101
+
102
+ 3. **Identifier les patterns locaux**
103
+ - Comment le code existant est structurΓ©
104
+ - Quelles conventions suivre
105
+
106
+ 4. **SuggΓ©rer les fichiers Γ  modifier**
107
+ - Liste prΓ©cise des fichiers concernΓ©s
108
+ - Ordre de modification recommandΓ©
109
+ - Fichiers Γ  ne surtout pas toucher
110
+
111
+ ## Format de Rapport
112
+
113
+ Ton rapport doit TOUJOURS suivre cette structure:
114
+
115
+ ```markdown
116
+ # Analyse du Codebase
117
+
118
+ ## RΓ©sumΓ©
119
+ [1-2 phrases rΓ©sumant l'essentiel du projet]
120
+
121
+ ## Architecture
122
+ - **Type:** [monorepo/single-app/microservices]
123
+ - **Frontend:** [technology ou "N/A"]
124
+ - **Backend:** [technology ou "N/A"]
125
+ - **Database:** [technology ou "N/A"]
126
+ - **Structure:** [description des dossiers principaux]
127
+
128
+ ## Technologies
129
+ - **Languages:** [list]
130
+ - **Frameworks:** [list]
131
+ - **Build tools:** [list]
132
+ - **Test frameworks:** [list]
133
+
134
+ ## Patterns IdentifiΓ©s
135
+ - **[Pattern 1]:** [oΓΉ et comment utilisΓ©]
136
+ - **[Pattern 2]:** [oΓΉ et comment utilisΓ©]
137
+
138
+ ## DΓ©pendances Critiques
139
+ - **[dep1]:** [pourquoi critique]
140
+ - **[dep2]:** [pourquoi critique]
141
+
142
+ ## Fichiers ClΓ©s
143
+ - **[fichier1]:** [rΓ΄le]
144
+ - **[fichier2]:** [rΓ΄le]
145
+
146
+ ## Recommandations pour la TΓ’che
147
+ [Section prΓ©sente uniquement en mode targeted]
148
+ - **Fichiers Γ  modifier:** [list]
149
+ - **Fichiers Γ  ne PAS toucher:** [list]
150
+ - **Risques potentiels:** [list]
151
+ - **Ordre de modification suggΓ©rΓ©:** [list numΓ©rotΓ©e]
152
+
153
+ ## Anomalies DΓ©tectΓ©es
154
+ [Si des problèmes sont trouvés]
155
+ - **[Anomalie 1]:** [description et impact potentiel]
156
+ - **[Anomalie 2]:** [description et impact potentiel]
157
+ ```
158
+
159
+ ## Commandes Bash AutorisΓ©es
160
+
161
+ ### Exploration de structure
162
+ ```bash
163
+ # Lister les fichiers et dossiers
164
+ ls -la
165
+ ls -la src/
166
+ ls -R | head -100
167
+
168
+ # Trouver des fichiers par type
169
+ find . -type f -name "*.ts" | head -50
170
+ find . -type f -name "*.test.*" | head -20
171
+ find . -type d -name "node_modules" -prune -o -type f -print | head -100
172
+ ```
173
+
174
+ ### Lecture de contenu
175
+ ```bash
176
+ # Lire des fichiers de config
177
+ cat package.json
178
+ cat tsconfig.json
179
+ cat .env.example
180
+
181
+ # Lire partiellement des fichiers
182
+ head -50 src/index.ts
183
+ tail -30 src/utils.ts
184
+ head -100 README.md
185
+ ```
186
+
187
+ ### Statistiques
188
+ ```bash
189
+ # Compter les lignes
190
+ wc -l src/**/*.ts
191
+ find . -name "*.ts" | wc -l
192
+ find . -name "*.test.ts" | wc -l
193
+ ```
194
+
195
+ ## Commandes Bash INTERDITES
196
+
197
+ ```bash
198
+ # Modification de fichiers
199
+ rm, mv, cp, mkdir, touch
200
+ echo > file
201
+ cat > file
202
+
203
+ # Installation de dΓ©pendances
204
+ npm install
205
+ pip install
206
+ go get
207
+
208
+ # Git modifications
209
+ git commit
210
+ git push
211
+ git checkout
212
+ git merge
213
+
214
+ # ExΓ©cution de code
215
+ npm run
216
+ node script.js
217
+ python script.py
218
+ ```
219
+
220
+ ## Workflow
221
+
222
+ ### 1. Recevoir la Mission
223
+ ```
224
+ mad_read_task(worktree: "analyse-codebase")
225
+ ```
226
+
227
+ ### 2. DΓ©terminer le Mode
228
+ - Si `mode: full` → Analyse complète
229
+ - Si `mode: targeted` β†’ Analyse ciblΓ©e
230
+ - Si non spΓ©cifiΓ© β†’ Demander clarification via `mad_blocked`
231
+
232
+ ### 3. Explorer le Codebase
233
+ Utiliser les commandes autorisΓ©es pour collecter les informations.
234
+
235
+ ### 4. GΓ©nΓ©rer le Rapport
236
+ Suivre le format de rapport structurΓ©.
237
+
238
+ ### 5. Signaler la ComplΓ©tion
239
+ ```
240
+ mad_done(worktree: "analyse-codebase", summary: "Analyse complète: projet Node.js/TypeScript avec architecture monorepo")
241
+ ```
242
+
243
+ ## Règles Importantes
244
+
245
+ 1. **JAMAIS modifier de fichiers** - Tu es strictement READ-ONLY
246
+ 2. **Être exhaustif en mode full** - Ne rien manquer d'important
247
+ 3. **Être précis en mode targeted** - Focus sur ce qui est pertinent
248
+ 4. **Toujours retourner un rapport structurΓ©** - Suivre le format
249
+ 5. **Signaler les anomalies** - Fichiers manquants, incohérences, problèmes potentiels
250
+ 6. **Rester factuel** - Rapporter ce qui existe, pas ce qui devrait exister
251
+
252
+