up-cc 0.16.1 → 2.0.1
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 +87 -577
- package/package.json +5 -3
- package/up/CHANGELOG.md +110 -0
- package/up/agents/up-arquiteto.md +95 -39
- package/up/agents/up-auditor.md +218 -0
- package/up/agents/up-executor.md +94 -31
- package/up/agents/up-mapeador-codigo.md +63 -10
- package/up/agents/up-pesquisador.md +278 -0
- package/up/agents/up-revisor.md +249 -0
- package/up/agents/up-sintetizador.md +156 -179
- package/up/agents/up-tester.md +280 -0
- package/up/agents/up-verificador.md +95 -11
- package/up/bin/install.js +182 -19
- package/up/bin/lib/core.cjs +17 -43
- package/up/bin/lib/github.cjs +495 -0
- package/up/bin/lib/multica.cjs +424 -0
- package/up/bin/up-tools.cjs +167 -46
- package/up/commands/auditar.md +66 -0
- package/up/commands/build.md +54 -43
- package/up/commands/depurar.md +1 -1
- package/up/commands/plan.md +52 -38
- package/up/commands/rapido.md +15 -9
- package/up/commands/testar.md +81 -122
- package/up/commands/up.md +106 -0
- package/up/hooks/up-session-start.js +107 -0
- package/up/references/engineering-principles.md +1 -1
- package/up/references/governance-rules.md +5 -5
- package/up/references/production-requirements.md +1 -1
- package/up/references/severity-levels.md +2 -2
- package/up/references/tdd-evidence-types.md +81 -0
- package/up/skills/up-brainstorm/SKILL.md +54 -0
- package/up/skills/up-brainstorm/visual-companion.md +33 -0
- package/up/skills/up-tdd/SKILL.md +39 -0
- package/up/skills/up-verificar-antes-de-concluir/SKILL.md +49 -0
- package/up/skills/usando-up/SKILL.md +26 -0
- package/up/templates/audit-plan.md +3 -3
- package/up/templates/audit-report.md +2 -2
- package/up/templates/design-tokens.md +2 -2
- package/up/workflows/auditar.md +255 -0
- package/up/workflows/build.md +600 -386
- package/up/workflows/dcrv.md +183 -99
- package/up/workflows/governance.md +112 -220
- package/up/workflows/plan.md +169 -399
- package/up/workflows/rapido.md +7 -1
- package/up/workflows/up.md +447 -0
- package/up/agents/up-analista-codigo.md +0 -446
- package/up/agents/up-api-tester.md +0 -405
- package/up/agents/up-architecture-supervisor.md +0 -126
- package/up/agents/up-audit-supervisor.md +0 -83
- package/up/agents/up-auditor-modernidade.md +0 -378
- package/up/agents/up-auditor-performance.md +0 -426
- package/up/agents/up-auditor-ux.md +0 -396
- package/up/agents/up-backend-specialist.md +0 -175
- package/up/agents/up-blind-validator.md +0 -259
- package/up/agents/up-chief-architect.md +0 -184
- package/up/agents/up-chief-engineer.md +0 -202
- package/up/agents/up-chief-operations.md +0 -123
- package/up/agents/up-chief-product.md +0 -103
- package/up/agents/up-chief-quality.md +0 -211
- package/up/agents/up-clone-crawler.md +0 -234
- package/up/agents/up-clone-design-extractor.md +0 -227
- package/up/agents/up-clone-feature-mapper.md +0 -225
- package/up/agents/up-clone-prd-writer.md +0 -169
- package/up/agents/up-clone-verifier.md +0 -227
- package/up/agents/up-code-reviewer.md +0 -229
- package/up/agents/up-consolidador-ideias.md +0 -493
- package/up/agents/up-database-specialist.md +0 -169
- package/up/agents/up-delivery-auditor.md +0 -247
- package/up/agents/up-devops-agent.md +0 -203
- package/up/agents/up-execution-supervisor.md +0 -315
- package/up/agents/up-exhaustive-tester.md +0 -348
- package/up/agents/up-frontend-specialist.md +0 -152
- package/up/agents/up-operations-supervisor.md +0 -94
- package/up/agents/up-pesquisador-mercado.md +0 -350
- package/up/agents/up-pesquisador-projeto.md +0 -358
- package/up/agents/up-planning-auditor.md +0 -284
- package/up/agents/up-planning-supervisor.md +0 -260
- package/up/agents/up-product-analyst.md +0 -192
- package/up/agents/up-product-supervisor.md +0 -83
- package/up/agents/up-project-ceo.md +0 -352
- package/up/agents/up-qa-agent.md +0 -171
- package/up/agents/up-quality-supervisor.md +0 -178
- package/up/agents/up-requirements-validator.md +0 -230
- package/up/agents/up-security-reviewer.md +0 -137
- package/up/agents/up-sintetizador-melhorias.md +0 -407
- package/up/agents/up-system-designer.md +0 -332
- package/up/agents/up-technical-writer.md +0 -188
- package/up/agents/up-verification-supervisor.md +0 -111
- package/up/agents/up-visual-critic.md +0 -358
- package/up/commands/adicionar-fase.md +0 -47
- package/up/commands/adicionar-testes.md +0 -145
- package/up/commands/ajuda.md +0 -176
- package/up/commands/atualizar.md +0 -103
- package/up/commands/clone-builder.md +0 -67
- package/up/commands/configurar.md +0 -219
- package/up/commands/custos.md +0 -67
- package/up/commands/dashboard.md +0 -48
- package/up/commands/discutir-fase.md +0 -35
- package/up/commands/executar-fase.md +0 -40
- package/up/commands/ideias.md +0 -49
- package/up/commands/iniciar.md +0 -31
- package/up/commands/mapear-codigo.md +0 -63
- package/up/commands/melhorias.md +0 -45
- package/up/commands/mobile-first.md +0 -71
- package/up/commands/modo-builder.md +0 -186
- package/up/commands/novo-projeto.md +0 -40
- package/up/commands/onboard.md +0 -69
- package/up/commands/pausar.md +0 -33
- package/up/commands/planejar-fase.md +0 -45
- package/up/commands/progresso.md +0 -33
- package/up/commands/remover-fase.md +0 -34
- package/up/commands/resetar.md +0 -27
- package/up/commands/retomar.md +0 -35
- package/up/commands/saude.md +0 -103
- package/up/commands/ux-tester.md +0 -63
- package/up/commands/verificar-trabalho.md +0 -35
- package/up/workflows/adicionar-fase.md +0 -112
- package/up/workflows/builder-e2e.md +0 -501
- package/up/workflows/builder.md +0 -3419
- package/up/workflows/ceo-intake.md +0 -305
- package/up/workflows/ceo-updates.md +0 -183
- package/up/workflows/clone-builder.md +0 -320
- package/up/workflows/discutir-fase.md +0 -336
- package/up/workflows/executar-fase.md +0 -358
- package/up/workflows/executar-plano.md +0 -659
- package/up/workflows/ideias.md +0 -381
- package/up/workflows/iniciar.md +0 -235
- package/up/workflows/melhorias.md +0 -409
- package/up/workflows/mobile-first.md +0 -692
- package/up/workflows/novo-projeto.md +0 -778
- package/up/workflows/planejar-fase.md +0 -293
- package/up/workflows/progresso.md +0 -226
- package/up/workflows/retomar.md +0 -231
- package/up/workflows/ux-tester.md +0 -526
- package/up/workflows/verificar-trabalho.md +0 -308
package/up/commands/testar.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: up:testar
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[url ou porta] [--
|
|
3
|
+
description: Use quando o usuario quer testar o produto. Loop DCRV unico (detectar-corrigir-reverificar) num passe. Default roda tudo (visual, interacao, API, UX, mobile, E2E). Flags --ux/--mobile/--e2e focam.
|
|
4
|
+
argument-hint: "[url ou porta] [--ux] [--mobile] [--e2e] [--no-fix]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -10,17 +10,24 @@ allowed-tools:
|
|
|
10
10
|
- Grep
|
|
11
11
|
- Bash
|
|
12
12
|
- Task
|
|
13
|
+
- AskUserQuestion
|
|
13
14
|
- mcp__plugin_playwright_playwright__*
|
|
14
15
|
---
|
|
15
16
|
<objective>
|
|
16
|
-
Testar um projeto existente de forma exaustiva. Descobre TODAS as paginas e APIs pelo codigo fonte, roda os
|
|
17
|
+
Testar um projeto existente de forma exaustiva, num loop DCRV unico (Detectar -> Corrigir -> Re-verificar). Descobre TODAS as paginas e APIs pelo codigo fonte, roda os detectores, corrige issues e gera relatorio.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
Funde `/up:testar` (DCRV objetivo) + `/up:ux-tester` (experiencia em 6 dimensoes) + `/up:mobile-first` (responsividade multi-viewport) + `/up:adicionar-testes` (gerar testes unitarios/E2E) + `/up:verificar-trabalho` (gate UAT conversacional).
|
|
19
20
|
|
|
20
|
-
**
|
|
21
|
-
**Diferencial:** Teste objetivo — clica em tudo, testa todo endpoint, verifica visual. Nao opina sobre UX.
|
|
21
|
+
**Default (sem flag): roda TUDO** — visual, interacao, API, UX, mobile e E2E, num passe consolidado.
|
|
22
22
|
|
|
23
|
-
**
|
|
23
|
+
**Flags focam o escopo:**
|
|
24
|
+
- `--ux` — avalia experiencia em 6 dimensoes (clareza, eficiencia, feedback, consistencia, acessibilidade, performance percebida) e melhora.
|
|
25
|
+
- `--mobile` — responsividade em mobile/tablet sem quebrar desktop (desktop e a referencia sagrada; reverte se desktop mudar).
|
|
26
|
+
- `--e2e` — foca em gerar/rodar testes E2E + unitarios (ex-adicionar-testes: classifica TDD/E2E/Pular, gera com RED-GREEN).
|
|
27
|
+
|
|
28
|
+
**Standalone:** funciona em qualquer projeto, qualquer momento. NAO requer `.plano/` nem `/up`.
|
|
29
|
+
|
|
30
|
+
**Output:** `.plano/teste/` com DCRV-REPORT.md, issues resolvidas, screenshots antes/depois.
|
|
24
31
|
</objective>
|
|
25
32
|
|
|
26
33
|
<execution_context>
|
|
@@ -32,13 +39,15 @@ NAO planeja, NAO cria features, NAO faz auditoria de codigo. Apenas TESTA e CORR
|
|
|
32
39
|
$ARGUMENTS
|
|
33
40
|
|
|
34
41
|
**Argumentos opcionais:**
|
|
35
|
-
- URL ou porta: `http://localhost:3000` ou `3000` (default: detecta automaticamente)
|
|
36
|
-
- `--
|
|
37
|
-
- `--
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
**Se
|
|
42
|
+
- URL ou porta: `http://localhost:3000` ou `3000` (default: detecta automaticamente).
|
|
43
|
+
- `--ux` — foca em UX (6 dimensoes).
|
|
44
|
+
- `--mobile` — foca em responsividade. Aceita `--page /rota` pra uma pagina so.
|
|
45
|
+
- `--e2e` — foca em gerar/rodar testes (TDD unitario + E2E browser).
|
|
46
|
+
- `--no-fix` (alias `--report-only`) — apenas relatorio, NAO corrige.
|
|
47
|
+
|
|
48
|
+
**Se nenhuma flag de foco:** roda o DCRV completo (todos os detectores).
|
|
49
|
+
**Se sem argumentos:** detecta stack, sobe dev server, usa porta padrao.
|
|
50
|
+
**Se .plano/ existe:** usa PROJECT.md/REQUIREMENTS.md pra entender fluxos. Senao, descobre tudo pelo codigo.
|
|
42
51
|
</context>
|
|
43
52
|
|
|
44
53
|
<process>
|
|
@@ -48,7 +57,6 @@ $ARGUMENTS
|
|
|
48
57
|
### 1.1 Detectar Stack e Dev Server
|
|
49
58
|
|
|
50
59
|
```bash
|
|
51
|
-
# Detectar stack
|
|
52
60
|
if [ -f package.json ]; then
|
|
53
61
|
node -e "const p=require('./package.json'); console.log(JSON.stringify({name: p.name, scripts: p.scripts, deps: Object.keys(p.dependencies||{}).slice(0,20)}))"
|
|
54
62
|
fi
|
|
@@ -62,10 +70,8 @@ Definir $PORT a partir dos argumentos ou detectar automaticamente.
|
|
|
62
70
|
### 1.2 Subir Dev Server
|
|
63
71
|
|
|
64
72
|
```bash
|
|
65
|
-
# Verificar se ja esta rodando
|
|
66
73
|
curl -s http://localhost:${PORT:-3000} > /dev/null 2>&1
|
|
67
74
|
if [ $? -ne 0 ]; then
|
|
68
|
-
# Detectar comando de dev
|
|
69
75
|
if [ -f package.json ]; then
|
|
70
76
|
npm run dev > /tmp/up-testar-server.log 2>&1 &
|
|
71
77
|
TESTAR_DEV_PID=$!
|
|
@@ -73,8 +79,6 @@ if [ $? -ne 0 ]; then
|
|
|
73
79
|
python manage.py runserver > /tmp/up-testar-server.log 2>&1 &
|
|
74
80
|
TESTAR_DEV_PID=$!
|
|
75
81
|
fi
|
|
76
|
-
|
|
77
|
-
# Esperar ficar pronto (max 30s)
|
|
78
82
|
for i in $(seq 1 30); do
|
|
79
83
|
curl -s http://localhost:${PORT:-3000} > /dev/null 2>&1 && break
|
|
80
84
|
sleep 1
|
|
@@ -88,164 +92,135 @@ Se nao subir: ERRO — informar usuario.
|
|
|
88
92
|
|
|
89
93
|
```bash
|
|
90
94
|
echo "=== Descobrindo paginas ==="
|
|
91
|
-
|
|
92
95
|
# Next.js App Router
|
|
93
96
|
find app -name "page.tsx" -o -name "page.ts" 2>/dev/null | grep -v node_modules | sort
|
|
94
|
-
|
|
95
97
|
# Next.js Pages Router
|
|
96
98
|
find pages -name "*.tsx" -o -name "*.ts" 2>/dev/null | grep -v node_modules | grep -v "_app\|_document\|api/" | sort
|
|
97
|
-
|
|
98
|
-
# React Router (Vite/CRA) — extrair paths
|
|
99
|
+
# React Router (Vite/CRA)
|
|
99
100
|
grep -rn "path:" src/ --include="*.tsx" --include="*.ts" --include="*.jsx" --include="*.js" 2>/dev/null | grep -v node_modules | head -30
|
|
100
|
-
|
|
101
101
|
# Python (Django)
|
|
102
102
|
grep -rn "path(" */urls.py 2>/dev/null | head -20
|
|
103
|
-
|
|
104
103
|
# Python (FastAPI) com templates
|
|
105
104
|
grep -rn "templates.TemplateResponse\|return.*html" . --include="*.py" 2>/dev/null | head -20
|
|
106
105
|
```
|
|
107
106
|
|
|
108
|
-
Converter caminhos de arquivo para URLs
|
|
109
|
-
- `app/page.tsx` → `/`
|
|
110
|
-
- `app/dashboard/page.tsx` → `/dashboard`
|
|
111
|
-
- `app/settings/[tab]/page.tsx` → `/settings/general` (usar primeiro valor provavel)
|
|
112
|
-
- `pages/about.tsx` → `/about`
|
|
113
|
-
|
|
114
|
-
Montar lista `$ROUTES_UI`.
|
|
107
|
+
Converter caminhos de arquivo para URLs e montar lista `$ROUTES_UI`.
|
|
115
108
|
|
|
116
109
|
### 1.4 Descobrir TODAS as APIs
|
|
117
110
|
|
|
118
111
|
```bash
|
|
119
112
|
echo "=== Descobrindo APIs ==="
|
|
120
|
-
|
|
121
113
|
# Next.js App Router API routes
|
|
122
114
|
find app -path "*/api/*" -name "route.ts" -o -name "route.js" 2>/dev/null | grep -v node_modules | sort
|
|
123
|
-
|
|
124
|
-
# Para cada route.ts, extrair metodos exportados
|
|
125
115
|
for route in $(find app -path "*/api/*" -name "route.ts" 2>/dev/null); do
|
|
126
116
|
methods=$(grep -oE "export.*(async )?(function )?(GET|POST|PUT|PATCH|DELETE)" "$route" | grep -oE "GET|POST|PUT|PATCH|DELETE")
|
|
127
117
|
echo "$route: $methods"
|
|
128
118
|
done
|
|
129
|
-
|
|
130
119
|
# Next.js Pages Router API
|
|
131
120
|
find pages/api -name "*.ts" -o -name "*.js" 2>/dev/null | sort
|
|
132
|
-
|
|
133
121
|
# Express/Fastify
|
|
134
122
|
grep -rn "app\.\(get\|post\|put\|patch\|delete\)\|router\.\(get\|post\|put\|patch\|delete\)" src/ --include="*.ts" --include="*.js" 2>/dev/null | head -30
|
|
135
|
-
|
|
136
123
|
# FastAPI (Python)
|
|
137
124
|
grep -rn "@app\.\(get\|post\|put\|patch\|delete\)\|@router\.\(get\|post\|put\|patch\|delete\)" . --include="*.py" 2>/dev/null | head -30
|
|
138
|
-
|
|
139
125
|
# tRPC
|
|
140
126
|
grep -rn "\.query\|\.mutation" src/ --include="*.ts" 2>/dev/null | grep -i "router\|procedure" | head -20
|
|
141
|
-
|
|
142
127
|
# Supabase Edge Functions
|
|
143
128
|
ls supabase/functions/*/index.ts 2>/dev/null
|
|
144
129
|
```
|
|
145
130
|
|
|
146
131
|
Montar lista `$ROUTES_API` com metodo + path.
|
|
147
132
|
|
|
148
|
-
### 1.5
|
|
133
|
+
### 1.5 Parsear Flags e Definir Escopo
|
|
134
|
+
|
|
135
|
+
- `--ux` -> SCOPE inclui auditoria de experiencia (6 dimensoes).
|
|
136
|
+
- `--mobile` -> SCOPE inclui responsividade multi-viewport (aceita `--page /rota`).
|
|
137
|
+
- `--e2e` -> SCOPE inclui geracao/execucao de testes (TDD unitario + E2E browser).
|
|
138
|
+
- **Nenhuma flag de foco** -> SCOPE = TUDO (visual + interacao + API + UX + mobile + E2E).
|
|
139
|
+
- `--no-fix`/`--report-only` -> AUTO_FIX=false.
|
|
140
|
+
|
|
141
|
+
### 1.6 Reportar Descoberta e Criar Diretorio
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
mkdir -p .plano/teste
|
|
145
|
+
```
|
|
149
146
|
|
|
150
147
|
```
|
|
151
148
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
152
149
|
UP > TESTAR — DESCOBERTA COMPLETA
|
|
153
150
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Stack: [Next.js / Vite / FastAPI / etc.]
|
|
157
|
-
Dev server: http://localhost:{PORT}
|
|
158
|
-
|
|
159
|
-
Paginas encontradas: {N}
|
|
160
|
-
[lista de URLs]
|
|
161
|
-
|
|
162
|
-
APIs encontradas: {N}
|
|
163
|
-
[lista de METHOD /path]
|
|
164
|
-
|
|
165
|
-
Detectores a rodar:
|
|
166
|
-
[x] Visual Critic ({N} paginas × 3 viewports)
|
|
167
|
-
[x] Exhaustive Tester ({N} paginas, todos elementos)
|
|
168
|
-
[x] API Tester ({N} endpoints, bateria completa)
|
|
169
|
-
|
|
151
|
+
Projeto: [nome] Stack: [...] Dev server: http://localhost:{PORT}
|
|
152
|
+
Paginas: {N} APIs: {N} Escopo: [tudo | ux | mobile | e2e]
|
|
170
153
|
Iniciando testes...
|
|
171
154
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
155
|
```
|
|
173
156
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
mkdir -p .plano/teste
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Passo 2: Rodar DCRV Global
|
|
157
|
+
## Passo 2: Rodar DCRV
|
|
181
158
|
|
|
182
159
|
**Referencia:** `@~/.claude/up/workflows/dcrv.md`
|
|
183
160
|
|
|
184
|
-
|
|
185
|
-
- Se `--no-fix` ou `--report-only`: AUTO_FIX=false
|
|
186
|
-
- Senao: AUTO_FIX=true
|
|
187
|
-
|
|
188
|
-
Executar workflow DCRV com parametros:
|
|
161
|
+
Executar o workflow DCRV com:
|
|
189
162
|
```
|
|
190
163
|
SCOPE=global
|
|
191
|
-
PORT={porta
|
|
164
|
+
PORT={porta}
|
|
192
165
|
MAX_CYCLES=3
|
|
193
166
|
MAX_ISSUES_PER_CYCLE=20
|
|
194
|
-
AUTO_FIX={true ou false
|
|
195
|
-
ROUTES_UI={
|
|
196
|
-
ROUTES_API={
|
|
167
|
+
AUTO_FIX={true ou false}
|
|
168
|
+
ROUTES_UI={paginas}
|
|
169
|
+
ROUTES_API={APIs}
|
|
197
170
|
DCRV_DIR=.plano/teste
|
|
171
|
+
PASSES={derivado das flags: visual, interacao, api sempre; ux se --ux ou default; mobile se --mobile ou default; e2e se --e2e ou default}
|
|
198
172
|
```
|
|
199
173
|
|
|
200
|
-
O DCRV cuida de:
|
|
201
|
-
1.
|
|
202
|
-
2.
|
|
203
|
-
3.
|
|
204
|
-
4.
|
|
205
|
-
5.
|
|
206
|
-
6.
|
|
207
|
-
7.
|
|
174
|
+
O DCRV (workflow unico, ja absorveu ux-tester / mobile-first / builder-e2e) cuida de:
|
|
175
|
+
1. Visual em todas paginas (3 viewports, CSS extraction, screenshots)
|
|
176
|
+
2. API Tester (happy path, payloads invalidos, auth, edge cases)
|
|
177
|
+
3. Exhaustive Tester (clicar em CADA elemento)
|
|
178
|
+
4. UX (6 dimensoes) — quando no escopo
|
|
179
|
+
5. Mobile (responsividade, desktop sagrado) — quando no escopo
|
|
180
|
+
6. E2E + geracao de testes (TDD/E2E classificados, RED-GREEN) — quando no escopo
|
|
181
|
+
7. Consolidar issues -> se AUTO_FIX: dispatcher roteia pra correcao -> re-verificar -> loop ate resolver ou max ciclos
|
|
208
182
|
|
|
209
183
|
## Passo 3: Carregar Design Tokens (se existir)
|
|
210
184
|
|
|
211
185
|
```bash
|
|
212
|
-
# Checar se projeto tem design tokens definidos
|
|
213
186
|
cat .plano/DESIGN-TOKENS.md 2>/dev/null
|
|
214
|
-
# Ou inferir do Tailwind config
|
|
215
187
|
cat tailwind.config.ts tailwind.config.js 2>/dev/null | head -50
|
|
216
|
-
# Ou de globals.css
|
|
217
188
|
cat app/globals.css src/globals.css styles/globals.css 2>/dev/null | head -50
|
|
218
189
|
```
|
|
219
190
|
|
|
220
|
-
Passar como referencia para
|
|
191
|
+
Passar como referencia para os detectores visuais.
|
|
192
|
+
|
|
193
|
+
## Passo 4: Gate UAT (ex-verificar-trabalho)
|
|
221
194
|
|
|
222
|
-
|
|
195
|
+
Se `.plano/` tem fase ativa com plano, rodar gate UAT conversacional:
|
|
196
|
+
- Testar cada feature planejada contra REQUIREMENTS.
|
|
197
|
+
- Coletar feedback do usuario via AskUserQuestion.
|
|
198
|
+
- Gerar/atualizar `VERIFICATION.md` na pasta da fase.
|
|
199
|
+
- Se gaps: oferecer `/up:plan <fase> --gaps` pra planejar correcoes.
|
|
200
|
+
- Se aprovado: marcar a fase como verificada.
|
|
201
|
+
|
|
202
|
+
## Passo 5: Cleanup
|
|
223
203
|
|
|
224
204
|
```bash
|
|
225
|
-
|
|
226
|
-
if [ -n "$TESTAR_DEV_PID" ]; then
|
|
227
|
-
kill $TESTAR_DEV_PID 2>/dev/null
|
|
228
|
-
fi
|
|
205
|
+
if [ -n "$TESTAR_DEV_PID" ]; then kill $TESTAR_DEV_PID 2>/dev/null; fi
|
|
229
206
|
```
|
|
230
|
-
|
|
231
207
|
Fechar browser se aberto.
|
|
232
208
|
|
|
233
|
-
## Passo
|
|
209
|
+
## Passo 6: Apresentar Resultado
|
|
234
210
|
|
|
235
211
|
```
|
|
236
212
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
237
213
|
UP > TESTE COMPLETO
|
|
238
214
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
239
215
|
|
|
240
|
-
## Scores
|
|
241
|
-
|
|
242
216
|
| Detector | Score | Detalhes |
|
|
243
217
|
|----------|-------|----------|
|
|
244
|
-
| Visual
|
|
245
|
-
| Interacao | {N}% pass | {passed}/{total} elementos
|
|
246
|
-
| API
|
|
247
|
-
|
|
248
|
-
|
|
218
|
+
| Visual | {N}/10 | {issues} em {paginas} paginas |
|
|
219
|
+
| Interacao | {N}% pass | {passed}/{total} elementos |
|
|
220
|
+
| API | {N}% pass | {passed}/{total} testes |
|
|
221
|
+
| UX | {N}/10 | (se no escopo) |
|
|
222
|
+
| Mobile | {N}/10 | (se no escopo) |
|
|
223
|
+
| E2E | {M} testes | {pass}/{total} (se no escopo) |
|
|
249
224
|
|
|
250
225
|
| Severidade | Encontradas | Corrigidas | Pendentes |
|
|
251
226
|
|-----------|-------------|-----------|-----------|
|
|
@@ -254,20 +229,7 @@ Fechar browser se aberto.
|
|
|
254
229
|
| Medium | {N} | {N} | {N} |
|
|
255
230
|
| Low | {N} | — | {N} |
|
|
256
231
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
[Lista das issues nao corrigidas com descricao]
|
|
260
|
-
|
|
261
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
262
|
-
|
|
263
|
-
Relatorio completo: .plano/teste/DCRV-REPORT.md
|
|
264
|
-
Screenshots: .plano/teste/
|
|
265
|
-
|
|
266
|
-
Proximos passos:
|
|
267
|
-
- /up:ux-tester — avaliar experiencia do usuario
|
|
268
|
-
- /up:melhorias — auditoria de codigo
|
|
269
|
-
- /up:modo-builder "nova feature" — adicionar funcionalidade
|
|
270
|
-
|
|
232
|
+
Relatorio: .plano/teste/DCRV-REPORT.md Screenshots: .plano/teste/
|
|
271
233
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
272
234
|
```
|
|
273
235
|
|
|
@@ -275,13 +237,10 @@ Proximos passos:
|
|
|
275
237
|
|
|
276
238
|
<success_criteria>
|
|
277
239
|
- [ ] Stack detectada e dev server rodando
|
|
278
|
-
- [ ] TODAS paginas descobertas pelo codigo fonte
|
|
279
|
-
- [ ]
|
|
280
|
-
- [ ]
|
|
281
|
-
- [ ]
|
|
282
|
-
- [ ]
|
|
283
|
-
- [ ]
|
|
284
|
-
- [ ] Issues corrigidas (se nao --no-fix)
|
|
285
|
-
- [ ] DCRV-REPORT.md gerado em .plano/teste/
|
|
286
|
-
- [ ] Resumo apresentado com scores
|
|
240
|
+
- [ ] TODAS paginas e APIs descobertas pelo codigo fonte
|
|
241
|
+
- [ ] Flags parseadas (default = roda tudo)
|
|
242
|
+
- [ ] DCRV rodou os passes do escopo (visual/interacao/api + ux/mobile/e2e conforme flags)
|
|
243
|
+
- [ ] Issues consolidadas com severidade e corrigidas (se nao --no-fix)
|
|
244
|
+
- [ ] Gate UAT rodado quando ha fase ativa (VERIFICATION.md)
|
|
245
|
+
- [ ] DCRV-REPORT.md gerado e resumo apresentado
|
|
287
246
|
</success_criteria>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: up
|
|
3
|
+
description: Porta unica do UP. Sem argumento continua de onde parou (le STATE.md). Com descricao dispara brainstorm e roteia greenfield/brownfield/clone. Subverbos estado e config.
|
|
4
|
+
argument-hint: "[descricao | estado | config]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Bash
|
|
12
|
+
- Task
|
|
13
|
+
- WebFetch
|
|
14
|
+
- WebSearch
|
|
15
|
+
- AskUserQuestion
|
|
16
|
+
- mcp__context7__*
|
|
17
|
+
- mcp__plugin_playwright_playwright__*
|
|
18
|
+
---
|
|
19
|
+
<objective>
|
|
20
|
+
Porta unica do UP. Um comando que cobre tres situacoes pelo argumento:
|
|
21
|
+
|
|
22
|
+
1. **Sem argumento** = continuar de onde parou. Le `.plano/STATE.md`, calcula progresso, e roteia pra proxima acao recomendada (planejar, executar, testar, etc.). Se nao existe `.plano/`, ofrece comecar.
|
|
23
|
+
2. **Com descricao** = dispara brainstorm escalado por tamanho (reusa `classify-task`) e roteia: greenfield (do zero), brownfield (feature em projeto existente), ou clone (recriar app a partir de URL).
|
|
24
|
+
3. **Subverbo `estado` ou `config`** = casa de estado e configuracao do projeto.
|
|
25
|
+
|
|
26
|
+
Regra dura: **maximo 3 subverbos**. So existem `continuar` (default, sem arg), `estado` e `config`. Tudo mais e detectado por contexto.
|
|
27
|
+
</objective>
|
|
28
|
+
|
|
29
|
+
<execution_context>
|
|
30
|
+
@~/.claude/up/workflows/up.md
|
|
31
|
+
</execution_context>
|
|
32
|
+
|
|
33
|
+
<context>
|
|
34
|
+
$ARGUMENTS
|
|
35
|
+
|
|
36
|
+
**Roteamento por argumento:**
|
|
37
|
+
- Vazio -> `continuar` (le STATE.md, roteia pra proxima acao).
|
|
38
|
+
- `estado` (ou `status`, `saude`, `pausar`, `resetar`, `custos`, `remover-fase`) -> subverbo estado.
|
|
39
|
+
- `config` (ou `configurar`, `onboard`, `atualizar`) -> subverbo config.
|
|
40
|
+
- Qualquer outra descricao em texto livre -> brainstorm + roteamento de projeto.
|
|
41
|
+
|
|
42
|
+
**Deteccao automatica de modo de projeto (quando ha descricao):**
|
|
43
|
+
- URL fornecida (https://...) -> CLONE.
|
|
44
|
+
- Codigo existente no diretorio (package.json, src/, .plano/) -> BROWNFIELD.
|
|
45
|
+
- Diretorio vazio / sem codigo -> GREENFIELD.
|
|
46
|
+
|
|
47
|
+
**Subverbo `estado`** cobre (sem comando proprio):
|
|
48
|
+
- status do projeto e proxima acao (ex-progresso)
|
|
49
|
+
- diagnostico de integridade do `.plano/` e reparo opcional (ex-saude)
|
|
50
|
+
- handoff `.continue-aqui.md` ao pausar (ex-pausar)
|
|
51
|
+
- restaurar contexto da sessao anterior (ex-retomar)
|
|
52
|
+
- reset do `.plano/` parcial ou total (ex-resetar)
|
|
53
|
+
- estimativa de custo em tokens dos agentes (ex-custos, Claude Code only)
|
|
54
|
+
- remover fase futura e renumerar (ex-remover-fase, operacao estrutural rara)
|
|
55
|
+
- abrir board (flag `--board` -> URL do Multica; **TODO Fase 5 (Multica)**)
|
|
56
|
+
|
|
57
|
+
**Subverbo `config`** cobre:
|
|
58
|
+
- configurar opcoes do workflow no `.plano/config.json` (ex-configurar)
|
|
59
|
+
- onboarding do dono / criar `~/.claude/up/owner-profile.md` (ex-onboard)
|
|
60
|
+
- atualizar o up-cc via npm (ex-atualizar)
|
|
61
|
+
</context>
|
|
62
|
+
|
|
63
|
+
<process>
|
|
64
|
+
Execute the up router workflow from @~/.claude/up/workflows/up.md end-to-end.
|
|
65
|
+
|
|
66
|
+
**Passo 0 — Parsear argumento e decidir rota:**
|
|
67
|
+
|
|
68
|
+
1. Sem argumento (ou so flags):
|
|
69
|
+
- Se `.plano/STATE.md` existe: rota `continuar`. Le STATE.md, mostra status, roteia pra proxima acao.
|
|
70
|
+
- Se `.plano/` NAO existe e NAO ha codigo: mostra como comecar (descrever o projeto pra disparar brainstorm).
|
|
71
|
+
- Se ha codigo mas sem `.plano/`: oferece registrar/mapear o projeto existente.
|
|
72
|
+
|
|
73
|
+
2. Primeiro token = `estado` / `config`: rota subverbo correspondente (logica inline no workflow up.md).
|
|
74
|
+
|
|
75
|
+
3. Descricao em texto livre: rota `brainstorm`.
|
|
76
|
+
|
|
77
|
+
**Brainstorm escalado por tamanho (quando ha descricao):**
|
|
78
|
+
Reusa `classify-task` (NAO reimplementar):
|
|
79
|
+
```bash
|
|
80
|
+
node "$HOME/.claude/up/bin/up-tools.cjs" classify-task "<descricao>"
|
|
81
|
+
```
|
|
82
|
+
- Trivial (1 arquivo, sem decisao de arquitetura): **0 perguntas**, anuncia em 1 linha, roteia.
|
|
83
|
+
- Pequena (1 subsistema, 1 escolha de design): **1 pergunta** via AskUserQuestion + design em 3 frases.
|
|
84
|
+
- Media/Grande (multi-subsistema, schema/API/auth): **brainstorm full** com aprovacao por secao.
|
|
85
|
+
|
|
86
|
+
Brainstorm gera BRIEFING.md (intake inline, sem CEO). Em seguida roteia:
|
|
87
|
+
- GREENFIELD -> pipeline de novo projeto (pesquisa + sintese), depois `/up:plan`.
|
|
88
|
+
- BROWNFIELD -> mapeia codebase, depois `/up:plan`.
|
|
89
|
+
- CLONE -> modo clone do mapeador (crawl + design + features + PRD), depois `/up:plan`.
|
|
90
|
+
|
|
91
|
+
**Interface alvo de orquestracao GitHub-nativa / Multica:**
|
|
92
|
+
As flags `--solo` (default, commit local), `--pr` (worktree/issue/PR), `--board` (espelho Multica), `--auto` (merge se verde) sao a interface alvo. Documentar pro usuario, mas a orquestracao real NAO roda aqui.
|
|
93
|
+
**TODO Fase 4 (GitHub-native):** worktree -> issue -> PR -> merge.
|
|
94
|
+
**TODO Fase 5 (Multica):** espelho de board batched.
|
|
95
|
+
|
|
96
|
+
**GATE — Owner Profile:**
|
|
97
|
+
Se a rota envolve brainstorm/plan e `~/.claude/up/owner-profile.md` NAO existe neste runtime, rodar config/onboarding primeiro (workflow onboarding.md). Sem profile, o brainstorm fica generico.
|
|
98
|
+
</process>
|
|
99
|
+
|
|
100
|
+
<success_criteria>
|
|
101
|
+
- [ ] Argumento parseado e rota escolhida (continuar / estado / config / brainstorm)
|
|
102
|
+
- [ ] Sem arg + .plano/ existe: STATE.md lido e proxima acao roteada
|
|
103
|
+
- [ ] Com descricao: classify-task rodado, brainstorm escalado, modo detectado
|
|
104
|
+
- [ ] Subverbos limitados a estado e config (max 3)
|
|
105
|
+
- [ ] Owner profile garantido antes de brainstorm/plan
|
|
106
|
+
</success_criteria>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// UP Session Start - SessionStart hook
|
|
3
|
+
// Injects the `usando-up` skill bootstrap as additionalContext at the start of
|
|
4
|
+
// each session (and after /clear or /compact), so the agent always boots with
|
|
5
|
+
// the UP discipline loaded -- no explicit command needed.
|
|
6
|
+
//
|
|
7
|
+
// Mirrors the auto-activation mechanism: the bootstrap teaches the agent to
|
|
8
|
+
// check skills by context. The full SKILL.md is read at runtime from the
|
|
9
|
+
// installed skills layer; a short embedded fallback is used if it's missing.
|
|
10
|
+
//
|
|
11
|
+
// Additive and fail-open: any error exits 0 without blocking the session.
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
// Events that should (re)inject the bootstrap. After clear/compact the context
|
|
17
|
+
// is wiped, so we re-prime the agent.
|
|
18
|
+
const TRIGGER_SOURCES = ['startup', 'clear', 'compact'];
|
|
19
|
+
|
|
20
|
+
// Short embedded fallback used only if the installed SKILL.md is unavailable.
|
|
21
|
+
const FALLBACK_BOOTSTRAP =
|
|
22
|
+
'Voce tem o UP instalado: um sistema de desenvolvimento orientado a especificacao, ' +
|
|
23
|
+
'em portugues, composto por skills que ativam por contexto.\n\n' +
|
|
24
|
+
'REGRA: se ha mais de 1% de chance de uma skill se aplicar ao que voce vai fazer, ' +
|
|
25
|
+
'voce DEVE invoca-la com a tool Skill ANTES de qualquer resposta ou acao. ' +
|
|
26
|
+
'Isso vale ate para perguntas simples e antes de fazer perguntas de esclarecimento. ' +
|
|
27
|
+
'Skills de processo (brainstorm, depuracao, verificacao) vem antes das de implementacao.\n\n' +
|
|
28
|
+
'Antes de qualquer trabalho criativo (criar feature, componente, comportamento novo), ' +
|
|
29
|
+
'use a skill up-brainstorm. Antes de afirmar que algo esta pronto, corrigido ou passando, ' +
|
|
30
|
+
'use a skill up-verificar-antes-de-concluir: nunca afirme sucesso sem rodar a verificacao ' +
|
|
31
|
+
'e ler a saida nesta mensagem. Para a porta unica do fluxo, use o comando /up.';
|
|
32
|
+
|
|
33
|
+
function readBootstrap() {
|
|
34
|
+
// Resolve the installed SKILL.md relative to this hook:
|
|
35
|
+
// <config>/hooks/up-session-start.js -> <config>/up/skills/usando-up/SKILL.md
|
|
36
|
+
// In the repo source layout the hook lives at up/hooks/, so the skill is at
|
|
37
|
+
// up/hooks/../skills/usando-up/SKILL.md == up/skills/usando-up/SKILL.md
|
|
38
|
+
// Both resolve via ../skills/usando-up/SKILL.md from the hook directory.
|
|
39
|
+
const candidates = [
|
|
40
|
+
path.resolve(__dirname, '..', 'skills', 'usando-up', 'SKILL.md'),
|
|
41
|
+
path.resolve(__dirname, '..', 'up', 'skills', 'usando-up', 'SKILL.md'),
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
for (const candidate of candidates) {
|
|
45
|
+
try {
|
|
46
|
+
if (fs.existsSync(candidate)) {
|
|
47
|
+
const content = fs.readFileSync(candidate, 'utf8');
|
|
48
|
+
if (content && content.trim()) return content;
|
|
49
|
+
}
|
|
50
|
+
} catch (e) { /* try next */ }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return FALLBACK_BOOTSTRAP;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function buildContext(bootstrap) {
|
|
57
|
+
return '<EXTREMELY_IMPORTANT>\n' +
|
|
58
|
+
'Voce tem o UP.\n\n' +
|
|
59
|
+
'Abaixo esta o conteudo completo da sua skill \'usando-up\' -- sua introducao a usar ' +
|
|
60
|
+
'as skills do UP. Para todas as outras skills, use a tool Skill:\n\n' +
|
|
61
|
+
bootstrap.trim() + '\n' +
|
|
62
|
+
'</EXTREMELY_IMPORTANT>';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function emit(bootstrap) {
|
|
66
|
+
const output = {
|
|
67
|
+
hookSpecificOutput: {
|
|
68
|
+
hookEventName: 'SessionStart',
|
|
69
|
+
additionalContext: buildContext(bootstrap),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
process.stdout.write(JSON.stringify(output));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let input = '';
|
|
76
|
+
const stdinTimeout = setTimeout(() => {
|
|
77
|
+
// No stdin within 3s (Windows/Git Bash guard): still inject the bootstrap.
|
|
78
|
+
try { emit(readBootstrap()); } catch (e) {}
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}, 3000);
|
|
81
|
+
|
|
82
|
+
process.stdin.setEncoding('utf8');
|
|
83
|
+
process.stdin.on('data', chunk => input += chunk);
|
|
84
|
+
process.stdin.on('end', () => {
|
|
85
|
+
clearTimeout(stdinTimeout);
|
|
86
|
+
try {
|
|
87
|
+
let source = null;
|
|
88
|
+
try {
|
|
89
|
+
const data = JSON.parse(input);
|
|
90
|
+
// SessionStart payload carries the trigger in `source` (startup|clear|compact|resume).
|
|
91
|
+
source = data && (data.source || data.hook_event_source || null);
|
|
92
|
+
} catch (e) {
|
|
93
|
+
// No/invalid payload: with no matcher available, inject anyway.
|
|
94
|
+
source = null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// If a source is present and it is NOT one of our triggers, skip silently.
|
|
98
|
+
if (source && !TRIGGER_SOURCES.includes(source)) {
|
|
99
|
+
process.exit(0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
emit(readBootstrap());
|
|
103
|
+
} catch (e) {
|
|
104
|
+
// Fail-open: never block the session.
|
|
105
|
+
}
|
|
106
|
+
process.exit(0);
|
|
107
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Engineering Principles
|
|
2
2
|
|
|
3
3
|
Principios que governam TODA decisao de implementacao no UP.
|
|
4
|
-
Carregado
|
|
4
|
+
Carregado pelo up-executor (que roteia frontend/backend/database por contexto).
|
|
5
5
|
|
|
6
6
|
Estes principios existem porque IAs tendem a escolher o caminho mais facil, nao o melhor. Cada principio combate um vicio especifico.
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Governance Rules
|
|
2
2
|
|
|
3
3
|
Regras de governanca aplicadas a TODOS os comandos UP.
|
|
4
|
-
Carregado
|
|
4
|
+
Carregado pelo orquestrador e pelo up-revisor.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -10,13 +10,13 @@ Carregado por supervisores, chiefs e CEO.
|
|
|
10
10
|
```
|
|
11
11
|
DONO (humano)
|
|
12
12
|
↓
|
|
13
|
-
|
|
13
|
+
ORQUESTRADOR (intake/canal com o dono)
|
|
14
14
|
↓
|
|
15
|
-
|
|
15
|
+
up-revisor (consolidacao + veredito que alimenta o gate)
|
|
16
16
|
↓
|
|
17
|
-
|
|
17
|
+
GATE deterministico (approvals.log)
|
|
18
18
|
↓
|
|
19
|
-
OPERACIONAIS (
|
|
19
|
+
OPERACIONAIS (agentes existentes)
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Fluxo de Aprovacao
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Production Requirements Reference
|
|
2
2
|
|
|
3
3
|
Checklist de requisitos que TODO sistema pronto para producao deve ter.
|
|
4
|
-
O up-
|
|
4
|
+
O up-arquiteto usa esta referencia para injetar requisitos automaticamente.
|
|
5
5
|
|
|
6
6
|
Cada item e um requisito com ID sugerido. O arquiteto ajusta IDs para nao colidir com requisitos explicitos do usuario.
|
|
7
7
|
|