mddd-cli 4.2.1 → 4.2.3
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/skills/md-audit/SKILL.md +53 -0
- package/.agents/skills/md-edit/SKILL.md +73 -0
- package/.agents/skills/md-impl/SKILL.md +86 -0
- package/.agents/skills/md-new/SKILL.md +44 -0
- package/.agents/skills/mermaid-diagrams/README.md +244 -0
- package/.agents/skills/mermaid-diagrams/SKILL.md +217 -0
- package/.agents/skills/mermaid-diagrams/references/advanced-features.md +556 -0
- package/.agents/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/.agents/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/.agents/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/.agents/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/.agents/skills/mermaid-diagrams/references/flowcharts.md +450 -0
- package/.agents/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/bin/cli.js +1 -1
- package/package.json +4 -3
- package/readme.md +6 -6
- package/src/commands/init.js +4 -3
- package/src/templates/spec-template.md +2 -18
- package/system_prompt.md +2 -2
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
# Sequence Diagrams
|
|
2
|
+
|
|
3
|
+
Sequence diagrams show interactions between participants over time. They're ideal for API flows, authentication sequences, and system component interactions.
|
|
4
|
+
|
|
5
|
+
## Basic Syntax
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
sequenceDiagram
|
|
9
|
+
participant A
|
|
10
|
+
participant B
|
|
11
|
+
A->>B: Message
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Participants and Actors
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
sequenceDiagram
|
|
18
|
+
actor User
|
|
19
|
+
participant Frontend
|
|
20
|
+
participant API
|
|
21
|
+
participant Database
|
|
22
|
+
|
|
23
|
+
User->>Frontend: Click button
|
|
24
|
+
Frontend->>API: POST /data
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Difference:**
|
|
28
|
+
- `participant` - System components (services, classes, databases)
|
|
29
|
+
- `actor` - External entities (users, external systems)
|
|
30
|
+
|
|
31
|
+
## Message Types
|
|
32
|
+
|
|
33
|
+
### Solid Arrow (Synchronous)
|
|
34
|
+
```mermaid
|
|
35
|
+
sequenceDiagram
|
|
36
|
+
Client->>Server: Request
|
|
37
|
+
Server-->>Client: Response
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- `->>` Solid arrow (request)
|
|
41
|
+
- `-->>` Dotted arrow (response/return)
|
|
42
|
+
|
|
43
|
+
### Open Arrow (Asynchronous)
|
|
44
|
+
```mermaid
|
|
45
|
+
sequenceDiagram
|
|
46
|
+
Client-)Server: Async message
|
|
47
|
+
Server--)Client: Async response
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `-)` Solid open arrow
|
|
51
|
+
- `--)` Dotted open arrow
|
|
52
|
+
|
|
53
|
+
### Cross/X (Delete)
|
|
54
|
+
```mermaid
|
|
55
|
+
sequenceDiagram
|
|
56
|
+
Client-xServer: Delete
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Activations
|
|
60
|
+
|
|
61
|
+
Show when a participant is actively processing:
|
|
62
|
+
|
|
63
|
+
```mermaid
|
|
64
|
+
sequenceDiagram
|
|
65
|
+
Client->>+Server: Request
|
|
66
|
+
Server->>+Database: Query
|
|
67
|
+
Database-->>-Server: Data
|
|
68
|
+
Server-->>-Client: Response
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- `+` after arrow activates
|
|
72
|
+
- `-` before arrow deactivates
|
|
73
|
+
|
|
74
|
+
## Alt/Else (Conditional Logic)
|
|
75
|
+
|
|
76
|
+
```mermaid
|
|
77
|
+
sequenceDiagram
|
|
78
|
+
User->>API: POST /login
|
|
79
|
+
API->>Database: Query user
|
|
80
|
+
Database-->>API: User data
|
|
81
|
+
|
|
82
|
+
alt Valid credentials
|
|
83
|
+
API-->>User: 200 OK + Token
|
|
84
|
+
else Invalid credentials
|
|
85
|
+
API-->>User: 401 Unauthorized
|
|
86
|
+
else Account locked
|
|
87
|
+
API-->>User: 403 Forbidden
|
|
88
|
+
end
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Opt (Optional)
|
|
92
|
+
|
|
93
|
+
```mermaid
|
|
94
|
+
sequenceDiagram
|
|
95
|
+
User->>API: POST /order
|
|
96
|
+
API->>PaymentService: Process payment
|
|
97
|
+
|
|
98
|
+
opt Payment successful
|
|
99
|
+
API->>EmailService: Send confirmation
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
API-->>User: Order result
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Par (Parallel)
|
|
106
|
+
|
|
107
|
+
Show concurrent operations:
|
|
108
|
+
|
|
109
|
+
```mermaid
|
|
110
|
+
sequenceDiagram
|
|
111
|
+
API->>Service: Process order
|
|
112
|
+
|
|
113
|
+
par Send email
|
|
114
|
+
Service->>EmailService: Send confirmation
|
|
115
|
+
and Update inventory
|
|
116
|
+
Service->>InventoryService: Reduce stock
|
|
117
|
+
and Log event
|
|
118
|
+
Service->>LogService: Log order
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
Service-->>API: Complete
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Loop
|
|
125
|
+
|
|
126
|
+
```mermaid
|
|
127
|
+
sequenceDiagram
|
|
128
|
+
Client->>Server: Request batch
|
|
129
|
+
|
|
130
|
+
loop For each item
|
|
131
|
+
Server->>Database: Process item
|
|
132
|
+
Database-->>Server: Result
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
Server-->>Client: All results
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Loop with condition:**
|
|
139
|
+
```mermaid
|
|
140
|
+
sequenceDiagram
|
|
141
|
+
loop Every 5 seconds
|
|
142
|
+
Monitor->>API: Health check
|
|
143
|
+
API-->>Monitor: Status
|
|
144
|
+
end
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Break (Early Exit)
|
|
148
|
+
|
|
149
|
+
```mermaid
|
|
150
|
+
sequenceDiagram
|
|
151
|
+
User->>API: Submit form
|
|
152
|
+
API->>Validator: Validate input
|
|
153
|
+
|
|
154
|
+
break Input invalid
|
|
155
|
+
API-->>User: 400 Bad Request
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
API->>Database: Save data
|
|
159
|
+
Database-->>API: Success
|
|
160
|
+
API-->>User: 200 OK
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Notes
|
|
164
|
+
|
|
165
|
+
### Note over single participant
|
|
166
|
+
```mermaid
|
|
167
|
+
sequenceDiagram
|
|
168
|
+
User->>API: Request
|
|
169
|
+
Note over API: Validates JWT token
|
|
170
|
+
API-->>User: Response
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Note spanning participants
|
|
174
|
+
```mermaid
|
|
175
|
+
sequenceDiagram
|
|
176
|
+
Frontend->>API: Request
|
|
177
|
+
Note over Frontend,API: HTTPS encrypted
|
|
178
|
+
API-->>Frontend: Response
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Right/Left notes
|
|
182
|
+
```mermaid
|
|
183
|
+
sequenceDiagram
|
|
184
|
+
User->>System: Action
|
|
185
|
+
Note right of System: Logs to database
|
|
186
|
+
System-->>User: Response
|
|
187
|
+
Note left of User: Updates UI
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Sequence Numbers
|
|
191
|
+
|
|
192
|
+
Automatically number messages:
|
|
193
|
+
|
|
194
|
+
```mermaid
|
|
195
|
+
sequenceDiagram
|
|
196
|
+
autonumber
|
|
197
|
+
|
|
198
|
+
User->>Frontend: Login
|
|
199
|
+
Frontend->>API: Authenticate
|
|
200
|
+
API->>Database: Verify credentials
|
|
201
|
+
Database-->>API: User data
|
|
202
|
+
API-->>Frontend: JWT token
|
|
203
|
+
Frontend-->>User: Success
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Links and Tooltips
|
|
207
|
+
|
|
208
|
+
Add clickable links:
|
|
209
|
+
|
|
210
|
+
```mermaid
|
|
211
|
+
sequenceDiagram
|
|
212
|
+
participant A as Service A
|
|
213
|
+
link A: Dashboard @ https://dashboard.example.com
|
|
214
|
+
link A: API Docs @ https://docs.example.com
|
|
215
|
+
|
|
216
|
+
A->>B: Message
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Comprehensive Example: User Authentication Flow
|
|
220
|
+
|
|
221
|
+
```mermaid
|
|
222
|
+
sequenceDiagram
|
|
223
|
+
autonumber
|
|
224
|
+
actor User
|
|
225
|
+
participant Frontend
|
|
226
|
+
participant AuthAPI
|
|
227
|
+
participant Database
|
|
228
|
+
participant Redis
|
|
229
|
+
participant EmailService
|
|
230
|
+
|
|
231
|
+
User->>+Frontend: Enter credentials
|
|
232
|
+
Frontend->>+AuthAPI: POST /auth/login
|
|
233
|
+
|
|
234
|
+
AuthAPI->>+Database: Query user by email
|
|
235
|
+
Database-->>-AuthAPI: User record
|
|
236
|
+
|
|
237
|
+
alt User not found
|
|
238
|
+
AuthAPI-->>Frontend: 404 User not found
|
|
239
|
+
Frontend-->>User: Show error
|
|
240
|
+
else User found
|
|
241
|
+
AuthAPI->>AuthAPI: Verify password hash
|
|
242
|
+
|
|
243
|
+
alt Invalid password
|
|
244
|
+
AuthAPI->>Database: Increment failed attempts
|
|
245
|
+
|
|
246
|
+
opt Failed attempts > 5
|
|
247
|
+
AuthAPI->>Database: Lock account
|
|
248
|
+
AuthAPI->>EmailService: Send security alert
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
AuthAPI-->>Frontend: 401 Invalid credentials
|
|
252
|
+
Frontend-->>User: Show error
|
|
253
|
+
else Valid password
|
|
254
|
+
AuthAPI->>AuthAPI: Generate JWT token
|
|
255
|
+
AuthAPI->>+Redis: Store session
|
|
256
|
+
Redis-->>-AuthAPI: Confirm
|
|
257
|
+
|
|
258
|
+
par Update login metadata
|
|
259
|
+
AuthAPI->>Database: Update last_login
|
|
260
|
+
and Track analytics
|
|
261
|
+
AuthAPI->>Database: Log login event
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
AuthAPI-->>-Frontend: 200 OK + JWT token
|
|
265
|
+
Frontend->>Frontend: Store token in localStorage
|
|
266
|
+
Frontend-->>-User: Redirect to dashboard
|
|
267
|
+
|
|
268
|
+
opt First login
|
|
269
|
+
EmailService->>User: Welcome email
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## API Request/Response Example
|
|
276
|
+
|
|
277
|
+
```mermaid
|
|
278
|
+
sequenceDiagram
|
|
279
|
+
autonumber
|
|
280
|
+
participant Client
|
|
281
|
+
participant Gateway
|
|
282
|
+
participant AuthService
|
|
283
|
+
participant UserService
|
|
284
|
+
participant Database
|
|
285
|
+
|
|
286
|
+
Client->>+Gateway: GET /api/users/123
|
|
287
|
+
Note over Gateway: Rate limiting check
|
|
288
|
+
|
|
289
|
+
Gateway->>+AuthService: Validate JWT
|
|
290
|
+
AuthService->>AuthService: Verify signature
|
|
291
|
+
|
|
292
|
+
alt Token invalid or expired
|
|
293
|
+
AuthService-->>Gateway: 401 Unauthorized
|
|
294
|
+
Gateway-->>Client: 401 Unauthorized
|
|
295
|
+
else Token valid
|
|
296
|
+
AuthService-->>-Gateway: User context
|
|
297
|
+
|
|
298
|
+
Gateway->>+UserService: GET /users/123
|
|
299
|
+
UserService->>+Database: SELECT * FROM users WHERE id=123
|
|
300
|
+
Database-->>-UserService: User record
|
|
301
|
+
|
|
302
|
+
alt User not found
|
|
303
|
+
UserService-->>Gateway: 404 Not Found
|
|
304
|
+
Gateway-->>Client: 404 Not Found
|
|
305
|
+
else User found
|
|
306
|
+
UserService-->>-Gateway: 200 OK + User data
|
|
307
|
+
Gateway-->>-Client: 200 OK + User data
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Microservices Communication
|
|
313
|
+
|
|
314
|
+
```mermaid
|
|
315
|
+
sequenceDiagram
|
|
316
|
+
actor User
|
|
317
|
+
participant Gateway
|
|
318
|
+
participant OrderService
|
|
319
|
+
participant PaymentService
|
|
320
|
+
participant InventoryService
|
|
321
|
+
participant NotificationService
|
|
322
|
+
participant MessageQueue
|
|
323
|
+
|
|
324
|
+
User->>+Gateway: POST /orders
|
|
325
|
+
Gateway->>+OrderService: Create order
|
|
326
|
+
|
|
327
|
+
OrderService->>+InventoryService: Check stock
|
|
328
|
+
InventoryService-->>-OrderService: Stock available
|
|
329
|
+
|
|
330
|
+
break Insufficient stock
|
|
331
|
+
OrderService-->>Gateway: 400 Out of stock
|
|
332
|
+
Gateway-->>User: Error message
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
OrderService->>OrderService: Reserve order
|
|
336
|
+
OrderService->>+PaymentService: Charge customer
|
|
337
|
+
|
|
338
|
+
alt Payment successful
|
|
339
|
+
PaymentService-->>-OrderService: Payment confirmed
|
|
340
|
+
OrderService->>MessageQueue: Publish OrderConfirmed event
|
|
341
|
+
|
|
342
|
+
par Async processing
|
|
343
|
+
MessageQueue->>InventoryService: Reduce stock
|
|
344
|
+
and
|
|
345
|
+
MessageQueue->>NotificationService: Send confirmation
|
|
346
|
+
NotificationService->>User: Email confirmation
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
OrderService-->>-Gateway: 201 Created
|
|
350
|
+
Gateway-->>User: Order confirmed
|
|
351
|
+
else Payment failed
|
|
352
|
+
PaymentService-->>OrderService: Payment declined
|
|
353
|
+
OrderService->>OrderService: Release reservation
|
|
354
|
+
OrderService-->>Gateway: 402 Payment Required
|
|
355
|
+
Gateway-->>User: Payment failed
|
|
356
|
+
end
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Best Practices
|
|
360
|
+
|
|
361
|
+
1. **Order participants logically** - Typically: User → Frontend → Backend → Database
|
|
362
|
+
2. **Use activations** - Shows when components are actively processing
|
|
363
|
+
3. **Group related logic** - Use alt/opt/par to organize conditional flows
|
|
364
|
+
4. **Add descriptive notes** - Explain complex logic or important details
|
|
365
|
+
5. **Keep diagrams focused** - One scenario per diagram
|
|
366
|
+
6. **Number messages** - Use autonumber for complex flows
|
|
367
|
+
7. **Show error paths** - Document failure scenarios with alt/else
|
|
368
|
+
8. **Indicate async operations** - Use open arrows for fire-and-forget messages
|
|
369
|
+
|
|
370
|
+
## Common Use Cases
|
|
371
|
+
|
|
372
|
+
### Authentication
|
|
373
|
+
- Login flows
|
|
374
|
+
- OAuth/SSO flows
|
|
375
|
+
- Token refresh
|
|
376
|
+
- Password reset
|
|
377
|
+
|
|
378
|
+
### API Operations
|
|
379
|
+
- CRUD operations
|
|
380
|
+
- Search and filtering
|
|
381
|
+
- Batch processing
|
|
382
|
+
- Webhook handling
|
|
383
|
+
|
|
384
|
+
### System Integration
|
|
385
|
+
- Microservice communication
|
|
386
|
+
- Third-party API calls
|
|
387
|
+
- Message queue processing
|
|
388
|
+
- Event-driven architecture
|
|
389
|
+
|
|
390
|
+
### Business Processes
|
|
391
|
+
- Order fulfillment
|
|
392
|
+
- Payment processing
|
|
393
|
+
- Approval workflows
|
|
394
|
+
- Notification chains
|
package/bin/cli.js
CHANGED
|
@@ -17,7 +17,7 @@ const program = new Command();
|
|
|
17
17
|
program
|
|
18
18
|
.name('md')
|
|
19
19
|
.description('Manager for co-located specifications for Mermaid Diagram Driven Development (MDDD)')
|
|
20
|
-
.version('4.2.
|
|
20
|
+
.version('4.2.3');
|
|
21
21
|
|
|
22
22
|
// ==========================================
|
|
23
23
|
// COMMAND: md init
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mddd-cli",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "Official CLI for modular, co-located, and versioned Mermaid Diagram Driven Development (MDDD).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./bin/cli.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
|
-
"system_prompt.md"
|
|
12
|
+
"system_prompt.md",
|
|
13
|
+
".agents/skills"
|
|
13
14
|
],
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">=18.0.0"
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
},
|
|
37
38
|
"homepage": "https://github.com/JulioCRFilho/mermaid-diagram-driven-development#readme",
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@mermaid-js/mermaid-cli": "
|
|
40
|
+
"@mermaid-js/mermaid-cli": "^11.4.2",
|
|
40
41
|
"commander": "^12.0.0",
|
|
41
42
|
"picocolors": "^1.0.0"
|
|
42
43
|
}
|
package/readme.md
CHANGED
|
@@ -216,12 +216,12 @@ Visual specifications are not centralized in distant folders. They live in the *
|
|
|
216
216
|
```
|
|
217
217
|
src/
|
|
218
218
|
└── home/
|
|
219
|
-
├── home.spec.md # 🌎 Global module map
|
|
219
|
+
├── home.spec.md # 🌎 Global module map
|
|
220
220
|
├── guest/
|
|
221
|
-
│ ├── guest.spec.md # 🔬 Screen flow
|
|
221
|
+
│ ├── guest.spec.md # 🔬 Screen flow with Decision Matrix
|
|
222
222
|
│ └── guest_page.dart # 💻 Production code generated by AI
|
|
223
223
|
└── consumer/
|
|
224
|
-
└── consumer.spec.md # 🔬 Screen flow
|
|
224
|
+
└── consumer.spec.md # 🔬 Screen flow with Decision Matrix
|
|
225
225
|
|
|
226
226
|
```
|
|
227
227
|
|
|
@@ -476,12 +476,12 @@ As especificações visuais não ficam centralizadas em pastas distantes. Elas v
|
|
|
476
476
|
```
|
|
477
477
|
src/
|
|
478
478
|
└── home/
|
|
479
|
-
├── home.spec.md # 🌎 Mapa global do módulo
|
|
479
|
+
├── home.spec.md # 🌎 Mapa global do módulo
|
|
480
480
|
├── guest/
|
|
481
|
-
│ ├── guest.spec.md # 🔬 Fluxo de tela
|
|
481
|
+
│ ├── guest.spec.md # 🔬 Fluxo de tela com Matriz de Decisão
|
|
482
482
|
│ └── guest_page.dart # 💻 Código produtivo gerado pela IA
|
|
483
483
|
└── consumer/
|
|
484
|
-
└── consumer.spec.md # 🔬 Fluxo de tela
|
|
484
|
+
└── consumer.spec.md # 🔬 Fluxo de tela com Matriz de Decisão
|
|
485
485
|
|
|
486
486
|
```
|
|
487
487
|
|
package/src/commands/init.js
CHANGED
|
@@ -26,13 +26,14 @@ function readSystemPrompt() {
|
|
|
26
26
|
export async function execute(initService) {
|
|
27
27
|
const systemPrompt = readSystemPrompt();
|
|
28
28
|
|
|
29
|
-
// Descobre o caminho absoluto real da pasta interna
|
|
29
|
+
// 1. Descobre o caminho absoluto real da pasta oculta interna do pacote da CLI
|
|
30
|
+
// Subindo de: src/commands/ -> src/ -> raiz do pacote CLI -> .agents/skills
|
|
30
31
|
const currentFile = fileURLToPath(import.meta.url);
|
|
31
|
-
const cliSkillsSourceDir = path.resolve(path.dirname(currentFile), '..', 'skills');
|
|
32
|
+
const cliSkillsSourceDir = path.resolve(path.dirname(currentFile), '..', '..', '.agents', 'skills');
|
|
32
33
|
|
|
33
34
|
await initService.createSystemPrompt(systemPrompt);
|
|
34
35
|
|
|
35
|
-
// Passa o caminho da pasta de origem
|
|
36
|
+
// 2. Passa o caminho da pasta oculta de origem para o serviço clonar recursivamente
|
|
36
37
|
await initService.createSkills(cliSkillsSourceDir, (msg) => console.log(msg));
|
|
37
38
|
|
|
38
39
|
await initService.createGitHubWorkflow(GITHUB_WORKFLOW_CONTENT, (msg) => console.log(msg));
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
%% @spec-version 1.0.0
|
|
2
|
-
%% @domain {{domain_name}}
|
|
3
|
-
%% @feature {{feature_name}}
|
|
4
|
-
%% @author {{author_name}}
|
|
5
|
-
|
|
6
1
|
# {{Feature Title}} — Specification
|
|
7
2
|
|
|
8
3
|
**SPEC_VERSION:** v1.0.0 — draft
|
|
@@ -28,12 +23,9 @@ Describe **what** this spec governs and **why** it exists.
|
|
|
28
23
|
|
|
29
24
|
## 2. Behavioral Flow (Mermaid)
|
|
30
25
|
|
|
31
|
-
> Pick the diagram type that best fits the topology
|
|
32
|
-
> `stateDiagram-v2` for lifecycles, `graph TD/LR` for procedural flows,
|
|
33
|
-
> `sequenceDiagram` for multi-actor protocols, `flowchart` for branching logic.
|
|
26
|
+
> Pick the diagram type that best fits the topology using mermaid-diagrams skill.
|
|
34
27
|
|
|
35
28
|
```mermaid
|
|
36
|
-
%% @spec-version 1.0.0
|
|
37
29
|
stateDiagram-v2
|
|
38
30
|
[*] --> Idle: initial entry point
|
|
39
31
|
|
|
@@ -104,15 +96,7 @@ When a `HaltWithConflict` is triggered, document the resolution path here:
|
|
|
104
96
|
|
|
105
97
|
---
|
|
106
98
|
|
|
107
|
-
## 6.
|
|
108
|
-
|
|
109
|
-
| Version | Date | Author | Change Description | Change Type |
|
|
110
|
-
| :---: | :--- | :--- | :--- | :---: |
|
|
111
|
-
| 1.0.0 | {{YYYY-MM-DD}} | {{author_name}} | Initial spec creation via `md-new` | MAJOR |
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## 7. Audit History
|
|
99
|
+
## 6. Audit History
|
|
116
100
|
|
|
117
101
|
<details>
|
|
118
102
|
<summary>Click to expand</summary>
|
package/system_prompt.md
CHANGED
|
@@ -88,7 +88,7 @@ Brief description of the purpose and scope of this specification.
|
|
|
88
88
|
|
|
89
89
|
src/
|
|
90
90
|
└── [domain_name]/
|
|
91
|
-
├── [domain_name].spec.md # 🌎 Macro Module Domain
|
|
91
|
+
├── [domain_name].spec.md # 🌎 Macro Module Domain
|
|
92
92
|
├── [feature_name]/
|
|
93
93
|
│ ├── [feature_name].spec.md # 🔬 Micro Flow Contract + Decision Matrix
|
|
94
94
|
│ └── [feature_name].[extension] # 💻 Target Production Code File (Any Extension)
|
|
@@ -218,7 +218,7 @@ The UNIVERSAL RULE is now integrated into the main processing diagram at the top
|
|
|
218
218
|
|
|
219
219
|
**Before ANY action, the system MUST verify that a `.spec.md` file exists for the target domain/feature.** If no spec exists, only `md-new` and `md-audit` skills are allowed to proceed (to create or propose a spec). All other skills (`md-impl`, `md-edit`, etc.) are DENIED without an existing specification.
|
|
220
220
|
|
|
221
|
-
Diagrams: Always use
|
|
221
|
+
Diagrams: Always use "npx md validate <path/to/diagram.md>" to validate diagram syntax (Mandatory)
|
|
222
222
|
|
|
223
223
|
```mermaid
|
|
224
224
|
%% @spec-version v2.0.0
|