Typed Decision Engineering
Build provider-neutral decision pipelines: code owns control flow and side effects; models answer narrow typed questions about shared state.
Route
- Need question decomposition or confidence policy → read
skills/decision-design/SKILL.md.
- Need schemas, adapters, validation, retries, or fallbacks → read
skills/type-safe-contracts/SKILL.md.
- Need token/cost comparison, report, or slides → read
skills/token-benchmark/SKILL.md.
- For architecture background and terminology → read
references/decision-model-background.md.
Load only relevant file. For end-to-end implementation, use all three skills in listed order.
Invariants
- Keep deterministic rules, arithmetic, control flow, permissions, and side effects in code.
- Ask atomic independent questions together over one minimal shared state.
- Use a discriminated union:
choice, score, or noul.
- Validate every model response at runtime. Static types alone do not validate network output.
- Treat probabilities/confidence as routing signals, never truth or authorization.
- Compose answers in pure code; use another call only for dependent questions or new evidence.
- Record provider/model/version/schema, calls, latency, tokens, retries, failures, and price snapshot.
- Never claim savings without comparable measured data. Label values
measured, estimated, or vendor_claimed.
Completion
Deliver validated decision spec, provider adapter boundary, deterministic policy, uncertainty fallback, eval cases, and usage report. If benchmarking, generate summary and slides with scripts/benchmark.py.
1---2name: typed-decision-engineering3description: Design model-agnostic workflows using narrow typed decisions, deterministic composition, uncertainty routing, and measured token/cost comparisons. Use for typed AI decisions, bounded choice/score/binary-probability questions, structured-output routing, token-efficiency benchmarks, or replacing fragile LM parsing.4---56# Typed Decision Engineering78Build provider-neutral decision pipelines: code owns control flow and side effects; models answer narrow typed questions about shared state.910## Route11121. Need question decomposition or confidence policy → read `skills/decision-design/SKILL.md`.132. Need schemas, adapters, validation, retries, or fallbacks → read `skills/type-safe-contracts/SKILL.md`.143. Need token/cost comparison, report, or slides → read `skills/token-benchmark/SKILL.md`.154. For architecture background and terminology → read `references/decision-model-background.md`.1617Load only relevant file. For end-to-end implementation, use all three skills in listed order.1819## Invariants2021- Keep deterministic rules, arithmetic, control flow, permissions, and side effects in code.22- Ask atomic independent questions together over one minimal shared state.23- Use a discriminated union: `choice`, `score`, or `noul`.24- Validate every model response at runtime. Static types alone do not validate network output.25- Treat probabilities/confidence as routing signals, never truth or authorization.26- Compose answers in pure code; use another call only for dependent questions or new evidence.27- Record provider/model/version/schema, calls, latency, tokens, retries, failures, and price snapshot.28- Never claim savings without comparable measured data. Label values `measured`, `estimated`, or `vendor_claimed`.2930## Completion3132Deliver validated decision spec, provider adapter boundary, deterministic policy, uncertainty fallback, eval cases, and usage report. If benchmarking, generate summary and slides with `scripts/benchmark.py`.