jarvis-ai-framework 1.0.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/AGENTS.md +416 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/agents/AGENTS.md +234 -0
- package/agents/README.md +309 -0
- package/agents/engineering/data/eng.data-engineer.agent.md +309 -0
- package/agents/engineering/eng.agent.md +303 -0
- package/agents/engineering/eng.bug-hunter.md +386 -0
- package/agents/engineering/eng.cybersecurity.agent.md +503 -0
- package/agents/engineering/eng.dev-code-reviewer.md +148 -0
- package/agents/engineering/eng.docs-writer.md +152 -0
- package/agents/engineering/eng.frontend.agent.md +117 -0
- package/agents/engineering/eng.rpa.agent.md +215 -0
- package/agents/engineering/eng.tech-analyst.agent.md +102 -0
- package/agents/engineering/eng.ux-designer.agent.md +193 -0
- package/agents/engineering/qa/eng.qa.cypress-specialist.md +109 -0
- package/agents/engineering/qa/eng.qa.quality-champion-task-agent.md +85 -0
- package/agents/engineering/qa/eng.qa.quality-strategist.md +111 -0
- package/agents/engineering/qa/eng.qa.test-architect.md +400 -0
- package/agents/engineering/qa/eng.qa.test-planner.md +477 -0
- package/agents/engineering/qa/eng.qa.testing-engineer.md +339 -0
- package/agents/product/prod.pm-checker.md +52 -0
- package/bin/commands/docs-publish.js +184 -0
- package/bin/commands/docs-sync.js +139 -0
- package/bin/commands/info.js +87 -0
- package/bin/commands/init.js +237 -0
- package/bin/commands/install-rtk.js +90 -0
- package/bin/commands/list.js +48 -0
- package/bin/commands/qa-signoff.js +112 -0
- package/bin/commands/whoami.js +43 -0
- package/bin/jarvis.js +159 -0
- package/bin/lib/auth/session.js +56 -0
- package/bin/lib/config/constants.js +123 -0
- package/bin/lib/config/ide-config.js +233 -0
- package/bin/lib/core/scanner.js +124 -0
- package/bin/lib/core/sync-engine.js +551 -0
- package/bin/lib/docs/fetch-file.sh +41 -0
- package/bin/lib/docs/publish-file.sh +284 -0
- package/bin/lib/docs/validate-frontmatter.js +157 -0
- package/bin/lib/env-loader.js +198 -0
- package/bin/lib/tasks/comment.js +131 -0
- package/bin/lib/utils/git-parser.js +145 -0
- package/bin/lib/utils/logger.js +104 -0
- package/bin/lib/utils/npmrc-parser.js +106 -0
- package/bin/lib/utils/paths.js +55 -0
- package/bin/lib/utils/ui.js +59 -0
- package/bin/lib/vcs/api.js +312 -0
- package/bin/lib/vcs/create-issue.js +43 -0
- package/bin/lib/vcs/create-merge.js +43 -0
- package/bin/lib/vcs/fetch-raw.js +30 -0
- package/bin/postinstall.js +41 -0
- package/members.md +25 -0
- package/package.json +55 -0
- package/rules/AGENTS.md +205 -0
- package/rules/engineering/data/data-rules.md +200 -0
- package/rules/engineering/eng-rules.md +243 -0
- package/rules/engineering/eng-security-rules.md +186 -0
- package/rules/engineering/eng.breakdown-subtasks-rules.md +585 -0
- package/rules/engineering/eng.bump-rules.md +27 -0
- package/rules/engineering/eng.docs-scraping-rules.md +64 -0
- package/rules/engineering/eng.downstream-flow-rules.md +297 -0
- package/rules/engineering/eng.integrations-rules.md +73 -0
- package/rules/engineering/eng.plan-rules.md +333 -0
- package/rules/engineering/eng.pr-rules.md +359 -0
- package/rules/engineering/eng.pre-pr-rules.md +103 -0
- package/rules/engineering/eng.start-rules.md +246 -0
- package/rules/engineering/eng.tech-spec-rules.md +968 -0
- package/rules/engineering/eng.work-rules.md +312 -0
- package/rules/engineering/frontend/eng.frontend-rules.md +147 -0
- package/rules/engineering/qa/eng.qa.cypress-standards-rules.md +259 -0
- package/rules/engineering/qa/eng.qa.exploratory-session-rules.md +137 -0
- package/rules/engineering/qa/eng.qa.quality-gate-scoring-rules.md +181 -0
- package/rules/engineering/qa/eng.qa.tech-spec-validation-criteria-rules.md +120 -0
- package/rules/engineering/rpa/eng.rpa-rules.md +230 -0
- package/rules/product/README.md +24 -0
- package/rules/product/prod-rules.md +151 -0
- package/rules/rtk-rules.md +68 -0
- package/skills/AGENTS.md +290 -0
- package/skills/SKILLS-ROADMAP.md +333 -0
- package/skills/churn-audit/SKILL.md +385 -0
- package/skills/context-detect/SKILL.md +399 -0
- package/skills/context-detect/assets/context-profile-template.md +127 -0
- package/skills/docs-central/README.md +310 -0
- package/skills/docs-central/SKILL.md +423 -0
- package/skills/docs-index/SKILL.md +377 -0
- package/skills/eng-ai-engineer/SKILL.md +296 -0
- package/skills/eng-arch-c4/SKILL.md +358 -0
- package/skills/eng-arch-c4/assets/example-code.md +189 -0
- package/skills/eng-arch-c4/assets/example-component.md +105 -0
- package/skills/eng-arch-c4/assets/example-container.md +104 -0
- package/skills/eng-arch-c4/assets/example-context.md +81 -0
- package/skills/eng-backend/SKILL.md +776 -0
- package/skills/eng-browser-extension-builder/SKILL.md +385 -0
- package/skills/eng-cybersecurity/SKILL.md +645 -0
- package/skills/eng-data-bi/SKILL.md +199 -0
- package/skills/eng-data-debug/SKILL.md +307 -0
- package/skills/eng-data-engineer/SKILL.md +256 -0
- package/skills/eng-data-onboard/SKILL.md +310 -0
- package/skills/eng-data-orchestrator/SKILL.md +426 -0
- package/skills/eng-design-system/SKILL.md +619 -0
- package/skills/eng-docs-write/SKILL.md +312 -0
- package/skills/eng-frontend/SKILL.md +913 -0
- package/skills/eng-jira-comment/SKILL.md +17 -0
- package/skills/eng-microfrontend/SKILL.md +602 -0
- package/skills/eng-ms-trace/SKILL.md +469 -0
- package/skills/eng-nestjs/SKILL.md +791 -0
- package/skills/eng-performance-engineer/SKILL.md +312 -0
- package/skills/eng-pr/SKILL.md +339 -0
- package/skills/eng-qa-a11y-audit/SKILL.md +269 -0
- package/skills/eng-qa-bug-report/SKILL.md +1088 -0
- package/skills/eng-qa-bug-report/TASK_MANAGERS.md +138 -0
- package/skills/eng-qa-cypress-e2e/SKILL.md +177 -0
- package/skills/eng-qa-dev-guide/SKILL.md +164 -0
- package/skills/eng-qa-e2e/SKILL.md +400 -0
- package/skills/eng-qa-e2e-spec-writer/SKILL.md +322 -0
- package/skills/eng-qa-exploratory/SKILL.md +188 -0
- package/skills/eng-qa-gate/SKILL.md +370 -0
- package/skills/eng-qa-gate/assets/checklist-validacao.md +291 -0
- package/skills/eng-qa-graphql-contract/SKILL.md +256 -0
- package/skills/eng-qa-quality-report/SKILL.md +412 -0
- package/skills/eng-qa-test-plan/SKILL.md +466 -0
- package/skills/eng-qa-test-plan/assets/test-coverage-template.md +92 -0
- package/skills/eng-qa-test-plan/assets/test-patterns.md +178 -0
- package/skills/eng-qa-testsprite/SKILL.md +325 -0
- package/skills/eng-qa-testsprite/references/testsprite-mcp.md +224 -0
- package/skills/eng-qa-unit-test/SKILL.md +471 -0
- package/skills/eng-rabbitmq/SKILL.md +661 -0
- package/skills/eng-scraper/SKILL.md +683 -0
- package/skills/eng-scraper-robot-builder/SKILL.md +370 -0
- package/skills/eng-security-patch/SKILL.md +378 -0
- package/skills/eng-security-triage/SKILL.md +266 -0
- package/skills/eng-task-comment/SKILL.md +60 -0
- package/skills/eng-tech-analyst/SKILL.md +529 -0
- package/skills/eng-threat-model/SKILL.md +161 -0
- package/skills/init-jarvis/SKILL.md +1304 -0
- package/skills/init-jarvis/assets/mcp-configs.md +389 -0
- package/skills/init-jarvis/assets/onboarding-checklist.md +104 -0
- package/skills/init-jarvis/assets/setup-guide.md +360 -0
- package/skills/lovable-prompt-generator/SKILL.md +304 -0
- package/skills/prod-roadmap-report/README.md +303 -0
- package/skills/prod-roadmap-report/SKILL.md +198 -0
- package/skills/prod-roadmap-report/commands/status.compiled.single.team.md +23 -0
- package/skills/prod-roadmap-report/commands/status.list.projects.md +17 -0
- package/skills/prod-roadmap-report/commands/status.memory.md +192 -0
- package/skills/prod-roadmap-report/commands/status.roadmap.preview.md +94 -0
- package/skills/prod-roadmap-report/references/detailed-guide.md +236 -0
- package/skills/prod-roadmap-report/rules/detailed-guide.md +237 -0
- package/skills/prod-roadmap-report/rules/status-report-rules.md +44 -0
- package/skills/prod-roadmap-report/templates/template-multiple-teams-compiled-status.md +53 -0
- package/skills/prod-roadmap-report/templates/template-projects-list.md +23 -0
- package/skills/prod-roadmap-report/templates/template-single-team-compiled-status.md +60 -0
- package/skills/prod-roadmap-report/templates/template-single-team-status.md +49 -0
- package/skills/prod-specs/SKILL.md +108 -0
- package/skills/prod-specs/references/prod.spec.clarify.md +176 -0
- package/skills/prod-specs/references/prod.spec.epic.md +107 -0
- package/skills/prod-specs/references/prod.spec.frd.md +135 -0
- package/skills/prod-specs/references/prod.spec.issue.md +145 -0
- package/skills/prod-specs/references/prod.spec.prd.md +118 -0
- package/skills/prod-specs/rules/prod-spec-rules.md +186 -0
- package/skills/prod-specs/templates/prod-breakdown-template.md +136 -0
- package/skills/prod-specs/templates/prod-epic-template.md +76 -0
- package/skills/prod-specs/templates/prod-frd-template.md +172 -0
- package/skills/prod-specs/templates/prod-issue-template.md +68 -0
- package/skills/prod-specs/templates/prod-prd-full-template.md +159 -0
- package/skills/prod-specs/templates/prod-prd-template.md +173 -0
- package/skills/prod-specs-update/SKILL.md +272 -0
- package/skills/report-issue/SKILL.md +156 -0
- package/taxonomy.md +270 -0
- package/templates/AGENTS.md +189 -0
- package/templates/CDD aplicado a Prompts.md +182 -0
- package/templates/ENV-template.md +187 -0
- package/templates/engineering/AGENTS-template.md +71 -0
- package/templates/engineering/ARD-template.md +193 -0
- package/templates/engineering/CONTACTS-template.md +135 -0
- package/templates/engineering/PR-template.md +40 -0
- package/templates/engineering/RFC-Playbook.md +325 -0
- package/templates/engineering/RFC-template.md +199 -0
- package/templates/engineering/architecture-template.md +277 -0
- package/templates/engineering/breakdown-subtasks-template.md +582 -0
- package/templates/engineering/c4-model-template.md +516 -0
- package/templates/engineering/data-contract-template.md +135 -0
- package/templates/engineering/data-pipeline-template.md +163 -0
- package/templates/engineering/plan-template.md +255 -0
- package/templates/engineering/qa/eng.qa.quality-gate-examples-template.md +311 -0
- package/templates/engineering/qa/eng.qa.quality-gate-report-template.md +249 -0
- package/templates/engineering/qa/qa.cypress-test-template.md +172 -0
- package/templates/engineering/qa/qa.exploratory-session-template.md +148 -0
- package/templates/engineering/qa/qa.quality-report-template.md +130 -0
- package/templates/engineering/qa/qa.release-signoff-template.md +54 -0
- package/templates/engineering/qa/qa.sprint-plan-template.md +49 -0
- package/templates/engineering/swagger-template.md +145 -0
- package/templates/engineering/tech-spec-template.md +497 -0
- package/templates/engineering/work-progress-template.md +155 -0
- package/workflows/AGENTS.md +240 -0
- package/workflows/README.md +160 -0
- package/workflows/all-tools.md +11 -0
- package/workflows/engineering/data/data.contract.md +202 -0
- package/workflows/engineering/data/data.new-pipeline.md +234 -0
- package/workflows/engineering/eng.breakdown-subtasks.md +420 -0
- package/workflows/engineering/eng.bug-audit.md +591 -0
- package/workflows/engineering/eng.build-tech-spec.md +1116 -0
- package/workflows/engineering/eng.create-ard-from-code.md +259 -0
- package/workflows/engineering/eng.create-ard.md +382 -0
- package/workflows/engineering/eng.create-rfc.md +245 -0
- package/workflows/engineering/eng.debug.md +479 -0
- package/workflows/engineering/eng.docs.md +40 -0
- package/workflows/engineering/eng.light-arch.md +84 -0
- package/workflows/engineering/eng.plan.md +213 -0
- package/workflows/engineering/eng.pr.md +466 -0
- package/workflows/engineering/eng.pre-pr.md +167 -0
- package/workflows/engineering/eng.review.md +185 -0
- package/workflows/engineering/eng.rpa.robot.md +342 -0
- package/workflows/engineering/eng.security-audit.md +312 -0
- package/workflows/engineering/eng.security-incident.md +275 -0
- package/workflows/engineering/eng.security-pipeline.md +210 -0
- package/workflows/engineering/eng.security-review.md +235 -0
- package/workflows/engineering/eng.start.md +494 -0
- package/workflows/engineering/eng.work.md +558 -0
- package/workflows/engineering/frontend/eng.frontend-component.md +190 -0
- package/workflows/engineering/frontend/eng.frontend-perf-audit.md +375 -0
- package/workflows/engineering/frontend/eng.frontend-review.md +185 -0
- package/workflows/engineering/qa/eng.qa-dev-quality-guide.md +51 -0
- package/workflows/engineering/qa/eng.qa-e2e-test-generation.md +51 -0
- package/workflows/engineering/qa/eng.qa-exploratory-session.md +60 -0
- package/workflows/engineering/qa/eng.qa-quality-gate-validation.md +202 -0
- package/workflows/engineering/qa/eng.qa-quality-report.md +83 -0
- package/workflows/engineering/qa/eng.qa-refinement-entry.md +83 -0
- package/workflows/engineering/qa/eng.qa-release-signoff.md +170 -0
- package/workflows/engineering/qa/eng.qa-sprint-planning.md +100 -0
- package/workflows/engineering/ta/eng.ta.atendimento.md +93 -0
- package/workflows/product/prod.roadmap.preview.md +110 -0
- package/workflows/product/prod.spec.breakdown.md +163 -0
- package/workflows/product/prod.spec.clarify.md +178 -0
- package/workflows/product/prod.spec.epic.md +154 -0
- package/workflows/product/prod.spec.frd.md +96 -0
- package/workflows/product/prod.spec.issue.md +145 -0
- package/workflows/product/prod.spec.md +60 -0
- package/workflows/product/prod.spec.prd.md +100 -0
- package/workflows/taxonomy.md +92 -0
- package/workflows/warm-up.md +574 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-detect
|
|
3
|
+
description: >
|
|
4
|
+
Detecta contexto do projeto e da tarefa para calibrar comportamento dos workflows.
|
|
5
|
+
Trigger: Use no início de qualquer workflow para definir CONTEXT_PROFILE ou quando precisar recalibrar.
|
|
6
|
+
argument-hint: "[jira-key-opcional]"
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
allowed-tools: Read Grep Glob Bash
|
|
9
|
+
license: AGPL-3.0
|
|
10
|
+
metadata:
|
|
11
|
+
author: jarvis-team
|
|
12
|
+
version: "1.0"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Context Detect - Detecção de Contexto CDD
|
|
16
|
+
|
|
17
|
+
Você é um **especialista em análise de contexto** focado em detectar características do projeto e da tarefa para calibrar o comportamento dos workflows do Framework Jarvis.
|
|
18
|
+
|
|
19
|
+
## Objetivo
|
|
20
|
+
|
|
21
|
+
Centralizar a lógica de detecção de contexto (CDD - Context-Driven Development) em um skill reutilizável que gera um `CONTEXT_PROFILE` para uso em workflows e agents.
|
|
22
|
+
|
|
23
|
+
## Entrada
|
|
24
|
+
|
|
25
|
+
- `$ARGUMENTS` - (Opcional) Jira key da tarefa para análise de tipo (ex: `TASK-123`, `BUG-456`)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quando Usar
|
|
30
|
+
|
|
31
|
+
Use este skill quando:
|
|
32
|
+
- Iniciar um novo workflow (`eng.start`, `eng.plan`, `eng.work`)
|
|
33
|
+
- Precisar recalibrar o contexto durante uma sessão
|
|
34
|
+
- Quiser verificar as características detectadas do projeto
|
|
35
|
+
- Outro workflow/agent precisar do CONTEXT_PROFILE
|
|
36
|
+
|
|
37
|
+
**NÃO usar quando:**
|
|
38
|
+
- O CONTEXT_PROFILE já foi definido e está válido na sessão
|
|
39
|
+
- Apenas consultando informações sem executar workflows
|
|
40
|
+
- A variável `ENABLE_CDD=false` estiver configurada no ENV.md
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Fluxo de Detecção
|
|
45
|
+
|
|
46
|
+
### 0. Verificação de Ativação do CDD
|
|
47
|
+
|
|
48
|
+
Antes de executar qualquer detecção, verifique se o CDD está habilitado:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Verificar se ENABLE_CDD está configurado
|
|
52
|
+
grep "^ENABLE_CDD=" $IDE/ENV.md 2>/dev/null
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Comportamento:**
|
|
56
|
+
|
|
57
|
+
| ENABLE_CDD | Ação |
|
|
58
|
+
|------------|------|
|
|
59
|
+
| `true` | Executar detecção normalmente |
|
|
60
|
+
| `false` | Exibir mensagem e sair sem executar |
|
|
61
|
+
| Não definida | Assumir `false` (CDD desabilitado por padrão) |
|
|
62
|
+
|
|
63
|
+
**Se CDD estiver desabilitado**, exibir:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
ℹ️ CDD (Context-Driven Development) está desabilitado
|
|
67
|
+
|
|
68
|
+
O sistema de detecção de contexto não será executado.
|
|
69
|
+
Os workflows usarão comportamento padrão sem calibração contextual.
|
|
70
|
+
|
|
71
|
+
Para habilitar, configure ENABLE_CDD=true no arquivo $IDE/ENV.md
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
E encerrar o skill sem executar as detecções.
|
|
75
|
+
|
|
76
|
+
### 1. Detecção do Tipo de Tarefa
|
|
77
|
+
|
|
78
|
+
Analise indicadores para classificar a tarefa:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
82
|
+
│ DETECÇÃO DO TIPO DE TAREFA │
|
|
83
|
+
├─────────────────────────────────────────────────────────────┤
|
|
84
|
+
│ │
|
|
85
|
+
│ Branch atual contém "hotfix/"? │
|
|
86
|
+
│ → SIM: tipo = hotfix │
|
|
87
|
+
│ │
|
|
88
|
+
│ Branch atual contém "fix/" ou "bugfix/"? │
|
|
89
|
+
│ → SIM: tipo = bugfix │
|
|
90
|
+
│ │
|
|
91
|
+
│ Jira key começa com "BUG-"? │
|
|
92
|
+
│ → SIM: tipo = bugfix │
|
|
93
|
+
│ │
|
|
94
|
+
│ Branch contém "refactor/" ou "tech-debt/"? │
|
|
95
|
+
│ → SIM: tipo = refactor │
|
|
96
|
+
│ │
|
|
97
|
+
│ Caso contrário: │
|
|
98
|
+
│ → tipo = feature │
|
|
99
|
+
│ │
|
|
100
|
+
└─────────────────────────────────────────────────────────────┘
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Comando para detectar branch:
|
|
104
|
+
```bash
|
|
105
|
+
git branch --show-current
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 2. Detecção de Características do Projeto
|
|
109
|
+
|
|
110
|
+
Execute as verificações silenciosamente:
|
|
111
|
+
|
|
112
|
+
#### 2.1 Testes Existentes
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Verificar se existem arquivos de teste
|
|
116
|
+
find . -name "*.test.ts" -o -name "*.test.js" -o -name "*.spec.ts" -o -name "*.spec.js" | head -5
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
| Resultado | Classificação | Impacto |
|
|
120
|
+
|-----------|---------------|---------|
|
|
121
|
+
| Arquivos encontrados | `testes: existentes` | Exigir testes para código novo |
|
|
122
|
+
| Nenhum arquivo | `testes: ausentes` | Sugerir, mas não bloquear |
|
|
123
|
+
|
|
124
|
+
#### 2.2 TypeScript Strict
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Verificar tsconfig.json
|
|
128
|
+
grep -l '"strict":\s*true' tsconfig.json 2>/dev/null
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
| Resultado | Classificação | Impacto |
|
|
132
|
+
|-----------|---------------|---------|
|
|
133
|
+
| Encontrado | `typescript: strict` | Impor tipagem forte, rejeitar `any` |
|
|
134
|
+
| Não encontrado | `typescript: relaxado` | Aceitar tipagem gradual |
|
|
135
|
+
|
|
136
|
+
#### 2.3 CI/CD
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Verificar pipelines
|
|
140
|
+
ls .github/workflows/*.yml 2>/dev/null || ls .gitlab-ci.yml 2>/dev/null
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| Resultado | Classificação | Impacto |
|
|
144
|
+
|-----------|---------------|---------|
|
|
145
|
+
| Encontrado | `cicd: configurado` | Validar localmente antes de sugerir PR |
|
|
146
|
+
| Não encontrado | `cicd: ausente` | Alertar sobre ausência de validação |
|
|
147
|
+
|
|
148
|
+
#### 2.4 Linter/Formatter
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Verificar configuração de lint
|
|
152
|
+
ls .eslintrc* .prettierrc* biome.json 2>/dev/null | head -1
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
| Resultado | Classificação | Impacto |
|
|
156
|
+
|-----------|---------------|---------|
|
|
157
|
+
| Encontrado | `linter: configurado` | Garantir que código passa no lint |
|
|
158
|
+
| Não encontrado | `linter: ausente` | Seguir convenções observadas |
|
|
159
|
+
|
|
160
|
+
#### 2.5 Cobertura de Testes
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Verificar relatório de cobertura ou executar
|
|
164
|
+
ls coverage/lcov-report/index.html 2>/dev/null
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
| Resultado | Classificação |
|
|
168
|
+
|-----------|---------------|
|
|
169
|
+
| > 70% | `cobertura: alta` |
|
|
170
|
+
| 40-70% | `cobertura: média` |
|
|
171
|
+
| < 40% ou ausente | `cobertura: baixa` |
|
|
172
|
+
|
|
173
|
+
### 3. Leitura do ENV.md
|
|
174
|
+
|
|
175
|
+
Extraia as variáveis relevantes:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
grep -E "^(POSITION|MAX_AI_EXECUTION_PERCENTAGE)=" $IDE/ENV.md
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### 3.1 Calibração por POSITION
|
|
182
|
+
|
|
183
|
+
**Valores válidos de POSITION:**
|
|
184
|
+
|
|
185
|
+
| Categoria | Valores | comunicacao |
|
|
186
|
+
|-----------|---------|-------------|
|
|
187
|
+
| Técnico Junior | `junior`, `pleno` | `didático` |
|
|
188
|
+
| Técnico Sênior | `senior`, `specialist` | `direto` |
|
|
189
|
+
| Liderança Técnica | `tech-lead`, `staff` | `estratégico` |
|
|
190
|
+
| Gestão de Produto | `pm`, `tpm`, `gpm` | `estratégico` |
|
|
191
|
+
| Executivo | `cto`, `principal` | `estratégico` |
|
|
192
|
+
|
|
193
|
+
> ⚠️ **Valor padrão**: Se POSITION não estiver definido ou tiver valor desconhecido, usar `pleno` (comunicacao: `didático`)
|
|
194
|
+
|
|
195
|
+
**Comportamento por comunicacao:**
|
|
196
|
+
|
|
197
|
+
| comunicacao | Comportamento |
|
|
198
|
+
|-------------|---------------|
|
|
199
|
+
| `didático` | Explicar decisões, incluir referências, usar exemplos |
|
|
200
|
+
| `direto` | Ser conciso, focar em trade-offs e riscos |
|
|
201
|
+
| `estratégico` | Incluir impacto organizacional, visão de longo prazo |
|
|
202
|
+
|
|
203
|
+
#### 3.2 Calibração por MAX_AI_EXECUTION_PERCENTAGE
|
|
204
|
+
|
|
205
|
+
| Valor | autonomia | Comportamento |
|
|
206
|
+
|-------|-----------|---------------|
|
|
207
|
+
| >= 80% | `alta` | Executar decisões, reportar ao final |
|
|
208
|
+
| 70-79% | `média` | Executar, pausar em decisões críticas |
|
|
209
|
+
| 60-69% | `baixa` | Apresentar opções, aguardar aprovação |
|
|
210
|
+
|
|
211
|
+
### 4. Detecção de Urgência
|
|
212
|
+
|
|
213
|
+
Analise a mensagem do usuário e contexto:
|
|
214
|
+
|
|
215
|
+
| Sinal | urgencia |
|
|
216
|
+
|-------|----------|
|
|
217
|
+
| Palavras: `urgente`, `rápido`, `produção`, `incidente`, `hotfix` | `alta` |
|
|
218
|
+
| Palavras: `tech-debt`, `refactor`, `melhorar` | `baixa` |
|
|
219
|
+
| Sem sinais específicos | `normal` |
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Geração do CONTEXT_PROFILE
|
|
224
|
+
|
|
225
|
+
Com base em todas as detecções, gere o perfil:
|
|
226
|
+
|
|
227
|
+
```yaml
|
|
228
|
+
CONTEXT_PROFILE:
|
|
229
|
+
# Classificação da Tarefa
|
|
230
|
+
tipo: [hotfix|bugfix|feature|refactor]
|
|
231
|
+
urgencia: [alta|normal|baixa]
|
|
232
|
+
|
|
233
|
+
# Calibração de Rigor
|
|
234
|
+
rigor: [mínimo|padrão|alto]
|
|
235
|
+
|
|
236
|
+
# Calibração de Comunicação
|
|
237
|
+
comunicacao: [didático|direto|estratégico]
|
|
238
|
+
|
|
239
|
+
# Calibração de Autonomia
|
|
240
|
+
autonomia: [baixa|média|alta]
|
|
241
|
+
|
|
242
|
+
# Características do Projeto
|
|
243
|
+
projeto:
|
|
244
|
+
testes: [existentes|ausentes]
|
|
245
|
+
typescript: [strict|relaxado|ausente]
|
|
246
|
+
cicd: [configurado|ausente]
|
|
247
|
+
linter: [configurado|ausente]
|
|
248
|
+
cobertura: [alta|média|baixa]
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Matriz de Rigor
|
|
252
|
+
|
|
253
|
+
| tipo | urgencia | rigor resultante |
|
|
254
|
+
|------|----------|------------------|
|
|
255
|
+
| hotfix | alta | mínimo |
|
|
256
|
+
| hotfix | * | mínimo |
|
|
257
|
+
| bugfix | alta | mínimo |
|
|
258
|
+
| bugfix | normal | padrão |
|
|
259
|
+
| feature | * | padrão |
|
|
260
|
+
| refactor | * | alto |
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Output
|
|
265
|
+
|
|
266
|
+
### Arquivo Gerado
|
|
267
|
+
|
|
268
|
+
Salvar em `$SESSIONS_DIR/eng/{TASK_MANAGER_KEY}/context.md` (se `TASK_MANAGER_KEY` fornecido) ou exibir no terminal.
|
|
269
|
+
|
|
270
|
+
### Formato de Saída
|
|
271
|
+
|
|
272
|
+
```markdown
|
|
273
|
+
# Contexto Detectado
|
|
274
|
+
|
|
275
|
+
## CONTEXT_PROFILE
|
|
276
|
+
|
|
277
|
+
```yaml
|
|
278
|
+
tipo: feature
|
|
279
|
+
urgencia: normal
|
|
280
|
+
rigor: padrão
|
|
281
|
+
comunicacao: direto
|
|
282
|
+
autonomia: alta
|
|
283
|
+
|
|
284
|
+
projeto:
|
|
285
|
+
testes: existentes
|
|
286
|
+
typescript: strict
|
|
287
|
+
cicd: configurado
|
|
288
|
+
linter: configurado
|
|
289
|
+
cobertura: média
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Resumo Visual
|
|
293
|
+
|
|
294
|
+
| Aspecto | Valor | Impacto |
|
|
295
|
+
|---------|-------|---------|
|
|
296
|
+
| Tipo | feature | Fluxo completo |
|
|
297
|
+
| Rigor | padrão | Todas as validações |
|
|
298
|
+
| Comunicação | direto | Foco em trade-offs |
|
|
299
|
+
| Autonomia | alta | Executar e reportar |
|
|
300
|
+
|
|
301
|
+
## Ajustes Aplicados
|
|
302
|
+
|
|
303
|
+
- Testes: Exigir testes para código novo
|
|
304
|
+
- TypeScript: Impor tipagem forte
|
|
305
|
+
- CI/CD: Validar localmente antes de PR
|
|
306
|
+
- Linter: Garantir que código passa
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
> Este perfil será usado pelos workflows `eng.start`, `eng.plan` e `eng.work`.
|
|
311
|
+
> Para recalibrar, execute `/context-detect` novamente.
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Mensagem de Conclusão
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
📊 CONTEXTO DETECTADO
|
|
320
|
+
|
|
321
|
+
🏷️ Tipo: {tipo}
|
|
322
|
+
⚡ Urgência: {urgencia}
|
|
323
|
+
⚙️ Rigor: {rigor}
|
|
324
|
+
💬 Comunicação: {comunicacao}
|
|
325
|
+
🤖 Autonomia: {autonomia}
|
|
326
|
+
|
|
327
|
+
📁 Projeto:
|
|
328
|
+
- Testes: {testes}
|
|
329
|
+
- TypeScript: {typescript}
|
|
330
|
+
- CI/CD: {cicd}
|
|
331
|
+
- Cobertura: {cobertura}
|
|
332
|
+
|
|
333
|
+
→ Perfil salvo em: {caminho}
|
|
334
|
+
→ Os workflows serão calibrados automaticamente.
|
|
335
|
+
→ Para ajustar, informe: "/context-detect --override tipo=hotfix"
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Override Manual
|
|
341
|
+
|
|
342
|
+
O usuário pode sobrescrever qualquer valor detectado:
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
/context-detect --override tipo=hotfix urgencia=alta
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Parâmetros válidos para override:
|
|
349
|
+
- `tipo`: hotfix, bugfix, feature, refactor
|
|
350
|
+
- `urgencia`: alta, normal, baixa
|
|
351
|
+
- `rigor`: mínimo, padrão, alto
|
|
352
|
+
- `comunicacao`: didático, direto, estratégico
|
|
353
|
+
- `autonomia`: baixa, média, alta
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Regras
|
|
358
|
+
|
|
359
|
+
### Nunca
|
|
360
|
+
- Assumir contexto sem detectar
|
|
361
|
+
- Ignorar override explícito do usuário
|
|
362
|
+
- Verbalizar detecções intermediárias (apenas resultado final)
|
|
363
|
+
|
|
364
|
+
### Sempre
|
|
365
|
+
- Executar todas as verificações
|
|
366
|
+
- Respeitar hierarquia de detecção
|
|
367
|
+
- Permitir override do usuário
|
|
368
|
+
- Salvar perfil para reutilização
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Integração com Workflows
|
|
373
|
+
|
|
374
|
+
Este skill é chamado automaticamente pela Fase 0 dos workflows:
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
eng.start (Fase 0) → /context-detect → CONTEXT_PROFILE
|
|
378
|
+
↓
|
|
379
|
+
$SESSIONS_DIR/eng/{TASK_MANAGER_KEY}/context.md
|
|
380
|
+
↓
|
|
381
|
+
eng.plan (Fase 0) ← herda perfil
|
|
382
|
+
eng.work (Fase 0) ← herda perfil
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Workflows podem ler o perfil existente:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
cat $SESSIONS_DIR/eng/{TASK_MANAGER_KEY}/context.md
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Se o arquivo existir e for recente (< 1 hora), usar perfil existente.
|
|
392
|
+
Se não existir ou for antigo, executar detecção novamente.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Recursos Adicionais
|
|
397
|
+
|
|
398
|
+
- **Template**: Veja [assets/context-profile-template.md](assets/context-profile-template.md)
|
|
399
|
+
- **Documentação CDD**: Veja `$IDE/templates/CDD aplicado a Prompts.md`
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Contexto Detectado - {TASK_MANAGER_KEY}
|
|
2
|
+
|
|
3
|
+
> Gerado automaticamente pelo skill `/context-detect`
|
|
4
|
+
> Data: {DATA_GERACAO}
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## CONTEXT_PROFILE
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
CONTEXT_PROFILE:
|
|
12
|
+
# Classificação da Tarefa
|
|
13
|
+
tipo: {TIPO} # hotfix | bugfix | feature | refactor
|
|
14
|
+
urgencia: {URGENCIA} # alta | normal | baixa
|
|
15
|
+
|
|
16
|
+
# Calibração de Rigor
|
|
17
|
+
rigor: {RIGOR} # mínimo | padrão | alto
|
|
18
|
+
|
|
19
|
+
# Calibração de Comunicação
|
|
20
|
+
comunicacao: {COMUNICACAO} # didático | direto | estratégico
|
|
21
|
+
|
|
22
|
+
# Calibração de Autonomia
|
|
23
|
+
autonomia: {AUTONOMIA} # baixa | média | alta
|
|
24
|
+
|
|
25
|
+
# Características do Projeto
|
|
26
|
+
projeto:
|
|
27
|
+
testes: {TESTES} # existentes | ausentes
|
|
28
|
+
typescript: {TYPESCRIPT} # strict | relaxado | ausente
|
|
29
|
+
cicd: {CICD} # configurado | ausente
|
|
30
|
+
linter: {LINTER} # configurado | ausente
|
|
31
|
+
cobertura: {COBERTURA} # alta | média | baixa
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Resumo Visual
|
|
37
|
+
|
|
38
|
+
| Aspecto | Valor | Impacto no Workflow |
|
|
39
|
+
|---------|-------|---------------------|
|
|
40
|
+
| **Tipo** | {TIPO} | {IMPACTO_TIPO} |
|
|
41
|
+
| **Urgência** | {URGENCIA} | {IMPACTO_URGENCIA} |
|
|
42
|
+
| **Rigor** | {RIGOR} | {IMPACTO_RIGOR} |
|
|
43
|
+
| **Comunicação** | {COMUNICACAO} | {IMPACTO_COMUNICACAO} |
|
|
44
|
+
| **Autonomia** | {AUTONOMIA} | {IMPACTO_AUTONOMIA} |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Detecções do Projeto
|
|
49
|
+
|
|
50
|
+
### Testes
|
|
51
|
+
- **Status**: {TESTES}
|
|
52
|
+
- **Impacto**: {IMPACTO_TESTES}
|
|
53
|
+
- **Arquivos encontrados**: {ARQUIVOS_TESTE}
|
|
54
|
+
|
|
55
|
+
### TypeScript
|
|
56
|
+
- **Status**: {TYPESCRIPT}
|
|
57
|
+
- **Impacto**: {IMPACTO_TYPESCRIPT}
|
|
58
|
+
|
|
59
|
+
### CI/CD
|
|
60
|
+
- **Status**: {CICD}
|
|
61
|
+
- **Pipeline**: {PIPELINE_DETECTADO}
|
|
62
|
+
- **Impacto**: {IMPACTO_CICD}
|
|
63
|
+
|
|
64
|
+
### Linter/Formatter
|
|
65
|
+
- **Status**: {LINTER}
|
|
66
|
+
- **Ferramenta**: {FERRAMENTA_LINT}
|
|
67
|
+
- **Impacto**: {IMPACTO_LINTER}
|
|
68
|
+
|
|
69
|
+
### Cobertura de Testes
|
|
70
|
+
- **Status**: {COBERTURA}
|
|
71
|
+
- **Percentual**: {PERCENTUAL_COBERTURA}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Fonte das Calibrações
|
|
76
|
+
|
|
77
|
+
### Do ENV.md
|
|
78
|
+
- **POSITION**: {POSITION}
|
|
79
|
+
- **MAX_AI_EXECUTION_PERCENTAGE**: {MAX_AI_PERCENTAGE}
|
|
80
|
+
|
|
81
|
+
### Da Branch
|
|
82
|
+
- **Branch atual**: {BRANCH_ATUAL}
|
|
83
|
+
- **Tipo inferido**: {TIPO_INFERIDO_BRANCH}
|
|
84
|
+
|
|
85
|
+
### Da Mensagem
|
|
86
|
+
- **Sinais de urgência**: {SINAIS_URGENCIA}
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Ajustes Aplicados aos Workflows
|
|
91
|
+
|
|
92
|
+
### eng.start
|
|
93
|
+
- {AJUSTE_START_1}
|
|
94
|
+
- {AJUSTE_START_2}
|
|
95
|
+
|
|
96
|
+
### eng.plan
|
|
97
|
+
- {AJUSTE_PLAN_1}
|
|
98
|
+
- {AJUSTE_PLAN_2}
|
|
99
|
+
|
|
100
|
+
### eng.work
|
|
101
|
+
- {AJUSTE_WORK_1}
|
|
102
|
+
- {AJUSTE_WORK_2}
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Override
|
|
107
|
+
|
|
108
|
+
Para sobrescrever este perfil, execute:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
/context-detect --override tipo={NOVO_TIPO} urgencia={NOVA_URGENCIA}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Ou edite manualmente os valores acima e salve o arquivo.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Validade
|
|
119
|
+
|
|
120
|
+
- **Gerado em**: {DATA_GERACAO}
|
|
121
|
+
- **Válido até**: {DATA_EXPIRACAO} (1 hora após geração)
|
|
122
|
+
- **Recalibrar**: Execute `/context-detect` para atualizar
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
> Este perfil é usado automaticamente pelos workflows do Framework Jarvis.
|
|
127
|
+
> Documentação: `$IDE/templates/CDD aplicado a Prompts.md`
|