@luanpdd/kit-mcp 1.27.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +168 -914
- package/gates/agent-no-recursive-dispatch.md +45 -11
- package/kit/COMANDOS.md +138 -138
- package/kit/README.md +76 -76
- package/kit/agents/advisor-researcher.md +106 -106
- package/kit/agents/assumptions-analyzer.md +107 -107
- package/kit/agents/audit-log-implementer.md +1 -1
- package/kit/agents/auditor-consistencia-isolamento.md +1 -1
- package/kit/agents/b2b-saas-architect.md +1 -1
- package/kit/agents/cascading-failures-auditor.md +1 -1
- package/kit/agents/codebase-mapper.md +768 -768
- package/kit/agents/crm-pipeline-implementer.md +1 -1
- package/kit/agents/debugger.md +813 -813
- package/kit/agents/detector-tenant-quente.md +1 -1
- package/kit/agents/evolution-go-integrator.md +1 -1
- package/kit/agents/example-reviewer.md +21 -21
- package/kit/agents/executor.md +564 -564
- package/kit/agents/integration-checker.md +200 -200
- package/kit/agents/invite-flow-implementer.md +1 -1
- package/kit/agents/legacy-characterizer.md +1 -1
- package/kit/agents/lgpd-compliance-auditor.md +1 -1
- package/kit/agents/multi-tenant-isolation-auditor.md +1 -1
- package/kit/agents/multi-tenant-rls-writer.md +1 -1
- package/kit/agents/nyquist-auditor.md +178 -178
- package/kit/agents/observability-coverage-auditor.md +1 -1
- package/kit/agents/org-onboarding-implementer.md +1 -1
- package/kit/agents/payload-capture-instrumenter.md +1 -1
- package/kit/agents/phase-researcher.md +696 -696
- package/kit/agents/plan-checker.md +272 -272
- package/kit/agents/planner.md +922 -922
- package/kit/agents/project-researcher.md +652 -652
- package/kit/agents/refactor-safety-auditor.md +1 -1
- package/kit/agents/research-synthesizer.md +245 -245
- package/kit/agents/roadmapper.md +677 -677
- package/kit/agents/seam-finder.md +1 -1
- package/kit/agents/shotgun-surgery-detector.md +1 -1
- package/kit/agents/supabase-branching-architect.md +1 -1
- package/kit/agents/supabase-cicd-pipeline-implementer.md +1 -1
- package/kit/agents/supabase-column-privileges-writer.md +1 -1
- package/kit/agents/supabase-migration-writer.md +1 -1
- package/kit/agents/supabase-rbac-implementer.md +1 -1
- package/kit/agents/supabase-rls-hardener.md +1 -1
- package/kit/agents/supabase-rls-writer.md +1 -1
- package/kit/agents/supabase-roles-implementer.md +1 -1
- package/kit/agents/super-admin-implementer.md +1 -1
- package/kit/agents/ui-auditor.md +437 -437
- package/kit/agents/ui-checker.md +302 -302
- package/kit/agents/ui-researcher.md +355 -355
- package/kit/agents/user-profiler.md +175 -175
- package/kit/agents/validador-evolucao-schema.md +1 -1
- package/kit/agents/verifier.md +728 -728
- package/kit/commands/adicionar-backlog.md +75 -75
- package/kit/commands/adicionar-fase.md +42 -42
- package/kit/commands/adicionar-tarefa.md +45 -45
- package/kit/commands/adicionar-testes.md +41 -41
- package/kit/commands/ajuda.md +21 -21
- package/kit/commands/atualizar.md +37 -37
- package/kit/commands/auditar-cascading.md +1 -1
- package/kit/commands/auditar-marco.md +179 -179
- package/kit/commands/auditar-observabilidade-cobertura.md +1 -1
- package/kit/commands/auditar-refactor.md +1 -1
- package/kit/commands/auditar-release.md +1 -1
- package/kit/commands/auditar-uat.md +23 -23
- package/kit/commands/autonomo.md +40 -40
- package/kit/commands/branch-pr.md +24 -24
- package/kit/commands/burn-rate-status.md +1 -1
- package/kit/commands/capturar-payloads.md +1 -1
- package/kit/commands/caracterizar.md +1 -1
- package/kit/commands/concluir-marco.md +247 -247
- package/kit/commands/configuracoes.md +36 -36
- package/kit/commands/dados-distribuidos.md +1 -1
- package/kit/commands/definir-perfil.md +10 -10
- package/kit/commands/depurar.md +190 -190
- package/kit/commands/detectar-duplicacao.md +1 -1
- package/kit/commands/discutir-fase.md +131 -131
- package/kit/commands/encontrar-seams.md +1 -1
- package/kit/commands/entrar-discord.md +17 -17
- package/kit/commands/estatisticas.md +18 -18
- package/kit/commands/example-greeting.md +33 -33
- package/kit/commands/executar-fase.md +58 -58
- package/kit/commands/expresso.md +56 -56
- package/kit/commands/fase-ui.md +34 -34
- package/kit/commands/fazer.md +57 -57
- package/kit/commands/fio.md +125 -125
- package/kit/commands/fluxos-trabalho.md +64 -64
- package/kit/commands/forense.md +176 -176
- package/kit/commands/gerenciador.md +38 -38
- package/kit/commands/inserir-fase.md +31 -31
- package/kit/commands/legacy.md +1 -1
- package/kit/commands/limpeza.md +17 -17
- package/kit/commands/listar-hipoteses-fase.md +45 -45
- package/kit/commands/listar-workspaces.md +18 -18
- package/kit/commands/load-shedding.md +1 -1
- package/kit/commands/mapear-codebase.md +70 -70
- package/kit/commands/multi-tenant.md +1 -1
- package/kit/commands/nota.md +33 -33
- package/kit/commands/novo-marco.md +43 -43
- package/kit/commands/novo-projeto.md +41 -41
- package/kit/commands/novo-workspace.md +43 -43
- package/kit/commands/pausar-trabalho.md +37 -37
- package/kit/commands/perfil-usuario.md +45 -45
- package/kit/commands/pesquisar-fase.md +195 -195
- package/kit/commands/planejar-fase.md +67 -67
- package/kit/commands/planejar-lacunas.md +33 -33
- package/kit/commands/plantar-ideia.md +25 -25
- package/kit/commands/progresso.md +24 -24
- package/kit/commands/proximo.md +30 -30
- package/kit/commands/publicar.md +490 -490
- package/kit/commands/rapido.md +35 -35
- package/kit/commands/reaplicar-patches.md +124 -124
- package/kit/commands/refactor-seguro.md +1 -1
- package/kit/commands/relatorio-sessao.md +19 -19
- package/kit/commands/remover-fase.md +31 -31
- package/kit/commands/remover-workspace.md +26 -26
- package/kit/commands/resumo-marco.md +50 -50
- package/kit/commands/retomar-trabalho.md +40 -40
- package/kit/commands/revisar-backlog.md +60 -60
- package/kit/commands/revisar-ui.md +32 -32
- package/kit/commands/revisar.md +37 -37
- package/kit/commands/saude.md +21 -21
- package/kit/commands/setup-notion.md +93 -93
- package/kit/commands/storytelling.md +1 -1
- package/kit/commands/supabase.md +1 -1
- package/kit/commands/sync-main.md +68 -68
- package/kit/commands/validar-fase.md +35 -35
- package/kit/commands/verificar-tarefas.md +44 -44
- package/kit/commands/verificar-trabalho.md +64 -64
- package/kit/file-manifest.json +90 -90
- package/kit/framework/bin/lib/commands.cjs +959 -959
- package/kit/framework/bin/lib/config.cjs +442 -442
- package/kit/framework/bin/lib/core.cjs +1230 -1230
- package/kit/framework/bin/lib/frontmatter.cjs +336 -336
- package/kit/framework/bin/lib/init.cjs +1442 -1442
- package/kit/framework/bin/lib/milestone.cjs +252 -252
- package/kit/framework/bin/lib/model-profiles.cjs +68 -68
- package/kit/framework/bin/lib/phase.cjs +888 -888
- package/kit/framework/bin/lib/profile-output.cjs +952 -952
- package/kit/framework/bin/lib/profile-pipeline.cjs +539 -539
- package/kit/framework/bin/lib/roadmap.cjs +329 -329
- package/kit/framework/bin/lib/security.cjs +382 -382
- package/kit/framework/bin/lib/state.cjs +1031 -1031
- package/kit/framework/bin/lib/template.cjs +222 -222
- package/kit/framework/bin/lib/uat.cjs +282 -282
- package/kit/framework/bin/lib/verify.cjs +888 -888
- package/kit/framework/bin/lib/workstream.cjs +491 -491
- package/kit/framework/bin/tools.cjs +918 -918
- package/kit/framework/commands/workstreams.md +63 -63
- package/kit/framework/references/checkpoints.md +778 -778
- package/kit/framework/references/continuation-format.md +249 -249
- package/kit/framework/references/decimal-phase-calculation.md +64 -64
- package/kit/framework/references/git-integration.md +295 -295
- package/kit/framework/references/git-planning-commit.md +38 -38
- package/kit/framework/references/model-profile-resolution.md +36 -36
- package/kit/framework/references/model-profiles.md +139 -139
- package/kit/framework/references/phase-argument-parsing.md +61 -61
- package/kit/framework/references/planning-config.md +202 -202
- package/kit/framework/references/questioning.md +162 -162
- package/kit/framework/references/tdd.md +263 -263
- package/kit/framework/references/ui-brand.md +160 -160
- package/kit/framework/references/user-profiling.md +657 -657
- package/kit/framework/references/verification-patterns.md +612 -612
- package/kit/framework/references/workstream-flag.md +58 -58
- package/kit/framework/templates/DEBUG.md +164 -164
- package/kit/framework/templates/UAT.md +265 -265
- package/kit/framework/templates/UI-SPEC.md +100 -100
- package/kit/framework/templates/VALIDATION.md +76 -76
- package/kit/framework/templates/claude-md.md +122 -122
- package/kit/framework/templates/codebase/architecture.md +185 -185
- package/kit/framework/templates/codebase/concerns.md +205 -205
- package/kit/framework/templates/codebase/conventions.md +204 -204
- package/kit/framework/templates/codebase/integrations.md +192 -192
- package/kit/framework/templates/codebase/stack.md +158 -158
- package/kit/framework/templates/codebase/structure.md +199 -199
- package/kit/framework/templates/codebase/testing.md +301 -301
- package/kit/framework/templates/config.json +44 -44
- package/kit/framework/templates/context.md +352 -352
- package/kit/framework/templates/continue-here.md +78 -78
- package/kit/framework/templates/copilot-instructions.md +7 -7
- package/kit/framework/templates/debug-subagent-prompt.md +91 -91
- package/kit/framework/templates/dev-preferences.md +20 -20
- package/kit/framework/templates/discovery.md +146 -146
- package/kit/framework/templates/discussion-log.md +63 -63
- package/kit/framework/templates/milestone-archive.md +123 -123
- package/kit/framework/templates/milestone.md +115 -115
- package/kit/framework/templates/phase-prompt.md +610 -610
- package/kit/framework/templates/planner-subagent-prompt.md +117 -117
- package/kit/framework/templates/project.md +186 -186
- package/kit/framework/templates/requirements.md +231 -231
- package/kit/framework/templates/research-project/ARCHITECTURE.md +204 -204
- package/kit/framework/templates/research-project/FEATURES.md +147 -147
- package/kit/framework/templates/research-project/PITFALLS.md +200 -200
- package/kit/framework/templates/research-project/STACK.md +120 -120
- package/kit/framework/templates/research-project/SUMMARY.md +170 -170
- package/kit/framework/templates/research.md +419 -419
- package/kit/framework/templates/retrospective.md +54 -54
- package/kit/framework/templates/roadmap.md +202 -202
- package/kit/framework/templates/state.md +176 -176
- package/kit/framework/templates/summary-complex.md +59 -59
- package/kit/framework/templates/summary-minimal.md +41 -41
- package/kit/framework/templates/summary-standard.md +48 -48
- package/kit/framework/templates/summary.md +209 -209
- package/kit/framework/templates/user-profile.md +146 -146
- package/kit/framework/templates/user-setup.md +256 -256
- package/kit/framework/templates/verification-report.md +258 -258
- package/kit/framework/workflows/add-phase.md +112 -112
- package/kit/framework/workflows/add-tests.md +351 -351
- package/kit/framework/workflows/add-todo.md +158 -158
- package/kit/framework/workflows/audit-milestone.md +340 -340
- package/kit/framework/workflows/audit-uat.md +109 -109
- package/kit/framework/workflows/autonomous.md +891 -891
- package/kit/framework/workflows/check-todos.md +177 -177
- package/kit/framework/workflows/cleanup.md +152 -152
- package/kit/framework/workflows/complete-milestone.md +696 -696
- package/kit/framework/workflows/diagnose-issues.md +231 -231
- package/kit/framework/workflows/discovery-phase.md +289 -289
- package/kit/framework/workflows/discuss-phase-assumptions.md +653 -653
- package/kit/framework/workflows/discuss-phase.md +784 -784
- package/kit/framework/workflows/do.md +104 -104
- package/kit/framework/workflows/execute-phase.md +838 -838
- package/kit/framework/workflows/execute-plan.md +510 -510
- package/kit/framework/workflows/fast.md +102 -102
- package/kit/framework/workflows/forensics.md +265 -265
- package/kit/framework/workflows/health.md +181 -181
- package/kit/framework/workflows/help.md +619 -619
- package/kit/framework/workflows/insert-phase.md +130 -130
- package/kit/framework/workflows/list-phase-assumptions.md +178 -178
- package/kit/framework/workflows/list-workspaces.md +56 -56
- package/kit/framework/workflows/manager.md +362 -362
- package/kit/framework/workflows/map-codebase.md +377 -377
- package/kit/framework/workflows/milestone-summary.md +223 -223
- package/kit/framework/workflows/new-milestone.md +486 -486
- package/kit/framework/workflows/new-project.md +1159 -1159
- package/kit/framework/workflows/new-workspace.md +237 -237
- package/kit/framework/workflows/next.md +97 -97
- package/kit/framework/workflows/node-repair.md +92 -92
- package/kit/framework/workflows/note.md +156 -156
- package/kit/framework/workflows/pause-work.md +176 -176
- package/kit/framework/workflows/plan-milestone-gaps.md +273 -273
- package/kit/framework/workflows/plan-phase.md +765 -765
- package/kit/framework/workflows/plant-seed.md +169 -169
- package/kit/framework/workflows/pr-branch.md +129 -129
- package/kit/framework/workflows/profile-user.md +450 -450
- package/kit/framework/workflows/progress.md +507 -507
- package/kit/framework/workflows/quick.md +757 -757
- package/kit/framework/workflows/remove-phase.md +155 -155
- package/kit/framework/workflows/remove-workspace.md +90 -90
- package/kit/framework/workflows/research-phase.md +82 -82
- package/kit/framework/workflows/resume-project.md +326 -326
- package/kit/framework/workflows/review.md +228 -228
- package/kit/framework/workflows/session-report.md +146 -146
- package/kit/framework/workflows/settings.md +283 -283
- package/kit/framework/workflows/ship.md +228 -228
- package/kit/framework/workflows/stats.md +60 -60
- package/kit/framework/workflows/transition.md +671 -671
- package/kit/framework/workflows/ui-phase.md +302 -302
- package/kit/framework/workflows/ui-review.md +165 -165
- package/kit/framework/workflows/update.md +323 -323
- package/kit/framework/workflows/validate-phase.md +174 -174
- package/kit/framework/workflows/verify-phase.md +252 -252
- package/kit/framework/workflows/verify-work.md +637 -637
- package/kit/hooks/check-update.js +118 -118
- package/kit/hooks/context-monitor.js +163 -163
- package/kit/hooks/prompt-guard.js +103 -103
- package/kit/hooks/statusline.js +125 -125
- package/kit/hooks/workflow-guard.js +101 -101
- package/kit/settings.json +45 -45
- package/kit/skills/ai-prompt-characterization/SKILL.md +1 -1
- package/kit/skills/armadilhas-sistemas-distribuidos/SKILL.md +1 -1
- package/kit/skills/audit-log-multi-tenant/SKILL.md +1 -1
- package/kit/skills/b2b-saas-architecture/SKILL.md +1 -1
- package/kit/skills/consistencia-leitura-replica/SKILL.md +1 -1
- package/kit/skills/crm-lead-pipeline-patterns/SKILL.md +1 -1
- package/kit/skills/escolha-modelo-consistencia/SKILL.md +1 -1
- package/kit/skills/evolucao-schema-compativel/SKILL.md +1 -1
- package/kit/skills/evolution-go-whatsapp-integration/SKILL.md +1 -1
- package/kit/skills/example-skill/SKILL.md +42 -42
- package/kit/skills/legacy-api-only-applications/SKILL.md +1 -1
- package/kit/skills/legacy-characterization-tests/SKILL.md +1 -1
- package/kit/skills/legacy-effect-analysis/SKILL.md +1 -1
- package/kit/skills/legacy-extract-class/SKILL.md +1 -1
- package/kit/skills/legacy-programming-by-difference/SKILL.md +1 -1
- package/kit/skills/legacy-seams-and-test-harness/SKILL.md +1 -1
- package/kit/skills/legacy-shotgun-surgery/SKILL.md +1 -1
- package/kit/skills/legacy-sprout-wrap-techniques/SKILL.md +1 -1
- package/kit/skills/legacy-storytelling-naked-crc/SKILL.md +1 -1
- package/kit/skills/lgpd-multi-tenant-compliance/SKILL.md +1 -1
- package/kit/skills/member-invite-flow/SKILL.md +1 -1
- package/kit/skills/member-management-react-shadcn/SKILL.md +1 -1
- package/kit/skills/multi-tenant-performance-scaling/SKILL.md +1 -1
- package/kit/skills/multi-tenant-rls-hierarchy/SKILL.md +1 -1
- package/kit/skills/org-onboarding-flow/SKILL.md +1 -1
- package/kit/skills/org-switcher-react-pattern/SKILL.md +1 -1
- package/kit/skills/permission-gate-react-pattern/SKILL.md +1 -1
- package/kit/skills/postgres-isolamento-concorrencia/SKILL.md +1 -1
- package/kit/skills/pre-refactor-characterization/SKILL.md +1 -1
- package/kit/skills/rbac-permissions-matrix-supabase/SKILL.md +1 -1
- package/kit/skills/streams-eventos-cdc/SKILL.md +1 -1
- package/kit/skills/supabase-branching-workflow/SKILL.md +1 -1
- package/kit/skills/supabase-ci-cd-github-actions/SKILL.md +1 -1
- package/kit/skills/supabase-column-level-security/SKILL.md +1 -1
- package/kit/skills/supabase-config-toml-remotes/SKILL.md +1 -1
- package/kit/skills/supabase-custom-claims-rbac/SKILL.md +1 -1
- package/kit/skills/supabase-migration-repair/SKILL.md +1 -1
- package/kit/skills/supabase-migrations/SKILL.md +1 -1
- package/kit/skills/supabase-pgtap-testing/SKILL.md +1 -1
- package/kit/skills/supabase-postgres-roles/SKILL.md +1 -1
- package/kit/skills/supabase-rls-defense-in-depth/SKILL.md +1 -1
- package/kit/skills/supabase-rls-policies/SKILL.md +1 -1
- package/kit/skills/super-admin-platform-pattern/SKILL.md +1 -1
- package/kit/skills/tenant-quente-mitigacao/SKILL.md +1 -1
- package/kit/skills/whatsapp-conversation-state-machine/SKILL.md +1 -1
- package/package.json +63 -63
- package/src/cli/index.js +345 -6
- package/src/cli/render.js +7 -0
- package/src/core/kit.js +216 -216
- package/src/core/logger.js +170 -0
- package/src/core/notify.js +60 -0
- package/src/core/reflect.js +247 -247
- package/src/core/reverse-sync.js +372 -372
- package/src/core/sync.js +418 -418
- package/src/core/watch.js +121 -121
- package/src/mcp-server/index.js +65 -2
|
@@ -1,778 +1,778 @@
|
|
|
1
|
-
<overview>
|
|
2
|
-
Planos executam de forma autônoma. Checkpoints formalizam pontos de interação onde a verificação humana ou decisões são necessárias.
|
|
3
|
-
|
|
4
|
-
**Princípio central:** Claude automatiza tudo via CLI/API. Checkpoints são para verificação e decisões, não trabalho manual.
|
|
5
|
-
|
|
6
|
-
**Regras de ouro:**
|
|
7
|
-
1. **Se Claude pode executar, Claude executa** - Nunca peça ao usuário para executar comandos CLI, iniciar servidores ou rodar builds
|
|
8
|
-
2. **Claude configura o ambiente de verificação** - Inicia dev servers, popula bancos de dados, configura variáveis de ambiente
|
|
9
|
-
3. **O usuário só faz o que exige julgamento humano** - Verificações visuais, avaliação de UX, "isso parece certo?"
|
|
10
|
-
4. **Secrets vêm do usuário, automação vem do Claude** - Peça chaves de API, então Claude as usa via CLI
|
|
11
|
-
5. **Modo automático ignora checkpoints de verificação/decisão** — Quando `workflow._auto_chain_active` ou `workflow.auto_advance` for true na config: human-verify é aprovado automaticamente, decision seleciona a primeira opção automaticamente, human-action ainda para (auth gates não podem ser automatizados)
|
|
12
|
-
</overview>
|
|
13
|
-
|
|
14
|
-
<checkpoint_types>
|
|
15
|
-
|
|
16
|
-
<type name="human-verify">
|
|
17
|
-
## checkpoint:human-verify (Mais Comum - 90%)
|
|
18
|
-
|
|
19
|
-
**Quando:** Claude concluiu trabalho automatizado, humano confirma que funciona corretamente.
|
|
20
|
-
|
|
21
|
-
**Use para:**
|
|
22
|
-
- Verificações visuais de UI (layout, estilo, responsividade)
|
|
23
|
-
- Fluxos interativos (navegar por wizard, testar fluxos de usuário)
|
|
24
|
-
- Verificação funcional (funcionalidade funciona como esperado)
|
|
25
|
-
- Qualidade de reprodução de áudio/vídeo
|
|
26
|
-
- Suavidade de animações
|
|
27
|
-
- Testes de acessibilidade
|
|
28
|
-
|
|
29
|
-
**Estrutura:**
|
|
30
|
-
```xml
|
|
31
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
32
|
-
<what-built>[O que Claude automatizou e implantou/construiu]</what-built>
|
|
33
|
-
<how-to-verify>
|
|
34
|
-
[Passos exatos para testar - URLs, comandos, comportamento esperado]
|
|
35
|
-
</how-to-verify>
|
|
36
|
-
<resume-signal>[Como continuar - "aprovado", "sim", ou descreva problemas]</resume-signal>
|
|
37
|
-
</task>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Exemplo: Componente de UI (mostra padrão-chave: Claude inicia servidor ANTES do checkpoint)**
|
|
41
|
-
```xml
|
|
42
|
-
<task type="auto">
|
|
43
|
-
<name>Build responsive dashboard layout</name>
|
|
44
|
-
<files>src/components/Dashboard.tsx, src/app/dashboard/page.tsx</files>
|
|
45
|
-
<action>Create dashboard with sidebar, header, and content area. Use Tailwind responsive classes for mobile.</action>
|
|
46
|
-
<verify>npm run build succeeds, no TypeScript errors</verify>
|
|
47
|
-
<done>Dashboard component builds without errors</done>
|
|
48
|
-
</task>
|
|
49
|
-
|
|
50
|
-
<task type="auto">
|
|
51
|
-
<name>Start dev server for verification</name>
|
|
52
|
-
<action>Run `npm run dev` in background, wait for "ready" message, capture port</action>
|
|
53
|
-
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
54
|
-
<done>Dev server running at http://localhost:3000</done>
|
|
55
|
-
</task>
|
|
56
|
-
|
|
57
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
58
|
-
<what-built>Layout responsivo do dashboard - dev server rodando em http://localhost:3000</what-built>
|
|
59
|
-
<how-to-verify>
|
|
60
|
-
Acesse http://localhost:3000/dashboard e verifique:
|
|
61
|
-
1. Desktop (>1024px): Sidebar à esquerda, conteúdo à direita, header no topo
|
|
62
|
-
2. Tablet (768px): Sidebar colapsa para menu hambúrguer
|
|
63
|
-
3. Mobile (375px): Layout de coluna única, nav inferior aparece
|
|
64
|
-
4. Sem deslocamento de layout ou scroll horizontal em qualquer tamanho
|
|
65
|
-
</how-to-verify>
|
|
66
|
-
<resume-signal>Digite "aprovado" ou descreva problemas de layout</resume-signal>
|
|
67
|
-
</task>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Exemplo: Build do Xcode**
|
|
71
|
-
```xml
|
|
72
|
-
<task type="auto">
|
|
73
|
-
<name>Build macOS app with Xcode</name>
|
|
74
|
-
<files>App.xcodeproj, Sources/</files>
|
|
75
|
-
<action>Run `xcodebuild -project App.xcodeproj -scheme App build`. Check for compilation errors in output.</action>
|
|
76
|
-
<verify>Build output contains "BUILD SUCCEEDED", no errors</verify>
|
|
77
|
-
<done>App builds successfully</done>
|
|
78
|
-
</task>
|
|
79
|
-
|
|
80
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
81
|
-
<what-built>App macOS construído em DerivedData/Build/Products/Debug/App.app</what-built>
|
|
82
|
-
<how-to-verify>
|
|
83
|
-
Abra App.app e teste:
|
|
84
|
-
- App inicia sem crashes
|
|
85
|
-
- Ícone na barra de menu aparece
|
|
86
|
-
- Janela de preferências abre corretamente
|
|
87
|
-
- Sem glitches visuais ou problemas de layout
|
|
88
|
-
</how-to-verify>
|
|
89
|
-
<resume-signal>Digite "aprovado" ou descreva problemas</resume-signal>
|
|
90
|
-
</task>
|
|
91
|
-
```
|
|
92
|
-
</type>
|
|
93
|
-
|
|
94
|
-
<type name="decision">
|
|
95
|
-
## checkpoint:decision (9%)
|
|
96
|
-
|
|
97
|
-
**Quando:** Humano deve fazer uma escolha que afeta a direção da implementação.
|
|
98
|
-
|
|
99
|
-
**Use para:**
|
|
100
|
-
- Seleção de tecnologia (qual provedor de auth, qual banco de dados)
|
|
101
|
-
- Decisões de arquitetura (monorepo vs repositórios separados)
|
|
102
|
-
- Escolhas de design (esquema de cores, abordagem de layout)
|
|
103
|
-
- Priorização de funcionalidades (qual variante construir)
|
|
104
|
-
- Decisões de modelo de dados (estrutura do schema)
|
|
105
|
-
|
|
106
|
-
**Estrutura:**
|
|
107
|
-
```xml
|
|
108
|
-
<task type="checkpoint:decision" gate="blocking">
|
|
109
|
-
<decision>[O que está sendo decidido]</decision>
|
|
110
|
-
<context>[Por que essa decisão importa]</context>
|
|
111
|
-
<options>
|
|
112
|
-
<option id="option-a">
|
|
113
|
-
<name>[Nome da opção]</name>
|
|
114
|
-
<pros>[Benefícios]</pros>
|
|
115
|
-
<cons>[Compensações]</cons>
|
|
116
|
-
</option>
|
|
117
|
-
<option id="option-b">
|
|
118
|
-
<name>[Nome da opção]</name>
|
|
119
|
-
<pros>[Benefícios]</pros>
|
|
120
|
-
<cons>[Compensações]</cons>
|
|
121
|
-
</option>
|
|
122
|
-
</options>
|
|
123
|
-
<resume-signal>[Como indicar a escolha]</resume-signal>
|
|
124
|
-
</task>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Exemplo: Seleção de Provedor de Auth**
|
|
128
|
-
```xml
|
|
129
|
-
<task type="checkpoint:decision" gate="blocking">
|
|
130
|
-
<decision>Select authentication provider</decision>
|
|
131
|
-
<context>
|
|
132
|
-
Need user authentication for the app. Three solid options with different tradeoffs.
|
|
133
|
-
</context>
|
|
134
|
-
<options>
|
|
135
|
-
<option id="supabase">
|
|
136
|
-
<name>Supabase Auth</name>
|
|
137
|
-
<pros>Built-in with Supabase DB we're using, generous free tier, row-level security integration</pros>
|
|
138
|
-
<cons>Less customizable UI, tied to Supabase ecosystem</cons>
|
|
139
|
-
</option>
|
|
140
|
-
<option id="clerk">
|
|
141
|
-
<name>Clerk</name>
|
|
142
|
-
<pros>Beautiful pre-built UI, best developer experience, excellent docs</pros>
|
|
143
|
-
<cons>Paid after 10k MAU, vendor lock-in</cons>
|
|
144
|
-
</option>
|
|
145
|
-
<option id="nextauth">
|
|
146
|
-
<name>NextAuth.js</name>
|
|
147
|
-
<pros>Free, self-hosted, maximum control, widely adopted</pros>
|
|
148
|
-
<cons>More setup work, you manage security updates, UI is DIY</cons>
|
|
149
|
-
</option>
|
|
150
|
-
</options>
|
|
151
|
-
<resume-signal>Select: supabase, clerk, or nextauth</resume-signal>
|
|
152
|
-
</task>
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Exemplo: Seleção de Banco de Dados**
|
|
156
|
-
```xml
|
|
157
|
-
<task type="checkpoint:decision" gate="blocking">
|
|
158
|
-
<decision>Select database for user data</decision>
|
|
159
|
-
<context>
|
|
160
|
-
App needs persistent storage for users, sessions, and user-generated content.
|
|
161
|
-
Expected scale: 10k users, 1M records first year.
|
|
162
|
-
</context>
|
|
163
|
-
<options>
|
|
164
|
-
<option id="supabase">
|
|
165
|
-
<name>Supabase (Postgres)</name>
|
|
166
|
-
<pros>Full SQL, generous free tier, built-in auth, real-time subscriptions</pros>
|
|
167
|
-
<cons>Vendor lock-in for real-time features, less flexible than raw Postgres</cons>
|
|
168
|
-
</option>
|
|
169
|
-
<option id="planetscale">
|
|
170
|
-
<name>PlanetScale (MySQL)</name>
|
|
171
|
-
<pros>Serverless scaling, branching workflow, excellent DX</pros>
|
|
172
|
-
<cons>MySQL not Postgres, no foreign keys in free tier</cons>
|
|
173
|
-
</option>
|
|
174
|
-
<option id="convex">
|
|
175
|
-
<name>Convex</name>
|
|
176
|
-
<pros>Real-time by default, TypeScript-native, automatic caching</pros>
|
|
177
|
-
<cons>Newer platform, different mental model, less SQL flexibility</cons>
|
|
178
|
-
</option>
|
|
179
|
-
</options>
|
|
180
|
-
<resume-signal>Select: supabase, planetscale, or convex</resume-signal>
|
|
181
|
-
</task>
|
|
182
|
-
```
|
|
183
|
-
</type>
|
|
184
|
-
|
|
185
|
-
<type name="human-action">
|
|
186
|
-
## checkpoint:human-action (1% - Raro)
|
|
187
|
-
|
|
188
|
-
**Quando:** A ação NÃO tem CLI/API e requer interação exclusivamente humana, OU Claude encontrou um auth gate durante a automação.
|
|
189
|
-
|
|
190
|
-
**Use APENAS para:**
|
|
191
|
-
- **Auth gates** - Claude tentou CLI/API mas precisa de credenciais (isso NÃO é uma falha)
|
|
192
|
-
- Links de verificação por e-mail (clicar no e-mail)
|
|
193
|
-
- Códigos 2FA por SMS (verificação por telefone)
|
|
194
|
-
- Aprovações manuais de conta (plataforma exige revisão humana)
|
|
195
|
-
- Fluxos 3D Secure de cartão de crédito (autorização de pagamento via web)
|
|
196
|
-
- Aprovações de app OAuth (aprovação via web)
|
|
197
|
-
|
|
198
|
-
**NÃO use para trabalho manual pré-planejado:**
|
|
199
|
-
- Fazer deploy (use CLI - auth gate se necessário)
|
|
200
|
-
- Criar webhooks/bancos de dados (use API/CLI - auth gate se necessário)
|
|
201
|
-
- Rodar builds/testes (use a ferramenta Bash)
|
|
202
|
-
- Criar arquivos (use a ferramenta Write)
|
|
203
|
-
|
|
204
|
-
**Estrutura:**
|
|
205
|
-
```xml
|
|
206
|
-
<task type="checkpoint:human-action" gate="blocking">
|
|
207
|
-
<action>[O que o humano deve fazer - Claude já fez tudo que é automatizável]</action>
|
|
208
|
-
<instructions>
|
|
209
|
-
[O que Claude já automatizou]
|
|
210
|
-
[A UMA coisa que requer ação humana]
|
|
211
|
-
</instructions>
|
|
212
|
-
<verification>[O que Claude pode verificar depois]</verification>
|
|
213
|
-
<resume-signal>[Como continuar]</resume-signal>
|
|
214
|
-
</task>
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
**Exemplo: Verificação de E-mail**
|
|
218
|
-
```xml
|
|
219
|
-
<task type="auto">
|
|
220
|
-
<name>Create SendGrid account via API</name>
|
|
221
|
-
<action>Use SendGrid API to create subuser account with provided email. Request verification email.</action>
|
|
222
|
-
<verify>API returns 201, account created</verify>
|
|
223
|
-
<done>Account created, verification email sent</done>
|
|
224
|
-
</task>
|
|
225
|
-
|
|
226
|
-
<task type="checkpoint:human-action" gate="blocking">
|
|
227
|
-
<action>Completar verificação de e-mail da conta SendGrid</action>
|
|
228
|
-
<instructions>
|
|
229
|
-
Criei a conta e solicitei o e-mail de verificação.
|
|
230
|
-
Verifique sua caixa de entrada pelo link de verificação do SendGrid e clique nele.
|
|
231
|
-
</instructions>
|
|
232
|
-
<verification>Chave de API do SendGrid funciona: teste curl bem-sucedido</verification>
|
|
233
|
-
<resume-signal>Digite "feito" quando o e-mail for verificado</resume-signal>
|
|
234
|
-
</task>
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
**Exemplo: Auth Gate (Checkpoint Dinâmico)**
|
|
238
|
-
```xml
|
|
239
|
-
<task type="auto">
|
|
240
|
-
<name>Deploy to Vercel</name>
|
|
241
|
-
<files>.vercel/, vercel.json</files>
|
|
242
|
-
<action>Run `vercel --yes` to deploy</action>
|
|
243
|
-
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
244
|
-
</task>
|
|
245
|
-
|
|
246
|
-
<!-- Se vercel retornar "Error: Not authenticated", Claude cria checkpoint dinamicamente -->
|
|
247
|
-
|
|
248
|
-
<task type="checkpoint:human-action" gate="blocking">
|
|
249
|
-
<action>Autenticar o CLI Vercel para que eu possa continuar o deploy</action>
|
|
250
|
-
<instructions>
|
|
251
|
-
Tentei fazer o deploy mas recebi erro de autenticação.
|
|
252
|
-
Execute: vercel login
|
|
253
|
-
Isso abrirá seu navegador - complete o fluxo de autenticação.
|
|
254
|
-
</instructions>
|
|
255
|
-
<verification>vercel whoami retorna o e-mail da sua conta</verification>
|
|
256
|
-
<resume-signal>Digite "feito" quando autenticado</resume-signal>
|
|
257
|
-
</task>
|
|
258
|
-
|
|
259
|
-
<!-- Após autenticação, Claude tenta o deploy novamente -->
|
|
260
|
-
|
|
261
|
-
<task type="auto">
|
|
262
|
-
<name>Retry Vercel deployment</name>
|
|
263
|
-
<action>Run `vercel --yes` (now authenticated)</action>
|
|
264
|
-
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
265
|
-
</task>
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
**Distinção-chave:** Auth gates são criados dinamicamente quando Claude encontra erros de auth. NÃO são pré-planejados — Claude automatiza primeiro, pede credenciais apenas quando bloqueado.
|
|
269
|
-
</type>
|
|
270
|
-
</checkpoint_types>
|
|
271
|
-
|
|
272
|
-
<execution_protocol>
|
|
273
|
-
|
|
274
|
-
Quando Claude encontra `type="checkpoint:*"`:
|
|
275
|
-
|
|
276
|
-
1. **Pare imediatamente** - não avance para a próxima tarefa
|
|
277
|
-
2. **Exiba o checkpoint claramente** usando o formato abaixo
|
|
278
|
-
3. **Aguarde a resposta do usuário** - não simule conclusão
|
|
279
|
-
4. **Verifique se possível** - verifique arquivos, rode testes, o que for especificado
|
|
280
|
-
5. **Retome a execução** - continue para a próxima tarefa apenas após confirmação
|
|
281
|
-
|
|
282
|
-
**Para checkpoint:human-verify:**
|
|
283
|
-
```
|
|
284
|
-
╔═══════════════════════════════════════════════════════╗
|
|
285
|
-
║ CHECKPOINT: Verificação Necessária ║
|
|
286
|
-
╚═══════════════════════════════════════════════════════╝
|
|
287
|
-
|
|
288
|
-
Progresso: 5/8 tarefas concluídas
|
|
289
|
-
Tarefa: Layout responsivo do dashboard
|
|
290
|
-
|
|
291
|
-
Construído: Dashboard responsivo em /dashboard
|
|
292
|
-
|
|
293
|
-
Como verificar:
|
|
294
|
-
1. Acesse: http://localhost:3000/dashboard
|
|
295
|
-
2. Desktop (>1024px): Sidebar visível, conteúdo preenche o espaço restante
|
|
296
|
-
3. Tablet (768px): Sidebar colapsa para ícones
|
|
297
|
-
4. Mobile (375px): Sidebar oculta, menu hambúrguer aparece
|
|
298
|
-
|
|
299
|
-
────────────────────────────────────────────────────────
|
|
300
|
-
→ SUA AÇÃO: Digite "aprovado" ou descreva problemas
|
|
301
|
-
────────────────────────────────────────────────────────
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
**Para checkpoint:decision:**
|
|
305
|
-
```
|
|
306
|
-
╔═══════════════════════════════════════════════════════╗
|
|
307
|
-
║ CHECKPOINT: Decisão Necessária ║
|
|
308
|
-
╚═══════════════════════════════════════════════════════╝
|
|
309
|
-
|
|
310
|
-
Progresso: 2/6 tarefas concluídas
|
|
311
|
-
Tarefa: Selecionar provedor de autenticação
|
|
312
|
-
|
|
313
|
-
Decisão: Qual provedor de auth devemos usar?
|
|
314
|
-
|
|
315
|
-
Contexto: Precisamos de autenticação de usuário. Três opções com compensações diferentes.
|
|
316
|
-
|
|
317
|
-
Opções:
|
|
318
|
-
1. supabase - Integrado ao nosso DB, plano gratuito
|
|
319
|
-
Prós: Integração com row-level security, plano gratuito generoso
|
|
320
|
-
Contras: UI menos customizável, lock-in no ecossistema
|
|
321
|
-
|
|
322
|
-
2. clerk - Melhor DX, pago após 10k usuários
|
|
323
|
-
Prós: UI pré-construída linda, documentação excelente
|
|
324
|
-
Contras: Vendor lock-in, preço em escala
|
|
325
|
-
|
|
326
|
-
3. nextauth - Auto-hospedado, controle máximo
|
|
327
|
-
Prós: Gratuito, sem vendor lock-in, amplamente adotado
|
|
328
|
-
Contras: Mais trabalho de configuração, atualizações de segurança por conta própria
|
|
329
|
-
|
|
330
|
-
────────────────────────────────────────────────────────
|
|
331
|
-
→ SUA AÇÃO: Selecione supabase, clerk ou nextauth
|
|
332
|
-
────────────────────────────────────────────────────────
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
**Para checkpoint:human-action:**
|
|
336
|
-
```
|
|
337
|
-
╔═══════════════════════════════════════════════════════╗
|
|
338
|
-
║ CHECKPOINT: Ação Necessária ║
|
|
339
|
-
╚═══════════════════════════════════════════════════════╝
|
|
340
|
-
|
|
341
|
-
Progresso: 3/8 tarefas concluídas
|
|
342
|
-
Tarefa: Deploy para Vercel
|
|
343
|
-
|
|
344
|
-
Tentado: vercel --yes
|
|
345
|
-
Erro: Not authenticated. Please run 'vercel login'
|
|
346
|
-
|
|
347
|
-
O que você precisa fazer:
|
|
348
|
-
1. Execute: vercel login
|
|
349
|
-
2. Complete a autenticação no navegador quando abrir
|
|
350
|
-
3. Volte aqui quando concluído
|
|
351
|
-
|
|
352
|
-
Vou verificar: vercel whoami retorna sua conta
|
|
353
|
-
|
|
354
|
-
────────────────────────────────────────────────────────
|
|
355
|
-
→ SUA AÇÃO: Digite "feito" quando autenticado
|
|
356
|
-
────────────────────────────────────────────────────────
|
|
357
|
-
```
|
|
358
|
-
</execution_protocol>
|
|
359
|
-
|
|
360
|
-
<authentication_gates>
|
|
361
|
-
|
|
362
|
-
**Auth gate = Claude tentou CLI/API, recebeu erro de auth.** Não é uma falha — é um gate que requer entrada humana para desbloquear.
|
|
363
|
-
|
|
364
|
-
**Padrão:** Claude tenta automação → erro de auth → cria checkpoint:human-action → usuário autentica → Claude tenta novamente → continua
|
|
365
|
-
|
|
366
|
-
**Protocolo do gate:**
|
|
367
|
-
1. Reconhecer que não é uma falha - auth ausente é esperado
|
|
368
|
-
2. Parar a tarefa atual - não tentar repetidamente
|
|
369
|
-
3. Criar checkpoint:human-action dinamicamente
|
|
370
|
-
4. Fornecer passos exatos de autenticação
|
|
371
|
-
5. Verificar que a autenticação funciona
|
|
372
|
-
6. Tentar novamente a tarefa original
|
|
373
|
-
7. Continuar normalmente
|
|
374
|
-
|
|
375
|
-
**Distinção-chave:**
|
|
376
|
-
- Checkpoint pré-planejado: "Preciso que você faça X" (errado - Claude deveria automatizar)
|
|
377
|
-
- Auth gate: "Tentei automatizar X mas preciso de credenciais" (correto - desbloqueia automação)
|
|
378
|
-
|
|
379
|
-
</authentication_gates>
|
|
380
|
-
|
|
381
|
-
<automation_reference>
|
|
382
|
-
|
|
383
|
-
**A regra:** Se tem CLI/API, Claude faz. Nunca peça ao humano para realizar trabalho automatizável.
|
|
384
|
-
|
|
385
|
-
## Referência de CLI por Serviço
|
|
386
|
-
|
|
387
|
-
| Serviço | CLI/API | Comandos-chave | Auth Gate |
|
|
388
|
-
|---------|---------|----------------|-----------|
|
|
389
|
-
| Vercel | `vercel` | `--yes`, `env add`, `--prod`, `ls` | `vercel login` |
|
|
390
|
-
| Railway | `railway` | `init`, `up`, `variables set` | `railway login` |
|
|
391
|
-
| Fly | `fly` | `launch`, `deploy`, `secrets set` | `fly auth login` |
|
|
392
|
-
| Stripe | `stripe` + API | `listen`, `trigger`, chamadas API | API key no .env |
|
|
393
|
-
| Supabase | `supabase` | `init`, `link`, `db push`, `gen types` | `supabase login` |
|
|
394
|
-
| Upstash | `upstash` | `redis create`, `redis get` | `upstash auth login` |
|
|
395
|
-
| PlanetScale | `pscale` | `database create`, `branch create` | `pscale auth login` |
|
|
396
|
-
| GitHub | `gh` | `repo create`, `pr create`, `secret set` | `gh auth login` |
|
|
397
|
-
| Node | `npm`/`pnpm` | `install`, `run build`, `test`, `run dev` | N/A |
|
|
398
|
-
| Xcode | `xcodebuild` | `-project`, `-scheme`, `build`, `test` | N/A |
|
|
399
|
-
| Convex | `npx convex` | `dev`, `deploy`, `env set`, `env get` | `npx convex login` |
|
|
400
|
-
|
|
401
|
-
## Automação de Variáveis de Ambiente
|
|
402
|
-
|
|
403
|
-
**Arquivos env:** Use as ferramentas Write/Edit. Nunca peça ao humano para criar .env manualmente.
|
|
404
|
-
|
|
405
|
-
**Variáveis env do dashboard via CLI:**
|
|
406
|
-
|
|
407
|
-
| Plataforma | Comando CLI | Exemplo |
|
|
408
|
-
|------------|-------------|---------|
|
|
409
|
-
| Convex | `npx convex env set` | `npx convex env set OPENAI_API_KEY sk-...` |
|
|
410
|
-
| Vercel | `vercel env add` | `vercel env add STRIPE_KEY production` |
|
|
411
|
-
| Railway | `railway variables set` | `railway variables set API_KEY=value` |
|
|
412
|
-
| Fly | `fly secrets set` | `fly secrets set DATABASE_URL=...` |
|
|
413
|
-
| Supabase | `supabase secrets set` | `supabase secrets set MY_SECRET=value` |
|
|
414
|
-
|
|
415
|
-
**Padrão de coleta de secrets:**
|
|
416
|
-
```xml
|
|
417
|
-
<!-- ERRADO: Pedir ao usuário para adicionar env vars no dashboard -->
|
|
418
|
-
<task type="checkpoint:human-action">
|
|
419
|
-
<action>Add OPENAI_API_KEY to Convex dashboard</action>
|
|
420
|
-
<instructions>Go to dashboard.convex.dev → Settings → Environment Variables → Add</instructions>
|
|
421
|
-
</task>
|
|
422
|
-
|
|
423
|
-
<!-- CERTO: Claude pede o valor, depois adiciona via CLI -->
|
|
424
|
-
<task type="checkpoint:human-action">
|
|
425
|
-
<action>Forneça sua chave de API do OpenAI</action>
|
|
426
|
-
<instructions>
|
|
427
|
-
Preciso da sua chave de API do OpenAI para o backend Convex.
|
|
428
|
-
Obtenha em: https://platform.openai.com/api-keys
|
|
429
|
-
Cole a chave (começa com sk-)
|
|
430
|
-
</instructions>
|
|
431
|
-
<verification>Vou adicioná-la via `npx convex env set` e verificar</verification>
|
|
432
|
-
<resume-signal>Cole sua chave de API</resume-signal>
|
|
433
|
-
</task>
|
|
434
|
-
|
|
435
|
-
<task type="auto">
|
|
436
|
-
<name>Configure OpenAI key in Convex</name>
|
|
437
|
-
<action>Run `npx convex env set OPENAI_API_KEY {user-provided-key}`</action>
|
|
438
|
-
<verify>`npx convex env get OPENAI_API_KEY` returns the key (masked)</verify>
|
|
439
|
-
</task>
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
## Automação de Dev Server
|
|
443
|
-
|
|
444
|
-
| Framework | Comando de Início | Sinal de Pronto | URL Padrão |
|
|
445
|
-
|-----------|-------------------|-----------------|------------|
|
|
446
|
-
| Next.js | `npm run dev` | "Ready in" ou "started server" | http://localhost:3000 |
|
|
447
|
-
| Vite | `npm run dev` | "ready in" | http://localhost:5173 |
|
|
448
|
-
| Convex | `npx convex dev` | "Convex functions ready" | N/A (somente backend) |
|
|
449
|
-
| Express | `npm start` | "listening on port" | http://localhost:3000 |
|
|
450
|
-
| Django | `python manage.py runserver` | "Starting development server" | http://localhost:8000 |
|
|
451
|
-
|
|
452
|
-
**Ciclo de vida do servidor:**
|
|
453
|
-
```bash
|
|
454
|
-
# Run in background, capture PID
|
|
455
|
-
npm run dev &
|
|
456
|
-
DEV_SERVER_PID=$!
|
|
457
|
-
|
|
458
|
-
# Wait for ready (max 30s) — uses fetch() for cross-platform compatibility
|
|
459
|
-
timeout 30 bash -c 'until node -e "fetch(\"http://localhost:3000\").then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))" 2>/dev/null; do sleep 1; done'
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
**Conflitos de porta:** Encerre o processo inativo (`lsof -ti:3000 | xargs kill`) ou use porta alternativa (`--port 3001`).
|
|
463
|
-
|
|
464
|
-
**O servidor permanece rodando** durante os checkpoints. Encerre apenas quando o plano estiver completo, ao mudar para produção ou se a porta for necessária para outro serviço.
|
|
465
|
-
|
|
466
|
-
## Instalação de CLI
|
|
467
|
-
|
|
468
|
-
| CLI | Auto-instalar? | Comando |
|
|
469
|
-
|-----|----------------|---------|
|
|
470
|
-
| npm/pnpm/yarn | Não - pergunte ao usuário | Usuário escolhe o gerenciador de pacotes |
|
|
471
|
-
| vercel | Sim | `npm i -g vercel` |
|
|
472
|
-
| gh (GitHub) | Sim | `brew install gh` (macOS) ou `apt install gh` (Linux) |
|
|
473
|
-
| stripe | Sim | `npm i -g stripe` |
|
|
474
|
-
| supabase | Sim | `npm i -g supabase` |
|
|
475
|
-
| convex | Não - use npx | `npx convex` (sem instalação necessária) |
|
|
476
|
-
| fly | Sim | `brew install flyctl` ou instalador curl |
|
|
477
|
-
| railway | Sim | `npm i -g @railway/cli` |
|
|
478
|
-
|
|
479
|
-
**Protocolo:** Tente o comando → "command not found" → é auto-instalável? → sim: instale silenciosamente, tente novamente → não: checkpoint pedindo ao usuário para instalar.
|
|
480
|
-
|
|
481
|
-
## Falhas de Automação Pré-Checkpoint
|
|
482
|
-
|
|
483
|
-
| Falha | Resposta |
|
|
484
|
-
|-------|----------|
|
|
485
|
-
| Servidor não inicia | Verifique o erro, corrija o problema, tente novamente (não avance para checkpoint) |
|
|
486
|
-
| Porta em uso | Encerre o processo inativo ou use porta alternativa |
|
|
487
|
-
| Dependência ausente | Execute `npm install`, tente novamente |
|
|
488
|
-
| Erro de build | Corrija o erro primeiro (problema de código, não de checkpoint) |
|
|
489
|
-
| Erro de auth | Crie checkpoint de auth gate |
|
|
490
|
-
| Timeout de rede | Tente novamente com backoff, então checkpoint se persistir |
|
|
491
|
-
|
|
492
|
-
**Nunca apresente um checkpoint com ambiente de verificação quebrado.** Se o servidor local não responde, não peça ao usuário para "acessar localhost:3000".
|
|
493
|
-
|
|
494
|
-
> **Nota multiplataforma:** Use `node -e "fetch('http://localhost:3000').then(r=>console.log(r.status))"` em vez de `curl` para health checks. `curl` tem problemas no Windows MSYS/Git Bash por causa de mangling de SSL/path.
|
|
495
|
-
|
|
496
|
-
```xml
|
|
497
|
-
<!-- ERRADO: Checkpoint com ambiente quebrado -->
|
|
498
|
-
<task type="checkpoint:human-verify">
|
|
499
|
-
<what-built>Dashboard (servidor falhou ao iniciar)</what-built>
|
|
500
|
-
<how-to-verify>Acesse http://localhost:3000...</how-to-verify>
|
|
501
|
-
</task>
|
|
502
|
-
|
|
503
|
-
<!-- CERTO: Corrija primeiro, depois o checkpoint -->
|
|
504
|
-
<task type="auto">
|
|
505
|
-
<name>Fix server startup issue</name>
|
|
506
|
-
<action>Investigate error, fix root cause, restart server</action>
|
|
507
|
-
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
508
|
-
</task>
|
|
509
|
-
|
|
510
|
-
<task type="checkpoint:human-verify">
|
|
511
|
-
<what-built>Dashboard - servidor rodando em http://localhost:3000</what-built>
|
|
512
|
-
<how-to-verify>Acesse http://localhost:3000/dashboard...</how-to-verify>
|
|
513
|
-
</task>
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
## Referência Rápida de Automatizável
|
|
517
|
-
|
|
518
|
-
| Ação | Automatizável? | Claude faz? |
|
|
519
|
-
|------|----------------|-------------|
|
|
520
|
-
| Deploy para Vercel | Sim (`vercel`) | SIM |
|
|
521
|
-
| Criar webhook no Stripe | Sim (API) | SIM |
|
|
522
|
-
| Escrever arquivo .env | Sim (ferramenta Write) | SIM |
|
|
523
|
-
| Criar DB no Upstash | Sim (`upstash`) | SIM |
|
|
524
|
-
| Rodar testes | Sim (`npm test`) | SIM |
|
|
525
|
-
| Iniciar dev server | Sim (`npm run dev`) | SIM |
|
|
526
|
-
| Adicionar env vars no Convex | Sim (`npx convex env set`) | SIM |
|
|
527
|
-
| Adicionar env vars no Vercel | Sim (`vercel env add`) | SIM |
|
|
528
|
-
| Popular banco de dados | Sim (CLI/API) | SIM |
|
|
529
|
-
| Clicar link de verificação por e-mail | Não | NÃO |
|
|
530
|
-
| Inserir cartão de crédito com 3DS | Não | NÃO |
|
|
531
|
-
| Completar OAuth no navegador | Não | NÃO |
|
|
532
|
-
| Verificar visualmente se a UI está correta | Não | NÃO |
|
|
533
|
-
| Testar fluxos interativos de usuário | Não | NÃO |
|
|
534
|
-
|
|
535
|
-
</automation_reference>
|
|
536
|
-
|
|
537
|
-
<writing_guidelines>
|
|
538
|
-
|
|
539
|
-
**FAÇA:**
|
|
540
|
-
- Automatize tudo via CLI/API antes do checkpoint
|
|
541
|
-
- Seja específico: "Acesse https://myapp.vercel.app" em vez de "verifique o deploy"
|
|
542
|
-
- Numere os passos de verificação
|
|
543
|
-
- Declare os resultados esperados: "Você deve ver X"
|
|
544
|
-
- Forneça contexto: por que esse checkpoint existe
|
|
545
|
-
|
|
546
|
-
**NÃO FAÇA:**
|
|
547
|
-
- Pedir ao humano para fazer trabalho que Claude pode automatizar ❌
|
|
548
|
-
- Assumir conhecimento: "Configure as configurações usuais" ❌
|
|
549
|
-
- Pular etapas: "Configure o banco de dados" (muito vago) ❌
|
|
550
|
-
- Misturar múltiplas verificações em um único checkpoint ❌
|
|
551
|
-
|
|
552
|
-
**Posicionamento:**
|
|
553
|
-
- **Após a automação ser concluída** - não antes de Claude fazer o trabalho
|
|
554
|
-
- **Após construção de UI** - antes de declarar a fase completa
|
|
555
|
-
- **Antes do trabalho dependente** - decisões antes da implementação
|
|
556
|
-
- **Em pontos de integração** - após configurar serviços externos
|
|
557
|
-
|
|
558
|
-
**Posicionamento ruim:** Antes da automação ❌ | Muito frequente ❌ | Tarde demais (tarefas dependentes já precisavam do resultado) ❌
|
|
559
|
-
</writing_guidelines>
|
|
560
|
-
|
|
561
|
-
<examples>
|
|
562
|
-
|
|
563
|
-
### Exemplo 1: Configuração de Banco de Dados (Sem Checkpoint Necessário)
|
|
564
|
-
|
|
565
|
-
```xml
|
|
566
|
-
<task type="auto">
|
|
567
|
-
<name>Create Upstash Redis database</name>
|
|
568
|
-
<files>.env</files>
|
|
569
|
-
<action>
|
|
570
|
-
1. Run `upstash redis create myapp-cache --region us-east-1`
|
|
571
|
-
2. Capture connection URL from output
|
|
572
|
-
3. Write to .env: UPSTASH_REDIS_URL={url}
|
|
573
|
-
4. Verify connection with test command
|
|
574
|
-
</action>
|
|
575
|
-
<verify>
|
|
576
|
-
- upstash redis list shows database
|
|
577
|
-
- .env contains UPSTASH_REDIS_URL
|
|
578
|
-
- Test connection succeeds
|
|
579
|
-
</verify>
|
|
580
|
-
<done>Redis database created and configured</done>
|
|
581
|
-
</task>
|
|
582
|
-
|
|
583
|
-
<!-- SEM CHECKPOINT NECESSÁRIO - Claude automatizou tudo e verificou programaticamente -->
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
### Exemplo 2: Fluxo Completo de Auth (Único checkpoint ao final)
|
|
587
|
-
|
|
588
|
-
```xml
|
|
589
|
-
<task type="auto">
|
|
590
|
-
<name>Create user schema</name>
|
|
591
|
-
<files>src/db/schema.ts</files>
|
|
592
|
-
<action>Define User, Session, Account tables with Drizzle ORM</action>
|
|
593
|
-
<verify>npm run db:generate succeeds</verify>
|
|
594
|
-
</task>
|
|
595
|
-
|
|
596
|
-
<task type="auto">
|
|
597
|
-
<name>Create auth API routes</name>
|
|
598
|
-
<files>src/app/api/auth/[...nextauth]/route.ts</files>
|
|
599
|
-
<action>Set up NextAuth with GitHub provider, JWT strategy</action>
|
|
600
|
-
<verify>TypeScript compiles, no errors</verify>
|
|
601
|
-
</task>
|
|
602
|
-
|
|
603
|
-
<task type="auto">
|
|
604
|
-
<name>Create login UI</name>
|
|
605
|
-
<files>src/app/login/page.tsx, src/components/LoginButton.tsx</files>
|
|
606
|
-
<action>Create login page with GitHub OAuth button</action>
|
|
607
|
-
<verify>npm run build succeeds</verify>
|
|
608
|
-
</task>
|
|
609
|
-
|
|
610
|
-
<task type="auto">
|
|
611
|
-
<name>Start dev server for auth testing</name>
|
|
612
|
-
<action>Run `npm run dev` in background, wait for ready signal</action>
|
|
613
|
-
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
614
|
-
<done>Dev server running at http://localhost:3000</done>
|
|
615
|
-
</task>
|
|
616
|
-
|
|
617
|
-
<!-- UM checkpoint ao final verifica o fluxo completo -->
|
|
618
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
619
|
-
<what-built>Fluxo completo de autenticação - dev server rodando em http://localhost:3000</what-built>
|
|
620
|
-
<how-to-verify>
|
|
621
|
-
1. Acesse: http://localhost:3000/login
|
|
622
|
-
2. Clique em "Sign in with GitHub"
|
|
623
|
-
3. Complete o fluxo OAuth do GitHub
|
|
624
|
-
4. Verifique: Redirecionado para /dashboard, nome do usuário exibido
|
|
625
|
-
5. Atualize a página: Sessão persiste
|
|
626
|
-
6. Clique em logout: Sessão encerrada
|
|
627
|
-
</how-to-verify>
|
|
628
|
-
<resume-signal>Digite "aprovado" ou descreva problemas</resume-signal>
|
|
629
|
-
</task>
|
|
630
|
-
```
|
|
631
|
-
</examples>
|
|
632
|
-
|
|
633
|
-
<anti_patterns>
|
|
634
|
-
|
|
635
|
-
### ❌ RUIM: Pedir ao usuário para iniciar o dev server
|
|
636
|
-
|
|
637
|
-
```xml
|
|
638
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
639
|
-
<what-built>Dashboard component</what-built>
|
|
640
|
-
<how-to-verify>
|
|
641
|
-
1. Run: npm run dev
|
|
642
|
-
2. Visit: http://localhost:3000/dashboard
|
|
643
|
-
3. Check layout is correct
|
|
644
|
-
</how-to-verify>
|
|
645
|
-
</task>
|
|
646
|
-
```
|
|
647
|
-
|
|
648
|
-
**Por que é ruim:** Claude pode executar `npm run dev`. O usuário deve apenas acessar URLs, não executar comandos.
|
|
649
|
-
|
|
650
|
-
### ✅ BOM: Claude inicia o servidor, usuário acessa
|
|
651
|
-
|
|
652
|
-
```xml
|
|
653
|
-
<task type="auto">
|
|
654
|
-
<name>Start dev server</name>
|
|
655
|
-
<action>Run `npm run dev` in background</action>
|
|
656
|
-
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
657
|
-
</task>
|
|
658
|
-
|
|
659
|
-
<task type="checkpoint:human-verify" gate="blocking">
|
|
660
|
-
<what-built>Dashboard em http://localhost:3000/dashboard (servidor rodando)</what-built>
|
|
661
|
-
<how-to-verify>
|
|
662
|
-
Acesse http://localhost:3000/dashboard e verifique:
|
|
663
|
-
1. Layout corresponde ao design
|
|
664
|
-
2. Sem erros no console
|
|
665
|
-
</how-to-verify>
|
|
666
|
-
</task>
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
### ❌ RUIM: Pedir ao humano para fazer deploy / ✅ BOM: Claude automatiza
|
|
670
|
-
|
|
671
|
-
```xml
|
|
672
|
-
<!-- RUIM: Pedir ao usuário para fazer deploy via dashboard -->
|
|
673
|
-
<task type="checkpoint:human-action" gate="blocking">
|
|
674
|
-
<action>Deploy to Vercel</action>
|
|
675
|
-
<instructions>Visit vercel.com/new → Import repo → Click Deploy → Copy URL</instructions>
|
|
676
|
-
</task>
|
|
677
|
-
|
|
678
|
-
<!-- BOM: Claude faz o deploy, usuário verifica -->
|
|
679
|
-
<task type="auto">
|
|
680
|
-
<name>Deploy to Vercel</name>
|
|
681
|
-
<action>Run `vercel --yes`. Capture URL.</action>
|
|
682
|
-
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
683
|
-
</task>
|
|
684
|
-
|
|
685
|
-
<task type="checkpoint:human-verify">
|
|
686
|
-
<what-built>Deploy realizado em {url}</what-built>
|
|
687
|
-
<how-to-verify>Acesse {url}, verifique se a homepage carrega</how-to-verify>
|
|
688
|
-
<resume-signal>Digite "aprovado"</resume-signal>
|
|
689
|
-
</task>
|
|
690
|
-
```
|
|
691
|
-
|
|
692
|
-
### ❌ RUIM: Muitos checkpoints / ✅ BOM: Checkpoint único
|
|
693
|
-
|
|
694
|
-
```xml
|
|
695
|
-
<!-- RUIM: Checkpoint após cada tarefa -->
|
|
696
|
-
<task type="auto">Create schema</task>
|
|
697
|
-
<task type="checkpoint:human-verify">Check schema</task>
|
|
698
|
-
<task type="auto">Create API route</task>
|
|
699
|
-
<task type="checkpoint:human-verify">Check API</task>
|
|
700
|
-
<task type="auto">Create UI form</task>
|
|
701
|
-
<task type="checkpoint:human-verify">Check form</task>
|
|
702
|
-
|
|
703
|
-
<!-- BOM: Um checkpoint ao final -->
|
|
704
|
-
<task type="auto">Create schema</task>
|
|
705
|
-
<task type="auto">Create API route</task>
|
|
706
|
-
<task type="auto">Create UI form</task>
|
|
707
|
-
|
|
708
|
-
<task type="checkpoint:human-verify">
|
|
709
|
-
<what-built>Fluxo completo de auth (schema + API + UI)</what-built>
|
|
710
|
-
<how-to-verify>Teste o fluxo completo: cadastro, login, acesso à página protegida</how-to-verify>
|
|
711
|
-
<resume-signal>Digite "aprovado"</resume-signal>
|
|
712
|
-
</task>
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
### ❌ RUIM: Verificação vaga / ✅ BOM: Passos específicos
|
|
716
|
-
|
|
717
|
-
```xml
|
|
718
|
-
<!-- RUIM -->
|
|
719
|
-
<task type="checkpoint:human-verify">
|
|
720
|
-
<what-built>Dashboard</what-built>
|
|
721
|
-
<how-to-verify>Verifique se funciona</how-to-verify>
|
|
722
|
-
</task>
|
|
723
|
-
|
|
724
|
-
<!-- BOM -->
|
|
725
|
-
<task type="checkpoint:human-verify">
|
|
726
|
-
<what-built>Dashboard responsivo - servidor rodando em http://localhost:3000</what-built>
|
|
727
|
-
<how-to-verify>
|
|
728
|
-
Acesse http://localhost:3000/dashboard e verifique:
|
|
729
|
-
1. Desktop (>1024px): Sidebar visível, área de conteúdo preenche o espaço restante
|
|
730
|
-
2. Tablet (768px): Sidebar colapsa para ícones
|
|
731
|
-
3. Mobile (375px): Sidebar oculta, menu hambúrguer no header
|
|
732
|
-
4. Sem scroll horizontal em nenhum tamanho
|
|
733
|
-
</how-to-verify>
|
|
734
|
-
<resume-signal>Digite "aprovado" ou descreva problemas de layout</resume-signal>
|
|
735
|
-
</task>
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
### ❌ RUIM: Pedir ao usuário para executar comandos CLI
|
|
739
|
-
|
|
740
|
-
```xml
|
|
741
|
-
<task type="checkpoint:human-action">
|
|
742
|
-
<action>Run database migrations</action>
|
|
743
|
-
<instructions>Run: npx prisma migrate deploy && npx prisma db seed</instructions>
|
|
744
|
-
</task>
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
**Por que é ruim:** Claude pode executar esses comandos. O usuário nunca deve executar comandos CLI.
|
|
748
|
-
|
|
749
|
-
### ❌ RUIM: Pedir ao usuário para copiar valores entre serviços
|
|
750
|
-
|
|
751
|
-
```xml
|
|
752
|
-
<task type="checkpoint:human-action">
|
|
753
|
-
<action>Configure webhook URL in Stripe</action>
|
|
754
|
-
<instructions>Copy deployment URL → Stripe Dashboard → Webhooks → Add endpoint → Copy secret → Add to .env</instructions>
|
|
755
|
-
</task>
|
|
756
|
-
```
|
|
757
|
-
|
|
758
|
-
**Por que é ruim:** O Stripe tem uma API. Claude deve criar o webhook via API e escrever no .env diretamente.
|
|
759
|
-
|
|
760
|
-
</anti_patterns>
|
|
761
|
-
|
|
762
|
-
<summary>
|
|
763
|
-
|
|
764
|
-
Checkpoints formalizam pontos de human-in-the-loop para verificação e decisões, não trabalho manual.
|
|
765
|
-
|
|
766
|
-
**A regra de ouro:** Se Claude PODE automatizar, Claude DEVE automatizar.
|
|
767
|
-
|
|
768
|
-
**Prioridade de checkpoints:**
|
|
769
|
-
1. **checkpoint:human-verify** (90%) - Claude automatizou tudo, humano confirma correção visual/funcional
|
|
770
|
-
2. **checkpoint:decision** (9%) - Humano faz escolhas arquiteturais/tecnológicas
|
|
771
|
-
3. **checkpoint:human-action** (1%) - Passos manuais verdadeiramente inevitáveis sem API/CLI
|
|
772
|
-
|
|
773
|
-
**Quando NÃO usar checkpoints:**
|
|
774
|
-
- Coisas que Claude pode verificar programaticamente (testes, builds)
|
|
775
|
-
- Operações de arquivo (Claude pode ler arquivos)
|
|
776
|
-
- Correção de código (testes e análise estática)
|
|
777
|
-
- Qualquer coisa automatizável via CLI/API
|
|
778
|
-
</summary>
|
|
1
|
+
<overview>
|
|
2
|
+
Planos executam de forma autônoma. Checkpoints formalizam pontos de interação onde a verificação humana ou decisões são necessárias.
|
|
3
|
+
|
|
4
|
+
**Princípio central:** Claude automatiza tudo via CLI/API. Checkpoints são para verificação e decisões, não trabalho manual.
|
|
5
|
+
|
|
6
|
+
**Regras de ouro:**
|
|
7
|
+
1. **Se Claude pode executar, Claude executa** - Nunca peça ao usuário para executar comandos CLI, iniciar servidores ou rodar builds
|
|
8
|
+
2. **Claude configura o ambiente de verificação** - Inicia dev servers, popula bancos de dados, configura variáveis de ambiente
|
|
9
|
+
3. **O usuário só faz o que exige julgamento humano** - Verificações visuais, avaliação de UX, "isso parece certo?"
|
|
10
|
+
4. **Secrets vêm do usuário, automação vem do Claude** - Peça chaves de API, então Claude as usa via CLI
|
|
11
|
+
5. **Modo automático ignora checkpoints de verificação/decisão** — Quando `workflow._auto_chain_active` ou `workflow.auto_advance` for true na config: human-verify é aprovado automaticamente, decision seleciona a primeira opção automaticamente, human-action ainda para (auth gates não podem ser automatizados)
|
|
12
|
+
</overview>
|
|
13
|
+
|
|
14
|
+
<checkpoint_types>
|
|
15
|
+
|
|
16
|
+
<type name="human-verify">
|
|
17
|
+
## checkpoint:human-verify (Mais Comum - 90%)
|
|
18
|
+
|
|
19
|
+
**Quando:** Claude concluiu trabalho automatizado, humano confirma que funciona corretamente.
|
|
20
|
+
|
|
21
|
+
**Use para:**
|
|
22
|
+
- Verificações visuais de UI (layout, estilo, responsividade)
|
|
23
|
+
- Fluxos interativos (navegar por wizard, testar fluxos de usuário)
|
|
24
|
+
- Verificação funcional (funcionalidade funciona como esperado)
|
|
25
|
+
- Qualidade de reprodução de áudio/vídeo
|
|
26
|
+
- Suavidade de animações
|
|
27
|
+
- Testes de acessibilidade
|
|
28
|
+
|
|
29
|
+
**Estrutura:**
|
|
30
|
+
```xml
|
|
31
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
32
|
+
<what-built>[O que Claude automatizou e implantou/construiu]</what-built>
|
|
33
|
+
<how-to-verify>
|
|
34
|
+
[Passos exatos para testar - URLs, comandos, comportamento esperado]
|
|
35
|
+
</how-to-verify>
|
|
36
|
+
<resume-signal>[Como continuar - "aprovado", "sim", ou descreva problemas]</resume-signal>
|
|
37
|
+
</task>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Exemplo: Componente de UI (mostra padrão-chave: Claude inicia servidor ANTES do checkpoint)**
|
|
41
|
+
```xml
|
|
42
|
+
<task type="auto">
|
|
43
|
+
<name>Build responsive dashboard layout</name>
|
|
44
|
+
<files>src/components/Dashboard.tsx, src/app/dashboard/page.tsx</files>
|
|
45
|
+
<action>Create dashboard with sidebar, header, and content area. Use Tailwind responsive classes for mobile.</action>
|
|
46
|
+
<verify>npm run build succeeds, no TypeScript errors</verify>
|
|
47
|
+
<done>Dashboard component builds without errors</done>
|
|
48
|
+
</task>
|
|
49
|
+
|
|
50
|
+
<task type="auto">
|
|
51
|
+
<name>Start dev server for verification</name>
|
|
52
|
+
<action>Run `npm run dev` in background, wait for "ready" message, capture port</action>
|
|
53
|
+
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
54
|
+
<done>Dev server running at http://localhost:3000</done>
|
|
55
|
+
</task>
|
|
56
|
+
|
|
57
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
58
|
+
<what-built>Layout responsivo do dashboard - dev server rodando em http://localhost:3000</what-built>
|
|
59
|
+
<how-to-verify>
|
|
60
|
+
Acesse http://localhost:3000/dashboard e verifique:
|
|
61
|
+
1. Desktop (>1024px): Sidebar à esquerda, conteúdo à direita, header no topo
|
|
62
|
+
2. Tablet (768px): Sidebar colapsa para menu hambúrguer
|
|
63
|
+
3. Mobile (375px): Layout de coluna única, nav inferior aparece
|
|
64
|
+
4. Sem deslocamento de layout ou scroll horizontal em qualquer tamanho
|
|
65
|
+
</how-to-verify>
|
|
66
|
+
<resume-signal>Digite "aprovado" ou descreva problemas de layout</resume-signal>
|
|
67
|
+
</task>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Exemplo: Build do Xcode**
|
|
71
|
+
```xml
|
|
72
|
+
<task type="auto">
|
|
73
|
+
<name>Build macOS app with Xcode</name>
|
|
74
|
+
<files>App.xcodeproj, Sources/</files>
|
|
75
|
+
<action>Run `xcodebuild -project App.xcodeproj -scheme App build`. Check for compilation errors in output.</action>
|
|
76
|
+
<verify>Build output contains "BUILD SUCCEEDED", no errors</verify>
|
|
77
|
+
<done>App builds successfully</done>
|
|
78
|
+
</task>
|
|
79
|
+
|
|
80
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
81
|
+
<what-built>App macOS construído em DerivedData/Build/Products/Debug/App.app</what-built>
|
|
82
|
+
<how-to-verify>
|
|
83
|
+
Abra App.app e teste:
|
|
84
|
+
- App inicia sem crashes
|
|
85
|
+
- Ícone na barra de menu aparece
|
|
86
|
+
- Janela de preferências abre corretamente
|
|
87
|
+
- Sem glitches visuais ou problemas de layout
|
|
88
|
+
</how-to-verify>
|
|
89
|
+
<resume-signal>Digite "aprovado" ou descreva problemas</resume-signal>
|
|
90
|
+
</task>
|
|
91
|
+
```
|
|
92
|
+
</type>
|
|
93
|
+
|
|
94
|
+
<type name="decision">
|
|
95
|
+
## checkpoint:decision (9%)
|
|
96
|
+
|
|
97
|
+
**Quando:** Humano deve fazer uma escolha que afeta a direção da implementação.
|
|
98
|
+
|
|
99
|
+
**Use para:**
|
|
100
|
+
- Seleção de tecnologia (qual provedor de auth, qual banco de dados)
|
|
101
|
+
- Decisões de arquitetura (monorepo vs repositórios separados)
|
|
102
|
+
- Escolhas de design (esquema de cores, abordagem de layout)
|
|
103
|
+
- Priorização de funcionalidades (qual variante construir)
|
|
104
|
+
- Decisões de modelo de dados (estrutura do schema)
|
|
105
|
+
|
|
106
|
+
**Estrutura:**
|
|
107
|
+
```xml
|
|
108
|
+
<task type="checkpoint:decision" gate="blocking">
|
|
109
|
+
<decision>[O que está sendo decidido]</decision>
|
|
110
|
+
<context>[Por que essa decisão importa]</context>
|
|
111
|
+
<options>
|
|
112
|
+
<option id="option-a">
|
|
113
|
+
<name>[Nome da opção]</name>
|
|
114
|
+
<pros>[Benefícios]</pros>
|
|
115
|
+
<cons>[Compensações]</cons>
|
|
116
|
+
</option>
|
|
117
|
+
<option id="option-b">
|
|
118
|
+
<name>[Nome da opção]</name>
|
|
119
|
+
<pros>[Benefícios]</pros>
|
|
120
|
+
<cons>[Compensações]</cons>
|
|
121
|
+
</option>
|
|
122
|
+
</options>
|
|
123
|
+
<resume-signal>[Como indicar a escolha]</resume-signal>
|
|
124
|
+
</task>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Exemplo: Seleção de Provedor de Auth**
|
|
128
|
+
```xml
|
|
129
|
+
<task type="checkpoint:decision" gate="blocking">
|
|
130
|
+
<decision>Select authentication provider</decision>
|
|
131
|
+
<context>
|
|
132
|
+
Need user authentication for the app. Three solid options with different tradeoffs.
|
|
133
|
+
</context>
|
|
134
|
+
<options>
|
|
135
|
+
<option id="supabase">
|
|
136
|
+
<name>Supabase Auth</name>
|
|
137
|
+
<pros>Built-in with Supabase DB we're using, generous free tier, row-level security integration</pros>
|
|
138
|
+
<cons>Less customizable UI, tied to Supabase ecosystem</cons>
|
|
139
|
+
</option>
|
|
140
|
+
<option id="clerk">
|
|
141
|
+
<name>Clerk</name>
|
|
142
|
+
<pros>Beautiful pre-built UI, best developer experience, excellent docs</pros>
|
|
143
|
+
<cons>Paid after 10k MAU, vendor lock-in</cons>
|
|
144
|
+
</option>
|
|
145
|
+
<option id="nextauth">
|
|
146
|
+
<name>NextAuth.js</name>
|
|
147
|
+
<pros>Free, self-hosted, maximum control, widely adopted</pros>
|
|
148
|
+
<cons>More setup work, you manage security updates, UI is DIY</cons>
|
|
149
|
+
</option>
|
|
150
|
+
</options>
|
|
151
|
+
<resume-signal>Select: supabase, clerk, or nextauth</resume-signal>
|
|
152
|
+
</task>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Exemplo: Seleção de Banco de Dados**
|
|
156
|
+
```xml
|
|
157
|
+
<task type="checkpoint:decision" gate="blocking">
|
|
158
|
+
<decision>Select database for user data</decision>
|
|
159
|
+
<context>
|
|
160
|
+
App needs persistent storage for users, sessions, and user-generated content.
|
|
161
|
+
Expected scale: 10k users, 1M records first year.
|
|
162
|
+
</context>
|
|
163
|
+
<options>
|
|
164
|
+
<option id="supabase">
|
|
165
|
+
<name>Supabase (Postgres)</name>
|
|
166
|
+
<pros>Full SQL, generous free tier, built-in auth, real-time subscriptions</pros>
|
|
167
|
+
<cons>Vendor lock-in for real-time features, less flexible than raw Postgres</cons>
|
|
168
|
+
</option>
|
|
169
|
+
<option id="planetscale">
|
|
170
|
+
<name>PlanetScale (MySQL)</name>
|
|
171
|
+
<pros>Serverless scaling, branching workflow, excellent DX</pros>
|
|
172
|
+
<cons>MySQL not Postgres, no foreign keys in free tier</cons>
|
|
173
|
+
</option>
|
|
174
|
+
<option id="convex">
|
|
175
|
+
<name>Convex</name>
|
|
176
|
+
<pros>Real-time by default, TypeScript-native, automatic caching</pros>
|
|
177
|
+
<cons>Newer platform, different mental model, less SQL flexibility</cons>
|
|
178
|
+
</option>
|
|
179
|
+
</options>
|
|
180
|
+
<resume-signal>Select: supabase, planetscale, or convex</resume-signal>
|
|
181
|
+
</task>
|
|
182
|
+
```
|
|
183
|
+
</type>
|
|
184
|
+
|
|
185
|
+
<type name="human-action">
|
|
186
|
+
## checkpoint:human-action (1% - Raro)
|
|
187
|
+
|
|
188
|
+
**Quando:** A ação NÃO tem CLI/API e requer interação exclusivamente humana, OU Claude encontrou um auth gate durante a automação.
|
|
189
|
+
|
|
190
|
+
**Use APENAS para:**
|
|
191
|
+
- **Auth gates** - Claude tentou CLI/API mas precisa de credenciais (isso NÃO é uma falha)
|
|
192
|
+
- Links de verificação por e-mail (clicar no e-mail)
|
|
193
|
+
- Códigos 2FA por SMS (verificação por telefone)
|
|
194
|
+
- Aprovações manuais de conta (plataforma exige revisão humana)
|
|
195
|
+
- Fluxos 3D Secure de cartão de crédito (autorização de pagamento via web)
|
|
196
|
+
- Aprovações de app OAuth (aprovação via web)
|
|
197
|
+
|
|
198
|
+
**NÃO use para trabalho manual pré-planejado:**
|
|
199
|
+
- Fazer deploy (use CLI - auth gate se necessário)
|
|
200
|
+
- Criar webhooks/bancos de dados (use API/CLI - auth gate se necessário)
|
|
201
|
+
- Rodar builds/testes (use a ferramenta Bash)
|
|
202
|
+
- Criar arquivos (use a ferramenta Write)
|
|
203
|
+
|
|
204
|
+
**Estrutura:**
|
|
205
|
+
```xml
|
|
206
|
+
<task type="checkpoint:human-action" gate="blocking">
|
|
207
|
+
<action>[O que o humano deve fazer - Claude já fez tudo que é automatizável]</action>
|
|
208
|
+
<instructions>
|
|
209
|
+
[O que Claude já automatizou]
|
|
210
|
+
[A UMA coisa que requer ação humana]
|
|
211
|
+
</instructions>
|
|
212
|
+
<verification>[O que Claude pode verificar depois]</verification>
|
|
213
|
+
<resume-signal>[Como continuar]</resume-signal>
|
|
214
|
+
</task>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Exemplo: Verificação de E-mail**
|
|
218
|
+
```xml
|
|
219
|
+
<task type="auto">
|
|
220
|
+
<name>Create SendGrid account via API</name>
|
|
221
|
+
<action>Use SendGrid API to create subuser account with provided email. Request verification email.</action>
|
|
222
|
+
<verify>API returns 201, account created</verify>
|
|
223
|
+
<done>Account created, verification email sent</done>
|
|
224
|
+
</task>
|
|
225
|
+
|
|
226
|
+
<task type="checkpoint:human-action" gate="blocking">
|
|
227
|
+
<action>Completar verificação de e-mail da conta SendGrid</action>
|
|
228
|
+
<instructions>
|
|
229
|
+
Criei a conta e solicitei o e-mail de verificação.
|
|
230
|
+
Verifique sua caixa de entrada pelo link de verificação do SendGrid e clique nele.
|
|
231
|
+
</instructions>
|
|
232
|
+
<verification>Chave de API do SendGrid funciona: teste curl bem-sucedido</verification>
|
|
233
|
+
<resume-signal>Digite "feito" quando o e-mail for verificado</resume-signal>
|
|
234
|
+
</task>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Exemplo: Auth Gate (Checkpoint Dinâmico)**
|
|
238
|
+
```xml
|
|
239
|
+
<task type="auto">
|
|
240
|
+
<name>Deploy to Vercel</name>
|
|
241
|
+
<files>.vercel/, vercel.json</files>
|
|
242
|
+
<action>Run `vercel --yes` to deploy</action>
|
|
243
|
+
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
244
|
+
</task>
|
|
245
|
+
|
|
246
|
+
<!-- Se vercel retornar "Error: Not authenticated", Claude cria checkpoint dinamicamente -->
|
|
247
|
+
|
|
248
|
+
<task type="checkpoint:human-action" gate="blocking">
|
|
249
|
+
<action>Autenticar o CLI Vercel para que eu possa continuar o deploy</action>
|
|
250
|
+
<instructions>
|
|
251
|
+
Tentei fazer o deploy mas recebi erro de autenticação.
|
|
252
|
+
Execute: vercel login
|
|
253
|
+
Isso abrirá seu navegador - complete o fluxo de autenticação.
|
|
254
|
+
</instructions>
|
|
255
|
+
<verification>vercel whoami retorna o e-mail da sua conta</verification>
|
|
256
|
+
<resume-signal>Digite "feito" quando autenticado</resume-signal>
|
|
257
|
+
</task>
|
|
258
|
+
|
|
259
|
+
<!-- Após autenticação, Claude tenta o deploy novamente -->
|
|
260
|
+
|
|
261
|
+
<task type="auto">
|
|
262
|
+
<name>Retry Vercel deployment</name>
|
|
263
|
+
<action>Run `vercel --yes` (now authenticated)</action>
|
|
264
|
+
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
265
|
+
</task>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Distinção-chave:** Auth gates são criados dinamicamente quando Claude encontra erros de auth. NÃO são pré-planejados — Claude automatiza primeiro, pede credenciais apenas quando bloqueado.
|
|
269
|
+
</type>
|
|
270
|
+
</checkpoint_types>
|
|
271
|
+
|
|
272
|
+
<execution_protocol>
|
|
273
|
+
|
|
274
|
+
Quando Claude encontra `type="checkpoint:*"`:
|
|
275
|
+
|
|
276
|
+
1. **Pare imediatamente** - não avance para a próxima tarefa
|
|
277
|
+
2. **Exiba o checkpoint claramente** usando o formato abaixo
|
|
278
|
+
3. **Aguarde a resposta do usuário** - não simule conclusão
|
|
279
|
+
4. **Verifique se possível** - verifique arquivos, rode testes, o que for especificado
|
|
280
|
+
5. **Retome a execução** - continue para a próxima tarefa apenas após confirmação
|
|
281
|
+
|
|
282
|
+
**Para checkpoint:human-verify:**
|
|
283
|
+
```
|
|
284
|
+
╔═══════════════════════════════════════════════════════╗
|
|
285
|
+
║ CHECKPOINT: Verificação Necessária ║
|
|
286
|
+
╚═══════════════════════════════════════════════════════╝
|
|
287
|
+
|
|
288
|
+
Progresso: 5/8 tarefas concluídas
|
|
289
|
+
Tarefa: Layout responsivo do dashboard
|
|
290
|
+
|
|
291
|
+
Construído: Dashboard responsivo em /dashboard
|
|
292
|
+
|
|
293
|
+
Como verificar:
|
|
294
|
+
1. Acesse: http://localhost:3000/dashboard
|
|
295
|
+
2. Desktop (>1024px): Sidebar visível, conteúdo preenche o espaço restante
|
|
296
|
+
3. Tablet (768px): Sidebar colapsa para ícones
|
|
297
|
+
4. Mobile (375px): Sidebar oculta, menu hambúrguer aparece
|
|
298
|
+
|
|
299
|
+
────────────────────────────────────────────────────────
|
|
300
|
+
→ SUA AÇÃO: Digite "aprovado" ou descreva problemas
|
|
301
|
+
────────────────────────────────────────────────────────
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Para checkpoint:decision:**
|
|
305
|
+
```
|
|
306
|
+
╔═══════════════════════════════════════════════════════╗
|
|
307
|
+
║ CHECKPOINT: Decisão Necessária ║
|
|
308
|
+
╚═══════════════════════════════════════════════════════╝
|
|
309
|
+
|
|
310
|
+
Progresso: 2/6 tarefas concluídas
|
|
311
|
+
Tarefa: Selecionar provedor de autenticação
|
|
312
|
+
|
|
313
|
+
Decisão: Qual provedor de auth devemos usar?
|
|
314
|
+
|
|
315
|
+
Contexto: Precisamos de autenticação de usuário. Três opções com compensações diferentes.
|
|
316
|
+
|
|
317
|
+
Opções:
|
|
318
|
+
1. supabase - Integrado ao nosso DB, plano gratuito
|
|
319
|
+
Prós: Integração com row-level security, plano gratuito generoso
|
|
320
|
+
Contras: UI menos customizável, lock-in no ecossistema
|
|
321
|
+
|
|
322
|
+
2. clerk - Melhor DX, pago após 10k usuários
|
|
323
|
+
Prós: UI pré-construída linda, documentação excelente
|
|
324
|
+
Contras: Vendor lock-in, preço em escala
|
|
325
|
+
|
|
326
|
+
3. nextauth - Auto-hospedado, controle máximo
|
|
327
|
+
Prós: Gratuito, sem vendor lock-in, amplamente adotado
|
|
328
|
+
Contras: Mais trabalho de configuração, atualizações de segurança por conta própria
|
|
329
|
+
|
|
330
|
+
────────────────────────────────────────────────────────
|
|
331
|
+
→ SUA AÇÃO: Selecione supabase, clerk ou nextauth
|
|
332
|
+
────────────────────────────────────────────────────────
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Para checkpoint:human-action:**
|
|
336
|
+
```
|
|
337
|
+
╔═══════════════════════════════════════════════════════╗
|
|
338
|
+
║ CHECKPOINT: Ação Necessária ║
|
|
339
|
+
╚═══════════════════════════════════════════════════════╝
|
|
340
|
+
|
|
341
|
+
Progresso: 3/8 tarefas concluídas
|
|
342
|
+
Tarefa: Deploy para Vercel
|
|
343
|
+
|
|
344
|
+
Tentado: vercel --yes
|
|
345
|
+
Erro: Not authenticated. Please run 'vercel login'
|
|
346
|
+
|
|
347
|
+
O que você precisa fazer:
|
|
348
|
+
1. Execute: vercel login
|
|
349
|
+
2. Complete a autenticação no navegador quando abrir
|
|
350
|
+
3. Volte aqui quando concluído
|
|
351
|
+
|
|
352
|
+
Vou verificar: vercel whoami retorna sua conta
|
|
353
|
+
|
|
354
|
+
────────────────────────────────────────────────────────
|
|
355
|
+
→ SUA AÇÃO: Digite "feito" quando autenticado
|
|
356
|
+
────────────────────────────────────────────────────────
|
|
357
|
+
```
|
|
358
|
+
</execution_protocol>
|
|
359
|
+
|
|
360
|
+
<authentication_gates>
|
|
361
|
+
|
|
362
|
+
**Auth gate = Claude tentou CLI/API, recebeu erro de auth.** Não é uma falha — é um gate que requer entrada humana para desbloquear.
|
|
363
|
+
|
|
364
|
+
**Padrão:** Claude tenta automação → erro de auth → cria checkpoint:human-action → usuário autentica → Claude tenta novamente → continua
|
|
365
|
+
|
|
366
|
+
**Protocolo do gate:**
|
|
367
|
+
1. Reconhecer que não é uma falha - auth ausente é esperado
|
|
368
|
+
2. Parar a tarefa atual - não tentar repetidamente
|
|
369
|
+
3. Criar checkpoint:human-action dinamicamente
|
|
370
|
+
4. Fornecer passos exatos de autenticação
|
|
371
|
+
5. Verificar que a autenticação funciona
|
|
372
|
+
6. Tentar novamente a tarefa original
|
|
373
|
+
7. Continuar normalmente
|
|
374
|
+
|
|
375
|
+
**Distinção-chave:**
|
|
376
|
+
- Checkpoint pré-planejado: "Preciso que você faça X" (errado - Claude deveria automatizar)
|
|
377
|
+
- Auth gate: "Tentei automatizar X mas preciso de credenciais" (correto - desbloqueia automação)
|
|
378
|
+
|
|
379
|
+
</authentication_gates>
|
|
380
|
+
|
|
381
|
+
<automation_reference>
|
|
382
|
+
|
|
383
|
+
**A regra:** Se tem CLI/API, Claude faz. Nunca peça ao humano para realizar trabalho automatizável.
|
|
384
|
+
|
|
385
|
+
## Referência de CLI por Serviço
|
|
386
|
+
|
|
387
|
+
| Serviço | CLI/API | Comandos-chave | Auth Gate |
|
|
388
|
+
|---------|---------|----------------|-----------|
|
|
389
|
+
| Vercel | `vercel` | `--yes`, `env add`, `--prod`, `ls` | `vercel login` |
|
|
390
|
+
| Railway | `railway` | `init`, `up`, `variables set` | `railway login` |
|
|
391
|
+
| Fly | `fly` | `launch`, `deploy`, `secrets set` | `fly auth login` |
|
|
392
|
+
| Stripe | `stripe` + API | `listen`, `trigger`, chamadas API | API key no .env |
|
|
393
|
+
| Supabase | `supabase` | `init`, `link`, `db push`, `gen types` | `supabase login` |
|
|
394
|
+
| Upstash | `upstash` | `redis create`, `redis get` | `upstash auth login` |
|
|
395
|
+
| PlanetScale | `pscale` | `database create`, `branch create` | `pscale auth login` |
|
|
396
|
+
| GitHub | `gh` | `repo create`, `pr create`, `secret set` | `gh auth login` |
|
|
397
|
+
| Node | `npm`/`pnpm` | `install`, `run build`, `test`, `run dev` | N/A |
|
|
398
|
+
| Xcode | `xcodebuild` | `-project`, `-scheme`, `build`, `test` | N/A |
|
|
399
|
+
| Convex | `npx convex` | `dev`, `deploy`, `env set`, `env get` | `npx convex login` |
|
|
400
|
+
|
|
401
|
+
## Automação de Variáveis de Ambiente
|
|
402
|
+
|
|
403
|
+
**Arquivos env:** Use as ferramentas Write/Edit. Nunca peça ao humano para criar .env manualmente.
|
|
404
|
+
|
|
405
|
+
**Variáveis env do dashboard via CLI:**
|
|
406
|
+
|
|
407
|
+
| Plataforma | Comando CLI | Exemplo |
|
|
408
|
+
|------------|-------------|---------|
|
|
409
|
+
| Convex | `npx convex env set` | `npx convex env set OPENAI_API_KEY sk-...` |
|
|
410
|
+
| Vercel | `vercel env add` | `vercel env add STRIPE_KEY production` |
|
|
411
|
+
| Railway | `railway variables set` | `railway variables set API_KEY=value` |
|
|
412
|
+
| Fly | `fly secrets set` | `fly secrets set DATABASE_URL=...` |
|
|
413
|
+
| Supabase | `supabase secrets set` | `supabase secrets set MY_SECRET=value` |
|
|
414
|
+
|
|
415
|
+
**Padrão de coleta de secrets:**
|
|
416
|
+
```xml
|
|
417
|
+
<!-- ERRADO: Pedir ao usuário para adicionar env vars no dashboard -->
|
|
418
|
+
<task type="checkpoint:human-action">
|
|
419
|
+
<action>Add OPENAI_API_KEY to Convex dashboard</action>
|
|
420
|
+
<instructions>Go to dashboard.convex.dev → Settings → Environment Variables → Add</instructions>
|
|
421
|
+
</task>
|
|
422
|
+
|
|
423
|
+
<!-- CERTO: Claude pede o valor, depois adiciona via CLI -->
|
|
424
|
+
<task type="checkpoint:human-action">
|
|
425
|
+
<action>Forneça sua chave de API do OpenAI</action>
|
|
426
|
+
<instructions>
|
|
427
|
+
Preciso da sua chave de API do OpenAI para o backend Convex.
|
|
428
|
+
Obtenha em: https://platform.openai.com/api-keys
|
|
429
|
+
Cole a chave (começa com sk-)
|
|
430
|
+
</instructions>
|
|
431
|
+
<verification>Vou adicioná-la via `npx convex env set` e verificar</verification>
|
|
432
|
+
<resume-signal>Cole sua chave de API</resume-signal>
|
|
433
|
+
</task>
|
|
434
|
+
|
|
435
|
+
<task type="auto">
|
|
436
|
+
<name>Configure OpenAI key in Convex</name>
|
|
437
|
+
<action>Run `npx convex env set OPENAI_API_KEY {user-provided-key}`</action>
|
|
438
|
+
<verify>`npx convex env get OPENAI_API_KEY` returns the key (masked)</verify>
|
|
439
|
+
</task>
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
## Automação de Dev Server
|
|
443
|
+
|
|
444
|
+
| Framework | Comando de Início | Sinal de Pronto | URL Padrão |
|
|
445
|
+
|-----------|-------------------|-----------------|------------|
|
|
446
|
+
| Next.js | `npm run dev` | "Ready in" ou "started server" | http://localhost:3000 |
|
|
447
|
+
| Vite | `npm run dev` | "ready in" | http://localhost:5173 |
|
|
448
|
+
| Convex | `npx convex dev` | "Convex functions ready" | N/A (somente backend) |
|
|
449
|
+
| Express | `npm start` | "listening on port" | http://localhost:3000 |
|
|
450
|
+
| Django | `python manage.py runserver` | "Starting development server" | http://localhost:8000 |
|
|
451
|
+
|
|
452
|
+
**Ciclo de vida do servidor:**
|
|
453
|
+
```bash
|
|
454
|
+
# Run in background, capture PID
|
|
455
|
+
npm run dev &
|
|
456
|
+
DEV_SERVER_PID=$!
|
|
457
|
+
|
|
458
|
+
# Wait for ready (max 30s) — uses fetch() for cross-platform compatibility
|
|
459
|
+
timeout 30 bash -c 'until node -e "fetch(\"http://localhost:3000\").then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))" 2>/dev/null; do sleep 1; done'
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Conflitos de porta:** Encerre o processo inativo (`lsof -ti:3000 | xargs kill`) ou use porta alternativa (`--port 3001`).
|
|
463
|
+
|
|
464
|
+
**O servidor permanece rodando** durante os checkpoints. Encerre apenas quando o plano estiver completo, ao mudar para produção ou se a porta for necessária para outro serviço.
|
|
465
|
+
|
|
466
|
+
## Instalação de CLI
|
|
467
|
+
|
|
468
|
+
| CLI | Auto-instalar? | Comando |
|
|
469
|
+
|-----|----------------|---------|
|
|
470
|
+
| npm/pnpm/yarn | Não - pergunte ao usuário | Usuário escolhe o gerenciador de pacotes |
|
|
471
|
+
| vercel | Sim | `npm i -g vercel` |
|
|
472
|
+
| gh (GitHub) | Sim | `brew install gh` (macOS) ou `apt install gh` (Linux) |
|
|
473
|
+
| stripe | Sim | `npm i -g stripe` |
|
|
474
|
+
| supabase | Sim | `npm i -g supabase` |
|
|
475
|
+
| convex | Não - use npx | `npx convex` (sem instalação necessária) |
|
|
476
|
+
| fly | Sim | `brew install flyctl` ou instalador curl |
|
|
477
|
+
| railway | Sim | `npm i -g @railway/cli` |
|
|
478
|
+
|
|
479
|
+
**Protocolo:** Tente o comando → "command not found" → é auto-instalável? → sim: instale silenciosamente, tente novamente → não: checkpoint pedindo ao usuário para instalar.
|
|
480
|
+
|
|
481
|
+
## Falhas de Automação Pré-Checkpoint
|
|
482
|
+
|
|
483
|
+
| Falha | Resposta |
|
|
484
|
+
|-------|----------|
|
|
485
|
+
| Servidor não inicia | Verifique o erro, corrija o problema, tente novamente (não avance para checkpoint) |
|
|
486
|
+
| Porta em uso | Encerre o processo inativo ou use porta alternativa |
|
|
487
|
+
| Dependência ausente | Execute `npm install`, tente novamente |
|
|
488
|
+
| Erro de build | Corrija o erro primeiro (problema de código, não de checkpoint) |
|
|
489
|
+
| Erro de auth | Crie checkpoint de auth gate |
|
|
490
|
+
| Timeout de rede | Tente novamente com backoff, então checkpoint se persistir |
|
|
491
|
+
|
|
492
|
+
**Nunca apresente um checkpoint com ambiente de verificação quebrado.** Se o servidor local não responde, não peça ao usuário para "acessar localhost:3000".
|
|
493
|
+
|
|
494
|
+
> **Nota multiplataforma:** Use `node -e "fetch('http://localhost:3000').then(r=>console.log(r.status))"` em vez de `curl` para health checks. `curl` tem problemas no Windows MSYS/Git Bash por causa de mangling de SSL/path.
|
|
495
|
+
|
|
496
|
+
```xml
|
|
497
|
+
<!-- ERRADO: Checkpoint com ambiente quebrado -->
|
|
498
|
+
<task type="checkpoint:human-verify">
|
|
499
|
+
<what-built>Dashboard (servidor falhou ao iniciar)</what-built>
|
|
500
|
+
<how-to-verify>Acesse http://localhost:3000...</how-to-verify>
|
|
501
|
+
</task>
|
|
502
|
+
|
|
503
|
+
<!-- CERTO: Corrija primeiro, depois o checkpoint -->
|
|
504
|
+
<task type="auto">
|
|
505
|
+
<name>Fix server startup issue</name>
|
|
506
|
+
<action>Investigate error, fix root cause, restart server</action>
|
|
507
|
+
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
508
|
+
</task>
|
|
509
|
+
|
|
510
|
+
<task type="checkpoint:human-verify">
|
|
511
|
+
<what-built>Dashboard - servidor rodando em http://localhost:3000</what-built>
|
|
512
|
+
<how-to-verify>Acesse http://localhost:3000/dashboard...</how-to-verify>
|
|
513
|
+
</task>
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Referência Rápida de Automatizável
|
|
517
|
+
|
|
518
|
+
| Ação | Automatizável? | Claude faz? |
|
|
519
|
+
|------|----------------|-------------|
|
|
520
|
+
| Deploy para Vercel | Sim (`vercel`) | SIM |
|
|
521
|
+
| Criar webhook no Stripe | Sim (API) | SIM |
|
|
522
|
+
| Escrever arquivo .env | Sim (ferramenta Write) | SIM |
|
|
523
|
+
| Criar DB no Upstash | Sim (`upstash`) | SIM |
|
|
524
|
+
| Rodar testes | Sim (`npm test`) | SIM |
|
|
525
|
+
| Iniciar dev server | Sim (`npm run dev`) | SIM |
|
|
526
|
+
| Adicionar env vars no Convex | Sim (`npx convex env set`) | SIM |
|
|
527
|
+
| Adicionar env vars no Vercel | Sim (`vercel env add`) | SIM |
|
|
528
|
+
| Popular banco de dados | Sim (CLI/API) | SIM |
|
|
529
|
+
| Clicar link de verificação por e-mail | Não | NÃO |
|
|
530
|
+
| Inserir cartão de crédito com 3DS | Não | NÃO |
|
|
531
|
+
| Completar OAuth no navegador | Não | NÃO |
|
|
532
|
+
| Verificar visualmente se a UI está correta | Não | NÃO |
|
|
533
|
+
| Testar fluxos interativos de usuário | Não | NÃO |
|
|
534
|
+
|
|
535
|
+
</automation_reference>
|
|
536
|
+
|
|
537
|
+
<writing_guidelines>
|
|
538
|
+
|
|
539
|
+
**FAÇA:**
|
|
540
|
+
- Automatize tudo via CLI/API antes do checkpoint
|
|
541
|
+
- Seja específico: "Acesse https://myapp.vercel.app" em vez de "verifique o deploy"
|
|
542
|
+
- Numere os passos de verificação
|
|
543
|
+
- Declare os resultados esperados: "Você deve ver X"
|
|
544
|
+
- Forneça contexto: por que esse checkpoint existe
|
|
545
|
+
|
|
546
|
+
**NÃO FAÇA:**
|
|
547
|
+
- Pedir ao humano para fazer trabalho que Claude pode automatizar ❌
|
|
548
|
+
- Assumir conhecimento: "Configure as configurações usuais" ❌
|
|
549
|
+
- Pular etapas: "Configure o banco de dados" (muito vago) ❌
|
|
550
|
+
- Misturar múltiplas verificações em um único checkpoint ❌
|
|
551
|
+
|
|
552
|
+
**Posicionamento:**
|
|
553
|
+
- **Após a automação ser concluída** - não antes de Claude fazer o trabalho
|
|
554
|
+
- **Após construção de UI** - antes de declarar a fase completa
|
|
555
|
+
- **Antes do trabalho dependente** - decisões antes da implementação
|
|
556
|
+
- **Em pontos de integração** - após configurar serviços externos
|
|
557
|
+
|
|
558
|
+
**Posicionamento ruim:** Antes da automação ❌ | Muito frequente ❌ | Tarde demais (tarefas dependentes já precisavam do resultado) ❌
|
|
559
|
+
</writing_guidelines>
|
|
560
|
+
|
|
561
|
+
<examples>
|
|
562
|
+
|
|
563
|
+
### Exemplo 1: Configuração de Banco de Dados (Sem Checkpoint Necessário)
|
|
564
|
+
|
|
565
|
+
```xml
|
|
566
|
+
<task type="auto">
|
|
567
|
+
<name>Create Upstash Redis database</name>
|
|
568
|
+
<files>.env</files>
|
|
569
|
+
<action>
|
|
570
|
+
1. Run `upstash redis create myapp-cache --region us-east-1`
|
|
571
|
+
2. Capture connection URL from output
|
|
572
|
+
3. Write to .env: UPSTASH_REDIS_URL={url}
|
|
573
|
+
4. Verify connection with test command
|
|
574
|
+
</action>
|
|
575
|
+
<verify>
|
|
576
|
+
- upstash redis list shows database
|
|
577
|
+
- .env contains UPSTASH_REDIS_URL
|
|
578
|
+
- Test connection succeeds
|
|
579
|
+
</verify>
|
|
580
|
+
<done>Redis database created and configured</done>
|
|
581
|
+
</task>
|
|
582
|
+
|
|
583
|
+
<!-- SEM CHECKPOINT NECESSÁRIO - Claude automatizou tudo e verificou programaticamente -->
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Exemplo 2: Fluxo Completo de Auth (Único checkpoint ao final)
|
|
587
|
+
|
|
588
|
+
```xml
|
|
589
|
+
<task type="auto">
|
|
590
|
+
<name>Create user schema</name>
|
|
591
|
+
<files>src/db/schema.ts</files>
|
|
592
|
+
<action>Define User, Session, Account tables with Drizzle ORM</action>
|
|
593
|
+
<verify>npm run db:generate succeeds</verify>
|
|
594
|
+
</task>
|
|
595
|
+
|
|
596
|
+
<task type="auto">
|
|
597
|
+
<name>Create auth API routes</name>
|
|
598
|
+
<files>src/app/api/auth/[...nextauth]/route.ts</files>
|
|
599
|
+
<action>Set up NextAuth with GitHub provider, JWT strategy</action>
|
|
600
|
+
<verify>TypeScript compiles, no errors</verify>
|
|
601
|
+
</task>
|
|
602
|
+
|
|
603
|
+
<task type="auto">
|
|
604
|
+
<name>Create login UI</name>
|
|
605
|
+
<files>src/app/login/page.tsx, src/components/LoginButton.tsx</files>
|
|
606
|
+
<action>Create login page with GitHub OAuth button</action>
|
|
607
|
+
<verify>npm run build succeeds</verify>
|
|
608
|
+
</task>
|
|
609
|
+
|
|
610
|
+
<task type="auto">
|
|
611
|
+
<name>Start dev server for auth testing</name>
|
|
612
|
+
<action>Run `npm run dev` in background, wait for ready signal</action>
|
|
613
|
+
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
614
|
+
<done>Dev server running at http://localhost:3000</done>
|
|
615
|
+
</task>
|
|
616
|
+
|
|
617
|
+
<!-- UM checkpoint ao final verifica o fluxo completo -->
|
|
618
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
619
|
+
<what-built>Fluxo completo de autenticação - dev server rodando em http://localhost:3000</what-built>
|
|
620
|
+
<how-to-verify>
|
|
621
|
+
1. Acesse: http://localhost:3000/login
|
|
622
|
+
2. Clique em "Sign in with GitHub"
|
|
623
|
+
3. Complete o fluxo OAuth do GitHub
|
|
624
|
+
4. Verifique: Redirecionado para /dashboard, nome do usuário exibido
|
|
625
|
+
5. Atualize a página: Sessão persiste
|
|
626
|
+
6. Clique em logout: Sessão encerrada
|
|
627
|
+
</how-to-verify>
|
|
628
|
+
<resume-signal>Digite "aprovado" ou descreva problemas</resume-signal>
|
|
629
|
+
</task>
|
|
630
|
+
```
|
|
631
|
+
</examples>
|
|
632
|
+
|
|
633
|
+
<anti_patterns>
|
|
634
|
+
|
|
635
|
+
### ❌ RUIM: Pedir ao usuário para iniciar o dev server
|
|
636
|
+
|
|
637
|
+
```xml
|
|
638
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
639
|
+
<what-built>Dashboard component</what-built>
|
|
640
|
+
<how-to-verify>
|
|
641
|
+
1. Run: npm run dev
|
|
642
|
+
2. Visit: http://localhost:3000/dashboard
|
|
643
|
+
3. Check layout is correct
|
|
644
|
+
</how-to-verify>
|
|
645
|
+
</task>
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
**Por que é ruim:** Claude pode executar `npm run dev`. O usuário deve apenas acessar URLs, não executar comandos.
|
|
649
|
+
|
|
650
|
+
### ✅ BOM: Claude inicia o servidor, usuário acessa
|
|
651
|
+
|
|
652
|
+
```xml
|
|
653
|
+
<task type="auto">
|
|
654
|
+
<name>Start dev server</name>
|
|
655
|
+
<action>Run `npm run dev` in background</action>
|
|
656
|
+
<verify>fetch http://localhost:3000 returns 200</verify>
|
|
657
|
+
</task>
|
|
658
|
+
|
|
659
|
+
<task type="checkpoint:human-verify" gate="blocking">
|
|
660
|
+
<what-built>Dashboard em http://localhost:3000/dashboard (servidor rodando)</what-built>
|
|
661
|
+
<how-to-verify>
|
|
662
|
+
Acesse http://localhost:3000/dashboard e verifique:
|
|
663
|
+
1. Layout corresponde ao design
|
|
664
|
+
2. Sem erros no console
|
|
665
|
+
</how-to-verify>
|
|
666
|
+
</task>
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
### ❌ RUIM: Pedir ao humano para fazer deploy / ✅ BOM: Claude automatiza
|
|
670
|
+
|
|
671
|
+
```xml
|
|
672
|
+
<!-- RUIM: Pedir ao usuário para fazer deploy via dashboard -->
|
|
673
|
+
<task type="checkpoint:human-action" gate="blocking">
|
|
674
|
+
<action>Deploy to Vercel</action>
|
|
675
|
+
<instructions>Visit vercel.com/new → Import repo → Click Deploy → Copy URL</instructions>
|
|
676
|
+
</task>
|
|
677
|
+
|
|
678
|
+
<!-- BOM: Claude faz o deploy, usuário verifica -->
|
|
679
|
+
<task type="auto">
|
|
680
|
+
<name>Deploy to Vercel</name>
|
|
681
|
+
<action>Run `vercel --yes`. Capture URL.</action>
|
|
682
|
+
<verify>vercel ls shows deployment, fetch returns 200</verify>
|
|
683
|
+
</task>
|
|
684
|
+
|
|
685
|
+
<task type="checkpoint:human-verify">
|
|
686
|
+
<what-built>Deploy realizado em {url}</what-built>
|
|
687
|
+
<how-to-verify>Acesse {url}, verifique se a homepage carrega</how-to-verify>
|
|
688
|
+
<resume-signal>Digite "aprovado"</resume-signal>
|
|
689
|
+
</task>
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
### ❌ RUIM: Muitos checkpoints / ✅ BOM: Checkpoint único
|
|
693
|
+
|
|
694
|
+
```xml
|
|
695
|
+
<!-- RUIM: Checkpoint após cada tarefa -->
|
|
696
|
+
<task type="auto">Create schema</task>
|
|
697
|
+
<task type="checkpoint:human-verify">Check schema</task>
|
|
698
|
+
<task type="auto">Create API route</task>
|
|
699
|
+
<task type="checkpoint:human-verify">Check API</task>
|
|
700
|
+
<task type="auto">Create UI form</task>
|
|
701
|
+
<task type="checkpoint:human-verify">Check form</task>
|
|
702
|
+
|
|
703
|
+
<!-- BOM: Um checkpoint ao final -->
|
|
704
|
+
<task type="auto">Create schema</task>
|
|
705
|
+
<task type="auto">Create API route</task>
|
|
706
|
+
<task type="auto">Create UI form</task>
|
|
707
|
+
|
|
708
|
+
<task type="checkpoint:human-verify">
|
|
709
|
+
<what-built>Fluxo completo de auth (schema + API + UI)</what-built>
|
|
710
|
+
<how-to-verify>Teste o fluxo completo: cadastro, login, acesso à página protegida</how-to-verify>
|
|
711
|
+
<resume-signal>Digite "aprovado"</resume-signal>
|
|
712
|
+
</task>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
### ❌ RUIM: Verificação vaga / ✅ BOM: Passos específicos
|
|
716
|
+
|
|
717
|
+
```xml
|
|
718
|
+
<!-- RUIM -->
|
|
719
|
+
<task type="checkpoint:human-verify">
|
|
720
|
+
<what-built>Dashboard</what-built>
|
|
721
|
+
<how-to-verify>Verifique se funciona</how-to-verify>
|
|
722
|
+
</task>
|
|
723
|
+
|
|
724
|
+
<!-- BOM -->
|
|
725
|
+
<task type="checkpoint:human-verify">
|
|
726
|
+
<what-built>Dashboard responsivo - servidor rodando em http://localhost:3000</what-built>
|
|
727
|
+
<how-to-verify>
|
|
728
|
+
Acesse http://localhost:3000/dashboard e verifique:
|
|
729
|
+
1. Desktop (>1024px): Sidebar visível, área de conteúdo preenche o espaço restante
|
|
730
|
+
2. Tablet (768px): Sidebar colapsa para ícones
|
|
731
|
+
3. Mobile (375px): Sidebar oculta, menu hambúrguer no header
|
|
732
|
+
4. Sem scroll horizontal em nenhum tamanho
|
|
733
|
+
</how-to-verify>
|
|
734
|
+
<resume-signal>Digite "aprovado" ou descreva problemas de layout</resume-signal>
|
|
735
|
+
</task>
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### ❌ RUIM: Pedir ao usuário para executar comandos CLI
|
|
739
|
+
|
|
740
|
+
```xml
|
|
741
|
+
<task type="checkpoint:human-action">
|
|
742
|
+
<action>Run database migrations</action>
|
|
743
|
+
<instructions>Run: npx prisma migrate deploy && npx prisma db seed</instructions>
|
|
744
|
+
</task>
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
**Por que é ruim:** Claude pode executar esses comandos. O usuário nunca deve executar comandos CLI.
|
|
748
|
+
|
|
749
|
+
### ❌ RUIM: Pedir ao usuário para copiar valores entre serviços
|
|
750
|
+
|
|
751
|
+
```xml
|
|
752
|
+
<task type="checkpoint:human-action">
|
|
753
|
+
<action>Configure webhook URL in Stripe</action>
|
|
754
|
+
<instructions>Copy deployment URL → Stripe Dashboard → Webhooks → Add endpoint → Copy secret → Add to .env</instructions>
|
|
755
|
+
</task>
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
**Por que é ruim:** O Stripe tem uma API. Claude deve criar o webhook via API e escrever no .env diretamente.
|
|
759
|
+
|
|
760
|
+
</anti_patterns>
|
|
761
|
+
|
|
762
|
+
<summary>
|
|
763
|
+
|
|
764
|
+
Checkpoints formalizam pontos de human-in-the-loop para verificação e decisões, não trabalho manual.
|
|
765
|
+
|
|
766
|
+
**A regra de ouro:** Se Claude PODE automatizar, Claude DEVE automatizar.
|
|
767
|
+
|
|
768
|
+
**Prioridade de checkpoints:**
|
|
769
|
+
1. **checkpoint:human-verify** (90%) - Claude automatizou tudo, humano confirma correção visual/funcional
|
|
770
|
+
2. **checkpoint:decision** (9%) - Humano faz escolhas arquiteturais/tecnológicas
|
|
771
|
+
3. **checkpoint:human-action** (1%) - Passos manuais verdadeiramente inevitáveis sem API/CLI
|
|
772
|
+
|
|
773
|
+
**Quando NÃO usar checkpoints:**
|
|
774
|
+
- Coisas que Claude pode verificar programaticamente (testes, builds)
|
|
775
|
+
- Operações de arquivo (Claude pode ler arquivos)
|
|
776
|
+
- Correção de código (testes e análise estática)
|
|
777
|
+
- Qualquer coisa automatizável via CLI/API
|
|
778
|
+
</summary>
|