@contractspec/module.workspace 1.44.1 → 1.45.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.
Files changed (63) hide show
  1. package/dist/ai/{code-generation.d.ts → prompts/code-generation.d.ts} +6 -10
  2. package/dist/ai/prompts/code-generation.d.ts.map +1 -0
  3. package/dist/ai/{code-generation.js → prompts/code-generation.js} +6 -10
  4. package/dist/ai/prompts/code-generation.js.map +1 -0
  5. package/dist/ai/{spec-creation.d.ts → prompts/spec-creation.d.ts} +8 -7
  6. package/dist/ai/prompts/spec-creation.d.ts.map +1 -0
  7. package/dist/ai/{spec-creation.js → prompts/spec-creation.js} +6 -6
  8. package/dist/ai/prompts/spec-creation.js.map +1 -0
  9. package/dist/analysis/example-scan.d.ts +15 -0
  10. package/dist/analysis/example-scan.d.ts.map +1 -0
  11. package/dist/analysis/example-scan.js +151 -0
  12. package/dist/analysis/example-scan.js.map +1 -0
  13. package/dist/analysis/feature-scan.js +17 -12
  14. package/dist/analysis/feature-scan.js.map +1 -1
  15. package/dist/analysis/impact/classifier.js +1 -1
  16. package/dist/analysis/impact/classifier.js.map +1 -1
  17. package/dist/analysis/impact/types.d.ts +3 -3
  18. package/dist/analysis/index.js +2 -0
  19. package/dist/analysis/snapshot/normalizer.d.ts +1 -1
  20. package/dist/analysis/snapshot/normalizer.d.ts.map +1 -1
  21. package/dist/analysis/snapshot/normalizer.js +2 -1
  22. package/dist/analysis/snapshot/normalizer.js.map +1 -1
  23. package/dist/analysis/snapshot/snapshot.js +1 -1
  24. package/dist/analysis/snapshot/snapshot.js.map +1 -1
  25. package/dist/analysis/snapshot/types.d.ts +7 -13
  26. package/dist/analysis/snapshot/types.d.ts.map +1 -1
  27. package/dist/analysis/spec-parser.d.ts +11 -0
  28. package/dist/analysis/spec-parser.d.ts.map +1 -0
  29. package/dist/analysis/spec-parser.js +89 -0
  30. package/dist/analysis/spec-parser.js.map +1 -0
  31. package/dist/analysis/spec-scan.d.ts.map +1 -1
  32. package/dist/analysis/spec-scan.js +50 -26
  33. package/dist/analysis/spec-scan.js.map +1 -1
  34. package/dist/formatter.js +5 -5
  35. package/dist/formatter.js.map +1 -1
  36. package/dist/formatters/spec-markdown.d.ts +28 -0
  37. package/dist/formatters/spec-markdown.d.ts.map +1 -0
  38. package/dist/formatters/spec-markdown.js +255 -0
  39. package/dist/formatters/spec-markdown.js.map +1 -0
  40. package/dist/formatters/spec-to-docblock.d.ts +12 -0
  41. package/dist/formatters/spec-to-docblock.d.ts.map +1 -0
  42. package/dist/formatters/spec-to-docblock.js +48 -0
  43. package/dist/formatters/spec-to-docblock.js.map +1 -0
  44. package/dist/index.d.ts +10 -5
  45. package/dist/index.js +7 -3
  46. package/dist/templates/app-config.js +1 -1
  47. package/dist/templates/app-config.js.map +1 -1
  48. package/dist/templates/data-view.js +3 -3
  49. package/dist/templates/data-view.js.map +1 -1
  50. package/dist/types/analysis-types.d.ts +56 -4
  51. package/dist/types/analysis-types.d.ts.map +1 -1
  52. package/dist/types/generation-types.d.ts +2 -1
  53. package/dist/types/generation-types.d.ts.map +1 -1
  54. package/dist/types/generation-types.js.map +1 -1
  55. package/dist/types/llm-types.d.ts +138 -0
  56. package/dist/types/llm-types.d.ts.map +1 -0
  57. package/dist/types/spec-types.d.ts +24 -26
  58. package/dist/types/spec-types.d.ts.map +1 -1
  59. package/package.json +6 -5
  60. package/dist/ai/code-generation.d.ts.map +0 -1
  61. package/dist/ai/code-generation.js.map +0 -1
  62. package/dist/ai/spec-creation.d.ts.map +0 -1
  63. package/dist/ai/spec-creation.js.map +0 -1
@@ -34,7 +34,7 @@ export const ${viewVarName}: DataViewSpec = {
34
34
  },
35
35
  ${itemOperation}
36
36
  refreshEvents: [
37
- // { name: 'entity.updated', version: 1 },
37
+ // { name: 'entity.updated', version: '1.0.0' },
38
38
  ],
39
39
  },
40
40
  view: {
@@ -54,8 +54,8 @@ ${fields}
54
54
  ],
55
55
  },
56
56
  states: {
57
- // empty: { name: 'app.data.empty', version: 1 },
58
- // error: { name: 'app.data.error', version: 1 },
57
+ // empty: { name: 'app.data.empty', version: '1.0.0' },
58
+ // error: { name: 'app.data.error', version: '1.0.0' },
59
59
  },
60
60
  };
61
61
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"data-view.js","names":[],"sources":["../../src/templates/data-view.ts"],"sourcesContent":["import type { DataViewSpecData } from '../types/spec-types';\nimport { toPascalCase, escapeString } from './utils';\n\nexport function generateDataViewSpec(data: DataViewSpecData): string {\n const viewVarName =\n toPascalCase(data.name.split('.').pop() ?? 'DataView') + 'DataView';\n\n const fields = data.fields\n .map(\n (field) => ` {\n key: '${escapeString(field.key)}',\n label: '${escape(field.label)}',\n dataPath: '${escapeString(field.dataPath)}',\n ${field.format ? `format: '${escapeString(field.format)}',` : ''}\n ${field.sortable ? 'sortable: true,' : ''}\n ${field.filterable ? 'filterable: true,' : ''}\n }`\n )\n .join(',\\n');\n\n const secondaryFields = data.secondaryFields?.length\n ? `secondaryFields: [${data.secondaryFields\n .map((key) => `'${escapeString(key)}'`)\n .join(', ')}],`\n : '';\n\n const itemOperation = data.itemOperation\n ? `item: { name: '${escapeString(data.itemOperation.name)}', version: ${data.itemOperation.version} },`\n : '';\n\n return `import type { DataViewSpec } from '@contractspec/lib.contracts/data-views';\n\nexport const ${viewVarName}: DataViewSpec = {\n meta: {\n key: '${escapeString(data.name)}',\n version: ${data.version},\n entity: '${escapeString(data.entity)}',\n title: '${escape(data.title)}',\n description: '${escape(\n data.description || 'Describe the purpose of this data view.'\n )}',\n domain: '${escape(data.domain || data.entity)}',\n owners: [${data.owners.map((owner) => `'${escapeString(owner)}'`).join(', ')}],\n tags: [${data.tags.map((tag) => `'${escapeString(tag)}'`).join(', ')}],\n stability: '${data.stability}',\n },\n source: {\n primary: {\n name: '${escapeString(data.primaryOperation.name)}',\n version: ${data.primaryOperation.version},\n },\n ${itemOperation}\n refreshEvents: [\n // { name: 'entity.updated', version: 1 },\n ],\n },\n view: {\n kind: '${data.kind}',\n fields: [\n${fields}\n ],\n ${data.primaryField ? `primaryField: '${escapeString(data.primaryField)}',` : ''}\n ${secondaryFields}\n filters: [\n // Example filter:\n // { key: 'search', label: 'Search', field: 'fullName', type: 'search' },\n ],\n actions: [\n // Example action:\n // { key: 'open', label: 'Open', kind: 'navigation' },\n ],\n },\n states: {\n // empty: { name: 'app.data.empty', version: 1 },\n // error: { name: 'app.data.error', version: 1 },\n },\n};\n`;\n}\n\nfunction escape(value: string): string {\n return value.replace(/'/g, \"\\\\'\");\n}\n"],"mappings":";;;AAGA,SAAgB,qBAAqB,MAAgC;CACnE,MAAM,cACJ,aAAa,KAAK,KAAK,MAAM,IAAI,CAAC,KAAK,IAAI,WAAW,GAAG;CAE3D,MAAM,SAAS,KAAK,OACjB,KACE,UAAU;gBACD,aAAa,MAAM,IAAI,CAAC;kBACtB,OAAO,MAAM,MAAM,CAAC;qBACjB,aAAa,MAAM,SAAS,CAAC;UACxC,MAAM,SAAS,YAAY,aAAa,MAAM,OAAO,CAAC,MAAM,GAAG;UAC/D,MAAM,WAAW,oBAAoB,GAAG;UACxC,MAAM,aAAa,sBAAsB,GAAG;SAEjD,CACA,KAAK,MAAM;CAEd,MAAM,kBAAkB,KAAK,iBAAiB,SAC1C,qBAAqB,KAAK,gBACvB,KAAK,QAAQ,IAAI,aAAa,IAAI,CAAC,GAAG,CACtC,KAAK,KAAK,CAAC,MACd;CAEJ,MAAM,gBAAgB,KAAK,gBACvB,kBAAkB,aAAa,KAAK,cAAc,KAAK,CAAC,cAAc,KAAK,cAAc,QAAQ,OACjG;AAEJ,QAAO;;eAEM,YAAY;;YAEf,aAAa,KAAK,KAAK,CAAC;eACrB,KAAK,QAAQ;eACb,aAAa,KAAK,OAAO,CAAC;cAC3B,OAAO,KAAK,MAAM,CAAC;oBACb,OACd,KAAK,eAAe,0CACrB,CAAC;eACS,OAAO,KAAK,UAAU,KAAK,OAAO,CAAC;eACnC,KAAK,OAAO,KAAK,UAAU,IAAI,aAAa,MAAM,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;aACpE,KAAK,KAAK,KAAK,QAAQ,IAAI,aAAa,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;kBACvD,KAAK,UAAU;;;;eAIlB,aAAa,KAAK,iBAAiB,KAAK,CAAC;iBACvC,KAAK,iBAAiB,QAAQ;;MAEzC,cAAc;;;;;;aAMP,KAAK,KAAK;;EAErB,OAAO;;MAEH,KAAK,eAAe,kBAAkB,aAAa,KAAK,aAAa,CAAC,MAAM,GAAG;MAC/E,gBAAgB;;;;;;;;;;;;;;;;;AAkBtB,SAAS,OAAO,OAAuB;AACrC,QAAO,MAAM,QAAQ,MAAM,MAAM"}
1
+ {"version":3,"file":"data-view.js","names":[],"sources":["../../src/templates/data-view.ts"],"sourcesContent":["import type { DataViewSpecData } from '../types/spec-types';\nimport { toPascalCase, escapeString } from './utils';\n\nexport function generateDataViewSpec(data: DataViewSpecData): string {\n const viewVarName =\n toPascalCase(data.name.split('.').pop() ?? 'DataView') + 'DataView';\n\n const fields = data.fields\n .map(\n (field) => ` {\n key: '${escapeString(field.key)}',\n label: '${escape(field.label)}',\n dataPath: '${escapeString(field.dataPath)}',\n ${field.format ? `format: '${escapeString(field.format)}',` : ''}\n ${field.sortable ? 'sortable: true,' : ''}\n ${field.filterable ? 'filterable: true,' : ''}\n }`\n )\n .join(',\\n');\n\n const secondaryFields = data.secondaryFields?.length\n ? `secondaryFields: [${data.secondaryFields\n .map((key) => `'${escapeString(key)}'`)\n .join(', ')}],`\n : '';\n\n const itemOperation = data.itemOperation\n ? `item: { name: '${escapeString(data.itemOperation.name)}', version: ${data.itemOperation.version} },`\n : '';\n\n return `import type { DataViewSpec } from '@contractspec/lib.contracts/data-views';\n\nexport const ${viewVarName}: DataViewSpec = {\n meta: {\n key: '${escapeString(data.name)}',\n version: ${data.version},\n entity: '${escapeString(data.entity)}',\n title: '${escape(data.title)}',\n description: '${escape(\n data.description || 'Describe the purpose of this data view.'\n )}',\n domain: '${escape(data.domain || data.entity)}',\n owners: [${data.owners.map((owner) => `'${escapeString(owner)}'`).join(', ')}],\n tags: [${data.tags.map((tag) => `'${escapeString(tag)}'`).join(', ')}],\n stability: '${data.stability}',\n },\n source: {\n primary: {\n name: '${escapeString(data.primaryOperation.name)}',\n version: ${data.primaryOperation.version},\n },\n ${itemOperation}\n refreshEvents: [\n // { name: 'entity.updated', version: '1.0.0' },\n ],\n },\n view: {\n kind: '${data.kind}',\n fields: [\n${fields}\n ],\n ${data.primaryField ? `primaryField: '${escapeString(data.primaryField)}',` : ''}\n ${secondaryFields}\n filters: [\n // Example filter:\n // { key: 'search', label: 'Search', field: 'fullName', type: 'search' },\n ],\n actions: [\n // Example action:\n // { key: 'open', label: 'Open', kind: 'navigation' },\n ],\n },\n states: {\n // empty: { name: 'app.data.empty', version: '1.0.0' },\n // error: { name: 'app.data.error', version: '1.0.0' },\n },\n};\n`;\n}\n\nfunction escape(value: string): string {\n return value.replace(/'/g, \"\\\\'\");\n}\n"],"mappings":";;;AAGA,SAAgB,qBAAqB,MAAgC;CACnE,MAAM,cACJ,aAAa,KAAK,KAAK,MAAM,IAAI,CAAC,KAAK,IAAI,WAAW,GAAG;CAE3D,MAAM,SAAS,KAAK,OACjB,KACE,UAAU;gBACD,aAAa,MAAM,IAAI,CAAC;kBACtB,OAAO,MAAM,MAAM,CAAC;qBACjB,aAAa,MAAM,SAAS,CAAC;UACxC,MAAM,SAAS,YAAY,aAAa,MAAM,OAAO,CAAC,MAAM,GAAG;UAC/D,MAAM,WAAW,oBAAoB,GAAG;UACxC,MAAM,aAAa,sBAAsB,GAAG;SAEjD,CACA,KAAK,MAAM;CAEd,MAAM,kBAAkB,KAAK,iBAAiB,SAC1C,qBAAqB,KAAK,gBACvB,KAAK,QAAQ,IAAI,aAAa,IAAI,CAAC,GAAG,CACtC,KAAK,KAAK,CAAC,MACd;CAEJ,MAAM,gBAAgB,KAAK,gBACvB,kBAAkB,aAAa,KAAK,cAAc,KAAK,CAAC,cAAc,KAAK,cAAc,QAAQ,OACjG;AAEJ,QAAO;;eAEM,YAAY;;YAEf,aAAa,KAAK,KAAK,CAAC;eACrB,KAAK,QAAQ;eACb,aAAa,KAAK,OAAO,CAAC;cAC3B,OAAO,KAAK,MAAM,CAAC;oBACb,OACd,KAAK,eAAe,0CACrB,CAAC;eACS,OAAO,KAAK,UAAU,KAAK,OAAO,CAAC;eACnC,KAAK,OAAO,KAAK,UAAU,IAAI,aAAa,MAAM,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;aACpE,KAAK,KAAK,KAAK,QAAQ,IAAI,aAAa,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;kBACvD,KAAK,UAAU;;;;eAIlB,aAAa,KAAK,iBAAiB,KAAK,CAAC;iBACvC,KAAK,iBAAiB,QAAQ;;MAEzC,cAAc;;;;;;aAMP,KAAK,KAAK;;EAErB,OAAO;;MAEH,KAAK,eAAe,kBAAkB,aAAa,KAAK,aAAa,CAAC,MAAM,GAAG;MAC/E,gBAAgB;;;;;;;;;;;;;;;;;AAkBtB,SAAS,OAAO,OAAuB;AACrC,QAAO,MAAM,QAAQ,MAAM,MAAM"}
@@ -20,7 +20,7 @@ type AnalyzedOperationKind = 'command' | 'query' | 'unknown';
20
20
  */
21
21
  interface RefInfo {
22
22
  key: string;
23
- version: number;
23
+ version: string;
24
24
  }
25
25
  /**
26
26
  * A reference extracted from source code with location context.
@@ -28,7 +28,7 @@ interface RefInfo {
28
28
  interface ExtractedRef {
29
29
  type: RefType;
30
30
  key: string;
31
- version: number;
31
+ version: string;
32
32
  sourceFile: string;
33
33
  sourceLine?: number;
34
34
  }
@@ -39,10 +39,12 @@ interface SpecScanResult {
39
39
  filePath: string;
40
40
  specType: AnalyzedSpecType;
41
41
  key?: string;
42
- version?: number;
42
+ version?: string;
43
43
  kind?: AnalyzedOperationKind;
44
44
  stability?: Stability;
45
45
  description?: string;
46
+ goal?: string;
47
+ context?: string;
46
48
  owners?: string[];
47
49
  tags?: string[];
48
50
  hasMeta: boolean;
@@ -54,6 +56,7 @@ interface SpecScanResult {
54
56
  emittedEvents?: RefInfo[];
55
57
  policyRefs?: RefInfo[];
56
58
  testRefs?: RefInfo[];
59
+ sourceBlock?: string;
57
60
  }
58
61
  /**
59
62
  * Result of scanning a feature file.
@@ -63,6 +66,8 @@ interface FeatureScanResult {
63
66
  key: string;
64
67
  title?: string;
65
68
  description?: string;
69
+ goal?: string;
70
+ context?: string;
66
71
  domain?: string;
67
72
  stability?: Stability;
68
73
  owners?: string[];
@@ -79,6 +84,53 @@ interface FeatureScanResult {
79
84
  op: RefInfo;
80
85
  pres: RefInfo;
81
86
  }[];
87
+ sourceBlock?: string;
88
+ }
89
+ /**
90
+ * Result of scanning an example file.
91
+ */
92
+ interface ExampleScanResult {
93
+ filePath: string;
94
+ key: string;
95
+ version?: string;
96
+ title?: string;
97
+ description?: string;
98
+ summary?: string;
99
+ kind?: string;
100
+ visibility?: string;
101
+ stability?: Stability;
102
+ owners?: string[];
103
+ tags?: string[];
104
+ domain?: string;
105
+ docs?: {
106
+ rootDocId?: string;
107
+ goalDocId?: string;
108
+ usageDocId?: string;
109
+ };
110
+ surfaces: {
111
+ templates: boolean;
112
+ sandbox: {
113
+ enabled: boolean;
114
+ modes: string[];
115
+ };
116
+ studio: {
117
+ enabled: boolean;
118
+ installable: boolean;
119
+ };
120
+ mcp: {
121
+ enabled: boolean;
122
+ };
123
+ };
124
+ entrypoints: {
125
+ packageName: string;
126
+ feature?: string;
127
+ blueprint?: string;
128
+ contracts?: string;
129
+ presentations?: string;
130
+ handlers?: string;
131
+ ui?: string;
132
+ docs?: string;
133
+ };
82
134
  }
83
135
  /**
84
136
  * Semantic diff item types.
@@ -122,5 +174,5 @@ interface ValidationResult {
122
174
  warnings: string[];
123
175
  }
124
176
  //#endregion
125
- export { AnalyzedOperationKind, AnalyzedSpecType, ContractGraph, ContractNode, ExtractedRef, FeatureScanResult, RefInfo, RefType, SemanticDiffItem, SemanticDiffOptions, SemanticDiffType, SpecScanResult, ValidationResult };
177
+ export { AnalyzedOperationKind, AnalyzedSpecType, ContractGraph, ContractNode, ExampleScanResult, ExtractedRef, FeatureScanResult, RefInfo, RefType, SemanticDiffItem, SemanticDiffOptions, SemanticDiffType, SpecScanResult, ValidationResult };
126
178
  //# sourceMappingURL=analysis-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analysis-types.d.ts","names":[],"sources":["../../src/types/analysis-types.ts"],"sourcesContent":[],"mappings":";;;;AAgCA;AAYA;AAKA;AAQA;AAWiB,KA1DL,gBAAA,GA0DmB,WAAA,GAAA,OAAA,GAAA,cAAA,GAAA,SAAA,GAAA,YAAA,GAAA,WAAA,GAAA,MAAA,GAAA,WAAA,GAAA,UAAA,GAAA,YAAA,GAAA,aAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,QAAA,GAAA,WAAA,GAAA,SAAA;;;;AAoBb,KAxDN,OAAA,GAwDM,WAAA,GAAA,OAAA,GAAA,cAAA,GAAA,YAAA,GAAA,YAAA,GAAA,QAAA,GAAA,MAAA;;;;AAQD,KApDL,qBAAA,GAoDsB,SAAA,GAAA,OAAA,GAAA,SAAA;;;;AAajB,UA5DA,OAAA,CA4DA;EACF,GAAA,EAAA,MAAA;EAID,OAAA,EAAA,MAAA;;;;;AAWF,UApEK,YAAA,CAoEW;EAKX,IAAA,EAxET,OAwES;EAWA,GAAA,EAAA,MAAA;EAOA,OAAA,EAAA,MAAY;EAUjB,UAAA,EAAA,MAAa;EAKR,UAAA,CAAA,EAAA,MAAgB;;;;;UA/FhB,cAAA;;YAEL;;;SAGH;cACK;;;;;;;;;;kBAcI;eACH;aACF;;;;;UAMI,iBAAA;;;;;;cAMH;;;cAKA;UACJ;iBACO;eACF;;cAID;cACA;;;QAIiB;UAAe;;;;;;KAMlC,gBAAA;;;;UAKK,gBAAA;QACT;;;;;;;;;UAUS,mBAAA;;;;;;UAOA,YAAA;;;;;;;;;KAUL,aAAA,GAAgB,YAAY;;;;UAKvB,gBAAA"}
1
+ {"version":3,"file":"analysis-types.d.ts","names":[],"sources":["../../src/types/analysis-types.ts"],"sourcesContent":[],"mappings":";;;;AAgCA;AAYA;AAKA;AAQA;AAWiB,KA1DL,gBAAA,GA0DmB,WAAA,GAAA,OAAA,GAAA,cAAA,GAAA,SAAA,GAAA,YAAA,GAAA,WAAA,GAAA,MAAA,GAAA,WAAA,GAAA,UAAA,GAAA,YAAA,GAAA,aAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,QAAA,GAAA,WAAA,GAAA,SAAA;;;;AAsBb,KA1DN,OAAA,GA0DM,WAAA,GAAA,OAAA,GAAA,cAAA,GAAA,YAAA,GAAA,YAAA,GAAA,QAAA,GAAA,MAAA;;;;AAWD,KAzDL,qBAAA,GAyDsB,SAAA,GAAA,OAAA,GAAA,SAAA;;;;AAejB,UAnEA,OAAA,CAmEA;EACF,GAAA,EAAA,MAAA;EAID,OAAA,EAAA,MAAA;;;;;AAcG,UA9EA,YAAA,CA8EiB;EA6CtB,IAAA,EA1HJ,OA0HI;EAKK,GAAA,EAAA,MAAA;EAWA,OAAA,EAAA,MAAA;EAOA,UAAA,EAAA,MAAY;EAUjB,UAAA,CAAA,EAAA,MAAa;AAKzB;;;;UAtJiB,cAAA;;YAEL;;;SAGH;cACK;;;;;;;;;;;;kBAgBI;eACH;aACF;;;;;;UASI,iBAAA;;;;;;;;cAQH;;;cAKA;UACJ;iBACO;eACF;;cAID;cACA;;;QAIiB;UAAe;;;;;;;UAS7B,iBAAA;;;;;;;;;cASH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCF,gBAAA;;;;UAKK,gBAAA;QACT;;;;;;;;;UAUS,mBAAA;;;;;;UAOA,YAAA;;;;;;;;;KAUL,aAAA,GAAgB,YAAY;;;;UAKvB,gBAAA"}
@@ -1,4 +1,5 @@
1
- import { OpKind, PresentationKind, SpecType } from "./spec-types.js";
1
+ import { PresentationKind, SpecType } from "./spec-types.js";
2
+ import { OpKind } from "@contractspec/lib.contracts";
2
3
 
3
4
  //#region src/types/generation-types.d.ts
4
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"generation-types.d.ts","names":[],"sources":["../../src/types/generation-types.ts"],"sourcesContent":[],"mappings":";;;;AAmBA;AASA;AAKA;AAKY,UA7BK,mBAAA,CA6BQ;EAkBR,QAAA,EAAA,QAAe,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA;EA6BnB,KAAA,CAAA,EAAA,MAAA;EAiBI,QAAA,CAAA,EAAA,MAAA;EASA,MAAA,CAAA,EAAA,OAAA;;;;;UA5FA,gBAAA;;;YAGL;;;;;KAMA,gBAAA;;;;KAKA,UAAA;;;;KAKA,aAAA;;;;UAkBK,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6BJ,0BAA0B;;;;UAiBtB,qBAAA;;SAER;qBACY;;;;;UAMJ,qBAAA"}
1
+ {"version":3,"file":"generation-types.d.ts","names":[],"sources":["../../src/types/generation-types.ts"],"sourcesContent":[],"mappings":";;;;;AAoBA;AASA;AAKA;AAKY,UA7BK,mBAAA,CA6BQ;EAkBR,QAAA,EAAA,QAAe,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA;EA6BnB,KAAA,CAAA,EAAA,MAAA;EAiBI,QAAA,CAAA,EAAA,MAAA;EASA,MAAA,CAAA,EAAA,OAAA;;;;;UA5FA,gBAAA;;;YAGL;;;;;KAMA,gBAAA;;;;KAKA,UAAA;;;;KAKA,aAAA;;;;UAkBK,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6BJ,0BAA0B;;;;UAiBtB,qBAAA;;SAER;qBACY;;;;;UAMJ,qBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"generation-types.js","names":["DEFAULT_WORKSPACE_CONFIG: WorkspaceConfig"],"sources":["../../src/types/generation-types.ts"],"sourcesContent":["/**\n * Code generation related type definitions.\n */\n\nimport type { SpecType, OpKind, PresentationKind } from './spec-types';\n\n/**\n * AI provider options for generation.\n */\nexport interface AIGenerationOptions {\n provider: 'claude' | 'openai' | 'ollama' | 'custom';\n model?: string;\n endpoint?: string;\n stream?: boolean;\n}\n\n/**\n * Result of code generation.\n */\nexport interface GenerationResult {\n code: string;\n filePath: string;\n specType: SpecType;\n}\n\n/**\n * Build target types.\n */\nexport type GenerationTarget = 'handler' | 'component' | 'form';\n\n/**\n * Test target types.\n */\nexport type TestTarget = 'handler' | 'component';\n\n/**\n * Spec build type detected during build.\n */\nexport type SpecBuildType =\n | 'operation'\n | 'presentation'\n | 'form'\n | 'event'\n | 'workflow'\n | 'data-view'\n | 'telemetry'\n | 'migration'\n | 'experiment'\n | 'app-config'\n | 'integration'\n | 'knowledge'\n | 'unknown';\n\n/**\n * Configuration for workspace operations.\n */\nexport interface WorkspaceConfig {\n aiProvider: 'claude' | 'openai' | 'ollama' | 'custom';\n aiModel?: string;\n agentMode: 'simple' | 'cursor' | 'claude-code' | 'openai-codex';\n customEndpoint?: string | null;\n customApiKey?: string | null;\n outputDir: string;\n conventions: {\n operations: string;\n events: string;\n presentations: string;\n forms: string;\n workflows?: string;\n 'data-views'?: string;\n dataViews?: string;\n migrations?: string;\n telemetry?: string;\n experiments?: string;\n appConfig?: string;\n integrations?: string;\n knowledge?: string;\n };\n defaultOwners: string[];\n defaultTags: string[];\n}\n\n/**\n * Default workspace configuration.\n */\nexport const DEFAULT_WORKSPACE_CONFIG: WorkspaceConfig = {\n aiProvider: 'claude',\n agentMode: 'simple',\n outputDir: './src',\n conventions: {\n operations: 'interactions/commands|queries',\n events: 'events',\n presentations: 'presentations',\n forms: 'forms',\n },\n defaultOwners: [],\n defaultTags: [],\n};\n\n/**\n * AI prompt context for spec generation.\n */\nexport interface SpecGenerationContext {\n description: string;\n kind?: OpKind;\n presentationKind?: PresentationKind;\n}\n\n/**\n * AI prompt context for code generation.\n */\nexport interface CodeGenerationContext {\n specCode: string;\n targetPath?: string;\n existingCode?: string;\n}\n"],"mappings":";;;;AAqFA,MAAaA,2BAA4C;CACvD,YAAY;CACZ,WAAW;CACX,WAAW;CACX,aAAa;EACX,YAAY;EACZ,QAAQ;EACR,eAAe;EACf,OAAO;EACR;CACD,eAAe,EAAE;CACjB,aAAa,EAAE;CAChB"}
1
+ {"version":3,"file":"generation-types.js","names":["DEFAULT_WORKSPACE_CONFIG: WorkspaceConfig"],"sources":["../../src/types/generation-types.ts"],"sourcesContent":["/**\n * Code generation related type definitions.\n */\n\nimport type { OpKind } from '@contractspec/lib.contracts';\nimport type { SpecType, PresentationKind } from './spec-types';\n\n/**\n * AI provider options for generation.\n */\nexport interface AIGenerationOptions {\n provider: 'claude' | 'openai' | 'ollama' | 'custom';\n model?: string;\n endpoint?: string;\n stream?: boolean;\n}\n\n/**\n * Result of code generation.\n */\nexport interface GenerationResult {\n code: string;\n filePath: string;\n specType: SpecType;\n}\n\n/**\n * Build target types.\n */\nexport type GenerationTarget = 'handler' | 'component' | 'form';\n\n/**\n * Test target types.\n */\nexport type TestTarget = 'handler' | 'component';\n\n/**\n * Spec build type detected during build.\n */\nexport type SpecBuildType =\n | 'operation'\n | 'presentation'\n | 'form'\n | 'event'\n | 'workflow'\n | 'data-view'\n | 'telemetry'\n | 'migration'\n | 'experiment'\n | 'app-config'\n | 'integration'\n | 'knowledge'\n | 'unknown';\n\n/**\n * Configuration for workspace operations.\n */\nexport interface WorkspaceConfig {\n aiProvider: 'claude' | 'openai' | 'ollama' | 'custom';\n aiModel?: string;\n agentMode: 'simple' | 'cursor' | 'claude-code' | 'openai-codex';\n customEndpoint?: string | null;\n customApiKey?: string | null;\n outputDir: string;\n conventions: {\n operations: string;\n events: string;\n presentations: string;\n forms: string;\n workflows?: string;\n 'data-views'?: string;\n dataViews?: string;\n migrations?: string;\n telemetry?: string;\n experiments?: string;\n appConfig?: string;\n integrations?: string;\n knowledge?: string;\n };\n defaultOwners: string[];\n defaultTags: string[];\n}\n\n/**\n * Default workspace configuration.\n */\nexport const DEFAULT_WORKSPACE_CONFIG: WorkspaceConfig = {\n aiProvider: 'claude',\n agentMode: 'simple',\n outputDir: './src',\n conventions: {\n operations: 'interactions/commands|queries',\n events: 'events',\n presentations: 'presentations',\n forms: 'forms',\n },\n defaultOwners: [],\n defaultTags: [],\n};\n\n/**\n * AI prompt context for spec generation.\n */\nexport interface SpecGenerationContext {\n description: string;\n kind?: OpKind;\n presentationKind?: PresentationKind;\n}\n\n/**\n * AI prompt context for code generation.\n */\nexport interface CodeGenerationContext {\n specCode: string;\n targetPath?: string;\n existingCode?: string;\n}\n"],"mappings":";;;;AAsFA,MAAaA,2BAA4C;CACvD,YAAY;CACZ,WAAW;CACX,WAAW;CACX,aAAa;EACX,YAAY;EACZ,QAAQ;EACR,eAAe;EACf,OAAO;EACR;CACD,eAAe,EAAE;CACjB,aAAa,EAAE;CAChB"}
@@ -0,0 +1,138 @@
1
+ import { Stability } from "./spec-types.js";
2
+
3
+ //#region src/types/llm-types.d.ts
4
+
5
+ /**
6
+ * LLM export format options.
7
+ * - **full**: Complete information including source code and all details (for deep LLM context)
8
+ * - **prompt**: Concise with implementation instructions (actionable for LLM)
9
+ * - **context**: Brief summary with counts and key fields (lightweight overview)
10
+ */
11
+ type LLMExportFormat = 'full' | 'prompt' | 'context';
12
+ /**
13
+ * Agent types for implementation guides.
14
+ */
15
+ type AgentType = 'claude-code' | 'cursor-cli' | 'generic-mcp';
16
+ /**
17
+ * Verification tier for implementation checks.
18
+ */
19
+ type VerificationTier = 'quick' | 'standard' | 'thorough';
20
+ /**
21
+ * Reference to a related spec (operation, event, policy, test, etc.)
22
+ */
23
+ interface SpecRef {
24
+ name: string;
25
+ version: string;
26
+ }
27
+ /**
28
+ * Metadata extracted from a parsed spec.
29
+ */
30
+ interface ParsedSpecMeta {
31
+ /** Unique identifier for the spec */
32
+ key: string;
33
+ /** Version number */
34
+ version: string;
35
+ /** Human-readable description */
36
+ description?: string;
37
+ /** Stability level */
38
+ stability?: Stability;
39
+ /** Team or individual owners */
40
+ owners?: string[];
41
+ /** Categorization tags */
42
+ tags?: string[];
43
+ /** Business goal this spec achieves */
44
+ goal?: string;
45
+ /** Additional context for implementation */
46
+ context?: string;
47
+ }
48
+ /**
49
+ * Lightweight representation of a spec extracted from source code.
50
+ * This is used for LLM export without requiring full compilation.
51
+ */
52
+ interface ParsedSpec {
53
+ /** Spec metadata */
54
+ meta: ParsedSpecMeta;
55
+ /** Type of spec (operation, event, feature, etc.) */
56
+ specType: string;
57
+ /** For operations: command or query */
58
+ kind?: 'command' | 'query' | 'unknown';
59
+ /** Whether the spec defines input/output schemas */
60
+ hasIo?: boolean;
61
+ /** Whether the spec defines policy rules */
62
+ hasPolicy?: boolean;
63
+ /** Whether the spec defines a payload */
64
+ hasPayload?: boolean;
65
+ /** Whether the spec defines content */
66
+ hasContent?: boolean;
67
+ /** Whether the spec has a definition block */
68
+ hasDefinition?: boolean;
69
+ /** Events this spec may emit */
70
+ emittedEvents?: SpecRef[];
71
+ /** Policy specs referenced by this spec */
72
+ policyRefs?: SpecRef[];
73
+ /** Test specs associated with this spec */
74
+ testRefs?: SpecRef[];
75
+ /** Path to the source file */
76
+ filePath?: string;
77
+ /** The actual source code block of the spec */
78
+ sourceBlock?: string;
79
+ /** Operations included in this feature */
80
+ operations?: SpecRef[];
81
+ /** Events included in this feature */
82
+ events?: SpecRef[];
83
+ /** Presentations included in this feature */
84
+ presentations?: SpecRef[];
85
+ }
86
+ /**
87
+ * Options for spec-to-markdown conversion.
88
+ */
89
+ interface SpecToMarkdownOptions {
90
+ /** Export format */
91
+ format: LLMExportFormat;
92
+ /** Indentation depth for nested specs */
93
+ depth?: number;
94
+ /** Include source code blocks */
95
+ includeSource?: boolean;
96
+ /** Include implementation instructions */
97
+ includeInstructions?: boolean;
98
+ }
99
+ /**
100
+ * Result of LLM export operation.
101
+ */
102
+ interface LLMExportResult {
103
+ /** Generated markdown content */
104
+ content: string;
105
+ /** Number of specs included */
106
+ specCount: number;
107
+ /** Format used for export */
108
+ format: LLMExportFormat;
109
+ }
110
+ /**
111
+ * Result of implementation verification.
112
+ */
113
+ interface VerificationResult {
114
+ /** Whether verification passed */
115
+ passed: boolean;
116
+ /** Issues found during verification */
117
+ issues: VerificationIssue[];
118
+ /** Suggestions for improvement */
119
+ suggestions: string[];
120
+ /** Verification tier used */
121
+ tier: VerificationTier;
122
+ }
123
+ /**
124
+ * Single verification issue.
125
+ */
126
+ interface VerificationIssue {
127
+ /** Severity of the issue */
128
+ severity: 'error' | 'warning' | 'info';
129
+ /** Issue message */
130
+ message: string;
131
+ /** Location in the spec or implementation */
132
+ location?: string;
133
+ /** Suggested fix */
134
+ suggestion?: string;
135
+ }
136
+ //#endregion
137
+ export { AgentType, LLMExportFormat, LLMExportResult, ParsedSpec, ParsedSpecMeta, SpecRef, SpecToMarkdownOptions, VerificationIssue, VerificationResult, VerificationTier };
138
+ //# sourceMappingURL=llm-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-types.d.ts","names":[],"sources":["../../src/types/llm-types.ts"],"sourcesContent":[],"mappings":";;;;AA6BA;AAQA;AAuBA;;;;AAsBa,KApED,eAAA,GAoEC,MAAA,GAAA,QAAA,GAAA,SAAA;;;;AAYY,KA3Eb,SAAA,GA2Ea,aAAA,GAAA,YAAA,GAAA,aAAA;AAMzB;AAcA;AAYA;AAciB,KApHL,gBAAA,GAoHsB,OAAA,GAAA,UAAA,GAAA,UAAA;;;;UA/GjB,OAAA;;;;;;;UAQA,cAAA;;;;;;;;cAQH;;;;;;;;;;;;;;UAeG,UAAA;;QAET;;;;;;;;;;;;;;;;kBAgBU;;eAEH;;aAEF;;;;;;eAQE;;WAEJ;;kBAEO;;;;;UAMD,qBAAA;;UAEP;;;;;;;;;;;UAYO,eAAA;;;;;;UAMP;;;;;UAMO,kBAAA;;;;UAIP;;;;QAIF;;;;;UAMS,iBAAA"}
@@ -1,16 +1,14 @@
1
+ import { OpKind } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/types/spec-types.d.ts
2
- /**
3
- * Core spec type definitions.
4
- * Extracted from cli-contractspec/src/types.ts
5
- */
4
+
6
5
  type SpecType = 'operation' | 'event' | 'presentation' | 'form' | 'feature' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge';
7
- type OpKind = 'command' | 'query';
8
6
  type PresentationKind = 'web_component' | 'markdown' | 'data';
9
7
  type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
10
8
  type StepType = 'human' | 'automation' | 'decision';
11
9
  interface BaseSpecData {
12
10
  name: string;
13
- version: number;
11
+ version: string;
14
12
  description: string;
15
13
  owners: string[];
16
14
  tags: string[];
@@ -37,15 +35,15 @@ interface FeatureSpecData extends BaseSpecData {
37
35
  key: string;
38
36
  operations: {
39
37
  name: string;
40
- version: number;
38
+ version: string;
41
39
  }[];
42
40
  events: {
43
41
  name: string;
44
- version: number;
42
+ version: string;
45
43
  }[];
46
44
  presentations: {
47
45
  name: string;
48
- version: number;
46
+ version: string;
49
47
  }[];
50
48
  }
51
49
  interface WorkflowStepData {
@@ -55,11 +53,11 @@ interface WorkflowStepData {
55
53
  description?: string;
56
54
  operation?: {
57
55
  name: string;
58
- version: number;
56
+ version: string;
59
57
  };
60
58
  form?: {
61
59
  key: string;
62
- version: number;
60
+ version: string;
63
61
  };
64
62
  }
65
63
  interface WorkflowTransitionData {
@@ -91,11 +89,11 @@ interface DataViewSpecData extends BaseSpecData {
91
89
  kind: DataViewKind;
92
90
  primaryOperation: {
93
91
  name: string;
94
- version: number;
92
+ version: string;
95
93
  };
96
94
  itemOperation?: {
97
95
  name: string;
98
- version: number;
96
+ version: string;
99
97
  };
100
98
  fields: DataViewFieldData[];
101
99
  primaryField?: string;
@@ -117,7 +115,7 @@ interface TelemetryAnomalyRuleData {
117
115
  }
118
116
  interface TelemetryEventData {
119
117
  name: string;
120
- version: number;
118
+ version: string;
121
119
  what: string;
122
120
  who?: string;
123
121
  why?: string;
@@ -149,7 +147,7 @@ interface TelemetrySpecData extends BaseSpecData {
149
147
  interface ExperimentVariantOverrideData {
150
148
  type: 'dataView' | 'workflow' | 'theme' | 'policy' | 'presentation';
151
149
  target: string;
152
- version?: number;
150
+ version?: string;
153
151
  }
154
152
  interface ExperimentVariantData {
155
153
  id: string;
@@ -163,7 +161,7 @@ interface TargetingRuleData {
163
161
  percentage?: number;
164
162
  policy?: {
165
163
  name: string;
166
- version?: number;
164
+ version?: string;
167
165
  };
168
166
  expression?: string;
169
167
  }
@@ -199,7 +197,7 @@ interface ExperimentSpecData extends BaseSpecData {
199
197
  interface AppConfigMappingData {
200
198
  slot: string;
201
199
  name: string;
202
- version?: number;
200
+ version?: string;
203
201
  }
204
202
  interface AppConfigFeatureFlagData {
205
203
  key: string;
@@ -230,27 +228,27 @@ interface AppBlueprintSpecData extends BaseSpecData {
230
228
  workflows: AppConfigMappingData[];
231
229
  policyRefs: {
232
230
  name: string;
233
- version?: number;
231
+ version?: string;
234
232
  }[];
235
233
  theme?: {
236
234
  name: string;
237
- version: number;
235
+ version: string;
238
236
  };
239
237
  themeFallbacks: {
240
238
  name: string;
241
- version: number;
239
+ version: string;
242
240
  }[];
243
241
  telemetry?: {
244
242
  name: string;
245
- version?: number;
243
+ version?: string;
246
244
  };
247
245
  activeExperiments: {
248
246
  name: string;
249
- version?: number;
247
+ version?: string;
250
248
  }[];
251
249
  pausedExperiments: {
252
250
  name: string;
253
- version?: number;
251
+ version?: string;
254
252
  }[];
255
253
  featureFlags: AppConfigFeatureFlagData[];
256
254
  routes: AppRouteConfigData[];
@@ -287,11 +285,11 @@ type IntegrationOwnershipModeData = 'managed' | 'byok';
287
285
  type IntegrationHealthCheckMethod = 'ping' | 'list' | 'custom';
288
286
  interface IntegrationCapabilityRefData {
289
287
  key: string;
290
- version: number;
288
+ version: string;
291
289
  }
292
290
  interface IntegrationCapabilityRequirementData {
293
291
  key: string;
294
- version?: number;
292
+ version?: string;
295
293
  optional?: boolean;
296
294
  reason?: string;
297
295
  }
@@ -341,5 +339,5 @@ interface KnowledgeSpaceSpecData extends BaseSpecData {
341
339
  vectorDbIntegration?: string;
342
340
  }
343
341
  //#endregion
344
- export { AppBlueprintSpecData, AppConfigFeatureFlagData, AppConfigMappingData, AppRouteConfigData, BaseSpecData, DataViewFieldData, DataViewKind, DataViewSpecData, EventSpecData, ExperimentAllocationData, ExperimentMetricData, ExperimentSpecData, ExperimentVariantData, ExperimentVariantOverrideData, FeatureSpecData, FormSpecData, IntegrationCapabilityRefData, IntegrationCapabilityRequirementData, IntegrationCategoryData, IntegrationConfigFieldData, IntegrationConfigFieldType, IntegrationHealthCheckMethod, IntegrationOwnershipModeData, IntegrationSecretFieldData, IntegrationSpecData, KnowledgeCategoryData, KnowledgeRetentionData, KnowledgeSpaceSpecData, KnowledgeTrustLevel, MigrationSpecData, MigrationStepData, MigrationStepKind, OpKind, OperationSpecData, PresentationKind, PresentationSpecData, RandomAllocationData, SpecType, Stability, StepType, StickyAllocationData, TargetedAllocationData, TargetingRuleData, TelemetryAnomalyRuleData, TelemetryEventData, TelemetryPrivacy, TelemetryPropertyData, TelemetryProviderData, TelemetrySpecData, WorkflowSpecData, WorkflowStepData, WorkflowTransitionData };
342
+ export { AppBlueprintSpecData, AppConfigFeatureFlagData, AppConfigMappingData, AppRouteConfigData, BaseSpecData, DataViewFieldData, DataViewKind, DataViewSpecData, EventSpecData, ExperimentAllocationData, ExperimentMetricData, ExperimentSpecData, ExperimentVariantData, ExperimentVariantOverrideData, FeatureSpecData, FormSpecData, IntegrationCapabilityRefData, IntegrationCapabilityRequirementData, IntegrationCategoryData, IntegrationConfigFieldData, IntegrationConfigFieldType, IntegrationHealthCheckMethod, IntegrationOwnershipModeData, IntegrationSecretFieldData, IntegrationSpecData, KnowledgeCategoryData, KnowledgeRetentionData, KnowledgeSpaceSpecData, KnowledgeTrustLevel, MigrationSpecData, MigrationStepData, MigrationStepKind, OperationSpecData, PresentationKind, PresentationSpecData, RandomAllocationData, SpecType, Stability, StepType, StickyAllocationData, TargetedAllocationData, TargetingRuleData, TelemetryAnomalyRuleData, TelemetryEventData, TelemetryPrivacy, TelemetryPropertyData, TelemetryProviderData, TelemetrySpecData, WorkflowSpecData, WorkflowStepData, WorkflowTransitionData };
345
343
  //# sourceMappingURL=spec-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-types.d.ts","names":[],"sources":["../../src/types/spec-types.ts"],"sourcesContent":[],"mappings":";;AAKA;AAeA;AAEA;AAEY,KAnBA,QAAA,GAmBS,WAAA,GAAA,OAAA,GAAA,cAAA,GAAA,MAAA,GAAA,SAAA,GAAA,UAAA,GAAA,WAAA,GAAA,WAAA,GAAA,WAAA,GAAA,YAAA,GAAA,YAAA,GAAA,aAAA,GAAA,WAAA;AAET,KANA,MAAA,GAMQ,SAAA,GAAA,OAAA;AAEH,KANL,gBAAA,GAYC,eAAS,GAAA,UAAA,GAAA,MAAA;AAGL,KAbL,SAAA,GAauB,cAC3B,GAAA,MADmC,GAAA,QAAY,GAAA,YAAA;AAWtC,KAtBL,QAAA,GAsBmB,OAAA,GAAQ,YAAY,GAAA,UAAA;AAIlC,UAxBA,YAAA,CAwBqB;EAI1B,IAAA,EAAA,MAAA;EAEK,OAAA,EAAA,MAAA;EAOA,WAAA,EAAA,MAAgB;EAShB,MAAA,EAAA,MAAA,EAAA;EAMA,IAAA,EAAA,MAAA,EAAA;EAIR,SAAA,EAlDI,SAkDJ;;AAJiC,UA3CzB,iBAAA,SAA0B,YA2CD,CAAA;EAAY,IAAA,EA1C9C,MA0C8C;EAS1C,IAAA,EAAA,MAAA;EAEK,OAAA,EAAA,MAAA;EASA,QAAA,EAAA,OAAA;EAIT,SAAA,EAAA,OAAA;EAGE,IAAA,EAAA,WAAA,GAAA,MAAA,GAAA,OAAA;EAPgC,KAAA,EAAA,MAAA,EAAA;EAAY,WAAA,EAAA,OAAA;AAYtD;AAEiB,UAlEA,aAAA,SAAsB,YAkED,CAAA;EASrB,SAAA,EAAA,MAAA,EAAA;AA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;;KAKI,0BAAA,GAA6B;UAExB,mBAAA,SAA4B;;;;YAIjC;kBACM;wBACM;wBACA;gBACR;gBACA;;;;qBAIK;;;;;KAMT,qBAAA;KAMA,mBAAA;UAEK,sBAAA;;;;UAKA,sBAAA,SAA+B;;;;YAIpC;aACC;;;cAGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/module.workspace",
3
- "version": "1.44.1",
3
+ "version": "1.45.0",
4
4
  "description": "Workspace discovery and management module",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -31,13 +31,14 @@
31
31
  "test": "bun run"
32
32
  },
33
33
  "dependencies": {
34
- "@contractspec/lib.contracts": "1.44.1",
35
- "@contractspec/lib.schema": "1.44.1",
34
+ "@contractspec/lib.contracts": "1.45.0",
35
+ "@contractspec/lib.schema": "1.45.0",
36
+ "compare-versions": "^6.1.1",
36
37
  "zod": "^4.1.13"
37
38
  },
38
39
  "devDependencies": {
39
- "@contractspec/tool.tsdown": "1.44.1",
40
- "@contractspec/tool.typescript": "1.44.1",
40
+ "@contractspec/tool.tsdown": "1.45.0",
41
+ "@contractspec/tool.typescript": "1.45.0",
41
42
  "tsdown": "^0.18.3",
42
43
  "typescript": "^5.9.3"
43
44
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-generation.d.ts","names":[],"sources":["../../src/ai/code-generation.ts"],"sourcesContent":[],"mappings":";;AAQA;AA0BA;AA0BA;AA2BA;AA2CA;;iBA1HgB,kBAAA;;;;iBA0BA,oBAAA;;;;iBA0BA,eAAA;;;;iBA2BA,eAAA;;;;iBA2CA,sBAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-generation.js","names":[],"sources":["../../src/ai/code-generation.ts"],"sourcesContent":["/**\n * AI prompts for code generation.\n * Extracted from cli-contractspec/src/ai/prompts/code-generation.ts\n */\n\n/**\n * Build prompt for generating handler implementation.\n */\nexport function buildHandlerPrompt(specCode: string): string {\n return `You are a senior TypeScript developer implementing a handler for a contract specification.\n\nHere is the contract spec:\n\n\\`\\`\\`typescript\n${specCode}\n\\`\\`\\`\n\nGenerate a complete handler implementation that:\n\n1. **Matches the spec signature**: Input/output types from the spec\n2. **Handles errors**: Implement error cases defined in spec.io.errors\n3. **Emits events**: Use the events declared in spec.sideEffects.emits\n4. **Validates input**: Use zod validation from the schema\n5. **Follows best practices**: Clean, type-safe TypeScript\n6. **Includes comments**: Explain business logic\n\nThe handler should be production-ready with proper error handling, logging points, and clear structure.\n\nReturn only the TypeScript code for the handler function.`;\n}\n\n/**\n * Build prompt for generating React component from presentation spec.\n */\nexport function buildComponentPrompt(specCode: string): string {\n return `You are a senior React developer creating a component for a presentation specification.\n\nHere is the presentation spec:\n\n\\`\\`\\`typescript\n${specCode}\n\\`\\`\\`\n\nGenerate a complete React component that:\n\n1. **Props interface**: Typed props from the spec\n2. **Accessibility**: Proper ARIA labels, roles, keyboard navigation\n3. **Mobile-first**: Optimized for small screens and touch\n4. **Clean UI**: Simple, intuitive interface\n5. **Type-safe**: Full TypeScript with no 'any' types\n6. **Best practices**: React hooks, proper state management\n\nThe component should follow Atomic Design principles and be reusable.\n\nReturn only the TypeScript/TSX code for the component.`;\n}\n\n/**\n * Build prompt for generating form component.\n */\nexport function buildFormPrompt(specCode: string): string {\n return `You are a senior React developer creating a form component from a form specification.\n\nHere is the form spec:\n\n\\`\\`\\`typescript\n${specCode}\n\\`\\`\\`\n\nGenerate a complete form component using react-hook-form that:\n\n1. **Form validation**: Use zod schema for validation\n2. **Field types**: Proper inputs for each field type\n3. **Conditional logic**: Support visibleWhen, enabledWhen, requiredWhen predicates\n4. **Error handling**: Clear, user-friendly error messages\n5. **Accessibility**: Labels, hints, ARIA attributes\n6. **Mobile-optimized**: Touch-friendly, appropriate input types\n7. **Type-safe**: Full TypeScript\n\nThe form should provide excellent UX with real-time validation and helpful feedback.\n\nReturn only the TypeScript/TSX code for the form component.`;\n}\n\n/**\n * Build prompt for generating tests.\n */\nexport function buildTestPrompt(\n specCode: string,\n implementationCode: string,\n testType: 'handler' | 'component'\n): string {\n const testFocus =\n testType === 'handler'\n ? `\n - Test all acceptance scenarios from the spec\n - Test error cases defined in spec.io.errors\n - Verify events are emitted correctly\n - Test input validation\n - Test happy path and edge cases`\n : `\n - Test rendering with various props\n - Test user interactions\n - Test accessibility (a11y)\n - Test responsive behavior\n - Test error states`;\n\n return `You are a senior developer writing comprehensive tests.\n\nSpec:\n\\`\\`\\`typescript\n${specCode}\n\\`\\`\\`\n\nImplementation:\n\\`\\`\\`typescript\n${implementationCode}\n\\`\\`\\`\n\nGenerate complete test suite using Vitest that:\n${testFocus}\n\nUse clear test descriptions and follow AAA pattern (Arrange, Act, Assert).\n\nReturn only the TypeScript test code.`;\n}\n\n/**\n * System prompt for code generation.\n */\nexport function getCodeGenSystemPrompt(): string {\n return `You are an expert TypeScript developer with deep knowledge of:\n- Type-safe API design\n- React and modern hooks\n- Test-driven development\n- Accessibility best practices\n- Clean code principles\n\nGenerate production-ready code that is:\n- Fully typed (no 'any' or type assertions unless absolutely necessary)\n- Well-documented with TSDoc comments\n- Following project conventions\n- Defensive and error-safe\n- Easy to maintain and extend\n\nAlways prioritize code quality, safety, and user experience.`;\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,mBAAmB,UAA0B;AAC3D,QAAO;;;;;EAKP,SAAS;;;;;;;;;;;;;;;;;;;AAoBX,SAAgB,qBAAqB,UAA0B;AAC7D,QAAO;;;;;EAKP,SAAS;;;;;;;;;;;;;;;;;;;AAoBX,SAAgB,gBAAgB,UAA0B;AACxD,QAAO;;;;;EAKP,SAAS;;;;;;;;;;;;;;;;;;;;AAqBX,SAAgB,gBACd,UACA,oBACA,UACQ;AAgBR,QAAO;;;;EAIP,SAAS;;;;;EAKT,mBAAmB;;;;EAvBjB,aAAa,YACT;;;;;sCAMA;;;;;uBAoBI;;;;;;;;;AAUZ,SAAgB,yBAAiC;AAC/C,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec-creation.d.ts","names":[],"sources":["../../src/ai/spec-creation.ts"],"sourcesContent":[],"mappings":";;;;AA2DA;AAoCA;AAiBA;iBAtGgB,wBAAA,4BAER;;;;iBA0BQ,oBAAA;;;;iBAqBA,2BAAA,4BAER;;;;iBAkCQ,eAAA,CAAA;;;;iBAiBA,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec-creation.js","names":[],"sources":["../../src/ai/spec-creation.ts"],"sourcesContent":["/**\n * AI prompts for spec creation.\n * Extracted from cli-contractspec/src/ai/prompts/spec-creation.ts\n */\n\nimport type { OpKind, PresentationKind } from '../types/spec-types';\n\n/**\n * Build prompt for creating operation spec from description.\n */\nexport function buildOperationSpecPrompt(\n description: string,\n kind: OpKind\n): string {\n return `You are a senior software architect creating a contract specification for an operation.\n\nThe operation is a ${kind} (${kind === 'command' ? 'changes state, has side effects' : 'read-only, idempotent'}).\n\nUser description: ${description}\n\nCreate a complete contract specification following these guidelines:\n\n1. **Name**: Use dot notation like \"domain.operationName\" (e.g., \"user.signup\", \"payment.charge\")\n2. **Version**: Start at 1\n3. **Description**: Clear, concise summary (1-2 sentences)\n4. **Goal**: Business purpose - why this operation exists\n5. **Context**: Background, constraints, scope (what it does and doesn't do)\n6. **Input/Output**: Describe the shape (we'll create schemas separately)\n7. **Auth**: Who can call this - anonymous, user, or admin\n8. **Feature Flags**: Any flags that gate this operation\n9. **Side Effects**: What events might be emitted, analytics to track\n\nRespond with a structured spec.`;\n}\n\n/**\n * Build prompt for creating event spec from description.\n */\nexport function buildEventSpecPrompt(description: string): string {\n return `You are a senior software architect creating an event specification.\n\nUser description: ${description}\n\nCreate a complete event specification following these guidelines:\n\n1. **Name**: Use dot notation like \"domain.event_name\" (e.g., \"user.signup_completed\", \"payment.charged\")\n2. **Version**: Start at 1\n3. **Description**: Clear description of when this event is emitted\n4. **Payload**: Describe what data the event carries\n5. **PII Fields**: List any personally identifiable information fields (e.g., [\"email\", \"name\"])\n\nEvents represent things that have already happened and should use past tense.\n\nRespond with a structured spec.`;\n}\n\n/**\n * Build prompt for creating presentation spec from description.\n */\nexport function buildPresentationSpecPrompt(\n description: string,\n kind: PresentationKind\n): string {\n const kindDescriptions = {\n web_component: 'a React component with props schema',\n markdown: 'markdown/MDX documentation or guide',\n data: 'structured data export (JSON/XML)',\n };\n\n return `You are a senior software architect creating a presentation specification.\n\nThis is a ${kind} presentation - ${kindDescriptions[kind]}.\n\nUser description: ${description}\n\nCreate a complete presentation specification following these guidelines:\n\n1. **Name**: Use dot notation like \"domain.presentation_name\" (e.g., \"user.profile_card\", \"docs.api_guide\")\n2. **Version**: Start at 1\n3. **Description**: What this presentation shows/provides\n4. **Kind-specific details**:\n ${\n kind === 'web_component'\n ? '- Component key (symbolic, resolved by host app)\\n - Props structure\\n - Analytics events to track'\n : kind === 'markdown'\n ? '- Content or resource URI\\n - Target audience'\n : '- MIME type (e.g., application/json)\\n - Data structure description'\n }\n\nRespond with a structured spec.`;\n}\n\n/**\n * Build system prompt for all spec generation.\n */\nexport function getSystemPrompt(): string {\n return `You are an expert software architect specializing in API design and contract-driven development.\n\nYou create clear, well-documented specifications that serve as the single source of truth for operations, events, and presentations.\n\nYour specs are:\n- Precise and unambiguous\n- Following TypeScript conventions\n- Business-oriented (capturing the \"why\" not just \"what\")\n- Designed for both humans and AI agents to understand\n\nAlways use proper dot notation for names and ensure all metadata is meaningful and accurate.`;\n}\n\n/**\n * Create example-based prompt for better results.\n */\nexport function addExampleContext(\n basePrompt: string,\n examples: string[]\n): string {\n if (examples.length === 0) return basePrompt;\n\n return `${basePrompt}\n\nHere are some good examples for reference:\n\n${examples.join('\\n\\n')}\n\nFollow this structure and quality level.`;\n}\n"],"mappings":";;;;AAUA,SAAgB,yBACd,aACA,MACQ;AACR,QAAO;;qBAEY,KAAK,IAAI,SAAS,YAAY,oCAAoC,wBAAwB;;oBAE3F,YAAY;;;;;;;;;;;;;;;;;;;AAoBhC,SAAgB,qBAAqB,aAA6B;AAChE,QAAO;;oBAEW,YAAY;;;;;;;;;;;;;;;;;AAkBhC,SAAgB,4BACd,aACA,MACQ;AAOR,QAAO;;YAEG,KAAK,kBARU;EACvB,eAAe;EACf,UAAU;EACV,MAAM;EACP,CAIiD,MAAM;;oBAEtC,YAAY;;;;;;;;KAS3B,SAAS,kBACL,2GACA,SAAS,aACP,oDACA,wEACP;;;;;;;AAQJ,SAAgB,kBAA0B;AACxC,QAAO;;;;;;;;;;;;;;;AAgBT,SAAgB,kBACd,YACA,UACQ;AACR,KAAI,SAAS,WAAW,EAAG,QAAO;AAElC,QAAO,GAAG,WAAW;;;;EAIrB,SAAS,KAAK,OAAO,CAAC"}