@contractspec/example.content-generation 0.0.0-canary-20260113162409

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,25 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
3
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/content-generation/tsdown.config.js
4
+ ℹ entry: src/example.ts, src/generate.ts, src/index.ts, src/docs/content-generation.docblock.ts, src/docs/index.ts
5
+ ℹ target: esnext
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ Cleaning 16 files
9
+ ℹ dist/generate.js 1.81 kB │ gzip: 0.90 kB
10
+ ℹ dist/docs/content-generation.docblock.js 1.37 kB │ gzip: 0.69 kB
11
+ ℹ dist/example.js 1.02 kB │ gzip: 0.51 kB
12
+ ℹ dist/index.js 0.20 kB │ gzip: 0.13 kB
13
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
14
+ ℹ dist/generate.js.map 2.87 kB │ gzip: 1.30 kB
15
+ ℹ dist/docs/content-generation.docblock.js.map 1.86 kB │ gzip: 0.88 kB
16
+ ℹ dist/example.js.map 1.46 kB │ gzip: 0.69 kB
17
+ ℹ dist/generate.d.ts.map 0.14 kB │ gzip: 0.13 kB
18
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
19
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
20
+ ℹ dist/generate.d.ts 0.18 kB │ gzip: 0.15 kB
21
+ ℹ dist/index.d.ts 0.14 kB │ gzip: 0.10 kB
22
+ ℹ dist/docs/content-generation.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
23
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
24
+ ℹ 15 files, total: 11.51 kB
25
+ ✔ Build complete in 20187ms
@@ -0,0 +1,26 @@
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
3
+ $ tsdown
4
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/content-generation/tsdown.config.js
6
+ ℹ entry: src/example.ts, src/generate.ts, src/index.ts, src/docs/content-generation.docblock.ts, src/docs/index.ts
7
+ ℹ target: esnext
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ dist/generate.js 1.81 kB │ gzip: 0.90 kB
11
+ ℹ dist/docs/content-generation.docblock.js 1.37 kB │ gzip: 0.69 kB
12
+ ℹ dist/example.js 1.02 kB │ gzip: 0.51 kB
13
+ ℹ dist/index.js 0.20 kB │ gzip: 0.13 kB
14
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
15
+ ℹ dist/generate.js.map 2.87 kB │ gzip: 1.30 kB
16
+ ℹ dist/docs/content-generation.docblock.js.map 1.86 kB │ gzip: 0.88 kB
17
+ ℹ dist/example.js.map 1.46 kB │ gzip: 0.69 kB
18
+ ℹ dist/generate.d.ts.map 0.14 kB │ gzip: 0.13 kB
19
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
20
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
21
+ ℹ dist/generate.d.ts 0.18 kB │ gzip: 0.15 kB
22
+ ℹ dist/index.d.ts 0.14 kB │ gzip: 0.10 kB
23
+ ℹ dist/docs/content-generation.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
24
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
25
+ ℹ 15 files, total: 11.51 kB
26
+ ✔ Build complete in 22467ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,350 @@
1
+ # @contractspec/example.content-generation
2
+
3
+ ## 0.0.0-canary-20260113162409
4
+
5
+ ### Minor Changes
6
+
7
+ - caf8701: feat: add cli vibe command to run workflow
8
+ - c69b849: feat: add api web services (mcp & website)
9
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
10
+ - fd38e85: feat: auto-fix contractspec issues
11
+
12
+ ### Patch Changes
13
+
14
+ - e7ded36: feat: improve stability (adding ts-morph)
15
+ - c231a8b: test: improve workspace stability
16
+ - Updated dependencies [e7ded36]
17
+ - Updated dependencies [caf8701]
18
+ - Updated dependencies [c69b849]
19
+ - Updated dependencies [c231a8b]
20
+ - Updated dependencies [42b8d78]
21
+ - Updated dependencies [fd38e85]
22
+ - @contractspec/lib.content-gen@0.0.0-canary-20260113162409
23
+ - @contractspec/lib.contracts@0.0.0-canary-20260113162409
24
+ - @contractspec/lib.logger@0.0.0-canary-20260113162409
25
+
26
+ ## 1.46.2
27
+
28
+ ### Patch Changes
29
+
30
+ - 7e21625: feat: library services (landing page & api)
31
+ - Updated dependencies [7e21625]
32
+ - @contractspec/lib.content-gen@1.46.2
33
+ - @contractspec/lib.contracts@1.46.2
34
+ - @contractspec/lib.logger@1.46.2
35
+
36
+ ## 1.46.1
37
+
38
+ ### Patch Changes
39
+
40
+ - 2d8a72b: fix: mcp for presentation
41
+ - Updated dependencies [2d8a72b]
42
+ - @contractspec/lib.content-gen@1.46.1
43
+ - @contractspec/lib.contracts@1.46.1
44
+ - @contractspec/lib.logger@1.46.1
45
+
46
+ ## 1.46.0
47
+
48
+ ### Minor Changes
49
+
50
+ - 07cb19b: feat: feat: cleaude code & opencode integrations
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [07cb19b]
55
+ - @contractspec/lib.content-gen@1.46.0
56
+ - @contractspec/lib.contracts@1.46.0
57
+ - @contractspec/lib.logger@1.46.0
58
+
59
+ ## 1.45.6
60
+
61
+ ### Patch Changes
62
+
63
+ - a913074: feat: improve ai agents rules management"
64
+ - Updated dependencies [a913074]
65
+ - @contractspec/lib.content-gen@1.45.6
66
+ - @contractspec/lib.contracts@1.45.6
67
+ - @contractspec/lib.logger@1.45.6
68
+
69
+ ## 1.45.5
70
+
71
+ ### Patch Changes
72
+
73
+ - 9ddd7fa: feat: improve versioning
74
+ - Updated dependencies [9ddd7fa]
75
+ - @contractspec/lib.content-gen@1.45.5
76
+ - @contractspec/lib.contracts@1.45.5
77
+ - @contractspec/lib.logger@1.45.5
78
+
79
+ ## 1.45.4
80
+
81
+ ### Patch Changes
82
+
83
+ - fix: github action
84
+ - Updated dependencies
85
+ - @contractspec/lib.content-gen@1.45.4
86
+ - @contractspec/lib.contracts@1.45.4
87
+ - @contractspec/lib.logger@1.45.4
88
+
89
+ ## 1.45.3
90
+
91
+ ### Patch Changes
92
+
93
+ - e74ea9e: feat: version management
94
+ - Updated dependencies [e74ea9e]
95
+ - @contractspec/lib.content-gen@1.45.3
96
+ - @contractspec/lib.contracts@1.45.3
97
+ - @contractspec/lib.logger@1.45.3
98
+
99
+ ## 1.45.2
100
+
101
+ ### Patch Changes
102
+
103
+ - 39ca241: code cleaning
104
+ - Updated dependencies [39ca241]
105
+ - @contractspec/lib.content-gen@1.45.2
106
+ - @contractspec/lib.contracts@1.45.2
107
+ - @contractspec/lib.logger@1.45.2
108
+
109
+ ## 1.45.1
110
+
111
+ ### Patch Changes
112
+
113
+ - feat: improve app config and examples contracts
114
+ - Updated dependencies
115
+ - @contractspec/lib.content-gen@1.45.1
116
+ - @contractspec/lib.contracts@1.45.1
117
+ - @contractspec/lib.logger@1.45.1
118
+ - @contractspec/lib.schema@1.45.1
119
+
120
+ ## 1.45.0
121
+
122
+ ### Minor Changes
123
+
124
+ - e73ca1d: feat: improve app config and examples contracts
125
+ feat: Contract layers support (features, examples, app-configs)
126
+
127
+ ### New CLI Commands
128
+ - `contractspec list layers` - List all contract layers with filtering
129
+
130
+ ### Enhanced Commands
131
+ - `contractspec ci` - New `layers` check category validates features/examples/config
132
+ - `contractspec doctor` - New `layers` health checks
133
+ - `contractspec integrity` - Now shows layer statistics
134
+
135
+ ### New APIs
136
+ - `discoverLayers()` - Scan workspace for all layer files
137
+ - `scanExampleSource()` - Parse ExampleSpec from source code
138
+ - `isExampleFile()` - Check if file is an example spec
139
+
140
+ ### Patch Changes
141
+
142
+ - Updated dependencies [e73ca1d]
143
+ - @contractspec/lib.content-gen@1.45.0
144
+ - @contractspec/lib.contracts@1.45.0
145
+ - @contractspec/lib.logger@1.45.0
146
+ - @contractspec/lib.schema@1.45.0
147
+
148
+ ## 1.44.1
149
+
150
+ ### Patch Changes
151
+
152
+ - 3c594fb: fix
153
+ - Updated dependencies [3c594fb]
154
+ - @contractspec/lib.content-gen@1.44.1
155
+ - @contractspec/lib.contracts@1.44.1
156
+ - @contractspec/lib.logger@1.44.1
157
+ - @contractspec/lib.schema@1.44.1
158
+
159
+ ## 1.44.0
160
+
161
+ ### Minor Changes
162
+
163
+ - 5f3a868: chore: isolate branding to contractspec.io
164
+
165
+ ### Patch Changes
166
+
167
+ - Updated dependencies [5f3a868]
168
+ - @contractspec/lib.content-gen@1.44.0
169
+ - @contractspec/lib.contracts@1.44.0
170
+ - @contractspec/lib.logger@1.44.0
171
+ - @contractspec/lib.schema@1.44.0
172
+
173
+ ## 1.43.3
174
+
175
+ ### Patch Changes
176
+
177
+ - 9216062: fix: cross-platform compatibility
178
+ - Updated dependencies [9216062]
179
+ - @contractspec/lib.content-gen@1.43.4
180
+ - @contractspec/lib.contracts@1.43.4
181
+ - @contractspec/lib.logger@1.43.3
182
+ - @contractspec/lib.schema@1.43.3
183
+
184
+ ## 1.43.2
185
+
186
+ ### Patch Changes
187
+
188
+ - 24d9759: improve documentation
189
+ - Updated dependencies [24d9759]
190
+ - @contractspec/lib.content-gen@1.43.3
191
+ - @contractspec/lib.contracts@1.43.3
192
+ - @contractspec/lib.logger@1.43.2
193
+ - @contractspec/lib.schema@1.43.2
194
+
195
+ ## 1.43.2
196
+
197
+ ### Patch Changes
198
+
199
+ - e147271: fix: improve stability
200
+ - Updated dependencies [e147271]
201
+ - @contractspec/lib.content-gen@1.43.2
202
+ - @contractspec/lib.contracts@1.43.2
203
+ - @contractspec/lib.logger@1.43.1
204
+ - @contractspec/lib.schema@1.43.1
205
+
206
+ ## 1.43.1
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies [f28fdad]
211
+ - @contractspec/lib.contracts@1.43.1
212
+ - @contractspec/lib.content-gen@1.43.1
213
+
214
+ ## 1.43.0
215
+
216
+ ### Minor Changes
217
+
218
+ - 042d072: feat: schema declaration using json schema, including zod
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [042d072]
223
+ - @contractspec/lib.content-gen@1.43.0
224
+ - @contractspec/lib.contracts@1.43.0
225
+ - @contractspec/lib.logger@1.43.0
226
+ - @contractspec/lib.schema@1.43.0
227
+
228
+ ## 1.42.10
229
+
230
+ ### Patch Changes
231
+
232
+ - 1e6a0f1: fix: mcp server
233
+ - Updated dependencies [1e6a0f1]
234
+ - @contractspec/lib.content-gen@1.42.10
235
+ - @contractspec/lib.contracts@1.42.10
236
+ - @contractspec/lib.logger@1.42.10
237
+ - @contractspec/lib.schema@1.42.10
238
+
239
+ ## 1.42.9
240
+
241
+ ### Patch Changes
242
+
243
+ - 9281db7: fix ModelRegistry
244
+ - Updated dependencies [9281db7]
245
+ - @contractspec/lib.content-gen@1.42.9
246
+ - @contractspec/lib.contracts@1.42.9
247
+ - @contractspec/lib.logger@1.42.9
248
+ - @contractspec/lib.schema@1.42.9
249
+
250
+ ## 1.42.8
251
+
252
+ ### Patch Changes
253
+
254
+ - e07b5ac: fix
255
+ - Updated dependencies [e07b5ac]
256
+ - @contractspec/lib.content-gen@1.42.8
257
+ - @contractspec/lib.contracts@1.42.8
258
+ - @contractspec/lib.logger@1.42.8
259
+ - @contractspec/lib.schema@1.42.8
260
+
261
+ ## 1.42.7
262
+
263
+ ### Patch Changes
264
+
265
+ - e9b575d: fix release
266
+ - Updated dependencies [e9b575d]
267
+ - @contractspec/lib.content-gen@1.42.7
268
+ - @contractspec/lib.contracts@1.42.7
269
+ - @contractspec/lib.logger@1.42.7
270
+ - @contractspec/lib.schema@1.42.7
271
+
272
+ ## 1.42.6
273
+
274
+ ### Patch Changes
275
+
276
+ - 1500242: fix tooling
277
+ - Updated dependencies [1500242]
278
+ - @contractspec/lib.content-gen@1.42.6
279
+ - @contractspec/lib.contracts@1.42.6
280
+ - @contractspec/lib.logger@1.42.6
281
+ - @contractspec/lib.schema@1.42.6
282
+
283
+ ## 1.42.5
284
+
285
+ ### Patch Changes
286
+
287
+ - 1299719: fix vscode
288
+ - Updated dependencies [1299719]
289
+ - @contractspec/lib.content-gen@1.42.5
290
+ - @contractspec/lib.contracts@1.42.5
291
+ - @contractspec/lib.logger@1.42.5
292
+ - @contractspec/lib.schema@1.42.5
293
+
294
+ ## 1.42.4
295
+
296
+ ### Patch Changes
297
+
298
+ - ac28b99: fix: generate from openapi
299
+ - Updated dependencies [ac28b99]
300
+ - @contractspec/lib.content-gen@1.42.4
301
+ - @contractspec/lib.contracts@1.42.4
302
+ - @contractspec/lib.logger@1.42.4
303
+ - @contractspec/lib.schema@1.42.4
304
+
305
+ ## 1.42.3
306
+
307
+ ### Patch Changes
308
+
309
+ - 3f5d015: fix(tooling): cicd
310
+ - Updated dependencies [3f5d015]
311
+ - @contractspec/lib.content-gen@1.42.3
312
+ - @contractspec/lib.contracts@1.42.3
313
+ - @contractspec/lib.logger@1.42.3
314
+ - @contractspec/lib.schema@1.42.3
315
+
316
+ ## 1.42.2
317
+
318
+ ### Patch Changes
319
+
320
+ - 1f9ac4c: fix
321
+ - Updated dependencies [1f9ac4c]
322
+ - @contractspec/lib.content-gen@1.42.2
323
+ - @contractspec/lib.contracts@1.42.2
324
+ - @contractspec/lib.logger@1.42.2
325
+ - @contractspec/lib.schema@1.42.2
326
+
327
+ ## 1.42.1
328
+
329
+ ### Patch Changes
330
+
331
+ - f043995: Fix release
332
+ - Updated dependencies [f043995]
333
+ - @contractspec/lib.content-gen@1.42.1
334
+ - @contractspec/lib.contracts@1.42.1
335
+ - @contractspec/lib.logger@1.42.1
336
+ - @contractspec/lib.schema@1.42.1
337
+
338
+ ## 1.42.0
339
+
340
+ ### Minor Changes
341
+
342
+ - 8eefd9c: initial release
343
+
344
+ ### Patch Changes
345
+
346
+ - Updated dependencies [8eefd9c]
347
+ - @contractspec/lib.content-gen@1.42.0
348
+ - @contractspec/lib.contracts@1.42.0
349
+ - @contractspec/lib.logger@1.42.0
350
+ - @contractspec/lib.schema@1.42.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # Content Generation Example
2
+
3
+ Website: https://contractspec.io/
4
+
5
+
6
+ Shows how to take a ContractSpec content brief and produce marketing assets with `@contractspec/lib.content-gen`.
7
+
8
+ ## Generates
9
+
10
+ - Long-form blog post
11
+ - Landing page hero copy
12
+ - Email announcement
13
+ - Social posts
14
+ - SEO metadata
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,29 @@
1
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
2
+
3
+ //#region src/docs/content-generation.docblock.ts
4
+ registerDocBlocks([{
5
+ id: "docs.examples.content-generation",
6
+ title: "Content Generation (example)",
7
+ summary: "Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/content-generation",
11
+ tags: [
12
+ "content",
13
+ "marketing",
14
+ "example"
15
+ ],
16
+ body: `## What this example shows\n- A spec-first-ish interface for content brief inputs (typed, validated).\n- Deterministic orchestration of generators (same input → same structure).\n\n## Outputs\n- Blog intro\n- Landing hero\n- Email subject/body\n- Social post bodies\n- SEO metadata`
17
+ }, {
18
+ id: "docs.examples.content-generation.usage",
19
+ title: "Content Generation — Usage",
20
+ summary: "How to run the example and extend the brief.",
21
+ kind: "usage",
22
+ visibility: "public",
23
+ route: "/docs/examples/content-generation/usage",
24
+ tags: ["content", "usage"],
25
+ body: `## Usage\n- Call \`runContentGenerationExample()\`.\n- Modify the \`ContentBrief\` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw \`console.log\` in library code.`
26
+ }]);
27
+
28
+ //#endregion
29
+ //# sourceMappingURL=content-generation.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-generation.docblock.js","names":[],"sources":["../../src/docs/content-generation.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst blocks: DocBlock[] = [\n {\n id: 'docs.examples.content-generation',\n title: 'Content Generation (example)',\n summary:\n 'Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/content-generation',\n tags: ['content', 'marketing', 'example'],\n body: `## What this example shows\\n- A spec-first-ish interface for content brief inputs (typed, validated).\\n- Deterministic orchestration of generators (same input → same structure).\\n\\n## Outputs\\n- Blog intro\\n- Landing hero\\n- Email subject/body\\n- Social post bodies\\n- SEO metadata`,\n },\n {\n id: 'docs.examples.content-generation.usage',\n title: 'Content Generation — Usage',\n summary: 'How to run the example and extend the brief.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/content-generation/usage',\n tags: ['content', 'usage'],\n body: `## Usage\\n- Call \\`runContentGenerationExample()\\`.\\n- Modify the \\`ContentBrief\\` fields to drive different outputs.\\n\\n## Guardrails\\n- Avoid PII in briefs.\\n- Keep output logging structured; no raw \\`console.log\\` in library code.`,\n },\n];\n\nregisterDocBlocks(blocks);\n"],"mappings":";;;AA2BA,kBAxB2B,CACzB;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAW;EAAa;EAAU;CACzC,MAAM;CACP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,WAAW,QAAQ;CAC1B,MAAM;CACP,CACF,CAEwB"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "./content-generation.docblock.js";
@@ -0,0 +1,7 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/example.d.ts
4
+ declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
+ //#endregion
6
+ export { example as default };
7
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SA2BJ,4BAAA,CA3BW"}
@@ -0,0 +1,46 @@
1
+ import { defineExample } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/example.ts
4
+ const example = defineExample({
5
+ meta: {
6
+ key: "content-generation",
7
+ version: "1.0.0",
8
+ title: "Content Generation",
9
+ description: "Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",
10
+ kind: "script",
11
+ visibility: "public",
12
+ stability: "experimental",
13
+ owners: ["@platform.core"],
14
+ tags: [
15
+ "content",
16
+ "marketing",
17
+ "generation",
18
+ "ai"
19
+ ]
20
+ },
21
+ docs: {
22
+ rootDocId: "docs.examples.content-generation",
23
+ usageDocId: "docs.examples.content-generation.usage"
24
+ },
25
+ entrypoints: {
26
+ packageName: "@contractspec/example.content-generation",
27
+ docs: "./docs"
28
+ },
29
+ surfaces: {
30
+ templates: true,
31
+ sandbox: {
32
+ enabled: true,
33
+ modes: ["markdown"]
34
+ },
35
+ studio: {
36
+ enabled: true,
37
+ installable: true
38
+ },
39
+ mcp: { enabled: true }
40
+ }
41
+ });
42
+ var example_default = example;
43
+
44
+ //#endregion
45
+ export { example_default as default };
46
+ //# sourceMappingURL=example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'content-generation',\n version: '1.0.0',\n title: 'Content Generation',\n description:\n 'Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.',\n kind: 'script',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['content', 'marketing', 'generation', 'ai'],\n },\n docs: {\n rootDocId: 'docs.examples.content-generation',\n usageDocId: 'docs.examples.content-generation.usage',\n },\n entrypoints: {\n packageName: '@contractspec/example.content-generation',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAW;GAAa;GAAc;GAAK;EACnD;CACD,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,WAAW;GAAE;EAC/C,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
@@ -0,0 +1,5 @@
1
+ //#region src/generate.d.ts
2
+ declare function runContentGenerationExample(): Promise<void>;
3
+ //#endregion
4
+ export { runContentGenerationExample };
5
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","names":[],"sources":["../src/generate.ts"],"sourcesContent":[],"mappings":";iBAkBsB,2BAAA,CAAA,GAA+B"}
@@ -0,0 +1,48 @@
1
+ import { BlogGenerator, EmailCampaignGenerator, LandingPageGenerator, SocialPostGenerator } from "@contractspec/lib.content-gen/generators";
2
+ import { SeoOptimizer } from "@contractspec/lib.content-gen/seo";
3
+ import { LogLevel, Logger } from "@contractspec/lib.logger";
4
+
5
+ //#region src/generate.ts
6
+ const logger = new Logger({
7
+ level: process.env.NODE_ENV === "production" ? LogLevel.INFO : LogLevel.DEBUG,
8
+ environment: process.env.NODE_ENV || "development",
9
+ enableColors: process.env.NODE_ENV !== "production"
10
+ });
11
+ async function runContentGenerationExample() {
12
+ const brief = {
13
+ title: "AI-Native Operations Copilot",
14
+ summary: "Automates support resolutions, growth playbooks, and DevOps rituals.",
15
+ problems: ["Support queues pile up after hours", "Growth teams lack fresh experiments"],
16
+ solutions: [
17
+ "Stateful AI agents grounded in your knowledge spaces",
18
+ "CI-safe approval workflows for human review",
19
+ "Analytics + experimentation stack built into ContractSpec"
20
+ ],
21
+ metrics: ["80% auto-resolution rate", "10+ experiments shipped weekly"],
22
+ audience: {
23
+ role: "COO",
24
+ industry: "Fintech",
25
+ maturity: "scaleup"
26
+ },
27
+ callToAction: "Book a 15‑minute pilot run"
28
+ };
29
+ const blog = await new BlogGenerator().generate(brief);
30
+ const landing = await new LandingPageGenerator().generate(brief);
31
+ const email = await new EmailCampaignGenerator().generate({
32
+ brief,
33
+ variant: "announcement"
34
+ });
35
+ const social = await new SocialPostGenerator().generate(brief);
36
+ const seo = new SeoOptimizer().optimize(brief);
37
+ logger.info("Generated content assets", {
38
+ blogIntro: blog.intro,
39
+ landingHero: landing.hero,
40
+ emailSubject: email.subject,
41
+ socialPosts: social.map((post) => post.body),
42
+ seo
43
+ });
44
+ }
45
+
46
+ //#endregion
47
+ export { runContentGenerationExample };
48
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n BlogGenerator,\n EmailCampaignGenerator,\n LandingPageGenerator,\n SocialPostGenerator,\n} from '@contractspec/lib.content-gen/generators';\nimport { SeoOptimizer } from '@contractspec/lib.content-gen/seo';\nimport type { ContentBrief } from '@contractspec/lib.content-gen';\nimport { Logger, LogLevel } from '@contractspec/lib.logger';\nimport type { LoggerConfig } from '@contractspec/lib.logger/types';\n\nconst logger = new Logger({\n level: process.env.NODE_ENV === 'production' ? LogLevel.INFO : LogLevel.DEBUG,\n environment:\n (process.env.NODE_ENV as LoggerConfig['environment']) || 'development',\n enableColors: process.env.NODE_ENV !== 'production',\n});\n\nexport async function runContentGenerationExample(): Promise<void> {\n const brief: ContentBrief = {\n title: 'AI-Native Operations Copilot',\n summary:\n 'Automates support resolutions, growth playbooks, and DevOps rituals.',\n problems: [\n 'Support queues pile up after hours',\n 'Growth teams lack fresh experiments',\n ],\n solutions: [\n 'Stateful AI agents grounded in your knowledge spaces',\n 'CI-safe approval workflows for human review',\n 'Analytics + experimentation stack built into ContractSpec',\n ],\n metrics: ['80% auto-resolution rate', '10+ experiments shipped weekly'],\n audience: { role: 'COO', industry: 'Fintech', maturity: 'scaleup' },\n callToAction: 'Book a 15‑minute pilot run',\n };\n\n const blog = await new BlogGenerator().generate(brief);\n const landing = await new LandingPageGenerator().generate(brief);\n const email = await new EmailCampaignGenerator().generate({\n brief,\n variant: 'announcement',\n });\n const social = await new SocialPostGenerator().generate(brief);\n const seo = new SeoOptimizer().optimize(brief);\n\n logger.info('Generated content assets', {\n blogIntro: blog.intro,\n landingHero: landing.hero,\n emailSubject: email.subject,\n socialPosts: social.map((post) => post.body),\n seo,\n });\n}\n"],"mappings":";;;;;AAWA,MAAM,SAAS,IAAI,OAAO;CACxB,OAAO,QAAQ,IAAI,aAAa,eAAe,SAAS,OAAO,SAAS;CACxE,aACG,QAAQ,IAAI,YAA4C;CAC3D,cAAc,QAAQ,IAAI,aAAa;CACxC,CAAC;AAEF,eAAsB,8BAA6C;CACjE,MAAM,QAAsB;EAC1B,OAAO;EACP,SACE;EACF,UAAU,CACR,sCACA,sCACD;EACD,WAAW;GACT;GACA;GACA;GACD;EACD,SAAS,CAAC,4BAA4B,iCAAiC;EACvE,UAAU;GAAE,MAAM;GAAO,UAAU;GAAW,UAAU;GAAW;EACnE,cAAc;EACf;CAED,MAAM,OAAO,MAAM,IAAI,eAAe,CAAC,SAAS,MAAM;CACtD,MAAM,UAAU,MAAM,IAAI,sBAAsB,CAAC,SAAS,MAAM;CAChE,MAAM,QAAQ,MAAM,IAAI,wBAAwB,CAAC,SAAS;EACxD;EACA,SAAS;EACV,CAAC;CACF,MAAM,SAAS,MAAM,IAAI,qBAAqB,CAAC,SAAS,MAAM;CAC9D,MAAM,MAAM,IAAI,cAAc,CAAC,SAAS,MAAM;AAE9C,QAAO,KAAK,4BAA4B;EACtC,WAAW,KAAK;EAChB,aAAa,QAAQ;EACrB,cAAc,MAAM;EACpB,aAAa,OAAO,KAAK,SAAS,KAAK,KAAK;EAC5C;EACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import example from "./example.js";
2
+ import { runContentGenerationExample } from "./generate.js";
3
+ export { example, runContentGenerationExample };
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import example_default from "./example.js";
2
+ import { runContentGenerationExample } from "./generate.js";
3
+ import "./docs/index.js";
4
+
5
+ export { example_default as example, runContentGenerationExample };