@contractspec/example.content-generation 3.7.19 → 3.7.21

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.
@@ -1,34 +1,35 @@
1
- $ contractspec-bun-build prebuild
2
- $ bun run build:bundle && bun run build:types
3
- $ contractspec-bun-build transpile
4
- [contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
5
- Bundled 6 modules in 18ms
6
-
7
- ./content-generation.feature.js 471 bytes (entry point)
8
- ./index.js 3.63 KB (entry point)
9
- docs/index.js 1.18 KB (entry point)
10
- docs/content-generation.docblock.js 1.18 KB (entry point)
11
- ./example.js 0.74 KB (entry point)
12
- ./generate.js 1.28 KB (entry point)
13
-
14
- [contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
15
- Bundled 6 modules in 16ms
16
-
17
- ./content-generation.feature.js 463 bytes (entry point)
18
- ./index.js 3.61 KB (entry point)
19
- docs/index.js 1.17 KB (entry point)
20
- docs/content-generation.docblock.js 1.17 KB (entry point)
21
- ./example.js 0.74 KB (entry point)
22
- ./generate.js 1.27 KB (entry point)
23
-
24
- [contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
25
- Bundled 6 modules in 17ms
26
-
27
- ./content-generation.feature.js 463 bytes (entry point)
28
- ./index.js 3.61 KB (entry point)
29
- docs/index.js 1.17 KB (entry point)
30
- docs/content-generation.docblock.js 1.17 KB (entry point)
31
- ./example.js 0.74 KB (entry point)
32
- ./generate.js 1.27 KB (entry point)
33
-
34
- $ contractspec-bun-build types
1
+
2
+ $ contractspec-bun-build prebuild
3
+ $ bun run build:bundle && bun run build:types
4
+ $ contractspec-bun-build transpile
5
+ [contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
6
+ Bundled 6 modules in 10ms
7
+
8
+ ./content-generation.feature.js 480 bytes (entry point)
9
+ ./index.js 3.56 KB (entry point)
10
+ docs/index.js 1.18 KB (entry point)
11
+ docs/content-generation.docblock.js 1.18 KB (entry point)
12
+ ./example.js 0.66 KB (entry point)
13
+ ./generate.js 1.28 KB (entry point)
14
+
15
+ [contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
16
+ Bundled 6 modules in 11ms
17
+
18
+ ./content-generation.feature.js 472 bytes (entry point)
19
+ ./index.js 3.54 KB (entry point)
20
+ docs/index.js 1.17 KB (entry point)
21
+ docs/content-generation.docblock.js 1.17 KB (entry point)
22
+ ./example.js 0.65 KB (entry point)
23
+ ./generate.js 1.27 KB (entry point)
24
+
25
+ [contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
26
+ Bundled 6 modules in 10ms
27
+
28
+ ./content-generation.feature.js 472 bytes (entry point)
29
+ ./index.js 3.54 KB (entry point)
30
+ docs/index.js 1.17 KB (entry point)
31
+ docs/content-generation.docblock.js 1.17 KB (entry point)
32
+ ./example.js 0.65 KB (entry point)
33
+ ./generate.js 1.27 KB (entry point)
34
+
35
+ $ contractspec-bun-build types
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @contractspec/example.content-generation
2
2
 
3
+ ## 3.7.21
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: auto-bump internal dependents
8
+ - Updated dependencies because of chore: auto-bump internal dependents
9
+ - Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
10
+ - Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
11
+ - Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
12
+ - @contractspec/lib.content-gen@3.7.21
13
+ - @contractspec/lib.logger@3.7.14
14
+ - @contractspec/lib.contracts-spec@5.5.0
15
+
16
+ ## 3.7.20
17
+
18
+ ### Patch Changes
19
+
20
+ - chore: auto-bump internal dependents
21
+ - Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
22
+ - Updated dependencies because of chore: auto-bump internal dependents
23
+ - Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
24
+ - Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
25
+ - Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
26
+ - @contractspec/lib.contracts-spec@5.4.0
27
+ - @contractspec/lib.content-gen@3.7.20
28
+
3
29
  ## 3.7.19
4
30
 
5
31
  ### Patch Changes
@@ -1 +1 @@
1
- import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
1
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
@@ -1 +1 @@
1
- import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
1
+ import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
@@ -1,4 +1,4 @@
1
- import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as A}from"@contractspec/lib.contracts-spec/docs";var H=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
1
+ import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
2
2
  - A spec-first-ish interface for content brief inputs (typed, validated).
3
3
  - Deterministic orchestration of generators (same input → same structure).
4
4
 
@@ -7,4 +7,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
7
7
  - Landing hero
8
8
  - Email subject/body
9
9
  - Social post bodies
10
- - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];A(H);import{defineExample as I}from"@contractspec/lib.contracts-spec";var J=I({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),K=J;import{BlogGenerator as M,EmailCampaignGenerator as N,LandingPageGenerator as Q,SocialPostGenerator as R}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as T}from"@contractspec/lib.content-gen/seo";import{Logger as U,LogLevel as V}from"@contractspec/lib.logger";var W=new U({level:V.INFO,environment:"production",enableColors:!1});async function O(){let x={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},h=await new M().generate(x),j=await new Q().generate(x),m=await new N().generate({brief:x,variant:"announcement"}),q=await new R().generate(x),u=new T().optimize(x);W.info("Generated content assets",{blogIntro:h.intro,landingHero:j.hero,emailSubject:m.subject,socialPosts:q.map((w)=>w.body),seo:u})}export{O as runContentGenerationExample,K as example,Y as ContentGenerationFeature};
10
+ - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
2
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
package/dist/example.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- declare const example: import("@contractspec/lib.contracts-spec").ExampleSpec;
2
- export default example;
1
+ declare const ExamplesContentGenerationExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
2
+ export default ExamplesContentGenerationExample;
3
+ export { ExamplesContentGenerationExample };
package/dist/example.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
2
+ import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './content-generation.feature';
2
2
  export { default as example } from './example';
3
3
  export * from './generate';
4
4
  import './docs';
5
+ export * from './example';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as A}from"@contractspec/lib.contracts-spec/docs";var H=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
2
+ import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
3
3
  - A spec-first-ish interface for content brief inputs (typed, validated).
4
4
  - Deterministic orchestration of generators (same input \u2192 same structure).
5
5
 
@@ -8,4 +8,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
8
8
  - Landing hero
9
9
  - Email subject/body
10
10
  - Social post bodies
11
- - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation \u2014 Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];A(H);import{defineExample as I}from"@contractspec/lib.contracts-spec";var J=I({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),K=J;import{BlogGenerator as M,EmailCampaignGenerator as N,LandingPageGenerator as Q,SocialPostGenerator as R}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as T}from"@contractspec/lib.content-gen/seo";import{Logger as U,LogLevel as V}from"@contractspec/lib.logger";var W=new U({level:V.INFO,environment:"production",enableColors:!1});async function O(){let x={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15\u2011minute pilot run"},h=await new M().generate(x),j=await new Q().generate(x),m=await new N().generate({brief:x,variant:"announcement"}),q=await new R().generate(x),u=new T().optimize(x);W.info("Generated content assets",{blogIntro:h.intro,landingHero:j.hero,emailSubject:m.subject,socialPosts:q.map((w)=>w.body),seo:u})}export{O as runContentGenerationExample,K as example,Y as ContentGenerationFeature};
11
+ - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation \u2014 Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15\u2011minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
@@ -1 +1 @@
1
- import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
1
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
@@ -1 +1 @@
1
- import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
1
+ import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
@@ -1,4 +1,4 @@
1
- import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as A}from"@contractspec/lib.contracts-spec/docs";var H=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
1
+ import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
2
2
  - A spec-first-ish interface for content brief inputs (typed, validated).
3
3
  - Deterministic orchestration of generators (same input → same structure).
4
4
 
@@ -7,4 +7,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
7
7
  - Landing hero
8
8
  - Email subject/body
9
9
  - Social post bodies
10
- - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];A(H);import{defineExample as I}from"@contractspec/lib.contracts-spec";var J=I({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["content","marketing","generation","ai"]},docs:{rootDocId:"docs.examples.content-generation",usageDocId:"docs.examples.content-generation.usage"},entrypoints:{packageName:"@contractspec/example.content-generation",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),K=J;import{BlogGenerator as M,EmailCampaignGenerator as N,LandingPageGenerator as Q,SocialPostGenerator as R}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as T}from"@contractspec/lib.content-gen/seo";import{Logger as U,LogLevel as V}from"@contractspec/lib.logger";var W=new U({level:V.INFO,environment:"production",enableColors:!1});async function O(){let x={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},h=await new M().generate(x),j=await new Q().generate(x),m=await new N().generate({brief:x,variant:"announcement"}),q=await new R().generate(x),u=new T().optimize(x);W.info("Generated content assets",{blogIntro:h.intro,landingHero:j.hero,emailSubject:m.subject,socialPosts:q.map((w)=>w.body),seo:u})}export{O as runContentGenerationExample,K as example,Y as ContentGenerationFeature};
10
+ - SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],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."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.content-generation",
3
- "version": "3.7.19",
3
+ "version": "3.7.21",
4
4
  "description": "Content generation example using @contractspec/lib.content-gen.",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -64,14 +64,14 @@
64
64
  "typecheck": "tsc --noEmit"
65
65
  },
66
66
  "dependencies": {
67
- "@contractspec/lib.contracts-spec": "5.3.0",
68
- "@contractspec/lib.content-gen": "3.7.19",
69
- "@contractspec/lib.logger": "3.7.13"
67
+ "@contractspec/lib.contracts-spec": "5.5.0",
68
+ "@contractspec/lib.content-gen": "3.7.21",
69
+ "@contractspec/lib.logger": "3.7.14"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@contractspec/tool.typescript": "3.7.13",
73
73
  "typescript": "^5.9.3",
74
- "@contractspec/tool.bun": "3.7.14"
74
+ "@contractspec/tool.bun": "3.7.15"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public",
@@ -1,4 +1,4 @@
1
- import { defineFeature } from '@contractspec/lib.contracts-spec';
1
+ import { defineFeature } from '@contractspec/lib.contracts-spec/features';
2
2
 
3
3
  export const ContentGenerationFeature = defineFeature({
4
4
  meta: {
package/src/example.ts CHANGED
@@ -1,32 +1,28 @@
1
- import { defineExample } from '@contractspec/lib.contracts-spec';
1
+ import { defineExample } from '@contractspec/lib.contracts-spec/examples';
2
2
 
3
- const example = defineExample({
3
+ const ExamplesContentGenerationExample = defineExample({
4
4
  meta: {
5
- key: 'content-generation',
5
+ key: 'examples.content-generation',
6
6
  version: '1.0.0',
7
7
  title: 'Content Generation',
8
8
  description:
9
- 'Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @contractspec/lib.content-gen.',
10
- kind: 'script',
11
- visibility: 'public',
9
+ 'Content generation example using @contractspec/lib.content-gen.',
10
+ kind: 'template',
11
+ visibility: 'experimental',
12
12
  stability: 'experimental',
13
- owners: ['@platform.core'],
14
- tags: ['content', 'marketing', 'generation', 'ai'],
13
+ owners: ['@contractspec-core'],
14
+ tags: ['package', 'examples', 'content-generation'],
15
15
  },
16
- docs: {
17
- rootDocId: 'docs.examples.content-generation',
18
- usageDocId: 'docs.examples.content-generation.usage',
16
+ surfaces: {
17
+ templates: true,
18
+ sandbox: { enabled: true, modes: ['playground', 'specs'] },
19
+ studio: { enabled: false, installable: false },
20
+ mcp: { enabled: false },
19
21
  },
20
22
  entrypoints: {
21
23
  packageName: '@contractspec/example.content-generation',
22
- docs: './docs',
23
- },
24
- surfaces: {
25
- templates: true,
26
- sandbox: { enabled: true, modes: ['markdown'] },
27
- studio: { enabled: true, installable: true },
28
- mcp: { enabled: true },
29
24
  },
30
25
  });
31
26
 
32
- export default example;
27
+ export default ExamplesContentGenerationExample;
28
+ export { ExamplesContentGenerationExample };
package/src/index.ts CHANGED
@@ -2,3 +2,5 @@ export * from './content-generation.feature';
2
2
  export { default as example } from './example';
3
3
  export * from './generate';
4
4
  import './docs';
5
+
6
+ export * from './example';