@contractspec/lib.lifecycle 1.56.1 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,187 @@
1
+ // src/types/stages.ts
2
+ var LifecycleStage;
3
+ ((LifecycleStage2) => {
4
+ LifecycleStage2[LifecycleStage2["Exploration"] = 0] = "Exploration";
5
+ LifecycleStage2[LifecycleStage2["ProblemSolutionFit"] = 1] = "ProblemSolutionFit";
6
+ LifecycleStage2[LifecycleStage2["MvpEarlyTraction"] = 2] = "MvpEarlyTraction";
7
+ LifecycleStage2[LifecycleStage2["ProductMarketFit"] = 3] = "ProductMarketFit";
8
+ LifecycleStage2[LifecycleStage2["GrowthScaleUp"] = 4] = "GrowthScaleUp";
9
+ LifecycleStage2[LifecycleStage2["ExpansionPlatform"] = 5] = "ExpansionPlatform";
10
+ LifecycleStage2[LifecycleStage2["MaturityRenewal"] = 6] = "MaturityRenewal";
11
+ })(LifecycleStage ||= {});
12
+ var LIFECYCLE_STAGE_ORDER = [
13
+ 0 /* Exploration */,
14
+ 1 /* ProblemSolutionFit */,
15
+ 2 /* MvpEarlyTraction */,
16
+ 3 /* ProductMarketFit */,
17
+ 4 /* GrowthScaleUp */,
18
+ 5 /* ExpansionPlatform */,
19
+ 6 /* MaturityRenewal */
20
+ ];
21
+ var LIFECYCLE_STAGE_META = {
22
+ [0 /* Exploration */]: {
23
+ id: 0 /* Exploration */,
24
+ order: 0,
25
+ slug: "exploration",
26
+ name: "Exploration / Ideation",
27
+ question: "Is there a problem worth my time?",
28
+ signals: [
29
+ "20+ discovery interviews",
30
+ "Clear problem statement",
31
+ "Named ICP"
32
+ ],
33
+ traps: ["Branding before discovery", "Premature tooling decisions"],
34
+ focusAreas: ["Customer discovery", "Problem definition", "Segment clarity"]
35
+ },
36
+ [1 /* ProblemSolutionFit */]: {
37
+ id: 1 /* ProblemSolutionFit */,
38
+ order: 1,
39
+ slug: "problem-solution-fit",
40
+ name: "Problem–Solution Fit",
41
+ question: "Do people care enough about this solution?",
42
+ signals: ["Prototype reuse", "Referral energy", "Pre-pay interest"],
43
+ traps: ["“Market is huge” without users", "Skipping qualitative loops"],
44
+ focusAreas: ["Solution hypothesis", "Value messaging", "Feedback capture"]
45
+ },
46
+ [2 /* MvpEarlyTraction */]: {
47
+ id: 2 /* MvpEarlyTraction */,
48
+ order: 2,
49
+ slug: "mvp-early-traction",
50
+ name: "MVP & Early Traction",
51
+ question: "Can we get real usage and learn fast?",
52
+ signals: ["20–50 named active users", "Weekly releases", "Noisy feedback"],
53
+ traps: ["Overbuilt infra for 10 users", "Undefined retention metric"],
54
+ focusAreas: ["Activation", "Cohort tracking", "Feedback rituals"]
55
+ },
56
+ [3 /* ProductMarketFit */]: {
57
+ id: 3 /* ProductMarketFit */,
58
+ order: 3,
59
+ slug: "product-market-fit",
60
+ name: "Product–Market Fit",
61
+ question: "Is this pulling us forward?",
62
+ signals: [
63
+ "Retention without heroics",
64
+ "Organic word-of-mouth",
65
+ "Value stories"
66
+ ],
67
+ traps: ["Hero growth that does not scale", "Ignoring churn signals"],
68
+ focusAreas: ["Retention", "Reliability", "ICP clarity"]
69
+ },
70
+ [4 /* GrowthScaleUp */]: {
71
+ id: 4 /* GrowthScaleUp */,
72
+ order: 4,
73
+ slug: "growth-scale-up",
74
+ name: "Growth / Scale-up",
75
+ question: "Can we grow this repeatably?",
76
+ signals: [
77
+ "Predictable channels",
78
+ "Specialized hires",
79
+ "Unit economics on track"
80
+ ],
81
+ traps: [
82
+ "Paid spend masking retention gaps",
83
+ "Infra debt blocking launches"
84
+ ],
85
+ focusAreas: ["Ops systems", "Growth loops", "Reliability engineering"]
86
+ },
87
+ [5 /* ExpansionPlatform */]: {
88
+ id: 5 /* ExpansionPlatform */,
89
+ order: 5,
90
+ slug: "expansion-platform",
91
+ name: "Expansion / Platform",
92
+ question: "What is the next growth curve?",
93
+ signals: ["Stable core metrics", "Partner/API demand", "Ecosystem pull"],
94
+ traps: ["Platform theater before wedge is solid"],
95
+ focusAreas: ["Partnerships", "APIs", "New market validation"]
96
+ },
97
+ [6 /* MaturityRenewal */]: {
98
+ id: 6 /* MaturityRenewal */,
99
+ order: 6,
100
+ slug: "maturity-renewal",
101
+ name: "Maturity / Renewal",
102
+ question: "Optimize, reinvent, or sunset?",
103
+ signals: ["Margin focus", "Portfolio bets", "Narrative refresh"],
104
+ traps: ["Assuming past success is enough"],
105
+ focusAreas: ["Cost optimization", "Reinvention bets", "Sunset planning"]
106
+ }
107
+ };
108
+ var getLifecycleStageBySlug = (slug) => {
109
+ const entry = Object.values(LIFECYCLE_STAGE_META).find((meta) => meta.slug === slug);
110
+ if (!entry) {
111
+ throw new Error(`Unknown lifecycle stage slug: ${slug}`);
112
+ }
113
+ return entry.id;
114
+ };
115
+ // src/types/axes.ts
116
+ var ProductPhase;
117
+ ((ProductPhase2) => {
118
+ ProductPhase2["Sketch"] = "Sketch";
119
+ ProductPhase2["Prototype"] = "Prototype";
120
+ ProductPhase2["Mvp"] = "MVP";
121
+ ProductPhase2["V1"] = "V1";
122
+ ProductPhase2["Ecosystem"] = "Ecosystem";
123
+ })(ProductPhase ||= {});
124
+ var CompanyPhase;
125
+ ((CompanyPhase2) => {
126
+ CompanyPhase2["Solo"] = "Solo";
127
+ CompanyPhase2["TinyTeam"] = "TinyTeam";
128
+ CompanyPhase2["FunctionalOrg"] = "FunctionalOrg";
129
+ CompanyPhase2["MultiTeam"] = "MultiTeam";
130
+ CompanyPhase2["Bureaucratic"] = "Bureaucratic";
131
+ })(CompanyPhase ||= {});
132
+ var CapitalPhase;
133
+ ((CapitalPhase2) => {
134
+ CapitalPhase2["Bootstrapped"] = "Bootstrapped";
135
+ CapitalPhase2["PreSeed"] = "PreSeed";
136
+ CapitalPhase2["Seed"] = "Seed";
137
+ CapitalPhase2["SeriesAorB"] = "SeriesAorB";
138
+ CapitalPhase2["LateStage"] = "LateStage";
139
+ })(CapitalPhase ||= {});
140
+ // src/utils/formatters.ts
141
+ var formatStageSummary = (stage, assessment) => {
142
+ const meta = LIFECYCLE_STAGE_META[stage];
143
+ const title = `Stage ${meta.order} · ${meta.name}`;
144
+ const axesSummary = assessment ? summarizeAxes(assessment.axes) : [];
145
+ return {
146
+ title,
147
+ question: meta.question,
148
+ highlights: meta.signals,
149
+ traps: meta.traps,
150
+ focusAreas: assessment?.gaps?.length ? assessment.gaps : meta.focusAreas,
151
+ axesSummary
152
+ };
153
+ };
154
+ var summarizeAxes = (axes) => [
155
+ `Product: ${axes.product}`,
156
+ `Company: ${axes.company}`,
157
+ `Capital: ${axes.capital}`
158
+ ];
159
+ var rankStageCandidates = (scores) => [...scores].sort((a, b) => {
160
+ if (b.score === a.score) {
161
+ return b.confidence - a.confidence;
162
+ }
163
+ return b.score - a.score;
164
+ });
165
+ var createRecommendationDigest = (recommendation) => {
166
+ const meta = LIFECYCLE_STAGE_META[recommendation.stage];
167
+ const topAction = recommendation.actions[0];
168
+ const actionCopy = topAction ? `${topAction.title} (${topAction.estimatedImpact} impact)` : "Focus on upcoming milestones.";
169
+ return `Next up for ${meta.name}: ${actionCopy}`;
170
+ };
171
+ var getStageLabel = (stage) => LIFECYCLE_STAGE_META[stage].name;
172
+ var getStageOrderIndex = (stage) => LIFECYCLE_STAGE_ORDER.indexOf(stage);
173
+ export {
174
+ summarizeAxes,
175
+ rankStageCandidates,
176
+ getStageOrderIndex,
177
+ getStageLabel,
178
+ getLifecycleStageBySlug,
179
+ formatStageSummary,
180
+ createRecommendationDigest,
181
+ ProductPhase,
182
+ LifecycleStage,
183
+ LIFECYCLE_STAGE_ORDER,
184
+ LIFECYCLE_STAGE_META,
185
+ CompanyPhase,
186
+ CapitalPhase
187
+ };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { LIFECYCLE_STAGE_META, LIFECYCLE_STAGE_ORDER, LifecycleStage, LifecycleStageMetadata, LifecycleStageSlug, getLifecycleStageBySlug } from "./types/stages.js";
2
- import { CapitalPhase, CompanyPhase, LifecycleAxes, LifecycleAxis, LifecycleAxisSnapshot, ProductPhase } from "./types/axes.js";
3
- import { LifecycleAssessmentInput, LifecycleMetricSnapshot, LifecycleScore, LifecycleSignal, LifecycleSignalKind, LifecycleSignalSource } from "./types/signals.js";
4
- import { LifecycleAction, LifecycleAssessment, LifecycleMilestone, LifecycleMilestoneCategory, LifecycleRecommendation } from "./types/milestones.js";
5
- import { StageSummary, createRecommendationDigest, formatStageSummary, getStageLabel, getStageOrderIndex, rankStageCandidates, summarizeAxes } from "./utils/formatters.js";
6
- export { CapitalPhase, CompanyPhase, LIFECYCLE_STAGE_META, LIFECYCLE_STAGE_ORDER, LifecycleAction, LifecycleAssessment, LifecycleAssessmentInput, LifecycleAxes, LifecycleAxis, LifecycleAxisSnapshot, LifecycleMetricSnapshot, LifecycleMilestone, LifecycleMilestoneCategory, LifecycleRecommendation, LifecycleScore, LifecycleSignal, LifecycleSignalKind, LifecycleSignalSource, LifecycleStage, LifecycleStageMetadata, LifecycleStageSlug, ProductPhase, StageSummary, createRecommendationDigest, formatStageSummary, getLifecycleStageBySlug, getStageLabel, getStageOrderIndex, rankStageCandidates, summarizeAxes };
1
+ export * from './types/stages';
2
+ export * from './types/axes';
3
+ export * from './types/signals';
4
+ export * from './types/milestones';
5
+ export * from './utils/formatters';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,188 @@
1
- import { LIFECYCLE_STAGE_META, LIFECYCLE_STAGE_ORDER, LifecycleStage, getLifecycleStageBySlug } from "./types/stages.js";
2
- import { CapitalPhase, CompanyPhase, ProductPhase } from "./types/axes.js";
3
- import "./types/signals.js";
4
- import "./types/milestones.js";
5
- import { createRecommendationDigest, formatStageSummary, getStageLabel, getStageOrderIndex, rankStageCandidates, summarizeAxes } from "./utils/formatters.js";
6
-
7
- export { CapitalPhase, CompanyPhase, LIFECYCLE_STAGE_META, LIFECYCLE_STAGE_ORDER, LifecycleStage, ProductPhase, createRecommendationDigest, formatStageSummary, getLifecycleStageBySlug, getStageLabel, getStageOrderIndex, rankStageCandidates, summarizeAxes };
1
+ // @bun
2
+ // src/types/stages.ts
3
+ var LifecycleStage;
4
+ ((LifecycleStage2) => {
5
+ LifecycleStage2[LifecycleStage2["Exploration"] = 0] = "Exploration";
6
+ LifecycleStage2[LifecycleStage2["ProblemSolutionFit"] = 1] = "ProblemSolutionFit";
7
+ LifecycleStage2[LifecycleStage2["MvpEarlyTraction"] = 2] = "MvpEarlyTraction";
8
+ LifecycleStage2[LifecycleStage2["ProductMarketFit"] = 3] = "ProductMarketFit";
9
+ LifecycleStage2[LifecycleStage2["GrowthScaleUp"] = 4] = "GrowthScaleUp";
10
+ LifecycleStage2[LifecycleStage2["ExpansionPlatform"] = 5] = "ExpansionPlatform";
11
+ LifecycleStage2[LifecycleStage2["MaturityRenewal"] = 6] = "MaturityRenewal";
12
+ })(LifecycleStage ||= {});
13
+ var LIFECYCLE_STAGE_ORDER = [
14
+ 0 /* Exploration */,
15
+ 1 /* ProblemSolutionFit */,
16
+ 2 /* MvpEarlyTraction */,
17
+ 3 /* ProductMarketFit */,
18
+ 4 /* GrowthScaleUp */,
19
+ 5 /* ExpansionPlatform */,
20
+ 6 /* MaturityRenewal */
21
+ ];
22
+ var LIFECYCLE_STAGE_META = {
23
+ [0 /* Exploration */]: {
24
+ id: 0 /* Exploration */,
25
+ order: 0,
26
+ slug: "exploration",
27
+ name: "Exploration / Ideation",
28
+ question: "Is there a problem worth my time?",
29
+ signals: [
30
+ "20+ discovery interviews",
31
+ "Clear problem statement",
32
+ "Named ICP"
33
+ ],
34
+ traps: ["Branding before discovery", "Premature tooling decisions"],
35
+ focusAreas: ["Customer discovery", "Problem definition", "Segment clarity"]
36
+ },
37
+ [1 /* ProblemSolutionFit */]: {
38
+ id: 1 /* ProblemSolutionFit */,
39
+ order: 1,
40
+ slug: "problem-solution-fit",
41
+ name: "Problem\u2013Solution Fit",
42
+ question: "Do people care enough about this solution?",
43
+ signals: ["Prototype reuse", "Referral energy", "Pre-pay interest"],
44
+ traps: ["\u201CMarket is huge\u201D without users", "Skipping qualitative loops"],
45
+ focusAreas: ["Solution hypothesis", "Value messaging", "Feedback capture"]
46
+ },
47
+ [2 /* MvpEarlyTraction */]: {
48
+ id: 2 /* MvpEarlyTraction */,
49
+ order: 2,
50
+ slug: "mvp-early-traction",
51
+ name: "MVP & Early Traction",
52
+ question: "Can we get real usage and learn fast?",
53
+ signals: ["20\u201350 named active users", "Weekly releases", "Noisy feedback"],
54
+ traps: ["Overbuilt infra for 10 users", "Undefined retention metric"],
55
+ focusAreas: ["Activation", "Cohort tracking", "Feedback rituals"]
56
+ },
57
+ [3 /* ProductMarketFit */]: {
58
+ id: 3 /* ProductMarketFit */,
59
+ order: 3,
60
+ slug: "product-market-fit",
61
+ name: "Product\u2013Market Fit",
62
+ question: "Is this pulling us forward?",
63
+ signals: [
64
+ "Retention without heroics",
65
+ "Organic word-of-mouth",
66
+ "Value stories"
67
+ ],
68
+ traps: ["Hero growth that does not scale", "Ignoring churn signals"],
69
+ focusAreas: ["Retention", "Reliability", "ICP clarity"]
70
+ },
71
+ [4 /* GrowthScaleUp */]: {
72
+ id: 4 /* GrowthScaleUp */,
73
+ order: 4,
74
+ slug: "growth-scale-up",
75
+ name: "Growth / Scale-up",
76
+ question: "Can we grow this repeatably?",
77
+ signals: [
78
+ "Predictable channels",
79
+ "Specialized hires",
80
+ "Unit economics on track"
81
+ ],
82
+ traps: [
83
+ "Paid spend masking retention gaps",
84
+ "Infra debt blocking launches"
85
+ ],
86
+ focusAreas: ["Ops systems", "Growth loops", "Reliability engineering"]
87
+ },
88
+ [5 /* ExpansionPlatform */]: {
89
+ id: 5 /* ExpansionPlatform */,
90
+ order: 5,
91
+ slug: "expansion-platform",
92
+ name: "Expansion / Platform",
93
+ question: "What is the next growth curve?",
94
+ signals: ["Stable core metrics", "Partner/API demand", "Ecosystem pull"],
95
+ traps: ["Platform theater before wedge is solid"],
96
+ focusAreas: ["Partnerships", "APIs", "New market validation"]
97
+ },
98
+ [6 /* MaturityRenewal */]: {
99
+ id: 6 /* MaturityRenewal */,
100
+ order: 6,
101
+ slug: "maturity-renewal",
102
+ name: "Maturity / Renewal",
103
+ question: "Optimize, reinvent, or sunset?",
104
+ signals: ["Margin focus", "Portfolio bets", "Narrative refresh"],
105
+ traps: ["Assuming past success is enough"],
106
+ focusAreas: ["Cost optimization", "Reinvention bets", "Sunset planning"]
107
+ }
108
+ };
109
+ var getLifecycleStageBySlug = (slug) => {
110
+ const entry = Object.values(LIFECYCLE_STAGE_META).find((meta) => meta.slug === slug);
111
+ if (!entry) {
112
+ throw new Error(`Unknown lifecycle stage slug: ${slug}`);
113
+ }
114
+ return entry.id;
115
+ };
116
+ // src/types/axes.ts
117
+ var ProductPhase;
118
+ ((ProductPhase2) => {
119
+ ProductPhase2["Sketch"] = "Sketch";
120
+ ProductPhase2["Prototype"] = "Prototype";
121
+ ProductPhase2["Mvp"] = "MVP";
122
+ ProductPhase2["V1"] = "V1";
123
+ ProductPhase2["Ecosystem"] = "Ecosystem";
124
+ })(ProductPhase ||= {});
125
+ var CompanyPhase;
126
+ ((CompanyPhase2) => {
127
+ CompanyPhase2["Solo"] = "Solo";
128
+ CompanyPhase2["TinyTeam"] = "TinyTeam";
129
+ CompanyPhase2["FunctionalOrg"] = "FunctionalOrg";
130
+ CompanyPhase2["MultiTeam"] = "MultiTeam";
131
+ CompanyPhase2["Bureaucratic"] = "Bureaucratic";
132
+ })(CompanyPhase ||= {});
133
+ var CapitalPhase;
134
+ ((CapitalPhase2) => {
135
+ CapitalPhase2["Bootstrapped"] = "Bootstrapped";
136
+ CapitalPhase2["PreSeed"] = "PreSeed";
137
+ CapitalPhase2["Seed"] = "Seed";
138
+ CapitalPhase2["SeriesAorB"] = "SeriesAorB";
139
+ CapitalPhase2["LateStage"] = "LateStage";
140
+ })(CapitalPhase ||= {});
141
+ // src/utils/formatters.ts
142
+ var formatStageSummary = (stage, assessment) => {
143
+ const meta = LIFECYCLE_STAGE_META[stage];
144
+ const title = `Stage ${meta.order} \xB7 ${meta.name}`;
145
+ const axesSummary = assessment ? summarizeAxes(assessment.axes) : [];
146
+ return {
147
+ title,
148
+ question: meta.question,
149
+ highlights: meta.signals,
150
+ traps: meta.traps,
151
+ focusAreas: assessment?.gaps?.length ? assessment.gaps : meta.focusAreas,
152
+ axesSummary
153
+ };
154
+ };
155
+ var summarizeAxes = (axes) => [
156
+ `Product: ${axes.product}`,
157
+ `Company: ${axes.company}`,
158
+ `Capital: ${axes.capital}`
159
+ ];
160
+ var rankStageCandidates = (scores) => [...scores].sort((a, b) => {
161
+ if (b.score === a.score) {
162
+ return b.confidence - a.confidence;
163
+ }
164
+ return b.score - a.score;
165
+ });
166
+ var createRecommendationDigest = (recommendation) => {
167
+ const meta = LIFECYCLE_STAGE_META[recommendation.stage];
168
+ const topAction = recommendation.actions[0];
169
+ const actionCopy = topAction ? `${topAction.title} (${topAction.estimatedImpact} impact)` : "Focus on upcoming milestones.";
170
+ return `Next up for ${meta.name}: ${actionCopy}`;
171
+ };
172
+ var getStageLabel = (stage) => LIFECYCLE_STAGE_META[stage].name;
173
+ var getStageOrderIndex = (stage) => LIFECYCLE_STAGE_ORDER.indexOf(stage);
174
+ export {
175
+ summarizeAxes,
176
+ rankStageCandidates,
177
+ getStageOrderIndex,
178
+ getStageLabel,
179
+ getLifecycleStageBySlug,
180
+ formatStageSummary,
181
+ createRecommendationDigest,
182
+ ProductPhase,
183
+ LifecycleStage,
184
+ LIFECYCLE_STAGE_ORDER,
185
+ LIFECYCLE_STAGE_META,
186
+ CompanyPhase,
187
+ CapitalPhase
188
+ };
@@ -0,0 +1,187 @@
1
+ // src/types/stages.ts
2
+ var LifecycleStage;
3
+ ((LifecycleStage2) => {
4
+ LifecycleStage2[LifecycleStage2["Exploration"] = 0] = "Exploration";
5
+ LifecycleStage2[LifecycleStage2["ProblemSolutionFit"] = 1] = "ProblemSolutionFit";
6
+ LifecycleStage2[LifecycleStage2["MvpEarlyTraction"] = 2] = "MvpEarlyTraction";
7
+ LifecycleStage2[LifecycleStage2["ProductMarketFit"] = 3] = "ProductMarketFit";
8
+ LifecycleStage2[LifecycleStage2["GrowthScaleUp"] = 4] = "GrowthScaleUp";
9
+ LifecycleStage2[LifecycleStage2["ExpansionPlatform"] = 5] = "ExpansionPlatform";
10
+ LifecycleStage2[LifecycleStage2["MaturityRenewal"] = 6] = "MaturityRenewal";
11
+ })(LifecycleStage ||= {});
12
+ var LIFECYCLE_STAGE_ORDER = [
13
+ 0 /* Exploration */,
14
+ 1 /* ProblemSolutionFit */,
15
+ 2 /* MvpEarlyTraction */,
16
+ 3 /* ProductMarketFit */,
17
+ 4 /* GrowthScaleUp */,
18
+ 5 /* ExpansionPlatform */,
19
+ 6 /* MaturityRenewal */
20
+ ];
21
+ var LIFECYCLE_STAGE_META = {
22
+ [0 /* Exploration */]: {
23
+ id: 0 /* Exploration */,
24
+ order: 0,
25
+ slug: "exploration",
26
+ name: "Exploration / Ideation",
27
+ question: "Is there a problem worth my time?",
28
+ signals: [
29
+ "20+ discovery interviews",
30
+ "Clear problem statement",
31
+ "Named ICP"
32
+ ],
33
+ traps: ["Branding before discovery", "Premature tooling decisions"],
34
+ focusAreas: ["Customer discovery", "Problem definition", "Segment clarity"]
35
+ },
36
+ [1 /* ProblemSolutionFit */]: {
37
+ id: 1 /* ProblemSolutionFit */,
38
+ order: 1,
39
+ slug: "problem-solution-fit",
40
+ name: "Problem–Solution Fit",
41
+ question: "Do people care enough about this solution?",
42
+ signals: ["Prototype reuse", "Referral energy", "Pre-pay interest"],
43
+ traps: ["“Market is huge” without users", "Skipping qualitative loops"],
44
+ focusAreas: ["Solution hypothesis", "Value messaging", "Feedback capture"]
45
+ },
46
+ [2 /* MvpEarlyTraction */]: {
47
+ id: 2 /* MvpEarlyTraction */,
48
+ order: 2,
49
+ slug: "mvp-early-traction",
50
+ name: "MVP & Early Traction",
51
+ question: "Can we get real usage and learn fast?",
52
+ signals: ["20–50 named active users", "Weekly releases", "Noisy feedback"],
53
+ traps: ["Overbuilt infra for 10 users", "Undefined retention metric"],
54
+ focusAreas: ["Activation", "Cohort tracking", "Feedback rituals"]
55
+ },
56
+ [3 /* ProductMarketFit */]: {
57
+ id: 3 /* ProductMarketFit */,
58
+ order: 3,
59
+ slug: "product-market-fit",
60
+ name: "Product–Market Fit",
61
+ question: "Is this pulling us forward?",
62
+ signals: [
63
+ "Retention without heroics",
64
+ "Organic word-of-mouth",
65
+ "Value stories"
66
+ ],
67
+ traps: ["Hero growth that does not scale", "Ignoring churn signals"],
68
+ focusAreas: ["Retention", "Reliability", "ICP clarity"]
69
+ },
70
+ [4 /* GrowthScaleUp */]: {
71
+ id: 4 /* GrowthScaleUp */,
72
+ order: 4,
73
+ slug: "growth-scale-up",
74
+ name: "Growth / Scale-up",
75
+ question: "Can we grow this repeatably?",
76
+ signals: [
77
+ "Predictable channels",
78
+ "Specialized hires",
79
+ "Unit economics on track"
80
+ ],
81
+ traps: [
82
+ "Paid spend masking retention gaps",
83
+ "Infra debt blocking launches"
84
+ ],
85
+ focusAreas: ["Ops systems", "Growth loops", "Reliability engineering"]
86
+ },
87
+ [5 /* ExpansionPlatform */]: {
88
+ id: 5 /* ExpansionPlatform */,
89
+ order: 5,
90
+ slug: "expansion-platform",
91
+ name: "Expansion / Platform",
92
+ question: "What is the next growth curve?",
93
+ signals: ["Stable core metrics", "Partner/API demand", "Ecosystem pull"],
94
+ traps: ["Platform theater before wedge is solid"],
95
+ focusAreas: ["Partnerships", "APIs", "New market validation"]
96
+ },
97
+ [6 /* MaturityRenewal */]: {
98
+ id: 6 /* MaturityRenewal */,
99
+ order: 6,
100
+ slug: "maturity-renewal",
101
+ name: "Maturity / Renewal",
102
+ question: "Optimize, reinvent, or sunset?",
103
+ signals: ["Margin focus", "Portfolio bets", "Narrative refresh"],
104
+ traps: ["Assuming past success is enough"],
105
+ focusAreas: ["Cost optimization", "Reinvention bets", "Sunset planning"]
106
+ }
107
+ };
108
+ var getLifecycleStageBySlug = (slug) => {
109
+ const entry = Object.values(LIFECYCLE_STAGE_META).find((meta) => meta.slug === slug);
110
+ if (!entry) {
111
+ throw new Error(`Unknown lifecycle stage slug: ${slug}`);
112
+ }
113
+ return entry.id;
114
+ };
115
+ // src/types/axes.ts
116
+ var ProductPhase;
117
+ ((ProductPhase2) => {
118
+ ProductPhase2["Sketch"] = "Sketch";
119
+ ProductPhase2["Prototype"] = "Prototype";
120
+ ProductPhase2["Mvp"] = "MVP";
121
+ ProductPhase2["V1"] = "V1";
122
+ ProductPhase2["Ecosystem"] = "Ecosystem";
123
+ })(ProductPhase ||= {});
124
+ var CompanyPhase;
125
+ ((CompanyPhase2) => {
126
+ CompanyPhase2["Solo"] = "Solo";
127
+ CompanyPhase2["TinyTeam"] = "TinyTeam";
128
+ CompanyPhase2["FunctionalOrg"] = "FunctionalOrg";
129
+ CompanyPhase2["MultiTeam"] = "MultiTeam";
130
+ CompanyPhase2["Bureaucratic"] = "Bureaucratic";
131
+ })(CompanyPhase ||= {});
132
+ var CapitalPhase;
133
+ ((CapitalPhase2) => {
134
+ CapitalPhase2["Bootstrapped"] = "Bootstrapped";
135
+ CapitalPhase2["PreSeed"] = "PreSeed";
136
+ CapitalPhase2["Seed"] = "Seed";
137
+ CapitalPhase2["SeriesAorB"] = "SeriesAorB";
138
+ CapitalPhase2["LateStage"] = "LateStage";
139
+ })(CapitalPhase ||= {});
140
+ // src/utils/formatters.ts
141
+ var formatStageSummary = (stage, assessment) => {
142
+ const meta = LIFECYCLE_STAGE_META[stage];
143
+ const title = `Stage ${meta.order} · ${meta.name}`;
144
+ const axesSummary = assessment ? summarizeAxes(assessment.axes) : [];
145
+ return {
146
+ title,
147
+ question: meta.question,
148
+ highlights: meta.signals,
149
+ traps: meta.traps,
150
+ focusAreas: assessment?.gaps?.length ? assessment.gaps : meta.focusAreas,
151
+ axesSummary
152
+ };
153
+ };
154
+ var summarizeAxes = (axes) => [
155
+ `Product: ${axes.product}`,
156
+ `Company: ${axes.company}`,
157
+ `Capital: ${axes.capital}`
158
+ ];
159
+ var rankStageCandidates = (scores) => [...scores].sort((a, b) => {
160
+ if (b.score === a.score) {
161
+ return b.confidence - a.confidence;
162
+ }
163
+ return b.score - a.score;
164
+ });
165
+ var createRecommendationDigest = (recommendation) => {
166
+ const meta = LIFECYCLE_STAGE_META[recommendation.stage];
167
+ const topAction = recommendation.actions[0];
168
+ const actionCopy = topAction ? `${topAction.title} (${topAction.estimatedImpact} impact)` : "Focus on upcoming milestones.";
169
+ return `Next up for ${meta.name}: ${actionCopy}`;
170
+ };
171
+ var getStageLabel = (stage) => LIFECYCLE_STAGE_META[stage].name;
172
+ var getStageOrderIndex = (stage) => LIFECYCLE_STAGE_ORDER.indexOf(stage);
173
+ export {
174
+ summarizeAxes,
175
+ rankStageCandidates,
176
+ getStageOrderIndex,
177
+ getStageLabel,
178
+ getLifecycleStageBySlug,
179
+ formatStageSummary,
180
+ createRecommendationDigest,
181
+ ProductPhase,
182
+ LifecycleStage,
183
+ LIFECYCLE_STAGE_ORDER,
184
+ LIFECYCLE_STAGE_META,
185
+ CompanyPhase,
186
+ CapitalPhase
187
+ };
@@ -1,37 +1,34 @@
1
- //#region src/types/axes.d.ts
2
- declare enum ProductPhase {
3
- Sketch = "Sketch",
4
- Prototype = "Prototype",
5
- Mvp = "MVP",
6
- V1 = "V1",
7
- Ecosystem = "Ecosystem",
1
+ export declare enum ProductPhase {
2
+ Sketch = "Sketch",
3
+ Prototype = "Prototype",
4
+ Mvp = "MVP",
5
+ V1 = "V1",
6
+ Ecosystem = "Ecosystem"
8
7
  }
9
- declare enum CompanyPhase {
10
- Solo = "Solo",
11
- TinyTeam = "TinyTeam",
12
- FunctionalOrg = "FunctionalOrg",
13
- MultiTeam = "MultiTeam",
14
- Bureaucratic = "Bureaucratic",
8
+ export declare enum CompanyPhase {
9
+ Solo = "Solo",
10
+ TinyTeam = "TinyTeam",
11
+ FunctionalOrg = "FunctionalOrg",
12
+ MultiTeam = "MultiTeam",
13
+ Bureaucratic = "Bureaucratic"
15
14
  }
16
- declare enum CapitalPhase {
17
- Bootstrapped = "Bootstrapped",
18
- PreSeed = "PreSeed",
19
- Seed = "Seed",
20
- SeriesAorB = "SeriesAorB",
21
- LateStage = "LateStage",
15
+ export declare enum CapitalPhase {
16
+ Bootstrapped = "Bootstrapped",
17
+ PreSeed = "PreSeed",
18
+ Seed = "Seed",
19
+ SeriesAorB = "SeriesAorB",
20
+ LateStage = "LateStage"
22
21
  }
23
- type LifecycleAxis = 'product' | 'company' | 'capital';
24
- interface LifecycleAxes {
25
- product: ProductPhase;
26
- company: CompanyPhase;
27
- capital: CapitalPhase;
22
+ export type LifecycleAxis = 'product' | 'company' | 'capital';
23
+ export interface LifecycleAxes {
24
+ product: ProductPhase;
25
+ company: CompanyPhase;
26
+ capital: CapitalPhase;
28
27
  }
29
- interface LifecycleAxisSnapshot {
30
- axis: LifecycleAxis;
31
- phase: ProductPhase | CompanyPhase | CapitalPhase;
32
- rationale?: string;
33
- confidence: number;
28
+ export interface LifecycleAxisSnapshot {
29
+ axis: LifecycleAxis;
30
+ phase: ProductPhase | CompanyPhase | CapitalPhase;
31
+ rationale?: string;
32
+ confidence: number;
34
33
  }
35
- //#endregion
36
- export { CapitalPhase, CompanyPhase, LifecycleAxes, LifecycleAxis, LifecycleAxisSnapshot, ProductPhase };
37
34
  //# sourceMappingURL=axes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"axes.d.ts","names":[],"sources":["../../src/types/axes.ts"],"sourcesContent":[],"mappings":";aAAY,YAAA;EAAA,MAAA,GAAA,QAAY;EAQZ,SAAA,GAAA,WAAY;EAQZ,GAAA,GAAA,KAAA;EAQA,EAAA,GAAA,IAAA;EAEK,SAAA,GAAA,WAAa;;AAEnB,aApBC,YAAA;EAqBD,IAAA,GAAA,MAAA;EAAY,QAAA,GAAA,UAAA;EAGN,aAAA,GAAA,eAAqB;EAC9B,SAAA,GAAA,WAAA;EACC,YAAA,GAAA,cAAA;;AAA8B,aAlB3B,YAAA;EAkBuC,YAAA,GAAA,cAAA;;;;;;KAVvC,aAAA;UAEK,aAAA;WACN;WACA;WACA;;UAGM,qBAAA;QACT;SACC,eAAe,eAAe"}
1
+ {"version":3,"file":"axes.d.ts","sourceRoot":"","sources":["../../src/types/axes.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,SAAS,cAAc;CACxB;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,YAAY,iBAAiB;CAC9B;AAED,oBAAY,YAAY;IACtB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}