| name | cogs-sentinel |
| description | Executable COGS gate for AI products. Runs a deterministic Python sampler (lognormal token-cost distribution) to compute p50/p90 per-paid-user monthly COGS, gross margin scenarios, and free-user abuse blend. Returns GREEN / CONDITIONAL_GO / RED before any paid AI product is greenlit. Use when promising a paid AI feature, comparing providers (Anthropic/OpenAI/Google), or when discover/cost-sim has produced a usage hypothesis and you need real numbers. |
| argument-hint | [provider, model, usage params or path to JSON] |
| allowed-tools | ["Read","Write","Bash"] |
| model | inherit |
| hooks | {"Stop":[{"type":"command","command":"python3 hplan/scripts/cogs_sentinel.py --params harness/build-gate/cogs_input.json --out harness/build-gate/cogs_report.md 2>/dev/null || true"}]} |
COGS Sentinel โ Executable Margin Gate
Running for: $ARGUMENTS
Core Goal
- Token ๋จ๊ฐ์ ์ฌ์ฉ ํจํด์ผ๋ก๋ถํฐ p50/p90 ์๊ฐ COGS์ gross margin์ ๊ณ์ฐํ์ฌ paid AI product์ ๊ฒฝ์ ์ viability๋ฅผ PRD ์ ์ ํ๋จํ๋ค.
- Free-user abuse ์๋๋ฆฌ์ค๋ฅผ blendํด "์ ๋ฃ 1๋ช
๋น ๋ฌด๋ฃ 24๋ช
์ ๊ฐ๋นํด์ผ ํ ๋" ๋ง์ง์ด ์ด์๋จ๋์ง ๋ณธ๋ค.
- ๊ฒฐ์ ์ GREEN / CONDITIONAL_GO / RED + ๊ตฌ์ฒด์ mitigation ๊ถ๊ณ .
Trigger Gate
Use This Skill When
- ์ฌ์ฉ์๊ฐ ์ ๋ฃ ๊ฐ๊ฒฉ์ ์ฑ
์ ํ๋ ค ํ ๋ (
$X/mo, per-call, etc.)
discover/cost-sim์ด ์๋๋ฆฌ์ค๋ฅผ ๋์ถํ ํ ๊ฒฐ์ ๋ก ์ ์์น๊ฐ ํ์ํ ๋
- Provider ๊ต์ฒด(Anthropic โ OpenAI โ Google)์ ์ํฅ ์ธก์
- ๋ฌด๋ฃ tier ๋์
์ abuse๊ฐ ๋ง์ง์ ๊นจ์ง ์๋์ง ์ฌ์ ๊ฒ์ฆ
- Build Gate ์ง์
์
Route to Other Skills When
- ๋น์ฉ ์๋๋ฆฌ์ค ์์ฒด๊ฐ ์์ง ๋ช
ํํ์ง ์์ ๋ โ
discover/cost-sim ๋จผ์
- ๋ฐฐํฌ ํ ์ค์ ์ถ์ โ
operate/ops-review
- ๊ฐ๊ฒฉ ๋ชจ๋ธ ์์ฒด๋ฅผ ๋ค์ ์งค ๋ โ
architect/strategy
- COGS RED ๊ฒฐ์ ์ด ๋ฌ์ ๋ โ
decision-log (hold/pivot) ๊ธฐ๋ก ํ routing
Boundary Checks
- โน๏ธ
--cac์ --monthly-churn์ ํจ๊ป ์ ๋ฌํ๋ฉด LTV/CAC/Payback + overall_verdict(BUILD/HOLD/INVESTIGATE)๋ฅผ ์ถ๊ฐ๋ก ์ฐ์ถํ๋ค. ๋ ์ธ์๋ฅผ ์๋ตํ๋ฉด ๋ฌด์๋์ด ํ์ํธํ์ด ์ ์ง๋๋ค. (--mau ์ถ๊ฐ ์ Business Report ๋ธ๋ก โ ๋งค์ถ/COGS/cost_ratio/blended โ ๋ ํฌํจ๋จ.)
- โน๏ธ ์ด skill์ sanity-check(๋น๋ ๊ฒ์ดํธ)์ด์ง ํ๊ณ ๋ณด๊ณ ์๊ฐ ์๋๋ค โ ๋ฒ์ธ์ธยท๊ฐ๊ฐ์๊ฐ ๋ฑ ์ ์ฐ ํ๊ณ ํญ๋ชฉ์ ๋ค๋ฃจ์ง ์๋๋ค.
- โ Provider ๋จ๊ฐ๋
references/provider_pricing.json ์ค๋
์ท ๊ธฐ์ค์ด๋ค. ์ต์ ๋จ๊ฐ๋ ์ฌ์ฉ์๊ฐ verifyํด์ผ ํจ.
- โ lognormal sampling์ด๋ผ ๊ฒฐ์ ๋ก ์ ์ด์ง๋ง ์ค์ ๋ถํฌ์ ๋ค๋ฅผ ์ ์๋ค โ sanity check ์ฉ๋์ง ํ๊ณ ๋ณด๊ณ ์ ์๋.
Inputs
CLI:
python3 hplan/scripts/cogs_sentinel.py \
--provider anthropic --model claude-sonnet-4-6 \
--tokens-in 3000 --tokens-out 1500 --calls-per-user-month 40 \
--arpu 29 --paid-conversion 0.08 --free-abuse-multiplier 3
๋๋ JSON:
{
"provider": "anthropic", "model": "claude-sonnet-4-6",
"tokens_in": 3000, "tokens_out": 1500,
"calls_per_user_month": 40, "arpu": 29,
"paid_conversion": 0.08, "free_abuse_multiplier": 3,
"target_gross_margin": 0.70
}
Steps
- Confirm provider + model exists in
references/provider_pricing.json (or pass --pricing path).
- Estimate usage params from discover/cost-sim output or user input.
- Run
python3 hplan/scripts/cogs_sentinel.py ....
- Read the markdown report at
harness/build-gate/cogs_report.md.
- If decision is
GREEN, proceed to decision-log โ handoff.
- If
CONDITIONAL_GO, list mitigations and require human approval.
- If
RED, route to decision-log with decision = pivot or hold.
Outputs
harness/build-gate/cogs_report.md โ readable summary
harness/build-gate/cogs_input.json โ preserved input
- Decision:
GREEN / CONDITIONAL_GO / RED
- per-call cost p50/p90, monthly COGS p50/p90/worst, gross margin p50/p90/blended
Verification
Why This Exists
discover/cost-sim์ LLM์ด ์๋๋ฆฌ์ค๋ฅผ ์๊ฐํ๋ ๋จ๊ณ โ ์๋ฏธ ์์ง๋ง LLM์ lognormal ๋ถํฌ๋ฅผ ๋จธ๋ฆฟ์์์ ์ ํํ ๊ณ์ฐํ์ง ๋ชปํ๋ค. cogs-sentinel์ ๊ทธ ์๋๋ฆฌ์ค๋ฅผ ๋ฐ์ ๊ฒฐ์ ๋ก ์ ์ผ๋ก ์ธก์ ํ๋ค. ๋์ paired skill์ด๋ค.
Replit์ด ARR $2Mโ$144M ๋์ gross margin์ด single digit์ผ๋ก ๋จ์ด์ง ์ฌ๋ก โ ๊ฐ๊ฒฉ 4๋ฒ ๋ณ๊ฒฝ์ผ๋ก ํ๋ณต. ๊ทธ ์ฌ๊ณ ๋ฅผ ์ฌ์ ์ ์ก๋ ๊ฒ์ด ์ด skill์ ์กด์ฌ ์ด์ ๋ค.