@compilr-dev/factory 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Business Model — barrel export
3
3
  */
4
- export type { BusinessModel, BusinessIdentity, BusinessStage, ValueProposition, Market, MarketSize, CustomerSegment, Competitor, MarketPosition, BusinessCanvas, RevenueStream, RevenueType, CostItem, Financials, ForecastEntry, GoToMarket, GTMPhase, TeamMember, BusinessMeta, } from './types.js';
4
+ export type { BusinessModel, BusinessIdentity, BusinessStage, ValueProposition, Market, MarketSize, CustomerSegment, Competitor, MarketPosition, BusinessCanvas, RevenueStream, RevenueType, CostItem, Financials, ForecastEntry, GoToMarket, GTMPhase, TeamMember, BusinessMeta, PositioningMatrix, } from './types.js';
5
5
  export { createDefaultBusinessModel, generateBusinessId, resetBusinessIdCounter, } from './defaults.js';
6
6
  export { BusinessModelStore } from './persistence.js';
7
7
  export { validateBusinessModel } from './schema.js';
@@ -124,6 +124,7 @@ const ALL_OPS = [
124
124
  'phase_remove',
125
125
  'set_gtm_fields',
126
126
  'set_team',
127
+ 'set_positioning',
127
128
  ];
128
129
  function createBizModelUpdateTool(config) {
129
130
  return defineTool({
@@ -193,6 +194,10 @@ function createBizModelUpdateTool(config) {
193
194
  items: { type: 'object', additionalProperties: true },
194
195
  description: 'For set_team: [{ name, role, background }]',
195
196
  },
197
+ positioning: {
198
+ oneOf: [{ type: 'object', additionalProperties: true }, { type: 'string' }],
199
+ description: 'For set_positioning: { xAxis, yAxis, selfX (0-100), selfY (0-100), xLow?, xHigh?, yLow?, yHigh? }. Competitors need positionX/positionY set via competitor_update.',
200
+ },
196
201
  project_id: { type: 'number', description: 'Project ID. Uses active project if omitted.' },
197
202
  },
198
203
  required: ['op'],
@@ -523,6 +528,12 @@ function applyOperation(model, input) {
523
528
  throw new Error('set_team requires "team" array.');
524
529
  return bump({ ...model, team: input.team });
525
530
  }
531
+ case 'set_positioning': {
532
+ const data = coerce(input.positioning);
533
+ if (!data)
534
+ throw new Error('set_positioning requires "positioning" object with xAxis, yAxis, selfX, selfY.');
535
+ return bump({ ...model, positioning: data });
536
+ }
526
537
  default:
527
538
  throw new Error(`Unknown operation: ${input.op}`);
528
539
  }
@@ -10,6 +10,8 @@ export interface BusinessModel {
10
10
  readonly market: Market;
11
11
  readonly competitors: readonly Competitor[];
12
12
  readonly competitiveAdvantages?: readonly string[];
13
+ /** Positioning matrix: defines the 2 axes for competitive comparison */
14
+ readonly positioning?: PositioningMatrix;
13
15
  readonly canvas: BusinessCanvas;
14
16
  readonly financials: Financials;
15
17
  readonly goToMarket: GoToMarket;
@@ -62,6 +64,27 @@ export interface Competitor {
62
64
  readonly marketPosition?: MarketPosition;
63
65
  readonly pricing?: string;
64
66
  readonly url?: string;
67
+ /** Position on the 2D matrix (0-100 on each axis) */
68
+ readonly positionX?: number;
69
+ readonly positionY?: number;
70
+ }
71
+ export interface PositioningMatrix {
72
+ /** X-axis label (e.g., "Price", "Domain Specialization") */
73
+ readonly xAxis: string;
74
+ /** Y-axis label (e.g., "Features", "Multi-Agent Capability") */
75
+ readonly yAxis: string;
76
+ /** X-axis low end label (e.g., "Low", "General") */
77
+ readonly xLow?: string;
78
+ /** X-axis high end label (e.g., "High", "Specialized") */
79
+ readonly xHigh?: string;
80
+ /** Y-axis low end label */
81
+ readonly yLow?: string;
82
+ /** Y-axis high end label */
83
+ readonly yHigh?: string;
84
+ /** Your business position on X (0-100) */
85
+ readonly selfX: number;
86
+ /** Your business position on Y (0-100) */
87
+ readonly selfY: number;
65
88
  }
66
89
  export type RevenueType = 'subscription' | 'one-time' | 'usage' | 'advertising' | 'commission' | 'licensing' | 'other';
67
90
  export interface RevenueStream {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/factory",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "AI-driven application scaffolder for the compilr-dev ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",