Pular para o conteúdo

Padrões

Padrões UX cross-cutting renderizados direto das specs .kmd canônicas. Cada padrão carrega a lista de triggers que o /k-housekeep usa pra detectar quando aplica, mais o corpo completo da spec e referências.

Padrões

Error Reporting (all modules)

errors

errors/reporting.kmd

Relatório de erros para todos os módulos Koder: toggle "Relatório automático" obrigatório em Settings (default OFF, ausência = desabilitado), botão "Reportar problema" sempre visível, grupos de dados A–G, contrato de privacidade (o que nunca capturar), retenção e acesso.

User-Facing Error Messages

errors

errors/user-facing-messages.kmd

Toda mensagem de erro exibida a usuário final deve ter (1) texto humanizado em pt-BR/en-US, (2) botão "Ver detalhes" expandindo o erro técnico bruto, (3) ID único `<PRODUCT>-<CAT>-<CODE>-<SEQ>` para correlação com logs e suporte.

Internationalization (i18n) Cross-Surface Contract

i18n

i18n/contract.kmd

Contrato cross-surface de internacionalização da Koder Stack: idioma padrão = locale do dispositivo, seletor de idioma em local canônico por surface (Flutter app, Web/landing, CLI, TUI, TV, Server-rendered HTML), persistência, fallback chain en-US, key-naming, validação por testes TDD.

i18n leak detection

i18n

i18n/leak-detection.kmd

Detection contract for "i18n leaks" — user-facing string literals

i18n TDD Test Template (Cross-Surface)

i18n

i18n/test-template.kmd

Template normativo de testes TDD pra validar conformidade com `specs/i18n/contract.kmd` em qualquer módulo Koder, qualquer surface (Flutter mobile/desktop/TV, Web, Server-rendered HTML, CLI, TUI).

Scoped Consent Tokens

identity

identity/consent.kmd

Koder ID issues, validates, and revokes signed, scoped consent tokens.

Login Identifier Resolution

identity

identity/login-resolution.kmd

How Koder ID (and any SDK or library that performs client-side pre-validation) resolves what the user typed in the "Email" field to the target user record.

Admin data table pattern

patterns

patterns/admin-data-table.kmd

Canonical composition pattern for Koder admin tools that list typed records (Forge repo list, Kdrive folder browser, Hub publisher catalog, future Koder ID admin, etc.).

AI agent state hooks (useKoderAgent / useKoderChat)

patterns

patterns/ai-agent-state-hooks.kmd

Framework-neutral state-machine contract for any AI chat / agent surface in a Koder product — message list, streaming state, append handlers, abort, retry, tool-call lifecycle.

AI chat surface primitives

patterns

patterns/ai-chat-surface.kmd

Six composable primitives for assembling an AI chat surface in any Koder product — Bubble, Sender, Suggestion, Attachment, Conversations, ThoughtChain.

AI feature visual language

patterns

patterns/ai-feature-visual-language.kmd

Canonical visual lexicon for distinguishing AI-driven surfaces from

AI welcome / first-run screen

patterns

patterns/ai-welcome-screen.kmd

First-message hero an AI chat surface renders when the user hasn't sent anything yet — mark + greeting + capability hint + 3-4 starter prompts that pre-fill the composer (do NOT auto-send).

Callout card pattern

patterns

patterns/callout-card.kmd

Dismissible in-product nudge — illustration + heading + body + CTA — placed inside a primary surface (settings, dashboard) to surface a new capability without interrupting.

Empty state pattern

patterns

patterns/empty-state.kmd

Purpose-built UI for "no data yet" surfaces — illustration + heading + body + primary action.

Feature paywall + access restriction

patterns

patterns/feature-paywall.kmd

Two sibling sub-patterns: (a) **paywall** — what surfaces when a feature is gated by a paid tier the user hasn't subscribed to; (b) **permission restriction** — what surfaces when the user lacks the required role / scope.

Multi-step wizard

patterns

patterns/wizard-multistep.kmd

Linear or branching multi-step flow with per-step validation, step indicator, back-stack semantics, review step, and submit + error recovery.