ripp-cli 1.0.1 → 1.2.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.
@@ -0,0 +1,543 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dylan-natter.github.io/ripp-protocol/schema/ripp-1.0.schema.json",
4
+ "title": "RIPP v1.0 Packet Schema",
5
+ "description": "JSON Schema for Regenerative Intent Prompting Protocol v1.0 packets",
6
+ "type": "object",
7
+ "required": [
8
+ "ripp_version",
9
+ "packet_id",
10
+ "title",
11
+ "created",
12
+ "updated",
13
+ "status",
14
+ "level",
15
+ "purpose",
16
+ "ux_flow",
17
+ "data_contracts"
18
+ ],
19
+ "properties": {
20
+ "ripp_version": {
21
+ "type": "string",
22
+ "const": "1.0",
23
+ "description": "RIPP specification version"
24
+ },
25
+ "packet_id": {
26
+ "type": "string",
27
+ "pattern": "^[a-z0-9-]+$",
28
+ "description": "Unique identifier for this packet (kebab-case)"
29
+ },
30
+ "title": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "Human-readable feature title"
34
+ },
35
+ "created": {
36
+ "type": "string",
37
+ "format": "date",
38
+ "description": "ISO 8601 date when packet was created"
39
+ },
40
+ "updated": {
41
+ "type": "string",
42
+ "format": "date",
43
+ "description": "ISO 8601 date of last update"
44
+ },
45
+ "status": {
46
+ "type": "string",
47
+ "enum": ["draft", "approved", "implemented", "deprecated"],
48
+ "description": "Lifecycle stage of the feature"
49
+ },
50
+ "level": {
51
+ "type": "integer",
52
+ "minimum": 1,
53
+ "maximum": 3,
54
+ "description": "RIPP conformance level"
55
+ },
56
+ "version": {
57
+ "type": "string",
58
+ "description": "Optional packet version (semver recommended)"
59
+ },
60
+ "purpose": {
61
+ "type": "object",
62
+ "required": ["problem", "solution", "value"],
63
+ "properties": {
64
+ "problem": {
65
+ "type": "string",
66
+ "minLength": 1,
67
+ "description": "Clear statement of the problem being solved"
68
+ },
69
+ "solution": {
70
+ "type": "string",
71
+ "minLength": 1,
72
+ "description": "High-level approach to solving it"
73
+ },
74
+ "value": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "description": "Business or user value delivered"
78
+ },
79
+ "out_of_scope": {
80
+ "type": "string",
81
+ "description": "What this feature explicitly does NOT do"
82
+ },
83
+ "assumptions": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string"
87
+ },
88
+ "description": "Known assumptions or constraints"
89
+ },
90
+ "references": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "properties": {
95
+ "title": { "type": "string" },
96
+ "url": { "type": "string", "format": "uri" }
97
+ },
98
+ "required": ["title", "url"]
99
+ },
100
+ "description": "Links to related docs, issues, or designs"
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ },
105
+ "ux_flow": {
106
+ "type": "array",
107
+ "minItems": 1,
108
+ "items": {
109
+ "type": "object",
110
+ "required": ["step", "actor", "action"],
111
+ "properties": {
112
+ "step": {
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "description": "Numeric order"
116
+ },
117
+ "actor": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "description": "Who or what performs the action"
121
+ },
122
+ "action": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "description": "What happens in this step"
126
+ },
127
+ "trigger": {
128
+ "type": "string",
129
+ "description": "What initiates this step"
130
+ },
131
+ "result": {
132
+ "type": "string",
133
+ "description": "What the user sees or receives"
134
+ },
135
+ "condition": {
136
+ "type": "string",
137
+ "description": "Conditional logic for this step"
138
+ }
139
+ },
140
+ "anyOf": [
141
+ { "required": ["trigger"] },
142
+ { "required": ["result"] },
143
+ { "required": ["condition"] }
144
+ ],
145
+ "additionalProperties": false
146
+ },
147
+ "description": "User or system interaction flow"
148
+ },
149
+ "data_contracts": {
150
+ "type": "object",
151
+ "anyOf": [{ "required": ["inputs"] }, { "required": ["outputs"] }],
152
+ "properties": {
153
+ "inputs": {
154
+ "type": "array",
155
+ "items": {
156
+ "$ref": "#/definitions/entity"
157
+ },
158
+ "description": "Data structures consumed by the feature"
159
+ },
160
+ "outputs": {
161
+ "type": "array",
162
+ "items": {
163
+ "$ref": "#/definitions/entity"
164
+ },
165
+ "description": "Data structures produced by the feature"
166
+ }
167
+ },
168
+ "additionalProperties": false
169
+ },
170
+ "api_contracts": {
171
+ "type": "array",
172
+ "minItems": 1,
173
+ "items": {
174
+ "type": "object",
175
+ "required": ["endpoint", "method", "purpose", "response"],
176
+ "properties": {
177
+ "endpoint": {
178
+ "type": "string",
179
+ "minLength": 1,
180
+ "description": "URL path or RPC method name"
181
+ },
182
+ "method": {
183
+ "type": "string",
184
+ "enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"],
185
+ "description": "HTTP method or protocol operation"
186
+ },
187
+ "purpose": {
188
+ "type": "string",
189
+ "minLength": 1,
190
+ "description": "What this endpoint does"
191
+ },
192
+ "request": {
193
+ "type": "object",
194
+ "properties": {
195
+ "content_type": { "type": "string" },
196
+ "schema_ref": { "type": "string" },
197
+ "parameters": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "object",
201
+ "properties": {
202
+ "name": { "type": "string" },
203
+ "in": { "type": "string", "enum": ["path", "query", "header", "cookie"] },
204
+ "required": { "type": "boolean" },
205
+ "type": { "type": "string" },
206
+ "description": { "type": "string" }
207
+ },
208
+ "required": ["name", "in", "required", "type"]
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "response": {
214
+ "type": "object",
215
+ "required": ["success", "errors"],
216
+ "properties": {
217
+ "success": {
218
+ "type": "object",
219
+ "required": ["status"],
220
+ "properties": {
221
+ "status": { "type": "integer", "minimum": 200, "maximum": 299 },
222
+ "schema_ref": { "type": "string" },
223
+ "content_type": { "type": "string" }
224
+ }
225
+ },
226
+ "errors": {
227
+ "type": "array",
228
+ "minItems": 1,
229
+ "items": {
230
+ "type": "object",
231
+ "required": ["status", "description"],
232
+ "properties": {
233
+ "status": { "type": "integer", "minimum": 400, "maximum": 599 },
234
+ "description": { "type": "string" }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "additionalProperties": false
242
+ },
243
+ "description": "API endpoints or service interfaces"
244
+ },
245
+ "permissions": {
246
+ "type": "array",
247
+ "minItems": 1,
248
+ "items": {
249
+ "type": "object",
250
+ "required": ["action", "required_roles", "description"],
251
+ "properties": {
252
+ "action": {
253
+ "type": "string",
254
+ "minLength": 1,
255
+ "description": "The permission being checked"
256
+ },
257
+ "required_roles": {
258
+ "type": "array",
259
+ "minItems": 1,
260
+ "items": {
261
+ "type": "string"
262
+ },
263
+ "description": "Roles that can perform this action"
264
+ },
265
+ "resource_scope": {
266
+ "type": "string",
267
+ "description": "Scope of the resource"
268
+ },
269
+ "description": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "description": "When and why this permission is checked"
273
+ }
274
+ },
275
+ "additionalProperties": false
276
+ },
277
+ "description": "Permission requirements for the feature"
278
+ },
279
+ "failure_modes": {
280
+ "type": "array",
281
+ "minItems": 1,
282
+ "items": {
283
+ "type": "object",
284
+ "required": ["scenario", "impact", "handling", "user_message"],
285
+ "properties": {
286
+ "scenario": {
287
+ "type": "string",
288
+ "minLength": 1,
289
+ "description": "What goes wrong"
290
+ },
291
+ "impact": {
292
+ "type": "string",
293
+ "minLength": 1,
294
+ "description": "Effect on users or system"
295
+ },
296
+ "handling": {
297
+ "type": "string",
298
+ "minLength": 1,
299
+ "description": "How the system responds"
300
+ },
301
+ "user_message": {
302
+ "type": "string",
303
+ "minLength": 1,
304
+ "description": "What users see or are told"
305
+ }
306
+ },
307
+ "additionalProperties": false
308
+ },
309
+ "description": "What can go wrong and how to handle it"
310
+ },
311
+ "audit_events": {
312
+ "type": "array",
313
+ "minItems": 1,
314
+ "items": {
315
+ "type": "object",
316
+ "required": ["event", "severity", "includes", "purpose"],
317
+ "properties": {
318
+ "event": {
319
+ "type": "string",
320
+ "minLength": 1,
321
+ "description": "Event name"
322
+ },
323
+ "severity": {
324
+ "type": "string",
325
+ "enum": ["debug", "info", "warn", "error", "critical"],
326
+ "description": "Log level"
327
+ },
328
+ "includes": {
329
+ "type": "array",
330
+ "minItems": 1,
331
+ "items": {
332
+ "type": "string"
333
+ },
334
+ "description": "Data fields captured in the event"
335
+ },
336
+ "retention": {
337
+ "type": "string",
338
+ "description": "How long to keep this event"
339
+ },
340
+ "purpose": {
341
+ "type": "string",
342
+ "minLength": 1,
343
+ "description": "Why this event is logged"
344
+ }
345
+ },
346
+ "additionalProperties": false
347
+ },
348
+ "description": "Events that must be logged"
349
+ },
350
+ "nfrs": {
351
+ "type": "object",
352
+ "minProperties": 1,
353
+ "properties": {
354
+ "performance": {
355
+ "type": "object",
356
+ "properties": {
357
+ "response_time_p50": { "type": "string" },
358
+ "response_time_p95": { "type": "string" },
359
+ "response_time_p99": { "type": "string" },
360
+ "throughput": { "type": "string" }
361
+ }
362
+ },
363
+ "scalability": {
364
+ "type": "object",
365
+ "properties": {
366
+ "max_concurrent_users": { "type": "integer" },
367
+ "data_growth": { "type": "string" },
368
+ "horizontal_scaling": { "type": "boolean" }
369
+ }
370
+ },
371
+ "availability": {
372
+ "type": "object",
373
+ "properties": {
374
+ "uptime_target": { "type": "string" },
375
+ "rpo": { "type": "string" },
376
+ "rto": { "type": "string" }
377
+ }
378
+ },
379
+ "security": {
380
+ "type": "object",
381
+ "properties": {
382
+ "encryption_at_rest": { "type": "boolean" },
383
+ "encryption_in_transit": { "type": "boolean" },
384
+ "authentication_required": { "type": "boolean" },
385
+ "authorization_model": { "type": "string" }
386
+ }
387
+ },
388
+ "compliance": {
389
+ "type": "object",
390
+ "properties": {
391
+ "standards": {
392
+ "type": "array",
393
+ "items": { "type": "string" }
394
+ },
395
+ "data_residency": { "type": "string" },
396
+ "audit_requirements": { "type": "string" }
397
+ }
398
+ }
399
+ },
400
+ "additionalProperties": true,
401
+ "description": "Non-functional requirements"
402
+ },
403
+ "acceptance_tests": {
404
+ "type": "array",
405
+ "minItems": 1,
406
+ "items": {
407
+ "type": "object",
408
+ "required": ["test_id", "title", "given", "when", "then", "verification"],
409
+ "properties": {
410
+ "test_id": {
411
+ "type": "string",
412
+ "minLength": 1,
413
+ "description": "Unique test identifier"
414
+ },
415
+ "title": {
416
+ "type": "string",
417
+ "minLength": 1,
418
+ "description": "What is being tested"
419
+ },
420
+ "given": {
421
+ "type": "string",
422
+ "minLength": 1,
423
+ "description": "Preconditions"
424
+ },
425
+ "when": {
426
+ "type": "string",
427
+ "minLength": 1,
428
+ "description": "Action taken"
429
+ },
430
+ "then": {
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "description": "Expected outcome"
434
+ },
435
+ "verification": {
436
+ "type": "array",
437
+ "minItems": 1,
438
+ "items": {
439
+ "type": "string"
440
+ },
441
+ "description": "Specific checks to perform"
442
+ }
443
+ },
444
+ "additionalProperties": false
445
+ },
446
+ "description": "How to verify the feature works correctly"
447
+ }
448
+ },
449
+ "allOf": [
450
+ {
451
+ "if": {
452
+ "properties": { "level": { "const": 2 } }
453
+ },
454
+ "then": {
455
+ "required": ["api_contracts", "permissions", "failure_modes"]
456
+ }
457
+ },
458
+ {
459
+ "if": {
460
+ "properties": { "level": { "const": 3 } }
461
+ },
462
+ "then": {
463
+ "required": [
464
+ "api_contracts",
465
+ "permissions",
466
+ "failure_modes",
467
+ "audit_events",
468
+ "nfrs",
469
+ "acceptance_tests"
470
+ ]
471
+ }
472
+ }
473
+ ],
474
+ "additionalProperties": true,
475
+ "definitions": {
476
+ "entity": {
477
+ "type": "object",
478
+ "required": ["name", "fields"],
479
+ "properties": {
480
+ "name": {
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "description": "Entity name"
484
+ },
485
+ "description": {
486
+ "type": "string",
487
+ "description": "What this entity represents"
488
+ },
489
+ "fields": {
490
+ "type": "array",
491
+ "minItems": 1,
492
+ "items": {
493
+ "type": "object",
494
+ "required": ["name", "type", "required", "description"],
495
+ "properties": {
496
+ "name": {
497
+ "type": "string",
498
+ "minLength": 1,
499
+ "description": "Field name"
500
+ },
501
+ "type": {
502
+ "type": "string",
503
+ "enum": ["string", "number", "integer", "boolean", "object", "array", "null"],
504
+ "description": "Field data type"
505
+ },
506
+ "required": {
507
+ "type": "boolean",
508
+ "description": "Whether this field is required"
509
+ },
510
+ "description": {
511
+ "type": "string",
512
+ "minLength": 1,
513
+ "description": "What this field represents"
514
+ },
515
+ "format": {
516
+ "type": "string",
517
+ "description": "Format hint (e.g., email, uuid, date-time)"
518
+ },
519
+ "min": {
520
+ "type": "number",
521
+ "description": "Minimum value or length"
522
+ },
523
+ "max": {
524
+ "type": "number",
525
+ "description": "Maximum value or length"
526
+ },
527
+ "pattern": {
528
+ "type": "string",
529
+ "description": "Regex pattern for validation"
530
+ },
531
+ "enum": {
532
+ "type": "array",
533
+ "description": "Allowed values"
534
+ }
535
+ },
536
+ "additionalProperties": false
537
+ }
538
+ }
539
+ },
540
+ "additionalProperties": false
541
+ }
542
+ }
543
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://dylan-natter.github.io/ripp-protocol/schema/ripp-config.schema.json",
4
+ "title": "RIPP Configuration Schema",
5
+ "description": "Configuration schema for RIPP vNext Intent Discovery Mode",
6
+ "type": "object",
7
+ "required": ["rippVersion"],
8
+ "properties": {
9
+ "rippVersion": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+$",
12
+ "description": "RIPP specification version (e.g., '1.0')"
13
+ },
14
+ "ai": {
15
+ "type": "object",
16
+ "properties": {
17
+ "enabled": {
18
+ "type": "boolean",
19
+ "default": false,
20
+ "description": "Master switch for AI features (disabled by default)"
21
+ },
22
+ "provider": {
23
+ "type": "string",
24
+ "enum": ["openai", "azure-openai", "ollama", "custom"],
25
+ "default": "openai",
26
+ "description": "AI provider to use for intent inference"
27
+ },
28
+ "model": {
29
+ "type": "string",
30
+ "description": "Model identifier (e.g., 'gpt-4', 'gpt-3.5-turbo')"
31
+ },
32
+ "maxRetries": {
33
+ "type": "integer",
34
+ "minimum": 1,
35
+ "maximum": 10,
36
+ "default": 3,
37
+ "description": "Maximum retries for AI inference with schema validation"
38
+ },
39
+ "timeout": {
40
+ "type": "integer",
41
+ "minimum": 1000,
42
+ "description": "Request timeout in milliseconds"
43
+ },
44
+ "customEndpoint": {
45
+ "type": "string",
46
+ "format": "uri",
47
+ "description": "Custom API endpoint (for custom provider)"
48
+ }
49
+ },
50
+ "required": ["enabled"]
51
+ },
52
+ "evidencePack": {
53
+ "type": "object",
54
+ "properties": {
55
+ "includeGlobs": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ },
60
+ "default": ["src/**", "app/**", "api/**", "db/**", ".github/workflows/**"],
61
+ "description": "Glob patterns for files to include in evidence"
62
+ },
63
+ "excludeGlobs": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ },
68
+ "default": ["**/node_modules/**", "**/dist/**", "**/build/**", "**/*.lock", "**/.git/**"],
69
+ "description": "Glob patterns for files to exclude from evidence"
70
+ },
71
+ "maxFileSize": {
72
+ "type": "integer",
73
+ "minimum": 1024,
74
+ "default": 1048576,
75
+ "description": "Maximum file size in bytes (default: 1MB)"
76
+ },
77
+ "secretPatterns": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string"
81
+ },
82
+ "description": "Custom regex patterns for secret detection"
83
+ }
84
+ }
85
+ },
86
+ "discovery": {
87
+ "type": "object",
88
+ "properties": {
89
+ "minConfidence": {
90
+ "type": "number",
91
+ "minimum": 0,
92
+ "maximum": 1,
93
+ "default": 0.5,
94
+ "description": "Minimum confidence threshold for AI-inferred intent"
95
+ },
96
+ "includeEvidence": {
97
+ "type": "boolean",
98
+ "default": true,
99
+ "description": "Include evidence references in candidate intent"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }