---
name: build-vs-buy-decision
description: "Compare build, buy and open-source options with 3-year TCO, risks and exit criteria from an options file, and write a decision memo. Arithmetic is deterministic with stated assumptions. Use when deciding whether to build, buy or adopt open source for a capability."
---
# build-vs-buy-decision (lite)
Helps a team replace a long meeting with numbers: a 3-year TCO per option, risks, exit costs and a memo that can be shown to management or finance.
## When to use
- "Do we build or buy this?"
- "Compare the 3-year TCO."
- "Write the decision memo."
- "What does it cost to leave this vendor?"
- An `options.yaml` file is present.
Not in scope: fetching vendor prices, negotiation and contract analysis. Use it on your own data only.
## Agent flow
1. Define requirements and constraints with the user.
2. Create `options.yaml` (see `references/checklist.md`): costs, hours, licences, assumptions, a source for every assumption, a do-nothing option and a discount rate.
3. Run `sh scripts/tco.sh options.yaml` and read the TCO lines and findings.
4. Fix every finding or state why it stays.
5. Score risks and exit cost for each option.
6. Write the memo from `references/memo-template.md`.
7. Point out the assumptions that weigh most, and say when the decision is not robust (a gap smaller than the uncertainty).
## Scripts
`scripts/tco.sh options.yaml [years]` prints `tco <name> <total> nominal <total>` per option and findings as `file:line: RULE message`. Rules checked: SK060-R01 (no maintenance cost), SK060-R02 (no exit cost), SK060-R06 (no do-nothing option), SK060-R07 (no discount rate). Exit codes: 0 no findings, 1 findings, 2 usage error. Arithmetic uses awk floating point rounded to cents.
## References
- `references/checklist.md`: what an options file needs.
- `references/memo-template.md`: the decision memo template.
— ‹guest · 2026-12-03› —
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.