@contractspec/example.product-intent 3.7.20 → 3.7.22

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.
@@ -2,31 +2,31 @@ $ contractspec-bun-build prebuild
2
2
  $ bun run build:bundle && bun run build:types
3
3
  $ contractspec-bun-build transpile
4
4
  [contractspec-bun-build] transpile target=bun root=src entries=10 noBundle=false
5
- Bundled 10 modules in 35ms
5
+ Bundled 10 modules in 51ms
6
6
 
7
7
  docs/index.js 1.23 KB (entry point)
8
8
  ./script.js 9.32 KB (entry point)
9
9
  ./sync-actions.js 9.22 KB (entry point)
10
10
  docs/product-intent.docblock.js 1.23 KB (entry point)
11
- ./index.js 8.96 KB (entry point)
12
- ./example.js 0.70 KB (entry point)
11
+ ./index.js 8.91 KB (entry point)
12
+ ./example.js 0.65 KB (entry point)
13
13
  ./load-evidence.js 5.33 KB (entry point)
14
14
  ./posthog-signals.js 4.34 KB (entry point)
15
15
  ./product-intent.discovery.js 2.44 KB (entry point)
16
- ./product-intent.feature.js 461 bytes (entry point)
16
+ ./product-intent.feature.js 470 bytes (entry point)
17
17
 
18
18
  [contractspec-bun-build] transpile target=node root=src entries=10 noBundle=false
19
- Bundled 10 modules in 26ms
19
+ Bundled 10 modules in 28ms
20
20
 
21
21
  docs/index.js 1.22 KB (entry point)
22
22
  ./script.js 9.33 KB (entry point)
23
23
  ./sync-actions.js 9.22 KB (entry point)
24
24
  docs/product-intent.docblock.js 1.22 KB (entry point)
25
- ./index.js 8.96 KB (entry point)
26
- ./example.js 0.69 KB (entry point)
25
+ ./index.js 8.91 KB (entry point)
26
+ ./example.js 0.64 KB (entry point)
27
27
  ./load-evidence.js 5.34 KB (entry point)
28
28
  ./posthog-signals.js 4.33 KB (entry point)
29
29
  ./product-intent.discovery.js 2.43 KB (entry point)
30
- ./product-intent.feature.js 453 bytes (entry point)
30
+ ./product-intent.feature.js 462 bytes (entry point)
31
31
 
32
32
  $ contractspec-bun-build types
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @contractspec/example.product-intent
2
2
 
3
+ ## 3.7.22
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: auto-bump internal dependents
8
+ - Updated dependencies because of Reduce published install and bundle size by optionalizing heavy runtime families and adding a repo dependency audit.
9
+ - @contractspec/integration.providers-impls@4.0.0
10
+ - @contractspec/lib.ai-agent@8.0.9
11
+ - @contractspec/lib.analytics@3.7.21
12
+ - @contractspec/lib.contracts-integrations@3.8.13
13
+ - @contractspec/lib.contracts-spec@5.5.0
14
+ - @contractspec/lib.product-intent-utils@3.7.21
15
+
16
+ ## 3.7.21
17
+
18
+ ### Patch Changes
19
+
20
+ - chore: auto-bump internal dependents
21
+ - Updated dependencies because of chore: auto-bump internal dependents
22
+ - Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
23
+ - 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.
24
+ - 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.
25
+ - @contractspec/integration.providers-impls@3.8.13
26
+ - @contractspec/lib.ai-agent@8.0.9
27
+ - @contractspec/lib.analytics@3.7.21
28
+ - @contractspec/lib.contracts-integrations@3.8.13
29
+ - @contractspec/lib.product-intent-utils@3.7.21
30
+ - @contractspec/lib.contracts-spec@5.5.0
31
+
3
32
  ## 3.7.20
4
33
 
5
34
  ### Patch Changes
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 ExamplesProductIntentExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
2
+ export default ExamplesProductIntentExample;
3
+ export { ExamplesProductIntentExample };
package/dist/example.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent Discovery",description:"Evidence ingestion and product-intent workflow for PM discovery.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["product-intent","discovery","pm","evidence","llm"]},docs:{rootDocId:"docs.examples.product-intent",usageDocId:"docs.examples.product-intent.usage"},entrypoints:{packageName:"@contractspec/example.product-intent",docs:"./docs"},surfaces:{templates:!1,sandbox:{enabled:!1,modes:[]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}}}),q=h;export{q as default};
2
+ import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"examples.product-intent",version:"1.0.0",title:"Product Intent",description:"Product intent example: evidence ingestion and prompt-ready outputs.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","product-intent"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.product-intent"}}),q=h;export{q as default,h as ExamplesProductIntentExample};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './example';
1
2
  export { default as example } from './example';
2
3
  export type { EvidenceLoadOptions, EvidenceLoadWithSignalsOptions, } from './load-evidence';
3
4
  export { DEFAULT_CHUNK_SIZE, DEFAULT_EVIDENCE_ROOT, DEFAULT_TRANSCRIPT_DIRS, loadEvidenceChunks, loadEvidenceChunksWithSignals, } from './load-evidence';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{defineExample as C}from"@contractspec/lib.contracts-spec/examples";var x=C({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent Discovery",description:"Evidence ingestion and product-intent workflow for PM discovery.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["product-intent","discovery","pm","evidence","llm"]},docs:{rootDocId:"docs.examples.product-intent",usageDocId:"docs.examples.product-intent.usage"},entrypoints:{packageName:"@contractspec/example.product-intent",docs:"./docs"},surfaces:{templates:!1,sandbox:{enabled:!1,modes:[]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}}}),D=x;import{PosthogAnalyticsProvider as I}from"@contractspec/integration.providers-impls/impls/posthog";import{FunnelAnalyzer as E}from"@contractspec/lib.analytics/funnel";async function Y(O){let W=[],q=w(O.dateRange),G=await F(O,q);if(G)W.push(G);let H=await S(O,q);if(H)W.push(H);let J=await y(O);if(J)W.push(J);return W}async function F(O,W){if(!O.reader.queryHogQL)return null;let q=b(O.eventNames),G=O.limit??10,H=await O.reader.queryHogQL({query:["select"," event as eventName,"," count() as total","from events","where timestamp >= {dateFrom} and timestamp < {dateTo}",q.clause?`and ${q.clause}`:"","group by eventName","order by total desc",`limit ${G}`].filter(Boolean).join(`
2
+ import{defineExample as C}from"@contractspec/lib.contracts-spec/examples";var D=C({meta:{key:"examples.product-intent",version:"1.0.0",title:"Product Intent",description:"Product intent example: evidence ingestion and prompt-ready outputs.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","product-intent"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.product-intent"}}),x=D;import{PosthogAnalyticsProvider as I}from"@contractspec/integration.providers-impls/impls/posthog";import{FunnelAnalyzer as F}from"@contractspec/lib.analytics/funnel";async function Y(O){let W=[],q=w(O.dateRange),G=await S(O,q);if(G)W.push(G);let H=await E(O,q);if(H)W.push(H);let J=await y(O);if(J)W.push(J);return W}async function S(O,W){if(!O.reader.queryHogQL)return null;let q=b(O.eventNames),G=O.limit??10,H=await O.reader.queryHogQL({query:["select"," event as eventName,"," count() as total","from events","where timestamp >= {dateFrom} and timestamp < {dateTo}",q.clause?`and ${q.clause}`:"","group by eventName","order by total desc",`limit ${G}`].filter(Boolean).join(`
3
3
  `),values:{dateFrom:W.from.toISOString(),dateTo:W.to.toISOString(),...q.values}}),J=R(H);if(J.length===0)return null;let V=J.map((Q)=>{let Z=N(Q.eventName)??"unknown",X=h(Q.total);return`- ${Z}: ${X}`});return{chunkId:`posthog:event_summary:${W.from.toISOString()}`,text:[`PostHog event summary (${W.from.toISOString()} \u2192 ${W.to.toISOString()}):`,...V].join(`
4
- `),meta:{source:"posthog",kind:"event_summary",dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function S(O,W){if(!O.funnel)return null;if(!O.reader.getEvents)return null;let q=[],G=O.funnel.steps.map((Q)=>Q.eventName);for(let Q of G)(await O.reader.getEvents({event:Q,dateRange:{from:W.from,to:W.to},limit:O.limit??500})).results.forEach((X)=>{q.push({name:X.event,userId:X.distinctId,tenantId:typeof X.properties?.tenantId==="string"?X.properties.tenantId:void 0,timestamp:X.timestamp,properties:X.properties})});if(q.length===0)return null;let V=new E().analyze(q,O.funnel).steps.map((Q)=>{return`- ${Q.step.eventName}: ${Q.count} (conversion ${Q.conversionRate}, drop-off ${Q.dropOffRate})`});return{chunkId:`posthog:funnel:${O.funnel.name}`,text:[`PostHog funnel analysis \u2014 ${O.funnel.name}:`,...V].join(`
4
+ `),meta:{source:"posthog",kind:"event_summary",dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function E(O,W){if(!O.funnel)return null;if(!O.reader.getEvents)return null;let q=[],G=O.funnel.steps.map((Q)=>Q.eventName);for(let Q of G)(await O.reader.getEvents({event:Q,dateRange:{from:W.from,to:W.to},limit:O.limit??500})).results.forEach((X)=>{q.push({name:X.event,userId:X.distinctId,tenantId:typeof X.properties?.tenantId==="string"?X.properties.tenantId:void 0,timestamp:X.timestamp,properties:X.properties})});if(q.length===0)return null;let V=new F().analyze(q,O.funnel).steps.map((Q)=>{return`- ${Q.step.eventName}: ${Q.count} (conversion ${Q.conversionRate}, drop-off ${Q.dropOffRate})`});return{chunkId:`posthog:funnel:${O.funnel.name}`,text:[`PostHog funnel analysis \u2014 ${O.funnel.name}:`,...V].join(`
5
5
  `),meta:{source:"posthog",kind:"funnel",funnelName:O.funnel.name,dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function y(O){if(!O.includeFeatureFlags)return null;if(!O.reader.getFeatureFlags)return null;let W=await O.reader.getFeatureFlags({limit:10});if(!W.results.length)return null;return{chunkId:"posthog:feature_flags",text:["PostHog feature flags:",...W.results.map((G)=>{let H=G.key??"unknown",J=G.active?"active":"inactive";return`- ${H}: ${J}`})].join(`
6
- `),meta:{source:"posthog",kind:"feature_flags"}}}function w(O){let W=new Date,q=O?.from instanceof Date?O.from:O?.from?new Date(O.from):new Date(W.getTime()-2592000000),G=O?.to instanceof Date?O.to:O?.to?new Date(O.to):W;return{from:q,to:G}}function b(O){if(!O||O.length===0)return{};if(O.length===1)return{clause:"event = {event0}",values:{event0:O[0]}};let W={};return{clause:`(${O.map((G,H)=>{return W[`event${H}`]=G,`event = {event${H}}`}).join(" or ")})`,values:W}}function R(O){if(!Array.isArray(O.results)||!Array.isArray(O.columns))return[];let W=O.columns;return O.results.flatMap((q)=>{if(!Array.isArray(q))return[];let G={};return W.forEach((H,J)=>{G[H]=q[J]}),[G]})}function N(O){if(typeof O==="string"&&O.trim())return O;if(typeof O==="number")return String(O);return null}function h(O){if(typeof O==="number"&&Number.isFinite(O))return O;if(typeof O==="string"&&O.trim()){let W=Number(O);if(Number.isFinite(W))return W}return 0}function k(O={}){let W=process.env.POSTHOG_PROJECT_ID,q=process.env.POSTHOG_PERSONAL_API_KEY;if(!W||!q)return null;let G=U("POSTHOG_EVIDENCE_LOOKBACK_DAYS",O.defaultLookbackDays??30),H=U("POSTHOG_EVIDENCE_LIMIT",O.defaultLimit??10),J=new Date,V=new Date(J.getTime()-G*24*60*60*1000),Q=T("POSTHOG_EVIDENCE_EVENTS"),Z=T("POSTHOG_EVIDENCE_FUNNEL_STEPS"),X=Z&&Z.length?{name:"posthog-evidence-funnel",steps:Z.map((B,L)=>({id:`step_${L+1}`,eventName:B}))}:void 0;return{reader:new I({host:process.env.POSTHOG_HOST,projectId:W,personalApiKey:q}),dateRange:{from:V,to:J},eventNames:Q,limit:H,funnel:X,includeFeatureFlags:m("POSTHOG_EVIDENCE_FEATURE_FLAGS",!0)}}function T(O){let W=process.env[O];if(!W)return;return W.split(",").map((q)=>q.trim()).filter(Boolean)}function U(O,W){let q=process.env[O];if(!q)return W;let G=Number(q);return Number.isFinite(G)?G:W}function m(O,W){let q=process.env[O];if(q===void 0)return W;return q.toLowerCase()==="true"}import _ from"fs";import $ from"path";import{fileURLToPath as f}from"url";var g=$.dirname(f(import.meta.url)),j=$.join(g,"../evidence"),M=["interviews","tickets","public"],P=800;function d(O){let W=O.indexOf("---");if(W===-1)return O;let q=O.indexOf("---",W+3);if(q===-1)return O;return O.slice(q+3).trimStart()}function c(O,W,q){let G=[],H=W.trim();for(let J=0,V=0;J<H.length;V+=1){let Q=H.slice(J,J+q);G.push({chunkId:`${O}#c_${String(V).padStart(2,"0")}`,text:Q,meta:{source:O}}),J+=q}return G}function A(O={}){let W=O.evidenceRoot??j,q=O.transcriptDirs??M,G=O.chunkSize??P,H=[];for(let J of q){let V=$.join(W,J);if(!_.existsSync(V))continue;for(let Q of _.readdirSync(V)){if($.extname(Q).toLowerCase()!==".md")continue;let X=$.join(V,Q),K=_.readFileSync(X,"utf8"),B=d(K),L=$.parse(Q).name,z=c(L,B,G);H.push(...z)}}return H}async function v(O={}){let W=A(O);if(!O.posthog)return W;let q=await Y(O.posthog);return[...W,...q]}import{OwnersEnum as u,StabilityEnum as p}from"@contractspec/lib.contracts-spec/ownership";import{defineProductIntentSpec as r}from"@contractspec/lib.contracts-spec/product-intent/spec";var JO=r({id:"product-intent.discovery.activation",meta:{key:"product-intent.discovery.activation",version:"1.0.0",title:"Product Intent Discovery",description:"Discovery contract for activation friction using transcripts, analytics signals, and generated tasks.",domain:"product",owners:[u.PlatformCore],tags:["product-intent","discovery","activation","analytics"],stability:p.Experimental,goal:"Prioritize the next activation improvement with grounded evidence.",context:"Evidence is collected from interview transcripts, support tickets, and PostHog funnels before turning into task-ready outputs."},question:"Which activation and onboarding friction should we prioritize next?",runtimeContext:{evidenceRoot:"packages/examples/product-intent/evidence",analyticsProvider:"posthog"},tickets:{tickets:[{ticketId:"PI-101",title:"Add a guided onboarding checklist",summary:"Give new users an explicit checklist after signup so they can see the next activation milestone.",evidenceIds:["INT-002","INT-014","PH-dropoff-checkout"],acceptanceCriteria:["Users see a checklist within the first session.","Checklist completion is tracked in analytics."],priority:"high",tags:["activation","onboarding"]}]},tasks:{packId:"product-intent.discovery.activation.tasks",patchId:"product-intent.discovery.activation.patch",overview:"Introduce a checklist-driven onboarding path and instrument it for activation measurement.",tasks:[{id:"task-ui-checklist",title:"Model the onboarding checklist surface",surface:["ui","docs"],why:"The product intent needs a visible activation guide and matching contract docs.",acceptance:["A checklist surface is defined in contracts.","Documentation explains the activation milestone mapping."],agentPrompt:"Add the onboarding checklist contract surface and document the milestone states."},{id:"task-analytics-checklist",title:"Track checklist completion events",surface:["api","tests"],why:"Success must be measurable after rollout.",acceptance:["Checklist completion emits analytics events.","Tests cover the event contract and payload shape."],agentPrompt:"Emit activation checklist events and add test coverage for the telemetry payloads.",dependsOn:["task-ui-checklist"]}]}});import{defineFeature as i}from"@contractspec/lib.contracts-spec";var XO=i({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{k as resolvePosthogEvidenceOptionsFromEnv,Y as loadPosthogEvidenceChunks,v as loadEvidenceChunksWithSignals,A as loadEvidenceChunks,D as example,XO as ProductIntentFeature,JO as ProductIntentDiscoverySpec,M as DEFAULT_TRANSCRIPT_DIRS,j as DEFAULT_EVIDENCE_ROOT,P as DEFAULT_CHUNK_SIZE};
6
+ `),meta:{source:"posthog",kind:"feature_flags"}}}function w(O){let W=new Date,q=O?.from instanceof Date?O.from:O?.from?new Date(O.from):new Date(W.getTime()-2592000000),G=O?.to instanceof Date?O.to:O?.to?new Date(O.to):W;return{from:q,to:G}}function b(O){if(!O||O.length===0)return{};if(O.length===1)return{clause:"event = {event0}",values:{event0:O[0]}};let W={};return{clause:`(${O.map((G,H)=>{return W[`event${H}`]=G,`event = {event${H}}`}).join(" or ")})`,values:W}}function R(O){if(!Array.isArray(O.results)||!Array.isArray(O.columns))return[];let W=O.columns;return O.results.flatMap((q)=>{if(!Array.isArray(q))return[];let G={};return W.forEach((H,J)=>{G[H]=q[J]}),[G]})}function N(O){if(typeof O==="string"&&O.trim())return O;if(typeof O==="number")return String(O);return null}function h(O){if(typeof O==="number"&&Number.isFinite(O))return O;if(typeof O==="string"&&O.trim()){let W=Number(O);if(Number.isFinite(W))return W}return 0}function k(O={}){let W=process.env.POSTHOG_PROJECT_ID,q=process.env.POSTHOG_PERSONAL_API_KEY;if(!W||!q)return null;let G=U("POSTHOG_EVIDENCE_LOOKBACK_DAYS",O.defaultLookbackDays??30),H=U("POSTHOG_EVIDENCE_LIMIT",O.defaultLimit??10),J=new Date,V=new Date(J.getTime()-G*24*60*60*1000),Q=T("POSTHOG_EVIDENCE_EVENTS"),Z=T("POSTHOG_EVIDENCE_FUNNEL_STEPS"),X=Z&&Z.length?{name:"posthog-evidence-funnel",steps:Z.map((B,L)=>({id:`step_${L+1}`,eventName:B}))}:void 0;return{reader:new I({host:process.env.POSTHOG_HOST,projectId:W,personalApiKey:q}),dateRange:{from:V,to:J},eventNames:Q,limit:H,funnel:X,includeFeatureFlags:m("POSTHOG_EVIDENCE_FEATURE_FLAGS",!0)}}function T(O){let W=process.env[O];if(!W)return;return W.split(",").map((q)=>q.trim()).filter(Boolean)}function U(O,W){let q=process.env[O];if(!q)return W;let G=Number(q);return Number.isFinite(G)?G:W}function m(O,W){let q=process.env[O];if(q===void 0)return W;return q.toLowerCase()==="true"}import _ from"fs";import $ from"path";import{fileURLToPath as f}from"url";var g=$.dirname(f(import.meta.url)),j=$.join(g,"../evidence"),M=["interviews","tickets","public"],A=800;function d(O){let W=O.indexOf("---");if(W===-1)return O;let q=O.indexOf("---",W+3);if(q===-1)return O;return O.slice(q+3).trimStart()}function c(O,W,q){let G=[],H=W.trim();for(let J=0,V=0;J<H.length;V+=1){let Q=H.slice(J,J+q);G.push({chunkId:`${O}#c_${String(V).padStart(2,"0")}`,text:Q,meta:{source:O}}),J+=q}return G}function P(O={}){let W=O.evidenceRoot??j,q=O.transcriptDirs??M,G=O.chunkSize??A,H=[];for(let J of q){let V=$.join(W,J);if(!_.existsSync(V))continue;for(let Q of _.readdirSync(V)){if($.extname(Q).toLowerCase()!==".md")continue;let X=$.join(V,Q),K=_.readFileSync(X,"utf8"),B=d(K),L=$.parse(Q).name,z=c(L,B,G);H.push(...z)}}return H}async function v(O={}){let W=P(O);if(!O.posthog)return W;let q=await Y(O.posthog);return[...W,...q]}import{OwnersEnum as u,StabilityEnum as p}from"@contractspec/lib.contracts-spec/ownership";import{defineProductIntentSpec as r}from"@contractspec/lib.contracts-spec/product-intent/spec";var JO=r({id:"product-intent.discovery.activation",meta:{key:"product-intent.discovery.activation",version:"1.0.0",title:"Product Intent Discovery",description:"Discovery contract for activation friction using transcripts, analytics signals, and generated tasks.",domain:"product",owners:[u.PlatformCore],tags:["product-intent","discovery","activation","analytics"],stability:p.Experimental,goal:"Prioritize the next activation improvement with grounded evidence.",context:"Evidence is collected from interview transcripts, support tickets, and PostHog funnels before turning into task-ready outputs."},question:"Which activation and onboarding friction should we prioritize next?",runtimeContext:{evidenceRoot:"packages/examples/product-intent/evidence",analyticsProvider:"posthog"},tickets:{tickets:[{ticketId:"PI-101",title:"Add a guided onboarding checklist",summary:"Give new users an explicit checklist after signup so they can see the next activation milestone.",evidenceIds:["INT-002","INT-014","PH-dropoff-checkout"],acceptanceCriteria:["Users see a checklist within the first session.","Checklist completion is tracked in analytics."],priority:"high",tags:["activation","onboarding"]}]},tasks:{packId:"product-intent.discovery.activation.tasks",patchId:"product-intent.discovery.activation.patch",overview:"Introduce a checklist-driven onboarding path and instrument it for activation measurement.",tasks:[{id:"task-ui-checklist",title:"Model the onboarding checklist surface",surface:["ui","docs"],why:"The product intent needs a visible activation guide and matching contract docs.",acceptance:["A checklist surface is defined in contracts.","Documentation explains the activation milestone mapping."],agentPrompt:"Add the onboarding checklist contract surface and document the milestone states."},{id:"task-analytics-checklist",title:"Track checklist completion events",surface:["api","tests"],why:"Success must be measurable after rollout.",acceptance:["Checklist completion emits analytics events.","Tests cover the event contract and payload shape."],agentPrompt:"Emit activation checklist events and add test coverage for the telemetry payloads.",dependsOn:["task-ui-checklist"]}]}});import{defineFeature as i}from"@contractspec/lib.contracts-spec/features";var XO=i({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{k as resolvePosthogEvidenceOptionsFromEnv,Y as loadPosthogEvidenceChunks,v as loadEvidenceChunksWithSignals,P as loadEvidenceChunks,x as example,XO as ProductIntentFeature,JO as ProductIntentDiscoverySpec,D as ExamplesProductIntentExample,M as DEFAULT_TRANSCRIPT_DIRS,j as DEFAULT_EVIDENCE_ROOT,A as DEFAULT_CHUNK_SIZE};
@@ -1 +1 @@
1
- import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent Discovery",description:"Evidence ingestion and product-intent workflow for PM discovery.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["product-intent","discovery","pm","evidence","llm"]},docs:{rootDocId:"docs.examples.product-intent",usageDocId:"docs.examples.product-intent.usage"},entrypoints:{packageName:"@contractspec/example.product-intent",docs:"./docs"},surfaces:{templates:!1,sandbox:{enabled:!1,modes:[]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}}}),q=h;export{q as default};
1
+ import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"examples.product-intent",version:"1.0.0",title:"Product Intent",description:"Product intent example: evidence ingestion and prompt-ready outputs.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","product-intent"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.product-intent"}}),q=h;export{q as default,h as ExamplesProductIntentExample};
@@ -1,5 +1,5 @@
1
- import{defineExample as C}from"@contractspec/lib.contracts-spec/examples";var x=C({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent Discovery",description:"Evidence ingestion and product-intent workflow for PM discovery.",kind:"script",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["product-intent","discovery","pm","evidence","llm"]},docs:{rootDocId:"docs.examples.product-intent",usageDocId:"docs.examples.product-intent.usage"},entrypoints:{packageName:"@contractspec/example.product-intent",docs:"./docs"},surfaces:{templates:!1,sandbox:{enabled:!1,modes:[]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}}}),D=x;import{PosthogAnalyticsProvider as I}from"@contractspec/integration.providers-impls/impls/posthog";import{FunnelAnalyzer as E}from"@contractspec/lib.analytics/funnel";async function Y(O){let W=[],q=w(O.dateRange),G=await F(O,q);if(G)W.push(G);let H=await S(O,q);if(H)W.push(H);let J=await y(O);if(J)W.push(J);return W}async function F(O,W){if(!O.reader.queryHogQL)return null;let q=b(O.eventNames),G=O.limit??10,H=await O.reader.queryHogQL({query:["select"," event as eventName,"," count() as total","from events","where timestamp >= {dateFrom} and timestamp < {dateTo}",q.clause?`and ${q.clause}`:"","group by eventName","order by total desc",`limit ${G}`].filter(Boolean).join(`
1
+ import{defineExample as C}from"@contractspec/lib.contracts-spec/examples";var D=C({meta:{key:"examples.product-intent",version:"1.0.0",title:"Product Intent",description:"Product intent example: evidence ingestion and prompt-ready outputs.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","product-intent"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.product-intent"}}),x=D;import{PosthogAnalyticsProvider as I}from"@contractspec/integration.providers-impls/impls/posthog";import{FunnelAnalyzer as F}from"@contractspec/lib.analytics/funnel";async function Y(O){let W=[],q=w(O.dateRange),G=await S(O,q);if(G)W.push(G);let H=await E(O,q);if(H)W.push(H);let J=await y(O);if(J)W.push(J);return W}async function S(O,W){if(!O.reader.queryHogQL)return null;let q=b(O.eventNames),G=O.limit??10,H=await O.reader.queryHogQL({query:["select"," event as eventName,"," count() as total","from events","where timestamp >= {dateFrom} and timestamp < {dateTo}",q.clause?`and ${q.clause}`:"","group by eventName","order by total desc",`limit ${G}`].filter(Boolean).join(`
2
2
  `),values:{dateFrom:W.from.toISOString(),dateTo:W.to.toISOString(),...q.values}}),J=R(H);if(J.length===0)return null;let V=J.map((Q)=>{let Z=N(Q.eventName)??"unknown",X=h(Q.total);return`- ${Z}: ${X}`});return{chunkId:`posthog:event_summary:${W.from.toISOString()}`,text:[`PostHog event summary (${W.from.toISOString()} → ${W.to.toISOString()}):`,...V].join(`
3
- `),meta:{source:"posthog",kind:"event_summary",dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function S(O,W){if(!O.funnel)return null;if(!O.reader.getEvents)return null;let q=[],G=O.funnel.steps.map((Q)=>Q.eventName);for(let Q of G)(await O.reader.getEvents({event:Q,dateRange:{from:W.from,to:W.to},limit:O.limit??500})).results.forEach((X)=>{q.push({name:X.event,userId:X.distinctId,tenantId:typeof X.properties?.tenantId==="string"?X.properties.tenantId:void 0,timestamp:X.timestamp,properties:X.properties})});if(q.length===0)return null;let V=new E().analyze(q,O.funnel).steps.map((Q)=>{return`- ${Q.step.eventName}: ${Q.count} (conversion ${Q.conversionRate}, drop-off ${Q.dropOffRate})`});return{chunkId:`posthog:funnel:${O.funnel.name}`,text:[`PostHog funnel analysis — ${O.funnel.name}:`,...V].join(`
3
+ `),meta:{source:"posthog",kind:"event_summary",dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function E(O,W){if(!O.funnel)return null;if(!O.reader.getEvents)return null;let q=[],G=O.funnel.steps.map((Q)=>Q.eventName);for(let Q of G)(await O.reader.getEvents({event:Q,dateRange:{from:W.from,to:W.to},limit:O.limit??500})).results.forEach((X)=>{q.push({name:X.event,userId:X.distinctId,tenantId:typeof X.properties?.tenantId==="string"?X.properties.tenantId:void 0,timestamp:X.timestamp,properties:X.properties})});if(q.length===0)return null;let V=new F().analyze(q,O.funnel).steps.map((Q)=>{return`- ${Q.step.eventName}: ${Q.count} (conversion ${Q.conversionRate}, drop-off ${Q.dropOffRate})`});return{chunkId:`posthog:funnel:${O.funnel.name}`,text:[`PostHog funnel analysis — ${O.funnel.name}:`,...V].join(`
4
4
  `),meta:{source:"posthog",kind:"funnel",funnelName:O.funnel.name,dateFrom:W.from.toISOString(),dateTo:W.to.toISOString()}}}async function y(O){if(!O.includeFeatureFlags)return null;if(!O.reader.getFeatureFlags)return null;let W=await O.reader.getFeatureFlags({limit:10});if(!W.results.length)return null;return{chunkId:"posthog:feature_flags",text:["PostHog feature flags:",...W.results.map((G)=>{let H=G.key??"unknown",J=G.active?"active":"inactive";return`- ${H}: ${J}`})].join(`
5
- `),meta:{source:"posthog",kind:"feature_flags"}}}function w(O){let W=new Date,q=O?.from instanceof Date?O.from:O?.from?new Date(O.from):new Date(W.getTime()-2592000000),G=O?.to instanceof Date?O.to:O?.to?new Date(O.to):W;return{from:q,to:G}}function b(O){if(!O||O.length===0)return{};if(O.length===1)return{clause:"event = {event0}",values:{event0:O[0]}};let W={};return{clause:`(${O.map((G,H)=>{return W[`event${H}`]=G,`event = {event${H}}`}).join(" or ")})`,values:W}}function R(O){if(!Array.isArray(O.results)||!Array.isArray(O.columns))return[];let W=O.columns;return O.results.flatMap((q)=>{if(!Array.isArray(q))return[];let G={};return W.forEach((H,J)=>{G[H]=q[J]}),[G]})}function N(O){if(typeof O==="string"&&O.trim())return O;if(typeof O==="number")return String(O);return null}function h(O){if(typeof O==="number"&&Number.isFinite(O))return O;if(typeof O==="string"&&O.trim()){let W=Number(O);if(Number.isFinite(W))return W}return 0}function k(O={}){let W=process.env.POSTHOG_PROJECT_ID,q=process.env.POSTHOG_PERSONAL_API_KEY;if(!W||!q)return null;let G=U("POSTHOG_EVIDENCE_LOOKBACK_DAYS",O.defaultLookbackDays??30),H=U("POSTHOG_EVIDENCE_LIMIT",O.defaultLimit??10),J=new Date,V=new Date(J.getTime()-G*24*60*60*1000),Q=T("POSTHOG_EVIDENCE_EVENTS"),Z=T("POSTHOG_EVIDENCE_FUNNEL_STEPS"),X=Z&&Z.length?{name:"posthog-evidence-funnel",steps:Z.map((B,L)=>({id:`step_${L+1}`,eventName:B}))}:void 0;return{reader:new I({host:process.env.POSTHOG_HOST,projectId:W,personalApiKey:q}),dateRange:{from:V,to:J},eventNames:Q,limit:H,funnel:X,includeFeatureFlags:m("POSTHOG_EVIDENCE_FEATURE_FLAGS",!0)}}function T(O){let W=process.env[O];if(!W)return;return W.split(",").map((q)=>q.trim()).filter(Boolean)}function U(O,W){let q=process.env[O];if(!q)return W;let G=Number(q);return Number.isFinite(G)?G:W}function m(O,W){let q=process.env[O];if(q===void 0)return W;return q.toLowerCase()==="true"}import _ from"node:fs";import $ from"node:path";import{fileURLToPath as f}from"node:url";var g=$.dirname(f(import.meta.url)),j=$.join(g,"../evidence"),M=["interviews","tickets","public"],P=800;function d(O){let W=O.indexOf("---");if(W===-1)return O;let q=O.indexOf("---",W+3);if(q===-1)return O;return O.slice(q+3).trimStart()}function c(O,W,q){let G=[],H=W.trim();for(let J=0,V=0;J<H.length;V+=1){let Q=H.slice(J,J+q);G.push({chunkId:`${O}#c_${String(V).padStart(2,"0")}`,text:Q,meta:{source:O}}),J+=q}return G}function A(O={}){let W=O.evidenceRoot??j,q=O.transcriptDirs??M,G=O.chunkSize??P,H=[];for(let J of q){let V=$.join(W,J);if(!_.existsSync(V))continue;for(let Q of _.readdirSync(V)){if($.extname(Q).toLowerCase()!==".md")continue;let X=$.join(V,Q),K=_.readFileSync(X,"utf8"),B=d(K),L=$.parse(Q).name,z=c(L,B,G);H.push(...z)}}return H}async function v(O={}){let W=A(O);if(!O.posthog)return W;let q=await Y(O.posthog);return[...W,...q]}import{OwnersEnum as u,StabilityEnum as p}from"@contractspec/lib.contracts-spec/ownership";import{defineProductIntentSpec as r}from"@contractspec/lib.contracts-spec/product-intent/spec";var JO=r({id:"product-intent.discovery.activation",meta:{key:"product-intent.discovery.activation",version:"1.0.0",title:"Product Intent Discovery",description:"Discovery contract for activation friction using transcripts, analytics signals, and generated tasks.",domain:"product",owners:[u.PlatformCore],tags:["product-intent","discovery","activation","analytics"],stability:p.Experimental,goal:"Prioritize the next activation improvement with grounded evidence.",context:"Evidence is collected from interview transcripts, support tickets, and PostHog funnels before turning into task-ready outputs."},question:"Which activation and onboarding friction should we prioritize next?",runtimeContext:{evidenceRoot:"packages/examples/product-intent/evidence",analyticsProvider:"posthog"},tickets:{tickets:[{ticketId:"PI-101",title:"Add a guided onboarding checklist",summary:"Give new users an explicit checklist after signup so they can see the next activation milestone.",evidenceIds:["INT-002","INT-014","PH-dropoff-checkout"],acceptanceCriteria:["Users see a checklist within the first session.","Checklist completion is tracked in analytics."],priority:"high",tags:["activation","onboarding"]}]},tasks:{packId:"product-intent.discovery.activation.tasks",patchId:"product-intent.discovery.activation.patch",overview:"Introduce a checklist-driven onboarding path and instrument it for activation measurement.",tasks:[{id:"task-ui-checklist",title:"Model the onboarding checklist surface",surface:["ui","docs"],why:"The product intent needs a visible activation guide and matching contract docs.",acceptance:["A checklist surface is defined in contracts.","Documentation explains the activation milestone mapping."],agentPrompt:"Add the onboarding checklist contract surface and document the milestone states."},{id:"task-analytics-checklist",title:"Track checklist completion events",surface:["api","tests"],why:"Success must be measurable after rollout.",acceptance:["Checklist completion emits analytics events.","Tests cover the event contract and payload shape."],agentPrompt:"Emit activation checklist events and add test coverage for the telemetry payloads.",dependsOn:["task-ui-checklist"]}]}});import{defineFeature as i}from"@contractspec/lib.contracts-spec";var XO=i({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{k as resolvePosthogEvidenceOptionsFromEnv,Y as loadPosthogEvidenceChunks,v as loadEvidenceChunksWithSignals,A as loadEvidenceChunks,D as example,XO as ProductIntentFeature,JO as ProductIntentDiscoverySpec,M as DEFAULT_TRANSCRIPT_DIRS,j as DEFAULT_EVIDENCE_ROOT,P as DEFAULT_CHUNK_SIZE};
5
+ `),meta:{source:"posthog",kind:"feature_flags"}}}function w(O){let W=new Date,q=O?.from instanceof Date?O.from:O?.from?new Date(O.from):new Date(W.getTime()-2592000000),G=O?.to instanceof Date?O.to:O?.to?new Date(O.to):W;return{from:q,to:G}}function b(O){if(!O||O.length===0)return{};if(O.length===1)return{clause:"event = {event0}",values:{event0:O[0]}};let W={};return{clause:`(${O.map((G,H)=>{return W[`event${H}`]=G,`event = {event${H}}`}).join(" or ")})`,values:W}}function R(O){if(!Array.isArray(O.results)||!Array.isArray(O.columns))return[];let W=O.columns;return O.results.flatMap((q)=>{if(!Array.isArray(q))return[];let G={};return W.forEach((H,J)=>{G[H]=q[J]}),[G]})}function N(O){if(typeof O==="string"&&O.trim())return O;if(typeof O==="number")return String(O);return null}function h(O){if(typeof O==="number"&&Number.isFinite(O))return O;if(typeof O==="string"&&O.trim()){let W=Number(O);if(Number.isFinite(W))return W}return 0}function k(O={}){let W=process.env.POSTHOG_PROJECT_ID,q=process.env.POSTHOG_PERSONAL_API_KEY;if(!W||!q)return null;let G=U("POSTHOG_EVIDENCE_LOOKBACK_DAYS",O.defaultLookbackDays??30),H=U("POSTHOG_EVIDENCE_LIMIT",O.defaultLimit??10),J=new Date,V=new Date(J.getTime()-G*24*60*60*1000),Q=T("POSTHOG_EVIDENCE_EVENTS"),Z=T("POSTHOG_EVIDENCE_FUNNEL_STEPS"),X=Z&&Z.length?{name:"posthog-evidence-funnel",steps:Z.map((B,L)=>({id:`step_${L+1}`,eventName:B}))}:void 0;return{reader:new I({host:process.env.POSTHOG_HOST,projectId:W,personalApiKey:q}),dateRange:{from:V,to:J},eventNames:Q,limit:H,funnel:X,includeFeatureFlags:m("POSTHOG_EVIDENCE_FEATURE_FLAGS",!0)}}function T(O){let W=process.env[O];if(!W)return;return W.split(",").map((q)=>q.trim()).filter(Boolean)}function U(O,W){let q=process.env[O];if(!q)return W;let G=Number(q);return Number.isFinite(G)?G:W}function m(O,W){let q=process.env[O];if(q===void 0)return W;return q.toLowerCase()==="true"}import _ from"node:fs";import $ from"node:path";import{fileURLToPath as f}from"node:url";var g=$.dirname(f(import.meta.url)),j=$.join(g,"../evidence"),M=["interviews","tickets","public"],A=800;function d(O){let W=O.indexOf("---");if(W===-1)return O;let q=O.indexOf("---",W+3);if(q===-1)return O;return O.slice(q+3).trimStart()}function c(O,W,q){let G=[],H=W.trim();for(let J=0,V=0;J<H.length;V+=1){let Q=H.slice(J,J+q);G.push({chunkId:`${O}#c_${String(V).padStart(2,"0")}`,text:Q,meta:{source:O}}),J+=q}return G}function P(O={}){let W=O.evidenceRoot??j,q=O.transcriptDirs??M,G=O.chunkSize??A,H=[];for(let J of q){let V=$.join(W,J);if(!_.existsSync(V))continue;for(let Q of _.readdirSync(V)){if($.extname(Q).toLowerCase()!==".md")continue;let X=$.join(V,Q),K=_.readFileSync(X,"utf8"),B=d(K),L=$.parse(Q).name,z=c(L,B,G);H.push(...z)}}return H}async function v(O={}){let W=P(O);if(!O.posthog)return W;let q=await Y(O.posthog);return[...W,...q]}import{OwnersEnum as u,StabilityEnum as p}from"@contractspec/lib.contracts-spec/ownership";import{defineProductIntentSpec as r}from"@contractspec/lib.contracts-spec/product-intent/spec";var JO=r({id:"product-intent.discovery.activation",meta:{key:"product-intent.discovery.activation",version:"1.0.0",title:"Product Intent Discovery",description:"Discovery contract for activation friction using transcripts, analytics signals, and generated tasks.",domain:"product",owners:[u.PlatformCore],tags:["product-intent","discovery","activation","analytics"],stability:p.Experimental,goal:"Prioritize the next activation improvement with grounded evidence.",context:"Evidence is collected from interview transcripts, support tickets, and PostHog funnels before turning into task-ready outputs."},question:"Which activation and onboarding friction should we prioritize next?",runtimeContext:{evidenceRoot:"packages/examples/product-intent/evidence",analyticsProvider:"posthog"},tickets:{tickets:[{ticketId:"PI-101",title:"Add a guided onboarding checklist",summary:"Give new users an explicit checklist after signup so they can see the next activation milestone.",evidenceIds:["INT-002","INT-014","PH-dropoff-checkout"],acceptanceCriteria:["Users see a checklist within the first session.","Checklist completion is tracked in analytics."],priority:"high",tags:["activation","onboarding"]}]},tasks:{packId:"product-intent.discovery.activation.tasks",patchId:"product-intent.discovery.activation.patch",overview:"Introduce a checklist-driven onboarding path and instrument it for activation measurement.",tasks:[{id:"task-ui-checklist",title:"Model the onboarding checklist surface",surface:["ui","docs"],why:"The product intent needs a visible activation guide and matching contract docs.",acceptance:["A checklist surface is defined in contracts.","Documentation explains the activation milestone mapping."],agentPrompt:"Add the onboarding checklist contract surface and document the milestone states."},{id:"task-analytics-checklist",title:"Track checklist completion events",surface:["api","tests"],why:"Success must be measurable after rollout.",acceptance:["Checklist completion emits analytics events.","Tests cover the event contract and payload shape."],agentPrompt:"Emit activation checklist events and add test coverage for the telemetry payloads.",dependsOn:["task-ui-checklist"]}]}});import{defineFeature as i}from"@contractspec/lib.contracts-spec/features";var XO=i({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{k as resolvePosthogEvidenceOptionsFromEnv,Y as loadPosthogEvidenceChunks,v as loadEvidenceChunksWithSignals,P as loadEvidenceChunks,x as example,XO as ProductIntentFeature,JO as ProductIntentDiscoverySpec,D as ExamplesProductIntentExample,M as DEFAULT_TRANSCRIPT_DIRS,j as DEFAULT_EVIDENCE_ROOT,A as DEFAULT_CHUNK_SIZE};
@@ -1 +1 @@
1
- import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{j as ProductIntentFeature};
1
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{j as ProductIntentFeature};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{j as ProductIntentFeature};
2
+ import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"product-intent",version:"1.0.0",title:"Product Intent",description:"Evidence ingestion, PostHog signals, and transcript-to-tickets discovery workflow",domain:"product",owners:["@examples"],tags:["product","intent","evidence","posthog"],stability:"experimental"},telemetry:[{key:"product-intent.telemetry",version:"1.0.0"}],docs:[]});export{j as ProductIntentFeature};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.product-intent",
3
- "version": "3.7.20",
3
+ "version": "3.7.22",
4
4
  "description": "Product intent example: evidence ingestion and prompt-ready outputs.",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -89,17 +89,17 @@
89
89
  "typecheck": "tsc --noEmit"
90
90
  },
91
91
  "dependencies": {
92
- "@contractspec/lib.analytics": "3.7.20",
93
- "@contractspec/lib.contracts-spec": "5.4.0",
94
- "@contractspec/lib.contracts-integrations": "3.8.12",
95
- "@contractspec/lib.ai-agent": "8.0.8",
96
- "@contractspec/lib.product-intent-utils": "3.7.20",
97
- "@contractspec/integration.providers-impls": "3.8.12"
92
+ "@contractspec/lib.analytics": "3.7.21",
93
+ "@contractspec/lib.contracts-spec": "5.5.0",
94
+ "@contractspec/lib.contracts-integrations": "3.8.13",
95
+ "@contractspec/lib.ai-agent": "8.0.9",
96
+ "@contractspec/lib.product-intent-utils": "3.7.21",
97
+ "@contractspec/integration.providers-impls": "4.0.0"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@contractspec/tool.typescript": "3.7.13",
101
101
  "typescript": "^5.9.3",
102
- "@contractspec/tool.bun": "3.7.14"
102
+ "@contractspec/tool.bun": "3.7.16"
103
103
  },
104
104
  "publishConfig": {
105
105
  "access": "public",
package/src/example.ts CHANGED
@@ -1,32 +1,28 @@
1
1
  import { defineExample } from '@contractspec/lib.contracts-spec/examples';
2
2
 
3
- const example = defineExample({
3
+ const ExamplesProductIntentExample = defineExample({
4
4
  meta: {
5
- key: 'product-intent',
5
+ key: 'examples.product-intent',
6
6
  version: '1.0.0',
7
- title: 'Product Intent Discovery',
7
+ title: 'Product Intent',
8
8
  description:
9
- 'Evidence ingestion and product-intent workflow for PM discovery.',
10
- kind: 'script',
11
- visibility: 'public',
9
+ 'Product intent example: evidence ingestion and prompt-ready outputs.',
10
+ kind: 'template',
11
+ visibility: 'experimental',
12
12
  stability: 'experimental',
13
- owners: ['@platform.core'],
14
- tags: ['product-intent', 'discovery', 'pm', 'evidence', 'llm'],
15
- },
16
- docs: {
17
- rootDocId: 'docs.examples.product-intent',
18
- usageDocId: 'docs.examples.product-intent.usage',
19
- },
20
- entrypoints: {
21
- packageName: '@contractspec/example.product-intent',
22
- docs: './docs',
13
+ owners: ['@contractspec-core'],
14
+ tags: ['package', 'examples', 'product-intent'],
23
15
  },
24
16
  surfaces: {
25
- templates: false,
26
- sandbox: { enabled: false, modes: [] },
17
+ templates: true,
18
+ sandbox: { enabled: true, modes: ['playground', 'specs'] },
27
19
  studio: { enabled: false, installable: false },
28
20
  mcp: { enabled: false },
29
21
  },
22
+ entrypoints: {
23
+ packageName: '@contractspec/example.product-intent',
24
+ },
30
25
  });
31
26
 
32
- export default example;
27
+ export default ExamplesProductIntentExample;
28
+ export { ExamplesProductIntentExample };
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './example';
1
2
  export { default as example } from './example';
2
3
  export type {
3
4
  EvidenceLoadOptions,
@@ -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 ProductIntentFeature = defineFeature({
4
4
  meta: {