Project estimates you can defend.
Planaco simulates task uncertainty to show when your project will likely finish.
pip install planaco
A Python library and CLI. Python 3.8 or newer, MIT licensed.
- The plan
- 25 days16% of runs
- Safe to promise
- 33 daysP85
- Near-certain
- 36 daysP95
Estimate each task.
Set the minimum, most likely, and maximum duration. All values are days, and every change reruns 10,000 simulations.
Task 1: Design
Task 2A: Frontend
Task 2B: Backend
Task 3: Testing
The plan says 25 days.
That is each most likely estimate added along the longest path: Design 7 + Backend 15 + Testing 3.
16% of the simulated runs finish by then.
Which task is making you late?
The share of runs in which each task sat on the critical path. Design and Testing sit on every path, so the race is Frontend against Backend.
- Design100%
- Frontend6%
- Backend94%
- Testing100%
The library reports this measure with project.get_critical_path_analysis().
The same plan, in code.
The plan above as a Python script, a YAML file for the command line, or a prompt for a coding agent.
Python
from planaco import Task, Project
project = Project(name="Web App", unit="days")
design = Task(name="Design", min_duration=5, mode_duration=7, max_duration=14)
frontend = Task(name="Frontend", min_duration=8, mode_duration=12, max_duration=15)
backend = Task(name="Backend", min_duration=10, mode_duration=15, max_duration=25)
testing = Task(name="Testing", min_duration=2, mode_duration=3, max_duration=5)
project.add_task(design)
project.add_task(frontend, depends_on=[design])
project.add_task(backend, depends_on=[design])
project.add_task(testing, depends_on=[frontend, backend])
stats = project.statistics(n=10_000)
print(stats["percentiles"]["p85"])
YAML + CLI
project:
name: "Web App"
unit: "days"
seed: 42
tasks:
design:
name: "Design"
min_duration: 5
mode_duration: 7
max_duration: 14
frontend:
name: "Frontend"
min_duration: 8
mode_duration: 12
max_duration: 15
depends_on:
- design
backend:
name: "Backend"
min_duration: 10
mode_duration: 15
max_duration: 25
depends_on:
- design
testing:
name: "Testing"
min_duration: 2
mode_duration: 3
max_duration: 5
depends_on:
- frontend
- backend# Print formatted statistics
planaco stats project.yaml -n 10000
# Export results (json or csv)
planaco run project.yaml -o results.json
# Histogram or cumulative plot
planaco plot project.yaml -o chart.svg
# Draw the task dependency graph
planaco graph project.yaml -o graph.svg
# Write a starter project file to edit
planaco init starter.yamlOutput
Project: Web App
==================================================
Simulations: 10,000
Time Unit: days
Duration Estimates:
Mean: 28.7 days
Median (P50): 28.5 days
Std Deviation: 3.6 days
Min: 19.1 days
Max: 41.4 days
Percentiles:
P10: 24.1 days
P50: 28.5 days
P85: 32.7 days
P90: 33.6 days
P95: 35.1 days
Confidence Interval:
95% CI: [21.6, 35.9] days{
"Design": {
"task_id": "52d66973-922f-4e00-8b84-73f13c6afd10",
"count": 10000,
"frequency": 1.0
},
"Frontend": {
"task_id": "8c77454a-9e68-4080-b906-8e2698391d7d",
"count": 614,
"frequency": 0.0614
},
"Backend": {
"task_id": "d1cc77a0-1f63-417b-96c7-b3200a850d52",
"count": 9386,
"frequency": 0.9386
},
"Testing": {
"task_id": "4f1e4b88-a6a2-4c4d-ba55-31c41894fb07",
"count": 10000,
"frequency": 1.0
}
}Real output from version 0.3.1. Both runs are seeded with 42, so they reproduce; each task_id is new on every run. The chart on this page runs a JavaScript port of the same model with its own random numbers, so its figures differ slightly: Frontend is on the critical path in 5.9% of its runs against 6.1% here, and its longest run is 41.8 days against 41.4.
With an agent
Install planaco with "pip install planaco". Then write project.yaml for this plan, in days, giving every task a min_duration, mode_duration and max_duration: - design: 5, 7, 14 - frontend: 8, 12, 15, depends_on design - backend: 10, 15, 25, depends_on design - testing: 2, 3, 5, depends_on frontend and backend Put seed: 42 under project so the run reproduces. Run "planaco stats project.yaml" and report the P50, P85 and P95 in days.
planaco has no agent integration of its own. The agent writes the YAML and runs the command line.
Pick the shape that fits the uncertainty
Six distributions, set per task.
| Distribution | Shape | Use it for | YAML fields |
|---|---|---|---|
| Triangular | A three-point estimate. The default. | estimator: triangularmin_duration, mode_duration, max_duration |
|
| PERT | Smoother than triangular, with more weight on the most likely value. | estimator: pertmin_duration, mode_duration, max_duration, optional lamb |
|
| Uniform | Every duration in the range is equally likely. | estimator: uniformmin_duration, max_duration |
|
| Normal | A symmetric bell, cut off below at min_value (0 by default) and optionally above. |
estimator: normalmean, std_dev, optional min_value, max_value |
|
| LogNormal | Right-skewed: most runs land near the estimate and a few overrun badly. | estimator: lognormalmean, std_dev, optional min_value, max_value |
|
| Beta | A flexible shape set by alpha and beta. | estimator: betaalpha, beta, max_value, optional min_value |
Before you install
- Can I use it without writing Python?
- Yes. Describe the project in a YAML file and run
planaco stats project.yaml. - Does it handle dependencies?
- Yes. Each task lists what it depends on and waits for all of it. The critical path is found in every run.
- Is it stable?
- Not yet. Version 0.3.1 is alpha, and the public API may still change between releases.
- What does it need?
- Python 3.8 or newer, with click, numpy, PyYAML and cairosvg. PNG export also needs the Cairo system library; SVG works without it.
- How well is it tested?
- 100% line coverage today, and CI fails the build below 99%.
- What is the licence?
- MIT.