@lssm/bundle.lifecycle-managed 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406
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.
- package/dist/agents/lifecycle-advisor-agent.js +68 -2
- package/dist/api/rest-handlers.js +22 -1
- package/dist/events/lifecycle-events.js +45 -1
- package/dist/index.js +6 -1
- package/dist/libs/ai-agent/dist/agent/agent-factory.js +1 -1
- package/dist/libs/ai-agent/dist/agent/contract-spec-agent.js +18 -1
- package/dist/libs/ai-agent/dist/agent/index.js +2 -1
- package/dist/libs/ai-agent/dist/approval/index.js +1 -1
- package/dist/libs/ai-agent/dist/approval/workflow.js +1 -1
- package/dist/libs/ai-agent/dist/index.js +15 -1
- package/dist/libs/ai-agent/dist/schema/index.js +2 -1
- package/dist/libs/ai-agent/dist/schema/json-schema-to-zod.js +1 -1
- package/dist/libs/ai-agent/dist/schema/schema-output.js +3 -1
- package/dist/libs/ai-agent/dist/spec/spec.js +23 -1
- package/dist/libs/ai-agent/dist/tools/index.js +4 -1
- package/dist/libs/ai-agent/dist/tools/knowledge-tool.js +2 -1
- package/dist/libs/ai-agent/dist/tools/mcp-client.js +2 -1
- package/dist/libs/ai-agent/dist/tools/mcp-server.js +3 -1
- package/dist/libs/ai-agent/dist/tools/tool-adapter.js +2 -1
- package/dist/libs/analytics/dist/churn/index.js +1 -1
- package/dist/libs/analytics/dist/churn/predictor.js +1 -1
- package/dist/libs/analytics/dist/cohort/index.js +1 -1
- package/dist/libs/analytics/dist/cohort/tracker.js +1 -1
- package/dist/libs/analytics/dist/index.js +5 -1
- package/dist/libs/analytics/dist/lifecycle/metric-collectors.js +9 -1
- package/dist/libs/lifecycle/dist/index.js +5 -1
- package/dist/libs/lifecycle/dist/types/axes.js +28 -1
- package/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/libs/lifecycle/dist/types/stages.js +151 -1
- package/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/libs/observability/dist/index.js +8 -1
- package/dist/libs/observability/dist/intent/aggregator.js +4 -0
- package/dist/libs/observability/dist/intent/detector.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/index.js +4 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/milestones.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/signals.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/stages.js +143 -1
- package/dist/libs/observability/dist/lifecycle/dist/utils/formatters.js +7 -1
- package/dist/libs/observability/dist/logging/index.js +39 -1
- package/dist/libs/observability/dist/metrics/index.js +25 -1
- package/dist/libs/observability/dist/pipeline/evolution-pipeline.js +3 -1
- package/dist/libs/observability/dist/pipeline/lifecycle-pipeline.js +73 -1
- package/dist/libs/observability/dist/tracing/index.js +1 -1
- package/dist/libs/observability/dist/tracing/middleware.js +2 -1
- package/dist/modules/lifecycle-advisor/dist/ceremony/ceremony-designer.js +17 -1
- package/dist/modules/lifecycle-advisor/dist/data/library-stage-map.js +90 -1
- package/dist/modules/lifecycle-advisor/dist/data/stage-playbooks.js +240 -1
- package/dist/modules/lifecycle-advisor/dist/index.js +3 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/index.js +4 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/stages.js +143 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/recommendations/library-recommender.js +19 -1
- package/dist/modules/lifecycle-advisor/dist/recommendations/recommendation-engine.js +46 -1
- package/dist/modules/lifecycle-core/dist/collectors/signal-collector.js +65 -1
- package/dist/modules/lifecycle-core/dist/data/milestones-catalog.js +73 -1
- package/dist/modules/lifecycle-core/dist/data/stage-weights.js +169 -1
- package/dist/modules/lifecycle-core/dist/index.js +4 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/index.js +4 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/axes.js +28 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/stages.js +143 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js +53 -1
- package/dist/modules/lifecycle-core/dist/planning/milestone-planner.js +16 -1
- package/dist/modules/lifecycle-core/dist/scoring/stage-scorer.js +64 -1
- package/dist/services/assessment-service.js +72 -1
- package/package.json +9 -9
- package/dist/libs/observability/dist/lifecycle/dist/types/axes.js +0 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/axes.js +0 -1
|
@@ -1,5 +1,71 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineAgent } from "../libs/ai-agent/dist/spec/spec.js";
|
|
2
|
+
import "../libs/ai-agent/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/agents/lifecycle-advisor-agent.ts
|
|
5
|
+
const LifecycleAdvisorAgent = defineAgent({
|
|
6
|
+
meta: {
|
|
7
|
+
name: "lifecycle.advisor",
|
|
8
|
+
version: 1,
|
|
9
|
+
title: "Lifecycle Advisor Agent",
|
|
10
|
+
description: "Guides artisans through lifecycle detection, focus areas, and ceremonies.",
|
|
11
|
+
owners: ["team-lifecycle"],
|
|
12
|
+
domain: "operations",
|
|
13
|
+
tags: [
|
|
14
|
+
"guide",
|
|
15
|
+
"lifecycle",
|
|
16
|
+
"ops"
|
|
17
|
+
],
|
|
18
|
+
stability: "experimental"
|
|
19
|
+
},
|
|
20
|
+
description: "Guides users through lifecycle assessments, highlights gaps, and recommends actions tied to ContractSpec libraries.",
|
|
21
|
+
instructions: `You are the Lifecycle Advisor. Always clarify the user's current stage, confidence, and blockers before suggesting actions.
|
|
2
22
|
- Prioritize simple, mobile-friendly instructions.
|
|
3
23
|
- When in early stages, focus on learning loops, not heavy infra.
|
|
4
24
|
- When in later stages, emphasize repeatability, telemetry, and managed ceremonies.
|
|
5
|
-
- Suggest at most 3 actions at a time. Reference ContractSpec libraries or modules when relevant.`,
|
|
25
|
+
- Suggest at most 3 actions at a time. Reference ContractSpec libraries or modules when relevant.`,
|
|
26
|
+
tools: [{
|
|
27
|
+
name: "run_assessment",
|
|
28
|
+
description: "Trigger a lifecycle assessment for a tenant.",
|
|
29
|
+
schema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {
|
|
32
|
+
tenantId: { type: "string" },
|
|
33
|
+
questionnaire: {
|
|
34
|
+
type: "object",
|
|
35
|
+
additionalProperties: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
required: ["tenantId"]
|
|
39
|
+
},
|
|
40
|
+
automationSafe: true
|
|
41
|
+
}, {
|
|
42
|
+
name: "fetch_playbook",
|
|
43
|
+
description: "Retrieve stage-specific playbook (actions, ceremonies, libraries).",
|
|
44
|
+
schema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: { stage: {
|
|
47
|
+
type: "integer",
|
|
48
|
+
minimum: 0,
|
|
49
|
+
maximum: 6,
|
|
50
|
+
description: "Lifecycle stage number (0-6)"
|
|
51
|
+
} },
|
|
52
|
+
required: ["stage"]
|
|
53
|
+
},
|
|
54
|
+
automationSafe: true
|
|
55
|
+
}],
|
|
56
|
+
memory: {
|
|
57
|
+
maxEntries: 25,
|
|
58
|
+
ttlMinutes: 120
|
|
59
|
+
},
|
|
60
|
+
policy: {
|
|
61
|
+
confidence: { min: .7 },
|
|
62
|
+
escalation: {
|
|
63
|
+
confidenceThreshold: .5,
|
|
64
|
+
approvalWorkflow: "ops.lifecycle.escalation"
|
|
65
|
+
},
|
|
66
|
+
flags: ["lifecycle_advisor"]
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { LifecycleAdvisorAgent };
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
import"../services/assessment-service.js";
|
|
1
|
+
import "../services/assessment-service.js";
|
|
2
|
+
|
|
3
|
+
//#region src/api/rest-handlers.ts
|
|
4
|
+
const createLifecycleHandlers = (service) => ({
|
|
5
|
+
runAssessment: async (req) => {
|
|
6
|
+
const payload = req.body ?? {};
|
|
7
|
+
return {
|
|
8
|
+
status: 200,
|
|
9
|
+
body: await service.runAssessment(payload)
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
getPlaybook: async (req) => {
|
|
13
|
+
const stage = Number(req.params?.stage ?? 0);
|
|
14
|
+
return {
|
|
15
|
+
status: 200,
|
|
16
|
+
body: service.getStagePlaybook(stage)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { createLifecycleHandlers };
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { lifecycleEventNames } from "../libs/analytics/dist/lifecycle/metric-collectors.js";
|
|
2
|
+
import "../libs/analytics/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/events/lifecycle-events.ts
|
|
5
|
+
var LifecycleEventBridge = class {
|
|
6
|
+
constructor(publisher) {
|
|
7
|
+
this.publisher = publisher;
|
|
8
|
+
}
|
|
9
|
+
forward(event) {
|
|
10
|
+
if (!this.publisher) return;
|
|
11
|
+
switch (event.type) {
|
|
12
|
+
case "assessment.recorded":
|
|
13
|
+
this.publisher({
|
|
14
|
+
name: lifecycleEventNames.assessmentRun,
|
|
15
|
+
properties: {
|
|
16
|
+
tenantId: event.payload.tenantId,
|
|
17
|
+
stage: event.payload.stage
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
break;
|
|
21
|
+
case "stage.changed":
|
|
22
|
+
this.publisher({
|
|
23
|
+
name: lifecycleEventNames.stageChanged,
|
|
24
|
+
properties: {
|
|
25
|
+
tenantId: event.payload.tenantId,
|
|
26
|
+
previousStage: event.payload.previousStage,
|
|
27
|
+
nextStage: event.payload.nextStage
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
break;
|
|
31
|
+
case "confidence.low":
|
|
32
|
+
this.publisher({
|
|
33
|
+
name: `${lifecycleEventNames.assessmentRun}.low_confidence`,
|
|
34
|
+
properties: {
|
|
35
|
+
tenantId: event.payload.tenantId,
|
|
36
|
+
confidence: event.payload.confidence
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { LifecycleEventBridge };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import{LifecycleEventBridge
|
|
1
|
+
import { LifecycleEventBridge } from "./events/lifecycle-events.js";
|
|
2
|
+
import { LifecycleAssessmentService } from "./services/assessment-service.js";
|
|
3
|
+
import { LifecycleAdvisorAgent } from "./agents/lifecycle-advisor-agent.js";
|
|
4
|
+
import { createLifecycleHandlers } from "./api/rest-handlers.js";
|
|
5
|
+
|
|
6
|
+
export { LifecycleAdvisorAgent, LifecycleAssessmentService, LifecycleEventBridge, createLifecycleHandlers };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./contract-spec-agent.js";
|
|
1
|
+
import "./contract-spec-agent.js";
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
import"../tools/tool-adapter.js";
|
|
1
|
+
import "../tools/tool-adapter.js";
|
|
2
|
+
import "../tools/knowledge-tool.js";
|
|
3
|
+
import * as z$1 from "zod";
|
|
4
|
+
import "ai";
|
|
5
|
+
|
|
6
|
+
//#region ../../libs/ai-agent/dist/agent/contract-spec-agent.js
|
|
7
|
+
/**
|
|
8
|
+
* Call options schema for AI SDK v6.
|
|
9
|
+
* Maps ContractSpec's tenant/actor system to AI SDK callOptionsSchema.
|
|
10
|
+
*/
|
|
11
|
+
const ContractSpecCallOptionsSchema = z$1.object({
|
|
12
|
+
tenantId: z$1.string().optional(),
|
|
13
|
+
actorId: z$1.string().optional(),
|
|
14
|
+
sessionId: z$1.string().optional(),
|
|
15
|
+
metadata: z$1.record(z$1.string(), z$1.unknown()).optional()
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"./contract-spec-agent.js";
|
|
1
|
+
import "./contract-spec-agent.js";
|
|
2
|
+
import "./agent-factory.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./workflow.js";
|
|
1
|
+
import "./workflow.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:crypto";
|
|
1
|
+
import "node:crypto";
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineAgent } from "./spec/spec.js";
|
|
2
|
+
import "./schema/json-schema-to-zod.js";
|
|
3
|
+
import "./tools/tool-adapter.js";
|
|
4
|
+
import "./tools/knowledge-tool.js";
|
|
5
|
+
import "./agent/contract-spec-agent.js";
|
|
6
|
+
import "./agent/agent-factory.js";
|
|
7
|
+
import "./agent/index.js";
|
|
8
|
+
import "./tools/mcp-client.js";
|
|
9
|
+
import "./tools/mcp-server.js";
|
|
10
|
+
import "./tools/index.js";
|
|
11
|
+
import "./schema/schema-output.js";
|
|
12
|
+
import "./schema/index.js";
|
|
13
|
+
import "./approval/workflow.js";
|
|
14
|
+
import "./approval/index.js";
|
|
15
|
+
import "ai";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"./json-schema-to-zod.js";
|
|
1
|
+
import "./json-schema-to-zod.js";
|
|
2
|
+
import "./schema-output.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"zod";
|
|
1
|
+
import "zod";
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../libs/ai-agent/dist/spec/spec.js
|
|
2
|
+
/**
|
|
3
|
+
* Define and validate an agent specification.
|
|
4
|
+
*
|
|
5
|
+
* @param spec - The agent specification
|
|
6
|
+
* @returns The frozen, validated specification
|
|
7
|
+
* @throws Error if the specification is invalid
|
|
8
|
+
*/
|
|
9
|
+
function defineAgent(spec) {
|
|
10
|
+
if (!spec.meta?.name) throw new Error("Agent name is required");
|
|
11
|
+
if (!Number.isFinite(spec.meta.version)) throw new Error(`Agent ${spec.meta.name} is missing a numeric version`);
|
|
12
|
+
if (!spec.instructions?.trim()) throw new Error(`Agent ${spec.meta.name} requires instructions`);
|
|
13
|
+
if (!spec.tools?.length) throw new Error(`Agent ${spec.meta.name} must expose at least one tool`);
|
|
14
|
+
const toolNames = /* @__PURE__ */ new Set();
|
|
15
|
+
for (const tool of spec.tools) {
|
|
16
|
+
if (toolNames.has(tool.name)) throw new Error(`Agent ${spec.meta.name} has duplicate tool name: ${tool.name}`);
|
|
17
|
+
toolNames.add(tool.name);
|
|
18
|
+
}
|
|
19
|
+
return Object.freeze(spec);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { defineAgent };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"zod";
|
|
1
|
+
import "zod";
|
|
2
|
+
import "ai";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"@ai-sdk/mcp";
|
|
1
|
+
import "@ai-sdk/mcp";
|
|
2
|
+
import "@ai-sdk/mcp/mcp-stdio";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"../schema/json-schema-to-zod.js";
|
|
1
|
+
import "../schema/json-schema-to-zod.js";
|
|
2
|
+
import "ai";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./predictor.js";
|
|
1
|
+
import "./predictor.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"dayjs";
|
|
1
|
+
import "dayjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./tracker.js";
|
|
1
|
+
import "./tracker.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"dayjs";
|
|
1
|
+
import "dayjs";
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import"./cohort/tracker.js";
|
|
1
|
+
import "./cohort/tracker.js";
|
|
2
|
+
import "./cohort/index.js";
|
|
3
|
+
import "./churn/predictor.js";
|
|
4
|
+
import "./churn/index.js";
|
|
5
|
+
import { lifecycleEventNames } from "./lifecycle/metric-collectors.js";
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../libs/analytics/dist/lifecycle/metric-collectors.js
|
|
2
|
+
const lifecycleEventNames = {
|
|
3
|
+
assessmentRun: "lifecycle_assessment_run",
|
|
4
|
+
stageChanged: "lifecycle_stage_changed",
|
|
5
|
+
guidanceConsumed: "lifecycle_guidance_consumed"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { lifecycleEventNames };
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { LifecycleStage } 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 "./utils/formatters.js";
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../libs/lifecycle/dist/types/axes.js
|
|
2
|
+
let ProductPhase = /* @__PURE__ */ function(ProductPhase$1) {
|
|
3
|
+
ProductPhase$1["Sketch"] = "Sketch";
|
|
4
|
+
ProductPhase$1["Prototype"] = "Prototype";
|
|
5
|
+
ProductPhase$1["Mvp"] = "MVP";
|
|
6
|
+
ProductPhase$1["V1"] = "V1";
|
|
7
|
+
ProductPhase$1["Ecosystem"] = "Ecosystem";
|
|
8
|
+
return ProductPhase$1;
|
|
9
|
+
}({});
|
|
10
|
+
let CompanyPhase = /* @__PURE__ */ function(CompanyPhase$1) {
|
|
11
|
+
CompanyPhase$1["Solo"] = "Solo";
|
|
12
|
+
CompanyPhase$1["TinyTeam"] = "TinyTeam";
|
|
13
|
+
CompanyPhase$1["FunctionalOrg"] = "FunctionalOrg";
|
|
14
|
+
CompanyPhase$1["MultiTeam"] = "MultiTeam";
|
|
15
|
+
CompanyPhase$1["Bureaucratic"] = "Bureaucratic";
|
|
16
|
+
return CompanyPhase$1;
|
|
17
|
+
}({});
|
|
18
|
+
let CapitalPhase = /* @__PURE__ */ function(CapitalPhase$1) {
|
|
19
|
+
CapitalPhase$1["Bootstrapped"] = "Bootstrapped";
|
|
20
|
+
CapitalPhase$1["PreSeed"] = "PreSeed";
|
|
21
|
+
CapitalPhase$1["Seed"] = "Seed";
|
|
22
|
+
CapitalPhase$1["SeriesAorB"] = "SeriesAorB";
|
|
23
|
+
CapitalPhase$1["LateStage"] = "LateStage";
|
|
24
|
+
return CapitalPhase$1;
|
|
25
|
+
}({});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CapitalPhase, CompanyPhase, ProductPhase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|
|
@@ -1 +1,151 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../libs/lifecycle/dist/types/stages.js
|
|
2
|
+
let LifecycleStage = /* @__PURE__ */ function(LifecycleStage$1) {
|
|
3
|
+
LifecycleStage$1[LifecycleStage$1["Exploration"] = 0] = "Exploration";
|
|
4
|
+
LifecycleStage$1[LifecycleStage$1["ProblemSolutionFit"] = 1] = "ProblemSolutionFit";
|
|
5
|
+
LifecycleStage$1[LifecycleStage$1["MvpEarlyTraction"] = 2] = "MvpEarlyTraction";
|
|
6
|
+
LifecycleStage$1[LifecycleStage$1["ProductMarketFit"] = 3] = "ProductMarketFit";
|
|
7
|
+
LifecycleStage$1[LifecycleStage$1["GrowthScaleUp"] = 4] = "GrowthScaleUp";
|
|
8
|
+
LifecycleStage$1[LifecycleStage$1["ExpansionPlatform"] = 5] = "ExpansionPlatform";
|
|
9
|
+
LifecycleStage$1[LifecycleStage$1["MaturityRenewal"] = 6] = "MaturityRenewal";
|
|
10
|
+
return LifecycleStage$1;
|
|
11
|
+
}({});
|
|
12
|
+
const LIFECYCLE_STAGE_ORDER = [
|
|
13
|
+
LifecycleStage.Exploration,
|
|
14
|
+
LifecycleStage.ProblemSolutionFit,
|
|
15
|
+
LifecycleStage.MvpEarlyTraction,
|
|
16
|
+
LifecycleStage.ProductMarketFit,
|
|
17
|
+
LifecycleStage.GrowthScaleUp,
|
|
18
|
+
LifecycleStage.ExpansionPlatform,
|
|
19
|
+
LifecycleStage.MaturityRenewal
|
|
20
|
+
];
|
|
21
|
+
const LIFECYCLE_STAGE_META = {
|
|
22
|
+
[LifecycleStage.Exploration]: {
|
|
23
|
+
id: LifecycleStage.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: [
|
|
35
|
+
"Customer discovery",
|
|
36
|
+
"Problem definition",
|
|
37
|
+
"Segment clarity"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
[LifecycleStage.ProblemSolutionFit]: {
|
|
41
|
+
id: LifecycleStage.ProblemSolutionFit,
|
|
42
|
+
order: 1,
|
|
43
|
+
slug: "problem-solution-fit",
|
|
44
|
+
name: "Problem–Solution Fit",
|
|
45
|
+
question: "Do people care enough about this solution?",
|
|
46
|
+
signals: [
|
|
47
|
+
"Prototype reuse",
|
|
48
|
+
"Referral energy",
|
|
49
|
+
"Pre-pay interest"
|
|
50
|
+
],
|
|
51
|
+
traps: ["“Market is huge” without users", "Skipping qualitative loops"],
|
|
52
|
+
focusAreas: [
|
|
53
|
+
"Solution hypothesis",
|
|
54
|
+
"Value messaging",
|
|
55
|
+
"Feedback capture"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
[LifecycleStage.MvpEarlyTraction]: {
|
|
59
|
+
id: LifecycleStage.MvpEarlyTraction,
|
|
60
|
+
order: 2,
|
|
61
|
+
slug: "mvp-early-traction",
|
|
62
|
+
name: "MVP & Early Traction",
|
|
63
|
+
question: "Can we get real usage and learn fast?",
|
|
64
|
+
signals: [
|
|
65
|
+
"20–50 named active users",
|
|
66
|
+
"Weekly releases",
|
|
67
|
+
"Noisy feedback"
|
|
68
|
+
],
|
|
69
|
+
traps: ["Overbuilt infra for 10 users", "Undefined retention metric"],
|
|
70
|
+
focusAreas: [
|
|
71
|
+
"Activation",
|
|
72
|
+
"Cohort tracking",
|
|
73
|
+
"Feedback rituals"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
[LifecycleStage.ProductMarketFit]: {
|
|
77
|
+
id: LifecycleStage.ProductMarketFit,
|
|
78
|
+
order: 3,
|
|
79
|
+
slug: "product-market-fit",
|
|
80
|
+
name: "Product–Market Fit",
|
|
81
|
+
question: "Is this pulling us forward?",
|
|
82
|
+
signals: [
|
|
83
|
+
"Retention without heroics",
|
|
84
|
+
"Organic word-of-mouth",
|
|
85
|
+
"Value stories"
|
|
86
|
+
],
|
|
87
|
+
traps: ["Hero growth that does not scale", "Ignoring churn signals"],
|
|
88
|
+
focusAreas: [
|
|
89
|
+
"Retention",
|
|
90
|
+
"Reliability",
|
|
91
|
+
"ICP clarity"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
[LifecycleStage.GrowthScaleUp]: {
|
|
95
|
+
id: LifecycleStage.GrowthScaleUp,
|
|
96
|
+
order: 4,
|
|
97
|
+
slug: "growth-scale-up",
|
|
98
|
+
name: "Growth / Scale-up",
|
|
99
|
+
question: "Can we grow this repeatably?",
|
|
100
|
+
signals: [
|
|
101
|
+
"Predictable channels",
|
|
102
|
+
"Specialized hires",
|
|
103
|
+
"Unit economics on track"
|
|
104
|
+
],
|
|
105
|
+
traps: ["Paid spend masking retention gaps", "Infra debt blocking launches"],
|
|
106
|
+
focusAreas: [
|
|
107
|
+
"Ops systems",
|
|
108
|
+
"Growth loops",
|
|
109
|
+
"Reliability engineering"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
[LifecycleStage.ExpansionPlatform]: {
|
|
113
|
+
id: LifecycleStage.ExpansionPlatform,
|
|
114
|
+
order: 5,
|
|
115
|
+
slug: "expansion-platform",
|
|
116
|
+
name: "Expansion / Platform",
|
|
117
|
+
question: "What is the next growth curve?",
|
|
118
|
+
signals: [
|
|
119
|
+
"Stable core metrics",
|
|
120
|
+
"Partner/API demand",
|
|
121
|
+
"Ecosystem pull"
|
|
122
|
+
],
|
|
123
|
+
traps: ["Platform theater before wedge is solid"],
|
|
124
|
+
focusAreas: [
|
|
125
|
+
"Partnerships",
|
|
126
|
+
"APIs",
|
|
127
|
+
"New market validation"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
[LifecycleStage.MaturityRenewal]: {
|
|
131
|
+
id: LifecycleStage.MaturityRenewal,
|
|
132
|
+
order: 6,
|
|
133
|
+
slug: "maturity-renewal",
|
|
134
|
+
name: "Maturity / Renewal",
|
|
135
|
+
question: "Optimize, reinvent, or sunset?",
|
|
136
|
+
signals: [
|
|
137
|
+
"Margin focus",
|
|
138
|
+
"Portfolio bets",
|
|
139
|
+
"Narrative refresh"
|
|
140
|
+
],
|
|
141
|
+
traps: ["Assuming past success is enough"],
|
|
142
|
+
focusAreas: [
|
|
143
|
+
"Cost optimization",
|
|
144
|
+
"Reinvention bets",
|
|
145
|
+
"Sunset planning"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
//#endregion
|
|
151
|
+
export { LifecycleStage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../types/stages.js";
|
|
1
|
+
import "../types/stages.js";
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import"./tracing/index.js";
|
|
1
|
+
import "./tracing/index.js";
|
|
2
|
+
import { createCounter, createHistogram, createUpDownCounter, getMeter } from "./metrics/index.js";
|
|
3
|
+
import { Logger } from "./logging/index.js";
|
|
4
|
+
import "./tracing/middleware.js";
|
|
5
|
+
import "./intent/aggregator.js";
|
|
6
|
+
import "./intent/detector.js";
|
|
7
|
+
import "./pipeline/evolution-pipeline.js";
|
|
8
|
+
import { LifecycleKpiPipeline } from "./pipeline/lifecycle-pipeline.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:crypto";
|
|
1
|
+
import "node:crypto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|