sedd 0.1.7 → 0.1.8

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/README.md CHANGED
@@ -18,6 +18,19 @@
18
18
 
19
19
  ---
20
20
 
21
+ ## Para que serve o SEDD?
22
+
23
+ SEDD é ideal para:
24
+
25
+ | Caso de Uso | Descrição |
26
+ |-------------|-----------|
27
+ | **Features** | Novas funcionalidades com requisitos claros |
28
+ | **Projetos** | Projetos completos com múltiplas entregas |
29
+ | **Investigação** | Análise de código existente com estimativas |
30
+ | **Melhorias** | Refatorações e otimizações planejadas |
31
+
32
+ ---
33
+
21
34
  ## Quick Start
22
35
 
23
36
  ```bash
@@ -179,6 +192,123 @@ Criar migration de follow-up? [Y/n]
179
192
  | `/sedd.implement` | Executar tasks com checkpoints |
180
193
  | `/sedd.implement --all` | Executar tudo sem parar |
181
194
  | `/sedd.dashboard` | Ver status atual de migrations e tasks |
195
+ | `/sedd.estimate` | Estimar prazo e complexidade antes de começar |
196
+ | `/sedd.validate` | Validar implementação contra expectativa |
197
+
198
+ ---
199
+
200
+ ## Fluxo Completo de Uso
201
+
202
+ O SEDD funciona em um ciclo de 4 etapas principais:
203
+
204
+ ```
205
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
206
+ │ ESTIMATE │────▶│ SPECIFY │────▶│ CLARIFY │────▶│ IMPLEMENT │
207
+ │ (Opcional) │ │ │ │ │ │ │
208
+ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
209
+ │ │ │
210
+ │ ▼ ▼
211
+ │ ┌─────────────┐ ┌─────────────┐
212
+ └──────────────────────────────│ CLARIFY │◀────│ VALIDATE │
213
+ │ (repeat) │ │ (ao final) │
214
+ └─────────────┘ └─────────────┘
215
+ ```
216
+
217
+ ### 1. `/sedd.estimate` (Opcional - Antes de Começar)
218
+
219
+ Analisa o projeto e gera estimativa de prazo:
220
+
221
+ ```
222
+ 📊 ESTIMATIVA
223
+
224
+ Total: 16h
225
+ Humano: 4h (25%) ← Decisões, revisão, edge cases
226
+ AI: 12h (75%) ← Boilerplate, implementação
227
+ Complexidade: M (Medium)
228
+ ```
229
+
230
+ ### 2. `/sedd.specify` - Criar Especificação
231
+
232
+ Cria a estrutura inicial da feature com:
233
+ - spec.md (especificação)
234
+ - interfaces.ts (tipos TypeScript)
235
+ - ui-mockups/ (se for UI)
236
+
237
+ ### 3. `/sedd.clarify` - Clarificar e Gerar Tasks
238
+
239
+ Este é o comando mais importante. Ele usa um **modo de discussão flexível**:
240
+
241
+ ```
242
+ 📝 Clarification Session - Migration 001
243
+
244
+ Você pode explicar livremente o que precisa.
245
+ Eu vou anotar tudo e fazer perguntas quando necessário.
246
+
247
+ Comandos disponíveis:
248
+ continue → Continuar explicando
249
+ pergunte → AI faz próxima pergunta
250
+ tasks → Gerar tasks e finalizar
251
+ ```
252
+
253
+ #### Comandos Inline do Clarify
254
+
255
+ | Comando | O que faz | Quando usar |
256
+ |---------|-----------|-------------|
257
+ | `continue` | Permite continuar explicando | Quando você tem mais contexto para adicionar |
258
+ | `pergunte` | AI faz uma pergunta de clarificação | Quando quer que a AI identifique gaps |
259
+ | `tasks` | Gera tasks.md e finaliza | Quando terminou de explicar tudo |
260
+
261
+ **Exemplo de sessão:**
262
+
263
+ ```
264
+ Você: Preciso de um toggle de dark mode que persista
265
+
266
+ AI: ✓ Anotado. Comandos: continue | pergunte | tasks
267
+
268
+ Você: continue
269
+
270
+ AI: Ok, continue explicando...
271
+
272
+ Você: Deve ficar na página de settings, não no header
273
+
274
+ AI: ✓ Anotado: Toggle em settings, não no header
275
+
276
+ Você: pergunte
277
+
278
+ AI: Q1: Como deve ser a persistência?
279
+ A) localStorage (mais simples)
280
+ B) Banco de dados (sincroniza entre dispositivos)
281
+ C) Cookie (SSR-friendly)
282
+
283
+ Você: B, banco de dados
284
+
285
+ AI: ✓ Decisão registrada: Persistência no banco
286
+
287
+ Você: tasks
288
+
289
+ AI: ✅ Gerando 5 tasks...
290
+ 📊 Coverage: 92% 🟢
291
+ ```
292
+
293
+ ### 4. `/sedd.implement` - Executar Tasks
294
+
295
+ Executa as tasks geradas, com validação contra expectativa.
296
+
297
+ ### 5. `/sedd.validate` - Validar ao Final
298
+
299
+ Após implementar, valida se a expectativa foi atendida:
300
+
301
+ ```
302
+ 🔍 VALIDAÇÃO
303
+
304
+ Cobertura: 75% ████████████░░░░
305
+ Tasks: 3/4 completadas
306
+ Arquivos: 5 alterados (+180, -12)
307
+ Gaps: 1 encontrado
308
+
309
+ ⚠️ Gap: "sessions" não coberto
310
+ Criar task de follow-up? [Y/n]
311
+ ```
182
312
 
183
313
  ---
184
314
 
@@ -0,0 +1,231 @@
1
+ # /sedd.estimate - Estimate Task or Project Effort
2
+
3
+ ## Purpose
4
+
5
+ Analyze a feature or project and generate a detailed effort estimation markdown, separating human vs AI effort with complexity ratings.
6
+
7
+ ## Trigger
8
+
9
+ - `/sedd.estimate` - Estimate current feature
10
+ - `/sedd.estimate "feature description"` - Estimate new demand
11
+ - `/sedd.estimate --path src/components` - Investigate specific path
12
+
13
+ ## Pre-flight Checks
14
+
15
+ 1. **Load Configuration**
16
+ ```
17
+ Read sedd.config.json (or use defaults)
18
+ Default specsDir: .sedd
19
+ ```
20
+
21
+ 2. **Check Feature Context**
22
+ - If on feature branch: use that feature
23
+ - If spec.md exists: use existing specification
24
+ - If neither: ask for feature description
25
+
26
+ 3. **Verify SEDD is initialized**
27
+ - Check if specsDir exists
28
+ - If not: suggest `npx sedd init`
29
+
30
+ ## Workflow
31
+
32
+ ### Step 1: Gather Context
33
+
34
+ **OBRIGATÓRIO:** Pergunte ao usuário:
35
+
36
+ ```
37
+ 📁 Para uma análise mais precisa, me envie o path do arquivo principal.
38
+
39
+ 💡 Dica: No seu editor de código, clique com botão direito no arquivo
40
+ e selecione "Copy Relative Path", depois cole aqui.
41
+
42
+ Exemplo: src/components/Dashboard.tsx
43
+ ```
44
+
45
+ ### Step 2: Analyze Project Structure
46
+
47
+ Investigate the codebase:
48
+ - Read spec.md if exists
49
+ - Read interfaces.ts if exists
50
+ - Analyze related files from provided path
51
+ - Identify patterns and dependencies
52
+ - Find similar implementations
53
+
54
+ ### Step 3: Generate Task Breakdown
55
+
56
+ For each identified task:
57
+
58
+ ```typescript
59
+ {
60
+ taskId: "T001-001",
61
+ description: "Create ThemeContext",
62
+ humanHours: 1, // Design decisions, reviews, edge cases
63
+ aiHours: 3, // Boilerplate, patterns, implementation
64
+ confidence: 85, // How confident in this estimate
65
+ complexity: "M", // XS, S, M, L, XL
66
+ risks: ["May need refactoring if theme structure changes"]
67
+ }
68
+ ```
69
+
70
+ ### Step 4: Calculate Totals
71
+
72
+ ```
73
+ Total Hours = Sum of all task hours
74
+ Human Hours = Sum of human-only effort
75
+ AI Hours = Sum of AI-assisted effort
76
+ Complexity = Weighted average of task complexities
77
+ ```
78
+
79
+ **Complexity Mapping:**
80
+ | Size | Hours Range | Description |
81
+ |------|-------------|-------------|
82
+ | XS | 1-2h | Trivial change, single file |
83
+ | S | 2-4h | Simple feature, few files |
84
+ | M | 4-8h | Medium feature, multiple files |
85
+ | L | 8-16h | Large feature, architectural changes |
86
+ | XL | 16h+ | Epic, multiple systems |
87
+
88
+ ### Step 5: Generate estimate.md
89
+
90
+ Create `.sedd/{FEATURE}/estimate.md`:
91
+
92
+ ```markdown
93
+ # Estimativa: {{FEATURE_NAME}}
94
+
95
+ > Gerado: {{TIMESTAMP}}
96
+ > Confiança Média: {{CONFIDENCE}}%
97
+
98
+ ## Resumo Executivo
99
+
100
+ | Métrica | Valor |
101
+ |---------|-------|
102
+ | **Total Estimado** | {{TOTAL}}h |
103
+ | **Esforço Humano** | {{HUMAN}}h |
104
+ | **Esforço AI** | {{AI}}h |
105
+ | **Complexidade** | {{COMPLEXITY}} |
106
+
107
+ ### Distribuição de Esforço
108
+
109
+ ```
110
+ Humano: ████████░░░░░░░░ 25%
111
+ AI: ████████████░░░░ 75%
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Breakdown por Task
117
+
118
+ | Task | Descrição | Humano | AI | Total | Confiança |
119
+ |------|-----------|--------|-----|-------|-----------|
120
+ | T001-001 | Create ThemeContext | 1h | 3h | 4h | 85% |
121
+ | T001-002 | Add toggle component | 0.5h | 1.5h | 2h | 90% |
122
+ | T001-003 | Persist preference | 1h | 2h | 3h | 75% |
123
+
124
+ ---
125
+
126
+ ## Análise de Contexto
127
+
128
+ ### Arquivos Analisados
129
+ - `{{PATH}}` - Arquivo principal investigado
130
+ - `src/related/file.ts` - Dependência identificada
131
+
132
+ ### Padrões Identificados
133
+ - Usa Context API para estado global
134
+ - Segue padrão de Repository para persistência
135
+
136
+ ### Riscos Identificados
137
+ 1. **Risco 1:** Descrição do risco e mitigação
138
+ 2. **Risco 2:** Descrição do risco e mitigação
139
+
140
+ ### Premissas
141
+ - Assumes existing theme system can be extended
142
+ - Assumes localStorage is acceptable for persistence
143
+
144
+ ---
145
+
146
+ ## Notas
147
+
148
+ - Estimativas de AI assumem uso de ferramentas como Claude Code
149
+ - Esforço humano inclui: revisão, decisões de design, edge cases
150
+ - Esforço AI inclui: boilerplate, implementação de padrões, testes
151
+
152
+ ---
153
+
154
+ ## Próximos Passos
155
+
156
+ 1. `/sedd.specify` - Criar especificação formal (se não existir)
157
+ 2. `/sedd.clarify` - Detalhar requisitos e gerar tasks
158
+ 3. `/sedd.implement` - Executar implementação
159
+ ```
160
+
161
+ ### Step 6: Display Summary
162
+
163
+ Show interactive summary:
164
+
165
+ ```
166
+ 📊 ESTIMATIVA GERADA
167
+
168
+ ┌─────────────────────────────────────┐
169
+ │ Feature: Dark Mode Toggle │
170
+ ├─────────────────────────────────────┤
171
+ │ Total: 16h │
172
+ │ Humano: 4h (25%) │
173
+ │ AI: 12h (75%) │
174
+ │ Complexidade: M (Medium) │
175
+ │ Confiança: 82% │
176
+ └─────────────────────────────────────┘
177
+
178
+ 📁 Arquivo gerado: .sedd/024-dark-mode/estimate.md
179
+
180
+ Deseja prosseguir para /sedd.clarify? [Y/n]
181
+ ```
182
+
183
+ ## Output
184
+
185
+ 1. **estimate.md** - Markdown com estimativa detalhada
186
+ 2. **_meta.json** - Atualizado com `lastEstimate` timestamp
187
+
188
+ ## Rules
189
+
190
+ - SEMPRE pedir path do arquivo para investigação
191
+ - SEMPRE separar esforço humano vs AI
192
+ - NUNCA estimar sem analisar código existente
193
+ - Confiança < 60% = destacar como incerto
194
+ - Atualizar estimativa se spec.md mudar
195
+
196
+ ## CLI Alternative
197
+
198
+ ```bash
199
+ # Estimate current feature
200
+ sedd estimate
201
+
202
+ # Estimate with specific path
203
+ sedd estimate --path src/components/Theme.tsx
204
+
205
+ # Estimate new demand
206
+ sedd estimate --desc "Add dark mode support"
207
+ ```
208
+
209
+ ## Estimation Guidelines
210
+
211
+ ### Human Effort Includes:
212
+ - Architecture decisions
213
+ - Code review
214
+ - Edge case handling
215
+ - Integration testing
216
+ - Documentation review
217
+ - Debugging complex issues
218
+
219
+ ### AI Effort Includes:
220
+ - Boilerplate code generation
221
+ - Following established patterns
222
+ - Unit test generation
223
+ - Documentation generation
224
+ - Refactoring similar code
225
+ - Standard implementations
226
+
227
+ ### Confidence Levels:
228
+ - **90-100%:** Well-understood, done before
229
+ - **70-89%:** Familiar territory, some unknowns
230
+ - **50-69%:** New area, significant unknowns
231
+ - **Below 50%:** Highly uncertain, needs more investigation