Thrivve Partners Monte Carlo 'When' Forecasting
Forecast when a specific number of stories or tasks will be completed using Monte Carlo simulation based on historical throughput data.
When to Use
Use this skill when the user provides:
- Historical throughput data (daily counts for at least 10 days)
- Number of stories/tasks remaining to complete
- A desired confidence level (optional, defaults to 85%)
- A start date (optional, defaults to today)
Common trigger patterns:
- "In the last X days, the throughput has been [counts] - when will I complete [N] stories with [confidence]% confidence?"
- "Based on throughput of [counts], when will we finish [N] stories if we start [date / 'today']?"
- "Run Monte Carlo simulation for [counts] to complete [N] stories"
- "I have [N] stories left, when will I be done?"
Quick Start
Execute the Monte Carlo simulation script:
python scripts/thrivve-mc-when.py "<comma-separated-throughput>" <stories-remaining> <confidence-level> "<start-date>"
Example:
python scripts/thrivve-mc-when.py "3,5,4,2,6,4,5,3,7,4,5,6,3,4,5" 100 85 "2025-10-27"
Input Requirements
Throughput data: Minimum 10 days of daily completion counts
- Format: Comma-separated integers (e.g., "3,5,4,2,6,4,5,3,7,4")
- More data = better predictions (15-30 days recommended)
Stories remaining: Integer count of items to complete
- Must be greater than 0
- Typical range: 10-500 (larger numbers may take longer)
Confidence level: Percentage between 0-99 (default: 85)
- 25%: Optimistic outcome (earlier date, lower certainty)
- 50%: Median outcome (equal chance of earlier or later)
- 70%: Balanced outcome
- 85%: Conservative (commonly used in agile forecasting)
- 95%: Very conservative (high certainty, later date)
- 99%: Maximum practical confidence (extremely conservative)
- Note: 100% confidence is not possible in probabilistic forecasting
Start date: A date in any common format (default: today)
- Supported formats: YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, "Month DD, YYYY", etc.
Output Format
The script provides:
- Primary answer: Completion date at specified confidence level
- Percentile forecasts: P25, P50, P70, P85, P95, P99 (dates)
- Statistical summary: Mean, min, max dates across all simulations
- Days analysis: Days required at different confidence levels
- Throughput analysis: Statistics about historical data
- Process variation check: Assessment of data stability for forecasting
- JSON output: Structured data for further processing
Process Variation Checking
The skill automatically validates whether your throughput data exhibits stable, predictable variation suitable for forecasting using XMR (Individual and Moving Range) control charts from Statistical Process Control.
When It Runs
- 20+ data points: Full variation check runs, calculating control limits (UNPL, LNPL, URL)
- 10-19 data points: Simulation runs, but shows info message that variation cannot be verified
- < 10 data points: Simulation cannot run (insufficient data)
What It Checks
- Individual Values (UNPL/LNPL): Identifies unusually high or low throughput days
- Moving Ranges (URL): Detects unstable day-to-day variation
- Process Stability: Determines if historical data represents predictable future behavior
Understanding the Messages
✓ Process Stability Confirmed (Green Light)
- All throughput values within natural process limits
- Data is suitable for forecasting
- Past patterns reliably predict future performance
ℹ️ Variation Check Skipped (Informational)
- Less than 20 data points provided
- Simulation runs but process stability cannot be verified
- Consider gathering more data for validation
⚠️ Variation Warning (Caution Required)
- Outliers detected exceeding control limits
- Displays specific outlier values and calculated limits
- Forecast reliability may be compromised
- Recommendation: Investigate outliers before trusting forecast
- Are they one-time events (holiday, outage, reorganization)?
- Do they represent a changed process (new workflow, team size)?
- Should they be excluded from forecasting data?
Why It Matters
Monte Carlo simulation assumes your historical data represents future behavior. Outliers violate this assumption:
- May inflate variability, making forecasts unnecessarily pessimistic
- May skew averages, distorting expected completion times
- Signal process instability, making predictions unreliable
As documented in ProKanban research: "If there are values outside of LNPL or UNPL lines, the system is objectively unstable therefore it shouldn't be used for forecasting."
What to Do About Outliers
- Investigate: Understand why the outlier occurred
- Classify: One-time event or permanent process change?
- Decide:
- Exclude if non-recurring (e.g., holiday shutdown)
- Keep if representative of new normal (e.g., increased team capacity)
- Re-run: Update forecast with adjusted data
For detailed statistical explanation, see references/methodology.md.
Workflow
- Parse user's throughput data from their message
- Extract stories remaining and confidence level
- Run the Monte Carlo script with parsed parameters
- Present results in clear, actionable format
- Explain what the confidence level means in context
Interpreting Results
- At X% confidence: "There's an X% chance you'll be done ON OR BEFORE this date" (uses the percentile: X)
- P50 (median): Half of simulations finished earlier, half later
- P85: 85% of simulations finished on or before this date
- P95: 95% of simulations finished on or before this date
- Range: Shows fastest and slowest completion from all simulations
Example: At 85% confidence, you'll complete the work on or before December 15th (P85), meaning there's an 85% chance of finishing on or before that date (and only a 15% chance it will take longer).
Advanced Usage
Optional parameters:
num_simulations: Number of Monte Carlo runs (default: 10,000)
- Higher values increase accuracy but take longer
- 10,000 is typically sufficient for reliable results
Methodology
For detailed explanation of Monte Carlo simulation methodology, assumptions, and limitations, see references/methodology.md.
Key points:
- Uses random sampling from historical throughput
- Runs thousands of simulations to build probability distribution
- Assumes past patterns continue into the future
- Does not account for trends or changing conditions
Example Interaction
User: "In the last 15 days, the throughput has been 3,5,4,2,6,4,5,3,7,4,5,6,3,4,5 - when will I complete 100 stories with 85% confidence, if I start today?"
Response steps:
- Parse throughput: [3,5,4,2,6,4,5,3,7,4,5,6,3,4,5]
- Parse stories remaining: 100
- Parse confidence: 85%
- Parse start date: today (2025-10-27)
- Run simulation
- Present results: "Given your start date of today (October 27, 2025), at 85% confidence you will complete 100 stories on or before November 19, 2025 (there's only a 15% chance it will take longer)"
- Provide percentile context and explain the forecast
1---2name: thrivve-mc-when3description: Thrivve Partners Monte Carlo simulation to forecast completion date based on remaining work and historical throughput. Use when the user asks "when will I complete [N] stories/tasks" with historical daily throughput data. Requires at least 10 days of throughput history, a count of remaining items, and optional confidence level (default 85%).4---5
6# Thrivve Partners Monte Carlo 'When' Forecasting
7
8Forecast when a specific number of stories or tasks will be completed using Monte Carlo simulation based on historical throughput data.
9
10## When to Use
11
12Use this skill when the user provides:
131. Historical throughput data (daily counts for at least 10 days)
142. Number of stories/tasks remaining to complete
153. A desired confidence level (optional, defaults to 85%)
164. A start date (optional, defaults to today)
17
18Common trigger patterns:
19- "In the last X days, the throughput has been [counts] - when will I complete [N] stories with [confidence]% confidence?"
20- "Based on throughput of [counts], when will we finish [N] stories if we start [date / 'today']?"
21- "Run Monte Carlo simulation for [counts] to complete [N] stories"
22- "I have [N] stories left, when will I be done?"
23
24## Quick Start
25
26Execute the Monte Carlo simulation script:
27
28```bash
29python scripts/thrivve-mc-when.py "<comma-separated-throughput>" <stories-remaining> <confidence-level> "<start-date>"
30```
31
32Example:
33```bash
34python scripts/thrivve-mc-when.py "3,5,4,2,6,4,5,3,7,4,5,6,3,4,5" 100 85 "2025-10-27"
35```
36
37## Input Requirements
38
391. **Throughput data**: Minimum 10 days of daily completion counts
40 - Format: Comma-separated integers (e.g., "3,5,4,2,6,4,5,3,7,4")
41 - More data = better predictions (15-30 days recommended)
42
432. **Stories remaining**: Integer count of items to complete
44 - Must be greater than 0
45 - Typical range: 10-500 (larger numbers may take longer)
46
473. **Confidence level**: Percentage between 0-99 (default: 85)
48 - 25%: Optimistic outcome (earlier date, lower certainty)
49 - 50%: Median outcome (equal chance of earlier or later)
50 - 70%: Balanced outcome
51 - 85%: Conservative (commonly used in agile forecasting)
52 - 95%: Very conservative (high certainty, later date)
53 - 99%: Maximum practical confidence (extremely conservative)
54 - Note: 100% confidence is not possible in probabilistic forecasting
55
564. **Start date**: A date in any common format (default: today)
57 - Supported formats: YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, "Month DD, YYYY", etc.
58
59## Output Format
60
61The script provides:
62- **Primary answer**: Completion date at specified confidence level
63- **Percentile forecasts**: P25, P50, P70, P85, P95, P99 (dates)
64- **Statistical summary**: Mean, min, max dates across all simulations
65- **Days analysis**: Days required at different confidence levels
66- **Throughput analysis**: Statistics about historical data
67- **Process variation check**: Assessment of data stability for forecasting
68- **JSON output**: Structured data for further processing
69
70## Process Variation Checking
71
72The skill automatically validates whether your throughput data exhibits stable, predictable variation suitable for forecasting using **XMR (Individual and Moving Range) control charts** from Statistical Process Control.
73
74### When It Runs
75
76- **20+ data points**: Full variation check runs, calculating control limits (UNPL, LNPL, URL)
77- **10-19 data points**: Simulation runs, but shows info message that variation cannot be verified
78- **< 10 data points**: Simulation cannot run (insufficient data)
79
80### What It Checks
81
821. **Individual Values (UNPL/LNPL)**: Identifies unusually high or low throughput days
832. **Moving Ranges (URL)**: Detects unstable day-to-day variation
843. **Process Stability**: Determines if historical data represents predictable future behavior
85
86### Understanding the Messages
87
88**✓ Process Stability Confirmed** (Green Light)
89- All throughput values within natural process limits
90- Data is suitable for forecasting
91- Past patterns reliably predict future performance
92
93**ℹ️ Variation Check Skipped** (Informational)
94- Less than 20 data points provided
95- Simulation runs but process stability cannot be verified
96- Consider gathering more data for validation
97
98**⚠️ Variation Warning** (Caution Required)
99- Outliers detected exceeding control limits
100- Displays specific outlier values and calculated limits
101- Forecast reliability may be compromised
102- **Recommendation**: Investigate outliers before trusting forecast
103 - Are they one-time events (holiday, outage, reorganization)?
104 - Do they represent a changed process (new workflow, team size)?
105 - Should they be excluded from forecasting data?
106
107### Why It Matters
108
109Monte Carlo simulation assumes your historical data represents future behavior. **Outliers violate this assumption**:
110- May inflate variability, making forecasts unnecessarily pessimistic
111- May skew averages, distorting expected completion times
112- Signal process instability, making predictions unreliable
113
114As documented in ProKanban research: "If there are values outside of LNPL or UNPL lines, the system is objectively unstable therefore it shouldn't be used for forecasting."
115
116### What to Do About Outliers
117
1181. **Investigate**: Understand why the outlier occurred
1192. **Classify**: One-time event or permanent process change?
1203. **Decide**:
121 - Exclude if non-recurring (e.g., holiday shutdown)
122 - Keep if representative of new normal (e.g., increased team capacity)
1234. **Re-run**: Update forecast with adjusted data
124
125For detailed statistical explanation, see `references/methodology.md`.
126
127## Workflow
128
1291. Parse user's throughput data from their message
1302. Extract stories remaining and confidence level
1313. Run the Monte Carlo script with parsed parameters
1324. Present results in clear, actionable format
1335. Explain what the confidence level means in context
134
135## Interpreting Results
136
137- **At X% confidence**: "There's an X% chance you'll be done ON OR BEFORE this date" (uses the percentile: X)
138- **P50 (median)**: Half of simulations finished earlier, half later
139- **P85**: 85% of simulations finished on or before this date
140- **P95**: 95% of simulations finished on or before this date
141- **Range**: Shows fastest and slowest completion from all simulations
142
143**Example**: At 85% confidence, you'll complete the work on or before December 15th (P85), meaning there's an 85% chance of finishing on or before that date (and only a 15% chance it will take longer).
144
145## Advanced Usage
146
147Optional parameters:
148- `num_simulations`: Number of Monte Carlo runs (default: 10,000)
149 - Higher values increase accuracy but take longer
150 - 10,000 is typically sufficient for reliable results
151
152## Methodology
153
154For detailed explanation of Monte Carlo simulation methodology, assumptions, and limitations, see `references/methodology.md`.
155
156Key points:
157- Uses random sampling from historical throughput
158- Runs thousands of simulations to build probability distribution
159- Assumes past patterns continue into the future
160- Does not account for trends or changing conditions
161
162## Example Interaction
163
164User: "In the last 15 days, the throughput has been 3,5,4,2,6,4,5,3,7,4,5,6,3,4,5 - when will I complete 100 stories with 85% confidence, if I start today?"
165
166Response steps:
1671. Parse throughput: [3,5,4,2,6,4,5,3,7,4,5,6,3,4,5]
1682. Parse stories remaining: 100
1693. Parse confidence: 85%
1704. Parse start date: today (2025-10-27)
1715. Run simulation
1726. Present results: "Given your start date of today (October 27, 2025), at 85% confidence you will complete 100 stories on or before November 19, 2025 (there's only a 15% chance it will take longer)"
1737. Provide percentile context and explain the forecast