business-as-code 2.0.1 → 2.1.1

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,296 @@
1
+ /**
2
+ * Financial metrics and calculations
3
+ */
4
+ /**
5
+ * Calculate financial metrics from basic inputs
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const metrics = financials({
10
+ * revenue: 1000000,
11
+ * cogs: 300000,
12
+ * operatingExpenses: 500000,
13
+ * currency: 'USD',
14
+ * period: 'monthly',
15
+ * })
16
+ *
17
+ * console.log(metrics.grossMargin) // 70%
18
+ * console.log(metrics.operatingMargin) // 20%
19
+ * console.log(metrics.netMargin) // 20%
20
+ * ```
21
+ */
22
+ export function financials(metrics) {
23
+ const revenue = metrics.revenue || 0;
24
+ const cogs = metrics.cogs || 0;
25
+ const operatingExpenses = metrics.operatingExpenses || 0;
26
+ // Calculate derived metrics
27
+ const grossProfit = revenue - cogs;
28
+ const grossMargin = revenue > 0 ? (grossProfit / revenue) * 100 : 0;
29
+ const operatingIncome = grossProfit - operatingExpenses;
30
+ const operatingMargin = revenue > 0 ? (operatingIncome / revenue) * 100 : 0;
31
+ const netIncome = metrics.netIncome ?? operatingIncome;
32
+ const netMargin = revenue > 0 ? (netIncome / revenue) * 100 : 0;
33
+ // EBITDA (simplified - would need D&A for accurate calculation)
34
+ const ebitda = metrics.ebitda ?? operatingIncome;
35
+ const ebitdaMargin = revenue > 0 ? (ebitda / revenue) * 100 : 0;
36
+ return {
37
+ ...metrics,
38
+ revenue,
39
+ cogs,
40
+ grossProfit,
41
+ grossMargin,
42
+ operatingExpenses,
43
+ operatingIncome,
44
+ operatingMargin,
45
+ netIncome,
46
+ netMargin,
47
+ ebitda,
48
+ ebitdaMargin,
49
+ currency: metrics.currency || 'USD',
50
+ period: metrics.period || 'monthly',
51
+ };
52
+ }
53
+ /**
54
+ * Calculate gross margin
55
+ */
56
+ export function calculateGrossMargin(revenue, cogs) {
57
+ if (revenue === 0)
58
+ return 0;
59
+ return ((revenue - cogs) / revenue) * 100;
60
+ }
61
+ /**
62
+ * Calculate operating margin
63
+ */
64
+ export function calculateOperatingMargin(revenue, cogs, operatingExpenses) {
65
+ if (revenue === 0)
66
+ return 0;
67
+ const operatingIncome = revenue - cogs - operatingExpenses;
68
+ return (operatingIncome / revenue) * 100;
69
+ }
70
+ /**
71
+ * Calculate net margin
72
+ */
73
+ export function calculateNetMargin(revenue, netIncome) {
74
+ if (revenue === 0)
75
+ return 0;
76
+ return (netIncome / revenue) * 100;
77
+ }
78
+ /**
79
+ * Calculate EBITDA margin
80
+ */
81
+ export function calculateEBITDAMargin(revenue, ebitda) {
82
+ if (revenue === 0)
83
+ return 0;
84
+ return (ebitda / revenue) * 100;
85
+ }
86
+ /**
87
+ * Calculate burn rate (monthly cash burn)
88
+ */
89
+ export function calculateBurnRate(cashStart, cashEnd, months) {
90
+ if (months === 0)
91
+ return 0;
92
+ return (cashStart - cashEnd) / months;
93
+ }
94
+ /**
95
+ * Calculate runway (months until cash runs out)
96
+ */
97
+ export function calculateRunway(cash, monthlyBurnRate) {
98
+ if (monthlyBurnRate === 0)
99
+ return Infinity;
100
+ if (monthlyBurnRate < 0)
101
+ return Infinity; // Company is profitable
102
+ return cash / monthlyBurnRate;
103
+ }
104
+ /**
105
+ * Calculate customer acquisition cost (CAC)
106
+ */
107
+ export function calculateCAC(marketingSpend, newCustomers) {
108
+ if (newCustomers === 0)
109
+ return 0;
110
+ return marketingSpend / newCustomers;
111
+ }
112
+ /**
113
+ * Calculate customer lifetime value (LTV)
114
+ */
115
+ export function calculateLTV(averageRevenuePerCustomer, averageCustomerLifetimeMonths, grossMarginPercent) {
116
+ return averageRevenuePerCustomer * averageCustomerLifetimeMonths * (grossMarginPercent / 100);
117
+ }
118
+ /**
119
+ * Calculate LTV:CAC ratio
120
+ */
121
+ export function calculateLTVtoCAC(ltv, cac) {
122
+ if (cac === 0)
123
+ return 0;
124
+ return ltv / cac;
125
+ }
126
+ /**
127
+ * Calculate payback period (months to recover CAC)
128
+ */
129
+ export function calculatePaybackPeriod(cac, monthlyRevPerCustomer) {
130
+ if (monthlyRevPerCustomer === 0)
131
+ return 0;
132
+ return cac / monthlyRevPerCustomer;
133
+ }
134
+ /**
135
+ * Calculate annual recurring revenue (ARR)
136
+ */
137
+ export function calculateARR(mrr) {
138
+ return mrr * 12;
139
+ }
140
+ /**
141
+ * Calculate monthly recurring revenue (MRR)
142
+ */
143
+ export function calculateMRR(arr) {
144
+ return arr / 12;
145
+ }
146
+ /**
147
+ * Calculate revenue growth rate
148
+ */
149
+ export function calculateGrowthRate(currentRevenue, previousRevenue) {
150
+ if (previousRevenue === 0)
151
+ return 0;
152
+ return ((currentRevenue - previousRevenue) / previousRevenue) * 100;
153
+ }
154
+ /**
155
+ * Calculate compound annual growth rate (CAGR)
156
+ */
157
+ export function calculateCAGR(beginningValue, endingValue, years) {
158
+ if (beginningValue === 0 || years === 0)
159
+ return 0;
160
+ return (Math.pow(endingValue / beginningValue, 1 / years) - 1) * 100;
161
+ }
162
+ /**
163
+ * Calculate return on investment (ROI)
164
+ */
165
+ export function calculateROI(gain, cost) {
166
+ if (cost === 0)
167
+ return 0;
168
+ return ((gain - cost) / cost) * 100;
169
+ }
170
+ /**
171
+ * Calculate return on equity (ROE)
172
+ */
173
+ export function calculateROE(netIncome, shareholderEquity) {
174
+ if (shareholderEquity === 0)
175
+ return 0;
176
+ return (netIncome / shareholderEquity) * 100;
177
+ }
178
+ /**
179
+ * Calculate return on assets (ROA)
180
+ */
181
+ export function calculateROA(netIncome, totalAssets) {
182
+ if (totalAssets === 0)
183
+ return 0;
184
+ return (netIncome / totalAssets) * 100;
185
+ }
186
+ /**
187
+ * Calculate quick ratio (liquidity)
188
+ */
189
+ export function calculateQuickRatio(currentAssets, inventory, currentLiabilities) {
190
+ if (currentLiabilities === 0)
191
+ return 0;
192
+ return (currentAssets - inventory) / currentLiabilities;
193
+ }
194
+ /**
195
+ * Calculate current ratio (liquidity)
196
+ */
197
+ export function calculateCurrentRatio(currentAssets, currentLiabilities) {
198
+ if (currentLiabilities === 0)
199
+ return 0;
200
+ return currentAssets / currentLiabilities;
201
+ }
202
+ /**
203
+ * Calculate debt-to-equity ratio
204
+ */
205
+ export function calculateDebtToEquity(totalDebt, totalEquity) {
206
+ if (totalEquity === 0)
207
+ return 0;
208
+ return totalDebt / totalEquity;
209
+ }
210
+ /**
211
+ * Format currency value
212
+ */
213
+ export function formatCurrency(amount, currency = 'USD') {
214
+ const symbol = getCurrencySymbol(currency);
215
+ const formatted = Math.abs(amount).toLocaleString(undefined, {
216
+ minimumFractionDigits: 0,
217
+ maximumFractionDigits: 2,
218
+ });
219
+ const sign = amount < 0 ? '-' : '';
220
+ return `${sign}${symbol}${formatted}`;
221
+ }
222
+ /**
223
+ * Get currency symbol
224
+ */
225
+ function getCurrencySymbol(currency) {
226
+ const symbols = {
227
+ USD: '$',
228
+ EUR: '€',
229
+ GBP: '£',
230
+ JPY: '¥',
231
+ CNY: '¥',
232
+ CAD: 'C$',
233
+ AUD: 'A$',
234
+ };
235
+ return symbols[currency] || currency + ' ';
236
+ }
237
+ /**
238
+ * Create a financial statement
239
+ */
240
+ export function createStatement(type, period, lineItems, currency = 'USD') {
241
+ return {
242
+ type,
243
+ period,
244
+ lineItems,
245
+ currency,
246
+ };
247
+ }
248
+ /**
249
+ * Get line item from financial statement
250
+ */
251
+ export function getLineItem(statement, name) {
252
+ return statement.lineItems[name] || 0;
253
+ }
254
+ /**
255
+ * Compare financial metrics between periods
256
+ */
257
+ export function compareMetrics(current, previous) {
258
+ const comparison = {};
259
+ const keys = [
260
+ 'revenue',
261
+ 'grossProfit',
262
+ 'operatingIncome',
263
+ 'netIncome',
264
+ 'ebitda',
265
+ ];
266
+ for (const key of keys) {
267
+ const currentVal = current[key] || 0;
268
+ const previousVal = previous[key] || 0;
269
+ const change = currentVal - previousVal;
270
+ const changePercent = previousVal !== 0 ? (change / previousVal) * 100 : 0;
271
+ comparison[key] = { change, changePercent };
272
+ }
273
+ return comparison;
274
+ }
275
+ /**
276
+ * Validate financial metrics
277
+ */
278
+ export function validateFinancials(metrics) {
279
+ const errors = [];
280
+ if (metrics.revenue && metrics.revenue < 0) {
281
+ errors.push('Revenue cannot be negative');
282
+ }
283
+ if (metrics.cogs && metrics.cogs < 0) {
284
+ errors.push('COGS cannot be negative');
285
+ }
286
+ if (metrics.operatingExpenses && metrics.operatingExpenses < 0) {
287
+ errors.push('Operating expenses cannot be negative');
288
+ }
289
+ if (metrics.revenue && metrics.cogs && metrics.cogs > metrics.revenue) {
290
+ errors.push('COGS cannot exceed revenue');
291
+ }
292
+ return {
293
+ valid: errors.length === 0,
294
+ errors,
295
+ };
296
+ }
package/src/goals.js ADDED
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Business goals definition and tracking
3
+ */
4
+ /**
5
+ * Define a business goal with metrics and tracking
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const goals = Goals([
10
+ * {
11
+ * name: 'Launch MVP',
12
+ * description: 'Ship minimum viable product to early customers',
13
+ * category: 'strategic',
14
+ * targetDate: new Date('2024-06-30'),
15
+ * owner: 'Product Team',
16
+ * metrics: ['User signups', 'Feature completion rate'],
17
+ * status: 'in-progress',
18
+ * progress: 65,
19
+ * },
20
+ * {
21
+ * name: 'Achieve Product-Market Fit',
22
+ * description: 'Validate product value with target customers',
23
+ * category: 'strategic',
24
+ * targetDate: new Date('2024-12-31'),
25
+ * owner: 'CEO',
26
+ * metrics: ['NPS > 50', 'Churn < 5%', '100+ paying customers'],
27
+ * status: 'in-progress',
28
+ * progress: 30,
29
+ * dependencies: ['Launch MVP'],
30
+ * },
31
+ * ])
32
+ * ```
33
+ */
34
+ export function Goals(definitions) {
35
+ return definitions.map(goal => validateAndNormalizeGoal(goal));
36
+ }
37
+ /**
38
+ * Define a single goal
39
+ */
40
+ export function Goal(definition) {
41
+ return validateAndNormalizeGoal(definition);
42
+ }
43
+ /**
44
+ * Validate and normalize a goal definition
45
+ */
46
+ function validateAndNormalizeGoal(goal) {
47
+ if (!goal.name) {
48
+ throw new Error('Goal name is required');
49
+ }
50
+ return {
51
+ ...goal,
52
+ category: goal.category || 'operational',
53
+ status: goal.status || 'not-started',
54
+ progress: goal.progress || 0,
55
+ metrics: goal.metrics || [],
56
+ dependencies: goal.dependencies || [],
57
+ metadata: goal.metadata || {},
58
+ };
59
+ }
60
+ /**
61
+ * Update goal progress
62
+ */
63
+ export function updateProgress(goal, progress) {
64
+ if (progress < 0 || progress > 100) {
65
+ throw new Error('Progress must be between 0 and 100');
66
+ }
67
+ // Auto-update status based on progress
68
+ let status = goal.status;
69
+ if (progress === 0) {
70
+ status = 'not-started';
71
+ }
72
+ else if (progress === 100) {
73
+ status = 'completed';
74
+ }
75
+ else if (progress > 0) {
76
+ status = 'in-progress';
77
+ }
78
+ return {
79
+ ...goal,
80
+ progress,
81
+ status,
82
+ };
83
+ }
84
+ /**
85
+ * Mark goal as at-risk
86
+ */
87
+ export function markAtRisk(goal) {
88
+ return {
89
+ ...goal,
90
+ status: 'at-risk',
91
+ };
92
+ }
93
+ /**
94
+ * Mark goal as completed
95
+ */
96
+ export function complete(goal) {
97
+ return {
98
+ ...goal,
99
+ status: 'completed',
100
+ progress: 100,
101
+ };
102
+ }
103
+ /**
104
+ * Check if goal is overdue
105
+ */
106
+ export function isOverdue(goal) {
107
+ if (!goal.targetDate)
108
+ return false;
109
+ return new Date() > goal.targetDate && goal.status !== 'completed';
110
+ }
111
+ /**
112
+ * Get goals by category
113
+ */
114
+ export function getGoalsByCategory(goals, category) {
115
+ return goals.filter(g => g.category === category);
116
+ }
117
+ /**
118
+ * Get goals by status
119
+ */
120
+ export function getGoalsByStatus(goals, status) {
121
+ return goals.filter(g => g.status === status);
122
+ }
123
+ /**
124
+ * Get goals by owner
125
+ */
126
+ export function getGoalsByOwner(goals, owner) {
127
+ return goals.filter(g => g.owner === owner);
128
+ }
129
+ /**
130
+ * Calculate overall progress across all goals
131
+ */
132
+ export function calculateOverallProgress(goals) {
133
+ if (goals.length === 0)
134
+ return 0;
135
+ const totalProgress = goals.reduce((sum, goal) => sum + (goal.progress || 0), 0);
136
+ return totalProgress / goals.length;
137
+ }
138
+ /**
139
+ * Check for circular dependencies
140
+ */
141
+ export function hasCircularDependencies(goals) {
142
+ const goalMap = new Map(goals.map(g => [g.name, g]));
143
+ function checkCircular(goalName, visited = new Set()) {
144
+ if (visited.has(goalName))
145
+ return true;
146
+ const goal = goalMap.get(goalName);
147
+ if (!goal || !goal.dependencies)
148
+ return false;
149
+ visited.add(goalName);
150
+ for (const dep of goal.dependencies) {
151
+ if (checkCircular(dep, new Set(visited))) {
152
+ return true;
153
+ }
154
+ }
155
+ return false;
156
+ }
157
+ return goals.some(goal => checkCircular(goal.name));
158
+ }
159
+ /**
160
+ * Get goals in dependency order
161
+ */
162
+ export function sortByDependencies(goals) {
163
+ const goalMap = new Map(goals.map(g => [g.name, g]));
164
+ const sorted = [];
165
+ const visited = new Set();
166
+ function visit(goalName) {
167
+ if (visited.has(goalName))
168
+ return;
169
+ const goal = goalMap.get(goalName);
170
+ if (!goal)
171
+ return;
172
+ visited.add(goalName);
173
+ // Visit dependencies first
174
+ if (goal.dependencies) {
175
+ for (const dep of goal.dependencies) {
176
+ visit(dep);
177
+ }
178
+ }
179
+ sorted.push(goal);
180
+ }
181
+ for (const goal of goals) {
182
+ visit(goal.name);
183
+ }
184
+ return sorted;
185
+ }
186
+ /**
187
+ * Validate goals
188
+ */
189
+ export function validateGoals(goals) {
190
+ const errors = [];
191
+ for (const goal of goals) {
192
+ if (!goal.name) {
193
+ errors.push('Goal name is required');
194
+ }
195
+ if (goal.progress && (goal.progress < 0 || goal.progress > 100)) {
196
+ errors.push(`Goal ${goal.name} progress must be between 0 and 100`);
197
+ }
198
+ if (goal.dependencies) {
199
+ const goalNames = new Set(goals.map(g => g.name));
200
+ for (const dep of goal.dependencies) {
201
+ if (!goalNames.has(dep)) {
202
+ errors.push(`Goal ${goal.name} depends on unknown goal: ${dep}`);
203
+ }
204
+ }
205
+ }
206
+ }
207
+ if (hasCircularDependencies(goals)) {
208
+ errors.push('Circular dependencies detected in goals');
209
+ }
210
+ return {
211
+ valid: errors.length === 0,
212
+ errors,
213
+ };
214
+ }
package/src/index.js ADDED
@@ -0,0 +1,131 @@
1
+ /**
2
+ * business-as-code - Primitives for expressing business logic and processes as code
3
+ *
4
+ * This package provides primitives for defining business entities, goals, products,
5
+ * services, processes, workflows, KPIs, OKRs, and financial metrics.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { Business, Product, Goals, kpis, okrs, financials, $ } from 'business-as-code'
10
+ *
11
+ * // Define your business
12
+ * const company = Business({
13
+ * name: 'Acme Corp',
14
+ * mission: 'To make widgets accessible to everyone',
15
+ * values: ['Innovation', 'Customer Focus', 'Integrity'],
16
+ * })
17
+ *
18
+ * // Define products
19
+ * const product = Product({
20
+ * name: 'Widget Pro',
21
+ * pricingModel: 'subscription',
22
+ * price: 99,
23
+ * cogs: 20,
24
+ * })
25
+ *
26
+ * // Define goals
27
+ * const goals = Goals([
28
+ * {
29
+ * name: 'Launch MVP',
30
+ * category: 'strategic',
31
+ * status: 'in-progress',
32
+ * progress: 65,
33
+ * },
34
+ * ])
35
+ *
36
+ * // Track KPIs
37
+ * const kpiList = kpis([
38
+ * {
39
+ * name: 'Monthly Recurring Revenue',
40
+ * category: 'financial',
41
+ * target: 100000,
42
+ * current: 85000,
43
+ * },
44
+ * ])
45
+ *
46
+ * // Define OKRs
47
+ * const okrList = okrs([
48
+ * {
49
+ * objective: 'Achieve Product-Market Fit',
50
+ * keyResults: [
51
+ * {
52
+ * description: 'Increase NPS',
53
+ * metric: 'NPS',
54
+ * targetValue: 60,
55
+ * currentValue: 52,
56
+ * },
57
+ * ],
58
+ * },
59
+ * ])
60
+ *
61
+ * // Calculate financials
62
+ * const metrics = financials({
63
+ * revenue: 1000000,
64
+ * cogs: 300000,
65
+ * operatingExpenses: 500000,
66
+ * })
67
+ *
68
+ * // Use $ helper for calculations
69
+ * console.log($.format(1234.56)) // "$1,234.56"
70
+ * console.log($.growth(120, 100)) // 20
71
+ * console.log($.margin(100, 60)) // 40
72
+ * ```
73
+ *
74
+ * @packageDocumentation
75
+ */
76
+ // Export business entity functions
77
+ export { Business, getTotalBudget, getTotalTeamSize, getDepartment, getTeam, validateBusiness, } from './business.js';
78
+ // Export vision functions
79
+ export { Vision, checkIndicator, calculateProgress, validateVision, } from './vision.js';
80
+ // Export goal functions
81
+ export { Goals, Goal, updateProgress, markAtRisk, complete, isOverdue, getGoalsByCategory, getGoalsByStatus, getGoalsByOwner, calculateOverallProgress, hasCircularDependencies, sortByDependencies, validateGoals, } from './goals.js';
82
+ // Export product functions
83
+ export { Product, calculateGrossMargin, calculateGrossProfit, getRoadmapByStatus, getRoadmapByPriority, getOverdueRoadmapItems, updateRoadmapItem, addFeature, removeFeature, validateProduct, } from './product.js';
84
+ // Export service functions
85
+ export { Service, calculateHourlyPrice, calculateMonthlyRetainer, checkSLAUptime, parseDeliveryTimeToDays, estimateCompletionDate, calculateValueBasedPrice, validateService, } from './service.js';
86
+ // Export process functions
87
+ export { Process, getStepsInOrder, getStepsByAutomationLevel, calculateTotalDuration, formatDuration, calculateAutomationPercentage, getMetric, meetsTarget, calculateMetricAchievement, updateMetric, addStep, removeStep, validateProcess, } from './process.js';
88
+ // Export workflow functions
89
+ export { Workflow, getActionsInOrder, getActionsByType, getConditionalActions, addAction, removeAction, updateAction, isEventTrigger, isScheduleTrigger, isWebhookTrigger, parseWaitDuration, evaluateCondition, fillTemplate, validateWorkflow, } from './workflow.js';
90
+ // Export KPI functions
91
+ export { kpis, kpi, calculateAchievement, meetsTarget as kpiMeetsTarget, updateCurrent, updateTarget, getKPIsByCategory, getKPIsByFrequency, getKPIsOnTarget, getKPIsOffTarget, calculateHealthScore, groupByCategory, calculateVariance, calculateVariancePercentage, formatValue, comparePerformance, validateKPIs, } from './kpis.js';
92
+ // Export OKR functions
93
+ export { okrs, okr, calculateKeyResultProgress, calculateOKRProgress, calculateConfidence, updateKeyResult, isKeyResultOnTrack, isOKROnTrack, getKeyResultsOnTrack, getKeyResultsAtRisk, getOKRsByOwner, getOKRsByPeriod, getOKRsByStatus, calculateSuccessRate, formatKeyResult, compareOKRPerformance, validateOKRs, } from './okrs.js';
94
+ // Export financial functions
95
+ export { financials, calculateGrossMargin as calculateFinancialGrossMargin, calculateOperatingMargin, calculateNetMargin, calculateEBITDAMargin, calculateBurnRate, calculateRunway, calculateCAC, calculateLTV, calculateLTVtoCAC, calculatePaybackPeriod, calculateARR, calculateMRR, calculateGrowthRate, calculateCAGR, calculateROI, calculateROE, calculateROA, calculateQuickRatio, calculateCurrentRatio, calculateDebtToEquity, formatCurrency, createStatement, getLineItem, compareMetrics, validateFinancials, } from './financials.js';
96
+ // Export $ helper and context management
97
+ export { $, createBusinessOperations, updateContext, getContext, resetContext, } from './dollar.js';
98
+ export {
99
+ // SaaS Metric Calculation functions (produce structured SaaS metric objects)
100
+ calculateMRR as calculateMRRMetric, calculateARRFromMRR as calculateARRMetric, calculateNRR as calculateNRRMetric, calculateGRR as calculateGRRMetric, calculateCACMetric, calculateLTVMetric, calculateLTVtoCACRatio, calculateQuickRatioMetric, calculateMagicNumberMetric, calculateBurnMultipleMetric, calculateRuleOf40Metric, calculateGrowthRates, calculateChurnMetrics,
101
+ // Time-series aggregation
102
+ aggregateTimeSeries, createMetricPeriod, } from './metrics.js';
103
+ export {
104
+ // Standard definitions
105
+ StandardDimensions, StandardMeasures, CalculatedMetrics,
106
+ // Builders
107
+ query, QueryBuilder, view, ViewBuilder, dashboard, DashboardBuilder,
108
+ // Pre-built queries
109
+ MrrOverview, ArrBySegment, CohortRetention, UnitEconomics, RevenueByChannel, GrowthMetrics,
110
+ // Pre-built dashboards
111
+ ExecutiveDashboard, } from './queries.js';
112
+ export { StandardBusinessRoles, createBusinessRole, hasPermission, canHandleTask, canApproveRequest, canDelegateTask, findRoleForTask, createTaskAssignment, transitionTaskStatus, } from './roles.js';
113
+ export { resolvePermissions, getApprovalChainForRequest, findManager, } from './organization.js';
114
+ // =============================================================================
115
+ // Entity Definitions (Noun pattern with Properties, Actions, Events)
116
+ // =============================================================================
117
+ export {
118
+ // Business
119
+ Business as BusinessEntity, Vision as VisionEntity, Value as ValueEntity, BusinessEntities, BusinessCategories,
120
+ // Organization
121
+ Organization as OrganizationEntity, Department as DepartmentEntity, Team as TeamEntity, Position as PositionEntity, Role as RoleEntity, Worker as WorkerEntity, OrganizationEntities, OrganizationCategories,
122
+ // Goals
123
+ Goal as GoalEntity, OKR as OKREntity, KeyResult as KeyResultEntity, KPI as KPIEntity, Metric as MetricEntity, Initiative as InitiativeEntity, GoalEntities, GoalCategories,
124
+ // Offerings
125
+ Product as ProductEntity, Service as ServiceEntity, Feature as FeatureEntity, PricingPlan as PricingPlanEntity, RoadmapItem as RoadmapItemEntity, OfferingEntities, OfferingCategories,
126
+ // Operations
127
+ Process as ProcessEntity, ProcessStep as ProcessStepEntity, Workflow as WorkflowEntity, WorkflowAction as WorkflowActionEntity, WorkflowRun as WorkflowRunEntity, Policy as PolicyEntity, OperationsEntities, OperationsCategories,
128
+ // Financials
129
+ Budget as BudgetEntity, Revenue as RevenueEntity, Expense as ExpenseEntity, Investment as InvestmentEntity, FinancialPeriod as FinancialPeriodEntity, Forecast as ForecastEntity, FinancialEntities, FinancialCategories,
130
+ // All
131
+ AllBusinessEntities, BusinessEntityCategories, Entities, } from './entities/index.js';