rdd-typesafe-ai
Build AI-powered software with TypeSafe: small units of AI intelligence you can use like programming primitives. Its System One models, including Jev, turn natural language and application state into typed judgments and probabilities that code can combine. Use when a feature needs programmable common sense, when brainstorming what AI could make possible in an app, or when an LLM prompt-and-parse step could become a structured decision. Applications include routing, ranking, extraction, verification, and interactive experiences; these are starting points, not the limits. Read live docs and cookbooks to find useful patterns and discover new combinations.
- License 许可
- MIT
- 最近更新
- 2026-11-04
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- rdd-typesafe-ai
- license
- MIT
- description
- Build AI-powered software with TypeSafe: small units of AI intelligence you can use like programming primitives. Its System One models, including Jev, turn natural language and application state into typed judgments and probabilities that code can combine. Use when a feature needs programmable common sense, when brainstorming what AI could make possible in an app, or when an LLM prompt-and-parse step could become a structured decision. Applications include routing, ranking, extraction, verification, and interactive experiences; these are starting points, not the limits. Read live docs and cookbooks to find useful patterns and discover new combinations.
03 SKILL.md 正文
Build with TypeSafe
TypeSafe makes units of AI intelligence usable like programming primitives: small judgments you can compose into larger capabilities. Its System One models return fast, focused judgments that software can consume directly. Jev is TypeSafe's flagship and first System One model. It understands natural language and returns typed answers and probabilities rather than generating text or reasoning explanations. Code owns the workflow; the model supplies programmable common sense where ordinary code needs semantic understanding.
Lê (upstream)
- Docs vivas e cookbooks TypeSafe (
https://docs.typesafe.ai) quando disponíveis — fonte de verdade. - Docs RDD do módulo (REQUIREMENTS.md etc.) quando o pedido for contextualizado em um produto.
Gera (downstream)
- Orientação e designs tipados (judgments/System One: Choice, Noul, Score) NA CONVERSA.
- Não persiste artefato por padrão — output consultivo.
Nunca edita
- Nenhum arquivo por padrão — skill advisory/read-only.
- Só escreve arquivos sob pedido explícito do operador.
Modo de erro
- Docs externas indisponíveis → responde do conhecimento base e declara o aviso explicitamente (sem inventar detalhes dependentes de versão).
- Pedido fora do domínio TypeSafe → sugere a skill certa e encerra.
Read the live docs
The live TypeSafe docs are the source of truth. Read them as part of the task. This skill gives direction; the docs carry current concepts, prompting guidance, API contracts, SDK usage, models, limits, and worked examples.
- Start with the documentation index to discover relevant pages and cookbooks. Use targeted reads rather than loading the entire site.
- Mintlify serves Markdown by appending
.mdto a page path, for example how to build with TypeSafe. Follow links from the index; convert extensionless documentation page links to.mdwhen useful. Resolve relative links againsthttps://docs.typesafe.ai. - Before writing an integration, read the current API or chosen SDK page and the question guidance relevant to the design. For a new workflow, also inspect the closest cookbook: it often shows a better decomposition than a generic classifier.
- If the index is unavailable, use the direct links below or the site's navigation. If Markdown fetching fails, try the normal page. If live access is unavailable, use available local docs or installed SDK types, state that limitation, and avoid inventing version-dependent details.
| Task | Start here; follow the relevant details |
|---|---|
| Understand the programming model | System One, building guide |
| Explore what to build | Use-case map, then relevant cookbooks from the index |
| Prepare inputs and questions | State, primitives, then the chosen primitive's page |
| Decide how to handle uncertainty | Confidence |
| Write API code | HTTP API, Python SDK, or JavaScript SDK |
| Update an older integration | Migration guide and the installed SDK's current reference |
Find the useful shape
Start from the behavior the user wants: what will the application show, select, change, or hand off? Work backward to the judgments it needs. Keep known rules, calculations, exact lookups, and execution in code. Preserve the user's chosen stack and scope; add TypeSafe where semantic understanding helps.
When brainstorming or choosing an architecture, consider more than classification. The patterns below are starting points: combine primitives around the user's goal, including ideas that do not fit an established recipe.
- Route and fill known arguments. A request can select a handler and its typed parameters. Ask useful branch-specific questions up front and consume only the relevant answers. Explore function calling and speculative fan-out.
- Select instead of generate. Find candidate values or source spans in code, use a judgment to select the intended one, then copy or normalize it. Code can also assemble source text into a formatted document or reading guide. Explore value extraction and structure recovery.
- Find and judge evidence. Retrieve candidates, compare their relevance to a query, and select useful context. Explore reranking and hierarchical classification.
- Turn judgments into reusable data. Score dimensions once, then let code or user controls change weights, thresholds, rankings, and views. With labeled outcomes, those signals can become classical ML features. Explore composite scoring and feature discovery.
- Verify and escalate. Check specific claims or fields against their evidence; send uncertain or failing cases to a person or reasoning model. Explore citation checks and extraction cascades.
- Respond to changing state. Code can retain goals and observations while fresh judgments guide the next bounded step. Keep inferred state distinct from observed facts, and check freshness before applying a result to a changed situation.
For open-ended requests, offer the few directions that best serve the user's goal and recommend a starting point. For a concrete request, choose the relevant pattern and build; a brainstorm is not a mandatory detour.
Design the judgments
Choose by what the answer means, then read the relevant primitive page:
| Need | Primitive | Important distinction |
|---|---|---|
| One of a defined set | Choice | Picks one option; its distribution compares competing options |
| Whether a condition holds | Noul | Probability of yes; no separate confidence; use one per label when several may apply |
| Degree along a described dimension | Score | Probability-weighted position on ordered levels; use comparable per-item Scores for graded ranking |
Give each question enough relevant state to answer: source text, identities,
relationships, policies, and current facts. Prefer named JSON fields when context
has several parts. Put the judgment in instructions and define its possible
answers in criteria. Question IDs are for code and are not sent to the model;
include complete meaning in the question. Reference nested state with backticked
paths such as ticket.messages[0].text.
Ask one narrow, coherent judgment per question. Split independently useful dimensions, without destroying the relationship being judged. A bounded action selection or contextual interpretation is valid; atomic does not mean literal fact extraction or a one-sentence limit. Strings work for simple questions. Use structured objects or arrays when definitions, contrasts, exclusions, or examples clarify instructions or criteria. Score levels must describe concrete situations and stand on their own.
Keep the needed answers available. Include a no-match outcome when nothing may fit; use a separate presence judgment when it is independently useful. For source-value selection, check candidate coverage: the model cannot choose an omitted value.
Compose and verify
Ask independent questions over the same state together, including useful speculative questions. They run in parallel and cannot see one another's answers. State each speculative premise explicitly; code consumes the applicable answers. A second request is warranted when an earlier answer is needed to fetch evidence, construct new state, or determine the next options. Extra questions still use tokens; measure actual request budgets, cost, and end-to-end latency.
Use probabilities and confidence to guide behavior, with thresholds evaluated on the user's data and consequences. Choice/Score confidence summarizes distribution concentration, not overall workflow correctness or permission to act. A Noul near 0.5 means similar probability for yes and no, not medium intensity. Several acceptable alternatives can also spread probability; low confidence need not invalidate a harmless preference choice. Ignore uncertainty on unused branches.
Keep policy explicit and raw judgments reusable. Weighted scores suit compensating preferences; an "any serious violation" rule needs separate conditions. Changing a weight or display filter need not rerun inference when evidence and question meanings are unchanged. Typed output guarantees the interface, not truth. System One models are trained for calibrated decisions; validate their performance in the target domain.
Test representative cases and the resulting application behavior. For failures, inspect the exact state, questions, candidates, answers, composition, and observed outcome. Separate missing evidence, model errors, code errors, and service failures. Treat cookbook thresholds and demo results as examples to evaluate, not universal rules or permanent model limitations. Keep API credentials server-side in web apps.
04 同仓库更多 Skills
rdd-wiki-lint
Audita integridade dos artefatos RDD: contradições entre seções, artefatos órfãos, referências cruzadas quebradas, links internos inválidos e drift de estrutura. Complementa rdd-validate (que valida a DAG de RNs → downstreams) e rdd-decision-audit (que valida DECISIONS.md) com foco em integridade documental dos artefatos individualmente. Use quando o usuário pedir "lint dos documentos", "verificar integridade dos artefatos", "wiki lint", "contradições nos docs" ou "validar estrutura".
rdd-vps-troubleshoot
Diagnóstico guiado por sintoma para VPS da organização já configurada — container unhealthy / healthcheck expirando, GHCR denied/unauthorized no pull, git "could not read Username for 'https://github.com'", GitHub Actions (appleboy/ssh-action) falhando SSH (handshake failed, ParsePrivateKey), services systemd duplicados do cloudflared em activating (auto-restart), requisições caindo no servidor errado (tunnel compartilhado), porta ocupada, logs (journalctl / docker logs), conectividade (curl local vs público, ss, nc) e banco vazio / migrations não aplicadas. Base de conhecimento: runbook.md nesta pasta (sintomas genéricos de deploy em VPS; lições de produção da organização no pack `rules/<pack-da-organizacao>.md` — IMP-105). Modo guiado — sugere comandos com explicação; o operador executa na VPS. Use quando o usuário reportar "container unhealthy", "deploy falhou", "ssh action erro", "ghcr denied", "tunnel não responde", "banco vazio", "sem tabelas", "service duplicado", "vps com problema" ou pedir troubleshooting de deploy.
rdd-vps-setup
Wizard guiado de setup de VPS nova (OS do perfil — ex.: Amazon Linux) para hospedar uma API — atualização do sistema, Docker + Compose + buildx, permissões de arquivos, autenticação no registry do perfil (ex.: ghcr.io), git via SSH (deploy keys), chave SSH dedicada do GitHub Actions (appleboy/ssh-action), tunnel Cloudflare EXCLUSIVO por servidor + route DNS (domínio do perfil), tunnels como serviço systemd (autostart), logging do cloudflared com rotação, pipeline completo de deploy (push main → build → registry → ssh-action → deploy.sh) e backup automatizado (RClone + cronie + canal de alerta do perfil). Base de conhecimento validada: pack da organização em `rules/<pack-da-organizacao>.md` §infra-vps-setup (IMP-105). Modo guiado — sugere comandos com explicação; o operador executa na VPS. Use quando o usuário pedir "setup de VPS", "configurar VPS nova", "preparar servidor para deploy", "tunnel cloudflare", "ghcr", "deploy key", "backup rclone", "docker compose na vps" ou "pipeline de deploy na VPS".
rdd-validate
Percorre o grafo de documentos do projeto e valida integridade: RN sem downstream esperado, ID quebrado, CR aprovado sem reflexo. Gera relatório VALIDATION_REPORT.md. Suporta flag --fix para auto-correção. Use quando o usuário pedir "validar integridade", "checar a DAG", "validar referências cruzadas" ou "validação do módulo".
rdd-ui-spec
Gera UI_SPEC.md a partir das RNs em REQUIREMENTS.md. Descreve telas, componentes, fluxos de navegação, validações de frontend e regras de exibição condicional. Use quando o usuário pedir "especificação de UI", "spec de telas", "layout de formulários" ou "fluxo de navegação".
rdd-ui-capture
Captura evidência visual em runtime do sistema legado para migração (golden master de UI) via MCP Playwright — screenshots por rota/estado, requisições de rede observadas e erros de console, gravados em reverse/ui/ com manifesto reverse/UI_CAPTURE.md e candidatas visuais na fila reverse/CANDIDATES.md. Complemento runtime da engenharia reversa estática (IMP-144). Use quando o usuário pedir "captura visual", "golden master de UI", "screenshots do legado", "captura de UI" ou "ui capture".