Epoch

v0.6.0
tech.kyanitelabs/epoch Checked 8 hours ago Published 1 month ago

Epoch time estimation MCP server for PERT, COCOMO, Monte Carlo, calibration, cost, and risk.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_current_time

Returns the current date and time in the specified IANA timezone. Useful for grounding the LLM in the user's local time. Example timezones: 'UTC', 'America/New_York', 'Europe/London', 'Asia/Tokyo'.

ParameterTypeDescription
timezonestringIANA timezone identifier. Defaults to "UTC".

convert_timezone

Converts an ISO-8601 timestamp to a target IANA timezone. The input timestamp must include timezone information or be in UTC. Returns the localised time, UTC offset, and human-readable format. Use when you need to display or compare a moment in another region's local time.

ParameterTypeDescription
target_tz *stringTarget IANA timezone identifier.
timestamp *stringISO-8601 timestamp to convert.

parse_duration

Parses a human-readable duration string into structured seconds. Supports combinations of y (years), mo (months), w (weeks), d (days), h (hours), m (minutes), s (seconds). Examples: '2h30m', '1d6h', '1w3d', '45m'. Returns the total seconds for the duration. Use when normalising a free-text duration for arithmetic or comparison.

ParameterTypeDescription
duration_string *stringDuration string like "2h30m", "1d6h", "45m".

wait_bound

Derives a deadline from the mechanism a wait actually rides (three-clock law v1.1 A2): fleet = k x cycle_seconds + PERT(turn) + 1 sd; world = PERT(turn) with a REQUIRED named external anchor; ceo = the named ladder rung (machine time never consumes a CEO rung). Returns the bound in seconds, the deadline in UTC and local (PT by default), and an envelope-ready TTL integer. Round human hours are unexamined slack.

ParameterTypeDescription
clock_class *stringWhich of the three clocks this wait rides: fleet = agent-only (mechanism cycle math), world = external 1:1 (requires external_anchor), ceo = the named ladder (requires ceo_rung). Three-clock law v1.1…
ceo_rungstringCEO only REQUIRED: ladder rung (pass=15m, burst=1h, sleep=1d, cycle=1wk, season=1mo). The rung IS the bound.
cycle_secondsnumberFleet only: the mechanism cycle in seconds the wait rides (org bus sweep = 40). Default 40.
cycles_kintegerFleet only: cycle multiplier, 1..5 by law (more cycles = broken mechanism, not generous deadline). Default 2.
external_anchorstringWorld only REQUIRED: the named external event this wait is bound to (1:1, no dilation).
from_timestampstringISO 8601 start instant; omit for now.
time_zonestringIANA timezone for the rendered deadline. Default America/Los_Angeles (PT display law).
turn_most_likely_minutesnumberTurn-time PERT most-likely in minutes. Default 45.
turn_optimistic_minutesnumberTurn-time PERT optimistic in minutes. Default 15.
turn_pessimistic_minutesnumberTurn-time PERT pessimistic in minutes (busy/turn-driven seats). Default 120.

time_math

Performs compound time-math operations. Dispatches to the appropriate sub-operation based on the 'operation' parameter. Operations: add_days, add_business_days, diff, convert_tz, parse_nl, format_duration. Use this for multi-step or dynamic time operations; for single-purpose calls use get_current_time, convert_timezone, parse_duration, add_business_days, or count_business_days.

ParameterTypeDescription
operands *objectKey-value pairs matching the chosen operation's expected fields. See operation documentation for required keys.
operation *stringThe time arithmetic operation to perform. Each operation expects specific operands.

add_business_days

Adds N business (working) days to a start date, skipping weekends and country-specific public holidays. Supports US, UK, FR, DE, and JP holidays. Returns the resulting date. Use when computing a deadline that excludes non-working days.

ParameterTypeDescription
days *integerNumber of business days to add (negative to subtract). Integer between -100000 and 100000.
start_date *stringISO date string for the start date.
countrystringISO-3166-1-alpha-2 country code for holiday calendar. Supported holiday sets: US, UK, FR, DE, JP; other valid 2-letter codes fall back to weekend-only counting and say so in holidaySupport.

count_business_days

Counts the number of business (working) days between two dates, excluding weekends and country-specific public holidays. The count is exclusive of the start date and inclusive of the end date. Returns the integer day count. Use when measuring working-time span between two dates.

ParameterTypeDescription
end_date *stringISO date string for the end date.
start_date *stringISO date string for the start date.
countrystringISO-3166-1-alpha-2 country code for holiday calendar. Supported holiday sets: US, UK, FR, DE, JP; other valid 2-letter codes fall back to weekend-only counting and say so in holidaySupport.

pert_estimate

Calculate PERT expected duration from three-point estimates using Beta distribution. Formula: E = (O + 4M + P) / 6. Returns expected value, variance, standard deviation, and 95%/99% confidence bounds with urgency categorization. Use when estimating task duration with uncertain outcomes.

ParameterTypeDescription
most_likely *numberMode of the distribution — the single most probable outcome.
optimistic *numberBest-case duration. Do NOT use your initial optimistic guess — this should be the absolute minimum if everything goes perfectly.
pessimistic *numberWorst-case duration accounting for known risks and unknown unknowns.
ai_nativeDegree of AI assistance: 0.0 = fully human, 1.0 = fully AI-native, 0.5 = hybrid. Accepts boolean for backward compatibility (true=1.0, false=0.0).
complexitynumberOptional complexity hint from 1 (trivial) to 5 (extreme). Reserved for future per-complexity correction-factor conditioning; not yet applied to the headline estimate.
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching. Enables per-task-type accuracy tracking.
unitstringTime unit for all three PERT estimates.

cocomo_estimate

LLM-adapted COCOMO II parametric effort estimation. Replaces traditional 17 human-labor cost drivers with 5 LLM-specific factors: reasoning complexity, context completeness, transformation impact, iterative cycles, and human oversight. Returns both nominal and LLM-adjusted person-months. Use when estimating effort for a codebase you can size in KLOC. iterative_cycles: values <= 2.0 are literal multipliers (0.5 = one-shot, 1.0 = typical debug loop, 2.0 = heavy back-and-forth); values above 2.0 are literal cycle counts, each additional cycle adding 0.1 of multiplier anchored at 2.0 (2.0 -> 2.0x…

ParameterTypeDescription
kloc *numberEstimated thousands of lines of code. Count actual code, not comments/blank lines.
ai_nativeDegree of AI assistance: 0.0 = fully human, 1.0 = fully AI-native, 0.5 = hybrid. Accepts boolean for backward compatibility (true=1.0, false=0.0).
context_completenessnumberHow complete is the context provided to the LLM? 0.5 = exhaustive specs, 1.0 = typical, 2.0 = vague requirements.
human_oversightnumberHuman review overhead multiplier. 0.5 = auto-merged, 1.0 = standard PR review, 2.0 = compliance/security review.
iterative_cyclesnumberIteration overhead multiplier or literal cycle count. Multiplier scale: 0.5 = one-shot, 1.0 = typical debug loop, 2.0 = heavy back-and-forth. Values above 2.0 are accepted as literal cycle counts and…
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
reasoning_complexitynumberMultiplier for reasoning complexity of the codebase. 0.5 = trivial CRUD, 1.0 = average, 2.0 = novel algorithm/R&D.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching.
transformation_impactnumberScale of transformation relative to existing code. 0.5 = small patch, 1.0 = new module, 2.0 = architectural rewrite.

sprint_forecast

Forecast sprint completion date from backlog size and historical velocity. Computes average velocity from sprint history, converts story points to hours, and returns required sprints with pessimistic estimate based on velocity variance. Use when planning a sprint completion date from backlog size and velocity history.

ParameterTypeDescription
backlog_points *numberTotal story points or effort units remaining in the backlog.
velocity_history *arrayHistorical velocities from completed sprints. Minimum 1 data point; 3+ recommended for meaningful forecasts.
ai_nativeDegree of AI assistance: 0.0 = fully human, 1.0 = fully AI-native, 0.5 = hybrid. Accepts boolean for backward compatibility (true=1.0, false=0.0).
hours_per_sprintnumberTotal productive engineering hours available per sprint (accounts for meetings, overhead).
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
sprint_length_daysnumberCalendar days in a single sprint cycle.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching.

critical_path

Compute critical path with merge-bias adjustment for project schedules. Performs forward/backward pass to identify critical tasks and slack. Applies merge bias: tasks with >2 predecessors get 5% duration increase per extra predecessor. Returns the critical path, task slack, and project duration. Use when sequencing dependent tasks to find the longest path and available slack.

ParameterTypeDescription
tasks *arrayAll tasks in the project graph. Each task must have a unique name.
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching.

monte_carlo_schedule

Run Monte Carlo simulation for probabilistic schedule risk analysis. Samples task durations from triangular distributions and returns P10/P50/P80/P95 completion estimates with identified risk events. Use seed for reproducible results. Supply target_hours (working hours; durations are 8-hour days) to get criticalPathProbability = P(total <= target_hours); without it that field is null.

ParameterTypeDescription
tasks *arrayTask list with PERT-style three-point estimates and dependency edges.
iterationsnumberNumber of Monte Carlo simulation iterations (1–100,000). Higher = more stable percentiles.
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
seedintegerOptional seed for reproducible results.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
target_hoursnumberOptional deadline in working hours (task durations are in 8-hour days). When supplied, criticalPathProbability reports P(total <= target_hours); when omitted it is null instead of a fabricated value.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching. Enables per-task-type accuracy tracking.

reference_class_estimate

Data-driven estimate using reference class forecasting. Applies historical correction factors based on actual-vs-estimated ratios. When no historical data exists, uses industry averages (1.3-2.2x for software tasks). Prioritize this over algorithmic models when historical data is available.

ParameterTypeDescription
task_type *stringCategory of work being estimated for reference-class lookup.
ai_nativeDegree of AI assistance: 0.0 = fully human, 1.0 = fully AI-native, 0.5 = hybrid. Accepts boolean for backward compatibility (true=1.0, false=0.0).
complexitynumberFine-tuning complexity from 1 (trivial) to 5 (extreme). Adjusts within the scope band: low complexity shortens, high complexity lengthens the estimate.
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
scopestringRough size of the task: small=tiny fix/tweak, medium=typical task, large=significant effort, xl=epic-scale. When omitted, inferred from complexity (1-2=small, 3=medium, 4=large, 5=xl).
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
team_idstringOptional team identifier to scope historical data to a specific team.

calibrate_estimates

Recalculate team-specific correction factors from historical estimation data. Compares estimated vs actual hours to compute a correction multiplier. Requires PM system integration for best results. Returns recommendations for improving estimation accuracy. Use when you have accumulated actuals and want to refresh team calibration factors.

ParameterTypeDescription
team_id *stringTeam identifier whose historical accuracy data should be analysed.
minimum_samplesnumberMinimum number of completed tasks required before producing a calibration factor.
period_daysnumberLookback window in calendar days for calibration data.

token_time_bridge

Map LLM token budgets to estimated wall-clock time. Uses model-specific calibration data (tokens/second, reasoning overhead, tool-call latency) to estimate how long a task will actually take. Bridges the gap between token-space (how agents reason) and time-space (what humans need). Use token_cost_estimate instead when dollar cost matters too.

ParameterTypeDescription
model *stringLLM model identifier. Unknown models fall back to generic estimates.
tokens *numberTotal number of tokens in the LLM request (prompt + completion).
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
reasoning_depthstringExpected depth of chain-of-thought reasoning. Deep reasoning adds significant per-token latency.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type for feedback matching.
tool_callsnumberNumber of tool calls expected in the agentic loop. Each adds overhead latency.

token_cost_estimate

Estimate wall-clock time AND dollar cost for LLM token usage. Combines token-to-time mapping with model-specific pricing data. Returns cost breakdown (input/output/overhead) alongside the time estimate. Use token_time_bridge when you only need wall-clock time and not dollar cost.

ParameterTypeDescription
model *stringLLM model identifier. Unknown models fall back to generic estimates.
tokens *numberTotal number of tokens in the LLM request (prompt + completion).
reasoning_depthstringExpected depth of chain-of-thought reasoning.
task_typestringOptional task type for feedback matching.
tool_callsnumberNumber of tool calls expected in the agentic loop.

compare_models

Compare all LLM models side-by-side for a given token budget. Ranks models by estimated cost or time. Shows quality tier for each model. Use when choosing which model to use for a task.

ParameterTypeDescription
tokens *numberTotal number of tokens to estimate across all models.
reasoning_depthstringExpected depth of chain-of-thought reasoning.
sort_bystringSort models by cost (default) or estimated time.
tool_callsnumberNumber of tool calls expected.

accuracy_trend

Track estimation accuracy improvement over time. Computes sliding-window MAPE and compares against industry baseline (25%). Shows whether your estimates are improving, degrading, or stable. Industry research shows estimation accuracy does NOT improve with experience (Cao 2022) — self-correcting systems like Epoch can buck this trend.

ParameterTypeDescription
team_idstringOptional team identifier to scope historical data.
window_sizenumberNumber of records per sliding window.

schedule_risk

Assess schedule risk for an estimate using historical accuracy data. Computes confidence intervals (p50/p80/p95) based on your team's MAPE. Returns risk level and actionable recommendations. Uses industry baseline (25% MAPE) when no historical data is available.

ParameterTypeDescription
estimated_hours *numberThe estimated effort in hours to assess risk for.
ai_nativeDegree of AI assistance: 0.0 = fully human, 1.0 = fully AI-native, 0.5 = hybrid. Accepts boolean for backward compatibility (true=1.0, false=0.0).
complexitynumberTask complexity from 1 (trivial) to 5 (extreme). Higher complexity widens confidence intervals.
projectstringOptional project/repo identifier this estimate belongs to, for cross-project analytics.
session_idstringOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelstringOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.
task_typestringOptional task type to refine historical accuracy lookup.
team_idstringOptional team identifier to scope historical data.

cocomo_validate

Validate COCOMO estimation model against 195 real historical projects. Runs the COCOMO Basic formula against projects from NASA93, COCOMO81, Albrecht, and Kemerer datasets. Reports overall MAPE, bias, per-type accuracy, and recommended coefficient adjustments. Use cocomo_ground_truth for the full multi-model benchmark across all COCOMO and AI-adjusted models.

ParameterTypeDescription
dataset_filterarrayOptional filter to validate against specific datasets only.

cocomo_ground_truth

Validate all COCOMO estimation models against 240 real historical projects with known effort. Runs 6 models in parallel: COCOMO Basic, COCOMO II Nominal, COCOMO II + AI 12x speedup, and AI + developer profile at human/hybrid/ai_native gradients. Reports MAPE, MMRE, PRED(25), PRED(50), bias per model, with breakdowns by dataset and project type. Use cocomo_validate for a quicker Basic COCOMO-only validation pass.

ParameterTypeDescription
dataset_filterarrayOptional filter to validate against specific datasets only.

record_actual

Submit actual hours for a previous estimate to improve future accuracy. Pairs with any estimation tool. The estimate_id comes from the estimate response. Actuals feed into the self-improvement loop — after enough samples, correction factors update automatically to reduce estimation bias.

ParameterTypeDescription
actual_hours *numberActual hours spent.
estimate_id *stringID of the estimate to update.
calibration_provenancestringOptional explicit provenance classification for this actual, consumed by the shared exclusion predicate (synthetic/smoke are excluded from calibration math). auto_wallclock marks a wall-clock-derived…
notesstringOptional context.
unitstringUnit actual_hours is expressed in. Normalized to hours at ingest (days=8h, weeks=40h workday convention, matching estimation.ts's toHours()). Defaults to hours when omitted.

get_pending_estimates

List recent estimates that have not yet received actual-hour feedback. Returns estimates awaiting actuals so you can submit feedback via record_actual. Use this to close the estimation feedback loop and improve accuracy over time.

ParameterTypeDescription
limitintegerMax estimates to return.

batch_record_actuals

Record actual hours for multiple estimates in a single call. Efficient for bulk feedback submission — accepts 1 to 500 entries at once. Each entry pairs an estimate ID with the actual hours spent. Returns total/succeeded/failed counts. Use when closing the feedback loop for many estimates at once; pass estimate_id values from get_pending_estimates.

ParameterTypeDescription
entries *arrayArray of actual-hour records (1–500 entries).

feedback_health

Get a health report on the estimation feedback loop. Shows total estimates, actuals, match rate, MAPE by tool and task type, and self-improvement readiness (which types have enough data for auto-calibration). Use when checking whether you have enough recorded actuals for calibration to kick in.

estimate_from_context

Classify a free-text task description and delegate to reference-class estimation. Classifies task_type and complexity from free text (issue body, PR/diff description, or task summary) using a LOCAL, deterministic keyword/signal heuristic — no LLM call (see src/lib/context-estimate.ts). Caller-supplied task_type/complexity hints always override the classification. Delegates the resolved inputs to the same reference-class-forecasting path used by reference_class_estimate, and returns classification provenance (classified_task_type, classified_complexity, confidence, signals) alongside the est…

ParameterTypeDescription
context *stringFree-text context describing the task to estimate — issue body, PR/diff description, or task summary. Will be used to classify task_type and complexity and delegate to reference_class_estimate / PER…
complexitynumberOptional pre-assessed complexity hint (1-5); used once classification logic ships.
task_typestringOptional pre-classified task type hint; used once classification logic ships.
team_idstringOptional team identifier to scope historical data once classification logic ships.