|
3 | 3 | */ |
4 | 4 |
|
5 | 5 | export const MODULES_ROOT = 'instructions-modules'; |
6 | | -export const MODULE_FILE_EXTENSION = '.md'; |
| 6 | +export const MODULE_FILE_EXTENSION = '.module.yml'; |
7 | 7 |
|
8 | 8 | // Default render order for directives |
9 | 9 | export const RENDER_ORDER = [ |
@@ -37,37 +37,48 @@ export const STANDARD_SHAPES = [ |
37 | 37 | 'pattern', |
38 | 38 | 'checklist', |
39 | 39 | 'data', |
40 | | - 'rule', |
| 40 | + 'procedural-specification', |
| 41 | + 'pattern-specification', |
| 42 | + 'playbook', |
41 | 43 | ] as const; |
42 | 44 | export type StandardShape = (typeof STANDARD_SHAPES)[number]; |
43 | 45 |
|
44 | | -// Module ID validation regex |
45 | | -export const ID_REGEX = /^[a-z0-9]+(?:\/[a-z0-9-]+)*$/; |
| 46 | +// Module ID validation regex (UMS v1.0 compliant) |
| 47 | +export const MODULE_ID_REGEX = |
| 48 | + /^(foundation|principle|technology|execution)\/(?:[a-z0-9-]+(?:\/[a-z0-9-]+)*\/[a-z0-9][a-z0-9-]*|[a-z0-9][a-z0-9-]*)$/; |
46 | 49 |
|
47 | | -// Standard shape directive specifications |
| 50 | +// Standard shape directive specifications (UMS v1.0 compliant) |
48 | 51 | export const STANDARD_SHAPE_SPECS = { |
49 | 52 | procedure: { |
50 | | - required: ['goal', 'process', 'constraints'] as string[], |
51 | | - optional: ['principles', 'criteria'] as string[], |
| 53 | + required: ['goal', 'process'] as string[], |
| 54 | + optional: ['examples', 'data'] as string[], |
52 | 55 | }, |
53 | 56 | specification: { |
54 | | - required: ['goal', 'principles'] as string[], |
55 | | - optional: ['constraints', 'criteria'] as string[], |
| 57 | + required: ['goal', 'constraints'] as string[], |
| 58 | + optional: ['examples', 'data'] as string[], |
56 | 59 | }, |
57 | 60 | pattern: { |
58 | 61 | required: ['goal', 'principles'] as string[], |
59 | | - optional: ['constraints', 'criteria'] as string[], |
| 62 | + optional: ['constraints', 'examples', 'data'] as string[], |
60 | 63 | }, |
61 | 64 | checklist: { |
62 | 65 | required: ['goal', 'criteria'] as string[], |
63 | | - optional: ['principles', 'constraints'] as string[], |
| 66 | + optional: ['examples', 'data'] as string[], |
64 | 67 | }, |
65 | 68 | data: { |
66 | 69 | required: ['goal', 'data'] as string[], |
67 | | - optional: ['principles'] as string[], |
| 70 | + optional: ['examples'] as string[], |
68 | 71 | }, |
69 | | - rule: { |
70 | | - required: ['goal', 'constraints'] as string[], |
71 | | - optional: ['principles'] as string[], |
| 72 | + 'procedural-specification': { |
| 73 | + required: ['goal', 'process', 'constraints'] as string[], |
| 74 | + optional: ['examples', 'data'] as string[], |
| 75 | + }, |
| 76 | + 'pattern-specification': { |
| 77 | + required: ['goal', 'principles', 'constraints'] as string[], |
| 78 | + optional: ['examples', 'data'] as string[], |
| 79 | + }, |
| 80 | + playbook: { |
| 81 | + required: ['goal', 'process', 'constraints', 'criteria'] as string[], |
| 82 | + optional: ['principles', 'examples', 'data'] as string[], |
72 | 83 | }, |
73 | 84 | }; |
0 commit comments