Overhaul market system with shared TAM competition, multi-tier pricing, enterprise pipeline, and developer ecosystem
CI / build-and-push (push) Successful in 42s

Replaces the simplified single-subscriber market with a full competitive simulation:
shared TAM with softmax market shares across 4 segments, multi-tier consumer
subscriptions (Free/Plus/Pro/Team) and API tiers (Free/PAYG/Scale/Enterprise),
enterprise sales pipeline (Lead→Qualification→POC→Negotiation→Active→Renewal)
with SLA tracking, developer ecosystem flywheel, technology obsolescence pressure,
seasonal demand cycles, and two new product lines (Code Assistant, AI Agents Platform).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 08:30:24 -04:00
parent 4c1c0e9ff2
commit 09a5cb69a7
34 changed files with 2851 additions and 408 deletions
@@ -0,0 +1,39 @@
import type { ObsolescenceState, Era } from '@ai-tycoon/shared';
import {
OBSOLESCENCE_BASELINE_GROWTH,
OBSOLESCENCE_ERA_ACCELERATOR,
FRESHNESS_DECAY_RATE,
NEW_MODEL_BOOST_TICKS,
} from '@ai-tycoon/shared';
export function updateObsolescence(
obs: ObsolescenceState,
era: Era,
currentTick: number,
): ObsolescenceState {
const accelerator = OBSOLESCENCE_ERA_ACCELERATOR[era];
const newBaseline = obs.marketQualityBaseline + OBSOLESCENCE_BASELINE_GROWTH * accelerator;
const ticksSinceRelease = currentTick - obs.lastModelReleaseTick;
const freshness = obs.lastModelReleaseTick > 0
? Math.max(0, 1 - ticksSinceRelease * FRESHNESS_DECAY_RATE)
: 0;
const boostRemaining = Math.max(0, obs.newModelBoostRemaining - 1);
return {
...obs,
marketQualityBaseline: newBaseline,
playerModelFreshness: freshness,
newModelBoostRemaining: boostRemaining,
};
}
export function onModelDeployed(obs: ObsolescenceState, tick: number): ObsolescenceState {
return {
...obs,
playerModelFreshness: 1.0,
lastModelReleaseTick: tick,
newModelBoostRemaining: NEW_MODEL_BOOST_TICKS,
};
}