Skip to content

Commit 1a0edba

Browse files
authored
Merge pull request #4 from Enreign/feature/v0.4-token-estimation-pm-tools
Add token/cost estimation and 4 new PM tool integrations (v0.4.0)
2 parents 7324c4c + be889b2 commit 1a0edba

6 files changed

Lines changed: 441 additions & 18 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Research-backed formulas. PERT statistics. Calibration feedback loops. Zero depe
3535
- Supports **single tasks or batches** (paste 5 issues or 500)
3636
- Produces **PERT expected values** with confidence bands, not just ranges
3737
- Separates **"expected"** from **"committed"** estimates at your chosen confidence level
38-
- Outputs in formats ready for **Linear, JIRA, ClickUp, GitHub Issues, Monday, and GitLab**
38+
- Estimates **token consumption and API cost** per model tier (economy/standard/premium)
39+
- Outputs in formats ready for **Linear, JIRA, ClickUp, GitHub Issues, Monday, GitLab, Asana, Azure DevOps, Zenhub, and Shortcut**
3940
- Includes a **calibration system** to improve accuracy over time with actuals
4041

4142
## Quick Start
@@ -247,7 +248,7 @@ Estimates can be output in two modes for any supported tracker:
247248
| **Embedded** (default) | Markdown table in description/body | None |
248249
| **Native** | Maps to tracker-specific fields | Custom fields |
249250

250-
**Supported:** Linear, JIRA, ClickUp, GitHub Issues, Monday, GitLab
251+
**Supported:** Linear, JIRA, ClickUp, GitHub Issues, Monday, GitLab, Asana, Azure DevOps, Zenhub, Shortcut
251252

252253
Embedded mode works everywhere immediately. Native mode requires custom fields for agent-specific metrics.
253254

@@ -343,7 +344,7 @@ Evaluation prompts per the [Claude Skills 2.0](https://claude.com/blog/improving
343344
| `eval-quick.md` | Quick path produces valid PERT output with minimal input |
344345
| `eval-hybrid.md` | Detailed path handles multi-team, confidence levels, org overhead |
345346
| `eval-batch.md` | Batch mode with mixed types, dependencies, and rollup |
346-
| `eval-regression.md` | 6 baseline cases to detect drift after formula changes |
347+
| `eval-regression.md` | 8 baseline cases to detect drift after formula changes |
347348

348349
Run evals after any change to formulas, frameworks, or the skill workflow.
349350

@@ -354,7 +355,7 @@ Run evals after any change to formulas, frameworks, or the skill workflow.
354355
Contributions welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Key areas:
355356

356357
- **Calibration data** — Share anonymized estimated vs. actual results to improve default ratios
357-
- **Tracker mappings** — Additional tracker support (Asana, Notion, Shortcut, etc.)
358+
- **Tracker mappings** — Additional tracker support (Notion, Basecamp, etc.)
358359
- **Task types** — New multipliers for work categories not yet covered
359360
- **Formulas** — Improvements backed by data or research
360361
- **Evals** — Additional test cases, especially edge cases

SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Adapts to your team's working mode — human-only, hybrid, or agen
44
license: MIT
55
metadata:
66
author: Enreign
7-
version: "0.3.0"
7+
version: "0.4.0"
88
---
99

1010
# Progressive Estimation
@@ -131,7 +131,8 @@ The computation pipeline:
131131
6. Apply cone of uncertainty spread to widen/narrow range
132132
7. Compute PERT expected value and standard deviation
133133
8. Apply confidence multiplier for committed estimate
134-
9. Check anti-pattern guards and generate warnings
134+
9. Compute token & cost estimates (Step 15)
135+
10. Check anti-pattern guards and generate warnings
135136

136137
If the user requests a standalone deterministic calculator, generate one from
137138
`formulas.md` in their preferred language. The generated script must:
@@ -183,7 +184,7 @@ Then provide:
183184
- Tracker-formatted output (if requested)
184185

185186
Ask which tracker and mode:
186-
- **Tracker**: Linear, JIRA, ClickUp, GitHub Issues, Monday, GitLab, or generic
187+
- **Tracker**: Linear, JIRA, ClickUp, GitHub Issues, Monday, GitLab, Asana, Azure DevOps, Zenhub, Shortcut, or generic
187188
- **Mode**: Native fields or embedded in description (default: embedded)
188189

189190
For batch output, produce a summary table first, then rollup, then warnings,

references/formulas.md

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ standalone calculator scripts in any language.
2121
| confidence_level | 50/80/90 | 80 ||
2222
| definition_phase | concept/requirements/design/ready | ready ||
2323
| org_size | solo-startup/growth/enterprise | solo-startup ||
24+
| model_tier | economy/standard/premium or specific model | standard ||
25+
| show_cost | boolean | false ||
2426

2527
## Lookup Tables
2628

@@ -164,6 +166,52 @@ enterprise: 1.3 (formal review, compliance, multi-team coordination)
164166

165167
Applied to human time only (planning, review, fix), not agent time.
166168

169+
### Tokens Per Round (thousands, by complexity × maturity)
170+
171+
```
172+
S M L XL
173+
exploratory: 8k 15k 25k 40k
174+
partial: 6k 12k 20k 35k
175+
mostly-automated: 5k 10k 18k 30k
176+
```
177+
178+
### Output Token Ratio (by complexity)
179+
180+
```
181+
S: 0.25 M: 0.28 L: 0.30 XL: 0.35
182+
```
183+
184+
### Model Pricing (per 1M tokens, USD — last verified March 2026)
185+
186+
Representative models so users can pick the closest match:
187+
188+
```
189+
Model Input Output Tier
190+
─────────────────────────────────────────────────────
191+
GPT-4o Mini $0.15 $0.60 economy
192+
Gemini 2.5 Flash $0.30 $2.50 economy
193+
Claude Haiku 4.5 $1.00 $5.00 economy
194+
Gemini 2.5 Pro $1.25 $10.00 standard
195+
GPT-4o $2.50 $10.00 standard
196+
Claude Sonnet 4.6 $3.00 $15.00 standard
197+
Claude Opus 4.6 $5.00 $25.00 premium
198+
GPT-5 $1.25 $10.00 premium (capability, not price)
199+
```
200+
201+
For the tier-based formula, use these representative rates:
202+
203+
```
204+
Input Output
205+
economy: $0.50 $2.50 (Haiku, GPT-4o-mini, Gemini Flash)
206+
standard: $2.50 $12.00 (Sonnet, GPT-4o, Gemini 2.5 Pro)
207+
premium: $5.00 $25.00 (Opus, GPT-5)
208+
```
209+
210+
Note: "Premium" reflects capability tier (best available models), not
211+
necessarily highest price. GPT-5 is premium-capability at standard pricing.
212+
Pricing changes frequently — check provider pages before committing to
213+
cost-based decisions.
214+
167215
## Formulas
168216

169217
### Step 1: Agent Rounds
@@ -300,6 +348,29 @@ communication_overhead = 0.15 × (num_humans - 1)
300348
adjusted_human_time = adjusted_human_time × (1 + communication_overhead)
301349
```
302350

351+
### Step 15: Token & Cost Estimation
352+
353+
```
354+
tokens_per_round = tokens_per_round_table[complexity][maturity]
355+
output_ratio = output_token_ratio[complexity]
356+
357+
total_tokens_min = adjusted_rounds_min × tokens_per_round × num_agents
358+
total_tokens_max = adjusted_rounds_max × tokens_per_round × num_agents
359+
360+
input_tokens_min = total_tokens_min × (1 - output_ratio)
361+
input_tokens_max = total_tokens_max × (1 - output_ratio)
362+
output_tokens_min = total_tokens_min × output_ratio
363+
output_tokens_max = total_tokens_max × output_ratio
364+
365+
token_midpoint = (total_tokens_min + total_tokens_max) / 2
366+
pert_expected_tokens = (total_tokens_min + 4 × token_midpoint + total_tokens_max) / 6
367+
368+
# Cost (only if show_cost == true)
369+
cost_min = (input_tokens_min × input_price + output_tokens_min × output_price) / 1_000_000
370+
cost_max = (input_tokens_max × input_price + output_tokens_max × output_price) / 1_000_000
371+
pert_expected_cost = (cost_min + 4 × (cost_min + cost_max) / 2 + cost_max) / 6
372+
```
373+
303374
## Anti-Pattern Guards
304375

305376
After computing estimates, check for these patterns and append warnings:
@@ -427,7 +498,16 @@ Every estimation must produce these canonical fields:
427498
"humans": int,
428499
"agents": int
429500
},
430-
"story_points": int | null
501+
"story_points": int | null,
502+
"token_estimate": {
503+
"total_tokens": { "min": int, "max": int },
504+
"input_tokens": { "min": int, "max": int },
505+
"output_tokens": { "min": int, "max": int },
506+
"pert_expected_tokens": int,
507+
"model_tier": "economy" | "standard" | "premium",
508+
"cost_usd": { "min": float, "max": float } | null,
509+
"pert_expected_cost_usd": float | null
510+
}
431511
}
432512
```
433513

@@ -444,7 +524,10 @@ For batch, wrap in:
444524
"critical_path": string[],
445525
"task_count": int,
446526
"size_distribution": { "S": int, "M": int, "L": int, "XL": int },
447-
"warnings": string[]
527+
"warnings": string[],
528+
"total_tokens": int,
529+
"pert_expected_tokens": int,
530+
"total_cost_usd": float | null
448531
}
449532
}
450533
```

references/output-schema.md

Lines changed: 99 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Output format adapts to the detected cooperation mode:
4040

4141
Single task:
4242
```
43-
Expected: ~4 hrs | Committed (80%): ~5.5 hrs | 10-26 agent rounds + 3 hrs human | Risk: medium | Size: M
43+
Expected: ~4 hrs | Committed (80%): ~5.5 hrs | 10-26 agent rounds (~180k tokens) + 3 hrs human | Risk: medium | Size: M
4444
```
4545

4646
Batch:
@@ -90,6 +90,7 @@ Ask the user: "Native fields or embedded in description? (default: embedded)"
9090
| committed_hours | Custom field | "Committed Estimate (hrs)" |
9191
| confidence_level | Custom field | "Confidence %" |
9292
| priority | Priority | 1-4 mapping |
93+
| token_estimate | Custom field | "Est. Tokens" |
9394

9495
**Embedded:**
9596
```markdown
@@ -107,10 +108,17 @@ Ask the user: "Native fields or embedded in description? (default: embedded)"
107108
| **Expected (PERT)** | **~4 hrs** |
108109
| **Committed (80%)** | **~5.5 hrs** |
109110
| Confidence Band (68%) | 3.4-5.0 hrs |
111+
| Token Estimate | ~180k tokens |
112+
| Model Tier | standard |
113+
| Est. Cost | ~$1.20 |
110114
| Risk | medium |
111115
| Team | 1 human, 1 agent |
112116
```
113117

118+
Token Estimate and Model Tier always appear in the breakdown table.
119+
Est. Cost only appears if `show_cost == true`.
120+
Cost does NOT appear in the one-line summary (too noisy).
121+
114122
### Canonical → JIRA
115123

116124
**Native:**
@@ -126,6 +134,7 @@ Ask the user: "Native fields or embedded in description? (default: embedded)"
126134
| human_review_minutes | Custom field | number type |
127135
| pert_expected_hours | Custom field | "Expected Estimate (hrs)" |
128136
| labels | Labels | array |
137+
| token_estimate | Custom field | "Est. Tokens" (number) |
129138

130139
**Embedded:** Same markdown table in Description field.
131140

@@ -143,6 +152,7 @@ Ask the user: "Native fields or embedded in description? (default: embedded)"
143152
| agent_rounds | Custom field | number |
144153
| human_review_minutes | Custom field | number |
145154
| priority | Priority | 1-4 |
155+
| token_estimate | Custom field | "Est. Tokens" (number) |
146156

147157
**Embedded:** Same markdown table in Description field.
148158

@@ -160,6 +170,7 @@ Ask the user: "Native fields or embedded in description? (default: embedded)"
160170
| agent_rounds | Body section | no custom fields |
161171
| human_review_minutes | Body section | no custom fields |
162172
| labels | Labels ||
173+
| token_estimate | Body section | no custom fields |
163174

164175
**Embedded:** Markdown table in issue Body. This is the recommended mode
165176
for GitHub Issues since it has no custom field support.
@@ -180,6 +191,7 @@ for GitHub Issues since it has no custom field support.
180191
| human_review_minutes | Numbers column | "Review (min)" |
181192
| priority | Priority column ||
182193
| labels | Tags column ||
194+
| token_estimate | Numbers column | "Est. Tokens" |
183195

184196
**Embedded:** Markdown in Updates or Long Text column.
185197

@@ -198,22 +210,101 @@ for GitHub Issues since it has no custom field support.
198210
| agent_rounds | Description section | no custom fields in free tier |
199211
| human_review_minutes | Description section ||
200212
| labels | Labels | scoped labels supported |
213+
| token_estimate | Description section | no custom fields in free tier |
201214

202215
**Embedded:** Markdown table in Description. Use `/estimate` quick action
203216
for time tracking integration.
204217

218+
### Canonical → Asana
219+
220+
**Native:**
221+
| Canonical Field | Asana Field | Notes |
222+
|----------------|------------|-------|
223+
| title | Task Name ||
224+
| complexity | Custom field (Dropdown) | "Size" — S/M/L/XL |
225+
| committed_hours | Custom field (Number) | "Committed Estimate (hrs)" |
226+
| pert_expected_hours | Custom field (Number) | "Expected (hrs)" |
227+
| risk_level | Custom field (Dropdown) | "Risk" — low/medium/high |
228+
| risk_notes | Description | appended |
229+
| subtasks | Subtasks | native |
230+
| agent_rounds | Custom field (Number) | "Agent Rounds" |
231+
| human_review_minutes | Custom field (Number) | "Review (min)" |
232+
| token_estimate | Custom field (Number) | "Est. Tokens" |
233+
234+
**Embedded:** Markdown in Description. Quirks: custom fields are
235+
project-scoped; time tracking is paid.
236+
237+
### Canonical → Azure DevOps
238+
239+
**Native:**
240+
| Canonical Field | ADO Field | Notes |
241+
|----------------|----------|-------|
242+
| title | Title ||
243+
| complexity | Tags | `Size:M` |
244+
| committed_hours | Original Estimate | hours (native) |
245+
| pert_expected_hours | Custom field (Decimal) | "Expected Estimate (hrs)" |
246+
| risk_level | Tags | `Risk:medium` |
247+
| risk_notes | Description | HTML — use `<table>` |
248+
| subtasks | Child work items | parent-child link |
249+
| agent_rounds | Custom field (Integer) | "Agent Rounds" |
250+
| story_points | Story Points | native on User Story |
251+
| token_estimate | Custom field (Integer) | "Est. Tokens" |
252+
253+
**Embedded:** HTML table in Description (ADO uses HTML, not markdown).
254+
Quirks: custom fields via Process customization; work item types matter
255+
(User Story vs Task).
256+
257+
### Canonical → Zenhub
258+
259+
**Native:**
260+
| Canonical Field | Zenhub Field | Notes |
261+
|----------------|-------------|-------|
262+
| title | Issue Title | GitHub Issue title |
263+
| complexity | Label | `size/M` (GitHub label) |
264+
| committed_hours | Estimate | Zenhub story points field |
265+
| pert_expected_hours | Body section | no custom fields |
266+
| risk_level | Label | `risk/medium` (GitHub label) |
267+
| risk_notes | Body ||
268+
| subtasks | Task list | `- [ ]` in body, or child issues |
269+
| agent_rounds | Body section | no custom fields |
270+
| story_points | Estimate | native Zenhub field (points) |
271+
| token_estimate | Body section | no custom fields |
272+
273+
**Embedded:** Markdown in GitHub Issue body (recommended). Quirks: Zenhub
274+
layers on top of GitHub Issues — uses GitHub labels + body for most data;
275+
Estimate field is points-only; Epics are cross-repo issue collections.
276+
277+
### Canonical → Shortcut
278+
279+
**Native:**
280+
| Canonical Field | Shortcut Field | Notes |
281+
|----------------|---------------|-------|
282+
| title | Story Name ||
283+
| complexity | Label | `size:M` |
284+
| committed_hours | Custom field (Number) | "Committed (hrs)" |
285+
| pert_expected_hours | Custom field (Number) | "Expected (hrs)" |
286+
| risk_level | Label | `risk:medium` |
287+
| risk_notes | Description | markdown supported |
288+
| subtasks | Tasks (within Story) | checklist-style |
289+
| agent_rounds | Custom field (Number) | "Agent Rounds" |
290+
| story_points | Estimate | native field (points) |
291+
| token_estimate | Custom field (Number) | "Est. Tokens" |
292+
293+
**Embedded:** Markdown in Description. Quirks: custom fields on Team plan+;
294+
native Estimate is points not hours; Stories have Tasks (checklist items).
295+
205296
## Batch Output Format
206297

207298
### Summary Table (Always First)
208299

209300
```
210-
| # | Task | Size | Type | Rounds | Agent | Human | Expected | Committed (80%) | Risk | Deps |
211-
|---|------|------|------|--------|-------|-------|----------|-----------------|------|------|
212-
| 1 | Auth service | M | coding | 10-26 | 20-78m | 2-3h | ~4h | ~5.5h | med | — |
213-
| 2 | Payment | L | coding | 26-65 | 52-195m | 4-8h | ~8h | ~11h | high | #1 |
214-
| 3 | DB migration | L | data-mig | 26-65 | 52-195m | 4-8h | ~16h | ~22h | high | — |
215-
|---|------|------|------|--------|-------|-------|----------|-----------------|------|------|
216-
| | **Totals** | | | | | | **~28h** | **~38.5h** | | |
301+
| # | Task | Size | Type | Rounds | Agent | Human | Tokens | Expected | Committed (80%) | Risk | Deps |
302+
|---|------|------|------|--------|-------|-------|--------|----------|-----------------|------|------|
303+
| 1 | Auth service | M | coding | 10-26 | 20-78m | 2-3h | ~180k | ~4h | ~5.5h | med | — |
304+
| 2 | Payment | L | coding | 26-65 | 52-195m | 4-8h | ~520k | ~8h | ~11h | high | #1 |
305+
| 3 | DB migration | L | data-mig | 26-65 | 52-195m | 4-8h | ~520k | ~16h | ~22h | high | — |
306+
|---|------|------|------|--------|-------|-------|--------|----------|-----------------|------|------|
307+
| | **Totals** | | | | | | **~1.2M** | **~28h** | **~38.5h** | | |
217308
```
218309

219310
### Rollup Block

references/questionnaire.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ All quick-path questions, plus:
119119
- Enterprise (50+ people) — formal review, compliance, multi-team coordination (1.3x)
120120
13. **Dependencies**: "Is this blocked by or blocking other tasks?"
121121
→ dependency graph for sequencing
122+
14. **Model & cost**: "Which model tier are you using, and do you want cost estimates?"
123+
`model_tier`, `show_cost`
124+
- Economy (Haiku, GPT-4o Mini, Gemini Flash) — cheapest
125+
- Standard (Sonnet, GPT-4o, Gemini 2.5 Pro) — default
126+
- Premium (Opus, GPT-5) — most capable
127+
- Or name a specific model from the pricing table
128+
- Show cost: yes/no (default: no)
129+
- If user names a specific model, map to its tier for the formula
122130

123131
## Detailed Path — Batch
124132

@@ -159,6 +167,7 @@ User can mark overrides or approve the whole table at once.
159167
| Definition phase | spread_multiplier | ready (1.0x) | asked |
160168
| Organization context | org_overhead | solo-startup (1.0x) | asked |
161169
| Dependencies | sequencing | none | asked |
170+
| Model & cost | model_tier, show_cost | standard, false | asked |
162171

163172
## Input Formats Accepted (Batch)
164173

0 commit comments

Comments
 (0)