dhurandhar 1.0.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/.dhurandhar-session-start.md +242 -0
- package/LICENSE +21 -0
- package/README.md +416 -0
- package/docs/ARCHITECTURE_V2.md +249 -0
- package/docs/DECISION_REGISTRY.md +357 -0
- package/docs/IMPLEMENTATION_PERSONAS.md +406 -0
- package/docs/PLUGGABLE_STRATEGIES.md +439 -0
- package/docs/SYSTEM_OBSERVER.md +433 -0
- package/docs/TEST_FIRST_AGILE.md +359 -0
- package/docs/architecture.md +279 -0
- package/docs/engineering-first-philosophy.md +263 -0
- package/docs/getting-started.md +218 -0
- package/docs/module-development.md +323 -0
- package/docs/strategy-example.md +299 -0
- package/docs/test-first-example.md +392 -0
- package/package.json +79 -0
- package/src/core/README.md +92 -0
- package/src/core/agent-instructions/backend-developer.md +412 -0
- package/src/core/agent-instructions/devops-engineer.md +372 -0
- package/src/core/agent-instructions/dhurandhar-council.md +547 -0
- package/src/core/agent-instructions/edge-case-hunter.md +322 -0
- package/src/core/agent-instructions/frontend-developer.md +494 -0
- package/src/core/agent-instructions/lead-system-architect.md +631 -0
- package/src/core/agent-instructions/system-observer.md +319 -0
- package/src/core/agent-instructions/test-architect.md +284 -0
- package/src/core/module.yaml +54 -0
- package/src/core/schemas/design-module-schema.yaml +995 -0
- package/src/core/schemas/system-design-map-schema.yaml +324 -0
- package/src/modules/example/README.md +130 -0
- package/src/modules/example/module.yaml +252 -0
- package/tools/cli/commands/audit.js +267 -0
- package/tools/cli/commands/config.js +113 -0
- package/tools/cli/commands/context.js +170 -0
- package/tools/cli/commands/decisions.js +398 -0
- package/tools/cli/commands/entity.js +218 -0
- package/tools/cli/commands/epic.js +125 -0
- package/tools/cli/commands/install.js +172 -0
- package/tools/cli/commands/module.js +109 -0
- package/tools/cli/commands/service.js +167 -0
- package/tools/cli/commands/story.js +225 -0
- package/tools/cli/commands/strategy.js +294 -0
- package/tools/cli/commands/test.js +277 -0
- package/tools/cli/commands/validate.js +107 -0
- package/tools/cli/dhurandhar.js +212 -0
- package/tools/lib/config-manager.js +170 -0
- package/tools/lib/filesystem.js +126 -0
- package/tools/lib/module-installer.js +61 -0
- package/tools/lib/module-manager.js +149 -0
- package/tools/lib/sdm-manager.js +982 -0
- package/tools/lib/test-engine.js +255 -0
- package/tools/lib/test-templates/api-client.template.js +100 -0
- package/tools/lib/test-templates/vitest.config.template.js +37 -0
- package/tools/lib/validators/config-validator.js +113 -0
- package/tools/lib/validators/module-validator.js +137 -0
|
@@ -0,0 +1,995 @@
|
|
|
1
|
+
# Design Module Schema - Engineering-First Blueprint
|
|
2
|
+
# Defines the structure and validation rules for Dhurandhar design modules
|
|
3
|
+
# Focus: Technical specifications, not business justifications
|
|
4
|
+
|
|
5
|
+
schema_version: "2.0"
|
|
6
|
+
name: "design-module"
|
|
7
|
+
description: "Engineering-first schema for system architecture blueprints"
|
|
8
|
+
|
|
9
|
+
# Required fields - minimal, technical only
|
|
10
|
+
required:
|
|
11
|
+
- code
|
|
12
|
+
- name
|
|
13
|
+
- version
|
|
14
|
+
- description
|
|
15
|
+
- tech_stack
|
|
16
|
+
|
|
17
|
+
# Field definitions
|
|
18
|
+
fields:
|
|
19
|
+
code:
|
|
20
|
+
type: string
|
|
21
|
+
pattern: "^[a-z0-9-]+$"
|
|
22
|
+
description: "Unique module identifier (lowercase, alphanumeric, hyphens only)"
|
|
23
|
+
examples:
|
|
24
|
+
- "my-module"
|
|
25
|
+
- "web-app-design"
|
|
26
|
+
|
|
27
|
+
name:
|
|
28
|
+
type: string
|
|
29
|
+
min_length: 3
|
|
30
|
+
max_length: 100
|
|
31
|
+
description: "Human-readable module name"
|
|
32
|
+
examples:
|
|
33
|
+
- "My Design Module"
|
|
34
|
+
- "Web Application Architecture"
|
|
35
|
+
|
|
36
|
+
version:
|
|
37
|
+
type: string
|
|
38
|
+
pattern: "^\\d+\\.\\d+\\.\\d+$"
|
|
39
|
+
description: "Semantic version number"
|
|
40
|
+
examples:
|
|
41
|
+
- "1.0.0"
|
|
42
|
+
- "0.1.0"
|
|
43
|
+
|
|
44
|
+
description:
|
|
45
|
+
type: string
|
|
46
|
+
min_length: 10
|
|
47
|
+
max_length: 500
|
|
48
|
+
description: "Technical description - what it does, not why"
|
|
49
|
+
|
|
50
|
+
tech_stack:
|
|
51
|
+
type: object
|
|
52
|
+
description: "Required technology stack specifications"
|
|
53
|
+
required:
|
|
54
|
+
- primary_language
|
|
55
|
+
properties:
|
|
56
|
+
primary_language:
|
|
57
|
+
type: string
|
|
58
|
+
description: "Primary programming language"
|
|
59
|
+
examples: ["Go", "TypeScript", "Python", "Rust"]
|
|
60
|
+
frameworks:
|
|
61
|
+
type: array
|
|
62
|
+
item_type: string
|
|
63
|
+
optional: true
|
|
64
|
+
description: "Frameworks in use"
|
|
65
|
+
examples: [["Echo", "GORM"], ["Express", "Prisma"]]
|
|
66
|
+
databases:
|
|
67
|
+
type: array
|
|
68
|
+
item_type: string
|
|
69
|
+
optional: true
|
|
70
|
+
description: "Database systems"
|
|
71
|
+
examples: [["PostgreSQL", "Redis"], ["MongoDB"]]
|
|
72
|
+
infrastructure:
|
|
73
|
+
type: array
|
|
74
|
+
item_type: string
|
|
75
|
+
optional: true
|
|
76
|
+
description: "Infrastructure components"
|
|
77
|
+
examples: [["Docker", "Kubernetes"], ["AWS Lambda"]]
|
|
78
|
+
|
|
79
|
+
author:
|
|
80
|
+
type: string
|
|
81
|
+
optional: true
|
|
82
|
+
description: "Module author or organization"
|
|
83
|
+
|
|
84
|
+
license:
|
|
85
|
+
type: string
|
|
86
|
+
optional: true
|
|
87
|
+
default: "MIT"
|
|
88
|
+
description: "License identifier"
|
|
89
|
+
examples:
|
|
90
|
+
- "MIT"
|
|
91
|
+
- "Apache-2.0"
|
|
92
|
+
- "GPL-3.0"
|
|
93
|
+
|
|
94
|
+
tags:
|
|
95
|
+
type: array
|
|
96
|
+
item_type: string
|
|
97
|
+
optional: true
|
|
98
|
+
description: "Module tags for categorization"
|
|
99
|
+
|
|
100
|
+
dependencies:
|
|
101
|
+
type: array
|
|
102
|
+
item_type: string
|
|
103
|
+
optional: true
|
|
104
|
+
default: []
|
|
105
|
+
description: "List of required module codes"
|
|
106
|
+
|
|
107
|
+
# NEW: User Types - Define who interacts with the system
|
|
108
|
+
user_types:
|
|
109
|
+
type: array
|
|
110
|
+
optional: true
|
|
111
|
+
description: "User roles and permissions (technical definition)"
|
|
112
|
+
items:
|
|
113
|
+
type: object
|
|
114
|
+
required:
|
|
115
|
+
- role
|
|
116
|
+
- permissions
|
|
117
|
+
properties:
|
|
118
|
+
role:
|
|
119
|
+
type: string
|
|
120
|
+
description: "Role identifier (e.g., admin, user, api_client)"
|
|
121
|
+
permissions:
|
|
122
|
+
type: array
|
|
123
|
+
item_type: string
|
|
124
|
+
description: "List of permission codes"
|
|
125
|
+
examples: [["read:users", "write:users"], ["read:public"]]
|
|
126
|
+
attributes:
|
|
127
|
+
type: object
|
|
128
|
+
optional: true
|
|
129
|
+
description: "Role-specific attributes (JWT claims, session data)"
|
|
130
|
+
authentication:
|
|
131
|
+
type: string
|
|
132
|
+
optional: true
|
|
133
|
+
enum: ["jwt", "session", "api_key", "oauth2", "none"]
|
|
134
|
+
description: "Authentication mechanism for this role"
|
|
135
|
+
|
|
136
|
+
# NEW: Entities & Relationships - ERD-like structure
|
|
137
|
+
entities:
|
|
138
|
+
type: array
|
|
139
|
+
optional: true
|
|
140
|
+
description: "Database entities with attributes and relationships"
|
|
141
|
+
items:
|
|
142
|
+
type: object
|
|
143
|
+
required:
|
|
144
|
+
- name
|
|
145
|
+
- attributes
|
|
146
|
+
properties:
|
|
147
|
+
name:
|
|
148
|
+
type: string
|
|
149
|
+
pattern: "^[A-Z][a-zA-Z0-9]*$"
|
|
150
|
+
description: "Entity name (PascalCase, e.g., User, BlogPost)"
|
|
151
|
+
table_name:
|
|
152
|
+
type: string
|
|
153
|
+
optional: true
|
|
154
|
+
description: "Database table name (defaults to snake_case of name)"
|
|
155
|
+
attributes:
|
|
156
|
+
type: array
|
|
157
|
+
description: "Entity attributes/columns"
|
|
158
|
+
items:
|
|
159
|
+
type: object
|
|
160
|
+
required:
|
|
161
|
+
- name
|
|
162
|
+
- type
|
|
163
|
+
properties:
|
|
164
|
+
name:
|
|
165
|
+
type: string
|
|
166
|
+
description: "Attribute name"
|
|
167
|
+
type:
|
|
168
|
+
type: string
|
|
169
|
+
description: "Data type (int, varchar, uuid, timestamp, etc.)"
|
|
170
|
+
constraints:
|
|
171
|
+
type: array
|
|
172
|
+
item_type: string
|
|
173
|
+
optional: true
|
|
174
|
+
description: "Constraints (primary_key, unique, not_null, indexed)"
|
|
175
|
+
default:
|
|
176
|
+
type: any
|
|
177
|
+
optional: true
|
|
178
|
+
description: "Default value"
|
|
179
|
+
relationships:
|
|
180
|
+
type: array
|
|
181
|
+
optional: true
|
|
182
|
+
description: "Relationships with other entities"
|
|
183
|
+
items:
|
|
184
|
+
type: object
|
|
185
|
+
required:
|
|
186
|
+
- type
|
|
187
|
+
- target
|
|
188
|
+
properties:
|
|
189
|
+
type:
|
|
190
|
+
type: string
|
|
191
|
+
enum: ["one_to_one", "one_to_many", "many_to_one", "many_to_many"]
|
|
192
|
+
description: "Relationship cardinality"
|
|
193
|
+
target:
|
|
194
|
+
type: string
|
|
195
|
+
description: "Target entity name"
|
|
196
|
+
foreign_key:
|
|
197
|
+
type: string
|
|
198
|
+
optional: true
|
|
199
|
+
description: "Foreign key column name"
|
|
200
|
+
through:
|
|
201
|
+
type: string
|
|
202
|
+
optional: true
|
|
203
|
+
description: "Junction table for many_to_many"
|
|
204
|
+
cascade:
|
|
205
|
+
type: string
|
|
206
|
+
optional: true
|
|
207
|
+
enum: ["delete", "nullify", "restrict"]
|
|
208
|
+
description: "Cascade behavior on delete"
|
|
209
|
+
|
|
210
|
+
# NEW: Service Architecture - Microservices with tech stack
|
|
211
|
+
services:
|
|
212
|
+
type: array
|
|
213
|
+
optional: true
|
|
214
|
+
description: "Microservice definitions with mandatory tech specs"
|
|
215
|
+
items:
|
|
216
|
+
type: object
|
|
217
|
+
required:
|
|
218
|
+
- name
|
|
219
|
+
- scope
|
|
220
|
+
- tech_stack
|
|
221
|
+
properties:
|
|
222
|
+
name:
|
|
223
|
+
type: string
|
|
224
|
+
pattern: "^[a-z0-9-]+$"
|
|
225
|
+
description: "Service name (kebab-case, e.g., auth-service, user-service)"
|
|
226
|
+
scope:
|
|
227
|
+
type: string
|
|
228
|
+
description: "Technical scope - what this service does (1-2 sentences max)"
|
|
229
|
+
examples:
|
|
230
|
+
- "Handles JWT authentication and session management"
|
|
231
|
+
- "CRUD operations for user profiles and preferences"
|
|
232
|
+
tech_stack:
|
|
233
|
+
type: object
|
|
234
|
+
required:
|
|
235
|
+
- language
|
|
236
|
+
- framework
|
|
237
|
+
properties:
|
|
238
|
+
language:
|
|
239
|
+
type: string
|
|
240
|
+
description: "Programming language"
|
|
241
|
+
examples: ["Go", "TypeScript", "Python", "Rust", "Java"]
|
|
242
|
+
framework:
|
|
243
|
+
type: string
|
|
244
|
+
description: "Web framework"
|
|
245
|
+
examples: ["Echo", "Express", "FastAPI", "Actix", "Spring"]
|
|
246
|
+
database:
|
|
247
|
+
type: string
|
|
248
|
+
optional: true
|
|
249
|
+
description: "Primary database"
|
|
250
|
+
examples: ["PostgreSQL", "MongoDB", "Redis"]
|
|
251
|
+
orm:
|
|
252
|
+
type: string
|
|
253
|
+
optional: true
|
|
254
|
+
description: "ORM/Database library"
|
|
255
|
+
examples: ["GORM", "Prisma", "SQLAlchemy", "Diesel"]
|
|
256
|
+
api:
|
|
257
|
+
type: object
|
|
258
|
+
optional: true
|
|
259
|
+
description: "API boundary definition"
|
|
260
|
+
properties:
|
|
261
|
+
type:
|
|
262
|
+
type: string
|
|
263
|
+
enum: ["rest", "grpc", "graphql", "websocket"]
|
|
264
|
+
default: "rest"
|
|
265
|
+
base_path:
|
|
266
|
+
type: string
|
|
267
|
+
description: "API base path"
|
|
268
|
+
examples: ["/api/v1/auth", "/api/v1/users"]
|
|
269
|
+
port:
|
|
270
|
+
type: integer
|
|
271
|
+
optional: true
|
|
272
|
+
description: "Service port"
|
|
273
|
+
endpoints:
|
|
274
|
+
type: array
|
|
275
|
+
optional: true
|
|
276
|
+
description: "Key endpoints (optional, for documentation)"
|
|
277
|
+
items:
|
|
278
|
+
type: object
|
|
279
|
+
properties:
|
|
280
|
+
method:
|
|
281
|
+
type: string
|
|
282
|
+
enum: ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
283
|
+
path:
|
|
284
|
+
type: string
|
|
285
|
+
description:
|
|
286
|
+
type: string
|
|
287
|
+
dependencies:
|
|
288
|
+
type: array
|
|
289
|
+
item_type: string
|
|
290
|
+
optional: true
|
|
291
|
+
description: "Other services this depends on"
|
|
292
|
+
data_access:
|
|
293
|
+
type: array
|
|
294
|
+
item_type: string
|
|
295
|
+
optional: true
|
|
296
|
+
description: "Entities this service has access to"
|
|
297
|
+
environment:
|
|
298
|
+
type: object
|
|
299
|
+
optional: true
|
|
300
|
+
description: "Required environment variables (keys only, no values)"
|
|
301
|
+
properties:
|
|
302
|
+
required:
|
|
303
|
+
type: array
|
|
304
|
+
item_type: string
|
|
305
|
+
description: "Required env vars"
|
|
306
|
+
examples: [["DATABASE_URL", "JWT_SECRET"]]
|
|
307
|
+
optional:
|
|
308
|
+
type: array
|
|
309
|
+
item_type: string
|
|
310
|
+
optional: true
|
|
311
|
+
description: "Optional env vars"
|
|
312
|
+
|
|
313
|
+
design_components:
|
|
314
|
+
type: array
|
|
315
|
+
optional: true
|
|
316
|
+
description: "Legacy - prefer 'services' for new designs"
|
|
317
|
+
items:
|
|
318
|
+
type: object
|
|
319
|
+
required:
|
|
320
|
+
- name
|
|
321
|
+
- type
|
|
322
|
+
properties:
|
|
323
|
+
name:
|
|
324
|
+
type: string
|
|
325
|
+
pattern: "^[a-z0-9-]+$"
|
|
326
|
+
type:
|
|
327
|
+
type: string
|
|
328
|
+
enum: ["application", "service", "datastore", "infrastructure", "external"]
|
|
329
|
+
description:
|
|
330
|
+
type: string
|
|
331
|
+
optional: true
|
|
332
|
+
properties:
|
|
333
|
+
type: object
|
|
334
|
+
optional: true
|
|
335
|
+
|
|
336
|
+
relationships:
|
|
337
|
+
type: array
|
|
338
|
+
optional: true
|
|
339
|
+
description: "Relationships between components"
|
|
340
|
+
items:
|
|
341
|
+
type: object
|
|
342
|
+
required:
|
|
343
|
+
- from
|
|
344
|
+
- to
|
|
345
|
+
- type
|
|
346
|
+
properties:
|
|
347
|
+
from:
|
|
348
|
+
type: string
|
|
349
|
+
description: "Source component name"
|
|
350
|
+
to:
|
|
351
|
+
type: string
|
|
352
|
+
description: "Target component name"
|
|
353
|
+
type:
|
|
354
|
+
type: string
|
|
355
|
+
description: "Relationship type"
|
|
356
|
+
description:
|
|
357
|
+
type: string
|
|
358
|
+
optional: true
|
|
359
|
+
|
|
360
|
+
build_processes:
|
|
361
|
+
type: array
|
|
362
|
+
optional: true
|
|
363
|
+
description: "Build and deployment processes"
|
|
364
|
+
items:
|
|
365
|
+
type: object
|
|
366
|
+
required:
|
|
367
|
+
- name
|
|
368
|
+
- steps
|
|
369
|
+
properties:
|
|
370
|
+
name:
|
|
371
|
+
type: string
|
|
372
|
+
description:
|
|
373
|
+
type: string
|
|
374
|
+
optional: true
|
|
375
|
+
steps:
|
|
376
|
+
type: array
|
|
377
|
+
item_type: string
|
|
378
|
+
|
|
379
|
+
# NEW: Technical Decision Registry - Bmad-inspired "Stock of Decisions"
|
|
380
|
+
decision_registry:
|
|
381
|
+
type: object
|
|
382
|
+
optional: true
|
|
383
|
+
description: "Centralized registry of all technical decisions and standards"
|
|
384
|
+
properties:
|
|
385
|
+
naming_conventions:
|
|
386
|
+
type: object
|
|
387
|
+
optional: true
|
|
388
|
+
description: "Naming standards across the codebase"
|
|
389
|
+
properties:
|
|
390
|
+
case_styles:
|
|
391
|
+
type: object
|
|
392
|
+
optional: true
|
|
393
|
+
description: "Case style rules for different code elements"
|
|
394
|
+
properties:
|
|
395
|
+
classes:
|
|
396
|
+
type: string
|
|
397
|
+
enum: ["PascalCase", "camelCase", "snake_case", "kebab-case"]
|
|
398
|
+
description: "Class and type naming"
|
|
399
|
+
functions:
|
|
400
|
+
type: string
|
|
401
|
+
enum: ["PascalCase", "camelCase", "snake_case", "kebab-case"]
|
|
402
|
+
description: "Function and method naming"
|
|
403
|
+
variables:
|
|
404
|
+
type: string
|
|
405
|
+
enum: ["PascalCase", "camelCase", "snake_case", "kebab-case"]
|
|
406
|
+
description: "Variable naming"
|
|
407
|
+
constants:
|
|
408
|
+
type: string
|
|
409
|
+
enum: ["SCREAMING_SNAKE_CASE", "PascalCase", "camelCase"]
|
|
410
|
+
description: "Constant naming"
|
|
411
|
+
database_tables:
|
|
412
|
+
type: string
|
|
413
|
+
enum: ["snake_case", "PascalCase", "camelCase"]
|
|
414
|
+
description: "Database table naming"
|
|
415
|
+
database_columns:
|
|
416
|
+
type: string
|
|
417
|
+
enum: ["snake_case", "camelCase", "PascalCase"]
|
|
418
|
+
description: "Database column naming"
|
|
419
|
+
api_endpoints:
|
|
420
|
+
type: string
|
|
421
|
+
enum: ["kebab-case", "snake_case", "camelCase"]
|
|
422
|
+
description: "API endpoint path naming"
|
|
423
|
+
|
|
424
|
+
file_patterns:
|
|
425
|
+
type: object
|
|
426
|
+
optional: true
|
|
427
|
+
description: "File naming patterns"
|
|
428
|
+
properties:
|
|
429
|
+
components:
|
|
430
|
+
type: string
|
|
431
|
+
description: "e.g., 'ComponentName.jsx', 'component-name.vue'"
|
|
432
|
+
services:
|
|
433
|
+
type: string
|
|
434
|
+
description: "e.g., 'UserService.ts', 'user_service.py'"
|
|
435
|
+
models:
|
|
436
|
+
type: string
|
|
437
|
+
description: "e.g., 'User.model.ts', 'user.go'"
|
|
438
|
+
tests:
|
|
439
|
+
type: string
|
|
440
|
+
description: "e.g., 'User.test.ts', 'user_test.go'"
|
|
441
|
+
|
|
442
|
+
prefixes_suffixes:
|
|
443
|
+
type: object
|
|
444
|
+
optional: true
|
|
445
|
+
description: "Mandatory prefixes or suffixes"
|
|
446
|
+
properties:
|
|
447
|
+
interfaces:
|
|
448
|
+
type: string
|
|
449
|
+
description: "e.g., 'I' prefix (IUserService)"
|
|
450
|
+
abstract_classes:
|
|
451
|
+
type: string
|
|
452
|
+
description: "e.g., 'Abstract' prefix or 'Base' prefix"
|
|
453
|
+
test_functions:
|
|
454
|
+
type: string
|
|
455
|
+
description: "e.g., 'test_' prefix, 'should_' prefix"
|
|
456
|
+
private_methods:
|
|
457
|
+
type: string
|
|
458
|
+
description: "e.g., '_' prefix"
|
|
459
|
+
|
|
460
|
+
design_patterns:
|
|
461
|
+
type: object
|
|
462
|
+
optional: true
|
|
463
|
+
description: "Mandatory architectural patterns as implementation constraints"
|
|
464
|
+
properties:
|
|
465
|
+
data_access:
|
|
466
|
+
type: string
|
|
467
|
+
enum: ["repository_pattern", "active_record", "data_mapper", "direct_queries"]
|
|
468
|
+
description: "How services access data"
|
|
469
|
+
service_layer:
|
|
470
|
+
type: string
|
|
471
|
+
enum: ["service_classes", "function_modules", "handlers_only"]
|
|
472
|
+
description: "Service layer organization"
|
|
473
|
+
dependency_injection:
|
|
474
|
+
type: string
|
|
475
|
+
enum: ["constructor_injection", "property_injection", "service_locator", "none"]
|
|
476
|
+
description: "DI pattern"
|
|
477
|
+
validation:
|
|
478
|
+
type: string
|
|
479
|
+
enum: ["dto_validation", "middleware_validation", "domain_validation"]
|
|
480
|
+
description: "Where validation occurs"
|
|
481
|
+
cqrs:
|
|
482
|
+
type: boolean
|
|
483
|
+
optional: true
|
|
484
|
+
description: "Use CQRS pattern (separate read/write models)"
|
|
485
|
+
event_sourcing:
|
|
486
|
+
type: boolean
|
|
487
|
+
optional: true
|
|
488
|
+
description: "Use event sourcing for state"
|
|
489
|
+
domain_driven_design:
|
|
490
|
+
type: boolean
|
|
491
|
+
optional: true
|
|
492
|
+
description: "Apply DDD principles"
|
|
493
|
+
|
|
494
|
+
service_specific_patterns:
|
|
495
|
+
type: array
|
|
496
|
+
item_type: object
|
|
497
|
+
optional: true
|
|
498
|
+
description: "Patterns mandated for specific services"
|
|
499
|
+
item_properties:
|
|
500
|
+
service:
|
|
501
|
+
type: string
|
|
502
|
+
description: "Service name"
|
|
503
|
+
pattern:
|
|
504
|
+
type: string
|
|
505
|
+
description: "Pattern to apply (e.g., 'CQRS', 'Saga Pattern')"
|
|
506
|
+
rationale:
|
|
507
|
+
type: string
|
|
508
|
+
optional: true
|
|
509
|
+
description: "Why this pattern for this service"
|
|
510
|
+
|
|
511
|
+
error_response_standards:
|
|
512
|
+
type: object
|
|
513
|
+
optional: true
|
|
514
|
+
description: "Standardized error handling and response formats"
|
|
515
|
+
properties:
|
|
516
|
+
error_code_mapping:
|
|
517
|
+
type: object
|
|
518
|
+
optional: true
|
|
519
|
+
description: "Internal error codes to HTTP status mapping"
|
|
520
|
+
properties:
|
|
521
|
+
validation_error:
|
|
522
|
+
type: integer
|
|
523
|
+
description: "HTTP status for validation errors (e.g., 400)"
|
|
524
|
+
authentication_error:
|
|
525
|
+
type: integer
|
|
526
|
+
description: "HTTP status for auth errors (e.g., 401)"
|
|
527
|
+
authorization_error:
|
|
528
|
+
type: integer
|
|
529
|
+
description: "HTTP status for permission errors (e.g., 403)"
|
|
530
|
+
not_found_error:
|
|
531
|
+
type: integer
|
|
532
|
+
description: "HTTP status for not found (e.g., 404)"
|
|
533
|
+
conflict_error:
|
|
534
|
+
type: integer
|
|
535
|
+
description: "HTTP status for conflicts (e.g., 409)"
|
|
536
|
+
internal_error:
|
|
537
|
+
type: integer
|
|
538
|
+
description: "HTTP status for server errors (e.g., 500)"
|
|
539
|
+
|
|
540
|
+
response_envelope:
|
|
541
|
+
type: object
|
|
542
|
+
optional: true
|
|
543
|
+
description: "Standardized JSON response structure"
|
|
544
|
+
properties:
|
|
545
|
+
success_format:
|
|
546
|
+
type: string
|
|
547
|
+
description: "e.g., '{\"data\": {}, \"meta\": {}}'"
|
|
548
|
+
error_format:
|
|
549
|
+
type: string
|
|
550
|
+
description: "e.g., '{\"error\": {\"code\": \"\", \"message\": \"\", \"details\": []}}'"
|
|
551
|
+
include_request_id:
|
|
552
|
+
type: boolean
|
|
553
|
+
description: "Include request ID in all responses"
|
|
554
|
+
include_timestamp:
|
|
555
|
+
type: boolean
|
|
556
|
+
description: "Include timestamp in all responses"
|
|
557
|
+
|
|
558
|
+
error_detail_level:
|
|
559
|
+
type: string
|
|
560
|
+
enum: ["minimal", "standard", "verbose", "debug_only"]
|
|
561
|
+
optional: true
|
|
562
|
+
description: "How much error detail to expose to clients"
|
|
563
|
+
|
|
564
|
+
observability_standards:
|
|
565
|
+
type: object
|
|
566
|
+
optional: true
|
|
567
|
+
description: "Logging, tracing, and metrics standards"
|
|
568
|
+
properties:
|
|
569
|
+
logging:
|
|
570
|
+
type: object
|
|
571
|
+
optional: true
|
|
572
|
+
description: "Logging standards"
|
|
573
|
+
properties:
|
|
574
|
+
levels:
|
|
575
|
+
type: array
|
|
576
|
+
item_type: string
|
|
577
|
+
description: "Allowed log levels (e.g., ['DEBUG', 'INFO', 'WARN', 'ERROR'])"
|
|
578
|
+
structured_logging:
|
|
579
|
+
type: boolean
|
|
580
|
+
description: "Use structured JSON logging"
|
|
581
|
+
mandatory_fields:
|
|
582
|
+
type: array
|
|
583
|
+
item_type: string
|
|
584
|
+
description: "Fields required in every log (e.g., ['trace_id', 'service_name', 'timestamp'])"
|
|
585
|
+
sensitive_data_masking:
|
|
586
|
+
type: boolean
|
|
587
|
+
description: "Mask sensitive data in logs"
|
|
588
|
+
|
|
589
|
+
tracing:
|
|
590
|
+
type: object
|
|
591
|
+
optional: true
|
|
592
|
+
description: "Distributed tracing standards"
|
|
593
|
+
properties:
|
|
594
|
+
trace_id_header:
|
|
595
|
+
type: string
|
|
596
|
+
description: "HTTP header for trace ID (e.g., 'X-Trace-ID')"
|
|
597
|
+
correlation_id_header:
|
|
598
|
+
type: string
|
|
599
|
+
description: "HTTP header for correlation ID (e.g., 'X-Correlation-ID')"
|
|
600
|
+
span_naming_format:
|
|
601
|
+
type: string
|
|
602
|
+
description: "Format for span names (e.g., 'service.operation')"
|
|
603
|
+
|
|
604
|
+
metrics:
|
|
605
|
+
type: object
|
|
606
|
+
optional: true
|
|
607
|
+
description: "Metrics and monitoring standards"
|
|
608
|
+
properties:
|
|
609
|
+
naming_format:
|
|
610
|
+
type: string
|
|
611
|
+
description: "Metric naming format (e.g., 'service_name_metric_name_unit')"
|
|
612
|
+
mandatory_labels:
|
|
613
|
+
type: array
|
|
614
|
+
item_type: string
|
|
615
|
+
description: "Labels required on all metrics (e.g., ['service', 'environment', 'version'])"
|
|
616
|
+
latency_buckets:
|
|
617
|
+
type: array
|
|
618
|
+
item_type: number
|
|
619
|
+
description: "Histogram buckets for latency metrics"
|
|
620
|
+
|
|
621
|
+
api_standards:
|
|
622
|
+
type: object
|
|
623
|
+
optional: true
|
|
624
|
+
description: "API design and versioning standards"
|
|
625
|
+
properties:
|
|
626
|
+
versioning_strategy:
|
|
627
|
+
type: string
|
|
628
|
+
enum: ["url_path", "header", "query_param", "content_negotiation"]
|
|
629
|
+
description: "How APIs are versioned"
|
|
630
|
+
version_format:
|
|
631
|
+
type: string
|
|
632
|
+
description: "Version format (e.g., 'v1', '1.0', '2023-01-01')"
|
|
633
|
+
pagination:
|
|
634
|
+
type: object
|
|
635
|
+
optional: true
|
|
636
|
+
description: "Pagination standards"
|
|
637
|
+
properties:
|
|
638
|
+
style:
|
|
639
|
+
type: string
|
|
640
|
+
enum: ["offset_limit", "cursor", "page_number"]
|
|
641
|
+
default_page_size:
|
|
642
|
+
type: integer
|
|
643
|
+
max_page_size:
|
|
644
|
+
type: integer
|
|
645
|
+
|
|
646
|
+
rate_limiting:
|
|
647
|
+
type: object
|
|
648
|
+
optional: true
|
|
649
|
+
description: "Rate limiting standards"
|
|
650
|
+
properties:
|
|
651
|
+
enabled:
|
|
652
|
+
type: boolean
|
|
653
|
+
default_limit:
|
|
654
|
+
type: integer
|
|
655
|
+
description: "Requests per window"
|
|
656
|
+
window:
|
|
657
|
+
type: string
|
|
658
|
+
description: "Time window (e.g., '1m', '1h')"
|
|
659
|
+
|
|
660
|
+
code_quality_standards:
|
|
661
|
+
type: object
|
|
662
|
+
optional: true
|
|
663
|
+
description: "Code quality and testing standards"
|
|
664
|
+
properties:
|
|
665
|
+
test_coverage_minimum:
|
|
666
|
+
type: integer
|
|
667
|
+
description: "Minimum code coverage percentage"
|
|
668
|
+
documentation_required:
|
|
669
|
+
type: boolean
|
|
670
|
+
description: "Require documentation for public APIs"
|
|
671
|
+
linting_rules:
|
|
672
|
+
type: string
|
|
673
|
+
description: "Linting configuration (e.g., 'eslint:recommended', 'golangci-lint')"
|
|
674
|
+
code_review_required:
|
|
675
|
+
type: boolean
|
|
676
|
+
description: "Require code review before merge"
|
|
677
|
+
|
|
678
|
+
# NEW: Technical Strategies - Pluggable Architectural Patterns
|
|
679
|
+
technical_strategies:
|
|
680
|
+
type: object
|
|
681
|
+
optional: true
|
|
682
|
+
description: "Pluggable architectural patterns and constraints"
|
|
683
|
+
properties:
|
|
684
|
+
persistence:
|
|
685
|
+
type: object
|
|
686
|
+
optional: true
|
|
687
|
+
description: "Data persistence strategy"
|
|
688
|
+
properties:
|
|
689
|
+
model:
|
|
690
|
+
type: string
|
|
691
|
+
enum: ["database_per_service", "shared_database", "hybrid", "event_sourcing"]
|
|
692
|
+
description: "Data isolation pattern"
|
|
693
|
+
constraints:
|
|
694
|
+
type: array
|
|
695
|
+
item_type: string
|
|
696
|
+
optional: true
|
|
697
|
+
description: "Technical constraints (e.g., 'no_cross_service_queries', 'eventual_consistency')"
|
|
698
|
+
database_assignments:
|
|
699
|
+
type: object
|
|
700
|
+
optional: true
|
|
701
|
+
description: "Service-to-database mappings for database_per_service"
|
|
702
|
+
|
|
703
|
+
state_management:
|
|
704
|
+
type: object
|
|
705
|
+
optional: true
|
|
706
|
+
description: "Caching and state distribution strategy"
|
|
707
|
+
properties:
|
|
708
|
+
caching_layer:
|
|
709
|
+
type: string
|
|
710
|
+
enum: ["distributed_redis", "local_in_memory", "sidecar_cache", "cdn_edge", "none"]
|
|
711
|
+
description: "Caching architecture"
|
|
712
|
+
session_storage:
|
|
713
|
+
type: string
|
|
714
|
+
enum: ["redis_distributed", "database", "jwt_stateless", "sticky_sessions"]
|
|
715
|
+
description: "Session management approach"
|
|
716
|
+
cache_invalidation:
|
|
717
|
+
type: string
|
|
718
|
+
enum: ["ttl_based", "event_driven", "manual", "write_through"]
|
|
719
|
+
optional: true
|
|
720
|
+
|
|
721
|
+
communication:
|
|
722
|
+
type: object
|
|
723
|
+
optional: true
|
|
724
|
+
description: "Service-to-service communication pattern"
|
|
725
|
+
properties:
|
|
726
|
+
primary_pattern:
|
|
727
|
+
type: string
|
|
728
|
+
enum: ["synchronous_rest", "asynchronous_events", "hybrid", "grpc_streaming", "graphql_federation"]
|
|
729
|
+
description: "Primary inter-service communication"
|
|
730
|
+
event_bus:
|
|
731
|
+
type: object
|
|
732
|
+
optional: true
|
|
733
|
+
description: "Event-driven infrastructure"
|
|
734
|
+
properties:
|
|
735
|
+
technology:
|
|
736
|
+
type: string
|
|
737
|
+
enum: ["kafka", "rabbitmq", "aws_sns_sqs", "redis_streams", "nats"]
|
|
738
|
+
topics_or_queues:
|
|
739
|
+
type: array
|
|
740
|
+
item_type: string
|
|
741
|
+
optional: true
|
|
742
|
+
message_format:
|
|
743
|
+
type: string
|
|
744
|
+
enum: ["json", "avro", "protobuf"]
|
|
745
|
+
optional: true
|
|
746
|
+
api_gateway:
|
|
747
|
+
type: object
|
|
748
|
+
optional: true
|
|
749
|
+
properties:
|
|
750
|
+
technology:
|
|
751
|
+
type: string
|
|
752
|
+
enum: ["nginx", "kong", "aws_api_gateway", "envoy", "custom"]
|
|
753
|
+
features:
|
|
754
|
+
type: array
|
|
755
|
+
item_type: string
|
|
756
|
+
optional: true
|
|
757
|
+
description: "e.g., rate_limiting, auth, load_balancing"
|
|
758
|
+
|
|
759
|
+
deployment:
|
|
760
|
+
type: object
|
|
761
|
+
optional: true
|
|
762
|
+
description: "Deployment and orchestration strategy"
|
|
763
|
+
properties:
|
|
764
|
+
orchestration:
|
|
765
|
+
type: string
|
|
766
|
+
enum: ["kubernetes", "docker_swarm", "ecs", "nomad", "serverless"]
|
|
767
|
+
scaling_strategy:
|
|
768
|
+
type: string
|
|
769
|
+
enum: ["horizontal_pod_autoscaling", "vertical_scaling", "manual", "serverless_auto"]
|
|
770
|
+
optional: true
|
|
771
|
+
service_mesh:
|
|
772
|
+
type: object
|
|
773
|
+
optional: true
|
|
774
|
+
properties:
|
|
775
|
+
enabled:
|
|
776
|
+
type: boolean
|
|
777
|
+
technology:
|
|
778
|
+
type: string
|
|
779
|
+
enum: ["istio", "linkerd", "consul", "none"]
|
|
780
|
+
|
|
781
|
+
observability:
|
|
782
|
+
type: object
|
|
783
|
+
optional: true
|
|
784
|
+
description: "Monitoring and observability strategy"
|
|
785
|
+
properties:
|
|
786
|
+
logging:
|
|
787
|
+
type: string
|
|
788
|
+
enum: ["centralized_elk", "cloudwatch", "datadog", "splunk", "loki"]
|
|
789
|
+
metrics:
|
|
790
|
+
type: string
|
|
791
|
+
enum: ["prometheus", "datadog", "cloudwatch", "grafana_cloud"]
|
|
792
|
+
tracing:
|
|
793
|
+
type: string
|
|
794
|
+
enum: ["jaeger", "zipkin", "aws_xray", "datadog_apm", "none"]
|
|
795
|
+
distributed_tracing:
|
|
796
|
+
type: boolean
|
|
797
|
+
optional: true
|
|
798
|
+
|
|
799
|
+
security:
|
|
800
|
+
type: object
|
|
801
|
+
optional: true
|
|
802
|
+
description: "Security architecture patterns"
|
|
803
|
+
properties:
|
|
804
|
+
authentication:
|
|
805
|
+
type: string
|
|
806
|
+
enum: ["jwt_centralized", "oauth2_delegated", "mtls", "api_keys", "hybrid"]
|
|
807
|
+
authorization:
|
|
808
|
+
type: string
|
|
809
|
+
enum: ["rbac", "abac", "policy_engine_opa", "service_level"]
|
|
810
|
+
secrets_management:
|
|
811
|
+
type: string
|
|
812
|
+
enum: ["vault", "aws_secrets_manager", "kubernetes_secrets", "env_vars"]
|
|
813
|
+
|
|
814
|
+
resilience:
|
|
815
|
+
type: object
|
|
816
|
+
optional: true
|
|
817
|
+
description: "Fault tolerance and resilience patterns"
|
|
818
|
+
properties:
|
|
819
|
+
circuit_breaker:
|
|
820
|
+
type: boolean
|
|
821
|
+
description: "Enable circuit breaker pattern"
|
|
822
|
+
retry_strategy:
|
|
823
|
+
type: string
|
|
824
|
+
enum: ["exponential_backoff", "fixed_delay", "none"]
|
|
825
|
+
optional: true
|
|
826
|
+
timeout_policy:
|
|
827
|
+
type: string
|
|
828
|
+
enum: ["aggressive_5s", "moderate_30s", "lenient_60s", "custom"]
|
|
829
|
+
optional: true
|
|
830
|
+
bulkhead_isolation:
|
|
831
|
+
type: boolean
|
|
832
|
+
optional: true
|
|
833
|
+
|
|
834
|
+
# NEW: Agile Blueprint - Test-First Epic-Story-Task Hierarchy
|
|
835
|
+
agile_blueprint:
|
|
836
|
+
type: object
|
|
837
|
+
optional: true
|
|
838
|
+
description: "Test-first agile decomposition for contract-driven development"
|
|
839
|
+
properties:
|
|
840
|
+
epics:
|
|
841
|
+
type: array
|
|
842
|
+
description: "High-level system capabilities"
|
|
843
|
+
items:
|
|
844
|
+
type: object
|
|
845
|
+
required:
|
|
846
|
+
- id
|
|
847
|
+
- name
|
|
848
|
+
- stories
|
|
849
|
+
properties:
|
|
850
|
+
id:
|
|
851
|
+
type: string
|
|
852
|
+
pattern: "^EPIC-[0-9]+$"
|
|
853
|
+
description: "Epic identifier (e.g., EPIC-001)"
|
|
854
|
+
name:
|
|
855
|
+
type: string
|
|
856
|
+
description: "System capability (e.g., 'User Authentication & Authorization')"
|
|
857
|
+
description:
|
|
858
|
+
type: string
|
|
859
|
+
optional: true
|
|
860
|
+
description: "Technical overview of capability"
|
|
861
|
+
acceptance_criteria:
|
|
862
|
+
type: array
|
|
863
|
+
item_type: string
|
|
864
|
+
optional: true
|
|
865
|
+
description: "Technical acceptance criteria (not business value)"
|
|
866
|
+
stories:
|
|
867
|
+
type: array
|
|
868
|
+
description: "User journeys within this epic"
|
|
869
|
+
items:
|
|
870
|
+
type: object
|
|
871
|
+
required:
|
|
872
|
+
- id
|
|
873
|
+
- name
|
|
874
|
+
- interaction_boundary
|
|
875
|
+
properties:
|
|
876
|
+
id:
|
|
877
|
+
type: string
|
|
878
|
+
pattern: "^STORY-[0-9]+$"
|
|
879
|
+
description: "Story identifier (e.g., STORY-001)"
|
|
880
|
+
name:
|
|
881
|
+
type: string
|
|
882
|
+
description: "User journey (e.g., 'OAuth2 Social Login Flow')"
|
|
883
|
+
interaction_boundary:
|
|
884
|
+
type: object
|
|
885
|
+
required:
|
|
886
|
+
- service
|
|
887
|
+
- api_endpoint
|
|
888
|
+
- method
|
|
889
|
+
description: "Technical API contract"
|
|
890
|
+
properties:
|
|
891
|
+
service:
|
|
892
|
+
type: string
|
|
893
|
+
description: "Target service name"
|
|
894
|
+
api_endpoint:
|
|
895
|
+
type: string
|
|
896
|
+
description: "API path (e.g., /api/v1/auth/login)"
|
|
897
|
+
method:
|
|
898
|
+
type: string
|
|
899
|
+
enum: ["GET", "POST", "PUT", "PATCH", "DELETE", "WEBSOCKET"]
|
|
900
|
+
request_contract:
|
|
901
|
+
type: object
|
|
902
|
+
optional: true
|
|
903
|
+
description: "Request schema"
|
|
904
|
+
response_contract:
|
|
905
|
+
type: object
|
|
906
|
+
optional: true
|
|
907
|
+
description: "Response schema"
|
|
908
|
+
error_states:
|
|
909
|
+
type: array
|
|
910
|
+
optional: true
|
|
911
|
+
description: "Expected error responses (400, 401, 404, 500, etc.)"
|
|
912
|
+
technical_acceptance:
|
|
913
|
+
type: array
|
|
914
|
+
item_type: string
|
|
915
|
+
optional: true
|
|
916
|
+
description: "Technical validation criteria (not business goals)"
|
|
917
|
+
tasks:
|
|
918
|
+
type: array
|
|
919
|
+
description: "Granular implementation tasks"
|
|
920
|
+
items:
|
|
921
|
+
type: object
|
|
922
|
+
required:
|
|
923
|
+
- id
|
|
924
|
+
- description
|
|
925
|
+
- type
|
|
926
|
+
properties:
|
|
927
|
+
id:
|
|
928
|
+
type: string
|
|
929
|
+
pattern: "^TASK-[0-9]+$"
|
|
930
|
+
description:
|
|
931
|
+
type: string
|
|
932
|
+
description: "Technical task (e.g., 'Implement JWT rotation in Auth Service')"
|
|
933
|
+
type:
|
|
934
|
+
type: string
|
|
935
|
+
enum: ["test", "implementation", "infrastructure", "migration"]
|
|
936
|
+
linked_to:
|
|
937
|
+
type: object
|
|
938
|
+
optional: true
|
|
939
|
+
description: "Link to service/entity/infrastructure"
|
|
940
|
+
properties:
|
|
941
|
+
type:
|
|
942
|
+
type: string
|
|
943
|
+
enum: ["service", "entity", "infrastructure"]
|
|
944
|
+
name:
|
|
945
|
+
type: string
|
|
946
|
+
status:
|
|
947
|
+
type: string
|
|
948
|
+
enum: ["not_started", "in_progress", "complete", "blocked"]
|
|
949
|
+
default: "not_started"
|
|
950
|
+
test_coverage:
|
|
951
|
+
type: object
|
|
952
|
+
optional: true
|
|
953
|
+
description: "Test status for this task"
|
|
954
|
+
properties:
|
|
955
|
+
test_file:
|
|
956
|
+
type: string
|
|
957
|
+
standard_flows:
|
|
958
|
+
type: boolean
|
|
959
|
+
error_states:
|
|
960
|
+
type: boolean
|
|
961
|
+
edge_cases:
|
|
962
|
+
type: boolean
|
|
963
|
+
|
|
964
|
+
test_suite_status:
|
|
965
|
+
type: object
|
|
966
|
+
optional: true
|
|
967
|
+
description: "Overall test coverage tracking"
|
|
968
|
+
properties:
|
|
969
|
+
total_stories:
|
|
970
|
+
type: integer
|
|
971
|
+
tested_stories:
|
|
972
|
+
type: integer
|
|
973
|
+
coverage_percentage:
|
|
974
|
+
type: number
|
|
975
|
+
last_test_run:
|
|
976
|
+
type: string
|
|
977
|
+
description: "ISO timestamp"
|
|
978
|
+
|
|
979
|
+
exports:
|
|
980
|
+
type: object
|
|
981
|
+
optional: true
|
|
982
|
+
description: "Module exports (templates, utilities, schemas)"
|
|
983
|
+
properties:
|
|
984
|
+
templates:
|
|
985
|
+
type: array
|
|
986
|
+
item_type: string
|
|
987
|
+
optional: true
|
|
988
|
+
utilities:
|
|
989
|
+
type: array
|
|
990
|
+
item_type: string
|
|
991
|
+
optional: true
|
|
992
|
+
schemas:
|
|
993
|
+
type: array
|
|
994
|
+
item_type: string
|
|
995
|
+
optional: true
|